summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.prev-version2
-rw-r--r--.tarball-version2
-rw-r--r--.version2
-rw-r--r--.x-sc_prohibit_tab_based_indentation5
-rw-r--r--.x-update-copyright1
-rw-r--r--AUTHORS2
-rw-r--r--BACKLOG2
-rw-r--r--ChangeLog251
-rw-r--r--GNUmakefile28
-rw-r--r--INSTALL12
-rw-r--r--Makefile.am8
-rw-r--r--Makefile.in782
-rw-r--r--NEWS12
-rw-r--r--README2
-rw-r--r--THANKS2
-rw-r--r--TODO2
-rw-r--r--acinclude.m42
-rw-r--r--aclocal.m41202
-rwxr-xr-xbootstrap5009
-rwxr-xr-xbuild-aux/announce-gen260
-rwxr-xr-xbuild-aux/compile123
-rwxr-xr-xbuild-aux/config.guess211
-rwxr-xr-xbuild-aux/config.rpath4
-rwxr-xr-xbuild-aux/config.sub198
-rwxr-xr-xbuild-aux/depcomp508
-rwxr-xr-xbuild-aux/gendocs.sh295
-rwxr-xr-xbuild-aux/git-version-gen95
-rwxr-xr-xbuild-aux/gnu-web-doc-update173
-rwxr-xr-xbuild-aux/gnupload82
-rwxr-xr-xbuild-aux/install-sh14
-rwxr-xr-xbuild-aux/mdate-sh15
-rwxr-xr-xbuild-aux/missing461
-rw-r--r--build-aux/snippet/_Noreturn.h10
-rw-r--r--build-aux/snippet/arg-nonnull.h (renamed from build-aux/arg-nonnull.h)2
-rw-r--r--build-aux/snippet/c++defs.h (renamed from build-aux/c++defs.h)2
-rw-r--r--build-aux/snippet/unused-parameter.h36
-rw-r--r--build-aux/snippet/warn-on-use.h (renamed from build-aux/warn-on-use.h)4
-rwxr-xr-xbuild-aux/test-driver127
-rw-r--r--build-aux/texinfo.tex1343
-rwxr-xr-xbuild-aux/update-copyright17
-rwxr-xr-xbuild-aux/useless-if-before-free14
-rwxr-xr-xbuild-aux/vc-list-files91
-rw-r--r--c-boxes.el2
-rw-r--r--cfg.mk11
-rw-r--r--checks/001.preprocess2
-rw-r--r--checks/002.debugging_2
-rw-r--r--checks/003.command_li2
-rw-r--r--checks/004.command_li2
-rw-r--r--checks/005.command_li5
-rw-r--r--checks/006.command_li5
-rw-r--r--checks/007.command_li2
-rw-r--r--checks/008.comments2
-rw-r--r--checks/009.comments2
-rw-r--r--checks/010.input_proc2
-rw-r--r--checks/011.input_proc2
-rw-r--r--checks/012.inhibiting2
-rw-r--r--checks/013.inhibiting2
-rw-r--r--checks/014.inhibiting2
-rw-r--r--checks/015.inhibiting2
-rw-r--r--checks/016.inhibiting2
-rw-r--r--checks/017.inhibiting2
-rw-r--r--checks/018.inhibiting2
-rw-r--r--checks/019.inhibiting2
-rw-r--r--checks/020.macro_argu2
-rw-r--r--checks/021.macro_argu2
-rw-r--r--checks/022.macro_argu2
-rw-r--r--checks/023.macro_argu2
-rw-r--r--checks/024.macro_argu2
-rw-r--r--checks/025.quoting_ar2
-rw-r--r--checks/026.macro_expa2
-rw-r--r--checks/027.macro_expa2
-rw-r--r--checks/028.define2
-rw-r--r--checks/029.define2
-rw-r--r--checks/030.define2
-rw-r--r--checks/031.arguments2
-rw-r--r--checks/032.arguments2
-rw-r--r--checks/033.arguments2
-rw-r--r--checks/034.arguments2
-rw-r--r--checks/035.arguments2
-rw-r--r--checks/036.arguments2
-rw-r--r--checks/037.pseudo_arg2
-rw-r--r--checks/038.pseudo_arg2
-rw-r--r--checks/039.pseudo_arg2
-rw-r--r--checks/040.pseudo_arg2
-rw-r--r--checks/041.pseudo_arg2
-rw-r--r--checks/042.pseudo_arg2
-rw-r--r--checks/043.pseudo_arg2
-rw-r--r--checks/044.pseudo_arg2
-rw-r--r--checks/045.pseudo_arg2
-rw-r--r--checks/046.undefine2
-rw-r--r--checks/047.undefine2
-rw-r--r--checks/048.defn2
-rw-r--r--checks/049.defn2
-rw-r--r--checks/050.defn2
-rw-r--r--checks/051.defn2
-rw-r--r--checks/052.defn2
-rw-r--r--checks/053.defn2
-rw-r--r--checks/054.defn2
-rw-r--r--checks/055.pushdef2
-rw-r--r--checks/056.pushdef2
-rw-r--r--checks/057.indir2
-rw-r--r--checks/058.indir2
-rw-r--r--checks/059.indir2
-rw-r--r--checks/060.builtin2
-rw-r--r--checks/061.builtin2
-rw-r--r--checks/062.builtin2
-rw-r--r--checks/063.builtin2
-rw-r--r--checks/064.builtin2
-rw-r--r--checks/065.ifdef2
-rw-r--r--checks/066.ifelse2
-rw-r--r--checks/067.ifelse2
-rw-r--r--checks/068.ifelse2
-rw-r--r--checks/069.ifelse2
-rw-r--r--checks/070.ifelse2
-rw-r--r--checks/071.shift2
-rw-r--r--checks/072.shift2
-rw-r--r--checks/073.shift2
-rw-r--r--checks/074.shift2
-rw-r--r--checks/075.shift2
-rw-r--r--checks/076.shift2
-rw-r--r--checks/077.shift2
-rw-r--r--checks/078.shift2
-rw-r--r--checks/079.forloop2
-rw-r--r--checks/080.forloop2
-rw-r--r--checks/081.forloop2
-rw-r--r--checks/082.foreach2
-rw-r--r--checks/083.foreach2
-rw-r--r--checks/084.foreach2
-rw-r--r--checks/085.foreach2
-rw-r--r--checks/086.foreach2
-rw-r--r--checks/087.foreach2
-rw-r--r--checks/088.stacks2
-rw-r--r--checks/089.stacks2
-rw-r--r--checks/090.compositio2
-rw-r--r--checks/091.compositio2
-rw-r--r--checks/092.compositio2
-rw-r--r--checks/093.compositio2
-rw-r--r--checks/094.dumpdef2
-rw-r--r--checks/095.dumpdef2
-rw-r--r--checks/096.trace2
-rw-r--r--checks/097.trace2
-rw-r--r--checks/098.trace2
-rw-r--r--checks/099.trace2
-rw-r--r--checks/100.trace2
-rw-r--r--checks/101.debug_leve2
-rw-r--r--checks/102.debug_leve2
-rw-r--r--checks/103.debug_leve2
-rw-r--r--checks/104.debug_outp2
-rw-r--r--checks/105.dnl2
-rw-r--r--checks/106.dnl2
-rw-r--r--checks/107.dnl2
-rw-r--r--checks/108.changequot2
-rw-r--r--checks/109.changequot2
-rw-r--r--checks/110.changequot2
-rw-r--r--checks/111.changequot2
-rw-r--r--checks/112.changequot2
-rw-r--r--checks/113.changequot2
-rw-r--r--checks/114.changequot2
-rw-r--r--checks/115.changequot2
-rw-r--r--checks/116.changequot2
-rw-r--r--checks/117.changequot2
-rw-r--r--checks/118.changequot2
-rw-r--r--checks/119.changecom2
-rw-r--r--checks/120.changecom2
-rw-r--r--checks/121.changecom2
-rw-r--r--checks/122.changecom2
-rw-r--r--checks/123.changecom2
-rw-r--r--checks/124.changecom2
-rw-r--r--checks/125.changeword2
-rw-r--r--checks/126.changeword2
-rw-r--r--checks/127.changeword2
-rw-r--r--checks/128.changeword2
-rw-r--r--checks/129.changeword2
-rw-r--r--checks/130.changeword2
-rw-r--r--checks/131.m4wrap2
-rw-r--r--checks/132.m4wrap2
-rw-r--r--checks/133.m4wrap2
-rw-r--r--checks/134.m4wrap2
-rw-r--r--checks/135.m4wrap2
-rw-r--r--checks/136.m4wrap2
-rw-r--r--checks/137.include2
-rw-r--r--checks/138.include2
-rw-r--r--checks/139.include2
-rw-r--r--checks/140.include2
-rw-r--r--checks/141.include2
-rw-r--r--checks/142.include2
-rw-r--r--checks/143.diversions2
-rw-r--r--checks/144.diversions2
-rw-r--r--checks/145.diversions2
-rw-r--r--checks/146.diversions2
-rw-r--r--checks/147.divert2
-rw-r--r--checks/148.divert2
-rw-r--r--checks/149.divert2
-rw-r--r--checks/150.divert2
-rw-r--r--checks/151.divert2
-rw-r--r--checks/152.undivert2
-rw-r--r--checks/153.undivert2
-rw-r--r--checks/154.undivert2
-rw-r--r--checks/155.undivert2
-rw-r--r--checks/156.undivert2
-rw-r--r--checks/157.undivert2
-rw-r--r--checks/158.divnum2
-rw-r--r--checks/159.cleardiver2
-rw-r--r--checks/160.cleardiver2
-rw-r--r--checks/161.len2
-rw-r--r--checks/162.index_macr2
-rw-r--r--checks/163.index_macr2
-rw-r--r--checks/164.index_macr2
-rw-r--r--checks/165.index_macr2
-rw-r--r--checks/166.regexp2
-rw-r--r--checks/167.regexp2
-rw-r--r--checks/168.regexp2
-rw-r--r--checks/169.substr2
-rw-r--r--checks/170.substr2
-rw-r--r--checks/171.translit2
-rw-r--r--checks/172.translit2
-rw-r--r--checks/173.translit2
-rw-r--r--checks/174.translit2
-rw-r--r--checks/175.patsubst2
-rw-r--r--checks/176.patsubst2
-rw-r--r--checks/177.patsubst2
-rw-r--r--checks/178.patsubst2
-rw-r--r--checks/179.patsubst2
-rw-r--r--checks/180.format2
-rw-r--r--checks/181.format2
-rw-r--r--checks/182.format2
-rw-r--r--checks/183.format2
-rw-r--r--checks/184.incr2
-rw-r--r--checks/185.eval2
-rw-r--r--checks/186.eval2
-rw-r--r--checks/187.eval2
-rw-r--r--checks/188.eval2
-rw-r--r--checks/189.eval2
-rw-r--r--checks/190.eval2
-rw-r--r--checks/191.platform_m2
-rw-r--r--checks/192.platform_m2
-rw-r--r--checks/193.platform_m2
-rw-r--r--checks/194.syscmd2
-rw-r--r--checks/195.syscmd2
-rw-r--r--checks/196.esyscmd2
-rw-r--r--checks/197.sysval2
-rw-r--r--checks/198.sysval2
-rw-r--r--checks/199.mkstemp2
-rw-r--r--checks/200.mkstemp2
-rw-r--r--checks/201.mkstemp2
-rw-r--r--checks/202.errprint2
-rw-r--r--checks/203.location2
-rw-r--r--checks/204.location2
-rw-r--r--checks/205.location2
-rw-r--r--checks/206.m4exit2
-rw-r--r--checks/207.m4exit2
-rw-r--r--checks/208.using_froz2
-rw-r--r--checks/209.using_froz2
-rw-r--r--checks/210.using_froz2
-rw-r--r--checks/211.extensions2
-rw-r--r--checks/212.other_inco2
-rw-r--r--checks/213.other_inco2
-rw-r--r--checks/214.improved_e2
-rw-r--r--checks/215.improved_f2
-rw-r--r--checks/216.improved_f2
-rw-r--r--checks/217.improved_f2
-rw-r--r--checks/218.improved_f2
-rw-r--r--checks/219.improved_f2
-rw-r--r--checks/220.improved_f2
-rw-r--r--checks/221.improved_f2
-rw-r--r--checks/222.improved_f2
-rw-r--r--checks/223.improved_f2
-rw-r--r--checks/224.improved_f2
-rw-r--r--checks/225.improved_f2
-rw-r--r--checks/226.improved_f2
-rw-r--r--checks/227.improved_f2
-rw-r--r--checks/228.improved_f2
-rw-r--r--checks/229.improved_c2
-rw-r--r--checks/230.improved_c2
-rw-r--r--checks/231.improved_m2
-rw-r--r--checks/232.improved_m2
-rw-r--r--checks/233.improved_c2
-rw-r--r--checks/234.improved_c2
-rw-r--r--checks/235.improved_c2
-rw-r--r--checks/236.improved_f2
-rw-r--r--checks/Makefile.am41
-rw-r--r--checks/Makefile.in1597
-rwxr-xr-xchecks/check-them2
-rwxr-xr-xchecks/get-them2
-rwxr-xr-xchecks/stackovf.test2
-rw-r--r--checks/stamp-checks1
-rwxr-xr-xconfigure15286
-rw-r--r--configure.ac75
-rw-r--r--doc/Makefile.am4
-rw-r--r--doc/Makefile.in689
-rw-r--r--doc/fdl-1.3.texi5
-rw-r--r--doc/gendocs_template33
-rw-r--r--doc/gpl-3.0.texi8
-rw-r--r--doc/m4.16
-rw-r--r--doc/m4.info223
-rw-r--r--doc/m4.info-14160
-rw-r--r--doc/m4.info-2592
-rw-r--r--doc/m4.texi (renamed from doc/m4.texinfo)55
-rw-r--r--doc/stamp-vti8
-rw-r--r--doc/version.texi8
-rw-r--r--examples/COPYING2
-rw-r--r--examples/Makefile.am2
-rw-r--r--examples/Makefile.in509
-rw-r--r--lib/Makefile.am2
-rw-r--r--lib/Makefile.in2181
-rw-r--r--lib/alloca.in.h15
-rw-r--r--lib/asnprintf.c5
-rw-r--r--lib/asprintf.c5
-rw-r--r--lib/basename-lgpl.c2
-rw-r--r--lib/basename.c6
-rw-r--r--lib/binary-io.c3
-rw-r--r--lib/binary-io.h53
-rw-r--r--lib/btowc.c2
-rw-r--r--lib/c-ctype.c5
-rw-r--r--lib/c-ctype.h38
-rw-r--r--lib/c-stack.c39
-rw-r--r--lib/c-stack.h2
-rw-r--r--lib/c-strcase.h (renamed from tests/c-strcase.h)10
-rw-r--r--lib/c-strcasecmp.c (renamed from tests/c-strcasecmp.c)5
-rw-r--r--lib/c-strcaseeq.h184
-rw-r--r--lib/c-strncasecmp.c (renamed from tests/c-strncasecmp.c)5
-rw-r--r--lib/canonicalize-lgpl.c98
-rw-r--r--lib/clean-temp.c24
-rw-r--r--lib/clean-temp.h13
-rw-r--r--lib/cloexec.c6
-rw-r--r--lib/cloexec.h6
-rw-r--r--lib/close-hook.c91
-rw-r--r--lib/close-hook.h72
-rw-r--r--lib/close-stream.c4
-rw-r--r--lib/close.c37
-rw-r--r--lib/closein.c9
-rw-r--r--lib/closein.h2
-rw-r--r--lib/closeout.c4
-rw-r--r--lib/closeout.h2
-rw-r--r--lib/config.charset7
-rw-r--r--lib/config.hin386
-rw-r--r--lib/dirname-lgpl.c8
-rw-r--r--lib/dirname.c2
-rw-r--r--lib/dirname.h8
-rw-r--r--lib/dosname.h2
-rw-r--r--lib/dup-safer-flag.c4
-rw-r--r--lib/dup-safer.c2
-rw-r--r--lib/dup2.c76
-rw-r--r--lib/errno.in.h190
-rw-r--r--lib/error.c27
-rw-r--r--lib/error.h8
-rw-r--r--lib/execute.c14
-rw-r--r--lib/execute.h2
-rw-r--r--lib/exitfail.c2
-rw-r--r--lib/exitfail.h2
-rw-r--r--lib/fatal-signal.c18
-rw-r--r--lib/fatal-signal.h2
-rw-r--r--lib/fclose.c79
-rw-r--r--lib/fcntl.c9
-rw-r--r--lib/fcntl.in.h57
-rw-r--r--lib/fd-hook.c116
-rw-r--r--lib/fd-hook.h119
-rw-r--r--lib/fd-safer-flag.c2
-rw-r--r--lib/fd-safer.c2
-rw-r--r--lib/fflush.c41
-rw-r--r--lib/filenamecat-lgpl.c4
-rw-r--r--lib/filenamecat.c2
-rw-r--r--lib/filenamecat.h2
-rw-r--r--lib/float+.h5
-rw-r--r--lib/float.c33
-rw-r--r--lib/float.in.h137
-rw-r--r--lib/fopen-safer.c2
-rw-r--r--lib/fopen.c13
-rw-r--r--lib/fpending.c2
-rw-r--r--lib/fpending.h13
-rw-r--r--lib/fpucw.h5
-rw-r--r--lib/fpurge.c18
-rw-r--r--lib/freadahead.c12
-rw-r--r--lib/freadahead.h23
-rw-r--r--lib/freading.c10
-rw-r--r--lib/freading.h4
-rw-r--r--lib/frexp.c6
-rw-r--r--lib/frexpl.c23
-rw-r--r--lib/fseek.c30
-rw-r--r--lib/fseeko.c53
-rw-r--r--lib/fstat.c88
-rw-r--r--lib/ftell.c (renamed from tests/ftell.c)9
-rw-r--r--lib/ftello.c10
-rw-r--r--lib/getdtablesize.c25
-rw-r--r--lib/getopt.c159
-rw-r--r--lib/getopt.in.h66
-rw-r--r--lib/getopt1.c6
-rw-r--r--lib/getopt_int.h16
-rw-r--r--lib/gettext.h14
-rw-r--r--lib/gettimeofday.c16
-rw-r--r--lib/gl_anyhash_list1.h2
-rw-r--r--lib/gl_anyhash_list2.h2
-rw-r--r--lib/gl_anylinked_list1.h2
-rw-r--r--lib/gl_anylinked_list2.h2
-rw-r--r--lib/gl_anytree_oset.h2
-rw-r--r--lib/gl_avltree_oset.c2
-rw-r--r--lib/gl_avltree_oset.h2
-rw-r--r--lib/gl_linkedhash_list.c8
-rw-r--r--lib/gl_linkedhash_list.h2
-rw-r--r--lib/gl_list.c282
-rw-r--r--lib/gl_list.h189
-rw-r--r--lib/gl_oset.c95
-rw-r--r--lib/gl_oset.h68
-rw-r--r--lib/gl_xlist.c127
-rw-r--r--lib/gl_xlist.h48
-rw-r--r--lib/gl_xoset.c45
-rw-r--r--lib/gl_xoset.h25
-rw-r--r--lib/glthread/lock.c13
-rw-r--r--lib/glthread/lock.h20
-rw-r--r--lib/glthread/threadlib.c5
-rw-r--r--lib/glthread/tls.c4
-rw-r--r--lib/glthread/tls.h7
-rw-r--r--lib/gnulib.mk1419
-rw-r--r--lib/ignore-value.h30
-rw-r--r--lib/intprops.h305
-rw-r--r--lib/isnan.c29
-rw-r--r--lib/isnand-nolibm.h2
-rw-r--r--lib/isnand.c2
-rw-r--r--lib/isnanf-nolibm.h9
-rw-r--r--lib/isnanf.c2
-rw-r--r--lib/isnanl-nolibm.h2
-rw-r--r--lib/isnanl.c2
-rw-r--r--lib/itold.c28
-rw-r--r--lib/langinfo.in.h15
-rw-r--r--lib/localcharset.c47
-rw-r--r--lib/localcharset.h5
-rw-r--r--lib/locale.in.h216
-rw-r--r--lib/localeconv.c103
-rw-r--r--lib/lseek.c11
-rw-r--r--lib/lstat.c20
-rw-r--r--lib/malloc.c10
-rw-r--r--lib/malloca.c44
-rw-r--r--lib/malloca.h9
-rw-r--r--lib/math.c3
-rw-r--r--lib/math.in.h1586
-rw-r--r--lib/mbrtowc.c26
-rw-r--r--lib/mbsinit.c2
-rw-r--r--lib/mbtowc-impl.h2
-rw-r--r--lib/mbtowc.c2
-rw-r--r--lib/memchr.c2
-rw-r--r--lib/memchr2.c23
-rw-r--r--lib/memchr2.h5
-rw-r--r--lib/mkdtemp.c2
-rw-r--r--lib/mkstemp-safer.c2
-rw-r--r--lib/mkstemp.c8
-rw-r--r--lib/msvc-inval.c129
-rw-r--r--lib/msvc-inval.h222
-rw-r--r--lib/msvc-nothrow.c49
-rw-r--r--lib/msvc-nothrow.h43
-rw-r--r--lib/nl_langinfo.c5
-rw-r--r--lib/obstack.c28
-rw-r--r--lib/obstack.h32
-rw-r--r--lib/open.c24
-rw-r--r--lib/pathmax.h55
-rw-r--r--lib/pipe-safer.c2
-rw-r--r--lib/pipe2-safer.c2
-rw-r--r--lib/pipe2.c76
-rw-r--r--lib/printf-args.c5
-rw-r--r--lib/printf-args.h5
-rw-r--r--lib/printf-frexp.c6
-rw-r--r--lib/printf-frexp.h2
-rw-r--r--lib/printf-frexpl.c25
-rw-r--r--lib/printf-frexpl.h2
-rw-r--r--lib/printf-parse.c9
-rw-r--r--lib/printf-parse.h5
-rw-r--r--lib/progname.c2
-rw-r--r--lib/progname.h2
-rw-r--r--lib/quote.h46
-rw-r--r--lib/quotearg.c126
-rw-r--r--lib/quotearg.h8
-rw-r--r--lib/raise.c79
-rw-r--r--lib/rawmemchr.c2
-rw-r--r--lib/readlink.c2
-rw-r--r--lib/ref-add.sin5
-rw-r--r--lib/ref-del.sin5
-rw-r--r--lib/regcomp.c358
-rw-r--r--lib/regex.c36
-rw-r--r--lib/regex.h248
-rw-r--r--lib/regex_internal.c98
-rw-r--r--lib/regex_internal.h187
-rw-r--r--lib/regexec.c211
-rw-r--r--lib/rename.c2
-rw-r--r--lib/rmdir.c2
-rw-r--r--lib/same-inode.h16
-rw-r--r--lib/sched.in.h18
-rw-r--r--lib/secure_getenv.c41
-rw-r--r--lib/sig-handler.c3
-rw-r--r--lib/sig-handler.h14
-rw-r--r--lib/sigaction.c10
-rw-r--r--lib/siglist.h2
-rw-r--r--lib/signal.in.h153
-rw-r--r--lib/signbitd.c2
-rw-r--r--lib/signbitf.c2
-rw-r--r--lib/signbitl.c2
-rw-r--r--lib/sigprocmask.c60
-rw-r--r--lib/size_max.h5
-rw-r--r--lib/snprintf.c5
-rw-r--r--lib/spawn-pipe.c18
-rw-r--r--lib/spawn-pipe.h4
-rw-r--r--lib/spawn.in.h34
-rw-r--r--lib/spawn_faction_addclose.c32
-rw-r--r--lib/spawn_faction_adddup2.c34
-rw-r--r--lib/spawn_faction_addopen.c38
-rw-r--r--lib/spawn_faction_destroy.c4
-rw-r--r--lib/spawn_faction_init.c6
-rw-r--r--lib/spawn_int.h2
-rw-r--r--lib/spawnattr_destroy.c4
-rw-r--r--lib/spawnattr_init.c4
-rw-r--r--lib/spawnattr_setflags.c2
-rw-r--r--lib/spawnattr_setsigmask.c2
-rw-r--r--lib/spawni.c20
-rw-r--r--lib/spawnp.c2
-rw-r--r--lib/stat.c41
-rw-r--r--lib/stdarg.in.h15
-rw-r--r--lib/stdbool.in.h56
-rw-r--r--lib/stddef.in.h19
-rw-r--r--lib/stdint.in.h196
-rw-r--r--lib/stdio--.h2
-rw-r--r--lib/stdio-impl.h10
-rw-r--r--lib/stdio-safer.h2
-rw-r--r--lib/stdio-write.c198
-rw-r--r--lib/stdio.in.h389
-rw-r--r--lib/stdlib--.h2
-rw-r--r--lib/stdlib-safer.h2
-rw-r--r--lib/stdlib.in.h257
-rw-r--r--lib/str-two-way.h5
-rw-r--r--lib/strchrnul.c2
-rw-r--r--lib/streq.h10
-rw-r--r--lib/strerror-override.c302
-rw-r--r--lib/strerror-override.h56
-rw-r--r--lib/strerror.c360
-rw-r--r--lib/string.in.h87
-rw-r--r--lib/stripslash.c4
-rw-r--r--lib/strndup.c5
-rw-r--r--lib/strnlen.c5
-rw-r--r--lib/strsignal.c10
-rw-r--r--lib/strstr.c5
-rw-r--r--lib/strtod.c28
-rw-r--r--lib/strtol.c434
-rw-r--r--lib/sys_stat.in.h134
-rw-r--r--lib/sys_time.in.h188
-rw-r--r--lib/sys_types.in.h51
-rw-r--r--lib/sys_wait.in.h15
-rw-r--r--lib/tempname.c11
-rw-r--r--lib/tempname.h2
-rw-r--r--lib/time.in.h9
-rw-r--r--lib/tmpdir.c50
-rw-r--r--lib/tmpdir.h2
-rw-r--r--lib/unistd--.h2
-rw-r--r--lib/unistd-safer.h2
-rw-r--r--lib/unistd.c3
-rw-r--r--lib/unistd.in.h436
-rw-r--r--lib/unlocked-io.h2
-rw-r--r--lib/vasnprintf.c101
-rw-r--r--lib/vasnprintf.h5
-rw-r--r--lib/vasprintf.c5
-rw-r--r--lib/verify.h180
-rw-r--r--lib/verror.c12
-rw-r--r--lib/verror.h19
-rw-r--r--lib/version-etc-fsf.c2
-rw-r--r--lib/version-etc.c4
-rw-r--r--lib/version-etc.h8
-rw-r--r--lib/w32spawn.h24
-rw-r--r--lib/wait-process.c4
-rw-r--r--lib/wait-process.h2
-rw-r--r--lib/waitpid.c7
-rw-r--r--lib/wchar.in.h192
-rw-r--r--lib/wcrtomb.c2
-rw-r--r--lib/wctype-h.c4
-rw-r--r--lib/wctype.in.h98
-rw-r--r--lib/xalloc-die.c4
-rw-r--r--lib/xalloc-oversized.h38
-rw-r--r--lib/xalloc.h115
-rw-r--r--lib/xasprintf.c2
-rw-r--r--lib/xmalloc.c18
-rw-r--r--lib/xmalloca.c2
-rw-r--r--lib/xmalloca.h2
-rw-r--r--lib/xprintf.c2
-rw-r--r--lib/xprintf.h2
-rw-r--r--lib/xsize.c3
-rw-r--r--lib/xsize.h25
-rw-r--r--lib/xstrndup.c2
-rw-r--r--lib/xstrndup.h2
-rw-r--r--lib/xvasprintf.c4
-rw-r--r--lib/xvasprintf.h2
-rw-r--r--m4/00gnulib.m42
-rw-r--r--m4/alloca.m482
-rw-r--r--m4/ansi-c++.m422
-rw-r--r--m4/asm-underscore.m471
-rw-r--r--m4/assert.m42
-rw-r--r--m4/autobuild.m42
-rw-r--r--m4/btowc.m49
-rw-r--r--m4/c-stack.m411
-rw-r--r--m4/canonicalize.m472
-rw-r--r--m4/close-stream.m48
-rw-r--r--m4/close.m429
-rw-r--r--m4/closedir.m425
-rw-r--r--m4/closein.m48
-rw-r--r--m4/closeout.m48
-rw-r--r--m4/codeset.m42
-rw-r--r--m4/config-h.m42
-rw-r--r--m4/configmake.m42
-rw-r--r--m4/dirent_h.m464
-rw-r--r--m4/dirname.m410
-rw-r--r--m4/double-slash-root.m42
-rw-r--r--m4/dup.m425
-rw-r--r--m4/dup2.m468
-rw-r--r--m4/eealloc.m45
-rw-r--r--m4/environ.m415
-rw-r--r--m4/errno_h.m423
-rw-r--r--m4/error.m420
-rw-r--r--m4/execute.m45
-rw-r--r--m4/exponentd.m47
-rw-r--r--m4/exponentf.m42
-rw-r--r--m4/exponentl.m42
-rw-r--r--m4/extensions.m456
-rw-r--r--m4/extern-inline.m479
-rw-r--r--m4/fatal-signal.m45
-rw-r--r--m4/fclose.m420
-rw-r--r--m4/fcntl-o.m430
-rw-r--r--m4/fcntl.m413
-rw-r--r--m4/fcntl_h.m427
-rw-r--r--m4/fdopen.m447
-rw-r--r--m4/fflush.m452
-rw-r--r--m4/filenamecat.m47
-rw-r--r--m4/float_h.m487
-rw-r--r--m4/fopen.m413
-rw-r--r--m4/fpending.m4136
-rw-r--r--m4/fpieee.m48
-rw-r--r--m4/fpurge.m48
-rw-r--r--m4/freadahead.m4 (renamed from m4/gl_list.m4)8
-rw-r--r--m4/freading.m42
-rw-r--r--m4/frexp.m425
-rw-r--r--m4/frexpl.m460
-rw-r--r--m4/fseek.m415
-rw-r--r--m4/fseeko.m464
-rw-r--r--m4/fstat.m436
-rw-r--r--m4/ftell.m47
-rw-r--r--m4/ftello.m421
-rw-r--r--m4/getcwd.m4155
-rw-r--r--m4/getdtablesize.m48
-rw-r--r--m4/getopt.m4357
-rw-r--r--m4/getpagesize.m45
-rw-r--r--m4/gettimeofday.m452
-rw-r--r--m4/glibc21.m42
-rw-r--r--m4/gnulib-cache.m429
-rw-r--r--m4/gnulib-common.m4161
-rw-r--r--m4/gnulib-comp.m4868
-rw-r--r--m4/include_next.m454
-rw-r--r--m4/inline.m440
-rw-r--r--m4/intlmacosx.m414
-rw-r--r--m4/intmax_t.m42
-rw-r--r--m4/inttypes-pri.m442
-rw-r--r--m4/inttypes.m4157
-rw-r--r--m4/inttypes_h.m42
-rw-r--r--m4/isnand.m415
-rw-r--r--m4/isnanf.m414
-rw-r--r--m4/isnanl.m417
-rw-r--r--m4/langinfo_h.m42
-rw-r--r--m4/largefile.m4146
-rw-r--r--m4/lcmessage.m42
-rw-r--r--m4/ldexp.m42
-rw-r--r--m4/ldexpl.m431
-rw-r--r--m4/lib-ld.m460
-rw-r--r--m4/lib-link.m42
-rw-r--r--m4/lib-prefix.m42
-rw-r--r--m4/libsigsegv.m42
-rw-r--r--m4/link.m430
-rw-r--r--m4/localcharset.m42
-rw-r--r--m4/locale-fr.m428
-rw-r--r--m4/locale-ja.m417
-rw-r--r--m4/locale-tr.m414
-rw-r--r--m4/locale-zh.m420
-rw-r--r--m4/locale_h.m463
-rw-r--r--m4/localeconv.m422
-rw-r--r--m4/localename.m42
-rw-r--r--m4/lock.m415
-rw-r--r--m4/longlong.m48
-rw-r--r--m4/lseek.m480
-rw-r--r--m4/lstat.m458
-rw-r--r--m4/malloc.m452
-rw-r--r--m4/malloca.m42
-rw-r--r--m4/manywarnings.m4258
-rw-r--r--m4/math_h.m4285
-rw-r--r--m4/mbrtowc.m428
-rw-r--r--m4/mbsinit.m425
-rw-r--r--m4/mbstate_t.m42
-rw-r--r--m4/mbtowc.m48
-rw-r--r--m4/memchr.m422
-rw-r--r--m4/mkdtemp.m49
-rw-r--r--m4/mkstemp.m438
-rw-r--r--m4/mmap-anon.m414
-rw-r--r--m4/mode_t.m42
-rw-r--r--m4/msvc-inval.m419
-rw-r--r--m4/msvc-nothrow.m4 (renamed from m4/cloexec.m4)8
-rw-r--r--m4/multiarch.m46
-rw-r--r--m4/nl_langinfo.m46
-rw-r--r--m4/nocrash.m434
-rw-r--r--m4/off_t.m418
-rw-r--r--m4/open.m436
-rw-r--r--m4/opendir.m425
-rw-r--r--m4/pathmax.m435
-rw-r--r--m4/pipe2.m42
-rw-r--r--m4/posix_spawn.m4137
-rw-r--r--m4/printf-frexp.m42
-rw-r--r--m4/printf-frexpl.m414
-rw-r--r--m4/printf.m4175
-rw-r--r--m4/putenv.m429
-rw-r--r--m4/quotearg.m46
-rw-r--r--m4/raise.m434
-rw-r--r--m4/rawmemchr.m47
-rw-r--r--m4/readdir.m415
-rw-r--r--m4/readlink.m439
-rw-r--r--m4/regex.m4104
-rw-r--r--m4/rename.m4161
-rw-r--r--m4/rmdir.m430
-rw-r--r--m4/sched_h.m49
-rw-r--r--m4/secure_getenv.m425
-rw-r--r--m4/setenv.m477
-rw-r--r--m4/setlocale.m416
-rw-r--r--m4/sig_atomic_t.m46
-rw-r--r--m4/sigaction.m411
-rw-r--r--m4/signal_h.m440
-rw-r--r--m4/signalblocking.m429
-rw-r--r--m4/signbit.m4179
-rw-r--r--m4/sigpipe.m429
-rw-r--r--m4/size_max.m42
-rw-r--r--m4/sleep.m462
-rw-r--r--m4/snprintf.m415
-rw-r--r--m4/spawn-pipe.m45
-rw-r--r--m4/spawn_h.m424
-rw-r--r--m4/ssize_t.m42
-rw-r--r--m4/stat.m425
-rw-r--r--m4/stdarg.m411
-rw-r--r--m4/stdbool.m45
-rw-r--r--m4/stddef_h.m48
-rw-r--r--m4/stdint.m419
-rw-r--r--m4/stdint_h.m42
-rw-r--r--m4/stdio-safer.m425
-rw-r--r--m4/stdio_h.m472
-rw-r--r--m4/stdlib-safer.m410
-rw-r--r--m4/stdlib_h.m424
-rw-r--r--m4/strchrnul.m437
-rw-r--r--m4/strdup.m413
-rw-r--r--m4/strerror.m4116
-rw-r--r--m4/string_h.m415
-rw-r--r--m4/strndup.m420
-rw-r--r--m4/strnlen.m412
-rw-r--r--m4/strsignal.m419
-rw-r--r--m4/strstr.m437
-rw-r--r--m4/strtod.m442
-rw-r--r--m4/strtol.m410
-rw-r--r--m4/symlink.m424
-rw-r--r--m4/sys_socket_h.m4176
-rw-r--r--m4/sys_stat_h.m426
-rw-r--r--m4/sys_time_h.m444
-rw-r--r--m4/sys_types_h.m424
-rw-r--r--m4/sys_wait_h.m47
-rw-r--r--m4/tempname.m47
-rw-r--r--m4/threadlib.m484
-rw-r--r--m4/time_h.m46
-rw-r--r--m4/tls.m42
-rw-r--r--m4/tmpdir.m49
-rw-r--r--m4/ungetc.m424
-rw-r--r--m4/unistd-safer.m47
-rw-r--r--m4/unistd_h.m4126
-rw-r--r--m4/unlocked-io.m42
-rw-r--r--m4/vasnprintf.m414
-rw-r--r--m4/vasprintf-posix.m42
-rw-r--r--m4/vasprintf.m42
-rw-r--r--m4/version-etc.m42
-rw-r--r--m4/wait-process.m45
-rw-r--r--m4/waitpid.m49
-rw-r--r--m4/warnings.m479
-rw-r--r--m4/wchar_h.m411
-rw-r--r--m4/wchar_t.m42
-rw-r--r--m4/wcrtomb.m425
-rw-r--r--m4/wctob.m420
-rw-r--r--m4/wctomb.m48
-rw-r--r--m4/wctype_h.m457
-rw-r--r--m4/wint_t.m42
-rw-r--r--m4/write.m432
-rw-r--r--m4/xalloc.m423
-rw-r--r--m4/xsize.m45
-rw-r--r--m4/xstrndup.m42
-rw-r--r--m4/xvasprintf.m411
-rw-r--r--maint.mk731
-rw-r--r--src/Makefile.am5
-rw-r--r--src/Makefile.in641
-rw-r--r--src/builtin.c9
-rw-r--r--src/debug.c4
-rw-r--r--src/eval.c2
-rw-r--r--src/format.c11
-rw-r--r--src/freeze.c2
-rw-r--r--src/input.c2
-rw-r--r--src/m4.c6
-rw-r--r--src/m4.h131
-rw-r--r--src/macro.c2
-rw-r--r--src/output.c2
-rw-r--r--src/path.c2
-rw-r--r--src/symtab.c4
-rw-r--r--tests/Makefile.am2
-rw-r--r--tests/Makefile.in4177
-rw-r--r--tests/closedir.c67
-rw-r--r--tests/dirent-private.h40
-rw-r--r--tests/dirent.in.h258
-rw-r--r--tests/dup.c61
-rw-r--r--tests/fdopen.c69
-rw-r--r--tests/filename.h54
-rw-r--r--tests/getcwd-lgpl.c126
-rw-r--r--tests/getpagesize.c4
-rw-r--r--tests/gl_array_list.c2
-rw-r--r--tests/gl_array_list.h2
-rw-r--r--tests/gl_array_oset.c6
-rw-r--r--tests/gl_array_oset.h2
-rw-r--r--tests/gnulib.mk746
-rw-r--r--tests/infinity.h60
-rw-r--r--tests/init.sh147
-rw-r--r--tests/inttypes.in.h1130
-rw-r--r--tests/link.c22
-rw-r--r--tests/locale.in.h96
-rw-r--r--tests/localename.c229
-rw-r--r--tests/localename.h20
-rw-r--r--tests/macros.h11
-rw-r--r--tests/minus-zero.h8
-rw-r--r--tests/nan.h22
-rw-r--r--tests/opendir.c148
-rw-r--r--tests/putenv.c110
-rw-r--r--tests/randomd.c1028
-rw-r--r--tests/randoml.c1028
-rw-r--r--tests/readdir.c98
-rw-r--r--tests/setenv.c28
-rw-r--r--tests/setlocale.c4
-rw-r--r--tests/signature.h2
-rw-r--r--tests/sleep.c76
-rw-r--r--tests/strdup.c5
-rw-r--r--tests/symlink.c2
-rw-r--r--tests/test-alloca-opt.c4
-rw-r--r--tests/test-array_list.c2
-rw-r--r--tests/test-array_oset.c2
-rw-r--r--tests/test-avltree_oset.c2
-rw-r--r--tests/test-binary-io.c37
-rwxr-xr-xtests/test-binary-io.sh7
-rw-r--r--tests/test-btowc.c2
-rw-r--r--tests/test-c-ctype.c2
-rw-r--r--tests/test-c-stack.c2
-rwxr-xr-xtests/test-c-stack2.sh18
-rw-r--r--tests/test-c-strcasecmp.c2
-rw-r--r--tests/test-c-strncasecmp.c2
-rw-r--r--tests/test-canonicalize-lgpl.c2
-rw-r--r--tests/test-chdir.c33
-rw-r--r--tests/test-cloexec.c13
-rw-r--r--tests/test-close.c45
-rw-r--r--tests/test-closein.c5
-rwxr-xr-xtests/test-closein.sh40
-rw-r--r--tests/test-dirent-c++.cc51
-rw-r--r--tests/test-dirent.c32
-rw-r--r--tests/test-dirname.c14
-rw-r--r--tests/test-dup-safer.c14
-rw-r--r--tests/test-dup.c45
-rw-r--r--tests/test-dup2.c21
-rw-r--r--tests/test-environ.c2
-rw-r--r--tests/test-errno.c4
-rw-r--r--tests/test-fclose.c114
-rw-r--r--tests/test-fcntl-h-c++.cc2
-rw-r--r--tests/test-fcntl-h.c104
-rw-r--r--tests/test-fcntl.c92
-rw-r--r--tests/test-fdopen.c56
-rw-r--r--tests/test-fflush.c50
-rw-r--r--tests/test-fflush2.c2
-rw-r--r--tests/test-fgetc.c97
-rw-r--r--tests/test-filenamecat.c2
-rw-r--r--tests/test-float.c384
-rw-r--r--tests/test-fopen-safer.c2
-rw-r--r--tests/test-fopen.c2
-rw-r--r--tests/test-fopen.h2
-rw-r--r--tests/test-fpending.c2
-rw-r--r--tests/test-fpurge.c2
-rw-r--r--tests/test-fputc.c91
-rw-r--r--tests/test-fread.c100
-rw-r--r--tests/test-freadahead.c2
-rw-r--r--tests/test-freading.c2
-rw-r--r--tests/test-frexp.c177
-rw-r--r--tests/test-frexp.h179
-rw-r--r--tests/test-frexpl.c166
-rw-r--r--tests/test-fseek.c70
-rwxr-xr-xtests/test-fseek.sh5
-rwxr-xr-xtests/test-fseek2.sh3
-rw-r--r--tests/test-fseeko.c2
-rw-r--r--tests/test-fseeko3.c51
-rwxr-xr-xtests/test-fseeko3.sh7
-rw-r--r--tests/test-fseeko4.c73
-rwxr-xr-xtests/test-fseeko4.sh5
-rw-r--r--tests/test-fstat.c50
-rw-r--r--tests/test-ftell.c2
-rw-r--r--tests/test-ftell3.c2
-rw-r--r--tests/test-ftello.c2
-rw-r--r--tests/test-ftello3.c2
-rw-r--r--tests/test-ftello4.c70
-rwxr-xr-xtests/test-ftello4.sh5
-rw-r--r--tests/test-fwrite.c94
-rw-r--r--tests/test-getcwd-lgpl.c102
-rw-r--r--tests/test-getdtablesize.c2
-rw-r--r--tests/test-getopt.c2
-rw-r--r--tests/test-getopt.h24
-rw-r--r--tests/test-getopt_long.h21
-rw-r--r--tests/test-gettimeofday.c2
-rw-r--r--tests/test-ignore-value.c4
-rwxr-xr-xtests/test-init.sh73
-rw-r--r--tests/test-intprops.c275
-rw-r--r--tests/test-inttypes.c118
-rw-r--r--tests/test-isnand-nolibm.c3
-rw-r--r--tests/test-isnand.h7
-rw-r--r--tests/test-isnanf-nolibm.c2
-rw-r--r--tests/test-isnanf.h7
-rw-r--r--tests/test-isnanl-nolibm.c2
-rw-r--r--tests/test-isnanl.h9
-rw-r--r--tests/test-langinfo-c++.cc2
-rw-r--r--tests/test-langinfo.c2
-rw-r--r--tests/test-link.c2
-rw-r--r--tests/test-link.h22
-rw-r--r--tests/test-linkedhash_list.c2
-rw-r--r--tests/test-locale-c++.cc2
-rw-r--r--tests/test-locale-c++2.cc2
-rw-r--r--tests/test-locale.c32
-rw-r--r--tests/test-localeconv.c72
-rw-r--r--tests/test-localename.c4
-rw-r--r--tests/test-lseek.c15
-rw-r--r--tests/test-lstat.c2
-rw-r--r--tests/test-lstat.h2
-rw-r--r--tests/test-malloc-gnu.c2
-rw-r--r--tests/test-malloca.c4
-rw-r--r--tests/test-math-c++.cc338
-rw-r--r--tests/test-math-c++2.cc2
-rw-r--r--tests/test-math.c63
-rw-r--r--tests/test-mbrtowc-w32.c2
-rw-r--r--tests/test-mbrtowc.c2
-rw-r--r--tests/test-mbsinit.c2
-rw-r--r--tests/test-memchr.c2
-rw-r--r--tests/test-memchr2.c2
-rw-r--r--tests/test-nl_langinfo.c2
-rw-r--r--tests/test-open.c2
-rw-r--r--tests/test-open.h8
-rw-r--r--tests/test-pathmax.c32
-rw-r--r--tests/test-pipe2.c58
-rw-r--r--tests/test-posix_spawn1.c4
-rw-r--r--tests/test-posix_spawn2.c4
-rw-r--r--tests/test-posix_spawn_file_actions_addclose.c64
-rw-r--r--tests/test-posix_spawn_file_actions_adddup2.c72
-rw-r--r--tests/test-posix_spawn_file_actions_addopen.c70
-rw-r--r--tests/test-printf-frexp.c2
-rw-r--r--tests/test-printf-frexpl.c2
-rw-r--r--tests/test-quotearg-simple.c73
-rw-r--r--tests/test-quotearg.h5
-rw-r--r--tests/test-raise.c50
-rw-r--r--tests/test-rawmemchr.c2
-rw-r--r--tests/test-readlink.c2
-rw-r--r--tests/test-readlink.h4
-rw-r--r--tests/test-regex.c203
-rw-r--r--tests/test-rename.c2
-rw-r--r--tests/test-rename.h6
-rw-r--r--tests/test-rmdir.c2
-rw-r--r--tests/test-rmdir.h5
-rw-r--r--tests/test-sched.c5
-rw-r--r--tests/test-setenv.c2
-rw-r--r--tests/test-setlocale1.c2
-rw-r--r--tests/test-setlocale2.c2
-rwxr-xr-xtests/test-setlocale2.sh6
-rw-r--r--tests/test-sigaction.c2
-rw-r--r--tests/test-signal-h-c++.cc (renamed from tests/test-signal-c++.cc)11
-rw-r--r--tests/test-signal-h-c++2.cc (renamed from tests/test-signal-c++2.cc)2
-rw-r--r--tests/test-signal-h.c (renamed from tests/test-signal.c)2
-rw-r--r--tests/test-signbit.c15
-rw-r--r--tests/test-sigpipe.c68
-rwxr-xr-xtests/test-sigpipe.sh31
-rw-r--r--tests/test-sigprocmask.c102
-rw-r--r--tests/test-sleep.c58
-rw-r--r--tests/test-snprintf.c12
-rw-r--r--tests/test-spawn-c++.cc2
-rw-r--r--tests/test-spawn-pipe-child.c119
-rw-r--r--tests/test-spawn-pipe-main.c (renamed from tests/test-spawn-pipe.c)117
-rwxr-xr-xtests/test-spawn-pipe.sh2
-rw-r--r--tests/test-spawn.c4
-rw-r--r--tests/test-stat.c3
-rw-r--r--tests/test-stat.h6
-rw-r--r--tests/test-stdbool.c2
-rw-r--r--tests/test-stddef.c2
-rw-r--r--tests/test-stdint.c4
-rw-r--r--tests/test-stdio-c++.cc46
-rw-r--r--tests/test-stdio-c++2.cc2
-rw-r--r--tests/test-stdio.c2
-rw-r--r--tests/test-stdlib-c++.cc2
-rw-r--r--tests/test-stdlib-c++2.cc2
-rw-r--r--tests/test-stdlib.c2
-rw-r--r--tests/test-strchrnul.c2
-rw-r--r--tests/test-strerror.c26
-rw-r--r--tests/test-string-c++.cc2
-rw-r--r--tests/test-string-c++2.cc2
-rw-r--r--tests/test-string.c2
-rw-r--r--tests/test-strnlen.c2
-rw-r--r--tests/test-strsignal.c5
-rw-r--r--tests/test-strstr.c5
-rw-r--r--tests/test-strtod.c36
-rw-r--r--tests/test-symlink.c2
-rw-r--r--tests/test-symlink.h2
-rw-r--r--tests/test-sys_stat-c++.cc4
-rw-r--r--tests/test-sys_stat.c62
-rw-r--r--tests/test-sys_time-c++.cc2
-rw-r--r--tests/test-sys_time.c7
-rw-r--r--tests/test-sys_types-c++.cc28
-rw-r--r--tests/test-sys_types.c34
-rw-r--r--tests/test-sys_wait-c++.cc2
-rw-r--r--tests/test-sys_wait.c8
-rw-r--r--tests/test-sys_wait.h2
-rw-r--r--tests/test-time-c++.cc2
-rw-r--r--tests/test-time-c++2.cc2
-rw-r--r--tests/test-time.c10
-rw-r--r--tests/test-unistd-c++.cc16
-rw-r--r--tests/test-unistd.c2
-rw-r--r--tests/test-unsetenv.c2
-rwxr-xr-xtests/test-update-copyright.sh24
-rw-r--r--tests/test-vasnprintf.c4
-rw-r--r--tests/test-vasprintf-posix.c81
-rw-r--r--tests/test-vasprintf.c2
-rwxr-xr-xtests/test-vc-list-files-cvs.sh3
-rwxr-xr-xtests/test-vc-list-files-git.sh2
-rw-r--r--tests/test-verify.c6
-rw-r--r--tests/test-version-etc.c2
-rwxr-xr-xtests/test-version-etc.sh2
-rw-r--r--tests/test-wchar-c++.cc2
-rw-r--r--tests/test-wchar.c2
-rw-r--r--tests/test-wcrtomb-w32.c2
-rw-r--r--tests/test-wcrtomb.c2
-rw-r--r--tests/test-wctype-h-c++.cc2
-rw-r--r--tests/test-wctype-h.c2
-rw-r--r--tests/test-write.c79
-rw-r--r--tests/test-xalloc-die.c2
-rwxr-xr-xtests/test-xalloc-die.sh2
-rw-r--r--tests/test-xvasprintf.c8
-rw-r--r--tests/unsetenv.c15
-rw-r--r--tests/wctob.c2
-rw-r--r--tests/wctomb-impl.h2
-rw-r--r--tests/wctomb.c2
-rw-r--r--tests/write.c145
-rw-r--r--tests/zerosize-ptr.h2
1045 files changed, 55765 insertions, 21062 deletions
diff --git a/.prev-version b/.prev-version
index 8a3b8ac..6ee81ab 100644
--- a/.prev-version
+++ b/.prev-version
@@ -1 +1 @@
-1.4.15
+1.4.16
diff --git a/.tarball-version b/.tarball-version
index 6ee81ab..04e0d3f 100644
--- a/.tarball-version
+++ b/.tarball-version
@@ -1 +1 @@
-1.4.16
+1.4.17
diff --git a/.version b/.version
index 6ee81ab..04e0d3f 100644
--- a/.version
+++ b/.version
@@ -1 +1 @@
-1.4.16
+1.4.17
diff --git a/.x-sc_prohibit_tab_based_indentation b/.x-sc_prohibit_tab_based_indentation
deleted file mode 100644
index bd9127e..0000000
--- a/.x-sc_prohibit_tab_based_indentation
+++ /dev/null
@@ -1,5 +0,0 @@
-^GNUMakefile$
-Makefile\.am$
-\.mk$
-^HACKING$
-ChangeLog.*
diff --git a/.x-update-copyright b/.x-update-copyright
deleted file mode 100644
index 725ba40..0000000
--- a/.x-update-copyright
+++ /dev/null
@@ -1 +0,0 @@
-m4/gnulib-cache.m4
diff --git a/AUTHORS b/AUTHORS
index 667db4c..c280009 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -32,7 +32,7 @@ Tim Rice tim@multitalents.net 2011-01-24
========================================================================
-Copyright (C) 2000, 2006-2007, 2009-2011 Free Software Foundation, Inc.
+Copyright (C) 2000, 2006-2007, 2009-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
diff --git a/BACKLOG b/BACKLOG
index e1e2e06..9b8973e 100644
--- a/BACKLOG
+++ b/BACKLOG
@@ -50,7 +50,7 @@ rmail/speed
2. 05 Sep 94 <djm@va.pubnix.com> slowness
3. 04 Oct 94 <pinard> Autoconf, m4, and dnl's.
-Copyright (C) 2000, 2006, 2009-2011 Free Software Foundation, Inc.
+Copyright (C) 2000, 2006, 2009-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
diff --git a/ChangeLog b/ChangeLog
index 894ca8b..09c1333 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,250 @@
+2013-09-15 Gary V. Vaughan <gary@gnu.org>
+
+ configury: specify subdir-objects for future automake releases.
+ Latest automake warns about future incompatibility if
+ subdir-objects is not specified by AM_INIT_AUTOMAKE.
+ * configure.ac (AM_INIT_AUTOMAKE): Add subdir-objects.
+
+ bootstrap: require newer texinfo release.
+ * bootstrap.conf (buildreq): Bump required makeinfo binary
+ release number to 4.13 to support --bulid-dir option.
+
+ bootstrap: don't double-specify --no-changelog to gnulib-tool.
+ * bootstrap.conf (gnulib_tool_option_extras): Rename from
+ this...
+ (gnulib_tool_options): ...this, and append options rather than
+ overwrite.
+
+ bootstrap: sync with upstream.
+ * gl/build-aux/bootstrap.in, gl/build-aux/extract-trace,
+ gl/build-aux/funclib.sh, gl/build-aux/options-parser: Update
+ from upstream to pick up recent improvements.
+ * bootstrap: Regenerate.
+
+2013-08-17 Michael Witten <mfwitten@gmail.com> (tiny change)
+
+ Clean up documentation
+ * doc/m4.texinfo: Note that m4 is mostly compatible with SVR4.
+
+2013-08-17 Eric Blake <eblake@redhat.com>
+
+ maint: update to latest gnulib
+ * gnulib: Update to latest, for various fixes.
+
+2013-04-18 Eric Blake <eblake@redhat.com>
+
+ maint: update to latest gnulib
+ * gnulib: Update to latest, for regex fixes.
+
+2013-03-15 Eric Blake <eblake@redhat.com>
+
+ build: avoid test failure on HPUX
+ * doc/m4.texi (Command line files): Skip tests on systems where it
+ is impossible to start with stdin/out closed.
+ Reported by Gary V. Vaughan.
+
+2013-03-12 Eric Blake <eblake@redhat.com>
+
+ maint: update to latest gnulib
+ * gnulib: Update to latest, for mingw compile fixes.
+
+2013-03-11 Eric Blake <eblake@redhat.com>
+
+ build: fix large diversions on mingw
+ * gl/lib/clean-temp.c.diff: New file.
+ * NEWS: Mention the fix.
+
+2013-03-08 Gary V. Vaughan <gary@gnu.org>
+
+ bootstrap: remove reintroduced CVS cruft.
+ * bootstrap.conf (m4_ignore_gnulib_ignore): Remove.
+ The code this was factored from was removed between making the
+ bootstrap branch, and merging, so this function is actually
+ obsolete.
+
+ maint: automake 1.11.5 and earlier generate insecure dist
+ rules.
+ * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.5 or newer.
+
+2010-09-17 Gary V. Vaughan <gary@gnu.org>
+
+ bootstrap: upgrade to canonical upstream version.
+ * bootstrap.conf: New file to configure gnulib bootstrap.
+ * gl: New gnulib overrides directory.
+ * gl/modules/bootstrap, gl/modules/extract-trace,
+ gl/modules/funclib.sh, gl/modules/inline-source,
+ gl/modules/options-parser: Import canonical bootstrap modules.
+ * gl/build-aux/bootstrap.in, gl/build-aux/extract-trace,
+ gl/build-aux/funclib.sh, gl/build-aix/inline-source,
+ gl/build-aux/options-parser: Import module implementations.
+ * bootstrap: Regenerate.
+ * m4/gnulib-cache.m4: Regenerate.
+
+2013-01-02 Eric Blake <eblake@redhat.com>
+
+ maint: automake recommends *.texi now
+ * doc/m4.texinfo: Move...
+ * doc/m4.texi: ...here, for the eventual automake 1.14.
+ * HACKING: Reflect the rename.
+ * doc/Makefile.am (info_TEXINFOS): Likewise.
+ * checks/Makefile.am ($(srcdir)/stamp-checks): Likewise.
+
+2013-01-01 Eric Blake <eblake@redhat.com>
+
+ maint: bump copyright year
+ * all files: Version control now has a commit in 2013.
+
+ maint: update to latest gnulib
+ * gnulib: Update to latest, for rational range regex, build fixes,
+ copyright update.
+ * NEWS: Document this.
+
+2012-12-22 Eric Blake <eblake@redhat.com>
+
+ maint: enable tight_scope syntax check
+ * src/Makefile.am (m4_SOURCES): Move m4.h...
+ (noinst_HEADERS): ...into separate listing for syntax check.
+ * src/m4.h: Add 'extern' to function declarations.
+ (expansion_level): Declare extern variable here...
+ * src/debug.c: ...not here.
+
+ maint: move syntax check exemptions into cfg.mk
+ * .x-sc_prohibit_tab_based_indentation: Delete file.
+ * .x-update-copyright: Likewise.
+ * Makefile.am (syntax_check_exceptions): Delete rule.
+ * cfg.mk (exclude_file_name_regexp): Move exemptions here.
+ (local-checks-to-skip): Re-enable copyright check.
+
+ build: update to latest gnulib
+ * gnulib: Update to latest.
+
+2012-11-19 Eric Blake <eblake@redhat.com>
+
+ build: avoid problematic gcc 4.4 warnings
+ * configure.ac (nw): Disable gcc warnings that cause build
+ failures under RHEL 6.3.
+ * gnulib: Update to latest.
+
+2012-11-14 Paul Eggert <eggert@cs.ucla.edu>
+
+ doc: improve prehistory discussion
+ * doc/m4.texinfo (History): Describe M6 and related processors.
+ From a suggestion by Doug McIlroy in
+ <http://lists.gnu.org/archive/html/m4-discuss/2012-05/msg00004.html>.
+ Also, improve citation quality by giving URLs and so forth.
+
+2012-09-21 Eric Blake <eblake@redhat.com>
+
+ maint: drop more CVS cruft
+ * bootstrap (Version control): Don't generate .cvsignore or
+ prepopulate m4/.gitignore.
+ * .gitignore: Allow m4/gnulib-cache.m4 manually.
+
+2012-09-06 Eric Blake <eblake@redhat.com>
+
+ maint: enable gcc warnings during git development
+ * configure.ac (gl_gcc_warnings): Alter default based on environment.
+
+2012-09-05 Stefanno Lattarini <stefano.lattarini@gmail.com> (tiny change)
+
+ maint: convert the last hand-written Makefile to automake
+ * checks/Makefile.in: Rename ...
+ * checks/Makefile.am: ... like this, and simplify and adjust to
+ make it proper as Automake input.
+
+2012-09-04 Eric Blake <eblake@redhat.com>
+
+ maint: merge gitignore files
+ * build-aux/.gitignore: Delete.
+ * checks/.gitignore: Likewise.
+ * doc/.gitignore: Likewise.
+ * examples/.gitignore: Likewise.
+ * src/.gitignore: Likewise.
+ * .gitignore: Cover rules from deleted files.
+
+ maint: drop CVS cruft
+ * .cvsignore: Remove.
+ * build-aux/.cvsignore: Likewise.
+ * checks/.cvsignore: Likewise.
+ * doc/.cvsignore: Likewise.
+ * examples/.cvsignore: Likewise.
+ * src/.cvsignore: Likewise.
+
+ build: add more compiler checking
+ * configure.ac (nw): Turn on some warnings that no longer trigger
+ a gcc warning, or where we reduce the scope of unwarned code.
+ * src/m4.h (progname): Drop redundant declaration.
+ * src/builtin.c (includes): Use header for program_name.
+
+ build: pick up latest gnulib fixes
+ * gnulib: Update to latest.
+ * m4/gnulib-cache.m4: Regenerate.
+ * missing: Break symlink in order to work around automake version
+ mismatch issue.
+ * .gitignore: Update.
+ * .cvsignore: Likewise.
+
+ build: mark several pure functions
+ * src/m4.h (M4_GNUC_PURE): New macro.
+ * src/m4.c (fault_handler): Mark pure.
+ * src/builtin.c (find_builtin_by_addr, find_builtin_by_name):
+ Likewise.
+ * src/symtab.c (hash): Likewise.
+
+2012-09-01 Eric Blake <eblake@redhat.com>
+
+ build: silence gcc warning
+ * configure.ac (M4_cv_gcc_pragma_push_works): New test.
+ (-Wformat-nonliteral): Disable for older gcc.
+ * src/format.c (expand_format): Mark our only uses of nonliteral
+ format as being safe.
+
+ doc: fix misuse of @xref
+ * doc/m4.texinfo (Inhibiting Invocation): Reword.
+
+2012-07-21 Eric Blake <eblake@redhat.com>
+
+ bootstrap: avoid undefined variables
+ * bootstrap (func_fatal_error, func_usage, func_help)
+ (func_version): Use constants, not undefined variables; propagate
+ any write failures.
+ (func_missing_arg): Drop duplicate declaration. Preinitialize
+ exit_cmd.
+ Reported by Stefano Lattarini.
+
+2012-06-26 Eric Blake <eblake@redhat.com>
+
+ build: get missing from automake, not gnulib
+ * build-aux/missing: Break link to gnulib.
+ * .gitignore: Reflect this.
+
+2012-06-25 Eric Blake <eblake@redhat.com>
+
+ maint: update copyright year
+ * all files: Run 'make update-copyright'.
+
+ build: deal with newer glibc vs. FORTIFY_SOURCE
+ * configure.ac (FORTIFY_SOURCE): Make conditional on optimization.
+
+2011-05-02 Eric Blake <eblake@redhat.com>
+
+ build: pick up latest gnulib fixes
+ * gnulib: Update to latest, for fclose improvements.
+
+2011-04-30 Eric Blake <eblake@redhat.com>
+
+ build: improve SIGPIPE emulation on mingw
+ * gnulib: Update to latest.
+ * m4/gnulib-cache.m4: Import sigpipe module, drop strtol.
+
+2011-04-29 Eric Blake <eblake@redhat.com>
+
+ m4_defn: avoid compiler warning
+ * src/builtin.c (m4_defn): Nuke redundant condition.
+
+ m4_error: fix missing va_end
+ * src/m4.c (m4_error, m4_error_at_line): Add missing va_end.
+
2011-03-01 Eric Blake <eblake@redhat.com>
Release Version 1.4.16.
@@ -5297,8 +5544,8 @@ Mon Jan 22 21:08:52 1990 Rene' Seindal (seindal at diku.dk)
coding: utf-8
End:
- Copyright (C) 1990-1994, 2000-2001, 2003, 2005-2011 Free Software
- Foundation, Inc.
+ Copyright (C) 1990-1994, 2000-2001, 2003, 2005-2013 Free
+ Software Foundation, Inc.
Copying and distribution of this file, with or without
modification, are permitted provided the copyright notice
diff --git a/GNUmakefile b/GNUmakefile
index 6e00ec8..8759034 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,11 +1,11 @@
-# Having a separate GNUmakefile lets me `include' the dynamically
+# Having a separate GNUmakefile lets me 'include' the dynamically
# generated rules created via cfg.mk (package-local configuration)
# as well as maint.mk (generic maintainer rules).
# This makefile is used only if you run GNU Make.
# It is necessary if you want to build targets usually of interest
# only to the maintainer.
-# Copyright (C) 2001, 2003, 2006-2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2006-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,20 +20,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Systems where /bin/sh is not the default shell need this. The $(shell)
-# command below won't work with e.g. stock DOS/Windows shells.
-ifeq ($(wildcard /bin/s[h]),/bin/sh)
-SHELL = /bin/sh
-else
-# will be used only with the next shell-test line, then overwritten
-# by a configured-in value
-SHELL = sh
-endif
-
# If the user runs GNU make but has not yet run ./configure,
# give them a diagnostic.
-_have-Makefile := $(shell test -f Makefile && echo yes)
-ifeq ($(_have-Makefile),yes)
+_gl-Makefile := $(wildcard [M]akefile)
+ifneq ($(_gl-Makefile),)
# Make tar archive easier to reproduce.
export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner
@@ -45,12 +35,13 @@ include Makefile
# Some projects override e.g., _autoreconf here.
-include $(srcdir)/cfg.mk
-include $(srcdir)/maint.mk
# Allow cfg.mk to override these.
_build-aux ?= build-aux
_autoreconf ?= autoreconf -v
+include $(srcdir)/maint.mk
+
# Ensure that $(VERSION) is up to date for dist-related targets, but not
# for others: rerunning autoreconf and recompiling everything isn't cheap.
_have-git-version-gen := \
@@ -100,6 +91,11 @@ srcdir = .
# The package can override .DEFAULT_GOAL to run actions like autoreconf.
-include ./cfg.mk
+
+# Allow cfg.mk to override these.
+_build-aux ?= build-aux
+_autoreconf ?= autoreconf -v
+
include ./maint.mk
ifeq ($(.DEFAULT_GOAL),abort-due-to-no-makefile)
@@ -108,7 +104,7 @@ endif
abort-due-to-no-makefile:
@echo There seems to be no Makefile in this directory. 1>&2
- @echo "You must run ./configure before running \`make'." 1>&2
+ @echo "You must run ./configure before running 'make'." 1>&2
@exit 1
endif
diff --git a/INSTALL b/INSTALL
index a1e89e1..2099840 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,7 +1,7 @@
Installation Instructions
*************************
-Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
+Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
Inc.
Copying and distribution of this file, with or without modification,
@@ -12,8 +12,8 @@ without warranty of any kind.
Basic Installation
==================
- Briefly, the shell commands `./configure; make; make install' should
-configure, build, and install this package. The following
+ Briefly, the shell command `./configure && make && make install'
+should configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package. Some packages provide this
`INSTALL' file but do not implement all of the features documented
@@ -309,9 +309,10 @@ causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script).
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
-an Autoconf bug. Until the bug is fixed you can use this workaround:
+an Autoconf limitation. Until the limitation is lifted, you can use
+this workaround:
- CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+ CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================
@@ -367,4 +368,3 @@ operates.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
-
diff --git a/Makefile.am b/Makefile.am
index c35d129..153648b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
## Makefile.am - template for generating Makefile via Automake
##
-## Copyright (C) 2000-2001, 2003-2011 Free Software Foundation, Inc.
+## Copyright (C) 2000-2001, 2003-2013 Free Software Foundation, Inc.
##
## This file is part of GNU M4.
##
@@ -21,12 +21,8 @@
SUBDIRS = . examples lib src doc checks tests
-syntax_check_exceptions = \
- .x-sc_prohibit_tab_based_indentation \
- .x-update-copyright
-
EXTRA_DIST = bootstrap c-boxes.el cfg.mk maint.mk \
- .prev-version .version m4/gnulib-cache.m4 $(syntax_check_exceptions)
+ .prev-version .version m4/gnulib-cache.m4
DISTCLEANFILES = stamp-h
## maintainer-clean should remove as much as possible that ./bootstrap can
## recreate. In the m4 directory, keep only gnulib-cache.m4.
diff --git a/Makefile.in b/Makefile.in
index 4214f6f..112c9f5 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.14 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,6 +14,51 @@
@SET_MAKE@
VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -33,55 +77,66 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = .
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(top_srcdir)/checks/Makefile.in \
- $(top_srcdir)/configure AUTHORS BACKLOG COPYING ChangeLog \
- INSTALL NEWS THANKS TODO build-aux/compile \
- build-aux/config.guess build-aux/config.rpath \
- build-aux/config.sub build-aux/depcomp build-aux/install-sh \
- build-aux/mdate-sh build-aux/missing build-aux/texinfo.tex
+DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
+ $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/configure $(am__configure_deps) BACKLOG COPYING \
+ THANKS TODO build-aux/compile build-aux/config.guess \
+ build-aux/config.rpath build-aux/config.sub build-aux/depcomp \
+ build-aux/install-sh build-aux/mdate-sh build-aux/missing \
+ build-aux/texinfo.tex $(top_srcdir)/build-aux/compile \
+ $(top_srcdir)/build-aux/config.guess \
+ $(top_srcdir)/build-aux/config.rpath \
+ $(top_srcdir)/build-aux/config.sub \
+ $(top_srcdir)/build-aux/install-sh \
+ $(top_srcdir)/build-aux/missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/ansi-c++.m4 \
- $(top_srcdir)/m4/assert.m4 $(top_srcdir)/m4/autobuild.m4 \
- $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/c-stack.m4 \
- $(top_srcdir)/m4/canonicalize.m4 $(top_srcdir)/m4/cloexec.m4 \
+ $(top_srcdir)/m4/asm-underscore.m4 $(top_srcdir)/m4/assert.m4 \
+ $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \
+ $(top_srcdir)/m4/c-stack.m4 $(top_srcdir)/m4/canonicalize.m4 \
$(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \
- $(top_srcdir)/m4/closein.m4 $(top_srcdir)/m4/closeout.m4 \
- $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/config-h.m4 \
- $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/dirname.m4 \
- $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup2.m4 \
- $(top_srcdir)/m4/eealloc.m4 $(top_srcdir)/m4/environ.m4 \
- $(top_srcdir)/m4/errno_h.m4 $(top_srcdir)/m4/error.m4 \
- $(top_srcdir)/m4/execute.m4 $(top_srcdir)/m4/exponentd.m4 \
- $(top_srcdir)/m4/exponentf.m4 $(top_srcdir)/m4/exponentl.m4 \
- $(top_srcdir)/m4/extensions.m4 \
+ $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/closein.m4 \
+ $(top_srcdir)/m4/closeout.m4 $(top_srcdir)/m4/codeset.m4 \
+ $(top_srcdir)/m4/config-h.m4 $(top_srcdir)/m4/configmake.m4 \
+ $(top_srcdir)/m4/dirent_h.m4 $(top_srcdir)/m4/dirname.m4 \
+ $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \
+ $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
+ $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \
+ $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/execute.m4 \
+ $(top_srcdir)/m4/exponentd.m4 $(top_srcdir)/m4/exponentf.m4 \
+ $(top_srcdir)/m4/exponentl.m4 $(top_srcdir)/m4/extensions.m4 \
+ $(top_srcdir)/m4/extern-inline.m4 \
$(top_srcdir)/m4/fatal-signal.m4 $(top_srcdir)/m4/fclose.m4 \
$(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \
- $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fflush.m4 \
- $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/float_h.m4 \
- $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fpending.m4 \
- $(top_srcdir)/m4/fpieee.m4 $(top_srcdir)/m4/fpurge.m4 \
+ $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopen.m4 \
+ $(top_srcdir)/m4/fflush.m4 $(top_srcdir)/m4/filenamecat.m4 \
+ $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fopen.m4 \
+ $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fpieee.m4 \
+ $(top_srcdir)/m4/fpurge.m4 $(top_srcdir)/m4/freadahead.m4 \
$(top_srcdir)/m4/freading.m4 $(top_srcdir)/m4/frexp.m4 \
- $(top_srcdir)/m4/frexpl.m4 $(top_srcdir)/m4/fseeko.m4 \
+ $(top_srcdir)/m4/frexpl.m4 $(top_srcdir)/m4/fseek.m4 \
+ $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \
$(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \
- $(top_srcdir)/m4/getdtablesize.m4 $(top_srcdir)/m4/getopt.m4 \
- $(top_srcdir)/m4/getpagesize.m4 \
- $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/gl_list.m4 \
- $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \
+ $(top_srcdir)/m4/getcwd.m4 $(top_srcdir)/m4/getdtablesize.m4 \
+ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpagesize.m4 \
+ $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glibc21.m4 \
+ $(top_srcdir)/m4/gnulib-common.m4 \
$(top_srcdir)/m4/gnulib-comp.m4 \
- $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \
+ $(top_srcdir)/m4/include_next.m4 \
$(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \
+ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \
$(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/isnand.m4 \
$(top_srcdir)/m4/isnanf.m4 $(top_srcdir)/m4/isnanl.m4 \
- $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/lcmessage.m4 \
- $(top_srcdir)/m4/ldexp.m4 $(top_srcdir)/m4/ldexpl.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \
- $(top_srcdir)/m4/link.m4 $(top_srcdir)/m4/localcharset.m4 \
- $(top_srcdir)/m4/locale-fr.m4 $(top_srcdir)/m4/locale-ja.m4 \
- $(top_srcdir)/m4/locale-tr.m4 $(top_srcdir)/m4/locale-zh.m4 \
- $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localename.m4 \
+ $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \
+ $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/ldexp.m4 \
+ $(top_srcdir)/m4/ldexpl.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/libsigsegv.m4 $(top_srcdir)/m4/link.m4 \
+ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \
+ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-tr.m4 \
+ $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/locale_h.m4 \
+ $(top_srcdir)/m4/localeconv.m4 $(top_srcdir)/m4/localename.m4 \
$(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \
$(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \
$(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \
@@ -90,40 +145,43 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \
$(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mkdtemp.m4 \
$(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \
- $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/multiarch.m4 \
+ $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \
+ $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \
$(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nocrash.m4 \
- $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/pathmax.m4 \
+ $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/open.m4 \
+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \
$(top_srcdir)/m4/pipe2.m4 $(top_srcdir)/m4/posix_spawn.m4 \
$(top_srcdir)/m4/printf-frexp.m4 \
$(top_srcdir)/m4/printf-frexpl.m4 $(top_srcdir)/m4/printf.m4 \
$(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quotearg.m4 \
- $(top_srcdir)/m4/rawmemchr.m4 $(top_srcdir)/m4/readlink.m4 \
+ $(top_srcdir)/m4/raise.m4 $(top_srcdir)/m4/rawmemchr.m4 \
+ $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readlink.m4 \
$(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/rename.m4 \
$(top_srcdir)/m4/rmdir.m4 $(top_srcdir)/m4/sched_h.m4 \
- $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/setlocale.m4 \
- $(top_srcdir)/m4/sig_atomic_t.m4 $(top_srcdir)/m4/sigaction.m4 \
- $(top_srcdir)/m4/signal_h.m4 \
+ $(top_srcdir)/m4/secure_getenv.m4 $(top_srcdir)/m4/setenv.m4 \
+ $(top_srcdir)/m4/setlocale.m4 $(top_srcdir)/m4/sig_atomic_t.m4 \
+ $(top_srcdir)/m4/sigaction.m4 $(top_srcdir)/m4/signal_h.m4 \
$(top_srcdir)/m4/signalblocking.m4 $(top_srcdir)/m4/signbit.m4 \
- $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/snprintf.m4 \
+ $(top_srcdir)/m4/sigpipe.m4 $(top_srcdir)/m4/size_max.m4 \
+ $(top_srcdir)/m4/sleep.m4 $(top_srcdir)/m4/snprintf.m4 \
$(top_srcdir)/m4/spawn-pipe.m4 $(top_srcdir)/m4/spawn_h.m4 \
$(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat.m4 \
$(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \
$(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \
- $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio-safer.m4 \
- $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib-safer.m4 \
+ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \
$(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strchrnul.m4 \
$(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
$(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strndup.m4 \
$(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strsignal.m4 \
$(top_srcdir)/m4/strstr.m4 $(top_srcdir)/m4/strtod.m4 \
- $(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/symlink.m4 \
+ $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_socket_h.m4 \
$(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \
- $(top_srcdir)/m4/sys_wait_h.m4 $(top_srcdir)/m4/tempname.m4 \
- $(top_srcdir)/m4/threadlib.m4 $(top_srcdir)/m4/time_h.m4 \
- $(top_srcdir)/m4/tls.m4 $(top_srcdir)/m4/tmpdir.m4 \
- $(top_srcdir)/m4/ungetc.m4 $(top_srcdir)/m4/unistd-safer.m4 \
- $(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/unlocked-io.m4 \
- $(top_srcdir)/m4/vasnprintf.m4 \
+ $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/sys_wait_h.m4 \
+ $(top_srcdir)/m4/tempname.m4 $(top_srcdir)/m4/threadlib.m4 \
+ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/tls.m4 \
+ $(top_srcdir)/m4/tmpdir.m4 $(top_srcdir)/m4/ungetc.m4 \
+ $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \
+ $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
$(top_srcdir)/m4/vasprintf-posix.m4 \
$(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/version-etc.m4 \
$(top_srcdir)/m4/wait-process.m4 $(top_srcdir)/m4/waitpid.m4 \
@@ -131,47 +189,84 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \
$(top_srcdir)/m4/wctob.m4 $(top_srcdir)/m4/wctomb.m4 \
$(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wint_t.m4 \
- $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xsize.m4 \
- $(top_srcdir)/m4/xstrndup.m4 $(top_srcdir)/m4/xvasprintf.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/write.m4 $(top_srcdir)/m4/xalloc.m4 \
+ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrndup.m4 \
+ $(top_srcdir)/m4/xvasprintf.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 = $(top_builddir)/lib/config.h
-CONFIG_CLEAN_FILES = checks/Makefile
+CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
-am__v_GEN_0 = @echo " GEN " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
+am__v_at_1 =
SOURCES =
DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-dvi-recursive install-exec-recursive \
- install-html-recursive install-info-recursive \
- install-pdf-recursive install-ps-recursive install-recursive \
- installcheck-recursive installdirs-recursive pdf-recursive \
- ps-recursive uninstall-recursive
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
- $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
- distdir dist dist-all distcheck
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ cscope distdir dist dist-all distcheck
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
+CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
- { test ! -d "$(distdir)" \
- || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
- && rm -fr "$(distdir)"; }; }
+ if test -d "$(distdir)"; then \
+ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -rf "$(distdir)" \
+ || { sleep 5 && rm -rf "$(distdir)"; }; \
+ else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
@@ -199,7 +294,10 @@ am__relativize = \
reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).tar.xz
GZIP_ENV = --best
+DIST_TARGETS = dist-xz dist-bzip2 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@
@@ -208,6 +306,9 @@ ALLOCA_H = @ALLOCA_H@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+AR = @AR@
+ARFLAGS = @ARFLAGS@
+ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -245,47 +346,90 @@ EXEEXT = @EXEEXT@
FLOAT_H = @FLOAT_H@
GETOPT_H = @GETOPT_H@
GLIBC21 = @GLIBC21@
+GNULIB_ACOSF = @GNULIB_ACOSF@
GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
+GNULIB_ASINF = @GNULIB_ASINF@
GNULIB_ASINL = @GNULIB_ASINL@
+GNULIB_ATAN2F = @GNULIB_ATAN2F@
+GNULIB_ATANF = @GNULIB_ATANF@
GNULIB_ATANL = @GNULIB_ATANL@
GNULIB_ATOLL = @GNULIB_ATOLL@
GNULIB_BTOWC = @GNULIB_BTOWC@
GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CBRT = @GNULIB_CBRT@
+GNULIB_CBRTF = @GNULIB_CBRTF@
+GNULIB_CBRTL = @GNULIB_CBRTL@
GNULIB_CEIL = @GNULIB_CEIL@
GNULIB_CEILF = @GNULIB_CEILF@
GNULIB_CEILL = @GNULIB_CEILL@
+GNULIB_CHDIR = @GNULIB_CHDIR@
GNULIB_CHOWN = @GNULIB_CHOWN@
GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@
+GNULIB_COPYSIGN = @GNULIB_COPYSIGN@
+GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@
+GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@
+GNULIB_COSF = @GNULIB_COSF@
+GNULIB_COSHF = @GNULIB_COSHF@
GNULIB_COSL = @GNULIB_COSL@
+GNULIB_DIRFD = @GNULIB_DIRFD@
GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP = @GNULIB_DUP@
GNULIB_DUP2 = @GNULIB_DUP2@
GNULIB_DUP3 = @GNULIB_DUP3@
GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
GNULIB_ENVIRON = @GNULIB_ENVIRON@
GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXP2 = @GNULIB_EXP2@
+GNULIB_EXP2F = @GNULIB_EXP2F@
+GNULIB_EXP2L = @GNULIB_EXP2L@
+GNULIB_EXPF = @GNULIB_EXPF@
GNULIB_EXPL = @GNULIB_EXPL@
+GNULIB_EXPM1 = @GNULIB_EXPM1@
+GNULIB_EXPM1F = @GNULIB_EXPM1F@
+GNULIB_EXPM1L = @GNULIB_EXPM1L@
+GNULIB_FABSF = @GNULIB_FABSF@
+GNULIB_FABSL = @GNULIB_FABSL@
GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
GNULIB_FCHDIR = @GNULIB_FCHDIR@
GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
GNULIB_FCLOSE = @GNULIB_FCLOSE@
GNULIB_FCNTL = @GNULIB_FCNTL@
+GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
+GNULIB_FDOPEN = @GNULIB_FDOPEN@
+GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@
GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FFSL = @GNULIB_FFSL@
+GNULIB_FFSLL = @GNULIB_FFSLL@
+GNULIB_FGETC = @GNULIB_FGETC@
+GNULIB_FGETS = @GNULIB_FGETS@
GNULIB_FLOOR = @GNULIB_FLOOR@
GNULIB_FLOORF = @GNULIB_FLOORF@
GNULIB_FLOORL = @GNULIB_FLOORL@
+GNULIB_FMA = @GNULIB_FMA@
+GNULIB_FMAF = @GNULIB_FMAF@
+GNULIB_FMAL = @GNULIB_FMAL@
+GNULIB_FMOD = @GNULIB_FMOD@
+GNULIB_FMODF = @GNULIB_FMODF@
+GNULIB_FMODL = @GNULIB_FMODL@
GNULIB_FOPEN = @GNULIB_FOPEN@
GNULIB_FPRINTF = @GNULIB_FPRINTF@
GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
GNULIB_FPURGE = @GNULIB_FPURGE@
GNULIB_FPUTC = @GNULIB_FPUTC@
GNULIB_FPUTS = @GNULIB_FPUTS@
+GNULIB_FREAD = @GNULIB_FREAD@
GNULIB_FREOPEN = @GNULIB_FREOPEN@
GNULIB_FREXP = @GNULIB_FREXP@
+GNULIB_FREXPF = @GNULIB_FREXPF@
GNULIB_FREXPL = @GNULIB_FREXPL@
+GNULIB_FSCANF = @GNULIB_FSCANF@
GNULIB_FSEEK = @GNULIB_FSEEK@
GNULIB_FSEEKO = @GNULIB_FSEEKO@
+GNULIB_FSTAT = @GNULIB_FSTAT@
GNULIB_FSTATAT = @GNULIB_FSTATAT@
GNULIB_FSYNC = @GNULIB_FSYNC@
GNULIB_FTELL = @GNULIB_FTELL@
@@ -293,6 +437,8 @@ GNULIB_FTELLO = @GNULIB_FTELLO@
GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
GNULIB_FWRITE = @GNULIB_FWRITE@
+GNULIB_GETC = @GNULIB_GETC@
+GNULIB_GETCHAR = @GNULIB_GETCHAR@
GNULIB_GETCWD = @GNULIB_GETCWD@
GNULIB_GETDELIM = @GNULIB_GETDELIM@
GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
@@ -307,7 +453,18 @@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GL_M4_UNISTD_H_GETOPT = @GNULIB_GL_M4_UNISTD_H_GETOPT@
GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
+GNULIB_HYPOT = @GNULIB_HYPOT@
+GNULIB_HYPOTF = @GNULIB_HYPOTF@
+GNULIB_HYPOTL = @GNULIB_HYPOTL@
+GNULIB_ILOGB = @GNULIB_ILOGB@
+GNULIB_ILOGBF = @GNULIB_ILOGBF@
+GNULIB_ILOGBL = @GNULIB_ILOGBL@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+GNULIB_ISATTY = @GNULIB_ISATTY@
GNULIB_ISFINITE = @GNULIB_ISFINITE@
GNULIB_ISINF = @GNULIB_ISINF@
GNULIB_ISNAN = @GNULIB_ISNAN@
@@ -318,10 +475,25 @@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
GNULIB_LCHMOD = @GNULIB_LCHMOD@
GNULIB_LCHOWN = @GNULIB_LCHOWN@
+GNULIB_LDEXPF = @GNULIB_LDEXPF@
GNULIB_LDEXPL = @GNULIB_LDEXPL@
GNULIB_LINK = @GNULIB_LINK@
GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
+GNULIB_LOG = @GNULIB_LOG@
+GNULIB_LOG10 = @GNULIB_LOG10@
+GNULIB_LOG10F = @GNULIB_LOG10F@
+GNULIB_LOG10L = @GNULIB_LOG10L@
+GNULIB_LOG1P = @GNULIB_LOG1P@
+GNULIB_LOG1PF = @GNULIB_LOG1PF@
+GNULIB_LOG1PL = @GNULIB_LOG1PL@
+GNULIB_LOG2 = @GNULIB_LOG2@
+GNULIB_LOG2F = @GNULIB_LOG2F@
+GNULIB_LOG2L = @GNULIB_LOG2L@
GNULIB_LOGB = @GNULIB_LOGB@
+GNULIB_LOGBF = @GNULIB_LOGBF@
+GNULIB_LOGBL = @GNULIB_LOGBL@
+GNULIB_LOGF = @GNULIB_LOGF@
GNULIB_LOGL = @GNULIB_LOGL@
GNULIB_LSEEK = @GNULIB_LSEEK@
GNULIB_LSTAT = @GNULIB_LSTAT@
@@ -361,16 +533,23 @@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
GNULIB_MKTIME = @GNULIB_MKTIME@
+GNULIB_MODF = @GNULIB_MODF@
+GNULIB_MODFF = @GNULIB_MODFF@
+GNULIB_MODFL = @GNULIB_MODFL@
GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@
GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
GNULIB_OPEN = @GNULIB_OPEN@
GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_OPENDIR = @GNULIB_OPENDIR@
+GNULIB_PCLOSE = @GNULIB_PCLOSE@
GNULIB_PERROR = @GNULIB_PERROR@
GNULIB_PIPE = @GNULIB_PIPE@
GNULIB_PIPE2 = @GNULIB_PIPE2@
GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
GNULIB_POSIX_SPAWN = @GNULIB_POSIX_SPAWN@
GNULIB_POSIX_SPAWNATTR_DESTROY = @GNULIB_POSIX_SPAWNATTR_DESTROY@
GNULIB_POSIX_SPAWNATTR_GETFLAGS = @GNULIB_POSIX_SPAWNATTR_GETFLAGS@
@@ -392,41 +571,63 @@ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDU
GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY@
GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT@
+GNULIB_POWF = @GNULIB_POWF@
GNULIB_PREAD = @GNULIB_PREAD@
GNULIB_PRINTF = @GNULIB_PRINTF@
GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@
GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
GNULIB_PUTC = @GNULIB_PUTC@
GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
GNULIB_PUTENV = @GNULIB_PUTENV@
GNULIB_PUTS = @GNULIB_PUTS@
GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RAISE = @GNULIB_RAISE@
+GNULIB_RANDOM = @GNULIB_RANDOM@
GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READ = @GNULIB_READ@
+GNULIB_READDIR = @GNULIB_READDIR@
GNULIB_READLINK = @GNULIB_READLINK@
GNULIB_READLINKAT = @GNULIB_READLINKAT@
GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMAINDER = @GNULIB_REMAINDER@
+GNULIB_REMAINDERF = @GNULIB_REMAINDERF@
+GNULIB_REMAINDERL = @GNULIB_REMAINDERL@
GNULIB_REMOVE = @GNULIB_REMOVE@
GNULIB_RENAME = @GNULIB_RENAME@
GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+GNULIB_REWINDDIR = @GNULIB_REWINDDIR@
+GNULIB_RINT = @GNULIB_RINT@
+GNULIB_RINTF = @GNULIB_RINTF@
+GNULIB_RINTL = @GNULIB_RINTL@
GNULIB_RMDIR = @GNULIB_RMDIR@
GNULIB_ROUND = @GNULIB_ROUND@
GNULIB_ROUNDF = @GNULIB_ROUNDF@
GNULIB_ROUNDL = @GNULIB_ROUNDL@
GNULIB_RPMATCH = @GNULIB_RPMATCH@
+GNULIB_SCANDIR = @GNULIB_SCANDIR@
+GNULIB_SCANF = @GNULIB_SCANF@
+GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@
GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
GNULIB_SIGACTION = @GNULIB_SIGACTION@
GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
+GNULIB_SINF = @GNULIB_SINF@
+GNULIB_SINHF = @GNULIB_SINHF@
GNULIB_SINL = @GNULIB_SINL@
GNULIB_SLEEP = @GNULIB_SLEEP@
GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_SQRTF = @GNULIB_SQRTF@
GNULIB_SQRTL = @GNULIB_SQRTL@
GNULIB_STAT = @GNULIB_STAT@
+GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@
GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
GNULIB_STPCPY = @GNULIB_STPCPY@
GNULIB_STPNCPY = @GNULIB_STPNCPY@
@@ -444,13 +645,17 @@ GNULIB_STRSEP = @GNULIB_STRSEP@
GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
GNULIB_STRSTR = @GNULIB_STRSTR@
GNULIB_STRTOD = @GNULIB_STRTOD@
+GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@
GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
GNULIB_STRTOLL = @GNULIB_STRTOLL@
GNULIB_STRTOULL = @GNULIB_STRTOULL@
+GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
GNULIB_SYMLINK = @GNULIB_SYMLINK@
GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
+GNULIB_TANF = @GNULIB_TANF@
+GNULIB_TANHF = @GNULIB_TANHF@
GNULIB_TANL = @GNULIB_TANL@
GNULIB_TIMEGM = @GNULIB_TIMEGM@
GNULIB_TIME_R = @GNULIB_TIME_R@
@@ -460,7 +665,7 @@ GNULIB_TRUNC = @GNULIB_TRUNC@
GNULIB_TRUNCF = @GNULIB_TRUNCF@
GNULIB_TRUNCL = @GNULIB_TRUNCL@
GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
-GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
GNULIB_UNLINK = @GNULIB_UNLINK@
GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
@@ -472,8 +677,10 @@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+GNULIB_VFSCANF = @GNULIB_VFSCANF@
GNULIB_VPRINTF = @GNULIB_VPRINTF@
GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+GNULIB_VSCANF = @GNULIB_VSCANF@
GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
GNULIB_WAITPID = @GNULIB_WAITPID@
@@ -516,23 +723,46 @@ GNULIB_WMEMSET = @GNULIB_WMEMSET@
GNULIB_WRITE = @GNULIB_WRITE@
GNULIB__EXIT = @GNULIB__EXIT@
GREP = @GREP@
+HAVE_ACOSF = @HAVE_ACOSF@
HAVE_ACOSL = @HAVE_ACOSL@
+HAVE_ALPHASORT = @HAVE_ALPHASORT@
+HAVE_ASINF = @HAVE_ASINF@
HAVE_ASINL = @HAVE_ASINL@
+HAVE_ATAN2F = @HAVE_ATAN2F@
+HAVE_ATANF = @HAVE_ATANF@
HAVE_ATANL = @HAVE_ATANL@
HAVE_ATOLL = @HAVE_ATOLL@
HAVE_BTOWC = @HAVE_BTOWC@
HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
+HAVE_CBRT = @HAVE_CBRT@
+HAVE_CBRTF = @HAVE_CBRTF@
+HAVE_CBRTL = @HAVE_CBRTL@
HAVE_CHOWN = @HAVE_CHOWN@
+HAVE_CLOSEDIR = @HAVE_CLOSEDIR@
+HAVE_COPYSIGN = @HAVE_COPYSIGN@
+HAVE_COPYSIGNL = @HAVE_COPYSIGNL@
+HAVE_COSF = @HAVE_COSF@
+HAVE_COSHF = @HAVE_COSHF@
HAVE_COSL = @HAVE_COSL@
HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
+HAVE_DECL_CBRTF = @HAVE_DECL_CBRTF@
+HAVE_DECL_CBRTL = @HAVE_DECL_CBRTL@
HAVE_DECL_CEILF = @HAVE_DECL_CEILF@
HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
+HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@
HAVE_DECL_COSL = @HAVE_DECL_COSL@
+HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@
+HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@
+HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@
HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
+HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@
HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
+HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@
HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@
HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@
HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
@@ -546,17 +776,27 @@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
+HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
+HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@
HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
+HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@
+HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@
+HAVE_DECL_LOG2F = @HAVE_DECL_LOG2F@
+HAVE_DECL_LOG2L = @HAVE_DECL_LOG2L@
HAVE_DECL_LOGB = @HAVE_DECL_LOGB@
HAVE_DECL_LOGL = @HAVE_DECL_LOGL@
HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
+HAVE_DECL_REMAINDER = @HAVE_DECL_REMAINDER@
+HAVE_DECL_REMAINDERL = @HAVE_DECL_REMAINDERL@
+HAVE_DECL_RINTF = @HAVE_DECL_RINTF@
HAVE_DECL_ROUND = @HAVE_DECL_ROUND@
HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@
HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@
HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
HAVE_DECL_SINL = @HAVE_DECL_SINL@
HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@
@@ -565,7 +805,9 @@ 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_TANL = @HAVE_DECL_TANL@
HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@
HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@
@@ -575,18 +817,34 @@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+HAVE_DIRENT_H = @HAVE_DIRENT_H@
HAVE_DPRINTF = @HAVE_DPRINTF@
HAVE_DUP2 = @HAVE_DUP2@
HAVE_DUP3 = @HAVE_DUP3@
HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXPF = @HAVE_EXPF@
HAVE_EXPL = @HAVE_EXPL@
+HAVE_EXPM1 = @HAVE_EXPM1@
+HAVE_EXPM1F = @HAVE_EXPM1F@
+HAVE_FABSF = @HAVE_FABSF@
+HAVE_FABSL = @HAVE_FABSL@
HAVE_FACCESSAT = @HAVE_FACCESSAT@
HAVE_FCHDIR = @HAVE_FCHDIR@
HAVE_FCHMODAT = @HAVE_FCHMODAT@
HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FDATASYNC = @HAVE_FDATASYNC@
+HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
HAVE_FEATURES_H = @HAVE_FEATURES_H@
+HAVE_FFSL = @HAVE_FFSL@
+HAVE_FFSLL = @HAVE_FFSLL@
+HAVE_FMA = @HAVE_FMA@
+HAVE_FMAF = @HAVE_FMAF@
+HAVE_FMAL = @HAVE_FMAL@
+HAVE_FMODF = @HAVE_FMODF@
+HAVE_FMODL = @HAVE_FMODL@
+HAVE_FREXPF = @HAVE_FREXPF@
HAVE_FSEEKO = @HAVE_FSEEKO@
HAVE_FSTATAT = @HAVE_FSTATAT@
HAVE_FSYNC = @HAVE_FSYNC@
@@ -602,6 +860,12 @@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
HAVE_GRANTPT = @HAVE_GRANTPT@
+HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
+HAVE_HYPOTF = @HAVE_HYPOTF@
+HAVE_HYPOTL = @HAVE_HYPOTL@
+HAVE_ILOGB = @HAVE_ILOGB@
+HAVE_ILOGBF = @HAVE_ILOGBF@
+HAVE_ILOGBL = @HAVE_ILOGBL@
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
HAVE_ISNAND = @HAVE_ISNAND@
HAVE_ISNANF = @HAVE_ISNANF@
@@ -615,9 +879,18 @@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@
HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@
HAVE_LCHMOD = @HAVE_LCHMOD@
HAVE_LCHOWN = @HAVE_LCHOWN@
+HAVE_LDEXPF = @HAVE_LDEXPF@
HAVE_LIBSIGSEGV = @HAVE_LIBSIGSEGV@
HAVE_LINK = @HAVE_LINK@
HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LOG10F = @HAVE_LOG10F@
+HAVE_LOG10L = @HAVE_LOG10L@
+HAVE_LOG1P = @HAVE_LOG1P@
+HAVE_LOG1PF = @HAVE_LOG1PF@
+HAVE_LOG1PL = @HAVE_LOG1PL@
+HAVE_LOGBF = @HAVE_LOGBF@
+HAVE_LOGBL = @HAVE_LOGBL@
+HAVE_LOGF = @HAVE_LOGF@
HAVE_LOGL = @HAVE_LOGL@
HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
HAVE_LSTAT = @HAVE_LSTAT@
@@ -639,38 +912,64 @@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
HAVE_MKSTEMP = @HAVE_MKSTEMP@
HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
+HAVE_MODFF = @HAVE_MODFF@
+HAVE_MODFL = @HAVE_MODFL@
+HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OPENDIR = @HAVE_OPENDIR@
HAVE_OS_H = @HAVE_OS_H@
+HAVE_PCLOSE = @HAVE_PCLOSE@
HAVE_PIPE = @HAVE_PIPE@
HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_POPEN = @HAVE_POPEN@
+HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
HAVE_POSIX_SPAWN = @HAVE_POSIX_SPAWN@
HAVE_POSIX_SPAWNATTR_T = @HAVE_POSIX_SPAWNATTR_T@
HAVE_POSIX_SPAWN_FILE_ACTIONS_T = @HAVE_POSIX_SPAWN_FILE_ACTIONS_T@
+HAVE_POWF = @HAVE_POWF@
HAVE_PREAD = @HAVE_PREAD@
+HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@
HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RAISE = @HAVE_RAISE@
+HAVE_RANDOM = @HAVE_RANDOM@
HAVE_RANDOM_H = @HAVE_RANDOM_H@
HAVE_RANDOM_R = @HAVE_RANDOM_R@
HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READDIR = @HAVE_READDIR@
HAVE_READLINK = @HAVE_READLINK@
HAVE_READLINKAT = @HAVE_READLINKAT@
HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_REMAINDER = @HAVE_REMAINDER@
+HAVE_REMAINDERF = @HAVE_REMAINDERF@
HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_REWINDDIR = @HAVE_REWINDDIR@
+HAVE_RINT = @HAVE_RINT@
+HAVE_RINTL = @HAVE_RINTL@
HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@
+HAVE_SCANDIR = @HAVE_SCANDIR@
HAVE_SCHED_H = @HAVE_SCHED_H@
+HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
HAVE_SETENV = @HAVE_SETENV@
+HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
HAVE_SIGACTION = @HAVE_SIGACTION@
+HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@
HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
HAVE_SIGSET_T = @HAVE_SIGSET_T@
+HAVE_SINF = @HAVE_SINF@
+HAVE_SINHF = @HAVE_SINHF@
HAVE_SINL = @HAVE_SINL@
HAVE_SLEEP = @HAVE_SLEEP@
HAVE_SPAWN_H = @HAVE_SPAWN_H@
+HAVE_SQRTF = @HAVE_SQRTF@
HAVE_SQRTL = @HAVE_SQRTL@
HAVE_STDINT_H = @HAVE_STDINT_H@
HAVE_STPCPY = @HAVE_STPCPY@
@@ -696,6 +995,8 @@ 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_TANF = @HAVE_TANF@
+HAVE_TANHF = @HAVE_TANHF@
HAVE_TANL = @HAVE_TANL@
HAVE_TIMEGM = @HAVE_TIMEGM@
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
@@ -738,6 +1039,7 @@ HAVE_WCSXFRM = @HAVE_WCSXFRM@
HAVE_WCTRANS_T = @HAVE_WCTRANS_T@
HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
HAVE_WCTYPE_T = @HAVE_WCTYPE_T@
+HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
HAVE_WINT_T = @HAVE_WINT_T@
HAVE_WMEMCHR = @HAVE_WMEMCHR@
HAVE_WMEMCMP = @HAVE_WMEMCMP@
@@ -754,6 +1056,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@
+INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@
LIBCSTACK = @LIBCSTACK@
@@ -789,10 +1093,12 @@ M4tests_LTLIBOBJS = @M4tests_LTLIBOBJS@
M4tests_WITNESS = @M4tests_WITNESS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
+NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@
NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
@@ -807,15 +1113,18 @@ 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_DIRENT_H = @NEXT_DIRENT_H@
NEXT_ERRNO_H = @NEXT_ERRNO_H@
NEXT_FCNTL_H = @NEXT_FCNTL_H@
NEXT_FLOAT_H = @NEXT_FLOAT_H@
NEXT_GETOPT_H = @NEXT_GETOPT_H@
+NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
NEXT_LOCALE_H = @NEXT_LOCALE_H@
NEXT_MATH_H = @NEXT_MATH_H@
@@ -830,6 +1139,7 @@ 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@
@@ -846,33 +1156,53 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
+PRIPTR_PREFIX = @PRIPTR_PREFIX@
+PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
REPLACE_BTOWC = @REPLACE_BTOWC@
REPLACE_CALLOC = @REPLACE_CALLOC@
REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+REPLACE_CBRTF = @REPLACE_CBRTF@
+REPLACE_CBRTL = @REPLACE_CBRTL@
REPLACE_CEIL = @REPLACE_CEIL@
REPLACE_CEILF = @REPLACE_CEILF@
REPLACE_CEILL = @REPLACE_CEILL@
REPLACE_CHOWN = @REPLACE_CHOWN@
REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@
+REPLACE_DIRFD = @REPLACE_DIRFD@
REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUP2 = @REPLACE_DUP2@
REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_EXP2 = @REPLACE_EXP2@
+REPLACE_EXP2L = @REPLACE_EXP2L@
+REPLACE_EXPM1 = @REPLACE_EXPM1@
+REPLACE_EXPM1F = @REPLACE_EXPM1F@
+REPLACE_FABSL = @REPLACE_FABSL@
REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
REPLACE_FCLOSE = @REPLACE_FCLOSE@
REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDOPEN = @REPLACE_FDOPEN@
+REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
REPLACE_FFLUSH = @REPLACE_FFLUSH@
REPLACE_FLOOR = @REPLACE_FLOOR@
REPLACE_FLOORF = @REPLACE_FLOORF@
REPLACE_FLOORL = @REPLACE_FLOORL@
+REPLACE_FMA = @REPLACE_FMA@
+REPLACE_FMAF = @REPLACE_FMAF@
+REPLACE_FMAL = @REPLACE_FMAL@
+REPLACE_FMOD = @REPLACE_FMOD@
+REPLACE_FMODF = @REPLACE_FMODF@
+REPLACE_FMODL = @REPLACE_FMODL@
REPLACE_FOPEN = @REPLACE_FOPEN@
REPLACE_FPRINTF = @REPLACE_FPRINTF@
REPLACE_FPURGE = @REPLACE_FPURGE@
REPLACE_FREOPEN = @REPLACE_FREOPEN@
REPLACE_FREXP = @REPLACE_FREXP@
+REPLACE_FREXPF = @REPLACE_FREXPF@
REPLACE_FREXPL = @REPLACE_FREXPL@
REPLACE_FSEEK = @REPLACE_FSEEK@
REPLACE_FSEEKO = @REPLACE_FSEEKO@
@@ -880,6 +1210,7 @@ REPLACE_FSTAT = @REPLACE_FSTAT@
REPLACE_FSTATAT = @REPLACE_FSTATAT@
REPLACE_FTELL = @REPLACE_FTELL@
REPLACE_FTELLO = @REPLACE_FTELLO@
+REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
REPLACE_FUTIMENS = @REPLACE_FUTIMENS@
REPLACE_GETCWD = @REPLACE_GETCWD@
REPLACE_GETDELIM = @REPLACE_GETDELIM@
@@ -890,16 +1221,39 @@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
+REPLACE_HYPOT = @REPLACE_HYPOT@
+REPLACE_HYPOTF = @REPLACE_HYPOTF@
+REPLACE_HYPOTL = @REPLACE_HYPOTL@
+REPLACE_ILOGB = @REPLACE_ILOGB@
+REPLACE_ILOGBF = @REPLACE_ILOGBF@
+REPLACE_ISATTY = @REPLACE_ISATTY@
REPLACE_ISFINITE = @REPLACE_ISFINITE@
REPLACE_ISINF = @REPLACE_ISINF@
REPLACE_ISNAN = @REPLACE_ISNAN@
REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_ITOLD = @REPLACE_ITOLD@
REPLACE_LCHOWN = @REPLACE_LCHOWN@
REPLACE_LDEXPL = @REPLACE_LDEXPL@
REPLACE_LINK = @REPLACE_LINK@
REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LOG = @REPLACE_LOG@
+REPLACE_LOG10 = @REPLACE_LOG10@
+REPLACE_LOG10F = @REPLACE_LOG10F@
+REPLACE_LOG10L = @REPLACE_LOG10L@
+REPLACE_LOG1P = @REPLACE_LOG1P@
+REPLACE_LOG1PF = @REPLACE_LOG1PF@
+REPLACE_LOG1PL = @REPLACE_LOG1PL@
+REPLACE_LOG2 = @REPLACE_LOG2@
+REPLACE_LOG2F = @REPLACE_LOG2F@
+REPLACE_LOG2L = @REPLACE_LOG2L@
+REPLACE_LOGB = @REPLACE_LOGB@
+REPLACE_LOGBF = @REPLACE_LOGBF@
+REPLACE_LOGBL = @REPLACE_LOGBL@
+REPLACE_LOGF = @REPLACE_LOGF@
+REPLACE_LOGL = @REPLACE_LOGL@
REPLACE_LSEEK = @REPLACE_LSEEK@
REPLACE_LSTAT = @REPLACE_LSTAT@
REPLACE_MALLOC = @REPLACE_MALLOC@
@@ -917,6 +1271,9 @@ REPLACE_MKFIFO = @REPLACE_MKFIFO@
REPLACE_MKNOD = @REPLACE_MKNOD@
REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_MODF = @REPLACE_MODF@
+REPLACE_MODFF = @REPLACE_MODFF@
+REPLACE_MODFL = @REPLACE_MODFL@
REPLACE_NAN = @REPLACE_NAN@
REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
@@ -924,16 +1281,29 @@ REPLACE_NULL = @REPLACE_NULL@
REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
REPLACE_OPEN = @REPLACE_OPEN@
REPLACE_OPENAT = @REPLACE_OPENAT@
+REPLACE_OPENDIR = @REPLACE_OPENDIR@
REPLACE_PERROR = @REPLACE_PERROR@
REPLACE_POPEN = @REPLACE_POPEN@
REPLACE_POSIX_SPAWN = @REPLACE_POSIX_SPAWN@
+REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@
+REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@
+REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
REPLACE_PREAD = @REPLACE_PREAD@
REPLACE_PRINTF = @REPLACE_PRINTF@
+REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@
+REPLACE_PTSNAME = @REPLACE_PTSNAME@
+REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
REPLACE_PUTENV = @REPLACE_PUTENV@
REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_RAISE = @REPLACE_RAISE@
+REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
+REPLACE_READ = @REPLACE_READ@
REPLACE_READLINK = @REPLACE_READLINK@
REPLACE_REALLOC = @REPLACE_REALLOC@
REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMAINDER = @REPLACE_REMAINDER@
+REPLACE_REMAINDERF = @REPLACE_REMAINDERF@
+REPLACE_REMAINDERL = @REPLACE_REMAINDERL@
REPLACE_REMOVE = @REPLACE_REMOVE@
REPLACE_RENAME = @REPLACE_RENAME@
REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
@@ -948,10 +1318,13 @@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
REPLACE_SLEEP = @REPLACE_SLEEP@
REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_SQRTL = @REPLACE_SQRTL@
REPLACE_STAT = @REPLACE_STAT@
+REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
REPLACE_STPNCPY = @REPLACE_STPNCPY@
REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
REPLACE_STRDUP = @REPLACE_STRDUP@
REPLACE_STRERROR = @REPLACE_STRERROR@
REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
@@ -961,10 +1334,14 @@ REPLACE_STRNLEN = @REPLACE_STRNLEN@
REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
REPLACE_STRSTR = @REPLACE_STRSTR@
REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
+REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
REPLACE_SYMLINK = @REPLACE_SYMLINK@
REPLACE_TIMEGM = @REPLACE_TIMEGM@
REPLACE_TMPFILE = @REPLACE_TMPFILE@
+REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
REPLACE_TRUNC = @REPLACE_TRUNC@
REPLACE_TRUNCF = @REPLACE_TRUNCF@
REPLACE_TRUNCL = @REPLACE_TRUNCL@
@@ -1000,6 +1377,8 @@ STDINT_H = @STDINT_H@
STRIP = @STRIP@
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
+UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
@@ -1007,6 +1386,8 @@ VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
WERROR_CFLAGS = @WERROR_CFLAGS@
+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@
abs_aux_dir = @abs_aux_dir@
abs_builddir = @abs_builddir@
@@ -1062,12 +1443,8 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = . examples lib src doc checks tests
-syntax_check_exceptions = \
- .x-sc_prohibit_tab_based_indentation \
- .x-update-copyright
-
EXTRA_DIST = bootstrap c-boxes.el cfg.mk maint.mk \
- .prev-version .version m4/gnulib-cache.m4 $(syntax_check_exceptions)
+ .prev-version .version m4/gnulib-cache.m4
DISTCLEANFILES = stamp-h
MAINTAINERCLEANFILES = INSTALL Makefile.in aclocal.m4 \
@@ -1084,7 +1461,7 @@ all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
-am--refresh:
+am--refresh: Makefile
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
@@ -1118,26 +1495,27 @@ $(top_srcdir)/configure: $(am__configure_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
-checks/Makefile: $(top_builddir)/config.status $(top_srcdir)/checks/Makefile.in
- cd $(top_builddir) && $(SHELL) ./config.status $@
# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
@@ -1152,57 +1530,12 @@ $(RECURSIVE_TARGETS):
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-$(RECURSIVE_CLEAN_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
@@ -1218,12 +1551,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@@ -1235,15 +1563,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$unique; \
fi; \
fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@@ -1252,9 +1576,31 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscope: cscope.files
+ test ! -s cscope.files \
+ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+clean-cscope:
+ -rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+ -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
distdir: $(DISTFILES)
$(am__remove_distdir)
@@ -1290,13 +1636,10 @@ distdir: $(DISTFILES)
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(MKDIR_P) "$(distdir)/$$subdir" \
- || exit 1; \
- fi; \
- done
- @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
@@ -1328,36 +1671,40 @@ distdir: $(DISTFILES)
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-bzip2: distdir
- tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
- $(am__remove_distdir)
+ tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+ $(am__post_remove_distdir)
-dist-lzma: distdir
- tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
- $(am__remove_distdir)
+dist-lzip: distdir
+ tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+ $(am__post_remove_distdir)
dist-xz: distdir
- tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
- $(am__remove_distdir)
+ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+ $(am__post_remove_distdir)
dist-tarZ: distdir
+ @echo WARNING: "Support for shar distribution archives is" \
+ "deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-shar: distdir
+ @echo WARNING: "Support for distribution archives compressed with" \
+ "legacy program 'compress' is deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
-dist dist-all: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
- tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
- $(am__remove_distdir)
+dist dist-all:
+ $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+ $(am__post_remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
@@ -1368,8 +1715,8 @@ distcheck: dist
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
- *.tar.lzma*) \
- lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+ *.tar.lz*) \
+ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
@@ -1379,9 +1726,9 @@ distcheck: dist
*.zip*) \
unzip $(distdir).zip ;;\
esac
- chmod -R a-w $(distdir); chmod a+w $(distdir)
- mkdir $(distdir)/_build
- mkdir $(distdir)/_inst
+ chmod -R a-w $(distdir)
+ chmod u+w $(distdir)
+ mkdir $(distdir)/_build $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
@@ -1389,6 +1736,7 @@ distcheck: dist
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
@@ -1412,13 +1760,21 @@ distcheck: dist
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
- @$(am__cd) '$(distuninstallcheck_dir)' \
- && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+ @test -n '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: trying to run $@ with an empty' \
+ '$$(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ $(am__cd) '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
@@ -1451,10 +1807,15 @@ install-am: all-am
installcheck: installcheck-recursive
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
@@ -1538,15 +1899,14 @@ ps-am:
uninstall-am:
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
- ctags-recursive install install-am install-strip \
- tags-recursive
+.MAKE: $(am__recursive_targets) all check install install-am \
+ install-strip
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am am--refresh check check-am clean clean-generic \
- ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
- dist-hook dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
- distcheck distclean distclean-generic distclean-tags \
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+ am--refresh check check-am clean clean-cscope clean-generic \
+ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
+ dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \
+ dist-zip distcheck distclean distclean-generic distclean-tags \
distcleancheck distdir distuninstallcheck dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
@@ -1555,7 +1915,7 @@ uninstall-am:
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
- pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
+ pdf-am ps ps-am tags tags-am uninstall uninstall-am
$(top_srcdir)/.version:
echo $(VERSION) > $@-t && mv $@-t $@
diff --git a/NEWS b/NEWS
index ed2f114..39082b8 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,15 @@
GNU M4 NEWS - User visible changes.
+* Noteworthy changes in release 1.4.17 (2013-09-22) [stable]
+
+** Fix compilation with newer glibc headers.
+
+** Fix a failure with diverting large amounts of text on mingw (does
+ not affect platforms that can rename an open file).
+
+** A number of portability improvements inherited from gnulib.
+
+
* Noteworthy changes in release 1.4.16 (2011-03-01) [stable]
** Fix regressions in the `index' builtin. On glibc platforms, this
@@ -702,7 +712,7 @@ mode: outline
fill-column: 75
End:
-Copyright (C) 1992-1994, 2004-2011 Free Software Foundation, Inc.
+Copyright (C) 1992-1994, 2004-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
diff --git a/README b/README
index e9e2804..ed94058 100644
--- a/README
+++ b/README
@@ -66,7 +66,7 @@ note that the range specifies every single year in that closed interval.
========================================================================
-Copyright (C) 2000, 2005-2011 Free Software Foundation, Inc.
+Copyright (C) 2000, 2005-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
diff --git a/THANKS b/THANKS
index 082e7e8..71bfaf3 100644
--- a/THANKS
+++ b/THANKS
@@ -137,7 +137,7 @@ Local Variables:
coding: utf-8
End:
-Copyright (C) 2000, 2006-2011 Free Software Foundation, Inc.
+Copyright (C) 2000, 2006-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
diff --git a/TODO b/TODO
index 935fcdc..0b1d6f6 100644
--- a/TODO
+++ b/TODO
@@ -37,7 +37,7 @@ mode: outline
outline-regexp: " *[-+*.] \\| "
End:
-Copyright (C) 2000, 2006-2007, 2009-2011 Free Software Foundation, Inc.
+Copyright (C) 2000, 2006-2007, 2009-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
diff --git a/acinclude.m4 b/acinclude.m4
index 3d6d011..5d5a942 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1,5 +1,5 @@
# Local additions to Autoconf macros.
-# Copyright (C) 1992, 1994, 2004, 2006, 2008-2011 Free Software
+# Copyright (C) 1992, 1994, 2004, 2006, 2008-2013 Free Software
# Foundation, Inc.
# Francois Pinard <pinard@iro.umontreal.ca>, 1992.
#
diff --git a/aclocal.m4 b/aclocal.m4
index ebc7f97..c1a8ba6 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.14 -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -11,465 +11,16 @@
# 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.66],,
-[m4_warning([this file was generated for autoconf 2.66.
+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'.])])
-
-# po.m4 serial 17 (gettext-0.18)
-dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl This file can can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
-
-dnl Authors:
-dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
-dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
-
-AC_PREREQ([2.50])
-
-dnl Checks for all prerequisites of the po subdirectory.
-AC_DEFUN([AM_PO_SUBDIRS],
-[
- AC_REQUIRE([AC_PROG_MAKE_SET])dnl
- AC_REQUIRE([AC_PROG_INSTALL])dnl
- AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
- AC_REQUIRE([AM_NLS])dnl
-
- dnl Release version of the gettext macros. This is used to ensure that
- dnl the gettext macros and po/Makefile.in.in are in sync.
- AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
-
- dnl Perform the following tests also if --disable-nls has been given,
- dnl because they are needed for "make dist" to work.
-
- dnl Search for GNU msgfmt in the PATH.
- dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
- dnl The second test excludes FreeBSD msgfmt.
- AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
- [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
- (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
- :)
- AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
-
- dnl Test whether it is GNU msgfmt >= 0.15.
-changequote(,)dnl
- case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
- '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
- *) MSGFMT_015=$MSGFMT ;;
- esac
-changequote([,])dnl
- AC_SUBST([MSGFMT_015])
-changequote(,)dnl
- case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
- '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
- *) GMSGFMT_015=$GMSGFMT ;;
- esac
-changequote([,])dnl
- AC_SUBST([GMSGFMT_015])
-
- dnl Search for GNU xgettext 0.12 or newer in the PATH.
- dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
- dnl The second test excludes FreeBSD xgettext.
- AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
- [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
- (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
- :)
- dnl Remove leftover from FreeBSD xgettext call.
- rm -f messages.po
-
- dnl Test whether it is GNU xgettext >= 0.15.
-changequote(,)dnl
- case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
- '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
- *) XGETTEXT_015=$XGETTEXT ;;
- esac
-changequote([,])dnl
- AC_SUBST([XGETTEXT_015])
-
- dnl Search for GNU msgmerge 0.11 or newer in the PATH.
- AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
- [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
-
- dnl Installation directories.
- dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
- dnl have to define it here, so that it can be used in po/Makefile.
- test -n "$localedir" || localedir='${datadir}/locale'
- AC_SUBST([localedir])
-
- dnl Support for AM_XGETTEXT_OPTION.
- test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
- AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
-
- AC_CONFIG_COMMANDS([po-directories], [[
- for ac_file in $CONFIG_FILES; do
- # Support "outfile[:infile[:infile...]]"
- case "$ac_file" in
- *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- esac
- # PO directories have a Makefile.in generated from Makefile.in.in.
- case "$ac_file" in */Makefile.in)
- # Adjust a relative srcdir.
- ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
- ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
- ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
- # In autoconf-2.13 it is called $ac_given_srcdir.
- # In autoconf-2.50 it is called $srcdir.
- test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
- case "$ac_given_srcdir" in
- .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
- /*) top_srcdir="$ac_given_srcdir" ;;
- *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
- # Treat a directory as a PO directory if and only if it has a
- # POTFILES.in file. This allows packages to have multiple PO
- # directories under different names or in different locations.
- if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
- rm -f "$ac_dir/POTFILES"
- test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
- cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
- POMAKEFILEDEPS="POTFILES.in"
- # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
- # on $ac_dir but don't depend on user-specified configuration
- # parameters.
- if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
- # The LINGUAS file contains the set of available languages.
- if test -n "$OBSOLETE_ALL_LINGUAS"; then
- test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
- fi
- ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
- # Hide the ALL_LINGUAS assigment from automake < 1.5.
- eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
- POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
- else
- # The set of available languages was given in configure.in.
- # Hide the ALL_LINGUAS assigment from automake < 1.5.
- eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
- fi
- # Compute POFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
- # Compute UPDATEPOFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
- # Compute DUMMYPOFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
- # Compute GMOFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
- case "$ac_given_srcdir" in
- .) srcdirpre= ;;
- *) srcdirpre='$(srcdir)/' ;;
- esac
- POFILES=
- UPDATEPOFILES=
- DUMMYPOFILES=
- GMOFILES=
- for lang in $ALL_LINGUAS; do
- POFILES="$POFILES $srcdirpre$lang.po"
- UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
- DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
- GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
- done
- # CATALOGS depends on both $ac_dir and the user's LINGUAS
- # environment variable.
- INST_LINGUAS=
- if test -n "$ALL_LINGUAS"; then
- for presentlang in $ALL_LINGUAS; do
- useit=no
- if test "%UNSET%" != "$LINGUAS"; then
- desiredlanguages="$LINGUAS"
- else
- desiredlanguages="$ALL_LINGUAS"
- fi
- for desiredlang in $desiredlanguages; do
- # Use the presentlang catalog if desiredlang is
- # a. equal to presentlang, or
- # b. a variant of presentlang (because in this case,
- # presentlang can be used as a fallback for messages
- # which are not translated in the desiredlang catalog).
- case "$desiredlang" in
- "$presentlang"*) useit=yes;;
- esac
- done
- if test $useit = yes; then
- INST_LINGUAS="$INST_LINGUAS $presentlang"
- fi
- done
- fi
- CATALOGS=
- if test -n "$INST_LINGUAS"; then
- for lang in $INST_LINGUAS; do
- CATALOGS="$CATALOGS $lang.gmo"
- done
- fi
- test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
- sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
- for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
- if test -f "$f"; then
- case "$f" in
- *.orig | *.bak | *~) ;;
- *) cat "$f" >> "$ac_dir/Makefile" ;;
- esac
- fi
- done
- fi
- ;;
- esac
- done]],
- [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
- # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
- # from automake < 1.5.
- eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
- # Capture the value of LINGUAS because we need it to compute CATALOGS.
- LINGUAS="${LINGUAS-%UNSET%}"
- ])
-])
-
-dnl Postprocesses a Makefile in a directory containing PO files.
-AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
-[
- # When this code is run, in config.status, two variables have already been
- # set:
- # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
- # - LINGUAS is the value of the environment variable LINGUAS at configure
- # time.
-
-changequote(,)dnl
- # Adjust a relative srcdir.
- ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
- ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
- ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
- # In autoconf-2.13 it is called $ac_given_srcdir.
- # In autoconf-2.50 it is called $srcdir.
- test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
- case "$ac_given_srcdir" in
- .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
- /*) top_srcdir="$ac_given_srcdir" ;;
- *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
- # Find a way to echo strings without interpreting backslash.
- if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
- gt_echo='echo'
- else
- if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
- gt_echo='printf %s\n'
- else
- echo_func () {
- cat <<EOT
-$*
-EOT
- }
- gt_echo='echo_func'
- fi
- fi
-
- # A sed script that extracts the value of VARIABLE from a Makefile.
- sed_x_variable='
-# Test if the hold space is empty.
-x
-s/P/P/
-x
-ta
-# Yes it was empty. Look if we have the expected variable definition.
-/^[ ]*VARIABLE[ ]*=/{
- # Seen the first line of the variable definition.
- s/^[ ]*VARIABLE[ ]*=//
- ba
-}
-bd
-:a
-# Here we are processing a line from the variable definition.
-# Remove comment, more precisely replace it with a space.
-s/#.*$/ /
-# See if the line ends in a backslash.
-tb
-:b
-s/\\$//
-# Print the line, without the trailing backslash.
-p
-tc
-# There was no trailing backslash. The end of the variable definition is
-# reached. Clear the hold space.
-s/^.*$//
-x
-bd
-:c
-# A trailing backslash means that the variable definition continues in the
-# next line. Put a nonempty string into the hold space to indicate this.
-s/^.*$/P/
-x
-:d
-'
-changequote([,])dnl
-
- # Set POTFILES to the value of the Makefile variable POTFILES.
- sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
- POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
- # Compute POTFILES_DEPS as
- # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
- POTFILES_DEPS=
- for file in $POTFILES; do
- POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
- done
- POMAKEFILEDEPS=""
-
- if test -n "$OBSOLETE_ALL_LINGUAS"; then
- test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
- fi
- if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
- # The LINGUAS file contains the set of available languages.
- ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
- POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
- else
- # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
- sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
- ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
- fi
- # Hide the ALL_LINGUAS assigment from automake < 1.5.
- eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
- # Compute POFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
- # Compute UPDATEPOFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
- # Compute DUMMYPOFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
- # Compute GMOFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
- # Compute PROPERTIESFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
- # Compute CLASSFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
- # Compute QMFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
- # Compute MSGFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
- # Compute RESOURCESDLLFILES
- # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
- case "$ac_given_srcdir" in
- .) srcdirpre= ;;
- *) srcdirpre='$(srcdir)/' ;;
- esac
- POFILES=
- UPDATEPOFILES=
- DUMMYPOFILES=
- GMOFILES=
- PROPERTIESFILES=
- CLASSFILES=
- QMFILES=
- MSGFILES=
- RESOURCESDLLFILES=
- for lang in $ALL_LINGUAS; do
- POFILES="$POFILES $srcdirpre$lang.po"
- UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
- DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
- GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
- PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
- CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
- QMFILES="$QMFILES $srcdirpre$lang.qm"
- frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
- MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
- frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
- RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
- done
- # CATALOGS depends on both $ac_dir and the user's LINGUAS
- # environment variable.
- INST_LINGUAS=
- if test -n "$ALL_LINGUAS"; then
- for presentlang in $ALL_LINGUAS; do
- useit=no
- if test "%UNSET%" != "$LINGUAS"; then
- desiredlanguages="$LINGUAS"
- else
- desiredlanguages="$ALL_LINGUAS"
- fi
- for desiredlang in $desiredlanguages; do
- # Use the presentlang catalog if desiredlang is
- # a. equal to presentlang, or
- # b. a variant of presentlang (because in this case,
- # presentlang can be used as a fallback for messages
- # which are not translated in the desiredlang catalog).
- case "$desiredlang" in
- "$presentlang"*) useit=yes;;
- esac
- done
- if test $useit = yes; then
- INST_LINGUAS="$INST_LINGUAS $presentlang"
- fi
- done
- fi
- CATALOGS=
- JAVACATALOGS=
- QTCATALOGS=
- TCLCATALOGS=
- CSHARPCATALOGS=
- if test -n "$INST_LINGUAS"; then
- for lang in $INST_LINGUAS; do
- CATALOGS="$CATALOGS $lang.gmo"
- JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
- QTCATALOGS="$QTCATALOGS $lang.qm"
- frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
- TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
- frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
- CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
- done
- fi
-
- sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
- if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
- # Add dependencies that cannot be formulated as a simple suffix rule.
- for lang in $ALL_LINGUAS; do
- frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
- cat >> "$ac_file.tmp" <<EOF
-$frobbedlang.msg: $lang.po
- @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
- \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
-EOF
- done
- fi
- if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
- # Add dependencies that cannot be formulated as a simple suffix rule.
- for lang in $ALL_LINGUAS; do
- frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
- cat >> "$ac_file.tmp" <<EOF
-$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
- @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
- \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
-EOF
- done
- fi
- if test -n "$POMAKEFILEDEPS"; then
- cat >> "$ac_file.tmp" <<EOF
-Makefile: $POMAKEFILEDEPS
-EOF
- fi
- mv "$ac_file.tmp" "$ac_file"
-])
-
-dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
-AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
-[
- XGETTEXT_EXTRA_OPTIONS=
-])
-
-dnl Registers an option to be passed to xgettext in the po subdirectory.
-AC_DEFUN([AM_XGETTEXT_OPTION],
-[
- AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
- XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
-])
+To do so, use the procedure documented by the package, typically 'autoreconf'.])])
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -481,10 +32,10 @@ AC_DEFUN([AM_XGETTEXT_OPTION],
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.11'
+[am__api_version='1.14'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.11.1], [],
+m4_if([$1], [1.14], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -500,22 +51,22 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11.1])dnl
+[AM_AUTOMAKE_VERSION([1.14])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
+# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
#
# Of course, Automake must honor this variable whenever it calls a
# tool from the auxiliary directory. The problem is that $srcdir (and
@@ -534,7 +85,7 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
#
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
# are both prefixed by $srcdir. In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
+# harmless because $srcdir is '.', but things will broke when you
# start a VPATH build or use an absolute $srcdir.
#
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
@@ -560,22 +111,19 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 9
-
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
# Define a conditional.
AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
- [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+[AC_PREREQ([2.52])dnl
+ m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
AC_SUBST([$1_TRUE])dnl
AC_SUBST([$1_FALSE])dnl
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
@@ -594,16 +142,14 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
-# Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 10
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
# will think it sees a *use*, and therefore will trigger all it's
# C support machinery. Also note that it means that autoscan, seeing
@@ -613,7 +159,7 @@ fi])])
# _AM_DEPENDENCIES(NAME)
# ----------------------
# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
# We try a few techniques and use that to set a single cache variable.
#
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
@@ -626,12 +172,13 @@ AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
AC_REQUIRE([AM_DEP_TRACK])dnl
-ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
- [$1], CXX, [depcc="$CXX" am_compiler_list=],
- [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
- [$1], UPC, [depcc="$UPC" am_compiler_list=],
- [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
- [depcc="$$1" am_compiler_list=])
+m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
+ [$1], [CXX], [depcc="$CXX" am_compiler_list=],
+ [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
+ [$1], [UPC], [depcc="$UPC" am_compiler_list=],
+ [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
AC_CACHE_CHECK([dependency style of $depcc],
[am_cv_$1_dependencies_compiler_type],
@@ -639,8 +186,9 @@ AC_CACHE_CHECK([dependency style of $depcc],
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
@@ -679,16 +227,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this. Also, some Intel
- # versions had trouble with output in subdirs
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
am__obj=sub/conftest.${OBJEXT-o}
am__minus_obj="-o $am__obj"
case $depmode in
@@ -697,16 +245,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
test "$am__universal" = false || continue
;;
nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
- msvisualcpp | msvcmsys)
- # This compiler won't grok `-c -o', but also, the minuso test has
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
am__obj=conftest.${OBJEXT-o}
@@ -754,7 +302,7 @@ AM_CONDITIONAL([am__fastdep$1], [
# AM_SET_DEPDIR
# -------------
# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
AC_DEFUN([AM_SET_DEPDIR],
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
@@ -764,34 +312,39 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
# AM_DEP_TRACK
# ------------
AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[ --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors])
+[AC_ARG_ENABLE([dependency-tracking], [dnl
+AS_HELP_STRING(
+ [--enable-dependency-tracking],
+ [do not reject slow dependency extractors])
+AS_HELP_STRING(
+ [--disable-dependency-tracking],
+ [speeds up one-time build])])
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
+ am__nodep='_no'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
AC_SUBST([AMDEPBACKSLASH])dnl
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
])
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-#serial 5
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
[{
- # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # Older Autoconf quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
case $CONFIG_FILES in
@@ -804,7 +357,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named `Makefile.in', but
+ # We used to match only the files named 'Makefile.in', but
# some people rename them; so instead we look at the file content.
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
@@ -816,21 +369,19 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
continue
fi
# Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
+ # from the Makefile without running 'make'.
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
+ test -z "$am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
# simplest approach to changing $(DEPDIR) to its actual value in the
# expansion.
for file in `sed -n "
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`AS_DIRNAME(["$file"])`
@@ -848,7 +399,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# This macro should only be invoked once -- use via AC_REQUIRE.
#
# This code is only required when automatic dependency tracking
-# is enabled. FIXME. This creates each `.P' file that we will
+# is enabled. FIXME. This creates each '.P' file that we will
# need in order to bootstrap the dependency handling code.
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AC_CONFIG_COMMANDS([depfiles],
@@ -858,18 +409,21 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 16
-
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
+m4_define([AC_PROG_CC],
+m4_defn([AC_PROG_CC])
+[_AM_PROG_CC_C_O
+])
+
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
@@ -882,7 +436,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# arguments mandatory, and then we can depend on a new Autoconf
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.62])dnl
+[AC_PREREQ([2.65])dnl
dnl Autoconf wants to disallow AM_ names. We explicitly allow
dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
@@ -911,31 +465,40 @@ AC_SUBST([CYGPATH_W])
# Define the identity of the package.
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+[AC_DIAGNOSE([obsolete],
+ [$0: two- and three-arguments forms are deprecated.])
+m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
-m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+m4_if(
+ m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+ [ok:ok],,
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
# Some tools Automake needs.
AC_REQUIRE([AM_SANITY_CHECK])dnl
AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+AM_MISSING_PROG([AUTOCONF], [autoconf])
+AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+AM_MISSING_PROG([AUTOHEADER], [autoheader])
+AM_MISSING_PROG([MAKEINFO], [makeinfo])
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+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
@@ -946,34 +509,78 @@ _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
[_AM_PROG_TAR([v7])])])
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
- [_AM_DEPENDENCIES(CC)],
- [define([AC_PROG_CC],
- defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+ [_AM_DEPENDENCIES([CC])],
+ [m4_define([AC_PROG_CC],
+ m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [_AM_DEPENDENCIES(CXX)],
- [define([AC_PROG_CXX],
- defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+ [_AM_DEPENDENCIES([CXX])],
+ [m4_define([AC_PROG_CXX],
+ m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
- [_AM_DEPENDENCIES(OBJC)],
- [define([AC_PROG_OBJC],
- defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+ [_AM_DEPENDENCIES([OBJC])],
+ [m4_define([AC_PROG_OBJC],
+ m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+ [_AM_DEPENDENCIES([OBJCXX])],
+ [m4_define([AC_PROG_OBJCXX],
+ m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
])
-_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
-dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
-dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
-dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
+dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
-])
-dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+ fi
+fi])
+
+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.
@@ -995,7 +602,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1014,16 +621,14 @@ if test x"${install_sh}" != xset; then
install_sh="\${SHELL} $am_aux_dir/install-sh"
esac
fi
-AC_SUBST(install_sh)])
+AC_SUBST([install_sh])])
-# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2003-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 2
-
# Check whether the underlying file-system supports filenames
# with a leading dot. For instance MS-DOS doesn't.
AC_DEFUN([AM_SET_LEADING_DOT],
@@ -1039,14 +644,12 @@ AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 4
-
# AM_MAKE_INCLUDE()
# -----------------
# Check to see how make treats includes.
@@ -1064,7 +667,7 @@ am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
+# Ignore all kinds of additional output from 'make'.
case `$am_make -s -f confmf 2> /dev/null` in #(
*the\ am__doit\ target*)
am__include=include
@@ -1089,52 +692,14 @@ AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
-# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 6
-
-# AM_PROG_CC_C_O
-# --------------
-# Like AC_PROG_CC_C_O, but changed for automake.
-AC_DEFUN([AM_PROG_CC_C_O],
-[AC_REQUIRE([AC_PROG_CC_C_O])dnl
-AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([compile])dnl
-# FIXME: we rely on the cache variable name because
-# there is no other way.
-set dummy $CC
-am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
-eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
-if test "$am_t" != yes; then
- # Losing compiler, so override with the script.
- # FIXME: It is wrong to rewrite CC.
- # But if we don't then we get into trouble of one sort or another.
- # A longer-term fix would be to have automake use am__CC in this case,
- # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
- CC="$am_aux_dir/compile $CC"
-fi
-dnl Make sure AC_PROG_CC is never called again, or it will override our
-dnl setting of CC.
-m4_define([AC_PROG_CC],
- [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
-])
-
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 6
-
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
AC_DEFUN([AM_MISSING_PROG],
@@ -1142,11 +707,10 @@ AC_DEFUN([AM_MISSING_PROG],
$1=${$1-"${am_missing_run}$2"}
AC_SUBST($1)])
-
# AM_MISSING_HAS_RUN
# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
+# Define MISSING if not defined so far and test if it is modern enough.
+# If it is, set am_missing_run to use it, otherwise, to nothing.
AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([missing])dnl
@@ -1159,63 +723,35 @@ if test x"${MISSING+set}" != xset; then
esac
fi
# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
else
am_missing_run=
- AC_MSG_WARN([`missing' script is too old or missing])
+ AC_MSG_WARN(['missing' script is too old or missing])
fi
])
-# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_PROG_MKDIR_P
-# ---------------
-# Check for `mkdir -p'.
-AC_DEFUN([AM_PROG_MKDIR_P],
-[AC_PREREQ([2.60])dnl
-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
-dnl while keeping a definition of mkdir_p for backward compatibility.
-dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
-dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
-dnl Makefile.ins that do not define MKDIR_P, so we do our own
-dnl adjustment using top_builddir (which is defined more often than
-dnl MKDIR_P).
-AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
-case $mkdir_p in
- [[\\/$]]* | ?:[[\\/]]*) ;;
- */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-])
-
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 4
-
# _AM_MANGLE_OPTION(NAME)
# -----------------------
AC_DEFUN([_AM_MANGLE_OPTION],
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
# _AM_SET_OPTION(NAME)
-# ------------------------------
+# --------------------
# Set option NAME. Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
+# ------------------------
# OPTIONS is a space-separated list of Automake options.
AC_DEFUN([_AM_SET_OPTIONS],
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
@@ -1226,24 +762,82 @@ AC_DEFUN([_AM_SET_OPTIONS],
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) 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_PROG_CC_C_O
+# ---------------
+# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
+# to automatically call this.
+AC_DEFUN([_AM_PROG_CC_C_O],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+AC_LANG_PUSH([C])dnl
+AC_CACHE_CHECK(
+ [whether $CC understands -c and -o together],
+ [am_cv_prog_cc_c_o],
+ [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i])
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+AC_LANG_POP([C])])
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
-# Free Software Foundation, Inc.
+# For backward compatibility.
+AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
+
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 5
+# AM_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+ ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ (exit $ac_status); }])
+
+# 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])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
@@ -1254,32 +848,40 @@ case `pwd` in
esac
case $srcdir in
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
- AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+ AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
esac
-# Do `set' in a subshell so we don't clobber the current shell's
+# Do 'set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
- set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
- if test "$[*]" = "X"; then
- # -L didn't work.
- set X `ls -t "$srcdir/configure" conftest.file`
- fi
- rm -f conftest.file
- if test "$[*]" != "X $srcdir/configure conftest.file" \
- && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+ alias in your environment])
+ fi
+ if test "$[2]" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
test "$[2]" = conftest.file
)
then
@@ -1289,36 +891,85 @@ else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
-AC_MSG_RESULT(yes)])
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+ [AC_MSG_CHECKING([that generated files are newer than configure])
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 1
-
# AM_SILENT_RULES([DEFAULT])
# --------------------------
# Enable less verbose build rules; with the default set to DEFAULT
-# (`yes' being less verbose, `no' or empty being verbose).
+# ("yes" being less verbose, "no" or empty being verbose).
AC_DEFUN([AM_SILENT_RULES],
-[AC_ARG_ENABLE([silent-rules],
-[ --enable-silent-rules less verbose build output (undo: `make V=1')
- --disable-silent-rules verbose build output (undo: `make V=0')])
-case $enable_silent_rules in
-yes) AM_DEFAULT_VERBOSITY=0;;
-no) AM_DEFAULT_VERBOSITY=1;;
-*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+[AC_ARG_ENABLE([silent-rules], [dnl
+AS_HELP_STRING(
+ [--enable-silent-rules],
+ [less verbose build output (undo: "make V=1")])
+AS_HELP_STRING(
+ [--disable-silent-rules],
+ [verbose build output (undo: "make V=0")])dnl
+])
+case $enable_silent_rules in @%:@ (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
esac
+dnl
+dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+ [am_cv_make_support_nested_variables],
+ [if AS_ECHO([['TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi])
+if test $am_cv_make_support_nested_variables = yes; then
+ dnl Using '$V' instead of '$(V)' breaks IRIX make.
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
AM_BACKSLASH='\'
AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1326,34 +977,32 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
# AM_PROG_INSTALL_STRIP
# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
+# One issue with vendor 'install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip
# is unlikely to handle the host's binaries.
# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
+# always use install-sh in "make install-strip", and initialize
# STRIPPROG with the value of the STRIP variable (set by the user).
AC_DEFUN([AM_PROG_INSTALL_STRIP],
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+# will honor the 'STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
if test "$cross_compiling" != no; then
AC_CHECK_TOOL([STRIP], [strip], :)
fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2006-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 2
-
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
@@ -1361,24 +1010,22 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
AC_DEFUN([_AM_SUBST_NOTMAKE])
# AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
+# --------------------------
# Public sister of _AM_SUBST_NOTMAKE.
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2004-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 2
-
# _AM_PROG_TAR(FORMAT)
# --------------------
# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
+# FORMAT should be one of 'v7', 'ustar', or 'pax'.
#
# Substitute a variable $(am__tar) that is a command
# writing to stdout a FORMAT-tarball containing the directory
@@ -1388,75 +1035,114 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Substitute a variable $(am__untar) that extract such
# a tarball read from stdin.
# $(am__untar) < result.tar
+#
AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
-m4_if([$1], [v7],
- [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
- [m4_case([$1], [ustar],, [pax],,
- [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+
+# We'll loop over all known methods to create a tar archive until one works.
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
- case $_am_tool in
- gnutar)
- for _am_tar in tar gnutar gtar;
- do
- AM_RUN_LOG([$_am_tar --version]) && break
- done
- am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
- am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
- am__untar="$_am_tar -xf -"
- ;;
- plaintar)
- # Must skip GNU tar: if it does not support --format= it doesn't create
- # ustar tarball either.
- (tar --version) >/dev/null 2>&1 && continue
- am__tar='tar chf - "$$tardir"'
- am__tar_='tar chf - "$tardir"'
- am__untar='tar xf -'
- ;;
- pax)
- am__tar='pax -L -x $1 -w "$$tardir"'
- am__tar_='pax -L -x $1 -w "$tardir"'
- am__untar='pax -r'
- ;;
- cpio)
- am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
- am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
- am__untar='cpio -i -H $1 -d'
- ;;
- none)
- am__tar=false
- am__tar_=false
- am__untar=false
- ;;
- esac
- # If the value was cached, stop now. We just wanted to have am__tar
- # and am__untar set.
- test -n "${am_cv_prog_tar_$1}" && break
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+
+ [m4_case([$1],
+ [ustar],
+ [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+ # There is notably a 21 bits limit for the UID and the GID. In fact,
+ # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+ # and bug#13588).
+ am_max_uid=2097151 # 2^21 - 1
+ am_max_gid=$am_max_uid
+ # The $UID and $GID variables are not portable, so we need to resort
+ # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
+ # below are definitely unexpected, so allow the users to see them
+ # (that is, avoid stderr redirection).
+ am_uid=`id -u || echo unknown`
+ am_gid=`id -g || echo unknown`
+ AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+ if test $am_uid -le $am_max_uid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi
+ AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+ if test $am_gid -le $am_max_gid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi],
+
+ [pax],
+ [],
- # tar/untar a dummy directory, and stop if the command works
- rm -rf conftest.dir
- mkdir conftest.dir
- echo GrepMe > conftest.dir/file
- AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ [m4_fatal([Unknown tar format])])
+
+ AC_MSG_CHECKING([how to create a $1 tar archive])
+
+ # Go ahead even if we have the value already cached. We do so because we
+ # need to set the values for the 'am__tar' and 'am__untar' variables.
+ _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+ for _am_tool in $_am_tools; do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar; do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ AM_RUN_LOG([cat conftest.dir/file])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+ done
rm -rf conftest.dir
- if test -s conftest.tar; then
- AM_RUN_LOG([$am__untar <conftest.tar])
- grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
- fi
-done
-rm -rf conftest.dir
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+ AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+ AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+
AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
@@ -1464,21 +1150,24 @@ AC_SUBST([am__untar])
m4_include([m4/00gnulib.m4])
m4_include([m4/alloca.m4])
m4_include([m4/ansi-c++.m4])
+m4_include([m4/asm-underscore.m4])
m4_include([m4/assert.m4])
m4_include([m4/autobuild.m4])
m4_include([m4/btowc.m4])
m4_include([m4/c-stack.m4])
m4_include([m4/canonicalize.m4])
-m4_include([m4/cloexec.m4])
m4_include([m4/close-stream.m4])
m4_include([m4/close.m4])
+m4_include([m4/closedir.m4])
m4_include([m4/closein.m4])
m4_include([m4/closeout.m4])
m4_include([m4/codeset.m4])
m4_include([m4/config-h.m4])
m4_include([m4/configmake.m4])
+m4_include([m4/dirent_h.m4])
m4_include([m4/dirname.m4])
m4_include([m4/double-slash-root.m4])
+m4_include([m4/dup.m4])
m4_include([m4/dup2.m4])
m4_include([m4/eealloc.m4])
m4_include([m4/environ.m4])
@@ -1489,11 +1178,13 @@ m4_include([m4/exponentd.m4])
m4_include([m4/exponentf.m4])
m4_include([m4/exponentl.m4])
m4_include([m4/extensions.m4])
+m4_include([m4/extern-inline.m4])
m4_include([m4/fatal-signal.m4])
m4_include([m4/fclose.m4])
m4_include([m4/fcntl-o.m4])
m4_include([m4/fcntl.m4])
m4_include([m4/fcntl_h.m4])
+m4_include([m4/fdopen.m4])
m4_include([m4/fflush.m4])
m4_include([m4/filenamecat.m4])
m4_include([m4/float_h.m4])
@@ -1501,29 +1192,34 @@ m4_include([m4/fopen.m4])
m4_include([m4/fpending.m4])
m4_include([m4/fpieee.m4])
m4_include([m4/fpurge.m4])
+m4_include([m4/freadahead.m4])
m4_include([m4/freading.m4])
m4_include([m4/frexp.m4])
m4_include([m4/frexpl.m4])
+m4_include([m4/fseek.m4])
m4_include([m4/fseeko.m4])
+m4_include([m4/fstat.m4])
m4_include([m4/ftell.m4])
m4_include([m4/ftello.m4])
+m4_include([m4/getcwd.m4])
m4_include([m4/getdtablesize.m4])
m4_include([m4/getopt.m4])
m4_include([m4/getpagesize.m4])
m4_include([m4/gettimeofday.m4])
-m4_include([m4/gl_list.m4])
m4_include([m4/glibc21.m4])
m4_include([m4/gnulib-common.m4])
m4_include([m4/gnulib-comp.m4])
m4_include([m4/include_next.m4])
-m4_include([m4/inline.m4])
m4_include([m4/intlmacosx.m4])
m4_include([m4/intmax_t.m4])
+m4_include([m4/inttypes-pri.m4])
+m4_include([m4/inttypes.m4])
m4_include([m4/inttypes_h.m4])
m4_include([m4/isnand.m4])
m4_include([m4/isnanf.m4])
m4_include([m4/isnanl.m4])
m4_include([m4/langinfo_h.m4])
+m4_include([m4/largefile.m4])
m4_include([m4/lcmessage.m4])
m4_include([m4/ldexp.m4])
m4_include([m4/ldexpl.m4])
@@ -1538,6 +1234,7 @@ m4_include([m4/locale-ja.m4])
m4_include([m4/locale-tr.m4])
m4_include([m4/locale-zh.m4])
m4_include([m4/locale_h.m4])
+m4_include([m4/localeconv.m4])
m4_include([m4/localename.m4])
m4_include([m4/lock.m4])
m4_include([m4/longlong.m4])
@@ -1556,10 +1253,14 @@ m4_include([m4/mkdtemp.m4])
m4_include([m4/mkstemp.m4])
m4_include([m4/mmap-anon.m4])
m4_include([m4/mode_t.m4])
+m4_include([m4/msvc-inval.m4])
+m4_include([m4/msvc-nothrow.m4])
m4_include([m4/multiarch.m4])
m4_include([m4/nl_langinfo.m4])
m4_include([m4/nocrash.m4])
+m4_include([m4/off_t.m4])
m4_include([m4/open.m4])
+m4_include([m4/opendir.m4])
m4_include([m4/pathmax.m4])
m4_include([m4/pipe2.m4])
m4_include([m4/posix_spawn.m4])
@@ -1568,12 +1269,15 @@ m4_include([m4/printf-frexpl.m4])
m4_include([m4/printf.m4])
m4_include([m4/putenv.m4])
m4_include([m4/quotearg.m4])
+m4_include([m4/raise.m4])
m4_include([m4/rawmemchr.m4])
+m4_include([m4/readdir.m4])
m4_include([m4/readlink.m4])
m4_include([m4/regex.m4])
m4_include([m4/rename.m4])
m4_include([m4/rmdir.m4])
m4_include([m4/sched_h.m4])
+m4_include([m4/secure_getenv.m4])
m4_include([m4/setenv.m4])
m4_include([m4/setlocale.m4])
m4_include([m4/sig_atomic_t.m4])
@@ -1581,7 +1285,9 @@ m4_include([m4/sigaction.m4])
m4_include([m4/signal_h.m4])
m4_include([m4/signalblocking.m4])
m4_include([m4/signbit.m4])
+m4_include([m4/sigpipe.m4])
m4_include([m4/size_max.m4])
+m4_include([m4/sleep.m4])
m4_include([m4/snprintf.m4])
m4_include([m4/spawn-pipe.m4])
m4_include([m4/spawn_h.m4])
@@ -1592,9 +1298,7 @@ m4_include([m4/stdbool.m4])
m4_include([m4/stddef_h.m4])
m4_include([m4/stdint.m4])
m4_include([m4/stdint_h.m4])
-m4_include([m4/stdio-safer.m4])
m4_include([m4/stdio_h.m4])
-m4_include([m4/stdlib-safer.m4])
m4_include([m4/stdlib_h.m4])
m4_include([m4/strchrnul.m4])
m4_include([m4/strdup.m4])
@@ -1605,10 +1309,11 @@ m4_include([m4/strnlen.m4])
m4_include([m4/strsignal.m4])
m4_include([m4/strstr.m4])
m4_include([m4/strtod.m4])
-m4_include([m4/strtol.m4])
m4_include([m4/symlink.m4])
+m4_include([m4/sys_socket_h.m4])
m4_include([m4/sys_stat_h.m4])
m4_include([m4/sys_time_h.m4])
+m4_include([m4/sys_types_h.m4])
m4_include([m4/sys_wait_h.m4])
m4_include([m4/tempname.m4])
m4_include([m4/threadlib.m4])
@@ -1633,6 +1338,7 @@ m4_include([m4/wctob.m4])
m4_include([m4/wctomb.m4])
m4_include([m4/wctype_h.m4])
m4_include([m4/wint_t.m4])
+m4_include([m4/write.m4])
m4_include([m4/xalloc.m4])
m4_include([m4/xsize.m4])
m4_include([m4/xstrndup.m4])
diff --git a/bootstrap b/bootstrap
index d4cf385..e123a8b 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,312 +1,4911 @@
#! /bin/sh
-# bootstrap (GNU M4) version 2010-03-02
-# Written by Gary V. Vaughan <gary@gnu.org>
+# Bootstrap an Autotooled package from checked-out sources.
+# Written by Gary V. Vaughan, 2010
-# Copyright (C) 2004-2011 Free Software Foundation, Inc.
+# Copyright (C) 2010-2013 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.
-# This file is part of GNU M4.
-#
-# GNU M4 is free software: you can redistribute it and/or modify
+# Source required external libraries:
+# Set a version string for this script.
+scriptversion=2013-08-23.20; # UTC
+
+# General shell script boiler plate, and helper functions.
+# Written by Gary V. Vaughan, 2004
+
+# Copyright (C) 2004-2013 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.
+
+# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
-#
-# GNU M4 is distributed in the hope that it will be useful,
+
+# 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.
+
+# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
+# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Please report bugs or propose patches to gary@gnu.org.
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Evaluate this file near the top of your script to gain access to
+# the functions and variables defined here:
+#
+# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh
+#
+# If you need to override any of the default environment variable
+# settings, do that before evaluating this file.
+
+
+## -------------------- ##
+## Shell normalisation. ##
+## -------------------- ##
+
+# Some shells need a little help to be as Bourne compatible as possible.
+# Before doing anything else, make sure all that help has been provided!
+
+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
+
+# NLS nuisances: We save the old values in case they are required later.
+_G_user_locale=
+_G_safe_locale=
+for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test set = \"\${$_G_var+set}\"; then
+ save_$_G_var=\$$_G_var
+ $_G_var=C
+ export $_G_var
+ _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\"
+ _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
+ fi"
+done
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Make sure IFS has a sensible default
+sp=' '
+nl='
+'
+IFS="$sp $nl"
+
+# There are still modern systems that have problems with 'echo' mis-
+# handling backslashes, among others, so make sure $bs_echo is set to a
+# command that correctly interprets backslashes.
+# (this code from Autoconf 2.68)
+
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+bs_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+bs_echo=$bs_echo$bs_echo$bs_echo$bs_echo$bs_echo
+bs_echo=$bs_echo$bs_echo$bs_echo$bs_echo$bs_echo$bs_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 -- $bs_echo`" = "X$bs_echo") 2>/dev/null; then
+ bs_echo='print -r --'
+ bs_echo_n='print -rn --'
+elif (test "X`printf %s $bs_echo`" = "X$bs_echo") 2>/dev/null; then
+ bs_echo='printf %s\n'
+ bs_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $bs_echo) 2>/dev/null`" = "X-n $bs_echo"; then
+ bs_echo_body='eval /usr/ucb/echo -n "$1$nl"'
+ bs_echo_n='/usr/ucb/echo -n'
+ else
+ bs_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ bs_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$nl"*)
+ expr "X$arg" : "X\\(.*\\)$nl";
+ arg=`expr "X$arg" : ".*$nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$nl"
+ '
+ export bs_echo_n_body
+ bs_echo_n='sh -c $bs_echo_n_body bs_echo'
+ fi
+ export bs_echo_body
+ bs_echo='sh -c $bs_echo_body bs_echo'
+fi
+
+
+## ------------------------------- ##
+## User overridable command paths. ##
+## ------------------------------- ##
+
+# All uppercase variable names are used for environment variables. These
+# variables can be overridden by the user before calling a script that
+# uses them if a suitable command of that name is not already available
+# in the command search PATH.
+
+: ${CP="cp -f"}
+: ${ECHO="$bs_echo"}
+: ${EGREP="grep -E"}
+: ${FGREP="grep -F"}
+: ${GREP="grep"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SED="sed"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+
+
+## -------------------- ##
+## Useful sed snippets. ##
+## -------------------- ##
+
+sed_dirname='s|/[^/]*$||'
+sed_basename='s|^.*/||'
-# Usage: $progname [options]
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s|\([`"$\\]\)|\\\1|g'
-# -f --force bootstrap even when sources are not from git
-# --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. Defaults to $GNULIB_SRCDIR.
-# -v --version print version information
-# -h,-? --help print short or long help message
+# Same as above, but do not quote variable references.
+sed_double_quote_subst='s/\(["`\\]\)/\\\1/g'
-# You can also set the following variables to help $progname
-# locate the right tools:
-# AUTORECONF, CONFIG_SHELL, GNULIB_SRCDIR, M4, RM, SED
+# Sed substitution that turns a string into a regex matching for the
+# string literally.
+sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g'
-# This script bootstraps a git checkout of GNU M4 by correctly calling
-# out to parts of the GNU Build Platform. See HACKING for a list of
-# prerequisite tools and versions required. If you are re-running
-# bootstrap on a release tarball rather than using a git checkout,
-# then see the release announcement for the prerequisite tools used.
+# Sed substitution that converts a w32 file name or path
+# that contains forward slashes, into one that contains
+# (escaped) backslashes. A very naive implementation.
+sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
-# Report bugs to <bug-m4@gnu.org>
+# Re-'\' parameter expansions in output of sed_double_quote_subst that
+# were '\'-ed in input to the same. If an odd number of '\' preceded a
+# '$' in input to sed_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 '$'.
+_G_bs='\\'
+_G_bs2='\\\\'
+_G_bs4='\\\\\\\\'
+_G_dollar='\$'
+sed_double_backslash="\
+ s/$_G_bs4/&\\
+/g
+ s/^$_G_bs2$_G_dollar/$_G_bs&/
+ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
+ s/\n//g"
-: ${AUTORECONF=autoreconf}
-: ${CONFIG_SHELL=/bin/sh}
-: ${RM='rm -f'}
-: ${SED=sed}
-# Ensure file names are sorted consistently across platforms.
-LC_ALL=C
-export LC_ALL
+## ----------------- ##
+## Global variables. ##
+## ----------------- ##
-config_macro_dir=m4
+# Except for the global variables explicitly listed below, the following
+# functions in the '^func_' namespace, and the '^require_' namespace
+# variables initialised in the 'Resource management' section, sourcing
+# this file will not pollute your global namespace with anything
+# else. There's no portable way to scope variables in Bourne shell
+# though, so actually running these functions will sometimes place
+# results into a variable named after the function, and often use
+# temporary variables in the '^_G_' namespace. If you are careful to
+# avoid using those namespaces casually in your sourcing script, things
+# should continue to work as you expect. And, of course, you can freely
+# overwrite any of the functions or variables defined here before
+# calling anything to customize them.
-dirname="s,/[^/]*$,,"
-basename="s,^.*/,,g"
+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.
+
+# Allow overriding, eg assuming that you follow the convention of
+# putting '$debug_cmd' at the start of all your functions, you can get
+# bash to show function call trace with:
+#
+# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
+debug_cmd=${debug_cmd-":"}
+exit_cmd=:
+
+# By convention, finish your script with:
+#
+# exit $exit_status
+#
+# so that you can set exit_status to non-zero if you want to indicate
+# something went wrong during execution without actually bailing out at
+# the point of failure.
+exit_status=$EXIT_SUCCESS
# 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"
+progpath=$0
+
+# The name of this program.
+progname=`$bs_echo "$progpath" |$SED "$sed_basename"`
+
+# Make sure we have an absolute progpath for reexecution:
+case $progpath in
+ [\\/]*|[A-Za-z]:\\*) ;;
+ *[\\/]*)
+ progdir=`$bs_echo "$progpath" |$SED "$sed_dirname"`
+ progdir=`cd "$progdir" && pwd`
+ progpath=$progdir/$progname
+ ;;
+ *)
+ _G_IFS=$IFS
+ IFS=${PATH_SEPARATOR-:}
+ for progdir in $PATH; do
+ IFS=$_G_IFS
+ test -x "$progdir/$progname" && break
+ done
+ IFS=$_G_IFS
+ test -n "$progdir" || progdir=`pwd`
+ progpath=$progdir/$progname
+ ;;
+esac
+
+
+## ----------------- ##
+## Standard options. ##
+## ----------------- ##
+
+# The following options affect the operation of the functions defined
+# below, and should be set appropriately depending on run-time para-
+# meters passed on the command line.
+
+opt_dry_run=false
+opt_quiet=false
+opt_verbose=false
+
+# Categories 'all' and 'none' are always available. Append any others
+# you will pass as the first argument to func_warning from your own
+# code.
+warning_categories=
+
+# By default, display warnings according to 'opt_warning_types'. Set
+# 'warning_func' to ':' to elide all warnings, or func_fatal_error to
+# treat the next displayed warning as a fatal error.
+warning_func=func_warn_and_continue
+
+# Set to 'all' to display all warnings, 'none' to suppress all
+# warnings, or a space delimited list of some subset of
+# 'warning_categories' to display only the listed warnings.
+opt_warning_types=all
+
+
+## -------------------- ##
+## Resource management. ##
+## -------------------- ##
+
+# This section contains definitions for functions that each ensure a
+# particular resource (a file, or a non-empty configuration variable for
+# example) is available, and if appropriate to extract default values
+# from pertinent package files. Call them using their associated
+# 'require_*' variable to ensure that they are executed, at most, once.
+#
+# It's entirely deliberate that calling these functions can set
+# variables that don't obey the namespace limitations obeyed by the rest
+# of this file, in order that that they be as useful as possible to
+# callers.
+
+
+# require_term_colors
+# -------------------
+# Allow display of bold text on terminals that support it.
+require_term_colors=func_require_term_colors
+func_require_term_colors ()
+{
+ $debug_cmd
+
+ test -t 1 && {
+ # COLORTERM and USE_ANSI_COLORS environment variables take
+ # precedence, because most terminfo databases neglect to describe
+ # whether color sequences are supported.
+ test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"}
+
+ if test 1 = "$USE_ANSI_COLORS"; then
+ # Standard ANSI escape sequences
+ tc_reset=''
+ tc_bold=''; tc_standout=''
+ tc_red=''; tc_green=''
+ tc_blue=''; tc_cyan=''
+ else
+ # Otherwise trust the terminfo database after all.
+ test -n "`tput sgr0 2>/dev/null`" && {
+ tc_reset=`tput sgr0`
+ test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold`
+ tc_standout=$tc_bold
+ test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso`
+ test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1`
+ test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2`
+ test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4`
+ test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5`
+ }
+ fi
+ }
+
+ require_term_colors=:
+}
+
+
+## ----------------- ##
+## Function library. ##
+## ----------------- ##
+
+# This section contains a variety of useful functions to call in your
+# scripts. Take note of the portable wrappers for features provided by
+# some modern shells, which will fall back to slower equivalents on
+# less featureful shells.
+
+
+# func_append VAR VALUE
+# ---------------------
+# Append VALUE onto the existing contents of VAR.
-# The name of this program:
-progname=`echo "$progpath" | $SED "$basename"`
-PROGRAM=bootstrap
+ # We should try to minimise forks, especially on Windows where they are
+ # unreasonably slow, so skip the feature probes when bash or zsh are
+ # being used:
+ if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
+ : ${_G_HAVE_ARITH_OP="yes"}
+ : ${_G_HAVE_XSI_OPS="yes"}
+ # The += operator was introduced in bash 3.1
+ case $BASH_VERSION in
+ [12].* | 3.0 | 3.0*) ;;
+ *)
+ : ${_G_HAVE_PLUSEQ_OP="yes"}
+ ;;
+ esac
+ fi
+
+ # _G_HAVE_PLUSEQ_OP
+ # Can be empty, in which case the shell is probed, "yes" if += is
+ # useable or anything else if it does not work.
+ test -z "$_G_HAVE_PLUSEQ_OP" \
+ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
+ && _G_HAVE_PLUSEQ_OP=yes
+
+if test yes = "$_G_HAVE_PLUSEQ_OP"
+then
+ # This is an XSI compatible shell, allowing a faster implementation...
+ eval 'func_append ()
+ {
+ $debug_cmd
+
+ eval "$1+=\$2"
+ }'
+else
+ # ...otherwise fall back to using expr, which is often a shell builtin.
+ func_append ()
+ {
+ $debug_cmd
+
+ eval "$1=\$$1\$2"
+ }
+fi
-# Detect whether this is a version control system checkout or a tarball
-vcs_only_file=HACKING
-# func_echo arg...
+# func_append_quoted VAR VALUE
+# ----------------------------
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+if test yes = "$_G_HAVE_PLUSEQ_OP"; then
+ eval 'func_append_quoted ()
+ {
+ $debug_cmd
+
+ func_quote_for_eval "$2"
+ eval "$1+=\\ \$func_quote_for_eval_result"
+ }'
+else
+ func_append_quoted ()
+ {
+ $debug_cmd
+
+ func_quote_for_eval "$2"
+ eval "$1=\$$1\\ \$func_quote_for_eval_result"
+ }
+fi
+
+
+# func_append_uniq VAR VALUE
+# --------------------------
+# Append unique VALUE onto the existing contents of VAR, assuming
+# entries are delimited by the first character of VALUE. For example:
+#
+# func_append_uniq options " --another-option option-argument"
+#
+# will only append to $options if " --another-option option-argument "
+# is not already present somewhere in $options already (note spaces at
+# each end implied by leading space in second argument).
+func_append_uniq ()
+{
+ $debug_cmd
+
+ eval _G_current_value='`$bs_echo $'$1'`'
+ _G_delim=`expr "$2" : '\(.\)'`
+
+ case $_G_delim$_G_current_value$_G_delim in
+ *"$2$_G_delim"*) ;;
+ *) func_append "$@" ;;
+ esac
+}
+
+
+# func_arith TERM...
+# ------------------
+# Set func_arith_result to the result of evaluating TERMs.
+ test -z "$_G_HAVE_ARITH_OP" \
+ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \
+ && _G_HAVE_ARITH_OP=yes
+
+if test yes = "$_G_HAVE_ARITH_OP"; then
+ eval 'func_arith ()
+ {
+ $debug_cmd
+
+ func_arith_result=$(( $* ))
+ }'
+else
+ func_arith ()
+ {
+ $debug_cmd
+
+ func_arith_result=`expr "$@"`
+ }
+fi
+
+
+# func_basename FILE
+# ------------------
+# Set func_basename_result to FILE with everything up to and including
+# the last / stripped.
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ # If this shell supports suffix pattern removal, then use it to avoid
+ # forking. Hide the definitions single quotes in case the shell chokes
+ # on unsupported syntax...
+ _b='func_basename_result=${1##*/}'
+ _d='case $1 in
+ */*) func_dirname_result=${1%/*}$2 ;;
+ * ) func_dirname_result=$3 ;;
+ esac'
+
+else
+ # ...otherwise fall back to using sed.
+ _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`'
+ _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"`
+ if test "X$func_dirname_result" = "X$1"; then
+ func_dirname_result=$3
+ else
+ func_append func_dirname_result "$2"
+ fi'
+fi
+
+eval 'func_basename ()
+{
+ $debug_cmd
+
+ '"$_b"'
+}'
+
+
+# func_dirname FILE APPEND NONDIR_REPLACEMENT
+# -------------------------------------------
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+eval 'func_dirname ()
+{
+ $debug_cmd
+
+ '"$_d"'
+}'
+
+
+# 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"
+# For efficiency, we do not delegate to the functions above but instead
+# duplicate the functionality here.
+eval 'func_dirname_and_basename ()
+{
+ $debug_cmd
+
+ '"$_b"'
+ '"$_d"'
+}'
+
+
+# func_echo ARG...
+# ----------------
# Echo program name prefixed message.
func_echo ()
{
- echo $progname: ${1+"$@"}
+ $debug_cmd
+
+ _G_message=$*
+
+ func_echo_IFS=$IFS
+ IFS=$nl
+ for _G_line in $_G_message; do
+ IFS=$func_echo_IFS
+ $bs_echo "$progname: $_G_line"
+ done
+ IFS=$func_echo_IFS
+}
+
+
+# func_echo_all ARG...
+# --------------------
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO "$*"
+}
+
+
+# func_echo_infix_1 INFIX ARG...
+# ------------------------------
+# Echo program name, followed by INFIX on the first line, with any
+# additional lines not showing INFIX.
+func_echo_infix_1 ()
+{
+ $debug_cmd
+
+ $require_term_colors
+
+ _G_infix=$1; shift
+ _G_indent=$_G_infix
+ _G_prefix="$progname: $_G_infix: "
+ _G_message=$*
+
+ # Strip color escape sequences before counting printable length
+ for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan"
+ do
+ test -n "$_G_tc" && {
+ _G_esc_tc=`$bs_echo "$_G_tc" | sed "$sed_make_literal_regex"`
+ _G_indent=`$bs_echo "$_G_indent" | sed "s|$_G_esc_tc||g"`
+ }
+ done
+ _G_indent="$progname: "`echo "$_G_indent" | sed 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes
+
+ func_echo_infix_1_IFS=$IFS
+ IFS=$nl
+ for _G_line in $_G_message; do
+ IFS=$func_echo_infix_1_IFS
+ $bs_echo "$_G_prefix$tc_bold$_G_line$tc_reset" >&2
+ _G_prefix=$_G_indent
+ done
+ IFS=$func_echo_infix_1_IFS
}
-# func_error arg...
+# func_error ARG...
+# -----------------
# Echo program name prefixed message to standard error.
func_error ()
{
- echo $progname: ${1+"$@"} >&2
+ $debug_cmd
+
+ $require_term_colors
+
+ func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2
}
-# func_fatal_error arg...
+
+# func_fatal_error ARG...
+# -----------------------
# Echo program name prefixed message to standard error, and exit.
func_fatal_error ()
{
- func_error ${1+"$@"}
+ $debug_cmd
+
+ func_error "$*"
exit $EXIT_FAILURE
}
-# func_verbose arg...
+
+# func_grep EXPRESSION FILENAME
+# -----------------------------
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+ $debug_cmd
+
+ $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_len STRING
+# ---------------
+# Set func_len_result to the length of STRING. STRING may not
+# start with a hyphen.
+ test -z "$_G_HAVE_XSI_OPS" \
+ && (eval 'x=a/b/c;
+ test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
+ && _G_HAVE_XSI_OPS=yes
+
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ eval 'func_len ()
+ {
+ $debug_cmd
+
+ func_len_result=${#1}
+ }'
+else
+ func_len ()
+ {
+ $debug_cmd
+
+ func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+ }
+fi
+
+
+# func_mkdir_p DIRECTORY-PATH
+# ---------------------------
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+ $debug_cmd
+
+ _G_directory_path=$1
+ _G_dir_list=
+
+ if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then
+
+ # Protect directory names starting with '-'
+ case $_G_directory_path in
+ -*) _G_directory_path=./$_G_directory_path ;;
+ esac
+
+ # While some portion of DIR does not yet exist...
+ while test ! -d "$_G_directory_path"; do
+ # ...make a list in topmost first order. Use a colon delimited
+ # list incase some portion of path contains whitespace.
+ _G_dir_list=$_G_directory_path:$_G_dir_list
+
+ # If the last portion added has no slash in it, the list is done
+ case $_G_directory_path in */*) ;; *) break ;; esac
+
+ # ...otherwise throw away the child directory and loop
+ _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"`
+ done
+ _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'`
+
+ func_mkdir_p_IFS=$IFS; IFS=:
+ for _G_dir in $_G_dir_list; do
+ IFS=$func_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 "$_G_dir" 2>/dev/null || :
+ done
+ IFS=$func_mkdir_p_IFS
+
+ # Bail out if we (or some other process) failed to create a directory.
+ test -d "$_G_directory_path" || \
+ func_fatal_error "Failed to create '$1'"
+ fi
+}
+
+
+# func_mktempdir [BASENAME]
+# -------------------------
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible. If
+# given, BASENAME is the basename for that directory.
+func_mktempdir ()
+{
+ $debug_cmd
+
+ _G_template=${TMPDIR-/tmp}/${1-$progname}
+
+ if test : = "$opt_dry_run"; then
+ # Return a directory name, but don't create it in dry-run mode
+ _G_tmpdir=$_G_template-$$
+ else
+
+ # If mktemp works, use that first and foremost
+ _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null`
+
+ if test ! -d "$_G_tmpdir"; then
+ # Failing that, at least try and use $RANDOM to avoid a race
+ _G_tmpdir=$_G_template-${RANDOM-0}$$
+
+ func_mktempdir_umask=`umask`
+ umask 0077
+ $MKDIR "$_G_tmpdir"
+ umask $func_mktempdir_umask
+ fi
+
+ # If we're not in dry-run mode, bomb out on failure
+ test -d "$_G_tmpdir" || \
+ func_fatal_error "cannot create temporary directory '$_G_tmpdir'"
+ fi
+
+ $ECHO "$_G_tmpdir"
+}
+
+
+# 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.
+func_normal_abspath ()
+{
+ $debug_cmd
+
+ # These SED scripts presuppose an absolute path with a trailing slash.
+ _G_pathcar='s|^/\([^/]*\).*$|\1|'
+ _G_pathcdr='s|^/[^/]*||'
+ _G_removedotparts=':dotsl
+ s|/\./|/|g
+ t dotsl
+ s|/\.$|/|'
+ _G_collapseslashes='s|/\{1,\}|/|g'
+ _G_finalslash='s|/*$|/|'
+
+ # 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 "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_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 "$_G_pathcar"`
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$_G_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_append 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_notquiet ARG...
+# --------------------
+# Echo program name prefixed message only when not in quiet mode.
+func_notquiet ()
+{
+ $debug_cmd
+
+ $opt_quiet || 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_relative_path SRCDIR DSTDIR
+# --------------------------------
+# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR.
+func_relative_path ()
+{
+ $debug_cmd
+
+ 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 -z "$func_relative_path_tlibdir"; 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 -n "$func_stripname_result"; then
+ func_append func_relative_path_result "/$func_stripname_result"
+ fi
+
+ # Normalisation. If bindir is libdir, return '.' else relative path.
+ if test -n "$func_relative_path_result"; then
+ func_stripname './' '' "$func_relative_path_result"
+ func_relative_path_result=$func_stripname_result
+ fi
+
+ test -n "$func_relative_path_result" || func_relative_path_result=.
+
+ :
+}
+
+
+# func_quote_for_eval ARG...
+# --------------------------
+# Aesthetically quote ARGs to be evaled later.
+# This function returns two values:
+# i) func_quote_for_eval_result
+# double-quoted, suitable for a subsequent eval
+# ii) func_quote_for_eval_unquoted_result
+# has all characters that are still active within double
+# quotes backslashified.
+func_quote_for_eval ()
+{
+ $debug_cmd
+
+ func_quote_for_eval_unquoted_result=
+ func_quote_for_eval_result=
+ while test 0 -lt $#; do
+ case $1 in
+ *[\\\`\"\$]*)
+ _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
+ *)
+ _G_unquoted_arg=$1 ;;
+ esac
+ if test -n "$func_quote_for_eval_unquoted_result"; then
+ func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
+ else
+ func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
+ fi
+
+ case $_G_unquoted_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting, command substitution and variable expansion
+ # for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ _G_quoted_arg=\"$_G_unquoted_arg\"
+ ;;
+ *)
+ _G_quoted_arg=$_G_unquoted_arg
+ ;;
+ esac
+
+ if test -n "$func_quote_for_eval_result"; then
+ func_append func_quote_for_eval_result " $_G_quoted_arg"
+ else
+ func_append func_quote_for_eval_result "$_G_quoted_arg"
+ fi
+ shift
+ done
+}
+
+
+# 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 ()
+{
+ $debug_cmd
+
+ case $1 in
+ *[\\\`\"]*)
+ _G_arg=`$ECHO "$1" | $SED \
+ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
+ *)
+ _G_arg=$1 ;;
+ esac
+
+ case $_G_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.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ _G_arg=\"$_G_arg\"
+ ;;
+ esac
+
+ func_quote_for_expand_result=$_G_arg
+}
+
+
+# func_stripname PREFIX SUFFIX NAME
+# ---------------------------------
+# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result.
+# 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).
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ eval 'func_stripname ()
+ {
+ $debug_cmd
+
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary variable first.
+ func_stripname_result=$3
+ func_stripname_result=${func_stripname_result#"$1"}
+ func_stripname_result=${func_stripname_result%"$2"}
+ }'
+else
+ func_stripname ()
+ {
+ $debug_cmd
+
+ case $2 in
+ .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;;
+ *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;;
+ esac
+ }
+fi
+
+
+# func_show_eval CMD [FAIL_EXP]
+# -----------------------------
+# Unless opt_quiet 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 ()
+{
+ $debug_cmd
+
+ _G_cmd=$1
+ _G_fail_exp=${2-':'}
+
+ func_quote_for_expand "$_G_cmd"
+ eval "func_notquiet $func_quote_for_expand_result"
+
+ $opt_dry_run || {
+ eval "$_G_cmd"
+ _G_status=$?
+ if test 0 -ne "$_G_status"; then
+ eval "(exit $_G_status); $_G_fail_exp"
+ fi
+ }
+}
+
+
+# func_show_eval_locale CMD [FAIL_EXP]
+# ------------------------------------
+# Unless opt_quiet 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 ()
+{
+ $debug_cmd
+
+ _G_cmd=$1
+ _G_fail_exp=${2-':'}
+
+ $opt_quiet || {
+ func_quote_for_expand "$_G_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ $opt_dry_run || {
+ eval "$_G_user_locale
+ $_G_cmd"
+ _G_status=$?
+ eval "$_G_safe_locale"
+ if test 0 -ne "$_G_status"; then
+ eval "(exit $_G_status); $_G_fail_exp"
+ 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 ()
+{
+ $debug_cmd
+
+ case $1 in
+ [0-9]* | *[!a-zA-Z0-9_]*)
+ func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'`
+ ;;
+ * )
+ func_tr_sh_result=$1
+ ;;
+ esac
+}
+
+
+# func_verbose ARG...
+# -------------------
# Echo program name prefixed message in verbose mode only.
func_verbose ()
{
- $opt_verbose && func_error ${1+"$@"}
+ $debug_cmd
+
+ $opt_verbose && func_echo "$*"
+
+ :
}
-# func_missing_arg argname
-# Echo program name prefixed message to standard error and set global
-# exit_cmd.
-func_missing_arg ()
+
+# func_warn_and_continue ARG...
+# -----------------------------
+# Echo program name prefixed warning message to standard error.
+func_warn_and_continue ()
+{
+ $debug_cmd
+
+ $require_term_colors
+
+ func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2
+}
+
+
+# func_warning CATEGORY ARG...
+# ----------------------------
+# Echo program name prefixed warning message to standard error. Warning
+# messages can be filtered according to CATEGORY, where this function
+# elides messages where CATEGORY is not listed in the global variable
+# 'opt_warning_types'.
+func_warning ()
+{
+ $debug_cmd
+
+ # CATEGORY must be in the warning_categories list!
+ case " $warning_categories " in
+ *" $1 "*) ;;
+ *) func_internal_error "invalid warning category '$1'" ;;
+ esac
+
+ _G_category=$1
+ shift
+
+ case " $opt_warning_types " in
+ *" $_G_category "*) $warning_func ${1+"$@"} ;;
+ esac
+}
+
+
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
+#! /bin/sh
+
+# Set a version string for this script.
+scriptversion=2012-10-21.11; # UTC
+
+# A portable, pluggable option parser for Bourne shell.
+# Written by Gary V. Vaughan, 2010
+
+# Copyright (C) 2010-2013 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.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Please report bugs or propose patches to gary@gnu.org.
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# This file is a library for parsing options in your shell scripts along
+# with assorted other useful supporting features that you can make use
+# of too.
+#
+# For the simplest scripts you might need only:
+#
+# #!/bin/sh
+# . relative/path/to/funclib.sh
+# . relative/path/to/options-parser
+# scriptversion=1.0
+# func_options ${1+"$@"}
+# eval set dummy "$func_options_result"; shift
+# ...rest of your script...
+#
+# In order for the '--version' option to work, you will need to have a
+# suitably formatted comment like the one at the top of this file
+# starting with '# Written by ' and ending with '# warranty; '.
+#
+# For '-h' and '--help' to work, you will also need a one line
+# description of your script's purpose in a comment directly above the
+# '# Written by ' line, like the one at the top of this file.
+#
+# The default options also support '--debug', which will turn on shell
+# execution tracing (see the comment above debug_cmd below for another
+# use), and '--verbose' and the func_verbose function to allow your script
+# to display verbose messages only when your user has specified
+# '--verbose'.
+#
+# After sourcing this file, you can plug processing for additional
+# options by amending the variables from the 'Configuration' section
+# below, and following the instructions in the 'Option parsing'
+# section further down.
+
+## -------------- ##
+## Configuration. ##
+## -------------- ##
+
+# You should override these variables in your script after sourcing this
+# file so that they reflect the customisations you have added to the
+# option parser.
+
+# The usage line for option parsing errors and the start of '-h' and
+# '--help' output messages. You can embed shell variables for delayed
+# expansion at the time the message is displayed, but you will need to
+# quote other shell meta-characters carefully to prevent them being
+# expanded when the contents are evaled.
+usage='$progpath [OPTION]...'
+
+# Short help message in response to '-h' and '--help'. Add to this or
+# override it after sourcing this library to reflect the full set of
+# options your script accepts.
+usage_message="\
+ --debug enable verbose shell tracing
+ -W, --warnings=CATEGORY
+ report the warnings falling in CATEGORY [all]
+ -v, --verbose verbosely report processing
+ --version print version information and exit
+ -h, --help print short or long help message and exit
+"
+
+# Additional text appended to 'usage_message' in response to '--help'.
+long_help_message="
+Warning categories include:
+ 'all' show all warnings
+ 'none' turn off all the warnings
+ 'error' warnings are treated as fatal errors"
+
+# Help message printed before fatal option parsing errors.
+fatal_help="Try '\$progname --help' for more information."
+
+
+
+## ------------------------- ##
+## Hook function management. ##
+## ------------------------- ##
+
+# This section contains functions for adding, removing, and running hooks
+# to the main code. A hook is just a named list of of function, that can
+# be run in order later on.
+
+# func_hookable FUNC_NAME
+# -----------------------
+# Declare that FUNC_NAME will run hooks added with
+# 'func_add_hook FUNC_NAME ...'.
+func_hookable ()
+{
+ $debug_cmd
+
+ func_append hookable_fns " $1"
+}
+
+
+# func_add_hook FUNC_NAME HOOK_FUNC
+# ---------------------------------
+# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must
+# first have been declared "hookable" by a call to 'func_hookable'.
+func_add_hook ()
+{
+ $debug_cmd
+
+ case " $hookable_fns " in
+ *" $1 "*) ;;
+ *) func_fatal_error "'$1' does not accept hook functions." ;;
+ esac
+
+ eval func_append ${1}_hooks '" $2"'
+}
+
+
+# func_remove_hook FUNC_NAME HOOK_FUNC
+# ------------------------------------
+# Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
+func_remove_hook ()
+{
+ $debug_cmd
+
+ eval ${1}_hooks='`$bs_echo "\$'$1'_hooks" |$SED "s| '$2'||"`'
+}
+
+
+# func_run_hooks FUNC_NAME [ARG]...
+# ---------------------------------
+# Run all hook functions registered to FUNC_NAME.
+# It is assumed that the list of hook functions contains nothing more
+# than a whitespace-delimited list of legal shell function names, and
+# no effort is wasted trying to catch shell meta-characters or preserve
+# whitespace.
+func_run_hooks ()
{
- func_error "missing argument for $1"
- exit_cmd=exit
+ $debug_cmd
+
+ case " $hookable_fns " in
+ *" $1 "*) ;;
+ *) func_fatal_error "'$1' does not support hook funcions.n" ;;
+ esac
+
+ eval _G_hook_fns=\$$1_hooks; shift
+
+ for _G_hook in $_G_hook_fns; do
+ eval $_G_hook '"$@"'
+
+ # store returned options list back into positional
+ # parameters for next 'cmd' execution.
+ eval _G_hook_result=\$${_G_hook}_result
+ eval set dummy "$_G_hook_result"; shift
+ done
+
+ func_quote_for_eval ${1+"$@"}
+ func_run_hooks_result=$func_quote_for_eval_result
}
-# func_fatal_help arg...
+
+
+## --------------- ##
+## Option parsing. ##
+## --------------- ##
+
+# In order to add your own option parsing hooks, you must accept the
+# full positional parameter list in your hook function, remove any
+# options that you action, and then pass back the remaining unprocessed
+# options in '<hooked_function_name>_result', escaped suitably for
+# 'eval'. Like this:
+#
+# my_options_prep ()
+# {
+# $debug_cmd
+#
+# # Extend the existing usage message.
+# usage_message=$usage_message'
+# -s, --silent don'\''t print informational messages
+# '
+#
+# func_quote_for_eval ${1+"$@"}
+# my_options_prep_result=$func_quote_for_eval_result
+# }
+# func_add_hook func_options_prep my_options_prep
+#
+#
+# my_silent_option ()
+# {
+# $debug_cmd
+#
+# # Note that for efficiency, we parse as many options as we can
+# # recognise in a loop before passing the remainder back to the
+# # caller on the first unrecognised argument we encounter.
+# while test $# -gt 0; do
+# opt=$1; shift
+# case $opt in
+# --silent|-s) opt_silent=: ;;
+# # Separate non-argument short options:
+# -s*) func_split_short_opt "$_G_opt"
+# set dummy "$func_split_short_opt_name" \
+# "-$func_split_short_opt_arg" ${1+"$@"}
+# shift
+# ;;
+# *) set dummy "$_G_opt" "$*"; shift; break ;;
+# esac
+# done
+#
+# func_quote_for_eval ${1+"$@"}
+# my_silent_option_result=$func_quote_for_eval_result
+# }
+# func_add_hook func_parse_options my_silent_option
+#
+#
+# my_option_validation ()
+# {
+# $debug_cmd
+#
+# $opt_silent && $opt_verbose && func_fatal_help "\
+# '--silent' and '--verbose' options are mutually exclusive."
+#
+# func_quote_for_eval ${1+"$@"}
+# my_option_validation_result=$func_quote_for_eval_result
+# }
+# func_add_hook func_validate_options my_option_validation
+#
+# You'll alse need to manually amend $usage_message to reflect the extra
+# options you parse. It's preferable to append if you can, so that
+# multiple option parsing hooks can be added safely.
+
+
+# func_options [ARG]...
+# ---------------------
+# All the functions called inside func_options are hookable. See the
+# individual implementations for details.
+func_hookable func_options
+func_options ()
+{
+ $debug_cmd
+
+ func_options_prep ${1+"$@"}
+ eval func_parse_options \
+ ${func_options_prep_result+"$func_options_prep_result"}
+ eval func_validate_options \
+ ${func_parse_options_result+"$func_parse_options_result"}
+
+ eval func_run_hooks func_options \
+ ${func_validate_options_result+"$func_validate_options_result"}
+
+ # save modified positional parameters for caller
+ func_options_result=$func_run_hooks_result
+}
+
+
+# func_options_prep [ARG]...
+# --------------------------
+# All initialisations required before starting the option parse loop.
+# Note that when calling hook functions, we pass through the list of
+# positional parameters. If a hook function modifies that list, and
+# needs to propogate that back to rest of this script, then the complete
+# modified list must be put in 'func_run_hooks_result' before
+# returning.
+func_hookable func_options_prep
+func_options_prep ()
+{
+ $debug_cmd
+
+ # Option defaults:
+ opt_verbose=false
+ opt_warning_types=
+
+ func_run_hooks func_options_prep ${1+"$@"}
+
+ # save modified positional parameters for caller
+ func_options_prep_result=$func_run_hooks_result
+}
+
+
+# func_parse_options [ARG]...
+# ---------------------------
+# The main option parsing loop.
+func_hookable func_parse_options
+func_parse_options ()
+{
+ $debug_cmd
+
+ func_parse_options_result=
+
+ # this just eases exit handling
+ while test $# -gt 0; do
+ # Defer to hook functions for initial option parsing, so they
+ # get priority in the event of reusing an option name.
+ func_run_hooks func_parse_options ${1+"$@"}
+
+ # Adjust func_parse_options positional parameters to match
+ eval set dummy "$func_run_hooks_result"; shift
+
+ # Break out of the loop if we already parsed every option.
+ test $# -gt 0 || break
+
+ _G_opt=$1
+ shift
+ case $_G_opt in
+ --debug|-x) debug_cmd='set -x'
+ func_echo "enabling shell trace mode"
+ $debug_cmd
+ ;;
+
+ --no-warnings|--no-warning|--no-warn)
+ set dummy --warnings none ${1+"$@"}
+ shift
+ ;;
+
+ --warnings|--warning|-W)
+ test $# = 0 && func_missing_arg $_G_opt && break
+ case " $warning_categories $1" in
+ *" $1 "*)
+ # trailing space prevents matching last $1 above
+ func_append_uniq opt_warning_types " $1"
+ ;;
+ *all)
+ opt_warning_types=$warning_categories
+ ;;
+ *none)
+ opt_warning_types=none
+ warning_func=:
+ ;;
+ *error)
+ opt_warning_types=$warning_categories
+ warning_func=func_fatal_error
+ ;;
+ *)
+ func_fatal_error \
+ "unsupported warning category: '$1'"
+ ;;
+ esac
+ shift
+ ;;
+
+ --verbose|-v) opt_verbose=: ;;
+ --version) func_version ;;
+ -\?|-h) func_usage ;;
+ --help) func_help ;;
+
+ # Separate optargs to long options (plugins may need this):
+ --*=*) func_split_equals "$_G_opt"
+ set dummy "$func_split_equals_lhs" \
+ "$func_split_equals_rhs" ${1+"$@"}
+ shift
+ ;;
+
+ # Separate optargs to short options:
+ -W*)
+ func_split_short_opt "$_G_opt"
+ set dummy "$func_split_short_opt_name" \
+ "$func_split_short_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ # Separate non-argument short options:
+ -\?*|-h*|-v*|-x*)
+ func_split_short_opt "$_G_opt"
+ set dummy "$func_split_short_opt_name" \
+ "-$func_split_short_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ --) break ;;
+ -*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
+ *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+ esac
+ done
+
+ # save modified positional parameters for caller
+ func_quote_for_eval ${1+"$@"}
+ func_parse_options_result=$func_quote_for_eval_result
+}
+
+
+# func_validate_options [ARG]...
+# ------------------------------
+# Perform any sanity checks on option settings and/or unconsumed
+# arguments.
+func_hookable func_validate_options
+func_validate_options ()
+{
+ $debug_cmd
+
+ # Display all warnings if -W was not given.
+ test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
+
+ func_run_hooks func_validate_options ${1+"$@"}
+
+ # Bail if the options were screwed!
+ $exit_cmd $EXIT_FAILURE
+
+ # save modified positional parameters for caller
+ func_validate_options_result=$func_run_hooks_result
+}
+
+
+
+## ------------------##
+## Helper functions. ##
+## ------------------##
+
+# This section contains the helper functions used by the rest of the
+# hookable option parser framework in ascii-betical order.
+
+
+# func_fatal_help ARG...
+# ----------------------
# Echo program name prefixed message to standard error, followed by
# a help hint, and exit.
func_fatal_help ()
{
+ $debug_cmd
+
+ eval \$bs_echo \""Usage: $usage"\"
+ eval \$bs_echo \""$fatal_help"\"
func_error ${1+"$@"}
- func_fatal_error "Try \`$progname --help' for more information."
+ exit $EXIT_FAILURE
}
-# func_missing_arg argname
+
+# func_help
+# ---------
+# Echo long help message to standard output and exit.
+func_help ()
+{
+ $debug_cmd
+
+ func_usage_message
+ $bs_echo "$long_help_message"
+ exit 0
+}
+
+
+# func_missing_arg ARGNAME
+# ------------------------
# Echo program name prefixed message to standard error and set global
# exit_cmd.
func_missing_arg ()
{
- func_error "missing argument for $1"
- exit_cmd=exit
+ $debug_cmd
+
+ func_error "Missing argument for '$1'."
+ exit_cmd=exit
}
+
+# func_split_equals STRING
+# ------------------------
+# Set func_split_equals_lhs and func_split_equals_rhs shell variables after
+# splitting STRING at the '=' sign.
+test -z "$_G_HAVE_XSI_OPS" \
+ && (eval 'x=a/b/c;
+ test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
+ && _G_HAVE_XSI_OPS=yes
+
+if test yes = "$_G_HAVE_XSI_OPS"
+then
+ # This is an XSI compatible shell, allowing a faster implementation...
+ eval 'func_split_equals ()
+ {
+ $debug_cmd
+
+ func_split_equals_lhs=${1%%=*}
+ func_split_equals_rhs=${1#*=}
+ test "x$func_split_equals_lhs" = "x$1" \
+ && func_split_equals_rhs=
+ }'
+else
+ # ...otherwise fall back to using expr, which is often a shell builtin.
+ func_split_equals ()
+ {
+ $debug_cmd
+
+ func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
+ func_split_equals_rhs=
+ test "x$func_split_equals_lhs" = "x$1" \
+ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
+ }
+fi #func_split_equals
+
+
+# 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.
+if test yes = "$_G_HAVE_XSI_OPS"
+then
+ # This is an XSI compatible shell, allowing a faster implementation...
+ eval 'func_split_short_opt ()
+ {
+ $debug_cmd
+
+ func_split_short_opt_arg=${1#??}
+ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}
+ }'
+else
+ # ...otherwise fall back to using expr, which is often a shell builtin.
+ func_split_short_opt ()
+ {
+ $debug_cmd
+
+ func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
+ func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
+ }
+fi #func_split_short_opt
+
+
# func_usage
+# ----------
# Echo short help message to standard output and exit.
func_usage ()
{
- $SED '/^# Usage:/,/# -h/ {
- s/^# //; s/^# *$//;
- s/\$progname/'$progname'/;
- p;
- }; d' < "$progpath"
- echo
- echo "run \`$progname --help | more' for full usage"
- exit $EXIT_SUCCESS
+ $debug_cmd
+
+ func_usage_message
+ $bs_echo "Run '$progname --help |${PAGER-more}' for full usage"
+ exit 0
}
-# func_help
-# Echo long help message to standard output and exit.
-func_help ()
+
+# func_usage_message
+# ------------------
+# Echo short help message to standard output.
+func_usage_message ()
{
- $SED '/^# Usage:/,/# Report bugs to/ {
- s/^# //; s/^# *$//;
- s/\$progname/'$progname'/;
- p;
- }; d' < "$progpath"
- exit $EXIT_SUCCESS
+ $debug_cmd
+
+ eval \$bs_echo \""Usage: $usage"\"
+ echo
+ $SED -n 's|^# ||
+ /^Written by/{
+ x;p;x
+ }
+ h
+ /^Written by/q' < "$progpath"
+ echo
+ eval \$bs_echo \""$usage_message"\"
}
+
# func_version
+# ------------
# Echo version message to standard output and exit.
func_version ()
{
- $SED '/^# '$PROGRAM' (GNU /,/# warranty; / {
- s/^# //; s/^# *$//;
- s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/;
- p;
- }; d' < "$progpath"
- exit $EXIT_SUCCESS
+ $debug_cmd
+
+ printf '%s\n' "$progname $scriptversion"
+ $SED -n '/^##/q
+ /(C)/!b go
+ :more
+ /\./!{
+ N
+ s|\n# | |
+ b more
+ }
+ :go
+ /^# Written by /,/# warranty; / {
+ s|^# ||
+ s|^# *$||
+ s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
+ p
+ }
+ /^# Written by / {
+ s|^# ||
+ p
+ }
+ /^warranty; /q' < "$progpath"
+
+ exit $?
}
-# func_update
-# Copy $1 to $2 if it is newer.
-func_update ()
+
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
+#! /bin/sh
+
+# Extract macro arguments from autotools input with GNU M4.
+# Written by Gary V. Vaughan, 2010
+#
+# Copyright (C) 2010-2013 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.
+
+# Make sure we've evaluated scripts we depend on.
+test -z "$progpath" && . `echo "$0" |${SED-sed} 's|[^/]*$||'`/funclib.sh
+test extract-trace = "$progname" && . `echo "$0" |${SED-sed} 's|[^/]*$||'`/options-parser
+
+# Set a version string.
+scriptversion=2013-08-22.10; # UTC
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Please report bugs or propose patches to gary@gnu.org.
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Run './extract-trace --help' for help with using this script from the
+# command line.
+#
+# Or source first 'options-parser' and then this file into your own
+# scripts in order to make use of the function and variable framework
+# they define, and also to avoid the overhead of forking to run this
+# script in its own process on every call.
+
+
+
+## ------------------##
+## Helper functions. ##
+## ------------------##
+
+# This section contains the helper functions used by the rest of
+# 'extract-trace'.
+
+
+# func_autoconf_configure MAYBE-CONFIGURE-FILE
+# --------------------------------------------
+# Ensure that MAYBE-CONFIGURE-FILE is the name of a file in the current
+# directory that contains an uncommented call to AC_INIT.
+func_autoconf_configure ()
{
- if test -f "$2" && cmp -s "$1" "$2" ; then
- func_verbose "$2 is up-to-date"
- else
- func_echo "copying $1 -> $2"
- cp "$1" "$2"
- fi
+ $debug_cmd
+
+ _G_sed_no_comment='
+ s|#.*$||
+ s|^dnl .*$||
+ s| dnl .*$||'
+ _G_ac_init=
+
+ # If we were passed a genuine file, make sure it calls AC_INIT.
+ test -f "$1" \
+ && _G_ac_init=`$SED "$_G_sed_no_comment" "$1" |grep AC_INIT`
+
+ # Otherwise it is not a genuine Autoconf input file.
+ test -n "$_G_ac_init"
+ _G_status=$?
+
+ test 0 -ne "$_G_status" \
+ && func_verbose "'$1' not using Autoconf"
+
+ (exit $_G_status)
}
-# Parse options once, thoroughly. This comes as soon as possible in
-# the script to make things like `bootstrap --version' happen quickly.
+
+# func_find_tool ENVVAR NAMES...
+# ------------------------------
+# Search for a required program. Use the value of ENVVAR, if set,
+# otherwise find the first of the NAMES that can be run (i.e.,
+# supports --version). If found, set ENVVAR to the program name,
+# die otherwise.
+func_find_tool ()
{
- # sed scripts:
- my_sed_single_opt='1s/^\(..\).*$/\1/;q'
- my_sed_single_rest='1s/^..\(.*\)$/\1/;q'
- my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
- my_sed_long_arg='1s/^--[^=]*=//'
+ $debug_cmd
- # this just eases exit handling
- while test $# -gt 0; do
- opt="$1"
+ _G_find_tool_envvar=$1
shift
- case $opt in
- # Separate optargs to short options:
- -f|--force) vcs_only_file= ;;
- --gnulib-srcdir=*)
- GNULIB_SRCDIR=`expr "X$opt" : 'X--gnulib-srcdir=\(.*\)'` ;;
- -\?|-h) func_usage ;;
- --help) func_help ;;
- --version) func_version ;;
- --) break ;;
- -*) func_fatal_help "unrecognized option \`$opt'" ;;
- *) set -- "$opt" ${1+"$@"}; break ;;
- esac
- done
+ _G_find_tool_names=$@
+ eval "_G_find_tool_res=\$$_G_find_tool_envvar"
+ if test -n "$_G_find_tool_res"; then
+ _G_find_tool_error_prefix="\$$find_tool_envvar: "
+ else
+ for _G_prog
+ do
+ if func_tool_version_output $_G_prog >/dev/null; then
+ _G_find_tool_res=$_G_prog
+ break
+ fi
+ done
+ fi
+ if test -n "$_G_find_tool_res"; then
+ func_tool_version_output >/dev/null $_G_find_tool_res "\
+${_G_find_tool_error_prefix}Cannot run '$_G_find_tool_res --version'"
+
+ # Make sure the result is exported to the environment for children
+ # to use.
+ eval "$_G_find_tool_envvar=\$_G_find_tool_res"
+ eval "export $_G_find_tool_envvar"
+ else
+ func_error "\
+One of these is required:
+ $_G_find_tool_names"
+ fi
+}
- # Bail if the options were screwed
- $exit_cmd $EXIT_FAILURE
- if test -n "$vcs_only_file" && test ! -r "$vcs_only_file"; then
- func_fatal_error \
- "Bootstrapping from a non-version-control distribution is risky."
- fi
+# func_tool_version_output CMD [FATAL-ERROR-MSG]
+# ----------------------------------------------
+# Attempt to run 'CMD --version', discarding errors. The output can be
+# ignored by redirecting stdout, and this function used simply to test
+# whether the command exists and exits normally when passed a
+# '--version' argument.
+# When FATAL-ERROR-MSG is given, then this function will display the
+# message and exit if running 'CMD --version' returns a non-zero exit
+# status.
+func_tool_version_output ()
+{
+ $debug_cmd
+
+ _G_cmd=$1
+ _G_fatal_error_msg=$2
+
+ # Some tools, like 'git2cl' produce thousands of lines of output
+ # unless stdin is /dev/null - in that case we want to return
+ # successfully without saving all of that output. Other tools,
+ # such as 'help2man' exit with a non-zero status when stdin comes
+ # from /dev/null, so we re-execute without /dev/null if that
+ # happens. This means that occasionally, the output from both calls
+ # ends up in the result, but the alternative would be to discard the
+ # output from one call, and hope the other produces something useful.
+ { $_G_cmd --version </dev/null || $_G_cmd --version; } 2>/dev/null
+ _G_status=$?
+
+ test 0 -ne "$_G_status" && test -n "$_G_fatal_error_msg" \
+ && func_fatal_error "$_G_fatal_error_msg"
+
+ (exit $_G_status)
}
-## ---------------- ##
-## Version control. ##
-## ---------------- ##
-# gnulib-tool updates m4/.{git,cvs}ignore and lib/.{git,cvs}ignore, and
-# keeping generated files under version control does not make sense.
-# Since lib is entirely ignored, we only need to prepopulate the m4 ignore
-# files with generated files not tracked by gnulib-tool.
-if test -f $config_macro_dir/.gitignore ; then
- :
-else
- func_echo "creating initial $config_macro_dir/.cvsignore"
- cat > $config_macro_dir/.cvsignore <<\EOF
-# files created by gnulib, but that gnulib doesn't track
-*~
-.cvsignore
-.gitignore
-gnulib-comp.m4
-# gnulib-tool edits below here
-EOF
- func_echo "creating initial $config_macro_dir/.gitignore"
- cp $config_macro_dir/.cvsignore $config_macro_dir/.gitignore
-fi
+## -------------------- ##
+## Resource management. ##
+## -------------------- ##
+
+# This section contains definitions for functions that each ensure a
+# particular resource (a file, or a non-empty configuration variable for
+# example) is available, and if appropriate to extract default values
+# from pertinent package files. Where a variable already has a non-
+# empty value (as set by the package's 'bootstrap.conf'), that value is
+# used in preference to deriving the default. Call them using their
+# associated 'require_*' variable to ensure that they are executed, at
+# most, once.
+#
+# It's entirely deliberate that calling these functions can set
+# variables that don't obey the namespace limitations obeyed by the rest
+# of this file, in order that that they be as useful as possible to
+# callers.
+
+
+# require_configure_ac
+# --------------------
+# Ensure that there is a 'configure.ac' or 'configure.in' file in the
+# current directory that contains an uncommented call to AC_INIT, and
+# that '$configure_ac' contains its name.
+require_configure_ac=func_require_configure_ac
+func_require_configure_ac ()
+{
+ $debug_cmd
+
+ test -z "$configure_ac" \
+ && func_autoconf_configure configure.ac && configure_ac=configure.ac
+ test -z "$configure_ac" \
+ && func_autoconf_configure configure.in && configure_ac=configure.in
+ test -z "$configure_ac" \
+ || func_verbose "found '$configure_ac'"
+
+ require_configure_ac=:
+}
+
+
+# require_gnu_m4
+# --------------
+# Search for GNU M4, and export it in $M4.
+require_gnu_m4=func_require_gnu_m4
+func_require_gnu_m4 ()
+{
+ $debug_cmd
+
+ test -n "$M4" || {
+ # Find the first m4 binary that responds to --version.
+ func_find_tool M4 gm4 gnum4 m4
+ }
+
+ test -n "$M4" || func_fatal_error "\
+Please install GNU M4, or 'export M4=/path/to/gnu/m4'."
+
+ func_verbose "export M4='$M4'"
+
+ # Make sure the search result is visible to subshells
+ export M4
+
+ require_gnu_m4=:
+}
+
+
+## --------------- ##
+## Core functions. ##
+## --------------- ##
+
+# This section contains the high level functions used when calling this
+# file as a script. 'func_extract_trace' is probably the only one that you
+# won't want to replace if you source this file into your own script.
+
+
+# func_extract_trace MACRO_NAMES [FILENAME]...
+# --------------------------------------------
+# set '$func_extract_trace_result' to a colon delimited list of arguments
+# to any of the comma separated list of MACRO_NAMES in FILENAME. If no
+# FILENAME is given, then '$configure_ac' is assumed.
+func_extract_trace ()
+{
+ $debug_cmd
+
+ $require_configure_ac
+ $require_gnu_m4
+
+ _G_m4_traces=`$bs_echo "--trace=$1" |$SED 's%,% --trace=%g'`
+ _G_re_macros=`$bs_echo "($1)" |$SED 's%,%|%g'`
+ _G_macros="$1"; shift
+ test $# -gt 0 || {
+ set dummy $configure_ac
+ shift
+ }
+
+ # Generate an error if the first file is missing
+ <"$1"
+
+ # Sadly, we can't use 'autom4te' tracing to extract macro arguments,
+ # because it complains about things we want to ignore at bootstrap
+ # time - like missing m4_include files; AC_PREREQ being newer than
+ # the installed autoconf; and returns nothing when tracing
+ # 'AM_INIT_AUTOMAKE' when aclocal hasn't been generated yet.
+ #
+ # The following tries to emulate a less persnickety version of (and
+ # due to not having to wait for Perl startup on every invocation,
+ # it's probably faster too):
+ #
+ # autom4te --language=Autoconf --trace=$my_macro:\$% "$@"
+ #
+ # First we give a minimal set of macro declarations to M4 to prime
+ # it for reading Autoconf macros, while still providing some of the
+ # functionality generally used at m4-time to supply dynamic
+ # arguments to Autocof functions, but without following
+ # 'm4_s?include' files.
+ _G_mini='
+ # Initialisation.
+ m4_changequote([,])
+ m4_define([m4_copy], [m4_define([$2], m4_defn([$1]))])
+ m4_define([m4_rename], [m4_copy([$1], [$2])m4_undefine([$1])])
+
+ # Disable these macros.
+ m4_undefine([m4_dnl])
+ m4_undefine([m4_include])
+ m4_undefine([m4_m4exit])
+ m4_undefine([m4_m4wrap])
+ m4_undefine([m4_maketemp])
+
+ # Copy and rename macros not handled by "m4 --prefix".
+ m4_define([dnl], [m4_builtin([dnl])])
+ m4_copy([m4_define], [m4_defun])
+ m4_rename([m4_ifelse], [m4_if])
+ m4_ifdef([m4_mkstemp], [m4_undefine([m4_mkstemp])])
+ m4_rename([m4_patsubst], [m4_bpatsubst])
+ m4_rename([m4_regexp], [m4_bregexp])
+
+ # "m4sugar.mini" - useful m4-time macros for dynamic arguments.
+ # If we discover packages that need more m4 macros defined in
+ # order to bootstrap correctly, add them here:
+ m4_define([m4_bmatch],
+ [m4_if([$#], 0, [], [$#], 1, [], [$#], 2, [$2],
+ [m4_if(m4_bregexp([$1], [$2]), -1,
+ [$0([$1], m4_shift3($@))], [$3])])])
+ m4_define([m4_ifndef], [m4_ifdef([$1], [$3], [$2])])
+ m4_define([m4_ifset],
+ [m4_ifdef([$1], [m4_ifval(m4_defn([$1]), [$2], [$3])], [$3])])
+ m4_define([m4_require], [$1])
+ m4_define([m4_shift3], [m4_shift(m4shift(m4shift($@)))])
+
+ # "autoconf.mini" - things from autoconf macros we care about.
+ m4_copy([m4_defun], [AC_DEFUN])
+
+ # Dummy definitions for the macros we want to trace.
+ # AM_INIT_AUTOMAKE at least produces no trace without this.
+ '
+
+ _G_save=$IFS
+ IFS=,
+ for _G_macro in $_G_macros; do
+ IFS=$_G_save
+ func_append _G_mini "AC_DEFUN([$_G_macro])$nl"
+ done
+ IFS=$_G_save
+
+ # We discard M4's stdout, but the M4 trace output from reading our
+ # "autoconf.mini" followed by any other files passed to this
+ # function is then scanned by sed to transform it into a colon
+ # delimited argument list assigned to a shell variable.
+ _G_transform='s|#.*$||; s|^dnl .*$||; s| dnl .*$||;'
+
+ # Unfortunately, alternation in regexp addresses doesn't work in at
+ # least BSD (and hence Mac OS X) sed, so we have to append a capture
+ # and print block for each traced macro to the sed transform script.
+ _G_save=$IFS
+ IFS=,
+ for _G_macro in $_G_macros; do
+ IFS=$_G_save
+ func_append _G_transform '
+ /^m4trace: -1- '"$_G_macro"'/ {
+ s|^m4trace: -1- '"$_G_macro"'[([]*||
+ s|], [[]|:|g
+ s|[])]*$|:|
+ s|\(.\):$|\1|
+ p
+ }'
+ done
+ IFS=$_G_save
+
+ # Save the command pipeline results for further use by callers of
+ # this function.
+ func_extract_trace_result=`$bs_echo "$_G_mini" \
+ |$M4 -daq --prefix $_G_m4_traces - "$@" 2>&1 1>/dev/null \
+ |$SED -n -e "$_G_transform"`
+}
+
+
+# func_extract_trace_first MACRO_NAMES [FILENAME]...
+# --------------------------------------------------
+# Exactly like func_extract_trace, except that only the first argument
+# to the first invocation of one of the comma separated MACRO_NAMES is
+# returned in '$func_extract_trace_first_result'.
+func_extract_trace_first ()
+{
+ $debug_cmd
+
+ func_extract_trace ${1+"$@"}
+ func_extract_trace_first_result=`$bs_echo "$func_extract_trace_result" \
+ |$SED -e 's|:.*$||g' -e 1q`
+}
+
+
+# func_main [ARG]...
+# ------------------
+func_main ()
+{
+ $debug_cmd
+
+ # Configuration.
+ usage='$progname MACRO_NAME FILE [...]'
+
+ long_help_message='
+The first argument to this program is the name of an autotools macro
+whose arguments you want to extract by examining the files listed in the
+remaining arguments using the same tool that Autoconf and Automake use,
+GNU M4.
+
+The arguments are returned separated by colons, with each traced call
+on a separate line.'
+
+ # Option processing.
+ func_options "$@"
+ eval set dummy "$func_options_result"; shift
+
+ # Validate remaining non-option arguments.
+ test $# -gt 1 \
+ || func_fatal_help "not enough arguments"
+
+ # Pass non-option arguments to extraction function.
+ func_extract_trace "$@"
+
+ # Display results.
+ test -n "$func_extract_trace_result" \
+ && $bs_echo "$func_extract_trace_result"
+
+ # The End.
+ exit $EXIT_SUCCESS
+}
+
+
+## --------------------------- ##
+## Actually perform the trace. ##
+## --------------------------- ##
+
+# Only call 'func_main' if this script was called directly.
+test extract-trace = "$progname" && func_main "$@"
+
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
+
+# Set a version string for *this* script.
+scriptversion=2013-09-15.06; # UTC
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Originally written by Paul Eggert. The canonical version of this
+# script is maintained as build-aux/bootstrap in gnulib, however, to
+# be useful to your project, you should place a copy of it under
+# version control in the top-level directory of your project. The
+# intent is that all customization can be done with a bootstrap.conf
+# file also maintained in your version control; gnulib comes with a
+# template build-aux/bootstrap.conf to get you started.
+
+# Please report bugs or propose patches to bug-gnulib@gnu.org.
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Most GNUish projects do not keep all of the generated Autotool
+# files under version control, but running all of the right tools
+# with the right arguments, in the correct order to regenerate
+# all of those files in readiness for configuration and building
+# can be surprisingly involved! Many projects have a 'bootstrap'
+# script under version control to invoke Autotools and perform
+# other assorted book-keeping with version numbers and the like.
+#
+# This bootstrap script aims to probe the configure.ac and top
+# Makefile.am of your project to automatically determine what
+# the correct ordering and arguments are and then run the tools for
+# you. In order to use it, you can generate an initial standalone
+# script with:
+#
+# gl/build-aux/inline-source gl/build-aux/bootstrap.in > bootstrap
+#
+# You should then store than script in version control for other
+# developers in you project. It will give you instructions about
+# how to keep it up to date if the sources change.
+#
+# See gl/doc/bootstrap.texi for documentation on how to write
+# a bootstrap.conf to customize it for your project's
+# idiosyncracies.
+
+
+## ================================================================== ##
+## ##
+## DO NOT EDIT THIS FILE, CUSTOMIZE IT USING A BOOTSTRAP.CONF ##
+## ##
+## ================================================================== ##
+
+## ------------------------------- ##
+## User overridable command paths. ##
+## ------------------------------- ##
+
+# All uppercase denotes values stored in the environment. These
+# variables should generally be overridden by the user - however, we do
+# set them to 'true' in some parts of this script to prevent them being
+# called at the wrong time by other tools that we call ('autoreconf',
+# for example).
+#
+# We also allow 'LIBTOOLIZE', 'M4', 'SHA1SUM' and some others to be
+# overridden, and export the result for child processes, but they are
+# handled by the function 'func_find_tool' and not defaulted in this
+# section.
+
+: ${ACLOCAL="aclocal"}
+: ${AUTOCONF="autoconf"}
+: ${AUTOHEADER="autoheader"}
+: ${AUTOM4TE="autom4te"}
+: ${AUTOHEADER="autoheader"}
+: ${AUTOMAKE="automake"}
+: ${AUTOPOINT="autopoint"}
+: ${AUTORECONF="autoreconf"}
+: ${CMP="cmp"}
+: ${CONFIG_SHELL="/bin/sh"}
+: ${DIFF="diff"}
+: ${EGREP="grep -E"}
+: ${FGREP="grep -F"}
+: ${GIT="git"}
+: ${GREP="grep"}
+: ${LN_S="ln -s"}
+: ${RM="rm"}
+: ${SED="sed"}
+
+export ACLOCAL
+export AUTOCONF
+export AUTOHEADER
+export AUTOM4TE
+export AUTOHEADER
+export AUTOMAKE
+export AUTOPOINT
+export AUTORECONF
+export CONFIG_SHELL
+
+
+## -------------- ##
+## Configuration. ##
+## -------------- ##
+
+# A newline delimited list of triples of programs (that respond to
+# --version), the minimum version numbers required (or just '-' in the
+# version field if any version will be sufficient) and homepage URLs
+# to help locate missing packages.
+buildreq=
+
+# Name of a file containing instructions on installing missing packages
+# required in 'buildreq'.
+buildreq_readme=README-hacking
+
+# These are extracted from AC_INIT in configure.ac, though you can
+# override those values in 'bootstrap.conf' if you prefer.
+build_aux=
+macro_dir=
+package=
+package_name=
+package_version=
+package_bugreport=
+
+# These are extracted from 'gnulib-cache.m4', or else fall-back
+# automatically on the gnulib defaults; unless you set the values
+# manually in 'bootstrap.conf'.
+doc_base=
+gnulib_mk=
+gnulib_name=
+local_gl_dir=
+source_base=
+tests_base=
+
+# The list of gnulib modules required at 'gnulib-tool' time. If you
+# check 'gnulib-cache.m4' into your repository, then this list will be
+# extracted automatically.
+gnulib_modules=
+
+# Extra gnulib files that are not in modules, which override files of
+# the same name installed by other bootstrap tools.
+gnulib_non_module_files="
+ build-aux/compile
+ build-aux/install-sh
+ build-aux/mdate-sh
+ build-aux/texinfo.tex
+ build-aux/depcomp
+ build-aux/config.guess
+ build-aux/config.sub
+ doc/INSTALL
+"
+
+# Relative path to the local gnulib submodule, and url to the upstream
+# git repository. If you have a gnulib entry in your .gitmodules file,
+# these values are ignored.
+gnulib_path=
+gnulib_url=
+
+# Additional gnulib-tool options to use.
+gnulib_tool_options="
+ --no-changelog
+"
+
+# bootstrap removes any macro-files that are not included by aclocal.m4,
+# except for files listed in this variable that are always kept.
+gnulib_precious="
+ gnulib-tool.m4
+"
+
+# When truncating long commands for display, always allow at least this
+# many characters before truncating.
+min_cmd_len=160
+
+# The command to download all .po files for a specified domain into
+# a specified directory. Fill in the first %s is the domain name, and
+# the second with the destination directory. Use rsync's -L and -r
+# options because the latest/%s directory and the .po files within are
+# all symlinks.
+po_download_command_format=\
+"rsync --delete --exclude '*.s1' -Lrtvz \
+'translationproject.org::tp/latest/%s/' '%s'"
+
+# Other locale categories that need message catalogs.
+extra_locale_categories=
+
+# Additional xgettext options to use. Gnulib might provide you with an
+# extensive list of additional options to append to this, but gettext
+# 0.16.1 and newer appends them automaticaly, so you can safely ignore
+# the complaints from 'gnulib-tool' if your $configure_ac states:
+#
+# AM_GNU_GETTEXT_VERSION([0.16.1])
+xgettext_options="
+ --flag=_:1:pass-c-format
+ --flag=N_:1:pass-c-format
+"
+
+# Package copyright holder for gettext files. Defaults to FSF if unset.
+copyright_holder=
+
+# File that should exist in the top directory of a checked out hierarchy,
+# but not in a distribution tarball.
+checkout_only_file=
+
+# Whether to use copies instead of symlinks by default (if set to true,
+# the --copy option has no effect).
+copy=false
+
+# Set this to ".cvsignore .gitignore" in 'bootstrap.conf' if you want
+# those files to be generated in directories like 'lib/', 'm4/', and 'po/',
+# or set it to "auto" to make this script select what to use based
+# on what version control system (if any) is used in the source directory.
+# Or set it to "none" to ignore VCS ignore files entirely. Default is
+# "auto".
+vc_ignore=
+
+
+## ------------------- ##
+## Hookable functions. ##
+## ------------------- ##
+
+# After 'bootstrap.conf' has been sourced, execution proceeds by calling
+# 'func_bootstrap'. Wherever a function is decorated with
+# 'func_hookable func_name', you will find a matching 'func_run_hooks
+# func_name', which executes all functions added with 'func_add_hook
+# func_name my_func'.
+#
+# You might notice that many of these functions begin with a series of
+# '$require_foo' lines. See the docu-comments at the start of the
+# 'Resource management' section for a description of what these are.
+
+
+# func_bootstrap [ARG]...
+# -----------------------
+# All the functions called inside func_bootstrap are hookable. See the
+# the individual implementations for details.
+func_bootstrap ()
+{
+ $debug_cmd
+
+ # Save the current positional parameters to prevent them being
+ # corrupted by calls to 'set' in 'func_init'.
+ func_quote_for_eval ${1+"$@"}
+ _G_saved_positional_parameters=$func_quote_for_eval_result
+
+ # Initialisation.
+ func_init
+
+ # Option processing.
+ eval func_options "$_G_saved_positional_parameters"
+
+ # Post-option preparation.
+ func_prep
+
+ # Ensure ChangeLog presence.
+ func_ifcontains "$gnulib_modules" gitlog-to-changelog \
+ func_ensure_changelog
+
+ # Reconfigure the package.
+ func_reconfigure
+
+ # Ensure .version is up-to-date.
+ func_update_dotversion
+
+ # Finalisation.
+ func_fini
+}
+
+
+# func_init
+# ---------
+# Any early initialisations can be hooked to this function. Consider
+# whether you can hook onto 'func_prep' instead, because if you hook
+# any slow to execute code in here, it will also add to the time before
+# './bootstrap --version' can respond.
+func_hookable func_init
+func_init ()
+{
+ $debug_cmd
+
+ func_run_hooks func_init
+}
+
+
+# func_prep
+# ---------
+# Function to perform preparation for remaining bootstrap process. If
+# your hooked code relies on the outcome of 'func_options' hook it here
+# rather than to 'func_init'.
+#
+# All the functions called inside func_prep are hookable. See the
+# individual implementations for details.
+func_hookable func_prep
+func_prep ()
+{
+ $debug_cmd
+
+ $require_buildtools_uptodate
+ $require_checkout_only_file
+
+ $require_gnulib_merge_changelog
+
+ # fetch update files from the translation project
+ func_update_translations
+
+ func_run_hooks func_prep
+}
+
+
+# func_update_translations
+# ------------------------
+# Update package po files and translations.
+func_hookable func_update_translations
+func_update_translations ()
+{
+ $debug_cmd
+
+ $opt_skip_po || {
+ test -d po && {
+ $require_package
+
+ func_update_po_files po $package || exit $?
+ }
+
+ func_run_hooks func_update_translations
+ }
+}
+
+
+# func_reconfigure
+# ----------------
+# Reconfigure the current package by running the appropriate autotools in a
+# suitable order.
+func_hookable func_reconfigure
+func_reconfigure ()
+{
+ $debug_cmd
+
+ # Released 'autopoint' has the tendency to install macros that have
+ # been obsoleted in current 'gnulib., so run this before 'gnulib-tool'.
+ func_autopoint
+
+ # Autoreconf runs 'aclocal' before 'libtoolize', which causes spurious
+ # warnings if the initial 'aclocal' is confused by the libtoolized
+ # (or worse: out-of-date) macro directory.
+ func_libtoolize
+
+ # If you need to do anything after 'gnulib-tool' is done, but before
+ # 'autoreconf' runs, you don't need to override this whole function,
+ # because 'func_gnulib_tool' is hookable.
+ func_gnulib_tool
+
+ func_autoreconf
+
+ func_run_hooks func_reconfigure
+}
+
+
+# func_gnulib_tool
+# ----------------
+# Run 'gnulib-tool' to fetch gnulib modules into the current package.
+#
+# It's assumed that since you are using gnulib's 'bootstrap' script,
+# you're also using gnulib elsewhere in your package. If not, then
+# you can replace this function in 'bootstrap.conf' with:
+#
+# func_gnulib_tool () { :; }
+#
+# (although the function returns immediately if $gnulib_tool is set to
+# true in any case).
+func_hookable func_gnulib_tool
+func_gnulib_tool ()
+{
+ $debug_cmd
+
+ $require_gnulib_tool
+ $require_libtoolize
+
+ test true = "$gnulib_tool" || {
+ # bootstrap.conf written for gnulib bootstrap expects
+ # gnulib_tool_option_extras to which --no-changelog is appended,
+ # but libtool bootstrap expects you to append to gnulib_tool_options
+ # so that you can override the --no-changelog default: make sure we
+ # support both styles so users can migrate between them easily.
+ gnulib_tool_all_options="$gnulib_tool_options $gnulib_tool_option_extras"
+
+ if test -n "$gnulib_modules"; then
+ $require_gnulib_cache
+ $require_gnulib_tool_base_options
+
+ gnulib_mode=--import
+
+ # Try not to pick up any stale values from 'gnulib-cache.m4'.
+ rm -f "$gnulib_cache"
+
+ test -n "$gnulib_tool_base_options" \
+ && func_append_uniq gnulib_tool_all_options " $gnulib_tool_base_options"
+ test -n "$gnulib_mk" \
+ && func_append_uniq gnulib_tool_all_options " --makefile-name=$gnulib_mk"
+ test -n "$tests_base" && {
+ func_append_uniq gnulib_tool_all_options " --tests-base=$tests_base"
+ func_append_uniq gnulib_tool_all_options " --with-tests"
+ }
+ else
+
+ # 'gnulib_modules' and others are cached in 'gnulib-cache.m4':
+ # Use 'gnulib --update' to fetch gnulib modules.
+ gnulib_mode=--update
+ fi
+
+ # Add a sensible default libtool option to gnulib_tool_options.
+ # The embedded echo is to squash whitespace before globbing.
+ case `echo " "$gnulib_tool_all_options" "` in
+ *" --no-libtool "*|*" --libtool "*) ;;
+ *) if test true = "$LIBTOOLIZE"; then
+ func_append_uniq gnulib_tool_all_options " --no-libtool"
+ else
+ func_append_uniq gnulib_tool_all_options " --libtool"
+ fi
+ ;;
+ esac
+
+ $opt_copy || func_append_uniq gnulib_tool_all_options " --symlink"
+
+ func_append_uniq gnulib_tool_all_options " $gnulib_mode"
+ func_append gnulib_tool_all_options " $gnulib_modules"
+
+ # The embedded echo is to squash whitespace before display.
+ gnulib_cmd=`echo $gnulib_tool $gnulib_tool_all_options`
+
+ func_show_eval "$gnulib_cmd" 'exit $?'
+
+ # Use 'gnulib-tool --copy-file' to install non-module files.
+ func_install_gnulib_non_module_files
+ }
+
+ func_run_hooks func_gnulib_tool
+}
+
+
+# func_fini
+# ---------
+# Function to perform all finalisation for the bootstrap process.
+func_hookable func_fini
+func_fini ()
+{
+ $debug_cmd
+
+ func_gettext_configuration
+ func_clean_dangling_symlinks
+ func_clean_unused_macros
+ func_skip_po_recommendation
+
+ func_run_hooks func_fini
+
+ $require_bootstrap_uptodate
+
+ func_echo "Done. Now you can run './configure'."
+}
+
+
+# func_gettext_configuration
+# --------------------------
+# Edit configuration values into po/Makevars.
+func_hookable func_gettext_configuration
+func_gettext_configuration ()
+{
+ $debug_cmd
+
+ $require_autopoint
+
+ test true = "$AUTOPOINT" || {
+ $require_copyright_holder
+ $require_extra_locale_categories
+ $require_package_bugreport
+
+ # Escape xgettext options for sed Makevars generation below.
+ # We have to delete blank lines in a separate script so that we don't
+ # append \\\ to the penultimate line, and then delete the last empty
+ # line, which messes up the variable substitution later in this
+ # function. Note that adding a literal \\\ requires double escaping
+ # here, once for the execution subshell, and again for the assignment,
+ # which is why there are actually 12 (!!) backslashes in the script.
+ _G_xgettext_options=`echo "$xgettext_options$nl" |$SED '/^$/d' |$SED '
+ $b
+ s|$| \\\\\\\\\\\\|'`
+
+ # Create gettext configuration.
+ func_echo "Creating po/Makevars from po/Makevars.template ..."
+ $RM -f po/Makevars
+ $SED '
+ /^EXTRA_LOCALE_CATEGORIES *=/s|=.*|= '"$extra_locale_categories"'|
+ /^COPYRIGHT_HOLDER *=/s|=.*|= '"$copyright_holder"'|
+ /^MSGID_BUGS_ADDRESS *=/s|=.*|= '"$package_bugreport"'|
+ /^XGETTEXT_OPTIONS *=/{
+ s|$| \\|
+ a\
+ '"$_G_xgettext_options"' \\\
+ $${end_of_xgettext_options+}
+ }
+ ' po/Makevars.template >po/Makevars || exit 1
+ }
+
+ func_run_hooks func_gettext_configuration
+}
+
+
+
+## --------------- ##
+## Core functions. ##
+## --------------- ##
+
+# This section contains the main functions called from the 'Hookable
+# functions' (shown above), and are the ones you're most likely
+# to want to replace with your own implementations in 'bootstrap.conf'.
+
+
+# func_autopoint
+# --------------
+# If this package uses gettext, then run 'autopoint'.
+func_autopoint ()
+{
+ $debug_cmd
+
+ $require_autopoint
+
+ test true = "$AUTOPOINT" \
+ || func_show_eval "$AUTOPOINT --force" 'exit $?'
+}
+
+
+# func_libtoolize
+# ---------------
+# If this package uses libtool, then run 'libtoolize'.
+func_libtoolize ()
+{
+ $debug_cmd
+
+ $require_libtoolize
+
+ test true = "$LIBTOOLIZE" || {
+ _G_libtoolize_options=
+ $opt_copy && func_append _G_libtoolize_options " --copy"
+ $opt_force && func_append _G_libtoolize_options " --force"
+ $opt_verbose || func_append _G_libtoolize_options " --quiet"
+ func_show_eval "$LIBTOOLIZE$_G_libtoolize_options" 'exit $?'
+ }
+}
+
+
+# func_gnulib_tool_copy_file SRC DEST
+# -----------------------------------
+# Copy SRC, a path relative to the gnulib sub-tree, to DEST, a path
+# relative to the top-level source directory using gnulib-tool so that
+# any patches or replacements in $local_gl_dir are applied.
+func_gnulib_tool_copy_file ()
+{
+ $debug_cmd
+
+ $require_gnulib_tool
+ $require_patch
+
+ if test true = "$gnulib_tool"; then
+ # If gnulib-tool is not available (e.g. bootstrapping in a
+ # distribution tarball), make sure that at least we have some
+ # version of the required file already in place.
+ test -f "$2" || func_fatal_error "\
+Can't find, copy or download '$2', a required
+gnulib supplied file, please provide the location of a
+complete 'gnulib' tree by setting 'gnulib_path' in your
+'bootstrap.conf' or with the '--gnulib-srcdir' option -
+or else specify the location of your 'git' binary by
+setting 'GIT' in the environment so that a fresh
+'gnulib' submodule can be cloned."
+ else
+ $require_gnulib_copy_cmd
+
+ $gnulib_copy_cmd $1 $2 2>/dev/null || {
+ $require_gnulib_path
+
+ func_error "'$gnulib_path/$1' does not exist"
+ return 1
+ }
+ fi
+}
+
+
+# func_install_gnulib_non_module_files
+# ------------------------------------
+# Get additional non-module files from gnulib, overriding existing files.
+func_install_gnulib_non_module_files ()
+{
+ $debug_cmd
+
+ $require_build_aux
+ $require_gnulib_tool
+
+ test -n "$gnulib_non_module_files" && {
+ maybe_exit_cmd=:
+
+ for file in $gnulib_non_module_files; do
+ case $file in
+ */COPYING*) dest=COPYING;;
+ */INSTALL) dest=INSTALL;;
+ build-aux/missing) dest=
+ func_warning settings "\
+Please remove build-aux/missing from gnulib_module_files in
+'bootstrap.conf', as it may clash with Automake's version."
+ ;;
+ build-aux/*) dest=$build_aux/`expr "$file" : 'build-aux/\(.*\)'`;;
+ *) dest=$file;;
+ esac
+
+ # Be sure to show all copying errors before bailing out
+ test -z "$dest" \
+ || func_gnulib_tool_copy_file "$file" "$dest" \
+ || maybe_exit_cmd="exit $EXIT_FAILURE"
+ done
+
+ $maybe_exit_cmd
+ }
+}
+
+
+# func_ensure_changelog
+# ---------------------
+# Even with 'gitlog-to-changelog' generated ChangeLogs, automake
+# will not run to completion with no ChangeLog file.
+func_ensure_changelog ()
+{
+ $debug_cmd
+
+ test -f ChangeLog && mv -f ChangeLog ChangeLog~
+
+ cat >ChangeLog <<'EOT'
+## ---------------------- ##
+## DO NOT EDIT THIS FILE! ##
+## ---------------------- ##
+
+ChangeLog is generated by gitlog-to-changelog.
+EOT
+
+ _G_message="creating dummy 'ChangeLog'"
+ test -f ChangeLog~ \
+ && func_append _G_message ' (backup in ChangeLog~)'
+ func_verbose "$_G_message"
+
+ return 0
+}
+
+
+# func_autoreconf
+# ---------------
+# Being careful not to re-run 'autopoint' or 'libtoolize', and not to
+# try to run 'autopoint', 'libtoolize' or 'autoheader' on packages that
+# don't use them, defer to 'autoreconf' for execution of the remaining
+# autotools to bootstrap this package.
+func_autoreconf ()
+{
+ $debug_cmd
+
+ $require_autoheader
+ $require_build_aux # automake and others put files in here
+ $require_macro_dir # aclocal and others put files in here
+
+ # We ran these manually already, and autoreconf won't exec ':'
+ save_AUTOPOINT=$AUTOPOINT; AUTOPOINT=true
+ save_LIBTOOLIZE=$LIBTOOLIZE; LIBTOOLIZE=true
+
+ _G_autoreconf_options=
+ $opt_copy || func_append _G_autoreconf_options " --symlink"
+ $opt_force && func_append _G_autoreconf_options " --force"
+ $opt_verbose && func_append _G_autoreconf_options " --verbose"
+ func_show_eval "$AUTORECONF$_G_autoreconf_options --install" 'exit $?'
+
+ AUTOPOINT=$save_AUTOPOINT
+ LIBTOOLIZE=$save_LIBTOOLIZE
+}
+
+
+# func_check_configuration VARNAME [CONFIGURE_MACRO]
+# --------------------------------------------------
+# Exit with a suitable diagnostic for an important configuration change
+# that needs to be made before bootstrap can run correctly.
+func_check_configuration ()
+{
+ $debug_cmd
+
+ $require_configure_ac
+
+ eval 'test -n "$'$1'"' || {
+ _G_error_msg="please set '$1' in 'bootstrap.conf'"
+ if test -n "$configure_ac" && test -n "$2"; then
+ func_append _G_error_msg "
+or add the following (or similar) to your '$configure_ac':
+$2"
+ fi
+
+ func_fatal_error "$_G_error_msg"
+ }
+}
+
+
+# func_clean_dangling_symlinks
+# ----------------------------
+# Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
+# gnulib-populated directories. Such .m4 files would cause aclocal to
+# fail. The following requires GNU find 4.2.3 or newer. Considering
+# the usual portability constraints of this script, that may seem a very
+# demanding requirement, but it should be ok. Ignore any failure,
+# which is fine, since this is only a convenience to help developers
+# avoid the relatively unusual case where a symlinked-to .m4 file is
+# git-removed from gnulib between successive runs of this script.
+func_clean_dangling_symlinks ()
+{
+ $debug_cmd
+
+ $require_macro_dir
+ $require_source_base
+
+ func_verbose "cleaning dangling symlinks"
+
+ find "$macro_dir" "$source_base" \
+ -depth \( -name '*.m4' -o -name '*.[ch]' \) \
+ -type l -xtype l -delete > /dev/null 2>&1
+}
+
+
+# func_clean_unused_macros
+# ------------------------
+# Autopoint can result in over-zealously adding macros into $macro_dir
+# even though they are not actually used, for example tests to help
+# build the 'intl' directory even though you have specified
+# 'AM_GNU_GETTEXT([external])' in your configure.ac. This function
+# looks removes any macro files that can be found in gnulib, but
+# are not 'm4_include'd by 'aclocal.m4'.
+func_clean_unused_macros ()
+{
+ $debug_cmd
+
+ $require_gnulib_path
+ $require_macro_dir
+
+ test -n "$gnulib_path" && test -f aclocal.m4 && {
+ aclocal_m4s=`find . -name aclocal.m4 -print`
+
+ # We use 'ls|grep' instead of 'ls *.m4' to avoid exceeding
+ # command line length limits in some shells.
+ for file in `cd "$macro_dir" && ls -1 |grep '\.m4$'`; do
+
+ # Remove a macro file when aclocal.m4 does not m4_include it...
+ func_grep_q 'm4_include([[]'$macro_dir/$file'])' $aclocal_m4s \
+ || test ! -f "$gnulib_path/m4/$file" || {
+
+ # ...and there is an identical file in gnulib...
+ if func_cmp_s "$gnulib_path/m4/$file" "$macro_dir/$file"; then
+
+ # ...and it's not in the precious list ('echo' is needed
+ # here to squash whitespace for the match expression).
+ case " "`echo $gnulib_precious`" " in
+ *" $file "*) ;;
+ *) rm -f "$macro_dir/$file"
+ func_verbose \
+ "removing unused gnulib file '$macro_dir/$file'"
+ esac
+ fi
+ }
+ done
+ }
+}
+
+
+# func_skip_po_recommendation
+# ---------------------------
+# If there is a po directory, and '--skip-po' wasn't passed, let the
+# user know that they can use '--skip-po' on subsequent invocations.
+func_skip_po_recommendation ()
+{
+ $debug_cmd
+
+ test ! -d po \
+ || $opt_skip_po \
+ || func_warning recommend "\
+If your pofiles are up-to-date, you can rerun bootstrap
+as '$progname --skip-po' to avoid redownloading."
+}
+
+
+# func_update_dotversion
+# ----------------------
+# Even with 'gitlog-to-changelog' generated ChangeLogs, automake
+# will not run to completion with no ChangeLog file.
+func_update_dotversion ()
+{
+ $debug_cmd
+
+ test -f "$build_aux/git-version-gen" && {
+ _G_message="updating .version"
+ test -f .version && {
+ mv .version .version~
+ func_append _G_message " (backup in .version~)"
+ }
+ func_verbose "updating .version"
+
+ $build_aux/git-version-gen dummy-arg > .version
+ }
+}
+
+
+
+## -------------------- ##
+## Resource management. ##
+## -------------------- ##
+
+# This section contains definitions for functions that each ensure a
+# particular resource (a file, or a non-empty configuration variable for
+# example) is available, and if appropriate to extract default values
+# from pertinent package files. Where a variable already has a non-
+# empty value (as set by the package's 'bootstrap.conf'), that value is
+# used in preference to deriving the default. Call them using their
+# associated 'require_*' variable to ensure that they are executed, at
+# most, once.
+
+
+# require_checkout_only_file
+# --------------------------
+# Bail out if this package only bootstraps properly from a repository
+# checkout.
+require_checkout_only_file=func_require_checkout_only_file
+func_require_checkout_only_file ()
+{
+ $debug_cmd
+
+ $opt_force || {
+ test -n "$checkout_only_file" && test ! -f "$checkout_only_file" \
+ && func_fatal_error "\
+Bootstrapping from a non-checked-out distribution is risky.
+If you wish to bootstrap anyway, use the '--force' option."
+ }
+
+ require_checkout_only_file=:
+}
+
+
+# require_aclocal_amflags
+# -----------------------
+# Ensure '$aclocal_amflags' has a sensible default, extracted from
+# 'Makefile.am' if necessary.
+require_aclocal_amflags=func_require_aclocal_amflags
+func_require_aclocal_amflags ()
+{
+ $debug_cmd
+
+ $require_makefile_am
+
+ _G_sed_extract_aclocal_amflags='s|#.*$||
+ /^[ ]*ACLOCAL_AMFLAGS[ ]*=/ {
+ s|^.*=[ ]*\(.*\)|aclocal_amflags="\1"|
+ p
+ }'
+
+ _G_aclocal_flags_cmd=`$SED -n "$_G_sed_extract_aclocal_amflags" \
+ "$makefile_am"`
+ eval "$_G_aclocal_flags_cmd"
+
+ func_verbose "ACLOCAL_AMFLAGS='$aclocal_amflags'"
+
+ require_aclocal_amflags=:
+}
+
+
+# require_autoheader
+# ------------------
+# Skip autoheader if it's not needed.
+require_autoheader=func_require_autoheader
+func_require_autoheader ()
+{
+ $debug_cmd
+
+ test true = "$AUTOHEADER" || {
+ func_extract_trace AC_CONFIG_HEADERS
+ test -n "$func_extract_trace_result" \
+ || func_extract_trace AC_CONFIG_HEADER
+
+ test -n "$func_extract_trace_result" || {
+ AUTOHEADER=true
+
+ func_verbose "export AUTOHEADER='$AUTOHEADER'"
+
+ # Make sure the search result is visible to subshells
+ export AUTOHEADER
+ }
+ }
+
+ require_autoheader=:
+}
+
+
+# require_autopoint
+# -----------------
+# Skip autopoint if it's not needed.
+require_autopoint=func_require_autopoint
+func_require_autopoint ()
+{
+ $debug_cmd
+
+ test true = "$AUTOPOINT" || {
+ func_extract_trace AM_GNU_GETTEXT_VERSION
+
+ test -n "$func_extract_trace_result" || {
+ AUTOPOINT=true
+
+ func_verbose "export AUTOPOINT='$AUTOPOINT'"
+
+ # Make sure the search result is visible to subshells
+ export AUTOPOINT
+ }
+ }
+
+ require_autopoint=:
+}
+
+
+# require_bootstrap_uptodate
+# --------------------------
+# Complain if the version of bootstrap in the gnulib directory differs
+# from the one we are running.
+require_bootstrap_uptodate=func_require_bootstrap_uptodate
+func_require_bootstrap_uptodate ()
+{
+ $debug_cmd
+
+ $require_build_aux
+
+ _G_bootstrap_sources="
+ $build_aux/bootstrap.in
+ $build_aux/extract-trace
+ $build_aux/funclib.sh
+ $build_aux/options-parser
+ "
+
+ _G_missing_bootstrap_sources=false
+ for _G_src in $_G_bootstrap_sources; do
+ test -f "$_G_src" || _G_missing_bootstrap_sources=:
+ done
+
+ if $_G_missing_bootstrap_sources; then
+ func_warning upgrade "\
+Please add bootstrap to your gnulib_modules list in
+'bootstrap.conf', so that I can tell you when there are
+updates available."
+ else
+ $build_aux/inline-source $build_aux/bootstrap.in > bootstrap.new
+
+ if func_cmp_s "$progpath" bootstrap.new; then
+ rm -f bootstrap.new
+ func_verbose "bootstrap script up to date"
+ else
+ func_warning upgrade "\
+An updated bootstrap script has been generated for you in
+'bootstrap.new'. After you've verified that you want
+the changes, you can update with:
+ cat bootstrap.new > $progname
+ ./$progname
+
+Or you can disable this check permanently by adding the
+following to 'bootstrap.conf':
+ require_bootstrap_uptodate=:"
+ fi
+ fi
+
+ require_bootstrap_uptodate=:
+}
+
+
+# require_build_aux
+# -----------------
+# Ensure that '$build_aux' is set, and if it doesn't already point to an
+# existing directory, create one.
+require_build_aux=func_require_build_aux
+func_require_build_aux ()
+{
+ $debug_cmd
+
+ test -n "$build_aux" || {
+ func_extract_trace_first AC_CONFIG_AUX_DIR
+ build_aux=$func_extract_trace_first_result
+ func_check_configuration build_aux \
+ "AC_CONFIG_AUX_DIR([name of a directory for build scripts])"
+
+ func_verbose "build_aux='$build_aux'"
+ }
+
+ $require_vc_ignore_files
+
+ # If the build_aux directory doesn't exist, create it now, and mark it
+ # as ignored for the VCS.
+ if test ! -d "$build_aux"; then
+ func_show_eval "mkdir '$build_aux'"
+
+ test -n "$vc_ignore_files" \
+ || func_insert_if_absent "$build_aux" $vc_ignore_files
+ fi
+
+ require_build_aux=:
+}
+
+
+# require_buildreq_autobuild
+# --------------------------
+# Try to find whether the bootstrap requires autobuild.
+require_buildreq_autobuild=func_require_buildreq_autobuild
+func_require_buildreq_autobuild ()
+{
+ $debug_cmd
+
+ $require_macro_dir
+
+ test -f "$macro_dir/autobuild.m4" \
+ || printf '%s\n' "$buildreq" |func_grep_q '^[ ]*autobuild' \
+ || {
+ func_extract_trace AB_INIT
+ test -n "$func_extract_trace_result" && {
+ func_append buildreq 'autobuild - http://josefsson.org/autobuild/
+'
+ func_verbose "auto-adding 'autobuild' to build requirements"
+ }
+ }
+
+ require_buildreq_autobuild=:
+}
+
+
+# require_buildreq_autoconf
+# require_buildreq_autopoint
+# require_buildreq_libtoolize
+# ---------------------------
+# Try to find the minimum compatible version of autoconf/libtool
+# required to bootstrap successfully, and add it to '$buildreq'.
+for tool in autoconf libtoolize autopoint; do
+ b=$tool
+ v=require_buildreq_${tool}
+ f=func_$v
+ case $tool in
+ autoconf) m=AC_PREREQ ;;
+ libtoolize) m=LT_PREREQ; b=libtool ;;
+ autopoint) m=AM_GNU_GETTEXT_VERSION b=gettext ;;
+ esac
+
+ eval $v'='$f'
+ '$f' ()
+ {
+ $debug_cmd
+
+ # The following is ignored if undefined, but might be necessary
+ # in order for `func_find_tool` to run.
+ ${require_'$tool'-:}
+
+ printf '\''%s\n'\'' "$buildreq" |func_grep_q '\''^[ ]*'$tool\'' || {
+ func_extract_trace '$m'
+ _G_version=$func_extract_trace_result
+ test -n "$_G_version" && {
+ func_append buildreq "\
+ '$tool' $_G_version http://www.gnu.org/s/'$b'
+"
+ func_verbose \
+ "auto-adding '\'$tool'-'$_G_version\'' to build requirements"
+ }
+ }
+
+ '$v'=:
+ }
+'
+done
+
+
+# require_buildreq_automake
+# -------------------------
+# Try to find the minimum compatible version of automake required to
+# bootstrap successfully, and add it to '$buildreq'.
+require_buildreq_automake=func_require_buildreq_automake
+func_require_buildreq_automake ()
+{
+ $debug_cmd
+
+ # if automake is not already listed in $buildreq...
+ printf '%s\n' "$buildreq" |func_grep_q automake || {
+ func_extract_trace AM_INIT_AUTOMAKE
+
+ # ...and AM_INIT_AUTOMAKE is declared...
+ test -n "$func_extract_trace_result" && {
+ automake_version=`$bs_echo "$func_extract_trace_result" \
+ |$SED -e 's|[^0-9]*||' -e 's| .*$||'`
+ test -n "$automake_version" || automake_version=-
+
+ func_append buildreq "\
+ automake $automake_version http://www.gnu.org/s/automake
+"
+ func_verbose \
+ "auto-adding 'automake-$automake_version' to build requirements"
+ }
+ }
+
+ require_buildreq_automake=:
+}
+
+
+# require_buildreq_patch
+# ----------------------
+# Automatically add a patch build-requirement if there are diff files
+# in $local_gl_dir.
+require_buildreq_patch=func_require_buildreq_patch
+func_require_buildreq_patch ()
+{
+ $debug_cmd
+
+ $require_local_gl_dir
+
+ # This ensures PATCH is set appropriately by the time
+ # func_check_versions enforces $buildreq.
+ $require_patch
+
+ # If patch is not already listed in $buildreq...
+ printf '%s\n' "$buildreq" |func_grep_q '^[ ]*patch' || {
+ # The ugly find invocation is necessary to exit with non-zero
+ # status for old find binaries that don't support -exec fully.
+ if test ! -d "$local_gl_dir" \
+ || find "$local_gl_dir" -name *.diff -exec false {} \; ; then :
+ else
+ func_append buildreq 'patch - http://www.gnu.org/s/patch
+'
+ fi
+ }
+
+ require_buildreq_patch=:
+}
+
+
+# require_buildtools_uptodate
+# ---------------------------
+# Ensure all the packages listed in BUILDREQS are available on the build
+# machine at the minimum versions or better.
+require_buildtools_uptodate=func_require_buildtools_uptodate
+func_require_buildtools_uptodate ()
+{
+ $debug_cmd
+
+ $require_buildreq_autobuild
+ $require_buildreq_autoconf
+ $require_buildreq_automake
+ $require_buildreq_libtoolize
+ $require_buildreq_autopoint
+ $require_buildreq_patch
+
+ test -n "$buildreq" && {
+ _G_error_hdr=
+
+ func_check_versions $buildreq
+ $func_check_versions_result || {
+ test -n "$buildreq_readme" \
+ && test -f "$buildreq_readme" \
+ && _G_error_hdr="\
+$buildreq_readme explains how to obtain these prerequisite programs:
+"
+ func_strtable 0 11 12 36 \
+ "Program" "Min_version" "Homepage" $buildreq
+ func_fatal_error "$_G_error_hdr$func_strtable_result"
+ }
+ }
+
+ require_buildtools_uptodate=:
+}
+
+
+# require_copyright_holder
+# ------------------------
+# Ensure there is a sensible non-empty default value in '$copyright_holder'.
+require_copyright_holder=func_require_copyright_holder
+func_require_copyright_holder ()
+{
+ $debug_cmd
+
+ test -n "$copyright_holder" || {
+ copyright_holder='Free Software Foundation, Inc.'
+ func_warning settings "\
+Please set copyright_holder explicitly in 'bootstrap.conf';
+defaulting to '$copyright_holder'."
+ }
+
+ require_copyright_holder=:
+}
+
+
+# require_doc_base
+# ----------------
+# Ensure doc_base has a sensible value, extracted from 'gnulib-cache.m4'
+# if possible, otherwise letting 'gnulib-tool' pick a default.
+require_doc_base=func_require_doc_base
+func_require_doc_base ()
+{
+ $debug_cmd
+
+ $require_gnulib_cache
+
+ test -f "$gnulib_cache" && test -z "$doc_base" && {
+ func_extract_trace_first "gl_DOC_BASE" "$gnulib_cache"
+ doc_base=$func_extract_trace_first_result
+
+ test -n "$doc_base" && func_verbose "doc_base='$doc_base'"
+ }
+
+ require_doc_base=:
+}
+
+
+# require_dotgitmodules
+# ---------------------
+# Ensure we have a '.gitmodules' file, with appropriate 'gnulib' settings.
+require_dotgitmodules=func_require_dotgitmodules
+func_require_dotgitmodules ()
+{
+ $debug_cmd
+
+ $require_git
+
+ test true = "$GIT" || {
+ # A gnulib entry in .gitmodules always takes precedence.
+ _G_path=`$GIT config --file .gitmodules submodule.gnulib.path 2>/dev/null`
+
+ test -n "$_G_path" || {
+ $require_vc_ignore_files
+
+ func_verbose "creating '.gitmodules'"
+
+ # If the .gitmodules file doesn't exist, create it now, and mark
+ # it as ignored for the VCS.
+ test -n "$gnulib_path" || gnulib_path=gnulib
+ test -n "$gnulib_url" || gnulib_url=git://git.sv.gnu.org/gnulib
+ {
+ echo '[submodule "gnulib"]'
+ echo " path = $gnulib_path"
+ echo " url = $gnulib_url"
+ } >> .gitmodules
+
+ test -n "$vc_ignore_files" \
+ || func_insert_if_absent ".gitmodules" $vc_ignore_files
+ }
+ }
+
+ require_dotgitmodules=:
+}
+
+
+# require_extra_locale_categories
+# -------------------------------
+# Ensure there is a default value in '$extra_locale_categories'
+require_extra_locale_categories=func_require_extra_locale_categories
+func_require_extra_locale_categories ()
+{
+ $debug_cmd
+
+ # Defaults to empty, so run with whatever value may have been set in
+ # 'bootstrap.conf'.
+ require_extra_locale_categories=:
+}
+
+
+# require_git
+# -----------
+# Ignore git if it's not available, or we're not in a git checkout tree.
+require_git=func_require_git
+func_require_git ()
+{
+ $debug_cmd
+
+ $opt_skip_git && GIT=true
+
+ test true = "$GIT" || {
+ if test -f .gitignore && ($GIT --version) >/dev/null 2>&1; then :; else
+ GIT=true
+ fi
+ }
+
+ func_verbose "GIT='$GIT'"
+
+ require_git=:
+}
+
+
+# require_gnulib_cache
+# --------------------
+# Ensure there is a non-empty default for '$gnulib_cache', and that it
+# names an existing file.
+require_gnulib_cache=func_require_gnulib_cache
+func_require_gnulib_cache ()
+{
+ $debug_cmd
+
+ $require_macro_dir
+
+ test -n "$gnulib_cache" \
+ || gnulib_cache=$macro_dir/gnulib-cache.m4
+
+ func_verbose "found '$gnulib_cache'"
+
+ require_gnulib_cache=:
+}
+
+
+# require_gnulib_copy_cmd
+# -----------------------
+# Only calculate the options for copying files with gnulib once.
+require_gnulib_copy_cmd=func_require_gnulib_copy_cmd
+func_require_gnulib_copy_cmd ()
+{
+ $debug_cmd
+
+ $require_gnulib_tool
+ $require_gnulib_tool_base_options
+
+ gnulib_copy_cmd="$gnulib_tool $gnulib_tool_base_options --copy-file"
+ $opt_copy || func_append gnulib_copy_cmd " --symlink"
+ $opt_quiet || func_append gnulib_copy_cmd " --verbose"
+
+ require_gnulib_copy_cmd=:
+}
+
+
+# require_gnulib_merge_changelog
+# ------------------------------
# See if we can use gnulib's git-merge-changelog merge driver.
-if test -d .git && (git --version) >/dev/null 2>/dev/null ; then
- if git config merge.merge-changelog.driver >/dev/null ; then
- :
- elif (git-merge-changelog --version) >/dev/null 2>/dev/null ; then
- func_echo "initializing git-merge-changelog driver"
- git config merge.merge-changelog.name 'GNU-style ChangeLog merge driver'
- git config merge.merge-changelog.driver 'git-merge-changelog %O %A %B'
- else
- func_echo "consider installing git-merge-changelog from gnulib"
- fi
- if git config diff.texinfo.funcname >/dev/null ; then
- :
- else
- func_echo "initializing git texinfo diff driver"
- git config diff.texinfo.funcname '^@node[ \t][ \t]*\\([^,][^,]*\\)'
- fi
-fi
+require_gnulib_merge_changelog=func_require_gnulib_merge_changelog
+func_require_gnulib_merge_changelog ()
+{
+ $debug_cmd
-## ------------------------------ ##
-## Update the gnulib module tree. ##
-## ------------------------------ ##
+ test -f ChangeLog && {
+ $require_git
-if test -d .git && (git --version) >/dev/null 2>/dev/null ; then
- if test -f gnulib/gnulib-tool ; then
- func_echo "updating gnulib submodule"
- git submodule update \
- || func_fatal_error "Unable to update gnulib"
- else
- # A fresh checkout creates an empty subdirectory gnulib. However,
- # older git didn't know how to clone into an empty subdir. If the
- # user provided GNULIB_SRCDIR, then make the initial clone refer
- # to the existing checkout, to save network traffic.
- func_echo "importing gnulib submodule"
- if test -d "$GNULIB_SRCDIR" ; then
- rmdir gnulib 2>/dev/null
- git clone --reference "$GNULIB_SRCDIR" git://git.sv.gnu.org/gnulib.git \
- && git submodule init && git submodule update \
- || func_fatal_error "Unable to update gnulib"
+ func_grep_q '^\(/\|\)ChangeLog$' .gitignore || test true = "$GIT" || {
+ if $GIT config merge.merge-changelog.driver >/dev/null; then
+ :
+ elif (git-merge-changelog --version) >/dev/null 2>&1; then
+ func_echo "initializing git-merge-changelog driver"
+ $GIT config merge.merge-changelog.name 'GNU-style ChangeLog merge driver'
+ $GIT config merge.merge-changelog.driver 'git-merge-changelog %O %A %B'
+ else
+ func_warning recommend \
+ "Consider installing git-merge-changelog from gnulib."
+ fi
+ }
+ }
+
+ require_gnulib_merge_changelog=:
+}
+
+
+# require_gnulib_mk
+# -----------------
+# Ensure gnulib_mk has a sensible value, extracted from 'gnulib-cache.m4'
+# if possible, otherwise letting 'gnulib-tool' pick a default.
+require_gnulib_mk=func_require_gnulib_mk
+func_require_gnulib_mk ()
+{
+ $debug_cmd
+
+ $require_gnulib_cache
+
+ test -f "$gnulib_cache" && test -z "$gnulib_mk" && {
+ func_extract_trace_first "gl_MAKEFILE_NAME" "$gnulib_cache"
+ gnulib_mk=$func_extract_trace_first_result
+
+ test -n "$gnulib_mk" && func_verbose "gnulib_mk='$gnulib_mk'"
+ }
+
+ require_gnulib_mk=:
+}
+
+
+# require_gnulib_name
+# -------------------
+# Ensure gnulib_name has a sensible value, extracted from 'gnulib-cache.m4'
+# if possible, otherwise letting 'gnulib-tool' pick a default.
+require_gnulib_name=func_require_gnulib_name
+func_require_gnulib_name ()
+{
+ $debug_cmd
+
+ $require_gnulib_cache
+
+ test -f "$gnulib_cache" && test -z "$gnulib_name" && {
+ func_extract_trace_first "gl_LIB" "$gnulib_cache"
+ gnulib_name=$func_extract_trace_first_result
+
+ test -n "$gnulib_name" && func_verbose "gnulib_name='$gnulib_name'"
+ }
+
+ require_gnulib_name=:
+}
+
+
+# require_gnulib_path
+# require_gnulib_url
+# -------------------
+# Ensure 'gnulib_path' and 'gnulib_url' are set.
+require_gnulib_path=func_require_dotgitmodules_parameters
+require_gnulib_url=func_require_dotgitmodules_parameters
+func_require_dotgitmodules_parameters ()
+{
+ $debug_cmd
+
+ $require_git
+
+ test true = "$GIT" && {
+ # If we can't find git (or if the user specified '--skip-git'),
+ # then use an existing gnulib directory specified with
+ # '--gnulib-srcdir' if possible.
+ test -n "$gnulib_path" \
+ || test ! -x "$opt_gnulib_srcdir/gnulib-tool" \
+ || gnulib_path=$opt_gnulib_srcdir
+ }
+
+
+ $require_dotgitmodules
+
+ test -f .gitmodules && {
+ # Extract the parameters with sed, since git may be missing
+ test -n "$gnulib_path" \
+ || gnulib_path=`$SED -e '/^.submodule "gnulib".$/,${
+ /[ ]*path *= */{
+ s|[ ]*||g;s|^[^=]*=||;p
+ }
+ }
+ d' .gitmodules |$SED 1q`
+ test -n "$gnulib_url" \
+ || gnulib_url=`$SED -e '/^.submodule "gnulib".$/,${
+ /[ ]*url *= */{
+ s|[ ]*||g;s|^[^=]*=||;p
+ }
+ }
+ d' .gitmodules |$SED 1q`
+
+ func_verbose "gnulib_path='$gnulib_path'"
+ func_verbose "gnulib_url='$gnulib_url'"
+ }
+
+ require_gnulib_path=:
+ require_gnulib_url=:
+}
+
+
+# require_gnulib_submodule
+# ------------------------
+# Ensure that there is a current gnulib submodule at '$gnulib_path'.
+require_gnulib_submodule=func_require_gnulib_submodule
+func_require_gnulib_submodule ()
+{
+ $debug_cmd
+
+ $require_git
+
+ if test true = "$GIT"; then
+ func_warning recommend \
+ "No 'git' found; imported gnulib modules may be outdated."
+ else
+ $require_gnulib_path
+ $require_gnulib_url
+
+ if test -f .gitmodules && test -f "$gnulib_path/gnulib-tool"; then
+ : All present and correct.
+
+ elif test -n "$opt_gnulib_srcdir"; then
+ # Older git can't clone into an empty directory.
+ rmdir "$gnulib_path" 2>/dev/null
+ func_show_eval "$GIT clone --reference '$opt_gnulib_srcdir' \
+ '$gnulib_url' '$gnulib_path'" \
+ || func_fatal_error "Unable to fetch gnulib submodule."
+
+ # Without --gnulib-srcdir, and no existing checked out submodule, we
+ # create a new shallow clone of the remote gnulib repository.
+ else
+ trap func_cleanup_gnulib 1 2 13 15
+
+ shallow=
+ $GIT clone -h 2>&1 |func_grep_q -- --depth \
+ && shallow='--depth 365'
+
+ func_show_eval "$GIT clone $shallow '$gnulib_url' '$gnulib_path'" \
+ func_cleanup_gnulib
+
+ # FIXME: Solaris /bin/sh will try to execute '-' if any of
+ # these signals are caught after this.
+ trap - 1 2 13 15
+ fi
+
+ # Make sure we've checked out the correct revision of gnulib.
+ func_show_eval "$GIT submodule init" \
+ && func_show_eval "$GIT submodule update" \
+ || func_fatal_error "Unable to update gnulib submodule."
+ fi
+
+ require_gnulib_submodule=:
+}
+
+
+# require_gnulib_tool
+# -------------------
+# Ensure that '$gnulib_tool' is set, and points to an executable file,
+# or else fall back to using the binary 'true' if the main gnulib
+# files appear to have been imported already.
+require_gnulib_tool=func_require_gnulib_tool
+func_require_gnulib_tool ()
+{
+ $debug_cmd
+
+ test true = "$gnulib_tool" || {
+ $require_gnulib_submodule
+ $require_gnulib_path
+
+ test -n "$gnulib_tool" \
+ || gnulib_tool=$gnulib_path/gnulib-tool
+
+ test -x "$gnulib_tool" || {
+ gnulib_tool=true
+ func_warning recommend \
+ "No 'gnulib-tool' found; gnulib modules may be missing."
+ }
+
+ test true = "$gnulib_tool" \
+ || func_verbose "found '$gnulib_tool'"
+ }
+
+ require_gnulib_tool=:
+}
+
+
+# require_gnulib_tool_base_options
+# --------------------------------
+# Ensure that '$gnulib_tool_base_options' contains all the base options
+# required according to user configuration from bootstrap.conf.
+require_gnulib_tool_base_options=func_require_gnulib_tool_base_options
+func_require_gnulib_tool_base_options ()
+{
+ $debug_cmd
+
+ $require_gnulib_tool
+
+ gnulib_tool_base_options=
+
+ test true = "$gnulib_tool" || {
+ # 'gnulib_modules' and others are maintained in 'bootstrap.conf':
+ # Use 'gnulib --import' to fetch gnulib modules.
+ $require_build_aux
+ test -n "$build_aux" \
+ && func_append_uniq gnulib_tool_base_options " --aux-dir=$build_aux"
+ $require_macro_dir
+ test -n "$macro_dir" \
+ && func_append_uniq gnulib_tool_base_options " --m4-base=$macro_dir"
+ $require_doc_base
+ test -n "$doc_base" \
+ && func_append_uniq gnulib_tool_base_options " --doc-base=$doc_base"
+ $require_gnulib_name
+ test -n "$gnulib_name" \
+ && func_append_uniq gnulib_tool_base_options " --lib=$gnulib_name"
+ $require_local_gl_dir
+ test -n "$local_gl_dir" \
+ && func_append_uniq gnulib_tool_base_options " --local-dir=$local_gl_dir"
+ $require_source_base
+ test -n "$source_base" \
+ && func_append_uniq gnulib_tool_base_options " --source-base=$source_base"
+ }
+
+ require_gnulib_tool_base_options=:
+}
+
+
+# require_libtoolize
+# ------------------
+# Skip libtoolize if it's not needed.
+require_libtoolize=func_require_libtoolize
+func_require_libtoolize ()
+{
+ $debug_cmd
+
+ # Unless we're not searching for libtool use by this package, set
+ # LIBTOOLIZE to true if none of 'LT_INIT', 'AC_PROG_LIBTOOL' and
+ # 'AM_PROG_LIBTOOL' are used in configure.
+ test true = "$LIBTOOLIZE" || {
+ func_extract_trace LT_INIT
+ test -n "$func_extract_trace_result" || func_extract_trace AC_PROG_LIBTOOL
+ test -n "$func_extract_trace_result" || func_extract_trace AM_PROG_LIBTOOL
+ test -n "$func_extract_trace_result" || LIBTOOLIZE=true
+ }
+
+ test -n "$LIBTOOLIZE" || {
+ # Find libtoolize, named glibtoolize in Mac Ports, but prefer
+ # user-installed libtoolize to ancient glibtoolize shipped by
+ # Apple with Mac OS X when Mac Ports is not installed.
+ func_find_tool LIBTOOLIZE libtoolize glibtoolize
+ }
+
+ func_verbose "export LIBTOOLIZE='$LIBTOOLIZE'"
+
+ # Make sure the search result is visible to subshells
+ export LIBTOOLIZE
+
+ require_libtoolize=:
+}
+
+
+# require_local_gl_dir
+# --------------------
+# Ensure local_gl_dir has a sensible value, extracted from 'gnulib-cache.m4'
+# if possible, otherwise letting 'gnulib-tool' pick a default.
+require_local_gl_dir=func_require_local_gl_dir
+func_require_local_gl_dir ()
+{
+ $debug_cmd
+
+ $require_gnulib_cache
+
+ test -f "$gnulib_cache" && test -z "$local_gl_dir" && {
+ func_extract_trace_first "gl_LOCAL_DIR" "$gnulib_cache"
+ local_gl_dir=$func_extract_trace_first_result
+
+ test -n "$local_gl_dir" && func_verbose "local_gl_dir='$local_gl_dir'"
+ }
+
+ require_local_gl_dir=:
+}
+
+
+# require_macro_dir
+# -----------------
+# Ensure that '$macro_dir' is set, and if it doesn't already point to an
+# existing directory, create one.
+require_macro_dir=func_require_macro_dir
+func_require_macro_dir ()
+{
+ $debug_cmd
+
+ # Sometimes this is stored in 'configure.ac'.
+ test -n "$macro_dir" || {
+ # AC_CONFIG_MACRO_DIRS takes a space delimited list of directories,
+ # but we only care about the first one in bootstrap.
+ func_extract_trace_first AC_CONFIG_MACRO_DIRS
+ macro_dir=`expr "x$func_extract_trace_first_result" : 'x\([^ ]*\)'`
+ }
+ test -n "$macro_dir" || {
+ func_extract_trace_first AC_CONFIG_MACRO_DIR
+ macro_dir=$func_extract_trace_first_result
+ }
+
+ # Otherwise we might find it in 'Makefile.am'.
+ test -n "$macro_dir" || {
+ $require_aclocal_amflags
+
+ # Take the argument following the first '-I', if any.
+ _G_minus_I_seen=false
+ for _G_arg in $aclocal_amflags; do
+ case $_G_minus_I_seen,$_G_arg in
+ :,*) macro_dir=$_G_arg; break ;;
+ *,-I) _G_minus_I_seen=: ;;
+ *,-I*) macro_dir=`expr x$_G_arg : 'x-I\(.*\)$'`; break ;;
+ esac
+ done
+ }
+
+ func_verbose "macro_dir='$macro_dir'"
+
+ func_check_configuration macro_dir \
+ "AC_CONFIG_MACRO_DIRS([name of a directory for configure m4 files])"
+
+ $require_vc_ignore_files
+
+ # If the macro_dir directory doesn't exist, create it now, and mark it
+ # as ignored for the VCS.
+ if test ! -d "$macro_dir"; then
+ mkdir "$macro_dir" || func_permissions_error "$macro_dir"
+
+ test -n "$vc_ignore_files" \
+ || func_insert_if_absent "$macro_dir" $vc_ignore_files
+ fi
+
+ require_macro_dir=:
+}
+
+
+# require_makefile_am
+# -------------------
+# Ensure there is a 'Makefile.am' in the current directory.
+# names an existing file.
+require_makefile_am=func_require_makefile_am
+func_require_makefile_am ()
+{
+ $debug_cmd
+
+ test -n "$makefile_am" \
+ || makefile_am=Makefile.am
+
+ <"$makefile_am"
+
+ func_verbose "found '$makefile_am'"
+
+ require_makefile_am=:
+}
+
+
+# require_package
+# ---------------
+# Ensure that '$package' contains a sensible default value.
+require_package=func_require_package
+func_require_package ()
+{
+ $debug_cmd
+
+ test -n "$package" || {
+ $require_package_name
+
+ package=`echo "$package_name" \
+ |$SED -e 's/GNU //' \
+ -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ }
+
+ func_verbose "package='$package'"
+
+ require_package=:
+}
+
+
+# require_package_bugreport
+# -------------------------
+# Ensure that this has a sensible value, extracted from 'configure.ac'
+# if appropriate (and possible!).
+require_package_bugreport=func_require_package_bugreport
+func_require_package_bugreport ()
+{
+ $debug_cmd
+
+ func_extract_trace AC_INIT
+
+ save_ifs=$IFS
+ IFS=:
+ set dummy $func_extract_trace_result
+ IFS=$save_ifs
+ shift
+
+ test -n "$package_bugreport" || package_bugreport=$3
+ func_check_configuration package_bugreport \
+ "AC_INIT([$package_name], [$package_version], [bug-$package@gnu.org])"
+ func_verbose "package_bugreport='$package_bugreport'"
+
+ require_package_bugreport=:
+}
+
+
+# require_package_name
+# --------------------
+# Ensure that this has a sensible value, extracted from 'configure.ac'
+# if appropriate (and possible!).
+require_package_name=func_require_package_name
+func_require_package_name ()
+{
+ $debug_cmd
+
+ func_extract_trace AC_INIT
+
+ save_ifs=$IFS
+ IFS=:
+ set dummy $func_extract_trace_result
+ IFS=$save_ifs
+ shift
+
+ test -n "$package_name" || package_name=$1
+ func_check_configuration package_name \
+ "AC_INIT([name of your package], [package version number])"
+ func_verbose "package_name='$package_name'"
+
+ require_package_name=:
+}
+
+
+# require_package_version
+# -----------------------
+# Ensure that this has a sensible value, extracted from 'configure.ac'
+# if appropriate (and possible!). While we might have set all the
+# parameters extracted from AC_INIT at once, 'package_version' in
+# particular is not necessarily available as early as the others, since
+# 'git-version-gen' is often involved, and until then we can't rely on
+# getting a correct version number from an AC_INIT extraction.
+require_package_version=func_require_package_version
+func_require_package_version ()
+{
+ $debug_cmd
+
+ func_extract_trace AC_INIT
+
+ save_ifs=$IFS
+ IFS=:
+ set dummy $func_extract_trace_result
+ IFS=$save_ifs
+ shift
+
+ test -n "$package_version" || package_version=$2
+ test -n "$package_version" || {
+ # The embedded echo is to squash whitespace before globbing.
+ case " "`echo $gnulib_modules`" " in
+ *" git-version-gen "*)
+ func_fatal_error "\
+cannot \$require_package_version in bootstrap.conf before
+func_gnulib_tool has installed the 'git-version-gen' script."
+ ;;
+ *)
+ func_check_configuration package_version \
+ "AC_INIT([name of your package], [package version number])"
+ ;;
+ esac
+ }
+ func_verbose "package_version='$package_version'"
+
+ require_package_version=:
+}
+
+
+# require_patch
+# -------------
+# Find patch, according to the PATCH environment variable, or else
+# searching the user's PATH.
+require_patch=func_require_patch
+func_require_patch ()
+{
+ $debug_cmd
+
+ test -n "$PATCH" || {
+ # Find a patch program, preferring gpatch, which is usually better
+ # than the vendor patch.
+ func_find_tool PATCH gpatch patch
+ }
+
+ func_verbose "export PATCH='$PATCH'"
+
+ # Make sure the search result is visible to subshells
+ export PATCH
+
+ require_patch=:
+}
+
+
+# require_source_base
+# -------------------
+# Ensure that source_base has a sensible value, extracted from
+# 'gnulib-cache.m4' if possible.
+require_source_base=func_require_source_base
+func_require_source_base ()
+{
+ $debug_cmd
+
+ $require_gnulib_cache
+
+ test -f "$gnulib_cache" && test -z "$source_base" && {
+ func_extract_trace_first "gl_SOURCE_BASE" "$gnulib_cache"
+
+ source_base=$func_extract_trace_first_result
+
+ func_verbose "source_base='$source_base'"
+ }
+
+ require_source_base=:
+}
+
+
+# require_vc_ignore_files
+# -----------------------
+# Ensure that '$vc_ignore' has been processed to list VCS ignore files
+# in '$vc_ignore_files'
+require_vc_ignore_files=func_require_vc_ignore_files
+func_require_vc_ignore_files ()
+{
+ $debug_cmd
+
+ test -n "$vc_ignore" || vc_ignore=auto
+
+ if test auto = "$vc_ignore" && test -z "$vc_ignore_files"; then
+ vc_ignore_files=
+ test -d .git && vc_ignore_files=.gitignore
+ test -d CVS && vc_ignore_files="$vc_ignore_files .cvsignore"
else
- git submodule update --init \
- || func_fatal_error "Unable to update gnulib"
+ vc_ignore_files=$vc_ignore
fi
- fi
+
+ func_verbose "vc_ignore_files='$vc_ignore_files'"
+
+ require_vc_ignore_files=:
+}
+
+
+## ------------------##
+## Helper functions. ##
+## ------------------##
+
+# This section contains the helper functions used by the rest of 'bootstrap'.
+
+# func_len STRING
+# ---------------
+# STRING may not start with a hyphen.
+if (eval 'x=123; test x${#x} = "x3"') 2>/dev/null
+then
+ # This is an XSI compatible shell, allowing a faster implementation...
+ eval 'func_len ()
+ {
+ $debug_cmd
+
+ func_len_result=${#1}
+ }'
else
- func_echo "git not detected. If needed, update gnulib subdirectory manually"
+ # ...otherwise fall back to using expr, which is often a shell builtin.
+ func_len ()
+ {
+ $debug_cmd
+
+ func_len_result=`expr "$1" : ".*" 2>/dev/null || echo 0`
+ }
fi
-## ---------------------- ##
-## Import Gnulib modules. ##
-## ---------------------- ##
-func_echo "running: $CONFIG_SHELL gnulib/gnulib-tool --update"
-$CONFIG_SHELL gnulib/gnulib-tool --update \
- || func_fatal_error "gnulib-tool failed"
+# func_unset VAR
+# --------------
+# Portably unset VAR.
+# In some shells, an 'unset VAR' statement leaves a non-zero return
+# status if VAR is already unset, which might be problematic if the
+# statement is used at the end of a function (thus poisoning its return
+# value) or when 'set -e' is active (causing even a spurious abort of
+# the script in this case).
+func_unset ()
+{
+ { eval $1=; unset $1; }
+}
+unset=func_unset
+
+
+# func_cmp_s FILE1 FILE2
+# ----------------------
+# Return non-zero exit status unless FILE1 and FILE2 are identical, without
+# any output at all, even error messages.
+func_cmp_s ()
+{
+ $debug_cmd
+
+ # This function relies on non-zero exit status, which will cause the
+ # program to exit when running in 'set -e' mode.
+ $CMP "$@" >/dev/null 2>&1
+}
+
+
+# func_grep_q EXPRESSION [FILENAME..]
+# -----------------------------------
+# Check whether EXPRESSION matches any line of any listed FILENAME,
+# without any output at all, even error messages.
+func_grep_q ()
+{
+ $debug_cmd
+
+ # This function relies on non-zero exit status, which will cause the
+ # program to exit when running in 'set -e' mode.
+ $GREP "$@" >/dev/null 2>&1
+}
+
+
+# func_ifcontains LIST MEMBER YES-CMD [NO-CMD]
+# --------------------------------------------
+# If whitespace-separated LIST contains MEMBER then execute YES-CMD,
+# otherwise if NO-CMD was give, execute that.
+func_ifcontains ()
+{
+ $debug_cmd
+
+ # The embedded echo is to squash whitespace before globbing.
+ _G_wslist=`$bs_echo " "$1" "`
+ _G_member=$2
+ _G_yes_cmd=$3
+ _G_no_cmd=${4-":"}
+
+ case $_G_wslist in
+ *" $_G_member "*)
+ eval "$_G_yes_cmd"
+ _G_status=$?
+ ;;
+ *)
+ eval "$_G_no_cmd"
+ _G_status=$?
+ ;;
+ esac
+
+ test 0 -eq "$_G_status" || exit $_G_status
+}
+
+
+# func_strpad STR WIDTH CHAR
+# --------------------------
+# Trim STR, or pad with CHAR to force a total length of WIDTH.
+func_strpad ()
+{
+ $debug_cmd
+
+ _G_width=`expr "$2" - 1`
+ func_strpad_result=`$bs_echo "$1" |$SED '
+ :a
+ s|^.\{0,'"$_G_width"'\}$|&'"$3"'|
+ ta
+ '`
+}
+
+
+# func_strrpad STR WIDTH CHAR
+# ---------------------------
+# Trim STR, or right-justify-pad with CHAR to force a total length of
+# WIDTH.
+func_strrpad ()
+{
+ $debug_cmd
+
+ _G_width=`expr "$2" - 1`
+ func_strrpad_result=`$bs_echo "$1" |$SED '
+ :a
+ s|^.\{0,'"$_G_width"'\}$|'"$3"'&|
+ ta
+ '`
+}
+
+
+# func_strrow INDENT FIELD WIDTH [FIELDn WIDTHn]...
+# -------------------------------------------------
+# Return a string containing each FIELD left justified to WIDTH, with
+# the whole thing indented by INDENT spaces. This function is used to
+# render one row of aligned columns for a table by func_strtable().
+func_strrow ()
+{
+ $debug_cmd
+
+ func_strrow_linelen=$1; shift
+
+ _G_row=
+ while test $# -gt 0; do
+ func_strrow_linelen=`expr $func_strrow_linelen + $2`
+ func_strpad "$1" $2 " "
+ func_append _G_row "$func_strpad_result"
+ shift; shift
+ done
+
+ func_strrpad "$_G_row" $func_strrow_linelen " "
+ func_strrow_result=$func_strrpad_result
+}
+
+
+# func_strtable INDENT WIDTH1...WIDTHn HEADER1...HEADERn FIELD1...FIELDn
+# ----------------------------------------------------------------------
+# Generate a string of newline-separated rows arranged in lined-up
+# columns of the given WIDTHs, with the entire table indented by INDENT
+# spaces. The number of columns is determined by the number of integer
+# valued WIDTH arguments following INDENT. The next set (i.e. a number
+# of arguments equal to the number of WIDTH arguments) of fields are
+# treated as the table's column HEADERs, and are separated from the
+# remainder of the table by an indented row of '-' characters. Remaining
+# arguments are each aligned below the next available header, wrapping
+# to a new row as necessary. Finally another row of '-' characters is
+# added to mark the end of the table.
+#
+# For example an unindented 3 column table with 2 rows of data would be
+# generated by this call:
+#
+# func_strtable 3 20 10 25 \
+# Header1 Header2 Header3 \
+# Row1Col1 Row1Col2 Row1Col3 \
+# Row2Col1 Row2Col2 Row2Col3
+#
+# returning the following string:
+#
+# " Header1 Header2 Header3
+# -------------------------------------------------------
+# Row1Col1 Row1Col2 Row1Col3
+# Row2Col1 Row2Col2 Row2Col3
+# -------------------------------------------------------"
+func_strtable ()
+{
+ $debug_cmd
+
+ # Save the indent value, we'll need it for each row we render.
+ _G_indent=$1; shift
+
+ # Collect remaining numeric args into a list for reuse between
+ # members of each row when we call func_strrow later.
+ _G_widths=$1; shift
+ while test 0 -lt `expr "$1" : '[1-9][0-9]*$'`; do
+ func_append _G_widths " $1"; shift
+ done
+
+ # Extract the same number of positional parameters as there are
+ # width elements - we'll do the header rows separately so that
+ # we can insert a divider line.
+ _G_header=$_G_indent
+ for _G_width in $_G_widths; do
+ func_append _G_header " $1 $_G_width"; shift
+ done
+ func_strrow $_G_header
+
+ # Strip off the indent, and make a divider with '-' chars, then
+ # reindent.
+ _G_divider=`$bs_echo "$func_strrow_result" \
+ |$SED 's|[^ ]|-|g
+ :a
+ s|- |--|g
+ ta
+ '`
+
+ # Append the header and divider to the running result.
+ func_append func_strtable_result "\
+$func_strrow_result
+$_G_divider
+"
+
+ # The remaining rows are zipped between the width values we
+ # unwound earlier just like the header row above.
+ while test $# -gt 0; do
+ _G_row=$_G_indent
+ for _G_width in $_G_widths; do
+ func_append _G_row " $1 $_G_width"; shift
+ done
+ func_strrow $_G_row
+ func_append func_strtable_result "\
+$func_strrow_result
+"
+ done
+
+ # Mark the end of the table with a final divider line.
+ func_append func_strtable_result "$_G_divider"
+}
+
+
+# func_internal_error ARG...
+# --------------------------
+# Echo program name prefixed message to standard error, and exit.
+func_internal_error ()
+{
+ func_fatal_error "\
+INTERNAL: " ${1+"$@"} "
+ Please report this bug to 'bug-gnulib@gnu.org'
+ in as much detail as possible."
+}
+
+
+# func_permissions_error FILE-OR-DIRECTORY
+# ----------------------------------------
+# Echo program name prefixed permissions error message to standard
+# error, and exit.
+func_permissions_error ()
+{
+ $debug_cmd
+
+ func_fatal_error "Failed to create '$1', check permissions."
+}
+
+
+# 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 ()
+{
+ $debug_cmd
+
+ $require_term_colors
+
+ _G_cmd=$1
+ _G_fail_exp=${2-':'}
+
+ ${opt_silent-'false'} || {
+ func_quote_for_eval $_G_cmd
+ eval func_truncate_cmd $func_quote_for_eval_result
+ func_echo "running: $tc_bold$func_truncate_cmd_result$tc_reset"
+ }
+
+ ${opt_dry_run-'false'} || {
+ eval "$_G_cmd"
+ _G_status=$?
+ test 0 -eq "$_G_status" || eval "(exit $_G_status); $_G_fail_exp"
+ }
+}
+
+
+# func_truncate_cmd CMD [ARG]...
+# ------------------------------
+# For unreasonably long commands (such as a gnulib-tool invocation with
+# the full module list for import), truncate CMD after the second non-
+# option ARG.
+func_truncate_cmd ()
+{
+ $debug_cmd
+
+ _G_last_arg_opt_p=false
+ func_truncate_cmd_result=
+
+ set dummy "$@"; shift
+
+ while test $# -gt 0; do
+ _G_opt=$1; shift
+
+ test -n "$func_truncate_cmd_result" \
+ && func_append func_truncate_cmd_result ' '
+ func_append func_truncate_cmd_result "$_G_opt"
+
+ func_len "x$func_truncate_cmd_result"
+
+ case $_G_opt in
+ -*) _G_last_arg_opt_p=: ;;
+ *) $_G_last_arg_opt_p \
+ || test "$min_cmd_len" -gt "$func_len_result" \
+ || break
+ _G_last_arg_opt_p=false
+ ;;
+ esac
+ done
+
+ test $# -gt 0 && func_append func_truncate_cmd_result "..."
+}
+
+
+# func_gitignore_entries FILE...
+# ------------------------------
+# Strip blank and comment lines to leave significant entries.
+func_gitignore_entries ()
+{
+ $debug_cmd
+
+ sed -e '/^#/d' -e '/^$/d' "$@"
+}
+
+
+# func_insert_if_absent STR FILE...
+# ---------------------------------
+# If $STR is not already on a line by itself in $FILE, insert it, at the
+# start. Entries are inserted at the start of the ignore list to ensure
+# existing entries starting with ! are not overridden. Such entries
+# support whilelisting exceptions after a more generic blacklist pattern.
+# sorting the new contents of the file and replacing $FILE with the result.
+func_insert_if_absent ()
+{
+ $debug_cmd
+
+ str=$1
+ shift
+
+ for file
+ do
+ test -f "$file" || touch "$file"
+
+ duplicate_entries=`func_gitignore_entries "$file" |sort |uniq -d`
+ test -n "$duplicate_entries" \
+ && func_error "duplicate entries in $file: " $duplicate_entries
+
+ func_grep_q "^$str\$" "$file" \
+ || func_verbose "inserting '$str' into '$file'"
+
+ linesold=`func_gitignore_entries "$file" |wc -l`
+ linesnew=`{ $bs_echo "$str"; cat "$file"; } \
+ |func_gitignore_entries |sort -u |wc -l`
+ test "$linesold" -eq "$linesnew" \
+ || { sed "1i\\$nl$str$nl" "$file" >"$file"T && mv "$file"T "$file"; } \
+ || func_permissions_error "$file"
+ done
+}
+
+
+# func_sort_ver VER1 VER2
+# -----------------------
+# 'sort -V' is not generally available.
+# Note this deviates from the version comparison in automake
+# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
+# but this should suffice as we won't be specifying old
+# version formats or redundant trailing .0 in bootstrap.conf.
+# If we did want full compatibility then we should probably
+# use m4_version_compare from autoconf.
+func_sort_ver ()
+{
+ $debug_cmd
+
+ ver1=$1
+ ver2=$2
+
+ # Split on '.' and compare each component.
+ i=1
+ while :; do
+ p1=`echo "$ver1" |cut -d. -f$i`
+ p2=`echo "$ver2" |cut -d. -f$i`
+ if test ! "$p1"; then
+ echo "$1 $2"
+ break
+ elif test ! "$p2"; then
+ echo "$2 $1"
+ break
+ elif test ! "$p1" = "$p2"; then
+ if test "$p1" -gt "$p2" 2>/dev/null; then # numeric comparison
+ echo "$2 $1"
+ elif test "$p2" -gt "$p1" 2>/dev/null; then # numeric comparison
+ echo "$1 $2"
+ else # numeric, then lexicographic comparison
+ lp=`printf "$p1\n$p2\n" |sort -n |tail -n1`
+ if test "$lp" = "$p2"; then
+ echo "$1 $2"
+ else
+ echo "$2 $1"
+ fi
+ fi
+ break
+ fi
+ i=`expr $i + 1`
+ done
+}
+
+
+# func_get_version APP
+# --------------------
+# echo the version number (if any) of APP, which is looked up along your
+# PATH.
+func_get_version ()
+{
+ $debug_cmd
+
+ _G_app=$1
+
+ # Rather than uncomment the sed script in-situ, strip the comments
+ # programatically before passing the result to $SED for evaluation.
+ sed_get_version=`$bs_echo '# extract version within line
+ s|.*[v ]\{1,\}\([0-9]\{1,\}\.[.a-z0-9-]*\).*|\1|
+ t done
+
+ # extract version at start of line
+ s|^\([0-9]\{1,\}\.[.a-z0-9-]*\).*|\1|
+ t done
+
+ d
+
+ :done
+ # the following essentially does s|5.005|5.5|
+ s|\.0*\([1-9]\)|.\1|g
+ p
+ q' \
+ |$SED '/^[ ]*#.*$/d'`
+
+ func_tool_version_output $_G_app >/dev/null
+ _G_status=$?
+
+ test 0 -ne "$_G_status" \
+ || $_G_app --version 2>&1 |$SED -n "$sed_get_version"
+
+ (exit $_G_status)
+}
+
+
+# func_check_tool APP
+# -------------------
+# Search PATH for an executable at APP.
+func_check_tool ()
+{
+ $debug_cmd
+
+ func_check_tool_result=
+
+ case $1 in
+ *[\\/]*)
+ test -x "$1" && func_check_tool_result=$1
+ ;;
+ *)
+ save_IFS=$IFS
+ IFS=:
+ for _G_check_tool_path in $PATH; do
+ IFS=$save_IFS
+ if test -x "$_G_check_tool_path/$1"; then
+ func_check_tool_result=$_G_check_tool_path/$1
+ break
+ fi
+ done
+ IFS=$save_IFS
+ ;;
+ esac
+}
+
+
+# func_check_versions APP1 VER1 URL1 ...[APPN VERN URLN]
+# ------------------------------------------------------
+func_check_versions ()
+{
+ $debug_cmd
+
+ func_check_versions_result=:
+
+ while test $# -gt 0; do
+ _G_app=$1; shift
+ _G_reqver=$1; shift
+ _G_url=$1; shift
+
+ # Diagnose bad buildreq formatting.
+ case $_G_url in
+ [a-z]*://*) ;; # looks like a url
+ *) func_fatal_error "\
+'$_G_url' from the buildreq table in
+'bootstrap.conf' does not look like the URL for downloading
+$_G_app. Please ensure that buildreq is a strict newline
+delimited list of triples; 'program min-version url'."
+ ;;
+ esac
+
+ # Honor $APP variables ($TAR, $AUTOCONF, etc.)
+ _G_appvar=`echo $_G_app |tr '[a-z]' '[A-Z]'`
+ test TAR = "$_G_appvar" && _G_appvar=AMTAR
+ eval "_G_app=\${$_G_appvar-$_G_app}"
+
+ # Fail if no version specified, but the program can't be found.
+ if test x- = "x$_G_reqver"; then
+ func_check_tool $_G_app
+ if test -z "$func_check_tool_result"; then
+ func_error "Prerequisite '$_G_app' not not found. Please install it, or
+'export $_G_appvar=/path/to/$_G_app'."
+ func_check_versions_result=false
+ else
+ func_verbose "found '$func_check_tool_result' for $_G_appvar."
+ fi
+ else
+ _G_instver=`func_get_version $_G_app`
+
+ test -z "$_G_instver" \
+ || func_verbose "found '$_G_app' version $_G_instver."
+
+ # Fail if --version didn't work.
+ if test -z "$_G_instver"; then
+ func_error "Prerequisite '$_G_app' not found. Please install it, or
+'export $_G_appvar=/path/to/$_G_app'."
+ func_check_versions_result=false
+
+ # Fail if a newer version than what we have is required.
+ else
+ _G_newer=`func_sort_ver $_G_reqver $_G_instver |cut -d' ' -f2`
+ test "$_G_newer" != "$_G_instver" && {
+ func_error "\
+ '$_G_app' version == $_G_instver is too old
+ '$_G_app' version >= $_G_reqver is required"
+ func_check_versions_result=false
+ }
+ fi
+ fi
+ done
+}
+
+
+# func_cleanup_gnulib
+# -------------------
+# Recursively delete everything below the path in the global variable
+# GNULIB_PATH.
+func_cleanup_gnulib ()
+{
+ $debug_cmd
+
+ _G_status=$?
+ $RM -fr "$gnulib_path"
+ exit $_G_status
+}
+
+
+# func_download_po_files SUBDIR DOMAIN
+# ------------------------------------
+func_download_po_files ()
+{
+ $debug_cmd
+
+ func_echo "getting translations into $1 for $2..."
+ _G_cmd=`printf "$po_download_command_format" "$2" "$1"`
+ eval "$_G_cmd"
+}
+
+
+# func_update_po_files PO_DIR DOMAIN
+# ----------------------------------
+# Mirror .po files to $po_dir/.reference and copy only the new
+# or modified ones into $po_dir. Also update $po_dir/LINGUAS.
+# Note po files that exist locally only are left in $po_dir but will
+# not be included in LINGUAS and hence will not be distributed.
+func_update_po_files ()
+{
+ $debug_cmd
+
+ # Directory containing primary .po files.
+ # Overwrite them only when we're sure a .po file is new.
+ _G_po_dir=$1
+ _G_domain=$2
+
+ # Mirror *.po files into this dir.
+ # Usually contains *.s1 checksum files.
+ _G_ref_po_dir=$_G_po_dir/.reference
+
+ test -d "$_G_ref_po_dir" || mkdir $_G_ref_po_dir || return
+ func_download_po_files $_G_ref_po_dir $_G_domain \
+ && ls "$_G_ref_po_dir"/*.po 2>/dev/null \
+ |$SED -e 's|.*/||' -e 's|\.po$||' > "$_G_po_dir/LINGUAS" || return
+
+ # Find sha1sum, named gsha1sum on MacPorts, and shasum on MacOS 10.6+.
+ func_find_tool SHA1SUM sha1sum gsha1sum shasum sha1
+
+ _G_langs=`cd $_G_ref_po_dir && echo *.po|$SED 's|\.po||g'`
+ test '*' = "$_G_langs" && _G_langs=x
+ for _G_po in $_G_langs; do
+ case $_G_po in x) continue;; esac
+ _G_new_po=$_G_ref_po_dir/$_G_po.po
+ _G_cksum_file=$_G_ref_po_dir/$_G_po.s1
+ if ! test -f "$_G_cksum_file" ||
+ ! test -f "$_G_po_dir/$_G_po.po" ||
+ ! $SHA1SUM -c "$_G_cksum_file" \
+ < "$_G_new_po" > /dev/null; then
+ echo "updated $_G_po_dir/$_G_po.po..."
+ cp "$_G_new_po" "$_G_po_dir/$_G_po.po" \
+ && $SHA1SUM < "$_G_new_po" > "$_G_cksum_file" || return
+ fi
+ done
+}
+
+
+
+## --------------- ##
+## Option parsing. ##
+## --------------- ##
+
+# Hook in the functions to make sure our own options are parsed during
+# the option parsing loop.
+
+usage='$progpath [OPTION]...'
+
+# Short help message in response to '-h'. Add to this in 'bootstrap.conf'
+# if you accept any additional options.
+usage_message="Common Bootstrap Options:
+ -c, --copy copy files instead of creating symbolic links.
+ --debug enable verbose shell tracing
+ -n, --dry-run print commands rather than running them
+ -f, --force attempt to bootstrap even if the sources seem not
+ to have been checked out.
+ --gnulib-srcdir=DIRNAME
+ specify a local directory where gnulib sources
+ reside. Use this if you already have the gnulib
+ sources on your machine, and don't want to waste
+ your bandwidth downloading them again. Defaults to
+ \$GNULIB_SRCDIR.
+ --no-warnings equivalent to '-Wnone'
+ --skip-git do not fetch files from remote repositories
+ --skip-po do not download po files.
+ -v, --verbose verbosely report processing
+ --version print version information and exit
+ -W, --warnings=CATEGORY
+ report the warnings falling in CATEGORY [all]
+ -h, --help print short or long help message and exit
+"
+
+# Additional text appended to 'usage_message' in response to '--help'.
+long_help_message=$long_help_message"
+ 'recommend' show warnings about missing recommended packages
+ 'settings' show warnings about missing '$progname.conf' settings
+ 'upgrade' show warnings about out-dated files
+
+If the file '$progname.conf' exists in the same directory as this
+script, its contents are read as shell variables to configure the
+bootstrap.
+
+For build prerequisites, environment variables like \$AUTOCONF and
+\$AMTAR are honored.
+
+Running without arguments will suffice in most cases.
+"
+
+# Warning categories used by 'bootstrap', append others if you use them
+# in your 'bootstrap.conf'.
+warning_categories='recommend settings upgrade'
+
+
+# bootstrap_options_prep [ARG]...
+# -------------------------------
+# Preparation for options parsed by Bootstrap.
+bootstrap_options_prep ()
+{
+ $debug_cmd
+
+ # Option defaults:
+ opt_copy=${copy-'false'}
+ opt_dry_run=false
+ opt_force=false
+ opt_gnulib_srcdir=$GNULIB_SRCDIR
+ opt_skip_git=false
+ opt_skip_po=false
+
+ # Pass back the list of options we consumed.
+ func_quote_for_eval ${1+"$@"}
+ bootstrap_options_prep_result=$func_quote_for_eval_result
+}
+func_add_hook func_options_prep bootstrap_options_prep
+
+
+# bootstrap_parse_options [ARG]...
+# --------------------------------
+# Provide handling for Bootstrap specific options.
+bootstrap_parse_options ()
+{
+ $debug_cmd
+
+ # Perform our own loop to consume as many options as possible in
+ # each iteration.
+ while test $# -gt 0; do
+ _G_opt=$1
+ shift
+ case $_G_opt in
+ --dry-run|--dryrun|-n)
+ opt_dry_run=: ;;
+ --copy|-c) opt_copy=: ;;
+ --force|-f) opt_force=: ;;
+
+ --gnulib-srcdir)
+ test $# = 0 && func_missing_arg $_G_opt && break
+ opt_gnulib_srcdir=$1
+ shift
+ ;;
+
+ --skip-git|--no-git)
+ opt_skip_git=:
+ ;;
+
+ --skip-po|--no-po)
+ opt_skip_po=:
+ ;;
+
+ # Separate non-argument short options:
+ -c*|-f*|-n*)
+ func_split_short_opt "$_G_opt"
+ set dummy "$func_split_short_opt_name" \
+ "-$func_split_short_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+ esac
+ done
+
+ # save modified positional parameters for caller
+ func_quote_for_eval ${1+"$@"}
+ bootstrap_parse_options_result=$func_quote_for_eval_result
+}
+func_add_hook func_parse_options bootstrap_parse_options
+
+
+# bootstrap_validate_options [ARG]...
+# -----------------------------------
+# Perform any sanity checks on option settings and/or unconsumed
+# arguments.
+bootstrap_validate_options ()
+{
+ $debug_cmd
+
+ # Validate options.
+ test $# -gt 0 \
+ && func_fatal_help "too many arguments"
+
+ # Pass back the (empty) list of unconsumed options.
+ func_quote_for_eval ${1+"$@"}
+ bootstrap_validate_options_result=$func_quote_for_eval_result
+}
+func_add_hook func_validate_options bootstrap_validate_options
+
+
+## -------------------------------------------------- ##
+## Source package customisations in 'bootstrap.conf'. ##
+## -------------------------------------------------- ##
+
+# Override the default configuration, if necessary.
+# Make sure that bootstrap.conf is sourced from the current directory
+# if we were invoked as "sh bootstrap".
+case $0 in
+ */*) test -r "$0.conf" && . "$0.conf" ;;
+ *) test -r "$0.conf" && . ./"$0.conf" ;;
+esac
+
-## ----------- ##
-## Autoreconf. ##
-## ----------- ##
+## ------------------------------- ##
+## Actually perform the bootstrap. ##
+## ------------------------------- ##
-func_echo "running: $AUTORECONF --verbose --install"
-$AUTORECONF --verbose --install || func_fatal_error "autoreconf failed"
+func_bootstrap ${1+"$@"}
-exit 0
+# The End.
+exit ${exit_status-$EXIT_SUCCESS}
# Local variables:
+# mode: shell-script
+# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "# bootstrap (GNU M4) version "
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "$"
+# time-stamp-pattern: "20/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
# End:
diff --git a/build-aux/announce-gen b/build-aux/announce-gen
index 4886926..3a64ec6 100755
--- a/build-aux/announce-gen
+++ b/build-aux/announce-gen
@@ -3,13 +3,13 @@ eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}'
if 0;
# Generate a release announcement message.
-my $VERSION = '2010-05-03 20:17'; # UTC
+my $VERSION = '2012-06-08 06:53'; # UTC
# The definition above must lie within the first 8 lines in order
# for the Emacs time-stamp write hook (at end) to update it.
# If you change this file with Emacs, please let the write hook
# do its job. Otherwise, update this string manually.
-# Copyright (C) 2002-2011 Free Software Foundation, Inc.
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -30,13 +30,15 @@ use strict;
use Getopt::Long;
use Digest::MD5;
-use Digest::SHA1;
+eval { require Digest::SHA; }
+ or eval 'use Digest::SHA1';
use POSIX qw(strftime);
(my $ME = $0) =~ s|.*/||;
my %valid_release_types = map {$_ => 1} qw (alpha beta stable);
my @archive_suffixes = ('tar.gz', 'tar.bz2', 'tar.lzma', 'tar.xz');
+my $srcdir = '.';
sub usage ($)
{
@@ -44,14 +46,14 @@ sub usage ($)
my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR);
if ($exit_code != 0)
{
- print $STREAM "Try `$ME --help' for more information.\n";
+ print $STREAM "Try '$ME --help' for more information.\n";
}
else
{
my @types = sort keys %valid_release_types;
print $STREAM <<EOF;
Usage: $ME [OPTIONS]
-Generate an announcement message.
+Generate an announcement message. Run this from builddir.
OPTIONS:
@@ -66,7 +68,9 @@ These options must be specified:
The following are optional:
- --news=NEWS_FILE
+ --news=NEWS_FILE include the NEWS section about this release
+ from this NEWS_FILE; accumulates.
+ --srcdir=DIR where to find the NEWS_FILEs (default: $srcdir)
--bootstrap-tools=TOOL_LIST a comma-separated list of tools, e.g.,
autoconf,automake,bison,gnulib
--gnulib-version=VERSION report VERSION as the gnulib version, where
@@ -102,13 +106,13 @@ sub sizes (@)
my %res;
foreach my $f (@file)
{
- my $cmd = "du --human $f";
+ my $cmd = "du -h $f";
my $t = `$cmd`;
# FIXME-someday: give a better diagnostic, a la $PROCESS_STATUS
$@
- and (warn "$ME: command failed: `$cmd'\n"), $fail = 1;
+ and (warn "command failed: '$cmd'\n"), $fail = 1;
chomp $t;
- $t =~ s/^([\d.]+[MkK]).*/${1}B/;
+ $t =~ s/^\s*([\d.]+[MkK]).*/${1}B/;
$res{$f} = $t;
}
return $fail ? undef : %res;
@@ -128,12 +132,12 @@ sub print_locations ($\@\%@)
foreach my $url (@{$url})
{
for my $file (@file)
- {
- print " $url/$file";
- print " (", $$size{$file}, ")"
- if exists $$size{$file};
- print "\n";
- }
+ {
+ print " $url/$file";
+ print " (", $$size{$file}, ")"
+ if exists $$size{$file};
+ print "\n";
+ }
}
print "\n";
}
@@ -154,17 +158,17 @@ sub print_checksums (@)
foreach my $meth (qw (md5 sha1))
{
foreach my $f (@file)
- {
- open IN, '<', $f
- or die "$ME: $f: cannot open for reading: $!\n";
- binmode IN;
- my $dig =
- ($meth eq 'md5'
- ? Digest::MD5->new->addfile(*IN)->hexdigest
- : Digest::SHA1->new->addfile(*IN)->hexdigest);
- close IN;
- print "$dig $f\n";
- }
+ {
+ open IN, '<', $f
+ or die "$ME: $f: cannot open for reading: $!\n";
+ binmode IN;
+ my $dig =
+ ($meth eq 'md5'
+ ? Digest::MD5->new->addfile(*IN)->hexdigest
+ : Digest::SHA1->new->addfile(*IN)->hexdigest);
+ close IN;
+ print "$dig $f\n";
+ }
}
print "\n";
}
@@ -180,7 +184,10 @@ sub print_news_deltas ($$$)
{
my ($news_file, $prev_version, $curr_version) = @_;
- print "\n$news_file\n\n";
+ my $news_name = $news_file;
+ $news_name =~ s|^\Q$srcdir\E/||;
+
+ print "\n$news_name\n\n";
# Print all lines from $news_file, starting with the first one
# that mentions $curr_version up to but not including
@@ -189,34 +196,39 @@ sub print_news_deltas ($$$)
my $re_prefix = qr/(?:\* )?(?:Noteworthy c|Major c|C)(?i:hanges)/;
+ my $found_news;
open NEWS, '<', $news_file
or die "$ME: $news_file: cannot open for reading: $!\n";
while (defined (my $line = <NEWS>))
{
if ( ! $in_items)
- {
- # Match lines like these:
- # * Major changes in release 5.0.1:
- # * Noteworthy changes in release 6.6 (2006-11-22) [stable]
- $line =~ /^$re_prefix.*(?:[^\d.]|$)\Q$curr_version\E(?:[^\d.]|$)/o
- or next;
- $in_items = 1;
- print $line;
- }
+ {
+ # Match lines like these:
+ # * Major changes in release 5.0.1:
+ # * Noteworthy changes in release 6.6 (2006-11-22) [stable]
+ $line =~ /^$re_prefix.*(?:[^\d.]|$)\Q$curr_version\E(?:[^\d.]|$)/o
+ or next;
+ $in_items = 1;
+ print $line;
+ }
else
- {
- # This regexp must not match version numbers in NEWS items.
- # For example, they might well say `introduced in 4.5.5',
- # and we don't want that to match.
- $line =~ /^$re_prefix.*(?:[^\d.]|$)\Q$prev_version\E(?:[^\d.]|$)/o
- and last;
- print $line;
- }
+ {
+ # This regexp must not match version numbers in NEWS items.
+ # For example, they might well say "introduced in 4.5.5",
+ # and we don't want that to match.
+ $line =~ /^$re_prefix.*(?:[^\d.]|$)\Q$prev_version\E(?:[^\d.]|$)/o
+ and last;
+ print $line;
+ $line =~ /\S/
+ and $found_news = 1;
+ }
}
close NEWS;
$in_items
- or die "$ME: $news_file: no matching lines for `$curr_version'\n";
+ or die "$ME: $news_file: no matching lines for '$curr_version'\n";
+ $found_news
+ or die "$ME: $news_file: no news item found for '$curr_version'\n";
}
sub print_changelog_deltas ($$)
@@ -229,8 +241,8 @@ sub print_changelog_deltas ($$)
use File::Find;
my @changelog;
find ({wanted => sub {$_ eq 'ChangeLog' && -d 'CVS'
- and push @changelog, $File::Find::name}},
- '.');
+ and push @changelog, $File::Find::name}},
+ '.');
# If there are no ChangeLog files, we're done.
@changelog
@@ -255,13 +267,13 @@ sub print_changelog_deltas ($$)
my $dot_slash = $d eq '.' ? $d : "./$d";
my $target = "$dot_slash/ChangeLog";
delete $changelog{$target}
- and push @reordered, $target;
+ and push @reordered, $target;
}
# Append any remaining ChangeLog files.
push @reordered, sort keys %changelog;
- # Remove leading `./'.
+ # Remove leading './'.
@reordered = map { s!^\./!!; $_ } @reordered;
print "\nChangeLog entries:\n\n";
@@ -272,37 +284,37 @@ sub print_changelog_deltas ($$)
my $cmd = "cvs -n diff -u -r$prev_cvs_tag -rHEAD @reordered";
open DIFF, '-|', $cmd
- or die "$ME: cannot run `$cmd': $!\n";
+ or die "$ME: cannot run '$cmd': $!\n";
# Print two types of lines, making minor changes:
- # Lines starting with `+++ ', e.g.,
+ # Lines starting with '+++ ', e.g.,
# +++ ChangeLog 22 Feb 2003 16:52:51 -0000 1.247
- # and those starting with `+'.
+ # and those starting with '+'.
# Don't print the others.
my $prev_printed_line_empty = 1;
while (defined (my $line = <DIFF>))
{
if ($line =~ /^\+\+\+ /)
- {
- my $separator = "*"x70 ."\n";
- $line =~ s///;
- $line =~ s/\s.*//;
- $prev_printed_line_empty
- or print "\n";
- print $separator, $line, $separator;
- }
+ {
+ my $separator = "*"x70 ."\n";
+ $line =~ s///;
+ $line =~ s/\s.*//;
+ $prev_printed_line_empty
+ or print "\n";
+ print $separator, $line, $separator;
+ }
elsif ($line =~ /^\+/)
- {
- $line =~ s///;
- print $line;
- $prev_printed_line_empty = ($line =~ /^$/);
- }
+ {
+ $line =~ s///;
+ print $line;
+ $prev_printed_line_empty = ($line =~ /^$/);
+ }
}
close DIFF;
# The exit code should be 1.
# Allow in case there are no modified ChangeLog entries.
$? == 256 || $? == 128
- or warn "$ME: warning: `cmd' had unexpected exit code or signal ($?)\n";
+ or warn "warning: '$cmd' had unexpected exit code or signal ($?)\n";
}
sub get_tool_versions ($$)
@@ -316,25 +328,25 @@ sub get_tool_versions ($$)
foreach my $t (@$tool_list)
{
if ($t eq 'gnulib')
- {
- push @tool_version_pair, ucfirst $t . ' ' . $gnulib_version;
- next;
- }
+ {
+ push @tool_version_pair, ucfirst $t . ' ' . $gnulib_version;
+ next;
+ }
# Assume that the last "word" on the first line of
- # `tool --version` output is the version string.
+ # 'tool --version' output is the version string.
my ($first_line, undef) = split ("\n", `$t --version`);
if ($first_line =~ /.* (\d[\w.-]+)$/)
- {
- $t = ucfirst $t;
- push @tool_version_pair, "$t $1";
- }
+ {
+ $t = ucfirst $t;
+ push @tool_version_pair, "$t $1";
+ }
else
- {
- defined $first_line
- and $first_line = '';
- warn "$ME: $t: unexpected --version output\n:$first_line";
- $fail = 1;
- }
+ {
+ defined $first_line
+ and $first_line = '';
+ warn "$t: unexpected --version output\n:$first_line";
+ $fail = 1;
+ }
}
$fail
@@ -360,6 +372,15 @@ sub get_tool_versions ($$)
my $gnulib_version;
my $print_checksums_p = 1;
+ # Reformat the warnings before displaying them.
+ local $SIG{__WARN__} = sub
+ {
+ my ($msg) = @_;
+ # Warnings from GetOptions.
+ $msg =~ s/Option (\w)/option --$1/;
+ warn "$ME: $msg";
+ };
+
GetOptions
(
'mail-headers=s' => \$mail_headers,
@@ -370,6 +391,7 @@ sub get_tool_versions ($$)
'gpg-key-id=s' => \$gpg_key_id,
'url-directory=s' => \@url_dir_list,
'news=s' => \@news_file,
+ 'srcdir=s' => \$srcdir,
'bootstrap-tools=s' => \$bootstrap_tools,
'gnulib-version=s' => \$gnulib_version,
'print-checksums!' => \$print_checksums_p,
@@ -380,32 +402,32 @@ sub get_tool_versions ($$)
) or usage 1;
my $fail = 0;
- # Ensure that sure each required option is specified.
+ # Ensure that each required option is specified.
$release_type
- or (warn "$ME: release type not specified\n"), $fail = 1;
+ or (warn "release type not specified\n"), $fail = 1;
$package_name
- or (warn "$ME: package name not specified\n"), $fail = 1;
+ or (warn "package name not specified\n"), $fail = 1;
$prev_version
- or (warn "$ME: previous version string not specified\n"), $fail = 1;
+ or (warn "previous version string not specified\n"), $fail = 1;
$curr_version
- or (warn "$ME: current version string not specified\n"), $fail = 1;
+ or (warn "current version string not specified\n"), $fail = 1;
$gpg_key_id
- or (warn "$ME: GnuPG key ID not specified\n"), $fail = 1;
+ or (warn "GnuPG key ID not specified\n"), $fail = 1;
@url_dir_list
- or (warn "$ME: URL directory name(s) not specified\n"), $fail = 1;
+ or (warn "URL directory name(s) not specified\n"), $fail = 1;
my @tool_list = split ',', $bootstrap_tools;
grep (/^gnulib$/, @tool_list) ^ defined $gnulib_version
- and (warn "$ME: when specifying gnulib as a tool, you must also specify\n"
- . "--gnulib-version=V, where V is the result of running git describe\n"
- . "in the gnulib source directory.\n"), $fail = 1;
+ and (warn "when specifying gnulib as a tool, you must also specify\n"
+ . "--gnulib-version=V, where V is the result of running git describe\n"
+ . "in the gnulib source directory.\n"), $fail = 1;
exists $valid_release_types{$release_type}
- or (warn "$ME: `$release_type': invalid release type\n"), $fail = 1;
+ or (warn "'$release_type': invalid release type\n"), $fail = 1;
@ARGV
- and (warn "$ME: too many arguments:\n", join ("\n", @ARGV), "\n"),
+ and (warn "too many arguments:\n", join ("\n", @ARGV), "\n"),
$fail = 1;
$fail
and usage 1;
@@ -445,28 +467,50 @@ FIXME: put comments here
EOF
- print_locations ("compressed sources", @url_dir_list, %size, @tarballs);
- -f $xd
- and print_locations ("xdelta diffs (useful? if so, "
- . "please tell bug-gnulib\@gnu.org)",
- @url_dir_list, %size, $xd);
- my @sig_files = map { "$_.sig" } @tarballs;
- print_locations ("GPG detached signatures[*]", @url_dir_list, %size,
- @sig_files);
+ if (@url_dir_list == 1 && @tarballs == 1)
+ {
+ # When there's only one tarball and one URL, use a more concise form.
+ my $m = "$url_dir_list[0]/$tarballs[0]";
+ print "Here are the compressed sources and a GPG detached signature[*]:\n"
+ . " $m\n"
+ . " $m.sig\n\n";
+ }
+ else
+ {
+ print_locations ("compressed sources", @url_dir_list, %size, @tarballs);
+ -f $xd
+ and print_locations ("xdelta diffs (useful? if so, "
+ . "please tell bug-gnulib\@gnu.org)",
+ @url_dir_list, %size, $xd);
+ my @sig_files = map { "$_.sig" } @tarballs;
+ print_locations ("GPG detached signatures[*]", @url_dir_list, %size,
+ @sig_files);
+ }
+
if ($url_dir_list[0] =~ "gnu\.org")
{
- print "To reduce load on the main server, use a mirror listed at:\n";
- print " http://www.gnu.org/order/ftp.html\n\n";
+ print "Use a mirror for higher download bandwidth:\n";
+ if (@tarballs == 1 && $url_dir_list[0] =~ m!http://ftp\.gnu\.org/gnu/!)
+ {
+ (my $m = "$url_dir_list[0]/$tarballs[0]")
+ =~ s!http://ftp\.gnu\.org/gnu/!http://ftpmirror\.gnu\.org/!;
+ print " $m\n"
+ . " $m.sig\n\n";
+
+ }
+ else
+ {
+ print " http://www.gnu.org/order/ftp.html\n\n";
+ }
}
$print_checksums_p
and print_checksums (@sizable);
print <<EOF;
-[*] You can use either of the above signature files to verify that
-the corresponding file (without the .sig suffix) is intact. First,
-be sure to download both the .sig file and the corresponding tarball.
-Then, run a command like this:
+[*] Use a .sig file to verify that the corresponding file (without the
+.sig suffix) is intact. First, be sure to download both the .sig file
+and the corresponding tarball. Then, run a command like this:
gpg --verify $tarballs[0].sig
@@ -475,7 +519,7 @@ then run this command to import it:
gpg --keyserver keys.gnupg.net --recv-keys $gpg_key_id
-and rerun the \`gpg --verify' command.
+and rerun the 'gpg --verify' command.
EOF
my @tool_versions = get_tool_versions (\@tool_list, $gnulib_version);
diff --git a/build-aux/compile b/build-aux/compile
index bac481c..531136b 100755
--- a/build-aux/compile
+++ b/build-aux/compile
@@ -1,10 +1,9 @@
#! /bin/sh
-# Wrapper for compilers which do not understand `-c -o'.
+# Wrapper for compilers which do not understand '-c -o'.
-scriptversion=2010-11-15.09; # UTC
+scriptversion=2012-10-14.11; # UTC
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
@@ -40,7 +39,7 @@ file_conv=
# func_file_conv build_file lazy
# Convert a $build file to $host form and store it in $file
-# Currently only supports Win32 hosts. If the determined conversion
+# 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 ()
@@ -79,6 +78,53 @@ func_file_conv ()
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 ()
@@ -94,7 +140,7 @@ func_cl_wrapper ()
else
case $1 in
-o)
- # configure might choose to run compile as `compile cc -o foo foo.c'.
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
*.o | *.[oO][bB][jJ])
@@ -109,43 +155,34 @@ func_cl_wrapper ()
;;
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*)
- lib=${1#-l}
- 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
- set x "$@" "$dir/$lib.dll.lib"
- break
- fi
- if test -f "$dir/$lib.lib"; then
- found=yes
- set x "$@" "$dir/$lib.lib"
- break
- fi
- done
- IFS=$save_IFS
-
- test "$found" != yes && set x "$@" "$lib.lib"
+ func_cl_dashl "${1#-l}"
+ set x "$@" "$lib"
shift
;;
+ -L)
+ eat=1
+ func_cl_dashL "$2"
+ ;;
-L*)
- func_file_conv "${1#-L}"
- 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 "${1#-L}"
;;
-static)
shared=false
@@ -196,19 +233,19 @@ eat=
case $1 in
'')
- echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ 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
+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'.
+right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
@@ -233,8 +270,8 @@ do
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.
+ # 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)
@@ -261,10 +298,10 @@ do
done
if test -z "$ofile" || test -z "$cfile"; then
- # If no `-o' option was seen then we might have been invoked from a
+ # 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
+ # '.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
@@ -273,7 +310,7 @@ fi
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
# Create the lock directory.
-# Note: use `[/\\:.-]' here to ensure that we don't use the same name
+# Note: use '[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
diff --git a/build-aux/config.guess b/build-aux/config.guess
index 187cd54..b79252d 100755
--- a/build-aux/config.guess
+++ b/build-aux/config.guess
@@ -1,14 +1,12 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2011 Free Software Foundation, Inc.
+# Copyright 1992-2013 Free Software Foundation, Inc.
-timestamp='2011-02-02'
+timestamp='2013-06-10'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@@ -17,26 +15,22 @@ timestamp='2011-02-02'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner. Please send patches (context
-# diff format) to <config-patches@gnu.org> and include a ChangeLog
-# entry.
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
#
-# This script attempts to guess a canonical system name similar to
-# config.sub. If it succeeds, it prints the system name on stdout, and
-# exits with 0. Otherwise, it exits with 1.
+# Originally written by Per Bothner.
#
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -56,9 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
-Software Foundation, Inc.
+Copyright 1992-2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -140,12 +132,33 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ LIBC=gnu
+
+ eval $set_cc_for_build
+ cat <<-EOF > $dummy.c
+ #include <features.h>
+ #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'`
+ ;;
+esac
+
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
@@ -202,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
@@ -304,7 +321,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit ;;
- arm:riscos:*:*|arm:RISCOS:*:*)
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -792,21 +809,26 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
- case ${UNAME_MACHINE} in
- pc98)
- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case ${UNAME_PROCESSOR} in
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
+ *:MINGW64*:*)
+ echo ${UNAME_MACHINE}-pc-mingw64
+ exit ;;
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
+ i*:MSYS*:*)
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
i*:windows32*:*)
# uname -m includes "-pc" on this system.
echo ${UNAME_MACHINE}-mingw32
@@ -852,15 +874,22 @@ EOF
exit ;;
*:GNU:*:*)
# the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
+ aarch64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
@@ -872,50 +901,54 @@ EOF
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
else
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+ fi
fi
exit ;;
avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
cris:Linux:*:*)
- echo cris-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
crisv32:Linux:*:*)
- echo crisv32-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
frv:Linux:*:*)
- echo frv-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ hexagon:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:Linux:*:*)
- LIBC=gnu
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
@@ -934,54 +967,63 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
+ or1k:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
or32:Linux:*:*)
- echo or32-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
padre:Linux:*:*)
- echo sparc-unknown-linux-gnu
+ echo sparc-unknown-linux-${LIBC}
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
+ echo hppa64-unknown-linux-${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
esac
exit ;;
ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
+ echo powerpc64-unknown-linux-${LIBC}
exit ;;
ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
+ echo powerpc-unknown-linux-${LIBC}
+ exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-${LIBC}
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
tile*:Linux:*:*)
- echo ${UNAME_MACHINE}-tilera-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1185,6 +1227,9 @@ EOF
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
@@ -1211,19 +1256,21 @@ EOF
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- case $UNAME_PROCESSOR in
- i386)
- eval $set_cc_for_build
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- UNAME_PROCESSOR="x86_64"
- fi
- fi ;;
- unknown) UNAME_PROCESSOR=powerpc ;;
- esac
+ eval $set_cc_for_build
+ if test "$UNAME_PROCESSOR" = unknown ; then
+ UNAME_PROCESSOR=powerpc
+ fi
+ if [ "$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
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
@@ -1240,7 +1287,7 @@ EOF
NEO-?:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
- NSE-?:NONSTOP_KERNEL:*:*)
+ NSE-*:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
NSR-?:NONSTOP_KERNEL:*:*)
@@ -1309,11 +1356,11 @@ EOF
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
+ x86_64:VMkernel:*:*)
+ echo ${UNAME_MACHINE}-unknown-esx
+ exit ;;
esac
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
eval $set_cc_for_build
cat >$dummy.c <<EOF
#ifdef _SEQUENT_
diff --git a/build-aux/config.rpath b/build-aux/config.rpath
index 8bd7f5d..c38b914 100755
--- a/build-aux/config.rpath
+++ b/build-aux/config.rpath
@@ -2,7 +2,7 @@
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable.
#
-# Copyright 1996-2011 Free Software Foundation, Inc.
+# Copyright 1996-2013 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
@@ -25,7 +25,7 @@
# known workaround is to choose shorter directory names for the build
# directory and/or the installation directory.
-# All known linkers require a `.a' archive for static linking (except MSVC,
+# All known linkers require a '.a' archive for static linking (except MSVC,
# which needs '.lib').
libext=a
shrext=.so
diff --git a/build-aux/config.sub b/build-aux/config.sub
index 0ef29b0..85a159e 100755
--- a/build-aux/config.sub
+++ b/build-aux/config.sub
@@ -1,38 +1,31 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2011 Free Software Foundation, Inc.
+# Copyright 1992-2013 Free Software Foundation, Inc.
-timestamp='2011-02-24'
+timestamp='2013-09-05'
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine. It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted GNU ChangeLog entry.
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@@ -75,9 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
-Software Foundation, Inc.
+Copyright 1992-2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -125,13 +116,17 @@ esac
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
- linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
+ android-linux)
+ os=-linux-android
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+ ;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
@@ -154,7 +149,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray | -microblaze)
+ -apple | -axis | -knuth | -cray | -microblaze*)
os=
basic_machine=$1
;;
@@ -223,6 +218,12 @@ case $os in
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
+ -lynx*178)
+ os=-lynxos178
+ ;;
+ -lynx*5)
+ os=-lynxos5
+ ;;
-lynx*)
os=-lynxos
;;
@@ -247,20 +248,27 @@ case $basic_machine in
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
+ | aarch64 | aarch64_be \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | arc | arceb \
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+ | avr | avr32 \
+ | be32 | be64 \
| bfin \
- | c4x | clipper \
+ | c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
+ | epiphany \
| fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
+ | le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore | mep | metag \
+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -278,30 +286,32 @@ case $basic_machine in
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
- | nios | nios2 \
+ | nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
- | or32 \
+ | open8 \
+ | or1k | or32 \
| pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
- | rx \
+ | rl78 | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
- | spu | strongarm \
- | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | spu \
+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
- | v850 | v850e \
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| we32k \
- | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
basic_machine=$basic_machine-unknown
;;
@@ -314,8 +324,7 @@ case $basic_machine in
c6x)
basic_machine=tic6x-unknown
;;
- m6811 | m68hc11 | m6812 | m68hc12 | picochip)
- # Motorola 68HC11/12.
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
@@ -325,6 +334,21 @@ case $basic_machine in
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.
@@ -339,25 +363,30 @@ case $basic_machine in
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
+ | aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
+ | be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
- | clipper-* | craynv-* | cydra-* \
+ | c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
+ | le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | microblaze-* | microblazeel-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@@ -375,31 +404,34 @@ case $basic_machine in
| mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipsr5900-* | mipsr5900el-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
- | nios-* | nios2-* \
+ | nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
+ | open8-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pyramid-* \
- | romp-* | rs6000-* | rx-* \
+ | rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
- | tahoe-* | thumb-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
- | tile-* | tilegx-* \
+ | tile*-* \
| tron-* \
| ubicom32-* \
- | v850-* | v850e-* | vax-* \
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ | vax-* \
| we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
| ymp-* \
| z8k-* | z80-*)
@@ -697,7 +729,6 @@ case $basic_machine in
i370-ibm* | ibm*)
basic_machine=i370-ibm
;;
-# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i*86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
@@ -755,11 +786,15 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
- microblaze)
+ microblaze*)
basic_machine=microblaze-xilinx
;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=-mingw64
+ ;;
mingw32)
- basic_machine=i386-pc
+ basic_machine=i686-pc
os=-mingw32
;;
mingw32ce)
@@ -794,10 +829,18 @@ case $basic_machine in
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
+ msys)
+ basic_machine=i686-pc
+ os=-msys
+ ;;
mvs)
basic_machine=i370-ibm
os=-mvs
;;
+ nacl)
+ basic_machine=le32-unknown
+ os=-nacl
+ ;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
@@ -950,9 +993,10 @@ case $basic_machine in
;;
power) basic_machine=power-ibm
;;
- ppc) basic_machine=powerpc-unknown
+ ppc | ppcbe) basic_machine=powerpc-unknown
;;
- ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ppc-* | ppcbe-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
@@ -977,7 +1021,11 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
- rdos)
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=-rdos
+ ;;
+ rdos32)
basic_machine=i386-pc
os=-rdos
;;
@@ -1046,6 +1094,9 @@ case $basic_machine in
basic_machine=i860-stratus
os=-sysv4
;;
+ strongarm-* | thumb-*)
+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
sun2)
basic_machine=m68000-sun
;;
@@ -1102,13 +1153,8 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
- # This must be matched before tile*.
- tilegx*)
- basic_machine=tilegx-unknown
- os=-linux-gnu
- ;;
tile*)
- basic_machine=tile-unknown
+ basic_machine=$basic_machine-unknown
os=-linux-gnu
;;
tx39)
@@ -1178,6 +1224,9 @@ case $basic_machine in
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
@@ -1303,21 +1352,21 @@ case $os in
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* \
+ | -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -openbsd* | -solidbsd* \
+ | -bitrig* | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-uclibc* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1449,9 +1498,6 @@ case $os in
-aros*)
os=-aros
;;
- -kaos*)
- os=-kaos
- ;;
-zvmoe)
os=-zvmoe
;;
@@ -1500,6 +1546,12 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
+ c8051-*)
+ os=-elf
+ ;;
+ hexagon-*)
+ os=-elf
+ ;;
tic54x-*)
os=-coff
;;
@@ -1527,9 +1579,6 @@ case $basic_machine in
;;
m68000-sun)
os=-sunos3
- # This also exists in the configure program, but was not the
- # default.
- # os=-sunos4
;;
m68*-cisco)
os=-aout
@@ -1543,6 +1592,9 @@ case $basic_machine in
mips*-*)
os=-elf
;;
+ or1k-*)
+ os=-elf
+ ;;
or32-*)
os=-coff
;;
diff --git a/build-aux/depcomp b/build-aux/depcomp
index c3163be..3178801 100755
--- a/build-aux/depcomp
+++ b/build-aux/depcomp
@@ -1,10 +1,9 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-scriptversion=2010-10-07.20; # UTC
+scriptversion=2013-05-30.07; # UTC
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010
-# Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,9 +27,9 @@ scriptversion=2010-10-07.20; # UTC
case $1 in
'')
- echo "$0: No command. Try \`$0 --help' for more information." 1>&2
- exit 1;
- ;;
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
@@ -40,11 +39,11 @@ as side-effects.
Environment variables:
depmode Dependency tracking mode.
- source Source file read by `PROGRAMS ARGS'.
- object Object file output by `PROGRAMS ARGS'.
+ source Source file read by 'PROGRAMS ARGS'.
+ object Object file output by 'PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
- tmpdepfile Temporary file to use when outputing dependencies.
+ tmpdepfile Temporary file to use when outputting dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
@@ -57,6 +56,66 @@ EOF
;;
esac
+# Get the directory component of the given path, and save it in the
+# global variables '$dir'. Note that this directory component will
+# be either empty or ending with a '/' character. This is deliberate.
+set_dir_from ()
+{
+ case $1 in
+ */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
+ *) dir=;;
+ esac
+}
+
+# Get the suffix-stripped basename of the given path, and save it the
+# global variable '$base'.
+set_base_from ()
+{
+ base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
+}
+
+# If no dependency file was actually created by the compiler invocation,
+# we still have to create a dummy depfile, to avoid errors with the
+# Makefile "include basename.Plo" scheme.
+make_dummy_depfile ()
+{
+ echo "#dummy" > "$depfile"
+}
+
+# Factor out some common post-processing of the generated depfile.
+# Requires the auxiliary global variable '$tmpdepfile' to be set.
+aix_post_process_depfile ()
+{
+ # If the compiler actually managed to produce a dependency file,
+ # post-process it.
+ if test -f "$tmpdepfile"; then
+ # Each line is of the form 'foo.o: dependency.h'.
+ # Do two passes, one to just change these to
+ # $object: dependency.h
+ # and one to simply output
+ # dependency.h:
+ # which is needed to avoid the deleted-header problem.
+ { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
+ sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
+ } > "$depfile"
+ rm -f "$tmpdepfile"
+ else
+ make_dummy_depfile
+ fi
+}
+
+# A tabulation character.
+tab=' '
+# A newline character.
+nl='
+'
+# Character ranges might be problematic outside the C locale.
+# These definitions help.
+upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
+lower=abcdefghijklmnopqrstuvwxyz
+digits=0123456789
+alpha=${upper}${lower}
+
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
@@ -69,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
+# Avoid interferences from the environment.
+gccflag= dashmflag=
+
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
@@ -80,26 +142,32 @@ if test "$depmode" = hp; then
fi
if test "$depmode" = dashXmstdout; then
- # This is just like dashmstdout with a different argument.
- dashmflag=-xM
- depmode=dashmstdout
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
fi
cygpath_u="cygpath -u -f -"
if test "$depmode" = msvcmsys; then
- # This is just like msvisualcpp but w/o cygpath translation.
- # Just convert the backslash-escaped backslashes to single forward
- # slashes to satisfy depend.m4
- cygpath_u='sed s,\\\\,/,g'
- depmode=msvisualcpp
+ # This is just like msvisualcpp but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvisualcpp
fi
if test "$depmode" = msvc7msys; then
- # This is just like msvc7 but w/o cygpath translation.
- # Just convert the backslash-escaped backslashes to single forward
- # slashes to satisfy depend.m4
- cygpath_u='sed s,\\\\,/,g'
- depmode=msvc7
+ # This is just like msvc7 but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvc7
+fi
+
+if test "$depmode" = xlc; then
+ # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
+ gccflag=-qmakedep=gcc,-MF
+ depmode=gcc
fi
case "$depmode" in
@@ -122,8 +190,7 @@ gcc3)
done
"$@"
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
@@ -131,13 +198,17 @@ gcc3)
;;
gcc)
+## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
+## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
+## (see the conditional assignment to $gccflag above).
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
-## -MM, not -M (despite what the docs say).
+## -MM, not -M (despite what the docs say). Also, it might not be
+## supported by the other compilers which use the 'gcc' depmode.
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
@@ -145,31 +216,31 @@ gcc)
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
- alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-## The second -e expression handles DOS-style file names with drive letters.
+ # The second -e expression handles DOS-style file names with drive
+ # letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
-## This next piece of magic avoids the `deleted header file' problem.
+## This next piece of magic avoids the "deleted header file" problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
- tr ' ' '
-' < "$tmpdepfile" |
-## Some versions of gcc put a space before the `:'. On the theory
+## Some versions of gcc put a space before the ':'. On the theory
## that the space means something, we add a space to the output as
-## well.
+## well. hp depmode also adds that space, but also prefixes the VPATH
+## to the object. Take care to not repeat it in the output.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
@@ -180,59 +251,21 @@ hp)
exit 1
;;
-sgi)
- if test "$libtool" = yes; then
- "$@" "-Wp,-MDupdate,$tmpdepfile"
- else
- "$@" -MDupdate "$tmpdepfile"
- fi
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
- rm -f "$depfile"
-
- if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
- echo "$object : \\" > "$depfile"
-
- # Clip off the initial element (the dependent). Don't try to be
- # clever and replace this with sed code, as IRIX sed won't handle
- # lines with more than a fixed number of characters (4096 in
- # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
- # the IRIX cc adds comments like `#:fec' to the end of the
- # dependency line.
- tr ' ' '
-' < "$tmpdepfile" \
- | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
- tr '
-' ' ' >> "$depfile"
- echo >> "$depfile"
-
- # The second pass generates a dummy entry for each header file.
- tr ' ' '
-' < "$tmpdepfile" \
- | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
- >> "$depfile"
- else
- # The sourcefile does not contain any dependencies, so just
- # store a dummy comment line, to avoid errors with the Makefile
- # "include basename.Plo" scheme.
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
+xlc)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
- # current directory. Also, the AIX compiler puts `$object:' at the
+ # current directory. Also, the AIX compiler puts '$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ set_dir_from "$object"
+ set_base_from "$object"
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.u
tmpdepfile2=$base.u
@@ -245,9 +278,7 @@ aix)
"$@" -M
fi
stat=$?
-
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
@@ -256,44 +287,100 @@ aix)
do
test -f "$tmpdepfile" && break
done
- if test -f "$tmpdepfile"; then
- # Each line is of the form `foo.o: dependent.h'.
- # Do two passes, one to just change these to
- # `$object: dependent.h' and one to simply `dependent.h:'.
- sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- # That's a tab and a space in the [].
- sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
- else
- # The sourcefile does not contain any dependencies, so just
- # store a dummy comment line, to avoid errors with the Makefile
- # "include basename.Plo" scheme.
- echo "#dummy" > "$depfile"
+ aix_post_process_depfile
+ ;;
+
+tcc)
+ # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
+ # FIXME: That version still under development at the moment of writing.
+ # Make that this statement remains true also for stable, released
+ # versions.
+ # It will wrap lines (doesn't matter whether long or short) with a
+ # trailing '\', as in:
+ #
+ # foo.o : \
+ # foo.c \
+ # foo.h \
+ #
+ # It will put a trailing '\' even on the last line, and will use leading
+ # spaces rather than leading tabs (at least since its commit 0394caf7
+ # "Emit spaces for -MD").
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
fi
+ rm -f "$depfile"
+ # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
+ # We have to change lines of the first kind to '$object: \'.
+ sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
+ # And for each line of the second kind, we have to emit a 'dep.h:'
+ # dummy dependency, to avoid the deleted-header problem.
+ sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
rm -f "$tmpdepfile"
;;
-icc)
- # Intel's C compiler understands `-MD -MF file'. However on
- # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
- # ICC 7.0 will fill foo.d with something like
- # foo.o: sub/foo.c
- # foo.o: sub/foo.h
- # which is wrong. We want:
- # sub/foo.o: sub/foo.c
- # sub/foo.o: sub/foo.h
- # sub/foo.c:
- # sub/foo.h:
- # ICC 7.1 will output
+## The order of this option in the case statement is important, since the
+## shell code in configure will try each of these formats in the order
+## listed in this file. A plain '-MD' option would be understood by many
+## compilers, so we must ensure this comes after the gcc and icc options.
+pgcc)
+ # Portland's C compiler understands '-MD'.
+ # Will always output deps to 'file.d' where file is the root name of the
+ # source file under compilation, even if file resides in a subdirectory.
+ # The object file name does not affect the name of the '.d' file.
+ # pgcc 10.2 will output
# foo.o: sub/foo.c sub/foo.h
- # and will wrap long lines using \ :
+ # and will wrap long lines using '\' :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
+ set_dir_from "$object"
+ # Use the source, not the object, to determine the base name, since
+ # that's sadly what pgcc will do too.
+ set_base_from "$source"
+ tmpdepfile=$base.d
+
+ # For projects that build the same source file twice into different object
+ # files, the pgcc approach of using the *source* file root name can cause
+ # problems in parallel builds. Use a locking strategy to avoid stomping on
+ # the same $tmpdepfile.
+ lockdir=$base.d-lock
+ trap "
+ echo '$0: caught signal, cleaning up...' >&2
+ rmdir '$lockdir'
+ exit 1
+ " 1 2 13 15
+ numtries=100
+ i=$numtries
+ while test $i -gt 0; do
+ # mkdir is a portable test-and-set.
+ if mkdir "$lockdir" 2>/dev/null; then
+ # This process acquired the lock.
+ "$@" -MD
+ stat=$?
+ # Release the lock.
+ rmdir "$lockdir"
+ break
+ else
+ # If the lock is being held by a different process, wait
+ # until the winning process is done or we timeout.
+ while test -d "$lockdir" && test $i -gt 0; do
+ sleep 1
+ i=`expr $i - 1`
+ done
+ fi
+ i=`expr $i - 1`
+ done
+ trap - 1 2 13 15
+ if test $i -le 0; then
+ echo "$0: failed to acquire lock after $numtries attempts" >&2
+ echo "$0: check lockdir '$lockdir'" >&2
+ exit 1
+ fi
- "$@" -MD -MF "$tmpdepfile"
- stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
@@ -305,8 +392,8 @@ icc)
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
- sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
- sed -e 's/$/ :/' >> "$depfile"
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
@@ -317,9 +404,8 @@ hp2)
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ set_dir_from "$object"
+ set_base_from "$object"
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
@@ -330,8 +416,7 @@ hp2)
"$@" +Maked
fi
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
@@ -341,77 +426,61 @@ hp2)
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
- sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
- # Add `dependent.h:' lines.
+ sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
+ # Add 'dependent.h:' lines.
sed -ne '2,${
- s/^ *//
- s/ \\*$//
- s/$/:/
- p
- }' "$tmpdepfile" >> "$depfile"
+ s/^ *//
+ s/ \\*$//
+ s/$/:/
+ p
+ }' "$tmpdepfile" >> "$depfile"
else
- echo "#dummy" > "$depfile"
+ make_dummy_depfile
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
tru64)
- # The Tru64 compiler uses -MD to generate dependencies as a side
- # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
- # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
- # dependencies in `foo.d' instead, so we check for that too.
- # Subdirectories are respected.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
-
- if test "$libtool" = yes; then
- # With Tru64 cc, shared objects can also be used to make a
- # static library. This mechanism is used in libtool 1.4 series to
- # handle both shared and static libraries in a single compilation.
- # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
- #
- # With libtool 1.5 this exception was removed, and libtool now
- # generates 2 separate objects for the 2 libraries. These two
- # compilations output dependencies in $dir.libs/$base.o.d and
- # in $dir$base.o.d. We have to check for both files, because
- # one of the two compilations can be disabled. We should prefer
- # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
- # automatically cleaned when .libs/ is deleted, while ignoring
- # the former would cause a distcleancheck panic.
- tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
- tmpdepfile2=$dir$base.o.d # libtool 1.5
- tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
- tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
- "$@" -Wc,-MD
- else
- tmpdepfile1=$dir$base.o.d
- tmpdepfile2=$dir$base.d
- tmpdepfile3=$dir$base.d
- tmpdepfile4=$dir$base.d
- "$@" -MD
- fi
-
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
- exit $stat
- fi
-
- for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
- do
- test -f "$tmpdepfile" && break
- done
- if test -f "$tmpdepfile"; then
- sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- # That's a tab and a space in the [].
- sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
- else
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
- ;;
+ # The Tru64 compiler uses -MD to generate dependencies as a side
+ # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # dependencies in 'foo.d' instead, so we check for that too.
+ # Subdirectories are respected.
+ set_dir_from "$object"
+ set_base_from "$object"
+
+ if test "$libtool" = yes; then
+ # Libtool generates 2 separate objects for the 2 libraries. These
+ # two compilations output dependencies in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir$base.o.d # libtool 1.5
+ tmpdepfile2=$dir.libs/$base.o.d # Likewise.
+ tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ # Same post-processing that is required for AIX mode.
+ aix_post_process_depfile
+ ;;
msvc7)
if test "$libtool" = yes; then
@@ -422,8 +491,7 @@ msvc7)
"$@" $showIncludes > "$tmpdepfile"
stat=$?
grep -v '^Note: including file: ' "$tmpdepfile"
- if test "$stat" = 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
@@ -441,14 +509,15 @@ msvc7)
p
}' | $cygpath_u | sort -u | sed -n '
s/ /\\ /g
-s/\(.*\)/ \1 \\/p
+s/\(.*\)/'"$tab"'\1 \\/p
s/.\(.*\) \\/\1:/
H
$ {
- s/.*/ /
+ s/.*/'"$tab"'/
G
p
}' >> "$depfile"
+ echo >> "$depfile" # make sure the fragment doesn't end with a backslash
rm -f "$tmpdepfile"
;;
@@ -476,7 +545,7 @@ dashmstdout)
shift
fi
- # Remove `-o $object'.
+ # Remove '-o $object'.
IFS=" "
for arg
do
@@ -496,18 +565,18 @@ dashmstdout)
done
test -z "$dashmflag" && dashmflag=-M
- # Require at least two characters before searching for `:'
+ # Require at least two characters before searching for ':'
# in the target name. This is to cope with DOS-style filenames:
- # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+ # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
"$@" $dashmflag |
- sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
+ sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
- tr ' ' '
-' < "$tmpdepfile" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this sed invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
@@ -557,12 +626,15 @@ makedepend)
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
- cat < "$tmpdepfile" > "$depfile"
- sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ # makedepend may prepend the VPATH from the source file name to the object.
+ # No need to regex-escape $object, excess matching of '.' is harmless.
+ sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process the last invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed '1,2d' "$tmpdepfile" \
+ | tr ' ' "$nl" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
@@ -579,7 +651,7 @@ cpp)
shift
fi
- # Remove `-o $object'.
+ # Remove '-o $object'.
IFS=" "
for arg
do
@@ -598,10 +670,10 @@ cpp)
esac
done
- "$@" -E |
- sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
- -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
- sed '$ s: \\$::' > "$tmpdepfile"
+ "$@" -E \
+ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ | sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
@@ -633,23 +705,23 @@ msvisualcpp)
shift
;;
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
- set fnord "$@"
- shift
- shift
- ;;
+ set fnord "$@"
+ shift
+ shift
+ ;;
*)
- set fnord "$@" "$arg"
- shift
- shift
- ;;
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
esac
done
"$@" -E 2>/dev/null |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
- sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
- echo " " >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
+ echo "$tab" >> "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
diff --git a/build-aux/gendocs.sh b/build-aux/gendocs.sh
index 34ef112..98c7523 100755
--- a/build-aux/gendocs.sh
+++ b/build-aux/gendocs.sh
@@ -2,10 +2,10 @@
# gendocs.sh -- generate a GNU manual in many formats. This script is
# mentioned in maintain.texi. See the help message below for usage details.
-scriptversion=2010-11-29.11
+scriptversion=2013-03-08.15
-# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
+# Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -30,6 +30,12 @@ scriptversion=2010-11-29.11
#
# An up-to-date copy is also maintained in Gnulib (gnu.org/software/gnulib).
+# TODO:
+# - image importation was only implemented for HTML generated by
+# makeinfo. But it should be simple enough to adjust.
+# - images are not imported in the source tarball. All the needed
+# formats (PDF, PNG, etc.) should be included.
+
prog=`basename "$0"`
srcdir=`pwd`
@@ -39,38 +45,47 @@ templateurl="http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/
: ${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="}
: ${MAKEINFO="makeinfo"}
: ${TEXI2DVI="texi2dvi -t @finalout"}
-: ${DVIPS="dvips"}
: ${DOCBOOK2HTML="docbook2html"}
: ${DOCBOOK2PDF="docbook2pdf"}
-: ${DOCBOOK2PS="docbook2ps"}
: ${DOCBOOK2TXT="docbook2txt"}
: ${GENDOCS_TEMPLATE_DIR="."}
+: ${PERL='perl'}
: ${TEXI2HTML="texi2html"}
unset CDPATH
unset use_texi2html
version="gendocs.sh $scriptversion
-Copyright 2010 Free Software Foundation, Inc.
+Copyright 2013 Free Software Foundation, Inc.
There is NO warranty. You may redistribute this software
under the terms of the GNU General Public License.
For more information about these matters, see the files named COPYING."
usage="Usage: $prog [OPTION]... PACKAGE MANUAL-TITLE
-Generate various output formats from PACKAGE.texinfo (or .texi or .txi) source.
-See the GNU Maintainers document for a more extensive discussion:
+Generate output in various formats from PACKAGE.texinfo (or .texi or
+.txi) source. See the GNU Maintainers document for a more extensive
+discussion:
http://www.gnu.org/prep/maintain_toc.html
Options:
- -s SRCFILE read Texinfo from SRCFILE, instead of PACKAGE.{texinfo|texi|txi}
- -o OUTDIR write files into OUTDIR, instead of manual/.
- --email ADR use ADR as contact in generated web pages.
- --docbook convert to DocBook too (xml, txt, html, pdf and ps).
- --html ARG pass indicated ARG to makeinfo or texi2html for HTML targets.
- --texi2html use texi2html to generate HTML targets.
- --help display this help and exit successfully.
- --version display version information and exit successfully.
+ --email ADR use ADR as contact in generated web pages; always give this.
+
+ -s SRCFILE read Texinfo from SRCFILE, instead of PACKAGE.{texinfo|texi|txi}
+ -o OUTDIR write files into OUTDIR, instead of manual/.
+ -I DIR append DIR to the Texinfo search path.
+ --common ARG pass ARG in all invocations.
+ --html ARG pass ARG to makeinfo or texi2html for HTML targets.
+ --info ARG pass ARG to makeinfo for Info, instead of --no-split.
+ --no-ascii skip generating the plain text output.
+ --source ARG include ARG in tar archive of sources.
+ --split HOW make split HTML by node, section, chapter; default node.
+
+ --texi2html use texi2html to make HTML target, with all split versions.
+ --docbook convert through DocBook too (xml, txt, html, pdf).
+
+ --help display this help and exit successfully.
+ --version display version information and exit successfully.
Simple example: $prog --email bug-gnu-emacs@gnu.org emacs \"GNU Emacs Manual\"
@@ -80,12 +95,12 @@ Typical sequence:
wget \"$templateurl\"
$prog --email BUGLIST MANUAL \"GNU MANUAL - One-line description\"
-Output will be in a new subdirectory \"manual\" (by default, use -o OUTDIR
-to override). Move all the new files into your web CVS tree, as
-explained in the Web Pages node of maintain.texi.
+Output will be in a new subdirectory \"manual\" (by default;
+use -o OUTDIR to override). Move all the new files into your web CVS
+tree, as explained in the Web Pages node of maintain.texi.
-Please use the --email ADDRESS option to specify your bug-reporting
-address in the generated HTML pages.
+Please use the --email ADDRESS option so your own bug-reporting
+address will be used in the generated HTML pages.
MANUAL-TITLE is included as part of the HTML <title> of the overall
manual/index.html file. It should include the name of the package being
@@ -102,11 +117,14 @@ If a manual's Texinfo sources are spread across several directories,
first copy or symlink all Texinfo sources into a single directory.
(Part of the script's work is to make a tar.gz of the sources.)
-You can set the environment variables MAKEINFO, TEXI2DVI, TEXI2HTML, and
-DVIPS to control the programs that get executed, and
+As implied above, by default monolithic Info files are generated.
+If you want split Info, or other Info options, use --info to override.
+
+You can set the environment variables MAKEINFO, TEXI2DVI, TEXI2HTML,
+and PERL to control the programs that get executed, and
GENDOCS_TEMPLATE_DIR to control where the gendocs_template file is
looked for. With --docbook, the environment variables DOCBOOK2HTML,
-DOCBOOK2PDF, DOCBOOK2PS, and DOCBOOK2TXT are also respected.
+DOCBOOK2PDF, and DOCBOOK2TXT are also consulted.
By default, makeinfo and texi2dvi are run in the default (English)
locale, since that's the language of most Texinfo manuals. If you
@@ -116,29 +134,37 @@ SETLANG setting in the source.
Email bug reports or enhancement requests to bug-texinfo@gnu.org.
"
-calcsize()
-{
- size=`ls -ksl $1 | awk '{print $1}'`
- echo $size
-}
-
MANUAL_TITLE=
PACKAGE=
EMAIL=webmasters@gnu.org # please override with --email
+commonarg= # passed to all makeinfo/texi2html invcations.
+dirargs= # passed to all tools (-I dir).
+dirs= # -I's directories.
htmlarg=
+infoarg=--no-split
+generate_ascii=true
outdir=manual
+source_extra=
+split=node
srcfile=
while test $# -gt 0; do
case $1 in
- --email) shift; EMAIL=$1;;
- --help) echo "$usage"; exit 0;;
- --version) echo "$version"; exit 0;;
- -s) shift; srcfile=$1;;
- -o) shift; outdir=$1;;
- --docbook) docbook=yes;;
- --html) shift; htmlarg=$1;;
+ -s) shift; srcfile=$1;;
+ -o) shift; outdir=$1;;
+ -I) shift; dirargs="$dirargs -I '$1'"; dirs="$dirs $1";;
+ --common) shift; commonarg=$1;;
+ --docbook) docbook=yes;;
+ --email) shift; EMAIL=$1;;
+ --html) shift; htmlarg=$1;;
+ --info) shift; infoarg=$1;;
+ --no-ascii) generate_ascii=false;;
+ --source) shift; source_extra=$1;;
+ --split) shift; split=$1;;
--texi2html) use_texi2html=1;;
+
+ --help) echo "$usage"; exit 0;;
+ --version) echo "$version"; exit 0;;
-*)
echo "$0: Unknown option \`$1'." >&2
echo "$0: Try \`--help' for more information." >&2
@@ -156,6 +182,9 @@ while test $# -gt 0; do
shift
done
+# makeinfo uses the dirargs, but texi2dvi doesn't.
+commonarg=" $dirargs $commonarg"
+
# For most of the following, the base name is just $PACKAGE
base=$PACKAGE
@@ -183,57 +212,107 @@ if test ! -r $GENDOCS_TEMPLATE_DIR/gendocs_template; then
exit 1
fi
+# Function to return size of $1 in something resembling kilobytes.
+calcsize()
+{
+ size=`ls -ksl $1 | awk '{print $1}'`
+ echo $size
+}
+
+# copy_images OUTDIR HTML-FILE...
+# -------------------------------
+# Copy all the images needed by the HTML-FILEs into OUTDIR. Look
+# for them in the -I directories.
+copy_images()
+{
+ local odir
+ odir=$1
+ shift
+ $PERL -n -e "
+BEGIN {
+ \$me = '$prog';
+ \$odir = '$odir';
+ @dirs = qw($dirs);
+}
+" -e '
+/<img src="(.*?)"/g && ++$need{$1};
+
+END {
+ #print "$me: @{[keys %need]}\n"; # for debugging, show images found.
+ FILE: for my $f (keys %need) {
+ for my $d (@dirs) {
+ if (-f "$d/$f") {
+ use File::Basename;
+ my $dest = dirname ("$odir/$f");
+ #
+ use File::Path;
+ -d $dest || mkpath ($dest)
+ || die "$me: cannot mkdir $dest: $!\n";
+ #
+ use File::Copy;
+ copy ("$d/$f", $dest)
+ || die "$me: cannot copy $d/$f to $dest: $!\n";
+ next FILE;
+ }
+ }
+ die "$me: $ARGV: cannot find image $f\n";
+ }
+}
+' -- "$@" || exit 1
+}
+
case $outdir in
/*) abs_outdir=$outdir;;
*) abs_outdir=$srcdir/$outdir;;
esac
-echo Generating output formats for $srcfile
+echo "Making output for $srcfile"
+echo " in `pwd`"
+mkdir -p "$outdir/"
-cmd="$SETLANG $MAKEINFO -o $PACKAGE.info \"$srcfile\""
-echo "Generating info files... ($cmd)"
+cmd="$SETLANG $MAKEINFO -o $PACKAGE.info $commonarg $infoarg \"$srcfile\""
+echo "Generating info... ($cmd)"
eval "$cmd"
-mkdir -p "$outdir/"
tar czf "$outdir/$PACKAGE.info.tar.gz" $PACKAGE.info*
+ls -l "$outdir/$PACKAGE.info.tar.gz"
info_tgz_size=`calcsize "$outdir/$PACKAGE.info.tar.gz"`
# do not mv the info files, there's no point in having them available
# separately on the web.
-cmd="$SETLANG ${TEXI2DVI} \"$srcfile\""
-echo "Generating dvi ... ($cmd)"
+cmd="$SETLANG $TEXI2DVI $dirargs \"$srcfile\""
+printf "\nGenerating dvi... ($cmd)\n"
eval "$cmd"
-
-# now, before we compress dvi:
-echo Generating postscript...
-${DVIPS} $PACKAGE -o
-gzip -f -9 $PACKAGE.ps
-ps_gz_size=`calcsize $PACKAGE.ps.gz`
-mv $PACKAGE.ps.gz "$outdir/"
-
# compress/finish dvi:
gzip -f -9 $PACKAGE.dvi
dvi_gz_size=`calcsize $PACKAGE.dvi.gz`
mv $PACKAGE.dvi.gz "$outdir/"
+ls -l "$outdir/$PACKAGE.dvi.gz"
-cmd="$SETLANG ${TEXI2DVI} --pdf \"$srcfile\""
-echo "Generating pdf ... ($cmd)"
+cmd="$SETLANG $TEXI2DVI --pdf $dirargs \"$srcfile\""
+printf "\nGenerating pdf... ($cmd)\n"
eval "$cmd"
pdf_size=`calcsize $PACKAGE.pdf`
mv $PACKAGE.pdf "$outdir/"
+ls -l "$outdir/$PACKAGE.pdf"
-cmd="$SETLANG $MAKEINFO -o $PACKAGE.txt --no-split --no-headers \"$srcfile\""
-echo "Generating ASCII... ($cmd)"
-eval "$cmd"
-ascii_size=`calcsize $PACKAGE.txt`
-gzip -f -9 -c $PACKAGE.txt >"$outdir/$PACKAGE.txt.gz"
-ascii_gz_size=`calcsize "$outdir/$PACKAGE.txt.gz"`
-mv $PACKAGE.txt "$outdir/"
+if $generate_ascii; then
+ opt="-o $PACKAGE.txt --no-split --no-headers $commonarg"
+ cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
+ printf "\nGenerating ascii... ($cmd)\n"
+ eval "$cmd"
+ ascii_size=`calcsize $PACKAGE.txt`
+ gzip -f -9 -c $PACKAGE.txt >"$outdir/$PACKAGE.txt.gz"
+ ascii_gz_size=`calcsize "$outdir/$PACKAGE.txt.gz"`
+ mv $PACKAGE.txt "$outdir/"
+ ls -l "$outdir/$PACKAGE.txt" "$outdir/$PACKAGE.txt.gz"
+fi
+# Split HTML at level $1. Used for texi2html.
html_split()
{
- opt="--split=$1 $htmlarg --node-files"
+ opt="--split=$1 --node-files $commonarg $htmlarg"
cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $opt \"$srcfile\""
- echo "Generating html by $1... ($cmd)"
+ printf "\nGenerating html by $1... ($cmd)\n"
eval "$cmd"
split_html_dir=$PACKAGE.html
(
@@ -249,32 +328,48 @@ html_split()
}
if test -z "$use_texi2html"; then
- opt="--no-split --html -o $PACKAGE.html $htmlarg"
+ opt="--no-split --html -o $PACKAGE.html $commonarg $htmlarg"
cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
- echo "Generating monolithic html... ($cmd)"
+ printf "\nGenerating monolithic html... ($cmd)\n"
rm -rf $PACKAGE.html # in case a directory is left over
eval "$cmd"
html_mono_size=`calcsize $PACKAGE.html`
gzip -f -9 -c $PACKAGE.html >"$outdir/$PACKAGE.html.gz"
html_mono_gz_size=`calcsize "$outdir/$PACKAGE.html.gz"`
+ copy_images "$outdir/" $PACKAGE.html
mv $PACKAGE.html "$outdir/"
-
- cmd="$SETLANG $MAKEINFO --html -o $PACKAGE.html $htmlarg \"$srcfile\""
- echo "Generating html by node... ($cmd)"
+ ls -l "$outdir/$PACKAGE.html" "$outdir/$PACKAGE.html.gz"
+
+ # Before Texinfo 5.0, makeinfo did not accept a --split=HOW option,
+ # it just always split by node. So if we're splitting by node anyway,
+ # leave it out.
+ if test "x$split" = xnode; then
+ split_arg=
+ else
+ split_arg=--split=$split
+ fi
+ #
+ opt="--html -o $PACKAGE.html $split_arg $commonarg $htmlarg"
+ cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
+ printf "\nGenerating html by $split... ($cmd)\n"
eval "$cmd"
split_html_dir=$PACKAGE.html
+ copy_images $split_html_dir/ $split_html_dir/*.html
(
- cd ${split_html_dir} || exit 1
- tar -czf "$abs_outdir/${PACKAGE}.html_node.tar.gz" -- *.html
+ cd $split_html_dir || exit 1
+ tar -czf "$abs_outdir/$PACKAGE.html_$split.tar.gz" -- *
)
- html_node_tgz_size=`calcsize "$outdir/${PACKAGE}.html_node.tar.gz"`
- rm -f "$outdir"/html_node/*.html
- mkdir -p "$outdir/html_node/"
- mv ${split_html_dir}/*.html "$outdir/html_node/"
- rmdir ${split_html_dir}
-else
- cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $htmlarg \"$srcfile\""
- echo "Generating monolithic html... ($cmd)"
+ eval \
+ html_${split}_tgz_size=`calcsize "$outdir/$PACKAGE.html_$split.tar.gz"`
+ rm -rf "$outdir/html_$split/"
+ mv $split_html_dir "$outdir/html_$split/"
+ du -s "$outdir/html_$split/"
+ ls -l "$outdir/$PACKAGE.html_$split.tar.gz"
+
+else # use texi2html:
+ opt="--output $PACKAGE.html $commonarg $htmlarg"
+ cmd="$SETLANG $TEXI2HTML $opt \"$srcfile\""
+ printf "\nGenerating monolithic html with texi2html... ($cmd)\n"
rm -rf $PACKAGE.html # in case a directory is left over
eval "$cmd"
html_mono_size=`calcsize $PACKAGE.html`
@@ -287,28 +382,31 @@ else
html_split section
fi
-echo Making .tar.gz for sources...
+printf "\nMaking .tar.gz for sources...\n"
d=`dirname $srcfile`
(
cd "$d"
- srcfiles=`ls *.texinfo *.texi *.txi *.eps 2>/dev/null` || true
- tar cvzfh "$abs_outdir/$PACKAGE.texi.tar.gz" $srcfiles
+ srcfiles=`ls -d *.texinfo *.texi *.txi *.eps $source_extra 2>/dev/null` || true
+ tar czfh "$abs_outdir/$PACKAGE.texi.tar.gz" $srcfiles
+ ls -l "$abs_outdir/$PACKAGE.texi.tar.gz"
)
texi_tgz_size=`calcsize "$outdir/$PACKAGE.texi.tar.gz"`
if test -n "$docbook"; then
- cmd="$SETLANG $MAKEINFO -o - --docbook \"$srcfile\" > ${srcdir}/$PACKAGE-db.xml"
- echo "Generating docbook XML... ($cmd)"
+ opt="-o - --docbook $commonarg"
+ cmd="$SETLANG $MAKEINFO $opt \"$srcfile\" >${srcdir}/$PACKAGE-db.xml"
+ printf "\nGenerating docbook XML... ($cmd)\n"
eval "$cmd"
docbook_xml_size=`calcsize $PACKAGE-db.xml`
gzip -f -9 -c $PACKAGE-db.xml >"$outdir/$PACKAGE-db.xml.gz"
docbook_xml_gz_size=`calcsize "$outdir/$PACKAGE-db.xml.gz"`
mv $PACKAGE-db.xml "$outdir/"
- cmd="${DOCBOOK2HTML} -o $split_html_db_dir \"${outdir}/$PACKAGE-db.xml\""
- echo "Generating docbook HTML... ($cmd)"
- eval "$cmd"
split_html_db_dir=html_node_db
+ opt="$commonarg -o $split_html_db_dir"
+ cmd="$DOCBOOK2HTML $opt \"${outdir}/$PACKAGE-db.xml\""
+ printf "\nGenerating docbook HTML... ($cmd)\n"
+ eval "$cmd"
(
cd ${split_html_db_dir} || exit 1
tar -czf "$abs_outdir/${PACKAGE}.html_node_db.tar.gz" -- *.html
@@ -319,33 +417,28 @@ if test -n "$docbook"; then
mv ${split_html_db_dir}/*.html "$outdir/html_node_db/"
rmdir ${split_html_db_dir}
- cmd="${DOCBOOK2TXT} \"${outdir}/$PACKAGE-db.xml\""
- echo "Generating docbook ASCII... ($cmd)"
+ cmd="$DOCBOOK2TXT \"${outdir}/$PACKAGE-db.xml\""
+ printf "\nGenerating docbook ASCII... ($cmd)\n"
eval "$cmd"
docbook_ascii_size=`calcsize $PACKAGE-db.txt`
mv $PACKAGE-db.txt "$outdir/"
- cmd="${DOCBOOK2PS} \"${outdir}/$PACKAGE-db.xml\""
- echo "Generating docbook PS... ($cmd)"
- eval "$cmd"
- gzip -f -9 -c $PACKAGE-db.ps >"$outdir/$PACKAGE-db.ps.gz"
- docbook_ps_gz_size=`calcsize "$outdir/$PACKAGE-db.ps.gz"`
- mv $PACKAGE-db.ps "$outdir/"
-
- cmd="${DOCBOOK2PDF} \"${outdir}/$PACKAGE-db.xml\""
- echo "Generating docbook PDF... ($cmd)"
+ cmd="$DOCBOOK2PDF \"${outdir}/$PACKAGE-db.xml\""
+ printf "\nGenerating docbook PDF... ($cmd)\n"
eval "$cmd"
docbook_pdf_size=`calcsize $PACKAGE-db.pdf`
mv $PACKAGE-db.pdf "$outdir/"
fi
-echo "Writing index file..."
+printf "\nMaking index file...\n"
if test -z "$use_texi2html"; then
- CONDS="/%%IF *HTML_SECTION%%/,/%%ENDIF *HTML_SECTION%%/d;\
- /%%IF *HTML_CHAPTER%%/,/%%ENDIF *HTML_CHAPTER%%/d"
+ CONDS="/%%IF *HTML_SECTION%%/,/%%ENDIF *HTML_SECTION%%/d;\
+ /%%IF *HTML_CHAPTER%%/,/%%ENDIF *HTML_CHAPTER%%/d"
else
- CONDS="/%%ENDIF.*%%/d;/%%IF *HTML_SECTION%%/d;/%%IF *HTML_CHAPTER%%/d"
+ # should take account of --split here.
+ CONDS="/%%ENDIF.*%%/d;/%%IF *HTML_SECTION%%/d;/%%IF *HTML_CHAPTER%%/d"
fi
+
curdate=`$SETLANG date '+%B %d, %Y'`
sed \
-e "s!%%TITLE%%!$MANUAL_TITLE!g" \
@@ -360,13 +453,11 @@ sed \
-e "s!%%INFO_TGZ_SIZE%%!$info_tgz_size!g" \
-e "s!%%DVI_GZ_SIZE%%!$dvi_gz_size!g" \
-e "s!%%PDF_SIZE%%!$pdf_size!g" \
- -e "s!%%PS_GZ_SIZE%%!$ps_gz_size!g" \
-e "s!%%ASCII_SIZE%%!$ascii_size!g" \
-e "s!%%ASCII_GZ_SIZE%%!$ascii_gz_size!g" \
-e "s!%%TEXI_TGZ_SIZE%%!$texi_tgz_size!g" \
-e "s!%%DOCBOOK_HTML_NODE_TGZ_SIZE%%!$html_node_db_tgz_size!g" \
-e "s!%%DOCBOOK_ASCII_SIZE%%!$docbook_ascii_size!g" \
- -e "s!%%DOCBOOK_PS_GZ_SIZE%%!$docbook_ps_gz_size!g" \
-e "s!%%DOCBOOK_PDF_SIZE%%!$docbook_pdf_size!g" \
-e "s!%%DOCBOOK_XML_SIZE%%!$docbook_xml_size!g" \
-e "s!%%DOCBOOK_XML_GZ_SIZE%%!$docbook_xml_gz_size!g" \
diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
index 686f703..3468247 100755
--- a/build-aux/git-version-gen
+++ b/build-aux/git-version-gen
@@ -1,8 +1,8 @@
#!/bin/sh
# Print a version string.
-scriptversion=2011-02-19.19; # UTC
+scriptversion=2012-12-31.23; # UTC
-# Copyright (C) 2007-2011 Free Software Foundation, Inc.
+# Copyright (C) 2007-2013 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -44,8 +44,10 @@ scriptversion=2011-02-19.19; # UTC
# files to pick up a version string change; and leave it stale to
# minimize rebuild time after unrelated changes to configure sources.
#
-# It is probably wise to add these two files to .gitignore, so that you
-# don't accidentally commit either generated file.
+# As with any generated file in a VC'd directory, you should add
+# /.version to .gitignore, so that you don't accidentally commit it.
+# .tarball-version is never generated in a VC'd directory, so needn't
+# be listed there.
#
# Use the following line in your configure.ac, so that $(VERSION) will
# automatically be up-to-date each time configure is run (and note that
@@ -57,24 +59,73 @@ scriptversion=2011-02-19.19; # UTC
# [bug-project@example])
#
# Then use the following lines in your Makefile.am, so that .version
-# will be present for dependencies, and so that .tarball-version will
-# exist in distribution tarballs.
+# will be present for dependencies, and so that .version and
+# .tarball-version will exist in distribution tarballs.
#
+# EXTRA_DIST = $(top_srcdir)/.version
# BUILT_SOURCES = $(top_srcdir)/.version
# $(top_srcdir)/.version:
# echo $(VERSION) > $@-t && mv $@-t $@
# dist-hook:
# echo $(VERSION) > $(distdir)/.tarball-version
-case $# in
- 1|2) ;;
- *) echo 1>&2 "Usage: $0 \$srcdir/.tarball-version" \
- '[TAG-NORMALIZATION-SED-SCRIPT]'
- exit 1;;
-esac
-tarball_version_file=$1
-tag_sed_script="${2:-s/x/x/}"
+me=$0
+
+version="git-version-gen $scriptversion
+
+Copyright 2011 Free Software Foundation, Inc.
+There is NO warranty. You may redistribute this software
+under the terms of the GNU General Public License.
+For more information about these matters, see the files named COPYING."
+
+usage="\
+Usage: $me [OPTION]... \$srcdir/.tarball-version [TAG-NORMALIZATION-SED-SCRIPT]
+Print a version string.
+
+Options:
+
+ --prefix prefix of git tags (default 'v')
+ --fallback fallback version to use if \"git --version\" fails
+
+ --help display this help and exit
+ --version output version information and exit
+
+Running without arguments will suffice in most cases."
+
+prefix=v
+fallback=
+
+while test $# -gt 0; do
+ case $1 in
+ --help) echo "$usage"; exit 0;;
+ --version) echo "$version"; exit 0;;
+ --prefix) shift; prefix="$1";;
+ --fallback) shift; fallback="$1";;
+ -*)
+ echo "$0: Unknown option '$1'." >&2
+ echo "$0: Try '--help' for more information." >&2
+ exit 1;;
+ *)
+ if test "x$tarball_version_file" = x; then
+ tarball_version_file="$1"
+ elif test "x$tag_sed_script" = x; then
+ tag_sed_script="$1"
+ else
+ echo "$0: extra non-option argument '$1'." >&2
+ exit 1
+ fi;;
+ esac
+ shift
+done
+
+if test "x$tarball_version_file" = x; then
+ echo "$usage"
+ exit 1
+fi
+
+tag_sed_script="${tag_sed_script:-s/x/x/}"
+
nl='
'
@@ -92,22 +143,22 @@ then
[0-9]*) ;;
*) v= ;;
esac
- test -z "$v" \
+ test "x$v" = x \
&& echo "$0: WARNING: $tarball_version_file is missing or damaged" 1>&2
fi
-if test -n "$v"
+if test "x$v" != x
then
: # use $v
# Otherwise, if there is at least one git commit involving the working
# directory, and "git describe" output looks sensible, use that to
# derive a version string.
elif test "`git log -1 --pretty=format:x . 2>&1`" = x \
- && v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \
+ && v=`git describe --abbrev=4 --match="$prefix*" HEAD 2>/dev/null \
|| git describe --abbrev=4 HEAD 2>/dev/null` \
&& v=`printf '%s\n' "$v" | sed "$tag_sed_script"` \
&& case $v in
- v[0-9]*) ;;
+ $prefix[0-9]*) ;;
*) (exit 1) ;;
esac
then
@@ -136,16 +187,18 @@ then
# Remove the "g" in git describe's output string, to save a byte.
v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`;
v_from_git=1
-else
+elif test "x$fallback" = x || git --version >/dev/null 2>&1; then
v=UNKNOWN
+else
+ v=$fallback
fi
-v=`echo "$v" |sed 's/^v//'`
+v=`echo "$v" |sed "s/^$prefix//"`
# Test whether to append the "-dirty" suffix only if the version
# string we're using came from git. I.e., skip the test if it's "UNKNOWN"
# or if it came from .tarball-version.
-if test -n "$v_from_git"; then
+if test "x$v_from_git" != x; then
# Don't declare a version "dirty" merely because a time stamp has changed.
git update-index --refresh > /dev/null 2>&1
diff --git a/build-aux/gnu-web-doc-update b/build-aux/gnu-web-doc-update
index f6d0ee1..268ecc0 100755
--- a/build-aux/gnu-web-doc-update
+++ b/build-aux/gnu-web-doc-update
@@ -1,15 +1,10 @@
#!/bin/sh
# Run this after each non-alpha release, to update the web documentation at
# http://www.gnu.org/software/$pkg/manual/
-# This script must be run from the top-level directory,
-# assumes you're using git for revision control,
-# and requires a .prev-version file as well as a Makefile,
-# from which it extracts the version number and package name, respectively.
-# Also, it assumes all documentation is in the doc/ sub-directory.
-VERSION=2009-07-21.16; # UTC
+VERSION=2012-12-16.14; # UTC
-# Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,63 +19,132 @@ VERSION=2009-07-21.16; # UTC
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Requirements: everything required to bootstrap your package,
-# plus these: git, cvs, cvsu, rsync, mktemp
-
-ME=`basename "$0"`
+ME=$(basename "$0")
warn() { printf '%s: %s\n' "$ME" "$*" >&2; }
die() { warn "$*"; exit 1; }
-help_version()
+help()
{
- case $1 in
- --help) cat <<EOF
+ cat <<EOF
Usage: $ME
-Run this script (no options or arguments) after each non-alpha release,
-to update the web documentation at http://www.gnu.org/software/\$pkg/manual/
-Run it from your project's the top-level directory.
+Run this script from top_srcdir (no arguments) after each non-alpha
+release, to update the web documentation at
+http://www.gnu.org/software/\$pkg/manual/
+
+This script assumes you're using git for revision control, and
+requires a .prev-version file as well as a Makefile, from which it
+extracts the version number and package name, respectively. Also, it
+assumes all documentation is in the doc/ sub-directory.
Options:
- --help print this help, then exit
- --version print version number, then exit
+ -C, --builddir=DIR location of (configured) Makefile (default: .)
+ -n, --dry-run don't actually commit anything
+ --help print this help, then exit
+ --version print version number, then exit
Report bugs and patches to <bug-gnulib@gnu.org>.
EOF
- exit ;;
+ exit
+}
- --version)
- year=`echo "$VERSION" | sed 's/[^0-9].*//'`
- cat <<EOF
+version()
+{
+ year=$(echo "$VERSION" | sed 's/[^0-9].*//')
+ cat <<EOF
$ME $VERSION
Copyright (C) $year Free Software Foundation, Inc,
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
EOF
- exit ;;
+ exit
+}
- *) die "unrecognized option: $1";;
- esac
+# find_tool ENVVAR NAMES...
+# -------------------------
+# Search for a required program. Use the value of ENVVAR, if set,
+# otherwise find the first of the NAMES that can be run (i.e.,
+# supports --version). If found, set ENVVAR to the program name,
+# die otherwise.
+#
+# FIXME: code duplication, see also bootstrap.
+find_tool ()
+{
+ find_tool_envvar=$1
+ shift
+ find_tool_names=$@
+ eval "find_tool_res=\$$find_tool_envvar"
+ if test x"$find_tool_res" = x; then
+ for i
+ do
+ if ($i --version </dev/null) >/dev/null 2>&1; then
+ find_tool_res=$i
+ break
+ fi
+ done
+ else
+ find_tool_error_prefix="\$$find_tool_envvar: "
+ fi
+ test x"$find_tool_res" != x \
+ || die "one of these is required: $find_tool_names"
+ ($find_tool_res --version </dev/null) >/dev/null 2>&1 \
+ || die "${find_tool_error_prefix}cannot run $find_tool_res --version"
+ eval "$find_tool_envvar=\$find_tool_res"
+ eval "export $find_tool_envvar"
}
-case $# in
- 0) ;;
- 1) help_version $1 ;;
- *) die "$ME: too many options" ;;
-esac
+## ------ ##
+## Main. ##
+## ------ ##
+
+# Requirements: everything required to bootstrap your package, plus
+# these.
+find_tool CVS cvs
+find_tool GIT git
+find_tool RSYNC rsync
+find_tool XARGS gxargs xargs
+
+builddir=.
+dryrun=
+while test $# != 0
+do
+ # Handle --option=value by splitting apart and putting back on argv.
+ case $1 in
+ --*=*)
+ opt=$(echo "$1" | sed -e 's/=.*//')
+ val=$(echo "$1" | sed -e 's/[^=]*=//')
+ shift
+ set dummy "$opt" "$val" ${1+"$@"}; shift
+ ;;
+ esac
+
+ case $1 in
+ --help|--version) ${1#--};;
+ -C|--builddir) shift; builddir=$1; shift ;;
+ -n|--dry-run) dryrun=echo; shift;;
+ --*) die "unrecognized option: $1";;
+ *) break;;
+ esac
+done
+
+test $# = 0 \
+ || die "too many arguments"
prev=.prev-version
-version=$(cat $prev) || die "$ME: no $prev file?"
-pkg=$(sed -n 's/^PACKAGE = \(.*\)/\1/p' Makefile) || die "$ME: no Makefile?"
+version=$(cat $prev) || die "no $prev file?"
+pkg=$(sed -n 's/^PACKAGE = \(.*\)/\1/p' $builddir/Makefile) \
+ || die "no Makefile?"
tmp_branch=web-doc-$version-$$
+current_branch=$($GIT branch | sed -ne '/^\* /{s///;p;q;}')
cleanup()
{
- __st=$?;
- rm -rf "$tmp"
- git checkout master
- git branch -d $tmp_branch
+ __st=$?
+ $dryrun rm -rf "$tmp"
+ $GIT checkout "$current_branch"
+ $GIT submodule update --recursive
+ $GIT branch -d $tmp_branch
exit $__st
}
trap cleanup 0
@@ -89,23 +153,36 @@ trap 'exit $?' 1 2 13 15
# We must build using sources for which --version reports the
# just-released version number, not some string like 7.6.18-20761.
# That version string propagates into all documentation.
-git checkout -b $tmp_branch v$version
-ok=0
-./bootstrap && ./configure && make && make web-manual && ok=1
-test $ok = 1 || exit 1
-
-tmp=$(mktemp -d --tmpdir=. web-doc-update.XXXXXX) || exit 1
+set -e
+$GIT checkout -b $tmp_branch v$version
+$GIT submodule update --recursive
+./bootstrap
+srcdir=$(pwd)
+cd "$builddir"
+ ./config.status --recheck
+ ./config.status
+ make
+ make web-manual
+cd "$srcdir"
+set +e
+
+tmp=$(mktemp -d web-doc-update.XXXXXX) || exit 1
( cd $tmp \
- && cvs -d $USER@cvs.sv.gnu.org:/webcvs/$pkg co $pkg )
-rsync -avP doc/manual/ $tmp/$pkg/manual
+ && $CVS -d $USER@cvs.sv.gnu.org:/webcvs/$pkg co $pkg )
+$RSYNC -avP "$builddir"/doc/manual/ $tmp/$pkg/manual
(
cd $tmp/$pkg/manual
- # Add any new files:
- cvsu --types='?'|sed s/..// | xargs --no-run-if-empty -- cvs add -ko
+ # Add all the files. This is simpler than trying to add only the
+ # new ones because of new directories: it would require iterating on
+ # adding the outer directories, and then their contents.
+ #
+ # find guarantees that we add outer directories first.
+ find . -name CVS -prune -o -print \
+ | $XARGS --no-run-if-empty -- $dryrun $CVS add -ko
- cvs ci -m $version
+ $dryrun $CVS ci -m $version
)
# Local variables:
diff --git a/build-aux/gnupload b/build-aux/gnupload
index 68215ca..7a137c1 100755
--- a/build-aux/gnupload
+++ b/build-aux/gnupload
@@ -1,10 +1,9 @@
#!/bin/sh
# Sign files and upload them.
-scriptversion=2010-05-23.15; # UTC
+scriptversion=2013-03-19.17; # UTC
-# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 2004-2013 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,6 +19,8 @@ scriptversion=2010-05-23.15; # UTC
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Originally written by Alexandre Duret-Lutz <adl@gnu.org>.
+# The master copy of this file is maintained in the gnulib Git repository.
+# Please send bug reports and feature requests to bug-gnulib@gnu.org.
set -e
@@ -27,6 +28,7 @@ GPG='gpg --batch --no-tty'
conffile=.gnuploadrc
to=
dry_run=false
+replace=
symlink_files=
delete_files=
delete_symlinks=
@@ -37,9 +39,8 @@ nl='
usage="Usage: $0 [OPTION]... [CMD] FILE... [[CMD] FILE...]
-Sign all FILES, and process them at selected destinations according to CMD.
-<http://www.gnu.org/prep/maintain/html_node/Automated-FTP-Uploads.html>
-explains further.
+Sign all FILES, and process them at the destinations specified with --to.
+If CMD is not given, it defaults to uploading. See examples below.
Commands:
--delete delete FILES from destination
@@ -48,17 +49,18 @@ Commands:
-- treat the remaining arguments as files to upload
Options:
- --help print this help text and exit
- --to DEST specify one destination for FILES
+ --to DEST specify a destination DEST for FILES
(multiple --to options are allowed)
--user NAME sign with key NAME
+ --replace allow replacements of existing files
--symlink-regex[=EXPR] use sed script EXPR to compute symbolic link names
--dry-run do nothing, show what would have been done
+ (including the constructed directive file)
--version output version information and exit
+ --help print this help text and exit
If --symlink-regex is given without EXPR, then the link target name
-is created by replacing the version information with \`-latest', e.g.:
-
+is created by replacing the version information with '-latest', e.g.:
foo-1.3.4.tar.gz -> foo-latest.tar.gz
Recognized destinations are:
@@ -76,6 +78,9 @@ in the current working directory, its contents are prepended to the
actual command line options. Use this to keep your defaults. Comments
(#) and empty lines in $conffile are allowed.
+<http://www.gnu.org/prep/maintain/html_node/Automated-FTP-Uploads.html>
+gives some further background.
+
Examples:
1. Upload foobar-1.0.tar.gz to ftp.gnu.org:
gnupload --to ftp.gnu.org:foobar foobar-1.0.tar.gz
@@ -100,13 +105,12 @@ Examples:
--delete oopsbar-0.9.91.tar.gz \\
-- foobar-0.9.91.tar.gz
-gnupload uses the ncftpput program to do the transfers; if you don't
+gnupload executes a program ncftpput to do the transfers; if you don't
happen to have an ncftp package installed, the ncftpput-ftp script in
the build-aux/ directory of the gnulib package
(http://savannah.gnu.org/projects/gnulib) may serve as a replacement.
-Report bugs to <bug-automake@gnu.org>.
-Send patches to <automake-patches@gnu.org>."
+Send patches and bug reports to <bug-gnulib@gnu.org>."
# Read local configuration file
if test -r "$conffile"; then
@@ -129,6 +133,12 @@ while test -n "$1"; do
if test -z "$2"; then
echo "$0: Missing argument for --to" 1>&2
exit 1
+ elif echo "$2" | grep 'ftp-upload\.gnu\.org' >/dev/null; then
+ echo "$0: Use ftp.gnu.org:PKGNAME or alpha.gnu.org:PKGNAME" >&2
+ echo "$0: for the destination, not ftp-upload.gnu.org (which" >&2
+ echo "$0: is used for direct ftp uploads, not with gnupload)." >&2
+ echo "$0: See --help and its examples if need be." >&2
+ exit 1
else
to="$to $2"
shift
@@ -146,6 +156,9 @@ while test -n "$1"; do
--delete)
collect_var=delete_files
;;
+ --replace)
+ replace="replace: true"
+ ;;
--rmsymlink)
collect_var=delete_symlinks
;;
@@ -170,7 +183,7 @@ while test -n "$1"; do
break
;;
-*)
- echo "$0: Unknown option \`$1', try \`$0 --help'" 1>&2
+ echo "$0: Unknown option '$1', try '$0 --help'" 1>&2
exit 1
;;
esac
@@ -219,7 +232,7 @@ else
for file
do
if test ! -f $file; then
- echo "$0: Cannot find \`$file'" 1>&2
+ echo "$0: Cannot find '$file'" 1>&2
exit 1
elif test -n "$symlink_expr"; then
linkname=`echo $file | sed "$symlink_expr"`
@@ -236,25 +249,30 @@ fi
# Make sure passphrase is not exported in the environment.
unset passphrase
+unset passphrase_fd_0
+GNUPGHOME=${GNUPGHOME:-$HOME/.gnupg}
# Reset PATH to be sure that echo is a built-in. We will later use
-# `echo $passphrase' to output the passphrase, so it is important that
-# it is a built-in (third-party programs tend to appear in `ps'
+# 'echo $passphrase' to output the passphrase, so it is important that
+# it is a built-in (third-party programs tend to appear in 'ps'
# listings with their arguments...).
-# Remember this script runs with `set -e', so if echo is not built-in
+# Remember this script runs with 'set -e', so if echo is not built-in
# it will exit now.
-PATH=/empty echo -n "Enter GPG passphrase: "
-stty -echo
-read -r passphrase
-stty echo
-echo
+if $dry_run || grep -q "^use-agent" $GNUPGHOME/gpg.conf; then :; else
+ PATH=/empty echo -n "Enter GPG passphrase: "
+ stty -echo
+ read -r passphrase
+ stty echo
+ echo
+ passphrase_fd_0="--passphrase-fd 0"
+fi
if test $# -ne 0; then
for file
do
echo "Signing $file ..."
rm -f $file.sig
- echo "$passphrase" | $dbg $GPG --passphrase-fd 0 -ba -o $file.sig $file
+ echo "$passphrase" | $dbg $GPG $passphrase_fd_0 -ba -o $file.sig $file
done
fi
@@ -270,7 +288,7 @@ filename: $3$stmt"
fi
cat >${2}.directive<<EOF
-version: 1.1
+version: 1.2
directory: $1
comment: gnupload v. $scriptversion$stmt
EOF
@@ -312,12 +330,12 @@ upload ()
case $dest in
alpha.gnu.org:*)
mkdirective "$destdir" "$base" "$file" "$stmt"
- echo "$passphrase" | $dbg $GPG --passphrase-fd 0 --clearsign $base.directive
+ echo "$passphrase" | $dbg $GPG $passphrase_fd_0 --clearsign $base.directive
$dbg ncftpput ftp-upload.gnu.org /incoming/alpha $files $base.directive.asc
;;
ftp.gnu.org:*)
mkdirective "$destdir" "$base" "$file" "$stmt"
- echo "$passphrase" | $dbg $GPG --passphrase-fd 0 --clearsign $base.directive
+ echo "$passphrase" | $dbg $GPG $passphrase_fd_0 --clearsign $base.directive
$dbg ncftpput ftp-upload.gnu.org /incoming/ftp $files $base.directive.asc
;;
savannah.gnu.org:*)
@@ -336,7 +354,7 @@ upload ()
destdir_p1=`echo "$destdir" | sed 's,^[^/]*/,,'`
destdir_topdir=`echo "$destdir" | sed 's,/.*,,'`
mkdirective "$destdir_p1" "$base" "$file" "$stmt"
- echo "$passphrase" | $dbg $GPG --passphrase-fd 0 --clearsign $base.directive
+ echo "$passphrase" | $dbg $GPG $passphrase_fd_0 --clearsign $base.directive
for f in $files $base.directive.asc
do
echo put $f
@@ -345,7 +363,7 @@ upload ()
/*)
dest_host=`echo "$dest" | sed 's,:.*,,'`
mkdirective "$destdir" "$base" "$file" "$stmt"
- echo "$passphrase" | $dbg $GPG --passphrase-fd 0 --clearsign $base.directive
+ echo "$passphrase" | $dbg $GPG $passphrase_fd_0 --clearsign $base.directive
$dbg cp $files $base.directive.asc $dest_host
;;
*)
@@ -393,6 +411,12 @@ do
do
echo "Uploading $file to $dest ..."
stmt=
+ #
+ # allowing file replacement is all or nothing.
+ if test -n "$replace"; then stmt="$stmt
+$replace"
+ fi
+ #
files="$file $file.sig"
destdir=`echo $dest | sed 's/[^:]*://'`
if test -n "$symlink_expr"; then
diff --git a/build-aux/install-sh b/build-aux/install-sh
index a9244eb..377bb86 100755
--- a/build-aux/install-sh
+++ b/build-aux/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2011-01-19.21; # UTC
+scriptversion=2011-11-20.07; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -35,7 +35,7 @@ scriptversion=2011-01-19.21; # UTC
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
+# 'make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
@@ -156,7 +156,7 @@ while test $# -ne 0; do
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
- # Protect names problematic for `test' and other utilities.
+ # Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
@@ -190,7 +190,7 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
fi
shift # arg
dst_arg=$arg
- # Protect names problematic for `test' and other utilities.
+ # Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
@@ -202,7 +202,7 @@ if test $# -eq 0; then
echo "$0: no input file specified." >&2
exit 1
fi
- # It's OK to call `install-sh -d' without argument.
+ # It's OK to call 'install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
@@ -240,7 +240,7 @@ fi
for src
do
- # Protect names problematic for `test' and other utilities.
+ # Protect names problematic for 'test' and other utilities.
case $src in
-* | [=\(\)!]) src=./$src;;
esac
@@ -354,7 +354,7 @@ do
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
- # other-writeable bit of parent directory when it shouldn't.
+ # other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
diff --git a/build-aux/mdate-sh b/build-aux/mdate-sh
index 60dc485..b3719cf 100755
--- a/build-aux/mdate-sh
+++ b/build-aux/mdate-sh
@@ -3,8 +3,7 @@
scriptversion=2010-08-21.06; # UTC
-# Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007, 2009, 2010
-# Free Software Foundation, Inc.
+# Copyright (C) 1995-2013 Free Software Foundation, Inc.
# written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
#
# This program is free software; you can redistribute it and/or modify
@@ -40,7 +39,7 @@ fi
case $1 in
'')
- echo "$0: No file. Try \`$0 --help' for more information." 1>&2
+ echo "$0: No file. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
@@ -76,7 +75,7 @@ LC_TIME=C
export LC_TIME
# GNU ls changes its time format in response to the TIME_STYLE
-# variable. Since we cannot assume `unset' works, revert this
+# variable. Since we cannot assume 'unset' works, revert this
# variable to its documented default.
if test "${TIME_STYLE+set}" = set; then
TIME_STYLE=posix-long-iso
@@ -96,14 +95,14 @@ if ls -n /dev/null 1>/dev/null 2>&1; then
ls_command="$ls_command -n"
fi
-# A `ls -l' line looks as follows on OS/2.
+# A 'ls -l' line looks as follows on OS/2.
# drwxrwx--- 0 Aug 11 2001 foo
# This differs from Unix, which adds ownership information.
# drwxrwx--- 2 root root 4096 Aug 11 2001 foo
#
# To find the date, we split the line on spaces and iterate on words
# until we find a month. This cannot work with files whose owner is a
-# user named `Jan', or `Feb', etc. However, it's unlikely that `/'
+# user named "Jan", or "Feb", etc. However, it's unlikely that '/'
# will be owned by a user whose name is a month. So we first look at
# the extended ls output of the root directory to decide how many
# words should be skipped to get the date.
@@ -116,7 +115,7 @@ month=
command=
until test $month
do
- test $# -gt 0 || error "failed parsing \`$ls_command /' output"
+ test $# -gt 0 || error "failed parsing '$ls_command /' output"
shift
# Add another shift to the command.
command="$command shift;"
@@ -136,7 +135,7 @@ do
esac
done
-test -n "$month" || error "failed parsing \`$ls_command /' output"
+test -n "$month" || error "failed parsing '$ls_command /' output"
# Get the extended ls output of the file or directory.
set dummy x`eval "$ls_command \"\\\$save_arg1\""`
diff --git a/build-aux/missing b/build-aux/missing
index 28055d2..cdea514 100755
--- a/build-aux/missing
+++ b/build-aux/missing
@@ -1,11 +1,10 @@
#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
+# Common wrapper for a few potentially missing GNU programs.
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2012-06-26.16; # UTC
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009 Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 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
@@ -26,69 +25,40 @@ scriptversion=2009-04-28.21; # UTC
# 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"
+ echo 1>&2 "Try '$0 --help' for more information"
exit 1
fi
-run=:
-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
-sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
-
-# In the cases where this matters, `missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
- configure_ac=configure.ac
-else
- configure_ac=configure.in
-fi
+case $1 in
-msg="missing on your system"
+ --is-lightweight)
+ # Used by our autoconf macros to check whether the available missing
+ # script is modern enough.
+ exit 0
+ ;;
-case $1 in
---run)
- # Try to run requested program, and just exit if it succeeds.
- run=
- shift
- "$@" && exit 0
- # Exit code 63 means version mismatch. This often happens
- # when the user try to use an ancient version of a tool on
- # a file that requires a minimum version. In this case we
- # we should proceed has if the program had been absent, or
- # if --run hadn't been passed.
- if test $? = 63; then
- run=:
- msg="probably too old"
- fi
- ;;
+ --run)
+ # Back-compat with the calling convention used by older automake.
+ shift
+ ;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
+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
- --run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
- aclocal touch file \`aclocal.m4'
- autoconf touch file \`configure'
- autoheader touch file \`config.h.in'
- autom4te touch the output file, or create a stub one
- automake touch all \`Makefile.in' files
- bison create \`y.tab.[ch]', if possible, from existing .[ch]
- flex create \`lex.yy.c', if possible, from existing .c
- help2man touch the output file
- lex create \`lex.yy.c', if possible, from existing .c
- makeinfo touch the output file
- tar try tar, gnutar, gtar, then tar without non-portable flags
- yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+ 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.
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
Send bug reports to <bug-automake@gnu.org>."
exit $?
@@ -100,272 +70,141 @@ Send bug reports to <bug-automake@gnu.org>."
;;
-*)
- echo 1>&2 "$0: Unknown \`$1' option"
- echo 1>&2 "Try \`$0 --help' for more information"
+ echo 1>&2 "$0: unknown '$1' option"
+ echo 1>&2 "Try '$0 --help' for more information"
exit 1
;;
esac
-# normalize program name to check for.
-program=`echo "$1" | sed '
- s/^gnu-//; t
- s/^gnu//; t
- s/^g//; t'`
-
-# Now exit if we have it, but it failed. Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program). This is about non-GNU programs, so use $1 not
-# $program.
-case $1 in
- lex*|yacc*)
- # Not GNU programs, they don't have --version.
- ;;
-
- tar*)
- if test -n "$run"; then
- echo 1>&2 "ERROR: \`tar' requires --run"
- exit 1
- elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
- exit 1
- fi
- ;;
-
- *)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
- # Could not run --version or --help. This is probably someone
- # running `$TOOL --version' or `$TOOL --help' to check whether
- # $TOOL exists and not knowing $TOOL uses missing.
- exit 1
- fi
- ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case $program in
- aclocal*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`acinclude.m4' or \`${configure_ac}'. You might want
- to install the \`Automake' and \`Perl' packages. Grab them from
- any GNU archive site."
- touch aclocal.m4
- ;;
-
- autoconf*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`${configure_ac}'. You might want to install the
- \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
- archive site."
- touch configure
- ;;
-
- autoheader*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`acconfig.h' or \`${configure_ac}'. You might want
- to install the \`Autoconf' and \`GNU m4' packages. Grab them
- from any GNU archive site."
- files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
- test -z "$files" && files="config.h"
- touch_files=
- for f in $files; do
- case $f in
- *:*) touch_files="$touch_files "`echo "$f" |
- sed -e 's/^[^:]*://' -e 's/:.*//'`;;
- *) touch_files="$touch_files $f.in";;
- esac
- done
- touch $touch_files
- ;;
-
- automake*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
- You might want to install the \`Automake' and \`Perl' packages.
- Grab them from any GNU archive site."
- find . -type f -name Makefile.am -print |
- sed 's/\.am$/.in/' |
- while read f; do touch "$f"; done
- ;;
-
- autom4te*)
- echo 1>&2 "\
-WARNING: \`$1' is needed, but is $msg.
- You might have modified some files without having the
- proper tools for further handling them.
- You can get \`$1' as part of \`Autoconf' from any GNU
- archive site."
-
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo "#! /bin/sh"
- echo "# Created by GNU Automake missing as a replacement of"
- echo "# $ $@"
- echo "exit 0"
- chmod +x $file
- exit 1
- fi
- ;;
-
- bison*|yacc*)
- echo 1>&2 "\
-WARNING: \`$1' $msg. You should only need it if
- you modified a \`.y' file. You may need the \`Bison' package
- in order for those modifications to take effect. You can get
- \`Bison' from any GNU archive site."
- rm -f y.tab.c y.tab.h
- if test $# -ne 1; then
- eval LASTARG="\${$#}"
- case $LASTARG in
- *.y)
- SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" y.tab.c
- fi
- SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" y.tab.h
- fi
- ;;
- esac
- fi
- if test ! -f y.tab.h; then
- echo >y.tab.h
- fi
- if test ! -f y.tab.c; then
- echo 'main() { return 0; }' >y.tab.c
- fi
- ;;
-
- lex*|flex*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a \`.l' file. You may need the \`Flex' package
- in order for those modifications to take effect. You can get
- \`Flex' from any GNU archive site."
- rm -f lex.yy.c
- if test $# -ne 1; then
- eval LASTARG="\${$#}"
- case $LASTARG in
- *.l)
- SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" lex.yy.c
- fi
- ;;
- esac
- fi
- if test ! -f lex.yy.c; then
- echo 'main() { return 0; }' >lex.yy.c
- fi
- ;;
-
- help2man*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a dependency of a manual page. You may need the
- \`Help2man' package in order for those modifications to take
- effect. You can get \`Help2man' from any GNU archive site."
-
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo ".ab help2man is required to generate this page"
- exit $?
- fi
- ;;
-
- makeinfo*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a \`.texi' or \`.texinfo' file, or any other file
- indirectly affecting the aspect of the manual. The spurious
- call might also be the consequence of using a buggy \`make' (AIX,
- DU, IRIX). You might want to install the \`Texinfo' package or
- the \`GNU make' package. Grab either from any GNU archive site."
- # The file to touch is that specified with -o ...
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -z "$file"; then
- # ... or it is the one specified with @setfilename ...
- infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '
- /^@setfilename/{
- s/.* \([^ ]*\) *$/\1/
- p
- q
- }' $infile`
- # ... or it is derived from the source name (dir/f.texi becomes f.info)
- test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
- fi
- # If the file does not exist, the user really needs makeinfo;
- # let's fail without touching anything.
- test -f $file || exit 1
- touch $file
- ;;
-
- tar*)
- shift
-
- # We have already tried tar in the generic part.
- # Look for gnutar/gtar before invocation to avoid ugly error
- # messages.
- if (gnutar --version > /dev/null 2>&1); then
- gnutar "$@" && exit 0
- fi
- if (gtar --version > /dev/null 2>&1); then
- gtar "$@" && exit 0
- fi
- firstarg="$1"
- if shift; then
- case $firstarg in
- *o*)
- firstarg=`echo "$firstarg" | sed s/o//`
- tar "$firstarg" "$@" && exit 0
- ;;
- esac
- case $firstarg in
- *h*)
- firstarg=`echo "$firstarg" | sed s/h//`
- tar "$firstarg" "$@" && exit 0
- ;;
- esac
- fi
-
- echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
- You may want to install GNU tar or Free paxutils, or check the
- command line arguments."
- exit 1
- ;;
-
- *)
- echo 1>&2 "\
-WARNING: \`$1' is needed, and is $msg.
- You might have modified some files without having the
- proper tools for further handling them. Check the \`README' file,
- it often tells you about the needed prerequisites for installing
- this package. You may also peek at any GNU archive site, in case
- some other package would contain this missing \`$1' program."
- exit 1
- ;;
-esac
+# 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
-exit 0
+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)
diff --git a/build-aux/snippet/_Noreturn.h b/build-aux/snippet/_Noreturn.h
new file mode 100644
index 0000000..c44ad89
--- /dev/null
+++ b/build-aux/snippet/_Noreturn.h
@@ -0,0 +1,10 @@
+#if !defined _Noreturn && __STDC_VERSION__ < 201112
+# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
+ || 0x5110 <= __SUNPRO_C)
+# define _Noreturn __attribute__ ((__noreturn__))
+# elif 1200 <= _MSC_VER
+# define _Noreturn __declspec (noreturn)
+# else
+# define _Noreturn
+# endif
+#endif
diff --git a/build-aux/arg-nonnull.h b/build-aux/snippet/arg-nonnull.h
index 6c2f1e8..8ea2a47 100644
--- a/build-aux/arg-nonnull.h
+++ b/build-aux/snippet/arg-nonnull.h
@@ -1,5 +1,5 @@
/* A C macro for declaring that specific arguments must not be NULL.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
diff --git a/build-aux/c++defs.h b/build-aux/snippet/c++defs.h
index b6821a6..b35b933 100644
--- a/build-aux/c++defs.h
+++ b/build-aux/snippet/c++defs.h
@@ -1,5 +1,5 @@
/* C++ compatible function declaration macros.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
diff --git a/build-aux/snippet/unused-parameter.h b/build-aux/snippet/unused-parameter.h
new file mode 100644
index 0000000..1347c27
--- /dev/null
+++ b/build-aux/snippet/unused-parameter.h
@@ -0,0 +1,36 @@
+/* A C macro for declaring that specific function parameters are not used.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter
+ declarations for parameters that are not used. This helps to reduce
+ warnings, such as from GCC -Wunused-parameter. The syntax is as follows:
+ type param _GL_UNUSED_PARAMETER
+ or more generally
+ param_decl _GL_UNUSED_PARAMETER
+ For example:
+ int param _GL_UNUSED_PARAMETER
+ int *(*param)(void) _GL_UNUSED_PARAMETER
+ Other possible, but obscure and discouraged syntaxes:
+ int _GL_UNUSED_PARAMETER *(*param)(void)
+ _GL_UNUSED_PARAMETER int *(*param)(void)
+ */
+#ifndef _GL_UNUSED_PARAMETER
+# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+# define _GL_UNUSED_PARAMETER __attribute__ ((__unused__))
+# else
+# define _GL_UNUSED_PARAMETER
+# endif
+#endif
diff --git a/build-aux/warn-on-use.h b/build-aux/snippet/warn-on-use.h
index 2cdeec3..1736a1b 100644
--- a/build-aux/warn-on-use.h
+++ b/build-aux/snippet/warn-on-use.h
@@ -1,5 +1,5 @@
/* A C macro for emitting warnings if a function is used.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
@@ -55,7 +55,7 @@
rather than issue the nice warning, but the end result of informing
the developer about their portability problem is still achieved):
#if HAVE_RAW_DECL_ENVIRON
- static inline char ***rpl_environ (void) { return &environ; }
+ static char ***rpl_environ (void) { return &environ; }
_GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
# undef environ
# define environ (*rpl_environ ())
diff --git a/build-aux/test-driver b/build-aux/test-driver
new file mode 100755
index 0000000..32bf39e
--- /dev/null
+++ b/build-aux/test-driver
@@ -0,0 +1,127 @@
+#! /bin/sh
+# test-driver - basic testsuite driver script.
+
+scriptversion=2012-06-27.10; # UTC
+
+# Copyright (C) 2011-2013 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# 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 <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+# 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 <<END
+Usage:
+ test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
+ [--expect-failure={yes|no}] [--color-tests={yes|no}]
+ [--enable-hard-errors={yes|no}] [--] TEST-SCRIPT
+The '--test-name', '--log-file' and '--trs-file' options are mandatory.
+END
+}
+
+# TODO: better error handling in option parsing (in particular, ensure
+# TODO: $log_file, $trs_file and $test_name are defined).
+test_name= # Used for reporting.
+log_file= # Where to save the output of the test script.
+trs_file= # Where to save the metadata of the test run.
+expect_failure=no
+color_tests=no
+enable_hard_errors=yes
+while test $# -gt 0; do
+ case $1 in
+ --help) print_usage; exit $?;;
+ --version) echo "test-driver $scriptversion"; exit $?;;
+ --test-name) test_name=$2; shift;;
+ --log-file) log_file=$2; shift;;
+ --trs-file) trs_file=$2; shift;;
+ --color-tests) color_tests=$2; shift;;
+ --expect-failure) expect_failure=$2; shift;;
+ --enable-hard-errors) enable_hard_errors=$2; shift;;
+ --) shift; break;;
+ -*) usage_error "invalid option: '$1'";;
+ esac
+ shift
+done
+
+if test $color_tests = yes; then
+ # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
+ red='' # Red.
+ grn='' # Green.
+ lgn='' # Light green.
+ blu='' # Blue.
+ mgn='' # Magenta.
+ std='' # No color.
+else
+ red= grn= lgn= blu= mgn= std=
+fi
+
+do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
+trap "st=129; $do_exit" 1
+trap "st=130; $do_exit" 2
+trap "st=141; $do_exit" 13
+trap "st=143; $do_exit" 15
+
+# Test script is run here.
+"$@" >$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-aux/texinfo.tex b/build-aux/texinfo.tex
index 7b94389..bfd765d 100644
--- a/build-aux/texinfo.tex
+++ b/build-aux/texinfo.tex
@@ -3,11 +3,11 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2011-02-24.09}
+\def\texinfoversion{2013-09-11.11}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-% 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+% 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
%
% This texinfo.tex file is free software: you can redistribute it and/or
% modify it under the terms of the GNU General Public License as
@@ -24,13 +24,14 @@
%
% As a special exception, when this file is read by TeX when processing
% a Texinfo source document, you may use the result without
-% restriction. (This has been our intent since Texinfo was invented.)
+% restriction. This Exception is an additional permission under section 7
+% of the GNU General Public License, version 3 ("GPLv3").
%
% Please try the latest version of texinfo.tex before submitting bug
% reports; you can get the latest version from:
-% http://www.gnu.org/software/texinfo/ (the Texinfo home page), or
-% ftp://tug.org/tex/texinfo.tex
-% (and all CTAN mirrors, see http://www.ctan.org).
+% http://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or
+% http://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or
+% http://www.gnu.org/software/texinfo/ (the Texinfo home page)
% The texinfo.tex in any given distribution could well be out
% of date, so if that's what you're using, please check.
%
@@ -116,6 +117,7 @@
% Set up fixed words for English if not already set.
\ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi
\ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi
+\ifx\putworderror\undefined \gdef\putworderror{error}\fi
\ifx\putwordfile\undefined \gdef\putwordfile{file}\fi
\ifx\putwordin\undefined \gdef\putwordin{in}\fi
\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi
@@ -229,6 +231,13 @@
\errorcontextlines16
}%
+% @errormsg{MSG}. Do the index-like expansions on MSG, but if things
+% aren't perfect, it's not the end of the world, being an error message,
+% after all.
+%
+\def\errormsg{\begingroup \indexnofonts \doerrormsg}
+\def\doerrormsg#1{\errmessage{#1}}
+
% add check for \lastpenalty to plain's definitions. If the last thing
% we did was a \nobreak, we don't want to insert more space.
%
@@ -272,9 +281,9 @@
\toks6=\expandafter{\prevsectiondefs}%
\toks8=\expandafter{\lastcolordefs}%
\mark{%
- \the\toks0 \the\toks2
- \noexpand\or \the\toks4 \the\toks6
- \noexpand\else \the\toks8
+ \the\toks0 \the\toks2 % 0: top marks (\last...)
+ \noexpand\or \the\toks4 \the\toks6 % 1: bottom marks (default, \prev...)
+ \noexpand\else \the\toks8 % 2: color marks
}%
}
% \topmark doesn't work for the very first chapter (after the title
@@ -313,10 +322,13 @@
%
% Do this outside of the \shipout so @code etc. will be expanded in
% the headline as they should be, not taken literally (outputting ''code).
+ \def\commmonheadfootline{\let\hsize=\pagewidth \texinfochars}
+ %
\ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
- \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}%
+ \global\setbox\headlinebox = \vbox{\commmonheadfootline \makeheadline}%
+ %
\ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
- \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}%
+ \global\setbox\footlinebox = \vbox{\commmonheadfootline \makefootline}%
%
{%
% Have to do this stuff outside the \shipout because we want it to
@@ -586,7 +598,7 @@
\def\:{\spacefactor=1000 }
% @* forces a line break.
-\def\*{\hfil\break\hbox{}\ignorespaces}
+\def\*{\unskip\hfil\break\hbox{}\ignorespaces}
% @/ allows a line break.
\let\/=\allowbreak
@@ -693,15 +705,6 @@ where each line of input produces a line of output.}
\newdimen\mil \mil=0.001in
-% Old definition--didn't work.
-%\parseargdef\need{\par %
-%% This method tries to make TeX break the page naturally
-%% if the depth of the box does not fit.
-%{\baselineskip=0pt%
-%\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak
-%\prevdepth=-1000pt
-%}}
-
\parseargdef\need{%
% Ensure vertical mode, so we don't make a big box in the middle of a
% paragraph.
@@ -888,7 +891,7 @@ where each line of input produces a line of output.}
\def\popthisfilestack{\errthisfilestackempty}
\def\errthisfilestackempty{\errmessage{Internal error:
the stack of filenames is empty.}}
-
+%
\def\thisfile{}
% @center line
@@ -896,36 +899,46 @@ where each line of input produces a line of output.}
%
\parseargdef\center{%
\ifhmode
- \let\next\centerH
+ \let\centersub\centerH
\else
- \let\next\centerV
+ \let\centersub\centerV
\fi
- \next{\hfil \ignorespaces#1\unskip \hfil}%
+ \centersub{\hfil \ignorespaces#1\unskip \hfil}%
+ \let\centersub\relax % don't let the definition persist, just in case
}
-\def\centerH#1{%
- {%
- \hfil\break
- \advance\hsize by -\leftskip
- \advance\hsize by -\rightskip
- \line{#1}%
- \break
- }%
+\def\centerH#1{{%
+ \hfil\break
+ \advance\hsize by -\leftskip
+ \advance\hsize by -\rightskip
+ \line{#1}%
+ \break
+}}
+%
+\newcount\centerpenalty
+\def\centerV#1{%
+ % The idea here is the same as in \startdefun, \cartouche, etc.: if
+ % @center is the first thing after a section heading, we need to wipe
+ % out the negative parskip inserted by \sectionheading, but still
+ % prevent a page break here.
+ \centerpenalty = \lastpenalty
+ \ifnum\centerpenalty>10000 \vskip\parskip \fi
+ \ifnum\centerpenalty>9999 \penalty\centerpenalty \fi
+ \line{\kern\leftskip #1\kern\rightskip}%
}
-\def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}}
% @sp n outputs n lines of vertical space
-
+%
\parseargdef\sp{\vskip #1\baselineskip}
% @comment ...line which is ignored...
% @c is the same as @comment
% @ignore ... @end ignore is another way to write a comment
-
+%
\def\comment{\begingroup \catcode`\^^M=\other%
\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
\commentxxx}
{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}}
-
+%
\let\c=\comment
% @paragraphindent NCHARS
@@ -1098,50 +1111,24 @@ where each line of input produces a line of output.}
% for display in the outlines, and in other places. Thus, we have to
% double any backslashes. Otherwise, a name like "\node" will be
% interpreted as a newline (\n), followed by o, d, e. Not good.
-% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html
-% (and related messages, the final outcome is that it is up to the TeX
-% user to double the backslashes and otherwise make the string valid, so
-% that's what we do).
-
-% double active backslashes.
-%
-{\catcode`\@=0 \catcode`\\=\active
- @gdef@activebackslashdouble{%
- @catcode`@\=@active
- @let\=@doublebackslash}
-}
-
-% To handle parens, we must adopt a different approach, since parens are
-% not active characters. hyperref.dtx (which has the same problem as
-% us) handles it with this amazing macro to replace tokens, with minor
-% changes for Texinfo. It is included here under the GPL by permission
-% from the author, Heiko Oberdiek.
-%
-% #1 is the tokens to replace.
-% #2 is the replacement.
-% #3 is the control sequence with the string.
-%
-\def\HyPsdSubst#1#2#3{%
- \def\HyPsdReplace##1#1##2\END{%
- ##1%
- \ifx\\##2\\%
- \else
- #2%
- \HyReturnAfterFi{%
- \HyPsdReplace##2\END
- }%
- \fi
- }%
- \xdef#3{\expandafter\HyPsdReplace#3#1\END}%
-}
-\long\def\HyReturnAfterFi#1\fi{\fi#1}
-
-% #1 is a control sequence in which to do the replacements.
-\def\backslashparens#1{%
- \xdef#1{#1}% redefine it as its expansion; the definition is simply
- % \lastnode when called from \setref -> \pdfmkdest.
- \HyPsdSubst{(}{\realbackslash(}{#1}%
- \HyPsdSubst{)}{\realbackslash)}{#1}%
+%
+% See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and
+% related messages. The final outcome is that it is up to the TeX user
+% to double the backslashes and otherwise make the string valid, so
+% that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to
+% do this reliably, so we use it.
+
+% #1 is a control sequence in which to do the replacements,
+% which we \xdef.
+\def\txiescapepdf#1{%
+ \ifx\pdfescapestring\thisisundefined
+ % No primitive available; should we give a warning or log?
+ % Many times it won't matter.
+ \else
+ % The expandable \pdfescapestring primitive escapes parentheses,
+ % backslashes, and other special chars.
+ \xdef#1{\pdfescapestring{#1}}%
+ \fi
}
\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images
@@ -1200,32 +1187,34 @@ output) for that.)}
%
% #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
\def\dopdfimage#1#2#3{%
- \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
- \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
+ \def\pdfimagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
+ \def\pdfimageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
%
- % pdftex (and the PDF format) support .png, .jpg, .pdf (among
- % others). Let's try in that order.
+ % pdftex (and the PDF format) support .pdf, .png, .jpg (among
+ % others). Let's try in that order, PDF first since if
+ % someone has a scalable image, presumably better to use that than a
+ % bitmap.
\let\pdfimgext=\empty
\begingroup
- \openin 1 #1.png \ifeof 1
- \openin 1 #1.jpg \ifeof 1
- \openin 1 #1.jpeg \ifeof 1
- \openin 1 #1.JPG \ifeof 1
- \openin 1 #1.pdf \ifeof 1
- \openin 1 #1.PDF \ifeof 1
+ \openin 1 #1.pdf \ifeof 1
+ \openin 1 #1.PDF \ifeof 1
+ \openin 1 #1.png \ifeof 1
+ \openin 1 #1.jpg \ifeof 1
+ \openin 1 #1.jpeg \ifeof 1
+ \openin 1 #1.JPG \ifeof 1
\errhelp = \nopdfimagehelp
\errmessage{Could not find image file #1 for pdf}%
- \else \gdef\pdfimgext{PDF}%
+ \else \gdef\pdfimgext{JPG}%
\fi
- \else \gdef\pdfimgext{pdf}%
+ \else \gdef\pdfimgext{jpeg}%
\fi
- \else \gdef\pdfimgext{JPG}%
+ \else \gdef\pdfimgext{jpg}%
\fi
- \else \gdef\pdfimgext{jpeg}%
+ \else \gdef\pdfimgext{png}%
\fi
- \else \gdef\pdfimgext{jpg}%
+ \else \gdef\pdfimgext{PDF}%
\fi
- \else \gdef\pdfimgext{png}%
+ \else \gdef\pdfimgext{pdf}%
\fi
\closein 1
\endgroup
@@ -1237,8 +1226,8 @@ output) for that.)}
\else
\immediate\pdfximage
\fi
- \ifdim \wd0 >0pt width \imagewidth \fi
- \ifdim \wd2 >0pt height \imageheight \fi
+ \ifdim \wd0 >0pt width \pdfimagewidth \fi
+ \ifdim \wd2 >0pt height \pdfimageheight \fi
\ifnum\pdftexversion<13
#1.\pdfimgext
\else
@@ -1253,10 +1242,9 @@ output) for that.)}
% such as \, aren't expanded when present in a section title.
\indexnofonts
\turnoffactive
- \activebackslashdouble
\makevalueexpandable
\def\pdfdestname{#1}%
- \backslashparens\pdfdestname
+ \txiescapepdf\pdfdestname
\safewhatsit{\pdfdest name{\pdfdestname} xyz}%
}}
%
@@ -1288,28 +1276,22 @@ output) for that.)}
% page number. We could generate a destination for the section
% text in the case where a section has no node, but it doesn't
% seem worth the trouble, since most documents are normally structured.
- \def\pdfoutlinedest{#3}%
+ \edef\pdfoutlinedest{#3}%
\ifx\pdfoutlinedest\empty
\def\pdfoutlinedest{#4}%
\else
- % Doubled backslashes in the name.
- {\activebackslashdouble \xdef\pdfoutlinedest{#3}%
- \backslashparens\pdfoutlinedest}%
+ \txiescapepdf\pdfoutlinedest
\fi
%
- % Also double the backslashes in the display string.
- {\activebackslashdouble \xdef\pdfoutlinetext{#1}%
- \backslashparens\pdfoutlinetext}%
+ % Also escape PDF chars in the display string.
+ \edef\pdfoutlinetext{#1}%
+ \txiescapepdf\pdfoutlinetext
%
\pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}%
}
%
\def\pdfmakeoutlines{%
\begingroup
- % Thanh's hack / proper braces in bookmarks
- \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace
- \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
- %
% Read toc silently, to get counts of subentries for \pdfoutline.
\def\partentry##1##2##3##4{}% ignore parts in the outlines
\def\numchapentry##1##2##3##4{%
@@ -1365,25 +1347,41 @@ output) for that.)}
% Latin 2 (0xea) gets translated to a | character. Info from
% Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100.
%
- % xx to do this right, we have to translate 8-bit characters to
- % their "best" equivalent, based on the @documentencoding. Right
- % now, I guess we'll just let the pdf reader have its way.
+ % TODO this right, we have to translate 8-bit characters to
+ % their "best" equivalent, based on the @documentencoding. Too
+ % much work for too little return. Just use the ASCII equivalents
+ % we use for the index sort strings.
+ %
\indexnofonts
\setupdatafile
+ % We can have normal brace characters in the PDF outlines, unlike
+ % Texinfo index files. So set that up.
+ \def\{{\lbracecharliteral}%
+ \def\}{\rbracecharliteral}%
\catcode`\\=\active \otherbackslash
\input \tocreadfilename
\endgroup
}
+ {\catcode`[=1 \catcode`]=2
+ \catcode`{=\other \catcode`}=\other
+ \gdef\lbracecharliteral[{]%
+ \gdef\rbracecharliteral[}]%
+ ]
%
\def\skipspaces#1{\def\PP{#1}\def\D{|}%
\ifx\PP\D\let\nextsp\relax
\else\let\nextsp\skipspaces
- \ifx\p\space\else\addtokens{\filename}{\PP}%
- \advance\filenamelength by 1
- \fi
+ \addtokens{\filename}{\PP}%
+ \advance\filenamelength by 1
\fi
\nextsp}
- \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax}
+ \def\getfilename#1{%
+ \filenamelength=0
+ % If we don't expand the argument now, \skipspaces will get
+ % snagged on things like "@value{foo}".
+ \edef\temp{#1}%
+ \expandafter\skipspaces\temp|\relax
+ }
\ifnum\pdftexversion < 14
\let \startlink \pdfannotlink
\else
@@ -1480,9 +1478,6 @@ output) for that.)}
\def\ttsl{\setfontstyle{ttsl}}
-% Default leading.
-\newdimen\textleading \textleading = 13.2pt
-
% Set the baselineskip to #1, and the lineskip and strut size
% correspondingly. There is no deep meaning behind these magic numbers
% used as factors; they just match (closely enough) what Knuth defined.
@@ -1494,6 +1489,7 @@ output) for that.)}
% can get a sort of poor man's double spacing by redefining this.
\def\baselinefactor{1}
%
+\newdimen\textleading
\def\setleading#1{%
\dimen0 = #1\relax
\normalbaselineskip = \baselinefactor\dimen0
@@ -1766,18 +1762,24 @@ end
\fi\fi
-% Set the font macro #1 to the font named #2, adding on the
-% specified font prefix (normally `cm').
+% Set the font macro #1 to the font named \fontprefix#2.
% #3 is the font's design size, #4 is a scale factor, #5 is the CMap
-% encoding (currently only OT1, OT1IT and OT1TT are allowed, pass
-% empty to omit).
+% encoding (only OT1, OT1IT and OT1TT are allowed, or empty to omit).
+% Example:
+% #1 = \textrm
+% #2 = \rmshape
+% #3 = 10
+% #4 = \mainmagstep
+% #5 = OT1
+%
\def\setfont#1#2#3#4#5{%
\font#1=\fontprefix#2#3 scaled #4
\csname cmap#5\endcsname#1%
}
% This is what gets called when #5 of \setfont is empty.
\let\cmap\gobble
-% emacs-page end of cmaps
+%
+% (end of cmaps)
% Use cm as the default font prefix.
% To specify the font prefix, you must define \fontprefix
@@ -1787,7 +1789,7 @@ end
\fi
% Support font families that don't use the same naming scheme as CM.
\def\rmshape{r}
-\def\rmbshape{bx} %where the normal face is bold
+\def\rmbshape{bx} % where the normal face is bold
\def\bfshape{b}
\def\bxshape{bx}
\def\ttshape{tt}
@@ -1802,8 +1804,7 @@ end
\def\scshape{csc}
\def\scbshape{csc}
-% Definitions for a main text size of 11pt. This is the default in
-% Texinfo.
+% Definitions for a main text size of 11pt. (The default in Texinfo.)
%
\def\definetextfontsizexi{%
% Text fonts (11.2pt, magstep1).
@@ -1928,7 +1929,7 @@ end
\textleading = 13.2pt % line spacing for 11pt CM
\textfonts % reset the current fonts
\rm
-} % end of 11pt text font size definitions
+} % end of 11pt text font size definitions, \definetextfontsizexi
% Definitions to make the main text be 10pt Computer Modern, with
@@ -2060,7 +2061,7 @@ end
\textleading = 12pt % line spacing for 10pt CM
\textfonts % reset the current fonts
\rm
-} % end of 10pt text font size definitions
+} % end of 10pt text font size definitions, \definetextfontsizex
% We provide the user-level command
@@ -2275,8 +2276,6 @@ end
\gdef\markupsetcodequoteleft{\let`\codequoteleft}
\gdef\markupsetcodequoteright{\let'\codequoteright}
-
-\gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft}
}
\let\markupsetuplqcode \markupsetcodequoteleft
@@ -2285,6 +2284,9 @@ end
\let\markupsetuplqexample \markupsetcodequoteleft
\let\markupsetuprqexample \markupsetcodequoteright
%
+\let\markupsetuplqkbd \markupsetcodequoteleft
+\let\markupsetuprqkbd \markupsetcodequoteright
+%
\let\markupsetuplqsamp \markupsetcodequoteleft
\let\markupsetuprqsamp \markupsetcodequoteright
%
@@ -2294,8 +2296,6 @@ end
\let\markupsetuplqverbatim \markupsetcodequoteleft
\let\markupsetuprqverbatim \markupsetcodequoteright
-\let\markupsetuplqkbd \markupsetnoligaturesquoteleft
-
% Allow an option to not use regular directed right quote/apostrophe
% (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
% The undirected quote is ugly, so don't make it the default, but it
@@ -2380,20 +2380,29 @@ end
\ifx\next,%
\else\ifx\next-%
\else\ifx\next.%
+ \else\ifx\next\.%
+ \else\ifx\next\comma%
\else\ptexslash
- \fi\fi\fi}
+ \fi\fi\fi\fi\fi
+ \aftersmartic
+}
-% like \smartslanted except unconditionally uses \ttsl, and no ic.
-% @var is set to this for defun arguments.
+% Unconditional use \ttsl, and no ic. @var is set to this for defuns.
\def\ttslanted#1{{\ttsl #1}}
% @cite is like \smartslanted except unconditionally use \sl. We never want
% ttsl for book titles, do we?
\def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection}
+\def\aftersmartic{}
+\def\var#1{%
+ \let\saveaftersmartic = \aftersmartic
+ \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}%
+ \smartslanted{#1}%
+}
+
\let\i=\smartitalic
\let\slanted=\smartslanted
-\def\var#1{\smartslanted{#1}}
\let\dfn=\smartslanted
\let\emph=\smartitalic
@@ -2443,34 +2452,12 @@ end
% @samp.
\def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}}
-% definition of @key that produces a lozenge. Doesn't adjust to text size.
-%\setfont\keyrm\rmshape{8}{1000}{OT1}
-%\font\keysy=cmsy9
-%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
-% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
-% \vbox{\hrule\kern-0.4pt
-% \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
-% \kern-0.4pt\hrule}%
-% \kern-.06em\raise0.4pt\hbox{\angleright}}}}
-
-% definition of @key with no lozenge. If the current font is already
-% monospace, don't change it; that way, we respect @kbdinputstyle. But
-% if it isn't monospace, then use \tt.
-%
-\def\key#1{{\setupmarkupstyle{key}%
- \nohyphenation
- \ifmonospace\else\tt\fi
- #1}\null}
-
-% ctrl is no longer a Texinfo command.
-\def\ctrl #1{{\tt \rawbackslash \hat}#1}
-
-% @file, @option are the same as @samp.
-\let\file=\samp
-\let\option=\samp
+% @indicateurl is \samp, that is, with quotes.
+\let\indicateurl=\samp
-% @code is a modification of @t,
-% which makes spaces the same size as normal in the surrounding text.
+% @code (and similar) prints in typewriter, but with spaces the same
+% size as normal in the surrounding text, without hyphenation, etc.
+% This is a subroutine for that.
\def\tclose#1{%
{%
% Change normal interword space to be same as for the current font.
@@ -2489,18 +2476,18 @@ end
\plainfrenchspacing
#1%
}%
- \null
+ \null % reset spacefactor to 1000
}
% We *must* turn on hyphenation at `-' and `_' in @code.
+% (But see \codedashfinish below.)
% Otherwise, it is too hard to avoid overfull hboxes
% in the Emacs manual, the Library manual, etc.
-
+%
% Unfortunately, TeX uses one parameter (\hyphenchar) to control
% both hyphenation at - and hyphenation within words.
% We must therefore turn them both off (\tclose does that)
-% and arrange explicitly to hyphenate at a dash.
-% -- rms.
+% and arrange explicitly to hyphenate at a dash. -- rms.
{
\catcode`\-=\active \catcode`\_=\active
\catcode`\'=\active \catcode`\`=\active
@@ -2514,17 +2501,38 @@ end
\let-\codedash
\let_\codeunder
\else
- \let-\realdash
+ \let-\normaldash
\let_\realunder
\fi
+ % Given -foo (with a single dash), we do not want to allow a break
+ % after the hyphen.
+ \global\let\codedashprev=\codedash
+ %
\codex
}
+ %
+ \gdef\codedash{\futurelet\next\codedashfinish}
+ \gdef\codedashfinish{%
+ \normaldash % always output the dash character itself.
+ %
+ % Now, output a discretionary to allow a line break, unless
+ % (a) the next character is a -, or
+ % (b) the preceding character is a -.
+ % E.g., given --posix, we do not want to allow a break after either -.
+ % Given --foo-bar, we do want to allow a break between the - and the b.
+ \ifx\next\codedash \else
+ \ifx\codedashprev\codedash
+ \else \discretionary{}{}{}\fi
+ \fi
+ % we need the space after the = for the case when \next itself is a
+ % space token; it would get swallowed otherwise. As in @code{- a}.
+ \global\let\codedashprev= \next
+ }
}
-
+\def\normaldash{-}
+%
\def\codex #1{\tclose{#1}\endgroup}
-\def\realdash{-}
-\def\codedash{-\discretionary{}{}{}}
\def\codeunder{%
% this is all so @math{@code{var_name}+1} can work. In math mode, _
% is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.)
@@ -2538,9 +2546,9 @@ end
}
% An additional complication: the above will allow breaks after, e.g.,
-% each of the four underscores in __typeof__. This is undesirable in
-% some manuals, especially if they don't have long identifiers in
-% general. @allowcodebreaks provides a way to control this.
+% each of the four underscores in __typeof__. This is bad.
+% @allowcodebreaks provides a document-level way to turn breaking at -
+% and _ on and off.
%
\newif\ifallowcodebreaks \allowcodebreakstrue
@@ -2559,6 +2567,13 @@ end
\fi\fi
}
+% For @command, @env, @file, @option quotes seem unnecessary,
+% so use \code rather than \samp.
+\let\command=\code
+\let\env=\code
+\let\file=\code
+\let\option=\code
+
% @uref (abbreviation for `urlref') takes an optional (comma-separated)
% second argument specifying the text to display and an optional third
% arg as text to display instead of (rather than in addition to) the url
@@ -2705,10 +2720,6 @@ end
\let\email=\uref
\fi
-% @kbd is like @code, except that if the argument is just one @key command,
-% then @kbd has no effect.
-\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}}
-
% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
% `example' (@kbd uses ttsl only inside of @example and friends),
% or `code' (@kbd uses normal tty font always).
@@ -2732,16 +2743,36 @@ end
% Default is `distinct'.
\kbdinputstyle distinct
+% @kbd is like @code, except that if the argument is just one @key command,
+% then @kbd has no effect.
+\def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??\par}}
+
\def\xkey{\key}
-\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
-\ifx\one\xkey\ifx\threex\three \key{#2}%
-\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
-\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi}
+\def\kbdsub#1#2#3\par{%
+ \def\one{#1}\def\three{#3}\def\threex{??}%
+ \ifx\one\xkey\ifx\threex\three \key{#2}%
+ \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
+ \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
+}
-% For @indicateurl, @env, @command quotes seem unnecessary, so use \code.
-\let\indicateurl=\code
-\let\env=\code
-\let\command=\code
+% definition of @key that produces a lozenge. Doesn't adjust to text size.
+%\setfont\keyrm\rmshape{8}{1000}{OT1}
+%\font\keysy=cmsy9
+%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
+% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
+% \vbox{\hrule\kern-0.4pt
+% \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
+% \kern-0.4pt\hrule}%
+% \kern-.06em\raise0.4pt\hbox{\angleright}}}}
+
+% definition of @key with no lozenge. If the current font is already
+% monospace, don't change it; that way, we respect @kbdinputstyle. But
+% if it isn't monospace, then use \tt.
+%
+\def\key#1{{\setupmarkupstyle{key}%
+ \nohyphenation
+ \ifmonospace\else\tt\fi
+ #1}\null}
% @clicksequence{File @click{} Open ...}
\def\clicksequence#1{\begingroup #1\endgroup}
@@ -2771,6 +2802,7 @@ end
\ifx\temp\empty \else
\space ({\unsepspaces \ignorespaces \temp \unskip})%
\fi
+ \null % reset \spacefactor=1000
}
% @abbr for "Comput. J." and the like.
@@ -2783,6 +2815,7 @@ end
\ifx\temp\empty \else
\space ({\unsepspaces \ignorespaces \temp \unskip})%
\fi
+ \null % reset \spacefactor=1000
}
% @asis just yields its argument. Used with @table, for example.
@@ -2847,20 +2880,77 @@ end
}
}
+% ctrl is no longer a Texinfo command, but leave this definition for fun.
+\def\ctrl #1{{\tt \rawbackslash \hat}#1}
+
+% @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}.
+% Ignore unless FMTNAME == tex; then it is like @iftex and @tex,
+% except specified as a normal braced arg, so no newlines to worry about.
+%
+\def\outfmtnametex{tex}
+%
+\long\def\inlinefmt#1{\doinlinefmt #1,\finish}
+\long\def\doinlinefmt#1,#2,\finish{%
+ \def\inlinefmtname{#1}%
+ \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi
+}
+%
+% @inlinefmtifelse{FMTNAME,THEN-TEXT,ELSE-TEXT} expands THEN-TEXT if
+% FMTNAME is tex, else ELSE-TEXT.
+\long\def\inlinefmtifelse#1{\doinlinefmtifelse #1,,,\finish}
+\long\def\doinlinefmtifelse#1,#2,#3,#4,\finish{%
+ \def\inlinefmtname{#1}%
+ \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\else \ignorespaces #3\fi
+}
+%
+% For raw, must switch into @tex before parsing the argument, to avoid
+% setting catcodes prematurely. Doing it this way means that, for
+% example, @inlineraw{html, foo{bar} gets a parse error instead of being
+% ignored. But this isn't important because if people want a literal
+% *right* brace they would have to use a command anyway, so they may as
+% well use a command to get a left brace too. We could re-use the
+% delimiter character idea from \verb, but it seems like overkill.
+%
+\long\def\inlineraw{\tex \doinlineraw}
+\long\def\doinlineraw#1{\doinlinerawtwo #1,\finish}
+\def\doinlinerawtwo#1,#2,\finish{%
+ \def\inlinerawname{#1}%
+ \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi
+ \endgroup % close group opened by \tex.
+}
+
+% @inlineifset{VAR, TEXT} expands TEXT if VAR is @set.
+%
+\long\def\inlineifset#1{\doinlineifset #1,\finish}
+\long\def\doinlineifset#1,#2,\finish{%
+ \def\inlinevarname{#1}%
+ \expandafter\ifx\csname SET\inlinevarname\endcsname\relax
+ \else\ignorespaces#2\fi
+}
+
+% @inlineifclear{VAR, TEXT} expands TEXT if VAR is not @set.
+%
+\long\def\inlineifclear#1{\doinlineifclear #1,\finish}
+\long\def\doinlineifclear#1,#2,\finish{%
+ \def\inlinevarname{#1}%
+ \expandafter\ifx\csname SET\inlinevarname\endcsname\relax \ignorespaces#2\fi
+}
+
\message{glyphs,}
% and logos.
-% @@ prints an @.
+% @@ prints an @, as does @atchar{}.
\def\@{\char64 }
+\let\atchar=\@
-% Used to generate quoted braces. Unless we're in typewriter, use
-% \ecfont because the CM text fonts do not have braces, and we don't
-% want to switch into math.
+% @{ @} @lbracechar{} @rbracechar{} all generate brace characters.
+% Unless we're in typewriter, use \ecfont because the CM text fonts do
+% not have braces, and we don't want to switch into math.
\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}}
\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}}
-\let\{=\mylbrace
-\let\}=\myrbrace
+\let\{=\mylbrace \let\lbracechar=\{
+\let\}=\myrbrace \let\rbracechar=\}
\begingroup
% Definitions to produce \{ and \} commands for indices,
% and @{ and @} for the aux/toc files.
@@ -2988,7 +3078,7 @@ end
{\tentt \global\dimen0 = 3em}% Width of the box.
\dimen2 = .55pt % Thickness of rules
% The text. (`r' is open on the right, `e' somewhat less so on the left.)
-\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt}
+\setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt}
%
\setbox\errorbox=\hbox to \dimen0{\hfil
\hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
@@ -3109,12 +3199,17 @@ end
% hopefully nobody will notice/care.
\edef\ecsize{\csname\curfontsize ecsize\endcsname}%
\edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
- \ifx\curfontstyle\bfstylename
- % bold:
- \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize
+ \ifmonospace
+ % typewriter:
+ \font\thisecfont = ectt\ecsize \space at \nominalsize
\else
- % regular:
- \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+ \ifx\curfontstyle\bfstylename
+ % bold:
+ \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize
+ \else
+ % regular:
+ \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+ \fi
\fi
\thisecfont
}
@@ -3227,14 +3322,28 @@ end
\finishedtitlepagetrue
}
-%%% Macros to be used within @titlepage:
+% Settings used for typesetting titles: no hyphenation, no indentation,
+% don't worry much about spacing, ragged right. This should be used
+% inside a \vbox, and fonts need to be set appropriately first. Because
+% it is always used for titles, nothing else, we call \rmisbold. \par
+% should be specified before the end of the \vbox, since a vbox is a group.
+%
+\def\raggedtitlesettings{%
+ \rmisbold
+ \hyphenpenalty=10000
+ \parindent=0pt
+ \tolerance=5000
+ \ptexraggedright
+}
+
+% Macros to be used within @titlepage:
\let\subtitlerm=\tenrm
\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
\parseargdef\title{%
\checkenv\titlepage
- \leftline{\titlefonts\rmisbold #1}
+ \vbox{\titlefonts \raggedtitlesettings #1\par}%
% print a rule at the page bottom also.
\finishedtitlepagefalse
\vskip4pt \hrule height 4pt width \hsize \vskip4pt
@@ -3260,7 +3369,7 @@ end
}
-%%% Set up page headings and footings.
+% Set up page headings and footings.
\let\thispage=\folio
@@ -3959,18 +4068,18 @@ end
\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
\global\advance\multitablelinespace by-\ht0
\fi
-%% Test to see if parskip is larger than space between lines of
-%% table. If not, do nothing.
-%% If so, set to same dimension as multitablelinespace.
+% Test to see if parskip is larger than space between lines of
+% table. If not, do nothing.
+% If so, set to same dimension as multitablelinespace.
\ifdim\multitableparskip>\multitablelinespace
\global\multitableparskip=\multitablelinespace
-\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
- %% than skip between lines in the table.
+\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller
+ % than skip between lines in the table.
\fi%
\ifdim\multitableparskip=0pt
\global\multitableparskip=\multitablelinespace
-\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
- %% than skip between lines in the table.
+\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller
+ % than skip between lines in the table.
\fi}
@@ -4122,7 +4231,7 @@ end
\def\value{\begingroup\makevalueexpandable\valuexxx}
\def\valuexxx#1{\expandablevalue{#1}\endgroup}
{
- \catcode`\- = \active \catcode`\_ = \active
+ \catcode`\-=\active \catcode`\_=\active
%
\gdef\makevalueexpandable{%
\let\value = \expandablevalue
@@ -4131,7 +4240,7 @@ end
% ..., but we might end up with active ones in the argument if
% we're called from @code, as @code{@value{foo-bar_}}, though.
% So \let them to their normal equivalents.
- \let-\realdash \let_\normalunderscore
+ \let-\normaldash \let_\normalunderscore
}
}
@@ -4142,7 +4251,12 @@ end
% variable's value contains other Texinfo commands, it's almost certain
% it will fail (although perhaps we could fix that with sufficient work
% to do a one-level expansion on the result, instead of complete).
-%
+%
+% Unfortunately, this has the consequence that when _ is in the *value*
+% of an @set, it does not print properly in the roman fonts (get the cmr
+% dot accent at position 126 instead). No fix comes to mind, and it's
+% been this way since 2003 or earlier, so just ignore it.
+%
\def\expandablevalue#1{%
\expandafter\ifx\csname SET#1\endcsname\relax
{[No value for ``#1'']}%
@@ -4154,8 +4268,9 @@ end
% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
% with @set.
-%
-% To get special treatment of `@end ifset,' call \makeond and the redefine.
+%
+% To get the special treatment we need for `@end ifset,' we call
+% \makecond and then redefine.
%
\makecond{ifset}
\def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}}
@@ -4171,7 +4286,7 @@ end
}
\def\ifsetfail{\doignore{ifset}}
-% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been
+% @ifclear VAR ... @end executes the `...' iff VAR has never been
% defined with @set, or has been undefined with @clear.
%
% The `\else' inside the `\doifset' parameter is a trick to reuse the
@@ -4182,6 +4297,35 @@ end
\def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}}
\def\ifclearfail{\doignore{ifclear}}
+% @ifcommandisdefined CMD ... @end executes the `...' if CMD (written
+% without the @) is in fact defined. We can only feasibly check at the
+% TeX level, so something like `mathcode' is going to considered
+% defined even though it is not a Texinfo command.
+%
+\makecond{ifcommanddefined}
+\def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}}
+%
+\def\doifcmddefined#1#2{{%
+ \makevalueexpandable
+ \let\next=\empty
+ \expandafter\ifx\csname #2\endcsname\relax
+ #1% If not defined, \let\next as above.
+ \fi
+ \expandafter
+ }\next
+}
+\def\ifcmddefinedfail{\doignore{ifcommanddefined}}
+
+% @ifcommandnotdefined CMD ... handled similar to @ifclear above.
+\makecond{ifcommandnotdefined}
+\def\ifcommandnotdefined{%
+ \parsearg{\doifcmddefined{\else \let\next=\ifcmdnotdefinedfail}}}
+\def\ifcmdnotdefinedfail{\doignore{ifcommandnotdefined}}
+
+% Set the `txicommandconditionals' variable, so documents have a way to
+% test if the @ifcommand...defined conditionals are available.
+\set txicommandconditionals
+
% @dircategory CATEGORY -- specify a category of the dir file
% which this file should belong to. Ignore this in TeX.
\let\dircategory=\comment
@@ -4418,6 +4562,7 @@ end
\definedummyword\guillemetright
\definedummyword\guilsinglleft
\definedummyword\guilsinglright
+ \definedummyword\lbracechar
\definedummyword\leq
\definedummyword\minus
\definedummyword\ogonek
@@ -4430,6 +4575,7 @@ end
\definedummyword\quoteleft
\definedummyword\quoteright
\definedummyword\quotesinglbase
+ \definedummyword\rbracechar
\definedummyword\result
\definedummyword\textdegree
%
@@ -4481,7 +4627,9 @@ end
\definedummyword\t
%
% Commands that take arguments.
+ \definedummyword\abbr
\definedummyword\acronym
+ \definedummyword\anchor
\definedummyword\cite
\definedummyword\code
\definedummyword\command
@@ -4491,7 +4639,9 @@ end
\definedummyword\emph
\definedummyword\env
\definedummyword\file
+ \definedummyword\image
\definedummyword\indicateurl
+ \definedummyword\inforef
\definedummyword\kbd
\definedummyword\key
\definedummyword\math
@@ -4538,7 +4688,10 @@ end
% content at all. So for index sorting, we map @{ and @} to strings
% starting with |, since that ASCII character is between ASCII { and }.
\def\{{|a}%
+ \def\lbracechar{|a}%
+ %
\def\}{|b}%
+ \def\rbracechar{|b}%
%
% Non-English letters.
\def\AA{AA}%
@@ -4714,10 +4867,9 @@ end
%
% ..., ready, GO:
%
-\def\safewhatsit#1{%
-\ifhmode
+\def\safewhatsit#1{\ifhmode
#1%
-\else
+ \else
% \lastskip and \lastpenalty cannot both be nonzero simultaneously.
\whatsitskip = \lastskip
\edef\lastskipmacro{\the\lastskip}%
@@ -4741,7 +4893,6 @@ end
% to re-insert the same penalty (values >10000 are used for various
% signals); since we just inserted a non-discardable item, any
% following glue (such as a \parskip) would be a breakpoint. For example:
- %
% @deffn deffn-whatever
% @vindex index-whatever
% Description.
@@ -4754,8 +4905,7 @@ end
% (the whatsit from the \write), so we must insert a \nobreak.
\nobreak\vskip\whatsitskip
\fi
-\fi
-}
+\fi}
% The index entry written in the file actually looks like
% \entry {sortstring}{page}{topic}
@@ -5502,14 +5652,6 @@ end
% Define @majorheading, @heading and @subheading
-% NOTE on use of \vbox for chapter headings, section headings, and such:
-% 1) We use \vbox rather than the earlier \line to permit
-% overlong headings to fold.
-% 2) \hyphenpenalty is set to 10000 because hyphenation in a
-% heading is obnoxious; this forbids it.
-% 3) Likewise, headings look best if no \parindent is used, and
-% if justification is not attempted. Hence \raggedright.
-
\def\majorheading{%
{\advance\chapheadingskip by 10pt \chapbreak }%
\parsearg\chapheadingzzz
@@ -5517,10 +5659,8 @@ end
\def\chapheading{\chapbreak \parsearg\chapheadingzzz}
\def\chapheadingzzz#1{%
- {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt\ptexraggedright
- \rmisbold #1\hfill}}%
- \bigskip \par\penalty 200\relax
+ \vbox{\chapfonts \raggedtitlesettings #1\par}%
+ \nobreak\bigskip \nobreak
\suppressfirstparagraphindent
}
@@ -5536,14 +5676,13 @@ end
% (including whitespace, linebreaking, etc. around it),
% given all the information in convenient, parsed form.
-%%% Args are the skip and penalty (usually negative)
+% Args are the skip and penalty (usually negative)
\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
-%%% Define plain chapter starts, and page on/off switching for it
% Parameter controlling skip before chapter headings (if needed)
-
\newskip\chapheadingskip
+% Define plain chapter starts, and page on/off switching for it.
\def\chapbreak{\dobreak \chapheadingskip {-4000}}
\def\chappager{\par\vfill\supereject}
% Because \domark is called before \chapoddpage, the filler page will
@@ -5680,8 +5819,7 @@ end
%
% Typeset the actual heading.
\nobreak % Avoid page breaks at the interline glue.
- \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright
- \hangindent=\wd0 \centerparametersmaybe
+ \vbox{\raggedtitlesettings \hangindent=\wd0 \centerparametersmaybe
\unhbox0 #1\par}%
}%
\nobreak\bigskip % no page break after a chapter title
@@ -5703,18 +5841,18 @@ end
\def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
%
\def\unnchfopen #1{%
-\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt\ptexraggedright
- \rmisbold #1\hfill}}\bigskip \par\nobreak
+ \chapoddpage
+ \vbox{\chapfonts \raggedtitlesettings #1\par}%
+ \nobreak\bigskip\nobreak
}
\def\chfopen #1#2{\chapoddpage {\chapfonts
\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
\par\penalty 5000 %
}
\def\centerchfopen #1{%
-\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt
- \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak
+ \chapoddpage
+ \vbox{\chapfonts \raggedtitlesettings \hfill #1\hfill}%
+ \nobreak\bigskip \nobreak
}
\def\CHAPFopen{%
\global\let\chapmacro=\chfopen
@@ -5805,7 +5943,7 @@ end
%
% Now the second mark, after the heading break. No break points
% between here and the heading.
- \let\prevsectiondefs=\lastsectiondefs
+ \global\let\prevsectiondefs=\lastsectiondefs
\domark
%
% Only insert the space after the number if we have a section number.
@@ -5859,15 +5997,15 @@ end
%
% We'll almost certainly start a paragraph next, so don't let that
% glue accumulate. (Not a breakpoint because it's preceded by a
- % discardable item.)
+ % discardable item.) However, when a paragraph is not started next
+ % (\startdefun, \cartouche, \center, etc.), this needs to be wiped out
+ % or the negative glue will cause weirdly wrong output, typically
+ % obscuring the section heading with something else.
\vskip-\parskip
%
- % This is purely so the last item on the list is a known \penalty >
- % 10000. This is so \startdefun can avoid allowing breakpoints after
- % section headings. Otherwise, it would insert a valid breakpoint between:
- %
- % @section sec-whatever
- % @deffn def-whatever
+ % This is so the last item on the main vertical list is a known
+ % \penalty > 10000, so \startdefun, etc., can recognize the situation
+ % and do the needful.
\penalty 10001
}
@@ -6172,8 +6310,8 @@ end
\catcode `\|=\other
\catcode `\<=\other
\catcode `\>=\other
- \catcode`\`=\other
- \catcode`\'=\other
+ \catcode `\`=\other
+ \catcode `\'=\other
\escapechar=`\\
%
% ' is active in math mode (mathcode"8000). So reset it, and all our
@@ -6197,7 +6335,7 @@ end
\let\/=\ptexslash
\let\*=\ptexstar
\let\t=\ptext
- \expandafter \let\csname top\endcsname=\ptextop % outer
+ \expandafter \let\csname top\endcsname=\ptextop % we've made it outer
\let\frenchspacing=\plainfrenchspacing
%
\def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
@@ -6283,6 +6421,12 @@ end
\normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
% Flag to tell @lisp, etc., not to narrow margin.
\let\nonarrowing = t%
+ %
+ % If this cartouche directly follows a sectioning command, we need the
+ % \parskip glue (backspaced over by default) or the cartouche can
+ % collide with the section heading.
+ \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi
+ %
\vbox\bgroup
\baselineskip=0pt\parskip=0pt\lineskip=0pt
\carttop
@@ -6296,7 +6440,7 @@ end
\lineskip=\normlskip
\parskip=\normpskip
\vskip -\parskip
- \comment % For explanation, see the end of \def\group.
+ \comment % For explanation, see the end of def\group.
}
\def\Ecartouche{%
\ifhmode\par\fi
@@ -6316,7 +6460,7 @@ end
\newdimen\nonfillparindent
\def\nonfillstart{%
\aboveenvbreak
- \hfuzz = 12pt % Don't be fussy
+ \ifdim\hfuzz < 12pt \hfuzz = 12pt \fi % Don't be fussy
\sepspaces % Make spaces be word-separators rather than space tokens.
\let\par = \lisppar % don't ignore blank lines
\obeylines % each line of input is a line of output
@@ -6474,16 +6618,9 @@ end
\makedispenvdef{quotation}{\quotationstart}
%
\def\quotationstart{%
- {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
- \parindent=0pt
- %
- % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
+ \indentedblockstart % same as \indentedblock, but increase right margin too.
\ifx\nonarrowing\relax
- \advance\leftskip by \lispnarrowing
\advance\rightskip by \lispnarrowing
- \exdentamount = \lispnarrowing
- \else
- \let\nonarrowing = \relax
\fi
\parsearg\quotationlabel
}
@@ -6509,6 +6646,32 @@ end
\fi
}
+% @indentedblock is like @quotation, but indents only on the left and
+% has no optional argument.
+%
+\makedispenvdef{indentedblock}{\indentedblockstart}
+%
+\def\indentedblockstart{%
+ {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
+ \parindent=0pt
+ %
+ % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
+ \ifx\nonarrowing\relax
+ \advance\leftskip by \lispnarrowing
+ \exdentamount = \lispnarrowing
+ \else
+ \let\nonarrowing = \relax
+ \fi
+}
+
+% Keep a nonzero parskip for the environment, since we're doing normal filling.
+%
+\def\Eindentedblock{%
+ \par
+ {\parskip=0pt \afterenvbreak}%
+}
+\def\Esmallindentedblock{\Eindentedblock}
+
% LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>}
% If we want to allow any <char> as delimiter,
@@ -6702,7 +6865,7 @@ end
% commands also insert a nobreak penalty, and we don't want to allow
% a break between a section heading and a defun.
%
- % As a minor refinement, we avoid "club" headers by signalling
+ % As a further refinement, we avoid "club" headers by signalling
% with penalty of 10003 after the very first @deffn in the
% sequence (see above), and penalty of 10002 after any following
% @def command.
@@ -6769,13 +6932,36 @@ end
\def\domakedefun#1#2#3{%
\envdef#1{%
\startdefun
+ \doingtypefnfalse % distinguish typed functions from all else
\parseargusing\activeparens{\printdefunline#3}%
}%
\def#2{\dodefunx#1}%
\def#3%
}
-%%% Untyped functions:
+\newif\ifdoingtypefn % doing typed function?
+\newif\ifrettypeownline % typeset return type on its own line?
+
+% @deftypefnnewline on|off says whether the return type of typed functions
+% are printed on their own line. This affects @deftypefn, @deftypefun,
+% @deftypeop, and @deftypemethod.
+%
+\parseargdef\deftypefnnewline{%
+ \def\temp{#1}%
+ \ifx\temp\onword
+ \expandafter\let\csname SETtxideftypefnnl\endcsname
+ = \empty
+ \else\ifx\temp\offword
+ \expandafter\let\csname SETtxideftypefnnl\endcsname
+ = \relax
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @txideftypefnnl value `\temp',
+ must be on|off}%
+ \fi\fi
+}
+
+% Untyped functions:
% @deffn category name args
\makedefun{deffn}{\deffngeneral{}}
@@ -6794,7 +6980,7 @@ end
\defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}%
}
-%%% Typed functions:
+% Typed functions:
% @deftypefn category type name args
\makedefun{deftypefn}{\deftypefngeneral{}}
@@ -6809,10 +6995,11 @@ end
%
\def\deftypefngeneral#1#2 #3 #4 #5\endheader{%
\dosubind{fn}{\code{#4}}{#1}%
+ \doingtypefntrue
\defname{#2}{#3}{#4}\defunargs{#5\unskip}%
}
-%%% Typed variables:
+% Typed variables:
% @deftypevr category type var args
\makedefun{deftypevr}{\deftypecvgeneral{}}
@@ -6830,7 +7017,7 @@ end
\defname{#2}{#3}{#4}\defunargs{#5\unskip}%
}
-%%% Untyped variables:
+% Untyped variables:
% @defvr category var args
\makedefun{defvr}#1 {\deftypevrheader{#1} {} }
@@ -6841,7 +7028,8 @@ end
% \defcvof {category of}class var args
\def\defcvof#1#2 {\deftypecvof{#1}#2 {} }
-%%% Type:
+% Types:
+
% @deftp category name args
\makedefun{deftp}#1 #2 #3\endheader{%
\doind{tp}{\code{#2}}%
@@ -6869,25 +7057,49 @@ end
% We are followed by (but not passed) the arguments, if any.
%
\def\defname#1#2#3{%
+ \par
% Get the values of \leftskip and \rightskip as they were outside the @def...
\advance\leftskip by -\defbodyindent
%
- % How we'll format the type name. Putting it in brackets helps
+ % Determine if we are typesetting the return type of a typed function
+ % on a line by itself.
+ \rettypeownlinefalse
+ \ifdoingtypefn % doing a typed function specifically?
+ % then check user option for putting return type on its own line:
+ \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else
+ \rettypeownlinetrue
+ \fi
+ \fi
+ %
+ % How we'll format the category name. Putting it in brackets helps
% distinguish it from the body text that may end up on the next line
% just below it.
\def\temp{#1}%
\setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi}
%
- % Figure out line sizes for the paragraph shape.
+ % Figure out line sizes for the paragraph shape. We'll always have at
+ % least two.
+ \tempnum = 2
+ %
% The first line needs space for \box0; but if \rightskip is nonzero,
% we need only space for the part of \box0 which exceeds it:
\dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip
+ %
+ % If doing a return type on its own line, we'll have another line.
+ \ifrettypeownline
+ \advance\tempnum by 1
+ \def\maybeshapeline{0in \hsize}%
+ \else
+ \def\maybeshapeline{}%
+ \fi
+ %
% The continuations:
\dimen2=\hsize \advance\dimen2 by -\defargsindent
- % (plain.tex says that \dimen1 should be used only as global.)
- \parshape 2 0in \dimen0 \defargsindent \dimen2
%
- % Put the type name to the right margin.
+ % The final paragraph shape:
+ \parshape \tempnum 0in \dimen0 \maybeshapeline \defargsindent \dimen2
+ %
+ % Put the category name at the right margin.
\noindent
\hbox to 0pt{%
\hfil\box0 \kern-\hsize
@@ -6909,8 +7121,16 @@ end
% . this still does not fix the ?` and !` ligatures, but so far no
% one has made identifiers using them :).
\df \tt
- \def\temp{#2}% return value type
- \ifx\temp\empty\else \tclose{\temp} \fi
+ \def\temp{#2}% text of the return type
+ \ifx\temp\empty\else
+ \tclose{\temp}% typeset the return type
+ \ifrettypeownline
+ % put return type on its own line; prohibit line break following:
+ \hfil\vadjust{\nobreak}\break
+ \else
+ \space % type on same line, so just followed by a space
+ \fi
+ \fi % no return type
#3% output function name
}%
{\rm\enskip}% hskip 0.5 em of \tenrm
@@ -6930,7 +7150,10 @@ end
\df \sl \hyphenchar\font=0
%
% On the other hand, if an argument has two dashes (for instance), we
- % want a way to get ttsl. Let's try @var for that.
+ % want a way to get ttsl. We used to recommend @var for that, so
+ % leave the code in, but it's strange for @var to lead to typewriter.
+ % Nowadays we recommend @code, since the difference between a ttsl hyphen
+ % and a tt hyphen is pretty tiny. @code also disables ?` !`.
\def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}%
#1%
\sl\hyphenchar\font=45
@@ -7053,12 +7276,14 @@ end
% ... and for \example:
\spaceisspace
%
- % The \empty here causes a following catcode 5 newline to be eaten
- % as part of reading whitespace after a control sequence. It does
- % not eat a catcode 13 newline. There's no good way to handle the
- % two cases. See the Macro Details node in the manual for the
- % workaround we currently have to recommend for macros and
+ % The \empty here causes a following catcode 5 newline to be eaten as
+ % part of reading whitespace after a control sequence. It does not
+ % eat a catcode 13 newline. There's no good way to handle the two
+ % cases (untried: maybe e-TeX's \everyeof could help, though plain TeX
+ % would then have different behavior). See the Macro Details node in
+ % the manual for the workaround we recommend for macros and
% line-oriented commands.
+ %
\scantokens{#1\empty}%
\endgroup}
@@ -7193,9 +7418,15 @@ end
\def\macroxxx#1{%
\getargs{#1}% now \macname is the macname and \argl the arglist
\ifx\argl\empty % no arguments
- \paramno=0
+ \paramno=0\relax
\else
\expandafter\parsemargdef \argl;%
+ \if\paramno>256\relax
+ \ifx\eTeXversion\thisisundefined
+ \errhelp = \EMsimple
+ \errmessage{You need eTeX to compile a file with macros with more than 256 arguments}
+ \fi
+ \fi
\fi
\if1\csname ismacro.\the\macname\endcsname
\message{Warning: redefining \the\macname}%
@@ -7245,9 +7476,17 @@ end
\def\getmacname#1 #2\relax{\macname={#1}}
\def\getmacargs#1{\def\argl{#1}}
+% For macro processing make @ a letter so that we can make Texinfo private macro names.
+\edef\texiatcatcode{\the\catcode`\@}
+\catcode `@=11\relax
+
% Parse the optional {params} list. Set up \paramno and \paramlist
-% so \defmacro knows what to do. Define \macarg.blah for each blah
-% in the params list to be ##N where N is the position in that list.
+% so \defmacro knows what to do. Define \macarg.BLAH for each BLAH
+% in the params list to some hook where the argument si to be expanded. If
+% there are less than 10 arguments that hook is to be replaced by ##N where N
+% is the position in that list, that is to say the macro arguments are to be
+% defined `a la TeX in the macro body.
+%
% That gets used by \mbodybackslash (above).
%
% We need to get `macro parameter char #' into several definitions.
@@ -7257,12 +7496,33 @@ end
%
% The same technique is used to protect \eatspaces till just before
% the macro is used.
-
+%
+% If there are 10 or more arguments, a different technique is used, where the
+% hook remains in the body, and when macro is to be expanded the body is
+% processed again to replace the arguments.
+%
+% In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the
+% argument N value and then \edef the body (nothing else will expand because of
+% the catcode regime underwhich the body was input).
+%
+% If you compile with TeX (not eTeX), and you have macros with 10 or more
+% arguments, you need that no macro has more than 256 arguments, otherwise an
+% error is produced.
\def\parsemargdef#1;{%
\paramno=0\def\paramlist{}%
\let\hash\relax
\let\xeatspaces\relax
\parsemargdefxxx#1,;,%
+ % In case that there are 10 or more arguments we parse again the arguments
+ % list to set new definitions for the \macarg.BLAH macros corresponding to
+ % each BLAH argument. It was anyhow needed to parse already once this list
+ % in order to count the arguments, and as macros with at most 9 arguments
+ % are by far more frequent than macro with 10 or more arguments, defining
+ % twice the \macarg.BLAH macros does not cost too much processing power.
+ \ifnum\paramno<10\relax\else
+ \paramno0\relax
+ \parsemmanyargdef@@#1,;,% 10 or more arguments
+ \fi
}
\def\parsemargdefxxx#1,{%
\if#1;\let\next=\relax
@@ -7273,16 +7533,205 @@ end
\edef\paramlist{\paramlist\hash\the\paramno,}%
\fi\next}
+\def\parsemmanyargdef@@#1,{%
+ \if#1;\let\next=\relax
+ \else
+ \let\next=\parsemmanyargdef@@
+ \edef\tempb{\eatspaces{#1}}%
+ \expandafter\def\expandafter\tempa
+ \expandafter{\csname macarg.\tempb\endcsname}%
+ % Note that we need some extra \noexpand\noexpand, this is because we
+ % don't want \the to be expanded in the \parsermacbody as it uses an
+ % \xdef .
+ \expandafter\edef\tempa
+ {\noexpand\noexpand\noexpand\the\toks\the\paramno}%
+ \advance\paramno by 1\relax
+ \fi\next}
+
% These two commands read recursive and nonrecursive macro bodies.
% (They're different since rec and nonrec macros end differently.)
%
+
+\catcode `\@\texiatcatcode
\long\def\parsemacbody#1@end macro%
{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
\long\def\parsermacbody#1@end rmacro%
{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
+\catcode `\@=11\relax
+
+\let\endargs@\relax
+\let\nil@\relax
+\def\nilm@{\nil@}%
+\long\def\nillm@{\nil@}%
+
+% This macro is expanded during the Texinfo macro expansion, not during its
+% definition. It gets all the arguments values and assigns them to macros
+% macarg.ARGNAME
+%
+% #1 is the macro name
+% #2 is the list of argument names
+% #3 is the list of argument values
+\def\getargvals@#1#2#3{%
+ \def\macargdeflist@{}%
+ \def\saveparamlist@{#2}% Need to keep a copy for parameter expansion.
+ \def\paramlist{#2,\nil@}%
+ \def\macroname{#1}%
+ \begingroup
+ \macroargctxt
+ \def\argvaluelist{#3,\nil@}%
+ \def\@tempa{#3}%
+ \ifx\@tempa\empty
+ \setemptyargvalues@
+ \else
+ \getargvals@@
+ \fi
+}
-% This defines the macro itself. There are six cases: recursive and
-% nonrecursive macros of zero, one, and many arguments.
+%
+\def\getargvals@@{%
+ \ifx\paramlist\nilm@
+ % Some sanity check needed here that \argvaluelist is also empty.
+ \ifx\argvaluelist\nillm@
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Too many arguments in macro `\macroname'!}%
+ \fi
+ \let\next\macargexpandinbody@
+ \else
+ \ifx\argvaluelist\nillm@
+ % No more arguments values passed to macro. Set remaining named-arg
+ % macros to empty.
+ \let\next\setemptyargvalues@
+ \else
+ % pop current arg name into \@tempb
+ \def\@tempa##1{\pop@{\@tempb}{\paramlist}##1\endargs@}%
+ \expandafter\@tempa\expandafter{\paramlist}%
+ % pop current argument value into \@tempc
+ \def\@tempa##1{\longpop@{\@tempc}{\argvaluelist}##1\endargs@}%
+ \expandafter\@tempa\expandafter{\argvaluelist}%
+ % Here \@tempb is the current arg name and \@tempc is the current arg value.
+ % First place the new argument macro definition into \@tempd
+ \expandafter\macname\expandafter{\@tempc}%
+ \expandafter\let\csname macarg.\@tempb\endcsname\relax
+ \expandafter\def\expandafter\@tempe\expandafter{%
+ \csname macarg.\@tempb\endcsname}%
+ \edef\@tempd{\long\def\@tempe{\the\macname}}%
+ \push@\@tempd\macargdeflist@
+ \let\next\getargvals@@
+ \fi
+ \fi
+ \next
+}
+
+\def\push@#1#2{%
+ \expandafter\expandafter\expandafter\def
+ \expandafter\expandafter\expandafter#2%
+ \expandafter\expandafter\expandafter{%
+ \expandafter#1#2}%
+}
+
+% Replace arguments by their values in the macro body, and place the result
+% in macro \@tempa
+\def\macvalstoargs@{%
+ % To do this we use the property that token registers that are \the'ed
+ % within an \edef expand only once. So we are going to place all argument
+ % values into respective token registers.
+ %
+ % First we save the token context, and initialize argument numbering.
+ \begingroup
+ \paramno0\relax
+ % Then, for each argument number #N, we place the corresponding argument
+ % value into a new token list register \toks#N
+ \expandafter\putargsintokens@\saveparamlist@,;,%
+ % Then, we expand the body so that argument are replaced by their
+ % values. The trick for values not to be expanded themselves is that they
+ % are within tokens and that tokens expand only once in an \edef .
+ \edef\@tempc{\csname mac.\macroname .body\endcsname}%
+ % Now we restore the token stack pointer to free the token list registers
+ % which we have used, but we make sure that expanded body is saved after
+ % group.
+ \expandafter
+ \endgroup
+ \expandafter\def\expandafter\@tempa\expandafter{\@tempc}%
+ }
+
+\def\macargexpandinbody@{%
+ %% Define the named-macro outside of this group and then close this group.
+ \expandafter
+ \endgroup
+ \macargdeflist@
+ % First the replace in body the macro arguments by their values, the result
+ % is in \@tempa .
+ \macvalstoargs@
+ % Then we point at the \norecurse or \gobble (for recursive) macro value
+ % with \@tempb .
+ \expandafter\let\expandafter\@tempb\csname mac.\macroname .recurse\endcsname
+ % Depending on whether it is recursive or not, we need some tailing
+ % \egroup .
+ \ifx\@tempb\gobble
+ \let\@tempc\relax
+ \else
+ \let\@tempc\egroup
+ \fi
+ % And now we do the real job:
+ \edef\@tempd{\noexpand\@tempb{\macroname}\noexpand\scanmacro{\@tempa}\@tempc}%
+ \@tempd
+}
+
+\def\putargsintokens@#1,{%
+ \if#1;\let\next\relax
+ \else
+ \let\next\putargsintokens@
+ % First we allocate the new token list register, and give it a temporary
+ % alias \@tempb .
+ \toksdef\@tempb\the\paramno
+ % Then we place the argument value into that token list register.
+ \expandafter\let\expandafter\@tempa\csname macarg.#1\endcsname
+ \expandafter\@tempb\expandafter{\@tempa}%
+ \advance\paramno by 1\relax
+ \fi
+ \next
+}
+
+% Save the token stack pointer into macro #1
+\def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}}
+% Restore the token stack pointer from number in macro #1
+\def\texirestoretoksstackpoint#1{\expandafter\mathchardef\expandafter\@cclvi#1\relax}
+% newtoks that can be used non \outer .
+\def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi}
+
+% Tailing missing arguments are set to empty
+\def\setemptyargvalues@{%
+ \ifx\paramlist\nilm@
+ \let\next\macargexpandinbody@
+ \else
+ \expandafter\setemptyargvaluesparser@\paramlist\endargs@
+ \let\next\setemptyargvalues@
+ \fi
+ \next
+}
+
+\def\setemptyargvaluesparser@#1,#2\endargs@{%
+ \expandafter\def\expandafter\@tempa\expandafter{%
+ \expandafter\def\csname macarg.#1\endcsname{}}%
+ \push@\@tempa\macargdeflist@
+ \def\paramlist{#2}%
+}
+
+% #1 is the element target macro
+% #2 is the list macro
+% #3,#4\endargs@ is the list value
+\def\pop@#1#2#3,#4\endargs@{%
+ \def#1{#3}%
+ \def#2{#4}%
+}
+\long\def\longpop@#1#2#3,#4\endargs@{%
+ \long\def#1{#3}%
+ \long\def#2{#4}%
+}
+
+% This defines a Texinfo @macro. There are eight cases: recursive and
+% nonrecursive macros of zero, one, up to nine, and many arguments.
% Much magic with \expandafter here.
% \xdef is used so that macro definitions will survive the file
% they're defined in; @include reads the file inside a group.
@@ -7301,17 +7750,25 @@ end
\expandafter\noexpand\csname\the\macname xxx\endcsname}%
\expandafter\xdef\csname\the\macname xxx\endcsname##1{%
\egroup\noexpand\scanmacro{\temp}}%
- \else % many
- \expandafter\xdef\csname\the\macname\endcsname{%
- \bgroup\noexpand\macroargctxt
- \noexpand\csname\the\macname xx\endcsname}%
- \expandafter\xdef\csname\the\macname xx\endcsname##1{%
- \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
- \expandafter\expandafter
- \expandafter\xdef
- \expandafter\expandafter
- \csname\the\macname xxx\endcsname
- \paramlist{\egroup\noexpand\scanmacro{\temp}}%
+ \else
+ \ifnum\paramno<10\relax % at most 9
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \bgroup\noexpand\macroargctxt
+ \noexpand\csname\the\macname xx\endcsname}%
+ \expandafter\xdef\csname\the\macname xx\endcsname##1{%
+ \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
+ \expandafter\expandafter
+ \expandafter\xdef
+ \expandafter\expandafter
+ \csname\the\macname xxx\endcsname
+ \paramlist{\egroup\noexpand\scanmacro{\temp}}%
+ \else % 10 or more
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \noexpand\getargvals@{\the\macname}{\argl}%
+ }%
+ \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp
+ \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble
+ \fi
\fi
\else
\ifcase\paramno
@@ -7328,23 +7785,33 @@ end
\egroup
\noexpand\norecurse{\the\macname}%
\noexpand\scanmacro{\temp}\egroup}%
- \else % many
- \expandafter\xdef\csname\the\macname\endcsname{%
- \bgroup\noexpand\macroargctxt
- \expandafter\noexpand\csname\the\macname xx\endcsname}%
- \expandafter\xdef\csname\the\macname xx\endcsname##1{%
- \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
- \expandafter\expandafter
- \expandafter\xdef
- \expandafter\expandafter
- \csname\the\macname xxx\endcsname
- \paramlist{%
- \egroup
- \noexpand\norecurse{\the\macname}%
- \noexpand\scanmacro{\temp}\egroup}%
+ \else % at most 9
+ \ifnum\paramno<10\relax
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \bgroup\noexpand\macroargctxt
+ \expandafter\noexpand\csname\the\macname xx\endcsname}%
+ \expandafter\xdef\csname\the\macname xx\endcsname##1{%
+ \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
+ \expandafter\expandafter
+ \expandafter\xdef
+ \expandafter\expandafter
+ \csname\the\macname xxx\endcsname
+ \paramlist{%
+ \egroup
+ \noexpand\norecurse{\the\macname}%
+ \noexpand\scanmacro{\temp}\egroup}%
+ \else % 10 or more:
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \noexpand\getargvals@{\the\macname}{\argl}%
+ }%
+ \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp
+ \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse
+ \fi
\fi
\fi}
+\catcode `\@\texiatcatcode\relax
+
\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
% \braceorline decides whether the next nonwhitespace character is a
@@ -7470,7 +7937,7 @@ end
\fi\fi
}
-
+%
% @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is
% the node name, #2 the name of the Info cross-reference, #3 the printed
% node name, #4 the name of the Info file, #5 the name of the printed
@@ -7479,26 +7946,41 @@ end
\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}
\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
\def\ref#1{\xrefX[#1,,,,,,,]}
+%
+\newbox\toprefbox
+\newbox\printedrefnamebox
+\newbox\infofilenamebox
+\newbox\printedmanualbox
+%
\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
\unsepspaces
- \def\printedmanual{\ignorespaces #5}%
+ %
+ % Get args without leading/trailing spaces.
\def\printedrefname{\ignorespaces #3}%
- \setbox1=\hbox{\printedmanual\unskip}%
- \setbox0=\hbox{\printedrefname\unskip}%
- \ifdim \wd0 = 0pt
+ \setbox\printedrefnamebox = \hbox{\printedrefname\unskip}%
+ %
+ \def\infofilename{\ignorespaces #4}%
+ \setbox\infofilenamebox = \hbox{\infofilename\unskip}%
+ %
+ \def\printedmanual{\ignorespaces #5}%
+ \setbox\printedmanualbox = \hbox{\printedmanual\unskip}%
+ %
+ % If the printed reference name (arg #3) was not explicitly given in
+ % the @xref, figure out what we want to use.
+ \ifdim \wd\printedrefnamebox = 0pt
% No printed node name was explicitly given.
\expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax
- % Use the node name inside the square brackets.
+ % Not auto section-title: use node name inside the square brackets.
\def\printedrefname{\ignorespaces #1}%
\else
- % Use the actual chapter/section title appear inside
- % the square brackets. Use the real section title if we have it.
- \ifdim \wd1 > 0pt
- % It is in another manual, so we don't have it.
+ % Auto section-title: use chapter/section title inside
+ % the square brackets if we have it.
+ \ifdim \wd\printedmanualbox > 0pt
+ % It is in another manual, so we don't have it; use node name.
\def\printedrefname{\ignorespaces #1}%
\else
\ifhavexrefs
- % We know the real title if we have the xref values.
+ % We (should) know the real title if we have the xref values.
\def\printedrefname{\refx{#1-title}{}}%
\else
% Otherwise just copy the Info node name.
@@ -7512,13 +7994,20 @@ end
\ifpdf
{\indexnofonts
\turnoffactive
+ \makevalueexpandable
% This expands tokens, so do it after making catcode changes, so _
- % etc. don't get their TeX definitions.
+ % etc. don't get their TeX definitions. This ignores all spaces in
+ % #4, including (wrongly) those in the middle of the filename.
\getfilename{#4}%
%
- % See comments at \activebackslashdouble.
- {\activebackslashdouble \xdef\pdfxrefdest{#1}%
- \backslashparens\pdfxrefdest}%
+ % This (wrongly) does not take account of leading or trailing
+ % spaces in #1, which should be ignored.
+ \edef\pdfxrefdest{#1}%
+ \ifx\pdfxrefdest\empty
+ \def\pdfxrefdest{Top}% no empty targets
+ \else
+ \txiescapepdf\pdfxrefdest % escape PDF special chars
+ \fi
%
\leavevmode
\startlink attr{/Border [0 0 0]}%
@@ -7545,29 +8034,42 @@ end
\iffloat\Xthisreftitle
% If the user specified the print name (third arg) to the ref,
% print it instead of our usual "Figure 1.2".
- \ifdim\wd0 = 0pt
+ \ifdim\wd\printedrefnamebox = 0pt
\refx{#1-snt}{}%
\else
\printedrefname
\fi
%
- % if the user also gave the printed manual name (fifth arg), append
+ % If the user also gave the printed manual name (fifth arg), append
% "in MANUALNAME".
- \ifdim \wd1 > 0pt
+ \ifdim \wd\printedmanualbox > 0pt
\space \putwordin{} \cite{\printedmanual}%
\fi
\else
% node/anchor (non-float) references.
+ %
+ % If we use \unhbox to print the node names, TeX does not insert
+ % empty discretionaries after hyphens, which means that it will not
+ % find a line break at a hyphen in a node names. Since some manuals
+ % are best written with fairly long node names, containing hyphens,
+ % this is a loss. Therefore, we give the text of the node name
+ % again, so it is as if TeX is seeing it for the first time.
+ %
+ \ifdim \wd\printedmanualbox > 0pt
+ % Cross-manual reference with a printed manual name.
+ %
+ \crossmanualxref{\cite{\printedmanual\unskip}}%
+ %
+ \else\ifdim \wd\infofilenamebox > 0pt
+ % Cross-manual reference with only an info filename (arg 4), no
+ % printed manual name (arg 5). This is essentially the same as
+ % the case above; we output the filename, since we have nothing else.
+ %
+ \crossmanualxref{\code{\infofilename\unskip}}%
%
- % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not
- % insert empty discretionaries after hyphens, which means that it will
- % not find a line break at a hyphen in a node names. Since some manuals
- % are best written with fairly long node names, containing hyphens, this
- % is a loss. Therefore, we give the text of the node name again, so it
- % is as if TeX is seeing it for the first time.
- \ifdim \wd1 > 0pt
- \putwordSection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}%
\else
+ % Reference within this manual.
+ %
% _ (for example) has to be the character _ for the purposes of the
% control sequence corresponding to the node, but it has to expand
% into the usual \leavevmode...\vrule stuff for purposes of
@@ -7579,7 +8081,7 @@ end
\setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
\ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
}%
- % output the `[mynode]' via a macro so it can be overridden.
+ % output the `[mynode]' via the macro below so it can be overridden.
\xrefprintnodename\printedrefname
%
% But we always want a comma and a space:
@@ -7587,11 +8089,37 @@ end
%
% output the `page 3'.
\turnoffactive \putwordpage\tie\refx{#1-pg}{}%
- \fi
+ \fi\fi
\fi
\endlink
\endgroup}
+% Output a cross-manual xref to #1. Used just above (twice).
+%
+% Only include the text "Section ``foo'' in" if the foo is neither
+% missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply
+% "see The Foo Manual", the idea being to refer to the whole manual.
+%
+% But, this being TeX, we can't easily compare our node name against the
+% string "Top" while ignoring the possible spaces before and after in
+% the input. By adding the arbitrary 7sp below, we make it much less
+% likely that a real node name would have the same width as "Top" (e.g.,
+% in a monospaced font). Hopefully it will never happen in practice.
+%
+% For the same basic reason, we retypeset the "Top" at every
+% reference, since the current font is indeterminate.
+%
+\def\crossmanualxref#1{%
+ \setbox\toprefbox = \hbox{Top\kern7sp}%
+ \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}%
+ \ifdim \wd2 > 7sp % nonempty?
+ \ifdim \wd2 = \wd\toprefbox \else % same as Top?
+ \putwordSection{} ``\printedrefname'' \putwordin{}\space
+ \fi
+ \fi
+ #1%
+}
+
% This macro is called from \xrefX for the `[nodename]' part of xref
% output. It's a separate macro only so it can be changed more easily,
% since square brackets don't work well in some documents. Particularly
@@ -7807,7 +8335,7 @@ end
% space to prevent strange expansion errors.)
\def\supereject{\par\penalty -20000\footnoteno =0 }
-% @footnotestyle is meaningful for info output only.
+% @footnotestyle is meaningful for Info output only.
\let\footnotestyle=\comment
{\catcode `\@=11
@@ -7870,6 +8398,8 @@ end
% expands into a box, it must come within the paragraph, lest it
% provide a place where TeX can split the footnote.
\footstrut
+ %
+ % Invoke rest of plain TeX footnote routine.
\futurelet\next\fo@t
}
}%end \catcode `\@=11
@@ -7957,7 +8487,7 @@ end
it from ftp://tug.org/tex/epsf.tex.}
%
\def\image#1{%
- \ifx\epsfbox\thisiundefined
+ \ifx\epsfbox\thisisundefined
\ifwarnednoepsf \else
\errhelp = \noepsfhelp
\errmessage{epsf.tex not found, images will be ignored}%
@@ -7981,6 +8511,13 @@ end
% If the image is by itself, center it.
\ifvmode
\imagevmodetrue
+ \else \ifx\centersub\centerV
+ % for @center @image, we need a vbox so we can have our vertical space
+ \imagevmodetrue
+ \vbox\bgroup % vbox has better behavior than vtop herev
+ \fi\fi
+ %
+ \ifimagevmode
\nobreak\medskip
% Usually we'll have text after the image which will insert
% \parskip glue, so insert it here too to equalize the space
@@ -7990,9 +8527,13 @@ end
\fi
%
% Leave vertical mode so that indentation from an enclosing
- % environment such as @quotation is respected. On the other hand, if
- % it's at the top level, we don't want the normal paragraph indentation.
- \noindent
+ % environment such as @quotation is respected.
+ % However, if we're at the top level, we don't want the
+ % normal paragraph indentation.
+ % On the other hand, if we are in the case of @center @image, we don't
+ % want to start a paragraph, which will create a hsize-width box and
+ % eradicate the centering.
+ \ifx\centersub\centerV\else \noindent \fi
%
% Output the image.
\ifpdf
@@ -8004,7 +8545,10 @@ end
\epsfbox{#1.eps}%
\fi
%
- \ifimagevmode \medskip \fi % space after the standalone image
+ \ifimagevmode
+ \medskip % space after a standalone image
+ \fi
+ \ifx\centersub\centerV \egroup \fi
\endgroup}
@@ -8422,7 +8966,7 @@ directory should work if nowhere else does.}
%
% Latin1 (ISO-8859-1) character definitions.
\def\latonechardefs{%
- \gdef^^a0{~}
+ \gdef^^a0{\tie}
\gdef^^a1{\exclamdown}
\gdef^^a2{\missingcharmsg{CENT SIGN}}
\gdef^^a3{{\pounds}}
@@ -8544,7 +9088,7 @@ directory should work if nowhere else does.}
% Latin2 (ISO-8859-2) character definitions.
\def\lattwochardefs{%
- \gdef^^a0{~}
+ \gdef^^a0{\tie}
\gdef^^a1{\ogonek{A}}
\gdef^^a2{\u{}}
\gdef^^a3{\L}
@@ -9393,6 +9937,8 @@ directory should work if nowhere else does.}
\message{and turning on texinfo input format.}
+\def^^L{\par} % remove \outer, so ^L can appear in an @comment
+
% DEL is a comment character, in case @c does not suffice.
\catcode`\^^? = 14
@@ -9432,11 +9978,9 @@ directory should work if nowhere else does.}
\catcode`\"=\active
\def\activedoublequote{{\tt\char34}}
\let"=\activedoublequote
-\catcode`\~=\active
-\def~{{\tt\char126}}
+\catcode`\~=\active \def\activetilde{{\tt\char126}} \let~ = \activetilde
\chardef\hat=`\^
-\catcode`\^=\active
-\def^{{\tt \hat}}
+\catcode`\^=\active \def\activehat{{\tt \hat}} \let^ = \activehat
\catcode`\_=\active
\def_{\ifusingtt\normalunderscore\_}
@@ -9446,16 +9990,26 @@ directory should work if nowhere else does.}
\catcode`\|=\active
\def|{{\tt\char124}}
+
\chardef \less=`\<
-\catcode`\<=\active
-\def<{{\tt \less}}
+\catcode`\<=\active \def\activeless{{\tt \less}}\let< = \activeless
\chardef \gtr=`\>
-\catcode`\>=\active
-\def>{{\tt \gtr}}
-\catcode`\+=\active
-\def+{{\tt \char 43}}
-\catcode`\$=\active
-\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
+\catcode`\>=\active \def\activegtr{{\tt \gtr}}\let> = \activegtr
+\catcode`\+=\active \def+{{\tt \char 43}}
+\catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
+
+% used for headline/footline in the output routine, in case the page
+% breaks in the middle of an @tex block.
+\def\texinfochars{%
+ \let< = \activeless
+ \let> = \activegtr
+ \let~ = \activetilde
+ \let^ = \activehat
+ \markupsetuplqdefault \markupsetuprqdefault
+ \let\b = \strong
+ \let\i = \smartitalic
+ % in principle, all other definitions in \tex have to be undone too.
+}
% If a .fmt file is being used, characters that might appear in a file
% name cannot be active until we have parsed the command line.
@@ -9483,34 +10037,48 @@ directory should work if nowhere else does.}
% In texinfo, backslash is an active character; it prints the backslash
% in fixed width font.
-\catcode`\\=\active
-@def@normalbackslash{{@tt@backslashcurfont}}
+\catcode`\\=\active % @ for escape char from now on.
+
+% The story here is that in math mode, the \char of \backslashcurfont
+% ends up printing the roman \ from the math symbol font (because \char
+% in math mode uses the \mathcode, and plain.tex sets
+% \mathcode`\\="026E). It seems better for @backslashchar{} to always
+% print a typewriter backslash, hence we use an explicit \mathchar,
+% which is the decimal equivalent of "715c (class 7, e.g., use \fam;
+% ignored family value; char position "5C). We can't use " for the
+% usual hex value because it has already been made active.
+@def@normalbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}}
+@let@backslashchar = @normalbackslash % @backslashchar{} is for user documents.
+
% On startup, @fixbackslash assigns:
% @let \ = @normalbackslash
-
% \rawbackslash defines an active \ to do \backslashcurfont.
% \otherbackslash defines an active \ to be a literal `\' character with
-% catcode other.
+% catcode other. We switch back and forth between these.
@gdef@rawbackslash{@let\=@backslashcurfont}
@gdef@otherbackslash{@let\=@realbackslash}
% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
-% the literal character `\'.
-%
-@def@normalturnoffactive{%
- @let"=@normaldoublequote
- @let$=@normaldollar %$ font-lock fix
- @let+=@normalplus
- @let<=@normalless
- @let>=@normalgreater
- @let\=@normalbackslash
- @let^=@normalcaret
- @let_=@normalunderscore
- @let|=@normalverticalbar
- @let~=@normaltilde
- @markupsetuplqdefault
- @markupsetuprqdefault
- @unsepspaces
+% the literal character `\'. Also revert - to its normal character, in
+% case the active - from code has slipped in.
+%
+{@catcode`- = @active
+ @gdef@normalturnoffactive{%
+ @let-=@normaldash
+ @let"=@normaldoublequote
+ @let$=@normaldollar %$ font-lock fix
+ @let+=@normalplus
+ @let<=@normalless
+ @let>=@normalgreater
+ @let\=@normalbackslash
+ @let^=@normalcaret
+ @let_=@normalunderscore
+ @let|=@normalverticalbar
+ @let~=@normaltilde
+ @markupsetuplqdefault
+ @markupsetuprqdefault
+ @unsepspaces
+ }
}
% Make _ and + \other characters, temporarily.
@@ -9546,10 +10114,13 @@ directory should work if nowhere else does.}
@def@normalslash{/}
% These look ok in all fonts, so just make them not special.
+% @hashchar{} gets its own user-level command, because of #line.
@catcode`@& = @other @def@normalamp{&}
@catcode`@# = @other @def@normalhash{#}
@catcode`@% = @other @def@normalpercent{%}
+@let @hashchar = @normalhash
+
@c Finally, make ` and ' active, so that txicodequoteundirected and
@c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we
@c don't make ` and ' active, @code will not get them as active chars.
diff --git a/build-aux/update-copyright b/build-aux/update-copyright
index ef0b1ce..c72d0e6 100755
--- a/build-aux/update-copyright
+++ b/build-aux/update-copyright
@@ -3,9 +3,9 @@ eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" ${1+"$@"}'
if 0;
# Update an FSF copyright year list to include the current year.
-my $VERSION = '2011-01-02.20:59'; # UTC
+my $VERSION = '2013-01-03.09:41'; # UTC
-# Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@ my $VERSION = '2011-01-02.20:59'; # UTC
# The arguments to this script should be names of files that contain
# copyright statements to be updated. The copyright holder's name
-# defaults to "Free Softward Foundation, Inc." but may be changed to
+# defaults to "Free Software Foundation, Inc." but may be changed to
# any other name by using the "UPDATE_COPYRIGHT_HOLDER" environment
# variable.
#
@@ -43,7 +43,7 @@ my $VERSION = '2011-01-02.20:59'; # UTC
# A warning is printed for every file for which no copyright
# statement is recognized.
#
-# Each file's copyright statement must be formated correctly in
+# Each file's copyright statement must be formatted correctly in
# order to be recognized. For example, each of these is fine:
#
# Copyright @copyright{} 1990-2005, 2007-2009 Free Software
@@ -110,6 +110,9 @@ my $VERSION = '2011-01-02.20:59'; # UTC
# interval (such as 1990-2008). If unset or set to 0, all existing
# copyright year intervals in a reformatted FSF copyright statement
# are expanded instead.
+# If UPDATE_COPYRIGHT_USE_INTERVALS=2, convert a sequence with gaps
+# to the minimal containing range. For example, convert
+# 2000, 2004-2007, 2009 to 2000-2009.
# 3. For testing purposes, you can set the assumed current year in
# UPDATE_COPYRIGHT_YEAR.
# 4. The default maximum line length for a copyright line is 72.
@@ -189,7 +192,7 @@ if (defined $stmt_re)
if ($final_year != $this_year)
{
# Update the year.
- $stmt =~ s/$final_year_orig/$final_year, $this_year/;
+ $stmt =~ s/\b$final_year_orig\b/$final_year, $this_year/;
}
if ($final_year != $this_year || $ENV{'UPDATE_COPYRIGHT_FORCE'})
{
@@ -221,6 +224,10 @@ if (defined $stmt_re)
}))
)+
/$1-$3/gx;
+
+ # When it's 2, emit a single range encompassing all year numbers.
+ $ENV{UPDATE_COPYRIGHT_USE_INTERVALS} == 2
+ and $stmt =~ s/\b(\d{4})\b.*\b(\d{4})\b/$1-$2/;
}
# Format within margin.
diff --git a/build-aux/useless-if-before-free b/build-aux/useless-if-before-free
index a6c228b..663347a 100755
--- a/build-aux/useless-if-before-free
+++ b/build-aux/useless-if-before-free
@@ -4,13 +4,13 @@ eval '(exit $?0)' && eval 'exec perl -wST "$0" ${1+"$@"}'
# Detect instances of "if (p) free (p);".
# Likewise "if (p != 0)", "if (0 != p)", or with NULL; and with braces.
-my $VERSION = '2011-01-09 01:39'; # UTC
+my $VERSION = '2012-01-06 07:23'; # UTC
# The definition above must lie within the first 8 lines in order
# for the Emacs time-stamp write hook (at end) to update it.
# If you change this file with Emacs, please let the write hook
# do its job. Otherwise, update this string manually.
-# Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# Copyright (C) 2008-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -47,7 +47,7 @@ sub usage ($)
my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR);
if ($exit_code != 0)
{
- print $STREAM "Try `$ME --help' for more information.\n";
+ print $STREAM "Try '$ME --help' for more information.\n";
}
else
{
@@ -62,7 +62,7 @@ detect free-like functions named FOO and BAR.
OPTIONS:
--list print only the name of each matching FILE (\\0-terminated)
- --name=N add name N to the list of \`free\'-like functions to detect;
+ --name=N add name N to the list of \'free\'-like functions to detect;
may be repeated
--help display this help and exit
@@ -125,14 +125,14 @@ sub is_NULL ($)
foreach my $file (@ARGV)
{
open FH, '<', $file
- or (warn "$ME: can't open `$file' for reading: $!\n"),
+ or (warn "$ME: can't open '$file' for reading: $!\n"),
$err = EXIT_ERROR, next;
while (defined (my $line = <FH>))
{
while ($line =~
/\b(if\s*\(\s*([^)]+?)(?:\s*!=\s*([^)]+?))?\s*\)
# 1 2 3
- (?: \s*$regexp\s*\((?:\s*\([^)]+\))?\s*([^)]+)\)|
+ (?: \s*$regexp\s*\((?:\s*\([^)]+\))?\s*([^)]+)\)\s*;|
\s*\{\s*$regexp\s*\((?:\s*\([^)]+\))?\s*([^)]+)\)\s*;\s*\}))/sxg)
{
my $all = $1;
@@ -179,7 +179,7 @@ free=xfree
git grep -l -z "$free *(" \
| xargs -0 useless-if-before-free -l --name="$free" \
| xargs -0 perl -0x3b -pi -e \
- 's/\bif\s*\(\s*(\S+?)(?:\s*!=\s*(?:0|NULL))?\s*\)\s+('"$free"'\s*\((?:\s*\([^)]+\))?\s*\1\s*\))/$2/s'
+ 's/\bif\s*\(\s*(\S+?)(?:\s*!=\s*(?:0|NULL))?\s*\)\s+('"$free"'\s*\((?:\s*\([^)]+\))?\s*\1\s*\)\s*;)/$2/s'
# Use the following to remove redundant uses of kfree inside braces.
# Note that -0777 puts perl in slurp-whole-file mode;
diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files
index 9bb6fe6..7ec335f 100755
--- a/build-aux/vc-list-files
+++ b/build-aux/vc-list-files
@@ -2,9 +2,9 @@
# List version-controlled file names.
# Print a version string.
-scriptversion=2010-04-23.22; # UTC
+scriptversion=2011-05-16.22; # UTC
-# Copyright (C) 2006-2011 Free Software Foundation, Inc.
+# Copyright (C) 2006-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ scriptversion=2010-04-23.22; # UTC
postprocess=
case $1 in
--help) cat <<EOF
-Usage: $0 [-C SRCDIR] [DIR]
+Usage: $0 [-C SRCDIR] [DIR...]
Output a list of version-controlled files in DIR (default .), relative to
SRCDIR (default .). SRCDIR must be the top directory of a checkout.
@@ -61,53 +61,48 @@ EOF
shift; shift ;;
esac
-dir=
-case $# in
- 0) ;;
- 1) dir=$1 ;;
- *) echo "$0: too many arguments" 1>&2
- echo "Usage: $0 [-C srcdir] [DIR]" 1>&2; exit 1;;
-esac
-
-test "x$dir" = x && dir=.
-
-if test -d .git; then
- test "x$dir" = x. \
- && dir= sed_esc= \
- || { dir="$dir/"; sed_esc=`echo "$dir"|env sed 's,\([\\/]\),\\\\\1,g'`; }
- # Ignore git symlinks - either they point into the tree, in which case
- # we don't need to visit the target twice, or they point somewhere
- # else (often into a submodule), in which case the content does not
- # belong to this package.
- eval exec git ls-tree -r 'HEAD:"$dir"' \
- \| sed -n '"s/^100[^ ]*./$sed_esc/p"' $postprocess
-elif test -d .hg; then
- eval exec hg locate '"$dir/*"' $postprocess
-elif test -d .bzr; then
- test "$postprocess" = '' && postprocess="| sed 's|^\./||'"
- eval exec bzr ls -R --versioned '"$dir"' $postprocess
-elif test -d CVS; then
- test "$postprocess" = '' && postprocess="| sed 's|^\./||'"
- if test -x build-aux/cvsu; then
- eval build-aux/cvsu --find --types=AFGM '"$dir"' $postprocess
- elif (cvsu --help) >/dev/null 2>&1; then
- eval cvsu --find --types=AFGM '"$dir"' $postprocess
+test $# = 0 && set .
+
+for dir
+do
+ if test -d .git; then
+ test "x$dir" = x. \
+ && dir= sed_esc= \
+ || { dir="$dir/"; sed_esc=`echo "$dir"|env sed 's,\([\\/]\),\\\\\1,g'`; }
+ # Ignore git symlinks - either they point into the tree, in which case
+ # we don't need to visit the target twice, or they point somewhere
+ # else (often into a submodule), in which case the content does not
+ # belong to this package.
+ eval exec git ls-tree -r 'HEAD:"$dir"' \
+ \| sed -n '"s/^100[^ ]*./$sed_esc/p"' $postprocess
+ elif test -d .hg; then
+ eval exec hg locate '"$dir/*"' $postprocess
+ elif test -d .bzr; then
+ test "$postprocess" = '' && postprocess="| sed 's|^\./||'"
+ eval exec bzr ls -R --versioned '"$dir"' $postprocess
+ elif test -d CVS; then
+ test "$postprocess" = '' && postprocess="| sed 's|^\./||'"
+ if test -x build-aux/cvsu; then
+ eval build-aux/cvsu --find --types=AFGM '"$dir"' $postprocess
+ elif (cvsu --help) >/dev/null 2>&1; then
+ eval cvsu --find --types=AFGM '"$dir"' $postprocess
+ else
+ eval awk -F/ \''{ \
+ if (!$1 && $3 !~ /^-/) { \
+ f=FILENAME; \
+ if (f ~ /CVS\/Entries$/) \
+ f = substr(f, 1, length(f)-11); \
+ print f $2; \
+ }}'\'' \
+ `find "$dir" -name Entries -print` /dev/null' $postprocess
+ fi
+ elif test -d .svn; then
+ eval exec svn list -R '"$dir"' $postprocess
else
- eval awk -F/ \''{ \
- if (!$1 && $3 !~ /^-/) { \
- f=FILENAME; \
- if (f ~ /CVS\/Entries$/) \
- f = substr(f, 1, length(f)-11); \
- print f $2; \
- }}'\'' \
- `find "$dir" -name Entries -print` /dev/null' $postprocess
+ echo "$0: Failed to determine type of version control used in `pwd`" 1>&2
+ exit 1
fi
-elif test -d .svn; then
- eval exec svn list -R '"$dir"' $postprocess
-else
- echo "$0: Failed to determine type of version control used in `pwd`" 1>&2
- exit 1
-fi
+done
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
diff --git a/c-boxes.el b/c-boxes.el
index 888f3c0..ea96738 100644
--- a/c-boxes.el
+++ b/c-boxes.el
@@ -1,5 +1,5 @@
;;; Boxed comments for C mode.
-;;; Copyright (C) 1991-1994, 2008-2011 Free Software Foundation, Inc.
+;;; Copyright (C) 1991-1994, 2008-2013 Free Software Foundation, Inc.
;;; Francois Pinard <pinard@iro.umontreal.ca>, April 1991.
;;;
;;; This file is part of GNU M4.
diff --git a/cfg.mk b/cfg.mk
index 6c19eef..b30cac9 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -1,5 +1,5 @@
# Customize maint.mk. -*- makefile -*-
-# Copyright (C) 2003-2011 Free Software Foundation, Inc.
+# Copyright (C) 2003-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,17 +28,20 @@ local-checks-to-skip =
local-checks-to-skip += sc_bindtextdomain
# M4 intentionally uses a coding style that compiles under C++.
local-checks-to-skip += sc_cast_of_x_alloc_return_value
-# sc_copyright_check is currently broken for multi-line copyrights.
-local-checks-to-skip += sc_copyright_check
# Our files include "m4.h", which in turn includes <config.h> first.
config_h_header = "m4\.h"
# Hash of NEWS contents, to ensure we don't add entries to wrong section.
-old_NEWS_hash = cd89f6716f741756751054c484b7044b
+old_NEWS_hash = 345b93b3900db54f6bab85e3da153b38
# Indent only with spaces.
sc_prohibit_tab_based_indentation:
@re='^ * ' \
msg='TAB in indentation; use only spaces' \
$(_prohibit_regexp)
+
+# List all syntax-check exemptions:
+exclude_file_name_regexp--sc_prohibit_tab_based_indentation = \
+ (^(GNU)?Makefile(\.am)?|\.mk|^HACKING|^ChangeLog.*)$$
+exclude_file_name_regexp--update-copyright = ^m4/gnulib-cache.m4$$
diff --git a/checks/001.preprocess b/checks/001.preprocess
index b41283c..14667d8 100644
--- a/checks/001.preprocess
+++ b/checks/001.preprocess
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:696: Origin of test
+dnl @ ../doc/m4.texi:719: Origin of test
dnl @ expected status: 0
dnl @ extra options: -s
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/002.debugging_ b/checks/002.debugging_
index 3bca0a0..7c85bcc 100644
--- a/checks/002.debugging_
+++ b/checks/002.debugging_
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:879: Origin of test
+dnl @ ../doc/m4.texi:902: Origin of test
dnl @ expected status: 0
dnl @ extra options: -Dbar=hello -tbar --debugfile= foo --debugfile -
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/003.command_li b/checks/003.command_li
index 3594b52..6ec9e7d 100644
--- a/checks/003.command_li
+++ b/checks/003.command_li
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:938: Origin of test
+dnl @ ../doc/m4.texi:961: Origin of test
dnl @ expected status: 0
dnl @ extra options: -Dbar=hello foo -Dbar=world foo
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/004.command_li b/checks/004.command_li
index 9f3a308..0ef9fb1 100644
--- a/checks/004.command_li
+++ b/checks/004.command_li
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:961: Origin of test
+dnl @ ../doc/m4.texi:984: Origin of test
dnl @ expected status: 1
dnl @ extra options: Makefile/
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/005.command_li b/checks/005.command_li
index 134aa3d..0f3f4a1 100644
--- a/checks/005.command_li
+++ b/checks/005.command_li
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:969: Origin of test
+dnl @ ../doc/m4.texi:992: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
@@ -11,6 +11,9 @@ dnl @ expected error: ignore
ifdef(`__unix__', ,
`errprint(` skipping: syscmd does not have unix semantics
')m4exit(`77')')dnl
+syscmd(`echo | cat >&- 2>/dev/null')ifelse(sysval, `0',
+ `errprint(` skipping: system does not allow closing stdout
+')m4exit(`77')')dnl
changequote(`[', `]')dnl
syscmd([echo | ']__program__[' >&-])dnl
dnl @error{}m4: write error: Bad file descriptor
diff --git a/checks/006.command_li b/checks/006.command_li
index 84966c2..f852d9e 100644
--- a/checks/006.command_li
+++ b/checks/006.command_li
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:980: Origin of test
+dnl @ ../doc/m4.texi:1006: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
@@ -10,6 +10,9 @@ dnl @ is preserved.
ifdef(`__unix__', ,
`errprint(` skipping: syscmd does not have unix semantics
')m4exit(`77')')dnl
+syscmd(`echo | cat >&- 2>/dev/null')ifelse(sysval, `0',
+ `errprint(` skipping: system does not allow closing stdout
+')m4exit(`77')')dnl
changequote(`[', `]')dnl
syscmd([echo 'esyscmd(echo hi >&2 && echo err"print(bye
)d"nl)dnl' > tmp.m4 \
diff --git a/checks/007.command_li b/checks/007.command_li
index d82a6d5..cda6756 100644
--- a/checks/007.command_li
+++ b/checks/007.command_li
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:998: Origin of test
+dnl @ ../doc/m4.texi:1027: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/008.comments b/checks/008.comments
index 7d73135..0dc8582 100644
--- a/checks/008.comments
+++ b/checks/008.comments
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1091: Origin of test
+dnl @ ../doc/m4.texi:1120: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/009.comments b/checks/009.comments
index f418de3..8caf4f7 100644
--- a/checks/009.comments
+++ b/checks/009.comments
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1106: Origin of test
+dnl @ ../doc/m4.texi:1135: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/010.input_proc b/checks/010.input_proc
index 1a707d6..20847a2 100644
--- a/checks/010.input_proc
+++ b/checks/010.input_proc
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1198: Origin of test
+dnl @ ../doc/m4.texi:1227: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/011.input_proc b/checks/011.input_proc
index 01166ca..61f8df2 100644
--- a/checks/011.input_proc
+++ b/checks/011.input_proc
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1276: Origin of test
+dnl @ ../doc/m4.texi:1305: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/012.inhibiting b/checks/012.inhibiting
index e63d146..71de4bb 100644
--- a/checks/012.inhibiting
+++ b/checks/012.inhibiting
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1402: Origin of test
+dnl @ ../doc/m4.texi:1431: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/013.inhibiting b/checks/013.inhibiting
index c62adb8..8358a1d 100644
--- a/checks/013.inhibiting
+++ b/checks/013.inhibiting
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1418: Origin of test
+dnl @ ../doc/m4.texi:1447: Origin of test
dnl @ expected status: 0
dnl @ extra options: -P
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/014.inhibiting b/checks/014.inhibiting
index 09b0a91..ba2eee6 100644
--- a/checks/014.inhibiting
+++ b/checks/014.inhibiting
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1449: Origin of test
+dnl @ ../doc/m4.texi:1478: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/015.inhibiting b/checks/015.inhibiting
index 5e69df1..4a78b8d 100644
--- a/checks/015.inhibiting
+++ b/checks/015.inhibiting
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1463: Origin of test
+dnl @ ../doc/m4.texi:1492: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/016.inhibiting b/checks/016.inhibiting
index b7c8ce0..b407f8f 100644
--- a/checks/016.inhibiting
+++ b/checks/016.inhibiting
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1480: Origin of test
+dnl @ ../doc/m4.texi:1509: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/017.inhibiting b/checks/017.inhibiting
index 2eaa0e2..fde1aa7 100644
--- a/checks/017.inhibiting
+++ b/checks/017.inhibiting
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1494: Origin of test
+dnl @ ../doc/m4.texi:1523: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/018.inhibiting b/checks/018.inhibiting
index 4ecd3d2..c2283ee 100644
--- a/checks/018.inhibiting
+++ b/checks/018.inhibiting
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1508: Origin of test
+dnl @ ../doc/m4.texi:1537: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/019.inhibiting b/checks/019.inhibiting
index ef06fd1..6b929c2 100644
--- a/checks/019.inhibiting
+++ b/checks/019.inhibiting
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1520: Origin of test
+dnl @ ../doc/m4.texi:1549: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/020.macro_argu b/checks/020.macro_argu
index 65be933..6271cfd 100644
--- a/checks/020.macro_argu
+++ b/checks/020.macro_argu
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1552: Origin of test
+dnl @ ../doc/m4.texi:1581: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/021.macro_argu b/checks/021.macro_argu
index cf321ad..ec04415 100644
--- a/checks/021.macro_argu
+++ b/checks/021.macro_argu
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1580: Origin of test
+dnl @ ../doc/m4.texi:1609: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/022.macro_argu b/checks/022.macro_argu
index 98ffe2d..3ec319f 100644
--- a/checks/022.macro_argu
+++ b/checks/022.macro_argu
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1593: Origin of test
+dnl @ ../doc/m4.texi:1622: Origin of test
dnl @ expected status: 0
dnl @ extra options: -Q
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/023.macro_argu b/checks/023.macro_argu
index 2c00ba6..d76d3e1 100644
--- a/checks/023.macro_argu
+++ b/checks/023.macro_argu
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1623: Origin of test
+dnl @ ../doc/m4.texi:1652: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/024.macro_argu b/checks/024.macro_argu
index c5c5f4e..3fdd23b 100644
--- a/checks/024.macro_argu
+++ b/checks/024.macro_argu
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1635: Origin of test
+dnl @ ../doc/m4.texi:1664: Origin of test
dnl @ expected status: 1
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/025.quoting_ar b/checks/025.quoting_ar
index 54ebfbd..1b44779 100644
--- a/checks/025.quoting_ar
+++ b/checks/025.quoting_ar
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1694: Origin of test
+dnl @ ../doc/m4.texi:1723: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/026.macro_expa b/checks/026.macro_expa
index 363c578..fed04f1 100644
--- a/checks/026.macro_expa
+++ b/checks/026.macro_expa
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1722: Origin of test
+dnl @ ../doc/m4.texi:1751: Origin of test
dnl @ expected status: 0
dnl @ extra options: -Dbar=Hello -Dfoo=bar
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/027.macro_expa b/checks/027.macro_expa
index 2b4a919..6900005 100644
--- a/checks/027.macro_expa
+++ b/checks/027.macro_expa
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1737: Origin of test
+dnl @ ../doc/m4.texi:1766: Origin of test
dnl @ expected status: 0
dnl @ extra options: -Dfoo -Decho=$@
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/028.define b/checks/028.define
index 90de369..435da9e 100644
--- a/checks/028.define
+++ b/checks/028.define
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1786: Origin of test
+dnl @ ../doc/m4.texi:1815: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/029.define b/checks/029.define
index 654b6e1..df38751 100644
--- a/checks/029.define
+++ b/checks/029.define
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1803: Origin of test
+dnl @ ../doc/m4.texi:1832: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/030.define b/checks/030.define
index 18d39c2..09da162 100644
--- a/checks/030.define
+++ b/checks/030.define
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1837: Origin of test
+dnl @ ../doc/m4.texi:1866: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/031.arguments b/checks/031.arguments
index 1b5b3f4..766d489 100644
--- a/checks/031.arguments
+++ b/checks/031.arguments
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1871: Origin of test
+dnl @ ../doc/m4.texi:1900: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/032.arguments b/checks/032.arguments
index 1db2f74..ddc2afb 100644
--- a/checks/032.arguments
+++ b/checks/032.arguments
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1881: Origin of test
+dnl @ ../doc/m4.texi:1910: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/033.arguments b/checks/033.arguments
index 787f132..a9bf717 100644
--- a/checks/033.arguments
+++ b/checks/033.arguments
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1897: Origin of test
+dnl @ ../doc/m4.texi:1926: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/034.arguments b/checks/034.arguments
index 9aa83e9..d6a4267 100644
--- a/checks/034.arguments
+++ b/checks/034.arguments
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1907: Origin of test
+dnl @ ../doc/m4.texi:1936: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/035.arguments b/checks/035.arguments
index f2d65ef..d6418b9 100644
--- a/checks/035.arguments
+++ b/checks/035.arguments
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1942: Origin of test
+dnl @ ../doc/m4.texi:1971: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/036.arguments b/checks/036.arguments
index cb0b624..dd2dcd5 100644
--- a/checks/036.arguments
+++ b/checks/036.arguments
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1964: Origin of test
+dnl @ ../doc/m4.texi:1993: Origin of test
dnl @ expected status: 0
dnl @ extra options: --warn-macro-sequence
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/037.pseudo_arg b/checks/037.pseudo_arg
index c594d01..af5dacc 100644
--- a/checks/037.pseudo_arg
+++ b/checks/037.pseudo_arg
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:1990: Origin of test
+dnl @ ../doc/m4.texi:2019: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/038.pseudo_arg b/checks/038.pseudo_arg
index 04f355d..6aef0f4 100644
--- a/checks/038.pseudo_arg
+++ b/checks/038.pseudo_arg
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2012: Origin of test
+dnl @ ../doc/m4.texi:2041: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/039.pseudo_arg b/checks/039.pseudo_arg
index 375006f..887dea0 100644
--- a/checks/039.pseudo_arg
+++ b/checks/039.pseudo_arg
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2025: Origin of test
+dnl @ ../doc/m4.texi:2054: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/040.pseudo_arg b/checks/040.pseudo_arg
index dd5c657..fd64caf 100644
--- a/checks/040.pseudo_arg
+++ b/checks/040.pseudo_arg
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2036: Origin of test
+dnl @ ../doc/m4.texi:2065: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/041.pseudo_arg b/checks/041.pseudo_arg
index 0b566da..6fb0479 100644
--- a/checks/041.pseudo_arg
+++ b/checks/041.pseudo_arg
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2046: Origin of test
+dnl @ ../doc/m4.texi:2075: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/042.pseudo_arg b/checks/042.pseudo_arg
index 6bf36ad..ca4ae05 100644
--- a/checks/042.pseudo_arg
+++ b/checks/042.pseudo_arg
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2068: Origin of test
+dnl @ ../doc/m4.texi:2097: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/043.pseudo_arg b/checks/043.pseudo_arg
index fbeb31b..ac1a611 100644
--- a/checks/043.pseudo_arg
+++ b/checks/043.pseudo_arg
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2090: Origin of test
+dnl @ ../doc/m4.texi:2119: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/044.pseudo_arg b/checks/044.pseudo_arg
index 91664ee..42b2b9e 100644
--- a/checks/044.pseudo_arg
+++ b/checks/044.pseudo_arg
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2118: Origin of test
+dnl @ ../doc/m4.texi:2147: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/045.pseudo_arg b/checks/045.pseudo_arg
index 6fa1a7a..51840e8 100644
--- a/checks/045.pseudo_arg
+++ b/checks/045.pseudo_arg
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2134: Origin of test
+dnl @ ../doc/m4.texi:2163: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/046.undefine b/checks/046.undefine
index 37485ec..179601f 100644
--- a/checks/046.undefine
+++ b/checks/046.undefine
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2173: Origin of test
+dnl @ ../doc/m4.texi:2202: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/047.undefine b/checks/047.undefine
index 87410a7..7145c06 100644
--- a/checks/047.undefine
+++ b/checks/047.undefine
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2193: Origin of test
+dnl @ ../doc/m4.texi:2222: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/048.defn b/checks/048.defn
index fc76389..8b0fba9 100644
--- a/checks/048.defn
+++ b/checks/048.defn
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2236: Origin of test
+dnl @ ../doc/m4.texi:2265: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/049.defn b/checks/049.defn
index b55b22b..15a496d 100644
--- a/checks/049.defn
+++ b/checks/049.defn
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2253: Origin of test
+dnl @ ../doc/m4.texi:2282: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/050.defn b/checks/050.defn
index 726d375..8b42e86 100644
--- a/checks/050.defn
+++ b/checks/050.defn
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2265: Origin of test
+dnl @ ../doc/m4.texi:2294: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/051.defn b/checks/051.defn
index f10f6b2..99f42f1 100644
--- a/checks/051.defn
+++ b/checks/051.defn
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2284: Origin of test
+dnl @ ../doc/m4.texi:2313: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/052.defn b/checks/052.defn
index f49a215..a6abec2 100644
--- a/checks/052.defn
+++ b/checks/052.defn
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2308: Origin of test
+dnl @ ../doc/m4.texi:2337: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/053.defn b/checks/053.defn
index 08e8b74..b0d335d 100644
--- a/checks/053.defn
+++ b/checks/053.defn
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2327: Origin of test
+dnl @ ../doc/m4.texi:2356: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/054.defn b/checks/054.defn
index 854824f..d2d56ca 100644
--- a/checks/054.defn
+++ b/checks/054.defn
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2344: Origin of test
+dnl @ ../doc/m4.texi:2373: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/055.pushdef b/checks/055.pushdef
index 8b26fd8..fdf8aad 100644
--- a/checks/055.pushdef
+++ b/checks/055.pushdef
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2396: Origin of test
+dnl @ ../doc/m4.texi:2425: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/056.pushdef b/checks/056.pushdef
index b41ff02..ff04259 100644
--- a/checks/056.pushdef
+++ b/checks/056.pushdef
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2433: Origin of test
+dnl @ ../doc/m4.texi:2462: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/057.indir b/checks/057.indir
index 80f9ecb..dc612d7 100644
--- a/checks/057.indir
+++ b/checks/057.indir
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2482: Origin of test
+dnl @ ../doc/m4.texi:2511: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/058.indir b/checks/058.indir
index 8004544..58d08cd 100644
--- a/checks/058.indir
+++ b/checks/058.indir
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2502: Origin of test
+dnl @ ../doc/m4.texi:2531: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/059.indir b/checks/059.indir
index 4be21e5..484557d 100644
--- a/checks/059.indir
+++ b/checks/059.indir
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2520: Origin of test
+dnl @ ../doc/m4.texi:2549: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/060.builtin b/checks/060.builtin
index cc90a98..1f9da39 100644
--- a/checks/060.builtin
+++ b/checks/060.builtin
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2558: Origin of test
+dnl @ ../doc/m4.texi:2587: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/061.builtin b/checks/061.builtin
index 079a430..ff2ed35 100644
--- a/checks/061.builtin
+++ b/checks/061.builtin
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2591: Origin of test
+dnl @ ../doc/m4.texi:2620: Origin of test
dnl @ expected status: 0
dnl @ extra options: -P
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/062.builtin b/checks/062.builtin
index 7816189..d3c30bf 100644
--- a/checks/062.builtin
+++ b/checks/062.builtin
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2609: Origin of test
+dnl @ ../doc/m4.texi:2638: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/063.builtin b/checks/063.builtin
index 77c462e..9a40dd8 100644
--- a/checks/063.builtin
+++ b/checks/063.builtin
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2636: Origin of test
+dnl @ ../doc/m4.texi:2665: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/064.builtin b/checks/064.builtin
index 839bd2c..6bd6cd3 100644
--- a/checks/064.builtin
+++ b/checks/064.builtin
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2643: Origin of test
+dnl @ ../doc/m4.texi:2672: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/065.ifdef b/checks/065.ifdef
index 2fe7111..95aae52 100644
--- a/checks/065.ifdef
+++ b/checks/065.ifdef
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2694: Origin of test
+dnl @ ../doc/m4.texi:2723: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/066.ifelse b/checks/066.ifelse
index 55836dc..5b2f873 100644
--- a/checks/066.ifelse
+++ b/checks/066.ifelse
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2742: Origin of test
+dnl @ ../doc/m4.texi:2771: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/067.ifelse b/checks/067.ifelse
index aa342b5..c267dee 100644
--- a/checks/067.ifelse
+++ b/checks/067.ifelse
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2752: Origin of test
+dnl @ ../doc/m4.texi:2781: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/068.ifelse b/checks/068.ifelse
index 5d52d62..f91a104 100644
--- a/checks/068.ifelse
+++ b/checks/068.ifelse
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2772: Origin of test
+dnl @ ../doc/m4.texi:2801: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/069.ifelse b/checks/069.ifelse
index dc074eb..6691c4f 100644
--- a/checks/069.ifelse
+++ b/checks/069.ifelse
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2796: Origin of test
+dnl @ ../doc/m4.texi:2825: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/070.ifelse b/checks/070.ifelse
index 2a7bdd0..03eb304 100644
--- a/checks/070.ifelse
+++ b/checks/070.ifelse
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2814: Origin of test
+dnl @ ../doc/m4.texi:2843: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/071.shift b/checks/071.shift
index b707b6b..622de19 100644
--- a/checks/071.shift
+++ b/checks/071.shift
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2895: Origin of test
+dnl @ ../doc/m4.texi:2924: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/072.shift b/checks/072.shift
index 015c294..c32e838 100644
--- a/checks/072.shift
+++ b/checks/072.shift
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2914: Origin of test
+dnl @ ../doc/m4.texi:2943: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/073.shift b/checks/073.shift
index 365ab2f..96d2155 100644
--- a/checks/073.shift
+++ b/checks/073.shift
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:2949: Origin of test
+dnl @ ../doc/m4.texi:2978: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/074.shift b/checks/074.shift
index 989a424..967428d 100644
--- a/checks/074.shift
+++ b/checks/074.shift
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:3004: Origin of test
+dnl @ ../doc/m4.texi:3033: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/075.shift b/checks/075.shift
index 1564138..63cf732 100644
--- a/checks/075.shift
+++ b/checks/075.shift
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:3033: Origin of test
+dnl @ ../doc/m4.texi:3062: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/076.shift b/checks/076.shift
index 2f8be4e..dbe0a02 100644
--- a/checks/076.shift
+++ b/checks/076.shift
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:3111: Origin of test
+dnl @ ../doc/m4.texi:3140: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/077.shift b/checks/077.shift
index 1a83546..b53fa06 100644
--- a/checks/077.shift
+++ b/checks/077.shift
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:3144: Origin of test
+dnl @ ../doc/m4.texi:3173: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/078.shift b/checks/078.shift
index e9dfa90..10aa85f 100644
--- a/checks/078.shift
+++ b/checks/078.shift
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:3177: Origin of test
+dnl @ ../doc/m4.texi:3206: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/079.forloop b/checks/079.forloop
index 94f60b2..82c360a 100644
--- a/checks/079.forloop
+++ b/checks/079.forloop
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:3209: Origin of test
+dnl @ ../doc/m4.texi:3238: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/080.forloop b/checks/080.forloop
index b406fe4..ca4816f 100644
--- a/checks/080.forloop
+++ b/checks/080.forloop
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:3220: Origin of test
+dnl @ ../doc/m4.texi:3249: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/081.forloop b/checks/081.forloop
index ef628e4..52f0ed6 100644
--- a/checks/081.forloop
+++ b/checks/081.forloop
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:3248: Origin of test
+dnl @ ../doc/m4.texi:3277: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/082.foreach b/checks/082.foreach
index d98a913..6b19b8f 100644
--- a/checks/082.foreach
+++ b/checks/082.foreach
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:3295: Origin of test
+dnl @ ../doc/m4.texi:3324: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/083.foreach b/checks/083.foreach
index 2cda84b..aa0fcd1 100644
--- a/checks/083.foreach
+++ b/checks/083.foreach
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:3318: Origin of test
+dnl @ ../doc/m4.texi:3347: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/084.foreach b/checks/084.foreach
index cdb6c55..e85ae37 100644
--- a/checks/084.foreach
+++ b/checks/084.foreach
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:3348: Origin of test
+dnl @ ../doc/m4.texi:3377: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/085.foreach b/checks/085.foreach
index 41f5368..c063ac0 100644
--- a/checks/085.foreach
+++ b/checks/085.foreach
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:3375: Origin of test
+dnl @ ../doc/m4.texi:3404: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/086.foreach b/checks/086.foreach
index aff7cbe..80536cf 100644
--- a/checks/086.foreach
+++ b/checks/086.foreach
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:3400: Origin of test
+dnl @ ../doc/m4.texi:3429: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/087.foreach b/checks/087.foreach
index 24379da..7273c23 100644
--- a/checks/087.foreach
+++ b/checks/087.foreach
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:3427: Origin of test
+dnl @ ../doc/m4.texi:3456: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/088.stacks b/checks/088.stacks
index f291f9f..af825b0 100644
--- a/checks/088.stacks
+++ b/checks/088.stacks
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:3468: Origin of test
+dnl @ ../doc/m4.texi:3497: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/089.stacks b/checks/089.stacks
index 6228ffd..f90ab29 100644
--- a/checks/089.stacks
+++ b/checks/089.stacks
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:3504: Origin of test
+dnl @ ../doc/m4.texi:3533: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/090.compositio b/checks/090.compositio
index ddfb4ed..b790d61 100644
--- a/checks/090.compositio
+++ b/checks/090.compositio
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:3567: Origin of test
+dnl @ ../doc/m4.texi:3596: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/091.compositio b/checks/091.compositio
index 5021502..37a7121 100644
--- a/checks/091.compositio
+++ b/checks/091.compositio
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:3614: Origin of test
+dnl @ ../doc/m4.texi:3643: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/092.compositio b/checks/092.compositio
index 166725d..f3ff33c 100644
--- a/checks/092.compositio
+++ b/checks/092.compositio
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:3639: Origin of test
+dnl @ ../doc/m4.texi:3668: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/093.compositio b/checks/093.compositio
index 4048b2a..c5d50e5 100644
--- a/checks/093.compositio
+++ b/checks/093.compositio
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:3678: Origin of test
+dnl @ ../doc/m4.texi:3707: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/094.dumpdef b/checks/094.dumpdef
index c74a7f0..f4cc176 100644
--- a/checks/094.dumpdef
+++ b/checks/094.dumpdef
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:3736: Origin of test
+dnl @ ../doc/m4.texi:3765: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/095.dumpdef b/checks/095.dumpdef
index 5d254cd..8056836 100644
--- a/checks/095.dumpdef
+++ b/checks/095.dumpdef
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:3753: Origin of test
+dnl @ ../doc/m4.texi:3782: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/096.trace b/checks/096.trace
index b3775e5..bde79f5 100644
--- a/checks/096.trace
+++ b/checks/096.trace
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:3796: Origin of test
+dnl @ ../doc/m4.texi:3825: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/097.trace b/checks/097.trace
index b175946..45a64d6 100644
--- a/checks/097.trace
+++ b/checks/097.trace
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:3824: Origin of test
+dnl @ ../doc/m4.texi:3853: Origin of test
dnl @ expected status: 1
dnl @ extra options: -dp -L3 -tifelse
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/098.trace b/checks/098.trace
index c64ec2c..98221b7 100644
--- a/checks/098.trace
+++ b/checks/098.trace
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:3842: Origin of test
+dnl @ ../doc/m4.texi:3871: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/099.trace b/checks/099.trace
index f23cb19..d9c25cc6 100644
--- a/checks/099.trace
+++ b/checks/099.trace
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:3878: Origin of test
+dnl @ ../doc/m4.texi:3907: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/100.trace b/checks/100.trace
index 4531163..a4d9094 100644
--- a/checks/100.trace
+++ b/checks/100.trace
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:3912: Origin of test
+dnl @ ../doc/m4.texi:3941: Origin of test
dnl @ expected status: 0
dnl @ extra options: -de --trace ifelse
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/101.debug_leve b/checks/101.debug_leve
index a7afd0b..5894320 100644
--- a/checks/101.debug_leve
+++ b/checks/101.debug_leve
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4018: Origin of test
+dnl @ ../doc/m4.texi:4047: Origin of test
dnl @ expected status: 0
dnl @ extra options: -dp
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/102.debug_leve b/checks/102.debug_leve
index 731add6..fa6af29 100644
--- a/checks/102.debug_leve
+++ b/checks/102.debug_leve
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4047: Origin of test
+dnl @ ../doc/m4.texi:4076: Origin of test
dnl @ expected status: 0
dnl @ extra options: -l6
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/103.debug_leve b/checks/103.debug_leve
index cd4ae3e..a85ebaf 100644
--- a/checks/103.debug_leve
+++ b/checks/103.debug_leve
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4065: Origin of test
+dnl @ ../doc/m4.texi:4094: Origin of test
dnl @ expected status: 0
dnl @ extra options: -dip
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/104.debug_outp b/checks/104.debug_outp
index af95121..dc97ddf 100644
--- a/checks/104.debug_outp
+++ b/checks/104.debug_outp
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4100: Origin of test
+dnl @ ../doc/m4.texi:4129: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/105.dnl b/checks/105.dnl
index f57f930..747dfa9 100644
--- a/checks/105.dnl
+++ b/checks/105.dnl
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4153: Origin of test
+dnl @ ../doc/m4.texi:4182: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/106.dnl b/checks/106.dnl
index 82011b9..454fa2d 100644
--- a/checks/106.dnl
+++ b/checks/106.dnl
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4171: Origin of test
+dnl @ ../doc/m4.texi:4200: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/107.dnl b/checks/107.dnl
index 30e43d7..881f1aa 100644
--- a/checks/107.dnl
+++ b/checks/107.dnl
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4182: Origin of test
+dnl @ ../doc/m4.texi:4211: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/108.changequot b/checks/108.changequot
index 593c84c..05e01f9 100644
--- a/checks/108.changequot
+++ b/checks/108.changequot
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4213: Origin of test
+dnl @ ../doc/m4.texi:4242: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/109.changequot b/checks/109.changequot
index ebbf9d5..08824a5 100644
--- a/checks/109.changequot
+++ b/checks/109.changequot
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4228: Origin of test
+dnl @ ../doc/m4.texi:4257: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/110.changequot b/checks/110.changequot
index 44c733c..381d3c0 100644
--- a/checks/110.changequot
+++ b/checks/110.changequot
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4243: Origin of test
+dnl @ ../doc/m4.texi:4272: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/111.changequot b/checks/111.changequot
index a4aff71..b49602b 100644
--- a/checks/111.changequot
+++ b/checks/111.changequot
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4265: Origin of test
+dnl @ ../doc/m4.texi:4294: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/112.changequot b/checks/112.changequot
index 8975c26..ce2fe88 100644
--- a/checks/112.changequot
+++ b/checks/112.changequot
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4298: Origin of test
+dnl @ ../doc/m4.texi:4327: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/113.changequot b/checks/113.changequot
index 2ab8447..a499089 100644
--- a/checks/113.changequot
+++ b/checks/113.changequot
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4331: Origin of test
+dnl @ ../doc/m4.texi:4360: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/114.changequot b/checks/114.changequot
index 71edda2..87a84ed 100644
--- a/checks/114.changequot
+++ b/checks/114.changequot
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4370: Origin of test
+dnl @ ../doc/m4.texi:4399: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/115.changequot b/checks/115.changequot
index 7a087b4..abf9d89 100644
--- a/checks/115.changequot
+++ b/checks/115.changequot
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4391: Origin of test
+dnl @ ../doc/m4.texi:4420: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/116.changequot b/checks/116.changequot
index 2e74406..7918a6d 100644
--- a/checks/116.changequot
+++ b/checks/116.changequot
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4414: Origin of test
+dnl @ ../doc/m4.texi:4443: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/117.changequot b/checks/117.changequot
index a506f7b..eb6e573 100644
--- a/checks/117.changequot
+++ b/checks/117.changequot
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4427: Origin of test
+dnl @ ../doc/m4.texi:4456: Origin of test
dnl @ expected status: 1
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/118.changequot b/checks/118.changequot
index 9f3877b..1f5a76c 100644
--- a/checks/118.changequot
+++ b/checks/118.changequot
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4436: Origin of test
+dnl @ ../doc/m4.texi:4465: Origin of test
dnl @ expected status: 1
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/119.changecom b/checks/119.changecom
index ceed82d..d74ae5b 100644
--- a/checks/119.changecom
+++ b/checks/119.changecom
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4461: Origin of test
+dnl @ ../doc/m4.texi:4490: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/120.changecom b/checks/120.changecom
index 72b88d4..3c5acce 100644
--- a/checks/120.changecom
+++ b/checks/120.changecom
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4488: Origin of test
+dnl @ ../doc/m4.texi:4517: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/121.changecom b/checks/121.changecom
index 020ec7c..ceda872 100644
--- a/checks/121.changecom
+++ b/checks/121.changecom
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4507: Origin of test
+dnl @ ../doc/m4.texi:4536: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/122.changecom b/checks/122.changecom
index 814234b..0c8ea83 100644
--- a/checks/122.changecom
+++ b/checks/122.changecom
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4530: Origin of test
+dnl @ ../doc/m4.texi:4559: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/123.changecom b/checks/123.changecom
index 1151c94..ee22ebb 100644
--- a/checks/123.changecom
+++ b/checks/123.changecom
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4553: Origin of test
+dnl @ ../doc/m4.texi:4582: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/124.changecom b/checks/124.changecom
index b8868e6..581be70 100644
--- a/checks/124.changecom
+++ b/checks/124.changecom
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4585: Origin of test
+dnl @ ../doc/m4.texi:4614: Origin of test
dnl @ expected status: 1
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/125.changeword b/checks/125.changeword
index 64f12ac..a25f12b 100644
--- a/checks/125.changeword
+++ b/checks/125.changeword
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4639: Origin of test
+dnl @ ../doc/m4.texi:4668: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/126.changeword b/checks/126.changeword
index ca72491..fad4eb9 100644
--- a/checks/126.changeword
+++ b/checks/126.changeword
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4652: Origin of test
+dnl @ ../doc/m4.texi:4681: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/127.changeword b/checks/127.changeword
index f69b5b9..79e1102 100644
--- a/checks/127.changeword
+++ b/checks/127.changeword
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4671: Origin of test
+dnl @ ../doc/m4.texi:4700: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/128.changeword b/checks/128.changeword
index 3ff1a5a..8498cbc 100644
--- a/checks/128.changeword
+++ b/checks/128.changeword
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4713: Origin of test
+dnl @ ../doc/m4.texi:4742: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/129.changeword b/checks/129.changeword
index 318b54c..c96d36c 100644
--- a/checks/129.changeword
+++ b/checks/129.changeword
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4751: Origin of test
+dnl @ ../doc/m4.texi:4780: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/130.changeword b/checks/130.changeword
index afcf711..b07860e 100644
--- a/checks/130.changeword
+++ b/checks/130.changeword
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4788: Origin of test
+dnl @ ../doc/m4.texi:4817: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/131.m4wrap b/checks/131.m4wrap
index c86cb70..dc9e54e 100644
--- a/checks/131.m4wrap
+++ b/checks/131.m4wrap
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4841: Origin of test
+dnl @ ../doc/m4.texi:4870: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/132.m4wrap b/checks/132.m4wrap
index 69e5a99..ce5f2d7 100644
--- a/checks/132.m4wrap
+++ b/checks/132.m4wrap
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4873: Origin of test
+dnl @ ../doc/m4.texi:4902: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/133.m4wrap b/checks/133.m4wrap
index 2815487..d9aabb8 100644
--- a/checks/133.m4wrap
+++ b/checks/133.m4wrap
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4903: Origin of test
+dnl @ ../doc/m4.texi:4932: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/134.m4wrap b/checks/134.m4wrap
index e9cdab7..219d0fd 100644
--- a/checks/134.m4wrap
+++ b/checks/134.m4wrap
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4928: Origin of test
+dnl @ ../doc/m4.texi:4957: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/135.m4wrap b/checks/135.m4wrap
index 7e2b746..8cb7fa1 100644
--- a/checks/135.m4wrap
+++ b/checks/135.m4wrap
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4942: Origin of test
+dnl @ ../doc/m4.texi:4971: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/136.m4wrap b/checks/136.m4wrap
index 00d3617..fedcf7e 100644
--- a/checks/136.m4wrap
+++ b/checks/136.m4wrap
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:4957: Origin of test
+dnl @ ../doc/m4.texi:4986: Origin of test
dnl @ expected status: 1
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/137.include b/checks/137.include
index 7980dbb..db36f3c 100644
--- a/checks/137.include
+++ b/checks/137.include
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5000: Origin of test
+dnl @ ../doc/m4.texi:5029: Origin of test
dnl @ expected status: 1
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/138.include b/checks/138.include
index fd8b257..dfefabb 100644
--- a/checks/138.include
+++ b/checks/138.include
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5033: Origin of test
+dnl @ ../doc/m4.texi:5062: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/139.include b/checks/139.include
index a62f485..f069b5c 100644
--- a/checks/139.include
+++ b/checks/139.include
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5050: Origin of test
+dnl @ ../doc/m4.texi:5079: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/140.include b/checks/140.include
index d4ea3af..da6fe0d 100644
--- a/checks/140.include
+++ b/checks/140.include
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5079: Origin of test
+dnl @ ../doc/m4.texi:5108: Origin of test
dnl @ expected status: 1
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/141.include b/checks/141.include
index ba88a75..0c71f3b 100644
--- a/checks/141.include
+++ b/checks/141.include
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5092: Origin of test
+dnl @ ../doc/m4.texi:5121: Origin of test
dnl @ expected status: 1
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/142.include b/checks/142.include
index 87081e4..882b906 100644
--- a/checks/142.include
+++ b/checks/142.include
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5100: Origin of test
+dnl @ ../doc/m4.texi:5129: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/143.diversions b/checks/143.diversions
index 0005549..28f06f9 100644
--- a/checks/143.diversions
+++ b/checks/143.diversions
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5157: Origin of test
+dnl @ ../doc/m4.texi:5186: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/144.diversions b/checks/144.diversions
index f55e70b..2d863d2 100644
--- a/checks/144.diversions
+++ b/checks/144.diversions
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5194: Origin of test
+dnl @ ../doc/m4.texi:5223: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/145.diversions b/checks/145.diversions
index 3f8822b..40d928a 100644
--- a/checks/145.diversions
+++ b/checks/145.diversions
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5226: Origin of test
+dnl @ ../doc/m4.texi:5255: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/146.diversions b/checks/146.diversions
index 10ad4ca..ff395b8 100644
--- a/checks/146.diversions
+++ b/checks/146.diversions
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5242: Origin of test
+dnl @ ../doc/m4.texi:5271: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/147.divert b/checks/147.divert
index f971883..c5d9a2d 100644
--- a/checks/147.divert
+++ b/checks/147.divert
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5289: Origin of test
+dnl @ ../doc/m4.texi:5318: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/148.divert b/checks/148.divert
index 063354f..6e2f62d 100644
--- a/checks/148.divert
+++ b/checks/148.divert
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5305: Origin of test
+dnl @ ../doc/m4.texi:5334: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/149.divert b/checks/149.divert
index 141b5cb..3f06f85 100644
--- a/checks/149.divert
+++ b/checks/149.divert
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5324: Origin of test
+dnl @ ../doc/m4.texi:5353: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/150.divert b/checks/150.divert
index c4fdc2e..05feb2a 100644
--- a/checks/150.divert
+++ b/checks/150.divert
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5338: Origin of test
+dnl @ ../doc/m4.texi:5367: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/151.divert b/checks/151.divert
index f4e14be..ac6941d 100644
--- a/checks/151.divert
+++ b/checks/151.divert
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5353: Origin of test
+dnl @ ../doc/m4.texi:5382: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/152.undivert b/checks/152.undivert
index 31f02dc..d725e0f 100644
--- a/checks/152.undivert
+++ b/checks/152.undivert
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5387: Origin of test
+dnl @ ../doc/m4.texi:5416: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/153.undivert b/checks/153.undivert
index edbf19f..161c020 100644
--- a/checks/153.undivert
+++ b/checks/153.undivert
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5410: Origin of test
+dnl @ ../doc/m4.texi:5439: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/154.undivert b/checks/154.undivert
index 9a6d814..9b208ec 100644
--- a/checks/154.undivert
+++ b/checks/154.undivert
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5434: Origin of test
+dnl @ ../doc/m4.texi:5463: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/155.undivert b/checks/155.undivert
index 617261e..77216a3 100644
--- a/checks/155.undivert
+++ b/checks/155.undivert
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5453: Origin of test
+dnl @ ../doc/m4.texi:5482: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/156.undivert b/checks/156.undivert
index 40f61ac..63d0a73 100644
--- a/checks/156.undivert
+++ b/checks/156.undivert
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5482: Origin of test
+dnl @ ../doc/m4.texi:5511: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/157.undivert b/checks/157.undivert
index 276cb0f..2bd1461 100644
--- a/checks/157.undivert
+++ b/checks/157.undivert
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5497: Origin of test
+dnl @ ../doc/m4.texi:5526: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/158.divnum b/checks/158.divnum
index bcaa120..e48ef3c 100644
--- a/checks/158.divnum
+++ b/checks/158.divnum
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5519: Origin of test
+dnl @ ../doc/m4.texi:5548: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/159.cleardiver b/checks/159.cleardiver
index 9efcc04..8fe0a32 100644
--- a/checks/159.cleardiver
+++ b/checks/159.cleardiver
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5545: Origin of test
+dnl @ ../doc/m4.texi:5574: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/160.cleardiver b/checks/160.cleardiver
index 027ef2f..a055c7f 100644
--- a/checks/160.cleardiver
+++ b/checks/160.cleardiver
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5564: Origin of test
+dnl @ ../doc/m4.texi:5593: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/161.len b/checks/161.len
index 8d1efa1..ce4cebe 100644
--- a/checks/161.len
+++ b/checks/161.len
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5604: Origin of test
+dnl @ ../doc/m4.texi:5633: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/162.index_macr b/checks/162.index_macr
index bc5f5d2..c289729 100644
--- a/checks/162.index_macr
+++ b/checks/162.index_macr
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5626: Origin of test
+dnl @ ../doc/m4.texi:5655: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/163.index_macr b/checks/163.index_macr
index 4a08654..04eedef 100644
--- a/checks/163.index_macr
+++ b/checks/163.index_macr
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5636: Origin of test
+dnl @ ../doc/m4.texi:5665: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/164.index_macr b/checks/164.index_macr
index ca8772b..2ad0d45 100644
--- a/checks/164.index_macr
+++ b/checks/164.index_macr
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5650: Origin of test
+dnl @ ../doc/m4.texi:5679: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/165.index_macr b/checks/165.index_macr
index 6adc8d7..e3339d4 100644
--- a/checks/165.index_macr
+++ b/checks/165.index_macr
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5659: Origin of test
+dnl @ ../doc/m4.texi:5688: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/166.regexp b/checks/166.regexp
index 53e312b..d7d9f18 100644
--- a/checks/166.regexp
+++ b/checks/166.regexp
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5708: Origin of test
+dnl @ ../doc/m4.texi:5737: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/167.regexp b/checks/167.regexp
index 1a7ff27..a597313 100644
--- a/checks/167.regexp
+++ b/checks/167.regexp
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5721: Origin of test
+dnl @ ../doc/m4.texi:5750: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/168.regexp b/checks/168.regexp
index 560b12d..511db19 100644
--- a/checks/168.regexp
+++ b/checks/168.regexp
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5738: Origin of test
+dnl @ ../doc/m4.texi:5767: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/169.substr b/checks/169.substr
index 696425b..801f186 100644
--- a/checks/169.substr
+++ b/checks/169.substr
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5766: Origin of test
+dnl @ ../doc/m4.texi:5795: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/170.substr b/checks/170.substr
index 2f2e70b..3ce4bbe 100644
--- a/checks/170.substr
+++ b/checks/170.substr
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5775: Origin of test
+dnl @ ../doc/m4.texi:5804: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/171.translit b/checks/171.translit
index 00167fe..c185313 100644
--- a/checks/171.translit
+++ b/checks/171.translit
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5820: Origin of test
+dnl @ ../doc/m4.texi:5849: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/172.translit b/checks/172.translit
index e7cfc1a..8af557f 100644
--- a/checks/172.translit
+++ b/checks/172.translit
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5847: Origin of test
+dnl @ ../doc/m4.texi:5876: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/173.translit b/checks/173.translit
index 7519f72..80ad36e 100644
--- a/checks/173.translit
+++ b/checks/173.translit
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5854: Origin of test
+dnl @ ../doc/m4.texi:5883: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/174.translit b/checks/174.translit
index 1cbfab1..ffae106 100644
--- a/checks/174.translit
+++ b/checks/174.translit
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5882: Origin of test
+dnl @ ../doc/m4.texi:5911: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/175.patsubst b/checks/175.patsubst
index 0ec1f2b..66f66c4 100644
--- a/checks/175.patsubst
+++ b/checks/175.patsubst
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5926: Origin of test
+dnl @ ../doc/m4.texi:5955: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/176.patsubst b/checks/176.patsubst
index 0b63aad..3c55467 100644
--- a/checks/176.patsubst
+++ b/checks/176.patsubst
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5959: Origin of test
+dnl @ ../doc/m4.texi:5988: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/177.patsubst b/checks/177.patsubst
index 51b8da5..1dbadd1 100644
--- a/checks/177.patsubst
+++ b/checks/177.patsubst
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:5979: Origin of test
+dnl @ ../doc/m4.texi:6008: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/178.patsubst b/checks/178.patsubst
index 75e2bcd..0e9807d 100644
--- a/checks/178.patsubst
+++ b/checks/178.patsubst
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:6000: Origin of test
+dnl @ ../doc/m4.texi:6029: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/179.patsubst b/checks/179.patsubst
index 668862b..3144751 100644
--- a/checks/179.patsubst
+++ b/checks/179.patsubst
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:6015: Origin of test
+dnl @ ../doc/m4.texi:6044: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/180.format b/checks/180.format
index f05fb3d..0298d69 100644
--- a/checks/180.format
+++ b/checks/180.format
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:6046: Origin of test
+dnl @ ../doc/m4.texi:6075: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/181.format b/checks/181.format
index 5228cc9..fb0df98 100644
--- a/checks/181.format
+++ b/checks/181.format
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:6073: Origin of test
+dnl @ ../doc/m4.texi:6102: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/182.format b/checks/182.format
index 9baa166..211b420 100644
--- a/checks/182.format
+++ b/checks/182.format
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:6114: Origin of test
+dnl @ ../doc/m4.texi:6143: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/183.format b/checks/183.format
index ba9e4e0..aa9f241 100644
--- a/checks/183.format
+++ b/checks/183.format
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:6126: Origin of test
+dnl @ ../doc/m4.texi:6155: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/184.incr b/checks/184.incr
index d9db64d..ba8f8d1 100644
--- a/checks/184.incr
+++ b/checks/184.incr
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:6164: Origin of test
+dnl @ ../doc/m4.texi:6193: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/185.eval b/checks/185.eval
index f21e194..d1631fe 100644
--- a/checks/185.eval
+++ b/checks/185.eval
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:6241: Origin of test
+dnl @ ../doc/m4.texi:6270: Origin of test
dnl @ expected status: 1
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/186.eval b/checks/186.eval
index 646907d..b5af9f4 100644
--- a/checks/186.eval
+++ b/checks/186.eval
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:6274: Origin of test
+dnl @ ../doc/m4.texi:6303: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/187.eval b/checks/187.eval
index 6c00614..aa10aa2 100644
--- a/checks/187.eval
+++ b/checks/187.eval
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:6307: Origin of test
+dnl @ ../doc/m4.texi:6336: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/188.eval b/checks/188.eval
index 0f8d2d6..52c78c7 100644
--- a/checks/188.eval
+++ b/checks/188.eval
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:6343: Origin of test
+dnl @ ../doc/m4.texi:6372: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/189.eval b/checks/189.eval
index c61c05c..5989dcf 100644
--- a/checks/189.eval
+++ b/checks/189.eval
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:6382: Origin of test
+dnl @ ../doc/m4.texi:6411: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/190.eval b/checks/190.eval
index 08e9bde..e69b153 100644
--- a/checks/190.eval
+++ b/checks/190.eval
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:6415: Origin of test
+dnl @ ../doc/m4.texi:6444: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/191.platform_m b/checks/191.platform_m
index 888e379..065fc1c 100644
--- a/checks/191.platform_m
+++ b/checks/191.platform_m
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:6496: Origin of test
+dnl @ ../doc/m4.texi:6525: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/192.platform_m b/checks/192.platform_m
index 67dc1b6..5fed587 100644
--- a/checks/192.platform_m
+++ b/checks/192.platform_m
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:6507: Origin of test
+dnl @ ../doc/m4.texi:6536: Origin of test
dnl @ expected status: 0
dnl @ extra options: -G
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/193.platform_m b/checks/193.platform_m
index d385ffb..77b1fea 100644
--- a/checks/193.platform_m
+++ b/checks/193.platform_m
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:6530: Origin of test
+dnl @ ../doc/m4.texi:6559: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/194.syscmd b/checks/194.syscmd
index be2ae13..1eb99b1 100644
--- a/checks/194.syscmd
+++ b/checks/194.syscmd
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:6572: Origin of test
+dnl @ ../doc/m4.texi:6601: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/195.syscmd b/checks/195.syscmd
index 1244616..8f45806 100644
--- a/checks/195.syscmd
+++ b/checks/195.syscmd
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:6601: Origin of test
+dnl @ ../doc/m4.texi:6630: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/196.esyscmd b/checks/196.esyscmd
index af4e743..e334f23 100644
--- a/checks/196.esyscmd
+++ b/checks/196.esyscmd
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:6649: Origin of test
+dnl @ ../doc/m4.texi:6678: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/197.sysval b/checks/197.sysval
index cf5900a..6a61ac3 100644
--- a/checks/197.sysval
+++ b/checks/197.sysval
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:6679: Origin of test
+dnl @ ../doc/m4.texi:6708: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/198.sysval b/checks/198.sysval
index 67b1ccb..acfead7 100644
--- a/checks/198.sysval
+++ b/checks/198.sysval
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:6729: Origin of test
+dnl @ ../doc/m4.texi:6758: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/199.mkstemp b/checks/199.mkstemp
index 1f65d60..ab325e9 100644
--- a/checks/199.mkstemp
+++ b/checks/199.mkstemp
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:6823: Origin of test
+dnl @ ../doc/m4.texi:6852: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/200.mkstemp b/checks/200.mkstemp
index 2d0984a..dd32c2d 100644
--- a/checks/200.mkstemp
+++ b/checks/200.mkstemp
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:6854: Origin of test
+dnl @ ../doc/m4.texi:6883: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/201.mkstemp b/checks/201.mkstemp
index 5aa3256..0953174 100644
--- a/checks/201.mkstemp
+++ b/checks/201.mkstemp
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:6869: Origin of test
+dnl @ ../doc/m4.texi:6898: Origin of test
dnl @ expected status: 0
dnl @ extra options: -G
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/202.errprint b/checks/202.errprint
index b08942b..2875c64 100644
--- a/checks/202.errprint
+++ b/checks/202.errprint
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:6915: Origin of test
+dnl @ ../doc/m4.texi:6944: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/203.location b/checks/203.location
index 4754f49..d416ba1 100644
--- a/checks/203.location
+++ b/checks/203.location
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:6952: Origin of test
+dnl @ ../doc/m4.texi:6981: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/204.location b/checks/204.location
index 2386170..e06e76e 100644
--- a/checks/204.location
+++ b/checks/204.location
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:6972: Origin of test
+dnl @ ../doc/m4.texi:7001: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/205.location b/checks/205.location
index 8ed7a25..1dbb770 100644
--- a/checks/205.location
+++ b/checks/205.location
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:6993: Origin of test
+dnl @ ../doc/m4.texi:7022: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/206.m4exit b/checks/206.m4exit
index 9fc746d..bda134a 100644
--- a/checks/206.m4exit
+++ b/checks/206.m4exit
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:7050: Origin of test
+dnl @ ../doc/m4.texi:7079: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/207.m4exit b/checks/207.m4exit
index 981f84e..a05a1f4 100644
--- a/checks/207.m4exit
+++ b/checks/207.m4exit
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:7068: Origin of test
+dnl @ ../doc/m4.texi:7097: Origin of test
dnl @ expected status: 1
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/208.using_froz b/checks/208.using_froz
index 52068ea..bb0637e 100644
--- a/checks/208.using_froz
+++ b/checks/208.using_froz
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:7204: Origin of test
+dnl @ ../doc/m4.texi:7233: Origin of test
dnl @ expected status: 0
dnl @ extra options: -F /dev/null
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/209.using_froz b/checks/209.using_froz
index 6d3398b..fa40031 100644
--- a/checks/209.using_froz
+++ b/checks/209.using_froz
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:7210: Origin of test
+dnl @ ../doc/m4.texi:7239: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/210.using_froz b/checks/210.using_froz
index 91e578b..7f40d9c 100644
--- a/checks/210.using_froz
+++ b/checks/210.using_froz
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:7230: Origin of test
+dnl @ ../doc/m4.texi:7259: Origin of test
dnl @ expected status: 1
dnl @ extra options: -F /none/such
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/211.extensions b/checks/211.extensions
index abc78bc..fa125a8 100644
--- a/checks/211.extensions
+++ b/checks/211.extensions
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:7366: Origin of test
+dnl @ ../doc/m4.texi:7395: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/212.other_inco b/checks/212.other_inco
index e2bf638..3b38c26 100644
--- a/checks/212.other_inco
+++ b/checks/212.other_inco
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:7660: Origin of test
+dnl @ ../doc/m4.texi:7689: Origin of test
dnl @ expected status: 0
dnl @ extra options: -s
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/213.other_inco b/checks/213.other_inco
index 6e45290..acb6375 100644
--- a/checks/213.other_inco
+++ b/checks/213.other_inco
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:7685: Origin of test
+dnl @ ../doc/m4.texi:7714: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/214.improved_e b/checks/214.improved_e
index 1fb7914..3ac89ef 100644
--- a/checks/214.improved_e
+++ b/checks/214.improved_e
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:7739: Origin of test
+dnl @ ../doc/m4.texi:7768: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/215.improved_f b/checks/215.improved_f
index 002d481..95e5619 100644
--- a/checks/215.improved_f
+++ b/checks/215.improved_f
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:7761: Origin of test
+dnl @ ../doc/m4.texi:7790: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/216.improved_f b/checks/216.improved_f
index cb4bb9d..b07bbfa 100644
--- a/checks/216.improved_f
+++ b/checks/216.improved_f
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:7802: Origin of test
+dnl @ ../doc/m4.texi:7831: Origin of test
dnl @ expected status: 1
dnl @ extra options: -L9
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/217.improved_f b/checks/217.improved_f
index 68ad037..a11e131 100644
--- a/checks/217.improved_f
+++ b/checks/217.improved_f
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:7845: Origin of test
+dnl @ ../doc/m4.texi:7874: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/218.improved_f b/checks/218.improved_f
index 36e85d4..55d5074 100644
--- a/checks/218.improved_f
+++ b/checks/218.improved_f
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:7896: Origin of test
+dnl @ ../doc/m4.texi:7925: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/219.improved_f b/checks/219.improved_f
index b9237fc..8672cb7 100644
--- a/checks/219.improved_f
+++ b/checks/219.improved_f
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:7938: Origin of test
+dnl @ ../doc/m4.texi:7967: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/220.improved_f b/checks/220.improved_f
index 98eeb4b..fc3d190 100644
--- a/checks/220.improved_f
+++ b/checks/220.improved_f
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:7991: Origin of test
+dnl @ ../doc/m4.texi:8020: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/221.improved_f b/checks/221.improved_f
index d76cbf8..9ff37e9 100644
--- a/checks/221.improved_f
+++ b/checks/221.improved_f
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:8078: Origin of test
+dnl @ ../doc/m4.texi:8107: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/222.improved_f b/checks/222.improved_f
index 8dbe6a2..70407ad 100644
--- a/checks/222.improved_f
+++ b/checks/222.improved_f
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:8114: Origin of test
+dnl @ ../doc/m4.texi:8143: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/223.improved_f b/checks/223.improved_f
index 61802cd..5ee81ed 100644
--- a/checks/223.improved_f
+++ b/checks/223.improved_f
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:8168: Origin of test
+dnl @ ../doc/m4.texi:8197: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/224.improved_f b/checks/224.improved_f
index c3c7d0b..5be2ea8 100644
--- a/checks/224.improved_f
+++ b/checks/224.improved_f
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:8249: Origin of test
+dnl @ ../doc/m4.texi:8278: Origin of test
dnl @ expected status: 0
dnl @ extra options: -Dlimit=10 -Dverbose
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/225.improved_f b/checks/225.improved_f
index 74cba9d..cff0b70 100644
--- a/checks/225.improved_f
+++ b/checks/225.improved_f
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:8259: Origin of test
+dnl @ ../doc/m4.texi:8288: Origin of test
dnl @ expected status: 0
dnl @ extra options: -Dlimit=10 -Dverbose -Dalt
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/226.improved_f b/checks/226.improved_f
index 8d40334..5fe9efa 100644
--- a/checks/226.improved_f
+++ b/checks/226.improved_f
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:8269: Origin of test
+dnl @ ../doc/m4.texi:8298: Origin of test
dnl @ expected status: 0
dnl @ extra options: -Dlimit=10 -Dverbose -Dalt=4
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/227.improved_f b/checks/227.improved_f
index 8d19ed9..0500f98 100644
--- a/checks/227.improved_f
+++ b/checks/227.improved_f
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:8277: Origin of test
+dnl @ ../doc/m4.texi:8306: Origin of test
dnl @ expected status: 0
dnl @ extra options: -Dlimit=2500 -Dalt=4
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/228.improved_f b/checks/228.improved_f
index 384ccb9..4db2d6e 100644
--- a/checks/228.improved_f
+++ b/checks/228.improved_f
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:8284: Origin of test
+dnl @ ../doc/m4.texi:8313: Origin of test
dnl @ expected status: 0
dnl @ extra options: -Dlimit=10000 -Dalt=4
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/229.improved_c b/checks/229.improved_c
index 7e1f47f..ce9de2f 100644
--- a/checks/229.improved_c
+++ b/checks/229.improved_c
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:8347: Origin of test
+dnl @ ../doc/m4.texi:8376: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/230.improved_c b/checks/230.improved_c
index 9e2c178..0b85c41 100644
--- a/checks/230.improved_c
+++ b/checks/230.improved_c
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:8393: Origin of test
+dnl @ ../doc/m4.texi:8422: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/231.improved_m b/checks/231.improved_m
index 2d7e751..fac272a 100644
--- a/checks/231.improved_m
+++ b/checks/231.improved_m
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:8416: Origin of test
+dnl @ ../doc/m4.texi:8445: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/232.improved_m b/checks/232.improved_m
index 52dc188..9126230 100644
--- a/checks/232.improved_m
+++ b/checks/232.improved_m
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:8449: Origin of test
+dnl @ ../doc/m4.texi:8478: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/233.improved_c b/checks/233.improved_c
index 6936714..b6a6ca2 100644
--- a/checks/233.improved_c
+++ b/checks/233.improved_c
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:8485: Origin of test
+dnl @ ../doc/m4.texi:8514: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/234.improved_c b/checks/234.improved_c
index ff30cc3..e8587d1 100644
--- a/checks/234.improved_c
+++ b/checks/234.improved_c
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:8521: Origin of test
+dnl @ ../doc/m4.texi:8550: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/235.improved_c b/checks/235.improved_c
index bdaf7e9..888c482 100644
--- a/checks/235.improved_c
+++ b/checks/235.improved_c
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:8598: Origin of test
+dnl @ ../doc/m4.texi:8627: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/236.improved_f b/checks/236.improved_f
index 907b1c2..c2eb6a5 100644
--- a/checks/236.improved_f
+++ b/checks/236.improved_f
@@ -1,4 +1,4 @@
-dnl @ ../doc/m4.texinfo:8642: Origin of test
+dnl @ ../doc/m4.texi:8671: Origin of test
dnl @ expected status: 1
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
diff --git a/checks/Makefile.am b/checks/Makefile.am
new file mode 100644
index 0000000..9265964
--- /dev/null
+++ b/checks/Makefile.am
@@ -0,0 +1,41 @@
+## Makefile.am - template for generating Makefile via Automake.
+##
+## Copyright (C) 1992-1994, 2006-2013 Free Software Foundation, Inc.
+##
+## This file is part of GNU M4.
+##
+## GNU M4 is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## GNU M4 is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Vern says that the first star is required around an Alpha make bug.
+DOC_CHECKS = $(srcdir)/*[0-9][0-9][0-9].*
+CHECKS = $(DOC_CHECKS) $(srcdir)/stackovf.test
+EXTRA_DIST = get-them check-them stamp-checks stackovf.test $(DOC_CHECKS)
+
+all-local: $(srcdir)/stamp-checks
+
+$(srcdir)/stamp-checks: $(srcdir)/get-them $(top_srcdir)/doc/m4.texi
+ rm -f $(DOC_CHECKS)
+ cd $(srcdir) && AWK=$(AWK) ./get-them ../doc/m4.texi
+ echo stamp >$@
+
+MAINTAINERCLEANFILES = $(DOC_CHECKS) $(srcdir)/stamp-checks
+
+check-local: $(srcdir)/stamp-checks
+ PATH=`pwd`/../src"$(PATH_SEPARATOR)"$$PATH; export PATH; \
+ $(srcdir)/check-them -I $(srcdir)/../examples $(CHECKS)
+
+installcheck: $(srcdir)/stamp-checks
+ PATH='$(bindir)'"$(PATH_SEPARATOR)"$$PATH; export PATH; \
+ $(srcdir)/check-them -I $(srcdir)/../examples \
+ -m "`echo m4 | sed '$(program_transform_name)'`" $(CHECKS)
diff --git a/checks/Makefile.in b/checks/Makefile.in
index 7f6f764..b01530a 100644
--- a/checks/Makefile.in
+++ b/checks/Makefile.in
@@ -1,93 +1,1564 @@
-## Makefile.in - template for building Makefile for M4 testsuite.
-##
-## Copyright (C) 1992-1994, 2006-2011 Free Software Foundation, Inc.
-##
-## This file is part of GNU M4.
-##
-## GNU M4 is free software: you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation, either version 3 of the License, or
-## (at your option) any later version.
-##
-## GNU M4 is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program. If not, see <http://www.gnu.org/licenses/>.
+# Makefile.in generated by automake 1.14 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 = checks
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
+ $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/ansi-c++.m4 \
+ $(top_srcdir)/m4/asm-underscore.m4 $(top_srcdir)/m4/assert.m4 \
+ $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \
+ $(top_srcdir)/m4/c-stack.m4 $(top_srcdir)/m4/canonicalize.m4 \
+ $(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \
+ $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/closein.m4 \
+ $(top_srcdir)/m4/closeout.m4 $(top_srcdir)/m4/codeset.m4 \
+ $(top_srcdir)/m4/config-h.m4 $(top_srcdir)/m4/configmake.m4 \
+ $(top_srcdir)/m4/dirent_h.m4 $(top_srcdir)/m4/dirname.m4 \
+ $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \
+ $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
+ $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \
+ $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/execute.m4 \
+ $(top_srcdir)/m4/exponentd.m4 $(top_srcdir)/m4/exponentf.m4 \
+ $(top_srcdir)/m4/exponentl.m4 $(top_srcdir)/m4/extensions.m4 \
+ $(top_srcdir)/m4/extern-inline.m4 \
+ $(top_srcdir)/m4/fatal-signal.m4 $(top_srcdir)/m4/fclose.m4 \
+ $(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \
+ $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopen.m4 \
+ $(top_srcdir)/m4/fflush.m4 $(top_srcdir)/m4/filenamecat.m4 \
+ $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fopen.m4 \
+ $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fpieee.m4 \
+ $(top_srcdir)/m4/fpurge.m4 $(top_srcdir)/m4/freadahead.m4 \
+ $(top_srcdir)/m4/freading.m4 $(top_srcdir)/m4/frexp.m4 \
+ $(top_srcdir)/m4/frexpl.m4 $(top_srcdir)/m4/fseek.m4 \
+ $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \
+ $(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \
+ $(top_srcdir)/m4/getcwd.m4 $(top_srcdir)/m4/getdtablesize.m4 \
+ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpagesize.m4 \
+ $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glibc21.m4 \
+ $(top_srcdir)/m4/gnulib-common.m4 \
+ $(top_srcdir)/m4/gnulib-comp.m4 \
+ $(top_srcdir)/m4/include_next.m4 \
+ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \
+ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \
+ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/isnand.m4 \
+ $(top_srcdir)/m4/isnanf.m4 $(top_srcdir)/m4/isnanl.m4 \
+ $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \
+ $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/ldexp.m4 \
+ $(top_srcdir)/m4/ldexpl.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/libsigsegv.m4 $(top_srcdir)/m4/link.m4 \
+ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \
+ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-tr.m4 \
+ $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/locale_h.m4 \
+ $(top_srcdir)/m4/localeconv.m4 $(top_srcdir)/m4/localename.m4 \
+ $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \
+ $(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \
+ $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \
+ $(top_srcdir)/m4/manywarnings.m4 $(top_srcdir)/m4/math_h.m4 \
+ $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \
+ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \
+ $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mkdtemp.m4 \
+ $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \
+ $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \
+ $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \
+ $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nocrash.m4 \
+ $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/open.m4 \
+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \
+ $(top_srcdir)/m4/pipe2.m4 $(top_srcdir)/m4/posix_spawn.m4 \
+ $(top_srcdir)/m4/printf-frexp.m4 \
+ $(top_srcdir)/m4/printf-frexpl.m4 $(top_srcdir)/m4/printf.m4 \
+ $(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quotearg.m4 \
+ $(top_srcdir)/m4/raise.m4 $(top_srcdir)/m4/rawmemchr.m4 \
+ $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readlink.m4 \
+ $(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/rename.m4 \
+ $(top_srcdir)/m4/rmdir.m4 $(top_srcdir)/m4/sched_h.m4 \
+ $(top_srcdir)/m4/secure_getenv.m4 $(top_srcdir)/m4/setenv.m4 \
+ $(top_srcdir)/m4/setlocale.m4 $(top_srcdir)/m4/sig_atomic_t.m4 \
+ $(top_srcdir)/m4/sigaction.m4 $(top_srcdir)/m4/signal_h.m4 \
+ $(top_srcdir)/m4/signalblocking.m4 $(top_srcdir)/m4/signbit.m4 \
+ $(top_srcdir)/m4/sigpipe.m4 $(top_srcdir)/m4/size_max.m4 \
+ $(top_srcdir)/m4/sleep.m4 $(top_srcdir)/m4/snprintf.m4 \
+ $(top_srcdir)/m4/spawn-pipe.m4 $(top_srcdir)/m4/spawn_h.m4 \
+ $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat.m4 \
+ $(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \
+ $(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \
+ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \
+ $(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strchrnul.m4 \
+ $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
+ $(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strndup.m4 \
+ $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strsignal.m4 \
+ $(top_srcdir)/m4/strstr.m4 $(top_srcdir)/m4/strtod.m4 \
+ $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_socket_h.m4 \
+ $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \
+ $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/sys_wait_h.m4 \
+ $(top_srcdir)/m4/tempname.m4 $(top_srcdir)/m4/threadlib.m4 \
+ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/tls.m4 \
+ $(top_srcdir)/m4/tmpdir.m4 $(top_srcdir)/m4/ungetc.m4 \
+ $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \
+ $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+ $(top_srcdir)/m4/vasprintf-posix.m4 \
+ $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/version-etc.m4 \
+ $(top_srcdir)/m4/wait-process.m4 $(top_srcdir)/m4/waitpid.m4 \
+ $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/m4/wchar_h.m4 \
+ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \
+ $(top_srcdir)/m4/wctob.m4 $(top_srcdir)/m4/wctomb.m4 \
+ $(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wint_t.m4 \
+ $(top_srcdir)/m4/write.m4 $(top_srcdir)/m4/xalloc.m4 \
+ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrndup.m4 \
+ $(top_srcdir)/m4/xvasprintf.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)/lib/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@
+ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@
+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@
+CONFIG_INCLUDE = @CONFIG_INCLUDE@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXX_CHOICE = @CXX_CHOICE@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
+EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
+ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
+ENOLINK_VALUE = @ENOLINK_VALUE@
+EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
+EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
+ERRNO_H = @ERRNO_H@
+EXEEXT = @EXEEXT@
+FLOAT_H = @FLOAT_H@
+GETOPT_H = @GETOPT_H@
+GLIBC21 = @GLIBC21@
+GNULIB_ACOSF = @GNULIB_ACOSF@
+GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
+GNULIB_ASINF = @GNULIB_ASINF@
+GNULIB_ASINL = @GNULIB_ASINL@
+GNULIB_ATAN2F = @GNULIB_ATAN2F@
+GNULIB_ATANF = @GNULIB_ATANF@
+GNULIB_ATANL = @GNULIB_ATANL@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CBRT = @GNULIB_CBRT@
+GNULIB_CBRTF = @GNULIB_CBRTF@
+GNULIB_CBRTL = @GNULIB_CBRTL@
+GNULIB_CEIL = @GNULIB_CEIL@
+GNULIB_CEILF = @GNULIB_CEILF@
+GNULIB_CEILL = @GNULIB_CEILL@
+GNULIB_CHDIR = @GNULIB_CHDIR@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@
+GNULIB_COPYSIGN = @GNULIB_COPYSIGN@
+GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@
+GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@
+GNULIB_COSF = @GNULIB_COSF@
+GNULIB_COSHF = @GNULIB_COSHF@
+GNULIB_COSL = @GNULIB_COSL@
+GNULIB_DIRFD = @GNULIB_DIRFD@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP = @GNULIB_DUP@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXP2 = @GNULIB_EXP2@
+GNULIB_EXP2F = @GNULIB_EXP2F@
+GNULIB_EXP2L = @GNULIB_EXP2L@
+GNULIB_EXPF = @GNULIB_EXPF@
+GNULIB_EXPL = @GNULIB_EXPL@
+GNULIB_EXPM1 = @GNULIB_EXPM1@
+GNULIB_EXPM1F = @GNULIB_EXPM1F@
+GNULIB_EXPM1L = @GNULIB_EXPM1L@
+GNULIB_FABSF = @GNULIB_FABSF@
+GNULIB_FABSL = @GNULIB_FABSL@
+GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
+GNULIB_FCHDIR = @GNULIB_FCHDIR@
+GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
+GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
+GNULIB_FCLOSE = @GNULIB_FCLOSE@
+GNULIB_FCNTL = @GNULIB_FCNTL@
+GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
+GNULIB_FDOPEN = @GNULIB_FDOPEN@
+GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FFSL = @GNULIB_FFSL@
+GNULIB_FFSLL = @GNULIB_FFSLL@
+GNULIB_FGETC = @GNULIB_FGETC@
+GNULIB_FGETS = @GNULIB_FGETS@
+GNULIB_FLOOR = @GNULIB_FLOOR@
+GNULIB_FLOORF = @GNULIB_FLOORF@
+GNULIB_FLOORL = @GNULIB_FLOORL@
+GNULIB_FMA = @GNULIB_FMA@
+GNULIB_FMAF = @GNULIB_FMAF@
+GNULIB_FMAL = @GNULIB_FMAL@
+GNULIB_FMOD = @GNULIB_FMOD@
+GNULIB_FMODF = @GNULIB_FMODF@
+GNULIB_FMODL = @GNULIB_FMODL@
+GNULIB_FOPEN = @GNULIB_FOPEN@
+GNULIB_FPRINTF = @GNULIB_FPRINTF@
+GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+GNULIB_FPURGE = @GNULIB_FPURGE@
+GNULIB_FPUTC = @GNULIB_FPUTC@
+GNULIB_FPUTS = @GNULIB_FPUTS@
+GNULIB_FREAD = @GNULIB_FREAD@
+GNULIB_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FREXP = @GNULIB_FREXP@
+GNULIB_FREXPF = @GNULIB_FREXPF@
+GNULIB_FREXPL = @GNULIB_FREXPL@
+GNULIB_FSCANF = @GNULIB_FSCANF@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+GNULIB_FSTAT = @GNULIB_FSTAT@
+GNULIB_FSTATAT = @GNULIB_FSTATAT@
+GNULIB_FSYNC = @GNULIB_FSYNC@
+GNULIB_FTELL = @GNULIB_FTELL@
+GNULIB_FTELLO = @GNULIB_FTELLO@
+GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
+GNULIB_FWRITE = @GNULIB_FWRITE@
+GNULIB_GETC = @GNULIB_GETC@
+GNULIB_GETCHAR = @GNULIB_GETCHAR@
+GNULIB_GETCWD = @GNULIB_GETCWD@
+GNULIB_GETDELIM = @GNULIB_GETDELIM@
+GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
+GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
+GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
+GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
+GNULIB_GETLINE = @GNULIB_GETLINE@
+GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
+GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
+GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
+GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GL_M4_UNISTD_H_GETOPT = @GNULIB_GL_M4_UNISTD_H_GETOPT@
+GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
+GNULIB_HYPOT = @GNULIB_HYPOT@
+GNULIB_HYPOTF = @GNULIB_HYPOTF@
+GNULIB_HYPOTL = @GNULIB_HYPOTL@
+GNULIB_ILOGB = @GNULIB_ILOGB@
+GNULIB_ILOGBF = @GNULIB_ILOGBF@
+GNULIB_ILOGBL = @GNULIB_ILOGBL@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+GNULIB_ISATTY = @GNULIB_ISATTY@
+GNULIB_ISFINITE = @GNULIB_ISFINITE@
+GNULIB_ISINF = @GNULIB_ISINF@
+GNULIB_ISNAN = @GNULIB_ISNAN@
+GNULIB_ISNAND = @GNULIB_ISNAND@
+GNULIB_ISNANF = @GNULIB_ISNANF@
+GNULIB_ISNANL = @GNULIB_ISNANL@
+GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
+GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
+GNULIB_LCHMOD = @GNULIB_LCHMOD@
+GNULIB_LCHOWN = @GNULIB_LCHOWN@
+GNULIB_LDEXPF = @GNULIB_LDEXPF@
+GNULIB_LDEXPL = @GNULIB_LDEXPL@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
+GNULIB_LOG = @GNULIB_LOG@
+GNULIB_LOG10 = @GNULIB_LOG10@
+GNULIB_LOG10F = @GNULIB_LOG10F@
+GNULIB_LOG10L = @GNULIB_LOG10L@
+GNULIB_LOG1P = @GNULIB_LOG1P@
+GNULIB_LOG1PF = @GNULIB_LOG1PF@
+GNULIB_LOG1PL = @GNULIB_LOG1PL@
+GNULIB_LOG2 = @GNULIB_LOG2@
+GNULIB_LOG2F = @GNULIB_LOG2F@
+GNULIB_LOG2L = @GNULIB_LOG2L@
+GNULIB_LOGB = @GNULIB_LOGB@
+GNULIB_LOGBF = @GNULIB_LOGBF@
+GNULIB_LOGBL = @GNULIB_LOGBL@
+GNULIB_LOGF = @GNULIB_LOGF@
+GNULIB_LOGL = @GNULIB_LOGL@
+GNULIB_LSEEK = @GNULIB_LSEEK@
+GNULIB_LSTAT = @GNULIB_LSTAT@
+GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+GNULIB_MBRLEN = @GNULIB_MBRLEN@
+GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
+GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+GNULIB_MBSCHR = @GNULIB_MBSCHR@
+GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+GNULIB_MBSINIT = @GNULIB_MBSINIT@
+GNULIB_MBSLEN = @GNULIB_MBSLEN@
+GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
+GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
+GNULIB_MBSSEP = @GNULIB_MBSSEP@
+GNULIB_MBSSPN = @GNULIB_MBSSPN@
+GNULIB_MBSSTR = @GNULIB_MBSSTR@
+GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+GNULIB_MBTOWC = @GNULIB_MBTOWC@
+GNULIB_MEMCHR = @GNULIB_MEMCHR@
+GNULIB_MEMMEM = @GNULIB_MEMMEM@
+GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
+GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+GNULIB_MKFIFO = @GNULIB_MKFIFO@
+GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@
+GNULIB_MKNOD = @GNULIB_MKNOD@
+GNULIB_MKNODAT = @GNULIB_MKNODAT@
+GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
+GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
+GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
+GNULIB_MKTIME = @GNULIB_MKTIME@
+GNULIB_MODF = @GNULIB_MODF@
+GNULIB_MODFF = @GNULIB_MODFF@
+GNULIB_MODFL = @GNULIB_MODFL@
+GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
+GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_OPEN = @GNULIB_OPEN@
+GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_OPENDIR = @GNULIB_OPENDIR@
+GNULIB_PCLOSE = @GNULIB_PCLOSE@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PIPE = @GNULIB_PIPE@
+GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
+GNULIB_POSIX_SPAWN = @GNULIB_POSIX_SPAWN@
+GNULIB_POSIX_SPAWNATTR_DESTROY = @GNULIB_POSIX_SPAWNATTR_DESTROY@
+GNULIB_POSIX_SPAWNATTR_GETFLAGS = @GNULIB_POSIX_SPAWNATTR_GETFLAGS@
+GNULIB_POSIX_SPAWNATTR_GETPGROUP = @GNULIB_POSIX_SPAWNATTR_GETPGROUP@
+GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM = @GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM@
+GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY = @GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY@
+GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT = @GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT@
+GNULIB_POSIX_SPAWNATTR_GETSIGMASK = @GNULIB_POSIX_SPAWNATTR_GETSIGMASK@
+GNULIB_POSIX_SPAWNATTR_INIT = @GNULIB_POSIX_SPAWNATTR_INIT@
+GNULIB_POSIX_SPAWNATTR_SETFLAGS = @GNULIB_POSIX_SPAWNATTR_SETFLAGS@
+GNULIB_POSIX_SPAWNATTR_SETPGROUP = @GNULIB_POSIX_SPAWNATTR_SETPGROUP@
+GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM = @GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM@
+GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY = @GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY@
+GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT = @GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT@
+GNULIB_POSIX_SPAWNATTR_SETSIGMASK = @GNULIB_POSIX_SPAWNATTR_SETSIGMASK@
+GNULIB_POSIX_SPAWNP = @GNULIB_POSIX_SPAWNP@
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY@
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT@
+GNULIB_POWF = @GNULIB_POWF@
+GNULIB_PREAD = @GNULIB_PREAD@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@
+GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RAISE = @GNULIB_RAISE@
+GNULIB_RANDOM = @GNULIB_RANDOM@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READ = @GNULIB_READ@
+GNULIB_READDIR = @GNULIB_READDIR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_READLINKAT = @GNULIB_READLINKAT@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMAINDER = @GNULIB_REMAINDER@
+GNULIB_REMAINDERF = @GNULIB_REMAINDERF@
+GNULIB_REMAINDERL = @GNULIB_REMAINDERL@
+GNULIB_REMOVE = @GNULIB_REMOVE@
+GNULIB_RENAME = @GNULIB_RENAME@
+GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+GNULIB_REWINDDIR = @GNULIB_REWINDDIR@
+GNULIB_RINT = @GNULIB_RINT@
+GNULIB_RINTF = @GNULIB_RINTF@
+GNULIB_RINTL = @GNULIB_RINTL@
+GNULIB_RMDIR = @GNULIB_RMDIR@
+GNULIB_ROUND = @GNULIB_ROUND@
+GNULIB_ROUNDF = @GNULIB_ROUNDF@
+GNULIB_ROUNDL = @GNULIB_ROUNDL@
+GNULIB_RPMATCH = @GNULIB_RPMATCH@
+GNULIB_SCANDIR = @GNULIB_SCANDIR@
+GNULIB_SCANF = @GNULIB_SCANF@
+GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@
+GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
+GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
+GNULIB_SIGACTION = @GNULIB_SIGACTION@
+GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
+GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
+GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
+GNULIB_SINF = @GNULIB_SINF@
+GNULIB_SINHF = @GNULIB_SINHF@
+GNULIB_SINL = @GNULIB_SINL@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_SQRTF = @GNULIB_SQRTF@
+GNULIB_SQRTL = @GNULIB_SQRTL@
+GNULIB_STAT = @GNULIB_STAT@
+GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@
+GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
+GNULIB_STPCPY = @GNULIB_STPCPY@
+GNULIB_STPNCPY = @GNULIB_STPNCPY@
+GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+GNULIB_STRDUP = @GNULIB_STRDUP@
+GNULIB_STRERROR = @GNULIB_STRERROR@
+GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
+GNULIB_STRNCAT = @GNULIB_STRNCAT@
+GNULIB_STRNDUP = @GNULIB_STRNDUP@
+GNULIB_STRNLEN = @GNULIB_STRNLEN@
+GNULIB_STRPBRK = @GNULIB_STRPBRK@
+GNULIB_STRPTIME = @GNULIB_STRPTIME@
+GNULIB_STRSEP = @GNULIB_STRSEP@
+GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
+GNULIB_STRSTR = @GNULIB_STRSTR@
+GNULIB_STRTOD = @GNULIB_STRTOD@
+GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@
+GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+GNULIB_STRTOLL = @GNULIB_STRTOLL@
+GNULIB_STRTOULL = @GNULIB_STRTOULL@
+GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
+GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
+GNULIB_SYMLINK = @GNULIB_SYMLINK@
+GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
+GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
+GNULIB_TANF = @GNULIB_TANF@
+GNULIB_TANHF = @GNULIB_TANHF@
+GNULIB_TANL = @GNULIB_TANL@
+GNULIB_TIMEGM = @GNULIB_TIMEGM@
+GNULIB_TIME_R = @GNULIB_TIME_R@
+GNULIB_TMPFILE = @GNULIB_TMPFILE@
+GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
+GNULIB_TRUNC = @GNULIB_TRUNC@
+GNULIB_TRUNCF = @GNULIB_TRUNCF@
+GNULIB_TRUNCL = @GNULIB_TRUNCL@
+GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
+GNULIB_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_ACOSF = @HAVE_ACOSF@
+HAVE_ACOSL = @HAVE_ACOSL@
+HAVE_ALPHASORT = @HAVE_ALPHASORT@
+HAVE_ASINF = @HAVE_ASINF@
+HAVE_ASINL = @HAVE_ASINL@
+HAVE_ATAN2F = @HAVE_ATAN2F@
+HAVE_ATANF = @HAVE_ATANF@
+HAVE_ATANL = @HAVE_ATANL@
+HAVE_ATOLL = @HAVE_ATOLL@
+HAVE_BTOWC = @HAVE_BTOWC@
+HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
+HAVE_CBRT = @HAVE_CBRT@
+HAVE_CBRTF = @HAVE_CBRTF@
+HAVE_CBRTL = @HAVE_CBRTL@
+HAVE_CHOWN = @HAVE_CHOWN@
+HAVE_CLOSEDIR = @HAVE_CLOSEDIR@
+HAVE_COPYSIGN = @HAVE_COPYSIGN@
+HAVE_COPYSIGNL = @HAVE_COPYSIGNL@
+HAVE_COSF = @HAVE_COSF@
+HAVE_COSHF = @HAVE_COSHF@
+HAVE_COSL = @HAVE_COSL@
+HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
+HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
+HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
+HAVE_DECL_CBRTF = @HAVE_DECL_CBRTF@
+HAVE_DECL_CBRTL = @HAVE_DECL_CBRTL@
+HAVE_DECL_CEILF = @HAVE_DECL_CEILF@
+HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
+HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@
+HAVE_DECL_COSL = @HAVE_DECL_COSL@
+HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@
+HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@
+HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@
+HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
+HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@
+HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
+HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@
+HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@
+HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@
+HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
+HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@
+HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@
+HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@
+HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
+HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
+HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
+HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
+HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
+HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
+HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
+HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
+HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@
+HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
+HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@
+HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@
+HAVE_DECL_LOG2F = @HAVE_DECL_LOG2F@
+HAVE_DECL_LOG2L = @HAVE_DECL_LOG2L@
+HAVE_DECL_LOGB = @HAVE_DECL_LOGB@
+HAVE_DECL_LOGL = @HAVE_DECL_LOGL@
+HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
+HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
+HAVE_DECL_REMAINDER = @HAVE_DECL_REMAINDER@
+HAVE_DECL_REMAINDERL = @HAVE_DECL_REMAINDERL@
+HAVE_DECL_RINTF = @HAVE_DECL_RINTF@
+HAVE_DECL_ROUND = @HAVE_DECL_ROUND@
+HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@
+HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@
+HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
+HAVE_DECL_SINL = @HAVE_DECL_SINL@
+HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
+HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@
+HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
+HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@
+HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
+HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
+HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
+HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@
+HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@
+HAVE_DECL_TANL = @HAVE_DECL_TANL@
+HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@
+HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@
+HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@
+HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
+HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
+HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
+HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+HAVE_DIRENT_H = @HAVE_DIRENT_H@
+HAVE_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_DUP3 = @HAVE_DUP3@
+HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXPF = @HAVE_EXPF@
+HAVE_EXPL = @HAVE_EXPL@
+HAVE_EXPM1 = @HAVE_EXPM1@
+HAVE_EXPM1F = @HAVE_EXPM1F@
+HAVE_FABSF = @HAVE_FABSF@
+HAVE_FABSL = @HAVE_FABSL@
+HAVE_FACCESSAT = @HAVE_FACCESSAT@
+HAVE_FCHDIR = @HAVE_FCHDIR@
+HAVE_FCHMODAT = @HAVE_FCHMODAT@
+HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FDATASYNC = @HAVE_FDATASYNC@
+HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
+HAVE_FEATURES_H = @HAVE_FEATURES_H@
+HAVE_FFSL = @HAVE_FFSL@
+HAVE_FFSLL = @HAVE_FFSLL@
+HAVE_FMA = @HAVE_FMA@
+HAVE_FMAF = @HAVE_FMAF@
+HAVE_FMAL = @HAVE_FMAL@
+HAVE_FMODF = @HAVE_FMODF@
+HAVE_FMODL = @HAVE_FMODL@
+HAVE_FREXPF = @HAVE_FREXPF@
+HAVE_FSEEKO = @HAVE_FSEEKO@
+HAVE_FSTATAT = @HAVE_FSTATAT@
+HAVE_FSYNC = @HAVE_FSYNC@
+HAVE_FTELLO = @HAVE_FTELLO@
+HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+HAVE_FUTIMENS = @HAVE_FUTIMENS@
+HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
+HAVE_GETGROUPS = @HAVE_GETGROUPS@
+HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
+HAVE_GETLOGIN = @HAVE_GETLOGIN@
+HAVE_GETOPT_H = @HAVE_GETOPT_H@
+HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
+HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
+HAVE_GRANTPT = @HAVE_GRANTPT@
+HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
+HAVE_HYPOTF = @HAVE_HYPOTF@
+HAVE_HYPOTL = @HAVE_HYPOTL@
+HAVE_ILOGB = @HAVE_ILOGB@
+HAVE_ILOGBF = @HAVE_ILOGBF@
+HAVE_ILOGBL = @HAVE_ILOGBL@
+HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_ISNAND = @HAVE_ISNAND@
+HAVE_ISNANF = @HAVE_ISNANF@
+HAVE_ISNANL = @HAVE_ISNANL@
+HAVE_ISWBLANK = @HAVE_ISWBLANK@
+HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
+HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@
+HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@
+HAVE_LANGINFO_H = @HAVE_LANGINFO_H@
+HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@
+HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@
+HAVE_LCHMOD = @HAVE_LCHMOD@
+HAVE_LCHOWN = @HAVE_LCHOWN@
+HAVE_LDEXPF = @HAVE_LDEXPF@
+HAVE_LIBSIGSEGV = @HAVE_LIBSIGSEGV@
+HAVE_LINK = @HAVE_LINK@
+HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LOG10F = @HAVE_LOG10F@
+HAVE_LOG10L = @HAVE_LOG10L@
+HAVE_LOG1P = @HAVE_LOG1P@
+HAVE_LOG1PF = @HAVE_LOG1PF@
+HAVE_LOG1PL = @HAVE_LOG1PL@
+HAVE_LOGBF = @HAVE_LOGBF@
+HAVE_LOGBL = @HAVE_LOGBL@
+HAVE_LOGF = @HAVE_LOGF@
+HAVE_LOGL = @HAVE_LOGL@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+HAVE_MBRLEN = @HAVE_MBRLEN@
+HAVE_MBRTOWC = @HAVE_MBRTOWC@
+HAVE_MBSINIT = @HAVE_MBSINIT@
+HAVE_MBSLEN = @HAVE_MBSLEN@
+HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
+HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
+HAVE_MEMCHR = @HAVE_MEMCHR@
+HAVE_MEMPCPY = @HAVE_MEMPCPY@
+HAVE_MKDIRAT = @HAVE_MKDIRAT@
+HAVE_MKDTEMP = @HAVE_MKDTEMP@
+HAVE_MKFIFO = @HAVE_MKFIFO@
+HAVE_MKFIFOAT = @HAVE_MKFIFOAT@
+HAVE_MKNOD = @HAVE_MKNOD@
+HAVE_MKNODAT = @HAVE_MKNODAT@
+HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
+HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
+HAVE_MKSTEMP = @HAVE_MKSTEMP@
+HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
+HAVE_MODFF = @HAVE_MODFF@
+HAVE_MODFL = @HAVE_MODFL@
+HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
+HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
+HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
+HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OPENDIR = @HAVE_OPENDIR@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_PCLOSE = @HAVE_PCLOSE@
+HAVE_PIPE = @HAVE_PIPE@
+HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_POPEN = @HAVE_POPEN@
+HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
+HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
+HAVE_POSIX_SPAWN = @HAVE_POSIX_SPAWN@
+HAVE_POSIX_SPAWNATTR_T = @HAVE_POSIX_SPAWNATTR_T@
+HAVE_POSIX_SPAWN_FILE_ACTIONS_T = @HAVE_POSIX_SPAWN_FILE_ACTIONS_T@
+HAVE_POWF = @HAVE_POWF@
+HAVE_PREAD = @HAVE_PREAD@
+HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@
+HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
+HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RAISE = @HAVE_RAISE@
+HAVE_RANDOM = @HAVE_RANDOM@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READDIR = @HAVE_READDIR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_READLINKAT = @HAVE_READLINKAT@
+HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_REMAINDER = @HAVE_REMAINDER@
+HAVE_REMAINDERF = @HAVE_REMAINDERF@
+HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_REWINDDIR = @HAVE_REWINDDIR@
+HAVE_RINT = @HAVE_RINT@
+HAVE_RINTL = @HAVE_RINTL@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@
+HAVE_SCANDIR = @HAVE_SCANDIR@
+HAVE_SCHED_H = @HAVE_SCHED_H@
+HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
+HAVE_SETENV = @HAVE_SETENV@
+HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
+HAVE_SIGACTION = @HAVE_SIGACTION@
+HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@
+HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
+HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+HAVE_SIGSET_T = @HAVE_SIGSET_T@
+HAVE_SINF = @HAVE_SINF@
+HAVE_SINHF = @HAVE_SINHF@
+HAVE_SINL = @HAVE_SINL@
+HAVE_SLEEP = @HAVE_SLEEP@
+HAVE_SPAWN_H = @HAVE_SPAWN_H@
+HAVE_SQRTF = @HAVE_SQRTF@
+HAVE_SQRTL = @HAVE_SQRTL@
+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_SCHED_PARAM = @HAVE_STRUCT_SCHED_PARAM@
+HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@
+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_TANF = @HAVE_TANF@
+HAVE_TANHF = @HAVE_TANHF@
+HAVE_TANL = @HAVE_TANL@
+HAVE_TIMEGM = @HAVE_TIMEGM@
+HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
+HAVE_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@
+LDFLAGS = @LDFLAGS@
+LIBCSTACK = @LIBCSTACK@
+LIBINTL = @LIBINTL@
+LIBM4_LIBDEPS = @LIBM4_LIBDEPS@
+LIBM4_LTLIBDEPS = @LIBM4_LTLIBDEPS@
+LIBMULTITHREAD = @LIBMULTITHREAD@
+LIBOBJS = @LIBOBJS@
+LIBPTH = @LIBPTH@
+LIBPTH_PREFIX = @LIBPTH_PREFIX@
+LIBS = @LIBS@
+LIBSIGSEGV = @LIBSIGSEGV@
+LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@
+LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@
+LIBTHREAD = @LIBTHREAD@
+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@
+LTLIBCSTACK = @LTLIBCSTACK@
+LTLIBINTL = @LTLIBINTL@
+LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
+LTLIBOBJS = @LTLIBOBJS@
+LTLIBPTH = @LTLIBPTH@
+LTLIBSIGSEGV = @LTLIBSIGSEGV@
+LTLIBTHREAD = @LTLIBTHREAD@
+M4_LIBOBJS = @M4_LIBOBJS@
+M4_LTLIBOBJS = @M4_LTLIBOBJS@
+M4tests_LIBOBJS = @M4tests_LIBOBJS@
+M4tests_LTLIBOBJS = @M4tests_LTLIBOBJS@
+M4tests_WITNESS = @M4tests_WITNESS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
+NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
+NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
+NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
+NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
+NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@
+NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
+NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
+NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
+NEXT_AS_FIRST_DIRECTIVE_SCHED_H = @NEXT_AS_FIRST_DIRECTIVE_SCHED_H@
+NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@
+NEXT_AS_FIRST_DIRECTIVE_SPAWN_H = @NEXT_AS_FIRST_DIRECTIVE_SPAWN_H@
+NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@
+NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
+NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@
+NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@
+NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
+NEXT_AS_FIRST_DIRECTIVE_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_DIRENT_H = @NEXT_DIRENT_H@
+NEXT_ERRNO_H = @NEXT_ERRNO_H@
+NEXT_FCNTL_H = @NEXT_FCNTL_H@
+NEXT_FLOAT_H = @NEXT_FLOAT_H@
+NEXT_GETOPT_H = @NEXT_GETOPT_H@
+NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
+NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
+NEXT_LOCALE_H = @NEXT_LOCALE_H@
+NEXT_MATH_H = @NEXT_MATH_H@
+NEXT_SCHED_H = @NEXT_SCHED_H@
+NEXT_SIGNAL_H = @NEXT_SIGNAL_H@
+NEXT_SPAWN_H = @NEXT_SPAWN_H@
+NEXT_STDARG_H = @NEXT_STDARG_H@
+NEXT_STDDEF_H = @NEXT_STDDEF_H@
+NEXT_STDINT_H = @NEXT_STDINT_H@
+NEXT_STDIO_H = @NEXT_STDIO_H@
+NEXT_STDLIB_H = @NEXT_STDLIB_H@
+NEXT_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@
+OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
-VERSION = @VERSION@
-
+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@
+PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
+PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
+PRIPTR_PREFIX = @PRIPTR_PREFIX@
+PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
+PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
+PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
+RANLIB = @RANLIB@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CALLOC = @REPLACE_CALLOC@
+REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+REPLACE_CBRTF = @REPLACE_CBRTF@
+REPLACE_CBRTL = @REPLACE_CBRTL@
+REPLACE_CEIL = @REPLACE_CEIL@
+REPLACE_CEILF = @REPLACE_CEILF@
+REPLACE_CEILL = @REPLACE_CEILL@
+REPLACE_CHOWN = @REPLACE_CHOWN@
+REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@
+REPLACE_DIRFD = @REPLACE_DIRFD@
+REPLACE_DPRINTF = @REPLACE_DPRINTF@
+REPLACE_DUP = @REPLACE_DUP@
+REPLACE_DUP2 = @REPLACE_DUP2@
+REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_EXP2 = @REPLACE_EXP2@
+REPLACE_EXP2L = @REPLACE_EXP2L@
+REPLACE_EXPM1 = @REPLACE_EXPM1@
+REPLACE_EXPM1F = @REPLACE_EXPM1F@
+REPLACE_FABSL = @REPLACE_FABSL@
+REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDOPEN = @REPLACE_FDOPEN@
+REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FLOOR = @REPLACE_FLOOR@
+REPLACE_FLOORF = @REPLACE_FLOORF@
+REPLACE_FLOORL = @REPLACE_FLOORL@
+REPLACE_FMA = @REPLACE_FMA@
+REPLACE_FMAF = @REPLACE_FMAF@
+REPLACE_FMAL = @REPLACE_FMAL@
+REPLACE_FMOD = @REPLACE_FMOD@
+REPLACE_FMODF = @REPLACE_FMODF@
+REPLACE_FMODL = @REPLACE_FMODL@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FREXP = @REPLACE_FREXP@
+REPLACE_FREXPF = @REPLACE_FREXPF@
+REPLACE_FREXPL = @REPLACE_FREXPL@
+REPLACE_FSEEK = @REPLACE_FSEEK@
+REPLACE_FSEEKO = @REPLACE_FSEEKO@
+REPLACE_FSTAT = @REPLACE_FSTAT@
+REPLACE_FSTATAT = @REPLACE_FSTATAT@
+REPLACE_FTELL = @REPLACE_FTELL@
+REPLACE_FTELLO = @REPLACE_FTELLO@
+REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
+REPLACE_FUTIMENS = @REPLACE_FUTIMENS@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETDELIM = @REPLACE_GETDELIM@
+REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
+REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
+REPLACE_HYPOT = @REPLACE_HYPOT@
+REPLACE_HYPOTF = @REPLACE_HYPOTF@
+REPLACE_HYPOTL = @REPLACE_HYPOTL@
+REPLACE_ILOGB = @REPLACE_ILOGB@
+REPLACE_ILOGBF = @REPLACE_ILOGBF@
+REPLACE_ISATTY = @REPLACE_ISATTY@
+REPLACE_ISFINITE = @REPLACE_ISFINITE@
+REPLACE_ISINF = @REPLACE_ISINF@
+REPLACE_ISNAN = @REPLACE_ISNAN@
+REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_ITOLD = @REPLACE_ITOLD@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LDEXPL = @REPLACE_LDEXPL@
+REPLACE_LINK = @REPLACE_LINK@
+REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LOG = @REPLACE_LOG@
+REPLACE_LOG10 = @REPLACE_LOG10@
+REPLACE_LOG10F = @REPLACE_LOG10F@
+REPLACE_LOG10L = @REPLACE_LOG10L@
+REPLACE_LOG1P = @REPLACE_LOG1P@
+REPLACE_LOG1PF = @REPLACE_LOG1PF@
+REPLACE_LOG1PL = @REPLACE_LOG1PL@
+REPLACE_LOG2 = @REPLACE_LOG2@
+REPLACE_LOG2F = @REPLACE_LOG2F@
+REPLACE_LOG2L = @REPLACE_LOG2L@
+REPLACE_LOGB = @REPLACE_LOGB@
+REPLACE_LOGBF = @REPLACE_LOGBF@
+REPLACE_LOGBL = @REPLACE_LOGBL@
+REPLACE_LOGF = @REPLACE_LOGF@
+REPLACE_LOGL = @REPLACE_LOGL@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
+REPLACE_MALLOC = @REPLACE_MALLOC@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBTOWC = @REPLACE_MBTOWC@
+REPLACE_MEMCHR = @REPLACE_MEMCHR@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_MODF = @REPLACE_MODF@
+REPLACE_MODFF = @REPLACE_MODFF@
+REPLACE_MODFL = @REPLACE_MODFL@
+REPLACE_NAN = @REPLACE_NAN@
+REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
+REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
+REPLACE_NULL = @REPLACE_NULL@
+REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
+REPLACE_OPEN = @REPLACE_OPEN@
+REPLACE_OPENAT = @REPLACE_OPENAT@
+REPLACE_OPENDIR = @REPLACE_OPENDIR@
+REPLACE_PERROR = @REPLACE_PERROR@
+REPLACE_POPEN = @REPLACE_POPEN@
+REPLACE_POSIX_SPAWN = @REPLACE_POSIX_SPAWN@
+REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@
+REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@
+REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
+REPLACE_PREAD = @REPLACE_PREAD@
+REPLACE_PRINTF = @REPLACE_PRINTF@
+REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@
+REPLACE_PTSNAME = @REPLACE_PTSNAME@
+REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
+REPLACE_PUTENV = @REPLACE_PUTENV@
+REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_RAISE = @REPLACE_RAISE@
+REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
+REPLACE_READ = @REPLACE_READ@
+REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_REALLOC = @REPLACE_REALLOC@
+REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMAINDER = @REPLACE_REMAINDER@
+REPLACE_REMAINDERF = @REPLACE_REMAINDERF@
+REPLACE_REMAINDERL = @REPLACE_REMAINDERL@
+REPLACE_REMOVE = @REPLACE_REMOVE@
+REPLACE_RENAME = @REPLACE_RENAME@
+REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_ROUND = @REPLACE_ROUND@
+REPLACE_ROUNDF = @REPLACE_ROUNDF@
+REPLACE_ROUNDL = @REPLACE_ROUNDL@
+REPLACE_SETENV = @REPLACE_SETENV@
+REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
+REPLACE_SIGNBIT = @REPLACE_SIGNBIT@
+REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
+REPLACE_SLEEP = @REPLACE_SLEEP@
+REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_SQRTL = @REPLACE_SQRTL@
+REPLACE_STAT = @REPLACE_STAT@
+REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STPNCPY = @REPLACE_STPNCPY@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
+REPLACE_STRDUP = @REPLACE_STRDUP@
+REPLACE_STRERROR = @REPLACE_STRERROR@
+REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
+REPLACE_STRNCAT = @REPLACE_STRNCAT@
+REPLACE_STRNDUP = @REPLACE_STRNDUP@
+REPLACE_STRNLEN = @REPLACE_STRNLEN@
+REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
+REPLACE_STRSTR = @REPLACE_STRSTR@
+REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
+REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
+REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
+REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TMPFILE = @REPLACE_TMPFILE@
+REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
+REPLACE_TRUNC = @REPLACE_TRUNC@
+REPLACE_TRUNCF = @REPLACE_TRUNCF@
+REPLACE_TRUNCL = @REPLACE_TRUNCL@
+REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
+REPLACE_UNLINK = @REPLACE_UNLINK@
+REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
+REPLACE_UNSETENV = @REPLACE_UNSETENV@
+REPLACE_USLEEP = @REPLACE_USLEEP@
+REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@
+REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+REPLACE_VDPRINTF = @REPLACE_VDPRINTF@
+REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+REPLACE_VPRINTF = @REPLACE_VPRINTF@
+REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
+REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
+REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
+REPLACE_WCTOB = @REPLACE_WCTOB@
+REPLACE_WCTOMB = @REPLACE_WCTOMB@
+REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
+REPLACE_WRITE = @REPLACE_WRITE@
+SCHED_H = @SCHED_H@
+SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
-
+SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
+STDARG_H = @STDARG_H@
+STDBOOL_H = @STDBOOL_H@
+STDDEF_H = @STDDEF_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+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@
+WARN_CFLAGS = @WARN_CFLAGS@
+WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+WERROR_CFLAGS = @WERROR_CFLAGS@
+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@
+abs_aux_dir = @abs_aux_dir@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+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@
+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@
-srcdir = @srcdir@
-VPATH = @srcdir@
-PATH_SEPARATOR = @PATH_SEPARATOR@
program_transform_name = @program_transform_name@
-
-# Should be GNU awk, for the get-them script.
-AWK = @AWK@
+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@
# Vern says that the first star is required around an Alpha make bug.
DOC_CHECKS = $(srcdir)/*[0-9][0-9][0-9].*
CHECKS = $(DOC_CHECKS) $(srcdir)/stackovf.test
-# Makefile.in is automatically distributed by automake.
-DISTFILES = $(srcdir)/get-them $(srcdir)/check-them $(srcdir)/stamp-checks \
- $(srcdir)/stackovf.test
+EXTRA_DIST = get-them check-them stamp-checks stackovf.test $(DOC_CHECKS)
+MAINTAINERCLEANFILES = $(DOC_CHECKS) $(srcdir)/stamp-checks
+all: all-am
-all: $(srcdir)/stamp-checks
+.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 checks/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu checks/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;
-$(srcdir)/stamp-checks: $(srcdir)/get-them $(srcdir)/../doc/m4.texinfo
- rm -f $(DOC_CHECKS)
- cd $(srcdir) && AWK=$(AWK) ./get-them ../doc/m4.texinfo
- touch $(srcdir)/stamp-checks
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-install:
+$(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):
+tags TAGS:
-dvi pdf ps html info:
-install-dvi install-pdf install-ps install-html install-info:
+ctags CTAGS:
-uninstall:
+cscope cscopelist:
-check: $(srcdir)/stamp-checks
- PATH=`pwd`/../src"$(PATH_SEPARATOR)"$$PATH; export PATH; \
- $(srcdir)/check-them -I $(srcdir)/../examples $(CHECKS)
-installcheck: $(srcdir)/stamp-checks
- PATH='$(bindir)'"$(PATH_SEPARATOR)"$$PATH; export PATH; \
- $(srcdir)/check-them -I $(srcdir)/../examples \
- -m "`echo m4 | sed '$(program_transform_name)'`" $(CHECKS)
+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-local
+check: check-am
+all-am: Makefile all-local
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
-tags:
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-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:
-mostlyclean:
+clean-generic:
-clean: mostlyclean
+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)
-distclean: clean
- rm -f Makefile
+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 "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
-maintainer-clean realclean: distclean
- rm -f $(DOC_CHECKS) $(srcdir)/stamp-checks
+clean-am: clean-generic mostlyclean-am
-distdir: dist
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
-dist: $(DISTFILES)
- @echo "Copying distribution files"
- @for file in $(DISTFILES) $(DOC_CHECKS); do \
- ln $$file ../$(PACKAGE)-$(VERSION)/checks 2> /dev/null \
- || cp -p $$file ../$(PACKAGE)-$(VERSION)/checks; \
- done
+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:
-Makefile: $(srcdir)/Makefile.in ../config.status
- cd .. && ./config.status checks/$@
+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
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: all all-am all-local check check-am check-local clean \
+ clean-generic cscopelist-am ctags-am distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \
+ uninstall-am
+
+
+all-local: $(srcdir)/stamp-checks
+
+$(srcdir)/stamp-checks: $(srcdir)/get-them $(top_srcdir)/doc/m4.texi
+ rm -f $(DOC_CHECKS)
+ cd $(srcdir) && AWK=$(AWK) ./get-them ../doc/m4.texi
+ echo stamp >$@
+
+check-local: $(srcdir)/stamp-checks
+ PATH=`pwd`/../src"$(PATH_SEPARATOR)"$$PATH; export PATH; \
+ $(srcdir)/check-them -I $(srcdir)/../examples $(CHECKS)
+
+installcheck: $(srcdir)/stamp-checks
+ PATH='$(bindir)'"$(PATH_SEPARATOR)"$$PATH; export PATH; \
+ $(srcdir)/check-them -I $(srcdir)/../examples \
+ -m "`echo m4 | sed '$(program_transform_name)'`" $(CHECKS)
-# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# 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/checks/check-them b/checks/check-them
index b936a2a..792457a 100755
--- a/checks/check-them
+++ b/checks/check-them
@@ -1,6 +1,6 @@
#!/bin/sh
# Check GNU m4 against examples from the manual source.
-# Copyright (C) 1992, 2006-2011 Free Software Foundation, Inc.
+# Copyright (C) 1992, 2006-2013 Free Software Foundation, Inc.
#
# This file is part of GNU M4.
#
diff --git a/checks/get-them b/checks/get-them
index 8f953b7..33d38b5 100755
--- a/checks/get-them
+++ b/checks/get-them
@@ -1,7 +1,7 @@
#!/bin/sh
# -*- AWK -*-
# Extract all examples from the manual source.
-# Copyright (C) 1992, 2005-2011 Free Software Foundation, Inc.
+# Copyright (C) 1992, 2005-2013 Free Software Foundation, Inc.
#
# This file is part of GNU M4.
#
diff --git a/checks/stackovf.test b/checks/stackovf.test
index 4b8e139..8be673e 100755
--- a/checks/stackovf.test
+++ b/checks/stackovf.test
@@ -1,6 +1,6 @@
#!/bin/sh
# This file is part of the GNU m4 testsuite
-# Copyright (C) 2000, 2003, 2007-2011 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2003, 2007-2013 Free Software Foundation, Inc.
#
# This file is part of GNU M4.
#
diff --git a/checks/stamp-checks b/checks/stamp-checks
index e69de29..859afb1 100644
--- a/checks/stamp-checks
+++ b/checks/stamp-checks
@@ -0,0 +1 @@
+stamp
diff --git a/configure b/configure
index 87a2a71..cb83a3b 100755
--- a/configure
+++ b/configure
@@ -1,13 +1,11 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.66 for GNU M4 1.4.16.
+# Generated by GNU Autoconf 2.69 for GNU M4 1.4.17.
#
# Report bugs to <bug-m4@gnu.org>.
#
#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -91,6 +89,7 @@ fi
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
case $0 in #((
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -135,6 +134,31 @@ export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@@ -168,7 +192,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
else
exitcode=1; echo positional parameters were not saved.
fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -213,14 +238,25 @@ IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
if test x$as_have_required = xno; then :
@@ -323,6 +359,14 @@ $as_echo X"$as_dir" |
} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -444,6 +488,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -478,16 +526,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -499,28 +547,8 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -552,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='GNU M4'
PACKAGE_TARNAME='m4'
-PACKAGE_VERSION='1.4.16'
-PACKAGE_STRING='GNU M4 1.4.16'
+PACKAGE_VERSION='1.4.17'
+PACKAGE_STRING='GNU M4 1.4.17'
PACKAGE_BUGREPORT='bug-m4@gnu.org'
PACKAGE_URL='http://www.gnu.org/software/m4/'
@@ -615,14 +643,47 @@ abs_aux_dir
POSIX_SPAWN_PORTED_FALSE
POSIX_SPAWN_PORTED_TRUE
INTL_MACOSX_LIBS
-NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
-NEXT_LOCALE_H
-HAVE_XLOCALE_H
-REPLACE_DUPLOCALE
-REPLACE_SETLOCALE
-HAVE_DUPLOCALE
-GNULIB_DUPLOCALE
-GNULIB_SETLOCALE
+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_DIRENT_H
+NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
+NEXT_DIRENT_H
+REPLACE_FDOPENDIR
+REPLACE_DIRFD
+REPLACE_CLOSEDIR
+REPLACE_OPENDIR
+HAVE_ALPHASORT
+HAVE_SCANDIR
+HAVE_FDOPENDIR
+HAVE_DECL_FDOPENDIR
+HAVE_DECL_DIRFD
+HAVE_CLOSEDIR
+HAVE_REWINDDIR
+HAVE_READDIR
+HAVE_OPENDIR
+GNULIB_ALPHASORT
+GNULIB_SCANDIR
+GNULIB_FDOPENDIR
+GNULIB_DIRFD
+GNULIB_CLOSEDIR
+GNULIB_REWINDDIR
+GNULIB_READDIR
+GNULIB_OPENDIR
LOCALE_TR_UTF8
am__fastdepCXX_FALSE
am__fastdepCXX_TRUE
@@ -634,6 +695,7 @@ ac_ct_CXX
CXX
CXX_CHOICE
M4tests_WITNESS
+REPLACE_TOWLOWER
REPLACE_ISWCNTRL
HAVE_WCTYPE_H
NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
@@ -676,14 +738,14 @@ GNULIB_MKTIME
NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
NEXT_SYS_WAIT_H
GNULIB_WAITPID
-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
@@ -708,35 +770,47 @@ HAVE_INTTYPES_H
HAVE_WCHAR_H
HAVE_UNSIGNED_LONG_LONG_INT
HAVE_LONG_LONG_INT
-NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
-NEXT_STDDEF_H
-STDDEF_H
-HAVE_WCHAR_T
-REPLACE_NULL
HAVE__BOOL
+GL_GENERATE_STDBOOL_H_FALSE
+GL_GENERATE_STDBOOL_H_TRUE
STDBOOL_H
+GL_GENERATE_STDARG_H_FALSE
+GL_GENERATE_STDARG_H_TRUE
+STDARG_H
NEXT_AS_FIRST_DIRECTIVE_STDARG_H
NEXT_STDARG_H
-STDARG_H
HAVE_SPAWN_H
NEXT_AS_FIRST_DIRECTIVE_SPAWN_H
NEXT_SPAWN_H
+ASM_SYMBOL_PREFIX
NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
NEXT_SIGNAL_H
+GL_GENERATE_SCHED_H_FALSE
+GL_GENERATE_SCHED_H_TRUE
+SCHED_H
+HAVE_STRUCT_SCHED_PARAM
+HAVE_SCHED_H
+NEXT_AS_FIRST_DIRECTIVE_SCHED_H
+NEXT_SCHED_H
+REPLACE_RAISE
+REPLACE_PTHREAD_SIGMASK
+HAVE_SIGHANDLER_T
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
HAVE_STRUCT_SIGACTION_SA_SIGACTION
HAVE_SIGACTION
HAVE_SIGINFO_T
HAVE_SIGSET_T
+HAVE_RAISE
+HAVE_PTHREAD_SIGMASK
HAVE_POSIX_SIGNALBLOCKING
GNULIB_SIGACTION
GNULIB_SIGPROCMASK
GNULIB_SIGNAL_H_SIGPIPE
-SCHED_H
-HAVE_STRUCT_SCHED_PARAM
-HAVE_SCHED_H
-NEXT_AS_FIRST_DIRECTIVE_SCHED_H
-NEXT_SCHED_H
+GNULIB_RAISE
+GNULIB_PTHREAD_SIGMASK
+REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
+REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
+REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
REPLACE_POSIX_SPAWN
HAVE_POSIX_SPAWN_FILE_ACTIONS_T
HAVE_POSIX_SPAWNATTR_T
@@ -771,6 +845,7 @@ REPLACE_STRNDUP
REPLACE_STRNCAT
REPLACE_STRERROR_R
REPLACE_STRERROR
+REPLACE_STRCHRNUL
REPLACE_STRCASESTR
REPLACE_STRSTR
REPLACE_STRDUP
@@ -795,6 +870,8 @@ HAVE_DECL_MEMRCHR
HAVE_MEMPCPY
HAVE_DECL_MEMMEM
HAVE_MEMCHR
+HAVE_FFSLL
+HAVE_FFSL
HAVE_MBSLEN
GNULIB_STRVERSCMP
GNULIB_STRSIGNAL
@@ -831,43 +908,13 @@ GNULIB_MEMRCHR
GNULIB_MEMPCPY
GNULIB_MEMMEM
GNULIB_MEMCHR
+GNULIB_FFSLL
+GNULIB_FFSL
LOCALE_FR_UTF8
LOCALE_ZH_CN
LOCALE_JA
NEXT_AS_FIRST_DIRECTIVE_MATH_H
NEXT_MATH_H
-REPLACE_UTIMENSAT
-REPLACE_STAT
-REPLACE_MKNOD
-REPLACE_MKFIFO
-REPLACE_MKDIR
-REPLACE_LSTAT
-REPLACE_FUTIMENS
-REPLACE_FSTATAT
-REPLACE_FSTAT
-HAVE_UTIMENSAT
-HAVE_MKNODAT
-HAVE_MKNOD
-HAVE_MKFIFOAT
-HAVE_MKFIFO
-HAVE_MKDIRAT
-HAVE_LSTAT
-HAVE_LCHMOD
-HAVE_FUTIMENS
-HAVE_FSTATAT
-HAVE_FCHMODAT
-GNULIB_UTIMENSAT
-GNULIB_STAT
-GNULIB_MKNODAT
-GNULIB_MKNOD
-GNULIB_MKFIFOAT
-GNULIB_MKFIFO
-GNULIB_MKDIRAT
-GNULIB_LSTAT
-GNULIB_LCHMOD
-GNULIB_FUTIMENS
-GNULIB_FSTATAT
-GNULIB_FCHMODAT
LTLIBMULTITHREAD
LIBMULTITHREAD
LTLIBTHREAD
@@ -875,6 +922,24 @@ LIBTHREAD
LIBPTH_PREFIX
LTLIBPTH
LIBPTH
+NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
+NEXT_LOCALE_H
+HAVE_XLOCALE_H
+NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
+NEXT_STDDEF_H
+GL_GENERATE_STDDEF_H_FALSE
+GL_GENERATE_STDDEF_H_TRUE
+STDDEF_H
+HAVE_WCHAR_T
+REPLACE_NULL
+REPLACE_STRUCT_LCONV
+REPLACE_DUPLOCALE
+REPLACE_SETLOCALE
+REPLACE_LOCALECONV
+HAVE_DUPLOCALE
+GNULIB_DUPLOCALE
+GNULIB_SETLOCALE
+GNULIB_LOCALECONV
LOCALCHARSET_TESTS_ENVIRONMENT
GLIBC21
HAVE_LANGINFO_YESEXPR
@@ -889,6 +954,7 @@ HAVE_NL_LANGINFO
GNULIB_NL_LANGINFO
NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
NEXT_SYS_TIME_H
+REPLACE_STRUCT_TIMEVAL
REPLACE_GETTIMEOFDAY
HAVE_SYS_TIME_H
HAVE_STRUCT_TIMEVAL
@@ -896,32 +962,114 @@ HAVE_GETTIMEOFDAY
GNULIB_GETTIMEOFDAY
LTLIBINTL
LIBINTL
+GNULIB_GL_M4_UNISTD_H_GETOPT
GETOPT_H
HAVE_GETOPT_H
NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
NEXT_GETOPT_H
+WINDOWS_64_BIT_ST_SIZE
+NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
+NEXT_SYS_STAT_H
+REPLACE_UTIMENSAT
+REPLACE_STAT
+REPLACE_MKNOD
+REPLACE_MKFIFO
+REPLACE_MKDIR
+REPLACE_LSTAT
+REPLACE_FUTIMENS
+REPLACE_FSTATAT
+REPLACE_FSTAT
+HAVE_UTIMENSAT
+HAVE_MKNODAT
+HAVE_MKNOD
+HAVE_MKFIFOAT
+HAVE_MKFIFO
+HAVE_MKDIRAT
+HAVE_LSTAT
+HAVE_LCHMOD
+HAVE_FUTIMENS
+HAVE_FSTATAT
+HAVE_FCHMODAT
+GNULIB_UTIMENSAT
+GNULIB_STAT
+GNULIB_MKNODAT
+GNULIB_MKNOD
+GNULIB_MKFIFOAT
+GNULIB_MKFIFO
+GNULIB_MKDIRAT
+GNULIB_LSTAT
+GNULIB_LCHMOD
+GNULIB_FUTIMENS
+GNULIB_FSTATAT
+GNULIB_FSTAT
+GNULIB_FCHMODAT
+WINDOWS_64_BIT_OFF_T
+NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
+NEXT_SYS_TYPES_H
+HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
REPLACE_TRUNCL
REPLACE_TRUNCF
REPLACE_TRUNC
+REPLACE_SQRTL
REPLACE_SIGNBIT_USING_GCC
REPLACE_SIGNBIT
REPLACE_ROUNDL
REPLACE_ROUNDF
REPLACE_ROUND
+REPLACE_REMAINDERL
+REPLACE_REMAINDERF
+REPLACE_REMAINDER
REPLACE_NAN
+REPLACE_MODFL
+REPLACE_MODFF
+REPLACE_MODF
+REPLACE_LOGBL
+REPLACE_LOGBF
+REPLACE_LOGB
+REPLACE_LOG2L
+REPLACE_LOG2F
+REPLACE_LOG2
+REPLACE_LOG1PL
+REPLACE_LOG1PF
+REPLACE_LOG1P
+REPLACE_LOG10L
+REPLACE_LOG10F
+REPLACE_LOG10
+REPLACE_LOGL
+REPLACE_LOGF
+REPLACE_LOG
REPLACE_LDEXPL
REPLACE_ISNAN
REPLACE_ISINF
REPLACE_ISFINITE
+REPLACE_ILOGBF
+REPLACE_ILOGB
+REPLACE_HYPOTL
+REPLACE_HYPOTF
+REPLACE_HYPOT
REPLACE_HUGE_VAL
REPLACE_FREXPL
REPLACE_FREXP
+REPLACE_FREXPF
+REPLACE_FMODL
+REPLACE_FMODF
+REPLACE_FMOD
+REPLACE_FMAL
+REPLACE_FMAF
+REPLACE_FMA
REPLACE_FLOORL
REPLACE_FLOORF
REPLACE_FLOOR
+REPLACE_FABSL
+REPLACE_EXP2L
+REPLACE_EXP2
+REPLACE_EXPM1F
+REPLACE_EXPM1
REPLACE_CEILL
REPLACE_CEILF
REPLACE_CEIL
+REPLACE_CBRTL
+REPLACE_CBRTF
HAVE_DECL_TRUNCL
HAVE_DECL_TRUNCF
HAVE_DECL_TRUNC
@@ -931,63 +1079,191 @@ HAVE_DECL_SINL
HAVE_DECL_ROUNDL
HAVE_DECL_ROUNDF
HAVE_DECL_ROUND
-HAVE_DECL_LOGL
+HAVE_DECL_RINTF
+HAVE_DECL_REMAINDERL
+HAVE_DECL_REMAINDER
HAVE_DECL_LOGB
+HAVE_DECL_LOG2L
+HAVE_DECL_LOG2F
+HAVE_DECL_LOG2
+HAVE_DECL_LOG10L
+HAVE_DECL_LOGL
HAVE_DECL_LDEXPL
HAVE_DECL_FREXPL
HAVE_DECL_FLOORL
HAVE_DECL_FLOORF
+HAVE_DECL_EXPM1L
+HAVE_DECL_EXP2L
+HAVE_DECL_EXP2F
+HAVE_DECL_EXP2
HAVE_DECL_EXPL
HAVE_DECL_COSL
+HAVE_DECL_COPYSIGNF
HAVE_DECL_CEILL
HAVE_DECL_CEILF
+HAVE_DECL_CBRTL
+HAVE_DECL_CBRTF
HAVE_DECL_ATANL
HAVE_DECL_ASINL
HAVE_DECL_ACOSL
+HAVE_TANHF
HAVE_TANL
+HAVE_TANF
HAVE_SQRTL
+HAVE_SQRTF
+HAVE_SINHF
HAVE_SINL
+HAVE_SINF
+HAVE_RINTL
+HAVE_RINT
+HAVE_REMAINDERF
+HAVE_REMAINDER
+HAVE_POWF
+HAVE_MODFL
+HAVE_MODFF
+HAVE_LOGBL
+HAVE_LOGBF
+HAVE_LOG1PL
+HAVE_LOG1PF
+HAVE_LOG1P
+HAVE_LOG10L
+HAVE_LOG10F
HAVE_LOGL
+HAVE_LOGF
+HAVE_LDEXPF
HAVE_ISNANL
HAVE_ISNAND
HAVE_ISNANF
+HAVE_ILOGBL
+HAVE_ILOGBF
+HAVE_ILOGB
+HAVE_HYPOTL
+HAVE_HYPOTF
+HAVE_FREXPF
+HAVE_FMODL
+HAVE_FMODF
+HAVE_FMAL
+HAVE_FMAF
+HAVE_FMA
+HAVE_FABSL
+HAVE_FABSF
+HAVE_EXPM1F
+HAVE_EXPM1
HAVE_EXPL
+HAVE_EXPF
+HAVE_COSHF
HAVE_COSL
+HAVE_COSF
+HAVE_COPYSIGNL
+HAVE_COPYSIGN
+HAVE_CBRTL
+HAVE_CBRTF
+HAVE_CBRT
+HAVE_ATAN2F
HAVE_ATANL
+HAVE_ATANF
HAVE_ASINL
+HAVE_ASINF
HAVE_ACOSL
+HAVE_ACOSF
GNULIB_TRUNCL
GNULIB_TRUNCF
GNULIB_TRUNC
+GNULIB_TANHF
GNULIB_TANL
+GNULIB_TANF
GNULIB_SQRTL
+GNULIB_SQRTF
+GNULIB_SINHF
GNULIB_SINL
+GNULIB_SINF
GNULIB_SIGNBIT
GNULIB_ROUNDL
GNULIB_ROUNDF
GNULIB_ROUND
-GNULIB_LOGL
+GNULIB_RINTL
+GNULIB_RINTF
+GNULIB_RINT
+GNULIB_REMAINDERL
+GNULIB_REMAINDERF
+GNULIB_REMAINDER
+GNULIB_POWF
+GNULIB_MODFL
+GNULIB_MODFF
+GNULIB_MODF
+GNULIB_LOGBL
+GNULIB_LOGBF
GNULIB_LOGB
+GNULIB_LOG2L
+GNULIB_LOG2F
+GNULIB_LOG2
+GNULIB_LOG1PL
+GNULIB_LOG1PF
+GNULIB_LOG1P
+GNULIB_LOG10L
+GNULIB_LOG10F
+GNULIB_LOG10
+GNULIB_LOGL
+GNULIB_LOGF
+GNULIB_LOG
GNULIB_LDEXPL
+GNULIB_LDEXPF
GNULIB_ISNANL
GNULIB_ISNAND
GNULIB_ISNANF
GNULIB_ISNAN
GNULIB_ISINF
GNULIB_ISFINITE
+GNULIB_ILOGBL
+GNULIB_ILOGBF
+GNULIB_ILOGB
+GNULIB_HYPOTL
+GNULIB_HYPOTF
+GNULIB_HYPOT
GNULIB_FREXPL
GNULIB_FREXP
+GNULIB_FREXPF
+GNULIB_FMODL
+GNULIB_FMODF
+GNULIB_FMOD
+GNULIB_FMAL
+GNULIB_FMAF
+GNULIB_FMA
GNULIB_FLOORL
GNULIB_FLOORF
GNULIB_FLOOR
+GNULIB_FABSL
+GNULIB_FABSF
+GNULIB_EXPM1L
+GNULIB_EXPM1F
+GNULIB_EXPM1
+GNULIB_EXP2L
+GNULIB_EXP2F
+GNULIB_EXP2
GNULIB_EXPL
+GNULIB_EXPF
+GNULIB_COSHF
GNULIB_COSL
+GNULIB_COSF
+GNULIB_COPYSIGNL
+GNULIB_COPYSIGNF
+GNULIB_COPYSIGN
GNULIB_CEILL
GNULIB_CEILF
GNULIB_CEIL
+GNULIB_CBRTL
+GNULIB_CBRTF
+GNULIB_CBRT
+GNULIB_ATAN2F
GNULIB_ATANL
+GNULIB_ATANF
GNULIB_ASINL
+GNULIB_ASINF
GNULIB_ACOSL
+GNULIB_ACOSF
+REPLACE_ITOLD
+GL_GENERATE_FLOAT_H_FALSE
+GL_GENERATE_FLOAT_H_TRUE
FLOAT_H
NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
NEXT_FLOAT_H
@@ -1000,6 +1276,7 @@ HAVE_OPENAT
HAVE_FCNTL
GNULIB_OPENAT
GNULIB_OPEN
+GNULIB_NONBLOCKING
GNULIB_FCNTL
REPLACE_VSPRINTF
REPLACE_VSNPRINTF
@@ -1009,6 +1286,7 @@ REPLACE_VDPRINTF
REPLACE_VASPRINTF
REPLACE_TMPFILE
REPLACE_STDIO_WRITE_FUNCS
+REPLACE_STDIO_READ_FUNCS
REPLACE_SPRINTF
REPLACE_SNPRINTF
REPLACE_RENAMEAT
@@ -1029,11 +1307,14 @@ REPLACE_FPURGE
REPLACE_FPRINTF
REPLACE_FOPEN
REPLACE_FFLUSH
+REPLACE_FDOPEN
REPLACE_FCLOSE
REPLACE_DPRINTF
HAVE_VDPRINTF
HAVE_VASPRINTF
HAVE_RENAMEAT
+HAVE_POPEN
+HAVE_PCLOSE
HAVE_FTELLO
HAVE_FSEEKO
HAVE_DPRINTF
@@ -1052,11 +1333,15 @@ GNULIB_VPRINTF
GNULIB_VFPRINTF_POSIX
GNULIB_VFPRINTF
GNULIB_VDPRINTF
+GNULIB_VSCANF
+GNULIB_VFSCANF
GNULIB_VASPRINTF
GNULIB_TMPFILE
GNULIB_STDIO_H_SIGPIPE
+GNULIB_STDIO_H_NONBLOCKING
GNULIB_SPRINTF_POSIX
GNULIB_SNPRINTF
+GNULIB_SCANF
GNULIB_RENAMEAT
GNULIB_RENAME
GNULIB_REMOVE
@@ -1067,23 +1352,31 @@ 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
EOVERFLOW_VALUE
@@ -1092,6 +1385,8 @@ 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
@@ -1101,6 +1396,8 @@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE
INCLUDE_NEXT
pkglibexecdir
lispdir
+HAVE_WINSOCK2_H
+HAVE_MSVC_INVALID_PARAMETER_HANDLER
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
UNISTD_H_HAVE_WINSOCK2_H
REPLACE_WRITE
@@ -1112,17 +1409,20 @@ REPLACE_SYMLINK
REPLACE_SLEEP
REPLACE_RMDIR
REPLACE_READLINK
+REPLACE_READ
REPLACE_PWRITE
REPLACE_PREAD
REPLACE_LSEEK
REPLACE_LINKAT
REPLACE_LINK
REPLACE_LCHOWN
+REPLACE_ISATTY
REPLACE_GETPAGESIZE
REPLACE_GETGROUPS
REPLACE_GETLOGIN_R
REPLACE_GETDOMAINNAME
REPLACE_GETCWD
+REPLACE_FTRUNCATE
REPLACE_FCHOWNAT
REPLACE_DUP2
REPLACE_DUP
@@ -1131,10 +1431,12 @@ REPLACE_CHOWN
HAVE_SYS_PARAM_H
HAVE_OS_H
HAVE_DECL_TTYNAME_R
+HAVE_DECL_SETHOSTNAME
HAVE_DECL_GETUSERSHELL
HAVE_DECL_GETPAGESIZE
HAVE_DECL_GETLOGIN_R
HAVE_DECL_GETDOMAINNAME
+HAVE_DECL_FDATASYNC
HAVE_DECL_FCHDIR
HAVE_DECL_ENVIRON
HAVE_USLEEP
@@ -1142,6 +1444,7 @@ HAVE_UNLINKAT
HAVE_SYMLINKAT
HAVE_SYMLINK
HAVE_SLEEP
+HAVE_SETHOSTNAME
HAVE_READLINKAT
HAVE_READLINK
HAVE_PWRITE
@@ -1151,6 +1454,7 @@ HAVE_PIPE
HAVE_LINKAT
HAVE_LINK
HAVE_LCHOWN
+HAVE_GROUP_MEMBER
HAVE_GETPAGESIZE
HAVE_GETLOGIN
HAVE_GETHOSTNAME
@@ -1158,6 +1462,7 @@ HAVE_GETGROUPS
HAVE_GETDTABLESIZE
HAVE_FTRUNCATE
HAVE_FSYNC
+HAVE_FDATASYNC
HAVE_FCHOWNAT
HAVE_FCHDIR
HAVE_FACCESSAT
@@ -1170,14 +1475,16 @@ GNULIB_USLEEP
GNULIB_UNLINKAT
GNULIB_UNLINK
GNULIB_UNISTD_H_SIGPIPE
-GNULIB_UNISTD_H_GETOPT
+GNULIB_UNISTD_H_NONBLOCKING
GNULIB_TTYNAME_R
GNULIB_SYMLINKAT
GNULIB_SYMLINK
GNULIB_SLEEP
+GNULIB_SETHOSTNAME
GNULIB_RMDIR
GNULIB_READLINKAT
GNULIB_READLINK
+GNULIB_READ
GNULIB_PWRITE
GNULIB_PREAD
GNULIB_PIPE2
@@ -1186,6 +1493,8 @@ GNULIB_LSEEK
GNULIB_LINKAT
GNULIB_LINK
GNULIB_LCHOWN
+GNULIB_ISATTY
+GNULIB_GROUP_MEMBER
GNULIB_GETUSERSHELL
GNULIB_GETPAGESIZE
GNULIB_GETLOGIN_R
@@ -1197,6 +1506,7 @@ GNULIB_GETDOMAINNAME
GNULIB_GETCWD
GNULIB_FTRUNCATE
GNULIB_FSYNC
+GNULIB_FDATASYNC
GNULIB_FCHOWNAT
GNULIB_FCHDIR
GNULIB_FACCESSAT
@@ -1204,15 +1514,20 @@ GNULIB_EUIDACCESS
GNULIB_ENVIRON
GNULIB_DUP3
GNULIB_DUP2
+GNULIB_DUP
GNULIB_CLOSE
GNULIB_CHOWN
+GNULIB_CHDIR
REPLACE_WCTOMB
REPLACE_UNSETENV
REPLACE_STRTOD
REPLACE_SETENV
REPLACE_REALPATH
REPLACE_REALLOC
+REPLACE_RANDOM_R
REPLACE_PUTENV
+REPLACE_PTSNAME_R
+REPLACE_PTSNAME
REPLACE_MKSTEMP
REPLACE_MBTOWC
REPLACE_MALLOC
@@ -1227,11 +1542,15 @@ HAVE_STRTOLL
HAVE_STRTOD
HAVE_DECL_SETENV
HAVE_SETENV
+HAVE_SECURE_GETENV
HAVE_RPMATCH
HAVE_REALPATH
HAVE_RANDOM_R
HAVE_RANDOM_H
+HAVE_RANDOM
+HAVE_PTSNAME_R
HAVE_PTSNAME
+HAVE_POSIX_OPENPT
HAVE_MKSTEMPS
HAVE_MKSTEMP
HAVE_MKOSTEMPS
@@ -1251,12 +1570,16 @@ GNULIB_STRTOULL
GNULIB_STRTOLL
GNULIB_STRTOD
GNULIB_SETENV
+GNULIB_SECURE_GETENV
GNULIB_RPMATCH
GNULIB_REALPATH
GNULIB_REALLOC_POSIX
GNULIB_RANDOM_R
+GNULIB_RANDOM
GNULIB_PUTENV
+GNULIB_PTSNAME_R
GNULIB_PTSNAME
+GNULIB_POSIX_OPENPT
GNULIB_MKSTEMPS
GNULIB_MKSTEMP
GNULIB_MKOSTEMPS
@@ -1369,15 +1692,14 @@ GNULIB_MBRTOWC
GNULIB_MBSINIT
GNULIB_WCTOB
GNULIB_BTOWC
+GL_GENERATE_ALLOCA_H_FALSE
+GL_GENERATE_ALLOCA_H_TRUE
ALLOCA_H
ALLOCA
GL_COND_LIBTOOL_FALSE
GL_COND_LIBTOOL_TRUE
WARN_CFLAGS
WERROR_CFLAGS
-EGREP
-GREP
-CPP
host_os
host_vendor
host_cpu
@@ -1387,9 +1709,15 @@ build_vendor
build_cpu
build
RANLIB
+ARFLAGS
+AR
+EGREP
+GREP
+CPP
am__fastdepCC_FALSE
am__fastdepCC_TRUE
CCDEPMODE
+am__nodep
AMDEPBACKSLASH
AMDEP_FALSE
AMDEP_TRUE
@@ -1405,6 +1733,8 @@ CFLAGS
CC
AM_BACKSLASH
AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
am__untar
am__tar
AMTAR
@@ -1471,6 +1801,7 @@ ac_user_opts='
enable_option_checking
enable_silent_rules
enable_dependency_tracking
+enable_largefile
enable_threads
enable_gcc_warnings
enable_assert
@@ -1478,7 +1809,6 @@ with_gnu_ld
enable_rpath
with_libsigsegv_prefix
with_libpth_prefix
-enable_largefile
with_included_regex
with_packager
with_packager_version
@@ -1561,8 +1891,9 @@ do
fi
case $ac_option in
- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *) ac_optarg=yes ;;
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
esac
# Accept the important Cygnus configure options, so we can diagnose typos.
@@ -1902,7 +2233,7 @@ Try \`$0 --help' for more information"
$as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
$as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
;;
esac
@@ -1953,8 +2284,6 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -2040,7 +2369,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures GNU M4 1.4.16 to adapt to many kinds of systems.
+\`configure' configures GNU M4 1.4.17 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -2110,7 +2439,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of GNU M4 1.4.16:";;
+ short | recursive ) echo "Configuration of GNU M4 1.4.17:";;
esac
cat <<\_ACEOF
@@ -2118,24 +2447,26 @@ 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')
- --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors
- --enable-threads={posix|solaris|pth|win32}
+ --enable-silent-rules less verbose build output (undo: "make V=1")
+ --disable-silent-rules verbose build output (undo: "make V=0")
+ --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-gcc-warnings turn on lots of GCC warnings (for developers)
--disable-assert turn off assertions
--disable-rpath do not hardcode runtime library paths
- --disable-largefile omit support for large files
--enable-c++ also build C++ sources
--enable-changeword enable -W and changeword() builtin
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-gnu-ld assume the C compiler uses GNU ld default=no
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-libsigsegv-prefix[=DIR] search for libsigsegv in DIR/include and DIR/lib
--without-libsigsegv-prefix don't search for libsigsegv in includedir and libdir
--with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib
@@ -2232,10 +2563,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-GNU M4 configure 1.4.16
-generated by GNU Autoconf 2.66
+GNU M4 configure 1.4.17
+generated by GNU Autoconf 2.69
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -2279,7 +2610,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_compile
@@ -2305,7 +2636,7 @@ $as_echo "$ac_try_echo"; } >&5
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } >/dev/null && {
+ test $ac_status = 0; } > conftest.i && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then :
@@ -2316,7 +2647,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_cpp
@@ -2329,10 +2660,10 @@ fi
ac_fn_c_check_header_mongrel ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if eval "test \"\${$3+set}\"" = set; then :
+ if eval \${$3+:} false; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
fi
eval ac_res=\$$3
@@ -2368,7 +2699,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
else
ac_header_preproc=no
fi
-rm -f conftest.err conftest.$ac_ext
+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; }
@@ -2399,7 +2730,7 @@ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
eval "$3=\$ac_header_compiler"
@@ -2408,7 +2739,7 @@ eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_header_mongrel
@@ -2449,7 +2780,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=$ac_status
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_run
@@ -2463,7 +2794,7 @@ ac_fn_c_check_header_compile ()
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2481,7 +2812,7 @@ fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_header_compile
@@ -2512,7 +2843,7 @@ $as_echo "$ac_try_echo"; } >&5
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
+ test -x conftest$ac_exeext
}; then :
ac_retval=0
else
@@ -2526,11 +2857,65 @@ fi
# interfere with the next link command; also delete a directory that is
# left behind by Apple's compiler. We do this before executing the actions.
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_link
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=no"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_type
+
# ac_fn_c_check_func LINENO FUNC VAR
# ----------------------------------
# Tests whether FUNC exists, setting the cache variable VAR accordingly
@@ -2539,7 +2924,7 @@ ac_fn_c_check_func ()
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2594,7 +2979,7 @@ fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_func
@@ -2609,7 +2994,7 @@ ac_fn_c_check_decl ()
as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2640,64 +3025,10 @@ fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_decl
-# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
-# -------------------------------------------
-# Tests whether TYPE exists after having included INCLUDES, setting cache
-# variable VAR accordingly.
-ac_fn_c_check_type ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=no"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int
-main ()
-{
-if (sizeof ($2))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int
-main ()
-{
-if (sizeof (($2)))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
- eval "$3=yes"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_type
-
# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
# --------------------------------------------
# Tries to find the compile-time value of EXPR in a program that includes
@@ -2715,7 +3046,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) >= 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -2731,7 +3063,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -2757,7 +3090,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) < 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -2773,7 +3107,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) >= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -2807,7 +3142,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -2871,7 +3207,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
rm -f conftest.val
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_compute_int
@@ -2885,7 +3221,7 @@ ac_fn_c_check_member ()
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
$as_echo_n "checking for $2.$3... " >&6; }
-if eval "test \"\${$4+set}\"" = set; then :
+if eval \${$4+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2929,15 +3265,15 @@ fi
eval ac_res=\$$4
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_member
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by GNU M4 $as_me 1.4.16, which was
-generated by GNU Autoconf 2.66. Invocation command line was
+It was created by GNU M4 $as_me 1.4.17, which was
+generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3227,45 +3563,48 @@ as_fn_append ac_func_list " getcwd"
as_fn_append ac_func_list " readlink"
as_fn_append ac_func_list " realpath"
as_fn_append ac_header_list " sys/param.h"
-as_fn_append ac_func_list " dup2"
+as_fn_append ac_func_list " _set_invalid_parameter_handler"
+as_fn_append ac_header_list " sys/socket.h"
as_fn_append ac_func_list " fcntl"
+as_fn_append ac_func_list " symlink"
as_fn_append ac_func_list " mempcpy"
as_fn_append ac_header_list " stdio_ext.h"
-as_fn_append ac_func_list " __fpending"
as_fn_append ac_func_list " fpurge"
as_fn_append ac_func_list " __fpurge"
+as_fn_append ac_func_list " __freadahead"
as_fn_append ac_func_list " __freading"
+as_fn_append ac_header_list " sys/stat.h"
as_fn_append ac_func_list " getdtablesize"
gl_getopt_required=GNU
as_fn_append ac_header_list " getopt.h"
as_fn_append ac_header_list " sys/time.h"
as_fn_append ac_func_list " gettimeofday"
as_fn_append ac_header_list " langinfo.h"
+as_fn_append ac_header_list " xlocale.h"
as_fn_append ac_func_list " lstat"
as_fn_append ac_header_list " math.h"
as_fn_append ac_func_list " mbsinit"
as_fn_append ac_func_list " mbrtowc"
as_fn_append ac_header_list " sys/mman.h"
as_fn_append ac_func_list " mprotect"
-as_fn_append ac_func_list " memchr"
as_fn_append ac_func_list " mkstemp"
as_fn_append ac_func_list " nl_langinfo"
-as_fn_append ac_func_list " pathconf"
as_fn_append ac_func_list " pipe2"
as_fn_append ac_func_list " posix_spawn"
gl_printf_safe=yes
as_fn_append ac_func_list " isblank"
as_fn_append ac_func_list " iswctype"
as_fn_append ac_func_list " wcscoll"
+as_fn_append ac_func_list " link"
as_fn_append ac_header_list " sched.h"
+as_fn_append ac_func_list " secure_getenv"
as_fn_append ac_func_list " sigaction"
as_fn_append ac_func_list " siginterrupt"
+as_fn_append ac_func_list " snprintf"
as_fn_append ac_header_list " spawn.h"
as_fn_append ac_header_list " wchar.h"
as_fn_append ac_header_list " stdint.h"
-as_fn_append ac_header_list " sys/socket.h"
as_fn_append ac_func_list " strndup"
-as_fn_append ac_header_list " sys/stat.h"
as_fn_append ac_header_list " sys/wait.h"
as_fn_append ac_func_list " pipe"
as_fn_append ac_func_list " vasnprintf"
@@ -3273,12 +3612,12 @@ as_fn_append ac_header_list " features.h"
as_fn_append ac_func_list " wcrtomb"
as_fn_append ac_func_list " iswcntrl"
as_fn_append ac_header_list " wctype.h"
-as_fn_append ac_func_list " link"
-as_fn_append ac_header_list " xlocale.h"
+as_fn_append ac_header_list " dirent.h"
+as_fn_append ac_header_list " inttypes.h"
as_fn_append ac_func_list " newlocale"
as_fn_append ac_func_list " setenv"
+as_fn_append ac_func_list " sleep"
as_fn_append ac_func_list " strdup"
-as_fn_append ac_func_list " symlink"
as_fn_append ac_func_list " wctob"
# Check that the precious variables saved in the cache have kept the same
# value.
@@ -3378,7 +3717,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
-am__api_version='1.11'
+am__api_version='1.14'
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
@@ -3397,7 +3736,7 @@ am__api_version='1.11'
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
$as_echo_n "checking for a BSD-compatible install... " >&6; }
if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then :
+if ${ac_cv_path_install+:} false; then :
$as_echo_n "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -3417,7 +3756,7 @@ case $as_dir/ in #((
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
@@ -3475,9 +3814,6 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
$as_echo_n "checking whether build environment is sane... " >&6; }
-# Just in case
-sleep 1
-echo timestamp > conftest.file
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
@@ -3488,32 +3824,40 @@ case `pwd` in
esac
case $srcdir in
*[\\\"\#\$\&\'\`$am_lf\ \ ]*)
- as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+ as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
esac
-# Do `set' in a subshell so we don't clobber the current shell's
+# Do 'set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
- set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t "$srcdir/configure" conftest.file`
- fi
- rm -f conftest.file
- if test "$*" != "X $srcdir/configure conftest.file" \
- && test "$*" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
-alias in your environment" "$LINENO" 5
- fi
-
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+ alias in your environment" "$LINENO" 5
+ fi
+ if test "$2" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
test "$2" = conftest.file
)
then
@@ -3525,6 +3869,16 @@ Check your system clock" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
test "$program_prefix" != NONE &&
program_transform_name="s&^&$program_prefix&;$program_transform_name"
# Use a double $ so make ignores it.
@@ -3547,12 +3901,12 @@ if test x"${MISSING+set}" != xset; then
esac
fi
# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
else
am_missing_run=
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
fi
if test x"${install_sh}" != xset; then
@@ -3564,17 +3918,17 @@ if test x"${install_sh}" != xset; then
esac
fi
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
+# will honor the 'STRIP' environment variable to overrule this program.
if test "$cross_compiling" != no; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
+if ${ac_cv_prog_STRIP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$STRIP"; then
@@ -3586,7 +3940,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3614,7 +3968,7 @@ if test -z "$ac_cv_prog_STRIP"; then
set dummy strip; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_STRIP"; then
@@ -3626,7 +3980,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3667,7 +4021,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
if test -z "$MKDIR_P"; then
- if test "${ac_cv_path_mkdir+set}" = set; then :
+ if ${ac_cv_path_mkdir+:} false; then :
$as_echo_n "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -3677,7 +4031,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_prog in mkdir gmkdir; do
for ac_exec_ext in '' $ac_executable_extensions; do
- { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
'mkdir (GNU coreutils) '* | \
'mkdir (coreutils) '* | \
@@ -3706,20 +4060,13 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
$as_echo "$MKDIR_P" >&6; }
-
-mkdir_p="$MKDIR_P"
-case $mkdir_p in
- [\\/$]* | ?:[\\/]*) ;;
- */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-
for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then :
+if ${ac_cv_prog_AWK+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$AWK"; then
@@ -3731,7 +4078,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AWK="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3759,7 +4106,7 @@ done
$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
set x ${MAKE-make}
ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
$as_echo_n "(cached) " >&6
else
cat >conftest.make <<\_ACEOF
@@ -3800,11 +4147,38 @@ if test "${enable_silent_rules+set}" = set; then :
enableval=$enable_silent_rules;
fi
-case $enable_silent_rules in
-yes) AM_DEFAULT_VERBOSITY=0;;
-no) AM_DEFAULT_VERBOSITY=1;;
-*) AM_DEFAULT_VERBOSITY=1;;
+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
@@ -3829,7 +4203,7 @@ fi
# Define the identity of the package.
PACKAGE='m4'
- VERSION='1.4.16'
+ VERSION='1.4.17'
cat >>confdefs.h <<_ACEOF
@@ -3857,18 +4231,70 @@ 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:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
+
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
-# Always define AMTAR for backward compatibility.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+
+# 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 -'
+
+
+
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
+ fi
+fi
@@ -3886,7 +4312,7 @@ if test -n "$ac_tool_prefix"; then
set dummy ${ac_tool_prefix}gcc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -3898,7 +4324,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3926,7 +4352,7 @@ if test -z "$ac_cv_prog_CC"; then
set dummy gcc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
@@ -3938,7 +4364,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3979,7 +4405,7 @@ if test -z "$CC"; then
set dummy ${ac_tool_prefix}cc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -3991,7 +4417,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4019,7 +4445,7 @@ if test -z "$CC"; then
set dummy cc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -4032,7 +4458,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -4078,7 +4504,7 @@ if test -z "$CC"; then
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -4090,7 +4516,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4122,7 +4548,7 @@ do
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
@@ -4134,7 +4560,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4405,7 +4831,7 @@ rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
ac_clean_files=$ac_clean_files_save
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
$as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then :
+if ${ac_cv_objext+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4456,7 +4882,7 @@ OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+if ${ac_cv_c_compiler_gnu+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4493,7 +4919,7 @@ ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then :
+if ${ac_cv_prog_cc_g+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_save_c_werror_flag=$ac_c_werror_flag
@@ -4571,7 +4997,7 @@ else
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then :
+if ${ac_cv_prog_cc_c89+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_cv_prog_cc_c89=no
@@ -4580,8 +5006,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+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);
@@ -4665,6 +5090,65 @@ 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_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 whether $CC understands -c and -o together" >&5
+$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
+if ${am_cv_prog_cc_c_o+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
+ ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+$as_echo "$am_cv_prog_cc_c_o" >&6; }
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+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
+
DEPDIR="${am__leading_dot}deps"
ac_config_commands="$ac_config_commands depfiles"
@@ -4684,7 +5168,7 @@ am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
+# Ignore all kinds of additional output from 'make'.
case `$am_make -s -f confmf 2> /dev/null` in #(
*the\ am__doit\ target*)
am__include=include
@@ -4717,6 +5201,7 @@ fi
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
+ am__nodep='_no'
fi
if test "x$enable_dependency_tracking" != xno; then
AMDEP_TRUE=
@@ -4732,15 +5217,16 @@ depcc="$CC" am_compiler_list=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
@@ -4774,16 +5260,16 @@ else
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this. Also, some Intel
- # versions had trouble with output in subdirs
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
am__obj=sub/conftest.${OBJEXT-o}
am__minus_obj="-o $am__obj"
case $depmode in
@@ -4792,16 +5278,16 @@ else
test "$am__universal" = false || continue
;;
nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
- msvisualcpp | msvcmsys)
- # This compiler won't grok `-c -o', but also, the minuso test has
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
am__obj=conftest.${OBJEXT-o}
@@ -4856,295 +5342,6 @@ fi
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
- ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_RANLIB"; then
- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_RANLIB="ranlib"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_RANLIB" = x; then
- RANLIB=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- RANLIB=$ac_ct_RANLIB
- fi
-else
- RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-if test "x$CC" != xcc; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
-$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
-$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
-fi
-set dummy $CC; ac_cc=`$as_echo "$2" |
- sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-# Make sure it works both with $CC and with simple cc.
-# We do the test twice because some compilers refuse to overwrite an
-# existing .o file with -o, though they will create one.
-ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
-rm -f conftest2.*
-if { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } &&
- test -f conftest2.$ac_objext && { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; };
-then
- eval ac_cv_prog_cc_${ac_cc}_c_o=yes
- if test "x$CC" != xcc; then
- # Test first that cc exists at all.
- if { ac_try='cc -c conftest.$ac_ext >&5'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
- rm -f conftest2.*
- if { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } &&
- test -f conftest2.$ac_objext && { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; };
- then
- # cc works too.
- :
- else
- # cc exists but doesn't like -o.
- eval ac_cv_prog_cc_${ac_cc}_c_o=no
- fi
- fi
- fi
-else
- eval ac_cv_prog_cc_${ac_cc}_c_o=no
-fi
-rm -f core conftest*
-
-fi
-if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
-
-fi
-
-# FIXME: we rely on the cache variable name because
-# there is no other way.
-set dummy $CC
-am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
-if test "$am_t" != yes; then
- # Losing compiler, so override with the script.
- # FIXME: It is wrong to rewrite CC.
- # But if we don't then we get into trouble of one sort or another.
- # A longer-term fix would be to have automake use am__CC in this case,
- # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
- CC="$am_aux_dir/compile $CC"
-fi
-
-
-# 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 test "${ac_cv_build+set}" = set; 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 test "${ac_cv_host+set}" = set; 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
-
-
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -5158,7 +5355,7 @@ if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
- if test "${ac_cv_prog_CPP+set}" = set; then :
+ if ${ac_cv_prog_CPP+:} false; then :
$as_echo_n "(cached) " >&6
else
# Double quotes because CPP needs to be expanded
@@ -5188,7 +5385,7 @@ else
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -5204,11 +5401,11 @@ else
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
break
fi
@@ -5247,7 +5444,7 @@ else
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -5263,11 +5460,11 @@ else
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
else
@@ -5286,7 +5483,7 @@ 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 test "${ac_cv_path_GREP+set}" = set; then :
+if ${ac_cv_path_GREP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -z "$GREP"; then
@@ -5300,7 +5497,7 @@ do
for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+ as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
@@ -5349,7 +5546,7 @@ $as_echo "$ac_cv_path_GREP" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
$as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
+if ${ac_cv_path_EGREP+:} false; then :
$as_echo_n "(cached) " >&6
else
if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -5366,7 +5563,7 @@ do
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+ as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
@@ -5414,9 +5611,319 @@ $as_echo "$ac_cv_path_EGREP" >&6; }
EGREP="$ac_cv_path_EGREP"
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
+$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
+if ${gl_cv_c_amsterdam_compiler+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef __ACK__
+Amsterdam
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "Amsterdam" >/dev/null 2>&1; then :
+ gl_cv_c_amsterdam_compiler=yes
+else
+ gl_cv_c_amsterdam_compiler=no
+fi
+rm -f conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
+$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
+ if test -z "$AR"; then
+ if test $gl_cv_c_amsterdam_compiler = yes; then
+ AR='cc -c.a'
+ if test -z "$ARFLAGS"; then
+ ARFLAGS='-o'
+ fi
+ else
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR="ar"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+ if test -z "$ARFLAGS"; then
+ ARFLAGS='cru'
+ fi
+ fi
+ else
+ if test -z "$ARFLAGS"; then
+ ARFLAGS='cru'
+ fi
+ fi
+
+
+ if test -z "$RANLIB"; then
+ if test $gl_cv_c_amsterdam_compiler = yes; then
+ RANLIB=':'
+ else
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+ fi
+ fi
+
+
+
+# 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
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5544,10 +6051,8 @@ done
-
-
ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
-if test "x$ac_cv_header_minix_config_h" = x""yes; then :
+if test "x$ac_cv_header_minix_config_h" = xyes; then :
MINIX=yes
else
MINIX=
@@ -5564,20 +6069,15 @@ $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
$as_echo "#define _MINIX 1" >>confdefs.h
- fi
- case "$host_os" in
- hpux*)
+$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
-$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
-
- ;;
- esac
+ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
-if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
+if ${ac_cv_safe_to_define___extensions__+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5607,12 +6107,62 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
$as_echo "#define _ALL_SOURCE 1" >>confdefs.h
+ $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
+
$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
$as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
+$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
+if ${ac_cv_should_define__xopen_source+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_should_define__xopen_source=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <wchar.h>
+ mbstate_t x;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #define _XOPEN_SOURCE 500
+ #include <wchar.h>
+ mbstate_t x;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_should_define__xopen_source=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
+$as_echo "$ac_cv_should_define__xopen_source" >&6; }
+ test $ac_cv_should_define__xopen_source = yes &&
+ $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
+
@@ -5622,7 +6172,7 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
-if test "${ac_cv_sys_largefile_source+set}" = set; then :
+if ${ac_cv_sys_largefile_source+:} false; then :
$as_echo_n "(cached) " >&6
else
while :; do
@@ -5701,9 +6251,11 @@ fi
# <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
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.
+ # 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
;;
@@ -5715,13 +6267,215 @@ 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 <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+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 <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+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 <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+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 <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+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 <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_large_files=1; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_large_files=unknown
+ break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
+$as_echo "$ac_cv_sys_large_files" >&6; }
+case $ac_cv_sys_large_files in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _LARGE_FILES $ac_cv_sys_large_files
+_ACEOF
+;;
+esac
+rm -rf conftest*
+ fi
+
+
+$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
+
+fi
+
case $ac_cv_prog_cc_stdc in #(
no) :
ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
*) :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
-if test "${ac_cv_prog_cc_c99+set}" = set; then :
+if ${ac_cv_prog_cc_c99+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_cv_prog_cc_c99=no
@@ -5865,7 +6619,7 @@ main ()
return 0;
}
_ACEOF
-for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
do
CC="$ac_save_CC $ac_arg"
if ac_fn_c_try_compile "$LINENO"; then :
@@ -5896,7 +6650,7 @@ if test "x$ac_cv_prog_cc_c99" != xno; then :
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then :
+if ${ac_cv_prog_cc_c89+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_cv_prog_cc_c89=no
@@ -5905,8 +6659,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+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);
@@ -5992,7 +6745,7 @@ fi
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
- if test "${ac_cv_prog_cc_stdc+set}" = set; then :
+ if ${ac_cv_prog_cc_stdc+:} false; then :
$as_echo_n "(cached) " >&6
fi
@@ -6063,7 +6816,6 @@ fi
# Code from module alloca-opt-tests:
# Code from module announce-gen:
# Code from module ansi-c++-opt:
- # Code from module arg-nonnull:
# Code from module array-list:
# Code from module array-list-tests:
# Code from module array-oset:
@@ -6109,31 +6861,39 @@ $as_echo "$as_me: autobuild timestamp... $date" >&6;}
# Code from module binary-io-tests:
# Code from module btowc:
# Code from module btowc-tests:
- # Code from module c++defs:
# Code from module c-ctype:
# Code from module c-ctype-tests:
# Code from module c-stack:
# Code from module c-stack-tests:
# Code from module c-strcase:
# Code from module c-strcase-tests:
+ # Code from module c-strcaseeq:
# Code from module canonicalize-lgpl:
# Code from module canonicalize-lgpl-tests:
+ # Code from module chdir:
+ # Code from module chdir-tests:
# Code from module clean-temp:
# Code from module cloexec:
# Code from module cloexec-tests:
# Code from module close:
- # Code from module close-hook:
# Code from module close-stream:
+ # Code from module close-tests:
+ # Code from module closedir:
# Code from module closein:
# Code from module closein-tests:
# Code from module closeout:
# Code from module config-h:
# Code from module configmake:
+ # Code from module dirent:
+ # Code from module dirent-c++-tests:
+ # Code from module dirent-tests:
# Code from module dirname:
# Code from module dirname-lgpl:
# Code from module dirname-tests:
# Code from module dosname:
# Code from module double-slash-root:
+ # Code from module dup:
+ # Code from module dup-tests:
# Code from module dup2:
# Code from module dup2-tests:
# Code from module environ:
@@ -6145,22 +6905,30 @@ $as_echo "$as_me: autobuild timestamp... $date" >&6;}
# Code from module exitfail:
# Code from module extensions:
+ # Code from module extern-inline:
# Code from module fatal-signal:
# Code from module fclose:
+ # Code from module fclose-tests:
# Code from module fcntl:
# Code from module fcntl-h:
# Code from module fcntl-h-c++-tests:
# Code from module fcntl-h-tests:
# Code from module fcntl-tests:
+ # Code from module fd-hook:
# Code from module fd-safer-flag:
# Code from module fdl-1.3:
+ # Code from module fdopen:
+ # Code from module fdopen-tests:
# Code from module fflush:
# Code from module fflush-tests:
+ # Code from module fgetc-tests:
+ # Code from module filename:
# Code from module filenamecat:
# Code from module filenamecat-lgpl:
# Code from module filenamecat-tests:
# Code from module float:
+ # Code from module float-tests:
# Code from module fopen:
# Code from module fopen-safer:
# Code from module fopen-safer-tests:
@@ -6172,6 +6940,8 @@ $as_echo "$as_me: autobuild timestamp... $date" >&6;}
# Code from module fpucw:
# Code from module fpurge:
# Code from module fpurge-tests:
+ # Code from module fputc-tests:
+ # Code from module fread-tests:
# Code from module freadahead:
# Code from module freadahead-tests:
# Code from module freading:
@@ -6180,15 +6950,22 @@ $as_echo "$as_me: autobuild timestamp... $date" >&6;}
# Code from module frexp-nolibm-tests:
# Code from module frexpl-nolibm:
# Code from module frexpl-nolibm-tests:
+ # Code from module fseek:
+ # Code from module fseek-tests:
# Code from module fseeko:
# Code from module fseeko-tests:
+ # Code from module fstat:
+ # Code from module fstat-tests:
# Code from module ftell:
# Code from module ftell-tests:
# Code from module ftello:
# Code from module ftello-tests:
+ # Code from module fwrite-tests:
# Code from module gendocs:
+ # Code from module getcwd-lgpl:
+ # Code from module getcwd-lgpl-tests:
# Code from module getdtablesize:
# Code from module getdtablesize-tests:
# Code from module getopt-gnu:
@@ -6207,8 +6984,11 @@ $as_echo "$as_me: autobuild timestamp... $date" >&6;}
# Code from module ignore-value:
# Code from module ignore-value-tests:
# Code from module include_next:
- # Code from module inline:
# Code from module intprops:
+ # Code from module intprops-tests:
+ # Code from module inttypes:
+ # Code from module inttypes-incomplete:
+ # Code from module inttypes-tests:
# Code from module isnand-nolibm:
# Code from module isnand-nolibm-tests:
# Code from module isnanf-nolibm:
@@ -6218,6 +6998,8 @@ $as_echo "$as_me: autobuild timestamp... $date" >&6;}
# Code from module langinfo:
# Code from module langinfo-c++-tests:
# Code from module langinfo-tests:
+ # Code from module largefile:
+
# Code from module libsigsegv:
# Code from module link:
# Code from module link-tests:
@@ -6228,6 +7010,8 @@ $as_echo "$as_me: autobuild timestamp... $date" >&6;}
# Code from module locale:
# Code from module locale-c++-tests:
# 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:
@@ -6256,6 +7040,8 @@ $as_echo "$as_me: autobuild timestamp... $date" >&6;}
# Code from module memchr2-tests:
# Code from module mkdtemp:
# 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:
@@ -6263,15 +7049,20 @@ $as_echo "$as_me: autobuild timestamp... $date" >&6;}
# Code from module obstack:
# Code from module open:
# Code from module open-tests:
+ # Code from module opendir:
# Code from module oset:
# Code from module pathmax:
+ # Code from module pathmax-tests:
# Code from module pipe2:
# Code from module pipe2-safer:
# Code from module pipe2-tests:
# Code from module posix_spawn-internal:
# Code from module posix_spawn_file_actions_addclose:
+ # Code from module posix_spawn_file_actions_addclose-tests:
# Code from module posix_spawn_file_actions_adddup2:
+ # Code from module posix_spawn_file_actions_adddup2-tests:
# Code from module posix_spawn_file_actions_addopen:
+ # Code from module posix_spawn_file_actions_addopen-tests:
# Code from module posix_spawn_file_actions_destroy:
# Code from module posix_spawn_file_actions_init:
# Code from module posix_spawnattr_destroy:
@@ -6290,11 +7081,15 @@ $as_echo "$as_me: autobuild timestamp... $date" >&6;}
# Code from module quotearg:
# Code from module quotearg-simple:
# Code from module quotearg-simple-tests:
+ # Code from module raise:
+ # Code from module raise-tests:
# Code from module rawmemchr:
# Code from module rawmemchr-tests:
+ # Code from module readdir:
# Code from module readlink:
# Code from module readlink-tests:
# Code from module regex:
+ # Code from module regex-tests:
# Code from module rename:
# Code from module rename-tests:
# Code from module rmdir:
@@ -6302,19 +7097,30 @@ $as_echo "$as_me: autobuild timestamp... $date" >&6;}
# Code from module same-inode:
# Code from module sched:
# Code from module sched-tests:
+ # Code from module secure_getenv:
# Code from module setenv:
# Code from module setenv-tests:
# Code from module setlocale:
# Code from module setlocale-tests:
# Code from module sigaction:
# Code from module sigaction-tests:
- # Code from module signal:
- # Code from module signal-c++-tests:
- # Code from module signal-tests:
+ # Code from module signal-h:
+ # Code from module signal-h-c++-tests:
+ # Code from module signal-h-tests:
# Code from module signbit:
# Code from module signbit-tests:
+ # Code from module sigpipe:
+ # Code from module sigpipe-tests:
# Code from module sigprocmask:
+ # Code from module sigprocmask-tests:
# Code from module size_max:
+ # Code from module sleep:
+ # Code from module sleep-tests:
+ # Code from module snippet/_Noreturn:
+ # Code from module snippet/arg-nonnull:
+ # Code from module snippet/c++defs:
+ # Code from module snippet/unused-parameter:
+ # Code from module snippet/warn-on-use:
# Code from module snprintf:
# Code from module snprintf-tests:
# Code from module spawn:
@@ -6327,6 +7133,8 @@ $as_echo "$as_me: autobuild timestamp... $date" >&6;}
# Code from module stat-tests:
# Code from module stdarg:
+
+
# Code from module stdbool:
# Code from module stdbool-tests:
# Code from module stddef:
@@ -6345,6 +7153,7 @@ $as_echo "$as_me: autobuild timestamp... $date" >&6;}
# Code from module strdup-posix:
# Code from module streq:
# Code from module strerror:
+ # Code from module strerror-override:
# Code from module strerror-tests:
# Code from module string:
# Code from module string-c++-tests:
@@ -6359,7 +7168,6 @@ $as_echo "$as_me: autobuild timestamp... $date" >&6;}
# Code from module strstr-tests:
# Code from module strtod:
# Code from module strtod-tests:
- # Code from module strtol:
# Code from module symlink:
# Code from module symlink-tests:
# Code from module sys_stat:
@@ -6368,10 +7176,15 @@ $as_echo "$as_me: autobuild timestamp... $date" >&6;}
# Code from module sys_time:
# Code from module sys_time-c++-tests:
# Code from module sys_time-tests:
+ # Code from module sys_types:
+ # Code from module sys_types-c++-tests:
+ # Code from module sys_types-tests:
# Code from module sys_wait:
# Code from module sys_wait-c++-tests:
# 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 threadlib:
@@ -6408,7 +7221,6 @@ $as_echo "$as_me: autobuild timestamp... $date" >&6;}
# Code from module version-etc-tests:
# Code from module wait-process:
# Code from module waitpid:
- # Code from module warn-on-use:
# Code from module warnings:
# Code from module wchar:
# Code from module wchar-c++-tests:
@@ -6420,9 +7232,12 @@ $as_echo "$as_me: autobuild timestamp... $date" >&6;}
# Code from module wctype-h:
# Code from module wctype-h-c++-tests:
# Code from module wctype-h-tests:
+ # Code from module write:
+ # Code from module write-tests:
# Code from module xalloc:
# Code from module xalloc-die:
# Code from module xalloc-die-tests:
+ # Code from module xalloc-oversized:
# Code from module xlist:
# Code from module xmalloca:
# Code from module xoset:
@@ -6454,20 +7269,24 @@ if test "${enable_gcc_warnings+set}" = set; then :
esac
gl_gcc_warnings=$enableval
else
- gl_gcc_warnings=no
+ if test -d "$srcdir"/.git; then
+ gl_gcc_warnings=yes
+ else
+ gl_gcc_warnings=no
+ fi
fi
if test "$gl_gcc_warnings" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Werror" >&5
-$as_echo_n "checking whether compiler handles -Werror... " >&6; }
-if test "${gl_cv_warn__Werror+set}" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
+$as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
+if ${gl_cv_warn_c__Werror__Wunknown_warning_option+:} false; then :
$as_echo_n "(cached) " >&6
else
- save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="${CPPFLAGS} -Werror"
+ gl_save_compiler_FLAGS="$CFLAGS"
+ as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6479,110 +7298,385 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- gl_cv_warn__Werror=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_warn_c__Werror__Wunknown_warning_option=yes
else
- gl_cv_warn__Werror=no
+ gl_cv_warn_c__Werror__Wunknown_warning_option=no
fi
-rm -f conftest.err conftest.$ac_ext
- CPPFLAGS="$save_CPPFLAGS"
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$gl_save_compiler_FLAGS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Werror" >&5
-$as_echo "$gl_cv_warn__Werror" >&6; }
-if test "x$gl_cv_warn__Werror" = x""yes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
+$as_echo "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
+if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes; then :
+ gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
+else
+ gl_unknown_warnings_are_errors=
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
+$as_echo_n "checking whether C compiler handles -Werror... " >&6; }
+if ${gl_cv_warn_c__Werror+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ gl_save_compiler_FLAGS="$CFLAGS"
+ as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_warn_c__Werror=yes
+else
+ gl_cv_warn_c__Werror=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$gl_save_compiler_FLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
+$as_echo "$gl_cv_warn_c__Werror" >&6; }
+if test "x$gl_cv_warn_c__Werror" = xyes; then :
as_fn_append WERROR_CFLAGS " -Werror"
fi
+
+ # We use '#pragma GCC diagnostic push' to silence some
+ # warnings, but older gcc doesn't support this.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pragma GCC diagnostic push works" >&5
+$as_echo_n "checking whether pragma GCC diagnostic push works... " >&6; }
+if ${M4_cv_gcc_pragma_push_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ save_CFLAGS=$CFLAGS
+ CFLAGS='-Wunknown-pragmas -Werror'
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic pop
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ M4_cv_gcc_pragma_push_works=yes
+else
+ M4_cv_gcc_pragma_push_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS=$save_CFLAGS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4_cv_gcc_pragma_push_works" >&5
+$as_echo "$M4_cv_gcc_pragma_push_works" >&6; }
+
+ # This, $nw, is the list of warnings we disable.
nw=
- nw="$nw -Waggregate-return" # C90 is anachronistic
+ nw="$nw -Waggregate-return" # K&R is anachronistic
+ nw="$nw -Wtraditional-conversion" # K&R is anachronistic
+ nw="$nw -Wundef" # K&R is anachronistic
+ nw="$nw -Wtraditional" # K&R is anachronistic
nw="$nw -Wlong-long" # C90 is anachronistic
- nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
- nw="$nw -Wtraditional" # Warns on #elif which we use often
nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
nw="$nw -Wpadded" # Our structs are not packed
- nw="$nw -Wredundant-decls" # Gnulib has multiple decls
- nw="$nw -Wformat-nonliteral" # Needed in builtin.c
- nw="$nw -Wunreachable-code" # Needed in output.c
nw="$nw -Wconversion" # Too many warnings for now
nw="$nw -Wsign-conversion" # Too many warnings for now
- nw="$nw -Wtraditional-conversion" # Too many warnings for now
nw="$nw -Wcast-qual" # Too many warnings for now
nw="$nw -Wswitch-enum" # Too many warnings for now
- # This, $nw, is the list of warnings we disable.
+ # gcc 4.4.6 complains enum-compare is C++ only; gcc 4.7.0 implies it in -Wall
+ nw="$nw -Wenum-compare"
+ # Gnulib uses '#pragma GCC diagnostic push' to silence some
+ # warnings, but older gcc doesn't support this.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pragma GCC diagnostic push works" >&5
+$as_echo_n "checking whether pragma GCC diagnostic push works... " >&6; }
+if ${M4_cv_gcc_pragma_push_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
- gl_manywarn_set=
- for gl_manywarn_item in \
- -Wall \
- -W \
- -Wformat-y2k \
- -Wformat-nonliteral \
- -Wformat-security \
- -Winit-self \
- -Wmissing-include-dirs \
- -Wswitch-default \
- -Wswitch-enum \
- -Wunused \
- -Wunknown-pragmas \
- -Wstrict-aliasing \
- -Wstrict-overflow \
- -Wsystem-headers \
- -Wfloat-equal \
- -Wtraditional \
- -Wtraditional-conversion \
- -Wdeclaration-after-statement \
- -Wundef \
- -Wshadow \
- -Wunsafe-loop-optimizations \
- -Wpointer-arith \
- -Wbad-function-cast \
- -Wc++-compat \
- -Wcast-qual \
- -Wcast-align \
- -Wwrite-strings \
- -Wconversion \
- -Wsign-conversion \
- -Wlogical-op \
- -Waggregate-return \
- -Wstrict-prototypes \
- -Wold-style-definition \
- -Wmissing-prototypes \
- -Wmissing-declarations \
- -Wmissing-noreturn \
- -Wmissing-format-attribute \
- -Wpacked \
- -Wpadded \
- -Wredundant-decls \
- -Wnested-externs \
- -Wunreachable-code \
- -Winline \
- -Winvalid-pch \
- -Wlong-long \
- -Wvla \
- -Wvolatile-register-var \
- -Wdisabled-optimization \
- -Wstack-protector \
- -Woverlength-strings \
- -Wbuiltin-macro-redefined \
- -Wmudflap \
- -Wpacked-bitfield-compat \
- -Wsync-nand \
- ; do
- gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
- done
- # The following are not documented in the manual but are included in
- # output from gcc --help=warnings.
- for gl_manywarn_item in \
- -Wattributes \
- -Wcoverage-mismatch \
- -Wmultichar \
- -Wunused-macros \
- ; do
+ save_CFLAGS=$CFLAGS
+ CFLAGS='-Wunknown-pragmas -Werror'
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic pop
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ M4_cv_gcc_pragma_push_works=yes
+else
+ M4_cv_gcc_pragma_push_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS=$save_CFLAGS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4_cv_gcc_pragma_push_works" >&5
+$as_echo "$M4_cv_gcc_pragma_push_works" >&6; }
+ if test $M4_cv_gcc_pragma_push_works = no; then
+ nw="$nw -Wmissing-prototypes"
+ nw="$nw -Wmissing-declarations"
+ nw="$nw -Wunreachable-code"
+ fi
+
+
+
+ if test -n "$GCC"; then
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
+$as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
+ if ${gl_cv_cc_nomfi_supported+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_cc_nomfi_supported=yes
+else
+ gl_cv_cc_nomfi_supported=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$gl_save_CFLAGS"
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
+$as_echo "$gl_cv_cc_nomfi_supported" >&6; }
+
+ if test "$gl_cv_cc_nomfi_supported" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
+$as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
+ if ${gl_cv_cc_nomfi_needed+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -W -Werror"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+void f (void)
+ {
+ typedef struct { int a; int b; } s_t;
+ s_t s1 = { 0, };
+ }
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_cc_nomfi_needed=no
+else
+ gl_cv_cc_nomfi_needed=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$gl_save_CFLAGS"
+
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
+$as_echo "$gl_cv_cc_nomfi_needed" >&6; }
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
+$as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
+ if ${gl_cv_cc_uninitialized_supported+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wuninitialized"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_cc_uninitialized_supported=yes
+else
+ gl_cv_cc_uninitialized_supported=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$gl_save_CFLAGS"
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
+$as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
+
+ fi
+
+ # List all gcc warning categories.
+ gl_manywarn_set=
+ for gl_manywarn_item in \
+ -W \
+ -Wabi \
+ -Waddress \
+ -Waggressive-loop-optimizations \
+ -Wall \
+ -Warray-bounds \
+ -Wattributes \
+ -Wbad-function-cast \
+ -Wbuiltin-macro-redefined \
+ -Wcast-align \
+ -Wchar-subscripts \
+ -Wclobbered \
+ -Wcomment \
+ -Wcomments \
+ -Wcoverage-mismatch \
+ -Wcpp \
+ -Wdeprecated \
+ -Wdeprecated-declarations \
+ -Wdisabled-optimization \
+ -Wdiv-by-zero \
+ -Wdouble-promotion \
+ -Wempty-body \
+ -Wendif-labels \
+ -Wenum-compare \
+ -Wextra \
+ -Wformat-contains-nul \
+ -Wformat-extra-args \
+ -Wformat-nonliteral \
+ -Wformat-security \
+ -Wformat-y2k \
+ -Wformat-zero-length \
+ -Wfree-nonheap-object \
+ -Wignored-qualifiers \
+ -Wimplicit \
+ -Wimplicit-function-declaration \
+ -Wimplicit-int \
+ -Winit-self \
+ -Winline \
+ -Wint-to-pointer-cast \
+ -Winvalid-memory-model \
+ -Winvalid-pch \
+ -Wjump-misses-init \
+ -Wlogical-op \
+ -Wmain \
+ -Wmaybe-uninitialized \
+ -Wmissing-braces \
+ -Wmissing-declarations \
+ -Wmissing-field-initializers \
+ -Wmissing-include-dirs \
+ -Wmissing-parameter-type \
+ -Wmissing-prototypes \
+ -Wmudflap \
+ -Wmultichar \
+ -Wnarrowing \
+ -Wnested-externs \
+ -Wnonnull \
+ -Wnormalized=nfc \
+ -Wold-style-declaration \
+ -Wold-style-definition \
+ -Woverflow \
+ -Woverlength-strings \
+ -Woverride-init \
+ -Wpacked \
+ -Wpacked-bitfield-compat \
+ -Wparentheses \
+ -Wpointer-arith \
+ -Wpointer-sign \
+ -Wpointer-to-int-cast \
+ -Wpragmas \
+ -Wreturn-local-addr \
+ -Wreturn-type \
+ -Wsequence-point \
+ -Wshadow \
+ -Wsizeof-pointer-memaccess \
+ -Wstack-protector \
+ -Wstrict-aliasing \
+ -Wstrict-overflow \
+ -Wstrict-prototypes \
+ -Wsuggest-attribute=const \
+ -Wsuggest-attribute=format \
+ -Wsuggest-attribute=noreturn \
+ -Wsuggest-attribute=pure \
+ -Wswitch \
+ -Wswitch-default \
+ -Wsync-nand \
+ -Wsystem-headers \
+ -Wtrampolines \
+ -Wtrigraphs \
+ -Wtype-limits \
+ -Wuninitialized \
+ -Wunknown-pragmas \
+ -Wunsafe-loop-optimizations \
+ -Wunused \
+ -Wunused-but-set-parameter \
+ -Wunused-but-set-variable \
+ -Wunused-function \
+ -Wunused-label \
+ -Wunused-local-typedefs \
+ -Wunused-macros \
+ -Wunused-parameter \
+ -Wunused-result \
+ -Wunused-value \
+ -Wunused-variable \
+ -Wvarargs \
+ -Wvariadic-macros \
+ -Wvector-operation-performance \
+ -Wvla \
+ -Wvolatile-register-var \
+ -Wwrite-strings \
+ \
+ ; do
gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
done
+
+ # Disable specific options as needed.
+ if test "$gl_cv_cc_nomfi_needed" = yes; then
+ gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
+ fi
+
+ if test "$gl_cv_cc_uninitialized_supported" = no; then
+ gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
+ fi
+
ws=$gl_manywarn_set
@@ -6601,15 +7695,20 @@ fi
ws=$gl_warn_set
for w in $ws; do
- as_gl_Warn=`$as_echo "gl_cv_warn_$w" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles $w" >&5
-$as_echo_n "checking whether compiler handles $w... " >&6; }
-if eval "test \"\${$as_gl_Warn+set}\"" = set; then :
+
+as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
+gl_positive="$w"
+case $gl_positive in
+ -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
+$as_echo_n "checking whether C compiler handles $w... " >&6; }
+if eval \${$as_gl_Warn+:} false; then :
$as_echo_n "(cached) " >&6
else
- save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="${CPPFLAGS} $w"
+ gl_save_compiler_FLAGS="$CFLAGS"
+ as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6621,13 +7720,13 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"; then :
eval "$as_gl_Warn=yes"
else
eval "$as_gl_Warn=no"
fi
-rm -f conftest.err conftest.$ac_ext
- CPPFLAGS="$save_CPPFLAGS"
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$gl_save_compiler_FLAGS"
fi
eval ac_res=\$$as_gl_Warn
@@ -6637,16 +7736,21 @@ if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
as_fn_append WARN_CFLAGS " $w"
fi
+
done
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -fdiagnostics-show-option" >&5
-$as_echo_n "checking whether compiler handles -fdiagnostics-show-option... " >&6; }
-if test "${gl_cv_warn__fdiagnostics_show_option+set}" = set; then :
+ # Gnulib turns on -Wformat=2, which implies -Wformat-nonliteral, but
+ # we temporarily override it in format.c if possible.
+ if test $M4_cv_gcc_pragma_push_works = no; then
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
+$as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
+if ${gl_cv_warn_c__Wno_format_nonliteral+:} false; then :
$as_echo_n "(cached) " >&6
else
- save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="${CPPFLAGS} -fdiagnostics-show-option"
+ gl_save_compiler_FLAGS="$CFLAGS"
+ as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-nonliteral"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6658,29 +7762,69 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- gl_cv_warn__fdiagnostics_show_option=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_warn_c__Wno_format_nonliteral=yes
else
- gl_cv_warn__fdiagnostics_show_option=no
+ gl_cv_warn_c__Wno_format_nonliteral=no
fi
-rm -f conftest.err conftest.$ac_ext
- CPPFLAGS="$save_CPPFLAGS"
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$gl_save_compiler_FLAGS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__fdiagnostics_show_option" >&5
-$as_echo "$gl_cv_warn__fdiagnostics_show_option" >&6; }
-if test "x$gl_cv_warn__fdiagnostics_show_option" = x""yes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
+$as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
+if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes; then :
+ as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
+fi
+
+
+ fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
+$as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
+if ${gl_cv_warn_c__fdiagnostics_show_option+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ gl_save_compiler_FLAGS="$CFLAGS"
+ as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_warn_c__fdiagnostics_show_option=yes
+else
+ gl_cv_warn_c__fdiagnostics_show_option=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$gl_save_compiler_FLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
+$as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
+if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes; then :
as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -funit-at-a-time" >&5
-$as_echo_n "checking whether compiler handles -funit-at-a-time... " >&6; }
-if test "${gl_cv_warn__funit_at_a_time+set}" = set; then :
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
+$as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
+if ${gl_cv_warn_c__funit_at_a_time+:} false; then :
$as_echo_n "(cached) " >&6
else
- save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="${CPPFLAGS} -funit-at-a-time"
+ gl_save_compiler_FLAGS="$CFLAGS"
+ as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6692,18 +7836,18 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- gl_cv_warn__funit_at_a_time=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_warn_c__funit_at_a_time=yes
else
- gl_cv_warn__funit_at_a_time=no
+ gl_cv_warn_c__funit_at_a_time=no
fi
-rm -f conftest.err conftest.$ac_ext
- CPPFLAGS="$save_CPPFLAGS"
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$gl_save_compiler_FLAGS"
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__funit_at_a_time" >&5
-$as_echo "$gl_cv_warn__funit_at_a_time" >&6; }
-if test "x$gl_cv_warn__funit_at_a_time" = x""yes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
+$as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
+if test "x$gl_cv_warn_c__funit_at_a_time" = xyes; then :
as_fn_append WARN_CFLAGS " -funit-at-a-time"
fi
@@ -6711,7 +7855,6 @@ fi
-$as_echo "#define _FORTIFY_SOURCE 2" >>confdefs.h
fi
@@ -6721,7 +7864,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
$as_echo_n "checking for unsigned long long int... " >&6; }
-if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
+if ${ac_cv_type_unsigned_long_long_int+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_cv_type_unsigned_long_long_int=yes
@@ -6779,7 +7922,7 @@ $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
$as_echo_n "checking for long long int... " >&6; }
-if test "${ac_cv_type_long_long_int+set}" = set; then :
+if ${ac_cv_type_long_long_int+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_cv_type_long_long_int=yes
@@ -6838,7 +7981,7 @@ $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
$as_echo_n "checking for unsigned long long int... " >&6; }
-if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
+if ${ac_cv_type_unsigned_long_long_int+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_cv_type_unsigned_long_long_int=yes
@@ -6904,14 +8047,26 @@ fi
+
LIBC_FATAL_STDERR_=1
export LIBC_FATAL_STDERR_
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
$as_echo_n "checking for working alloca.h... " >&6; }
-if test "${ac_cv_working_alloca_h+set}" = set; then :
+if ${ac_cv_working_alloca_h+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6944,7 +8099,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
$as_echo_n "checking for alloca... " >&6; }
-if test "${ac_cv_func_alloca_works+set}" = set; then :
+if ${ac_cv_func_alloca_works+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6963,7 +8118,7 @@ else
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
+void *alloca (size_t);
# endif
# endif
# endif
@@ -7011,7 +8166,7 @@ $as_echo "#define C_ALLOCA 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
-if test "${ac_cv_os_cray+set}" = set; then :
+if ${ac_cv_os_cray+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -7052,7 +8207,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
$as_echo_n "checking stack direction for C alloca... " >&6; }
-if test "${ac_cv_c_stack_direction+set}" = set; then :
+if ${ac_cv_c_stack_direction+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
@@ -7062,23 +8217,20 @@ else
/* end confdefs.h. */
$ac_includes_default
int
-find_stack_direction ()
+find_stack_direction (int *addr, int depth)
{
- static char *addr = 0;
- auto char dummy;
- if (addr == 0)
- {
- addr = &dummy;
- return find_stack_direction ();
- }
- else
- return (&dummy > addr) ? 1 : -1;
+ int dir, dummy = 0;
+ if (! addr)
+ addr = &dummy;
+ *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
+ dir = depth ? find_stack_direction (addr, depth - 1) : 0;
+ return dir + dummy;
}
int
-main ()
+main (int argc, char **argv)
{
- return find_stack_direction () < 0;
+ return find_stack_direction (0, argc + !argv + 20) < 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
@@ -7196,7 +8348,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
-if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
+if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
$as_echo_n "(cached) " >&6
else
gl_cv_header_wchar_h_correct_inline=yes
@@ -7287,7 +8439,7 @@ done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
-if test "${am_cv_langinfo_codeset+set}" = set; then :
+if ${am_cv_langinfo_codeset+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -7323,7 +8475,7 @@ $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
$as_echo_n "checking for a traditional french locale... " >&6; }
-if test "${gt_cv_locale_fr+set}" = set; then :
+if ${gt_cv_locale_fr+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -7342,9 +8494,9 @@ char buf[16];
int main () {
/* Check whether the given locale name is recognized by the system. */
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Win32, setlocale(category, "") looks at the system settings,
+ /* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -7353,7 +8505,7 @@ int main () {
if (setlocale (LC_ALL, "") == NULL) return 1;
#endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -7379,10 +8531,12 @@ int main () {
one byte long. This excludes the UTF-8 encoding. */
t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
+#endif
return 0;
}
@@ -7400,7 +8554,7 @@ _ACEOF
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
mingw*)
- # Test for the native Win32 locale name.
+ # Test for the native Windows locale name.
if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_fr=French_France.1252
else
@@ -7410,7 +8564,7 @@ _ACEOF
;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the usual locale name.
@@ -7472,7 +8626,6 @@ done
-# for STACK_DIRECTION
@@ -7483,7 +8636,7 @@ done
FAULT_YIELDS_SIGBUS=1 ;;
hpux*) # HP-UX
FAULT_YIELDS_SIGBUS=1 ;;
- macos* | darwin*) # MacOS X
+ macos* | darwin*) # Mac OS X
FAULT_YIELDS_SIGBUS=1 ;;
gnu*) # Hurd
FAULT_YIELDS_SIGBUS=1 ;;
@@ -7498,7 +8651,7 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working C stack overflow detection" >&5
$as_echo_n "checking for working C stack overflow detection... " >&6; }
-if test "${ac_cv_sys_stack_overflow_works+set}" = set; then :
+if ${ac_cv_sys_stack_overflow_works+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
@@ -7612,7 +8765,7 @@ $as_echo "#define HAVE_STACK_OVERFLOW_HANDLING 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct stack_t interpretation" >&5
$as_echo_n "checking for correct stack_t interpretation... " >&6; }
-if test "${gl_cv_sigaltstack_low_base+set}" = set; then :
+if ${gl_cv_sigaltstack_low_base+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -7689,7 +8842,7 @@ $as_echo "#define SIGALTSTACK_SS_REVERSED 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for precise C stack overflow detection" >&5
$as_echo_n "checking for precise C stack overflow detection... " >&6; }
-if test "${ac_cv_sys_xsi_stack_overflow_heuristic+set}" = set; then :
+if ${ac_cv_sys_xsi_stack_overflow_heuristic+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
@@ -7851,6 +9004,7 @@ $as_echo "#define HAVE_XSI_STACK_OVERFLOW_HEURISTIC 1" >>confdefs.h
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
@@ -7870,11 +9024,12 @@ if test "${PATH_SEPARATOR+set}" != set; then
|| PATH_SEPARATOR=';'
}
fi
+
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
-$as_echo_n "checking for ld used by GCC... " >&6; }
+ { $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
@@ -7884,11 +9039,11 @@ $as_echo_n "checking for ld used by GCC... " >&6; }
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
+ # 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"
@@ -7909,27 +9064,30 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
$as_echo_n "checking for non-GNU ld... " >&6; }
fi
-if test "${acl_cv_path_LD+set}" = set; then :
+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-:}"
+ acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
+ IFS="$acl_save_ifs"
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
acl_cv_path_LD="$ac_dir/$ac_prog"
# Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
+ # but apparently some variants of GNU ld only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+ case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break ;;
+ test "$with_gnu_ld" != no && break
+ ;;
*)
- test "$with_gnu_ld" != yes && break ;;
+ test "$with_gnu_ld" != yes && break
+ ;;
esac
fi
done
- IFS="$ac_save_ifs"
+ IFS="$acl_save_ifs"
else
acl_cv_path_LD="$LD" # Let the user override the test with a path.
fi
@@ -7946,15 +9104,17 @@ fi
test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if test "${acl_cv_prog_gnu_ld+set}" = set; then :
+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.
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
case `$LD -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
- acl_cv_prog_gnu_ld=yes ;;
+ acl_cv_prog_gnu_ld=yes
+ ;;
*)
- acl_cv_prog_gnu_ld=no ;;
+ acl_cv_prog_gnu_ld=no
+ ;;
esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
@@ -7966,7 +9126,7 @@ 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 test "${acl_cv_rpath+set}" = set; then :
+if ${acl_cv_rpath+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -8004,7 +9164,7 @@ fi
solaris*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
$as_echo_n "checking for 64-bit host... " >&6; }
-if test "${gl_cv_solaris_64bit+set}" = set; then :
+if ${gl_cv_solaris_64bit+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -8555,7 +9715,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5
$as_echo_n "checking for libsigsegv... " >&6; }
-if test "${ac_cv_libsigsegv+set}" = set; then :
+if ${ac_cv_libsigsegv+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -8617,6 +9777,84 @@ $as_echo "$LIBSIGSEGV" >&6; }
+ GNULIB__EXIT=0;
+ GNULIB_ATOLL=0;
+ GNULIB_CALLOC_POSIX=0;
+ GNULIB_CANONICALIZE_FILE_NAME=0;
+ GNULIB_GETLOADAVG=0;
+ GNULIB_GETSUBOPT=0;
+ GNULIB_GRANTPT=0;
+ GNULIB_MALLOC_POSIX=0;
+ GNULIB_MBTOWC=0;
+ GNULIB_MKDTEMP=0;
+ GNULIB_MKOSTEMP=0;
+ GNULIB_MKOSTEMPS=0;
+ GNULIB_MKSTEMP=0;
+ GNULIB_MKSTEMPS=0;
+ GNULIB_POSIX_OPENPT=0;
+ GNULIB_PTSNAME=0;
+ GNULIB_PTSNAME_R=0;
+ GNULIB_PUTENV=0;
+ GNULIB_RANDOM=0;
+ GNULIB_RANDOM_R=0;
+ GNULIB_REALLOC_POSIX=0;
+ GNULIB_REALPATH=0;
+ GNULIB_RPMATCH=0;
+ GNULIB_SECURE_GETENV=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_SECURE_GETENV=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=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;
+
+
@@ -8626,7 +9864,7 @@ $as_echo "$LIBSIGSEGV" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
$as_echo_n "checking whether // is distinct from /... " >&6; }
-if test "${gl_cv_double_slash_root+set}" = set; then :
+if ${gl_cv_double_slash_root+:} false; then :
$as_echo_n "(cached) " >&6
else
if test x"$cross_compiling" = xyes ; then
@@ -8665,21 +9903,142 @@ $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
$as_echo_n "checking whether realpath works... " >&6; }
-if test "${gl_cv_func_realpath_works+set}" = set; then :
+if ${gl_cv_func_realpath_works+:} false; then :
$as_echo_n "(cached) " >&6
else
touch conftest.a
+ mkdir conftest.d
if test "$cross_compiling" = yes; then :
- gl_cv_func_realpath_works="guessing no"
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_realpath_works="guessing no" ;;
+ esac
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+
+#include <stdlib.h>
+#if defined __MACH__ && defined __APPLE__
+/* Avoid a crash on Mac OS X. */
+#include <mach/mach.h>
+#include <mach/mach_error.h>
+#include <mach/thread_status.h>
+#include <mach/exception.h>
+#include <mach/task.h>
+#include <pthread.h>
+/* 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 <windows.h>
+#include <winerror.h>
+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 <signal.h>
+/* 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 <stdlib.h>
+ #include <string.h>
int
main ()
@@ -8701,6 +10060,12 @@ main ()
if (name != NULL)
result |= 4;
}
+ {
+ char *name1 = realpath (".", NULL);
+ char *name2 = realpath ("conftest.d//./..", NULL);
+ if (strcmp (name1, name2) != 0)
+ result |= 8;
+ }
return result;
;
@@ -8717,15 +10082,18 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
+ rm -rf conftest.a conftest.d
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
$as_echo "$gl_cv_func_realpath_works" >&6; }
- if test "$gl_cv_func_realpath_works" = yes; then
+ case "$gl_cv_func_realpath_works" in
+ *yes)
$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
- fi
+ ;;
+ esac
@@ -8737,75 +10105,10 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
- GNULIB__EXIT=0;
- GNULIB_ATOLL=0;
- GNULIB_CALLOC_POSIX=0;
- GNULIB_CANONICALIZE_FILE_NAME=0;
- GNULIB_GETLOADAVG=0;
- GNULIB_GETSUBOPT=0;
- GNULIB_GRANTPT=0;
- GNULIB_MALLOC_POSIX=0;
- GNULIB_MBTOWC=0;
- GNULIB_MKDTEMP=0;
- GNULIB_MKOSTEMP=0;
- GNULIB_MKOSTEMPS=0;
- GNULIB_MKSTEMP=0;
- GNULIB_MKSTEMPS=0;
- GNULIB_PTSNAME=0;
- GNULIB_PUTENV=0;
- GNULIB_RANDOM_R=0;
- GNULIB_REALLOC_POSIX=0;
- GNULIB_REALPATH=0;
- GNULIB_RPMATCH=0;
- GNULIB_SETENV=0;
- GNULIB_STRTOD=0;
- GNULIB_STRTOLL=0;
- GNULIB_STRTOULL=0;
- GNULIB_SYSTEM_POSIX=0;
- GNULIB_UNLOCKPT=0;
- GNULIB_UNSETENV=0;
- GNULIB_WCTOMB=0;
- HAVE__EXIT=1;
- HAVE_ATOLL=1;
- HAVE_CANONICALIZE_FILE_NAME=1;
- HAVE_DECL_GETLOADAVG=1;
- HAVE_GETSUBOPT=1;
- HAVE_GRANTPT=1;
- HAVE_MKDTEMP=1;
- HAVE_MKOSTEMP=1;
- HAVE_MKOSTEMPS=1;
- HAVE_MKSTEMP=1;
- HAVE_MKSTEMPS=1;
- HAVE_PTSNAME=1;
- HAVE_RANDOM_H=1;
- HAVE_RANDOM_R=1;
- HAVE_REALPATH=1;
- HAVE_RPMATCH=1;
- HAVE_SETENV=1;
- HAVE_DECL_SETENV=1;
- HAVE_STRTOD=1;
- HAVE_STRTOLL=1;
- HAVE_STRTOULL=1;
- HAVE_STRUCT_RANDOM_DATA=1;
- HAVE_SYS_LOADAVG_H=0;
- HAVE_UNLOCKPT=1;
- HAVE_DECL_UNSETENV=1;
- REPLACE_CALLOC=0;
- REPLACE_CANONICALIZE_FILE_NAME=0;
- REPLACE_MALLOC=0;
- REPLACE_MBTOWC=0;
- REPLACE_MKSTEMP=0;
- REPLACE_PUTENV=0;
- REPLACE_REALLOC=0;
- REPLACE_REALPATH=0;
- REPLACE_SETENV=0;
- REPLACE_STRTOD=0;
- REPLACE_UNSETENV=0;
- REPLACE_WCTOMB=0;
-
-
+ GNULIB_CHDIR=0;
GNULIB_CHOWN=0;
GNULIB_CLOSE=0;
+ GNULIB_DUP=0;
GNULIB_DUP2=0;
GNULIB_DUP3=0;
GNULIB_ENVIRON=0;
@@ -8813,6 +10116,7 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
GNULIB_FACCESSAT=0;
GNULIB_FCHDIR=0;
GNULIB_FCHOWNAT=0;
+ GNULIB_FDATASYNC=0;
GNULIB_FSYNC=0;
GNULIB_FTRUNCATE=0;
GNULIB_GETCWD=0;
@@ -8824,6 +10128,8 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
GNULIB_GETLOGIN_R=0;
GNULIB_GETPAGESIZE=0;
GNULIB_GETUSERSHELL=0;
+ GNULIB_GROUP_MEMBER=0;
+ GNULIB_ISATTY=0;
GNULIB_LCHOWN=0;
GNULIB_LINK=0;
GNULIB_LINKAT=0;
@@ -8832,14 +10138,16 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
GNULIB_PIPE2=0;
GNULIB_PREAD=0;
GNULIB_PWRITE=0;
+ GNULIB_READ=0;
GNULIB_READLINK=0;
GNULIB_READLINKAT=0;
GNULIB_RMDIR=0;
+ GNULIB_SETHOSTNAME=0;
GNULIB_SLEEP=0;
GNULIB_SYMLINK=0;
GNULIB_SYMLINKAT=0;
GNULIB_TTYNAME_R=0;
- GNULIB_UNISTD_H_GETOPT=0;
+ GNULIB_UNISTD_H_NONBLOCKING=0;
GNULIB_UNISTD_H_SIGPIPE=0;
GNULIB_UNLINK=0;
GNULIB_UNLINKAT=0;
@@ -8852,6 +10160,7 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
HAVE_FACCESSAT=1;
HAVE_FCHDIR=1;
HAVE_FCHOWNAT=1;
+ HAVE_FDATASYNC=1;
HAVE_FSYNC=1;
HAVE_FTRUNCATE=1;
HAVE_GETDTABLESIZE=1;
@@ -8859,6 +10168,7 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
HAVE_GETHOSTNAME=1;
HAVE_GETLOGIN=1;
HAVE_GETPAGESIZE=1;
+ HAVE_GROUP_MEMBER=1;
HAVE_LCHOWN=1;
HAVE_LINK=1;
HAVE_LINKAT=1;
@@ -8868,6 +10178,7 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
HAVE_PWRITE=1;
HAVE_READLINK=1;
HAVE_READLINKAT=1;
+ HAVE_SETHOSTNAME=1;
HAVE_SLEEP=1;
HAVE_SYMLINK=1;
HAVE_SYMLINKAT=1;
@@ -8875,10 +10186,12 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
HAVE_USLEEP=1;
HAVE_DECL_ENVIRON=1;
HAVE_DECL_FCHDIR=1;
+ HAVE_DECL_FDATASYNC=1;
HAVE_DECL_GETDOMAINNAME=1;
HAVE_DECL_GETLOGIN_R=1;
HAVE_DECL_GETPAGESIZE=1;
HAVE_DECL_GETUSERSHELL=1;
+ HAVE_DECL_SETHOSTNAME=1;
HAVE_DECL_TTYNAME_R=1;
HAVE_OS_H=0;
HAVE_SYS_PARAM_H=0;
@@ -8887,17 +10200,20 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
REPLACE_DUP=0;
REPLACE_DUP2=0;
REPLACE_FCHOWNAT=0;
+ REPLACE_FTRUNCATE=0;
REPLACE_GETCWD=0;
REPLACE_GETDOMAINNAME=0;
REPLACE_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;
@@ -8915,34 +10231,17 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
+ if test $ac_cv_func__set_invalid_parameter_handler = yes; then
+ HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
+$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
+ else
+ HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
+ fi
- M4_LIBOBJS="$M4_LIBOBJS basename-lgpl.$ac_objext"
-
-
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS dirname-lgpl.$ac_objext"
-
-
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS stripslash.$ac_objext"
-
-
@@ -8957,13 +10256,18 @@ $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
$as_echo_n "checking if environ is properly declared... " >&6; }
- if test "${gt_cv_var_environ_declaration+set}" = set; then :
+ if ${gt_cv_var_environ_declaration+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <unistd.h>
+#if HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif
+ /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
+ #include <stdlib.h>
+
extern struct { int foo; } environ;
int
main ()
@@ -8998,7 +10302,7 @@ $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
-if test "${gl_cv_have_include_next+set}" = set; then :
+if ${gl_cv_have_include_next+:} false; then :
$as_echo_n "(cached) " >&6
else
rm -rf conftestd1a conftestd1b conftestd2
@@ -9078,7 +10382,7 @@ $as_echo "$gl_cv_have_include_next" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
$as_echo_n "checking whether system header files limit the line length... " >&6; }
-if test "${gl_cv_pragma_columns+set}" = set; then :
+if ${gl_cv_pragma_columns+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -9112,7 +10416,7 @@ $as_echo "$gl_cv_pragma_columns" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
$as_echo_n "checking for complete errno.h... " >&6; }
-if test "${gl_cv_header_errno_h_complete+set}" = set; then :
+if ${gl_cv_header_errno_h_complete+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -9120,6 +10424,9 @@ else
/* end confdefs.h. */
#include <errno.h>
+#if !defined ETXTBSY
+booboo
+#endif
#if !defined ENOMSG
booboo
#endif
@@ -9144,6 +10451,12 @@ booboo
#if !defined ENOTSUP
booboo
#endif
+#if !defined ENETRESET
+booboo
+#endif
+#if !defined ECONNABORTED
+booboo
+#endif
#if !defined ESTALE
booboo
#endif
@@ -9153,6 +10466,15 @@ booboo
#if !defined ECANCELED
booboo
#endif
+#if !defined EOWNERDEAD
+booboo
+#endif
+#if !defined ENOTRECOVERABLE
+booboo
+#endif
+#if !defined EILSEQ
+booboo
+#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
@@ -9183,7 +10505,7 @@ $as_echo "$gl_cv_header_errno_h_complete" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
$as_echo_n "checking absolute name of <errno.h>... " >&6; }
-if test "${gl_cv_next_errno_h+set}" = set; then :
+if ${gl_cv_next_errno_h+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -9196,13 +10518,27 @@ _ACEOF
aix*) gl_absname_cpp="$ac_cpp -C" ;;
*) gl_absname_cpp="$ac_cpp" ;;
esac
+
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+ gl_header_literal_regex=`echo 'errno.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n '\#/errno.h#{
- s#.*"\(.*/errno.h\)".*#\1#
- s#^/[^/]#//&#
- p
- q
- }'`'"'
+ sed -n "$gl_absolute_header_sed"`'"'
fi
@@ -9226,11 +10562,19 @@ $as_echo "$gl_cv_next_errno_h" >&6; }
ERRNO_H='errno.h'
fi
+ if test -n "$ERRNO_H"; then
+ GL_GENERATE_ERRNO_H_TRUE=
+ GL_GENERATE_ERRNO_H_FALSE='#'
+else
+ GL_GENERATE_ERRNO_H_TRUE='#'
+ GL_GENERATE_ERRNO_H_FALSE=
+fi
+
if test -n "$ERRNO_H"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
$as_echo_n "checking for EMULTIHOP value... " >&6; }
-if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
+if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -9301,7 +10645,7 @@ $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
if test -n "$ERRNO_H"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
$as_echo_n "checking for ENOLINK value... " >&6; }
-if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
+if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -9372,7 +10716,7 @@ $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
if test -n "$ERRNO_H"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
$as_echo_n "checking for EOVERFLOW value... " >&6; }
-if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
+if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -9441,7 +10785,7 @@ $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strerror_r" = x""yes; then :
+if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -9454,7 +10798,7 @@ _ACEOF
for ac_func in strerror_r
do :
ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
-if test "x$ac_cv_func_strerror_r" = x""yes; then :
+if test "x$ac_cv_func_strerror_r" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STRERROR_R 1
_ACEOF
@@ -9464,7 +10808,7 @@ done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
$as_echo_n "checking whether strerror_r returns char *... " >&6; }
-if test "${ac_cv_func_strerror_r_char_p+set}" = set; then :
+if ${ac_cv_func_strerror_r_char_p+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -9532,53 +10876,8 @@ $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
-$as_echo_n "checking for inline... " >&6; }
-if test "${ac_cv_c_inline+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifndef __cplusplus
-typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
-#endif
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_c_inline=$ac_kw
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- test "$ac_cv_c_inline" != no && break
-done
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
-$as_echo "$ac_cv_c_inline" >&6; }
-
-case $ac_cv_c_inline in
- inline | yes) ;;
- *)
- case $ac_cv_c_inline in
- no) ac_val=;;
- *) ac_val=$ac_cv_c_inline;;
- esac
- cat >>confdefs.h <<_ACEOF
-#ifndef __cplusplus
-#define inline $ac_val
-#endif
-_ACEOF
- ;;
-esac
-
-
- XGETTEXT_EXTRA_OPTIONS=
-
ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
-if test "x$ac_cv_type_mode_t" = x""yes; then :
+if test "x$ac_cv_type_mode_t" = xyes; then :
else
@@ -9589,9 +10888,12 @@ _ACEOF
fi
+
+
+
ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
"
-if test "x$ac_cv_type_sig_atomic_t" = x""yes; then :
+if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SIG_ATOMIC_T 1
@@ -9608,23 +10910,31 @@ 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;
@@ -9635,11 +10945,15 @@ fi
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;
@@ -9658,11 +10972,14 @@ fi
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;
@@ -9683,6 +11000,7 @@ fi
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;
@@ -9694,6 +11012,7 @@ fi
GNULIB_FCNTL=0;
+ GNULIB_NONBLOCKING=0;
GNULIB_OPEN=0;
GNULIB_OPENAT=0;
HAVE_FCNTL=1;
@@ -9704,9 +11023,16 @@ fi
+
+
+
+
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
$as_echo_n "checking for working fcntl.h... " >&6; }
-if test "${gl_cv_header_working_fcntl_h+set}" = set; then :
+if ${gl_cv_header_working_fcntl_h+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
@@ -9716,7 +11042,13 @@ else
/* end confdefs.h. */
#include <sys/types.h>
#include <sys/stat.h>
- #include <unistd.h>
+ #if HAVE_UNISTD_H
+ # include <unistd.h>
+ #else /* on Windows with MSVC */
+ # include <io.h>
+ # include <stdlib.h>
+ # defined sleep(n) _sleep ((n) * 1000)
+ #endif
#include <fcntl.h>
#ifndef O_NOATIME
#define O_NOATIME 0
@@ -9735,9 +11067,21 @@ main ()
{
int result = !constants;
+ #if HAVE_SYMLINK
{
static char const sym[] = "conftest.sym";
- if (symlink (".", sym) != 0)
+ if (symlink ("/dev/null", sym) != 0)
+ result |= 2;
+ else
+ {
+ int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
+ if (fd >= 0)
+ {
+ close (fd);
+ result |= 4;
+ }
+ }
+ if (unlink (sym) != 0 || symlink (".", sym) != 0)
result |= 2;
else
{
@@ -9750,6 +11094,7 @@ main ()
}
unlink (sym);
}
+ #endif
{
static char const file[] = "confdefs.h";
int fd = open (file, O_RDONLY | O_NOATIME);
@@ -9826,40 +11171,16 @@ cat >>confdefs.h <<_ACEOF
_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 :
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
-$as_echo_n "checking for fseeko... " >&6; }
-if test "${gl_cv_func_fseeko+set}" = set; then :
- $as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdio.h>
-
-int
-main ()
-{
-fseeko (stdin, 0, 0);
- ;
- return 0;
-}
+cat >>confdefs.h <<_ACEOF
+#define pid_t int
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- gl_cv_func_fseeko=yes
-else
- gl_cv_func_fseeko=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
-$as_echo "$gl_cv_func_fseeko" >&6; }
@@ -9872,79 +11193,193 @@ $as_echo "$gl_cv_func_fseeko" >&6; }
- M4_LIBOBJS="$M4_LIBOBJS filenamecat-lgpl.$ac_objext"
-
-
-
-
-
-
-
-
-
-
+ GNULIB_ACOSF=0;
GNULIB_ACOSL=0;
+ GNULIB_ASINF=0;
GNULIB_ASINL=0;
+ GNULIB_ATANF=0;
GNULIB_ATANL=0;
+ GNULIB_ATAN2F=0;
+ GNULIB_CBRT=0;
+ GNULIB_CBRTF=0;
+ GNULIB_CBRTL=0;
GNULIB_CEIL=0;
GNULIB_CEILF=0;
GNULIB_CEILL=0;
+ GNULIB_COPYSIGN=0;
+ GNULIB_COPYSIGNF=0;
+ GNULIB_COPYSIGNL=0;
+ GNULIB_COSF=0;
GNULIB_COSL=0;
+ GNULIB_COSHF=0;
+ GNULIB_EXPF=0;
GNULIB_EXPL=0;
+ GNULIB_EXP2=0;
+ GNULIB_EXP2F=0;
+ GNULIB_EXP2L=0;
+ GNULIB_EXPM1=0;
+ GNULIB_EXPM1F=0;
+ GNULIB_EXPM1L=0;
+ GNULIB_FABSF=0;
+ GNULIB_FABSL=0;
GNULIB_FLOOR=0;
GNULIB_FLOORF=0;
GNULIB_FLOORL=0;
+ GNULIB_FMA=0;
+ GNULIB_FMAF=0;
+ GNULIB_FMAL=0;
+ GNULIB_FMOD=0;
+ GNULIB_FMODF=0;
+ GNULIB_FMODL=0;
+ GNULIB_FREXPF=0;
GNULIB_FREXP=0;
GNULIB_FREXPL=0;
+ GNULIB_HYPOT=0;
+ GNULIB_HYPOTF=0;
+ GNULIB_HYPOTL=0;
+ GNULIB_ILOGB=0;
+ GNULIB_ILOGBF=0;
+ GNULIB_ILOGBL=0;
GNULIB_ISFINITE=0;
GNULIB_ISINF=0;
GNULIB_ISNAN=0;
GNULIB_ISNANF=0;
GNULIB_ISNAND=0;
GNULIB_ISNANL=0;
+ GNULIB_LDEXPF=0;
GNULIB_LDEXPL=0;
- GNULIB_LOGB=0;
+ GNULIB_LOG=0;
+ GNULIB_LOGF=0;
GNULIB_LOGL=0;
+ GNULIB_LOG10=0;
+ GNULIB_LOG10F=0;
+ GNULIB_LOG10L=0;
+ GNULIB_LOG1P=0;
+ GNULIB_LOG1PF=0;
+ GNULIB_LOG1PL=0;
+ GNULIB_LOG2=0;
+ GNULIB_LOG2F=0;
+ GNULIB_LOG2L=0;
+ GNULIB_LOGB=0;
+ GNULIB_LOGBF=0;
+ GNULIB_LOGBL=0;
+ GNULIB_MODF=0;
+ GNULIB_MODFF=0;
+ GNULIB_MODFL=0;
+ GNULIB_POWF=0;
+ GNULIB_REMAINDER=0;
+ GNULIB_REMAINDERF=0;
+ GNULIB_REMAINDERL=0;
+ GNULIB_RINT=0;
+ GNULIB_RINTF=0;
+ GNULIB_RINTL=0;
GNULIB_ROUND=0;
GNULIB_ROUNDF=0;
GNULIB_ROUNDL=0;
GNULIB_SIGNBIT=0;
+ GNULIB_SINF=0;
GNULIB_SINL=0;
+ GNULIB_SINHF=0;
+ GNULIB_SQRTF=0;
GNULIB_SQRTL=0;
+ GNULIB_TANF=0;
GNULIB_TANL=0;
+ GNULIB_TANHF=0;
GNULIB_TRUNC=0;
GNULIB_TRUNCF=0;
GNULIB_TRUNCL=0;
- HAVE_ACOSL=1;
+ HAVE_ACOSF=1;
+ HAVE_ACOSL=1;
+ HAVE_ASINF=1;
HAVE_ASINL=1;
+ HAVE_ATANF=1;
HAVE_ATANL=1;
+ HAVE_ATAN2F=1;
+ HAVE_CBRT=1;
+ HAVE_CBRTF=1;
+ HAVE_CBRTL=1;
+ HAVE_COPYSIGN=1;
+ HAVE_COPYSIGNL=1;
+ HAVE_COSF=1;
HAVE_COSL=1;
+ HAVE_COSHF=1;
+ HAVE_EXPF=1;
HAVE_EXPL=1;
+ HAVE_EXPM1=1;
+ HAVE_EXPM1F=1;
+ HAVE_FABSF=1;
+ HAVE_FABSL=1;
+ HAVE_FMA=1;
+ HAVE_FMAF=1;
+ HAVE_FMAL=1;
+ HAVE_FMODF=1;
+ HAVE_FMODL=1;
+ HAVE_FREXPF=1;
+ HAVE_HYPOTF=1;
+ HAVE_HYPOTL=1;
+ HAVE_ILOGB=1;
+ HAVE_ILOGBF=1;
+ HAVE_ILOGBL=1;
HAVE_ISNANF=1;
HAVE_ISNAND=1;
HAVE_ISNANL=1;
+ HAVE_LDEXPF=1;
+ HAVE_LOGF=1;
HAVE_LOGL=1;
+ HAVE_LOG10F=1;
+ HAVE_LOG10L=1;
+ HAVE_LOG1P=1;
+ HAVE_LOG1PF=1;
+ HAVE_LOG1PL=1;
+ HAVE_LOGBF=1;
+ HAVE_LOGBL=1;
+ HAVE_MODFF=1;
+ HAVE_MODFL=1;
+ HAVE_POWF=1;
+ HAVE_REMAINDER=1;
+ HAVE_REMAINDERF=1;
+ HAVE_RINT=1;
+ HAVE_RINTL=1;
+ HAVE_SINF=1;
HAVE_SINL=1;
+ HAVE_SINHF=1;
+ HAVE_SQRTF=1;
HAVE_SQRTL=1;
+ HAVE_TANF=1;
HAVE_TANL=1;
+ HAVE_TANHF=1;
HAVE_DECL_ACOSL=1;
HAVE_DECL_ASINL=1;
HAVE_DECL_ATANL=1;
+ HAVE_DECL_CBRTF=1;
+ HAVE_DECL_CBRTL=1;
HAVE_DECL_CEILF=1;
HAVE_DECL_CEILL=1;
+ HAVE_DECL_COPYSIGNF=1;
HAVE_DECL_COSL=1;
HAVE_DECL_EXPL=1;
+ HAVE_DECL_EXP2=1;
+ HAVE_DECL_EXP2F=1;
+ HAVE_DECL_EXP2L=1;
+ HAVE_DECL_EXPM1L=1;
HAVE_DECL_FLOORF=1;
HAVE_DECL_FLOORL=1;
HAVE_DECL_FREXPL=1;
HAVE_DECL_LDEXPL=1;
- HAVE_DECL_LOGB=1;
HAVE_DECL_LOGL=1;
+ HAVE_DECL_LOG10L=1;
+ HAVE_DECL_LOG2=1;
+ HAVE_DECL_LOG2F=1;
+ HAVE_DECL_LOG2L=1;
+ HAVE_DECL_LOGB=1;
+ HAVE_DECL_REMAINDER=1;
+ HAVE_DECL_REMAINDERL=1;
+ HAVE_DECL_RINTF=1;
HAVE_DECL_ROUND=1;
HAVE_DECL_ROUNDF=1;
HAVE_DECL_ROUNDL=1;
@@ -9954,25 +11389,66 @@ $as_echo "$gl_cv_func_fseeko" >&6; }
HAVE_DECL_TRUNC=1;
HAVE_DECL_TRUNCF=1;
HAVE_DECL_TRUNCL=1;
+ REPLACE_CBRTF=0;
+ REPLACE_CBRTL=0;
REPLACE_CEIL=0;
REPLACE_CEILF=0;
REPLACE_CEILL=0;
+ REPLACE_EXPM1=0;
+ REPLACE_EXPM1F=0;
+ REPLACE_EXP2=0;
+ REPLACE_EXP2L=0;
+ REPLACE_FABSL=0;
REPLACE_FLOOR=0;
REPLACE_FLOORF=0;
REPLACE_FLOORL=0;
+ REPLACE_FMA=0;
+ REPLACE_FMAF=0;
+ REPLACE_FMAL=0;
+ REPLACE_FMOD=0;
+ REPLACE_FMODF=0;
+ REPLACE_FMODL=0;
+ REPLACE_FREXPF=0;
REPLACE_FREXP=0;
REPLACE_FREXPL=0;
REPLACE_HUGE_VAL=0;
+ REPLACE_HYPOT=0;
+ REPLACE_HYPOTF=0;
+ REPLACE_HYPOTL=0;
+ REPLACE_ILOGB=0;
+ REPLACE_ILOGBF=0;
REPLACE_ISFINITE=0;
REPLACE_ISINF=0;
REPLACE_ISNAN=0;
REPLACE_LDEXPL=0;
+ REPLACE_LOG=0;
+ REPLACE_LOGF=0;
+ REPLACE_LOGL=0;
+ REPLACE_LOG10=0;
+ REPLACE_LOG10F=0;
+ REPLACE_LOG10L=0;
+ REPLACE_LOG1P=0;
+ REPLACE_LOG1PF=0;
+ REPLACE_LOG1PL=0;
+ REPLACE_LOG2=0;
+ REPLACE_LOG2F=0;
+ REPLACE_LOG2L=0;
+ REPLACE_LOGB=0;
+ REPLACE_LOGBF=0;
+ REPLACE_LOGBL=0;
+ REPLACE_MODF=0;
+ REPLACE_MODFF=0;
+ REPLACE_MODFL=0;
REPLACE_NAN=0;
+ REPLACE_REMAINDER=0;
+ REPLACE_REMAINDERF=0;
+ REPLACE_REMAINDERL=0;
REPLACE_ROUND=0;
REPLACE_ROUNDF=0;
REPLACE_ROUNDL=0;
REPLACE_SIGNBIT=0;
REPLACE_SIGNBIT_USING_GCC=0;
+ REPLACE_SQRTL=0;
REPLACE_TRUNC=0;
REPLACE_TRUNCF=0;
REPLACE_TRUNCL=0;
@@ -9980,7 +11456,7 @@ $as_echo "$gl_cv_func_fseeko" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
$as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
-if test "${gl_cv_func_frexp_no_libm+set}" = set; then :
+if ${gl_cv_func_frexp_no_libm+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -10008,10 +11484,63 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
+ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
+if test "x$ac_cv_have_decl_alarm" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ALARM $ac_have_decl
+_ACEOF
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
+$as_echo_n "checking whether long double and double are the same... " >&6; }
+if ${gl_cv_long_double_equals_double+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <float.h>
+int
+main ()
+{
+typedef int check[sizeof (long double) == sizeof (double)
+ && LDBL_MANT_DIG == DBL_MANT_DIG
+ && LDBL_MAX_EXP == DBL_MAX_EXP
+ && LDBL_MIN_EXP == DBL_MIN_EXP
+ ? 1 : -1];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_long_double_equals_double=yes
+else
+ gl_cv_long_double_equals_double=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
+$as_echo "$gl_cv_long_double_equals_double" >&6; }
+ if test $gl_cv_long_double_equals_double = yes; then
+
+$as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
+
+ HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
+ else
+ HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
+ fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
$as_echo_n "checking whether stdin defaults to large file offsets... " >&6; }
-if test "${gl_cv_var_stdin_large_offset+set}" = set; then :
+if ${gl_cv_var_stdin_large_offset+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -10044,8 +11573,137 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
$as_echo "$gl_cv_var_stdin_large_offset" >&6; }
+
+
+
+
+ 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 <sys/types.h>
+ 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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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 <sys/types.h>" >&5
+$as_echo_n "checking absolute name of <sys/types.h>... " >&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 <sys/types.h>
+
+_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
+
+
+
+
+
+
+
+
+
+
+
ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
-if test "x$ac_cv_have_decl_fseeko" = x""yes; then :
+if test "x$ac_cv_have_decl_fseeko" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -10055,8 +11713,341 @@ cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_FSEEKO $ac_have_decl
_ACEOF
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
+$as_echo_n "checking for fseeko... " >&6; }
+if ${gl_cv_func_fseeko+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+
+int
+main ()
+{
+fseeko (stdin, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_fseeko=yes
+else
+ gl_cv_func_fseeko=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
+$as_echo "$gl_cv_func_fseeko" >&6; }
+
+
+ if test $ac_cv_have_decl_fseeko = no; then
+ HAVE_DECL_FSEEKO=0
+ fi
+
+ if test $gl_cv_func_fseeko = no; then
+ HAVE_FSEEKO=0
+ else
+ if test $WINDOWS_64_BIT_OFF_T = 1; then
+ REPLACE_FSEEKO=1
+ fi
+ if test $gl_cv_var_stdin_large_offset = no; then
+ REPLACE_FSEEKO=1
+ fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
+$as_echo_n "checking whether fflush works on input streams... " >&6; }
+if ${gl_cv_func_fflush_stdin+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ echo hello world > conftest.txt
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_fflush_stdin=cross
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#else /* on Windows with MSVC */
+# include <io.h>
+#endif
+
+int
+main ()
+{
+FILE *f = fopen ("conftest.txt", "r");
+ char buffer[10];
+ int fd;
+ int c;
+ if (f == NULL)
+ return 1;
+ fd = fileno (f);
+ if (fd < 0 || fread (buffer, 1, 5, f) != 5)
+ return 2;
+ /* For deterministic results, ensure f read a bigger buffer. */
+ if (lseek (fd, 0, SEEK_CUR) == 5)
+ return 3;
+ /* POSIX requires fflush-fseek to set file offset of fd. This fails
+ on BSD systems and on mingw. */
+ if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
+ return 4;
+ if (lseek (fd, 0, SEEK_CUR) != 5)
+ return 5;
+ /* Verify behaviour of fflush after ungetc. See
+ <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
+ /* Verify behaviour of fflush after a backup ungetc. This fails on
+ mingw. */
+ c = fgetc (f);
+ ungetc (c, f);
+ fflush (f);
+ if (fgetc (f) != c)
+ return 6;
+ /* Verify behaviour of fflush after a non-backup ungetc. This fails
+ on glibc 2.8 and on BSD systems. */
+ c = fgetc (f);
+ ungetc ('@', f);
+ fflush (f);
+ if (fgetc (f) != c)
+ return 7;
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_fflush_stdin=yes
+else
+ gl_cv_func_fflush_stdin=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm conftest.txt
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
+$as_echo "$gl_cv_func_fflush_stdin" >&6; }
+ case $gl_cv_func_fflush_stdin in
+ yes) gl_func_fflush_stdin=1 ;;
+ no) gl_func_fflush_stdin=0 ;;
+ *) gl_func_fflush_stdin='(-1)' ;;
+ esac
+
+cat >>confdefs.h <<_ACEOF
+#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
+_ACEOF
+
+
+ if test $gl_cv_func_fflush_stdin != yes; then
+ REPLACE_FSEEKO=1
+ fi
+
+ fi
+
+
+ GNULIB_FCHMODAT=0;
+ GNULIB_FSTAT=0;
+ GNULIB_FSTATAT=0;
+ GNULIB_FUTIMENS=0;
+ GNULIB_LCHMOD=0;
+ GNULIB_LSTAT=0;
+ GNULIB_MKDIRAT=0;
+ GNULIB_MKFIFO=0;
+ GNULIB_MKFIFOAT=0;
+ GNULIB_MKNOD=0;
+ GNULIB_MKNODAT=0;
+ GNULIB_STAT=0;
+ GNULIB_UTIMENSAT=0;
+ HAVE_FCHMODAT=1;
+ HAVE_FSTATAT=1;
+ HAVE_FUTIMENS=1;
+ HAVE_LCHMOD=1;
+ HAVE_LSTAT=1;
+ HAVE_MKDIRAT=1;
+ HAVE_MKFIFO=1;
+ HAVE_MKFIFOAT=1;
+ HAVE_MKNOD=1;
+ HAVE_MKNODAT=1;
+ HAVE_UTIMENSAT=1;
+ REPLACE_FSTAT=0;
+ REPLACE_FSTATAT=0;
+ REPLACE_FUTIMENS=0;
+ REPLACE_LSTAT=0;
+ REPLACE_MKDIR=0;
+ REPLACE_MKFIFO=0;
+ REPLACE_MKNOD=0;
+ REPLACE_STAT=0;
+ REPLACE_UTIMENSAT=0;
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
+$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
+if ${ac_cv_header_stat_broken+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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 <sys/stat.h>" >&5
+$as_echo_n "checking absolute name of <sys/stat.h>... " >&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 <sys/stat.h>
+
+_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 <sys/types.h>
+ #include <sys/stat.h>
+"
+if test "x$ac_cv_type_nlink_t" = xyes; then :
+
+else
+
+$as_echo "#define nlink_t int" >>confdefs.h
+
+fi
+
+
+
+
ac_fn_c_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default"
-if test "x$ac_cv_have_decl_ftello" = x""yes; then :
+if test "x$ac_cv_have_decl_ftello" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -10075,6 +12066,159 @@ _ACEOF
+ if test $ac_cv_have_decl_ftello = no; then
+ HAVE_DECL_FTELLO=0
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
+$as_echo_n "checking for ftello... " >&6; }
+if ${gl_cv_func_ftello+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+ftello (stdin);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_ftello=yes
+else
+ gl_cv_func_ftello=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
+$as_echo "$gl_cv_func_ftello" >&6; }
+ if test $gl_cv_func_ftello = no; then
+ HAVE_FTELLO=0
+ else
+ if test $WINDOWS_64_BIT_OFF_T = 1; then
+ REPLACE_FTELLO=1
+ fi
+ if test $gl_cv_var_stdin_large_offset = no; then
+ REPLACE_FTELLO=1
+ fi
+ if test $REPLACE_FTELLO = 0; then
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
+$as_echo_n "checking whether ftello works... " >&6; }
+if ${gl_cv_func_ftello_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on Solaris.
+ solaris*) gl_cv_func_ftello_works="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_ftello_works="guessing yes" ;;
+ esac
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#define TESTFILE "conftest.tmp"
+int
+main (void)
+{
+ FILE *fp;
+
+ /* Create a file with some contents. */
+ fp = fopen (TESTFILE, "w");
+ if (fp == NULL)
+ return 70;
+ if (fwrite ("foogarsh", 1, 8, fp) < 8)
+ return 71;
+ if (fclose (fp))
+ return 72;
+
+ /* The file's contents is now "foogarsh". */
+
+ /* Try writing after reading to EOF. */
+ fp = fopen (TESTFILE, "r+");
+ if (fp == NULL)
+ return 73;
+ if (fseek (fp, -1, SEEK_END))
+ return 74;
+ if (!(getc (fp) == 'h'))
+ return 1;
+ if (!(getc (fp) == EOF))
+ return 2;
+ if (!(ftell (fp) == 8))
+ return 3;
+ if (!(ftell (fp) == 8))
+ return 4;
+ if (!(putc ('!', fp) == '!'))
+ return 5;
+ if (!(ftell (fp) == 9))
+ return 6;
+ if (!(fclose (fp) == 0))
+ return 7;
+ fp = fopen (TESTFILE, "r");
+ if (fp == NULL)
+ return 75;
+ {
+ char buf[10];
+ if (!(fread (buf, 1, 10, fp) == 9))
+ return 10;
+ if (!(memcmp (buf, "foogarsh!", 9) == 0))
+ return 11;
+ }
+ if (!(fclose (fp) == 0))
+ return 12;
+
+ /* The file's contents is now "foogarsh!". */
+
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_ftello_works=yes
+else
+ gl_cv_func_ftello_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
+$as_echo "$gl_cv_func_ftello_works" >&6; }
+ case "$gl_cv_func_ftello_works" in
+ *yes) ;;
+ *)
+ REPLACE_FTELLO=1
+
+$as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
+
+ ;;
+ esac
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
@@ -10088,7 +12232,7 @@ _ACEOF
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
$as_echo_n "checking absolute name of <getopt.h>... " >&6; }
-if test "${gl_cv_next_getopt_h+set}" = set; then :
+if ${gl_cv_next_getopt_h+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -10104,13 +12248,27 @@ _ACEOF
aix*) gl_absname_cpp="$ac_cpp -C" ;;
*) gl_absname_cpp="$ac_cpp" ;;
esac
+
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+ gl_header_literal_regex=`echo 'getopt.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n '\#/getopt.h#{
- s#.*"\(.*/getopt.h\)".*#\1#
- s#^/[^/]#//&#
- p
- q
- }'`'"'
+ sed -n "$gl_absolute_header_sed"`'"'
else
gl_cv_next_getopt_h='<'getopt.h'>'
fi
@@ -10147,7 +12305,7 @@ $as_echo "$gl_cv_next_getopt_h" >&6; }
for ac_header in getopt.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
-if test "x$ac_cv_header_getopt_h" = x""yes; then :
+if test "x$ac_cv_header_getopt_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_GETOPT_H 1
_ACEOF
@@ -10164,7 +12322,7 @@ done
for ac_func in getopt_long_only
do :
ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
-if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
+if test "x$ac_cv_func_getopt_long_only" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_GETOPT_LONG_ONLY 1
_ACEOF
@@ -10176,56 +12334,124 @@ done
fi
- if test -z "$gl_replace_getopt"; then
+ if test -z "$gl_replace_getopt"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
$as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
-if test "${gl_cv_func_getopt_posix+set}" = set; then :
+if ${gl_cv_func_getopt_posix+:} false; then :
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ if test $cross_compiling = no; then
+ if test "$cross_compiling" = yes; then :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+
#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+
int
main ()
{
-int *p = &optreset; return optreset;
- ;
+ static char program[] = "program";
+ static char a[] = "-a";
+ static char foo[] = "foo";
+ static char bar[] = "bar";
+ char *argv[] = { program, a, foo, bar, NULL };
+ int c;
+
+ c = getopt (4, argv, "ab");
+ if (!(c == 'a'))
+ return 1;
+ c = getopt (4, argv, "ab");
+ if (!(c == -1))
+ return 2;
+ if (!(optind == 2))
+ return 3;
return 0;
}
+
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- gl_optind_min=1
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_getopt_posix=maybe
+else
+ gl_cv_func_getopt_posix=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ if test $gl_cv_func_getopt_posix = maybe; then
+ if test "$cross_compiling" = yes; then :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <getopt.h>
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+
int
main ()
{
-return !getopt_clip;
- ;
+ static char program[] = "program";
+ static char donald[] = "donald";
+ static char p[] = "-p";
+ static char billy[] = "billy";
+ static char duck[] = "duck";
+ static char a[] = "-a";
+ static char bar[] = "bar";
+ char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
+ int c;
+
+ c = getopt (7, argv, "+abp:q:");
+ if (!(c == -1))
+ return 4;
+ if (!(strcmp (argv[0], "program") == 0))
+ return 5;
+ if (!(strcmp (argv[1], "donald") == 0))
+ return 6;
+ if (!(strcmp (argv[2], "-p") == 0))
+ return 7;
+ if (!(strcmp (argv[3], "billy") == 0))
+ return 8;
+ if (!(strcmp (argv[4], "duck") == 0))
+ return 9;
+ if (!(strcmp (argv[5], "-a") == 0))
+ return 10;
+ if (!(strcmp (argv[6], "bar") == 0))
+ return 11;
+ if (!(optind == 1))
+ return 12;
return 0;
}
+
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- gl_optind_min=1
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_getopt_posix=maybe
else
- gl_optind_min=0
+ gl_cv_func_getopt_posix=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
- gl_save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min"
- if test "$cross_compiling" = yes; then :
- case "$host_os" in
- mingw*) gl_cv_func_getopt_posix="guessing no";;
- darwin* | aix*) gl_cv_func_getopt_posix="guessing no";;
- *) gl_cv_func_getopt_posix="guessing yes";;
- esac
+ fi
+ if test $gl_cv_func_getopt_posix = maybe; then
+ if test "$cross_compiling" = yes; then :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -10237,80 +12463,17 @@ else
int
main ()
{
- {
- int argc = 0;
- char *argv[10];
- int c;
-
- argv[argc++] = "program";
- argv[argc++] = "-a";
- argv[argc++] = "foo";
- argv[argc++] = "bar";
- argv[argc] = NULL;
- optind = OPTIND_MIN;
- opterr = 0;
-
- c = getopt (argc, argv, "ab");
- if (!(c == 'a'))
- return 1;
- c = getopt (argc, argv, "ab");
- if (!(c == -1))
- return 2;
- if (!(optind == 2))
- return 3;
- }
- /* Some internal state exists at this point. */
- {
- int argc = 0;
- char *argv[10];
- int c;
-
- argv[argc++] = "program";
- argv[argc++] = "donald";
- argv[argc++] = "-p";
- argv[argc++] = "billy";
- argv[argc++] = "duck";
- argv[argc++] = "-a";
- argv[argc++] = "bar";
- argv[argc] = NULL;
- optind = OPTIND_MIN;
- opterr = 0;
-
- c = getopt (argc, argv, "+abp:q:");
- if (!(c == -1))
- return 4;
- if (!(strcmp (argv[0], "program") == 0))
- return 5;
- if (!(strcmp (argv[1], "donald") == 0))
- return 6;
- if (!(strcmp (argv[2], "-p") == 0))
- return 7;
- if (!(strcmp (argv[3], "billy") == 0))
- return 8;
- if (!(strcmp (argv[4], "duck") == 0))
- return 9;
- if (!(strcmp (argv[5], "-a") == 0))
- return 10;
- if (!(strcmp (argv[6], "bar") == 0))
- return 11;
- if (!(optind == 1))
- return 12;
- }
- /* Detect MacOS 10.5, AIX 7.1 bug. */
- {
- char *argv[3] = { "program", "-ab", NULL };
- optind = OPTIND_MIN;
- opterr = 0;
- if (getopt (2, argv, "ab:") != 'a')
- return 13;
- if (getopt (2, argv, "ab:") != '?')
- return 14;
- if (optopt != 'b')
- return 15;
- if (optind != 2)
- return 16;
- }
-
+ static char program[] = "program";
+ static char ab[] = "-ab";
+ char *argv[3] = { program, ab, NULL };
+ if (getopt (2, argv, "ab:") != 'a')
+ return 13;
+ if (getopt (2, argv, "ab:") != '?')
+ return 14;
+ if (optopt != 'b')
+ return 15;
+ if (optind != 2)
+ return 16;
return 0;
}
@@ -10324,7 +12487,13 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
- CPPFLAGS=$gl_save_CPPFLAGS
+ fi
+ else
+ case "$host_os" in
+ darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
+ *) gl_cv_func_getopt_posix="guessing yes";;
+ esac
+ fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
@@ -10337,7 +12506,7 @@ $as_echo "$gl_cv_func_getopt_posix" >&6; }
if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
$as_echo_n "checking for working GNU getopt function... " >&6; }
-if test "${gl_cv_func_getopt_gnu+set}" = set; then :
+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
@@ -10355,11 +12524,7 @@ else
POSIXLY_CORRECT=1
export POSIXLY_CORRECT
if test "$cross_compiling" = yes; then :
- case $host_os:$ac_cv_have_decl_optreset in
- *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;;
- *:yes) gl_cv_func_getopt_gnu=no;;
- *) gl_cv_func_getopt_gnu=yes;;
- esac
+ gl_cv_func_getopt_gnu="guessing no"
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -10368,28 +12533,147 @@ else
#include <stddef.h>
#include <string.h>
+#include <stdlib.h>
+#if defined __MACH__ && defined __APPLE__
+/* Avoid a crash on Mac OS X. */
+#include <mach/mach.h>
+#include <mach/mach_error.h>
+#include <mach/thread_status.h>
+#include <mach/exception.h>
+#include <mach/task.h>
+#include <pthread.h>
+/* 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 <windows.h>
+#include <winerror.h>
+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 <signal.h>
+/* A POSIX signal handler. */
+static void
+exception_handler (int sig)
+{
+ exit (1);
+}
+static void
+nocrash_init (void)
+{
+#ifdef SIGSEGV
+ signal (SIGSEGV, exception_handler);
+#endif
+#ifdef SIGBUS
+ signal (SIGBUS, exception_handler);
+#endif
+}
+#endif
+
+
int
main ()
{
int result = 0;
+
+ nocrash_init();
+
/* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
- and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
+ and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
OSF/1 5.1, Solaris 10. */
{
- char *myargv[3];
- myargv[0] = "conftest";
- myargv[1] = "-+";
- myargv[2] = 0;
+ static char conftest[] = "conftest";
+ static char plus[] = "-+";
+ char *argv[3] = { conftest, plus, NULL };
opterr = 0;
- if (getopt (2, myargv, "+a") != '?')
+ if (getopt (2, argv, "+a") != '?')
result |= 1;
}
/* This code succeeds on glibc 2.8, mingw,
- and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
+ and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
{
- char *argv[] = { "program", "-p", "foo", "bar", NULL };
+ static char program[] = "program";
+ static char p[] = "-p";
+ static char foo[] = "foo";
+ static char bar[] = "bar";
+ char *argv[] = { program, p, foo, bar, NULL };
optind = 1;
if (getopt (4, argv, "p::") != 'p')
@@ -10403,20 +12687,36 @@ main ()
}
/* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
{
- char *argv[] = { "program", "foo", "-p", NULL };
+ static char program[] = "program";
+ static char foo[] = "foo";
+ static char p[] = "-p";
+ char *argv[] = { program, foo, p, NULL };
optind = 0;
if (getopt (3, argv, "-p") != 1)
result |= 16;
else if (getopt (3, argv, "-p") != 'p')
- result |= 32;
+ result |= 16;
}
/* This code fails on glibc 2.11. */
{
- char *argv[] = { "program", "-b", "-a", NULL };
+ static char program[] = "program";
+ static char b[] = "-b";
+ static char a[] = "-a";
+ char *argv[] = { program, b, a, NULL };
optind = opterr = 0;
if (getopt (3, argv, "+:a:b") != 'b')
- result |= 64;
+ result |= 32;
else if (getopt (3, argv, "+:a:b") != ':')
+ result |= 32;
+ }
+ /* This code dumps core on glibc 2.14. */
+ {
+ static char program[] = "program";
+ static char w[] = "-W";
+ static char dummy[] = "dummy";
+ char *argv[] = { program, w, dummy, NULL };
+ optind = opterr = 1;
+ if (getopt (3, argv, "W;") != 'W')
result |= 64;
}
return result;
@@ -10443,30 +12743,85 @@ fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
$as_echo "$gl_cv_func_getopt_gnu" >&6; }
- if test "$gl_cv_func_getopt_gnu" = "no"; then
+ if test "$gl_cv_func_getopt_gnu" != yes; then
gl_replace_getopt=yes
- fi
- fi
+ 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
-ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
-if test "x$ac_cv_have_decl_getenv" = x""yes; then :
- ac_have_decl=1
else
- ac_have_decl=0
-fi
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <getopt.h>
+ #include <stddef.h>
+ #include <string.h>
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_GETENV $ac_have_decl
+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
- if test -n "$gl_replace_getopt"; then :
+ REPLACE_GETOPT=0
+ if test -n "$gl_replace_getopt"; then
+ REPLACE_GETOPT=1
+ fi
+
+ if test $REPLACE_GETOPT = 1; then
GETOPT_H=getopt.h
@@ -10474,38 +12829,22 @@ $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
- GNULIB_UNISTD_H_GETOPT=1
-
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS getopt.$ac_objext"
-
-
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS getopt1.$ac_objext"
-
-
-
-
-
+ fi
+ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getenv" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
fi
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETENV $ac_have_decl
+_ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
-if test "${ac_cv_c_restrict+set}" = set; then :
+if ${ac_cv_c_restrict+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_cv_c_restrict=no
@@ -10555,6 +12894,7 @@ _ACEOF
HAVE_STRUCT_TIMEVAL=1;
HAVE_SYS_TIME_H=1;
REPLACE_GETTIMEOFDAY=0;
+ REPLACE_STRUCT_TIMEVAL=0;
@@ -10576,7 +12916,7 @@ _ACEOF
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
-if test "${gl_cv_next_sys_time_h+set}" = set; then :
+if ${gl_cv_next_sys_time_h+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -10592,13 +12932,27 @@ _ACEOF
aix*) gl_absname_cpp="$ac_cpp -C" ;;
*) gl_absname_cpp="$ac_cpp" ;;
esac
+
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+ gl_header_literal_regex=`echo 'sys/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 '\#/sys/time.h#{
- s#.*"\(.*/sys/time.h\)".*#\1#
- s#^/[^/]#//&#
- p
- q
- }'`'"'
+ sed -n "$gl_absolute_header_sed"`'"'
else
gl_cv_next_sys_time_h='<'sys/time.h'>'
fi
@@ -10627,9 +12981,36 @@ $as_echo "$gl_cv_next_sys_time_h" >&6; }
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 test "${gl_cv_sys_struct_timeval+set}" = set; then :
+if ${gl_cv_sys_struct_timeval+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -10638,6 +13019,9 @@ else
#include <sys/time.h>
#endif
#include <time.h>
+ #if HAVE_WINSOCK2_H
+ # include <winsock2.h>
+ #endif
int
main ()
@@ -10653,11 +13037,53 @@ 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 <sys/time.h>
+ #endif
+ #include <time.h>
+ #if HAVE_WINSOCK2_H
+ # include <winsock2.h>
+ #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
@@ -10668,9 +13094,355 @@ $as_echo "$gl_cv_sys_struct_timeval" >&6; }
+ { $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 <sys/types.h>
+ #include <sys/param.h>
+
+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 <sys/types.h>
+ #include <sys/param.h>
+
+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 <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+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 <limits.h>
+
+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 <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { double value; unsigned int word[NWORDS]; } memory_double;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (double x)
+{
+ memory_double m;
+ size_t i;
+ /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
+ memset (&m, 0, sizeof (memory_double));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25);
+ add_to_ored_words (0.5);
+ add_to_ored_words (1.0);
+ add_to_ored_words (2.0);
+ add_to_ored_words (4.0);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "word %d bit %d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_double_expbit0=`cat conftest.out`
+else
+ gl_cv_cc_double_expbit0="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
+$as_echo "$gl_cv_cc_double_expbit0" >&6; }
+ case "$gl_cv_cc_double_expbit0" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+#define DBL_EXPBIT0_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define DBL_EXPBIT0_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
$as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
-if test "${gl_cv_cc_float_expbit0+set}" = set; then :
+if ${gl_cv_cc_float_expbit0+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -10779,7 +13551,7 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
-if test "${ac_cv_c_bigendian+set}" = set; then :
+if ${ac_cv_c_bigendian+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_cv_c_bigendian=unknown
@@ -11010,7 +13782,7 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then :
+if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -11023,7 +13795,7 @@ _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 test "${ac_cv_gnu_library_2_1+set}" = set; then :
+if ${ac_cv_gnu_library_2_1+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -11058,6 +13830,173 @@ $as_echo "$ac_cv_gnu_library_2_1" >&6; }
+ GNULIB_LOCALECONV=0;
+ GNULIB_SETLOCALE=0;
+ GNULIB_DUPLOCALE=0;
+ HAVE_DUPLOCALE=1;
+ REPLACE_LOCALECONV=0;
+ REPLACE_SETLOCALE=0;
+ REPLACE_DUPLOCALE=0;
+ REPLACE_STRUCT_LCONV=0;
+
+
+ REPLACE_NULL=0;
+ HAVE_WCHAR_T=1;
+
+
+ { $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 <stddef.h>
+ 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 <stddef.h>
+ 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 <stddef.h>" >&5
+$as_echo_n "checking absolute name of <stddef.h>... " >&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 <stddef.h>
+
+_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
+
+
+
+
gl_threads_api=none
LIBTHREAD=
@@ -11067,7 +14006,7 @@ $as_echo "$ac_cv_gnu_library_2_1" >&6; }
if test "$gl_use_threads" != no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
$as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
-if test "${gl_cv_have_weak+set}" = set; then :
+if ${gl_cv_have_weak+:} false; then :
$as_echo_n "(cached) " >&6
else
gl_cv_have_weak=no
@@ -11135,7 +14074,7 @@ $as_echo "$gl_cv_have_weak" >&6; }
# On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
# it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
-if test "x$ac_cv_header_pthread_h" = x""yes; then :
+if test "x$ac_cv_header_pthread_h" = xyes; then :
gl_have_pthread_h=yes
else
gl_have_pthread_h=no
@@ -11174,7 +14113,7 @@ rm -f core conftest.err conftest.$ac_objext \
# need to link with libpthread in order to create multiple threads.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
-if test "${ac_cv_lib_pthread_pthread_kill+set}" = set; then :
+if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -11208,7 +14147,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
-if test "x$ac_cv_lib_pthread_pthread_kill" = x""yes; then :
+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
@@ -11227,7 +14166,7 @@ fi
# Some library is needed. Try libpthread and libc_r.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
-if test "${ac_cv_lib_pthread_pthread_kill+set}" = set; then :
+if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -11261,7 +14200,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
-if test "x$ac_cv_lib_pthread_pthread_kill" = x""yes; then :
+if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
gl_have_pthread=yes
LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
@@ -11271,7 +14210,7 @@ fi
# For FreeBSD 4.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
$as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
-if test "${ac_cv_lib_c_r_pthread_kill+set}" = set; then :
+if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -11305,7 +14244,7 @@ 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" = x""yes; then :
+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
@@ -11383,7 +14322,7 @@ $as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
$as_echo_n "checking how to link with libpth... " >&6; }
-if test "${ac_cv_libpth_libs+set}" = set; then :
+if ${ac_cv_libpth_libs+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -11933,18 +14872,20 @@ $as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
fi
fi
if test -z "$gl_have_pthread"; then
- if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then
- if { case "$host_os" in
- mingw*) true;;
- *) false;;
- esac
- }; then
- gl_threads_api=win32
+ case "$gl_use_threads" in
+ yes | windows | win32) # The 'win32' is for backward compatibility.
+ if { case "$host_os" in
+ mingw*) true;;
+ *) false;;
+ esac
+ }; then
+ gl_threads_api=windows
-$as_echo "#define USE_WIN32_THREADS 1" >>confdefs.h
+$as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
- fi
- fi
+ fi
+ ;;
+ esac
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
@@ -11961,55 +14902,23 @@ $as_echo "$gl_threads_api" >&6; }
- GNULIB_FCHMODAT=0;
- GNULIB_FSTATAT=0;
- GNULIB_FUTIMENS=0;
- GNULIB_LCHMOD=0;
- GNULIB_LSTAT=0;
- GNULIB_MKDIRAT=0;
- GNULIB_MKFIFO=0;
- GNULIB_MKFIFOAT=0;
- GNULIB_MKNOD=0;
- GNULIB_MKNODAT=0;
- GNULIB_STAT=0;
- GNULIB_UTIMENSAT=0;
- HAVE_FCHMODAT=1;
- HAVE_FSTATAT=1;
- HAVE_FUTIMENS=1;
- HAVE_LCHMOD=1;
- HAVE_LSTAT=1;
- HAVE_MKDIRAT=1;
- HAVE_MKFIFO=1;
- HAVE_MKFIFOAT=1;
- HAVE_MKNOD=1;
- HAVE_MKNODAT=1;
- HAVE_UTIMENSAT=1;
- REPLACE_FSTAT=0;
- REPLACE_FSTATAT=0;
- REPLACE_FUTIMENS=0;
- REPLACE_LSTAT=0;
- REPLACE_MKDIR=0;
- REPLACE_MKFIFO=0;
- REPLACE_MKNOD=0;
- REPLACE_STAT=0;
- REPLACE_UTIMENSAT=0;
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
-if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
+if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
$as_echo_n "(cached) " >&6
else
rm -f conftest.sym conftest.file
echo >conftest.file
if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
if test "$cross_compiling" = yes; then :
- # When cross-compiling, be pessimistic so we will end up using the
- # replacement version of lstat that checks for trailing slashes and
- # calls lstat a second time when necessary.
- ac_cv_func_lstat_dereferences_slashed_symlink=no
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
+ esac
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -12029,9 +14938,9 @@ struct stat sbuf;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
- ac_cv_func_lstat_dereferences_slashed_symlink=yes
+ gl_cv_func_lstat_dereferences_slashed_symlink=yes
else
- ac_cv_func_lstat_dereferences_slashed_symlink=no
+ gl_cv_func_lstat_dereferences_slashed_symlink=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
@@ -12040,36 +14949,27 @@ fi
else
# If the 'ln -s' command failed, then we probably don't even
# have an lstat function.
- ac_cv_func_lstat_dereferences_slashed_symlink=no
+ gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
fi
rm -f conftest.sym conftest.file
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5
-$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; }
- test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
+$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
+ case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
+ *yes)
cat >>confdefs.h <<_ACEOF
#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
_ACEOF
- if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
-
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS lstat.$ac_objext"
-
- fi
+ ;;
+ 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 test "${gl_cv_func_malloc_posix+set}" = set; then :
+if ${gl_cv_func_malloc_posix+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -12099,10 +14999,11 @@ fi
$as_echo "$gl_cv_func_malloc_posix" >&6; }
- for ac_header in stdlib.h
+
+ for ac_header in stdlib.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdlib_h" = x""yes; then :
+if test "x$ac_cv_header_stdlib_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STDLIB_H 1
_ACEOF
@@ -12111,21 +15012,29 @@ fi
done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
-if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
+if ${ac_cv_func_malloc_0_nonnull+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
- ac_cv_func_malloc_0_nonnull=no
+ case "$host_os" in
+ # Guess yes on platforms where we know the result.
+ *-gnu* | freebsd* | netbsd* | openbsd* \
+ | hpux* | solaris* | cygwin* | mingw*)
+ ac_cv_func_malloc_0_nonnull=yes ;;
+ # If we don't know, assume the worst.
+ *) ac_cv_func_malloc_0_nonnull=no ;;
+ esac
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#if defined STDC_HEADERS || defined HAVE_STDLIB_H
-# include <stdlib.h>
-#else
-char *malloc ();
-#endif
+ # include <stdlib.h>
+ #else
+ char *malloc ();
+ #endif
int
main ()
@@ -12134,6 +15043,7 @@ return ! malloc (0);
;
return 0;
}
+
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
ac_cv_func_malloc_0_nonnull=yes
@@ -12144,10 +15054,11 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
-if test $ac_cv_func_malloc_0_nonnull = yes; then :
+ if test $ac_cv_func_malloc_0_nonnull = yes; then :
gl_cv_func_malloc_0_nonnull=1
else
gl_cv_func_malloc_0_nonnull=0
@@ -12165,7 +15076,7 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
$as_echo_n "checking for mbstate_t... " >&6; }
-if test "${ac_cv_type_mbstate_t+set}" = set; then :
+if ${ac_cv_type_mbstate_t+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -12215,7 +15126,7 @@ $as_echo "#define mbstate_t int" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
$as_echo_n "checking for a traditional japanese locale... " >&6; }
-if test "${gt_cv_locale_ja+set}" = set; then :
+if ${gt_cv_locale_ja+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -12236,9 +15147,9 @@ int main ()
const char *p;
/* Check whether the given locale name is recognized by the system. */
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Win32, setlocale(category, "") looks at the system settings,
+ /* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -12247,7 +15158,7 @@ int main ()
if (setlocale (LC_ALL, "") == NULL) return 1;
#endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -12296,13 +15207,14 @@ _ACEOF
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
mingw*)
- # Note that on native Win32, the Japanese locale is Japanese_Japan.932,
- # and CP932 is very different from EUC-JP, so we cannot use it here.
+ # Note that on native Windows, the Japanese locale is
+ # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
+ # cannot use it here.
gt_cv_locale_ja=none
;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the AIX locale name.
@@ -12353,7 +15265,7 @@ $as_echo "$gt_cv_locale_ja" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
$as_echo_n "checking for a transitional chinese locale... " >&6; }
-if test "${gt_cv_locale_zh_CN+set}" = set; then :
+if ${gt_cv_locale_zh_CN+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -12375,9 +15287,9 @@ int main ()
const char *p;
/* Check whether the given locale name is recognized by the system. */
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Win32, setlocale(category, "") looks at the system settings,
+ /* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -12386,7 +15298,7 @@ int main ()
if (setlocale (LC_ALL, "") == NULL) return 1;
#endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -12435,7 +15347,7 @@ _ACEOF
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
mingw*)
- # Test for the hypothetical native Win32 locale name.
+ # Test for the hypothetical native Windows locale name.
if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_zh_CN=Chinese_China.54936
else
@@ -12443,9 +15355,15 @@ _ACEOF
gt_cv_locale_zh_CN=none
fi
;;
+ solaris2.8)
+ # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
+ # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
+ # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
+ gt_cv_locale_zh_CN=none
+ ;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the locale name without encoding suffix.
@@ -12479,7 +15397,7 @@ $as_echo "$gt_cv_locale_zh_CN" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
$as_echo_n "checking for a french Unicode locale... " >&6; }
-if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+if ${gt_cv_locale_fr_utf8+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -12502,9 +15420,9 @@ int main () {
#if !(defined __BEOS__ || defined __HAIKU__)
/* Check whether the given locale name is recognized by the system. */
# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Win32, setlocale(category, "") looks at the system settings,
+ /* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -12513,7 +15431,7 @@ int main () {
if (setlocale (LC_ALL, "") == NULL) return 1;
# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -12539,10 +15457,12 @@ int main () {
|| buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
return 1;
#endif
+#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
+#endif
return 0;
}
@@ -12560,7 +15480,7 @@ _ACEOF
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
mingw*)
- # Test for the hypothetical native Win32 locale name.
+ # Test for the hypothetical native Windows locale name.
if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_fr_utf8=French_France.65001
else
@@ -12570,7 +15490,7 @@ _ACEOF
;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the usual locale name.
@@ -12606,6 +15526,8 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ GNULIB_FFSL=0;
+ GNULIB_FFSLL=0;
GNULIB_MEMCHR=0;
GNULIB_MEMMEM=0;
GNULIB_MEMPCPY=0;
@@ -12642,7 +15564,9 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; }
GNULIB_STRSIGNAL=0;
GNULIB_STRVERSCMP=0;
HAVE_MBSLEN=0;
- HAVE_MEMCHR=1;
+ HAVE_FFSL=1;
+ HAVE_FFSLL=1;
+ HAVE_MEMCHR=1;
HAVE_DECL_MEMMEM=1;
HAVE_MEMPCPY=1;
HAVE_DECL_MEMRCHR=1;
@@ -12666,6 +15590,7 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; }
REPLACE_STRDUP=0;
REPLACE_STRSTR=0;
REPLACE_STRCASESTR=0;
+ REPLACE_STRCHRNUL=0;
REPLACE_STRERROR=0;
REPLACE_STRERROR_R=0;
REPLACE_STRNCAT=0;
@@ -12679,13 +15604,11 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; }
-
-
# Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
# fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
# irrelevant for anonymous mappings.
ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
-if test "x$ac_cv_func_mmap" = x""yes; then :
+if test "x$ac_cv_func_mmap" = xyes; then :
gl_have_mmap=yes
else
gl_have_mmap=no
@@ -12702,12 +15625,12 @@ $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
#include <sys/mman.h>
#ifdef MAP_ANONYMOUS
- I cant identify this map.
+ I cannot identify this map
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+ $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
gl_have_mmap_anonymous=yes
fi
rm -f conftest*
@@ -12718,12 +15641,12 @@ rm -f conftest*
#include <sys/mman.h>
#ifdef MAP_ANON
- I cant identify this map.
+ I cannot identify this map
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+ $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
@@ -12746,7 +15669,7 @@ $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
- if test $ac_cv_func_memchr = yes; then
+ if test $HAVE_MEMCHR = 1; then
# Detect platform-specific bugs in some versions of glibc:
# memchr should not dereference anything with length 0
# http://bugzilla.redhat.com/499689
@@ -12756,7 +15679,7 @@ $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
# Assume that memchr works on platforms that lack mprotect.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
$as_echo_n "checking whether memchr works... " >&6; }
-if test "${gl_cv_func_memchr_works+set}" = set; then :
+if ${gl_cv_func_memchr_works+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
@@ -12832,233 +15755,7 @@ $as_echo "$gl_cv_func_memchr_works" >&6; }
if test "$gl_cv_func_memchr_works" != yes; then
REPLACE_MEMCHR=1
fi
- else
- HAVE_MEMCHR=0
fi
- if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
-
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_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" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_BP_SYM_H 1
-_ACEOF
-
-fi
-
-done
-
-
- fi
-
-# 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 test "${ac_cv_sys_largefile_CC+set}" = set; 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 <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
-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 test "${ac_cv_sys_file_offset_bits+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- while :; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
-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 <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
-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 test "${ac_cv_sys_large_files+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- while :; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
-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 <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
-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
@@ -13110,7 +15807,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
$as_echo_n "checking for promoted mode_t type... " >&6; }
-if test "${gl_cv_promoted_mode_t+set}" = set; then :
+if ${gl_cv_promoted_mode_t+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -13144,8 +15841,6 @@ _ACEOF
-
-
GNULIB_POSIX_SPAWN=0;
GNULIB_POSIX_SPAWNP=0;
GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=0;
@@ -13172,6 +15867,12 @@ _ACEOF
HAVE_POSIX_SPAWN_FILE_ACTIONS_T=1;
REPLACE_POSIX_SPAWN=0;
+ REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
+
+ REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
+
+ REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
+
@@ -13191,7 +15892,7 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn works" >&5
$as_echo_n "checking whether posix_spawn works... " >&6; }
-if test "${gl_cv_func_posix_spawn_works+set}" = set; then :
+if ${gl_cv_func_posix_spawn_works+:} false; then :
$as_echo_n "(cached) " >&6
else
if test $cross_compiling = no; then
@@ -13527,9 +16228,12 @@ $as_echo "$gl_cv_func_posix_spawn_works" >&6; }
case "$gl_cv_func_posix_spawn_works" in
*yes)
+
+$as_echo "#define HAVE_WORKING_POSIX_SPAWN 1" >>confdefs.h
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedpolicy is supported" >&5
$as_echo_n "checking whether posix_spawnattr_setschedpolicy is supported... " >&6; }
-if test "${gl_cv_func_spawnattr_setschedpolicy+set}" = set; then :
+if ${gl_cv_func_spawnattr_setschedpolicy+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13555,7 +16259,7 @@ fi
$as_echo "$gl_cv_func_spawnattr_setschedpolicy" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedparam is supported" >&5
$as_echo_n "checking whether posix_spawnattr_setschedparam is supported... " >&6; }
-if test "${gl_cv_func_spawnattr_setschedparam+set}" = set; then :
+if ${gl_cv_func_spawnattr_setschedparam+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13585,18 +16289,14 @@ $as_echo "$gl_cv_func_spawnattr_setschedparam" >&6; }
fi
-
-
-
-
-
-
-
-
+ GNULIB_PTHREAD_SIGMASK=0;
+ GNULIB_RAISE=0;
GNULIB_SIGNAL_H_SIGPIPE=0;
GNULIB_SIGPROCMASK=0;
GNULIB_SIGACTION=0;
HAVE_POSIX_SIGNALBLOCKING=1;
+ HAVE_PTHREAD_SIGMASK=1;
+ HAVE_RAISE=1;
HAVE_SIGSET_T=1;
HAVE_SIGINFO_T=1;
HAVE_SIGACTION=1;
@@ -13604,12 +16304,121 @@ $as_echo "$gl_cv_func_spawnattr_setschedparam" >&6; }
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
+ HAVE_SIGHANDLER_T=1;
+ REPLACE_PTHREAD_SIGMASK=0;
+ REPLACE_RAISE=0;
+
+
+ ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
+ #include <signal.h>
+ /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
+ #include <sys/types.h>
+
+"
+if test "x$ac_cv_type_sigset_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SIGSET_T 1
+_ACEOF
+
+gl_cv_type_sigset_t=yes
+else
+ gl_cv_type_sigset_t=no
+fi
+
+ if test $gl_cv_type_sigset_t != yes; then
+ HAVE_SIGSET_T=0
+ fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGPIPE" >&5
+$as_echo_n "checking for SIGPIPE... " >&6; }
+if ${gl_cv_header_signal_h_SIGPIPE+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <signal.h>
+#if !defined SIGPIPE
+booboo
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "booboo" >/dev/null 2>&1; then :
+ gl_cv_header_signal_h_SIGPIPE=no
+else
+ gl_cv_header_signal_h_SIGPIPE=yes
+fi
+rm -f conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_signal_h_SIGPIPE" >&5
+$as_echo "$gl_cv_header_signal_h_SIGPIPE" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if ${ac_cv_c_inline+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_inline=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test "$ac_cv_c_inline" != no && break
+done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
+
+case $ac_cv_c_inline in
+ inline | yes) ;;
+ *)
+ case $ac_cv_c_inline in
+ no) ac_val=;;
+ *) ac_val=$ac_cv_c_inline;;
+ esac
+ cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
-if test "${ac_cv_type_uid_t+set}" = set; then :
+if ${ac_cv_type_uid_t+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13640,10 +16449,81 @@ fi
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef _MSC_VER
+MicrosoftCompiler
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "MicrosoftCompiler" >/dev/null 2>&1; then :
+ gl_asmext='asm'
+ gl_c_asm_opt='-c -Fa'
+
+else
+ gl_asmext='s'
+ gl_c_asm_opt='-S'
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
+fi
+rm -f conftest*
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C symbols are prefixed with underscore at the linker level" >&5
+$as_echo_n "checking whether C symbols are prefixed with underscore at the linker level... " >&6; }
+if ${gl_cv_prog_as_underscore+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.c <<EOF
+#ifdef __cplusplus
+extern "C" int foo (void);
+#endif
+int foo(void) { return 0; }
+EOF
+ # Look for the assembly language name in the .s file.
+ { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; } >/dev/null 2>&1
+ if grep _foo conftest.$gl_asmext >/dev/null ; then
+ gl_cv_prog_as_underscore=yes
+ else
+ gl_cv_prog_as_underscore=no
+ fi
+ rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_as_underscore" >&5
+$as_echo "$gl_cv_prog_as_underscore" >&6; }
+ if test $gl_cv_prog_as_underscore = yes; then
+ USER_LABEL_PREFIX=_
+ else
+ USER_LABEL_PREFIX=
+ fi
+
+cat >>confdefs.h <<_ACEOF
+#define USER_LABEL_PREFIX $USER_LABEL_PREFIX
+_ACEOF
+
+ ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"'
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
$as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
-if test "${gl_cv_func_snprintf_retval_c99+set}" = set; then :
+if ${gl_cv_func_snprintf_retval_c99+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -13655,7 +16535,7 @@ else
# Guess yes on FreeBSD >= 5.
freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
- # Guess yes on MacOS X >= 10.3.
+ # Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
# Guess yes on OpenBSD >= 3.9.
@@ -13684,15 +16564,29 @@ else
#include <stdio.h>
#include <string.h>
+#if HAVE_SNPRINTF
+# define my_snprintf snprintf
+#else
+# include <stdarg.h>
+static int my_snprintf (char *buf, int size, const char *format, ...)
+{
+ va_list args;
+ int ret;
+ va_start (args, format);
+ ret = vsnprintf (buf, size, format, args);
+ va_end (args);
+ return ret;
+}
+#endif
static char buf[100];
int main ()
{
strcpy (buf, "ABCDEF");
- if (snprintf (buf, 3, "%d %d", 4567, 89) != 7)
+ if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
return 1;
- if (snprintf (buf, 0, "%d %d", 4567, 89) != 7)
+ if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
return 2;
- if (snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
+ if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
return 3;
return 0;
}
@@ -13712,7 +16606,7 @@ fi
$as_echo "$gl_cv_func_snprintf_retval_c99" >&6; }
ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
-if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
+if test "x$ac_cv_have_decl_snprintf" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -13726,7 +16620,7 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
-if test "${ac_cv_header_stdbool_h+set}" = set; then :
+if ${ac_cv_header_stdbool_h+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13801,7 +16695,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
$as_echo "$ac_cv_header_stdbool_h" >&6; }
ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
-if test "x$ac_cv_type__Bool" = x""yes; then :
+if test "x$ac_cv_type__Bool" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE__BOOL 1
@@ -13812,20 +16706,291 @@ fi
- REPLACE_NULL=0;
- HAVE_WCHAR_T=1;
- STDDEF_H='';
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
-$as_echo_n "checking for wchar_t... " >&6; }
-if test "${gt_cv_c_wchar_t+set}" = set; then :
+
+
+
+
+ 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 <stdint.h>" >&5
+$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
+if ${gl_cv_next_stdint_h+:} false; then :
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+ if test $ac_cv_header_stdint_h = yes; then
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stddef.h>
- wchar_t foo = (wchar_t)'\0';
+#include <stdint.h>
+
+_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 <stdint.h>
+/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
+#if !(defined WCHAR_MIN && defined WCHAR_MAX)
+#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
+#endif
+
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #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 <limits.h> /* 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 ()
{
@@ -13835,118 +17000,500 @@ main ()
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- gt_cv_c_wchar_t=yes
+ if test "$cross_compiling" = yes; then :
+ gl_cv_header_working_stdint_h=yes
+
else
- gt_cv_c_wchar_t=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 <stdint.h>
+
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+
+#include <stdio.h>
+#include <string.h>
+#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: $gt_cv_c_wchar_t" >&5
-$as_echo "$gt_cv_c_wchar_t" >&6; }
- if test $gt_cv_c_wchar_t = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $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: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+#include <limits.h>"; then :
+
+else
+ result=unknown
+fi
+
+ eval gl_cv_bitsizeof_${gltype}=\$result
+
+fi
+eval ac_res=\$gl_cv_bitsizeof_${gltype}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval result=\$gl_cv_bitsizeof_${gltype}
+ if test $result = unknown; then
+ result=0
+ fi
+ GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ cat >>confdefs.h <<_ACEOF
+#define BITSIZEOF_${GLTYPE} $result
+_ACEOF
+
+ eval BITSIZEOF_${GLTYPE}=\$result
+ done
-$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
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: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+#include <limits.h>"; 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
- if test -z "$ERRNO_H"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
-$as_echo_n "checking for working strerror function... " >&6; }
-if test "${gl_cv_func_working_strerror+set}" = set; then :
+ 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
- if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <string.h>
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+ int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
int
main ()
{
-return !*strerror (-2);
+
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- gl_cv_func_working_strerror=yes
+ result=yes
else
- gl_cv_func_working_strerror=no
+ 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
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ eval gl_cv_type_${gltype}_suffix=no
+ eval result=\$gl_cv_type_${gltype}_signed
+ if test "$result" = yes; then
+ glsufu=
+ else
+ glsufu=u
+ fi
+ for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+ case $glsuf in
+ '') gltype1='int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ i64) gltype1='__int64';;
+ u) gltype1='unsigned int';;
+ ul) gltype1='unsigned long int';;
+ ull) gltype1='unsigned long long int';;
+ ui64)gltype1='unsigned __int64';;
+ esac
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <string.h>
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+ extern $gltype foo;
+ extern $gltype1 foo;
int
main ()
{
-return !*strerror (-2);
+
;
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- gl_cv_func_working_strerror=yes
-else
- gl_cv_func_working_strerror=no
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval gl_cv_type_${gltype}_suffix=\$glsuf
fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
-$as_echo "$gl_cv_func_working_strerror" >&6; }
- if test $gl_cv_func_working_strerror = no; then
- REPLACE_STRERROR=1
- fi
- else
- REPLACE_STRERROR=1
fi
- if test $REPLACE_STRERROR = 1; then
- ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strerror" = x""yes; then :
- ac_have_decl=1
+
+ 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
- ac_have_decl=0
-fi
+ 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. */
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRERROR $ac_have_decl
-_ACEOF
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+ extern $gltype foo;
+ extern $gltype1 foo;
+int
+main ()
+{
- if test $ac_cv_header_sys_socket_h != yes; then
- for ac_header in winsock2.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
-if test "x$ac_cv_header_winsock2_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_WINSOCK2_H 1
+ ;
+ 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
+
-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
+
+
+
+ REPLACE_STRERROR_0=0
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
+$as_echo_n "checking whether strerror(0) succeeds... " >&6; }
+if ${gl_cv_func_strerror_0_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_strerror_0_works="guessing no" ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+ #include <errno.h>
+
+int
+main ()
+{
+int result = 0;
+ char *str;
+ errno = 0;
+ str = strerror (0);
+ if (!*str) result |= 1;
+ if (errno) result |= 2;
+ if (strstr (str, "nknown") || strstr (str, "ndefined"))
+ result |= 4;
+ return result;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_strerror_0_works=yes
+else
+ gl_cv_func_strerror_0_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
+$as_echo "$gl_cv_func_strerror_0_works" >&6; }
+ case "$gl_cv_func_strerror_0_works" in
+ *yes) ;;
+ *)
+ REPLACE_STRERROR_0=1
+
+$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
+
+ ;;
+ esac
+
@@ -13963,7 +17510,7 @@ done
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
$as_echo_n "checking absolute name of <string.h>... " >&6; }
-if test "${gl_cv_next_string_h+set}" = set; then :
+if ${gl_cv_next_string_h+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -13976,13 +17523,27 @@ _ACEOF
aix*) gl_absname_cpp="$ac_cpp -C" ;;
*) gl_absname_cpp="$ac_cpp" ;;
esac
+
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+ gl_header_literal_regex=`echo '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 '\#/string.h#{
- s#.*"\(.*/string.h\)".*#\1#
- s#^/[^/]#//&#
- p
- q
- }'`'"'
+ sed -n "$gl_absolute_header_sed"`'"'
fi
@@ -14007,7 +17568,7 @@ $as_echo "$gl_cv_next_string_h" >&6; }
ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strndup" = x""yes; then :
+if test "x$ac_cv_have_decl_strndup" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -14020,7 +17581,7 @@ _ACEOF
ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strnlen" = x""yes; then :
+if test "x$ac_cv_have_decl_strnlen" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -14031,7 +17592,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
ac_fn_c_check_decl "$LINENO" "strsignal" "ac_cv_have_decl_strsignal" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strsignal" = x""yes; then :
+if test "x$ac_cv_have_decl_strsignal" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -14048,7 +17609,7 @@ ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#inclu
#endif
"
-if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
+if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -14064,20 +17625,10 @@ _ACEOF
if test "$gl_cv_func_memchr_works" != yes; then
REPLACE_STRSTR=1
-
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS strstr.$ac_objext"
-
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
$as_echo_n "checking whether strstr works... " >&6; }
-if test "${gl_cv_func_strstr_works_always+set}" = set; then :
+if ${gl_cv_func_strstr_works_always+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
@@ -14102,7 +17653,7 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "Lucky user" >/dev/null 2>&1; then :
- gl_cv_func_strstr_works_always=yes
+ gl_cv_func_strstr_works_always="guessing yes"
else
gl_cv_func_strstr_works_always="guessing no"
fi
@@ -14140,36 +17691,18 @@ fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
$as_echo "$gl_cv_func_strstr_works_always" >&6; }
- if test "$gl_cv_func_strstr_works_always" != yes; then
- REPLACE_STRSTR=1
-
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS strstr.$ac_objext"
-
- fi
+ case "$gl_cv_func_strstr_works_always" in
+ *yes) ;;
+ *)
+ REPLACE_STRSTR=1
+ ;;
+ esac
fi
-ac_fn_c_check_decl "$LINENO" "strtod" "ac_cv_have_decl_strtod" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strtod" = x""yes; then :
- ac_have_decl=1
-else
- ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRTOD $ac_have_decl
-_ACEOF
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexp() can be used without linking with libm" >&5
$as_echo_n "checking whether ldexp() can be used without linking with libm... " >&6; }
-if test "${gl_cv_func_ldexp_no_libm+set}" = set; then :
+if ${gl_cv_func_ldexp_no_libm+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -14201,50 +17734,6 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
$as_echo "$gl_cv_func_ldexp_no_libm" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
-$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
-if test "${ac_cv_header_stat_broken+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#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;
@@ -14269,7 +17758,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
-if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
+if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14302,7 +17791,7 @@ $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
-if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
+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
@@ -14331,7 +17820,7 @@ $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
-if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
+if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14380,7 +17869,7 @@ $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
$as_echo_n "checking absolute name of <time.h>... " >&6; }
-if test "${gl_cv_next_time_h+set}" = set; then :
+if ${gl_cv_next_time_h+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -14393,13 +17882,27 @@ _ACEOF
aix*) gl_absname_cpp="$ac_cpp -C" ;;
*) gl_absname_cpp="$ac_cpp" ;;
esac
+
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+ gl_header_literal_regex=`echo '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 '\#/time.h#{
- s#.*"\(.*/time.h\)".*#\1#
- s#^/[^/]#//&#
- p
- q
- }'`'"'
+ sed -n "$gl_absolute_header_sed"`'"'
fi
@@ -14425,7 +17928,7 @@ $as_echo "$gl_cv_next_time_h" >&6; }
ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_clearerr_unlocked" = x""yes; then :
+if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -14436,7 +17939,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_feof_unlocked" = x""yes; then :
+if test "x$ac_cv_have_decl_feof_unlocked" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -14447,7 +17950,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_ferror_unlocked" = x""yes; then :
+if test "x$ac_cv_have_decl_ferror_unlocked" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -14458,7 +17961,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_fflush_unlocked" = x""yes; then :
+if test "x$ac_cv_have_decl_fflush_unlocked" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -14469,7 +17972,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_fgets_unlocked" = x""yes; then :
+if test "x$ac_cv_have_decl_fgets_unlocked" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -14480,7 +17983,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_fputc_unlocked" = x""yes; then :
+if test "x$ac_cv_have_decl_fputc_unlocked" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -14491,7 +17994,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_fputs_unlocked" = x""yes; then :
+if test "x$ac_cv_have_decl_fputs_unlocked" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -14502,7 +18005,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_fread_unlocked" = x""yes; then :
+if test "x$ac_cv_have_decl_fread_unlocked" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -14513,7 +18016,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_fwrite_unlocked" = x""yes; then :
+if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -14524,7 +18027,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_getchar_unlocked" = x""yes; then :
+if test "x$ac_cv_have_decl_getchar_unlocked" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -14535,7 +18038,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_putc_unlocked" = x""yes; then :
+if test "x$ac_cv_have_decl_putc_unlocked" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -14546,7 +18049,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_putchar_unlocked" = x""yes; then :
+if test "x$ac_cv_have_decl_putchar_unlocked" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -14561,7 +18064,7 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
$as_echo_n "checking for wint_t... " >&6; }
-if test "${gt_cv_c_wint_t+set}" = set; then :
+if ${gt_cv_c_wint_t+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14610,21 +18113,10 @@ $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
fi
-ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = x""yes; then :
-
-else
-
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned int
-_ACEOF
-
-fi
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
$as_echo_n "checking for inttypes.h... " >&6; }
-if test "${gl_cv_header_inttypes_h+set}" = set; then :
+if ${gl_cv_header_inttypes_h+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14661,7 +18153,7 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
$as_echo_n "checking for stdint.h... " >&6; }
-if test "${gl_cv_header_stdint_h+set}" = set; then :
+if ${gl_cv_header_stdint_h+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14698,7 +18190,7 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
$as_echo_n "checking for intmax_t... " >&6; }
-if test "${gt_cv_c_intmax_t+set}" = set; then :
+if ${gt_cv_c_intmax_t+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -14751,7 +18243,6 @@ _ACEOF
-
for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -14766,7 +18257,7 @@ done
ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
"
-if test "x$ac_cv_have_decl__snprintf" = x""yes; then :
+if test "x$ac_cv_have_decl__snprintf" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -14777,6 +18268,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
+
case "$gl_cv_func_snprintf_retval_c99" in
*yes)
@@ -14791,7 +18283,7 @@ $as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports size specifiers as in C99" >&5
$as_echo_n "checking whether printf supports size specifiers as in C99... " >&6; }
-if test "${gl_cv_func_printf_sizes_c99+set}" = set; then :
+if ${gl_cv_func_printf_sizes_c99+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -14803,7 +18295,7 @@ else
# Guess yes on FreeBSD >= 5.
freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
- # Guess yes on MacOS X >= 10.3.
+ # Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";;
darwin*) gl_cv_func_printf_sizes_c99="guessing yes";;
# Guess yes on OpenBSD >= 3.9.
@@ -14878,7 +18370,7 @@ $as_echo "$gl_cv_func_printf_sizes_c99" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports 'long double' arguments" >&5
$as_echo_n "checking whether printf supports 'long double' arguments... " >&6; }
-if test "${gl_cv_func_printf_long_double+set}" = set; then :
+if ${gl_cv_func_printf_long_double+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -14933,7 +18425,7 @@ $as_echo "$gl_cv_func_printf_long_double" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'double' arguments" >&5
$as_echo_n "checking whether printf supports infinite 'double' arguments... " >&6; }
-if test "${gl_cv_func_printf_infinite+set}" = set; then :
+if ${gl_cv_func_printf_infinite+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -14945,7 +18437,7 @@ else
# Guess yes on FreeBSD >= 6.
freebsd[1-5]*) gl_cv_func_printf_infinite="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
- # Guess yes on MacOS X >= 10.3.
+ # Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";;
darwin*) gl_cv_func_printf_infinite="guessing yes";;
# Guess yes on HP-UX >= 11.
@@ -14997,28 +18489,28 @@ static double zero = 0.0;
int main ()
{
int result = 0;
- if (sprintf (buf, "%f", 1.0 / 0.0) < 0
+ if (sprintf (buf, "%f", 1.0 / zero) < 0
|| (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
result |= 1;
- if (sprintf (buf, "%f", -1.0 / 0.0) < 0
+ if (sprintf (buf, "%f", -1.0 / zero) < 0
|| (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
result |= 1;
if (sprintf (buf, "%f", zero / zero) < 0
|| !strisnan (buf, 0, strlen (buf)))
result |= 2;
- if (sprintf (buf, "%e", 1.0 / 0.0) < 0
+ if (sprintf (buf, "%e", 1.0 / zero) < 0
|| (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
result |= 4;
- if (sprintf (buf, "%e", -1.0 / 0.0) < 0
+ if (sprintf (buf, "%e", -1.0 / zero) < 0
|| (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
result |= 4;
if (sprintf (buf, "%e", zero / zero) < 0
|| !strisnan (buf, 0, strlen (buf)))
result |= 8;
- if (sprintf (buf, "%g", 1.0 / 0.0) < 0
+ if (sprintf (buf, "%g", 1.0 / zero) < 0
|| (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
result |= 16;
- if (sprintf (buf, "%g", -1.0 / 0.0) < 0
+ if (sprintf (buf, "%g", -1.0 / zero) < 0
|| (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
result |= 16;
if (sprintf (buf, "%g", zero / zero) < 0
@@ -15050,6 +18542,7 @@ $as_echo "$gl_cv_func_printf_infinite" >&6; }
+
if test -n "$gl_printf_safe"; then
$as_echo "#define CHECK_PRINTF_SAFE 1" >>confdefs.h
@@ -15059,7 +18552,7 @@ $as_echo "#define CHECK_PRINTF_SAFE 1" >>confdefs.h
*yes)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'long double' arguments" >&5
$as_echo_n "checking whether printf supports infinite 'long double' arguments... " >&6; }
-if test "${gl_cv_func_printf_infinite_long_double+set}" = set; then :
+if ${gl_cv_func_printf_infinite_long_double+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -15091,7 +18584,7 @@ else
#include <stdlib.h>
#if defined __MACH__ && defined __APPLE__
-/* Avoid a crash on MacOS X. */
+/* Avoid a crash on Mac OS X. */
#include <mach/mach.h>
#include <mach/mach_error.h>
#include <mach/thread_status.h>
@@ -15152,6 +18645,34 @@ nocrash_init (void)
}
}
}
+#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Avoid a crash on native Windows. */
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <winerror.h>
+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 <signal.h>
@@ -15200,34 +18721,34 @@ int main ()
{
int result = 0;
nocrash_init();
- if (sprintf (buf, "%Lf", 1.0L / 0.0L) < 0
+ if (sprintf (buf, "%Lf", 1.0L / zeroL) < 0
|| (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
result |= 1;
- if (sprintf (buf, "%Lf", -1.0L / 0.0L) < 0
+ if (sprintf (buf, "%Lf", -1.0L / zeroL) < 0
|| (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
result |= 1;
if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
|| !strisnan (buf, 0, strlen (buf)))
result |= 1;
- if (sprintf (buf, "%Le", 1.0L / 0.0L) < 0
+ if (sprintf (buf, "%Le", 1.0L / zeroL) < 0
|| (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
result |= 1;
- if (sprintf (buf, "%Le", -1.0L / 0.0L) < 0
+ if (sprintf (buf, "%Le", -1.0L / zeroL) < 0
|| (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
result |= 1;
if (sprintf (buf, "%Le", zeroL / zeroL) < 0
|| !strisnan (buf, 0, strlen (buf)))
result |= 1;
- if (sprintf (buf, "%Lg", 1.0L / 0.0L) < 0
+ if (sprintf (buf, "%Lg", 1.0L / zeroL) < 0
|| (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
result |= 1;
- if (sprintf (buf, "%Lg", -1.0L / 0.0L) < 0
+ if (sprintf (buf, "%Lg", -1.0L / zeroL) < 0
|| (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
result |= 1;
if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
|| !strisnan (buf, 0, strlen (buf)))
result |= 1;
-#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
/* Representation of an 80-bit 'long double' as an initializer for a sequence
of 'unsigned int' words. */
# ifdef WORDS_BIGENDIAN
@@ -15359,7 +18880,7 @@ $as_echo "$gl_cv_func_printf_infinite_long_double" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'a' and 'A' directives" >&5
$as_echo_n "checking whether printf supports the 'a' and 'A' directives... " >&6; }
-if test "${gl_cv_func_printf_directive_a+set}" = set; then :
+if ${gl_cv_func_printf_directive_a+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -15399,6 +18920,7 @@ else
#include <stdio.h>
#include <string.h>
static char buf[100];
+static double zero = 0.0;
int main ()
{
int result = 0;
@@ -15423,17 +18945,17 @@ int main ()
result |= 4;
/* This catches a FreeBSD 6.1 bug. See
<http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
- if (sprintf (buf, "%010a %d", 1.0 / 0.0, 33, 44, 55) < 0
+ if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0
|| buf[0] == '0')
result |= 8;
- /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug. */
+ /* This catches a Mac OS X 10.3.9 (Darwin 7.9) bug. */
if (sprintf (buf, "%.1a", 1.999) < 0
|| (strcmp (buf, "0x1.0p+1") != 0
&& strcmp (buf, "0x2.0p+0") != 0
&& strcmp (buf, "0x4.0p-1") != 0
&& strcmp (buf, "0x8.0p-2") != 0))
result |= 16;
- /* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a
+ /* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a
glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
if (sprintf (buf, "%.1La", 1.999L) < 0
|| (strcmp (buf, "0x1.0p+1") != 0
@@ -15462,7 +18984,7 @@ $as_echo "$gl_cv_func_printf_directive_a" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'F' directive" >&5
$as_echo_n "checking whether printf supports the 'F' directive... " >&6; }
-if test "${gl_cv_func_printf_directive_f+set}" = set; then :
+if ${gl_cv_func_printf_directive_f+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -15474,7 +18996,7 @@ else
# Guess yes on FreeBSD >= 6.
freebsd[1-5]*) gl_cv_func_printf_directive_f="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
- # Guess yes on MacOS X >= 10.3.
+ # Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";;
darwin*) gl_cv_func_printf_directive_f="guessing yes";;
# Guess yes on Solaris >= 2.10.
@@ -15491,13 +19013,14 @@ else
#include <stdio.h>
#include <string.h>
static char buf[100];
+static double zero = 0.0;
int main ()
{
int result = 0;
if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
|| strcmp (buf, "1234567.000000 33") != 0)
result |= 1;
- if (sprintf (buf, "%F", 1.0 / 0.0) < 0
+ if (sprintf (buf, "%F", 1.0 / zero) < 0
|| (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
result |= 2;
/* This catches a Cygwin 1.5.x bug. */
@@ -15525,14 +19048,15 @@ $as_echo "$gl_cv_func_printf_directive_f" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'n' directive" >&5
$as_echo_n "checking whether printf supports the 'n' directive... " >&6; }
-if test "${gl_cv_func_printf_directive_n+set}" = set; then :
+if ${gl_cv_func_printf_directive_n+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
case "$host_os" in
- *) gl_cv_func_printf_directive_n="guessing yes";;
+ mingw*) gl_cv_func_printf_directive_n="guessing no";;
+ *) gl_cv_func_printf_directive_n="guessing yes";;
esac
else
@@ -15540,12 +19064,27 @@ else
/* end confdefs.h. */
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
+#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. */
@@ -15575,7 +19114,7 @@ $as_echo "$gl_cv_func_printf_directive_n" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'ls' directive" >&5
$as_echo_n "checking whether printf supports the 'ls' directive... " >&6; }
-if test "${gl_cv_func_printf_directive_ls+set}" = set; then :
+if ${gl_cv_func_printf_directive_ls+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -15660,57 +19199,9 @@ $as_echo "$gl_cv_func_printf_directive_ls" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
-$as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
-if test "${gl_cv_func_printf_positions+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- if test "$cross_compiling" = yes; then :
-
- case "$host_os" in
- netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
- gl_cv_func_printf_positions="guessing no";;
- beos*) gl_cv_func_printf_positions="guessing no";;
- mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
- *) gl_cv_func_printf_positions="guessing yes";;
- esac
-
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <stdio.h>
-#include <string.h>
-/* The string "%2$d %1$d", with dollar characters protected from the shell's
- dollar expansion (possibly an autoconf bug). */
-static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
-static char buf[100];
-int main ()
-{
- sprintf (buf, format, 33, 55);
- return (strcmp (buf, "55 33") != 0);
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- gl_cv_func_printf_positions=yes
-else
- gl_cv_func_printf_positions=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
-$as_echo "$gl_cv_func_printf_positions" >&6; }
-
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the grouping flag" >&5
$as_echo_n "checking whether printf supports the grouping flag... " >&6; }
-if test "${gl_cv_func_printf_flag_grouping+set}" = set; then :
+if ${gl_cv_func_printf_flag_grouping+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -15756,7 +19247,7 @@ $as_echo "$gl_cv_func_printf_flag_grouping" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the left-adjust flag correctly" >&5
$as_echo_n "checking whether printf supports the left-adjust flag correctly... " >&6; }
-if test "${gl_cv_func_printf_flag_leftadjust+set}" = set; then :
+if ${gl_cv_func_printf_flag_leftadjust+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -15805,7 +19296,7 @@ $as_echo "$gl_cv_func_printf_flag_leftadjust" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the zero flag correctly" >&5
$as_echo_n "checking whether printf supports the zero flag correctly... " >&6; }
-if test "${gl_cv_func_printf_flag_zero+set}" = set; then :
+if ${gl_cv_func_printf_flag_zero+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -15827,9 +19318,10 @@ else
#include <stdio.h>
#include <string.h>
static char buf[100];
+static double zero = 0.0;
int main ()
{
- if (sprintf (buf, "%010f", 1.0 / 0.0, 33, 44, 55) < 0
+ if (sprintf (buf, "%010f", 1.0 / zero, 33, 44, 55) < 0
|| (strcmp (buf, " inf") != 0
&& strcmp (buf, " infinity") != 0))
return 1;
@@ -15854,14 +19346,14 @@ $as_echo "$gl_cv_func_printf_flag_zero" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports large precisions" >&5
$as_echo_n "checking whether printf supports large precisions... " >&6; }
-if test "${gl_cv_func_printf_precision+set}" = set; then :
+if ${gl_cv_func_printf_precision+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
case "$host_os" in
- # Guess no only on Solaris, native Win32, and BeOS systems.
+ # Guess no only on Solaris, native Windows, and BeOS systems.
solaris*) gl_cv_func_printf_precision="guessing no" ;;
mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
beos*) gl_cv_func_printf_precision="guessing no" ;;
@@ -15889,6 +19381,9 @@ int main ()
if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5
|| buf[0] != '1')
result |= 4;
+ if (sprintf (buf, "%.999f %d", 1.0, 33, 44) < 999 + 5
+ || buf[0] != '1')
+ result |= 4;
return result;
}
_ACEOF
@@ -15911,7 +19406,7 @@ $as_echo "$gl_cv_func_printf_precision" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf survives out-of-memory conditions" >&5
$as_echo_n "checking whether printf survives out-of-memory conditions... " >&6; }
-if test "${gl_cv_func_printf_enomem+set}" = set; then :
+if ${gl_cv_func_printf_enomem+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -15924,7 +19419,7 @@ else
#include <stdlib.h>
#if defined __MACH__ && defined __APPLE__
-/* Avoid a crash on MacOS X. */
+/* Avoid a crash on Mac OS X. */
#include <mach/mach.h>
#include <mach/mach_error.h>
#include <mach/thread_status.h>
@@ -15985,6 +19480,34 @@ nocrash_init (void)
}
}
}
+#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Avoid a crash on native Windows. */
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <winerror.h>
+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 <signal.h>
@@ -16057,8 +19580,9 @@ _ACEOF
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && test -s conftest$ac_exeext; then
- (./conftest
+ (./conftest 2>&5
result=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $result" >&5
if test $result != 0 && test $result != 77; then result=1; fi
exit $result
) >/dev/null 2>/dev/null
@@ -16150,15 +19674,46 @@ $as_echo "$CXX_CHOICE" >&6; }
+ GNULIB_OPENDIR=0;
+ GNULIB_READDIR=0;
+ GNULIB_REWINDDIR=0;
+ GNULIB_CLOSEDIR=0;
+ GNULIB_DIRFD=0;
+ GNULIB_FDOPENDIR=0;
+ GNULIB_SCANDIR=0;
+ GNULIB_ALPHASORT=0;
+ HAVE_OPENDIR=1;
+ HAVE_READDIR=1;
+ HAVE_REWINDDIR=1;
+ HAVE_CLOSEDIR=1;
+ HAVE_DECL_DIRFD=1;
+ HAVE_DECL_FDOPENDIR=1;
+ HAVE_FDOPENDIR=1;
+ HAVE_SCANDIR=1;
+ HAVE_ALPHASORT=1;
+ REPLACE_OPENDIR=0;
+ REPLACE_CLOSEDIR=0;
+ REPLACE_DIRFD=0;
+ REPLACE_FDOPENDIR=0;
+
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ungetc works on arbitrary bytes" >&5
$as_echo_n "checking whether ungetc works on arbitrary bytes... " >&6; }
-if test "${gl_cv_func_ungetc_works+set}" = set; then :
+if ${gl_cv_func_ungetc_works+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
- gl_cv_func_ungetc_works='guessing no'
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_ungetc_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_ungetc_works="guessing no" ;;
+ esac
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -16199,21 +19754,279 @@ fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ungetc_works" >&5
$as_echo "$gl_cv_func_ungetc_works" >&6; }
- if test "$gl_cv_func_ungetc_works" != yes; then
+ case "$gl_cv_func_ungetc_works" in
+ *yes) ;;
+ *)
$as_echo "#define FUNC_UNGETC_BROKEN 1" >>confdefs.h
- fi
+ ;;
+ esac
+ { $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
- GNULIB_SETLOCALE=0;
- GNULIB_DUPLOCALE=0;
- HAVE_DUPLOCALE=1;
- REPLACE_SETLOCALE=0;
- REPLACE_DUPLOCALE=0;
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# if HAVE_UNISTD_H
+# include <unistd.h>
+# else /* on Windows with MSVC */
+# include <direct.h>
+# 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 <unistd.h>
+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 <inttypes.h>" >&5
+$as_echo_n "checking absolute name of <inttypes.h>... " >&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 <inttypes.h>
+
+_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 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 <inttypes.h>
+#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
@@ -16221,7 +20034,7 @@ $as_echo "#define FUNC_UNGETC_BROKEN 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
$as_echo_n "checking for LC_MESSAGES... " >&6; }
-if test "${gt_cv_val_LC_MESSAGES+set}" = set; then :
+if ${gt_cv_val_LC_MESSAGES+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -16254,7 +20067,7 @@ $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
-if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then :
+if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
$as_echo_n "(cached) " >&6
else
gt_save_LIBS="$LIBS"
@@ -16288,7 +20101,7 @@ $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
-if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then :
+if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
$as_echo_n "(cached) " >&6
else
gt_save_LIBS="$LIBS"
@@ -16327,7 +20140,7 @@ $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
-if test "x$ac_cv_have_decl_setenv" = x""yes; then :
+if test "x$ac_cv_have_decl_setenv" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -16346,73 +20159,6 @@ _ACEOF
HAVE_DECL_SETENV=0
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 test "${gl_cv_func_setenv_works+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- gl_cv_func_setenv_works="guessing no"
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #include <stdlib.h>
- #include <errno.h>
- #include <string.h>
-
-int
-main ()
-{
-
- int result = 0;
- {
- if (setenv ("", "", 0) != -1)
- result |= 1;
- else if (errno != EINVAL)
- result |= 2;
- }
- {
- if (setenv ("a", "=", 1) != 0)
- result |= 4;
- else if (strcmp (getenv ("a"), "=") != 0)
- result |= 8;
- }
- return result;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- gl_cv_func_setenv_works=yes
-else
- gl_cv_func_setenv_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
-$as_echo "$gl_cv_func_setenv_works" >&6; }
- if test "$gl_cv_func_setenv_works" != yes; then
- REPLACE_SETENV=1
-
-
-
-
-
-
-
-
- M4tests_LIBOBJS="$M4tests_LIBOBJS setenv.$ac_objext"
-
- fi
- fi
@@ -16420,7 +20166,7 @@ $as_echo "$gl_cv_func_setenv_works" >&6; }
for ac_header in search.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
-if test "x$ac_cv_header_search_h" = x""yes; then :
+if test "x$ac_cv_header_search_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SEARCH_H 1
_ACEOF
@@ -16432,7 +20178,7 @@ done
for ac_func in tsearch
do :
ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
-if test "x$ac_cv_func_tsearch" = x""yes; then :
+if test "x$ac_cv_func_tsearch" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_TSEARCH 1
_ACEOF
@@ -16444,32 +20190,21 @@ done
-ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strdup" = x""yes; then :
- ac_have_decl=1
-else
- ac_have_decl=0
-fi
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRDUP $ac_have_decl
-_ACEOF
-ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
-if test "x$ac_cv_have_decl_alarm" = x""yes; then :
+ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strdup" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
fi
cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_ALARM $ac_have_decl
+#define HAVE_DECL_STRDUP $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" = x""yes; then :
+if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -16504,7 +20239,6 @@ fi
gl_source_base='lib'
- # Code from module alloca-opt:
if test $ac_cv_func_alloca_works = no; then
@@ -16515,7 +20249,7 @@ fi
if test $ac_cv_working_alloca_h = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
-if test "${gl_cv_rpl_alloca+set}" = set; then :
+if ${gl_cv_rpl_alloca+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -16551,10 +20285,15 @@ $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
ALLOCA_H=alloca.h
fi
+ if test -n "$ALLOCA_H"; then
+ GL_GENERATE_ALLOCA_H_TRUE=
+ GL_GENERATE_ALLOCA_H_FALSE='#'
+else
+ GL_GENERATE_ALLOCA_H_TRUE='#'
+ GL_GENERATE_ALLOCA_H_FALSE=
+fi
+
- # Code from module announce-gen:
- # Code from module arg-nonnull:
- # Code from module assert:
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5
$as_echo_n "checking whether to enable assertions... " >&6; }
@@ -16576,10 +20315,6 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_assert" >&5
$as_echo "$enable_assert" >&6; }
- # Code from module autobuild:
- # Code from module avltree-oset:
- # Code from module binary-io:
- # Code from module btowc:
@@ -16595,7 +20330,7 @@ $as_echo "$enable_assert" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
$as_echo_n "checking whether btowc(0) is correct... " >&6; }
-if test "${gl_cv_func_btowc_nul+set}" = set; then :
+if ${gl_cv_func_btowc_nul+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -16644,7 +20379,7 @@ $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 test "${gl_cv_func_btowc_eof+set}" = set; then :
+if ${gl_cv_func_btowc_eof+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -16705,10 +20440,8 @@ $as_echo "$gl_cv_func_btowc_eof" >&6; }
*) REPLACE_BTOWC=1 ;;
esac
fi
- if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
-
- :
+ if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
@@ -16727,7 +20460,10 @@ $as_echo "$gl_cv_func_btowc_eof" >&6; }
- GNULIB_BTOWC=1
+
+ GNULIB_BTOWC=1
+
+
@@ -16735,9 +20471,6 @@ $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
- # Code from module c++defs:
- # Code from module c-ctype:
- # Code from module c-stack:
@@ -16748,7 +20481,7 @@ $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
ac_fn_c_check_decl "$LINENO" "sigaltstack" "ac_cv_have_decl_sigaltstack" "#include <signal.h>
"
-if test "x$ac_cv_have_decl_sigaltstack" = x""yes; then :
+if test "x$ac_cv_have_decl_sigaltstack" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -16763,7 +20496,7 @@ _ACEOF
ac_fn_c_check_type "$LINENO" "stack_t" "ac_cv_type_stack_t" "#include <signal.h>
"
-if test "x$ac_cv_type_stack_t" = x""yes; then :
+if test "x$ac_cv_type_stack_t" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STACK_T 1
@@ -16782,27 +20515,31 @@ fi
fi
- # Code from module canonicalize-lgpl:
+
if test $ac_cv_func_canonicalize_file_name = no; then
HAVE_CANONICALIZE_FILE_NAME=0
-
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS canonicalize-lgpl.$ac_objext"
-
if test $ac_cv_func_realpath = no; then
HAVE_REALPATH=0
- elif test "$gl_cv_func_realpath_works" != yes; then
- REPLACE_REALPATH=1
+ else
+ case "$gl_cv_func_realpath_works" in
+ *yes) ;;
+ *) REPLACE_REALPATH=1 ;;
+ esac
fi
- elif test "$gl_cv_func_realpath_works" != yes; then
+ else
+ case "$gl_cv_func_realpath_works" in
+ *yes)
+ ;;
+ *)
+ REPLACE_CANONICALIZE_FILE_NAME=1
+ REPLACE_REALPATH=1
+ ;;
+ esac
+ fi
+
+ if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
@@ -16813,12 +20550,9 @@ fi
M4_LIBOBJS="$M4_LIBOBJS canonicalize-lgpl.$ac_objext"
- REPLACE_REALPATH=1
- REPLACE_CANONICALIZE_FILE_NAME=1
fi
-
cat >>confdefs.h <<_ACEOF
#define GNULIB_CANONICALIZE_LGPL 1
_ACEOF
@@ -16827,7 +20561,11 @@ _ACEOF
- GNULIB_CANONICALIZE_FILE_NAME=1
+
+
+ GNULIB_CANONICALIZE_FILE_NAME=1
+
+
@@ -16838,19 +20576,16 @@ $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
- GNULIB_REALPATH=1
+ GNULIB_REALPATH=1
-$as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
- # Code from module clean-temp:
-$as_echo "#define SIGNAL_SAFE_LIST 1" >>confdefs.h
+$as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
- # Code from module cloexec:
@@ -16858,87 +20593,108 @@ $as_echo "#define SIGNAL_SAFE_LIST 1" >>confdefs.h
+ GNULIB_CHDIR=1
- M4_LIBOBJS="$M4_LIBOBJS cloexec.$ac_objext"
+$as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
-$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
- # Code from module close:
+
+$as_echo "#define SIGNAL_SAFE_LIST 1" >>confdefs.h
+$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
- GNULIB_CLOSE=1
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ REPLACE_CLOSE=1
+ fi
-$as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
- # Code from module close-hook:
- # Code from module close-stream:
+ 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
- M4_LIBOBJS="$M4_LIBOBJS close-stream.$ac_objext"
- :
-cat >>confdefs.h <<_ACEOF
-#define GNULIB_CLOSE_STREAM 1
-_ACEOF
- # Code from module closein:
+ M4_LIBOBJS="$M4_LIBOBJS close.$ac_objext"
+ fi
+ GNULIB_CLOSE=1
- M4_LIBOBJS="$M4_LIBOBJS closein.$ac_objext"
- :
+$as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
- # Code from module closeout:
+ :
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_CLOSE_STREAM 1
+_ACEOF
- M4_LIBOBJS="$M4_LIBOBJS closeout.$ac_objext"
+ :
- :
+ :
- # Code from module config-h:
- # Code from module configmake:
if test "x$datarootdir" = x; then
datarootdir='${datadir}'
@@ -16976,29 +20732,8 @@ _ACEOF
pkglibexecdir='${libexecdir}/${PACKAGE}'
- # Code from module dirname:
-
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS basename.$ac_objext"
-
-
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS dirname.$ac_objext"
-
@@ -17007,49 +20742,15 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
- # Code from module dirname-lgpl:
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS basename-lgpl.$ac_objext"
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS dirname-lgpl.$ac_objext"
-
-
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS stripslash.$ac_objext"
-
-
-
-
-
- # Code from module dosname:
- # Code from module double-slash-root:
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
$as_echo_n "checking whether // is distinct from /... " >&6; }
-if test "${gl_cv_double_slash_root+set}" = set; then :
+if ${gl_cv_double_slash_root+:} false; then :
$as_echo_n "(cached) " >&6
else
if test x"$cross_compiling" = xyes ; then
@@ -17084,43 +20785,34 @@ $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
fi
- # Code from module dup2:
-
-
-
-
- if test $ac_cv_func_dup2 = no; then
- HAVE_DUP2=0
+$as_echo "#define HAVE_DUP2 1" >>confdefs.h
-
- M4_LIBOBJS="$M4_LIBOBJS dup2.$ac_objext"
-
- else
+ 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 test "${gl_cv_func_dup2_works+set}" = set; then :
+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=no;;
+ gl_cv_func_dup2_works="guessing no" ;;
cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
- gl_cv_func_dup2_works=no;;
+ gl_cv_func_dup2_works="guessing no" ;;
linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
# closed fd may yield -EBADF instead of -1 / errno=EBADF.
- gl_cv_func_dup2_works=no;;
+ gl_cv_func_dup2_works="guessing no" ;;
freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
- gl_cv_func_dup2_works=no;;
+ gl_cv_func_dup2_works="guessing no" ;;
haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
- gl_cv_func_dup2_works=no;;
- *) gl_cv_func_dup2_works=yes;;
+ gl_cv_func_dup2_works="guessing no" ;;
+ *) gl_cv_func_dup2_works="guessing yes" ;;
esac
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -17133,13 +20825,13 @@ int
main ()
{
int result = 0;
-#if HAVE_FCNTL
+#ifdef FD_CLOEXEC
if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
result |= 1;
-#endif HAVE_FCNTL
+#endif
if (dup2 (1, 1) == 0)
result |= 2;
-#if HAVE_FCNTL
+#ifdef FD_CLOEXEC
if (fcntl (1, F_GETFD) != FD_CLOEXEC)
result |= 4;
#endif
@@ -17149,6 +20841,9 @@ int result = 0;
/* Many gnulib modules require POSIX conformance of EBADF. */
if (dup2 (2, 1000000) == -1 && errno != EBADF)
result |= 16;
+ /* Flush out a cygwin core dump. */
+ if (dup2 (2, -1) != -1 || errno != EBADF)
+ result |= 32;
return result;
;
@@ -17169,12 +20864,16 @@ fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
$as_echo "$gl_cv_func_dup2_works" >&6; }
- if test "$gl_cv_func_dup2_works" = no; then
+ case "$gl_cv_func_dup2_works" in
+ *yes) ;;
+ *)
+ REPLACE_DUP2=1
+ ;;
+ esac
+ fi
- if test $ac_cv_func_dup2 = yes; then
- REPLACE_DUP2=1
- fi
+ if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
@@ -17186,53 +20885,43 @@ $as_echo "$gl_cv_func_dup2_works" >&6; }
M4_LIBOBJS="$M4_LIBOBJS dup2.$ac_objext"
- fi
fi
- GNULIB_DUP2=1
-
-
-
-$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
-
-
- # Code from module environ:
+ GNULIB_DUP2=1
- GNULIB_ENVIRON=1
+$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
-$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
- # Code from module errno:
-
- # Code from module error:
+ GNULIB_ENVIRON=1
+$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
$as_echo_n "checking for error_at_line... " >&6; }
-if test "${ac_cv_lib_error_at_line+set}" = set; then :
+if ${ac_cv_lib_error_at_line+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -17256,6 +20945,7 @@ rm -f core conftest.err conftest.$ac_objext \
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
$as_echo "$ac_cv_lib_error_at_line" >&6; }
+
if test $ac_cv_lib_error_at_line = no; then
@@ -17267,68 +20957,146 @@ $as_echo "$ac_cv_lib_error_at_line" >&6; }
M4_LIBOBJS="$M4_LIBOBJS error.$ac_objext"
+
+
+ :
+
fi
- :
- XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
+ :
- XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
- # Code from module execute:
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
+$as_echo_n "checking whether fflush works on input streams... " >&6; }
+if ${gl_cv_func_fflush_stdin+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ echo hello world > conftest.txt
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_fflush_stdin=cross
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#else /* on Windows with MSVC */
+# include <io.h>
+#endif
- # Code from module exitfail:
- # Code from module extensions:
- # Code from module fatal-signal:
+int
+main ()
+{
+FILE *f = fopen ("conftest.txt", "r");
+ char buffer[10];
+ int fd;
+ int c;
+ if (f == NULL)
+ return 1;
+ fd = fileno (f);
+ if (fd < 0 || fread (buffer, 1, 5, f) != 5)
+ return 2;
+ /* For deterministic results, ensure f read a bigger buffer. */
+ if (lseek (fd, 0, SEEK_CUR) == 5)
+ return 3;
+ /* POSIX requires fflush-fseek to set file offset of fd. This fails
+ on BSD systems and on mingw. */
+ if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
+ return 4;
+ if (lseek (fd, 0, SEEK_CUR) != 5)
+ return 5;
+ /* Verify behaviour of fflush after ungetc. See
+ <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
+ /* Verify behaviour of fflush after a backup ungetc. This fails on
+ mingw. */
+ c = fgetc (f);
+ ungetc (c, f);
+ fflush (f);
+ if (fgetc (f) != c)
+ return 6;
+ /* Verify behaviour of fflush after a non-backup ungetc. This fails
+ on glibc 2.8 and on BSD systems. */
+ c = fgetc (f);
+ ungetc ('@', f);
+ fflush (f);
+ if (fgetc (f) != c)
+ return 7;
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_fflush_stdin=yes
+else
+ gl_cv_func_fflush_stdin=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+ rm conftest.txt
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
+$as_echo "$gl_cv_func_fflush_stdin" >&6; }
+ case $gl_cv_func_fflush_stdin in
+ yes) gl_func_fflush_stdin=1 ;;
+ no) gl_func_fflush_stdin=0 ;;
+ *) gl_func_fflush_stdin='(-1)' ;;
+ esac
+cat >>confdefs.h <<_ACEOF
+#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
+_ACEOF
+ if test $gl_cv_func_fflush_stdin != yes; then
+ REPLACE_FCLOSE=1
+ fi
- # Code from module fclose:
+ if test $REPLACE_CLOSE = 1; then
+ REPLACE_FCLOSE=1
+ fi
+ if test $REPLACE_FCLOSE = 1; then
- GNULIB_FCLOSE=1
-$as_echo "#define GNULIB_TEST_FCLOSE 1" >>confdefs.h
+ M4_LIBOBJS="$M4_LIBOBJS fclose.$ac_objext"
+ fi
- # Code from module fcntl:
+ GNULIB_FCLOSE=1
- if test $ac_cv_func_fcntl = no; then
- if test $ac_cv_func_fcntl = no; then
- HAVE_FCNTL=0
- else
- REPLACE_FCNTL=1
- fi
+$as_echo "#define GNULIB_TEST_FCLOSE 1" >>confdefs.h
@@ -17336,13 +21104,21 @@ $as_echo "#define GNULIB_TEST_FCLOSE 1" >>confdefs.h
- M4_LIBOBJS="$M4_LIBOBJS fcntl.$ac_objext"
+
+ if test $ac_cv_func_fcntl = no; then
+
+ if test $ac_cv_func_fcntl = no; then
+ HAVE_FCNTL=0
+ else
+ REPLACE_FCNTL=1
+ fi
+
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
-if test "${gl_cv_func_fcntl_f_dupfd_works+set}" = set; then :
+if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
@@ -17394,23 +21170,13 @@ $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
fi
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS fcntl.$ac_objext"
-
-
-
$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
-if test "${gl_cv_func_fcntl_f_dupfd_cloexec+set}" = set; then :
+if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -17470,23 +21236,30 @@ $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
REPLACE_FCNTL=1
fi
+ fi
+ fi
+ if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
- M4_LIBOBJS="$M4_LIBOBJS fcntl.$ac_objext"
- fi
+
+ M4_LIBOBJS="$M4_LIBOBJS fcntl.$ac_objext"
+
fi
- GNULIB_FCNTL=1
+
+ GNULIB_FCNTL=1
+
+
@@ -17494,7 +21267,6 @@ $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
- # Code from module fcntl-h:
@@ -17511,7 +21283,7 @@ $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
-if test "${gl_cv_next_fcntl_h+set}" = set; then :
+if ${gl_cv_next_fcntl_h+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -17524,13 +21296,27 @@ _ACEOF
aix*) gl_absname_cpp="$ac_cpp -C" ;;
*) gl_absname_cpp="$ac_cpp" ;;
esac
+
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+ gl_header_literal_regex=`echo '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 '\#/fcntl.h#{
- s#.*"\(.*/fcntl.h\)".*#\1#
- s#^/[^/]#//&#
- p
- q
- }'`'"'
+ sed -n "$gl_absolute_header_sed"`'"'
fi
@@ -17554,7 +21340,10 @@ $as_echo "$gl_cv_next_fcntl_h" >&6; }
- # Code from module fd-safer-flag:
+
+
+
+
cat >>confdefs.h <<_ACEOF
@@ -17562,23 +21351,28 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
- # Code from module fdl-1.3:
- # Code from module fflush:
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
$as_echo_n "checking whether fflush works on input streams... " >&6; }
-if test "${gl_cv_func_fflush_stdin+set}" = set; then :
+if ${gl_cv_func_fflush_stdin+:} false; then :
$as_echo_n "(cached) " >&6
else
echo hello world > conftest.txt
if test "$cross_compiling" = yes; then :
- gl_cv_func_fflush_stdin=no
+ gl_cv_func_fflush_stdin=cross
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
-#include <unistd.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#else /* on Windows with MSVC */
+# include <io.h>
+#endif
int
main ()
@@ -17637,31 +21431,22 @@ fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
$as_echo "$gl_cv_func_fflush_stdin" >&6; }
- if test $gl_cv_func_fflush_stdin = no; then
-
-
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS fflush.$ac_objext"
-
-
- REPLACE_FFLUSH=1
-
-
- :
-
+ case $gl_cv_func_fflush_stdin in
+ yes) gl_func_fflush_stdin=1 ;;
+ no) gl_func_fflush_stdin=0 ;;
+ *) gl_func_fflush_stdin='(-1)' ;;
+ esac
+cat >>confdefs.h <<_ACEOF
+#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
+_ACEOF
- if test $gl_cv_func_fseeko = yes; then
- REPLACE_FSEEKO=1
+ if test $gl_cv_func_fflush_stdin != yes; then
+ REPLACE_FFLUSH=1
fi
+ if test $REPLACE_FFLUSH = 1; then
@@ -17669,36 +21454,34 @@ $as_echo "$gl_cv_func_fflush_stdin" >&6; }
- M4_LIBOBJS="$M4_LIBOBJS fseeko.$ac_objext"
-
-
+ M4_LIBOBJS="$M4_LIBOBJS fflush.$ac_objext"
+ :
fi
-
-
- GNULIB_FFLUSH=1
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_FFLUSH 1
+_ACEOF
-$as_echo "#define GNULIB_TEST_FFLUSH 1" >>confdefs.h
- # Code from module filenamecat:
+ GNULIB_FFLUSH=1
+$as_echo "#define GNULIB_TEST_FFLUSH 1" >>confdefs.h
- M4_LIBOBJS="$M4_LIBOBJS filenamecat.$ac_objext"
@@ -17708,29 +21491,122 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
- # Code from module filenamecat-lgpl:
+ 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
- M4_LIBOBJS="$M4_LIBOBJS filenamecat-lgpl.$ac_objext"
+ 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. */
- # Code from module float:
+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
- FLOAT_H=
- case "$host_os" in
- beos* | openbsd* | mirbsd*)
- FLOAT_H=float.h
+ if test -n "$FLOAT_H"; then
@@ -17744,7 +21620,7 @@ _ACEOF
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
$as_echo_n "checking absolute name of <float.h>... " >&6; }
-if test "${gl_cv_next_float_h+set}" = set; then :
+if ${gl_cv_next_float_h+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -17757,13 +21633,27 @@ _ACEOF
aix*) gl_absname_cpp="$ac_cpp -C" ;;
*) gl_absname_cpp="$ac_cpp" ;;
esac
+
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+ gl_header_literal_regex=`echo 'float.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n '\#/float.h#{
- s#.*"\(.*/float.h\)".*#\1#
- s#^/[^/]#//&#
- p
- q
- }'`'"'
+ sed -n "$gl_absolute_header_sed"`'"'
fi
@@ -17784,11 +21674,42 @@ $as_echo "$gl_cv_next_float_h" >&6; }
- ;;
- esac
+ fi
+
+ if test -n "$FLOAT_H"; then
+ GL_GENERATE_FLOAT_H_TRUE=
+ GL_GENERATE_FLOAT_H_FALSE='#'
+else
+ GL_GENERATE_FLOAT_H_TRUE='#'
+ GL_GENERATE_FLOAT_H_FALSE=
+fi
+
+
+
+ if test $REPLACE_FLOAT_LDBL = 1; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS float.$ac_objext"
+
+ fi
+ if test $REPLACE_ITOLD = 1; then
- # Code from module fopen:
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS itold.$ac_objext"
+
+ fi
@@ -17800,7 +21721,7 @@ $as_echo "$gl_cv_next_float_h" >&6; }
*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
$as_echo_n "checking whether fopen recognizes a trailing slash... " >&6; }
-if test "${gl_cv_func_fopen_slash+set}" = set; then :
+if ${gl_cv_func_fopen_slash+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -17848,6 +21769,7 @@ $as_echo "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
REPLACE_FOPEN=1
;;
esac
+
if test $REPLACE_FOPEN = 1; then
@@ -17859,15 +21781,16 @@ $as_echo "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
M4_LIBOBJS="$M4_LIBOBJS fopen.$ac_objext"
+ :
+ fi
- fi
+ GNULIB_FOPEN=1
- GNULIB_FOPEN=1
@@ -17875,92 +21798,109 @@ $as_echo "#define GNULIB_TEST_FOPEN 1" >>confdefs.h
- # Code from module fopen-safer:
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_FOPEN_SAFER 1
+_ACEOF
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpending" >&5
+$as_echo_n "checking for __fpending... " >&6; }
+if ${gl_cv_func___fpending+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+ #if HAVE_STDIO_EXT_H
+ # include <stdio_ext.h>
+ #endif
+int
+main ()
+{
+return ! __fpending (stdin);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func___fpending=yes
+else
+ gl_cv_func___fpending=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
- M4_LIBOBJS="$M4_LIBOBJS fopen-safer.$ac_objext"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func___fpending" >&5
+$as_echo "$gl_cv_func___fpending" >&6; }
+ if test $gl_cv_func___fpending = no; then
-cat >>confdefs.h <<_ACEOF
-#define GNULIB_FOPEN_SAFER 1
-_ACEOF
- # Code from module fpending:
- fp_headers='
-# include <stdio.h>
-# if HAVE_STDIO_EXT_H
-# include <stdio_ext.h>
-# endif
-'
- ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
-"
-if test "x$ac_cv_have_decl___fpending" = x""yes; then :
- ac_have_decl=1
-else
- ac_have_decl=0
-fi
+ M4_LIBOBJS="$M4_LIBOBJS fpending.$ac_objext"
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL___FPENDING $ac_have_decl
-_ACEOF
- if test $ac_cv_func___fpending = no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
$as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
-if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- for ac_expr in \
- \
- '# glibc2' \
- 'fp->_IO_write_ptr - fp->_IO_write_base' \
- \
- '# traditional Unix' \
- 'fp->_ptr - fp->_base' \
- \
- '# BSD' \
- 'fp->_p - fp->_bf._base' \
- \
- '# SCO, Unixware' \
- '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
- \
- '# QNX' \
- '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
- \
- '# old glibc?' \
- 'fp->__bufp - fp->__buffer' \
- \
- '# old glibc iostream?' \
- 'fp->_pptr - fp->_pbase' \
- \
- '# emx+gcc' \
- 'fp->_ptr - fp->_buffer' \
- \
- '# VMS' \
- '(*fp)->_ptr - (*fp)->_base' \
- \
- '# e.g., DGUX R4.11; the info is not available' \
- 1 \
- ; do
-
- # Skip each embedded comment.
- case "$ac_expr" in '#'*) continue;; esac
+if ${ac_cv_sys_pending_output_n_bytes+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ for ac_expr in \
+ \
+ '# glibc2' \
+ 'fp->_IO_write_ptr - fp->_IO_write_base' \
+ \
+ '# traditional Unix' \
+ 'fp->_ptr - fp->_base' \
+ \
+ '# BSD' \
+ 'fp->_p - fp->_bf._base' \
+ \
+ '# SCO, Unixware' \
+ '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
+ \
+ '# QNX' \
+ '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
+ \
+ '# old glibc?' \
+ 'fp->__bufp - fp->__buffer' \
+ \
+ '# old glibc iostream?' \
+ 'fp->_pptr - fp->_pbase' \
+ \
+ '# emx+gcc' \
+ 'fp->_ptr - fp->_buffer' \
+ \
+ '# Minix' \
+ 'fp->_ptr - fp->_buf' \
+ \
+ '# Plan9' \
+ 'fp->wp - fp->buf' \
+ \
+ '# VMS' \
+ '(*fp)->_ptr - (*fp)->_base' \
+ \
+ '# e.g., DGUX R4.11; the info is not available' \
+ 1 \
+ ; do
+
+ # Skip each embedded comment.
+ case "$ac_expr" in '#'*) continue;; esac
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
int
@@ -17976,10 +21916,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- test "$fp_done" = yes && break
- done
+ test "$fp_done" = yes && break
+ done
- ac_cv_sys_pending_output_n_bytes=$ac_expr
+ ac_cv_sys_pending_output_n_bytes=$ac_expr
fi
@@ -17991,27 +21931,14 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS fpending.$ac_objext"
-
fi
- # Code from module fpieee:
- # Code from module fpucw:
- # Code from module fpurge:
-
ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
"
-if test "x$ac_cv_have_decl_fpurge" = x""yes; then :
+if test "x$ac_cv_have_decl_fpurge" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -18022,10 +21949,11 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
if test "x$ac_cv_func_fpurge" = xyes; then
+ HAVE_FPURGE=1
# Detect BSD bug. Only cygwin 1.7 is known to be immune.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
$as_echo_n "checking whether fpurge works... " >&6; }
-if test "${gl_cv_func_fpurge_works+set}" = set; then :
+if ${gl_cv_func_fpurge_works+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
@@ -18072,6 +22000,15 @@ fi
$as_echo "$gl_cv_func_fpurge_works" >&6; }
if test "x$gl_cv_func_fpurge_works" != xyes; then
REPLACE_FPURGE=1
+ fi
+ else
+ HAVE_FPURGE=0
+ fi
+ if test "x$ac_cv_have_decl_fpurge" = xno; then
+ HAVE_DECL_FPURGE=0
+ fi
+
+ if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
@@ -18082,49 +22019,50 @@ $as_echo "$gl_cv_func_fpurge_works" >&6; }
M4_LIBOBJS="$M4_LIBOBJS fpurge.$ac_objext"
- fi
- else
+ fi
+ GNULIB_FPURGE=1
- M4_LIBOBJS="$M4_LIBOBJS fpurge.$ac_objext"
- fi
- if test "x$ac_cv_have_decl_fpurge" = xno; then
- HAVE_DECL_FPURGE=0
- fi
+$as_echo "#define GNULIB_TEST_FPURGE 1" >>confdefs.h
- GNULIB_FPURGE=1
-$as_echo "#define GNULIB_TEST_FPURGE 1" >>confdefs.h
+ if test $ac_cv_func___freadahead = no; then
- # Code from module freadahead:
- # Code from module freading:
- # Code from module frexp-nolibm:
+
+
+ M4_LIBOBJS="$M4_LIBOBJS freadahead.$ac_objext"
+
+ fi
+
+
+
if test $gl_cv_func_frexp_no_libm = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
$as_echo_n "checking whether frexp works... " >&6; }
-if test "${gl_cv_func_frexp_works+set}" = set; then :
+if ${gl_cv_func_frexp_works+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -18141,10 +22079,14 @@ else
#include <float.h>
#include <math.h>
#include <string.h>
+#if HAVE_DECL_ALARM
+# include <signal.h>
+# include <unistd.h>
+#endif
/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
ICC 10.0 has a bug when optimizing the expression -zero.
The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
- to PowerPC on MacOS X 10.5. */
+ to PowerPC on Mac OS X 10.5. */
#if defined __hpux || defined __sgi || defined __ICC
static double
compute_minus_zero (void)
@@ -18161,6 +22103,12 @@ int main()
int i;
volatile double x;
double zero = 0.0;
+#if HAVE_DECL_ALARM
+ /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
+ number. Let the test fail in this case. */
+ signal (SIGALRM, SIG_DFL);
+ alarm (5);
+#endif
/* Test on denormalized numbers. */
for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
;
@@ -18174,7 +22122,7 @@ int main()
result |= 1;
}
/* Test on infinite numbers. */
- x = 1.0 / 0.0;
+ x = 1.0 / zero;
{
int exp;
double y = frexp (x, &exp);
@@ -18218,7 +22166,9 @@ $as_echo "$gl_cv_func_frexp_works" >&6; }
$as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
- else
+ fi
+
+ if test $gl_func_frexp_no_libm != yes; then
@@ -18234,7 +22184,10 @@ $as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
- GNULIB_FREXP=1
+
+ GNULIB_FREXP=1
+
+
@@ -18242,12 +22195,12 @@ $as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
- # Code from module frexpl-nolibm:
+
ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
"
-if test "x$ac_cv_have_decl_frexpl" = x""yes; then :
+if test "x$ac_cv_have_decl_frexpl" = xyes; then :
else
HAVE_DECL_FREXPL=0
@@ -18257,7 +22210,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
-if test "${gl_cv_func_frexpl_no_libm+set}" = set; then :
+if ${gl_cv_func_frexpl_no_libm+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -18290,7 +22243,7 @@ $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
$as_echo_n "checking whether frexpl works... " >&6; }
-if test "${gl_cv_func_frexpl_works+set}" = set; then :
+if ${gl_cv_func_frexpl_works+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -18313,7 +22266,25 @@ else
# undef LDBL_MIN_EXP
# define LDBL_MIN_EXP (-16381)
#endif
-extern long double frexpl (long double, int *);
+#if defined __i386__ && defined __FreeBSD__
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP (-16381)
+#endif
+#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
+#endif
+#if defined __sgi && (LDBL_MANT_DIG >= 106)
+# if defined __GNUC__
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP DBL_MIN_EXP
+# endif
+#endif
+extern
+#ifdef __cplusplus
+"C"
+#endif
+long double frexpl (long double, int *);
int main()
{
int result = 0;
@@ -18326,7 +22297,7 @@ int main()
if (exp != 5)
result |= 1;
}
- /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl
+ /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
function returns an invalid (incorrectly normalized) value: it returns
y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
but the correct result is
@@ -18365,7 +22336,7 @@ int main()
int exp;
long double y = frexpl (x, &exp);
/* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
- exp = -16382, y = 0.5. On MacOS X 10.5: exp = -16384, y = 0.5. */
+ exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
if (exp != LDBL_MIN_EXP - 1)
result |= 8;
}
@@ -18409,6 +22380,7 @@ $as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
fi
fi
+
if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
@@ -18425,7 +22397,10 @@ $as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
- GNULIB_FREXPL=1
+
+ GNULIB_FREXPL=1
+
+
@@ -18433,26 +22408,190 @@ $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
- # Code from module fseeko:
+
+
+
+ if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
+ REPLACE_FSEEK=1
+ fi
+
+ if test $REPLACE_FSEEK = 1; then
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fseek.$ac_objext"
+
+ fi
+
+
+
+
+
+ GNULIB_FSEEK=1
+
+
+
+
+
+$as_echo "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
+$as_echo_n "checking for fseeko... " >&6; }
+if ${gl_cv_func_fseeko+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+
+int
+main ()
+{
+fseeko (stdin, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_fseeko=yes
+else
+ gl_cv_func_fseeko=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
+$as_echo "$gl_cv_func_fseeko" >&6; }
+
+
if test $ac_cv_have_decl_fseeko = no; then
HAVE_DECL_FSEEKO=0
fi
if test $gl_cv_func_fseeko = no; then
HAVE_FSEEKO=0
+ else
+ if test $WINDOWS_64_BIT_OFF_T = 1; then
+ REPLACE_FSEEKO=1
+ fi
+ if test $gl_cv_var_stdin_large_offset = no; then
+ REPLACE_FSEEKO=1
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
+$as_echo_n "checking whether fflush works on input streams... " >&6; }
+if ${gl_cv_func_fflush_stdin+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ echo hello world > conftest.txt
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_fflush_stdin=cross
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#else /* on Windows with MSVC */
+# include <io.h>
+#endif
+
+int
+main ()
+{
+FILE *f = fopen ("conftest.txt", "r");
+ char buffer[10];
+ int fd;
+ int c;
+ if (f == NULL)
+ return 1;
+ fd = fileno (f);
+ if (fd < 0 || fread (buffer, 1, 5, f) != 5)
+ return 2;
+ /* For deterministic results, ensure f read a bigger buffer. */
+ if (lseek (fd, 0, SEEK_CUR) == 5)
+ return 3;
+ /* POSIX requires fflush-fseek to set file offset of fd. This fails
+ on BSD systems and on mingw. */
+ if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
+ return 4;
+ if (lseek (fd, 0, SEEK_CUR) != 5)
+ return 5;
+ /* Verify behaviour of fflush after ungetc. See
+ <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
+ /* Verify behaviour of fflush after a backup ungetc. This fails on
+ mingw. */
+ c = fgetc (f);
+ ungetc (c, f);
+ fflush (f);
+ if (fgetc (f) != c)
+ return 6;
+ /* Verify behaviour of fflush after a non-backup ungetc. This fails
+ on glibc 2.8 and on BSD systems. */
+ c = fgetc (f);
+ ungetc ('@', f);
+ fflush (f);
+ if (fgetc (f) != c)
+ return 7;
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_fflush_stdin=yes
+else
+ gl_cv_func_fflush_stdin=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm conftest.txt
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
+$as_echo "$gl_cv_func_fflush_stdin" >&6; }
+ case $gl_cv_func_fflush_stdin in
+ yes) gl_func_fflush_stdin=1 ;;
+ no) gl_func_fflush_stdin=0 ;;
+ *) gl_func_fflush_stdin='(-1)' ;;
+ esac
+
+cat >>confdefs.h <<_ACEOF
+#define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
+_ACEOF
+
+
+ if test $gl_cv_func_fflush_stdin != yes; then
+ REPLACE_FSEEKO=1
+ fi
- if test $gl_cv_func_fseeko = yes; then
- REPLACE_FSEEKO=1
fi
+ if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
+
@@ -18463,42 +22602,112 @@ $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
M4_LIBOBJS="$M4_LIBOBJS fseeko.$ac_objext"
+ for ac_func in _fseeki64
+do :
+ ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
+if test "x$ac_cv_func__fseeki64" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE__FSEEKI64 1
+_ACEOF
+
+fi
+done
+
+
+ fi
+
+
+
+
+
+ GNULIB_FSEEKO=1
+
- else
- if test $gl_cv_var_stdin_large_offset = no; then
- if test $gl_cv_func_fseeko = yes; then
- REPLACE_FSEEKO=1
+$as_echo "#define GNULIB_TEST_FSEEKO 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
- M4_LIBOBJS="$M4_LIBOBJS fseeko.$ac_objext"
- fi
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fstat.$ac_objext"
+
+ :
fi
- GNULIB_FSEEKO=1
+ GNULIB_FSTAT=1
-$as_echo "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
- # Code from module ftello:
+$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
+
+
+
+
+
+
+ if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
+ REPLACE_FTELL=1
+ fi
+
+ if test $REPLACE_FTELL = 1; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS ftell.$ac_objext"
+
+ fi
+
+
+
+
+
+ GNULIB_FTELL=1
+
+
+
+
+
+$as_echo "#define GNULIB_TEST_FTELL 1" >>confdefs.h
+
+
+
+
@@ -18513,7 +22722,7 @@ $as_echo "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
$as_echo_n "checking for ftello... " >&6; }
-if test "${gl_cv_func_ftello+set}" = set; then :
+if ${gl_cv_func_ftello+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -18542,13 +22751,17 @@ $as_echo "$gl_cv_func_ftello" >&6; }
if test $gl_cv_func_ftello = no; then
HAVE_FTELLO=0
else
+ if test $WINDOWS_64_BIT_OFF_T = 1; then
+ REPLACE_FTELLO=1
+ fi
if test $gl_cv_var_stdin_large_offset = no; then
REPLACE_FTELLO=1
- else
+ fi
+ if test $REPLACE_FTELLO = 0; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
$as_echo_n "checking whether ftello works... " >&6; }
-if test "${gl_cv_func_ftello_works+set}" = set; then :
+if ${gl_cv_func_ftello_works+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -18646,8 +22859,8 @@ $as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs
esac
fi
fi
- if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
+ if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
@@ -18659,12 +22872,27 @@ $as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs
M4_LIBOBJS="$M4_LIBOBJS ftello.$ac_objext"
+ for ac_func in _ftelli64
+do :
+ ac_fn_c_check_func "$LINENO" "_ftelli64" "ac_cv_func__ftelli64"
+if test "x$ac_cv_func__ftelli64" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE__FTELLI64 1
+_ACEOF
+
+fi
+done
+
+
fi
- GNULIB_FTELLO=1
+
+ GNULIB_FTELLO=1
+
+
@@ -18672,13 +22900,14 @@ $as_echo "#define GNULIB_TEST_FTELLO 1" >>confdefs.h
- # Code from module gendocs:
- # Code from module getdtablesize:
if test $ac_cv_func_getdtablesize != yes; then
HAVE_GETDTABLESIZE=0
+ fi
+
+ if test $HAVE_GETDTABLESIZE = 0; then
@@ -18689,12 +22918,16 @@ $as_echo "#define GNULIB_TEST_FTELLO 1" >>confdefs.h
M4_LIBOBJS="$M4_LIBOBJS getdtablesize.$ac_objext"
+ :
fi
- GNULIB_GETDTABLESIZE=1
+
+ GNULIB_GETDTABLESIZE=1
+
+
@@ -18702,43 +22935,41 @@ $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
- # Code from module getopt-gnu:
+ if test $REPLACE_GETOPT = 1; then
-$as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
- # Code from module getopt-posix:
+ M4_LIBOBJS="$M4_LIBOBJS getopt.$ac_objext"
- if test -n "$gl_replace_getopt"; then :
- GETOPT_H=getopt.h
-$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
- GNULIB_UNISTD_H_GETOPT=1
+ M4_LIBOBJS="$M4_LIBOBJS getopt1.$ac_objext"
+ GNULIB_GL_M4_UNISTD_H_GETOPT=1
+ fi
- M4_LIBOBJS="$M4_LIBOBJS getopt.$ac_objext"
+$as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
@@ -18746,77 +22977,77 @@ $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
+ REPLACE_GETOPT=0
+ if test -n "$gl_replace_getopt"; then
+ REPLACE_GETOPT=1
+ fi
+ if test $REPLACE_GETOPT = 1; then
- M4_LIBOBJS="$M4_LIBOBJS getopt1.$ac_objext"
+ GETOPT_H=getopt.h
+$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
+ fi
+ if test $REPLACE_GETOPT = 1; then
-fi
- # Code from module gettext-h:
- # Code from module gettimeofday:
+ M4_LIBOBJS="$M4_LIBOBJS getopt.$ac_objext"
- gl_gettimeofday_timezone=void
- if test $ac_cv_func_gettimeofday != yes; then
- HAVE_GETTIMEOFDAY=0
+ M4_LIBOBJS="$M4_LIBOBJS getopt1.$ac_objext"
- M4_LIBOBJS="$M4_LIBOBJS gettimeofday.$ac_objext"
- for ac_header in sys/timeb.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_TIMEB_H 1
-_ACEOF
+ GNULIB_GL_M4_UNISTD_H_GETOPT=1
+ fi
+
-fi
-done
- for ac_func in _ftime
-do :
- ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
-if test "x$ac_cv_func__ftime" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE__FTIME 1
-_ACEOF
-fi
-done
+
+
+ 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 test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
+if ${gl_cv_func_gettimeofday_clobber+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
- 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
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -18855,43 +23086,9 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
- if test $gl_cv_func_gettimeofday_clobber = yes; then
- REPLACE_GETTIMEOFDAY=1
-
-
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS gettimeofday.$ac_objext"
-
-
- for ac_header in sys/timeb.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_TIMEB_H 1
-_ACEOF
-
-fi
-
-done
-
- for ac_func in _ftime
-do :
- ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
-if test "x$ac_cv_func__ftime" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE__FTIME 1
-_ACEOF
-
-fi
-done
-
+ case "$gl_cv_func_gettimeofday_clobber" in
+ *yes)
+ REPLACE_GETTIMEOFDAY=1
$as_echo "#define gmtime rpl_gmtime" >>confdefs.h
@@ -18903,11 +23100,12 @@ $as_echo "#define localtime rpl_localtime" >>confdefs.h
$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
- fi
+ ;;
+ 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 test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
+if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -18964,6 +23162,19 @@ $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
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
@@ -18978,7 +23189,7 @@ $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
for ac_header in sys/timeb.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
+if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SYS_TIMEB_H 1
_ACEOF
@@ -18990,7 +23201,7 @@ done
for ac_func in _ftime
do :
ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
-if test "x$ac_cv_func__ftime" = x""yes; then :
+if test "x$ac_cv_func__ftime" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE__FTIME 1
_ACEOF
@@ -18999,18 +23210,15 @@ fi
done
- fi
fi
-cat >>confdefs.h <<_ACEOF
-#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
-_ACEOF
+ GNULIB_GETTIMEOFDAY=1
+
- GNULIB_GETTIMEOFDAY=1
@@ -19018,9 +23226,6 @@ $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
- # Code from module git-version-gen:
- # Code from module gnu-web-doc-update:
- # Code from module gnumakefile:
# Autoconf 2.61a.99 and earlier don't support linking a file only
# in VPATH builds. But since GNUmakefile is for maintainer use
# only, it does not matter if we skip the link with older autoconf.
@@ -19029,60 +23234,11 @@ $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
GNUmakefile=GNUmakefile
ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
- # Code from module gnupload:
- # Code from module gpl-3.0:
- # Code from module havelib:
- # Code from module ignore-value:
-
- # Code from module include_next:
- # Code from module inline:
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
-$as_echo_n "checking whether the compiler generally respects inline... " >&6; }
-if test "${gl_cv_c_inline_effective+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test $ac_cv_c_inline = no; then
- gl_cv_c_inline_effective=no
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifdef __NO_INLINE__
- #error "inline is not effective"
- #endif
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- gl_cv_c_inline_effective=yes
-else
- gl_cv_c_inline_effective=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
-$as_echo "$gl_cv_c_inline_effective" >&6; }
- if test $gl_cv_c_inline_effective = yes; then
-
-$as_echo "#define HAVE_INLINE 1" >>confdefs.h
-
- fi
-
- # Code from module intprops:
- # Code from module isnand-nolibm:
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
-if test "${gl_cv_func_isnand_no_libm+set}" = set; then :
+if ${gl_cv_func_isnand_no_libm+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -19117,12 +23273,14 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
$as_echo "$gl_cv_func_isnand_no_libm" >&6; }
+ gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
if test $gl_cv_func_isnand_no_libm = yes; then
$as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
- else
+ fi
+ if test $gl_func_isnand_no_libm != yes; then
@@ -19134,360 +23292,14 @@ $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
M4_LIBOBJS="$M4_LIBOBJS isnand.$ac_objext"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
-$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
-if test "${gl_cv_cc_double_expbit0+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- if test "$cross_compiling" = yes; then :
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#if defined arm || defined __arm || defined __arm__
- mixed_endianness
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "mixed_endianness" >/dev/null 2>&1; then :
- gl_cv_cc_double_expbit0="unknown"
-else
-
- :
-if test "${ac_cv_c_bigendian+set}" = set; 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 <sys/types.h>
- #include <sys/param.h>
-
-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 <sys/types.h>
- #include <sys/param.h>
-
-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 <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <limits.h>
-
-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 <limits.h>
-
-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 <float.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <string.h>
-#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
fi
- # Code from module isnanf-nolibm:
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
$as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; }
-if test "${gl_cv_func_isnanf_no_libm+set}" = set; then :
+if ${gl_cv_func_isnanf_no_libm+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -19528,7 +23340,7 @@ $as_echo "$gl_cv_func_isnanf_no_libm" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
$as_echo_n "checking whether isnan(float) works... " >&6; }
-if test "${gl_cv_func_isnanf_works+set}" = set; then :
+if ${gl_cv_func_isnanf_works+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -19615,11 +23427,15 @@ $as_echo "$gl_cv_func_isnanf_works" >&6; }
*) false;;
esac
}; then
+ gl_func_isnanf_no_libm=yes
$as_echo "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h
else
+ gl_func_isnanf_no_libm=no
+ fi
+ if test $gl_func_isnanf_no_libm != yes; then
@@ -19631,9 +23447,10 @@ $as_echo "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h
M4_LIBOBJS="$M4_LIBOBJS isnanf.$ac_objext"
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
$as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
-if test "${gl_cv_cc_float_expbit0+set}" = set; then :
+if ${gl_cv_cc_float_expbit0+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -19742,12 +23559,10 @@ _ACEOF
fi
- # Code from module isnanl-nolibm:
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
-if test "${gl_cv_func_isnanl_no_libm+set}" = set; then :
+if ${gl_cv_func_isnanl_no_libm+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -19787,9 +23602,10 @@ $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
$as_echo_n "checking whether isnanl works... " >&6; }
-if test "${gl_cv_func_isnanl_works+set}" = set; then :
+if ${gl_cv_func_isnanl_works+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -19857,7 +23673,7 @@ int main ()
result |= 1;
}
-#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
/* Representation of an 80-bit 'long double' as an initializer for a sequence
of 'unsigned int' words. */
# ifdef WORDS_BIGENDIAN
@@ -19948,8 +23764,9 @@ $as_echo "$gl_cv_func_isnanl_works" >&6; }
$as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
- else
+ fi
+ if test $gl_func_isnanl_no_libm != yes; then
@@ -19962,9 +23779,10 @@ $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
-if test "${gl_cv_cc_long_double_expbit0+set}" = set; then :
+if ${gl_cv_cc_long_double_expbit0+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -20074,9 +23892,8 @@ _ACEOF
esac
- fi
- # Code from module langinfo:
+ fi
@@ -20096,7 +23913,7 @@ _ACEOF
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
$as_echo_n "checking absolute name of <langinfo.h>... " >&6; }
-if test "${gl_cv_next_langinfo_h+set}" = set; then :
+if ${gl_cv_next_langinfo_h+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -20112,13 +23929,27 @@ _ACEOF
aix*) gl_absname_cpp="$ac_cpp -C" ;;
*) gl_absname_cpp="$ac_cpp" ;;
esac
+
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+ gl_header_literal_regex=`echo 'langinfo.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n '\#/langinfo.h#{
- s#.*"\(.*/langinfo.h\)".*#\1#
- s#^/[^/]#//&#
- p
- q
- }'`'"'
+ sed -n "$gl_absolute_header_sed"`'"'
else
gl_cv_next_langinfo_h='<'langinfo.h'>'
fi
@@ -20152,7 +23983,7 @@ $as_echo "$gl_cv_next_langinfo_h" >&6; }
HAVE_LANGINFO_H=1
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
$as_echo_n "checking whether langinfo.h defines CODESET... " >&6; }
-if test "${gl_cv_header_langinfo_codeset+set}" = set; then :
+if ${gl_cv_header_langinfo_codeset+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -20183,7 +24014,7 @@ $as_echo "$gl_cv_header_langinfo_codeset" >&6; }
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
$as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
-if test "${gl_cv_header_langinfo_t_fmt_ampm+set}" = set; then :
+if ${gl_cv_header_langinfo_t_fmt_ampm+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -20214,7 +24045,7 @@ $as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
$as_echo_n "checking whether langinfo.h defines ERA... " >&6; }
-if test "${gl_cv_header_langinfo_era+set}" = set; then :
+if ${gl_cv_header_langinfo_era+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -20245,7 +24076,7 @@ $as_echo "$gl_cv_header_langinfo_era" >&6; }
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
$as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; }
-if test "${gl_cv_header_langinfo_yesexpr+set}" = set; then :
+if ${gl_cv_header_langinfo_yesexpr+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -20285,7 +24116,7 @@ $as_echo "$gl_cv_header_langinfo_yesexpr" >&6; }
- # Code from module libsigsegv:
+
@@ -20782,7 +24613,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5
$as_echo_n "checking for libsigsegv... " >&6; }
-if test "${ac_cv_libsigsegv+set}" = set; then :
+if ${ac_cv_libsigsegv+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -20839,31 +24670,260 @@ $as_echo "$LIBSIGSEGV" >&6; }
gl_cv_lib_sigsegv="$ac_cv_libsigsegv"
- # Code from module linkedhash-list:
- # Code from module list:
- # Code from module localcharset:
+ LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
- LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\""
- # Code from module lock:
+
+
+
+
+
+ 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 <locale.h>
+ 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.h>
+ 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 <locale.h>
+ 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 <locale.h>" >&5
+$as_echo_n "checking absolute name of <locale.h>... " >&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 <locale.h>
+
+_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
+
+
+
+
+
+
+
+
+
+
+
+ if test $REPLACE_STRUCT_LCONV = 1; then
+ REPLACE_LOCALECONV=1
+ fi
+
+ if test $REPLACE_LOCALECONV = 1; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS localeconv.$ac_objext"
+
+
+ ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
+"
+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 "$gl_threads_api" = posix; then
- # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the
+ # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
# pthread_rwlock_* functions.
ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
"
-if test "x$ac_cv_type_pthread_rwlock_t" = x""yes; then :
+if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
$as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
@@ -20880,6 +24940,9 @@ main ()
#if __FreeBSD__ == 4
error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
+#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
+ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
+error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
#else
int x = (int)PTHREAD_MUTEX_RECURSIVE;
return !x;
@@ -20896,26 +24959,43 @@ $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+ :
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_LOCK 1
+_ACEOF
+
- # Code from module lseek:
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
$as_echo_n "checking whether lseek detects pipes... " >&6; }
-if test "${gl_cv_func_lseek_pipe+set}" = set; then :
+if ${gl_cv_func_lseek_pipe+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test $cross_compiling = no; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ case "$host_os" in
+ mingw*)
+ gl_cv_func_lseek_pipe=no
+ ;;
+ *)
+ if test $cross_compiling = no; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h> /* for off_t */
#include <stdio.h> /* for SEEK_CUR */
-#include <unistd.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#else /* on Windows with MSVC */
+# include <io.h>
+#endif
+
int
main ()
{
@@ -20929,24 +25009,25 @@ main ()
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
if test -s conftest$ac_exeext \
- && ./conftest$ac_exeext < conftest.$ac_ext \
- && test 1 = "`echo hi \
- | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
- gl_cv_func_lseek_pipe=yes
- else
- gl_cv_func_lseek_pipe=no
- fi
+ && ./conftest$ac_exeext < conftest.$ac_ext \
+ && test 1 = "`echo hi \
+ | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
+ gl_cv_func_lseek_pipe=yes
+ else
+ gl_cv_func_lseek_pipe=no
+ fi
+
else
gl_cv_func_lseek_pipe=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__
-/* mingw and BeOS mistakenly return 0 when trying to seek on pipes. */
+#if defined __BEOS__
+/* BeOS mistakenly return 0 when trying to seek on pipes. */
Choke me.
#endif
_ACEOF
@@ -20956,34 +25037,45 @@ else
gl_cv_func_lseek_pipe=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
+ fi
+ ;;
+ esac
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
$as_echo "$gl_cv_func_lseek_pipe" >&6; }
if test $gl_cv_func_lseek_pipe = no; then
+ REPLACE_LSEEK=1
+$as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
+ fi
+ if test $WINDOWS_64_BIT_OFF_T = 1; then
+ REPLACE_LSEEK=1
+ fi
+ if test $REPLACE_LSEEK = 1; then
- M4_LIBOBJS="$M4_LIBOBJS lseek.$ac_objext"
- REPLACE_LSEEK=1
-$as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
+ M4_LIBOBJS="$M4_LIBOBJS lseek.$ac_objext"
fi
- GNULIB_LSEEK=1
+
+ GNULIB_LSEEK=1
+
+
@@ -20991,25 +25083,41 @@ $as_echo "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
- # Code from module lstat:
if test $ac_cv_func_lstat = yes; then
- if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
- REPLACE_LSTAT=1
- fi
- # Prerequisites of lib/lstat.c.
-
+ case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
+ *no)
+ REPLACE_LSTAT=1
+ ;;
+ esac
else
HAVE_LSTAT=0
fi
+ if test $REPLACE_LSTAT = 1; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS lstat.$ac_objext"
+
+ :
+ fi
+
- GNULIB_LSTAT=1
+
+ GNULIB_LSTAT=1
+
+
@@ -21017,15 +25125,14 @@ $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
- # Code from module maintainer-makefile:
- # Code from module malloc-gnu:
- for ac_header in stdlib.h
+
+ for ac_header in stdlib.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdlib_h" = x""yes; then :
+if test "x$ac_cv_header_stdlib_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STDLIB_H 1
_ACEOF
@@ -21034,21 +25141,29 @@ fi
done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
-if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
+if ${ac_cv_func_malloc_0_nonnull+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
- ac_cv_func_malloc_0_nonnull=no
+ case "$host_os" in
+ # Guess yes on platforms where we know the result.
+ *-gnu* | freebsd* | netbsd* | openbsd* \
+ | hpux* | solaris* | cygwin* | mingw*)
+ ac_cv_func_malloc_0_nonnull=yes ;;
+ # If we don't know, assume the worst.
+ *) ac_cv_func_malloc_0_nonnull=no ;;
+ esac
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#if defined STDC_HEADERS || defined HAVE_STDLIB_H
-# include <stdlib.h>
-#else
-char *malloc ();
-#endif
+ # include <stdlib.h>
+ #else
+ char *malloc ();
+ #endif
int
main ()
@@ -21057,6 +25172,7 @@ return ! malloc (0);
;
return 0;
}
+
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
ac_cv_func_malloc_0_nonnull=yes
@@ -21067,33 +25183,34 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
-if test $ac_cv_func_malloc_0_nonnull = yes; then :
+ if test $ac_cv_func_malloc_0_nonnull = yes; then :
$as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
else
$as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
+ REPLACE_MALLOC=1
+fi
+ if test $REPLACE_MALLOC = 1; then
- M4_LIBOBJS="$M4_LIBOBJS malloc.$ac_objext"
-
- REPLACE_MALLOC=1
-
-fi
+ M4_LIBOBJS="$M4_LIBOBJS malloc.$ac_objext"
+ fi
cat >>confdefs.h <<_ACEOF
@@ -21101,7 +25218,6 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
- # Code from module malloc-posix:
@@ -21110,7 +25226,10 @@ _ACEOF
$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
else
+ REPLACE_MALLOC=1
+ fi
+ if test $REPLACE_MALLOC = 1; then
@@ -21121,14 +25240,15 @@ $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
M4_LIBOBJS="$M4_LIBOBJS malloc.$ac_objext"
- REPLACE_MALLOC=1
-
fi
- GNULIB_MALLOC_POSIX=1
+
+ GNULIB_MALLOC_POSIX=1
+
+
@@ -21136,13 +25256,10 @@ $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
- # Code from module malloca:
- # Code from module manywarnings:
- # Code from module math:
@@ -21159,7 +25276,7 @@ $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
$as_echo_n "checking absolute name of <math.h>... " >&6; }
-if test "${gl_cv_next_math_h+set}" = set; then :
+if ${gl_cv_next_math_h+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -21175,13 +25292,27 @@ _ACEOF
aix*) gl_absname_cpp="$ac_cpp -C" ;;
*) gl_absname_cpp="$ac_cpp" ;;
esac
+
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+ gl_header_literal_regex=`echo 'math.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
gl_cv_next_math_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n '\#/math.h#{
- s#.*"\(.*/math.h\)".*#\1#
- s#^/[^/]#//&#
- p
- q
- }'`'"'
+ sed -n "$gl_absolute_header_sed"`'"'
else
gl_cv_next_math_h='<'math.h'>'
fi
@@ -21206,10 +25337,9 @@ $as_echo "$gl_cv_next_math_h" >&6; }
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
$as_echo_n "checking whether NAN macro works... " >&6; }
-if test "${gl_cv_header_math_nan_works+set}" = set; then :
+if ${gl_cv_header_math_nan_works+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -21244,7 +25374,7 @@ $as_echo "$gl_cv_header_math_nan_works" >&6; }
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
$as_echo_n "checking whether HUGE_VAL works... " >&6; }
-if test "${gl_cv_header_math_huge_val_works+set}" = set; then :
+if ${gl_cv_header_math_huge_val_works+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -21275,7 +25405,6 @@ $as_echo "$gl_cv_header_math_huge_val_works" >&6; }
- # Code from module mbrtowc:
@@ -21292,7 +25421,7 @@ $as_echo "$gl_cv_header_math_huge_val_works" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
-if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
+if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -21355,7 +25484,7 @@ $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 test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
+if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -21429,16 +25558,35 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
else
REPLACE_MBSTATE_T=1
fi
- if test $REPLACE_MBSTATE_T = 1; then
-
- :
-
- 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: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+
+"
+if test "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
@@ -21448,7 +25596,7 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
-if test "${gl_cv_func_mbrtowc_null_arg1+set}" = set; then :
+if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -21525,7 +25673,7 @@ $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 test "${gl_cv_func_mbrtowc_null_arg2+set}" = set; then :
+if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -21592,7 +25740,7 @@ $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 test "${gl_cv_func_mbrtowc_retval+set}" = set; then :
+if ${gl_cv_func_mbrtowc_retval+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -21728,7 +25876,7 @@ $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 test "${gl_cv_func_mbrtowc_nul_retval+set}" = set; then :
+if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -21819,10 +25967,8 @@ $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
esac
fi
fi
- if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
-
- :
+ if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
@@ -21841,7 +25987,10 @@ $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
- GNULIB_MBRTOWC=1
+
+ GNULIB_MBRTOWC=1
+
+
@@ -21849,7 +25998,6 @@ $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
- # Code from module mbsinit:
@@ -21867,7 +26015,7 @@ $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
-if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
+if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -21930,7 +26078,7 @@ $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 test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
+if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -22004,16 +26152,35 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
else
REPLACE_MBSTATE_T=1
fi
- if test $REPLACE_MBSTATE_T = 1; then
-
- :
-
- 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: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+
+"
+if test "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
@@ -22023,10 +26190,8 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
esac
fi
fi
- if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
-
- :
+ if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
@@ -22045,7 +26210,10 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
- GNULIB_MBSINIT=1
+
+ GNULIB_MBSINIT=1
+
+
@@ -22053,13 +26221,13 @@ $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
- # Code from module mbtowc:
if false; then
REPLACE_MBTOWC=1
fi
+
if test $REPLACE_MBTOWC = 1; then
@@ -22079,7 +26247,10 @@ $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
- GNULIB_MBTOWC=1
+
+ GNULIB_MBTOWC=1
+
+
@@ -22087,26 +26258,45 @@ $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
- # Code from module memchr:
+ if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
- GNULIB_MEMCHR=1
-$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
+ M4_LIBOBJS="$M4_LIBOBJS memchr.$ac_objext"
- # Code from module memchr2:
- # Code from module mkdtemp:
+
+ 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
@@ -22115,21 +26305,29 @@ $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
for ac_func in mkdtemp
do :
ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
-if test "x$ac_cv_func_mkdtemp" = x""yes; then :
+if test "x$ac_cv_func_mkdtemp" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_MKDTEMP 1
_ACEOF
-else
-
- M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
-
fi
done
-
if test $ac_cv_func_mkdtemp = no; then
HAVE_MKDTEMP=0
+ fi
+
+ if test $HAVE_MKDTEMP = 0; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS mkdtemp.$ac_objext"
+
:
fi
@@ -22137,15 +26335,16 @@ done
- GNULIB_MKDTEMP=1
+ GNULIB_MKDTEMP=1
-$as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
- # Code from module mkstemp:
+$as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
+
+
@@ -22154,13 +26353,19 @@ $as_echo "#define GNULIB_TEST_MKDTEMP 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 test "${gl_cv_func_working_mkstemp+set}" = set; then :
+if ${gl_cv_func_working_mkstemp+:} false; then :
$as_echo_n "(cached) " >&6
else
mkdir conftest.mkstemp
if test "$cross_compiling" = yes; then :
- 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
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -22173,6 +26378,7 @@ int result = 0;
off_t large = (off_t) 4294967295u;
if (large < 0)
large = 2147483647;
+ umask (0);
for (i = 0; i < 70; i++)
{
char templ[] = "conftest.mkstemp/coXXXXXX";
@@ -22182,9 +26388,15 @@ int result = 0;
result |= 1;
else
{
+ struct stat st;
if (lseek (fd, large, SEEK_SET) != large)
result |= 2;
- close (fd);
+ if (fstat (fd, &st) < 0)
+ result |= 4;
+ else if (st.st_mode & 0077)
+ result |= 8;
+ if (close (fd))
+ result |= 16;
}
}
return result;
@@ -22206,8 +26418,17 @@ fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
$as_echo "$gl_cv_func_working_mkstemp" >&6; }
- if test $gl_cv_func_working_mkstemp != yes; then
- REPLACE_MKSTEMP=1
+ 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
@@ -22220,37 +26441,62 @@ $as_echo "$gl_cv_func_working_mkstemp" >&6; }
- fi
+ fi
+
+
+
+
+
+ GNULIB_MKSTEMP=1
+
+
+
+
+
+$as_echo "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
+
+
+
+
+
+ if test $ac_cv_func__set_invalid_parameter_handler = yes; then
+ HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
+
+$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
+
else
- HAVE_MKSTEMP=0
+ HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
+ fi
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
- M4_LIBOBJS="$M4_LIBOBJS mkstemp.$ac_objext"
+ M4_LIBOBJS="$M4_LIBOBJS msvc-inval.$ac_objext"
fi
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
- GNULIB_MKSTEMP=1
-$as_echo "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
- # Code from module multiarch:
- # Code from module nl_langinfo:
+ M4_LIBOBJS="$M4_LIBOBJS msvc-nothrow.$ac_objext"
+
+ fi
+
@@ -22259,7 +26505,7 @@ $as_echo "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
# On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
$as_echo_n "checking whether YESEXPR works... " >&6; }
-if test "${gl_cv_func_nl_langinfo_yesexpr_works+set}" = set; then :
+if ${gl_cv_func_nl_langinfo_yesexpr_works+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
@@ -22315,19 +26561,12 @@ _ACEOF
$as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
-
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS nl_langinfo.$ac_objext"
-
fi
else
HAVE_NL_LANGINFO=0
+ fi
+
+ if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
@@ -22343,7 +26582,10 @@ $as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
- GNULIB_NL_LANGINFO=1
+
+ GNULIB_NL_LANGINFO=1
+
+
@@ -22351,8 +26593,6 @@ $as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
- # Code from module nocrash:
- # Code from module obstack:
@@ -22367,7 +26607,7 @@ $as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks" >&5
$as_echo_n "checking for obstacks... " >&6; }
-if test "${ac_cv_func_obstack+set}" = set; then :
+if ${ac_cv_func_obstack+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -22413,36 +26653,17 @@ else
fi
- # Code from module open:
case "$host_os" in
mingw* | pw*)
-
-
- REPLACE_OPEN=1
-
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS open.$ac_objext"
-
-
-
-
- :
-
-
+ 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 test "${gl_cv_func_open_slash+set}" = set; then :
+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.
@@ -22498,10 +26719,15 @@ $as_echo "$gl_cv_func_open_slash" >&6; }
$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
+ REPLACE_OPEN=1
+ ;;
+ esac
+ ;;
+ esac
- REPLACE_OPEN=1
+ if test $REPLACE_OPEN = 1; then
@@ -22509,40 +26735,32 @@ $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
- M4_LIBOBJS="$M4_LIBOBJS open.$ac_objext"
+ M4_LIBOBJS="$M4_LIBOBJS open.$ac_objext"
:
-
- ;;
- esac
- ;;
- esac
-
+ fi
- GNULIB_OPEN=1
+ GNULIB_OPEN=1
-$as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
- # Code from module oset:
+$as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
- # Code from module pathmax:
- # Code from module pipe2:
@@ -22556,7 +26774,11 @@ $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
- GNULIB_PIPE2=1
+
+
+ GNULIB_PIPE2=1
+
+
@@ -22564,7 +26786,6 @@ $as_echo "#define GNULIB_TEST_PIPE2 1" >>confdefs.h
- # Code from module pipe2-safer:
cat >>confdefs.h <<_ACEOF
@@ -22572,16 +26793,63 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
- # Code from module posix_spawn-internal:
- # Code from module posix_spawn_file_actions_addclose:
- if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
- :
+ if test $REPLACE_POSIX_SPAWN = 1; then
+ REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_addclose works" >&5
+$as_echo_n "checking whether posix_spawn_file_actions_addclose works... " >&6; }
+if ${gl_cv_func_posix_spawn_file_actions_addclose_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ # Guess no on Solaris, yes otherwise.
+ case "$host_os" in
+ solaris*) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no";;
+ *) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <spawn.h>
+int main ()
+{
+ posix_spawn_file_actions_t actions;
+ if (posix_spawn_file_actions_init (&actions) != 0)
+ return 1;
+ if (posix_spawn_file_actions_addclose (&actions, 10000000) == 0)
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_posix_spawn_file_actions_addclose_works=yes
+else
+ gl_cv_func_posix_spawn_file_actions_addclose_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_posix_spawn_file_actions_addclose_works" >&5
+$as_echo "$gl_cv_func_posix_spawn_file_actions_addclose_works" >&6; }
+ case "$gl_cv_func_posix_spawn_file_actions_addclose_works" in
+ *yes) ;;
+ *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1 ;;
+ esac
+ fi
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = 1; then
+
@@ -22595,7 +26863,11 @@ _ACEOF
- GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
+
+
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
+
+
@@ -22603,15 +26875,63 @@ $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE 1" >>confdefs.h
- # Code from module posix_spawn_file_actions_adddup2:
- if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
- :
+ if test $REPLACE_POSIX_SPAWN = 1; then
+ REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_adddup2 works" >&5
+$as_echo_n "checking whether posix_spawn_file_actions_adddup2 works... " >&6; }
+if ${gl_cv_func_posix_spawn_file_actions_adddup2_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ # Guess no on Solaris, yes otherwise.
+ case "$host_os" in
+ solaris*) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no";;
+ *) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <spawn.h>
+int main ()
+{
+ posix_spawn_file_actions_t actions;
+ if (posix_spawn_file_actions_init (&actions) != 0)
+ return 1;
+ if (posix_spawn_file_actions_adddup2 (&actions, 10000000, 2) == 0)
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_posix_spawn_file_actions_adddup2_works=yes
+else
+ gl_cv_func_posix_spawn_file_actions_adddup2_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_posix_spawn_file_actions_adddup2_works" >&5
+$as_echo "$gl_cv_func_posix_spawn_file_actions_adddup2_works" >&6; }
+ case "$gl_cv_func_posix_spawn_file_actions_adddup2_works" in
+ *yes) ;;
+ *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1 ;;
+ esac
+ fi
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = 1; then
+
@@ -22625,7 +26945,11 @@ $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE 1" >>confdefs.h
- GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
+
+
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
+
+
@@ -22633,15 +26957,65 @@ $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 1" >>confdefs.h
- # Code from module posix_spawn_file_actions_addopen:
- if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
- :
+ if test $REPLACE_POSIX_SPAWN = 1; then
+ REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_addopen works" >&5
+$as_echo_n "checking whether posix_spawn_file_actions_addopen works... " >&6; }
+if ${gl_cv_func_posix_spawn_file_actions_addopen_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ # Guess no on Solaris, yes otherwise.
+ case "$host_os" in
+ solaris*) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no";;
+ *) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <spawn.h>
+#include <fcntl.h>
+int main ()
+{
+ posix_spawn_file_actions_t actions;
+ if (posix_spawn_file_actions_init (&actions) != 0)
+ return 1;
+ if (posix_spawn_file_actions_addopen (&actions, 10000000, "foo", 0, O_RDONLY)
+ == 0)
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_posix_spawn_file_actions_addopen_works=yes
+else
+ gl_cv_func_posix_spawn_file_actions_addopen_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_posix_spawn_file_actions_addopen_works" >&5
+$as_echo "$gl_cv_func_posix_spawn_file_actions_addopen_works" >&6; }
+ case "$gl_cv_func_posix_spawn_file_actions_addopen_works" in
+ *yes) ;;
+ *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1 ;;
+ esac
+ fi
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = 1; then
+
@@ -22655,24 +27029,24 @@ $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 1" >>confdefs.h
- GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
-$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 1" >>confdefs.h
- # Code from module posix_spawn_file_actions_destroy:
+$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 1" >>confdefs.h
- if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
- :
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+
@@ -22685,24 +27059,24 @@ $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 1" >>confdefs.h
- GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=1
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=1
-$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_DESTROY 1" >>confdefs.h
- # Code from module posix_spawn_file_actions_init:
+$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_DESTROY 1" >>confdefs.h
- if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
- :
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+
@@ -22715,23 +27089,23 @@ $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_DESTROY 1" >>confdefs.h
- GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=1
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=1
-$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_INIT 1" >>confdefs.h
- # Code from module posix_spawnattr_destroy:
+
+$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_INIT 1" >>confdefs.h
- if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
- :
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
@@ -22745,23 +27119,23 @@ $as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_INIT 1" >>confdefs.h
- GNULIB_POSIX_SPAWNATTR_DESTROY=1
+ GNULIB_POSIX_SPAWNATTR_DESTROY=1
-$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_DESTROY 1" >>confdefs.h
- # Code from module posix_spawnattr_init:
+
+$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_DESTROY 1" >>confdefs.h
- if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
- :
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
@@ -22775,24 +27149,24 @@ $as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_DESTROY 1" >>confdefs.h
- GNULIB_POSIX_SPAWNATTR_INIT=1
+ GNULIB_POSIX_SPAWNATTR_INIT=1
-$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_INIT 1" >>confdefs.h
- # Code from module posix_spawnattr_setflags:
+$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_INIT 1" >>confdefs.h
- if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
- :
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+
@@ -22805,24 +27179,24 @@ $as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_INIT 1" >>confdefs.h
- GNULIB_POSIX_SPAWNATTR_SETFLAGS=1
+ GNULIB_POSIX_SPAWNATTR_SETFLAGS=1
-$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETFLAGS 1" >>confdefs.h
- # Code from module posix_spawnattr_setsigmask:
+$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETFLAGS 1" >>confdefs.h
- if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
- :
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+
@@ -22835,33 +27209,32 @@ $as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETFLAGS 1" >>confdefs.h
- GNULIB_POSIX_SPAWNATTR_SETSIGMASK=1
+ GNULIB_POSIX_SPAWNATTR_SETSIGMASK=1
-$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETSIGMASK 1" >>confdefs.h
- # Code from module posix_spawnp:
+$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETSIGMASK 1" >>confdefs.h
- if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
- :
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
- M4_LIBOBJS="$M4_LIBOBJS spawnp.$ac_objext"
+ M4_LIBOBJS="$M4_LIBOBJS spawnp.$ac_objext"
+
@@ -22872,10 +27245,11 @@ $as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETSIGMASK 1" >>confdefs.h
M4_LIBOBJS="$M4_LIBOBJS spawni.$ac_objext"
- for ac_header in paths.h
+
+ for ac_header in paths.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "paths.h" "ac_cv_header_paths_h" "$ac_includes_default"
-if test "x$ac_cv_header_paths_h" = x""yes; then :
+if test "x$ac_cv_header_paths_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_PATHS_H 1
_ACEOF
@@ -22901,7 +27275,11 @@ done
- GNULIB_POSIX_SPAWNP=1
+
+
+ GNULIB_POSIX_SPAWNP=1
+
+
@@ -22909,15 +27287,15 @@ $as_echo "#define GNULIB_TEST_POSIX_SPAWNP 1" >>confdefs.h
- # Code from module printf-frexp:
if test $gl_cv_func_frexp_no_libm = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
$as_echo_n "checking whether frexp works... " >&6; }
-if test "${gl_cv_func_frexp_works+set}" = set; then :
+if ${gl_cv_func_frexp_works+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -22934,10 +27312,14 @@ else
#include <float.h>
#include <math.h>
#include <string.h>
+#if HAVE_DECL_ALARM
+# include <signal.h>
+# include <unistd.h>
+#endif
/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
ICC 10.0 has a bug when optimizing the expression -zero.
The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
- to PowerPC on MacOS X 10.5. */
+ to PowerPC on Mac OS X 10.5. */
#if defined __hpux || defined __sgi || defined __ICC
static double
compute_minus_zero (void)
@@ -22954,6 +27336,12 @@ int main()
int i;
volatile double x;
double zero = 0.0;
+#if HAVE_DECL_ALARM
+ /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
+ number. Let the test fail in this case. */
+ signal (SIGALRM, SIG_DFL);
+ alarm (5);
+#endif
/* Test on denormalized numbers. */
for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
;
@@ -22967,7 +27355,7 @@ int main()
result |= 1;
}
/* Test on infinite numbers. */
- x = 1.0 / 0.0;
+ x = 1.0 / zero;
{
int exp;
double y = frexp (x, &exp);
@@ -23010,7 +27398,7 @@ $as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexp can be used without linking with libm" >&5
$as_echo_n "checking whether ldexp can be used without linking with libm... " >&6; }
-if test "${gl_cv_func_ldexp_no_libm+set}" = set; then :
+if ${gl_cv_func_ldexp_no_libm+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -23044,13 +27432,14 @@ $as_echo "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
fi
- # Code from module printf-frexpl:
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
-if test "${gl_cv_func_frexpl_no_libm+set}" = set; then :
+if ${gl_cv_func_frexpl_no_libm+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -23083,7 +27472,7 @@ $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
$as_echo_n "checking whether frexpl works... " >&6; }
-if test "${gl_cv_func_frexpl_works+set}" = set; then :
+if ${gl_cv_func_frexpl_works+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -23106,7 +27495,25 @@ else
# undef LDBL_MIN_EXP
# define LDBL_MIN_EXP (-16381)
#endif
-extern long double frexpl (long double, int *);
+#if defined __i386__ && defined __FreeBSD__
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP (-16381)
+#endif
+#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
+#endif
+#if defined __sgi && (LDBL_MANT_DIG >= 106)
+# if defined __GNUC__
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP DBL_MIN_EXP
+# endif
+#endif
+extern
+#ifdef __cplusplus
+"C"
+#endif
+long double frexpl (long double, int *);
int main()
{
int result = 0;
@@ -23119,7 +27526,7 @@ int main()
if (exp != 5)
result |= 1;
}
- /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl
+ /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
function returns an invalid (incorrectly normalized) value: it returns
y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
but the correct result is
@@ -23158,7 +27565,7 @@ int main()
int exp;
long double y = frexpl (x, &exp);
/* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
- exp = -16382, y = 0.5. On MacOS X 10.5: exp = -16384, y = 0.5. */
+ exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
if (exp != LDBL_MIN_EXP - 1)
result |= 8;
}
@@ -23202,7 +27609,7 @@ $as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
"
-if test "x$ac_cv_have_decl_frexpl" = x""yes; then :
+if test "x$ac_cv_have_decl_frexpl" = xyes; then :
else
HAVE_DECL_FREXPL=0
@@ -23213,7 +27620,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl() can be used without linking with libm" >&5
$as_echo_n "checking whether ldexpl() can be used without linking with libm... " >&6; }
-if test "${gl_cv_func_ldexpl_no_libm+set}" = set; then :
+if ${gl_cv_func_ldexpl_no_libm+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -23246,7 +27653,7 @@ $as_echo "$gl_cv_func_ldexpl_no_libm" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5
$as_echo_n "checking whether ldexpl works... " >&6; }
-if test "${gl_cv_func_ldexpl_works+set}" = set; then :
+if ${gl_cv_func_ldexpl_works+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -23262,7 +27669,11 @@ else
/* end confdefs.h. */
#include <math.h>
-extern long double ldexpl (long double, int);
+extern
+#ifdef __cplusplus
+"C"
+#endif
+long double ldexpl (long double, int);
int main()
{
int result = 0;
@@ -23302,7 +27713,7 @@ $as_echo "#define HAVE_LDEXPL_IN_LIBC 1" >>confdefs.h
ac_fn_c_check_decl "$LINENO" "ldexpl" "ac_cv_have_decl_ldexpl" "#include <math.h>
"
-if test "x$ac_cv_have_decl_ldexpl" = x""yes; then :
+if test "x$ac_cv_have_decl_ldexpl" = xyes; then :
else
HAVE_DECL_LDEXPL=0
@@ -23312,12 +27723,10 @@ fi
esac
fi
- # Code from module printf-safe:
- # Code from module progname:
ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
"
-if test "x$ac_cv_have_decl_program_invocation_name" = x""yes; then :
+if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -23329,7 +27738,7 @@ _ACEOF
ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
"
-if test "x$ac_cv_have_decl_program_invocation_short_name" = x""yes; then :
+if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -23339,26 +27748,83 @@ cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
_ACEOF
- # Code from module quotearg:
+
+ :
+ for ac_func in raise
+do :
+ ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
+if test "x$ac_cv_func_raise" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_RAISE 1
+_ACEOF
+
+fi
+done
+ if test $ac_cv_func_raise = no; then
+ HAVE_RAISE=0
+ else
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ REPLACE_RAISE=1
+ fi
- M4_LIBOBJS="$M4_LIBOBJS quotearg.$ac_objext"
+ if test $gl_cv_type_sigset_t = yes; then
+ ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
+if test "x$ac_cv_func_sigprocmask" = xyes; then :
+ gl_cv_func_sigprocmask=1
+fi
- # Code from module quotearg-simple:
- # Code from module rawmemchr:
+ fi
+ if test -z "$gl_cv_func_sigprocmask"; then
+ HAVE_POSIX_SIGNALBLOCKING=0
+ fi
+ if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
+ if test $gl_cv_header_signal_h_SIGPIPE != yes; then
+ REPLACE_RAISE=1
+ fi
+
+ fi
+
+ fi
+
+ if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS raise.$ac_objext"
+
+ :
+ fi
+
+
+
+
+
+ GNULIB_RAISE=1
+
+
+
+
+
+$as_echo "#define GNULIB_TEST_RAISE 1" >>confdefs.h
@@ -23369,58 +27835,55 @@ _ACEOF
for ac_func in rawmemchr
do :
ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
-if test "x$ac_cv_func_rawmemchr" = x""yes; then :
+if test "x$ac_cv_func_rawmemchr" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_RAWMEMCHR 1
_ACEOF
-else
-
- M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
-
fi
done
-
if test $ac_cv_func_rawmemchr = no; then
HAVE_RAWMEMCHR=0
- :
fi
+ if test $HAVE_RAWMEMCHR = 0; then
- GNULIB_RAWMEMCHR=1
-$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
+ M4_LIBOBJS="$M4_LIBOBJS rawmemchr.$ac_objext"
- # Code from module readlink:
+ :
+ fi
- if test $ac_cv_func_readlink = no; then
- HAVE_READLINK=0
+ GNULIB_RAWMEMCHR=1
+$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
+
+
- M4_LIBOBJS="$M4_LIBOBJS readlink.$ac_objext"
- :
+ if test $ac_cv_func_readlink = no; then
+ HAVE_READLINK=0
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
$as_echo_n "checking whether readlink signature is correct... " >&6; }
-if test "${gl_cv_decl_readlink_works+set}" = set; then :
+if ${gl_cv_decl_readlink_works+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -23447,14 +27910,20 @@ fi
$as_echo "$gl_cv_decl_readlink_works" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
-if test "${gl_cv_func_readlink_works+set}" = set; then :
+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 :
- gl_cv_func_readlink_works="guessing no"
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_readlink_works="guessing no" ;;
+ esac
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -23482,40 +27951,44 @@ fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
$as_echo "$gl_cv_func_readlink_works" >&6; }
- if test "$gl_cv_func_readlink_works" != yes; then
+ case "$gl_cv_func_readlink_works" in
+ *yes)
+ if test "$gl_cv_decl_readlink_works" != yes; then
+ REPLACE_READLINK=1
+ fi
+ ;;
+ *)
$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
- REPLACE_READLINK=1
-
-
-
+ REPLACE_READLINK=1
+ ;;
+ esac
+ fi
+ if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
- M4_LIBOBJS="$M4_LIBOBJS readlink.$ac_objext"
- elif test "$gl_cv_decl_readlink_works" != yes; then
- REPLACE_READLINK=1
+ M4_LIBOBJS="$M4_LIBOBJS readlink.$ac_objext"
+ :
+ fi
- M4_LIBOBJS="$M4_LIBOBJS readlink.$ac_objext"
- fi
- fi
+ GNULIB_READLINK=1
- GNULIB_READLINK=1
@@ -23523,7 +27996,6 @@ $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
- # Code from module regex:
# Check whether --with-included-regex was given.
@@ -23540,9 +28012,10 @@ fi
# following run test, then default to *not* using the included regex.c.
# If cross compiling, assume the test would fail and use the included
# regex.c.
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
$as_echo_n "checking for working re_compile_pattern... " >&6; }
-if test "${gl_cv_func_re_compile_pattern_working+set}" = set; then :
+if ${gl_cv_func_re_compile_pattern_working+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
@@ -23550,10 +28023,15 @@ else
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-$ac_includes_default
- #include <locale.h>
- #include <limits.h>
- #include <regex.h>
+#include <regex.h>
+
+ #include <locale.h>
+ #include <limits.h>
+ #include <string.h>
+ #if HAVE_DECL_ALARM
+ # include <unistd.h>
+ # include <signal.h>
+ #endif
int
main ()
@@ -23565,26 +28043,65 @@ int result = 0;
const char *s;
struct re_registers regs;
- /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
- This test needs valgrind to catch the bug on Debian
- GNU/Linux 3.1 x86, but it might catch the bug better
- on other platforms and it shouldn't hurt to try the
- test here. */
+#if HAVE_DECL_ALARM
+ /* Some builds of glibc go into an infinite loop on this test. */
+ signal (SIGALRM, SIG_DFL);
+ alarm (2);
+#endif
if (setlocale (LC_ALL, "en_US.UTF-8"))
{
- static char const pat[] = "insert into";
- static char const data[] =
- "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
- re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
- | RE_ICASE);
- memset (&regex, 0, sizeof regex);
- s = re_compile_pattern (pat, sizeof pat - 1, &regex);
- if (s)
- result |= 1;
- else if (re_search (&regex, data, sizeof data - 1,
- 0, sizeof data - 1, &regs)
- != -1)
- result |= 1;
+ {
+ /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
+ This test needs valgrind to catch the bug on Debian
+ GNU/Linux 3.1 x86, but it might catch the bug better
+ on other platforms and it shouldn't hurt to try the
+ test here. */
+ static char const pat[] = "insert into";
+ static char const data[] =
+ "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
+ re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
+ | RE_ICASE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern (pat, sizeof pat - 1, &regex);
+ if (s)
+ result |= 1;
+ else if (re_search (&regex, data, sizeof data - 1,
+ 0, sizeof data - 1, &regs)
+ != -1)
+ result |= 1;
+ }
+
+ {
+ /* This test is from glibc bug 15078.
+ The test case is from Andreas Schwab in
+ <http://www.sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
+ */
+ static char const pat[] = "[^x]x";
+ static char const data[] =
+ /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
+ "\xe1\x80\x80"
+ "\xe1\x80\xbb"
+ "\xe1\x80\xbd"
+ "\xe1\x80\x94"
+ "\xe1\x80\xba"
+ "\xe1\x80\xaf"
+ "\xe1\x80\x95"
+ "\xe1\x80\xba"
+ "x";
+ re_set_syntax (0);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern (pat, sizeof pat - 1, &regex);
+ if (s)
+ result |= 1;
+ else
+ {
+ i = re_search (&regex, data, sizeof data - 1,
+ 0, sizeof data - 1, 0);
+ if (i != 0 && i != 21)
+ result |= 1;
+ }
+ }
+
if (! setlocale (LC_ALL, "C"))
return 1;
}
@@ -23710,6 +28227,9 @@ $as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
if test $ac_use_included_regex = yes; then
+$as_echo "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
+
+
$as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
@@ -23757,6 +28277,9 @@ $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
@@ -23772,10 +28295,12 @@ $as_echo "#define regfree rpl_regfree" >>confdefs.h
+
+
for ac_header in libintl.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
-if test "x$ac_cv_header_libintl_h" = x""yes; then :
+if test "x$ac_cv_header_libintl_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBINTL_H 1
_ACEOF
@@ -23787,7 +28312,7 @@ done
ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
"
-if test "x$ac_cv_have_decl_isblank" = x""yes; then :
+if test "x$ac_cv_have_decl_isblank" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -23800,15 +28325,13 @@ _ACEOF
fi
- # Code from module rename:
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
$as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
-if test "${gl_cv_func_rename_slash_dst_works+set}" = set; then :
+if ${gl_cv_func_rename_slash_dst_works+:} false; then :
$as_echo_n "(cached) " >&6
else
rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
@@ -23819,7 +28342,13 @@ else
ln -s conftest.f conftest.lnk
fi
if test "$cross_compiling" = yes; then :
- gl_cv_func_rename_slash_dst_works="guessing no"
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
+ esac
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -23859,26 +28388,19 @@ fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
$as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
- if test "x$gl_cv_func_rename_slash_dst_works" != xyes; then
-
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
-
- REPLACE_RENAME=1
+ case "$gl_cv_func_rename_slash_dst_works" in
+ *yes) ;;
+ *)
+ REPLACE_RENAME=1
$as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
- fi
+ ;;
+ esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
$as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
-if test "${gl_cv_func_rename_slash_src_works+set}" = set; then :
+if ${gl_cv_func_rename_slash_src_works+:} false; then :
$as_echo_n "(cached) " >&6
else
rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
@@ -23889,7 +28411,13 @@ else
ln -s conftest.f conftest.lnk
fi
if test "$cross_compiling" = yes; then :
- gl_cv_func_rename_slash_src_works="guessing no"
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_rename_slash_src_works="guessing no" ;;
+ esac
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -23929,54 +28457,55 @@ fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
$as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
- if test "x$gl_cv_func_rename_slash_src_works" != xyes; then
-
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
-
- REPLACE_RENAME=1
+ case "$gl_cv_func_rename_slash_src_works" in
+ *yes) ;;
+ *)
+ REPLACE_RENAME=1
$as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
- fi
+ ;;
+ esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
$as_echo_n "checking whether rename manages hard links correctly... " >&6; }
-if test "${gl_cv_func_rename_link_works+set}" = set; then :
+if ${gl_cv_func_rename_link_works+:} false; then :
$as_echo_n "(cached) " >&6
else
- rm -rf conftest.f conftest.f1
- if touch conftest.f && ln conftest.f conftest.f1 &&
- set x `ls -i conftest.f conftest.f1` && test "" = ""; then
- if test "$cross_compiling" = yes; then :
- gl_cv_func_rename_link_works="guessing no"
+ if test $ac_cv_func_link = yes; then
+ rm -rf conftest.f conftest.f1
+ if touch conftest.f && ln conftest.f conftest.f1 &&
+ set x `ls -i conftest.f conftest.f1` && test "" = ""; then
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_rename_link_works="guessing no" ;;
+ esac
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-# include <stdio.h>
-# include <stdlib.h>
-# include <unistd.h>
+# include <stdio.h>
+# include <stdlib.h>
+# include <unistd.h>
int
main ()
{
int result = 0;
- if (rename ("conftest.f", "conftest.f1"))
- result |= 1;
- if (unlink ("conftest.f1"))
- result |= 2;
- if (rename ("conftest.f", "conftest.f"))
- result |= 4;
- if (rename ("conftest.f1", "conftest.f1") == 0)
- result |= 8;
- return result;
+ if (rename ("conftest.f", "conftest.f1"))
+ result |= 1;
+ if (unlink ("conftest.f1"))
+ result |= 2;
+ if (rename ("conftest.f", "conftest.f"))
+ result |= 4;
+ if (rename ("conftest.f1", "conftest.f1") == 0)
+ result |= 8;
+ return result;
;
return 0;
@@ -23991,41 +28520,43 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
- else
- gl_cv_func_rename_link_works="guessing no"
- fi
- rm -rf conftest.f conftest.f1
+ else
+ gl_cv_func_rename_link_works="guessing no"
+ fi
+ rm -rf conftest.f conftest.f1
+ else
+ gl_cv_func_rename_link_works=yes
+ fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
$as_echo "$gl_cv_func_rename_link_works" >&6; }
- if test "x$gl_cv_func_rename_link_works" != xyes; then
-
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
-
- REPLACE_RENAME=1
+ case "$gl_cv_func_rename_link_works" in
+ *yes) ;;
+ *)
+ REPLACE_RENAME=1
$as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
- fi
+ ;;
+ esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
$as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
-if test "${gl_cv_func_rename_dest_works+set}" = set; then :
+if ${gl_cv_func_rename_dest_works+:} false; then :
$as_echo_n "(cached) " >&6
else
rm -rf conftest.f conftest.d1 conftest.d2
touch conftest.f && mkdir conftest.d1 conftest.d2 ||
as_fn_error $? "cannot create temporary files" "$LINENO" 5
if test "$cross_compiling" = yes; then :
- gl_cv_func_rename_dest_works="guessing no"
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_rename_dest_works="guessing no" ;;
+ esac
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -24061,27 +28592,36 @@ fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
$as_echo "$gl_cv_func_rename_dest_works" >&6; }
- if test "x$gl_cv_func_rename_dest_works" != xyes; then
+ case "$gl_cv_func_rename_dest_works" in
+ *yes) ;;
+ *)
+ REPLACE_RENAME=1
+$as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
+ ;;
+ esac
+ if test $REPLACE_RENAME = 1; then
- M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
- REPLACE_RENAME=1
-$as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
+
+ M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
fi
- GNULIB_RENAME=1
+
+ GNULIB_RENAME=1
+
+
@@ -24089,24 +28629,34 @@ $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
- # Code from module rmdir:
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
$as_echo_n "checking whether rmdir works... " >&6; }
-if test "${gl_cv_func_rmdir_works+set}" = set; then :
+if ${gl_cv_func_rmdir_works+:} false; then :
$as_echo_n "(cached) " >&6
else
mkdir conftest.dir
touch conftest.file
if test "$cross_compiling" = yes; then :
- gl_cv_func_rmdir_works="guessing no"
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_rmdir_works="guessing no" ;;
+ esac
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
#include <errno.h>
- #include <unistd.h>
+ #if HAVE_UNISTD_H
+ # include <unistd.h>
+ #else /* on Windows with MSVC */
+ # include <direct.h>
+ #endif
int
main ()
@@ -24137,8 +28687,14 @@ fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
$as_echo "$gl_cv_func_rmdir_works" >&6; }
- if test x"$gl_cv_func_rmdir_works" != xyes; then
- REPLACE_RMDIR=1
+ case "$gl_cv_func_rmdir_works" in
+ *yes) ;;
+ *)
+ REPLACE_RMDIR=1
+ ;;
+ esac
+
+ if test $REPLACE_RMDIR = 1; then
@@ -24154,7 +28710,10 @@ $as_echo "$gl_cv_func_rmdir_works" >&6; }
- GNULIB_RMDIR=1
+
+ GNULIB_RMDIR=1
+
+
@@ -24162,8 +28721,6 @@ $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
- # Code from module same-inode:
- # Code from module sched:
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -24171,6 +28728,7 @@ $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
#include <sched.h>
struct sched_param a;
int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER };
+ pid_t t1;
int
main ()
@@ -24199,7 +28757,7 @@ else
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sched.h>" >&5
$as_echo_n "checking absolute name of <sched.h>... " >&6; }
-if test "${gl_cv_next_sched_h+set}" = set; then :
+if ${gl_cv_next_sched_h+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -24215,13 +28773,27 @@ _ACEOF
aix*) gl_absname_cpp="$ac_cpp -C" ;;
*) gl_absname_cpp="$ac_cpp" ;;
esac
+
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+ gl_header_literal_regex=`echo 'sched.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_sched_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n '\#/sched.h#{
- s#.*"\(.*/sched.h\)".*#\1#
- s#^/[^/]#//&#
- p
- q
- }'`'"'
+ sed -n "$gl_absolute_header_sed"`'"'
else
gl_cv_next_sched_h='<'sched.h'>'
fi
@@ -24255,7 +28827,7 @@ $as_echo "$gl_cv_next_sched_h" >&6; }
ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <sched.h>
"
-if test "x$ac_cv_type_struct_sched_param" = x""yes; then :
+if test "x$ac_cv_type_struct_sched_param" = xyes; then :
HAVE_STRUCT_SCHED_PARAM=1
else
HAVE_STRUCT_SCHED_PARAM=0
@@ -24263,18 +28835,89 @@ fi
+
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test -n "$SCHED_H"; then
+ GL_GENERATE_SCHED_H_TRUE=
+ GL_GENERATE_SCHED_H_FALSE='#'
+else
+ GL_GENERATE_SCHED_H_TRUE='#'
+ GL_GENERATE_SCHED_H_FALSE=
+fi
+
+
+
+
+
+
+
+ if test $ac_cv_func_secure_getenv = no; then
+ HAVE_SECURE_GETENV=0
+ fi
+
+ if test $HAVE_SECURE_GETENV = 0; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS secure_getenv.$ac_objext"
+
+
+ for ac_func in __secure_getenv
+do :
+ ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
+if test "x$ac_cv_func___secure_getenv" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE___SECURE_GETENV 1
+_ACEOF
+
+fi
+done
+
+ if test $ac_cv_func___secure_getenv = no; then
+ for ac_func in issetugid
+do :
+ ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
+if test "x$ac_cv_func_issetugid" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_ISSETUGID 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+ fi
+
+
+
+
+
+ GNULIB_SECURE_GETENV=1
+
+
+
+
+
+$as_echo "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
+
+
- # Code from module sigaction:
if test $ac_cv_func_sigaction = yes; then
ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
"
-if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = x""yes; then :
+if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1
@@ -24288,6 +28931,9 @@ fi
fi
else
HAVE_SIGACTION=0
+ fi
+
+ if test $HAVE_SIGACTION = 0; then
@@ -24308,7 +28954,7 @@ fi
#include <signal.h>
"
-if test "x$ac_cv_type_siginfo_t" = x""yes; then :
+if test "x$ac_cv_type_siginfo_t" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SIGINFO_T 1
@@ -24326,7 +28972,10 @@ fi
- GNULIB_SIGACTION=1
+
+ GNULIB_SIGACTION=1
+
+
@@ -24334,7 +28983,7 @@ $as_echo "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h
- # Code from module signal:
+
@@ -24350,7 +28999,7 @@ $as_echo "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
$as_echo_n "checking absolute name of <signal.h>... " >&6; }
-if test "${gl_cv_next_signal_h+set}" = set; then :
+if ${gl_cv_next_signal_h+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -24363,13 +29012,27 @@ _ACEOF
aix*) gl_absname_cpp="$ac_cpp -C" ;;
*) gl_absname_cpp="$ac_cpp" ;;
esac
+
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+ gl_header_literal_regex=`echo 'signal.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n '\#/signal.h#{
- s#.*"\(.*/signal.h\)".*#\1#
- s#^/[^/]#//&#
- p
- q
- }'`'"'
+ sed -n "$gl_absolute_header_sed"`'"'
fi
@@ -24390,13 +29053,14 @@ $as_echo "$gl_cv_next_signal_h" >&6; }
+
# AIX declares sig_atomic_t to already include volatile, and C89 compilers
# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
#include <signal.h>
"
-if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
+if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
else
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
@@ -24406,17 +29070,37 @@ fi
- # Code from module signbit:
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5
+ ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
+#include <signal.h>
+
+"
+if test "x$ac_cv_type_sighandler_t" = xyes; then :
+
+else
+ HAVE_SIGHANDLER_T=0
+fi
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5
$as_echo_n "checking for signbit macro... " >&6; }
-if test "${gl_cv_func_signbit+set}" = set; then :
+if ${gl_cv_func_signbit+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
- gl_cv_func_signbit="guessing no"
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_signbit="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_signbit="guessing no" ;;
+ esac
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -24451,7 +29135,7 @@ double m0d = -p0d;
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
So we use another constant expression instead.
But that expression does not work on other platforms, such as when
- cross-compiling to PowerPC on MacOS X 10.5. */
+ cross-compiling to PowerPC on Mac OS X 10.5. */
long double p0l = 0.0L;
#if defined __hpux || defined __sgi
long double m0l = -LDBL_MIN * LDBL_MIN;
@@ -24523,12 +29207,18 @@ fi
$as_echo "$gl_cv_func_signbit" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit compiler built-ins" >&5
$as_echo_n "checking for signbit compiler built-ins... " >&6; }
-if test "${gl_cv_func_signbit_gcc+set}" = set; then :
+if ${gl_cv_func_signbit_gcc+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
- gl_cv_func_signbit_gcc="guessing no"
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_signbit_gcc="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_signbit_gcc="guessing no" ;;
+ esac
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -24560,7 +29250,7 @@ double m0d = -p0d;
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
So we use another constant expression instead.
But that expression does not work on other platforms, such as when
- cross-compiling to PowerPC on MacOS X 10.5. */
+ cross-compiling to PowerPC on Mac OS X 10.5. */
long double p0l = 0.0L;
#if defined __hpux || defined __sgi
long double m0l = -LDBL_MIN * LDBL_MIN;
@@ -24630,46 +29320,20 @@ fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_gcc" >&5
$as_echo "$gl_cv_func_signbit_gcc" >&6; }
- if test "$gl_cv_func_signbit_gcc" = yes; then
- REPLACE_SIGNBIT_USING_GCC=1
- else
- if test "$gl_cv_func_signbit" != yes; then
- REPLACE_SIGNBIT=1
-
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS signbitf.$ac_objext"
-
-
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS signbitd.$ac_objext"
-
-
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS signbitl.$ac_objext"
-
+ case "$gl_cv_func_signbit_gcc" in
+ *yes)
+ REPLACE_SIGNBIT_USING_GCC=1
+ ;;
+ *)
+ case "$gl_cv_func_signbit" in
+ *yes) ;;
+ *)
+ REPLACE_SIGNBIT=1
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5
$as_echo_n "checking where to find the sign bit in a 'float'... " >&6; }
-if test "${gl_cv_cc_float_signbit+set}" = set; then :
+if ${gl_cv_cc_float_signbit+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -24773,7 +29437,7 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'double'" >&5
$as_echo_n "checking where to find the sign bit in a 'double'... " >&6; }
-if test "${gl_cv_cc_double_signbit+set}" = set; then :
+if ${gl_cv_cc_double_signbit+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -24877,7 +29541,7 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'long double'" >&5
$as_echo_n "checking where to find the sign bit in a 'long double'... " >&6; }
-if test "${gl_cv_cc_long_double_signbit+set}" = set; then :
+if ${gl_cv_cc_long_double_signbit+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -24977,10 +29641,10 @@ _ACEOF
esac
- if test "$gl_cv_cc_float_signbit" = unknown; then
- ac_fn_c_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h>
+ if test "$gl_cv_cc_float_signbit" = unknown; then
+ ac_fn_c_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h>
"
-if test "x$ac_cv_have_decl_copysignf" = x""yes; then :
+if test "x$ac_cv_have_decl_copysignf" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -24990,17 +29654,17 @@ cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_COPYSIGNF $ac_have_decl
_ACEOF
- if test "$ac_cv_have_decl_copysignf" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5
+ if test "$ac_cv_have_decl_copysignf" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5
$as_echo_n "checking whether copysignf can be used without linking with libm... " >&6; }
-if test "${gl_cv_func_copysignf_no_libm+set}" = set; then :
+if ${gl_cv_func_copysignf_no_libm+:} false; then :
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <math.h>
- float x, y;
+ float x, y;
int
main ()
{
@@ -25020,17 +29684,17 @@ rm -f core conftest.err conftest.$ac_objext \
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5
$as_echo "$gl_cv_func_copysignf_no_libm" >&6; }
- if test $gl_cv_func_copysignf_no_libm = yes; then
+ if test $gl_cv_func_copysignf_no_libm = yes; then
$as_echo "#define HAVE_COPYSIGNF_IN_LIBC 1" >>confdefs.h
+ fi
+ fi
fi
- fi
- fi
- if test "$gl_cv_cc_double_signbit" = unknown; then
- ac_fn_c_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h>
+ if test "$gl_cv_cc_double_signbit" = unknown; then
+ ac_fn_c_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h>
"
-if test "x$ac_cv_have_decl_copysign" = x""yes; then :
+if test "x$ac_cv_have_decl_copysign" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -25040,17 +29704,17 @@ cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_COPYSIGN $ac_have_decl
_ACEOF
- if test "$ac_cv_have_decl_copysign" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5
+ if test "$ac_cv_have_decl_copysign" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5
$as_echo_n "checking whether copysign can be used without linking with libm... " >&6; }
-if test "${gl_cv_func_copysign_no_libm+set}" = set; then :
+if ${gl_cv_func_copysign_no_libm+:} false; then :
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <math.h>
- double x, y;
+ double x, y;
int
main ()
{
@@ -25070,17 +29734,17 @@ rm -f core conftest.err conftest.$ac_objext \
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5
$as_echo "$gl_cv_func_copysign_no_libm" >&6; }
- if test $gl_cv_func_copysign_no_libm = yes; then
+ if test $gl_cv_func_copysign_no_libm = yes; then
$as_echo "#define HAVE_COPYSIGN_IN_LIBC 1" >>confdefs.h
+ fi
+ fi
fi
- fi
- fi
- if test "$gl_cv_cc_long_double_signbit" = unknown; then
- ac_fn_c_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h>
+ if test "$gl_cv_cc_long_double_signbit" = unknown; then
+ ac_fn_c_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h>
"
-if test "x$ac_cv_have_decl_copysignl" = x""yes; then :
+if test "x$ac_cv_have_decl_copysignl" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -25090,17 +29754,17 @@ cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_COPYSIGNL $ac_have_decl
_ACEOF
- if test "$ac_cv_have_decl_copysignl" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5
+ if test "$ac_cv_have_decl_copysignl" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5
$as_echo_n "checking whether copysignl can be used without linking with libm... " >&6; }
-if test "${gl_cv_func_copysignl_no_libm+set}" = set; then :
+if ${gl_cv_func_copysignl_no_libm+:} false; then :
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <math.h>
- long double x, y;
+ long double x, y;
int
main ()
{
@@ -25120,91 +29784,117 @@ rm -f core conftest.err conftest.$ac_objext \
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5
$as_echo "$gl_cv_func_copysignl_no_libm" >&6; }
- if test $gl_cv_func_copysignl_no_libm = yes; then
+ if test $gl_cv_func_copysignl_no_libm = yes; then
$as_echo "#define HAVE_COPYSIGNL_IN_LIBC 1" >>confdefs.h
+ fi
+ fi
fi
- fi
- fi
- fi
- fi
+ ;;
+ esac
+ ;;
+ esac
+ if test $REPLACE_SIGNBIT = 1; then
- GNULIB_SIGNBIT=1
-$as_echo "#define GNULIB_TEST_SIGNBIT 1" >>confdefs.h
+ M4_LIBOBJS="$M4_LIBOBJS signbitf.$ac_objext"
- # Code from module sigprocmask:
- signals_not_posix=
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <signal.h>
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "sigset_t" >/dev/null 2>&1; then :
-else
- signals_not_posix=1
-fi
-rm -f conftest*
- if test -z "$signals_not_posix"; then
- ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
-if test "x$ac_cv_func_sigprocmask" = x""yes; then :
- gl_cv_func_sigprocmask=1
-fi
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS signbitd.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS signbitl.$ac_objext"
fi
- if test -z "$gl_cv_func_sigprocmask"; then
- HAVE_POSIX_SIGNALBLOCKING=0
+ GNULIB_SIGNBIT=1
+
+
+
+
+
+$as_echo "#define GNULIB_TEST_SIGNBIT 1" >>confdefs.h
+
- M4_LIBOBJS="$M4_LIBOBJS sigprocmask.$ac_objext"
- ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "#include <signal.h>
-/* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
-#include <sys/types.h>
-"
-if test "x$ac_cv_type_sigset_t" = x""yes; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_SIGSET_T 1
+#define GNULIB_SIGPIPE 1
_ACEOF
-gl_cv_type_sigset_t=yes
-else
- gl_cv_type_sigset_t=no
+
+
+ GNULIB_SIGNAL_H_SIGPIPE=1
+
+
+ GNULIB_STDIO_H_SIGPIPE=1
+
+ GNULIB_UNISTD_H_SIGPIPE=1
+
+
+
+ if test $gl_cv_type_sigset_t = yes; then
+ ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
+if test "x$ac_cv_func_sigprocmask" = xyes; then :
+ gl_cv_func_sigprocmask=1
fi
- if test $gl_cv_type_sigset_t != yes; then
- HAVE_SIGSET_T=0
fi
+ if test -z "$gl_cv_func_sigprocmask"; then
+ HAVE_POSIX_SIGNALBLOCKING=0
+ fi
+
+ if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS sigprocmask.$ac_objext"
+
+ :
fi
- GNULIB_SIGPROCMASK=1
+
+ GNULIB_SIGPROCMASK=1
+
+
@@ -25212,12 +29902,11 @@ $as_echo "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
- # Code from module size_max:
for ac_header in stdint.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdint_h" = x""yes; then :
+if test "x$ac_cv_header_stdint_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STDINT_H 1
_ACEOF
@@ -25228,7 +29917,7 @@ done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
$as_echo_n "checking for SIZE_MAX... " >&6; }
-if test "${gl_cv_size_max+set}" = set; then :
+if ${gl_cv_size_max+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -25308,14 +29997,13 @@ _ACEOF
fi
- # Code from module snprintf:
gl_cv_func_snprintf_usable=no
for ac_func in snprintf
do :
ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
-if test "x$ac_cv_func_snprintf" = x""yes; then :
+if test "x$ac_cv_func_snprintf" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SNPRINTF 1
_ACEOF
@@ -25326,9 +30014,10 @@ done
if test $ac_cv_func_snprintf = yes; then
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
$as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
-if test "${gl_cv_func_snprintf_size1+set}" = set; then :
+if ${gl_cv_func_snprintf_size1+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -25339,10 +30028,24 @@ else
/* end confdefs.h. */
#include <stdio.h>
+#if HAVE_SNPRINTF
+# define my_snprintf snprintf
+#else
+# include <stdarg.h>
+static int my_snprintf (char *buf, int size, const char *format, ...)
+{
+ va_list args;
+ int ret;
+ va_start (args, format);
+ ret = vsnprintf (buf, size, format, args);
+ va_end (args);
+ return ret;
+}
+#endif
int main()
{
static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
- snprintf (buf, 1, "%d", 12345);
+ my_snprintf (buf, 1, "%d", 12345);
return buf[1] != 'E';
}
_ACEOF
@@ -25365,7 +30068,59 @@ $as_echo "$gl_cv_func_snprintf_size1" >&6; }
case "$gl_cv_func_snprintf_retval_c99" in
*yes)
- gl_cv_func_snprintf_usable=yes
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
+$as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
+if ${gl_cv_func_printf_positions+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
+ gl_cv_func_printf_positions="guessing no";;
+ beos*) gl_cv_func_printf_positions="guessing no";;
+ mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
+ *) gl_cv_func_printf_positions="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+/* The string "%2$d %1$d", with dollar characters protected from the shell's
+ dollar expansion (possibly an autoconf bug). */
+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
+static char buf[100];
+int main ()
+{
+ sprintf (buf, format, 33, 55);
+ return (strcmp (buf, "55 33") != 0);
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_positions=yes
+else
+ gl_cv_func_printf_positions=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
+$as_echo "$gl_cv_func_printf_positions" >&6; }
+
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ gl_cv_func_snprintf_usable=yes
+ ;;
+ esac
;;
esac
;;
@@ -25398,7 +30153,11 @@ $as_echo "$gl_cv_func_snprintf_size1" >&6; }
- GNULIB_SNPRINTF=1
+
+
+ GNULIB_SNPRINTF=1
+
+
@@ -25413,7 +30172,6 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
- # Code from module spawn:
@@ -25431,7 +30189,7 @@ _ACEOF
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <spawn.h>" >&5
$as_echo_n "checking absolute name of <spawn.h>... " >&6; }
-if test "${gl_cv_next_spawn_h+set}" = set; then :
+if ${gl_cv_next_spawn_h+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -25447,13 +30205,27 @@ _ACEOF
aix*) gl_absname_cpp="$ac_cpp -C" ;;
*) gl_absname_cpp="$ac_cpp" ;;
esac
+
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+ gl_header_literal_regex=`echo 'spawn.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_spawn_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n '\#/spawn.h#{
- s#.*"\(.*/spawn.h\)".*#\1#
- s#^/[^/]#//&#
- p
- q
- }'`'"'
+ sed -n "$gl_absolute_header_sed"`'"'
else
gl_cv_next_spawn_h='<'spawn.h'>'
fi
@@ -25484,7 +30256,7 @@ $as_echo "$gl_cv_next_spawn_h" >&6; }
#include <spawn.h>
"
-if test "x$ac_cv_type_posix_spawnattr_t" = x""yes; then :
+if test "x$ac_cv_type_posix_spawnattr_t" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_POSIX_SPAWNATTR_T 1
@@ -25499,7 +30271,7 @@ fi
#include <spawn.h>
"
-if test "x$ac_cv_type_posix_spawn_file_actions_t" = x""yes; then :
+if test "x$ac_cv_type_posix_spawn_file_actions_t" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_POSIX_SPAWN_FILE_ACTIONS_T 1
@@ -25514,10 +30286,10 @@ fi
HAVE_SPAWN_H=0
HAVE_POSIX_SPAWNATTR_T=0
HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
+ fi
+
- :
- fi
@@ -25526,16 +30298,14 @@ fi
- # Code from module spawn-pipe:
- # Code from module ssize_t:
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
$as_echo_n "checking for ssize_t... " >&6; }
-if test "${gt_cv_ssize_t+set}" = set; then :
+if ${gt_cv_ssize_t+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -25565,13 +30335,12 @@ $as_echo "#define ssize_t int" >>confdefs.h
fi
- # Code from module stat:
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
-if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
+if ${gl_cv_func_stat_dir_slash+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
@@ -25604,9 +30373,9 @@ 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 "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
-if test "${gl_cv_func_stat_file_slash+set}" = set; then :
+if ${gl_cv_func_stat_file_slash+:} false; then :
$as_echo_n "(cached) " >&6
else
touch conftest.tmp
@@ -25615,7 +30384,13 @@ else
ln -s conftest.tmp conftest.lnk
fi
if test "$cross_compiling" = yes; then :
- gl_cv_func_stat_file_slash="guessing no"
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_stat_file_slash="guessing no" ;;
+ esac
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -25663,6 +30438,7 @@ $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
;;
esac
+
if test $REPLACE_STAT = 1; then
@@ -25674,13 +30450,16 @@ $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
M4_LIBOBJS="$M4_LIBOBJS stat.$ac_objext"
-
+ :
fi
- GNULIB_STAT=1
+
+ GNULIB_STAT=1
+
+
@@ -25688,13 +30467,12 @@ $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
- # Code from module stdarg:
- STDARG_H='';
- NEXT_STDARG_H='<stdarg.h>';
+ STDARG_H=''
+ NEXT_STDARG_H='<stdarg.h>'
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
$as_echo_n "checking for va_copy... " >&6; }
- if test "${gl_cv_func_va_copy+set}" = set; then :
+ if ${gl_cv_func_va_copy+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -25754,7 +30532,7 @@ rm -f conftest*
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
$as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
-if test "${gl_cv_next_stdarg_h+set}" = set; then :
+if ${gl_cv_next_stdarg_h+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -25767,13 +30545,27 @@ _ACEOF
aix*) gl_absname_cpp="$ac_cpp -C" ;;
*) gl_absname_cpp="$ac_cpp" ;;
esac
+
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+ gl_header_literal_regex=`echo 'stdarg.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n '\#/stdarg.h#{
- s#.*"\(.*/stdarg.h\)".*#\1#
- s#^/[^/]#//&#
- p
- q
- }'`'"'
+ sed -n "$gl_absolute_header_sed"`'"'
fi
@@ -25802,7 +30594,7 @@ $as_echo "$gl_cv_next_stdarg_h" >&6; }
saved_as_echo_n="$as_echo_n"
as_echo_n=':'
- if test "${gl_cv_func___va_copy+set}" = set; then :
+ if ${gl_cv_func___va_copy+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -25844,7 +30636,16 @@ $as_echo "#define va_copy gl_va_copy" >>confdefs.h
fi
fi
- # Code from module stdbool:
+ if test -n "$STDARG_H"; then
+ GL_GENERATE_STDARG_H_TRUE=
+ GL_GENERATE_STDARG_H_FALSE='#'
+else
+ GL_GENERATE_STDARG_H_TRUE='#'
+ GL_GENERATE_STDARG_H_FALSE=
+fi
+
+
+
@@ -25856,6 +30657,14 @@ $as_echo "#define va_copy gl_va_copy" >>confdefs.h
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
@@ -25864,17 +30673,17 @@ $as_echo "#define va_copy gl_va_copy" >>confdefs.h
fi
- # Code from module stddef:
+ 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 test "${gl_cv_decl_null_works+set}" = set; then :
+if ${gl_cv_decl_null_works+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -25903,6 +30712,15 @@ $as_echo "$gl_cv_decl_null_works" >&6; }
REPLACE_NULL=1
STDDEF_H=stddef.h
fi
+
+ if test -n "$STDDEF_H"; then
+ GL_GENERATE_STDDEF_H_TRUE=
+ GL_GENERATE_STDDEF_H_FALSE='#'
+else
+ GL_GENERATE_STDDEF_H_TRUE='#'
+ GL_GENERATE_STDDEF_H_FALSE=
+fi
+
if test -n "$STDDEF_H"; then
@@ -25917,7 +30735,7 @@ $as_echo "$gl_cv_decl_null_works" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
-if test "${gl_cv_next_stddef_h+set}" = set; then :
+if ${gl_cv_next_stddef_h+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -25930,13 +30748,27 @@ _ACEOF
aix*) gl_absname_cpp="$ac_cpp -C" ;;
*) gl_absname_cpp="$ac_cpp" ;;
esac
+
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+ gl_header_literal_regex=`echo 'stddef.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n '\#/stddef.h#{
- s#.*"\(.*/stddef.h\)".*#\1#
- s#^/[^/]#//&#
- p
- q
- }'`'"'
+ sed -n "$gl_absolute_header_sed"`'"'
fi
@@ -25959,44 +30791,6 @@ $as_echo "$gl_cv_next_stddef_h" >&6; }
fi
- # Code from module stdint:
-
-
-
- if test $ac_cv_type_long_long_int = yes; then
- HAVE_LONG_LONG_INT=1
- else
- HAVE_LONG_LONG_INT=0
- fi
-
-
- if test $ac_cv_type_unsigned_long_long_int = yes; then
- HAVE_UNSIGNED_LONG_LONG_INT=1
- else
- HAVE_UNSIGNED_LONG_LONG_INT=0
- fi
-
-
-
- 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
@@ -26009,662 +30803,274 @@ $as_echo "$gl_cv_next_stddef_h" >&6; }
if test $gl_cv_have_include_next = yes; then
- gl_cv_next_stdint_h='<'stdint.h'>'
+ gl_cv_next_stdio_h='<'stdio.h'>'
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
-$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
-if test "${gl_cv_next_stdint_h+set}" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
+$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
+if ${gl_cv_next_stdio_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 <stdint.h>
+#include <stdio.h>
_ACEOF
case "$host_os" in
aix*) gl_absname_cpp="$ac_cpp -C" ;;
*) gl_absname_cpp="$ac_cpp" ;;
esac
- gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n '\#/stdint.h#{
- s#.*"\(.*/stdint.h\)".*#\1#
- s#^/[^/]#//&#
- p
- q
- }'`'"'
- else
- gl_cv_next_stdint_h='<'stdint.h'>'
- fi
+
+ case "$host_os" in
+ 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_stdint_h" >&5
-$as_echo "$gl_cv_next_stdint_h" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
+$as_echo "$gl_cv_next_stdio_h" >&6; }
fi
- NEXT_STDINT_H=$gl_cv_next_stdint_h
+ 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='<'stdint.h'>'
+ gl_next_as_first_directive='<'stdio.h'>'
else
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
- gl_next_as_first_directive=$gl_cv_next_stdint_h
+ gl_next_as_first_directive=$gl_cv_next_stdio_h
fi
- NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
-
-
-
+ NEXT_AS_FIRST_DIRECTIVE_STDIO_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 test "${gl_cv_header_working_stdint_h+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- gl_cv_header_working_stdint_h=no
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
-#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
-#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
-#include <stdint.h>
-/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
-#if !(defined WCHAR_MIN && defined WCHAR_MAX)
-#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
-#endif
-
+ GNULIB_FSCANF=1
- /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
- included before <wchar.h>. */
- #include <stddef.h>
- #include <signal.h>
- #if HAVE_WCHAR_H
- # include <stdio.h>
- # include <time.h>
- # include <wchar.h>
- #endif
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_FSCANF 1
+_ACEOF
-#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 <limits.h> /* 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;
+ GNULIB_SCANF=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;
-}
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_SCANF 1
_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. */
+ GNULIB_FGETC=1
+ GNULIB_GETC=1
+ GNULIB_GETCHAR=1
+ GNULIB_FGETS=1
+ GNULIB_FREAD=1
-#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
-#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
-#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
-#include <stdint.h>
+ 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
- /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
- included before <wchar.h>. */
- #include <stddef.h>
- #include <signal.h>
- #if HAVE_WCHAR_H
- # include <stdio.h>
- # include <time.h>
- # include <wchar.h>
- #endif
-#include <stdio.h>
-#include <string.h>
-#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 ()
-{
+ if test $gl_cv_header_signal_h_SIGPIPE != yes; then
+ REPLACE_STDIO_WRITE_FUNCS=1
- 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
+ M4_LIBOBJS="$M4_LIBOBJS stdio-write.$ac_objext"
- if test $ac_cv_header_sys_bitypes_h = yes; then
- HAVE_SYS_BITYPES_H=1
- else
- HAVE_SYS_BITYPES_H=0
fi
- if test $APPLE_UNIVERSAL_BUILD = 0; then
- for gltype in ptrdiff_t size_t ; do
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
-$as_echo_n "checking for bit size of $gltype... " >&6; }
-if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then :
- $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: <stddef.h>, <stdio.h> and <time.h> must be
- included before <wchar.h>. */
- #include <stddef.h>
- #include <signal.h>
- #if HAVE_WCHAR_H
- # include <stdio.h>
- # include <time.h>
- # include <wchar.h>
- #endif
-#include <limits.h>"; 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 "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then :
+ 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 <stdlib.h>" >&5
+$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
+if ${gl_cv_next_stdlib_h+:} false; then :
$as_echo_n "(cached) " >&6
else
- if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
- /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
- included before <wchar.h>. */
- #include <stddef.h>
- #include <signal.h>
- #if HAVE_WCHAR_H
- # include <stdio.h>
- # include <time.h>
- # include <wchar.h>
- #endif
-#include <limits.h>"; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
-else
- result=unknown
-fi
+_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"`'"'
- 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
+{ $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
- eval BITSIZEOF_${GLTYPE}=\$result
- done
+ 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 gltype in sig_atomic_t wchar_t wint_t ; do
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
-$as_echo_n "checking whether $gltype is signed... " >&6; }
-if eval "test \"\${gl_cv_type_${gltype}_signed+set}\"" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
- /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
- included before <wchar.h>. */
- #include <stddef.h>
- #include <signal.h>
- #if HAVE_WCHAR_H
- # include <stdio.h>
- # include <time.h>
- # include <wchar.h>
- #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 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
- for gltype in ptrdiff_t size_t ; do
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
-$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
-if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then :
+ if test $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
- 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
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
- included before <wchar.h>. */
- #include <stddef.h>
- #include <signal.h>
- #if HAVE_WCHAR_H
- # include <stdio.h>
- # include <time.h>
- # include <wchar.h>
- #endif
-
- extern $gltype foo;
- extern $gltype1 foo;
-int
-main ()
-{
+#if defined __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
+ Lucky user
+ #endif
+#else
+ Lucky user
+#endif
- ;
- 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
+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
-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
+rm -f conftest*
- for gltype in sig_atomic_t wchar_t wint_t ; do
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
-$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
-if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then :
- $as_echo_n "(cached) " >&6
else
- eval gl_cv_type_${gltype}_suffix=no
- eval result=\$gl_cv_type_${gltype}_signed
- if test "$result" = yes; then
- glsufu=
- else
- glsufu=u
- fi
- for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
- case $glsuf in
- '') gltype1='int';;
- l) gltype1='long int';;
- ll) gltype1='long long int';;
- i64) gltype1='__int64';;
- u) gltype1='unsigned int';;
- ul) gltype1='unsigned long int';;
- ull) gltype1='unsigned long long int';;
- ui64)gltype1='unsigned __int64';;
- esac
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
- included before <wchar.h>. */
- #include <stddef.h>
- #include <signal.h>
- #if HAVE_WCHAR_H
- # include <stdio.h>
- # include <time.h>
- # include <wchar.h>
- #endif
+#include <string.h> /* for strchrnul */
- extern $gltype foo;
- extern $gltype1 foo;
int
main ()
{
+const char *buf = "a";
+ return strchrnul (buf, 'b') != buf + 1;
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval gl_cv_type_${gltype}_suffix=\$glsuf
+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 conftest.err conftest.$ac_objext conftest.$ac_ext
- eval result=\$gl_cv_type_${gltype}_suffix
- test "$result" != no && break
- done
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-eval ac_res=\$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
-
- STDINT_H=stdint.h
+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
-
- # Code from module stdio:
-
+ if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
@@ -26673,70 +31079,22 @@ _ACEOF
+ M4_LIBOBJS="$M4_LIBOBJS strchrnul.$ac_objext"
+ :
+ 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 <stdio.h>" >&5
-$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
-if test "${gl_cv_next_stdio_h+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdio.h>
-_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
- gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n '\#/stdio.h#{
- s#.*"\(.*/stdio.h\)".*#\1#
- s#^/[^/]#//&#
- p
- q
- }'`'"'
-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_STRCHRNUL=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
-
-
-
-
- # Code from module stdlib:
-
+$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
@@ -26745,69 +31103,58 @@ $as_echo "$gl_cv_next_stdio_h" >&6; }
- 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 <stdlib.h>" >&5
-$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
-if test "${gl_cv_next_stdlib_h+set}" = set; then :
+ if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
+$as_echo_n "checking for working strerror function... " >&6; }
+if ${gl_cv_func_working_strerror+:} false; then :
$as_echo_n "(cached) " >&6
else
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_working_strerror="guessing no" ;;
+ esac
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdlib.h>
+#include <string.h>
+int
+main ()
+{
+if (!*strerror (-2)) return 1;
+ ;
+ return 0;
+}
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
- gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n '\#/stdlib.h#{
- s#.*"\(.*/stdlib.h\)".*#\1#
- s#^/[^/]#//&#
- p
- q
- }'`'"'
-
-
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_working_strerror=yes
+else
+ gl_cv_func_working_strerror=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $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
-
-
-
-
-
-
-
- # Code from module stdlib-safer:
-
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS mkstemp-safer.$ac_objext"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
+$as_echo "$gl_cv_func_working_strerror" >&6; }
+ case "$gl_cv_func_working_strerror" in
+ *yes) ;;
+ *)
+ REPLACE_STRERROR=1
+ ;;
+ esac
- # Code from module strchrnul:
+ else
+ REPLACE_STRERROR=1
+ fi
+ if test $REPLACE_STRERROR = 1; then
@@ -26816,79 +31163,75 @@ $as_echo "$gl_cv_next_stdlib_h" >&6; }
+ M4_LIBOBJS="$M4_LIBOBJS strerror.$ac_objext"
+ fi
- for ac_func in strchrnul
-do :
- ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
-if test "x$ac_cv_func_strchrnul" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_STRCHRNUL 1
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_STRERROR 1
_ACEOF
-else
- M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
-
-fi
-done
-
-
- if test $ac_cv_func_strchrnul = no; then
- HAVE_STRCHRNUL=0
- :
- fi
- GNULIB_STRCHRNUL=1
+ GNULIB_STRERROR=1
-$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
- # Code from module streq:
- # Code from module strerror:
+$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
- if test $REPLACE_STRERROR = 1; then
+ if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
- M4_LIBOBJS="$M4_LIBOBJS strerror.$ac_objext"
-cat >>confdefs.h <<_ACEOF
-#define REPLACE_STRERROR $REPLACE_STRERROR
-_ACEOF
- fi
+ M4_LIBOBJS="$M4_LIBOBJS strerror-override.$ac_objext"
- GNULIB_STRERROR=1
+ if test $ac_cv_header_sys_socket_h != yes; then
+ for ac_header in winsock2.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
+if test "x$ac_cv_header_winsock2_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_WINSOCK2_H 1
+_ACEOF
+fi
-$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
+done
+ fi
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ HAVE_WINSOCK2_H=1
+ UNISTD_H_HAVE_WINSOCK2_H=1
+ SYS_IOCTL_H_HAVE_WINSOCK2_H=1
+ else
+ HAVE_WINSOCK2_H=0
+ fi
- # Code from module string:
+ fi
- # Code from module strndup:
@@ -26900,10 +31243,11 @@ $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
fi
if test $ac_cv_func_strndup = yes; then
+ HAVE_STRNDUP=1
# AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
$as_echo_n "checking for working strndup... " >&6; }
-if test "${gl_cv_func_strndup_works+set}" = set; then :
+if ${gl_cv_func_strndup_works+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
@@ -26923,8 +31267,12 @@ int
main ()
{
-#ifndef HAVE_DECL_STRNDUP
- extern char *strndup (const char *, size_t);
+#if !HAVE_DECL_STRNDUP
+ extern
+ #ifdef __cplusplus
+ "C"
+ #endif
+ char *strndup (const char *, size_t);
#endif
char *s;
s = strndup ("some longer string", 15);
@@ -26948,21 +31296,13 @@ 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
-
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS strndup.$ac_objext"
-
- ;;
+ *no) REPLACE_STRNDUP=1 ;;
esac
else
+ HAVE_STRNDUP=0
+ fi
+
+ if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
@@ -26978,7 +31318,10 @@ $as_echo "$gl_cv_func_strndup_works" >&6; }
- GNULIB_STRNDUP=1
+
+ GNULIB_STRNDUP=1
+
+
@@ -26986,7 +31329,6 @@ $as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
- # Code from module strnlen:
@@ -26996,13 +31338,18 @@ $as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
if test $ac_cv_have_decl_strnlen = no; then
HAVE_DECL_STRNLEN=0
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
$as_echo_n "checking for working strnlen... " >&6; }
-if test "${ac_cv_func_strnlen_working+set}" = set; then :
+if ${ac_cv_func_strnlen_working+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
- ac_cv_func_strnlen_working=no
+ # 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. */
@@ -27042,21 +31389,14 @@ 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 &&
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS strnlen.$ac_objext"
+test $ac_cv_func_strnlen_working = no && :
- if test $ac_cv_func_strnlen_working = no; then
+ if test $ac_cv_func_strnlen_working = no; then
REPLACE_STRNLEN=1
fi
fi
+
if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
@@ -27074,7 +31414,10 @@ test $ac_cv_func_strnlen_working = no &&
- GNULIB_STRNLEN=1
+
+ GNULIB_STRNLEN=1
+
+
@@ -27082,7 +31425,6 @@ $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
- # Code from module strsignal:
@@ -27096,7 +31438,7 @@ $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
for ac_func in strsignal
do :
ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
-if test "x$ac_cv_func_strsignal" = x""yes; then :
+if test "x$ac_cv_func_strsignal" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STRSIGNAL 1
_ACEOF
@@ -27105,9 +31447,10 @@ fi
done
if test $ac_cv_func_strsignal = yes; then
+ HAVE_STRSIGNAL=1
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strsignal always returns a string" >&5
$as_echo_n "checking whether strsignal always returns a string... " >&6; }
-if test "${gl_cv_func_working_strsignal+set}" = set; then :
+if ${gl_cv_func_working_strsignal+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
@@ -27148,14 +31491,14 @@ fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strsignal" >&5
$as_echo "$gl_cv_func_working_strsignal" >&6; }
+ if test "$gl_cv_func_working_strsignal" = no; then
+ REPLACE_STRSIGNAL=1
+ fi
else
- gl_cv_func_working_strsignal=no
+ HAVE_STRSIGNAL=0
fi
- if test "$gl_cv_func_working_strsignal" = no; then
- if test $ac_cv_func_strsignal = yes; then
- REPLACE_STRSIGNAL=1
- fi
+ if test $HAVE_STRSIGNAL = 0 || test $REPLACE_STRSIGNAL = 1; then
@@ -27168,9 +31511,10 @@ $as_echo "$gl_cv_func_working_strsignal" >&6; }
+
ac_fn_c_check_decl "$LINENO" "_sys_siglist" "ac_cv_have_decl__sys_siglist" "#include <signal.h>
"
-if test "x$ac_cv_have_decl__sys_siglist" = x""yes; then :
+if test "x$ac_cv_have_decl__sys_siglist" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -27186,7 +31530,10 @@ _ACEOF
- GNULIB_STRSIGNAL=1
+
+ GNULIB_STRSIGNAL=1
+
+
@@ -27194,22 +31541,22 @@ $as_echo "#define GNULIB_TEST_STRSIGNAL 1" >>confdefs.h
- # Code from module strstr:
if test $REPLACE_STRSTR = 0; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
$as_echo_n "checking whether strstr works in linear time... " >&6; }
-if test "${gl_cv_func_strstr_linear+set}" = set; then :
+if ${gl_cv_func_strstr_linear+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <features.h>
#ifdef __GNU_LIBRARY__
#if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
+ && !(defined __i386__ || defined __x86_64__) \
&& !defined __UCLIBC__
Lucky user
#endif
@@ -27224,7 +31571,7 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "Lucky user" >/dev/null 2>&1; then :
- gl_cv_func_strstr_linear=yes
+ gl_cv_func_strstr_linear="guessing yes"
else
gl_cv_func_strstr_linear="guessing no"
fi
@@ -27284,10 +31631,14 @@ fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
$as_echo "$gl_cv_func_strstr_linear" >&6; }
- if test "$gl_cv_func_strstr_linear" != yes; then
- REPLACE_STRSTR=1
- fi
+ case "$gl_cv_func_strstr_linear" in
+ *yes) ;;
+ *)
+ REPLACE_STRSTR=1
+ ;;
+ esac
fi
+
if test $REPLACE_STRSTR = 1; then
@@ -27301,26 +31652,14 @@ $as_echo "$gl_cv_func_strstr_linear" >&6; }
fi
- # Code from module strstr-simple:
-
if test "$gl_cv_func_memchr_works" != yes; then
REPLACE_STRSTR=1
-
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS strstr.$ac_objext"
-
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
$as_echo_n "checking whether strstr works... " >&6; }
-if test "${gl_cv_func_strstr_works_always+set}" = set; then :
+if ${gl_cv_func_strstr_works_always+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
@@ -27345,7 +31684,7 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "Lucky user" >/dev/null 2>&1; then :
- gl_cv_func_strstr_works_always=yes
+ gl_cv_func_strstr_works_always="guessing yes"
else
gl_cv_func_strstr_works_always="guessing no"
fi
@@ -27383,8 +31722,15 @@ fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
$as_echo "$gl_cv_func_strstr_works_always" >&6; }
- if test "$gl_cv_func_strstr_works_always" != yes; then
- REPLACE_STRSTR=1
+ case "$gl_cv_func_strstr_works_always" in
+ *yes) ;;
+ *)
+ REPLACE_STRSTR=1
+ ;;
+ esac
+ fi
+
+ if test $REPLACE_STRSTR = 1; then
@@ -27395,13 +31741,15 @@ $as_echo "$gl_cv_func_strstr_works_always" >&6; }
M4_LIBOBJS="$M4_LIBOBJS strstr.$ac_objext"
- fi
fi
- GNULIB_STRSTR=1
+
+ GNULIB_STRSTR=1
+
+
@@ -27409,20 +31757,17 @@ $as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
- # Code from module strtod:
- if test $ac_cv_have_decl_strtod != yes; then
- HAVE_STRTOD=0
- else
+ if test $HAVE_STRTOD = 1; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtod obeys C99" >&5
$as_echo_n "checking whether strtod obeys C99... " >&6; }
-if test "${gl_cv_func_strtod_works+set}" = set; then :
+if ${gl_cv_func_strtod_works+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <features.h>
@@ -27436,7 +31781,7 @@ else
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "Lucky user" >/dev/null 2>&1; then :
- gl_cv_func_strtod_works=yes
+ gl_cv_func_strtod_works="guessing yes"
else
gl_cv_func_strtod_works="guessing no"
fi
@@ -27543,10 +31888,14 @@ fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtod_works" >&5
$as_echo "$gl_cv_func_strtod_works" >&6; }
- if test "$gl_cv_func_strtod_works" != yes; then
- REPLACE_STRTOD=1
- fi
+ case "$gl_cv_func_strtod_works" in
+ *yes) ;;
+ *)
+ REPLACE_STRTOD=1
+ ;;
+ esac
fi
+
if test $HAVE_STRTOD = 0 || test $REPLACE_STRTOD = 1; then
@@ -27571,45 +31920,18 @@ $as_echo "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
- GNULIB_STRTOD=1
-
-
-
-$as_echo "#define GNULIB_TEST_STRTOD 1" >>confdefs.h
-
-
- # Code from module strtol:
+ GNULIB_STRTOD=1
+$as_echo "#define GNULIB_TEST_STRTOD 1" >>confdefs.h
- for ac_func in strtol
-do :
- ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
-if test "x$ac_cv_func_strtol" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_STRTOL 1
-_ACEOF
-
-else
-
- M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
-
-fi
-done
-
-
-
- # Code from module sys_stat:
-
-
-
@@ -27628,7 +31950,7 @@ done
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
-if test "${gl_cv_next_sys_stat_h+set}" = set; then :
+if ${gl_cv_next_sys_stat_h+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -27644,13 +31966,27 @@ _ACEOF
aix*) gl_absname_cpp="$ac_cpp -C" ;;
*) gl_absname_cpp="$ac_cpp" ;;
esac
+
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+ gl_header_literal_regex=`echo 'sys/stat.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n '\#/sys/stat.h#{
- s#.*"\(.*/sys/stat.h\)".*#\1#
- s#^/[^/]#//&#
- p
- q
- }'`'"'
+ sed -n "$gl_absolute_header_sed"`'"'
else
gl_cv_next_sys_stat_h='<'sys/stat.h'>'
fi
@@ -27675,10 +32011,22 @@ $as_echo "$gl_cv_next_sys_stat_h" >&6; }
+
+
+
+
+
+
+ if test $WINDOWS_64_BIT_ST_SIZE = 1; then
+
+$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
+
+ fi
+
ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
#include <sys/stat.h>
"
-if test "x$ac_cv_type_nlink_t" = x""yes; then :
+if test "x$ac_cv_type_nlink_t" = xyes; then :
else
@@ -27690,12 +32038,12 @@ fi
- # Code from module sys_time:
- # Code from module sys_wait:
+
+
@@ -27713,7 +32061,7 @@ fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
$as_echo_n "checking absolute name of <sys/wait.h>... " >&6; }
-if test "${gl_cv_next_sys_wait_h+set}" = set; then :
+if ${gl_cv_next_sys_wait_h+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -27729,13 +32077,27 @@ _ACEOF
aix*) gl_absname_cpp="$ac_cpp -C" ;;
*) gl_absname_cpp="$ac_cpp" ;;
esac
+
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+ gl_header_literal_regex=`echo 'sys/wait.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
gl_cv_next_sys_wait_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n '\#/sys/wait.h#{
- s#.*"\(.*/sys/wait.h\)".*#\1#
- s#^/[^/]#//&#
- p
- q
- }'`'"'
+ sed -n "$gl_absolute_header_sed"`'"'
else
gl_cv_next_sys_wait_h='<'sys/wait.h'>'
fi
@@ -27763,53 +32125,24 @@ $as_echo "$gl_cv_next_sys_wait_h" >&6; }
- # Code from module tempname:
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS tempname.$ac_objext"
-
-
:
- # Code from module threadlib:
- # Code from module time:
- # Code from module tls:
- # Code from module tmpdir:
-
- for ac_func in __secure_getenv
-do :
- ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
-if test "x$ac_cv_func___secure_getenv" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE___SECURE_GETENV 1
-_ACEOF
-
-fi
-done
-
-
- # Code from module unistd:
-
+ :
@@ -27827,7 +32160,7 @@ done
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
-if test "${gl_cv_next_unistd_h+set}" = set; then :
+if ${gl_cv_next_unistd_h+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -27843,13 +32176,27 @@ _ACEOF
aix*) gl_absname_cpp="$ac_cpp -C" ;;
*) gl_absname_cpp="$ac_cpp" ;;
esac
+
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+ gl_header_literal_regex=`echo 'unistd.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n '\#/unistd.h#{
- s#.*"\(.*/unistd.h\)".*#\1#
- s#^/[^/]#//&#
- p
- q
- }'`'"'
+ sed -n "$gl_absolute_header_sed"`'"'
else
gl_cv_next_unistd_h='<'unistd.h'>'
fi
@@ -27882,43 +32229,15 @@ $as_echo "$gl_cv_next_unistd_h" >&6; }
- # Code from module unistd-safer:
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS dup-safer.$ac_objext"
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS fd-safer.$ac_objext"
-
-
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS pipe-safer.$ac_objext"
-
-
- # Code from module unlocked-io:
-
-
$as_echo "#define USE_UNLOCKED_IO 1" >>confdefs.h
@@ -27938,9 +32257,6 @@ $as_echo "#define USE_UNLOCKED_IO 1" >>confdefs.h
- # Code from module update-copyright:
- # Code from module useless-if-before-free:
- # Code from module vasnprintf:
if test $ac_cv_func_vasnprintf = no; then
@@ -28003,7 +32319,7 @@ $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
-if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
+if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
else
@@ -28020,12 +32336,11 @@ fi
fi
- # Code from module vasprintf:
for ac_func in vasprintf
do :
ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
-if test "x$ac_cv_func_vasprintf" = x""yes; then :
+if test "x$ac_cv_func_vasprintf" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_VASPRINTF 1
_ACEOF
@@ -28074,23 +32389,19 @@ done
- GNULIB_VASPRINTF=1
+ GNULIB_VASPRINTF=1
-$as_echo "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
-
- XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format"
+$as_echo "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
- XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format"
- # Code from module vasprintf-posix:
@@ -28110,7 +32421,7 @@ $as_echo "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
for ac_func in vasprintf
do :
ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
-if test "x$ac_cv_func_vasprintf" = x""yes; then :
+if test "x$ac_cv_func_vasprintf" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_VASPRINTF 1
_ACEOF
@@ -28222,7 +32533,7 @@ $as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
for ac_func in nl_langinfo
do :
ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
-if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
+if test "x$ac_cv_func_nl_langinfo" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_NL_LANGINFO 1
_ACEOF
@@ -28388,7 +32699,7 @@ $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
-if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
+if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
else
@@ -28440,19 +32751,8 @@ fi
fi
- # Code from module vc-list-files:
- # Code from module verify:
- # Code from module verror:
-
-
- XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=verror:3:c-format"
-
- XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=verror_at_line:5:c-format"
-
- # Code from module version-etc:
-
# Check whether --with-packager was given.
if test "${with_packager+set}" = set; then :
withval=$with_packager; case $withval in
@@ -28503,15 +32803,12 @@ fi
as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
fi
- # Code from module version-etc-fsf:
- # Code from module wait-process:
-
for ac_func in waitid
do :
ac_fn_c_check_func "$LINENO" "waitid" "ac_cv_func_waitid"
-if test "x$ac_cv_func_waitid" = x""yes; then :
+if test "x$ac_cv_func_waitid" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_WAITID 1
_ACEOF
@@ -28520,11 +32817,14 @@ fi
done
- # Code from module waitpid:
+ HAVE_WAITPID=1
case $host_os in
- mingw*)
+ mingw*) HAVE_WAITPID=0 ;;
+ esac
+
+ if test $HAVE_WAITPID = 0; then
@@ -28535,24 +32835,22 @@ done
M4_LIBOBJS="$M4_LIBOBJS waitpid.$ac_objext"
- ;;
- esac
+ fi
- GNULIB_WAITPID=1
+ GNULIB_WAITPID=1
-$as_echo "#define GNULIB_TEST_WAITPID 1" >>confdefs.h
- # Code from module warn-on-use:
- # Code from module warnings:
+$as_echo "#define GNULIB_TEST_WAITPID 1" >>confdefs.h
+
+
- # Code from module wchar:
@@ -28570,7 +32868,7 @@ $as_echo "#define GNULIB_TEST_WAITPID 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
-if test "${gl_cv_next_wchar_h+set}" = set; then :
+if ${gl_cv_next_wchar_h+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -28586,13 +32884,27 @@ _ACEOF
aix*) gl_absname_cpp="$ac_cpp -C" ;;
*) gl_absname_cpp="$ac_cpp" ;;
esac
+
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+ gl_header_literal_regex=`echo 'wchar.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n '\#/wchar.h#{
- s#.*"\(.*/wchar.h\)".*#\1#
- s#^/[^/]#//&#
- p
- q
- }'`'"'
+ sed -n "$gl_absolute_header_sed"`'"'
else
gl_cv_next_wchar_h='<'wchar.h'>'
fi
@@ -28635,7 +32947,6 @@ $as_echo "$gl_cv_next_wchar_h" >&6; }
- # Code from module wcrtomb:
@@ -28652,7 +32963,7 @@ $as_echo "$gl_cv_next_wchar_h" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
-if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
+if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -28715,7 +33026,7 @@ $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 test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
+if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -28789,16 +33100,35 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
else
REPLACE_MBSTATE_T=1
fi
- if test $REPLACE_MBSTATE_T = 1; then
-
- :
-
- 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: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+
+"
+if test "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
@@ -28810,7 +33140,7 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
$as_echo_n "checking whether wcrtomb return value is correct... " >&6; }
-if test "${gl_cv_func_wcrtomb_retval+set}" = set; then :
+if ${gl_cv_func_wcrtomb_retval+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -28883,10 +33213,8 @@ $as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
esac
fi
fi
- if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
-
- :
+ if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
@@ -28905,7 +33233,10 @@ $as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
- GNULIB_WCRTOMB=1
+
+ GNULIB_WCRTOMB=1
+
+
@@ -28913,7 +33244,6 @@ $as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
- # Code from module wctype-h:
@@ -28927,8 +33257,6 @@ $as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
-
-
if test $gt_cv_c_wint_t = yes; then
HAVE_WINT_T=1
else
@@ -28950,7 +33278,7 @@ $as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
-if test "${gl_cv_next_wctype_h+set}" = set; then :
+if ${gl_cv_next_wctype_h+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -28966,13 +33294,27 @@ _ACEOF
aix*) gl_absname_cpp="$ac_cpp -C" ;;
*) gl_absname_cpp="$ac_cpp" ;;
esac
+
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+ gl_header_literal_regex=`echo 'wctype.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n '\#/wctype.h#{
- s#.*"\(.*/wctype.h\)".*#\1#
- s#^/[^/]#//&#
- p
- q
- }'`'"'
+ sed -n "$gl_absolute_header_sed"`'"'
else
gl_cv_next_wctype_h='<'wctype.h'>'
fi
@@ -29000,7 +33342,7 @@ $as_echo "$gl_cv_next_wctype_h" >&6; }
if test $ac_cv_func_iswcntrl = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
$as_echo_n "checking whether iswcntrl works... " >&6; }
-if test "${gl_cv_func_iswcntrl_works+set}" = set; then :
+if ${gl_cv_func_iswcntrl_works+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -29020,9 +33362,9 @@ main ()
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- gl_cv_func_iswcntrl_works=yes
+ gl_cv_func_iswcntrl_works="guessing yes"
else
- gl_cv_func_iswcntrl_works=no
+ gl_cv_func_iswcntrl_works="guessing no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -29062,20 +33404,72 @@ $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
fi
- if test "$gl_cv_func_iswcntrl_works" = no; then
- REPLACE_ISWCNTRL=1
+ case "$gl_cv_func_iswcntrl_works" in
+ *yes) REPLACE_ISWCNTRL=0 ;;
+ *) REPLACE_ISWCNTRL=1 ;;
+ esac
+
+
+ if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
+ :
+ fi
+
+ if test $REPLACE_ISWCNTRL = 1; then
+ REPLACE_TOWLOWER=1
else
- REPLACE_ISWCNTRL=0
+ for ac_func in towlower
+do :
+ ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
+if test "x$ac_cv_func_towlower" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_TOWLOWER 1
+_ACEOF
+
+fi
+done
+
+ if test $ac_cv_func_towlower = yes; then
+ REPLACE_TOWLOWER=0
+ else
+ ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
+ included before <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
+ must be included before <wchar.h>. */
+ #include <stddef.h>
+ #include <stdio.h>
+ #include <time.h>
+ #include <wchar.h>
+ #if HAVE_WCTYPE_H
+ # include <wctype.h>
+ #endif
+
+"
+if test "x$ac_cv_have_decl_towlower" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_TOWLOWER $ac_have_decl
+_ACEOF
+
+ if test $ac_cv_have_decl_towlower = yes; then
+ REPLACE_TOWLOWER=1
+ else
+ REPLACE_TOWLOWER=0
+ fi
+ fi
fi
- if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
+ if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
:
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
$as_echo_n "checking for wctype_t... " >&6; }
-if test "${gl_cv_type_wctype_t+set}" = set; then :
+if ${gl_cv_type_wctype_t+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -29117,7 +33511,7 @@ $as_echo "$gl_cv_type_wctype_t" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
$as_echo_n "checking for wctrans_t... " >&6; }
-if test "${gl_cv_type_wctrans_t+set}" = set; then :
+if ${gl_cv_type_wctrans_t+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -29157,62 +33551,14 @@ $as_echo "$gl_cv_type_wctrans_t" >&6; }
- # Code from module xalloc:
-
-
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS xmalloc.$ac_objext"
-
-
-
-
- :
-
-
:
- # Code from module xalloc-die:
- # Code from module xlist:
-
-
-
- # Code from module xmalloca:
- # Code from module xoset:
-
-
-
- # Code from module xprintf:
-
-
- XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xprintf:1:c-format"
-
-
-
- XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xvprintf:1:c-format"
-
-
-
- XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xfprintf:2:c-format"
-
-
-
- XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xvfprintf:2:c-format"
-
- # Code from module xsize:
-
-
for ac_header in stdint.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdint_h" = x""yes; then :
+if test "x$ac_cv_header_stdint_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STDINT_H 1
_ACEOF
@@ -29222,21 +33568,13 @@ fi
done
- # Code from module xstrndup:
:
- # Code from module xvasprintf:
-
-
-
-
-
- XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xasprintf:1:c-format"
+ :
- # Code from module xvasprintf-posix:
# End of code from modules
@@ -29267,7 +33605,7 @@ done
if test "$CXX_CHOICE" = no; then
- CXX=":"
+ CXX=no
fi
if test -z "$CXX"; then
if test -n "$CCC"; then
@@ -29280,7 +33618,7 @@ done
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then :
+if ${ac_cv_prog_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CXX"; then
@@ -29292,7 +33630,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -29324,7 +33662,7 @@ do
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CXX"; then
@@ -29336,7 +33674,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CXX="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -29375,7 +33713,7 @@ fi
fi
fi
- if test "$CXX" != ":"; then
+ if test "$CXX" != no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
$as_echo_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works... " >&6; }
ac_ext=cpp
@@ -29411,7 +33749,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_ansicxx_works" >&5
$as_echo "$gl_cv_prog_ansicxx_works" >&6; }
if test $gl_cv_prog_ansicxx_works = no; then
- CXX=:
+ CXX=no
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler supports namespaces" >&5
$as_echo_n "checking whether the C++ compiler supports namespaces... " >&6; }
@@ -29446,14 +33784,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_ansicxx_namespaces" >&5
$as_echo "$gl_cv_prog_ansicxx_namespaces" >&6; }
if test $gl_cv_prog_ansicxx_namespaces = no; then
- CXX=:
+ CXX=no
fi
fi
fi
- if test "$CXX" != ":"; then
+ if test "$CXX" != no; then
ANSICXX_TRUE=
ANSICXX_FALSE='#'
else
@@ -29462,21 +33800,22 @@ else
fi
- if test "$CXX" != ":"; then
+ if test "$CXX" != no; then
depcc="$CXX" am_compiler_list=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CXX_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'.
+ # 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.
@@ -29510,16 +33849,16 @@ else
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this. Also, some Intel
- # versions had trouble with output in subdirs
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
am__obj=sub/conftest.${OBJEXT-o}
am__minus_obj="-o $am__obj"
case $depmode in
@@ -29528,16 +33867,16 @@ else
test "$am__universal" = false || continue
;;
nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
- msvisualcpp | msvcmsys)
- # This compiler won't grok `-c -o', but also, the minuso test has
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
am__obj=conftest.${OBJEXT-o}
@@ -29607,7 +33946,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
$as_echo_n "checking for a traditional french locale... " >&6; }
-if test "${gt_cv_locale_fr+set}" = set; then :
+if ${gt_cv_locale_fr+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -29626,9 +33965,9 @@ char buf[16];
int main () {
/* Check whether the given locale name is recognized by the system. */
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Win32, setlocale(category, "") looks at the system settings,
+ /* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -29637,7 +33976,7 @@ int main () {
if (setlocale (LC_ALL, "") == NULL) return 1;
#endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -29663,10 +34002,12 @@ int main () {
one byte long. This excludes the UTF-8 encoding. */
t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
+#endif
return 0;
}
@@ -29684,7 +34025,7 @@ _ACEOF
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
mingw*)
- # Test for the native Win32 locale name.
+ # Test for the native Windows locale name.
if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_fr=French_France.1252
else
@@ -29694,7 +34035,7 @@ _ACEOF
;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the usual locale name.
@@ -29739,7 +34080,7 @@ $as_echo "$gt_cv_locale_fr" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
$as_echo_n "checking for a french Unicode locale... " >&6; }
-if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+if ${gt_cv_locale_fr_utf8+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -29762,9 +34103,9 @@ int main () {
#if !(defined __BEOS__ || defined __HAIKU__)
/* Check whether the given locale name is recognized by the system. */
# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Win32, setlocale(category, "") looks at the system settings,
+ /* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -29773,7 +34114,7 @@ int main () {
if (setlocale (LC_ALL, "") == NULL) return 1;
# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -29799,10 +34140,12 @@ int main () {
|| buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
return 1;
#endif
+#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
+#endif
return 0;
}
@@ -29820,7 +34163,7 @@ _ACEOF
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
mingw*)
- # Test for the hypothetical native Win32 locale name.
+ # Test for the hypothetical native Windows locale name.
if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_fr_utf8=French_France.65001
else
@@ -29830,7 +34173,7 @@ _ACEOF
;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the usual locale name.
@@ -29866,7 +34209,7 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
$as_echo_n "checking for a traditional french locale... " >&6; }
-if test "${gt_cv_locale_fr+set}" = set; then :
+if ${gt_cv_locale_fr+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -29885,9 +34228,9 @@ char buf[16];
int main () {
/* Check whether the given locale name is recognized by the system. */
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Win32, setlocale(category, "") looks at the system settings,
+ /* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -29896,7 +34239,7 @@ int main () {
if (setlocale (LC_ALL, "") == NULL) return 1;
#endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -29922,10 +34265,12 @@ int main () {
one byte long. This excludes the UTF-8 encoding. */
t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
+#endif
return 0;
}
@@ -29943,7 +34288,7 @@ _ACEOF
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
mingw*)
- # Test for the native Win32 locale name.
+ # Test for the native Windows locale name.
if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_fr=French_France.1252
else
@@ -29953,7 +34298,7 @@ _ACEOF
;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the usual locale name.
@@ -29999,7 +34344,7 @@ $as_echo "$gt_cv_locale_fr" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
$as_echo_n "checking for a turkish Unicode locale... " >&6; }
-if test "${gt_cv_locale_tr_utf8+set}" = set; then :
+if ${gt_cv_locale_tr_utf8+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -30023,9 +34368,9 @@ int main () {
program return 1 on BeOS. */
/* Check whether the given locale name is recognized by the system. */
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Win32, setlocale(category, "") looks at the system settings,
+ /* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -30034,7 +34379,7 @@ int main () {
if (setlocale (LC_ALL, "") == NULL) return 1;
#endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On MacOS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
+ On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -30081,7 +34426,7 @@ _ACEOF
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
mingw*)
- # Test for the hypothetical native Win32 locale name.
+ # Test for the hypothetical native Windows locale name.
if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_tr_utf8=Turkish_Turkey.65001
else
@@ -30091,7 +34436,7 @@ _ACEOF
;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the usual locale name.
@@ -30127,8 +34472,23 @@ $as_echo "$gt_cv_locale_tr_utf8" >&6; }
+ for ac_func in closedir
+do :
+ ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
+if test "x$ac_cv_func_closedir" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_CLOSEDIR 1
+_ACEOF
+
+fi
+done
+
+ if test $ac_cv_func_closedir = no; then
+ HAVE_CLOSEDIR=0
+ fi
+
- if test $REPLACE_FTELLO != 0; then
+ if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
@@ -30137,22 +34497,292 @@ $as_echo "$gt_cv_locale_tr_utf8" >&6; }
- M4tests_LIBOBJS="$M4tests_LIBOBJS ftell.$ac_objext"
+ M4tests_LIBOBJS="$M4tests_LIBOBJS closedir.$ac_objext"
- REPLACE_FTELL=1
fi
- GNULIB_FTELL=$gl_module_indicator_condition
+ if test "$GNULIB_CLOSEDIR" != 1; then
+ if test "$GNULIB_CLOSEDIR" = 0; then
+ GNULIB_CLOSEDIR=$gl_module_indicator_condition
+ else
+ GNULIB_CLOSEDIR="($GNULIB_CLOSEDIR || $gl_module_indicator_condition)"
+ fi
+ fi
-$as_echo "#define GNULIB_TEST_FTELL 1" >>confdefs.h
+$as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_dirent_h='<'dirent.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
+$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
+if ${gl_cv_next_dirent_h+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_dirent_h = yes; then
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <dirent.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+ gl_header_literal_regex=`echo 'dirent.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
+ gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`'"'
+ else
+ gl_cv_next_dirent_h='<'dirent.h'>'
+ fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
+$as_echo "$gl_cv_next_dirent_h" >&6; }
+ fi
+ NEXT_DIRENT_H=$gl_cv_next_dirent_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'dirent.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_dirent_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
+
+
+
+
+ if test $ac_cv_header_dirent_h = yes; then
+ HAVE_DIRENT_H=1
+ else
+ HAVE_DIRENT_H=0
+ fi
+
+
+
+
+
+
+
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ REPLACE_DUP=1
+ fi
+
+
+ if test $REPLACE_DUP = 1; then
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS dup.$ac_objext"
+
+ :
+ fi
+
+
+
+
+
+ if test "$GNULIB_DUP" != 1; then
+ if test "$GNULIB_DUP" = 0; then
+ GNULIB_DUP=$gl_module_indicator_condition
+ else
+ GNULIB_DUP="($GNULIB_DUP || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+$as_echo "#define GNULIB_TEST_DUP 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 <stdio.h>
+#include <errno.h>
+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
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_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
+
+
+
+
+
+
+
+
+
+
+
+
+ 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
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_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
+
@@ -30161,7 +34791,7 @@ $as_echo "#define GNULIB_TEST_FTELL 1" >>confdefs.h
for ac_func in getpagesize
do :
ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
-if test "x$ac_cv_func_getpagesize" = x""yes; then :
+if test "x$ac_cv_func_getpagesize" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_GETPAGESIZE 1
_ACEOF
@@ -30174,7 +34804,7 @@ done
for ac_header in OS.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
-if test "x$ac_cv_header_OS_h" = x""yes; then :
+if test "x$ac_cv_header_OS_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_OS_H 1
_ACEOF
@@ -30189,7 +34819,7 @@ done
for ac_header in sys/param.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_param_h" = x""yes; then :
+if test "x$ac_cv_header_sys_param_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SYS_PARAM_H 1
_ACEOF
@@ -30205,6 +34835,17 @@ done
case "$host_os" in
mingw*)
REPLACE_GETPAGESIZE=1
+ ;;
+ esac
+ ac_fn_c_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getpagesize" = xyes; then :
+
+else
+ HAVE_DECL_GETPAGESIZE=0
+fi
+
+
+ if test $REPLACE_GETPAGESIZE = 1; then
@@ -30215,37 +34856,291 @@ done
M4tests_LIBOBJS="$M4tests_LIBOBJS getpagesize.$ac_objext"
- ;;
- esac
- ac_fn_c_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default"
-if test "x$ac_cv_have_decl_getpagesize" = x""yes; then :
+ 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 <stdint.h>
+ extern intptr_t foo;
+ extern $gltype1 foo;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ PRIPTR_PREFIX='"'$glpfx'"'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test -n "$PRIPTR_PREFIX" && break
+ done
+ fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
+$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
+if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- HAVE_DECL_GETPAGESIZE=0
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Work also in C++ mode. */
+ #define __STDC_LIMIT_MACROS 1
+
+ /* Work if build is not clean. */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+ #include <limits.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #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 <limits.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #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
- GNULIB_GETPAGESIZE=$gl_module_indicator_condition
+ #include <limits.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #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
-$as_echo "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
+
+ 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 <limits.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #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
{ $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 test "${gl_cv_cc_double_expbit0+set}" = set; then :
+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
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#if defined arm || defined __arm || defined __arm__
@@ -30259,7 +35154,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
else
:
-if test "${ac_cv_c_bigendian+set}" = set; then :
+if ${ac_cv_c_bigendian+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_cv_c_bigendian=unknown
@@ -30585,7 +35480,7 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
$as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
-if test "${gl_cv_cc_float_expbit0+set}" = set; then :
+if ${gl_cv_cc_float_expbit0+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -30695,7 +35590,7 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
-if test "${gl_cv_cc_long_double_expbit0+set}" = set; then :
+if ${gl_cv_cc_long_double_expbit0+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -30807,22 +35702,13 @@ _ACEOF
+
if test $ac_cv_func_link = no; then
HAVE_LINK=0
-
-
-
-
-
-
-
-
- M4tests_LIBOBJS="$M4tests_LIBOBJS link.$ac_objext"
-
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link handles trailing slash correctly" >&5
-$as_echo_n "checking whether link handles trailing slash correctly... " >&6; }
-if test "${gl_cv_func_link_works+set}" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link obeys POSIX" >&5
+$as_echo_n "checking whether link obeys POSIX... " >&6; }
+if ${gl_cv_func_link_works+:} false; then :
$as_echo_n "(cached) " >&6
else
touch conftest.a
@@ -30831,7 +35717,13 @@ else
ln -s conftest.a conftest.lnk
fi
if test "$cross_compiling" = yes; then :
- gl_cv_func_link_works="guessing no"
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_link_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_link_works="guessing no" ;;
+ esac
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -30846,6 +35738,10 @@ int result = 0;
#if HAVE_LSTAT
if (!link ("conftest.lnk/", "conftest.b"))
result |= 2;
+ if (rename ("conftest.a", "conftest.b"))
+ result |= 4;
+ if (!link ("conftest.b", "conftest.lnk"))
+ result |= 8;
#endif
return result;
@@ -30866,168 +35762,44 @@ fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_works" >&5
$as_echo "$gl_cv_func_link_works" >&6; }
- if test "$gl_cv_func_link_works" != yes; then
- REPLACE_LINK=1
-
-
-
-
-
-
-
-
- M4tests_LIBOBJS="$M4tests_LIBOBJS link.$ac_objext"
-
- fi
+ case "$gl_cv_func_link_works" in
+ *yes) ;;
+ *)
+ REPLACE_LINK=1
+ ;;
+ esac
fi
+ if test $HAVE_LINK = 0 || test $REPLACE_LINK = 1; then
- GNULIB_LINK=$gl_module_indicator_condition
-
-
-
-$as_echo "#define GNULIB_TEST_LINK 1" >>confdefs.h
-
-
+ M4tests_LIBOBJS="$M4tests_LIBOBJS link.$ac_objext"
+ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
-$as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
-if test "${gl_cv_header_locale_h_posix2001+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <locale.h>
- int x = LC_MESSAGES;
-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 test "${gl_cv_header_locale_has_locale_t+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <locale.h>
- 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
+ if test "$GNULIB_LINK" != 1; then
+ if test "$GNULIB_LINK" = 0; then
+ GNULIB_LINK=$gl_module_indicator_condition
else
- gl_cv_header_locale_h_needs_xlocale_h=yes
+ GNULIB_LINK="($GNULIB_LINK || $gl_module_indicator_condition)"
fi
- else
- HAVE_XLOCALE_H=0
- gl_cv_header_locale_h_needs_xlocale_h=no
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 <locale.h>" >&5
-$as_echo_n "checking absolute name of <locale.h>... " >&6; }
-if test "${gl_cv_next_locale_h+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <locale.h>
-
-_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
- gl_cv_next_locale_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n '\#/locale.h#{
- s#.*"\(.*/locale.h\)".*#\1#
- s#^/[^/]#//&#
- p
- q
- }'`'"'
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
-$as_echo "$gl_cv_next_locale_h" >&6; }
- fi
- NEXT_LOCALE_H=$gl_cv_next_locale_h
-
- if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
- # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
- gl_next_as_first_directive='<'locale.h'>'
- else
- # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
- gl_next_as_first_directive=$gl_cv_next_locale_h
- fi
- NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
-
-
-
-
-
- if test -n "$STDDEF_H" \
- || test $gl_cv_header_locale_h_posix2001 = no \
- || test $gl_cv_header_locale_h_needs_xlocale_h = yes; then
-
- :
-
- fi
+$as_echo "#define GNULIB_TEST_LINK 1" >>confdefs.h
@@ -31054,7 +35826,7 @@ done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
$as_echo_n "checking for a traditional french locale... " >&6; }
-if test "${gt_cv_locale_fr+set}" = set; then :
+if ${gt_cv_locale_fr+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -31073,9 +35845,9 @@ char buf[16];
int main () {
/* Check whether the given locale name is recognized by the system. */
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Win32, setlocale(category, "") looks at the system settings,
+ /* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -31084,7 +35856,7 @@ int main () {
if (setlocale (LC_ALL, "") == NULL) return 1;
#endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -31110,10 +35882,12 @@ int main () {
one byte long. This excludes the UTF-8 encoding. */
t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
+#endif
return 0;
}
@@ -31131,7 +35905,7 @@ _ACEOF
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
mingw*)
- # Test for the native Win32 locale name.
+ # Test for the native Windows locale name.
if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_fr=French_France.1252
else
@@ -31141,7 +35915,7 @@ _ACEOF
;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the usual locale name.
@@ -31186,7 +35960,7 @@ $as_echo "$gt_cv_locale_fr" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
$as_echo_n "checking for a french Unicode locale... " >&6; }
-if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+if ${gt_cv_locale_fr_utf8+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -31209,9 +35983,9 @@ int main () {
#if !(defined __BEOS__ || defined __HAIKU__)
/* Check whether the given locale name is recognized by the system. */
# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Win32, setlocale(category, "") looks at the system settings,
+ /* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -31220,7 +35994,7 @@ int main () {
if (setlocale (LC_ALL, "") == NULL) return 1;
# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -31246,10 +36020,12 @@ int main () {
|| buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
return 1;
#endif
+#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
+#endif
return 0;
}
@@ -31267,7 +36043,7 @@ _ACEOF
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
mingw*)
- # Test for the hypothetical native Win32 locale name.
+ # Test for the hypothetical native Windows locale name.
if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_fr_utf8=French_France.65001
else
@@ -31277,7 +36053,7 @@ _ACEOF
;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the usual locale name.
@@ -31313,7 +36089,7 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
$as_echo_n "checking for a traditional japanese locale... " >&6; }
-if test "${gt_cv_locale_ja+set}" = set; then :
+if ${gt_cv_locale_ja+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -31334,9 +36110,9 @@ int main ()
const char *p;
/* Check whether the given locale name is recognized by the system. */
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Win32, setlocale(category, "") looks at the system settings,
+ /* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -31345,7 +36121,7 @@ int main ()
if (setlocale (LC_ALL, "") == NULL) return 1;
#endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -31394,13 +36170,14 @@ _ACEOF
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
mingw*)
- # Note that on native Win32, the Japanese locale is Japanese_Japan.932,
- # and CP932 is very different from EUC-JP, so we cannot use it here.
+ # Note that on native Windows, the Japanese locale is
+ # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
+ # cannot use it here.
gt_cv_locale_ja=none
;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the AIX locale name.
@@ -31451,7 +36228,7 @@ $as_echo "$gt_cv_locale_ja" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
$as_echo_n "checking for a transitional chinese locale... " >&6; }
-if test "${gt_cv_locale_zh_CN+set}" = set; then :
+if ${gt_cv_locale_zh_CN+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -31473,9 +36250,9 @@ int main ()
const char *p;
/* Check whether the given locale name is recognized by the system. */
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Win32, setlocale(category, "") looks at the system settings,
+ /* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -31484,7 +36261,7 @@ int main ()
if (setlocale (LC_ALL, "") == NULL) return 1;
#endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -31533,7 +36310,7 @@ _ACEOF
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
mingw*)
- # Test for the hypothetical native Win32 locale name.
+ # Test for the hypothetical native Windows locale name.
if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_zh_CN=Chinese_China.54936
else
@@ -31541,9 +36318,15 @@ _ACEOF
gt_cv_locale_zh_CN=none
fi
;;
+ solaris2.8)
+ # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
+ # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
+ # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
+ gt_cv_locale_zh_CN=none
+ ;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the locale name without encoding suffix.
@@ -31577,7 +36360,7 @@ $as_echo "$gt_cv_locale_zh_CN" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
$as_echo_n "checking for a french Unicode locale... " >&6; }
-if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+if ${gt_cv_locale_fr_utf8+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -31600,9 +36383,9 @@ int main () {
#if !(defined __BEOS__ || defined __HAIKU__)
/* Check whether the given locale name is recognized by the system. */
# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Win32, setlocale(category, "") looks at the system settings,
+ /* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -31611,7 +36394,7 @@ int main () {
if (setlocale (LC_ALL, "") == NULL) return 1;
# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -31637,10 +36420,12 @@ int main () {
|| buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
return 1;
#endif
+#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
+#endif
return 0;
}
@@ -31658,7 +36443,7 @@ _ACEOF
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
mingw*)
- # Test for the hypothetical native Win32 locale name.
+ # Test for the hypothetical native Windows locale name.
if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_fr_utf8=French_France.65001
else
@@ -31668,7 +36453,7 @@ _ACEOF
;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the usual locale name.
@@ -31706,7 +36491,7 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; }
# fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
# irrelevant for anonymous mappings.
ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
-if test "x$ac_cv_func_mmap" = x""yes; then :
+if test "x$ac_cv_func_mmap" = xyes; then :
gl_have_mmap=yes
else
gl_have_mmap=no
@@ -31723,12 +36508,12 @@ $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
#include <sys/mman.h>
#ifdef MAP_ANONYMOUS
- I cant identify this map.
+ I cannot identify this map
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+ $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
gl_have_mmap_anonymous=yes
fi
rm -f conftest*
@@ -31739,12 +36524,12 @@ rm -f conftest*
#include <sys/mman.h>
#ifdef MAP_ANON
- I cant identify this map.
+ I cannot identify this map
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+ $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
@@ -31771,7 +36556,7 @@ $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
# fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
# irrelevant for anonymous mappings.
ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
-if test "x$ac_cv_func_mmap" = x""yes; then :
+if test "x$ac_cv_func_mmap" = xyes; then :
gl_have_mmap=yes
else
gl_have_mmap=no
@@ -31788,12 +36573,12 @@ $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
#include <sys/mman.h>
#ifdef MAP_ANONYMOUS
- I cant identify this map.
+ I cannot identify this map
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+ $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
gl_have_mmap_anonymous=yes
fi
rm -f conftest*
@@ -31804,12 +36589,12 @@ rm -f conftest*
#include <sys/mman.h>
#ifdef MAP_ANON
- I cant identify this map.
+ I cannot identify this map
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+ $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
@@ -31834,7 +36619,7 @@ $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
$as_echo_n "checking for a traditional french locale... " >&6; }
-if test "${gt_cv_locale_fr+set}" = set; then :
+if ${gt_cv_locale_fr+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -31853,9 +36638,9 @@ char buf[16];
int main () {
/* Check whether the given locale name is recognized by the system. */
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Win32, setlocale(category, "") looks at the system settings,
+ /* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -31864,7 +36649,7 @@ int main () {
if (setlocale (LC_ALL, "") == NULL) return 1;
#endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -31890,10 +36675,12 @@ int main () {
one byte long. This excludes the UTF-8 encoding. */
t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
+#endif
return 0;
}
@@ -31911,7 +36698,7 @@ _ACEOF
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
mingw*)
- # Test for the native Win32 locale name.
+ # Test for the native Windows locale name.
if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_fr=French_France.1252
else
@@ -31921,7 +36708,7 @@ _ACEOF
;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the usual locale name.
@@ -31966,7 +36753,7 @@ $as_echo "$gt_cv_locale_fr" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
$as_echo_n "checking for a french Unicode locale... " >&6; }
-if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+if ${gt_cv_locale_fr_utf8+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -31989,9 +36776,9 @@ int main () {
#if !(defined __BEOS__ || defined __HAIKU__)
/* Check whether the given locale name is recognized by the system. */
# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Win32, setlocale(category, "") looks at the system settings,
+ /* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -32000,7 +36787,7 @@ int main () {
if (setlocale (LC_ALL, "") == NULL) return 1;
# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -32026,10 +36813,12 @@ int main () {
|| buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
return 1;
#endif
+#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
+#endif
return 0;
}
@@ -32047,7 +36836,7 @@ _ACEOF
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
mingw*)
- # Test for the hypothetical native Win32 locale name.
+ # Test for the hypothetical native Windows locale name.
if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_fr_utf8=French_France.65001
else
@@ -32057,7 +36846,7 @@ _ACEOF
;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the usual locale name.
@@ -32088,6 +36877,58 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; }
LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+ for ac_func in opendir
+do :
+ ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
+if test "x$ac_cv_func_opendir" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_OPENDIR 1
+_ACEOF
+
+fi
+done
+
+ if test $ac_cv_func_opendir = no; then
+ HAVE_OPENDIR=0
+ fi
+
+
+ if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS opendir.$ac_objext"
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_OPENDIR" != 1; then
+ if test "$GNULIB_OPENDIR" = 0; then
+ GNULIB_OPENDIR=$gl_module_indicator_condition
+ else
+ GNULIB_OPENDIR="($GNULIB_OPENDIR || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+$as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
+
+
+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
[
@@ -32114,13 +36955,19 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
$as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
-if test "${gl_cv_func_svid_putenv+set}" = set; then :
+if ${gl_cv_func_svid_putenv+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
- gl_cv_func_svid_putenv=no
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_svid_putenv="guessing no" ;;
+ esac
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -32160,8 +37007,14 @@ fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
$as_echo "$gl_cv_func_svid_putenv" >&6; }
- if test $gl_cv_func_svid_putenv = no; then
- REPLACE_PUTENV=1
+ case "$gl_cv_func_svid_putenv" in
+ *yes) ;;
+ *)
+ REPLACE_PUTENV=1
+ ;;
+ esac
+
+ if test $REPLACE_PUTENV = 1; then
@@ -32172,12 +37025,34 @@ $as_echo "$gl_cv_func_svid_putenv" >&6; }
M4tests_LIBOBJS="$M4tests_LIBOBJS putenv.$ac_objext"
+
+ ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default"
+if test "x$ac_cv_have_decl__putenv" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL__PUTENV $ac_have_decl
+_ACEOF
+
+
fi
- GNULIB_PUTENV=$gl_module_indicator_condition
+
+ if test "$GNULIB_PUTENV" != 1; then
+ if test "$GNULIB_PUTENV" = 0; then
+ GNULIB_PUTENV=$gl_module_indicator_condition
+ else
+ GNULIB_PUTENV="($GNULIB_PUTENV || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
@@ -32192,7 +37067,72 @@ $as_echo "#define GNULIB_TEST_PUTENV 1" >>confdefs.h
# fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
# irrelevant for anonymous mappings.
ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
-if test "x$ac_cv_func_mmap" = x""yes; then :
+if test "x$ac_cv_func_mmap" = xyes; then :
+ gl_have_mmap=yes
+else
+ gl_have_mmap=no
+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 <sys/mman.h>
+#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 <sys/mman.h>
+#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
@@ -32209,12 +37149,12 @@ $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
#include <sys/mman.h>
#ifdef MAP_ANONYMOUS
- I cant identify this map.
+ I cannot identify this map
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+ $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
gl_have_mmap_anonymous=yes
fi
rm -f conftest*
@@ -32225,12 +37165,12 @@ rm -f conftest*
#include <sys/mman.h>
#ifdef MAP_ANON
- I cant identify this map.
+ I cannot identify this map
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+ $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
@@ -32252,7 +37192,125 @@ $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
- if test $HAVE_SETENV$REPLACE_SETENV != 10; then
+
+ for ac_func in readdir
+do :
+ ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
+if test "x$ac_cv_func_readdir" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_READDIR 1
+_ACEOF
+
+fi
+done
+
+ if test $ac_cv_func_readdir = no; then
+ HAVE_READDIR=0
+ fi
+
+ if test $HAVE_READDIR = 0; then
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS readdir.$ac_objext"
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_READDIR" != 1; then
+ if test "$GNULIB_READDIR" = 0; then
+ GNULIB_READDIR=$gl_module_indicator_condition
+ else
+ GNULIB_READDIR="($GNULIB_READDIR || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+$as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
+
+
+
+
+
+ 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 <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+
+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
@@ -32268,7 +37326,16 @@ $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
- GNULIB_SETENV=$gl_module_indicator_condition
+
+ 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
+
+
@@ -32281,11 +37348,14 @@ $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
case "$host_os" in
mingw*) REPLACE_SETLOCALE=1 ;;
+ cygwin*)
+ case `uname -r` in
+ 1.5.*) REPLACE_SETLOCALE=1 ;;
+ esac
+ ;;
esac
- if test $REPLACE_SETLOCALE = 1; then
-
- :
+ if test $REPLACE_SETLOCALE = 1; then
@@ -32304,7 +37374,16 @@ $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
- GNULIB_SETLOCALE=$gl_module_indicator_condition
+
+ if test "$GNULIB_SETLOCALE" != 1; then
+ if test "$GNULIB_SETLOCALE" = 0; then
+ GNULIB_SETLOCALE=$gl_module_indicator_condition
+ else
+ GNULIB_SETLOCALE="($GNULIB_SETLOCALE || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
@@ -32317,7 +37396,7 @@ $as_echo "#define GNULIB_TEST_SETLOCALE 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
$as_echo_n "checking for a traditional french locale... " >&6; }
-if test "${gt_cv_locale_fr+set}" = set; then :
+if ${gt_cv_locale_fr+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -32336,9 +37415,9 @@ char buf[16];
int main () {
/* Check whether the given locale name is recognized by the system. */
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Win32, setlocale(category, "") looks at the system settings,
+ /* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -32347,7 +37426,7 @@ int main () {
if (setlocale (LC_ALL, "") == NULL) return 1;
#endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -32373,10 +37452,12 @@ int main () {
one byte long. This excludes the UTF-8 encoding. */
t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
+#endif
return 0;
}
@@ -32394,7 +37475,7 @@ _ACEOF
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
mingw*)
- # Test for the native Win32 locale name.
+ # Test for the native Windows locale name.
if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_fr=French_France.1252
else
@@ -32404,7 +37485,7 @@ _ACEOF
;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the usual locale name.
@@ -32449,7 +37530,7 @@ $as_echo "$gt_cv_locale_fr" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
$as_echo_n "checking for a french Unicode locale... " >&6; }
-if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+if ${gt_cv_locale_fr_utf8+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -32472,9 +37553,9 @@ int main () {
#if !(defined __BEOS__ || defined __HAIKU__)
/* Check whether the given locale name is recognized by the system. */
# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Win32, setlocale(category, "") looks at the system settings,
+ /* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -32483,7 +37564,7 @@ int main () {
if (setlocale (LC_ALL, "") == NULL) return 1;
# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -32509,10 +37590,12 @@ int main () {
|| buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
return 1;
#endif
+#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
+#endif
return 0;
}
@@ -32530,7 +37613,7 @@ _ACEOF
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
mingw*)
- # Test for the hypothetical native Win32 locale name.
+ # Test for the hypothetical native Windows locale name.
if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_fr_utf8=French_France.65001
else
@@ -32540,7 +37623,7 @@ _ACEOF
;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the usual locale name.
@@ -32576,7 +37659,7 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
$as_echo_n "checking for a traditional japanese locale... " >&6; }
-if test "${gt_cv_locale_ja+set}" = set; then :
+if ${gt_cv_locale_ja+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -32597,9 +37680,9 @@ int main ()
const char *p;
/* Check whether the given locale name is recognized by the system. */
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Win32, setlocale(category, "") looks at the system settings,
+ /* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -32608,7 +37691,7 @@ int main ()
if (setlocale (LC_ALL, "") == NULL) return 1;
#endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -32657,13 +37740,14 @@ _ACEOF
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
mingw*)
- # Note that on native Win32, the Japanese locale is Japanese_Japan.932,
- # and CP932 is very different from EUC-JP, so we cannot use it here.
+ # Note that on native Windows, the Japanese locale is
+ # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
+ # cannot use it here.
gt_cv_locale_ja=none
;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the AIX locale name.
@@ -32714,7 +37798,7 @@ $as_echo "$gt_cv_locale_ja" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
$as_echo_n "checking for a transitional chinese locale... " >&6; }
-if test "${gt_cv_locale_zh_CN+set}" = set; then :
+if ${gt_cv_locale_zh_CN+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -32736,9 +37820,9 @@ int main ()
const char *p;
/* Check whether the given locale name is recognized by the system. */
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Win32, setlocale(category, "") looks at the system settings,
+ /* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -32747,7 +37831,7 @@ int main ()
if (setlocale (LC_ALL, "") == NULL) return 1;
#endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -32796,7 +37880,7 @@ _ACEOF
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
mingw*)
- # Test for the hypothetical native Win32 locale name.
+ # Test for the hypothetical native Windows locale name.
if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_zh_CN=Chinese_China.54936
else
@@ -32804,9 +37888,15 @@ _ACEOF
gt_cv_locale_zh_CN=none
fi
;;
+ solaris2.8)
+ # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
+ # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
+ # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
+ gt_cv_locale_zh_CN=none
+ ;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the locale name without encoding suffix.
@@ -32840,120 +37930,168 @@ $as_echo "$gt_cv_locale_zh_CN" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
-$as_echo_n "checking for wchar_t... " >&6; }
-if test "${gt_cv_c_wchar_t+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stddef.h>
- 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
+ ac_fn_c_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
+"
+if test "x$ac_cv_have_decl_sleep" = xyes; then :
+ ac_have_decl=1
else
- gt_cv_c_wchar_t=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_have_decl=0
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $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
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SLEEP $ac_have_decl
+_ACEOF
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
-$as_echo_n "checking for wint_t... " >&6; }
-if test "${gt_cv_c_wint_t+set}" = set; then :
+ if test $ac_cv_have_decl_sleep != yes; then
+ HAVE_SLEEP=0
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
+$as_echo_n "checking for working sleep... " >&6; }
+if ${gl_cv_func_sleep_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_sleep_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_sleep_works="guessing no" ;;
+ esac
+
+else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
- <wchar.h>.
- BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
- before <wchar.h>. */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
- wint_t foo = (wchar_t)'\0';
+#include <errno.h>
+#include <unistd.h>
+#include <signal.h>
+static void
+handle_alarm (int sig)
+{
+ if (sig != SIGALRM)
+ _exit (2);
+}
+
int
main ()
{
+ /* Failure to compile this test due to missing alarm is okay,
+ since all such platforms (mingw) also lack sleep. */
+ unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */
+ unsigned int remaining;
+ signal (SIGALRM, handle_alarm);
+ alarm (1);
+ remaining = sleep (pentecost);
+ if (remaining > pentecost)
+ return 3;
+ if (remaining <= pentecost - 10)
+ return 4;
+ return 0;
+
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- gt_cv_c_wint_t=yes
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_sleep_works=yes
else
- gt_cv_c_wint_t=no
+ gl_cv_func_sleep_works=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
+$as_echo "$gl_cv_func_sleep_works" >&6; }
+ case "$gl_cv_func_sleep_works" in
+ *yes) ;;
+ *)
+ REPLACE_SLEEP=1
+ ;;
+ esac
fi
+ if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
- if test $ac_cv_func_strdup = yes; then
- if test $gl_cv_func_malloc_posix != yes; then
- REPLACE_STRDUP=1
+ M4tests_LIBOBJS="$M4tests_LIBOBJS sleep.$ac_objext"
+ fi
- M4tests_LIBOBJS="$M4tests_LIBOBJS strdup.$ac_objext"
- :
+
+ if test "$GNULIB_SLEEP" != 1; then
+ if test "$GNULIB_SLEEP" = 0; then
+ GNULIB_SLEEP=$gl_module_indicator_condition
+ else
+ GNULIB_SLEEP="($GNULIB_SLEEP || $gl_module_indicator_condition)"
fi
- else
+ fi
+$as_echo "#define GNULIB_TEST_SLEEP 1" >>confdefs.h
- M4tests_LIBOBJS="$M4tests_LIBOBJS strdup.$ac_objext"
- :
+
+
+
+
+
+
+ if test $ac_cv_func_strdup = yes; then
+ if test $gl_cv_func_malloc_posix != yes; then
+ REPLACE_STRDUP=1
+ fi
fi
if test $ac_cv_have_decl_strdup = no; then
HAVE_DECL_STRDUP=0
fi
+ if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS strdup.$ac_objext"
+
+ :
+ fi
+
+
+
+ if test "$GNULIB_STRDUP" != 1; then
+ if test "$GNULIB_STRDUP" = 0; then
+ GNULIB_STRDUP=$gl_module_indicator_condition
+ else
+ GNULIB_STRDUP="($GNULIB_STRDUP || $gl_module_indicator_condition)"
+ fi
+ fi
+
- GNULIB_STRDUP=$gl_module_indicator_condition
@@ -32968,7 +38106,7 @@ $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
# fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
# irrelevant for anonymous mappings.
ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
-if test "x$ac_cv_func_mmap" = x""yes; then :
+if test "x$ac_cv_func_mmap" = xyes; then :
gl_have_mmap=yes
else
gl_have_mmap=no
@@ -32985,12 +38123,12 @@ $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
#include <sys/mman.h>
#ifdef MAP_ANONYMOUS
- I cant identify this map.
+ I cannot identify this map
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+ $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
gl_have_mmap_anonymous=yes
fi
rm -f conftest*
@@ -33001,12 +38139,12 @@ rm -f conftest*
#include <sys/mman.h>
#ifdef MAP_ANON
- I cant identify this map.
+ I cannot identify this map
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+ $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
@@ -33034,7 +38172,7 @@ $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
# fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
# irrelevant for anonymous mappings.
ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
-if test "x$ac_cv_func_mmap" = x""yes; then :
+if test "x$ac_cv_func_mmap" = xyes; then :
gl_have_mmap=yes
else
gl_have_mmap=no
@@ -33051,12 +38189,12 @@ $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
#include <sys/mman.h>
#ifdef MAP_ANONYMOUS
- I cant identify this map.
+ I cannot identify this map
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+ $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
gl_have_mmap_anonymous=yes
fi
rm -f conftest*
@@ -33067,12 +38205,12 @@ rm -f conftest*
#include <sys/mman.h>
#ifdef MAP_ANON
- I cant identify this map.
+ I cannot identify this map
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+ $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
@@ -33097,24 +38235,20 @@ $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
if test $ac_cv_func_symlink = no; then
HAVE_SYMLINK=0
-
-
-
-
-
-
-
-
- M4tests_LIBOBJS="$M4tests_LIBOBJS symlink.$ac_objext"
-
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
$as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
-if test "${gl_cv_func_symlink_works+set}" = set; then :
+if ${gl_cv_func_symlink_works+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
- gl_cv_func_symlink_works="guessing no"
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_symlink_works="guessing no" ;;
+ esac
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -33149,8 +38283,15 @@ fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
$as_echo "$gl_cv_func_symlink_works" >&6; }
- if test "$gl_cv_func_symlink_works" != yes; then
- REPLACE_SYMLINK=1
+ case "$gl_cv_func_symlink_works" in
+ *yes) ;;
+ *)
+ REPLACE_SYMLINK=1
+ ;;
+ esac
+ fi
+
+ if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
@@ -33161,13 +38302,21 @@ $as_echo "$gl_cv_func_symlink_works" >&6; }
M4tests_LIBOBJS="$M4tests_LIBOBJS symlink.$ac_objext"
- fi
fi
- GNULIB_SYMLINK=$gl_module_indicator_condition
+
+ if test "$GNULIB_SYMLINK" != 1; then
+ if test "$GNULIB_SYMLINK" = 0; then
+ GNULIB_SYMLINK=$gl_module_indicator_condition
+ else
+ GNULIB_SYMLINK="($GNULIB_SYMLINK || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
@@ -33184,7 +38333,7 @@ $as_echo "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
for ac_func in unsetenv
do :
ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
-if test "x$ac_cv_func_unsetenv" = x""yes; then :
+if test "x$ac_cv_func_unsetenv" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_UNSETENV 1
_ACEOF
@@ -33193,24 +38342,12 @@ fi
done
if test $ac_cv_func_unsetenv = no; then
-
-
-
-
-
-
-
-
- M4tests_LIBOBJS="$M4tests_LIBOBJS unsetenv.$ac_objext"
-
-
-
-
-
+ HAVE_UNSETENV=0
else
+ HAVE_UNSETENV=1
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
$as_echo_n "checking for unsetenv() return type... " >&6; }
-if test "${gt_cv_func_unsetenv_ret+set}" = set; then :
+if ${gt_cv_func_unsetenv_ret+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -33223,11 +38360,7 @@ extern
#ifdef __cplusplus
"C"
#endif
-#if defined(__STDC__) || defined(__cplusplus)
int unsetenv (const char *name);
-#else
-int unsetenv();
-#endif
int
main ()
@@ -33251,25 +38384,21 @@ $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
REPLACE_UNSETENV=1
-
-
-
-
-
-
-
-
- M4tests_LIBOBJS="$M4tests_LIBOBJS unsetenv.$ac_objext"
-
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
-if test "${gl_cv_func_unsetenv_works+set}" = set; then :
+if ${gl_cv_func_unsetenv_works+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
- gl_cv_func_unsetenv_works="guessing no"
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_unsetenv_works="guessing no" ;;
+ esac
+
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -33314,8 +38443,15 @@ fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
$as_echo "$gl_cv_func_unsetenv_works" >&6; }
- if test "$gl_cv_func_unsetenv_works" != yes; then
- REPLACE_UNSETENV=1
+ case "$gl_cv_func_unsetenv_works" in
+ *yes) ;;
+ *)
+ REPLACE_UNSETENV=1
+ ;;
+ esac
+ fi
+
+ if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
@@ -33326,13 +38462,25 @@ $as_echo "$gl_cv_func_unsetenv_works" >&6; }
M4tests_LIBOBJS="$M4tests_LIBOBJS unsetenv.$ac_objext"
- fi
+
+
+
+
fi
- GNULIB_UNSETENV=$gl_module_indicator_condition
+
+ 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
+
+
@@ -33342,6 +38490,7 @@ $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
abs_aux_dir=`cd "$ac_aux_dir"; pwd`
+
abs_aux_dir=`cd "$ac_aux_dir"; pwd`
@@ -33349,7 +38498,7 @@ $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 test "${gt_cv_locale_fr+set}" = set; then :
+if ${gt_cv_locale_fr+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -33368,9 +38517,9 @@ char buf[16];
int main () {
/* Check whether the given locale name is recognized by the system. */
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Win32, setlocale(category, "") looks at the system settings,
+ /* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -33379,7 +38528,7 @@ int main () {
if (setlocale (LC_ALL, "") == NULL) return 1;
#endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -33405,10 +38554,12 @@ int main () {
one byte long. This excludes the UTF-8 encoding. */
t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
+#endif
return 0;
}
@@ -33426,7 +38577,7 @@ _ACEOF
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
mingw*)
- # Test for the native Win32 locale name.
+ # Test for the native Windows locale name.
if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_fr=French_France.1252
else
@@ -33436,7 +38587,7 @@ _ACEOF
;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the usual locale name.
@@ -33481,7 +38632,7 @@ $as_echo "$gt_cv_locale_fr" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
$as_echo_n "checking for a french Unicode locale... " >&6; }
-if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+if ${gt_cv_locale_fr_utf8+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -33504,9 +38655,9 @@ int main () {
#if !(defined __BEOS__ || defined __HAIKU__)
/* Check whether the given locale name is recognized by the system. */
# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Win32, setlocale(category, "") looks at the system settings,
+ /* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -33515,7 +38666,7 @@ int main () {
if (setlocale (LC_ALL, "") == NULL) return 1;
# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -33541,10 +38692,12 @@ int main () {
|| buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
return 1;
#endif
+#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
+#endif
return 0;
}
@@ -33562,7 +38715,7 @@ _ACEOF
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
mingw*)
- # Test for the hypothetical native Win32 locale name.
+ # Test for the hypothetical native Windows locale name.
if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_fr_utf8=French_France.65001
else
@@ -33572,7 +38725,7 @@ _ACEOF
;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the usual locale name.
@@ -33608,7 +38761,7 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
$as_echo_n "checking for a traditional japanese locale... " >&6; }
-if test "${gt_cv_locale_ja+set}" = set; then :
+if ${gt_cv_locale_ja+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -33629,9 +38782,9 @@ int main ()
const char *p;
/* Check whether the given locale name is recognized by the system. */
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Win32, setlocale(category, "") looks at the system settings,
+ /* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -33640,7 +38793,7 @@ int main ()
if (setlocale (LC_ALL, "") == NULL) return 1;
#endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -33689,13 +38842,14 @@ _ACEOF
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
mingw*)
- # Note that on native Win32, the Japanese locale is Japanese_Japan.932,
- # and CP932 is very different from EUC-JP, so we cannot use it here.
+ # Note that on native Windows, the Japanese locale is
+ # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
+ # cannot use it here.
gt_cv_locale_ja=none
;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the AIX locale name.
@@ -33746,7 +38900,7 @@ $as_echo "$gt_cv_locale_ja" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
$as_echo_n "checking for a transitional chinese locale... " >&6; }
-if test "${gt_cv_locale_zh_CN+set}" = set; then :
+if ${gt_cv_locale_zh_CN+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -33768,9 +38922,9 @@ int main ()
const char *p;
/* Check whether the given locale name is recognized by the system. */
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Win32, setlocale(category, "") looks at the system settings,
+ /* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -33779,7 +38933,7 @@ int main ()
if (setlocale (LC_ALL, "") == NULL) return 1;
#endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -33828,7 +38982,7 @@ _ACEOF
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
mingw*)
- # Test for the hypothetical native Win32 locale name.
+ # Test for the hypothetical native Windows locale name.
if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_zh_CN=Chinese_China.54936
else
@@ -33836,9 +38990,15 @@ _ACEOF
gt_cv_locale_zh_CN=none
fi
;;
+ solaris2.8)
+ # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
+ # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
+ # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
+ gt_cv_locale_zh_CN=none
+ ;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the locale name without encoding suffix.
@@ -33873,30 +39033,16 @@ $as_echo "$gt_cv_locale_zh_CN" >&6; }
if test $ac_cv_func_wctob = no; then
+ HAVE_WCTOB=0
HAVE_DECL_WCTOB=0
-
- :
-
-
-
-
-
-
-
-
-
- M4tests_LIBOBJS="$M4tests_LIBOBJS wctob.$ac_objext"
-
-
- :
-
else
+ HAVE_WCTOB=1
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wctob works" >&5
$as_echo_n "checking whether wctob works... " >&6; }
-if test "${gl_cv_func_wctob_works+set}" = set; then :
+if ${gl_cv_func_wctob_works+:} false; then :
$as_echo_n "(cached) " >&6
else
@@ -33998,24 +39144,7 @@ $as_echo "$gl_cv_func_wctob_works" >&6; }
*yes) ;;
*) REPLACE_WCTOB=1 ;;
esac
- if test $REPLACE_WCTOB = 1; then
-
- :
-
-
-
-
-
-
-
-
-
- M4tests_LIBOBJS="$M4tests_LIBOBJS wctob.$ac_objext"
-
-
- :
-
- else
+ if test $REPLACE_WCTOB = 0; then
ac_fn_c_check_decl "$LINENO" "wctob" "ac_cv_have_decl_wctob" "
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
@@ -34028,7 +39157,7 @@ $as_echo "$gl_cv_func_wctob_works" >&6; }
#include <wchar.h>
"
-if test "x$ac_cv_have_decl_wctob" = x""yes; then :
+if test "x$ac_cv_have_decl_wctob" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
@@ -34040,17 +39169,39 @@ _ACEOF
if test $ac_cv_have_decl_wctob != yes; then
HAVE_DECL_WCTOB=0
-
- :
-
fi
fi
fi
+ if test $HAVE_WCTOB = 0 || test $REPLACE_WCTOB = 1; then
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS wctob.$ac_objext"
+
+
+ :
+
+ fi
+
- GNULIB_WCTOB=$gl_module_indicator_condition
+
+ if test "$GNULIB_WCTOB" != 1; then
+ if test "$GNULIB_WCTOB" = 0; then
+ GNULIB_WCTOB=$gl_module_indicator_condition
+ else
+ GNULIB_WCTOB="($GNULIB_WCTOB || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
@@ -34064,6 +39215,7 @@ $as_echo "#define GNULIB_TEST_WCTOB 1" >>confdefs.h
if false; then
REPLACE_WCTOMB=1
fi
+
if test $REPLACE_WCTOMB = 1; then
@@ -34083,7 +39235,16 @@ $as_echo "#define GNULIB_TEST_WCTOB 1" >>confdefs.h
- GNULIB_WCTOMB=$gl_module_indicator_condition
+
+ if test "$GNULIB_WCTOMB" != 1; then
+ if test "$GNULIB_WCTOMB" = 0; then
+ GNULIB_WCTOMB=$gl_module_indicator_condition
+ else
+ GNULIB_WCTOMB="($GNULIB_WCTOMB || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
@@ -34094,6 +39255,56 @@ $as_echo "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ REPLACE_WRITE=1
+ fi
+
+
+
+
+ if test $gl_cv_header_signal_h_SIGPIPE != yes; then
+ REPLACE_WRITE=1
+ fi
+
+
+
+ if test $REPLACE_WRITE = 1; then
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS write.$ac_objext"
+
+ :
+ fi
+
+
+
+
+
+ if test "$GNULIB_WRITE" != 1; then
+ if test "$GNULIB_WRITE" = 0; then
+ GNULIB_WRITE=$gl_module_indicator_condition
+ else
+ GNULIB_WRITE="($GNULIB_WRITE || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+$as_echo "#define GNULIB_TEST_WRITE 1" >>confdefs.h
+
+
+
+
+
+
@@ -34111,7 +39322,7 @@ $as_echo "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether an open file can be renamed" >&5
$as_echo_n "checking whether an open file can be renamed... " >&6; }
-if test "${M4_cv_func_rename_open_file_works+set}" = set; then :
+if ${M4_cv_func_rename_open_file_works+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
@@ -34190,7 +39401,7 @@ fi
if test "$with_syscmd_shell" = no ; then
with_syscmd_shell=/bin/sh
if test "$cross_compiling" != yes ; then
- if { test -f /bin/sh && $as_test_x /bin/sh; }; then :
+ if as_fn_executable_p /bin/sh; then :
else
if (cmd /c) 2>/dev/null; then with_syscmd_shell=cmd; fi
@@ -34204,7 +39415,7 @@ fi
do
IFS=$M4_save_IFS
test -z "$M4_dir" && continue
- { test -f "$M4_dir/sh" && $as_test_x "$M4_dir/sh"; } \
+ as_fn_executable_p "$M4_dir/sh" \
&& { with_syscmd_shell=$M4_dir/sh; break; }
done
IFS=$M4_save_IFS
@@ -34311,10 +39522,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
:end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
- test "x$cache_file" != "x/dev/null" &&
+ if test "x$cache_file" != "x/dev/null"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
$as_echo "$as_me: updating cache $cache_file" >&6;}
- cat confcache >$cache_file
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
@@ -34345,6 +39567,14 @@ LIBOBJS=$ac_libobjs
LTLIBOBJS=$ac_ltlibobjs
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+$as_echo_n "checking that generated files are newer than configure... " >&6; }
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
+$as_echo "done" >&6; }
if test -n "$EXEEXT"; then
am__EXEEXT_TRUE=
am__EXEEXT_FALSE='#'
@@ -34365,11 +39595,47 @@ if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
+ as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
test "X$DEFS" = X-DHAVE_CONFIG_H && DEFS=
+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_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
+ as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
CONFIG_INCLUDE=lib/config.h
+if test -z "${GL_GENERATE_SCHED_H_TRUE}" && test -z "${GL_GENERATE_SCHED_H_FALSE}"; then
+ as_fn_error $? "conditional \"GL_GENERATE_SCHED_H\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
+ as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
+ as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
+ as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${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
M4_libobjs=
M4_ltlibobjs=
@@ -34420,7 +39686,7 @@ fi
-: ${CONFIG_STATUS=./config.status}
+: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -34521,6 +39787,7 @@ fi
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
case $0 in #((
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -34716,16 +39983,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -34785,28 +40052,16 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -34827,8 +40082,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by GNU M4 $as_me 1.4.16, which was
-generated by GNU Autoconf 2.66. Invocation command line was
+This file was extended by GNU M4 $as_me 1.4.17, which was
+generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -34899,11 +40154,11 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-GNU M4 config.status 1.4.16
-configured by $0, generated by GNU Autoconf 2.66,
+GNU M4 config.status 1.4.17
+configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -34921,11 +40176,16 @@ 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
@@ -34947,6 +40207,7 @@ do
$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;;
@@ -34988,7 +40249,7 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
@@ -35059,9 +40320,10 @@ fi
# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
- tmp=
+ tmp= ac_tmp=
trap 'exit_status=$?
- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
' 0
trap 'as_fn_exit 1' 1 2 13 15
}
@@ -35069,12 +40331,13 @@ $debug ||
{
tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
+ test -d "$tmp"
} ||
{
tmp=./conf$$-$RANDOM
(umask 077 && mkdir "$tmp")
} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
@@ -35096,7 +40359,7 @@ else
ac_cs_awk_cr=$ac_cr
fi
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
_ACEOF
@@ -35124,7 +40387,7 @@ done
rm -f conf$$subs.sh
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
_ACEOF
sed -n '
h
@@ -35172,7 +40435,7 @@ t delim
rm -f conf$$subs.awk
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
for (key in S) S_is_set[key] = 1
FS = ""
@@ -35204,7 +40467,7 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
else
cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
|| as_fn_error $? "could not setup config files machinery" "$LINENO" 5
_ACEOF
@@ -35238,7 +40501,7 @@ fi # test -n "$CONFIG_FILES"
# No need to generate them if there are no CONFIG_HEADERS.
# This happens for instance with `./config.status Makefile'.
if test -n "$CONFIG_HEADERS"; then
-cat >"$tmp/defines.awk" <<\_ACAWK ||
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
BEGIN {
_ACEOF
@@ -35250,8 +40513,8 @@ _ACEOF
# handling of long lines.
ac_delim='%!_!# '
for ac_last_try in false false :; do
- ac_t=`sed -n "/$ac_delim/p" confdefs.h`
- if test -z "$ac_t"; then
+ ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_tt"; then
break
elif $ac_last_try; then
as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
@@ -35371,7 +40634,7 @@ do
for ac_f
do
case $ac_f in
- -) ac_f="$tmp/stdin";;
+ -) ac_f="$ac_tmp/stdin";;
*) # Look for the file first in the build tree, then in the source tree
# (if the path is not absolute). The absolute path cannot be DOS-style,
# because $ac_f cannot contain `:'.
@@ -35406,7 +40669,7 @@ $as_echo "$as_me: creating $ac_file" >&6;}
esac
case $ac_tag in
- *:-:* | *:-) cat >"$tmp/stdin" \
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
esac
;;
@@ -35543,21 +40806,22 @@ s&@INSTALL@&$ac_INSTALL&;t t
s&@MKDIR_P@&$ac_MKDIR_P&;t t
$ac_datarootdir_hack
"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&5
$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&2;}
- rm -f "$tmp/stdin"
+ rm -f "$ac_tmp/stdin"
case $ac_file in
- -) cat "$tmp/out" && rm -f "$tmp/out";;
- *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
esac \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
;;
@@ -35568,20 +40832,20 @@ which seems to be undefined. Please make sure it is defined" >&2;}
if test x"$ac_file" != x-; then
{
$as_echo "/* $configure_input */" \
- && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
- } >"$tmp/config.h" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+ } >"$ac_tmp/config.h" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
- if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+ if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
$as_echo "$as_me: $ac_file is unchanged" >&6;}
else
rm -f "$ac_file"
- mv "$tmp/config.h" "$ac_file" \
+ mv "$ac_tmp/config.h" "$ac_file" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
fi
else
$as_echo "/* $configure_input */" \
- && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
|| as_fn_error $? "could not create -" "$LINENO" 5
fi
# Compute "$ac_file"'s index in $config_headers.
@@ -35659,7 +40923,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
case $ac_file$ac_mode in
"depfiles":C) test x"$AMDEP_TRUE" != x"" || {
- # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # Older Autoconf quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
case $CONFIG_FILES in
@@ -35672,7 +40936,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named `Makefile.in', but
+ # We used to match only the files named 'Makefile.in', but
# some people rename them; so instead we look at the file content.
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
@@ -35706,21 +40970,19 @@ $as_echo X"$mf" |
continue
fi
# Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
+ # from the Makefile without running 'make'.
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
+ test -z "$am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
# simplest approach to changing $(DEPDIR) to its actual value in the
# expansion.
for file in `sed -n "
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`$as_dirname -- "$file" ||
diff --git a/configure.ac b/configure.ac
index 17f23e7..2defd94 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
# Configure template for GNU M4. -*-Autoconf-*-
-# Copyright (C) 1991, 1993-1994, 2004-2011 Free Software Foundation,
+# Copyright (C) 1991, 1993-1994, 2004-2013 Free Software Foundation,
# Inc.
#
# This file is part of GNU M4.
@@ -22,8 +22,8 @@ AC_INIT([GNU M4], m4_esyscmd([build-aux/git-version-gen .tarball-version]),
[bug-m4@gnu.org])
AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE([1.11.1 dist-bzip2 dist-xz color-tests parallel-tests
-silent-rules gnu])
+AM_INIT_AUTOMAKE([1.11.6 dist-bzip2 dist-xz color-tests parallel-tests
+silent-rules subdir-objects gnu])
m4_pattern_forbid([^M4_[A-Z]])
@@ -50,29 +50,65 @@ AC_ARG_ENABLE([gcc-warnings],
*) AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;;
esac
gl_gcc_warnings=$enableval],
- [gl_gcc_warnings=no]
+ [if test -d "$srcdir"/.git; then
+ gl_gcc_warnings=yes
+ else
+ gl_gcc_warnings=no
+ fi]
)
if test "$gl_gcc_warnings" = yes; then
gl_WARN_ADD([-Werror], [WERROR_CFLAGS])
AC_SUBST([WERROR_CFLAGS])
+ # We use '#pragma GCC diagnostic push' to silence some
+ # warnings, but older gcc doesn't support this.
+ AC_CACHE_CHECK([whether pragma GCC diagnostic push works],
+ [M4_cv_gcc_pragma_push_works], [
+ save_CFLAGS=$CFLAGS
+ CFLAGS='-Wunknown-pragmas -Werror'
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic pop
+ ]])],
+ [M4_cv_gcc_pragma_push_works=yes],
+ [M4_cv_gcc_pragma_push_works=no])
+ CFLAGS=$save_CFLAGS])
+
+ # This, $nw, is the list of warnings we disable.
nw=
- nw="$nw -Waggregate-return" # C90 is anachronistic
+ nw="$nw -Waggregate-return" # K&R is anachronistic
+ nw="$nw -Wtraditional-conversion" # K&R is anachronistic
+ nw="$nw -Wundef" # K&R is anachronistic
+ nw="$nw -Wtraditional" # K&R is anachronistic
nw="$nw -Wlong-long" # C90 is anachronistic
- nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
- nw="$nw -Wtraditional" # Warns on #elif which we use often
nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
nw="$nw -Wpadded" # Our structs are not packed
- nw="$nw -Wredundant-decls" # Gnulib has multiple decls
- nw="$nw -Wformat-nonliteral" # Needed in builtin.c
- nw="$nw -Wunreachable-code" # Needed in output.c
nw="$nw -Wconversion" # Too many warnings for now
nw="$nw -Wsign-conversion" # Too many warnings for now
- nw="$nw -Wtraditional-conversion" # Too many warnings for now
nw="$nw -Wcast-qual" # Too many warnings for now
nw="$nw -Wswitch-enum" # Too many warnings for now
- # This, $nw, is the list of warnings we disable.
+ # gcc 4.4.6 complains enum-compare is C++ only; gcc 4.7.0 implies it in -Wall
+ nw="$nw -Wenum-compare"
+
+ # Gnulib uses '#pragma GCC diagnostic push' to silence some
+ # warnings, but older gcc doesn't support this.
+ AC_CACHE_CHECK([whether pragma GCC diagnostic push works],
+ [M4_cv_gcc_pragma_push_works], [
+ save_CFLAGS=$CFLAGS
+ CFLAGS='-Wunknown-pragmas -Werror'
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic pop
+ ]])],
+ [M4_cv_gcc_pragma_push_works=yes],
+ [M4_cv_gcc_pragma_push_works=no])
+ CFLAGS=$save_CFLAGS])
+ if test $M4_cv_gcc_pragma_push_works = no; then
+ nw="$nw -Wmissing-prototypes"
+ nw="$nw -Wmissing-declarations"
+ nw="$nw -Wunreachable-code"
+ fi
gl_MANYWARN_ALL_GCC([ws])
gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw])
@@ -80,13 +116,24 @@ if test "$gl_gcc_warnings" = yes; then
gl_WARN_ADD([$w])
done
+ # Gnulib turns on -Wformat=2, which implies -Wformat-nonliteral, but
+ # we temporarily override it in format.c if possible.
+ if test $M4_cv_gcc_pragma_push_works = no; then
+ gl_WARN_ADD([-Wno-format-nonliteral])
+ fi
+
gl_WARN_ADD([-fdiagnostics-show-option])
gl_WARN_ADD([-funit-at-a-time])
AC_SUBST([WARN_CFLAGS])
- AC_DEFINE([_FORTIFY_SOURCE], [2],
- [enable compile-time and run-time bounds-checking, and some warnings])
+ AH_VERBATIM([FORTIFY_SOURCE],
+ [/* Enable compile-time and run-time bounds-checking, and some warnings,
+ without upsetting newer glibc. */
+ #if defined __OPTIMIZE__ && __OPTIMIZE__
+ # define _FORTIFY_SOURCE 2
+ #endif
+ ])
fi
# Tandem/NSK is broken - it has 'long long int' but not
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 9d3391d..d701edd 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,6 +1,6 @@
## Makefile.am - template for generating Makefile via Automake
##
-## Copyright (C) 2006-2011 Free Software Foundation, Inc.
+## Copyright (C) 2006-2013 Free Software Foundation, Inc.
##
## This file is part of GNU M4.
##
@@ -19,7 +19,7 @@
##
## This file written by Eric Blake <ebb9@byu.net>
-info_TEXINFOS = m4.texinfo
+info_TEXINFOS = m4.texi
m4_TEXINFOS = fdl-1.3.texi gpl-3.0.texi
man_MANS = $(srcdir)/m4.1
EXTRA_DIST = $(man_MANS) gendocs_template
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 25e44aa..47ed88a 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.14 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,6 +14,51 @@
@SET_MAKE@
VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -33,51 +77,58 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = doc
-DIST_COMMON = $(m4_TEXINFOS) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(srcdir)/stamp-vti \
- $(srcdir)/version.texi
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(m4_TEXINFOS) $(top_srcdir)/build-aux/mdate-sh \
+ $(srcdir)/version.texi $(srcdir)/stamp-vti \
+ $(top_srcdir)/build-aux/texinfo.tex
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/ansi-c++.m4 \
- $(top_srcdir)/m4/assert.m4 $(top_srcdir)/m4/autobuild.m4 \
- $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/c-stack.m4 \
- $(top_srcdir)/m4/canonicalize.m4 $(top_srcdir)/m4/cloexec.m4 \
+ $(top_srcdir)/m4/asm-underscore.m4 $(top_srcdir)/m4/assert.m4 \
+ $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \
+ $(top_srcdir)/m4/c-stack.m4 $(top_srcdir)/m4/canonicalize.m4 \
$(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \
- $(top_srcdir)/m4/closein.m4 $(top_srcdir)/m4/closeout.m4 \
- $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/config-h.m4 \
- $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/dirname.m4 \
- $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup2.m4 \
- $(top_srcdir)/m4/eealloc.m4 $(top_srcdir)/m4/environ.m4 \
- $(top_srcdir)/m4/errno_h.m4 $(top_srcdir)/m4/error.m4 \
- $(top_srcdir)/m4/execute.m4 $(top_srcdir)/m4/exponentd.m4 \
- $(top_srcdir)/m4/exponentf.m4 $(top_srcdir)/m4/exponentl.m4 \
- $(top_srcdir)/m4/extensions.m4 \
+ $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/closein.m4 \
+ $(top_srcdir)/m4/closeout.m4 $(top_srcdir)/m4/codeset.m4 \
+ $(top_srcdir)/m4/config-h.m4 $(top_srcdir)/m4/configmake.m4 \
+ $(top_srcdir)/m4/dirent_h.m4 $(top_srcdir)/m4/dirname.m4 \
+ $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \
+ $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
+ $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \
+ $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/execute.m4 \
+ $(top_srcdir)/m4/exponentd.m4 $(top_srcdir)/m4/exponentf.m4 \
+ $(top_srcdir)/m4/exponentl.m4 $(top_srcdir)/m4/extensions.m4 \
+ $(top_srcdir)/m4/extern-inline.m4 \
$(top_srcdir)/m4/fatal-signal.m4 $(top_srcdir)/m4/fclose.m4 \
$(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \
- $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fflush.m4 \
- $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/float_h.m4 \
- $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fpending.m4 \
- $(top_srcdir)/m4/fpieee.m4 $(top_srcdir)/m4/fpurge.m4 \
+ $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopen.m4 \
+ $(top_srcdir)/m4/fflush.m4 $(top_srcdir)/m4/filenamecat.m4 \
+ $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fopen.m4 \
+ $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fpieee.m4 \
+ $(top_srcdir)/m4/fpurge.m4 $(top_srcdir)/m4/freadahead.m4 \
$(top_srcdir)/m4/freading.m4 $(top_srcdir)/m4/frexp.m4 \
- $(top_srcdir)/m4/frexpl.m4 $(top_srcdir)/m4/fseeko.m4 \
+ $(top_srcdir)/m4/frexpl.m4 $(top_srcdir)/m4/fseek.m4 \
+ $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \
$(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \
- $(top_srcdir)/m4/getdtablesize.m4 $(top_srcdir)/m4/getopt.m4 \
- $(top_srcdir)/m4/getpagesize.m4 \
- $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/gl_list.m4 \
- $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \
+ $(top_srcdir)/m4/getcwd.m4 $(top_srcdir)/m4/getdtablesize.m4 \
+ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpagesize.m4 \
+ $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glibc21.m4 \
+ $(top_srcdir)/m4/gnulib-common.m4 \
$(top_srcdir)/m4/gnulib-comp.m4 \
- $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \
+ $(top_srcdir)/m4/include_next.m4 \
$(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \
+ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \
$(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/isnand.m4 \
$(top_srcdir)/m4/isnanf.m4 $(top_srcdir)/m4/isnanl.m4 \
- $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/lcmessage.m4 \
- $(top_srcdir)/m4/ldexp.m4 $(top_srcdir)/m4/ldexpl.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \
- $(top_srcdir)/m4/link.m4 $(top_srcdir)/m4/localcharset.m4 \
- $(top_srcdir)/m4/locale-fr.m4 $(top_srcdir)/m4/locale-ja.m4 \
- $(top_srcdir)/m4/locale-tr.m4 $(top_srcdir)/m4/locale-zh.m4 \
- $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localename.m4 \
+ $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \
+ $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/ldexp.m4 \
+ $(top_srcdir)/m4/ldexpl.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/libsigsegv.m4 $(top_srcdir)/m4/link.m4 \
+ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \
+ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-tr.m4 \
+ $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/locale_h.m4 \
+ $(top_srcdir)/m4/localeconv.m4 $(top_srcdir)/m4/localename.m4 \
$(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \
$(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \
$(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \
@@ -86,40 +137,43 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \
$(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mkdtemp.m4 \
$(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \
- $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/multiarch.m4 \
+ $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \
+ $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \
$(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nocrash.m4 \
- $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/pathmax.m4 \
+ $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/open.m4 \
+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \
$(top_srcdir)/m4/pipe2.m4 $(top_srcdir)/m4/posix_spawn.m4 \
$(top_srcdir)/m4/printf-frexp.m4 \
$(top_srcdir)/m4/printf-frexpl.m4 $(top_srcdir)/m4/printf.m4 \
$(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quotearg.m4 \
- $(top_srcdir)/m4/rawmemchr.m4 $(top_srcdir)/m4/readlink.m4 \
+ $(top_srcdir)/m4/raise.m4 $(top_srcdir)/m4/rawmemchr.m4 \
+ $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readlink.m4 \
$(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/rename.m4 \
$(top_srcdir)/m4/rmdir.m4 $(top_srcdir)/m4/sched_h.m4 \
- $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/setlocale.m4 \
- $(top_srcdir)/m4/sig_atomic_t.m4 $(top_srcdir)/m4/sigaction.m4 \
- $(top_srcdir)/m4/signal_h.m4 \
+ $(top_srcdir)/m4/secure_getenv.m4 $(top_srcdir)/m4/setenv.m4 \
+ $(top_srcdir)/m4/setlocale.m4 $(top_srcdir)/m4/sig_atomic_t.m4 \
+ $(top_srcdir)/m4/sigaction.m4 $(top_srcdir)/m4/signal_h.m4 \
$(top_srcdir)/m4/signalblocking.m4 $(top_srcdir)/m4/signbit.m4 \
- $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/snprintf.m4 \
+ $(top_srcdir)/m4/sigpipe.m4 $(top_srcdir)/m4/size_max.m4 \
+ $(top_srcdir)/m4/sleep.m4 $(top_srcdir)/m4/snprintf.m4 \
$(top_srcdir)/m4/spawn-pipe.m4 $(top_srcdir)/m4/spawn_h.m4 \
$(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat.m4 \
$(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \
$(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \
- $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio-safer.m4 \
- $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib-safer.m4 \
+ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \
$(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strchrnul.m4 \
$(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
$(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strndup.m4 \
$(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strsignal.m4 \
$(top_srcdir)/m4/strstr.m4 $(top_srcdir)/m4/strtod.m4 \
- $(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/symlink.m4 \
+ $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_socket_h.m4 \
$(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \
- $(top_srcdir)/m4/sys_wait_h.m4 $(top_srcdir)/m4/tempname.m4 \
- $(top_srcdir)/m4/threadlib.m4 $(top_srcdir)/m4/time_h.m4 \
- $(top_srcdir)/m4/tls.m4 $(top_srcdir)/m4/tmpdir.m4 \
- $(top_srcdir)/m4/ungetc.m4 $(top_srcdir)/m4/unistd-safer.m4 \
- $(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/unlocked-io.m4 \
- $(top_srcdir)/m4/vasnprintf.m4 \
+ $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/sys_wait_h.m4 \
+ $(top_srcdir)/m4/tempname.m4 $(top_srcdir)/m4/threadlib.m4 \
+ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/tls.m4 \
+ $(top_srcdir)/m4/tmpdir.m4 $(top_srcdir)/m4/ungetc.m4 \
+ $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \
+ $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
$(top_srcdir)/m4/vasprintf-posix.m4 \
$(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/version-etc.m4 \
$(top_srcdir)/m4/wait-process.m4 $(top_srcdir)/m4/waitpid.m4 \
@@ -127,23 +181,58 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \
$(top_srcdir)/m4/wctob.m4 $(top_srcdir)/m4/wctomb.m4 \
$(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wint_t.m4 \
- $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xsize.m4 \
- $(top_srcdir)/m4/xstrndup.m4 $(top_srcdir)/m4/xvasprintf.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/write.m4 $(top_srcdir)/m4/xalloc.m4 \
+ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrndup.m4 \
+ $(top_srcdir)/m4/xvasprintf.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)/lib/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
-am__v_GEN_0 = @echo " GEN " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
+am__v_at_1 =
SOURCES =
DIST_SOURCES =
+AM_V_DVIPS = $(am__v_DVIPS_@AM_V@)
+am__v_DVIPS_ = $(am__v_DVIPS_@AM_DEFAULT_V@)
+am__v_DVIPS_0 = @echo " DVIPS " $@;
+am__v_DVIPS_1 =
+AM_V_MAKEINFO = $(am__v_MAKEINFO_@AM_V@)
+am__v_MAKEINFO_ = $(am__v_MAKEINFO_@AM_DEFAULT_V@)
+am__v_MAKEINFO_0 = @echo " MAKEINFO" $@;
+am__v_MAKEINFO_1 =
+AM_V_INFOHTML = $(am__v_INFOHTML_@AM_V@)
+am__v_INFOHTML_ = $(am__v_INFOHTML_@AM_DEFAULT_V@)
+am__v_INFOHTML_0 = @echo " INFOHTML" $@;
+am__v_INFOHTML_1 =
+AM_V_TEXI2DVI = $(am__v_TEXI2DVI_@AM_V@)
+am__v_TEXI2DVI_ = $(am__v_TEXI2DVI_@AM_DEFAULT_V@)
+am__v_TEXI2DVI_0 = @echo " TEXI2DVI" $@;
+am__v_TEXI2DVI_1 =
+AM_V_TEXI2PDF = $(am__v_TEXI2PDF_@AM_V@)
+am__v_TEXI2PDF_ = $(am__v_TEXI2PDF_@AM_DEFAULT_V@)
+am__v_TEXI2PDF_0 = @echo " TEXI2PDF" $@;
+am__v_TEXI2PDF_1 =
+AM_V_texinfo = $(am__v_texinfo_@AM_V@)
+am__v_texinfo_ = $(am__v_texinfo_@AM_DEFAULT_V@)
+am__v_texinfo_0 = -q
+am__v_texinfo_1 =
+AM_V_texidevnull = $(am__v_texidevnull_@AM_V@)
+am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@)
+am__v_texidevnull_0 = > /dev/null
+am__v_texidevnull_1 =
INFO_DEPS = $(srcdir)/m4.info
TEXINFO_TEX = $(top_srcdir)/build-aux/texinfo.tex
am__TEXINFO_TEX_DIR = $(top_srcdir)/build-aux
@@ -151,12 +240,17 @@ DVIS = m4.dvi
PDFS = m4.pdf
PSS = m4.ps
HTMLS = m4.html
-TEXINFOS = m4.texinfo
+TEXINFOS = m4.texi
TEXI2DVI = texi2dvi
TEXI2PDF = $(TEXI2DVI) --pdf --batch
MAKEINFOHTML = $(MAKEINFO) --html
AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
DVIPS = dvips
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
@@ -179,9 +273,16 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
man1dir = $(mandir)/man1
NROFF = nroff
MANS = $(man_MANS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
pkglibexecdir = @pkglibexecdir@
ACLOCAL = @ACLOCAL@
@@ -190,6 +291,9 @@ ALLOCA_H = @ALLOCA_H@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+AR = @AR@
+ARFLAGS = @ARFLAGS@
+ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -227,47 +331,90 @@ EXEEXT = @EXEEXT@
FLOAT_H = @FLOAT_H@
GETOPT_H = @GETOPT_H@
GLIBC21 = @GLIBC21@
+GNULIB_ACOSF = @GNULIB_ACOSF@
GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
+GNULIB_ASINF = @GNULIB_ASINF@
GNULIB_ASINL = @GNULIB_ASINL@
+GNULIB_ATAN2F = @GNULIB_ATAN2F@
+GNULIB_ATANF = @GNULIB_ATANF@
GNULIB_ATANL = @GNULIB_ATANL@
GNULIB_ATOLL = @GNULIB_ATOLL@
GNULIB_BTOWC = @GNULIB_BTOWC@
GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CBRT = @GNULIB_CBRT@
+GNULIB_CBRTF = @GNULIB_CBRTF@
+GNULIB_CBRTL = @GNULIB_CBRTL@
GNULIB_CEIL = @GNULIB_CEIL@
GNULIB_CEILF = @GNULIB_CEILF@
GNULIB_CEILL = @GNULIB_CEILL@
+GNULIB_CHDIR = @GNULIB_CHDIR@
GNULIB_CHOWN = @GNULIB_CHOWN@
GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@
+GNULIB_COPYSIGN = @GNULIB_COPYSIGN@
+GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@
+GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@
+GNULIB_COSF = @GNULIB_COSF@
+GNULIB_COSHF = @GNULIB_COSHF@
GNULIB_COSL = @GNULIB_COSL@
+GNULIB_DIRFD = @GNULIB_DIRFD@
GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP = @GNULIB_DUP@
GNULIB_DUP2 = @GNULIB_DUP2@
GNULIB_DUP3 = @GNULIB_DUP3@
GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
GNULIB_ENVIRON = @GNULIB_ENVIRON@
GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXP2 = @GNULIB_EXP2@
+GNULIB_EXP2F = @GNULIB_EXP2F@
+GNULIB_EXP2L = @GNULIB_EXP2L@
+GNULIB_EXPF = @GNULIB_EXPF@
GNULIB_EXPL = @GNULIB_EXPL@
+GNULIB_EXPM1 = @GNULIB_EXPM1@
+GNULIB_EXPM1F = @GNULIB_EXPM1F@
+GNULIB_EXPM1L = @GNULIB_EXPM1L@
+GNULIB_FABSF = @GNULIB_FABSF@
+GNULIB_FABSL = @GNULIB_FABSL@
GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
GNULIB_FCHDIR = @GNULIB_FCHDIR@
GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
GNULIB_FCLOSE = @GNULIB_FCLOSE@
GNULIB_FCNTL = @GNULIB_FCNTL@
+GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
+GNULIB_FDOPEN = @GNULIB_FDOPEN@
+GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@
GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FFSL = @GNULIB_FFSL@
+GNULIB_FFSLL = @GNULIB_FFSLL@
+GNULIB_FGETC = @GNULIB_FGETC@
+GNULIB_FGETS = @GNULIB_FGETS@
GNULIB_FLOOR = @GNULIB_FLOOR@
GNULIB_FLOORF = @GNULIB_FLOORF@
GNULIB_FLOORL = @GNULIB_FLOORL@
+GNULIB_FMA = @GNULIB_FMA@
+GNULIB_FMAF = @GNULIB_FMAF@
+GNULIB_FMAL = @GNULIB_FMAL@
+GNULIB_FMOD = @GNULIB_FMOD@
+GNULIB_FMODF = @GNULIB_FMODF@
+GNULIB_FMODL = @GNULIB_FMODL@
GNULIB_FOPEN = @GNULIB_FOPEN@
GNULIB_FPRINTF = @GNULIB_FPRINTF@
GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
GNULIB_FPURGE = @GNULIB_FPURGE@
GNULIB_FPUTC = @GNULIB_FPUTC@
GNULIB_FPUTS = @GNULIB_FPUTS@
+GNULIB_FREAD = @GNULIB_FREAD@
GNULIB_FREOPEN = @GNULIB_FREOPEN@
GNULIB_FREXP = @GNULIB_FREXP@
+GNULIB_FREXPF = @GNULIB_FREXPF@
GNULIB_FREXPL = @GNULIB_FREXPL@
+GNULIB_FSCANF = @GNULIB_FSCANF@
GNULIB_FSEEK = @GNULIB_FSEEK@
GNULIB_FSEEKO = @GNULIB_FSEEKO@
+GNULIB_FSTAT = @GNULIB_FSTAT@
GNULIB_FSTATAT = @GNULIB_FSTATAT@
GNULIB_FSYNC = @GNULIB_FSYNC@
GNULIB_FTELL = @GNULIB_FTELL@
@@ -275,6 +422,8 @@ GNULIB_FTELLO = @GNULIB_FTELLO@
GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
GNULIB_FWRITE = @GNULIB_FWRITE@
+GNULIB_GETC = @GNULIB_GETC@
+GNULIB_GETCHAR = @GNULIB_GETCHAR@
GNULIB_GETCWD = @GNULIB_GETCWD@
GNULIB_GETDELIM = @GNULIB_GETDELIM@
GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
@@ -289,7 +438,18 @@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GL_M4_UNISTD_H_GETOPT = @GNULIB_GL_M4_UNISTD_H_GETOPT@
GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
+GNULIB_HYPOT = @GNULIB_HYPOT@
+GNULIB_HYPOTF = @GNULIB_HYPOTF@
+GNULIB_HYPOTL = @GNULIB_HYPOTL@
+GNULIB_ILOGB = @GNULIB_ILOGB@
+GNULIB_ILOGBF = @GNULIB_ILOGBF@
+GNULIB_ILOGBL = @GNULIB_ILOGBL@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+GNULIB_ISATTY = @GNULIB_ISATTY@
GNULIB_ISFINITE = @GNULIB_ISFINITE@
GNULIB_ISINF = @GNULIB_ISINF@
GNULIB_ISNAN = @GNULIB_ISNAN@
@@ -300,10 +460,25 @@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
GNULIB_LCHMOD = @GNULIB_LCHMOD@
GNULIB_LCHOWN = @GNULIB_LCHOWN@
+GNULIB_LDEXPF = @GNULIB_LDEXPF@
GNULIB_LDEXPL = @GNULIB_LDEXPL@
GNULIB_LINK = @GNULIB_LINK@
GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
+GNULIB_LOG = @GNULIB_LOG@
+GNULIB_LOG10 = @GNULIB_LOG10@
+GNULIB_LOG10F = @GNULIB_LOG10F@
+GNULIB_LOG10L = @GNULIB_LOG10L@
+GNULIB_LOG1P = @GNULIB_LOG1P@
+GNULIB_LOG1PF = @GNULIB_LOG1PF@
+GNULIB_LOG1PL = @GNULIB_LOG1PL@
+GNULIB_LOG2 = @GNULIB_LOG2@
+GNULIB_LOG2F = @GNULIB_LOG2F@
+GNULIB_LOG2L = @GNULIB_LOG2L@
GNULIB_LOGB = @GNULIB_LOGB@
+GNULIB_LOGBF = @GNULIB_LOGBF@
+GNULIB_LOGBL = @GNULIB_LOGBL@
+GNULIB_LOGF = @GNULIB_LOGF@
GNULIB_LOGL = @GNULIB_LOGL@
GNULIB_LSEEK = @GNULIB_LSEEK@
GNULIB_LSTAT = @GNULIB_LSTAT@
@@ -343,16 +518,23 @@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
GNULIB_MKTIME = @GNULIB_MKTIME@
+GNULIB_MODF = @GNULIB_MODF@
+GNULIB_MODFF = @GNULIB_MODFF@
+GNULIB_MODFL = @GNULIB_MODFL@
GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@
GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
GNULIB_OPEN = @GNULIB_OPEN@
GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_OPENDIR = @GNULIB_OPENDIR@
+GNULIB_PCLOSE = @GNULIB_PCLOSE@
GNULIB_PERROR = @GNULIB_PERROR@
GNULIB_PIPE = @GNULIB_PIPE@
GNULIB_PIPE2 = @GNULIB_PIPE2@
GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
GNULIB_POSIX_SPAWN = @GNULIB_POSIX_SPAWN@
GNULIB_POSIX_SPAWNATTR_DESTROY = @GNULIB_POSIX_SPAWNATTR_DESTROY@
GNULIB_POSIX_SPAWNATTR_GETFLAGS = @GNULIB_POSIX_SPAWNATTR_GETFLAGS@
@@ -374,41 +556,63 @@ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDU
GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY@
GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT@
+GNULIB_POWF = @GNULIB_POWF@
GNULIB_PREAD = @GNULIB_PREAD@
GNULIB_PRINTF = @GNULIB_PRINTF@
GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@
GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
GNULIB_PUTC = @GNULIB_PUTC@
GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
GNULIB_PUTENV = @GNULIB_PUTENV@
GNULIB_PUTS = @GNULIB_PUTS@
GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RAISE = @GNULIB_RAISE@
+GNULIB_RANDOM = @GNULIB_RANDOM@
GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READ = @GNULIB_READ@
+GNULIB_READDIR = @GNULIB_READDIR@
GNULIB_READLINK = @GNULIB_READLINK@
GNULIB_READLINKAT = @GNULIB_READLINKAT@
GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMAINDER = @GNULIB_REMAINDER@
+GNULIB_REMAINDERF = @GNULIB_REMAINDERF@
+GNULIB_REMAINDERL = @GNULIB_REMAINDERL@
GNULIB_REMOVE = @GNULIB_REMOVE@
GNULIB_RENAME = @GNULIB_RENAME@
GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+GNULIB_REWINDDIR = @GNULIB_REWINDDIR@
+GNULIB_RINT = @GNULIB_RINT@
+GNULIB_RINTF = @GNULIB_RINTF@
+GNULIB_RINTL = @GNULIB_RINTL@
GNULIB_RMDIR = @GNULIB_RMDIR@
GNULIB_ROUND = @GNULIB_ROUND@
GNULIB_ROUNDF = @GNULIB_ROUNDF@
GNULIB_ROUNDL = @GNULIB_ROUNDL@
GNULIB_RPMATCH = @GNULIB_RPMATCH@
+GNULIB_SCANDIR = @GNULIB_SCANDIR@
+GNULIB_SCANF = @GNULIB_SCANF@
+GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@
GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
GNULIB_SIGACTION = @GNULIB_SIGACTION@
GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
+GNULIB_SINF = @GNULIB_SINF@
+GNULIB_SINHF = @GNULIB_SINHF@
GNULIB_SINL = @GNULIB_SINL@
GNULIB_SLEEP = @GNULIB_SLEEP@
GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_SQRTF = @GNULIB_SQRTF@
GNULIB_SQRTL = @GNULIB_SQRTL@
GNULIB_STAT = @GNULIB_STAT@
+GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@
GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
GNULIB_STPCPY = @GNULIB_STPCPY@
GNULIB_STPNCPY = @GNULIB_STPNCPY@
@@ -426,13 +630,17 @@ GNULIB_STRSEP = @GNULIB_STRSEP@
GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
GNULIB_STRSTR = @GNULIB_STRSTR@
GNULIB_STRTOD = @GNULIB_STRTOD@
+GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@
GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
GNULIB_STRTOLL = @GNULIB_STRTOLL@
GNULIB_STRTOULL = @GNULIB_STRTOULL@
+GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
GNULIB_SYMLINK = @GNULIB_SYMLINK@
GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
+GNULIB_TANF = @GNULIB_TANF@
+GNULIB_TANHF = @GNULIB_TANHF@
GNULIB_TANL = @GNULIB_TANL@
GNULIB_TIMEGM = @GNULIB_TIMEGM@
GNULIB_TIME_R = @GNULIB_TIME_R@
@@ -442,7 +650,7 @@ GNULIB_TRUNC = @GNULIB_TRUNC@
GNULIB_TRUNCF = @GNULIB_TRUNCF@
GNULIB_TRUNCL = @GNULIB_TRUNCL@
GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
-GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
GNULIB_UNLINK = @GNULIB_UNLINK@
GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
@@ -454,8 +662,10 @@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+GNULIB_VFSCANF = @GNULIB_VFSCANF@
GNULIB_VPRINTF = @GNULIB_VPRINTF@
GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+GNULIB_VSCANF = @GNULIB_VSCANF@
GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
GNULIB_WAITPID = @GNULIB_WAITPID@
@@ -498,23 +708,46 @@ GNULIB_WMEMSET = @GNULIB_WMEMSET@
GNULIB_WRITE = @GNULIB_WRITE@
GNULIB__EXIT = @GNULIB__EXIT@
GREP = @GREP@
+HAVE_ACOSF = @HAVE_ACOSF@
HAVE_ACOSL = @HAVE_ACOSL@
+HAVE_ALPHASORT = @HAVE_ALPHASORT@
+HAVE_ASINF = @HAVE_ASINF@
HAVE_ASINL = @HAVE_ASINL@
+HAVE_ATAN2F = @HAVE_ATAN2F@
+HAVE_ATANF = @HAVE_ATANF@
HAVE_ATANL = @HAVE_ATANL@
HAVE_ATOLL = @HAVE_ATOLL@
HAVE_BTOWC = @HAVE_BTOWC@
HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
+HAVE_CBRT = @HAVE_CBRT@
+HAVE_CBRTF = @HAVE_CBRTF@
+HAVE_CBRTL = @HAVE_CBRTL@
HAVE_CHOWN = @HAVE_CHOWN@
+HAVE_CLOSEDIR = @HAVE_CLOSEDIR@
+HAVE_COPYSIGN = @HAVE_COPYSIGN@
+HAVE_COPYSIGNL = @HAVE_COPYSIGNL@
+HAVE_COSF = @HAVE_COSF@
+HAVE_COSHF = @HAVE_COSHF@
HAVE_COSL = @HAVE_COSL@
HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
+HAVE_DECL_CBRTF = @HAVE_DECL_CBRTF@
+HAVE_DECL_CBRTL = @HAVE_DECL_CBRTL@
HAVE_DECL_CEILF = @HAVE_DECL_CEILF@
HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
+HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@
HAVE_DECL_COSL = @HAVE_DECL_COSL@
+HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@
+HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@
+HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@
HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
+HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@
HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
+HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@
HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@
HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@
HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
@@ -528,17 +761,27 @@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
+HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
+HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@
HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
+HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@
+HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@
+HAVE_DECL_LOG2F = @HAVE_DECL_LOG2F@
+HAVE_DECL_LOG2L = @HAVE_DECL_LOG2L@
HAVE_DECL_LOGB = @HAVE_DECL_LOGB@
HAVE_DECL_LOGL = @HAVE_DECL_LOGL@
HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
+HAVE_DECL_REMAINDER = @HAVE_DECL_REMAINDER@
+HAVE_DECL_REMAINDERL = @HAVE_DECL_REMAINDERL@
+HAVE_DECL_RINTF = @HAVE_DECL_RINTF@
HAVE_DECL_ROUND = @HAVE_DECL_ROUND@
HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@
HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@
HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
HAVE_DECL_SINL = @HAVE_DECL_SINL@
HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@
@@ -547,7 +790,9 @@ 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_TANL = @HAVE_DECL_TANL@
HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@
HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@
@@ -557,18 +802,34 @@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+HAVE_DIRENT_H = @HAVE_DIRENT_H@
HAVE_DPRINTF = @HAVE_DPRINTF@
HAVE_DUP2 = @HAVE_DUP2@
HAVE_DUP3 = @HAVE_DUP3@
HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXPF = @HAVE_EXPF@
HAVE_EXPL = @HAVE_EXPL@
+HAVE_EXPM1 = @HAVE_EXPM1@
+HAVE_EXPM1F = @HAVE_EXPM1F@
+HAVE_FABSF = @HAVE_FABSF@
+HAVE_FABSL = @HAVE_FABSL@
HAVE_FACCESSAT = @HAVE_FACCESSAT@
HAVE_FCHDIR = @HAVE_FCHDIR@
HAVE_FCHMODAT = @HAVE_FCHMODAT@
HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FDATASYNC = @HAVE_FDATASYNC@
+HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
HAVE_FEATURES_H = @HAVE_FEATURES_H@
+HAVE_FFSL = @HAVE_FFSL@
+HAVE_FFSLL = @HAVE_FFSLL@
+HAVE_FMA = @HAVE_FMA@
+HAVE_FMAF = @HAVE_FMAF@
+HAVE_FMAL = @HAVE_FMAL@
+HAVE_FMODF = @HAVE_FMODF@
+HAVE_FMODL = @HAVE_FMODL@
+HAVE_FREXPF = @HAVE_FREXPF@
HAVE_FSEEKO = @HAVE_FSEEKO@
HAVE_FSTATAT = @HAVE_FSTATAT@
HAVE_FSYNC = @HAVE_FSYNC@
@@ -584,6 +845,12 @@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
HAVE_GRANTPT = @HAVE_GRANTPT@
+HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
+HAVE_HYPOTF = @HAVE_HYPOTF@
+HAVE_HYPOTL = @HAVE_HYPOTL@
+HAVE_ILOGB = @HAVE_ILOGB@
+HAVE_ILOGBF = @HAVE_ILOGBF@
+HAVE_ILOGBL = @HAVE_ILOGBL@
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
HAVE_ISNAND = @HAVE_ISNAND@
HAVE_ISNANF = @HAVE_ISNANF@
@@ -597,9 +864,18 @@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@
HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@
HAVE_LCHMOD = @HAVE_LCHMOD@
HAVE_LCHOWN = @HAVE_LCHOWN@
+HAVE_LDEXPF = @HAVE_LDEXPF@
HAVE_LIBSIGSEGV = @HAVE_LIBSIGSEGV@
HAVE_LINK = @HAVE_LINK@
HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LOG10F = @HAVE_LOG10F@
+HAVE_LOG10L = @HAVE_LOG10L@
+HAVE_LOG1P = @HAVE_LOG1P@
+HAVE_LOG1PF = @HAVE_LOG1PF@
+HAVE_LOG1PL = @HAVE_LOG1PL@
+HAVE_LOGBF = @HAVE_LOGBF@
+HAVE_LOGBL = @HAVE_LOGBL@
+HAVE_LOGF = @HAVE_LOGF@
HAVE_LOGL = @HAVE_LOGL@
HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
HAVE_LSTAT = @HAVE_LSTAT@
@@ -621,38 +897,64 @@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
HAVE_MKSTEMP = @HAVE_MKSTEMP@
HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
+HAVE_MODFF = @HAVE_MODFF@
+HAVE_MODFL = @HAVE_MODFL@
+HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OPENDIR = @HAVE_OPENDIR@
HAVE_OS_H = @HAVE_OS_H@
+HAVE_PCLOSE = @HAVE_PCLOSE@
HAVE_PIPE = @HAVE_PIPE@
HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_POPEN = @HAVE_POPEN@
+HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
HAVE_POSIX_SPAWN = @HAVE_POSIX_SPAWN@
HAVE_POSIX_SPAWNATTR_T = @HAVE_POSIX_SPAWNATTR_T@
HAVE_POSIX_SPAWN_FILE_ACTIONS_T = @HAVE_POSIX_SPAWN_FILE_ACTIONS_T@
+HAVE_POWF = @HAVE_POWF@
HAVE_PREAD = @HAVE_PREAD@
+HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@
HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RAISE = @HAVE_RAISE@
+HAVE_RANDOM = @HAVE_RANDOM@
HAVE_RANDOM_H = @HAVE_RANDOM_H@
HAVE_RANDOM_R = @HAVE_RANDOM_R@
HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READDIR = @HAVE_READDIR@
HAVE_READLINK = @HAVE_READLINK@
HAVE_READLINKAT = @HAVE_READLINKAT@
HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_REMAINDER = @HAVE_REMAINDER@
+HAVE_REMAINDERF = @HAVE_REMAINDERF@
HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_REWINDDIR = @HAVE_REWINDDIR@
+HAVE_RINT = @HAVE_RINT@
+HAVE_RINTL = @HAVE_RINTL@
HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@
+HAVE_SCANDIR = @HAVE_SCANDIR@
HAVE_SCHED_H = @HAVE_SCHED_H@
+HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
HAVE_SETENV = @HAVE_SETENV@
+HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
HAVE_SIGACTION = @HAVE_SIGACTION@
+HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@
HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
HAVE_SIGSET_T = @HAVE_SIGSET_T@
+HAVE_SINF = @HAVE_SINF@
+HAVE_SINHF = @HAVE_SINHF@
HAVE_SINL = @HAVE_SINL@
HAVE_SLEEP = @HAVE_SLEEP@
HAVE_SPAWN_H = @HAVE_SPAWN_H@
+HAVE_SQRTF = @HAVE_SQRTF@
HAVE_SQRTL = @HAVE_SQRTL@
HAVE_STDINT_H = @HAVE_STDINT_H@
HAVE_STPCPY = @HAVE_STPCPY@
@@ -678,6 +980,8 @@ 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_TANF = @HAVE_TANF@
+HAVE_TANHF = @HAVE_TANHF@
HAVE_TANL = @HAVE_TANL@
HAVE_TIMEGM = @HAVE_TIMEGM@
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
@@ -720,6 +1024,7 @@ HAVE_WCSXFRM = @HAVE_WCSXFRM@
HAVE_WCTRANS_T = @HAVE_WCTRANS_T@
HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
HAVE_WCTYPE_T = @HAVE_WCTYPE_T@
+HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
HAVE_WINT_T = @HAVE_WINT_T@
HAVE_WMEMCHR = @HAVE_WMEMCHR@
HAVE_WMEMCMP = @HAVE_WMEMCMP@
@@ -736,6 +1041,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@
+INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@
LIBCSTACK = @LIBCSTACK@
@@ -771,10 +1078,12 @@ M4tests_LTLIBOBJS = @M4tests_LTLIBOBJS@
M4tests_WITNESS = @M4tests_WITNESS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
+NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@
NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
@@ -789,15 +1098,18 @@ 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_DIRENT_H = @NEXT_DIRENT_H@
NEXT_ERRNO_H = @NEXT_ERRNO_H@
NEXT_FCNTL_H = @NEXT_FCNTL_H@
NEXT_FLOAT_H = @NEXT_FLOAT_H@
NEXT_GETOPT_H = @NEXT_GETOPT_H@
+NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
NEXT_LOCALE_H = @NEXT_LOCALE_H@
NEXT_MATH_H = @NEXT_MATH_H@
@@ -812,6 +1124,7 @@ 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@
@@ -828,33 +1141,53 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
+PRIPTR_PREFIX = @PRIPTR_PREFIX@
+PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
REPLACE_BTOWC = @REPLACE_BTOWC@
REPLACE_CALLOC = @REPLACE_CALLOC@
REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+REPLACE_CBRTF = @REPLACE_CBRTF@
+REPLACE_CBRTL = @REPLACE_CBRTL@
REPLACE_CEIL = @REPLACE_CEIL@
REPLACE_CEILF = @REPLACE_CEILF@
REPLACE_CEILL = @REPLACE_CEILL@
REPLACE_CHOWN = @REPLACE_CHOWN@
REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@
+REPLACE_DIRFD = @REPLACE_DIRFD@
REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUP2 = @REPLACE_DUP2@
REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_EXP2 = @REPLACE_EXP2@
+REPLACE_EXP2L = @REPLACE_EXP2L@
+REPLACE_EXPM1 = @REPLACE_EXPM1@
+REPLACE_EXPM1F = @REPLACE_EXPM1F@
+REPLACE_FABSL = @REPLACE_FABSL@
REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
REPLACE_FCLOSE = @REPLACE_FCLOSE@
REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDOPEN = @REPLACE_FDOPEN@
+REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
REPLACE_FFLUSH = @REPLACE_FFLUSH@
REPLACE_FLOOR = @REPLACE_FLOOR@
REPLACE_FLOORF = @REPLACE_FLOORF@
REPLACE_FLOORL = @REPLACE_FLOORL@
+REPLACE_FMA = @REPLACE_FMA@
+REPLACE_FMAF = @REPLACE_FMAF@
+REPLACE_FMAL = @REPLACE_FMAL@
+REPLACE_FMOD = @REPLACE_FMOD@
+REPLACE_FMODF = @REPLACE_FMODF@
+REPLACE_FMODL = @REPLACE_FMODL@
REPLACE_FOPEN = @REPLACE_FOPEN@
REPLACE_FPRINTF = @REPLACE_FPRINTF@
REPLACE_FPURGE = @REPLACE_FPURGE@
REPLACE_FREOPEN = @REPLACE_FREOPEN@
REPLACE_FREXP = @REPLACE_FREXP@
+REPLACE_FREXPF = @REPLACE_FREXPF@
REPLACE_FREXPL = @REPLACE_FREXPL@
REPLACE_FSEEK = @REPLACE_FSEEK@
REPLACE_FSEEKO = @REPLACE_FSEEKO@
@@ -862,6 +1195,7 @@ REPLACE_FSTAT = @REPLACE_FSTAT@
REPLACE_FSTATAT = @REPLACE_FSTATAT@
REPLACE_FTELL = @REPLACE_FTELL@
REPLACE_FTELLO = @REPLACE_FTELLO@
+REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
REPLACE_FUTIMENS = @REPLACE_FUTIMENS@
REPLACE_GETCWD = @REPLACE_GETCWD@
REPLACE_GETDELIM = @REPLACE_GETDELIM@
@@ -872,16 +1206,39 @@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
+REPLACE_HYPOT = @REPLACE_HYPOT@
+REPLACE_HYPOTF = @REPLACE_HYPOTF@
+REPLACE_HYPOTL = @REPLACE_HYPOTL@
+REPLACE_ILOGB = @REPLACE_ILOGB@
+REPLACE_ILOGBF = @REPLACE_ILOGBF@
+REPLACE_ISATTY = @REPLACE_ISATTY@
REPLACE_ISFINITE = @REPLACE_ISFINITE@
REPLACE_ISINF = @REPLACE_ISINF@
REPLACE_ISNAN = @REPLACE_ISNAN@
REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_ITOLD = @REPLACE_ITOLD@
REPLACE_LCHOWN = @REPLACE_LCHOWN@
REPLACE_LDEXPL = @REPLACE_LDEXPL@
REPLACE_LINK = @REPLACE_LINK@
REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LOG = @REPLACE_LOG@
+REPLACE_LOG10 = @REPLACE_LOG10@
+REPLACE_LOG10F = @REPLACE_LOG10F@
+REPLACE_LOG10L = @REPLACE_LOG10L@
+REPLACE_LOG1P = @REPLACE_LOG1P@
+REPLACE_LOG1PF = @REPLACE_LOG1PF@
+REPLACE_LOG1PL = @REPLACE_LOG1PL@
+REPLACE_LOG2 = @REPLACE_LOG2@
+REPLACE_LOG2F = @REPLACE_LOG2F@
+REPLACE_LOG2L = @REPLACE_LOG2L@
+REPLACE_LOGB = @REPLACE_LOGB@
+REPLACE_LOGBF = @REPLACE_LOGBF@
+REPLACE_LOGBL = @REPLACE_LOGBL@
+REPLACE_LOGF = @REPLACE_LOGF@
+REPLACE_LOGL = @REPLACE_LOGL@
REPLACE_LSEEK = @REPLACE_LSEEK@
REPLACE_LSTAT = @REPLACE_LSTAT@
REPLACE_MALLOC = @REPLACE_MALLOC@
@@ -899,6 +1256,9 @@ REPLACE_MKFIFO = @REPLACE_MKFIFO@
REPLACE_MKNOD = @REPLACE_MKNOD@
REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_MODF = @REPLACE_MODF@
+REPLACE_MODFF = @REPLACE_MODFF@
+REPLACE_MODFL = @REPLACE_MODFL@
REPLACE_NAN = @REPLACE_NAN@
REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
@@ -906,16 +1266,29 @@ REPLACE_NULL = @REPLACE_NULL@
REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
REPLACE_OPEN = @REPLACE_OPEN@
REPLACE_OPENAT = @REPLACE_OPENAT@
+REPLACE_OPENDIR = @REPLACE_OPENDIR@
REPLACE_PERROR = @REPLACE_PERROR@
REPLACE_POPEN = @REPLACE_POPEN@
REPLACE_POSIX_SPAWN = @REPLACE_POSIX_SPAWN@
+REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@
+REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@
+REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
REPLACE_PREAD = @REPLACE_PREAD@
REPLACE_PRINTF = @REPLACE_PRINTF@
+REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@
+REPLACE_PTSNAME = @REPLACE_PTSNAME@
+REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
REPLACE_PUTENV = @REPLACE_PUTENV@
REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_RAISE = @REPLACE_RAISE@
+REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
+REPLACE_READ = @REPLACE_READ@
REPLACE_READLINK = @REPLACE_READLINK@
REPLACE_REALLOC = @REPLACE_REALLOC@
REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMAINDER = @REPLACE_REMAINDER@
+REPLACE_REMAINDERF = @REPLACE_REMAINDERF@
+REPLACE_REMAINDERL = @REPLACE_REMAINDERL@
REPLACE_REMOVE = @REPLACE_REMOVE@
REPLACE_RENAME = @REPLACE_RENAME@
REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
@@ -930,10 +1303,13 @@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
REPLACE_SLEEP = @REPLACE_SLEEP@
REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_SQRTL = @REPLACE_SQRTL@
REPLACE_STAT = @REPLACE_STAT@
+REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
REPLACE_STPNCPY = @REPLACE_STPNCPY@
REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
REPLACE_STRDUP = @REPLACE_STRDUP@
REPLACE_STRERROR = @REPLACE_STRERROR@
REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
@@ -943,10 +1319,14 @@ REPLACE_STRNLEN = @REPLACE_STRNLEN@
REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
REPLACE_STRSTR = @REPLACE_STRSTR@
REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
+REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
REPLACE_SYMLINK = @REPLACE_SYMLINK@
REPLACE_TIMEGM = @REPLACE_TIMEGM@
REPLACE_TMPFILE = @REPLACE_TMPFILE@
+REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
REPLACE_TRUNC = @REPLACE_TRUNC@
REPLACE_TRUNCF = @REPLACE_TRUNCF@
REPLACE_TRUNCL = @REPLACE_TRUNCL@
@@ -982,6 +1362,8 @@ STDINT_H = @STDINT_H@
STRIP = @STRIP@
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
+UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
@@ -989,6 +1371,8 @@ VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
WERROR_CFLAGS = @WERROR_CFLAGS@
+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@
abs_aux_dir = @abs_aux_dir@
abs_builddir = @abs_builddir@
@@ -1043,7 +1427,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-info_TEXINFOS = m4.texinfo
+info_TEXINFOS = m4.texi
m4_TEXINFOS = fdl-1.3.texi gpl-3.0.texi
man_MANS = $(srcdir)/m4.1
EXTRA_DIST = $(man_MANS) gendocs_template
@@ -1053,7 +1437,7 @@ HELP2MAN = $(SHELL) $(top_srcdir)/build-aux/missing --run help2man
all: all-am
.SUFFIXES:
-.SUFFIXES: .1 .dvi .html .info .pdf .ps .texinfo
+.SUFFIXES: .1 .dvi .html .info .pdf .ps .texi
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@@ -1085,8 +1469,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
-.texinfo.info:
- restore=: && backupdir="$(am__leading_dot)am$$$$" && \
+.texi.info:
+ $(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \
am__cwd=`pwd` && $(am__cd) $(srcdir) && \
rm -rf $$backupdir && mkdir $$backupdir && \
if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
@@ -1107,37 +1491,35 @@ $(am__aclocal_m4_deps):
fi; \
rm -rf $$backupdir; exit $$rc
-.texinfo.dvi:
- TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+.texi.dvi:
+ $(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
- $(TEXI2DVI) $<
+ $(TEXI2DVI) $(AM_V_texinfo) --build-dir=$(@:.dvi=.t2d) -o $@ $(AM_V_texidevnull) \
+ $<
-.texinfo.pdf:
- TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+.texi.pdf:
+ $(AM_V_TEXI2PDF)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
- $(TEXI2PDF) $<
+ $(TEXI2PDF) $(AM_V_texinfo) --build-dir=$(@:.pdf=.t2p) -o $@ $(AM_V_texidevnull) \
+ $<
-.texinfo.html:
- rm -rf $(@:.html=.htp)
- if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+.texi.html:
+ $(AM_V_MAKEINFO)rm -rf $(@:.html=.htp)
+ $(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
-o $(@:.html=.htp) $<; \
then \
- rm -rf $@; \
- if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
- mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
+ rm -rf $@ && mv $(@:.html=.htp) $@; \
else \
- if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
- rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
- exit 1; \
+ rm -rf $(@:.html=.htp); exit 1; \
fi
-$(srcdir)/m4.info: m4.texinfo $(srcdir)/version.texi $(m4_TEXINFOS)
-m4.dvi: m4.texinfo $(srcdir)/version.texi $(m4_TEXINFOS)
-m4.pdf: m4.texinfo $(srcdir)/version.texi $(m4_TEXINFOS)
-m4.html: m4.texinfo $(srcdir)/version.texi $(m4_TEXINFOS)
+$(srcdir)/m4.info: m4.texi $(srcdir)/version.texi $(m4_TEXINFOS)
+m4.dvi: m4.texi $(srcdir)/version.texi $(m4_TEXINFOS)
+m4.pdf: m4.texi $(srcdir)/version.texi $(m4_TEXINFOS)
+m4.html: m4.texi $(srcdir)/version.texi $(m4_TEXINFOS)
$(srcdir)/version.texi: $(srcdir)/stamp-vti
-$(srcdir)/stamp-vti: m4.texinfo $(top_srcdir)/configure
- @(dir=.; test -f ./m4.texinfo || dir=$(srcdir); \
- set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/m4.texinfo`; \
+$(srcdir)/stamp-vti: m4.texi $(top_srcdir)/configure
+ @(dir=.; test -f ./m4.texi || dir=$(srcdir); \
+ set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/m4.texi`; \
echo "@set UPDATED $$1 $$2 $$3"; \
echo "@set UPDATED-MONTH $$2 $$3"; \
echo "@set EDITION $(VERSION)"; \
@@ -1154,8 +1536,8 @@ mostlyclean-vti:
maintainer-clean-vti:
-rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
.dvi.ps:
- TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
- $(DVIPS) -o $@ $<
+ $(AM_V_DVIPS)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ $(DVIPS) $(AM_V_texinfo) -o $@ $<
uninstall-dvi-am:
@$(NORMAL_UNINSTALL)
@@ -1177,9 +1559,7 @@ uninstall-html-am:
uninstall-info-am:
@$(PRE_UNINSTALL)
- @if test -d '$(DESTDIR)$(infodir)' && \
- (install-info --version && \
- install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
+ @if test -d '$(DESTDIR)$(infodir)' && $(am__can_run_installinfo); then \
list='$(INFO_DEPS)'; \
for file in $$list; do \
relfile=`echo "$$file" | sed 's|^.*/||'`; \
@@ -1236,8 +1616,7 @@ dist-info: $(INFO_DEPS)
done
mostlyclean-aminfo:
- -rm -rf m4.aux m4.cp m4.cps m4.fn m4.fns m4.ky m4.kys m4.log m4.pg m4.pgs \
- m4.tmp m4.toc m4.tp m4.tps m4.vr m4.vrs
+ -rm -rf m4.t2d m4.t2p
clean-aminfo:
-test -z "m4.dvi m4.pdf m4.ps m4.html" \
@@ -1251,11 +1630,18 @@ maintainer-clean-aminfo:
done
install-man1: $(man_MANS)
@$(NORMAL_INSTALL)
- test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
- @list=''; test -n "$(man1dir)" || exit 0; \
- { for i in $$list; do echo "$$i"; done; \
- l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
- sed -n '/\.1[a-z]*$$/p'; \
+ @list1=''; \
+ list2='$(man_MANS)'; \
+ test -n "$(man1dir)" \
+ && test -n "`echo $$list1$$list2`" \
+ || exit 0; \
+ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
+ { for i in $$list1; do echo "$$i"; done; \
+ if test -n "$$list2"; then \
+ for i in $$list2; do echo "$$i"; done \
+ | sed -n '/\.1[a-z]*$$/p'; \
+ fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
@@ -1284,30 +1670,15 @@ uninstall-man1:
sed -n '/\.1[a-z]*$$/p'; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
- test -z "$$files" || { \
- echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
-tags: TAGS
-TAGS:
+ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
+tags TAGS:
+
+ctags CTAGS:
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
distdir: $(DISTFILES)
- @list='$(MANS)'; if test -n "$$list"; then \
- list=`for p in $$list; do \
- if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
- if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
- if test -n "$$list" && \
- grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
- echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
- grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
- echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
- echo " typically \`make maintainer-clean' will remove them" >&2; \
- exit 1; \
- else :; fi; \
- else :; fi
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -1357,10 +1728,15 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
@@ -1399,8 +1775,11 @@ install-dvi: install-dvi-am
install-dvi-am: $(DVIS)
@$(NORMAL_INSTALL)
- test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)"
@list='$(DVIS)'; test -n "$(dvidir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(dvidir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(dvidir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@@ -1415,18 +1794,22 @@ install-html: install-html-am
install-html-am: $(HTMLS)
@$(NORMAL_INSTALL)
- test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
@list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
$(am__strip_dir) \
- if test -d "$$d$$p"; then \
+ d2=$$d$$p; \
+ if test -d "$$d2"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
$(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
- echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
- $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
+ echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
else \
- list2="$$list2 $$d$$p"; \
+ list2="$$list2 $$d2"; \
fi; \
done; \
test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
@@ -1438,9 +1821,12 @@ install-info: install-info-am
install-info-am: $(INFO_DEPS)
@$(NORMAL_INSTALL)
- test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \
+ fi; \
for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
@@ -1458,8 +1844,7 @@ install-info-am: $(INFO_DEPS)
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
@$(POST_INSTALL)
- @if (install-info --version && \
- install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
+ @if $(am__can_run_installinfo); then \
list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
for file in $$list; do \
relfile=`echo "$$file" | sed 's|^.*/||'`; \
@@ -1473,8 +1858,11 @@ install-pdf: install-pdf-am
install-pdf-am: $(PDFS)
@$(NORMAL_INSTALL)
- test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
@list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pdfdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pdfdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@@ -1486,8 +1874,11 @@ install-ps: install-ps-am
install-ps-am: $(PSS)
@$(NORMAL_INSTALL)
- test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)"
@list='$(PSS)'; test -n "$(psdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(psdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(psdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@@ -1522,19 +1913,19 @@ uninstall-man: uninstall-man1
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-aminfo clean-generic \
- dist-info distclean distclean-generic distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-html install-html-am install-info \
- install-info-am install-man install-man1 install-pdf \
- install-pdf-am install-ps install-ps-am install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-aminfo maintainer-clean-generic \
- maintainer-clean-vti mostlyclean mostlyclean-aminfo \
- mostlyclean-generic mostlyclean-vti pdf pdf-am ps ps-am \
- uninstall uninstall-am uninstall-dvi-am uninstall-html-am \
- uninstall-info-am uninstall-man uninstall-man1 \
- uninstall-pdf-am uninstall-ps-am
+ cscopelist-am ctags-am dist-info distclean distclean-generic \
+ distdir dvi dvi-am html html-am info info-am install \
+ install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-man1 install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-aminfo \
+ maintainer-clean-generic maintainer-clean-vti mostlyclean \
+ mostlyclean-aminfo mostlyclean-generic mostlyclean-vti pdf \
+ pdf-am ps ps-am tags-am uninstall uninstall-am \
+ uninstall-dvi-am uninstall-html-am uninstall-info-am \
+ uninstall-man uninstall-man1 uninstall-pdf-am uninstall-ps-am
# Depend on ../.version for version, m4.c for usage text. Do not depend on
diff --git a/doc/fdl-1.3.texi b/doc/fdl-1.3.texi
index fc19ddd..9c3bbe5 100644
--- a/doc/fdl-1.3.texi
+++ b/doc/fdl-1.3.texi
@@ -97,7 +97,7 @@ format, SGML or XML using a publicly available
DTD, and standard-conforming simple HTML,
PostScript or PDF designed for human modification. Examples
of transparent image formats include PNG, XCF and
-JPG. Opaque formats include proprietary formats that can be
+JPG@. Opaque formats include proprietary formats that can be
read and edited only by proprietary word processors, SGML or
XML for which the DTD and/or processing tools are
not generally available, and the machine-generated HTML,
@@ -481,7 +481,7 @@ license notices just after the title page:
@end smallexample
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
-replace the ``with@dots{}Texts.'' line with this:
+replace the ``with@dots{}Texts.''@: line with this:
@smallexample
@group
@@ -503,4 +503,3 @@ to permit their use in free software.
@c Local Variables:
@c ispell-local-pdict: "ispell-dict"
@c End:
-
diff --git a/doc/gendocs_template b/doc/gendocs_template
index ccce0be..63fbe53 100644
--- a/doc/gendocs_template
+++ b/doc/gendocs_template
@@ -3,12 +3,6 @@
<!--#include virtual="/server/banner.html" -->
<h2>%%TITLE%%</h2>
-<!-- This document is in XML, and xhtml 1.0 -->
-<!-- Please make sure to properly nest your tags -->
-<!-- and ensure that your final document validates -->
-<!-- consistent with W3C xhtml 1.0 and CSS standards -->
-<!-- See validator.w3.org -->
-
<address>Free Software Foundation</address>
<address>last updated %%DATE%%</address>
@@ -51,8 +45,6 @@
(%%ASCII_GZ_SIZE%%K bytes gzipped)</a>.</li>
<li><a href="%%PACKAGE%%.dvi.gz">TeX dvi file
(%%DVI_GZ_SIZE%%K bytes gzipped)</a>.</li>
-<li><a href="%%PACKAGE%%.ps.gz">PostScript file
- (%%PS_GZ_SIZE%%K bytes gzipped)</a>.</li>
<li><a href="%%PACKAGE%%.pdf">PDF file
(%%PDF_SIZE%%K bytes)</a>.</li>
<li><a href="%%PACKAGE%%.texi.tar.gz">Texinfo source
@@ -66,29 +58,28 @@ this helps support FSF activities.</p>
<p>(This page generated by the <a href="%%SCRIPTURL%%">%%SCRIPTNAME%%
script</a>.)</p>
-<!-- If needed, change the copyright block at the bottom. In general, -->
-<!-- all pages on the GNU web server should have the section about -->
-<!-- verbatim copying. Please do NOT remove this without talking -->
-<!-- with the webmasters first. -->
-<!-- Please make sure the copyright date is consistent with the document -->
-<!-- and that it is like this "2001, 2002" not this "2001-2002." -->
+<!-- If needed, change the copyright block at the bottom. In general,
+ all pages on the GNU web server should have the section about
+ verbatim copying. Please do NOT remove this without talking
+ with the webmasters first.
+ Please make sure the copyright date is consistent with the document
+ and that it is like this: "2001, 2002", not this: "2001-2002". -->
</div><!-- for id="content", starts in the include above -->
<!--#include virtual="/server/footer.html" -->
<div id="footer">
-<p>
-Please send FSF &amp; GNU inquiries to
+<p>Please send general FSF &amp; GNU inquiries to
<a href="mailto:gnu@gnu.org">&lt;gnu@gnu.org&gt;</a>.
There are also <a href="/contact/">other ways to contact</a>
the FSF.<br />
Please send broken links and other corrections or suggestions to
-<a href="mailto:%%EMAIL%%">&lt;%%EMAIL%%&gt;</a>.
-</p>
+<a href="mailto:%%EMAIL%%">&lt;%%EMAIL%%&gt;</a>.</p>
-<p>Copyright &copy; 2010 Free Software Foundation, Inc.</p>
+<p>Copyright &copy; 2013 Free Software Foundation, Inc.</p>
-<p>Verbatim copying and distribution of this entire article is
-permitted in any medium, provided this notice is preserved.</p>
+<p>Verbatim copying and distribution of this entire article are
+permitted worldwide, without royalty, in any medium, provided this
+notice, and the copyright notice, are preserved.</p>
</div>
</div>
diff --git a/doc/gpl-3.0.texi b/doc/gpl-3.0.texi
index 97a17e1..0e2e212 100644
--- a/doc/gpl-3.0.texi
+++ b/doc/gpl-3.0.texi
@@ -623,12 +623,12 @@ later version.
@item Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+APPLICABLE LAW@. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
-PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
+A PARTICULAR PURPOSE@. THE ENTIRE RISK AS TO THE QUALITY AND
+PERFORMANCE OF THE PROGRAM IS WITH YOU@. SHOULD THE PROGRAM PROVE
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
CORRECTION.
@@ -680,7 +680,7 @@ your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE@. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
diff --git a/doc/m4.1 b/doc/m4.1
index 63fbd8e..51233f0 100644
--- a/doc/m4.1
+++ b/doc/m4.1
@@ -1,5 +1,5 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.2.
-.TH M4 "1" "March 2011" "GNU M4 1.4.16" "User Commands"
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
+.TH M4 "1" "September 2013" "GNU M4 1.4.17" "User Commands"
.SH NAME
m4 \- macro processor
.SH SYNOPSIS
@@ -132,7 +132,7 @@ GNU M4 home page: <http://www.gnu.org/software/m4/>
.br
General help using GNU software: <http://www.gnu.org/gethelp/>
.SH COPYRIGHT
-Copyright \(co 2011 Free Software Foundation, Inc.
+Copyright \(co 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
.br
This is free software: you are free to change and redistribute it.
diff --git a/doc/m4.info b/doc/m4.info
index 8c81aa7..a75386b 100644
--- a/doc/m4.info
+++ b/doc/m4.info
@@ -1,9 +1,9 @@
-This is m4.info, produced by makeinfo version 4.13 from m4.texinfo.
+This is m4.info, produced by makeinfo version 5.1 from m4.texi.
-This manual (28 February 2011) is for GNU M4 (version 1.4.16), a
+This manual (22 September 2013) is for GNU M4 (version 1.4.17), a
package containing an implementation of the m4 macro language.
- Copyright (C) 1989-1994, 2004-2011 Free Software Foundation, Inc.
+ Copyright (C) 1989-1994, 2004-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
@@ -11,7 +11,6 @@ package containing an implementation of the m4 macro language.
Foundation; with no Invariant Sections, no Front-Cover Texts, and
no Back-Cover Texts. A copy of the license is included in the
section entitled "GNU Free Documentation License."
-
INFO-DIR-SECTION Text creation and manipulation
START-INFO-DIR-ENTRY
* M4: (m4). A powerful macro processor.
@@ -19,116 +18,116 @@ END-INFO-DIR-ENTRY

Indirect:
-m4.info-1: 817
-m4.info-2: 300465
+m4.info-1: 813
+m4.info-2: 301580

Tag Table:
(Indirect)
-Node: Top817
-Node: Preliminaries9625
-Node: Intro10311
-Node: History11943
-Node: Bugs14789
-Node: Manual16040
-Node: Invoking m419438
-Node: Operation modes21584
-Node: Preprocessor features24556
-Node: Limits control27653
-Node: Frozen state31555
-Node: Debugging options32354
-Node: Command line files34338
-Node: Syntax35911
-Node: Names37030
-Node: Quoted strings37492
-Node: Comments38141
-Node: Other tokens39018
-Node: Input processing39596
-Ref: Input processing-Footnote-147517
-Node: Macros47712
-Node: Invocation48206
-Node: Inhibiting Invocation49007
-Node: Macro Arguments53138
-Node: Quoting Arguments56200
-Node: Macro expansion58323
-Node: Definitions59024
-Node: Define59809
-Node: Arguments62247
-Node: Pseudo Arguments65919
-Node: Undefine69461
-Node: Defn70591
-Node: Pushdef75041
-Node: Indir77667
-Node: Builtin79795
-Node: Conditionals82021
-Node: Ifdef82963
-Node: Ifelse83826
-Node: Shift87144
-Node: Forloop97693
-Node: Foreach100329
-Node: Stacks105817
-Node: Composition108856
-Node: Debugging114796
-Node: Dumpdef115381
-Node: Trace116791
-Node: Debug Levels120364
-Node: Debug Output125068
-Node: Input Control126352
-Node: Dnl126889
-Node: Changequote128790
-Node: Changecom134887
-Node: Changeword138583
-Node: M4wrap144024
-Node: File Inclusion148020
-Node: Include148337
-Node: Search Path151048
-Node: Diversions151965
-Node: Divert153648
-Node: Undivert156174
-Node: Divnum159497
-Node: Cleardivert159961
-Node: Text handling161166
-Node: Len161889
-Node: Index macro162274
-Node: Regexp163147
-Node: Substr165686
-Node: Translit166737
-Node: Patsubst169459
-Node: Format173985
-Node: Arithmetic177178
-Node: Incr177627
-Node: Eval178402
-Node: Shell commands186365
-Node: Platform macros187287
-Node: Syscmd189402
-Node: Esyscmd191682
-Node: Sysval193191
-Node: Mkstemp194873
-Node: Miscellaneous198828
-Node: Errprint199261
-Node: Location200480
-Node: M4exit203254
-Node: Frozen files205341
-Node: Using frozen files206122
-Node: Frozen file format209386
-Node: Compatibility212450
-Node: Extensions213516
-Node: Incompatibilities217383
-Node: Other Incompatibilities226309
-Node: Answers228955
-Node: Improved exch229737
-Node: Improved forloop230275
-Node: Improved foreach235607
-Node: Improved copy248624
-Node: Improved m4wrap252578
-Node: Improved cleardivert255002
-Node: Improved capitalize255983
-Node: Improved fatal_error260846
-Node: Copying This Package261907
-Node: GNU General Public License262386
-Node: Copying This Manual299945
-Node: GNU Free Documentation License300465
-Node: Indices325596
-Node: Macro index325876
-Node: Concept index332113
+Node: Top813
+Node: Preliminaries9617
+Node: Intro10303
+Node: History11934
+Node: Bugs16028
+Node: Manual17279
+Node: Invoking m420671
+Node: Operation modes22815
+Node: Preprocessor features25782
+Node: Limits control28878
+Node: Frozen state32775
+Node: Debugging options33574
+Node: Command line files35554
+Node: Syntax37127
+Node: Names38246
+Node: Quoted strings38708
+Node: Comments39357
+Node: Other tokens40234
+Node: Input processing40812
+Ref: Input processing-Footnote-148738
+Node: Macros48933
+Node: Invocation49427
+Node: Inhibiting Invocation50228
+Node: Macro Arguments54364
+Node: Quoting Arguments57423
+Node: Macro expansion59546
+Node: Definitions60247
+Node: Define61032
+Node: Arguments63468
+Node: Pseudo Arguments67138
+Node: Undefine70680
+Node: Defn71810
+Node: Pushdef76254
+Node: Indir78879
+Node: Builtin81002
+Node: Conditionals83219
+Node: Ifdef84161
+Node: Ifelse85022
+Node: Shift88335
+Node: Forloop98803
+Node: Foreach101440
+Node: Stacks106928
+Node: Composition109968
+Node: Debugging115907
+Node: Dumpdef116492
+Node: Trace117845
+Node: Debug Levels121402
+Node: Debug Output126093
+Node: Input Control127372
+Node: Dnl127909
+Node: Changequote129808
+Node: Changecom135890
+Node: Changeword139568
+Node: M4wrap145009
+Node: File Inclusion149005
+Node: Include149322
+Node: Search Path152030
+Node: Diversions152947
+Node: Divert154630
+Node: Undivert157155
+Node: Divnum160477
+Node: Cleardivert160941
+Node: Text handling162145
+Node: Len162868
+Node: Index macro163253
+Node: Regexp164125
+Node: Substr166656
+Node: Translit167700
+Node: Patsubst170420
+Node: Format174943
+Node: Arithmetic178134
+Node: Incr178583
+Node: Eval179356
+Node: Shell commands187288
+Node: Platform macros188210
+Node: Syscmd190325
+Node: Esyscmd192605
+Node: Sysval194114
+Node: Mkstemp195796
+Node: Miscellaneous199746
+Node: Errprint200179
+Node: Location201396
+Node: M4exit204167
+Node: Frozen files206252
+Node: Using frozen files207034
+Node: Frozen file format210299
+Node: Compatibility213365
+Node: Extensions214430
+Node: Incompatibilities218297
+Node: Other Incompatibilities227211
+Node: Answers229857
+Node: Improved exch230639
+Node: Improved forloop231177
+Node: Improved foreach236507
+Node: Improved copy249467
+Node: Improved m4wrap253421
+Node: Improved cleardivert255845
+Node: Improved capitalize256826
+Node: Improved fatal_error261686
+Node: Copying This Package262746
+Node: GNU General Public License263225
+Node: Copying This Manual301580
+Node: GNU Free Documentation License302100
+Node: Indices327210
+Node: Macro index327490
+Node: Concept index333873

End Tag Table
diff --git a/doc/m4.info-1 b/doc/m4.info-1
index e1a6138..db2ee65 100644
--- a/doc/m4.info-1
+++ b/doc/m4.info-1
@@ -1,9 +1,9 @@
-This is m4.info, produced by makeinfo version 4.13 from m4.texinfo.
+This is m4.info, produced by makeinfo version 5.1 from m4.texi.
-This manual (28 February 2011) is for GNU M4 (version 1.4.16), a
+This manual (22 September 2013) is for GNU M4 (version 1.4.17), a
package containing an implementation of the m4 macro language.
- Copyright (C) 1989-1994, 2004-2011 Free Software Foundation, Inc.
+ Copyright (C) 1989-1994, 2004-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
@@ -11,7 +11,6 @@ package containing an implementation of the m4 macro language.
Foundation; with no Invariant Sections, no Front-Cover Texts, and
no Back-Cover Texts. A copy of the license is included in the
section entitled "GNU Free Documentation License."
-
INFO-DIR-SECTION Text creation and manipulation
START-INFO-DIR-ENTRY
* M4: (m4). A powerful macro processor.
@@ -23,10 +22,10 @@ File: m4.info, Node: Top, Next: Preliminaries, Up: (dir)
GNU M4
******
-This manual (28 February 2011) is for GNU M4 (version 1.4.16), a
+This manual (22 September 2013) is for GNU M4 (version 1.4.17), a
package containing an implementation of the m4 macro language.
- Copyright (C) 1989-1994, 2004-2011 Free Software Foundation, Inc.
+ Copyright (C) 1989-1994, 2004-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
@@ -35,35 +34,35 @@ package containing an implementation of the m4 macro language.
no Back-Cover Texts. A copy of the license is included in the
section entitled "GNU Free Documentation License."
- GNU `m4' is an implementation of the traditional UNIX macro
+ GNU 'm4' is an implementation of the traditional UNIX macro
processor. It is mostly SVR4 compatible, although it has some
extensions (for example, handling more than 9 positional parameters to
-macros). `m4' also has builtin functions for including files, running
-shell commands, doing arithmetic, etc. Autoconf needs GNU `m4' for
-generating `configure' scripts, but not for running them.
+macros). 'm4' also has builtin functions for including files, running
+shell commands, doing arithmetic, etc. Autoconf needs GNU 'm4' for
+generating 'configure' scripts, but not for running them.
- GNU `m4' was originally written by Rene' Seindal, with subsequent
+ GNU 'm4' was originally written by Rene' Seindal, with subsequent
changes by Franc,ois Pinard and other volunteers on the Internet. All
-names and email addresses can be found in the files `m4-1.4.16/AUTHORS'
-and `m4-1.4.16/THANKS' from the GNU M4 distribution.
+names and email addresses can be found in the files 'm4-1.4.17/AUTHORS'
+and 'm4-1.4.17/THANKS' from the GNU M4 distribution.
- This is release 1.4.16. It is now considered stable: future
-releases in the 1.4.x series are only meant to fix bugs, increase speed,
-or improve documentation. However...
+ This is release 1.4.17. It is now considered stable: future releases
+in the 1.4.x series are only meant to fix bugs, increase speed, or
+improve documentation. However...
- An experimental feature, which would improve `m4' usefulness, allows
-for changing the syntax for what is a "word" in `m4'. You should use:
+ An experimental feature, which would improve 'm4' usefulness, allows
+for changing the syntax for what is a "word" in 'm4'. You should use:
./configure --enable-changeword
- if you want this feature compiled in. The current implementation
-slows down `m4' considerably and is hardly acceptable. In the future,
-`m4' 2.0 will come with a different set of new features that provide
-similar capabilities, but without the inefficiencies, so changeword
-will go away and _you should not count on it_.
+if you want this feature compiled in. The current implementation slows
+down 'm4' considerably and is hardly acceptable. In the future, 'm4'
+2.0 will come with a different set of new features that provide similar
+capabilities, but without the inefficiencies, so changeword will go away
+and _you should not count on it_.
* Menu:
* Preliminaries:: Introduction and preliminaries
-* Invoking m4:: Invoking `m4'
+* Invoking m4:: Invoking 'm4'
* Syntax:: Lexical and syntactic conventions
* Macros:: How to invoke macros
@@ -82,23 +81,23 @@ will go away and _you should not count on it_.
* Miscellaneous:: Miscellaneous builtin macros
* Frozen files:: Fast loading of frozen state
-* Compatibility:: Compatibility with other versions of `m4'
+* Compatibility:: Compatibility with other versions of 'm4'
* Answers:: Correct version of some examples
* Copying This Package:: How to make copies of the overall M4 package
* Copying This Manual:: How to make copies of this manual
* Indices:: Indices of concepts and macros
- --- The Detailed Node Listing ---
+ -- The Detailed Node Listing --
Introduction and preliminaries
-* Intro:: Introduction to `m4'
+* Intro:: Introduction to 'm4'
* History:: Historical references
* Bugs:: Problems and bugs
* Manual:: Using this manual
-Invoking `m4'
+Invoking 'm4'
* Operation modes:: Command line options for operation modes
* Preprocessor features:: Command line options for preprocessor features
@@ -110,10 +109,10 @@ Invoking `m4'
Lexical and syntactic conventions
* Names:: Macro names
-* Quoted strings:: Quoting input to `m4'
-* Comments:: Comments in `m4' input
+* Quoted strings:: Quoting input to 'm4'
+* Comments:: Comments in 'm4' input
* Other tokens:: Other kinds of input tokens
-* Input processing:: How `m4' copies input to output
+* Input processing:: How 'm4' copies input to output
How to invoke macros
@@ -139,7 +138,7 @@ Conditionals, loops, and recursion
* Ifdef:: Testing if a macro is defined
* Ifelse:: If-else construct, or multibranch
-* Shift:: Recursion in `m4'
+* Shift:: Recursion in 'm4'
* Forloop:: Iteration by counting
* Foreach:: Iteration by list contents
* Stacks:: Working with definition stacks
@@ -199,14 +198,14 @@ Miscellaneous builtin macros
* Errprint:: Printing error messages
* Location:: Printing current location
-* M4exit:: Exiting from `m4'
+* M4exit:: Exiting from 'm4'
Fast loading of frozen state
* Using frozen files:: Using frozen files
* Frozen file format:: Frozen file format
-Compatibility with other versions of `m4'
+Compatibility with other versions of 'm4'
* Extensions:: Extensions in GNU M4
* Incompatibilities:: Facilities in System V m4 not in GNU M4
@@ -214,14 +213,14 @@ Compatibility with other versions of `m4'
Correct version of some examples
-* Improved exch:: Solution for `exch'
-* Improved forloop:: Solution for `forloop'
-* Improved foreach:: Solution for `foreach'
-* Improved copy:: Solution for `copy'
-* Improved m4wrap:: Solution for `m4wrap'
-* Improved cleardivert:: Solution for `cleardivert'
-* Improved capitalize:: Solution for `capitalize'
-* Improved fatal_error:: Solution for `fatal_error'
+* Improved exch:: Solution for 'exch'
+* Improved forloop:: Solution for 'forloop'
+* Improved foreach:: Solution for 'foreach'
+* Improved copy:: Solution for 'copy'
+* Improved m4wrap:: Solution for 'm4wrap'
+* Improved cleardivert:: Solution for 'cleardivert'
+* Improved capitalize:: Solution for 'capitalize'
+* Improved fatal_error:: Solution for 'fatal_error'
How to make copies of the overall M4 package
@@ -233,26 +232,27 @@ How to make copies of this manual
Indices of concepts and macros
-* Macro index:: Index for all `m4' macros
+* Macro index:: Index for all 'm4' macros
* Concept index:: Index for many concepts
+

File: m4.info, Node: Preliminaries, Next: Invoking m4, Prev: Top, Up: Top
1 Introduction and preliminaries
********************************
-This first chapter explains what GNU `m4' is, where `m4' comes from,
-how to read and use this documentation, how to call the `m4' program,
-and how to report bugs about it. It concludes by giving tips for
-reading the remainder of the manual.
+This first chapter explains what GNU 'm4' is, where 'm4' comes from, how
+to read and use this documentation, how to call the 'm4' program, and
+how to report bugs about it. It concludes by giving tips for reading
+the remainder of the manual.
- The following chapters then detail all the features of the `m4'
+ The following chapters then detail all the features of the 'm4'
language.
* Menu:
-* Intro:: Introduction to `m4'
+* Intro:: Introduction to 'm4'
* History:: Historical references
* Bugs:: Problems and bugs
* Manual:: Using this manual
@@ -260,34 +260,33 @@ language.

File: m4.info, Node: Intro, Next: History, Up: Preliminaries
-1.1 Introduction to `m4'
+1.1 Introduction to 'm4'
========================
-`m4' is a macro processor, in the sense that it copies its input to the
+'m4' is a macro processor, in the sense that it copies its input to the
output, expanding macros as it goes. Macros are either builtin or
user-defined, and can take any number of arguments. Besides just doing
-macro expansion, `m4' has builtin functions for including named files,
+macro expansion, 'm4' has builtin functions for including named files,
running shell commands, doing integer arithmetic, manipulating text in
-various ways, performing recursion, etc.... `m4' can be used either as
-a front-end to a compiler, or as a macro processor in its own right.
+various ways, performing recursion, etc.... 'm4' can be used either as a
+front-end to a compiler, or as a macro processor in its own right.
- The `m4' macro processor is widely available on all UNIXes, and has
-been standardized by POSIX. Usually, only a small percentage of users
+ The 'm4' macro processor is widely available on all UNIXes, and has
+been standardized by POSIX. Usually, only a small percentage of users
are aware of its existence. However, those who find it often become
committed users. The popularity of GNU Autoconf, which requires GNU
-`m4' for _generating_ `configure' scripts, is an incentive for many to
-install it, while these people will not themselves program in `m4'.
-GNU `m4' is mostly compatible with the System V, Release 3 version,
-except for some minor differences. *Note Compatibility::, for more
-details.
+'m4' for _generating_ 'configure' scripts, is an incentive for many to
+install it, while these people will not themselves program in 'm4'. GNU
+'m4' is mostly compatible with the System V, Release 4 version, except
+for some minor differences. *Note Compatibility::, for more details.
- Some people find `m4' to be fairly addictive. They first use `m4'
+ Some people find 'm4' to be fairly addictive. They first use 'm4'
for simple problems, then take bigger and bigger challenges, learning
-how to write complex sets of `m4' macros along the way. Once really
-addicted, users pursue writing of sophisticated `m4' applications even
-to solve simple problems, devoting more time debugging their `m4'
-scripts than doing real work. Beware that `m4' may be dangerous for
-the health of compulsive programmers.
+how to write complex sets of 'm4' macros along the way. Once really
+addicted, users pursue writing of sophisticated 'm4' applications even
+to solve simple problems, devoting more time debugging their 'm4'
+scripts than doing real work. Beware that 'm4' may be dangerous for the
+health of compulsive programmers.

File: m4.info, Node: History, Next: Bugs, Prev: Intro, Up: Preliminaries
@@ -295,59 +294,81 @@ File: m4.info, Node: History, Next: Bugs, Prev: Intro, Up: Preliminaries
1.2 Historical references
=========================
-`GPM' was an important ancestor of `m4'. See C. Strachey: "A General
-Purpose Macro generator", Computer Journal 8,3 (1965), pp. 225 ff.
-`GPM' is also succinctly described into David Gries classic "Compiler
-Construction for Digital Computers".
-
- The classic B. Kernighan and P.J. Plauger: "Software Tools",
-Addison-Wesley, Inc. (1976) describes and implements a Unix
-macro-processor language, which inspired Dennis Ritchie to write `m3',
-a macro processor for the AP-3 minicomputer.
+Macro languages were invented early in the history of computing. In the
+1950s Alan Perlis suggested that the macro language be independent of
+the language being processed. Techniques such as conditional and
+recursive macros, and using macros to define other macros, were
+described by Doug McIlroy of Bell Labs in "Macro Instruction Extensions
+of Compiler Languages", _Communications of the ACM_ 3, 4 (1960), 214-20,
+<http://dx.doi.org/10.1145/367177.367223>.
+
+ An important precursor of 'm4' was GPM; see C. Strachey, "A general
+purpose macrogenerator", _Computer Journal_ 8, 3 (1965), 225-41,
+<http://dx.doi.org/10.1093/comjnl/8.3.225>. GPM is also succinctly
+described in David Gries's book _Compiler Construction for Digital
+Computers_, Wiley (1971). Strachey was a brilliant programmer: GPM fit
+into 250 machine instructions!
+
+ Inspired by GPM while visiting Strachey's Lab in 1968, McIlroy wrote
+a model preprocessor in that fit into a page of Snobol 3 code, and
+McIlroy and Robert Morris developed a series of further models at Bell
+Labs. Andrew D. Hall followed up with M6, a general purpose macro
+processor used to port the Fortran source code of the Altran computer
+algebra system; see Hall's "The M6 Macro Processor", Computing Science
+Technical Report #2, Bell Labs (1972),
+<http://cm.bell-labs.com/cm/cs/cstr/2.pdf>. M6's source code consisted
+of about 600 Fortran statements. Its name was the first of the 'm4'
+line.
+
+ The Brian Kernighan and P.J. Plauger book _Software Tools_,
+Addison-Wesley (1976), describes and implements a Unix macro-processor
+language, which inspired Dennis Ritchie to write 'm3', a macro processor
+for the AP-3 minicomputer.
Kernighan and Ritchie then joined forces to develop the original
-`m4', as described in "The M4 Macro Processor", Bell Laboratories
-(1977). It had only 21 builtin macros.
+'m4', described in "The M4 Macro Processor", Bell Laboratories (1977),
+<http://wolfram.schneider.org/bsd/7thEdManVol2/m4/m4.pdf>. It had only
+21 builtin macros.
- While `GPM' was more _pure_, `m4' is meant to deal with the true
+ While 'GPM' was more _pure_, 'm4' is meant to deal with the true
intricacies of real life: macros can be recognized without being
pre-announced, skipping whitespace or end-of-lines is easier, more
constructs are builtin instead of derived, etc.
- Originally, the Kernighan and Plauger macro-processor, and then
-`m3', formed the engine for the Rational FORTRAN preprocessor, that is,
-the `Ratfor' equivalent of `cpp'. Later, `m4' was used as a front-end
-for `Ratfor', `C' and `Cobol'.
+ Originally, the Kernighan and Plauger macro-processor, and then 'm3',
+formed the engine for the Rational FORTRAN preprocessor, that is, the
+'Ratfor' equivalent of 'cpp'. Later, 'm4' was used as a front-end for
+'Ratfor', 'C' and 'Cobol'.
- Rene' Seindal released his implementation of `m4', GNU `m4', in
-1990, with the aim of removing the artificial limitations in many of
-the traditional `m4' implementations, such as maximum line length,
-macro size, or number of macros.
+ Rene' Seindal released his implementation of 'm4', GNU 'm4', in 1990,
+with the aim of removing the artificial limitations in many of the
+traditional 'm4' implementations, such as maximum line length, macro
+size, or number of macros.
The late Professor A. Dain Samples described and implemented a
-further evolution in the form of `M5': "User's Guide to the M5 Macro
+further evolution in the form of 'M5': "User's Guide to the M5 Macro
Language: 2nd edition", Electronic Announcement on comp.compilers
newsgroup (1992).
- Franc,ois Pinard took over maintenance of GNU `m4' in 1992, until
-1994 when he released GNU `m4' 1.4, which was the stable release for 10
+ Franc,ois Pinard took over maintenance of GNU 'm4' in 1992, until
+1994 when he released GNU 'm4' 1.4, which was the stable release for 10
years. It was at this time that GNU Autoconf decided to require GNU
-`m4' as its underlying engine, since all other implementations of `m4'
+'m4' as its underlying engine, since all other implementations of 'm4'
had too many limitations.
More recently, in 2004, Paul Eggert released 1.4.1 and 1.4.2 which
addressed some long standing bugs in the venerable 1.4 release. Then in
-2005, Gary V. Vaughan collected together the many patches to GNU `m4'
-1.4 that were floating around the net and released 1.4.3 and 1.4.4.
-And in 2006, Eric Blake joined the team and prepared patches for the
-release of 1.4.5, 1.4.6, 1.4.7, and 1.4.8. More bug fixes were
-incorporated in 2007, with releases 1.4.9 and 1.4.10. Eric continued
-with some portability fixes for 1.4.11 and 1.4.12 in 2008, 1.4.13 in
-2009, 1.4.14 and 1.4.15 in 2010, and 1.4.16 in 2011.
-
- Meanwhile, development has continued on new features for `m4', such
+2005, Gary V. Vaughan collected together the many patches to GNU 'm4'
+1.4 that were floating around the net and released 1.4.3 and 1.4.4. And
+in 2006, Eric Blake joined the team and prepared patches for the release
+of 1.4.5, 1.4.6, 1.4.7, and 1.4.8. More bug fixes were incorporated in
+2007, with releases 1.4.9 and 1.4.10. Eric continued with some
+portability fixes for 1.4.11 and 1.4.12 in 2008, 1.4.13 in 2009, 1.4.14
+and 1.4.15 in 2010, and 1.4.16 in 2011.
+
+ Meanwhile, development has continued on new features for 'm4', such
as dynamic module loading and additional builtins. When complete, GNU
-`m4' 2.0 will start a new series of releases.
+'m4' 2.0 will start a new series of releases.

File: m4.info, Node: Bugs, Next: Manual, Prev: History, Up: Preliminaries
@@ -364,18 +385,18 @@ the documentation!
Before reporting a bug or trying to fix it yourself, try to isolate
it to the smallest possible input file that reproduces the problem.
-Then send us the input file and the exact results `m4' gave you. Also
+Then send us the input file and the exact results 'm4' gave you. Also
say what you expected to occur; this will help us decide whether the
problem was really in the documentation.
Once you've got a precise problem, send e-mail to <bug-m4@gnu.org>.
-Please include the version number of `m4' you are using. You can get
-this information with the command `m4 --version'. Also provide details
+Please include the version number of 'm4' you are using. You can get
+this information with the command 'm4 --version'. Also provide details
about the platform you are executing on.
Non-bug suggestions are always welcome as well. If you have
-questions about things that are unclear in the documentation or are
-just obscure features, please report them too.
+questions about things that are unclear in the documentation or are just
+obscure features, please report them too.

File: m4.info, Node: Manual, Prev: Bugs, Up: Preliminaries
@@ -383,106 +404,106 @@ File: m4.info, Node: Manual, Prev: Bugs, Up: Preliminaries
1.4 Using this manual
=====================
-This manual contains a number of examples of `m4' input and output, and
+This manual contains a number of examples of 'm4' input and output, and
a simple notation is used to distinguish input, output and error
-messages from `m4'. Examples are set out from the normal text, and
+messages from 'm4'. Examples are set out from the normal text, and
shown in a fixed width font, like this
This is an example of an example!
- To distinguish input from output, all output from `m4' is prefixed
-by the string `=>', and all error messages by the string `error-->'.
-When showing how command line options affect matters, the command line
-is shown with a prompt `$ like this', otherwise, you can assume that a
-simple `m4' invocation will work. Thus:
+ To distinguish input from output, all output from 'm4' is prefixed by
+the string '=>', and all error messages by the string 'error->'. When
+showing how command line options affect matters, the command line is
+shown with a prompt '$ 'like this'', otherwise, you can assume that a
+simple 'm4' invocation will work. Thus:
$ command line to invoke m4
Example of input line
=>Output line from m4
- error-->and an error message
+ error->and an error message
- The sequence `^D' in an example indicates the end of the input file.
-The sequence `<NL>' refers to the newline character. The majority of
+ The sequence '^D' in an example indicates the end of the input file.
+The sequence '<NL>' refers to the newline character. The majority of
these examples are self-contained, and you can run them with similar
-results by invoking `m4 -d'. In fact, the testsuite that is bundled in
+results by invoking 'm4 -d'. In fact, the testsuite that is bundled in
the GNU M4 package consists of the examples in this document! Some of
the examples assume that your current directory is located where you
unpacked the installation, so if you plan on following along, you may
find it helpful to do this now:
- $ cd m4-1.4.16
+ $ cd m4-1.4.17
- As each of the predefined macros in `m4' is described, a prototype
+ As each of the predefined macros in 'm4' is described, a prototype
call of the macro will be shown, giving descriptive names to the
arguments, e.g.,
- -- Composite: example (STRING, [COUNT = `1'], [ARGUMENT]...)
- This is a sample prototype. There is not really a macro named
- `example', but this documents that if there were, it would be a
- Composite macro, rather than a Builtin. It requires at least one
- argument, STRING. Remember that in `m4', there must not be a
- space between the macro name and the opening parenthesis, unless
- it was intended to call the macro without any arguments. The
- brackets around COUNT and ARGUMENT show that these arguments are
- optional. If COUNT is omitted, the macro behaves as if count were
- `1', whereas if ARGUMENT is omitted, the macro behaves as if it
- were the empty string. A blank argument is not the same as an
- omitted argument. For example, `example(`a')', `example(`a',`1')',
- and `example(`a',`1',)' would behave identically with COUNT set to
- `1'; while `example(`a',)' and `example(`a',`')' would explicitly
- pass the empty string for COUNT. The ellipses (`...') show that
- the macro processes additional arguments after ARGUMENT, rather
- than ignoring them.
-
- All macro arguments in `m4' are strings, but some are given special
+ -- Composite: example (STRING, [COUNT = '1']
+ [ARGUMENT]This is a sample prototype. There is not really a macro
+ named 'example', but this documents that if there were, it would be
+ a Composite macro, rather than a Builtin. It requires at least one
+ argument, STRING. Remember that in 'm4', there must not be a space
+ between the macro name and the opening parenthesis, unless it was
+ intended to call the macro without any arguments. The brackets
+ around COUNT and ARGUMENT show that these arguments are optional.
+ If COUNT is omitted, the macro behaves as if count were '1',
+ whereas if ARGUMENT is omitted, the macro behaves as if it were the
+ empty string. A blank argument is not the same as an omitted
+ argument. For example, 'example(`a')', 'example(`a',`1')', and
+ 'example(`a',`1',)' would behave identically with COUNT set to '1';
+ while 'example(`a',)' and 'example(`a',`')' would explicitly pass
+ the empty string for COUNT. The ellipses ('...') show that the
+ macro processes additional arguments after ARGUMENT, rather than
+ ignoring them.
+
+ All macro arguments in 'm4' are strings, but some are given special
interpretation, e.g., as numbers, file names, regular expressions, etc.
The documentation for each macro will state how the parameters are
-interpreted, and what happens if the argument cannot be parsed
-according to the desired interpretation. Unless specified otherwise, a
-parameter specified to be a number is parsed as a decimal, even if the
-argument has leading zeros; and parsing the empty string as a number
-results in 0 rather than an error, although a warning will be issued.
+interpreted, and what happens if the argument cannot be parsed according
+to the desired interpretation. Unless specified otherwise, a parameter
+specified to be a number is parsed as a decimal, even if the argument
+has leading zeros; and parsing the empty string as a number results in 0
+rather than an error, although a warning will be issued.
This document consistently writes and uses "builtin", without a
-hyphen, as if it were an English word. This is how the `builtin'
-primitive is spelled within `m4'.
+hyphen, as if it were an English word. This is how the 'builtin'
+primitive is spelled within 'm4'.

File: m4.info, Node: Invoking m4, Next: Syntax, Prev: Preliminaries, Up: Top
-2 Invoking `m4'
+2 Invoking 'm4'
***************
-The format of the `m4' command is:
+The format of the 'm4' command is:
- `m4' [OPTION...] [FILE...]
+ m4 [OPTION...] [FILE...]
- All options begin with `-', or if long option names are used, with
-`--'. A long option name need not be written completely, any
-unambiguous prefix is sufficient. POSIX requires `m4' to recognize
-arguments intermixed with files, even when `POSIXLY_CORRECT' is set in
+ All options begin with '-', or if long option names are used, with
+'--'. A long option name need not be written completely, any
+unambiguous prefix is sufficient. POSIX requires 'm4' to recognize
+arguments intermixed with files, even when 'POSIXLY_CORRECT' is set in
the environment. Most options take effect at startup regardless of
-their position, but some are documented below as taking effect after
-any files that occurred earlier in the command line. The argument `--'
-is a marker to denote the end of options.
+their position, but some are documented below as taking effect after any
+files that occurred earlier in the command line. The argument '--' is a
+marker to denote the end of options.
With short options, options that do not take arguments may be
combined into a single command line argument with subsequent options,
options with mandatory arguments may be provided either as a single
command line argument or as two arguments, and options with optional
-arguments must be provided as a single argument. In other words, `m4
--QPDfoo -d a -df' is equivalent to `m4 -Q -P -D foo -d -df -- ./a',
+arguments must be provided as a single argument. In other words, 'm4
+-QPDfoo -d a -df' is equivalent to 'm4 -Q -P -D foo -d -df -- ./a',
although the latter form is considered canonical.
With long options, options with mandatory arguments may be provided
-with an equal sign (`=') in a single argument, or as two arguments, and
+with an equal sign ('=') in a single argument, or as two arguments, and
options with optional arguments must be provided as a single argument.
-In other words, `m4 --def foo --debug a' is equivalent to `m4
+In other words, 'm4 --def foo --debug a' is equivalent to 'm4
--define=foo --debug= -- ./a', although the latter form is considered
-canonical (not to mention more robust, in case a future version of `m4'
-introduces an option named `--default').
+canonical (not to mention more robust, in case a future version of 'm4'
+introduces an option named '--default').
- `m4' understands the following options, grouped by functionality.
+ 'm4' understands the following options, grouped by functionality.
* Menu:
@@ -499,20 +520,19 @@ File: m4.info, Node: Operation modes, Next: Preprocessor features, Up: Invoki
2.1 Command line options for operation modes
============================================
-Several options control the overall operation of `m4':
+Several options control the overall operation of 'm4':
-`--help'
- Print a help summary on standard output, then immediately exit
- `m4' without reading any input files or performing any other
- actions.
+'--help'
+ Print a help summary on standard output, then immediately exit 'm4'
+ without reading any input files or performing any other actions.
-`--version'
+'--version'
Print the version number of the program on standard output, then
- immediately exit `m4' without reading any input files or
- performing any other actions.
+ immediately exit 'm4' without reading any input files or performing
+ any other actions.
-`-E'
-`--fatal-warnings'
+'-E'
+'--fatal-warnings'
Controls the effect of warnings. If unspecified, then execution
continues and exit status is unaffected when a warning is printed.
If specified exactly once, warnings become fatal; when one is
@@ -520,48 +540,48 @@ Several options control the overall operation of `m4':
If specified multiple times, then execution halts with non-zero
status the first time a warning is issued. The introduction of
behavior levels is new to M4 1.4.9; for behavior consistent with
- earlier versions, you should specify `-E' twice.
+ earlier versions, you should specify '-E' twice.
-`-i'
-`--interactive'
-`-e'
- Makes this invocation of `m4' interactive. This means that all
+'-i'
+'--interactive'
+'-e'
+ Makes this invocation of 'm4' interactive. This means that all
output will be unbuffered, and interrupts will be ignored. The
- spelling `-e' exists for compatibility with other `m4'
+ spelling '-e' exists for compatibility with other 'm4'
implementations, and issues a warning because it may be withdrawn
in a future version of GNU M4.
-`-P'
-`--prefix-builtins'
+'-P'
+'--prefix-builtins'
Internally modify _all_ builtin macro names so they all start with
- the prefix `m4_'. For example, using this option, one should write
- `m4_define' instead of `define', and `m4___file__' instead of
- `__file__'. This option has no effect if `-R' is also specified.
+ the prefix 'm4_'. For example, using this option, one should write
+ 'm4_define' instead of 'define', and 'm4___file__' instead of
+ '__file__'. This option has no effect if '-R' is also specified.
-`-Q'
-`--quiet'
-`--silent'
+'-Q'
+'--quiet'
+'--silent'
Suppress warnings, such as missing or superfluous arguments in
macro calls, or treating the empty string as zero.
-`--warn-macro-sequence[=REGEXP]'
+'--warn-macro-sequence[=REGEXP]'
Issue a warning if the regular expression REGEXP has a non-empty
- match in any macro definition (either by `define' or `pushdef').
- Empty matches are ignored; therefore, supplying the empty string
- as REGEXP disables any warning. If the optional REGEXP is not
+ match in any macro definition (either by 'define' or 'pushdef').
+ Empty matches are ignored; therefore, supplying the empty string as
+ REGEXP disables any warning. If the optional REGEXP is not
supplied, then the default regular expression is
- `\$\({[^}]*}\|[0-9][0-9]+\)' (a literal `$' followed by multiple
+ '\$\({[^}]*}\|[0-9][0-9]+\)' (a literal '$' followed by multiple
digits or by an open brace), since these sequences will change
semantics in the default operation of GNU M4 2.0 (due to a change
- in how more than 9 arguments in a macro definition will be
- handled, *note Arguments::). Providing an alternate regular
- expression can provide a useful reverse lookup feature of finding
- where a macro is defined to have a given definition.
+ in how more than 9 arguments in a macro definition will be handled,
+ *note Arguments::). Providing an alternate regular expression can
+ provide a useful reverse lookup feature of finding where a macro is
+ defined to have a given definition.
-`-W REGEXP'
-`--word-regexp=REGEXP'
+'-W REGEXP'
+'--word-regexp=REGEXP'
Use REGEXP as an alternative syntax for macro names. This
- experimental option will not be present in all GNU `m4'
+ experimental option will not be present in all GNU 'm4'
implementations (*note Changeword::).

@@ -570,44 +590,44 @@ File: m4.info, Node: Preprocessor features, Next: Limits control, Prev: Opera
2.2 Command line options for preprocessor features
==================================================
-Several options allow `m4' to behave more like a preprocessor. Macro
+Several options allow 'm4' to behave more like a preprocessor. Macro
definitions and deletions can be made on the command line, the search
path can be altered, and the output file can track where the input came
from. These features occur with the following options:
-`-D NAME[=VALUE]'
-`--define=NAME[=VALUE]'
- This enters NAME into the symbol table. If `=VALUE' is missing,
+'-D NAME[=VALUE]'
+'--define=NAME[=VALUE]'
+ This enters NAME into the symbol table. If '=VALUE' is missing,
the value is taken to be the empty string. The VALUE can be any
string, and the macro can be defined to take arguments, just as if
it was defined from within the input. This option may be given
more than once; order with respect to file names is significant,
and redefining the same NAME loses the previous value.
-`-I DIRECTORY'
-`--include=DIRECTORY'
- Make `m4' search DIRECTORY for included files that are not found
- in the current working directory. *Note Search Path::, for more
+'-I DIRECTORY'
+'--include=DIRECTORY'
+ Make 'm4' search DIRECTORY for included files that are not found in
+ the current working directory. *Note Search Path::, for more
details. This option may be given more than once.
-`-s'
-`--synclines'
+'-s'
+'--synclines'
Generate synchronization lines, for use by the C preprocessor or
other similar tools. Order is significant with respect to file
- names. This option is useful, for example, when `m4' is used as a
+ names. This option is useful, for example, when 'm4' is used as a
front end to a compiler. Source file name and line number
- information is conveyed by directives of the form `#line LINENUM
+ information is conveyed by directives of the form '#line LINENUM
"FILE"', which are inserted as needed into the middle of the
- output. Such directives mean that the following line originated
- or was expanded from the contents of input file FILE at line
- LINENUM. The `"FILE"' part is often omitted when the file name
- did not change from the previous directive.
+ output. Such directives mean that the following line originated or
+ was expanded from the contents of input file FILE at line LINENUM.
+ The '"FILE"' part is often omitted when the file name did not
+ change from the previous directive.
Synchronization directives are always given on complete lines by
themselves. When a synchronization discrepancy occurs in the
middle of an output line, the associated synchronization directive
- is delayed until the next newline that does not occur in the
- middle of a quoted string or comment.
+ is delayed until the next newline that does not occur in the middle
+ of a quoted string or comment.
define(`twoline', `1
2')
@@ -640,11 +660,11 @@ from. These features occur with the following options:
=>#line 12
=>goodbye
-`-U NAME'
-`--undefine=NAME'
+'-U NAME'
+'--undefine=NAME'
This deletes any predefined meaning NAME might have. Obviously,
- only predefined macros can be deleted in this way. This option
- may be given more than once; undefining a NAME that does not have a
+ only predefined macros can be deleted in this way. This option may
+ be given more than once; undefining a NAME that does not have a
definition is silently ignored. Order is significant with respect
to file names.
@@ -654,43 +674,43 @@ File: m4.info, Node: Limits control, Next: Frozen state, Prev: Preprocessor f
2.3 Command line options for limits control
===========================================
-There are some limits within `m4' that can be tuned. For
-compatibility, `m4' also accepts some options that control limits in
-other implementations, but which are automatically unbounded (limited
-only by your hardware and operating system constraints) in GNU `m4'.
+There are some limits within 'm4' that can be tuned. For compatibility,
+'m4' also accepts some options that control limits in other
+implementations, but which are automatically unbounded (limited only by
+your hardware and operating system constraints) in GNU 'm4'.
-`-g'
-`--gnu'
+'-g'
+'--gnu'
Enable all the extensions in this implementation. In this release
of M4, this option is always on by default; it is currently only
- useful when overriding a prior use of `--traditional'. However,
+ useful when overriding a prior use of '--traditional'. However,
having GNU behavior as default makes it impossible to write a
- strictly POSIX-compliant client that avoids all incompatible GNU
- M4 extensions, since such a client would have to use the non-POSIX
+ strictly POSIX-compliant client that avoids all incompatible GNU M4
+ extensions, since such a client would have to use the non-POSIX
command-line option to force full POSIX behavior. Thus, a future
version of M4 will be changed to implicitly use the option
- `--traditional' if the environment variable `POSIXLY_CORRECT' is
+ '--traditional' if the environment variable 'POSIXLY_CORRECT' is
set. Projects that intentionally use GNU extensions should
- consider using `--gnu' to state their intentions, so that the
- project will not mysteriously break if the user upgrades to a
- newer M4 and has `POSIXLY_CORRECT' set in their environment.
+ consider using '--gnu' to state their intentions, so that the
+ project will not mysteriously break if the user upgrades to a newer
+ M4 and has 'POSIXLY_CORRECT' set in their environment.
-`-G'
-`--traditional'
+'-G'
+'--traditional'
Suppress all the extensions made in this implementation, compared
to the System V version. *Note Compatibility::, for a list of
these.
-`-H NUM'
-`--hashsize=NUM'
+'-H NUM'
+'--hashsize=NUM'
Make the internal hash table for symbol lookup be NUM entries big.
For better performance, the number should be prime, but this is not
checked. The default is 509 entries. It should not be necessary
to increase this value, unless you define an excessive number of
macros.
-`-L NUM'
-`--nesting-limit=NUM'
+'-L NUM'
+'--nesting-limit=NUM'
Artificially limit the nesting of macro calls to NUM levels,
stopping program execution if this limit is ever exceeded. When
not specified, nesting defaults to unlimited on platforms that can
@@ -698,35 +718,34 @@ only by your hardware and operating system constraints) in GNU `m4'.
zero means unlimited; but then heavily nested code could
potentially cause a stack overflow.
- The precise effect of this option is more correctly associated
- with textual nesting than dynamic recursion. It has been useful
- when some complex `m4' input was generated by mechanical means, and
- also in diagnosing recursive algorithms that do not scale well.
- Most users never need to change this option from its default.
-
- This option does _not_ have the ability to break endless
- rescanning loops, since these do not necessarily consume much
- memory or stack space. Through clever usage of rescanning loops,
- one can request complex, time-consuming computations from `m4'
- with useful results. Putting limitations in this area would break
- `m4' power. There are many pathological cases:
- `define(`a', `a')a' is only the simplest example (but *note
- Compatibility::). Expecting GNU `m4' to detect these would be a
- little like expecting a compiler system to detect and diagnose
- endless loops: it is a quite _hard_ problem in general, if not
- undecidable!
-
-`-B NUM'
-`-S NUM'
-`-T NUM'
- These options are present for compatibility with System V `m4', but
+ The precise effect of this option is more correctly associated with
+ textual nesting than dynamic recursion. It has been useful when
+ some complex 'm4' input was generated by mechanical means, and also
+ in diagnosing recursive algorithms that do not scale well. Most
+ users never need to change this option from its default.
+
+ This option does _not_ have the ability to break endless rescanning
+ loops, since these do not necessarily consume much memory or stack
+ space. Through clever usage of rescanning loops, one can request
+ complex, time-consuming computations from 'm4' with useful results.
+ Putting limitations in this area would break 'm4' power. There are
+ many pathological cases: 'define(`a', `a')a' is only the simplest
+ example (but *note Compatibility::). Expecting GNU 'm4' to detect
+ these would be a little like expecting a compiler system to detect
+ and diagnose endless loops: it is a quite _hard_ problem in
+ general, if not undecidable!
+
+'-B NUM'
+'-S NUM'
+'-T NUM'
+ These options are present for compatibility with System V 'm4', but
do nothing in this implementation. They may disappear in future
releases, and issue a warning to that effect.
-`-N NUM'
-`--diversions=NUM'
+'-N NUM'
+'--diversions=NUM'
These options are present only for compatibility with previous
- versions of GNU `m4', and were controlling the number of possible
+ versions of GNU 'm4', and were controlling the number of possible
diversions which could be used at the same time. They do nothing,
because there is no fixed limit anymore. They may disappear in
future releases, and issue a warning to that effect.
@@ -737,20 +756,20 @@ File: m4.info, Node: Frozen state, Next: Debugging options, Prev: Limits cont
2.4 Command line options for frozen state
=========================================
-GNU `m4' comes with a feature of freezing internal state (*note Frozen
-files::). This can be used to speed up `m4' execution when reusing a
+GNU 'm4' comes with a feature of freezing internal state (*note Frozen
+files::). This can be used to speed up 'm4' execution when reusing a
common initialization script.
-`-F FILE'
-`--freeze-state=FILE'
+'-F FILE'
+'--freeze-state=FILE'
Once execution is finished, write out the frozen state on the
specified FILE. It is conventional, but not required, for FILE to
- end in `.m4f'.
+ end in '.m4f'.
-`-R FILE'
-`--reload-state=FILE'
+'-R FILE'
+'--reload-state=FILE'
Before execution starts, recover the internal state from the
- specified frozen FILE. The options `-D', `-U', and `-t' take
+ specified frozen FILE. The options '-D', '-U', and '-t' take
effect after state is reloaded, but before the input files are
read.
@@ -760,44 +779,43 @@ File: m4.info, Node: Debugging options, Next: Command line files, Prev: Froze
2.5 Command line options for debugging
======================================
-Finally, there are several options for aiding in debugging `m4' scripts.
+Finally, there are several options for aiding in debugging 'm4' scripts.
-`-d[FLAGS]'
-`--debug[=FLAGS]'
+'-d[FLAGS]'
+'--debug[=FLAGS]'
Set the debug-level according to the flags FLAGS. The debug-level
controls the format and amount of information presented by the
- debugging functions. *Note Debug Levels::, for more details on
- the format and meaning of FLAGS. If omitted, FLAGS defaults to
- `aeq'.
-
-`--debugfile[=FILE]'
-`-o FILE'
-`--error-output=FILE'
- Redirect `dumpdef' output, debug messages, and trace output to the
- named FILE. Warnings, error messages, and `errprint' output are
+ debugging functions. *Note Debug Levels::, for more details on the
+ format and meaning of FLAGS. If omitted, FLAGS defaults to 'aeq'.
+
+'--debugfile[=FILE]'
+'-o FILE'
+'--error-output=FILE'
+ Redirect 'dumpdef' output, debug messages, and trace output to the
+ named FILE. Warnings, error messages, and 'errprint' output are
still printed to standard error. If these options are not used, or
- if FILE is unspecified (only possible for `--debugfile'), debug
+ if FILE is unspecified (only possible for '--debugfile'), debug
output goes to standard error; if FILE is the empty string, debug
output is discarded. *Note Debug Output::, for more details. The
- option `--debugfile' may be given more than once, and order is
- significant with respect to file names. The spellings `-o' and
- `--error-output' are misleading and inconsistent with other GNU
+ option '--debugfile' may be given more than once, and order is
+ significant with respect to file names. The spellings '-o' and
+ '--error-output' are misleading and inconsistent with other GNU
tools; for now they are silently accepted as synonyms of
- `--debugfile' and only recognized once, but in a future version of
+ '--debugfile' and only recognized once, but in a future version of
M4, using them will cause a warning to be issued.
-`-l NUM'
-`--arglength=NUM'
+'-l NUM'
+'--arglength=NUM'
Restrict the size of the output generated by macro tracing to NUM
characters per trace line. If unspecified or zero, output is
unlimited. *Note Debug Levels::, for more details.
-`-t NAME'
-`--trace=NAME'
+'-t NAME'
+'--trace=NAME'
This enables tracing for the macro NAME, at any point where it is
- defined. NAME need not be defined when this option is given.
- This option may be given more than once, and order is significant
- with respect to file names. *Note Trace::, for more details.
+ defined. NAME need not be defined when this option is given. This
+ option may be given more than once, and order is significant with
+ respect to file names. *Note Trace::, for more details.

File: m4.info, Node: Command line files, Prev: Debugging options, Up: Invoking m4
@@ -806,38 +824,38 @@ File: m4.info, Node: Command line files, Prev: Debugging options, Up: Invokin
==============================================
The remaining arguments on the command line are taken to be input file
-names. If no names are present, standard input is read. A file name
-of `-' is taken to mean standard input. It is conventional, but not
-required, for input files to end in `.m4'.
+names. If no names are present, standard input is read. A file name of
+'-' is taken to mean standard input. It is conventional, but not
+required, for input files to end in '.m4'.
The input files are read in the sequence given. Standard input can
-be read more than once, so the file name `-' may appear multiple times
+be read more than once, so the file name '-' may appear multiple times
on the command line; this makes a difference when input is from a
terminal or other special file type. It is an error if an input file
ends in the middle of argument collection, a comment, or a quoted
string.
- The options `--define' (`-D'), `--undefine' (`-U'), `--synclines'
-(`-s'), and `--trace' (`-t') only take effect after processing input
+ The options '--define' ('-D'), '--undefine' ('-U'), '--synclines'
+('-s'), and '--trace' ('-t') only take effect after processing input
from any file names that occur earlier on the command line. For
-example, assume the file `foo' contains:
+example, assume the file 'foo' contains:
$ cat foo
bar
- The text `bar' can then be redefined over multiple uses of `foo':
+ The text 'bar' can then be redefined over multiple uses of 'foo':
$ m4 -Dbar=hello foo -Dbar=world foo
=>hello
=>world
- If none of the input files invoked `m4exit' (*note M4exit::), the
-exit status of `m4' will be 0 for success, 1 for general failure (such
+ If none of the input files invoked 'm4exit' (*note M4exit::), the
+exit status of 'm4' will be 0 for success, 1 for general failure (such
as problems with reading an input file), and 63 for version mismatch
(*note Using frozen files::).
- If you need to read a file whose name starts with a `-', you can
-specify it as `./-file', or use `--' to mark the end of options.
+ If you need to read a file whose name starts with a '-', you can
+specify it as './-file', or use '--' to mark the end of options.

File: m4.info, Node: Syntax, Next: Macros, Prev: Invoking m4, Up: Top
@@ -845,25 +863,24 @@ File: m4.info, Node: Syntax, Next: Macros, Prev: Invoking m4, Up: Top
3 Lexical and syntactic conventions
***********************************
-As `m4' reads its input, it separates it into "tokens". A token is
+As 'm4' reads its input, it separates it into "tokens". A token is
either a name, a quoted string, or any single character, that is not a
-part of either a name or a string. Input to `m4' can also contain
-comments. GNU `m4' does not yet understand multibyte locales; all
-operations are byte-oriented rather than character-oriented (although
-if your locale uses a single byte encoding, such as ISO-8859-1, you
-will not notice a difference). However, `m4' is eight-bit clean, so
-you can use non-ASCII characters in quoted strings (*note
-Changequote::), comments (*note Changecom::), and macro names (*note
-Indir::), with the exception of the NUL character (the zero byte
-`'\0'').
+part of either a name or a string. Input to 'm4' can also contain
+comments. GNU 'm4' does not yet understand multibyte locales; all
+operations are byte-oriented rather than character-oriented (although if
+your locale uses a single byte encoding, such as ISO-8859-1, you will
+not notice a difference). However, 'm4' is eight-bit clean, so you can
+use non-ASCII characters in quoted strings (*note Changequote::),
+comments (*note Changecom::), and macro names (*note Indir::), with the
+exception of the NUL character (the zero byte ''\0'').
* Menu:
* Names:: Macro names
-* Quoted strings:: Quoting input to `m4'
-* Comments:: Comments in `m4' input
+* Quoted strings:: Quoting input to 'm4'
+* Comments:: Comments in 'm4' input
* Other tokens:: Other kinds of input tokens
-* Input processing:: How `m4' copies input to output
+* Input processing:: How 'm4' copies input to output

File: m4.info, Node: Names, Next: Quoted strings, Up: Syntax
@@ -871,24 +888,24 @@ File: m4.info, Node: Names, Next: Quoted strings, Up: Syntax
3.1 Macro names
===============
-A name is any sequence of letters, digits, and the character `_'
-(underscore), where the first character is not a digit. `m4' will use
+A name is any sequence of letters, digits, and the character '_'
+(underscore), where the first character is not a digit. 'm4' will use
the longest such sequence found in the input. If a name has a macro
definition, it will be subject to macro expansion (*note Macros::).
Names are case-sensitive.
- Examples of legal names are: `foo', `_tmp', and `name01'.
+ Examples of legal names are: 'foo', '_tmp', and 'name01'.

File: m4.info, Node: Quoted strings, Next: Comments, Prev: Names, Up: Syntax
-3.2 Quoting input to `m4'
+3.2 Quoting input to 'm4'
=========================
-A quoted string is a sequence of characters surrounded by quote
-strings, defaulting to ``' and `'', where the nested begin and end
-quotes within the string are balanced. The value of a string token is
-the text, with one level of quotes stripped off. Thus
+A quoted string is a sequence of characters surrounded by quote strings,
+defaulting to '`' and ''', where the nested begin and end quotes within
+the string are balanced. The value of a string token is the text, with
+one level of quotes stripped off. Thus
`'
=>
@@ -899,20 +916,20 @@ is the empty string, and double-quoting turns into single-quoting.
=>`quoted'
The quote characters can be changed at any time, using the builtin
-macro `changequote'. *Note Changequote::, for more information.
+macro 'changequote'. *Note Changequote::, for more information.

File: m4.info, Node: Comments, Next: Other tokens, Prev: Quoted strings, Up: Syntax
-3.3 Comments in `m4' input
+3.3 Comments in 'm4' input
==========================
-Comments in `m4' are normally delimited by the characters `#' and
-newline. All characters between the comment delimiters are ignored,
-but the entire comment (including the delimiters) is passed through to
-the output--comments are _not_ discarded by `m4'.
+Comments in 'm4' are normally delimited by the characters '#' and
+newline. All characters between the comment delimiters are ignored, but
+the entire comment (including the delimiters) is passed through to the
+output--comments are _not_ discarded by 'm4'.
- Comments cannot be nested, so the first newline after a `#' ends the
+ Comments cannot be nested, so the first newline after a '#' ends the
comment. The commenting effect of the begin-comment string can be
inhibited by quoting it.
@@ -923,7 +940,7 @@ inhibited by quoting it.
=>quoting inhibits # comments
The comment delimiters can be changed to any string at any time,
-using the builtin macro `changecom'. *Note Changecom::, for more
+using the builtin macro 'changecom'. *Note Changecom::, for more
information.

@@ -936,48 +953,47 @@ Any character, that is neither a part of a name, nor of a quoted string,
nor a comment, is a token by itself. When not in the context of macro
expansion, all of these tokens are just copied to output. However,
during macro expansion, whitespace characters (space, tab, newline,
-formfeed, carriage return, vertical tab), parentheses (`(' and `)'),
-comma (`,'), and dollar (`$') have additional roles, explained later.
+formfeed, carriage return, vertical tab), parentheses ('(' and ')'),
+comma (','), and dollar ('$') have additional roles, explained later.

File: m4.info, Node: Input processing, Prev: Other tokens, Up: Syntax
-3.5 How `m4' copies input to output
+3.5 How 'm4' copies input to output
===================================
-As `m4' reads the input token by token, it will copy each token
-directly to the output immediately.
+As 'm4' reads the input token by token, it will copy each token directly
+to the output immediately.
The exception is when it finds a word with a macro definition. In
-that case `m4' will calculate the macro's expansion, possibly reading
+that case 'm4' will calculate the macro's expansion, possibly reading
more input to get the arguments. It then inserts the expansion in front
of the remaining input. In other words, the resulting text from a macro
call will be read and parsed into tokens again.
- `m4' expands a macro as soon as possible. If it finds a macro call
+ 'm4' expands a macro as soon as possible. If it finds a macro call
when collecting the arguments to another, it will expand the second call
first. This process continues until there are no more macro calls to
expand and all the input has been consumed.
- For a running example, examine how `m4' handles this input:
+ For a running example, examine how 'm4' handles this input:
format(`Result is %d', eval(`2**15'))
-First, `m4' sees that the token `format' is a macro name, so it
-collects the tokens `(', ``Result is %d'', `,', and ` ', before
-encountering another potential macro. Sure enough, `eval' is a macro
-name, so the nested argument collection picks up `(', ``2**15'', and
-`)', invoking the eval macro with the lone argument of `2**15'. The
-expansion of `eval(2**15)' is `32768', which is then rescanned as the
-five tokens `3', `2', `7', `6', and `8'; and combined with the next
-`)', the format macro now has all its arguments, as if the user had
-typed:
+First, 'm4' sees that the token 'format' is a macro name, so it collects
+the tokens '(', '`Result is %d'', ',', and ' ', before encountering
+another potential macro. Sure enough, 'eval' is a macro name, so the
+nested argument collection picks up '(', '`2**15'', and ')', invoking
+the eval macro with the lone argument of '2**15'. The expansion of
+'eval(2**15)' is '32768', which is then rescanned as the five tokens
+'3', '2', '7', '6', and '8'; and combined with the next ')', the format
+macro now has all its arguments, as if the user had typed:
format(`Result is %d', 32768)
-The format macro expands to `Result is 32768', and we have another
-round of scanning for the tokens `Result', ` ', `is', ` ', `3', `2',
-`7', `6', and `8'. None of these are macros, so the final output is
+The format macro expands to 'Result is 32768', and we have another round
+of scanning for the tokens 'Result', ' ', 'is', ' ', '3', '2', '7', '6',
+and '8'. None of these are macros, so the final output is
=>Result is 32768
@@ -1002,60 +1018,60 @@ attempt looks like this:
Oops - the argument did not get capitalized. And although the manual
is not able to easily show it, both lines that appear empty actually
contain two trailing spaces. By stepping through the parse, it is easy
-to see what happened. First, `m4' sees the token `changequote', which
-it recognizes as a macro, followed by `(', `[', `,', `]', and `)' to
+to see what happened. First, 'm4' sees the token 'changequote', which
+it recognizes as a macro, followed by '(', '[', ',', ']', and ')' to
form the argument list. The macro expands to the empty string, but
changes the quoting characters to something more useful for generating
-shell code (unbalanced ``' and `'' appear all the time in shell scripts,
-but unbalanced `[]' tend to be rare). Also in the first line, `m4'
-sees the token `dnl', which it recognizes as a builtin macro that
-consumes the rest of the line, resulting in no output for that line.
-
- The second line starts a macro definition. `m4' sees the token
-`define', which it recognizes as a macro, followed by a `(',
-`[gl_STRING_MODULE_INDICATOR]', and `,'. Because an unquoted comma was
+shell code (unbalanced '`' and ''' appear all the time in shell scripts,
+but unbalanced '[]' tend to be rare). Also in the first line, 'm4' sees
+the token 'dnl', which it recognizes as a builtin macro that consumes
+the rest of the line, resulting in no output for that line.
+
+ The second line starts a macro definition. 'm4' sees the token
+'define', which it recognizes as a macro, followed by a '(',
+'[gl_STRING_MODULE_INDICATOR]', and ','. Because an unquoted comma was
encountered, the first argument is known to be the expansion of the
-single-quoted string token, or `gl_STRING_MODULE_INDICATOR'. Next,
-`m4' sees `<NL>', ` ', and ` ', but this whitespace is discarded as
-part of argument collection. Then comes a rather lengthy single-quoted
-string token, `[<NL> dnl comment<NL> GNULIB_]'. This is followed
-by the token `translit', which `m4' recognizes as a macro name, so a
-nested macro expansion has started.
-
- The arguments to the `translit' are found by the tokens `(', `[$1]',
-`,', `[a-z]', `,', `[A-Z]', and finally `)'. All three string
-arguments are expanded (or in other words, the quotes are stripped),
-and since neither `$' nor `1' need capitalization, the result of the
-macro is `$1'. This expansion is rescanned, resulting in the two
-literal characters `$' and `1'.
-
- Scanning of the outer macro resumes, and picks up with `[=1<NL> ]',
-and finally `)'. The collected pieces of expanded text are
+single-quoted string token, or 'gl_STRING_MODULE_INDICATOR'. Next, 'm4'
+sees '<NL>', ' ', and ' ', but this whitespace is discarded as part of
+argument collection. Then comes a rather lengthy single-quoted string
+token, '[<NL> dnl comment<NL> GNULIB_]'. This is followed by the
+token 'translit', which 'm4' recognizes as a macro name, so a nested
+macro expansion has started.
+
+ The arguments to the 'translit' are found by the tokens '(', '[$1]',
+',', '[a-z]', ',', '[A-Z]', and finally ')'. All three string arguments
+are expanded (or in other words, the quotes are stripped), and since
+neither '$' nor '1' need capitalization, the result of the macro is
+'$1'. This expansion is rescanned, resulting in the two literal
+characters '$' and '1'.
+
+ Scanning of the outer macro resumes, and picks up with '[=1<NL> ]',
+and finally ')'. The collected pieces of expanded text are
concatenated, with the end result that the macro
-`gl_STRING_MODULE_INDICATOR' is now defined to be the sequence `<NL>
-dnl comment<NL> GNULIB_$1=1<NL> '. Once again, `dnl' is recognized
-and avoids a newline in the output.
-
- The final line is then parsed, beginning with ` ' and ` ' that are
-output literally. Then `gl_STRING_MODULE_INDICATOR' is recognized as a
-macro name, with an argument list of `(', `[strcase]', and `)'. Since
-the definition of the macro contains the sequence `$1', that sequence
-is replaced with the argument `strcase' prior to starting the rescan.
-The rescan sees `<NL>' and four spaces, which are output literally, then
-`dnl', which discards the text ` comment<NL>'. Next comes four more
-spaces, also output literally, and the token `GNULIB_strcase', which
+'gl_STRING_MODULE_INDICATOR' is now defined to be the sequence
+'<NL> dnl comment<NL> GNULIB_$1=1<NL> '. Once again, 'dnl' is
+recognized and avoids a newline in the output.
+
+ The final line is then parsed, beginning with ' ' and ' ' that are
+output literally. Then 'gl_STRING_MODULE_INDICATOR' is recognized as a
+macro name, with an argument list of '(', '[strcase]', and ')'. Since
+the definition of the macro contains the sequence '$1', that sequence is
+replaced with the argument 'strcase' prior to starting the rescan. The
+rescan sees '<NL>' and four spaces, which are output literally, then
+'dnl', which discards the text ' comment<NL>'. Next comes four more
+spaces, also output literally, and the token 'GNULIB_strcase', which
resulted from the earlier parameter substitution. Since that is not a
-macro name, it is output literally, followed by the literal tokens `=',
-`1', `<NL>', and two more spaces. Finally, the original `<NL>' seen
+macro name, it is output literally, followed by the literal tokens '=',
+'1', '<NL>', and two more spaces. Finally, the original '<NL>' seen
after the macro invocation is scanned and output literally.
Now for a corrected approach. This rearranges the use of newlines
and whitespace so that less whitespace is output (which, although
harmless to shell scripts, can be visually unappealing), and fixes the
quoting issues so that the capitalization occurs when the macro
-`gl_STRING_MODULE_INDICATOR' is invoked, rather then when it is
-defined. It also adds another layer of quoting to the first argument of
-`translit', to ensure that the output will be rescanned as a string
+'gl_STRING_MODULE_INDICATOR' is invoked, rather then when it is defined.
+It also adds another layer of quoting to the first argument of
+'translit', to ensure that the output will be rescanned as a string
rather than a potential uppercase macro name needing further expansion.
changequote([,])dnl
@@ -1067,41 +1083,41 @@ rather than a potential uppercase macro name needing further expansion.
=> GNULIB_STRCASE=1
The parsing of the first line is unchanged. The second line sees the
-name of the macro to define, then sees the discarded `<NL>' and two
-spaces, as before. But this time, the next token is `[dnl comment<NL>
-GNULIB_[]translit([[$1]], [a-z], [A-Z])=1dnl<NL>]', which includes
-nested quotes, followed by `)' to end the macro definition and `dnl' to
-skip the newline. No early expansion of `translit' occurs, so the
-entire string becomes the definition of the macro.
+name of the macro to define, then sees the discarded '<NL>' and two
+spaces, as before. But this time, the next token is '[dnl
+comment<NL> GNULIB_[]translit([[$1]], [a-z], [A-Z])=1dnl<NL>]', which
+includes nested quotes, followed by ')' to end the macro definition and
+'dnl' to skip the newline. No early expansion of 'translit' occurs, so
+the entire string becomes the definition of the macro.
The final line is then parsed, beginning with two spaces that are
-output literally, and an invocation of `gl_STRING_MODULE_INDICATOR'
-with the argument `strcase'. Again, the `$1' in the macro definition
-is substituted prior to rescanning. Rescanning first encounters `dnl',
-and discards ` comment<NL>'. Then two spaces are output literally.
-Next comes the token `GNULIB_', but that is not a macro, so it is
-output literally. The token `[]' is an empty string, so it does not
-affect output. Then the token `translit' is encountered.
-
- This time, the arguments to `translit' are parsed as `(',
-`[[strcase]]', `,', ` ', `[a-z]', `,', ` ', `[A-Z]', and `)'. The two
+output literally, and an invocation of 'gl_STRING_MODULE_INDICATOR' with
+the argument 'strcase'. Again, the '$1' in the macro definition is
+substituted prior to rescanning. Rescanning first encounters 'dnl', and
+discards ' comment<NL>'. Then two spaces are output literally. Next
+comes the token 'GNULIB_', but that is not a macro, so it is output
+literally. The token '[]' is an empty string, so it does not affect
+output. Then the token 'translit' is encountered.
+
+ This time, the arguments to 'translit' are parsed as '(',
+'[[strcase]]', ',', ' ', '[a-z]', ',', ' ', '[A-Z]', and ')'. The two
spaces are discarded, and the translit results in the desired result
-`[STRCASE]'. This is rescanned, but since it is a string, the quotes
-are stripped and the only output is a literal `STRCASE'. Then the
-scanner sees `=' and `1', which are output literally, followed by `dnl'
+'[STRCASE]'. This is rescanned, but since it is a string, the quotes
+are stripped and the only output is a literal 'STRCASE'. Then the
+scanner sees '=' and '1', which are output literally, followed by 'dnl'
which discards the rest of the definition of
-`gl_STRING_MODULE_INDICATOR'. The newline at the end of output is the
-literal `<NL>' that appeared after the invocation of the macro.
+'gl_STRING_MODULE_INDICATOR'. The newline at the end of output is the
+literal '<NL>' that appeared after the invocation of the macro.
- The order in which `m4' expands the macros can be further explored
-using the trace facilities of GNU `m4' (*note Trace::).
+ The order in which 'm4' expands the macros can be further explored
+using the trace facilities of GNU 'm4' (*note Trace::).
---------- Footnotes ----------
(1) Derived from a patch in
-`http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00389.html',
+<http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00389.html>,
and a followup patch in
-`http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00000.html'
+<http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00000.html>

File: m4.info, Node: Macros, Next: Definitions, Prev: Syntax, Up: Top
@@ -1142,8 +1158,8 @@ might interpret the arguments in different ways.
spaces in between. If it does not, the macro is called with no
arguments at all.
- For a macro call to have no arguments, the parentheses _must_ be
-left out. The macro call
+ For a macro call to have no arguments, the parentheses _must_ be left
+out. The macro call
name()
@@ -1156,19 +1172,18 @@ File: m4.info, Node: Inhibiting Invocation, Next: Macro Arguments, Prev: Invo
4.2 Preventing macro invocation
===============================
-An innovation of the `m4' language, compared to some of its
-predecessors (like Strachey's `GPM', for example), is the ability to
-recognize macro calls without resorting to any special, prefixed
-invocation character. While generally useful, this feature might
-sometimes be the source of spurious, unwanted macro calls. So, GNU
-`m4' offers several mechanisms or techniques for inhibiting the
-recognition of names as macro calls.
+An innovation of the 'm4' language, compared to some of its predecessors
+(like Strachey's 'GPM', for example), is the ability to recognize macro
+calls without resorting to any special, prefixed invocation character.
+While generally useful, this feature might sometimes be the source of
+spurious, unwanted macro calls. So, GNU 'm4' offers several mechanisms
+or techniques for inhibiting the recognition of names as macro calls.
First of all, many builtin macros cannot meaningfully be called
without arguments. As a GNU extension, for any of these macros,
whenever an opening parenthesis does not immediately follow their name,
the builtin macro call is not triggered. This solves the most usual
-cases, like for `include' or `eval'. Later in this document, the
+cases, like for 'include' or 'eval'. Later in this document, the
sentence "This macro is recognized only with parameters" refers to this
specific provision of GNU M4, also known as a blind builtin macro. For
the builtins defined by POSIX that bear this disclaimer, POSIX
@@ -1182,12 +1197,12 @@ builtin as though it were given one empty argument instead.
eval(`1')
=>1
- There is also a command line option (`--prefix-builtins', or `-P',
+ There is also a command line option ('--prefix-builtins', or '-P',
*note Invoking m4: Operation modes.) that renames all builtin macros
-with a prefix of `m4_' at startup. The option has no effect whatsoever
-on user defined macros. For example, with this option, one has to
-write `m4_dnl' and even `m4_m4exit'. It also has no effect on whether
-a macro requires parameters.
+with a prefix of 'm4_' at startup. The option has no effect whatsoever
+on user defined macros. For example, with this option, one has to write
+'m4_dnl' and even 'm4_m4exit'. It also has no effect on whether a macro
+requires parameters.
$ m4 -P
eval
@@ -1200,12 +1215,12 @@ a macro requires parameters.
=>1
Another alternative is to redefine problematic macros to a name less
-likely to cause conflicts, *Note Definitions::.
+likely to cause conflicts, using *note Definitions::.
- If your version of GNU `m4' has the `changeword' feature compiled
-in, it offers far more flexibility in specifying the syntax of macro
-names, both builtin or user-defined. *Note Changeword::, for more
-information on this experimental feature.
+ If your version of GNU 'm4' has the 'changeword' feature compiled in,
+it offers far more flexibility in specifying the syntax of macro names,
+both builtin or user-defined. *Note Changeword::, for more information
+on this experimental feature.
Of course, the simplest way to prevent a name from being interpreted
as a call to an existing macro is to quote it. The remainder of this
@@ -1227,19 +1242,19 @@ name. For example:
div`'ert
=>divert
-all yield the string `divert'. While in both:
+all yield the string 'divert'. While in both:
`'divert
=>
divert`'
=>
-the `divert' builtin macro will be called, which expands to the empty
+the 'divert' builtin macro will be called, which expands to the empty
string.
The output of macro evaluations is always rescanned. In the
-following example, the input `x`'y' yields the string `bCD', exactly as
-if `m4' has been given `substr(ab`'cde, `1', `3')' as input:
+following example, the input 'x`'y' yields the string 'bCD', exactly as
+if 'm4' has been given 'substr(ab`'cde, `1', `3')' as input:
define(`cde', `CDE')
=>
@@ -1252,7 +1267,7 @@ if `m4' has been given `substr(ab`'cde, `1', `3')' as input:
Unquoted strings on either side of a quoted string are subject to
being recognized as macro names. In the following example, quoting the
-empty string allows for the second `macro' to be recognized as such:
+empty string allows for the second 'macro' to be recognized as such:
define(`macro', `m')
=>
@@ -1271,8 +1286,8 @@ a macro expansion with the surrounding characters. In this example:
macro(`v')ert
=>
-the input will produce the string `divert'. When the quotes were
-removed, the `divert' builtin was called instead.
+the input will produce the string 'divert'. When the quotes were
+removed, the 'divert' builtin was called instead.

File: m4.info, Node: Macro Arguments, Next: Quoting Arguments, Prev: Inhibiting Invocation, Up: Macros
@@ -1283,8 +1298,8 @@ File: m4.info, Node: Macro Arguments, Next: Quoting Arguments, Prev: Inhibiti
When a name is seen, and it has a macro definition, it will be expanded
as a macro.
- If the name is followed by an opening parenthesis, the arguments
-will be collected before the macro is called. If too few arguments are
+ If the name is followed by an opening parenthesis, the arguments will
+be collected before the macro is called. If too few arguments are
supplied, the missing arguments are taken to be the empty string.
However, some builtins are documented to behave differently for a
missing optional argument than for an explicit empty string. If there
@@ -1312,20 +1327,20 @@ newline, carriage return, vertical tab, and formfeed.
=>unquoted trailing whitespace kept
=>
- Normally `m4' will issue warnings if a builtin macro is called with
+ Normally 'm4' will issue warnings if a builtin macro is called with
an inappropriate number of arguments, but it can be suppressed with the
-`--quiet' command line option (or `--silent', or `-Q', *note Invoking
+'--quiet' command line option (or '--silent', or '-Q', *note Invoking
m4: Operation modes.). For user defined macros, there is no check of
the number of arguments given.
$ m4
index(`abc')
- error-->m4:stdin:1: Warning: too few arguments to builtin `index'
+ error->m4:stdin:1: Warning: too few arguments to builtin `index'
=>0
index(`abc',)
=>0
index(`abc', `b', `ignored')
- error-->m4:stdin:3: Warning: excess arguments to builtin `index' ignored
+ error->m4:stdin:3: Warning: excess arguments to builtin `index' ignored
=>1
$ m4 -Q
@@ -1339,18 +1354,18 @@ the number of arguments given.
Macros are expanded normally during argument collection, and whatever
commas, quotes and parentheses that might show up in the resulting
expanded text will serve to define the arguments as well. Thus, if FOO
-expands to `, b, c', the macro call
+expands to ', b, c', the macro call
bar(a foo, d)
-is a macro call with four arguments, which are `a ', `b', `c' and `d'.
+is a macro call with four arguments, which are 'a ', 'b', 'c' and 'd'.
To understand why the first argument contains whitespace, remember that
unquoted leading whitespace is never part of an argument, but trailing
whitespace always is.
It is possible for a macro's definition to change during argument
collection, in which case the expansion uses the definition that was in
-effect at the time the opening `(' was seen.
+effect at the time the opening '(' was seen.
define(`f', `1')
=>
@@ -1365,7 +1380,7 @@ effect at the time the opening `(' was seen.
=>hello world
define(
^D
- error-->m4:stdin:2: ERROR: end of file in argument list
+ error->m4:stdin:2: ERROR: end of file in argument list

File: m4.info, Node: Quoting Arguments, Next: Macro expansion, Prev: Macro Arguments, Up: Macros
@@ -1374,18 +1389,18 @@ File: m4.info, Node: Quoting Arguments, Next: Macro expansion, Prev: Macro Ar
==================================
Each argument has unquoted leading whitespace removed. Within each
-argument, all unquoted parentheses must match. For example, if FOO is
-a macro,
+argument, all unquoted parentheses must match. For example, if FOO is a
+macro,
foo(() (`(') `(')
-is a macro call, with one argument, whose value is `() (() ('. Commas
+is a macro call, with one argument, whose value is '() (() ('. Commas
separate arguments, except when they occur inside quotes, comments, or
unquoted parentheses. *Note Pseudo Arguments::, for examples.
It is common practice to quote all arguments to macros, unless you
are sure you want the arguments expanded. Thus, in the above example
-with the parentheses, the `right' way to do it is like this:
+with the parentheses, the 'right' way to do it is like this:
foo(`() (() (')
@@ -1398,11 +1413,11 @@ For consistency, this manual follows the rule of thumb that each layer
of parentheses introduces another layer of single quoting, except when
showing the consequences of quoting rules. This is done even when the
quoted string cannot be a macro, such as with integers when you have not
-changed the syntax via `changeword' (*note Changeword::).
+changed the syntax via 'changeword' (*note Changeword::).
- The quoting rule of thumb of one level of quoting per parentheses
-has a nice property: when a macro name appears inside parentheses, you
-can determine when it will be expanded. If it is not quoted, it will be
+ The quoting rule of thumb of one level of quoting per parentheses has
+a nice property: when a macro name appears inside parentheses, you can
+determine when it will be expanded. If it is not quoted, it will be
expanded prior to the outer macro, so that its expansion becomes the
argument. If it is single-quoted, it will be expanded after the outer
macro. And if it is double-quoted, it will be used as literal text
@@ -1431,15 +1446,15 @@ macro is expanded, and the expansion text is pushed back onto the input
therefore result in more macros being called, if the calls are included,
completely or partially, in the first macro calls' expansion.
- Taking a very simple example, if FOO expands to `bar', and BAR
-expands to `Hello', the input
+ Taking a very simple example, if FOO expands to 'bar', and BAR
+expands to 'Hello', the input
$ m4 -Dbar=Hello -Dfoo=bar
foo
=>Hello
-will expand first to `bar', and when this is reread and expanded, into
-`Hello'.
+will expand first to 'bar', and when this is reread and expanded, into
+'Hello'.

File: m4.info, Node: Definitions, Next: Conditionals, Prev: Macros, Up: Top
@@ -1470,17 +1485,17 @@ File: m4.info, Node: Define, Next: Arguments, Up: Definitions
====================
The normal way to define or redefine macros is to use the builtin
-`define':
+'define':
- -- Builtin: define (NAME, [EXPANSION])
- Defines NAME to expand to EXPANSION. If EXPANSION is not given,
- it is taken to be empty.
+ -- Builtin: define (NAME, [EXPANSION]
+ Defines NAME to expand to EXPANSION. If EXPANSION is not given, it
+ is taken to be empty.
- The expansion of `define' is void. The macro `define' is
+ The expansion of 'define' is void. The macro 'define' is
recognized only with parameters.
The following example defines the macro FOO to expand to the text
-`Hello World.'.
+'Hello World.'.
define(`foo', `Hello world.')
=>
@@ -1489,13 +1504,13 @@ The normal way to define or redefine macros is to use the builtin
The empty line in the output is there because the newline is not a
part of the macro definition, and it is consequently copied to the
-output. This can be avoided by use of the macro `dnl'. *Note Dnl::,
+output. This can be avoided by use of the macro 'dnl'. *Note Dnl::,
for details.
- The first argument to `define' should be quoted; otherwise, if the
+ The first argument to 'define' should be quoted; otherwise, if the
macro is already defined, you will be defining a different macro. This
example shows the problems with underquoting, since we did not want to
-redefine `one':
+redefine 'one':
define(foo, one)
=>
@@ -1504,24 +1519,24 @@ redefine `one':
one
=>two
- GNU `m4' normally replaces only the _topmost_ definition of a macro
-if it has several definitions from `pushdef' (*note Pushdef::). Some
-other implementations of `m4' replace all definitions of a macro with
-`define'. *Note Incompatibilities::, for more details.
+ GNU 'm4' normally replaces only the _topmost_ definition of a macro
+if it has several definitions from 'pushdef' (*note Pushdef::). Some
+other implementations of 'm4' replace all definitions of a macro with
+'define'. *Note Incompatibilities::, for more details.
- As a GNU extension, the first argument to `define' does not have to
+ As a GNU extension, the first argument to 'define' does not have to
be a simple word. It can be any text string, even the empty string. A
macro with a non-standard name cannot be invoked in the normal way, as
the name is not recognized. It can only be referenced by the builtins
-`indir' (*note Indir::) and `defn' (*note Defn::).
+'indir' (*note Indir::) and 'defn' (*note Defn::).
Arrays and associative arrays can be simulated by using non-standard
macro names.
-- Composite: array (INDEX)
- -- Composite: array_set (INDEX, [VALUE])
- Provide access to entries within an array. `array' reads the entry
- at location INDEX, and `array_set' assigns VALUE to location INDEX.
+ -- Composite: array_set (INDEX, [VALUE]
+ Provide access to entries within an array. 'array' reads the entry
+ at location INDEX, and 'array_set' assigns VALUE to location INDEX.
define(`array', `defn(format(``array[%d]'', `$1'))')
=>
@@ -1536,7 +1551,7 @@ macro names.
array(eval(`10 + 7'))
=>array element no. 17
- Change the `%d' to `%s' and it is an associative array.
+ Change the '%d' to '%s' and it is an associative array.

File: m4.info, Node: Arguments, Next: Pseudo Arguments, Prev: Define, Up: Definitions
@@ -1544,7 +1559,7 @@ File: m4.info, Node: Arguments, Next: Pseudo Arguments, Prev: Define, Up: De
5.2 Arguments to macros
=======================
-Macros can have arguments. The Nth argument is denoted by `$n' in the
+Macros can have arguments. The Nth argument is denoted by '$n' in the
expansion text, and is replaced by the Nth actual argument, when the
macro is expanded. Replacement of arguments happens before rescanning,
regardless of how many nesting levels of quoting appear in the
@@ -1559,7 +1574,7 @@ expansion. Here is an example of a macro with two arguments.
exch(`arg1', `arg2')
=>arg2, arg1
- This can be used, for example, if you like the arguments to `define'
+ This can be used, for example, if you like the arguments to 'define'
to be reversed.
define(`exch', `$2, $1')
@@ -1570,10 +1585,10 @@ to be reversed.
=>expansion text
*Note Quoting Arguments::, for an explanation of the double quotes.
-(You should try and improve this example so that clients of `exch' do
+(You should try and improve this example so that clients of 'exch' do
not have to double quote; or *note Answers: Improved exch.).
- As a special case, the zeroth argument, `$0', is always the name of
+ As a special case, the zeroth argument, '$0', is always the name of
the macro being expanded.
define(`test', ``Macro name: $0'')
@@ -1589,23 +1604,23 @@ remember that quotes can be nested in quoted strings. Thus, in
foo
=>This is macro foo.
-The `foo' in the expansion text is _not_ expanded, since it is a quoted
+The 'foo' in the expansion text is _not_ expanded, since it is a quoted
string, and not a name.
- GNU `m4' allows the number following the `$' to consist of one or
+ GNU 'm4' allows the number following the '$' to consist of one or
more digits, allowing macros to have any number of arguments. The
extension of accepting multiple digits is incompatible with POSIX, and
-is different than traditional implementations of `m4', which only
+is different than traditional implementations of 'm4', which only
recognize one digit. Therefore, future versions of GNU M4 will phase
-out this feature. To portably access beyond the ninth argument, you
-can use the `argn' macro documented later (*note Shift::).
+out this feature. To portably access beyond the ninth argument, you can
+use the 'argn' macro documented later (*note Shift::).
- POSIX also states that `$' followed immediately by `{' in a macro
+ POSIX also states that '$' followed immediately by '{' in a macro
definition is implementation-defined. This version of M4 passes the
-literal characters `${' through unchanged, but M4 2.0 will implement an
-optional feature similar to `sh', where `${11}' expands to the eleventh
-argument, to replace the current recognition of `$11'. Meanwhile, if
-you want to guarantee that you will get a literal `${' in output when
+literal characters '${' through unchanged, but M4 2.0 will implement an
+optional feature similar to 'sh', where '${11}' expands to the eleventh
+argument, to replace the current recognition of '$11'. Meanwhile, if
+you want to guarantee that you will get a literal '${' in output when
expanding a macro, even when you upgrade to M4 2.0, you can use nested
quoting to your advantage:
@@ -1620,18 +1635,18 @@ quoting to your advantage:
To help you detect places in your M4 input files that might change in
behavior due to the changed behavior of M4 2.0, you can use the
-`--warn-macro-sequence' command-line option (*note Invoking m4:
+'--warn-macro-sequence' command-line option (*note Invoking m4:
Operation modes.) with the default regular expression. This will add a
-warning any time a macro definition includes `$' followed by multiple
-digits, or by `{'. The warning is not enabled by default, because it
-triggers a number of warnings in Autoconf 2.61 (and Autoconf uses `-E'
+warning any time a macro definition includes '$' followed by multiple
+digits, or by '{'. The warning is not enabled by default, because it
+triggers a number of warnings in Autoconf 2.61 (and Autoconf uses '-E'
to treat warnings as errors), and because it will still be possible to
restore older behavior in M4 2.0.
$ m4 --warn-macro-sequence
define(`foo', `$001 ${1} $1')
- error-->m4:stdin:1: Warning: definition of `foo' contains sequence `$001'
- error-->m4:stdin:1: Warning: definition of `foo' contains sequence `${1}'
+ error->m4:stdin:1: Warning: definition of `foo' contains sequence `$001'
+ error->m4:stdin:1: Warning: definition of `foo' contains sequence `${1}'
=>
foo(`bar')
=>bar ${1} bar
@@ -1645,7 +1660,7 @@ File: m4.info, Node: Pseudo Arguments, Next: Undefine, Prev: Arguments, Up:
There is a special notation for the number of actual arguments supplied,
and for all the actual arguments.
- The number of actual arguments in a macro call is denoted by `$#' in
+ The number of actual arguments in a macro call is denoted by '$#' in
the expansion text.
-- Composite: nargs (...)
@@ -1667,7 +1682,7 @@ the expansion text.
nargs((unquoted parentheses, like this, group arguments))
=>1
- Remember that `#' defaults to the comment character; if you forget
+ Remember that '#' defaults to the comment character; if you forget
quotes to inhibit the comment behavior, your macro definition may not
end where you expected.
@@ -1679,16 +1694,16 @@ end where you expected.
=>0)
=>oops
- The notation `$*' can be used in the expansion text to denote all
-the actual arguments, unquoted, with commas in between. For example
+ The notation '$*' can be used in the expansion text to denote all the
+actual arguments, unquoted, with commas in between. For example
define(`echo', `$*')
=>
echo(arg1, arg2, arg3 , arg4)
=>arg1,arg2,arg3 ,arg4
- Often each argument should be quoted, and the notation `$@' handles
-that. It is just like `$*', except that it quotes each argument. A
+ Often each argument should be quoted, and the notation '$@' handles
+that. It is just like '$*', except that it quotes each argument. A
simple example of that is:
define(`echo', `$@')
@@ -1697,7 +1712,7 @@ simple example of that is:
=>arg1,arg2,arg3 ,arg4
Where did the quotes go? Of course, they were eaten, when the
-expanded text were reread by `m4'. To show the difference, try
+expanded text were reread by 'm4'. To show the difference, try
define(`echo1', `$*')
=>
@@ -1733,8 +1748,8 @@ untouched to the macro, and that quoting disables comments.
=>#foobar
=>bar'
- A `$' sign in the expansion text, that is not followed by anything
-`m4' understands, is simply copied to the macro expansion, as any other
+ A '$' sign in the expansion text, that is not followed by anything
+'m4' understands, is simply copied to the macro expansion, as any other
text is.
define(`foo', `$$$ hello $$$')
@@ -1742,10 +1757,10 @@ text is.
foo
=>$$$ hello $$$
- If you want a macro to expand to something like `$12', the judicious
-use of nested quoting can put a safe character between the `$' and the
+ If you want a macro to expand to something like '$12', the judicious
+use of nested quoting can put a safe character between the '$' and the
next character, relying on the rescanning to remove the nested quote.
-This will prevent `m4' from interpreting the `$' sign as a reference to
+This will prevent 'm4' from interpreting the '$' sign as a reference to
an argument.
define(`foo', `no nested quote: $1')
@@ -1775,13 +1790,13 @@ File: m4.info, Node: Undefine, Next: Defn, Prev: Pseudo Arguments, Up: Defin
5.4 Deleting a macro
====================
-A macro definition can be removed with `undefine':
+A macro definition can be removed with 'undefine':
-- Builtin: undefine (NAME...)
For each argument, remove the macro NAME. The macro names must
necessarily be quoted, since they will be expanded otherwise.
- The expansion of `undefine' is void. The macro `undefine' is
+ The expansion of 'undefine' is void. The macro 'undefine' is
recognized only with parameters.
foo bar blah
@@ -1800,7 +1815,7 @@ A macro definition can be removed with `undefine':
=>foo bar blah
Undefining a macro inside that macro's expansion is safe; the macro
-still expands to the definition that was in effect at the `('.
+still expands to the definition that was in effect at the '('.
define(`f', ``$0':$1')
=>
@@ -1810,7 +1825,7 @@ still expands to the definition that was in effect at the `('.
=>f(bye)
It is not an error for NAME to have no macro definition. In that
-case, `undefine' does nothing.
+case, 'undefine' does nothing.

File: m4.info, Node: Defn, Next: Pushdef, Prev: Undefine, Up: Definitions
@@ -1819,25 +1834,25 @@ File: m4.info, Node: Defn, Next: Pushdef, Prev: Undefine, Up: Definitions
===================
It is possible to rename an already defined macro. To do this, you need
-the builtin `defn':
+the builtin 'defn':
-- Builtin: defn (NAME...)
- Expands to the _quoted definition_ of each NAME. If an argument
- is not a defined macro, the expansion for that argument is empty.
+ Expands to the _quoted definition_ of each NAME. If an argument is
+ not a defined macro, the expansion for that argument is empty.
If NAME is a user-defined macro, the quoted definition is simply
- the quoted expansion text. If, instead, there is only one NAME
- and it is a builtin, the expansion is a special token, which
- points to the builtin's internal definition. This token is only
- meaningful as the second argument to `define' (and `pushdef'), and
- is silently converted to an empty string in most other contexts.
- Combining a builtin with anything else is not supported; a warning
- is issued and the builtin is omitted from the final expansion.
+ the quoted expansion text. If, instead, there is only one NAME and
+ it is a builtin, the expansion is a special token, which points to
+ the builtin's internal definition. This token is only meaningful
+ as the second argument to 'define' (and 'pushdef'), and is silently
+ converted to an empty string in most other contexts. Combining a
+ builtin with anything else is not supported; a warning is issued
+ and the builtin is omitted from the final expansion.
- The macro `defn' is recognized only with parameters.
+ The macro 'defn' is recognized only with parameters.
- Its normal use is best understood through an example, which shows
-how to rename `undefine' to `zap':
+ Its normal use is best understood through an example, which shows how
+to rename 'undefine' to 'zap':
define(`zap', defn(`undefine'))
=>
@@ -1846,12 +1861,12 @@ how to rename `undefine' to `zap':
undefine(`zap')
=>undefine(zap)
- In this way, `defn' can be used to copy macro definitions, and also
+ In this way, 'defn' can be used to copy macro definitions, and also
definitions of builtin macros. Even if the original macro is removed,
the other name can still be used to access the definition.
The fact that macro definitions can be transferred also explains why
-you should use `$0', rather than retyping a macro's name in its
+you should use '$0', rather than retyping a macro's name in its
definition:
define(`foo', `This is `$0'')
@@ -1861,8 +1876,8 @@ definition:
bar
=>This is bar
- Macros used as string variables should be referred through `defn',
-to avoid unwanted expansion of the text:
+ Macros used as string variables should be referred through 'defn', to
+avoid unwanted expansion of the text:
define(`string', `The macro dnl is very useful
')
@@ -1873,7 +1888,7 @@ to avoid unwanted expansion of the text:
=>The macro dnl is very useful
=>
- However, it is important to remember that `m4' rescanning is purely
+ However, it is important to remember that 'm4' rescanning is purely
textual. If an unbalanced end-quote string occurs in a macro
definition, the rescan will see that embedded quote as the termination
of the quoted string, and the remainder of the macro's definition will
@@ -1893,14 +1908,14 @@ end-quotes in macro definitions or arguments to macros.
echo(foo)
=>AA'
- On the other hand, it is possible to exploit the fact that `defn'
-can concatenate multiple macros prior to the rescanning phase, in order
-to join the definitions of macros that, in isolation, have unbalanced
+ On the other hand, it is possible to exploit the fact that 'defn' can
+concatenate multiple macros prior to the rescanning phase, in order to
+join the definitions of macros that, in isolation, have unbalanced
quotes. This is particularly useful when one has used several macros to
accumulate text that M4 should rescan as a whole. In the example below,
-note how the use of `defn' on `l' in isolation opens a string, which is
-not closed until the next line; but used on `l' and `r' together
-results in nested quoting.
+note how the use of 'defn' on 'l' in isolation opens a string, which is
+not closed until the next line; but used on 'l' and 'r' together results
+in nested quoting.
define(`l', `<[>')define(`r', `<]>')
=>
@@ -1913,22 +1928,22 @@ results in nested quoting.
defn([l], [r])
=><[>][<]>
- Using `defn' to generate special tokens for builtin macros outside
-of expected contexts can sometimes trigger warnings. But most of the
-time, such tokens are silently converted to the empty string.
+ Using 'defn' to generate special tokens for builtin macros outside of
+expected contexts can sometimes trigger warnings. But most of the time,
+such tokens are silently converted to the empty string.
$ m4 -d
defn(`defn')
=>
define(defn(`divnum'), `cannot redefine a builtin token')
- error-->m4:stdin:2: Warning: define: invalid macro name ignored
+ error->m4:stdin:2: Warning: define: invalid macro name ignored
=>
divnum
=>0
len(defn(`divnum'))
=>0
- Also note that `defn' with multiple arguments can only join text
+ Also note that 'defn' with multiple arguments can only join text
macros, not builtins, although a future version of GNU M4 may lift this
restriction.
@@ -1938,14 +1953,14 @@ restriction.
traceon(`defn', `define')
=>
defn(`a', `divnum', `a')
- error-->m4:stdin:3: Warning: cannot concatenate builtin `divnum'
- error-->m4trace: -1- defn(`a', `divnum', `a') -> ``A'`A''
+ error->m4:stdin:3: Warning: cannot concatenate builtin `divnum'
+ error->m4trace: -1- defn(`a', `divnum', `a') -> ``A'`A''
=>AA
define(`mydivnum', defn(`divnum', `divnum'))mydivnum
- error-->m4:stdin:4: Warning: cannot concatenate builtin `divnum'
- error-->m4:stdin:4: Warning: cannot concatenate builtin `divnum'
- error-->m4trace: -2- defn(`divnum', `divnum')
- error-->m4trace: -1- define(`mydivnum', `')
+ error->m4:stdin:4: Warning: cannot concatenate builtin `divnum'
+ error->m4:stdin:4: Warning: cannot concatenate builtin `divnum'
+ error->m4trace: -2- defn(`divnum', `divnum')
+ error->m4trace: -1- define(`mydivnum', `')
=>
traceoff(`defn', `define')
=>
@@ -1958,25 +1973,25 @@ File: m4.info, Node: Pushdef, Next: Indir, Prev: Defn, Up: Definitions
It is possible to redefine a macro temporarily, reverting to the
previous definition at a later time. This is done with the builtins
-`pushdef' and `popdef':
+'pushdef' and 'popdef':
- -- Builtin: pushdef (NAME, [EXPANSION])
+ -- Builtin: pushdef (NAME, [EXPANSION]
-- Builtin: popdef (NAME...)
- Analogous to `define' and `undefine'.
+ Analogous to 'define' and 'undefine'.
These macros work in a stack-like fashion. A macro is temporarily
- redefined with `pushdef', which replaces an existing definition of
+ redefined with 'pushdef', which replaces an existing definition of
NAME, while saving the previous definition, before the new one is
- installed. If there is no previous definition, `pushdef' behaves
- exactly like `define'.
+ installed. If there is no previous definition, 'pushdef' behaves
+ exactly like 'define'.
If a macro has several definitions (of which only one is
- accessible), the topmost definition can be removed with `popdef'.
- If there is no previous definition, `popdef' behaves like
- `undefine'.
+ accessible), the topmost definition can be removed with 'popdef'.
+ If there is no previous definition, 'popdef' behaves like
+ 'undefine'.
- The expansion of both `pushdef' and `popdef' is void. The macros
- `pushdef' and `popdef' are recognized only with parameters.
+ The expansion of both 'pushdef' and 'popdef' is void. The macros
+ 'pushdef' and 'popdef' are recognized only with parameters.
define(`foo', `Expansion one.')
=>
@@ -2003,14 +2018,14 @@ previous definition at a later time. This is done with the builtins
foo
=>foo
- If a macro with several definitions is redefined with `define', the
+ If a macro with several definitions is redefined with 'define', the
topmost definition is _replaced_ with the new definition. If it is
-removed with `undefine', _all_ the definitions are removed, and not
-only the topmost one. However, POSIX allows other implementations that
-treat `define' as replacing an entire stack of definitions with a
-single new definition, so to be portable to other implementations, it
-may be worth explicitly using `popdef' and `pushdef' rather than
-relying on the GNU behavior of `define'.
+removed with 'undefine', _all_ the definitions are removed, and not only
+the topmost one. However, POSIX allows other implementations that treat
+'define' as replacing an entire stack of definitions with a single new
+definition, so to be portable to other implementations, it may be worth
+explicitly using 'popdef' and 'pushdef' rather than relying on the GNU
+behavior of 'define'.
define(`foo', `Expansion one.')
=>
@@ -2029,13 +2044,13 @@ relying on the GNU behavior of `define'.
foo
=>foo
- Local variables within macros are made with `pushdef' and `popdef'.
+ Local variables within macros are made with 'pushdef' and 'popdef'.
At the start of the macro a new definition is pushed, within the macro
it is manipulated and at the end it is popped, revealing the former
definition.
- It is possible to temporarily redefine a builtin with `pushdef' and
-`defn'.
+ It is possible to temporarily redefine a builtin with 'pushdef' and
+'defn'.

File: m4.info, Node: Indir, Next: Builtin, Prev: Pushdef, Up: Definitions
@@ -2043,17 +2058,17 @@ File: m4.info, Node: Indir, Next: Builtin, Prev: Pushdef, Up: Definitions
5.7 Indirect call of macros
===========================
-Any macro can be called indirectly with `indir':
+Any macro can be called indirectly with 'indir':
- -- Builtin: indir (NAME, [ARGS...])
+ -- Builtin: indir (NAME, [ARGS...]
Results in a call to the macro NAME, which is passed the rest of
the arguments ARGS. If NAME is not defined, an error message is
printed, and the expansion is void.
- The macro `indir' is recognized only with parameters.
+ The macro 'indir' is recognized only with parameters.
This can be used to call macros with computed or "invalid" names
-(`define' allows such names to be defined):
+('define' allows such names to be defined):
define(`$$internal$macro', `Internal macro (name `$0')')
=>
@@ -2064,10 +2079,10 @@ Any macro can be called indirectly with `indir':
The point is, here, that larger macro packages can have private
macros defined, that will not be called by accident. They can _only_ be
-called through the builtin `indir'.
+called through the builtin 'indir'.
One other point to observe is that argument collection occurs before
-`indir' invokes NAME, so if argument collection changes the value of
+'indir' invokes NAME, so if argument collection changes the value of
NAME, that will be reflected in the final expansion. This is different
than the behavior when invoking macros directly, where the definition
that was in effect before argument collection is used.
@@ -2080,26 +2095,26 @@ that was in effect before argument collection is used.
indir(`f', define(`f', `3'))
=>3
indir(`f', undefine(`f'))
- error-->m4:stdin:4: undefined macro `f'
+ error->m4:stdin:4: undefined macro `f'
=>
- When handed the result of `defn' (*note Defn::) as one of its
-arguments, `indir' defers to the invoked NAME for whether a token
+ When handed the result of 'defn' (*note Defn::) as one of its
+arguments, 'indir' defers to the invoked NAME for whether a token
representing a builtin is recognized or flattened to the empty string.
$ m4 -d
indir(defn(`defn'), `divnum')
- error-->m4:stdin:1: Warning: indir: invalid macro name ignored
+ error->m4:stdin:1: Warning: indir: invalid macro name ignored
=>
indir(`define', defn(`defn'), `divnum')
- error-->m4:stdin:2: Warning: define: invalid macro name ignored
+ error->m4:stdin:2: Warning: define: invalid macro name ignored
=>
indir(`define', `foo', defn(`divnum'))
=>
foo
=>0
indir(`divert', defn(`foo'))
- error-->m4:stdin:5: empty string treated as 0 in builtin `divert'
+ error->m4:stdin:5: empty string treated as 0 in builtin `divert'
=>

@@ -2108,18 +2123,18 @@ File: m4.info, Node: Builtin, Prev: Indir, Up: Definitions
5.8 Indirect call of builtins
=============================
-Builtin macros can be called indirectly with `builtin':
+Builtin macros can be called indirectly with 'builtin':
- -- Builtin: builtin (NAME, [ARGS...])
+ -- Builtin: builtin (NAME, [ARGS...]
Results in a call to the builtin NAME, which is passed the rest of
the arguments ARGS. If NAME does not name a builtin, an error
message is printed, and the expansion is void.
- The macro `builtin' is recognized only with parameters.
+ The macro 'builtin' is recognized only with parameters.
This can be used even if NAME has been given another definition that
-has covered the original, or been undefined so that no macro maps to
-the builtin.
+has covered the original, or been undefined so that no macro maps to the
+builtin.
pushdef(`define', `hidden')
=>
@@ -2146,24 +2161,24 @@ the builtin.
foo
=>foo
- The NAME argument only matches the original name of the builtin,
-even when the `--prefix-builtins' option (or `-P', *note Invoking m4:
-Operation modes.) is in effect. This is different from `indir', which
+ The NAME argument only matches the original name of the builtin, even
+when the '--prefix-builtins' option (or '-P', *note Invoking m4:
+Operation modes.) is in effect. This is different from 'indir', which
only tracks current macro names.
$ m4 -P
m4_builtin(`divnum')
=>0
m4_builtin(`m4_divnum')
- error-->m4:stdin:2: undefined builtin `m4_divnum'
+ error->m4:stdin:2: undefined builtin `m4_divnum'
=>
m4_indir(`divnum')
- error-->m4:stdin:3: undefined macro `divnum'
+ error->m4:stdin:3: undefined macro `divnum'
=>
m4_indir(`m4_divnum')
=>0
- Note that `indir' and `builtin' can be used to invoke builtins
+ Note that 'indir' and 'builtin' can be used to invoke builtins
without arguments, even when they normally require parameters to be
recognized; but it will provoke a warning, and result in a void
expansion.
@@ -2171,21 +2186,21 @@ expansion.
builtin
=>builtin
builtin()
- error-->m4:stdin:2: undefined builtin `'
+ error->m4:stdin:2: undefined builtin `'
=>
builtin(`builtin')
- error-->m4:stdin:3: Warning: too few arguments to builtin `builtin'
+ error->m4:stdin:3: Warning: too few arguments to builtin `builtin'
=>
builtin(`builtin',)
- error-->m4:stdin:4: undefined builtin `'
+ error->m4:stdin:4: undefined builtin `'
=>
builtin(`builtin', ``'
')
- error-->m4:stdin:5: undefined builtin ``'
- error-->'
+ error->m4:stdin:5: undefined builtin ``'
+ error->'
=>
indir(`index')
- error-->m4:stdin:7: Warning: too few arguments to builtin `index'
+ error->m4:stdin:7: Warning: too few arguments to builtin `index'
=>

@@ -2205,7 +2220,7 @@ true.
* Ifdef:: Testing if a macro is defined
* Ifelse:: If-else construct, or multibranch
-* Shift:: Recursion in `m4'
+* Shift:: Recursion in 'm4'
* Forloop:: Iteration by counting
* Foreach:: Iteration by list contents
* Stacks:: Working with definition stacks
@@ -2217,15 +2232,15 @@ File: m4.info, Node: Ifdef, Next: Ifelse, Up: Conditionals
6.1 Testing if a macro is defined
=================================
-There are two different builtin conditionals in `m4'. The first is
-`ifdef':
+There are two different builtin conditionals in 'm4'. The first is
+'ifdef':
- -- Builtin: ifdef (NAME, STRING-1, [STRING-2])
- If NAME is defined as a macro, `ifdef' expands to STRING-1,
+ -- Builtin: ifdef (NAME, STRING-1, [STRING-2]
+ If NAME is defined as a macro, 'ifdef' expands to STRING-1,
otherwise to STRING-2. If STRING-2 is omitted, it is taken to be
the empty string (according to the normal rules).
- The macro `ifdef' is recognized only with parameters.
+ The macro 'ifdef' is recognized only with parameters.
ifdef(`foo', ``foo' is defined', ``foo' is not defined')
=>foo is not defined
@@ -2234,7 +2249,7 @@ There are two different builtin conditionals in `m4'. The first is
ifdef(`foo', ``foo' is defined', ``foo' is not defined')
=>foo is defined
ifdef(`no_such_macro', `yes', `no', `extra argument')
- error-->m4:stdin:4: Warning: excess arguments to builtin `ifdef' ignored
+ error->m4:stdin:4: Warning: excess arguments to builtin `ifdef' ignored
=>no

@@ -2243,37 +2258,37 @@ File: m4.info, Node: Ifelse, Next: Shift, Prev: Ifdef, Up: Conditionals
6.2 If-else construct, or multibranch
=====================================
-The other conditional, `ifelse', is much more powerful. It can be used
+The other conditional, 'ifelse', is much more powerful. It can be used
as a way to introduce a long comment, as an if-else construct, or as a
multibranch, depending on the number of arguments supplied:
-- Builtin: ifelse (COMMENT)
- -- Builtin: ifelse (STRING-1, STRING-2, EQUAL, [NOT-EQUAL])
+ -- Builtin: ifelse (STRING-1, STRING-2, EQUAL, [NOT-EQUAL]
-- Builtin: ifelse (STRING-1, STRING-2, EQUAL-1, STRING-3, STRING-4,
- EQUAL-2, ..., [NOT-EQUAL])
- Used with only one argument, the `ifelse' simply discards it and
+ EQUAL-2, ..., [NOT-EQUAL]
+ Used with only one argument, the 'ifelse' simply discards it and
produces no output.
- If called with three or four arguments, `ifelse' expands into
+ If called with three or four arguments, 'ifelse' expands into
EQUAL, if STRING-1 and STRING-2 are equal (character for
character), otherwise it expands to NOT-EQUAL. A final fifth
argument is ignored, after triggering a warning.
- If called with six or more arguments, and STRING-1 and STRING-2
- are equal, `ifelse' expands into EQUAL-1, otherwise the first
- three arguments are discarded and the processing starts again.
+ If called with six or more arguments, and STRING-1 and STRING-2 are
+ equal, 'ifelse' expands into EQUAL-1, otherwise the first three
+ arguments are discarded and the processing starts again.
- The macro `ifelse' is recognized only with parameters.
+ The macro 'ifelse' is recognized only with parameters.
- Using only one argument is a common `m4' idiom for introducing a
-block comment, as an alternative to repeatedly using `dnl'. This
-special usage is recognized by GNU `m4', so that in this case, the
+ Using only one argument is a common 'm4' idiom for introducing a
+block comment, as an alternative to repeatedly using 'dnl'. This
+special usage is recognized by GNU 'm4', so that in this case, the
warning about missing arguments is never triggered.
ifelse(`some comments')
=>
ifelse(`foo', `bar')
- error-->m4:stdin:2: Warning: too few arguments to builtin `ifelse'
+ error->m4:stdin:2: Warning: too few arguments to builtin `ifelse'
=>
Using three or four arguments provides decision points.
@@ -2306,49 +2321,49 @@ recognized only with arguments.
For an example of a way to make defining blind macros easier, see
*note Composition::.
- The macro `ifelse' can take more than four arguments. If given more
-than four arguments, `ifelse' works like a `case' or `switch' statement
+ The macro 'ifelse' can take more than four arguments. If given more
+than four arguments, 'ifelse' works like a 'case' or 'switch' statement
in traditional programming languages. If STRING-1 and STRING-2 are
-equal, `ifelse' expands into EQUAL-1, otherwise the procedure is
+equal, 'ifelse' expands into EQUAL-1, otherwise the procedure is
repeated with the first three arguments discarded. This calls for an
example:
ifelse(`foo', `bar', `third', `gnu', `gnats')
- error-->m4:stdin:1: Warning: excess arguments to builtin `ifelse' ignored
+ error->m4:stdin:1: Warning: excess arguments to builtin `ifelse' ignored
=>gnu
ifelse(`foo', `bar', `third', `gnu', `gnats', `sixth')
=>
ifelse(`foo', `bar', `third', `gnu', `gnats', `sixth', `seventh')
=>seventh
ifelse(`foo', `bar', `3', `gnu', `gnats', `6', `7', `8')
- error-->m4:stdin:4: Warning: excess arguments to builtin `ifelse' ignored
+ error->m4:stdin:4: Warning: excess arguments to builtin `ifelse' ignored
=>7
Naturally, the normal case will be slightly more advanced than these
-examples. A common use of `ifelse' is in macros implementing loops of
+examples. A common use of 'ifelse' is in macros implementing loops of
various kinds.

File: m4.info, Node: Shift, Next: Forloop, Prev: Ifelse, Up: Conditionals
-6.3 Recursion in `m4'
+6.3 Recursion in 'm4'
=====================
-There is no direct support for loops in `m4', but macros can be
+There is no direct support for loops in 'm4', but macros can be
recursive. There is no limit on the number of recursion levels, other
than those enforced by your hardware and operating system.
Loops can be programmed using recursion and the conditionals
described previously.
- There is a builtin macro, `shift', which can, among other things, be
+ There is a builtin macro, 'shift', which can, among other things, be
used for iterating through the actual arguments to a macro:
-- Builtin: shift (ARG1, ...)
Takes any number of arguments, and expands to all its arguments
except ARG1, separated by commas, with each argument quoted.
- The macro `shift' is recognized only with parameters.
+ The macro 'shift' is recognized only with parameters.
shift
=>shift
@@ -2357,7 +2372,7 @@ used for iterating through the actual arguments to a macro:
shift(`foo', `bar', `baz')
=>bar,baz
- An example of the use of `shift' is this macro:
+ An example of the use of 'shift' is this macro:
-- Composite: reverse (...)
Takes any number of arguments, and reverses their order.
@@ -2374,25 +2389,23 @@ used for iterating through the actual arguments to a macro:
reverse(`foo', `bar', `gnats', `and gnus')
=>and gnus, gnats, bar, foo
- While not a very interesting macro, it does show how simple loops
-can be made with `shift', `ifelse' and recursion. It also shows that
-`shift' is usually used with `$@'. Another example of this is an
+ While not a very interesting macro, it does show how simple loops can
+be made with 'shift', 'ifelse' and recursion. It also shows that
+'shift' is usually used with '$@'. Another example of this is an
implementation of a short-circuiting conditional operator.
- -- Composite: cond (TEST-1, STRING-1, EQUAL-1, [TEST-2], [STRING-2],
- [EQUAL-2], ..., [NOT-EQUAL])
- Similar to `ifelse', where an equal comparison between the first
+ -- Composite: cond (TEST-1, STRING-1, EQUAL-1, [TEST-2]
+ Similar to 'ifelse', where an equal comparison between the first
two strings results in the third, otherwise the first three
- arguments are discarded and the process repeats. The difference
- is that each TEST-<N> is expanded only when it is encountered.
- This means that every third argument to `cond' is normally given
- one more level of quoting than the corresponding argument to
- `ifelse'.
+ arguments are discarded and the process repeats. The difference is
+ that each TEST-<N> is expanded only when it is encountered. This
+ means that every third argument to 'cond' is normally given one
+ more level of quoting than the corresponding argument to 'ifelse'.
- Here is the implementation of `cond', along with a demonstration of
-how it can short-circuit the side effects in `side'. Notice how all
-the unquoted side effects happen regardless of how many comparisons are
-made with `ifelse', compared with only the relevant effects with `cond'.
+ Here is the implementation of 'cond', along with a demonstration of
+how it can short-circuit the side effects in 'side'. Notice how all the
+unquoted side effects happen regardless of how many comparisons are made
+with 'ifelse', compared with only the relevant effects with 'cond'.
define(`cond',
`ifelse(`$#', `1', `$1',
@@ -2431,14 +2444,14 @@ made with `ifelse', compared with only the relevant effects with `cond'.
Another common task that requires iteration is joining a list of
arguments into a single string.
- -- Composite: join ([SEPARATOR], [ARGS...])
- -- Composite: joinall ([SEPARATOR], [ARGS...])
+ -- Composite: join ([SEPARATOR]
+ -- Composite: joinall ([SEPARATOR]
Generate a single-quoted string, consisting of each ARG separated
- by SEPARATOR. While `joinall' always outputs a SEPARATOR between
- arguments, `join' avoids the SEPARATOR for an empty ARG.
+ by SEPARATOR. While 'joinall' always outputs a SEPARATOR between
+ arguments, 'join' avoids the SEPARATOR for an empty ARG.
Here are some examples of its usage, based on the implementation
-`m4-1.4.16/examples/join.m4' distributed in this package:
+'m4-1.4.17/examples/join.m4' distributed in this package:
$ m4 -I examples
include(`join.m4')
@@ -2484,39 +2497,39 @@ several m4 programming idioms.
=>`ifelse(`$#', `2', `', ``$1$3'$0(`$1', shift(shift($@)))')')
=>divert`'dnl
- First, notice that this implementation creates helper macros `_join'
-and `_joinall'. This division of labor makes it easier to output the
-correct number of SEPARATOR instances: `join' and `joinall' are
-responsible for the first argument, without a separator, while `_join'
-and `_joinall' are responsible for all remaining arguments, always
+ First, notice that this implementation creates helper macros '_join'
+and '_joinall'. This division of labor makes it easier to output the
+correct number of SEPARATOR instances: 'join' and 'joinall' are
+responsible for the first argument, without a separator, while '_join'
+and '_joinall' are responsible for all remaining arguments, always
outputting a separator when outputting an argument.
- Next, observe how `join' decides to iterate to itself, because the
-first ARG was empty, or to output the argument and swap over to
-`_join'. If the argument is non-empty, then the nested `ifelse'
-results in an unquoted `_', which is concatenated with the `$0' to form
-the next macro name to invoke. The `joinall' implementation is simpler
-since it does not have to suppress empty ARG; it always executes once
-then defers to `_joinall'.
+ Next, observe how 'join' decides to iterate to itself, because the
+first ARG was empty, or to output the argument and swap over to '_join'.
+If the argument is non-empty, then the nested 'ifelse' results in an
+unquoted '_', which is concatenated with the '$0' to form the next macro
+name to invoke. The 'joinall' implementation is simpler since it does
+not have to suppress empty ARG; it always executes once then defers to
+'_joinall'.
- Another important idiom is the idea that SEPARATOR is reused for
-each iteration. Each iteration has one less argument, but rather than
-discarding `$1' by iterating with `$0(shift($@))', the macro discards
-`$2' by using `$0(`$1', shift(shift($@)))'.
+ Another important idiom is the idea that SEPARATOR is reused for each
+iteration. Each iteration has one less argument, but rather than
+discarding '$1' by iterating with '$0(shift($@))', the macro discards
+'$2' by using '$0(`$1', shift(shift($@)))'.
Next, notice that it is possible to compare more than one condition
-in a single `ifelse' test. The test of `$#$2' against `2' allows
-`_join' to iterate for two separate reasons--either there are still
-more than two arguments, or there are exactly two arguments but the
-last argument is not empty.
+in a single 'ifelse' test. The test of '$#$2' against '2' allows
+'_join' to iterate for two separate reasons--either there are still more
+than two arguments, or there are exactly two arguments but the last
+argument is not empty.
Finally, notice that these macros require exactly two arguments to
terminate recursion, but that they still correctly result in empty
output when given no ARGS (i.e., zero or one macro argument). On the
-first pass when there are too few arguments, the `shift' results in no
+first pass when there are too few arguments, the 'shift' results in no
output, but leaves an empty string to serve as the required second
-argument for the second pass. Put another way, ``$1', shift($@)' is
-not the same as `$@', since only the former guarantees at least two
+argument for the second pass. Put another way, '`$1', shift($@)' is not
+the same as '$@', since only the former guarantees at least two
arguments.
Sometimes, a recursive algorithm requires adding quotes to each
@@ -2525,15 +2538,15 @@ element, or treating multiple arguments as a single element:
-- Composite: quote (...)
-- Composite: dquote (...)
-- Composite: dquote_elt (...)
- Takes any number of arguments, and adds quoting. With `quote',
+ Takes any number of arguments, and adds quoting. With 'quote',
only one level of quoting is added, effectively removing whitespace
after commas and turning multiple arguments into a single string.
- With `dquote', two levels of quoting are added, one around each
- element, and one around the list. And with `dquote_elt', two
+ With 'dquote', two levels of quoting are added, one around each
+ element, and one around the list. And with 'dquote_elt', two
levels of quoting are added around each element.
An actual implementation of these three macros is distributed as
-`m4-1.4.16/examples/quote.m4' in this package. First, let's examine
+'m4-1.4.17/examples/quote.m4' in this package. First, let's examine
their usage:
$ m4 -I examples
@@ -2555,15 +2568,15 @@ their usage:
dquote_elt(dquote(`1', `2'))
=>``1',`2''
- The last two lines show that when given two arguments, `dquote'
-results in one string, while `dquote_elt' results in two. Now, examine
-the implementation. Note that `quote' and `dquote_elt' make decisions
+ The last two lines show that when given two arguments, 'dquote'
+results in one string, while 'dquote_elt' results in two. Now, examine
+the implementation. Note that 'quote' and 'dquote_elt' make decisions
based on their number of arguments, so that when called without
-arguments, they result in nothing instead of a quoted empty string;
-this is so that it is possible to distinguish between no arguments and
-an empty first argument. `dquote', on the other hand, results in a
-string no matter what, since it is still possible to tell whether it
-was invoked without arguments based on the resulting string.
+arguments, they result in nothing instead of a quoted empty string; this
+is so that it is possible to distinguish between no arguments and an
+empty first argument. 'dquote', on the other hand, results in a string
+no matter what, since it is still possible to tell whether it was
+invoked without arguments based on the resulting string.
$ m4 -I examples
undivert(`quote.m4')dnl
@@ -2577,17 +2590,17 @@ was invoked without arguments based on the resulting string.
=> ```$1'',$0(shift($@))')')
=>divert`'dnl
- It is worth pointing out that `quote(ARGS)' is more efficient than
-`joinall(`,', ARGS)' for producing the same output.
+ It is worth pointing out that 'quote(ARGS)' is more efficient than
+'joinall(`,', ARGS)' for producing the same output.
- One more useful macro based on `shift' allows portably selecting an
+ One more useful macro based on 'shift' allows portably selecting an
arbitrary argument (usually greater than the ninth argument), without
relying on the GNU extension of multi-digit arguments (*note
Arguments::).
-- Composite: argn (N, ...)
Expands to argument N out of the remaining arguments. N must be a
- positive number. Usually invoked as `argn(`N',$@)'.
+ positive number. Usually invoked as 'argn(`N',$@)'.
It is implemented as:
@@ -2613,7 +2626,7 @@ Here is an example of a loop macro that implements a simple for loop.
Takes the name in ITERATOR, which must be a valid macro name, and
successively assign it each integer value from START to END,
inclusive. For each assignment to ITERATOR, append TEXT to the
- expansion of the `forloop'. TEXT may refer to ITERATOR. Any
+ expansion of the 'forloop'. TEXT may refer to ITERATOR. Any
definition of ITERATOR prior to this invocation is restored.
It can, for example, be used for simple counting:
@@ -2637,19 +2650,18 @@ Here is an example of a loop macro that implements a simple for loop.
=> (4, 1) (4, 2) (4, 3) (4, 4) (4, 5) (4, 6) (4, 7) (4, 8)
=>
- The implementation of the `forloop' macro is fairly straightforward.
-The `forloop' macro itself is simply a wrapper, which saves the
-previous definition of the first argument, calls the internal macro
-`_forloop', and re-establishes the saved definition of the first
-argument.
+ The implementation of the 'forloop' macro is fairly straightforward.
+The 'forloop' macro itself is simply a wrapper, which saves the previous
+definition of the first argument, calls the internal macro '_forloop',
+and re-establishes the saved definition of the first argument.
- The macro `_forloop' expands the fourth argument once, and tests to
+ The macro '_forloop' expands the fourth argument once, and tests to
see if the iterator has reached the final value. If it has not
-finished, it increments the iterator (using the predefined macro
-`incr', *note Incr::), and recurses.
+finished, it increments the iterator (using the predefined macro 'incr',
+*note Incr::), and recurses.
- Here is an actual implementation of `forloop', distributed as
-`m4-1.4.16/examples/forloop.m4' in this package:
+ Here is an actual implementation of 'forloop', distributed as
+'m4-1.4.17/examples/forloop.m4' in this package:
$ m4 -I examples
undivert(`forloop.m4')dnl
@@ -2665,9 +2677,8 @@ unquoted, each for its own reason. Try to find out _why_ these
arguments are left unquoted, and see what happens if they are quoted.
(As presented, these two macros are useful but not very robust for
general use. They lack even basic error handling for cases like START
-less than END, END not numeric, or ITERATOR not being a macro name.
-See if you can improve these macros; or *note Answers: Improved
-forloop.).
+less than END, END not numeric, or ITERATOR not being a macro name. See
+if you can improve these macros; or *note Answers: Improved forloop.).

File: m4.info, Node: Foreach, Next: Stacks, Prev: Forloop, Up: Conditionals
@@ -2681,17 +2692,17 @@ Here is an example of a loop macro that implements list iteration.
-- Composite: foreachq (ITERATOR, QUOTE-LIST, TEXT)
Takes the name in ITERATOR, which must be a valid macro name, and
successively assign it each value from PAREN-LIST or QUOTE-LIST.
- In `foreach', PAREN-LIST is a comma-separated list of elements
- contained in parentheses. In `foreachq', QUOTE-LIST is a
- comma-separated list of elements contained in a quoted string.
- For each assignment to ITERATOR, append TEXT to the overall
- expansion. TEXT may refer to ITERATOR. Any definition of
- ITERATOR prior to this invocation is restored.
+ In 'foreach', PAREN-LIST is a comma-separated list of elements
+ contained in parentheses. In 'foreachq', QUOTE-LIST is a
+ comma-separated list of elements contained in a quoted string. For
+ each assignment to ITERATOR, append TEXT to the overall expansion.
+ TEXT may refer to ITERATOR. Any definition of ITERATOR prior to
+ this invocation is restored.
As an example, this displays each word in a list inside of a
-sentence, using an implementation of `foreach' distributed as
-`m4-1.4.16/examples/foreach.m4', and `foreachq' in
-`m4-1.4.16/examples/foreachq.m4'.
+sentence, using an implementation of 'foreach' distributed as
+'m4-1.4.17/examples/foreach.m4', and 'foreachq' in
+'m4-1.4.17/examples/foreachq.m4'.
$ m4 -I examples
include(`foreach.m4')
@@ -2733,11 +2744,11 @@ helper macro. This example generates a shell case statement:
esac
=>esac
- The implementation of the `foreach' macro is a bit more involved; it
-is a wrapper around two helper macros. First, `_arg1' is needed to
-grab the first element of a list. Second, `_foreach' implements the
+ The implementation of the 'foreach' macro is a bit more involved; it
+is a wrapper around two helper macros. First, '_arg1' is needed to grab
+the first element of a list. Second, '_foreach' implements the
recursion, successively walking through the original list. Here is a
-simple implementation of `foreach':
+simple implementation of 'foreach':
$ m4 -I examples
undivert(`foreach.m4')dnl
@@ -2751,9 +2762,9 @@ simple implementation of `foreach':
=>divert`'dnl
Unfortunately, that implementation is not robust to macro names as
-list elements. Each iteration of `_foreach' is stripping another layer
+list elements. Each iteration of '_foreach' is stripping another layer
of quotes, leading to erratic results if list elements are not already
-fully expanded. The first cut at implementing `foreachq' takes this
+fully expanded. The first cut at implementing 'foreachq' takes this
into account. Also, when using quoted elements in a PAREN-LIST, the
overall list must be quoted. A QUOTE-LIST has the nice property of
requiring fewer characters to create a list containing the same quoted
@@ -2782,7 +2793,7 @@ the final layer removed during the final rescan:
=>(b
=>c)
- Obviously, `foreachq' did a better job; here is its implementation:
+ Obviously, 'foreachq' did a better job; here is its implementation:
$ m4 -I examples
undivert(`foreachq.m4')dnl
@@ -2796,15 +2807,15 @@ the final layer removed during the final rescan:
=> `define(`$1', `_arg1($2)')$3`'$0(`$1', `shift($2)', `$3')')')
=>divert`'dnl
- Notice that `_foreachq' had to use the helper macro `quote' defined
-earlier (*note Shift::), to ensure that the embedded `ifelse' call does
+ Notice that '_foreachq' had to use the helper macro 'quote' defined
+earlier (*note Shift::), to ensure that the embedded 'ifelse' call does
not go haywire if a list element contains a comma. Unfortunately, this
-implementation of `foreachq' has its own severe flaw. Whereas the
-`foreach' implementation was linear, this macro is quadratic in the
+implementation of 'foreachq' has its own severe flaw. Whereas the
+'foreach' implementation was linear, this macro is quadratic in the
number of list elements, and is much more likely to trip up the limit
-set by the command line option `--nesting-limit' (or `-L', *note
+set by the command line option '--nesting-limit' (or '-L', *note
Invoking m4: Limits control.). Additionally, this implementation does
-not expand `defn(`ITERATOR')' very well, when compared with `foreach'.
+not expand 'defn(`ITERATOR')' very well, when compared with 'foreach'.
$ m4 -I examples
include(`foreach.m4')include(`foreachq.m4')
@@ -2825,23 +2836,23 @@ File: m4.info, Node: Stacks, Next: Composition, Prev: Foreach, Up: Condition
6.6 Working with definition stacks
==================================
-Thanks to `pushdef', manipulation of a stack is an intrinsic operation
-in `m4'. Normally, only the topmost definition in a stack is
-important, but sometimes, it is desirable to manipulate the entire
-definition stack.
+Thanks to 'pushdef', manipulation of a stack is an intrinsic operation
+in 'm4'. Normally, only the topmost definition in a stack is important,
+but sometimes, it is desirable to manipulate the entire definition
+stack.
-- Composite: stack_foreach (MACRO, ACTION)
-- Composite: stack_foreach_lifo (MACRO, ACTION)
- For each of the `pushdef' definitions associated with MACRO,
- invoke the macro ACTION with a single argument of that definition.
- `stack_foreach' visits the oldest definition first, while
- `stack_foreach_lifo' visits the current definition first. ACTION
+ For each of the 'pushdef' definitions associated with MACRO, invoke
+ the macro ACTION with a single argument of that definition.
+ 'stack_foreach' visits the oldest definition first, while
+ 'stack_foreach_lifo' visits the current definition first. ACTION
should not modify or dereference MACRO. There are a few special
- macros, such as `defn', which cannot be used as the MACRO
+ macros, such as 'defn', which cannot be used as the MACRO
parameter.
A sample implementation of these macros is distributed in the file
-`m4-1.4.16/examples/stack.m4'.
+'m4-1.4.17/examples/stack.m4'.
$ m4 -I examples
include(`stack.m4')
@@ -2861,19 +2872,19 @@ definition stack.
=>1
Now for the implementation. Note the definition of a helper macro,
-`_stack_reverse', which destructively swaps the contents of one stack
-of definitions into the reverse order in the temporary macro `tmp-$1'.
-By calling the helper twice, the original order is restored back into
-the macro `$1'; since the operation is destructive, this explains why
-`$1' must not be modified or dereferenced during the traversal. The
-caller can then inject additional code to pass the definition currently
-being visited to `$2'. The choice of helper names is intentional;
-since `-' is not valid as part of a macro name, there is no risk of
-conflict with a valid macro name, and the code is guaranteed to use
-`defn' where necessary. Finally, note that any macro used in the
-traversal of a `pushdef' stack, such as `pushdef' or `defn', cannot be
-handled by `stack_foreach', since the macro would temporarily be
-undefined during the algorithm.
+'_stack_reverse', which destructively swaps the contents of one stack of
+definitions into the reverse order in the temporary macro 'tmp-$1'. By
+calling the helper twice, the original order is restored back into the
+macro '$1'; since the operation is destructive, this explains why '$1'
+must not be modified or dereferenced during the traversal. The caller
+can then inject additional code to pass the definition currently being
+visited to '$2'. The choice of helper names is intentional; since '-'
+is not valid as part of a macro name, there is no risk of conflict with
+a valid macro name, and the code is guaranteed to use 'defn' where
+necessary. Finally, note that any macro used in the traversal of a
+'pushdef' stack, such as 'pushdef' or 'defn', cannot be handled by
+'stack_foreach', since the macro would temporarily be undefined during
+the algorithm.
$ m4 -I examples
undivert(`stack.m4')dnl
@@ -2901,37 +2912,37 @@ File: m4.info, Node: Composition, Prev: Stacks, Up: Conditionals
===============================
Since m4 is a macro language, it is possible to write macros that can
-build other macros. First on the list is a way to automate the
-creation of blind macros.
+build other macros. First on the list is a way to automate the creation
+of blind macros.
- -- Composite: define_blind (NAME, [VALUE])
+ -- Composite: define_blind (NAME, [VALUE]
Defines NAME as a blind macro, such that NAME will expand to VALUE
- only when given explicit arguments. VALUE should not be the
- result of `defn' (*note Defn::). This macro is only recognized
- with parameters, and results in an empty string.
+ only when given explicit arguments. VALUE should not be the result
+ of 'defn' (*note Defn::). This macro is only recognized with
+ parameters, and results in an empty string.
Defining a macro to define another macro can be a bit tricky. We
-want to use a literal `$#' in the argument to the nested `define'.
-However, if `$' and `#' are adjacent in the definition of
-`define_blind', then it would be expanded as the number of arguments to
-`define_blind' rather than the intended number of arguments to NAME.
-The solution is to pass the difficult characters through extra
-arguments to a helper macro `_define_blind'. When composing macros, it
-is a common idiom to need a helper macro to concatenate text that forms
-parameters in the composed macro, rather than interpreting the text as
-a parameter of the composing macro.
-
- As for the limitation against using `defn', there are two reasons.
-If a macro was previously defined with `define_blind', then it can
-safely be renamed to a new blind macro using plain `define'; using
-`define_blind' to rename it just adds another layer of `ifelse',
+want to use a literal '$#' in the argument to the nested 'define'.
+However, if '$' and '#' are adjacent in the definition of
+'define_blind', then it would be expanded as the number of arguments to
+'define_blind' rather than the intended number of arguments to NAME.
+The solution is to pass the difficult characters through extra arguments
+to a helper macro '_define_blind'. When composing macros, it is a
+common idiom to need a helper macro to concatenate text that forms
+parameters in the composed macro, rather than interpreting the text as a
+parameter of the composing macro.
+
+ As for the limitation against using 'defn', there are two reasons.
+If a macro was previously defined with 'define_blind', then it can
+safely be renamed to a new blind macro using plain 'define'; using
+'define_blind' to rename it just adds another layer of 'ifelse',
occupying memory and slowing down execution. And if a macro is a
-builtin, then it would result in an attempt to define a macro
-consisting of both text and a builtin token; this is not supported, and
-the builtin token is flattened to an empty string.
+builtin, then it would result in an attempt to define a macro consisting
+of both text and a builtin token; this is not supported, and the builtin
+token is flattened to an empty string.
With that explanation, here's the definition, and some sample usage.
-Notice that `define_blind' is itself a blind macro.
+Notice that 'define_blind' is itself a blind macro.
$ m4 -d
define(`define_blind', `ifelse(`$#', `0', ``$0'',
@@ -2967,11 +2978,11 @@ that provides exactly one argument.
with the resulting list of arguments.
A demonstration of currying makes the intent of this macro a little
-more obvious. The macro `stack_foreach' mentioned earlier is an example
+more obvious. The macro 'stack_foreach' mentioned earlier is an example
of a context that provides exactly one argument to a macro name. But
-coupled with currying, we can invoke `reverse' with two arguments for
+coupled with currying, we can invoke 'reverse' with two arguments for
each definition of a macro stack. This example uses the file
-`m4-1.4.16/examples/curry.m4' included in the distribution.
+'m4-1.4.17/examples/curry.m4' included in the distribution.
$ m4 -I examples
include(`curry.m4')include(`stack.m4')
@@ -2986,14 +2997,14 @@ each definition of a macro stack. This example uses the file
curry(`curry', `reverse', `1')(`2')(`3')
=>3, 2, 1
- Now for the implementation. Notice how `curry' leaves off with a
+ Now for the implementation. Notice how 'curry' leaves off with a
macro name but no open parenthesis, while still in the middle of
-collecting arguments for `$1'. The macro `_curry' is the helper macro
+collecting arguments for '$1'. The macro '_curry' is the helper macro
that takes one argument, then adds it to the list and finally supplies
-the closing parenthesis. The use of a comma inside the `shift' call
+the closing parenthesis. The use of a comma inside the 'shift' call
allows currying to also work for a macro that takes one argument,
although it often makes more sense to invoke that macro directly rather
-than going through `curry'.
+than going through 'curry'.
$ m4 -I examples
undivert(`curry.m4')dnl
@@ -3005,7 +3016,7 @@ than going through `curry'.
=>define(`_curry', ``$1')')
=>divert`'dnl
- Unfortunately, with M4 1.4.x, `curry' is unable to handle builtin
+ Unfortunately, with M4 1.4.x, 'curry' is unable to handle builtin
tokens, which are silently flattened to the empty string when passed
through another text macro. This limitation will be lifted in a future
release of M4.
@@ -3016,13 +3027,13 @@ rename an entire stack of macro definitions.
-- Composite: copy (SOURCE, DEST)
-- Composite: rename (SOURCE, DEST)
Ensure that DEST is undefined, then define it to the same stack of
- definitions currently in SOURCE. `copy' leaves SOURCE unchanged,
- while `rename' undefines SOURCE. There are only a few macros,
- such as `copy' or `defn', which cannot be copied via this macro.
+ definitions currently in SOURCE. 'copy' leaves SOURCE unchanged,
+ while 'rename' undefines SOURCE. There are only a few macros, such
+ as 'copy' or 'defn', which cannot be copied via this macro.
The implementation is relatively straightforward (although since it
-uses `curry', it is unable to copy builtin macros, such as the second
-definition of `a' as a synonym for `divnum'. See if you can design a
+uses 'curry', it is unable to copy builtin macros, such as the second
+definition of 'a' as a synonym for 'divnum'. See if you can design a
version that works around this limitation, or *note Answers: Improved
copy.).
@@ -3052,9 +3063,9 @@ File: m4.info, Node: Debugging, Next: Input Control, Prev: Conditionals, Up:
7 How to debug macros and input
*******************************
-When writing macros for `m4', they often do not work as intended on the
+When writing macros for 'm4', they often do not work as intended on the
first try (as is the case with most programming languages).
-Fortunately, there is support for macro debugging in `m4'.
+Fortunately, there is support for macro debugging in 'm4'.
* Menu:
@@ -3070,27 +3081,24 @@ File: m4.info, Node: Dumpdef, Next: Trace, Up: Debugging
================================
If you want to see what a name expands into, you can use the builtin
-`dumpdef':
+'dumpdef':
- -- Builtin: dumpdef ([NAMES...])
+ -- Builtin: dumpdef ([NAMES...]
Accepts any number of arguments. If called without any arguments,
it displays the definitions of all known names, otherwise it
- displays the definitions of the NAMES given. The output is
- printed to the current debug file (usually standard error), and is
- sorted by name. If an unknown name is encountered, a warning is
- printed.
+ displays the definitions of the NAMES given. The output is printed
+ to the current debug file (usually standard error), and is sorted
+ by name. If an unknown name is encountered, a warning is printed.
- The expansion of `dumpdef' is void.
+ The expansion of 'dumpdef' is void.
$ m4 -d
define(`foo', `Hello world.')
=>
dumpdef(`foo')
- error-->foo: `Hello world.'
- =>
+ error->foo: =>
dumpdef(`define')
- error-->define: <define>
- =>
+ error->define: =>
The last example shows how builtin macros definitions are displayed.
The definition that is dumped corresponds to what would occur if the
@@ -3101,10 +3109,9 @@ still live due to redefining a macro during argument collection.
pushdef(`f', ``$0'1')pushdef(`f', ``$0'2')
=>
f(popdef(`f')dumpdef(`f'))
- error-->f: ``$0'1'
- =>f2
+ error->f: =>f2
f(popdef(`f')dumpdef(`f'))
- error-->m4:stdin:3: undefined macro `f'
+ error->m4:stdin:3: undefined macro `f'
=>f1
*Note Debug Levels::, for information on controlling the details of
@@ -3117,24 +3124,24 @@ File: m4.info, Node: Trace, Next: Debug Levels, Prev: Dumpdef, Up: Debugging
=======================
It is possible to trace macro calls and expansions through the builtins
-`traceon' and `traceoff':
+'traceon' and 'traceoff':
- -- Builtin: traceon ([NAMES...])
- -- Builtin: traceoff ([NAMES...])
- When called without any arguments, `traceon' and `traceoff' will
+ -- Builtin: traceon ([NAMES...]
+ -- Builtin: traceoff ([NAMES...]
+ When called without any arguments, 'traceon' and 'traceoff' will
turn tracing on and off, respectively, for all currently defined
macros.
When called with arguments, only the macros listed in NAMES are
affected, whether or not they are currently defined.
- The expansion of `traceon' and `traceoff' is void.
+ The expansion of 'traceon' and 'traceoff' is void.
Whenever a traced macro is called and the arguments have been
-collected, the call is displayed. If the expansion of the macro call
-is not void, the expansion can be displayed after the call. The output
-is printed to the current debug file (defaulting to standard error,
-*note Debug Output::).
+collected, the call is displayed. If the expansion of the macro call is
+not void, the expansion can be displayed after the call. The output is
+printed to the current debug file (defaulting to standard error, *note
+Debug Output::).
$ m4 -d
define(`foo', `Hello World.')
@@ -3144,31 +3151,31 @@ is printed to the current debug file (defaulting to standard error,
traceon(`foo', `echo')
=>
foo
- error-->m4trace: -1- foo -> `Hello World.'
+ error->m4trace: -1- foo -> `Hello World.'
=>Hello World.
echo(`gnus', `and gnats')
- error-->m4trace: -1- echo(`gnus', `and gnats') -> ``gnus',`and gnats''
+ error->m4trace: -1- echo(`gnus', `and gnats') -> ``gnus',`and gnats''
=>gnus,and gnats
The number between dashes is the depth of the expansion. It is one
most of the time, signifying an expansion at the outermost level, but it
increases when macro arguments contain unquoted macro calls. The
maximum number that will appear between dashes is controlled by the
-option `--nesting-limit' (or `-L', *note Invoking m4: Limits control.).
-Additionally, the option `--trace' (or `-t') can be used to invoke
-`traceon(NAME)' before parsing input.
+option '--nesting-limit' (or '-L', *note Invoking m4: Limits control.).
+Additionally, the option '--trace' (or '-t') can be used to invoke
+'traceon(NAME)' before parsing input.
$ m4 -L 3 -t ifelse
ifelse(`one level')
- error-->m4trace: -1- ifelse
+ error->m4trace: -1- ifelse
=>
ifelse(ifelse(ifelse(`three levels')))
- error-->m4trace: -3- ifelse
- error-->m4trace: -2- ifelse
- error-->m4trace: -1- ifelse
+ error->m4trace: -3- ifelse
+ error->m4trace: -2- ifelse
+ error->m4trace: -1- ifelse
=>
ifelse(ifelse(ifelse(ifelse(`four levels'))))
- error-->m4:stdin:3: recursion limit of 3 exceeded, use -L<N> to change it
+ error->m4:stdin:3: recursion limit of 3 exceeded, use -L<N> to change it
Tracing by name is an attribute that is preserved whether the macro
is defined or not. This allows the selection of macros to trace before
@@ -3186,36 +3193,36 @@ those macros are defined.
define(`foo', `bar')
=>
foo
- error-->m4trace: -1- foo -> `bar'
+ error->m4trace: -1- foo -> `bar'
=>bar
undefine(`foo')
=>
ifdef(`foo', `yes', `no')
=>no
indir(`foo')
- error-->m4:stdin:9: undefined macro `foo'
+ error->m4:stdin:9: undefined macro `foo'
=>
define(`foo', `blah')
=>
foo
- error-->m4trace: -1- foo -> `blah'
+ error->m4trace: -1- foo -> `blah'
=>blah
traceoff
=>
foo
=>blah
- Tracing even works on builtins. However, `defn' (*note Defn::) does
+ Tracing even works on builtins. However, 'defn' (*note Defn::) does
not transfer tracing status.
$ m4 -d
traceon(`traceon')
=>
traceon(`traceoff')
- error-->m4trace: -1- traceon(`traceoff')
+ error->m4trace: -1- traceon(`traceoff')
=>
traceoff(`traceoff')
- error-->m4trace: -1- traceoff(`traceoff')
+ error->m4trace: -1- traceoff(`traceoff')
=>
traceoff(`traceon')
=>
@@ -3226,15 +3233,15 @@ not transfer tracing status.
define(`m4_divnum', defn(`divnum'))
=>
eval(divnum)
- error-->m4trace: -1- eval(`0') -> `0'
+ error->m4trace: -1- eval(`0') -> `0'
=>0
m4_eval(m4_divnum)
- error-->m4trace: -2- m4_divnum -> `0'
+ error->m4trace: -2- m4_divnum -> `0'
=>0
*Note Debug Levels::, for information on controlling the details of
the display. The format of the trace output is not specified by POSIX,
-and varies between implementations of `m4'.
+and varies between implementations of 'm4'.

File: m4.info, Node: Debug Levels, Next: Debug Output, Prev: Trace, Up: Debugging
@@ -3242,86 +3249,86 @@ File: m4.info, Node: Debug Levels, Next: Debug Output, Prev: Trace, Up: Debu
7.3 Controlling debugging output
================================
-The `-d' option to `m4' (or `--debug', *note Invoking m4: Debugging
+The '-d' option to 'm4' (or '--debug', *note Invoking m4: Debugging
options.) controls the amount of details presented in three categories
-of output. Trace output is requested by `traceon' (*note Trace::), and
-each line is prefixed by `m4trace:' in relation to a macro invocation.
+of output. Trace output is requested by 'traceon' (*note Trace::), and
+each line is prefixed by 'm4trace:' in relation to a macro invocation.
Debug output tracks useful events not associated with a macro
-invocation, and each line is prefixed by `m4debug:'. Finally,
-`dumpdef' (*note Dumpdef::) output is affected, with no prefix added to
-the output lines.
+invocation, and each line is prefixed by 'm4debug:'. Finally, 'dumpdef'
+(*note Dumpdef::) output is affected, with no prefix added to the output
+lines.
The FLAGS following the option can be one or more of the following:
-`a'
+'a'
In trace output, show the actual arguments that were collected
before invoking the macro. This applies to all macro calls if the
- `t' flag is used, otherwise only the macros covered by calls of
- `traceon'. Arguments are subject to length truncation specified by
- the command line option `--arglength' (or `-l').
+ 't' flag is used, otherwise only the macros covered by calls of
+ 'traceon'. Arguments are subject to length truncation specified by
+ the command line option '--arglength' (or '-l').
-`c'
+'c'
In trace output, show several trace lines for each macro call. A
line is shown when the macro is seen, but before the arguments are
- collected; a second line when the arguments have been collected
- and a third line after the call has completed.
+ collected; a second line when the arguments have been collected and
+ a third line after the call has completed.
-`e'
+'e'
In trace output, show the expansion of each macro call, if it is
- not void. This applies to all macro calls if the `t' flag is used,
- otherwise only the macros covered by calls of `traceon'. The
+ not void. This applies to all macro calls if the 't' flag is used,
+ otherwise only the macros covered by calls of 'traceon'. The
expansion is subject to length truncation specified by the command
- line option `--arglength' (or `-l').
+ line option '--arglength' (or '-l').
-`f'
+'f'
In debug and trace output, include the name of the current input
file in the output line.
-`i'
+'i'
In debug output, print a message each time the current input file
is changed.
-`l'
- In debug and trace output, include the current input line number
- in the output line.
+'l'
+ In debug and trace output, include the current input line number in
+ the output line.
-`p'
- In debug output, print a message when a named file is found
- through the path search mechanism (*note Search Path::), giving
- the actual file name used.
+'p'
+ In debug output, print a message when a named file is found through
+ the path search mechanism (*note Search Path::), giving the actual
+ file name used.
-`q'
+'q'
In trace and dumpdef output, quote actual arguments and macro
expansions in the display with the current quotes. This is useful
- in connection with the `a' and `e' flags above.
+ in connection with the 'a' and 'e' flags above.
-`t'
+'t'
In trace output, trace all macro calls made in this invocation of
- `m4', regardless of the settings of `traceon'.
+ 'm4', regardless of the settings of 'traceon'.
-`x'
- In trace output, add a unique `macro call id' to each line of the
- trace output. This is useful in connection with the `c' flag
+'x'
+ In trace output, add a unique 'macro call id' to each line of the
+ trace output. This is useful in connection with the 'c' flag
above.
-`V'
+'V'
A shorthand for all of the above flags.
- If no flags are specified with the `-d' option, the default is
-`aeq'. The examples throughout this manual assume the default flags.
+ If no flags are specified with the '-d' option, the default is 'aeq'.
+The examples throughout this manual assume the default flags.
- There is a builtin macro `debugmode', which allows on-the-fly
-control of the debugging output format:
+ There is a builtin macro 'debugmode', which allows on-the-fly control
+of the debugging output format:
- -- Builtin: debugmode ([FLAGS])
+ -- Builtin: debugmode ([FLAGS]
The argument FLAGS should be a subset of the letters listed above.
- As special cases, if the argument starts with a `+', the flags are
- added to the current debug flags, and if it starts with a `-', they
+ As special cases, if the argument starts with a '+', the flags are
+ added to the current debug flags, and if it starts with a '-', they
are removed. If no argument is present, all debugging flags are
- cleared (as if no `-d' was given), and with an empty argument the
- flags are reset to the default of `aeq'.
+ cleared (as if no '-d' was given), and with an empty argument the
+ flags are reset to the default of 'aeq'.
- The expansion of `debugmode' is void.
+ The expansion of 'debugmode' is void.
$ m4
define(`foo', `FOO')
@@ -3331,17 +3338,17 @@ control of the debugging output format:
debugmode()
=>
foo
- error-->m4trace: -1- foo -> `FOO'
+ error->m4trace: -1- foo -> `FOO'
=>FOO
debugmode
=>
foo
- error-->m4trace: -1- foo
+ error->m4trace: -1- foo
=>FOO
debugmode(`+l')
=>
foo
- error-->m4trace:8: -1- foo
+ error->m4trace:8: -1- foo
=>FOO
The following example demonstrates the behavior of length truncation,
@@ -3353,25 +3360,25 @@ builtin functions are not truncated.
define(`echo', `$@')debugmode(`+t')
=>
echo(`1', `long string')
- error-->m4trace: -1- echo(`1', `long s...') -> ``1',`l...'
+ error->m4trace: -1- echo(`1', `long s...') -> ``1',`l...'
=>1,long string
indir(`echo', defn(`changequote'))
- error-->m4trace: -2- defn(`change...')
- error-->m4trace: -1- indir(`echo', <changequote>) -> ``''
+ error->m4trace: -2- defn(`change...')
+ error->m4trace: -1- indir(`echo', <changequote>) -> ``''
=>
This example shows the effects of the debug flags that are not
related to macro tracing.
$ m4 -dip -I examples
- error-->m4debug: input read from stdin
+ error->m4debug: input read from stdin
include(`foo')dnl
- error-->m4debug: path search for `foo' found `examples/foo'
- error-->m4debug: input read from examples/foo
+ error->m4debug: path search for `foo' found `examples/foo'
+ error->m4debug: input read from examples/foo
=>bar
- error-->m4debug: input reverted to stdin, line 1
+ error->m4debug: input reverted to stdin, line 1
^D
- error-->m4debug: input exhausted
+ error->m4debug: input exhausted

File: m4.info, Node: Debug Output, Prev: Debug Levels, Up: Debugging
@@ -3380,36 +3387,36 @@ File: m4.info, Node: Debug Output, Prev: Debug Levels, Up: Debugging
===========================
Debug and tracing output can be redirected to files using either the
-`--debugfile' option to `m4' (*note Invoking m4: Debugging options.),
-or with the builtin macro `debugfile':
+'--debugfile' option to 'm4' (*note Invoking m4: Debugging options.), or
+with the builtin macro 'debugfile':
- -- Builtin: debugfile ([FILE])
+ -- Builtin: debugfile ([FILE]
Sends all further debug and trace output to FILE, opened in append
mode. If FILE is the empty string, debug and trace output are
- discarded. If `debugfile' is called without any arguments, debug
+ discarded. If 'debugfile' is called without any arguments, debug
and trace output are sent to standard error. This does not affect
- warnings, error messages, or `errprint' output, which are always
+ warnings, error messages, or 'errprint' output, which are always
sent to standard error. If FILE cannot be opened, the current
debug file is unchanged, and an error is issued.
- The expansion of `debugfile' is void.
+ The expansion of 'debugfile' is void.
$ m4 -d
traceon(`divnum')
=>
divnum(`extra')
- error-->m4:stdin:2: Warning: excess arguments to builtin `divnum' ignored
- error-->m4trace: -1- divnum(`extra') -> `0'
+ error->m4:stdin:2: Warning: excess arguments to builtin `divnum' ignored
+ error->m4trace: -1- divnum(`extra') -> `0'
=>0
debugfile()
=>
divnum(`extra')
- error-->m4:stdin:4: Warning: excess arguments to builtin `divnum' ignored
+ error->m4:stdin:4: Warning: excess arguments to builtin `divnum' ignored
=>0
debugfile
=>
divnum
- error-->m4trace: -1- divnum -> `0'
+ error->m4trace: -1- divnum -> `0'
=>0

@@ -3419,7 +3426,7 @@ File: m4.info, Node: Input Control, Next: File Inclusion, Prev: Debugging, U
***************
This chapter describes various builtin macros for controlling the input
-to `m4'.
+to 'm4'.
* Menu:
@@ -3435,17 +3442,17 @@ File: m4.info, Node: Dnl, Next: Changequote, Up: Input Control
8.1 Deleting whitespace in input
================================
-The builtin `dnl' stands for "Discard to Next Line":
+The builtin 'dnl' stands for "Discard to Next Line":
-- Builtin: dnl
All characters, up to and including the next newline, are discarded
- without performing any macro expansion. A warning is issued if
- the end of the file is encountered without a newline.
+ without performing any macro expansion. A warning is issued if the
+ end of the file is encountered without a newline.
- The expansion of `dnl' is void.
+ The expansion of 'dnl' is void.
- It is often used in connection with `define', to remove the newline
-that follows the call to `define'. Thus
+ It is often used in connection with 'define', to remove the newline
+that follows the call to 'define'. Thus
define(`foo', `Macro `foo'.')dnl A very simple macro, indeed.
foo
@@ -3454,18 +3461,18 @@ that follows the call to `define'. Thus
The input up to and including the next newline is discarded, as
opposed to the way comments are treated (*note Comments::).
- Usually, `dnl' is immediately followed by an end of line or some
-other whitespace. GNU `m4' will produce a warning diagnostic if `dnl'
-is followed by an open parenthesis. In this case, `dnl' will collect
+ Usually, 'dnl' is immediately followed by an end of line or some
+other whitespace. GNU 'm4' will produce a warning diagnostic if 'dnl'
+is followed by an open parenthesis. In this case, 'dnl' will collect
and process all arguments, looking for a matching close parenthesis.
All predictable side effects resulting from this collection will take
-place. `dnl' will return no output. The input following the matching
-close parenthesis up to and including the next newline, on whatever
-line containing it, will still be discarded.
+place. 'dnl' will return no output. The input following the matching
+close parenthesis up to and including the next newline, on whatever line
+containing it, will still be discarded.
dnl(`args are ignored, but side effects occur',
define(`foo', `like this')) while this text is ignored: undefine(`foo')
- error-->m4:stdin:1: Warning: excess arguments to builtin `dnl' ignored
+ error->m4:stdin:1: Warning: excess arguments to builtin `dnl' ignored
See how `foo' was defined, foo?
=>See how foo was defined, like this?
@@ -3478,7 +3485,7 @@ warning is issued and dnl stops consuming input.
define(`hi', `HI')
=>
^D
- error-->m4:stdin:1: Warning: end of file treated as newline
+ error->m4:stdin:1: Warning: end of file treated as newline
=>0 HI 2 HI

@@ -3488,17 +3495,17 @@ File: m4.info, Node: Changequote, Next: Changecom, Prev: Dnl, Up: Input Cont
=================================
The default quote delimiters can be changed with the builtin
-`changequote':
+'changequote':
- -- Builtin: changequote ([START = ``'], [END = `''])
- This sets START as the new begin-quote delimiter and END as the
- new end-quote delimiter. If both arguments are missing, the
- default quotes (``' and `'') are used. If START is void, then
- quoting is disabled. Otherwise, if END is missing or void, the
- default end-quote delimiter (`'') is used. The quote delimiters
- can be of any length.
+ -- Builtin: changequote ([START = '`']
+ This sets START as the new begin-quote delimiter and END as the new
+ end-quote delimiter. If both arguments are missing, the default
+ quotes ('`' and ''') are used. If START is void, then quoting is
+ disabled. Otherwise, if END is missing or void, the default
+ end-quote delimiter (''') is used. The quote delimiters can be of
+ any length.
- The expansion of `changequote' is void.
+ The expansion of 'changequote' is void.
changequote(`[', `]')
=>
@@ -3507,8 +3514,8 @@ The default quote delimiters can be changed with the builtin
foo
=>Macro foo.
- The quotation strings can safely contain eight-bit characters. If
-no single character is appropriate, START and END can be of any length.
+ The quotation strings can safely contain eight-bit characters. If no
+single character is appropriate, START and END can be of any length.
Other implementations cap the delimiter length to five characters, but
GNU has no inherent limit.
@@ -3519,18 +3526,17 @@ GNU has no inherent limit.
foo
=>Macro [[foo]].
- Calling `changequote' with START as the empty string will
-effectively disable the quoting mechanism, leaving no way to quote text.
-However, using an empty string is not portable, as some other
-implementations of `m4' revert to the default quoting, while others
-preserve the prior non-empty delimiter. If START is not empty, then an
-empty END will use the default end-quote delimiter of `'', as
-otherwise, it would be impossible to end a quoted string. Again, this
-is not portable, as some other `m4' implementations reuse START as the
-end-quote delimiter, while others preserve the previous non-empty
-value. Omitting both arguments restores the default begin-quote and
-end-quote delimiters; fortunately this behavior is portable to all
-implementations of `m4'.
+ Calling 'changequote' with START as the empty string will effectively
+disable the quoting mechanism, leaving no way to quote text. However,
+using an empty string is not portable, as some other implementations of
+'m4' revert to the default quoting, while others preserve the prior
+non-empty delimiter. If START is not empty, then an empty END will use
+the default end-quote delimiter of ''', as otherwise, it would be
+impossible to end a quoted string. Again, this is not portable, as some
+other 'm4' implementations reuse START as the end-quote delimiter, while
+others preserve the previous non-empty value. Omitting both arguments
+restores the default begin-quote and end-quote delimiters; fortunately
+this behavior is portable to all implementations of 'm4'.
define(`foo', `Macro `FOO'.')
=>
@@ -3545,19 +3551,19 @@ implementations of `m4'.
foo
=>Macro FOO.
- There is no way in `m4' to quote a string containing an unmatched
-begin-quote, except using `changequote' to change the current quotes.
+ There is no way in 'm4' to quote a string containing an unmatched
+begin-quote, except using 'changequote' to change the current quotes.
- If the quotes should be changed from, say, `[' to `[[', temporary
+ If the quotes should be changed from, say, '[' to '[[', temporary
quote characters have to be defined. To achieve this, two calls of
-`changequote' must be made, one for the temporary quotes and one for
-the new quotes.
+'changequote' must be made, one for the temporary quotes and one for the
+new quotes.
Macros are recognized in preference to the begin-quote string, so if
a prefix of START can be recognized as part of a potential macro name,
the quoting mechanism is effectively disabled. Unless you use
-`changeword' (*note Changeword::), this means that START should not
-begin with a letter, digit, or `_' (underscore). However, even though
+'changeword' (*note Changeword::), this means that START should not
+begin with a letter, digit, or '_' (underscore). However, even though
quoted strings are not recognized, the quote characters can still be
discerned in macro expansion and in trace output.
@@ -3587,10 +3593,9 @@ discerned in macro expansion and in trace output.
=>HI hi
Quotes are recognized in preference to argument collection. In
-particular, if START is a single `(', then argument collection is
-effectively disabled. For portability with other implementations, it
-is a good idea to avoid `(', `,', and `)' as the first character in
-START.
+particular, if START is a single '(', then argument collection is
+effectively disabled. For portability with other implementations, it is
+a good idea to avoid '(', ',', and ')' as the first character in START.
define(`echo', `$#:$@:')
=>
@@ -3615,18 +3620,18 @@ START.
echo(hi,hi)bye)
=>1:HIhibye:
- However, if you are not worried about portability, using `(' and `)'
+ However, if you are not worried about portability, using '(' and ')'
as quoting characters has an interesting property--you can use it to
compute a quoted string containing the expansion of any quoted text, as
long as the expansion results in both balanced quotes and balanced
-parentheses. The trick is realizing `expand' uses `$1' unquoted, to
+parentheses. The trick is realizing 'expand' uses '$1' unquoted, to
trigger its expansion using the normal quoting characters, but uses
extra parentheses to group unquoted commas that occur in the expansion
-without consuming whitespace following those commas. Then `_expand'
-uses `changequote' to convert the extra parentheses back into quoting
-characters. Note that it takes two more `changequote' invocations to
+without consuming whitespace following those commas. Then '_expand'
+uses 'changequote' to convert the extra parentheses back into quoting
+characters. Note that it takes two more 'changequote' invocations to
restore the original quotes. Contrast the behavior on whitespace when
-using `$*', via `quote', to attempt the same task.
+using '$*', via 'quote', to attempt the same task.
changequote(`[', `]')dnl
define([a], [1, (b)])dnl
@@ -3643,9 +3648,9 @@ using `$*', via `quote', to attempt the same task.
If END is a prefix of START, the end-quote will be recognized in
preference to a nested begin-quote. In particular, changing the quotes
to have the same string for START and END disables nesting of quotes.
-When quote nesting is disabled, it is impossible to double-quote
-strings across macro expansions, so using the same string is not done
-very often.
+When quote nesting is disabled, it is impossible to double-quote strings
+across macro expansions, so using the same string is not done very
+often.
define(`hi', `HI')
=>
@@ -3672,11 +3677,11 @@ very often.
=>hello world
`dangling quote
^D
- error-->m4:stdin:2: ERROR: end of file in string
+ error->m4:stdin:2: ERROR: end of file in string
ifelse(`dangling quote
^D
- error-->m4:stdin:1: ERROR: end of file in string
+ error->m4:stdin:1: ERROR: end of file in string

File: m4.info, Node: Changecom, Next: Changeword, Prev: Changequote, Up: Input Control
@@ -3685,16 +3690,16 @@ File: m4.info, Node: Changecom, Next: Changeword, Prev: Changequote, Up: Inp
===================================
The default comment delimiters can be changed with the builtin macro
-`changecom':
+'changecom':
- -- Builtin: changecom ([START], [END = `<NL>'])
+ -- Builtin: changecom ([START]
This sets START as the new begin-comment delimiter and END as the
- new end-comment delimiter. If both arguments are missing, or
- START is void, then comments are disabled. Otherwise, if END is
- missing or void, the default end-comment delimiter of newline is
- used. The comment delimiters can be of any length.
+ new end-comment delimiter. If both arguments are missing, or START
+ is void, then comments are disabled. Otherwise, if END is missing
+ or void, the default end-comment delimiter of newline is used. The
+ comment delimiters can be of any length.
- The expansion of `changecom' is void.
+ The expansion of 'changecom' is void.
define(`comment', `COMMENT')
=>
@@ -3711,12 +3716,12 @@ The default comment delimiters can be changed with the builtin macro
quoted strings. If you want the text inside a comment expanded, quote
the begin-comment delimiter.
- Calling `changecom' without any arguments, or with START as the
-empty string, will effectively disable the commenting mechanism. To
-restore the original comment start of `#', you must explicitly ask for
-it. If START is not empty, then an empty END will use the default
-end-comment delimiter of newline, as otherwise, it would be impossible
-to end a comment. However, this is not portable, as some other `m4'
+ Calling 'changecom' without any arguments, or with START as the empty
+string, will effectively disable the commenting mechanism. To restore
+the original comment start of '#', you must explicitly ask for it. If
+START is not empty, then an empty END will use the default end-comment
+delimiter of newline, as otherwise, it would be impossible to end a
+comment. However, this is not portable, as some other 'm4'
implementations preserve the previous non-empty delimiters instead.
define(`comment', `COMMENT')
@@ -3739,7 +3744,7 @@ GNU has no inherent limit.
not compatible with other implementations, where macros and even quoting
takes precedence over comments, so it may change in a future release.
For portability, this means that START should not begin with a letter,
-digit, or `_' (underscore), and that neither the start-quote nor the
+digit, or '_' (underscore), and that neither the start-quote nor the
start-comment string should be a prefix of the other.
define(`hi', `HI')
@@ -3758,10 +3763,9 @@ start-comment string should be a prefix of the other.
=>HI 1hi2
Comments are recognized in preference to argument collection. In
-particular, if START is a single `(', then argument collection is
-effectively disabled. For portability with other implementations, it
-is a good idea to avoid `(', `,', and `)' as the first character in
-START.
+particular, if START is a single '(', then argument collection is
+effectively disabled. For portability with other implementations, it is
+a good idea to avoid '(', ',', and ')' as the first character in START.
define(`echo', `$#:$*:$@:')
=>
@@ -3796,7 +3800,7 @@ START.
=>
/*dangling comment
^D
- error-->m4:stdin:2: ERROR: end of file in comment
+ error->m4:stdin:2: ERROR: end of file in comment

File: m4.info, Node: Changeword, Next: M4wrap, Prev: Changecom, Up: Input Control
@@ -3804,35 +3808,35 @@ File: m4.info, Node: Changeword, Next: M4wrap, Prev: Changecom, Up: Input Co
8.4 Changing the lexical structure of words
===========================================
- The macro `changeword' and all associated functionality is
- experimental. It is only available if the `--enable-changeword'
- option was given to `configure', at GNU `m4' installation time.
+ The macro 'changeword' and all associated functionality is
+ experimental. It is only available if the '--enable-changeword'
+ option was given to 'configure', at GNU 'm4' installation time.
The functionality will go away in the future, to be replaced by
other new features that are more efficient at providing the same
capabilities. _Do not rely on it_. Please direct your comments
about it the same way you would do for bugs.
- A file being processed by `m4' is split into quoted strings, words
+ A file being processed by 'm4' is split into quoted strings, words
(potential macro names) and simple tokens (any other single character).
Initially a word is defined by the following regular expression:
[_a-zA-Z][_a-zA-Z0-9]*
- Using `changeword', you can change this regular expression:
+ Using 'changeword', you can change this regular expression:
-- Optional builtin: changeword (REGEX)
Changes the regular expression for recognizing macro names to be
- REGEX. If REGEX is empty, use `[_a-zA-Z][_a-zA-Z0-9]*'. REGEX
+ REGEX. If REGEX is empty, use '[_a-zA-Z][_a-zA-Z0-9]*'. REGEX
must obey the constraint that every prefix of the desired final
pattern is also accepted by the regular expression. If REGEX
contains grouping parentheses, the macro invoked is the portion
that matched the first group, rather than the entire matching
string.
- The expansion of `changeword' is void. The macro `changeword' is
+ The expansion of 'changeword' is void. The macro 'changeword' is
recognized only with parameters.
- Relaxing the lexical rules of `m4' might be useful (for example) if
+ Relaxing the lexical rules of 'm4' might be useful (for example) if
you wanted to apply translations to a file of numbers:
ifdef(`changeword', `', `errprint(` skipping: no changeword support
@@ -3858,10 +3862,10 @@ prevent accidental call of builtins, for example:
=>hi
=>
- Because `m4' constructs its words a character at a time, there is a
+ Because 'm4' constructs its words a character at a time, there is a
restriction on the regular expressions that may be passed to
-`changeword'. This is that if your regular expression accepts `foo',
-it must also accept `f' and `fo'.
+'changeword'. This is that if your regular expression accepts 'foo', it
+must also accept 'f' and 'fo'.
ifdef(`changeword', `', `errprint(` skipping: no changeword support
')m4exit(`77')')dnl
@@ -3896,7 +3900,7 @@ it must also accept `f' and `fo'.
foo
=>bar
- `changeword' has another function. If the regular expression
+ 'changeword' has another function. If the regular expression
supplied contains any grouped subexpressions, then text outside the
first of these is discarded before symbol lookup. So:
@@ -3913,13 +3917,13 @@ first of these is discarded before symbol lookup. So:
=>foo bar
=>
- `m4' now requires a `#' mark at the beginning of every macro
-invocation, so one can use `m4' to preprocess plain text without losing
-various words like `divert'.
+ 'm4' now requires a '#' mark at the beginning of every macro
+invocation, so one can use 'm4' to preprocess plain text without losing
+various words like 'divert'.
- In `m4', macro substitution is based on text, while in TeX, it is
-based on tokens. `changeword' can throw this difference into relief.
-For example, here is the same idea represented in TeX and `m4'. First,
+ In 'm4', macro substitution is based on text, while in TeX, it is
+based on tokens. 'changeword' can throw this difference into relief.
+For example, here is the same idea represented in TeX and 'm4'. First,
the TeX version:
\def\a{\message{Hello}}
@@ -3929,7 +3933,7 @@ the TeX version:
@bye
=>Hello
-Then, the `m4' version:
+Then, the 'm4' version:
ifdef(`changeword', `', `errprint(` skipping: no changeword support
')m4exit(`77')')dnl
@@ -3939,21 +3943,21 @@ Then, the `m4' version:
@a
=>errprint(Hello)
- In the TeX example, the first line defines a macro `a' to print the
-message `Hello'. The second line defines <@> to be usable instead of
+ In the TeX example, the first line defines a macro 'a' to print the
+message 'Hello'. The second line defines <@> to be usable instead of
<\> as an escape character. The third line defines <\> to be a normal
printing character, not an escape. The fourth line invokes the macro
-`a'. So, when TeX is run on this file, it displays the message `Hello'.
+'a'. So, when TeX is run on this file, it displays the message 'Hello'.
- When the `m4' example is passed through `m4', it outputs
-`errprint(Hello)'. The reason for this is that TeX does lexical
-analysis of macro definition when the macro is _defined_. `m4' just
+ When the 'm4' example is passed through 'm4', it outputs
+'errprint(Hello)'. The reason for this is that TeX does lexical
+analysis of macro definition when the macro is _defined_. 'm4' just
stores the text, postponing the lexical analysis until the macro is
_used_.
- You should note that using `changeword' will slow `m4' down by a
+ You should note that using 'changeword' will slow 'm4' down by a
factor of about seven, once it is changed to something other than the
-default regular expression. You can invoke `changeword' with the empty
+default regular expression. You can invoke 'changeword' with the empty
string to restore the default word definition, and regain the parsing
speed.
@@ -3963,19 +3967,19 @@ File: m4.info, Node: M4wrap, Prev: Changeword, Up: Input Control
8.5 Saving text until end of input
==================================
-It is possible to `save' some text until the end of the normal input has
-been seen. Text can be saved, to be read again by `m4' when the normal
+It is possible to 'save' some text until the end of the normal input has
+been seen. Text can be saved, to be read again by 'm4' when the normal
input has been exhausted. This feature is normally used to initiate
cleanup actions before normal exit, e.g., deleting temporary files.
- To save input text, use the builtin `m4wrap':
+ To save input text, use the builtin 'm4wrap':
-- Builtin: m4wrap (STRING, ...)
Stores STRING in a safe place, to be reread when end of input is
- reached. As a GNU extension, additional arguments are
- concatenated with a space to the STRING.
+ reached. As a GNU extension, additional arguments are concatenated
+ with a space to the STRING.
- The expansion of `m4wrap' is void. The macro `m4wrap' is
+ The expansion of 'm4wrap' is void. The macro 'm4wrap' is
recognized only with parameters.
define(`cleanup', `This is the `cleanup' action.
@@ -3989,17 +3993,17 @@ cleanup actions before normal exit, e.g., deleting temporary files.
=>This is the cleanup action.
The saved input is only reread when the end of normal input is seen,
-and not if `m4exit' is used to exit `m4'.
+and not if 'm4exit' is used to exit 'm4'.
- It is safe to call `m4wrap' from saved text, but then the order in
-which the saved text is reread is undefined. If `m4wrap' is not used
+ It is safe to call 'm4wrap' from saved text, but then the order in
+which the saved text is reread is undefined. If 'm4wrap' is not used
recursively, the saved pieces of text are reread in the opposite order
in which they were saved (LIFO--last in, first out). However, this
-behavior is likely to change in a future release, to match POSIX, so
-you should not depend on this order.
+behavior is likely to change in a future release, to match POSIX, so you
+should not depend on this order.
It is possible to emulate POSIX behavior even with older versions of
-GNU M4 by including the file `m4-1.4.16/examples/wrapfifo.m4' from the
+GNU M4 by including the file 'm4-1.4.17/examples/wrapfifo.m4' from the
distribution:
$ m4 -I examples
@@ -4023,10 +4027,10 @@ distribution:
=>abc
It is likewise possible to emulate LIFO behavior without resorting to
-the GNU M4 extension of `builtin', by including the file
-`m4-1.4.16/examples/wraplifo.m4' from the distribution.
-(Unfortunately, both examples shown here share some subtle bugs. See
-if you can find and correct them; or *note Answers: Improved m4wrap.).
+the GNU M4 extension of 'builtin', by including the file
+'m4-1.4.17/examples/wraplifo.m4' from the distribution. (Unfortunately,
+both examples shown here share some subtle bugs. See if you can find
+and correct them; or *note Answers: Improved m4wrap.).
$ m4 -I examples
undivert(`wraplifo.m4')dnl
@@ -4049,7 +4053,7 @@ if you can find and correct them; or *note Answers: Improved m4wrap.).
=>bac
Here is an example of implementing a factorial function using
-`m4wrap':
+'m4wrap':
define(`f', `ifelse(`$1', `0', `Answer: 0!=1
', eval(`$1>1'), `0', `Answer: $2$1=eval(`$2$1')
@@ -4060,7 +4064,7 @@ if you can find and correct them; or *note Answers: Improved m4wrap.).
^D
=>Answer: 10*9*8*7*6*5*4*3*2*1=3628800
- Invocations of `m4wrap' at the same recursion level are concatenated
+ Invocations of 'm4wrap' at the same recursion level are concatenated
and rescanned as usual:
define(`aa', `AA
@@ -4077,7 +4081,7 @@ file condition between two input files.
m4wrap(`m4wrap(`)')len(abc')
=>
^D
- error-->m4:stdin:1: ERROR: end of file in argument list
+ error->m4:stdin:1: ERROR: end of file in argument list

File: m4.info, Node: File Inclusion, Next: Diversions, Prev: Input Control, Up: Top
@@ -4085,7 +4089,7 @@ File: m4.info, Node: File Inclusion, Next: Diversions, Prev: Input Control,
9 File inclusion
****************
-`m4' allows you to include named files at any point in the input.
+'m4' allows you to include named files at any point in the input.
* Menu:
@@ -4098,40 +4102,40 @@ File: m4.info, Node: Include, Next: Search Path, Up: File Inclusion
9.1 Including named files
=========================
-There are two builtin macros in `m4' for including files:
+There are two builtin macros in 'm4' for including files:
-- Builtin: include (FILE)
-- Builtin: sinclude (FILE)
- Both macros cause the file named FILE to be read by `m4'. When
- the end of the file is reached, input is resumed from the previous
+ Both macros cause the file named FILE to be read by 'm4'. When the
+ end of the file is reached, input is resumed from the previous
input file.
- The expansion of `include' and `sinclude' is therefore the
- contents of FILE.
+ The expansion of 'include' and 'sinclude' is therefore the contents
+ of FILE.
If FILE does not exist, is a directory, or cannot otherwise be
- read, the expansion is void, and `include' will fail with an error
- while `sinclude' is silent. The empty string counts as a file
- that does not exist.
+ read, the expansion is void, and 'include' will fail with an error
+ while 'sinclude' is silent. The empty string counts as a file that
+ does not exist.
- The macros `include' and `sinclude' are recognized only with
+ The macros 'include' and 'sinclude' are recognized only with
parameters.
include(`none')
- error-->m4:stdin:1: cannot open `none': No such file or directory
+ error->m4:stdin:1: cannot open `none': No such file or directory
=>
include()
- error-->m4:stdin:2: cannot open `': No such file or directory
+ error->m4:stdin:2: cannot open `': No such file or directory
=>
sinclude(`none')
=>
sinclude()
=>
- The rest of this section assumes that `m4' is invoked with the `-I'
-option (*note Invoking m4: Preprocessor features.) pointing to the
-`m4-1.4.16/examples' directory shipped as part of the GNU `m4' package.
-The file `m4-1.4.16/examples/incl.m4' in the distribution contains the
+ The rest of this section assumes that 'm4' is invoked with the '-I'
+option (*note Invoking m4: Preprocessor features.) pointing to the
+'m4-1.4.17/examples' directory shipped as part of the GNU 'm4' package.
+The file 'm4-1.4.17/examples/incl.m4' in the distribution contains the
lines:
$ cat examples/incl.m4
@@ -4139,9 +4143,9 @@ lines:
=>foo
=>Include file end
- Normally file inclusion is used to insert the contents of a file
-into the input stream. The contents of the file will be read by `m4'
-and macro calls in the file will be expanded:
+ Normally file inclusion is used to insert the contents of a file into
+the input stream. The contents of the file will be read by 'm4' and
+macro calls in the file will be expanded:
$ m4 -I examples
define(`foo', `FOO')
@@ -4152,10 +4156,9 @@ and macro calls in the file will be expanded:
=>Include file end
=>
- The fact that `include' and `sinclude' expand to the contents of the
-file can be used to define macros that operate on entire files. Here
-is an example, which defines `bar' to expand to the contents of
-`incl.m4':
+ The fact that 'include' and 'sinclude' expand to the contents of the
+file can be used to define macros that operate on entire files. Here is
+an example, which defines 'bar' to expand to the contents of 'incl.m4':
$ m4 -I examples
define(`bar', include(`incl.m4'))
@@ -4166,15 +4169,15 @@ is an example, which defines `bar' to expand to the contents of
=>Include file end
=><<
- This use of `include' is not trivial, though, as files can contain
+ This use of 'include' is not trivial, though, as files can contain
quotes, commas, and parentheses, which can interfere with the way the
-`m4' parser works. GNU `m4' seamlessly concatenates the file contents
+'m4' parser works. GNU 'm4' seamlessly concatenates the file contents
with the next character, even if the included file ended in the middle
of a comment, string, or macro call. These conditions are only treated
as end of file errors if specified as input files on the command line.
- In GNU `m4', an alternative method of reading files is using
-`undivert' (*note Undivert::) on a named file.
+ In GNU 'm4', an alternative method of reading files is using
+'undivert' (*note Undivert::) on a named file.

File: m4.info, Node: Search Path, Prev: Include, Up: File Inclusion
@@ -4182,19 +4185,19 @@ File: m4.info, Node: Search Path, Prev: Include, Up: File Inclusion
9.2 Searching for include files
===============================
-GNU `m4' allows included files to be found in other directories than
-the current working directory.
+GNU 'm4' allows included files to be found in other directories than the
+current working directory.
- If the `--prepend-include' or `-B' command-line option was provided
+ If the '--prepend-include' or '-B' command-line option was provided
(*note Invoking m4: Preprocessor features.), those directories are
searched first, in reverse order that those options were listed on the
-command line. Then `m4' looks in the current working directory. Next
-comes the directories specified with the `--include' or `-I' option, in
-the order found on the command line. Finally, if the `M4PATH'
-environment variable is set, it is expected to contain a
-colon-separated list of directories, which will be searched in order.
+command line. Then 'm4' looks in the current working directory. Next
+comes the directories specified with the '--include' or '-I' option, in
+the order found on the command line. Finally, if the 'M4PATH'
+environment variable is set, it is expected to contain a colon-separated
+list of directories, which will be searched in order.
- If the automatic search for include-files causes trouble, the `p'
+ If the automatic search for include-files causes trouble, the 'p'
debug flag (*note Debug Levels::) can help isolate the problem.

@@ -4203,26 +4206,26 @@ File: m4.info, Node: Diversions, Next: Text handling, Prev: File Inclusion,
10 Diverting and undiverting output
***********************************
-Diversions are a way of temporarily saving output. The output of `m4'
+Diversions are a way of temporarily saving output. The output of 'm4'
can at any time be diverted to a temporary file, and be reinserted into
the output stream, "undiverted", again at a later time.
Numbered diversions are counted from 0 upwards, diversion number 0
-being the normal output stream. GNU `m4' tries to keep diversions in
+being the normal output stream. GNU 'm4' tries to keep diversions in
memory. However, there is a limit to the overall memory usable by all
-diversions taken together (512K, currently). When this maximum is
-about to be exceeded, a temporary file is opened to receive the
-contents of the biggest diversion still in memory, freeing this memory
-for other diversions. When creating the temporary file, `m4' honors
-the value of the environment variable `TMPDIR', and falls back to
-`/tmp'. Thus, the amount of available disk space provides the only
-real limit on the number and aggregate size of diversions.
+diversions taken together (512K, currently). When this maximum is about
+to be exceeded, a temporary file is opened to receive the contents of
+the biggest diversion still in memory, freeing this memory for other
+diversions. When creating the temporary file, 'm4' honors the value of
+the environment variable 'TMPDIR', and falls back to '/tmp'. Thus, the
+amount of available disk space provides the only real limit on the
+number and aggregate size of diversions.
Diversions make it possible to generate output in a different order
than the input was read. It is possible to implement topological
-sorting dependencies. For example, GNU Autoconf makes use of
-diversions under the hood to ensure that the expansion of a prerequisite
-macro appears in the output prior to the expansion of a dependent macro,
+sorting dependencies. For example, GNU Autoconf makes use of diversions
+under the hood to ensure that the expansion of a prerequisite macro
+appears in the output prior to the expansion of a dependent macro,
regardless of which order the two macros were invoked in the user's
input file.
@@ -4239,16 +4242,16 @@ File: m4.info, Node: Divert, Next: Undivert, Up: Diversions
10.1 Diverting output
=====================
-Output is diverted using `divert':
+Output is diverted using 'divert':
- -- Builtin: divert ([NUMBER = `0'])
+ -- Builtin: divert ([NUMBER = '0']
The current diversion is changed to NUMBER. If NUMBER is left out
or empty, it is assumed to be zero. If NUMBER cannot be parsed,
the diversion is unchanged.
- The expansion of `divert' is void.
+ The expansion of 'divert' is void.
- When all the `m4' input will have been processed, all existing
+ When all the 'm4' input will have been processed, all existing
diversions are automatically undiverted, in numerical order.
divert(`1')
@@ -4261,9 +4264,9 @@ diversions are automatically undiverted, in numerical order.
=>
=>This text is diverted.
- Several calls of `divert' with the same argument do not overwrite
-the previous diverted text, but append to it. Diversions are printed
-after any wrapped text is expanded.
+ Several calls of 'divert' with the same argument do not overwrite the
+previous diverted text, but append to it. Diversions are printed after
+any wrapped text is expanded.
define(`text', `TEXT')
=>
@@ -4278,7 +4281,7 @@ after any wrapped text is expanded.
If output is diverted to a negative diversion, it is simply
discarded. This can be used to suppress unwanted output. A common
example of unwanted output is the trailing newlines after macro
-definitions. Here is a common programming idiom in `m4' for avoiding
+definitions. Here is a common programming idiom in 'm4' for avoiding
them.
divert(`-1')
@@ -4298,10 +4301,10 @@ request to discard text.
=>hello
=>world
- Note that `divert' is an English word, but also an active macro
+ Note that 'divert' is an English word, but also an active macro
without arguments. When processing plain text, the word might appear in
normal text and be unintentionally swallowed as a macro invocation. One
-way to avoid this is to use the `-P' option to rename all builtins
+way to avoid this is to use the '-P' option to rename all builtins
(*note Invoking m4: Operation modes.). Another is to write a wrapper
that requires a parameter to be recognized.
@@ -4322,9 +4325,9 @@ File: m4.info, Node: Undivert, Next: Divnum, Prev: Divert, Up: Diversions
10.2 Undiverting output
=======================
-Diverted text can be undiverted explicitly using the builtin `undivert':
+Diverted text can be undiverted explicitly using the builtin 'undivert':
- -- Builtin: undivert ([DIVERSIONS...])
+ -- Builtin: undivert ([DIVERSIONS...]
Undiverts the numeric DIVERSIONS given by the arguments, in the
order given. If no arguments are supplied, all diversions are
undiverted, in numerical order.
@@ -4334,7 +4337,7 @@ Diverted text can be undiverted explicitly using the builtin `undivert':
without expansion. A warning is issued if a file could not be
opened.
- The expansion of `undivert' is void.
+ The expansion of 'undivert' is void.
divert(`1')
This text is diverted.
@@ -4348,14 +4351,14 @@ Diverted text can be undiverted explicitly using the builtin `undivert':
=>
Notice the last two blank lines. One of them comes from the newline
-following `undivert', the other from the newline that followed the
-`divert'! A diversion often starts with a blank line like this.
+following 'undivert', the other from the newline that followed the
+'divert'! A diversion often starts with a blank line like this.
- When diverted text is undiverted, it is _not_ reread by `m4', but
-rather copied directly to the current output, and it is therefore not
-an error to undivert into a diversion. Undiverting the empty string is
-the same as specifying diversion 0; in either case nothing happens
-since the output has already been flushed.
+ When diverted text is undiverted, it is _not_ reread by 'm4', but
+rather copied directly to the current output, and it is therefore not an
+error to undivert into a diversion. Undiverting the empty string is the
+same as specifying diversion 0; in either case nothing happens since the
+output has already been flushed.
divert(`1')diverted text
divert
@@ -4405,10 +4408,10 @@ not get rearranged among the other diversions.
=>one
=>three
- GNU `m4' allows named files to be undiverted. Given a non-numeric
+ GNU 'm4' allows named files to be undiverted. Given a non-numeric
argument, the contents of the file named will be copied, uninterpreted,
-to the current output. This complements the builtin `include' (*note
-Include::). To illustrate the difference, assume the file `foo'
+to the current output. This complements the builtin 'include' (*note
+Include::). To illustrate the difference, assume the file 'foo'
contains:
$ cat foo
@@ -4426,8 +4429,8 @@ then
=>
If the file is not found (or cannot be read), an error message is
-issued, and the expansion is void. It is possible to intermix files
-and diversion numbers.
+issued, and the expansion is void. It is possible to intermix files and
+diversion numbers.
divert(`1')diversion one
divert(`2')undivert(`foo')dnl
@@ -4445,7 +4448,7 @@ File: m4.info, Node: Divnum, Next: Cleardivert, Prev: Undivert, Up: Diversio
10.3 Diversion numbers
======================
-The current diversion is tracked by the builtin `divnum':
+The current diversion is tracked by the builtin 'divnum':
-- Builtin: divnum
Expands to the number of the current diversion.
@@ -4472,8 +4475,8 @@ Often it is not known, when output is diverted, whether the diverted
text is actually needed. Since all non-empty diversion are brought back
on the main output stream when the end of input is seen, a method of
discarding a diversion is needed. If all diversions should be
-discarded, the easiest is to end the input to `m4' with `divert(`-1')'
-followed by an explicit `undivert':
+discarded, the easiest is to end the input to 'm4' with 'divert(`-1')'
+followed by an explicit 'undivert':
divert(`1')
Diversion one: divnum
@@ -4487,14 +4490,14 @@ No output is produced at all.
Clearing selected diversions can be done with the following macro:
- -- Composite: cleardivert ([DIVERSIONS...])
+ -- Composite: cleardivert ([DIVERSIONS...]
Discard the contents of each of the listed numeric DIVERSIONS.
define(`cleardivert',
`pushdef(`_n', divnum)divert(`-1')undivert($@)divert(_n)popdef(`_n')')
=>
- It is called just like `undivert', but the effect is to clear the
+ It is called just like 'undivert', but the effect is to clear the
diversions, given by the arguments. (This macro has a nasty bug! You
should try to see if you can find it and correct it; or *note Answers:
Improved cleardivert.).
@@ -4505,7 +4508,7 @@ File: m4.info, Node: Text handling, Next: Arithmetic, Prev: Diversions, Up:
11 Macros for text handling
***************************
-There are a number of builtins in `m4' for manipulating text in various
+There are a number of builtins in 'm4' for manipulating text in various
ways, extracting substrings, searching, substituting, and so on.
* Menu:
@@ -4524,12 +4527,12 @@ File: m4.info, Node: Len, Next: Index macro, Up: Text handling
11.1 Calculating length of strings
==================================
-The length of a string can be calculated by `len':
+The length of a string can be calculated by 'len':
-- Builtin: len (STRING)
Expands to the length of STRING, as a decimal number.
- The macro `len' is recognized only with parameters.
+ The macro 'len' is recognized only with parameters.
len()
=>0
@@ -4542,14 +4545,14 @@ File: m4.info, Node: Index macro, Next: Regexp, Prev: Len, Up: Text handling
11.2 Searching for substrings
=============================
-Searching for substrings is done with `index':
+Searching for substrings is done with 'index':
-- Builtin: index (STRING, SUBSTRING)
Expands to the index of the first occurrence of SUBSTRING in
STRING. The first character in STRING has index 0. If SUBSTRING
- does not occur in STRING, `index' expands to `-1'.
+ does not occur in STRING, 'index' expands to '-1'.
- The macro `index' is recognized only with parameters.
+ The macro 'index' is recognized only with parameters.
index(`gnus, gnats, and armadillos', `nat')
=>7
@@ -4560,7 +4563,7 @@ Searching for substrings is done with `index':
contrast this with an empty SUBSTRING.
index(`abc')
- error-->m4:stdin:1: Warning: too few arguments to builtin `index'
+ error->m4:stdin:1: Warning: too few arguments to builtin `index'
=>0
index(`abc', `')
=>0
@@ -4573,30 +4576,30 @@ File: m4.info, Node: Regexp, Next: Substr, Prev: Index macro, Up: Text handl
11.3 Searching for regular expressions
======================================
-Searching for regular expressions is done with the builtin `regexp':
+Searching for regular expressions is done with the builtin 'regexp':
- -- Builtin: regexp (STRING, REGEXP, [REPLACEMENT])
+ -- Builtin: regexp (STRING, REGEXP, [REPLACEMENT]
Searches for REGEXP in STRING. The syntax for regular expressions
- is the same as in GNU Emacs, which is similar to BRE, Basic
- Regular Expressions in POSIX. *Note Syntax of Regular
- Expressions: (emacs)Regexps. Support for ERE, Extended Regular
- Expressions is not available, but will be added in GNU M4 2.0.
-
- If REPLACEMENT is omitted, `regexp' expands to the index of the
- first match of REGEXP in STRING. If REGEXP does not match
- anywhere in STRING, it expands to -1.
-
- If REPLACEMENT is supplied, and there was a match, `regexp'
- changes the expansion to this argument, with `\N' substituted by
- the text matched by the Nth parenthesized sub-expression of
- REGEXP, up to nine sub-expressions. The escape `\&' is replaced
- by the text of the entire regular expression matched. For all
- other characters, `\' treats the next character literally. A
- warning is issued if there were fewer sub-expressions than the
- `\N' requested, or if there is a trailing `\'. If there was no
- match, `regexp' expands to the empty string.
-
- The macro `regexp' is recognized only with parameters.
+ is the same as in GNU Emacs, which is similar to BRE, Basic Regular
+ Expressions in POSIX. *Note Syntax of Regular Expressions:
+ (emacs)Regexps. Support for ERE, Extended Regular Expressions is
+ not available, but will be added in GNU M4 2.0.
+
+ If REPLACEMENT is omitted, 'regexp' expands to the index of the
+ first match of REGEXP in STRING. If REGEXP does not match anywhere
+ in STRING, it expands to -1.
+
+ If REPLACEMENT is supplied, and there was a match, 'regexp' changes
+ the expansion to this argument, with '\N' substituted by the text
+ matched by the Nth parenthesized sub-expression of REGEXP, up to
+ nine sub-expressions. The escape '\&' is replaced by the text of
+ the entire regular expression matched. For all other characters,
+ '\' treats the next character literally. A warning is issued if
+ there were fewer sub-expressions than the '\N' requested, or if
+ there is a trailing '\'. If there was no match, 'regexp' expands
+ to the empty string.
+
+ The macro 'regexp' is recognized only with parameters.
regexp(`GNUs not Unix', `\<[a-z]\w+')
=>5
@@ -4612,20 +4615,20 @@ Searching for regular expressions is done with the builtin `regexp':
regexp(`abc', `\(b\)', `\\\10\a')
=>\b0a
regexp(`abc', `b', `\1\')
- error-->m4:stdin:2: Warning: sub-expression 1 not present
- error-->m4:stdin:2: Warning: trailing \ ignored in replacement
+ error->m4:stdin:2: Warning: sub-expression 1 not present
+ error->m4:stdin:2: Warning: trailing \ ignored in replacement
=>
regexp(`abc', `\(\(d\)?\)\(c\)', `\1\2\3\4\5\6')
- error-->m4:stdin:3: Warning: sub-expression 4 not present
- error-->m4:stdin:3: Warning: sub-expression 5 not present
- error-->m4:stdin:3: Warning: sub-expression 6 not present
+ error->m4:stdin:3: Warning: sub-expression 4 not present
+ error->m4:stdin:3: Warning: sub-expression 5 not present
+ error->m4:stdin:3: Warning: sub-expression 6 not present
=>c
- Omitting REGEXP evokes a warning, but still produces output;
-contrast this with an empty REGEXP argument.
+ Omitting REGEXP evokes a warning, but still produces output; contrast
+this with an empty REGEXP argument.
regexp(`abc')
- error-->m4:stdin:1: Warning: too few arguments to builtin `regexp'
+ error->m4:stdin:1: Warning: too few arguments to builtin `regexp'
=>0
regexp(`abc', `')
=>0
@@ -4638,17 +4641,16 @@ File: m4.info, Node: Substr, Next: Translit, Prev: Regexp, Up: Text handling
11.4 Extracting substrings
==========================
-Substrings are extracted with `substr':
+Substrings are extracted with 'substr':
- -- Builtin: substr (STRING, FROM, [LENGTH])
- Expands to the substring of STRING, which starts at index FROM,
- and extends for LENGTH characters, or to the end of STRING, if
- LENGTH is omitted. The starting index of a string is always 0.
- The expansion is empty if there is an error parsing FROM or
- LENGTH, if FROM is beyond the end of STRING, or if LENGTH is
- negative.
+ -- Builtin: substr (STRING, FROM, [LENGTH]
+ Expands to the substring of STRING, which starts at index FROM, and
+ extends for LENGTH characters, or to the end of STRING, if LENGTH
+ is omitted. The starting index of a string is always 0. The
+ expansion is empty if there is an error parsing FROM or LENGTH, if
+ FROM is beyond the end of STRING, or if LENGTH is negative.
- The macro `substr' is recognized only with parameters.
+ The macro 'substr' is recognized only with parameters.
substr(`gnus, gnats, and armadillos', `6')
=>gnats, and armadillos
@@ -4658,10 +4660,10 @@ Substrings are extracted with `substr':
Omitting FROM evokes a warning, but still produces output.
substr(`abc')
- error-->m4:stdin:1: Warning: too few arguments to builtin `substr'
+ error->m4:stdin:1: Warning: too few arguments to builtin `substr'
=>abc
substr(`abc',)
- error-->m4:stdin:2: empty string treated as 0 in builtin `substr'
+ error->m4:stdin:2: empty string treated as 0 in builtin `substr'
=>abc

@@ -4670,9 +4672,9 @@ File: m4.info, Node: Translit, Next: Patsubst, Prev: Substr, Up: Text handli
11.5 Translating characters
===========================
-Character translation is done with `translit':
+Character translation is done with 'translit':
- -- Builtin: translit (STRING, CHARS, [REPLACEMENT])
+ -- Builtin: translit (STRING, CHARS, [REPLACEMENT]
Expands to STRING, with each character that occurs in CHARS
translated into the character from REPLACEMENT with the same index.
@@ -4686,18 +4688,18 @@ Character translation is done with `translit':
characters in REPLACEMENT also appear in CHARS.
As a GNU extension, both CHARS and REPLACEMENT can contain
- character-ranges, e.g., `a-z' (meaning all lowercase letters) or
- `0-9' (meaning all digits). To include a dash `-' in CHARS or
- REPLACEMENT, place it first or last in the entire string, or as
- the last character of a range. Back-to-back ranges can share a
- common endpoint. It is not an error for the last character in the
- range to be `larger' than the first. In that case, the range runs
- backwards, i.e., `9-0' means the string `9876543210'. The
+ character-ranges, e.g., 'a-z' (meaning all lowercase letters) or
+ '0-9' (meaning all digits). To include a dash '-' in CHARS or
+ REPLACEMENT, place it first or last in the entire string, or as the
+ last character of a range. Back-to-back ranges can share a common
+ endpoint. It is not an error for the last character in the range
+ to be 'larger' than the first. In that case, the range runs
+ backwards, i.e., '9-0' means the string '9876543210'. The
expansion of a range is dependent on the underlying encoding of
characters, so using ranges is not always portable between
machines.
- The macro `translit' is recognized only with parameters.
+ The macro 'translit' is recognized only with parameters.
translit(`GNUs not Unix', `A-Z')
=>s not nix
@@ -4712,18 +4714,17 @@ Character translation is done with `translit':
In the ASCII encoding, the first example deletes all uppercase
letters, the second converts lowercase to uppercase, and the third
-`mirrors' all uppercase letters, while converting them to lowercase.
+'mirrors' all uppercase letters, while converting them to lowercase.
The two first cases are by far the most common, even though they are not
-portable to EBCDIC or other encodings. The fourth example shows a
-range ending in `-', as well as back-to-back ranges. The final example
-shows that `a' is mapped to `b', not `c'; the resulting `b' is not
-further remapped to `g'; the `d' and `e' are swapped, and the `f' is
-discarded.
+portable to EBCDIC or other encodings. The fourth example shows a range
+ending in '-', as well as back-to-back ranges. The final example shows
+that 'a' is mapped to 'b', not 'c'; the resulting 'b' is not further
+remapped to 'g'; the 'd' and 'e' are swapped, and the 'f' is discarded.
Omitting CHARS evokes a warning, but still produces output.
translit(`abc')
- error-->m4:stdin:1: Warning: too few arguments to builtin `translit'
+ error->m4:stdin:1: Warning: too few arguments to builtin `translit'
=>abc

@@ -4732,33 +4733,33 @@ File: m4.info, Node: Patsubst, Next: Format, Prev: Translit, Up: Text handli
11.6 Substituting text by regular expression
============================================
-Global substitution in a string is done by `patsubst':
+Global substitution in a string is done by 'patsubst':
- -- Builtin: patsubst (STRING, REGEXP, [REPLACEMENT])
+ -- Builtin: patsubst (STRING, REGEXP, [REPLACEMENT]
Searches STRING for matches of REGEXP, and substitutes REPLACEMENT
for each match. The syntax for regular expressions is the same as
in GNU Emacs (*note Regexp::).
- The parts of STRING that are not covered by any match of REGEXP
- are copied to the expansion. Whenever a match is found, the
- search proceeds from the end of the match, so a character from
- STRING will never be substituted twice. If REGEXP matches a
- string of zero length, the start position for the search is
- incremented, to avoid infinite loops.
+ The parts of STRING that are not covered by any match of REGEXP are
+ copied to the expansion. Whenever a match is found, the search
+ proceeds from the end of the match, so a character from STRING will
+ never be substituted twice. If REGEXP matches a string of zero
+ length, the start position for the search is incremented, to avoid
+ infinite loops.
When a replacement is to be made, REPLACEMENT is inserted into the
- expansion, with `\N' substituted by the text matched by the Nth
+ expansion, with '\N' substituted by the text matched by the Nth
parenthesized sub-expression of PATSUBST, for up to nine
- sub-expressions. The escape `\&' is replaced by the text of the
- entire regular expression matched. For all other characters, `\'
+ sub-expressions. The escape '\&' is replaced by the text of the
+ entire regular expression matched. For all other characters, '\'
treats the next character literally. A warning is issued if there
- were fewer sub-expressions than the `\N' requested, or if there is
- a trailing `\'.
+ were fewer sub-expressions than the '\N' requested, or if there is
+ a trailing '\'.
The REPLACEMENT argument can be omitted, in which case the text
matched by REGEXP is deleted.
- The macro `patsubst' is recognized only with parameters.
+ The macro 'patsubst' is recognized only with parameters.
patsubst(`GNUs not Unix', `^', `OBS: ')
=>OBS: GNUs not Unix
@@ -4771,23 +4772,23 @@ Global substitution in a string is done by `patsubst':
patsubst(`GNUs not Unix', `[A-Z][a-z]+')
=>GN not
patsubst(`GNUs not Unix', `not', `NOT\')
- error-->m4:stdin:6: Warning: trailing \ ignored in replacement
+ error->m4:stdin:6: Warning: trailing \ ignored in replacement
=>GNUs NOT Unix
Here is a slightly more realistic example, which capitalizes
individual words or whole sentences, by substituting calls of the macros
-`upcase' and `downcase' into the strings.
+'upcase' and 'downcase' into the strings.
-- Composite: upcase (TEXT)
-- Composite: downcase (TEXT)
-- Composite: capitalize (TEXT)
- Expand to TEXT, but with capitalization changed: `upcase' changes
- all letters to upper case, `downcase' changes all letters to lower
- case, and `capitalize' changes the first character of each word to
+ Expand to TEXT, but with capitalization changed: 'upcase' changes
+ all letters to upper case, 'downcase' changes all letters to lower
+ case, and 'capitalize' changes the first character of each word to
upper case and the remaining characters to lower case.
First, an example of their usage, using implementations distributed
-in `m4-1.4.16/examples/capitalize.m4'.
+in 'm4-1.4.17/examples/capitalize.m4'.
$ m4 -I examples
include(`capitalize.m4')
@@ -4799,10 +4800,10 @@ in `m4-1.4.16/examples/capitalize.m4'.
capitalize(`GNUs not Unix')
=>Gnus Not Unix
- Now for the implementation. There is a helper macro `_capitalize'
-which puts only its first word in mixed case. Then `capitalize' merely
+ Now for the implementation. There is a helper macro '_capitalize'
+which puts only its first word in mixed case. Then 'capitalize' merely
parses out the words, and replaces them with an invocation of
-`_capitalize'. (As presented here, the `capitalize' macro has some
+'_capitalize'. (As presented here, the 'capitalize' macro has some
subtle flaws. You should try to see if you can find and correct them;
or *note Answers: Improved capitalize.).
@@ -4821,8 +4822,8 @@ or *note Answers: Improved capitalize.).
=>define(`capitalize', `patsubst(`$1', `\w+', `_$0(`\&')')')
=>divert`'dnl
- While `regexp' replaces the whole input with the replacement as soon
-as there is a match, `patsubst' replaces each _occurrence_ of a match
+ While 'regexp' replaces the whole input with the replacement as soon
+as there is a match, 'patsubst' replaces each _occurrence_ of a match
and preserves non-matching pieces:
define(`patreg',
@@ -4835,11 +4836,11 @@ and preserves non-matching pieces:
=>bab abb 212
=>bab
- Omitting REGEXP evokes a warning, but still produces output;
-contrast this with an empty REGEXP argument.
+ Omitting REGEXP evokes a warning, but still produces output; contrast
+this with an empty REGEXP argument.
patsubst(`abc')
- error-->m4:stdin:1: Warning: too few arguments to builtin `patsubst'
+ error->m4:stdin:1: Warning: too few arguments to builtin `patsubst'
=>abc
patsubst(`abc', `')
=>abc
@@ -4852,15 +4853,15 @@ File: m4.info, Node: Format, Prev: Patsubst, Up: Text handling
11.7 Formatting strings (printf-like)
=====================================
-Formatted output can be made with `format':
+Formatted output can be made with 'format':
-- Builtin: format (FORMAT-STRING, ...)
- Works much like the C function `printf'. The first argument
- FORMAT-STRING can contain `%' specifications which are satisfied
- by additional arguments, and the expansion of `format' is the
+ Works much like the C function 'printf'. The first argument
+ FORMAT-STRING can contain '%' specifications which are satisfied by
+ additional arguments, and the expansion of 'format' is the
formatted string.
- The macro `format' is recognized only with parameters.
+ The macro 'format' is recognized only with parameters.
Its use is best described by a few examples:
@@ -4885,8 +4886,8 @@ Formatted output can be made with `format':
format(`%g', `0xa.P+1')
=>20
- Using the `forloop' macro defined earlier (*note Forloop::), this
-example shows how `format' can be used to produce tabular output.
+ Using the 'forloop' macro defined earlier (*note Forloop::), this
+example shows how 'format' can be used to produce tabular output.
$ m4 -I examples
include(`forloop.m4')
@@ -4905,27 +4906,27 @@ example shows how `format' can be used to produce tabular output.
=> 10 squared is 100
=>
- The builtin `format' is modeled after the ANSI C `printf' function,
-and supports these `%' specifiers: `c', `s', `d', `o', `x', `X', `u',
-`a', `A', `e', `E', `f', `F', `g', `G', and `%'; it supports field
-widths and precisions, and the flags `+', `-', ` ', `0', `#', and `''.
-For integer specifiers, the width modifiers `hh', `h', and `l' are
-recognized, and for floating point specifiers, the width modifier `l'
-is recognized. Items not yet supported include positional arguments,
-the `n', `p', `S', and `C' specifiers, the `z', `t', `j', `L' and `ll'
-modifiers, and any platform extensions available in the native
-`printf'. For more details on the functioning of `printf', see the C
-Library Manual, or the POSIX specification (for example, `%a' is
-supported even on platforms that haven't yet implemented C99
-hexadecimal floating point output natively).
+ The builtin 'format' is modeled after the ANSI C 'printf' function,
+and supports these '%' specifiers: 'c', 's', 'd', 'o', 'x', 'X', 'u',
+'a', 'A', 'e', 'E', 'f', 'F', 'g', 'G', and '%'; it supports field
+widths and precisions, and the flags '+', '-', ' ', '0', '#', and '''.
+For integer specifiers, the width modifiers 'hh', 'h', and 'l' are
+recognized, and for floating point specifiers, the width modifier 'l' is
+recognized. Items not yet supported include positional arguments, the
+'n', 'p', 'S', and 'C' specifiers, the 'z', 't', 'j', 'L' and 'll'
+modifiers, and any platform extensions available in the native 'printf'.
+For more details on the functioning of 'printf', see the C Library
+Manual, or the POSIX specification (for example, '%a' is supported even
+on platforms that haven't yet implemented C99 hexadecimal floating point
+output natively).
Unrecognized specifiers result in a warning. It is anticipated that
-a future release of GNU `m4' will support more specifiers, and give
+a future release of GNU 'm4' will support more specifiers, and give
better warnings when various problems such as overflow are encountered.
Likewise, escape sequences are not yet recognized.
format(`%p', `0')
- error-->m4:stdin:1: Warning: unrecognized specifier in `%p'
+ error->m4:stdin:1: Warning: unrecognized specifier in `%p'
=>

@@ -4934,7 +4935,7 @@ File: m4.info, Node: Arithmetic, Next: Shell commands, Prev: Text handling,
12 Macros for doing arithmetic
******************************
-Integer arithmetic is included in `m4', with a C-like syntax. As
+Integer arithmetic is included in 'm4', with a C-like syntax. As
convenient shorthands, there are builtins for simple increment and
decrement operations.
@@ -4950,7 +4951,7 @@ File: m4.info, Node: Incr, Next: Eval, Up: Arithmetic
======================================
Increment and decrement of integers are supported using the builtins
-`incr' and `decr':
+'incr' and 'decr':
-- Builtin: incr (NUMBER)
-- Builtin: decr (NUMBER)
@@ -4958,17 +4959,17 @@ Increment and decrement of integers are supported using the builtins
decremented, respectively, by one. Except for the empty string,
the expansion is empty if NUMBER could not be parsed.
- The macros `incr' and `decr' are recognized only with parameters.
+ The macros 'incr' and 'decr' are recognized only with parameters.
incr(`4')
=>5
decr(`7')
=>6
incr()
- error-->m4:stdin:3: empty string treated as 0 in builtin `incr'
+ error->m4:stdin:3: empty string treated as 0 in builtin `incr'
=>1
decr()
- error-->m4:stdin:4: empty string treated as 0 in builtin `decr'
+ error->m4:stdin:4: empty string treated as 0 in builtin `decr'
=>-1

@@ -4977,98 +4978,86 @@ File: m4.info, Node: Eval, Prev: Incr, Up: Arithmetic
12.2 Evaluating integer expressions
===================================
-Integer expressions are evaluated with `eval':
+Integer expressions are evaluated with 'eval':
- -- Builtin: eval (EXPRESSION, [RADIX = `10'], [WIDTH])
+ -- Builtin: eval (EXPRESSION, [RADIX = '10']
Expands to the value of EXPRESSION. The expansion is empty if a
problem is encountered while parsing the arguments. If specified,
RADIX and WIDTH control the format of the output.
Calculations are done with 32-bit signed numbers. Overflow
- silently results in wraparound. A warning is issued if division
- by zero is attempted, or if EXPRESSION could not be parsed.
+ silently results in wraparound. A warning is issued if division by
+ zero is attempted, or if EXPRESSION could not be parsed.
Expressions can contain the following operators, listed in order of
decreasing precedence.
- `()'
+ '()'
Parentheses
-
- `+ - ~ !'
+ '+ - ~ !'
Unary plus and minus, and bitwise and logical negation
-
- `**'
+ '**'
Exponentiation
-
- `* / %'
+ '* / %'
Multiplication, division, and modulo
-
- `+ -'
+ '+ -'
Addition and subtraction
-
- `<< >>'
+ '<< >>'
Shift left or right
-
- `> >= < <='
+ '> >= < <='
Relational operators
-
- `== !='
+ '== !='
Equality operators
-
- `&'
+ '&'
Bitwise and
-
- `^'
+ '^'
Bitwise exclusive-or
-
- `|'
+ '|'
Bitwise or
-
- `&&'
+ '&&'
Logical and
-
- `||'
+ '||'
Logical or
- The macro `eval' is recognized only with parameters.
+ The macro 'eval' is recognized only with parameters.
All binary operators, except exponentiation, are left associative. C
-operators that perform variable assignment, such as `+=' or `--', are
-not implemented, since `eval' only operates on constants, not
-variables. Attempting to use them results in an error. However, since
-traditional implementations treated `=' as an undocumented alias for
-`==' as opposed to an assignment operator, this usage is supported as a
-special case. Be aware that a future version of GNU M4 may support
-assignment semantics as an extension when POSIX mode is not requested,
-and that using `=' to check equality is not portable.
+operators that perform variable assignment, such as '+=' or '--', are
+not implemented, since 'eval' only operates on constants, not variables.
+Attempting to use them results in an error. However, since traditional
+implementations treated '=' as an undocumented alias for '==' as opposed
+to an assignment operator, this usage is supported as a special case.
+Be aware that a future version of GNU M4 may support assignment
+semantics as an extension when POSIX mode is not requested, and that
+using '=' to check equality is not portable.
eval(`2 = 2')
- error-->m4:stdin:1: Warning: recommend ==, not =, for equality operator
+ error->m4:stdin:1: Warning: recommend ==, not =, for equality operator
=>1
eval(`++0')
- error-->m4:stdin:2: invalid operator in eval: ++0
+ error->m4:stdin:2: invalid operator in eval: ++0
=>
eval(`0 |= 1')
- error-->m4:stdin:3: invalid operator in eval: 0 |= 1
+ error->m4:stdin:3: invalid operator in eval: 0 |= 1
=>
- Note that some older `m4' implementations use `^' as an alternate
+ Note that some older 'm4' implementations use '^' as an alternate
operator for the exponentiation, although POSIX requires the C behavior
-of bitwise exclusive-or. The precedence of the negation operators, `~'
-and `!', was traditionally lower than equality. The unary operators
+of bitwise exclusive-or. The precedence of the negation operators, '~'
+and '!', was traditionally lower than equality. The unary operators
could not be used reliably more than once on the same term without
intervening parentheses. The traditional precedence of the equality
-operators `==' and `!=' was identical instead of lower than the
-relational operators such as `<', even through GNU M4 1.4.8. Starting
-with version 1.4.9, GNU M4 correctly follows POSIX precedence rules.
-M4 scripts designed to be portable between releases must be aware that
+operators '==' and '!=' was identical instead of lower than the
+relational operators such as '<', even through GNU M4 1.4.8. Starting
+with version 1.4.9, GNU M4 correctly follows POSIX precedence rules. M4
+scripts designed to be portable between releases must be aware that
parentheses may be required to enforce C precedence rules. Likewise,
division by zero, even in the unused branch of a short-circuiting
operator, is not always well-defined in other implementations.
Following are some examples where the current version of M4 follows C
precedence rules, but where older versions and some other
-implementations of `m4' require explicit parentheses to get the correct
+implementations of 'm4' require explicit parentheses to get the correct
result:
eval(`1 == 2 > 0')
@@ -5088,15 +5077,15 @@ result:
eval(`2 || 1 / 0')
=>1
eval(`0 || 1 / 0')
- error-->m4:stdin:9: divide by zero in eval: 0 || 1 / 0
+ error->m4:stdin:9: divide by zero in eval: 0 || 1 / 0
=>
eval(`0 && 1 % 0')
=>0
eval(`2 && 1 % 0')
- error-->m4:stdin:11: modulo by zero in eval: 2 && 1 % 0
+ error->m4:stdin:11: modulo by zero in eval: 2 && 1 % 0
=>
- As a GNU extension, the operator `**' performs integral
+ As a GNU extension, the operator '**' performs integral
exponentiation. The operator is right-associative, and if evaluated,
the exponent must be non-negative, and at least one of the arguments
must be non-zero, or a warning is issued.
@@ -5111,28 +5100,28 @@ must be non-zero, or a warning is issued.
=>1
eval(`0 ** 0')
=>
- error-->m4:stdin:5: divide by zero in eval: 0 ** 0
+ error->m4:stdin:5: divide by zero in eval: 0 ** 0
eval(`4 ** -2')
- error-->m4:stdin:6: negative exponent in eval: 4 ** -2
+ error->m4:stdin:6: negative exponent in eval: 4 ** -2
=>
Within EXPRESSION, (but not RADIX or WIDTH), numbers without a
-special prefix are decimal. A simple `0' prefix introduces an octal
-number. `0x' introduces a hexadecimal number. As GNU extensions, `0b'
-introduces a binary number. `0r' introduces a number expressed in any
-radix between 1 and 36: the prefix should be immediately followed by
-the decimal expression of the radix, a colon, then the digits making
-the number. For radix 1, leading zeros are ignored, and all remaining
-digits must be `1'; for all other radices, the digits are `0', `1', `2',
-.... Beyond `9', the digits are `a', `b' ... up to `z'. Lower and
+special prefix are decimal. A simple '0' prefix introduces an octal
+number. '0x' introduces a hexadecimal number. As GNU extensions, '0b'
+introduces a binary number. '0r' introduces a number expressed in any
+radix between 1 and 36: the prefix should be immediately followed by the
+decimal expression of the radix, a colon, then the digits making the
+number. For radix 1, leading zeros are ignored, and all remaining
+digits must be '1'; for all other radices, the digits are '0', '1', '2',
+.... Beyond '9', the digits are 'a', 'b' ... up to 'z'. Lower and
upper case letters can be used interchangeably in numbers prefixes and
as number digits.
- Parentheses may be used to group subexpressions whenever needed.
-For the relational operators, a true relation returns `1', and a false
-relation return `0'.
+ Parentheses may be used to group subexpressions whenever needed. For
+the relational operators, a true relation returns '1', and a false
+relation return '0'.
- Here are a few examples of use of `eval'.
+ Here are a few examples of use of 'eval'.
eval(`-3 * 5')
=>-15
@@ -5155,17 +5144,17 @@ relation return `0'.
define(`foo', `666')
=>
eval(`foo / 6')
- error-->m4:stdin:11: bad expression in eval: foo / 6
+ error->m4:stdin:11: bad expression in eval: foo / 6
=>
eval(foo / 6)
=>111
- As the last two lines show, `eval' does not handle macro names, even
+ As the last two lines show, 'eval' does not handle macro names, even
if they expand to a valid expression (or part of a valid expression).
-Therefore all macros must be expanded before they are passed to `eval'.
+Therefore all macros must be expanded before they are passed to 'eval'.
Some calculations are not portable to other implementations, since
-they have undefined semantics in C, but GNU `m4' has well-defined
+they have undefined semantics in C, but GNU 'm4' has well-defined
behavior on overflow. When shifting, an out-of-range shift amount is
implicitly brought into the range of 32-bit signed integers using an
implicit bit-wise and with 0x1f).
@@ -5192,13 +5181,13 @@ implicit bit-wise and with 0x1f).
If RADIX is specified, it specifies the radix to be used in the
expansion. The default radix is 10; this is also the case if RADIX is
the empty string. A warning results if the radix is outside the range
-of 1 through 36, inclusive. The result of `eval' is always taken to be
-signed. No radix prefix is output, and for radices greater than 10,
-the digits are lower case. The WIDTH argument specifies the minimum
-output width, excluding any negative sign. The result is zero-padded
-to extend the expansion to the requested width. A warning results if
-the width is negative. If RADIX or WIDTH is out of bounds, the
-expansion of `eval' is empty.
+of 1 through 36, inclusive. The result of 'eval' is always taken to be
+signed. No radix prefix is output, and for radices greater than 10, the
+digits are lower case. The WIDTH argument specifies the minimum output
+width, excluding any negative sign. The result is zero-padded to extend
+the expansion to the requested width. A warning results if the width is
+negative. If RADIX or WIDTH is out of bounds, the expansion of 'eval'
+is empty.
eval(`666', `10')
=>666
@@ -5217,13 +5206,13 @@ expansion of `eval' is empty.
eval(`10', `16')
=>a
eval(`1', `37')
- error-->m4:stdin:9: radix 37 in builtin `eval' out of range
+ error->m4:stdin:9: radix 37 in builtin `eval' out of range
=>
eval(`1', , `-1')
- error-->m4:stdin:10: negative width to builtin `eval'
+ error->m4:stdin:10: negative width to builtin `eval'
=>
eval()
- error-->m4:stdin:11: empty string treated as 0 in builtin `eval'
+ error->m4:stdin:11: empty string treated as 0 in builtin `eval'
=>0

@@ -5232,14 +5221,14 @@ File: m4.info, Node: Shell commands, Next: Miscellaneous, Prev: Arithmetic,
13 Macros for running shell commands
************************************
-There are a few builtin macros in `m4' that allow you to run shell
-commands from within `m4'.
+There are a few builtin macros in 'm4' that allow you to run shell
+commands from within 'm4'.
Note that the definition of a valid shell command is system
-dependent. On UNIX systems, this is the typical `/bin/sh'. But on
+dependent. On UNIX systems, this is the typical '/bin/sh'. But on
other systems, such as native Windows, the shell has a different syntax
of commands that it understands. Some examples in this chapter assume
-`/bin/sh', and also demonstrate how to quit early with a known exit
+'/bin/sh', and also demonstrate how to quit early with a known exit
value if this is not the case.
* Menu:
@@ -5256,8 +5245,8 @@ File: m4.info, Node: Platform macros, Next: Syscmd, Up: Shell commands
13.1 Determining the platform
=============================
-Sometimes it is desirable for an input file to know which platform `m4'
-is running on. GNU `m4' provides several macros that are predefined to
+Sometimes it is desirable for an input file to know which platform 'm4'
+is running on. GNU 'm4' provides several macros that are predefined to
expand to the empty string; checking for their existence will confirm
platform details.
@@ -5268,15 +5257,15 @@ platform details.
-- Optional builtin: unix
-- Optional builtin: __windows__
-- Optional builtin: windows
- Each of these macros is conditionally defined as needed to
- describe the environment of `m4'. If defined, each macro expands
- to the empty string. For now, these macros silently ignore all
- arguments, but in a future release of M4, they might warn if
- arguments are present.
+ Each of these macros is conditionally defined as needed to describe
+ the environment of 'm4'. If defined, each macro expands to the
+ empty string. For now, these macros silently ignore all arguments,
+ but in a future release of M4, they might warn if arguments are
+ present.
When GNU extensions are in effect (that is, when you did not use the
-`-G' option, *note Invoking m4: Limits control.), GNU `m4' will define
-the macro `__gnu__' to expand to the empty string.
+'-G' option, *note Invoking m4: Limits control.), GNU 'm4' will define
+the macro '__gnu__' to expand to the empty string.
$ m4
__gnu__
@@ -5294,17 +5283,17 @@ the macro `__gnu__' to expand to the empty string.
Extensions are ifdef(`__gnu__', `active', `inactive')
=>Extensions are inactive
- On UNIX systems, GNU `m4' will define `__unix__' by default, or
-`unix' when the `-G' option is specified.
+ On UNIX systems, GNU 'm4' will define '__unix__' by default, or
+'unix' when the '-G' option is specified.
- On native Windows systems, GNU `m4' will define `__windows__' by
-default, or `windows' when the `-G' option is specified.
+ On native Windows systems, GNU 'm4' will define '__windows__' by
+default, or 'windows' when the '-G' option is specified.
- On OS/2 systems, GNU `m4' will define `__os2__' by default, or `os2'
-when the `-G' option is specified.
+ On OS/2 systems, GNU 'm4' will define '__os2__' by default, or 'os2'
+when the '-G' option is specified.
- If GNU `m4' does not provide a platform macro for your system,
-please report that as a bug.
+ If GNU 'm4' does not provide a platform macro for your system, please
+report that as a bug.
define(`provided', `0')
=>
@@ -5323,29 +5312,29 @@ File: m4.info, Node: Syscmd, Next: Esyscmd, Prev: Platform macros, Up: Shell
13.2 Executing simple commands
==============================
-Any shell command can be executed, using `syscmd':
+Any shell command can be executed, using 'syscmd':
-- Builtin: syscmd (SHELL-COMMAND)
Executes SHELL-COMMAND as a shell command.
- The expansion of `syscmd' is void, _not_ the output from
- SHELL-COMMAND! Output or error messages from SHELL-COMMAND are
- not read by `m4'. *Note Esyscmd::, if you need to process the
- command output.
+ The expansion of 'syscmd' is void, _not_ the output from
+ SHELL-COMMAND! Output or error messages from SHELL-COMMAND are not
+ read by 'm4'. *Note Esyscmd::, if you need to process the command
+ output.
- Prior to executing the command, `m4' flushes its buffers. The
+ Prior to executing the command, 'm4' flushes its buffers. The
default standard input, output and error of SHELL-COMMAND are the
- same as those of `m4'.
+ same as those of 'm4'.
By default, the SHELL-COMMAND will be used as the argument to the
- `-c' option of the `/bin/sh' shell (or the version of `sh'
- specified by `command -p getconf PATH', if your system supports
- that). If you prefer a different shell, the `configure' script
- can be given the option `--with-syscmd-shell=LOCATION' to set the
- location of an alternative shell at GNU `m4' installation; the
- alternative shell must still support `-c'.
+ '-c' option of the '/bin/sh' shell (or the version of 'sh'
+ specified by 'command -p getconf PATH', if your system supports
+ that). If you prefer a different shell, the 'configure' script can
+ be given the option '--with-syscmd-shell=LOCATION' to set the
+ location of an alternative shell at GNU 'm4' installation; the
+ alternative shell must still support '-c'.
- The macro `syscmd' is recognized only with parameters.
+ The macro 'syscmd' is recognized only with parameters.
define(`foo', `FOO')
=>
@@ -5353,25 +5342,25 @@ Any shell command can be executed, using `syscmd':
=>foo
=>
- Note how the expansion of `syscmd' keeps the trailing newline of the
+ Note how the expansion of 'syscmd' keeps the trailing newline of the
command, as well as using the newline that appeared after the macro.
The following is an example of SHELL-COMMAND using the same standard
-input as `m4':
+input as 'm4':
$ echo "m4wrap(\`syscmd(\`cat')')" | m4
=>
- It tells `m4' to read all of its input before executing the wrapped
+ It tells 'm4' to read all of its input before executing the wrapped
text, then hand a valid (albeit emptied) pipe as standard input for the
-`cat' subcommand. Therefore, you should be careful when using standard
-input (either by specifying no files, or by passing `-' as a file name
+'cat' subcommand. Therefore, you should be careful when using standard
+input (either by specifying no files, or by passing '-' as a file name
on the command line, *note Invoking m4: Command line files.), and also
-invoking subcommands via `syscmd' or `esyscmd' that consume data from
+invoking subcommands via 'syscmd' or 'esyscmd' that consume data from
standard input. When standard input is a seekable file, the subprocess
-will pick up with the next character not yet processed by `m4'; when it
+will pick up with the next character not yet processed by 'm4'; when it
is a pipe or other non-seekable file, there is no guarantee how much
-data will already be buffered by `m4' and thus unavailable to the child.
+data will already be buffered by 'm4' and thus unavailable to the child.

File: m4.info, Node: Esyscmd, Next: Sysval, Prev: Syscmd, Up: Shell commands
@@ -5379,26 +5368,26 @@ File: m4.info, Node: Esyscmd, Next: Sysval, Prev: Syscmd, Up: Shell commands
13.3 Reading the output of commands
===================================
-If you want `m4' to read the output of a shell command, use `esyscmd':
+If you want 'm4' to read the output of a shell command, use 'esyscmd':
-- Builtin: esyscmd (SHELL-COMMAND)
Expands to the standard output of the shell command SHELL-COMMAND.
- Prior to executing the command, `m4' flushes its buffers. The
+ Prior to executing the command, 'm4' flushes its buffers. The
default standard input and standard error of SHELL-COMMAND are the
- same as those of `m4'. The error output of SHELL-COMMAND is not a
+ same as those of 'm4'. The error output of SHELL-COMMAND is not a
part of the expansion: it will appear along with the error output
- of `m4'.
+ of 'm4'.
By default, the SHELL-COMMAND will be used as the argument to the
- `-c' option of the `/bin/sh' shell (or the version of `sh'
- specified by `command -p getconf PATH', if your system supports
- that). If you prefer a different shell, the `configure' script
- can be given the option `--with-syscmd-shell=LOCATION' to set the
- location of an alternative shell at GNU `m4' installation; the
- alternative shell must still support `-c'.
+ '-c' option of the '/bin/sh' shell (or the version of 'sh'
+ specified by 'command -p getconf PATH', if your system supports
+ that). If you prefer a different shell, the 'configure' script can
+ be given the option '--with-syscmd-shell=LOCATION' to set the
+ location of an alternative shell at GNU 'm4' installation; the
+ alternative shell must still support '-c'.
- The macro `esyscmd' is recognized only with parameters.
+ The macro 'esyscmd' is recognized only with parameters.
define(`foo', `FOO')
=>
@@ -5406,11 +5395,11 @@ If you want `m4' to read the output of a shell command, use `esyscmd':
=>FOO
=>
- Note how the expansion of `esyscmd' keeps the trailing newline of
-the command, as well as using the newline that appeared after the macro.
+ Note how the expansion of 'esyscmd' keeps the trailing newline of the
+command, as well as using the newline that appeared after the macro.
- Just as with `syscmd', care must be exercised when sharing standard
-input between `m4' and the child process of `esyscmd'.
+ Just as with 'syscmd', care must be exercised when sharing standard
+input between 'm4' and the child process of 'esyscmd'.

File: m4.info, Node: Sysval, Next: Mkstemp, Prev: Esyscmd, Up: Shell commands
@@ -5418,11 +5407,11 @@ File: m4.info, Node: Sysval, Next: Mkstemp, Prev: Esyscmd, Up: Shell command
13.4 Exit status
================
-To see whether a shell command succeeded, use `sysval':
+To see whether a shell command succeeded, use 'sysval':
-- Builtin: sysval
Expands to the exit status of the last shell command run with
- `syscmd' or `esyscmd'. Expands to 0 if no command has been run
+ 'syscmd' or 'esyscmd'. Expands to 0 if no command has been run
yet.
sysval
@@ -5452,9 +5441,9 @@ To see whether a shell command succeeded, use `sysval':
sysval
=>0
- `sysval' results in 127 if there was a problem executing the
-command, for example, if the system-imposed argument length is exceeded,
-or if there were not enough resources to fork. It is not possible to
+ 'sysval' results in 127 if there was a problem executing the command,
+for example, if the system-imposed argument length is exceeded, or if
+there were not enough resources to fork. It is not possible to
distinguish between failed execution and successful execution that had
an exit status of 127, unless there was output from the child process.
@@ -5486,40 +5475,39 @@ File: m4.info, Node: Mkstemp, Prev: Sysval, Up: Shell commands
13.5 Making temporary files
===========================
-Commands specified to `syscmd' or `esyscmd' might need a temporary
-file, for output or for some other purpose. There is a builtin macro,
-`mkstemp', for making a temporary file:
+Commands specified to 'syscmd' or 'esyscmd' might need a temporary file,
+for output or for some other purpose. There is a builtin macro,
+'mkstemp', for making a temporary file:
-- Builtin: mkstemp (TEMPLATE)
-- Builtin: maketemp (TEMPLATE)
Expands to the quoted name of a new, empty file, made from the
- string TEMPLATE, which should end with the string `XXXXXX'. The
- six `X' characters are then replaced with random characters
- matching the regular expression `[a-zA-Z0-9._-]', in order to make
- the file name unique. If fewer than six `X' characters are found
- at the end of `template', the result will be longer than the
+ string TEMPLATE, which should end with the string 'XXXXXX'. The
+ six 'X' characters are then replaced with random characters
+ matching the regular expression '[a-zA-Z0-9._-]', in order to make
+ the file name unique. If fewer than six 'X' characters are found
+ at the end of 'template', the result will be longer than the
template. The created file will have access permissions as if by
- `chmod =rw,go=', meaning that the current umask of the `m4'
- process is taken into account, and at most only the current user
- can read and write the file.
-
- The traditional behavior, standardized by POSIX, is that
- `maketemp' merely replaces the trailing `X' with the process id,
- without creating a file or quoting the expansion, and without
- ensuring that the resulting string is a unique file name. In
- part, this means that using the same TEMPLATE twice in the same
- input file will result in the same expansion. This behavior is a
- security hole, as it is very easy for another process to guess the
- name that will be generated, and thus interfere with a subsequent
- use of `syscmd' trying to manipulate that file name. Hence, POSIX
- has recommended that all new implementations of `m4' provide the
- secure `mkstemp' builtin, and that users of `m4' check for its
- existence.
+ 'chmod =rw,go=', meaning that the current umask of the 'm4' process
+ is taken into account, and at most only the current user can read
+ and write the file.
+
+ The traditional behavior, standardized by POSIX, is that 'maketemp'
+ merely replaces the trailing 'X' with the process id, without
+ creating a file or quoting the expansion, and without ensuring that
+ the resulting string is a unique file name. In part, this means
+ that using the same TEMPLATE twice in the same input file will
+ result in the same expansion. This behavior is a security hole, as
+ it is very easy for another process to guess the name that will be
+ generated, and thus interfere with a subsequent use of 'syscmd'
+ trying to manipulate that file name. Hence, POSIX has recommended
+ that all new implementations of 'm4' provide the secure 'mkstemp'
+ builtin, and that users of 'm4' check for its existence.
The expansion is void and an error issued if a temporary file could
not be created.
- The macros `mkstemp' and `maketemp' are recognized only with
+ The macros 'mkstemp' and 'maketemp' are recognized only with
parameters.
If you try this next example, you will most likely get different
@@ -5539,16 +5527,16 @@ randomly chosen:
mkstemp(`doc')
=>docQv83Uw
- Unless you use the `--traditional' command line option (or `-G',
-*note Invoking m4: Limits control.), the GNU version of `maketemp' is
+ Unless you use the '--traditional' command line option (or '-G',
+*note Invoking m4: Limits control.), the GNU version of 'maketemp' is
secure. This means that using the same template to multiple calls will
generate multiple files. However, we recommend that you use the new
-`mkstemp' macro, introduced in GNU M4 1.4.8, which is secure even in
+'mkstemp' macro, introduced in GNU M4 1.4.8, which is secure even in
traditional mode. Also, as of M4 1.4.11, the secure implementation
quotes the resulting file name, so that you are guaranteed to know what
file was created even if the random file name happens to match an
-existing macro. Notice that this example is careful to use `defn' to
-avoid unintended expansion of `foo'.
+existing macro. Notice that this example is careful to use 'defn' to
+avoid unintended expansion of 'foo'.
$ m4
define(`foo', `errprint(`oops')')
@@ -5588,7 +5576,7 @@ any of the previous chapters.
* Errprint:: Printing error messages
* Location:: Printing current location
-* M4exit:: Exiting from `m4'
+* M4exit:: Exiting from 'm4'

File: m4.info, Node: Errprint, Next: Location, Up: Miscellaneous
@@ -5596,31 +5584,31 @@ File: m4.info, Node: Errprint, Next: Location, Up: Miscellaneous
14.1 Printing error messages
============================
-You can print error messages using `errprint':
+You can print error messages using 'errprint':
-- Builtin: errprint (MESSAGE, ...)
Prints MESSAGE and the rest of the arguments to standard error,
separated by spaces. Standard error is used, regardless of the
- `--debugfile' option (*note Invoking m4: Debugging options.).
+ '--debugfile' option (*note Invoking m4: Debugging options.).
- The expansion of `errprint' is void. The macro `errprint' is
+ The expansion of 'errprint' is void. The macro 'errprint' is
recognized only with parameters.
errprint(`Invalid arguments to forloop
')
- error-->Invalid arguments to forloop
+ error->Invalid arguments to forloop
=>
errprint(`1')errprint(`2',`3
')
- error-->12 3
+ error->12 3
=>
A trailing newline is _not_ printed automatically, so it should be
supplied as part of the argument, as in the example. Unfortunately, the
-exact output of `errprint' is not very portable to other `m4'
+exact output of 'errprint' is not very portable to other 'm4'
implementations: POSIX requires that all arguments be printed, but some
-implementations of `m4' only print the first. Furthermore, some BSD
-implementations always append a newline for each `errprint' call,
+implementations of 'm4' only print the first. Furthermore, some BSD
+implementations always append a newline for each 'errprint' call,
regardless of whether the last argument already had one, and POSIX is
silent on whether this is acceptable.
@@ -5638,22 +5626,22 @@ builtins exist:
-- Builtin: __program__
Expand to the quoted name of the current input file, the current
input line number in that file, and the quoted name of the current
- invocation of `m4'.
+ invocation of 'm4'.
errprint(__program__:__file__:__line__: `input error
')
- error-->m4:stdin:1: input error
+ error->m4:stdin:1: input error
=>
Line numbers start at 1 for each file. If the file was found due to
-the `-I' option or `M4PATH' environment variable, that is reflected in
-the file name. The syncline option (`-s', *note Invoking m4:
-Preprocessor features.), and the `f' and `l' flags of `debugmode'
-(*note Debug Levels::), also use this notion of current file and line.
+the '-I' option or 'M4PATH' environment variable, that is reflected in
+the file name. The syncline option ('-s', *note Invoking m4:
+Preprocessor features.), and the 'f' and 'l' flags of 'debugmode' (*note
+Debug Levels::), also use this notion of current file and line.
Redefining the three location macros has no effect on syncline, debug,
warning, or error message output.
- This example reuses the file `incl.m4' mentioned earlier (*note
+ This example reuses the file 'incl.m4' mentioned earlier (*note
Include::):
$ m4 -I examples
@@ -5671,8 +5659,8 @@ Include::):
expansion text corresponds to the location in the file where the
expansion was triggered, regardless of how many newline characters the
expansion text contains. As of GNU M4 1.4.8, the location of text
-wrapped with `m4wrap' (*note M4wrap::) is the point at which the
-`m4wrap' was invoked. Previous versions, however, behaved as though
+wrapped with 'm4wrap' (*note M4wrap::) is the point at which the
+'m4wrap' was invoked. Previous versions, however, behaved as though
wrapped text came from line 0 of the file "".
define(`echo', `$@')
@@ -5690,8 +5678,8 @@ wrapped text came from line 0 of the file "".
foo(errprint(__line__
__line__
))
- error-->8
- error-->9
+ error->8
+ error->9
=>8
=>8
__line__
@@ -5704,30 +5692,30 @@ wrapped text came from line 0 of the file "".
=>6
=>6
- The `__program__' macro behaves like `$0' in shell terminology. If
-you invoke `m4' through an absolute path or a link with a different
-spelling, rather than by relying on a `PATH' search for plain `m4', it
-will affect how `__program__' expands. The intent is that you can use
-it to produce error messages with the same formatting that `m4'
-produces internally. It can also be used within `syscmd' (*note
-Syscmd::) to pick the same version of `m4' that is currently running,
-rather than whatever version of `m4' happens to be first in `PATH'. It
-was first introduced in GNU M4 1.4.6.
+ The '__program__' macro behaves like '$0' in shell terminology. If
+you invoke 'm4' through an absolute path or a link with a different
+spelling, rather than by relying on a 'PATH' search for plain 'm4', it
+will affect how '__program__' expands. The intent is that you can use
+it to produce error messages with the same formatting that 'm4' produces
+internally. It can also be used within 'syscmd' (*note Syscmd::) to
+pick the same version of 'm4' that is currently running, rather than
+whatever version of 'm4' happens to be first in 'PATH'. It was first
+introduced in GNU M4 1.4.6.

File: m4.info, Node: M4exit, Prev: Location, Up: Miscellaneous
-14.3 Exiting from `m4'
+14.3 Exiting from 'm4'
======================
-If you need to exit from `m4' before the entire input has been read,
-you can use `m4exit':
+If you need to exit from 'm4' before the entire input has been read, you
+can use 'm4exit':
- -- Builtin: m4exit ([CODE = `0'])
- Causes `m4' to exit, with exit status CODE. If CODE is left out,
+ -- Builtin: m4exit ([CODE = '0']
+ Causes 'm4' to exit, with exit status CODE. If CODE is left out,
the exit status is zero. If CODE cannot be parsed, or is outside
- the range of 0 to 255, the exit status is one. No further input
- is read, and all wrapped and diverted text is discarded.
+ the range of 0 to 255, the exit status is one. No further input is
+ read, and all wrapped and diverted text is discarded.
m4wrap(`This text is lost due to `m4exit'.')
=>
@@ -5748,23 +5736,23 @@ you can use `m4exit':
')m4exit(`1')')
=>
fatal_error(`this is a BAD one, buster')
- error-->m4:stdin:4: fatal error: this is a BAD one, buster
+ error->m4:stdin:4: fatal error: this is a BAD one, buster
- After this macro call, `m4' will exit with exit status 1. This macro
+ After this macro call, 'm4' will exit with exit status 1. This macro
is only intended for error exits, since the normal exit procedures are
not followed, i.e., diverted text is not undiverted, and saved text
(*note M4wrap::) is not reread. (This macro could be made more robust
-to earlier versions of `m4'. You should try to see if you can find
+to earlier versions of 'm4'. You should try to see if you can find
weaknesses and correct them; or *note Answers: Improved fatal_error.).
Note that it is still possible for the exit status to be different
-than what was requested by `m4exit'. If `m4' detects some other error,
+than what was requested by 'm4exit'. If 'm4' detects some other error,
such as a write error on standard output, the exit status will be
-non-zero even if `m4exit' requested zero.
+non-zero even if 'm4exit' requested zero.
If standard input is seekable, then the file will be positioned at
the next unread character. If it is a pipe or other non-seekable file,
-then there are no guarantees how much data `m4' might have read into
+then there are no guarantees how much data 'm4' might have read into
buffers, and thus discarded.

@@ -5773,14 +5761,14 @@ File: m4.info, Node: Frozen files, Next: Compatibility, Prev: Miscellaneous,
15 Fast loading of frozen state
*******************************
-Some bigger `m4' applications may be built over a common base
-containing hundreds of definitions and other costly initializations.
-Usually, the common base is kept in one or more declarative files,
-which files are listed on each `m4' invocation prior to the user's
-input file, or else each input file uses `include'.
+Some bigger 'm4' applications may be built over a common base containing
+hundreds of definitions and other costly initializations. Usually, the
+common base is kept in one or more declarative files, which files are
+listed on each 'm4' invocation prior to the user's input file, or else
+each input file uses 'include'.
Reading the common base of a big application, over and over again,
-may be time consuming. GNU `m4' offers some machinery to speed up the
+may be time consuming. GNU 'm4' offers some machinery to speed up the
start of an application using lengthy common bases.
* Menu:
@@ -5794,14 +5782,14 @@ File: m4.info, Node: Using frozen files, Next: Frozen file format, Up: Frozen
15.1 Using frozen files
=======================
-Suppose a user has a library of `m4' initializations in `base.m4',
-which is then used with multiple input files:
+Suppose a user has a library of 'm4' initializations in 'base.m4', which
+is then used with multiple input files:
$ m4 base.m4 input1.m4
$ m4 base.m4 input2.m4
$ m4 base.m4 input3.m4
- Rather than spending time parsing the fixed contents of `base.m4'
+ Rather than spending time parsing the fixed contents of 'base.m4'
every time, the user might rather execute:
$ m4 -F base.m4f base.m4
@@ -5812,25 +5800,24 @@ once, and further execute, as often as needed:
$ m4 -R base.m4f input2.m4
$ m4 -R base.m4f input3.m4
-with the varying input. The first call, containing the `-F' option,
-only reads and executes file `base.m4', defining various application
+with the varying input. The first call, containing the '-F' option,
+only reads and executes file 'base.m4', defining various application
macros and computing other initializations. Once the input file
-`base.m4' has been completely processed, GNU `m4' produces in
-`base.m4f' a "frozen" file, that is, a file which contains a kind of
-snapshot of the `m4' internal state.
-
- Later calls, containing the `-R' option, are able to reload the
-internal state of `m4', from `base.m4f', _prior_ to reading any other
-input files. This means instead of starting with a virgin copy of
-`m4', input will be read after having effectively recovered the effect
-of a prior run. In our example, the effect is the same as if file
-`base.m4' has been read anew. However, this effect is achieved a lot
-faster.
-
- Only one frozen file may be created or read in any one `m4'
+'base.m4' has been completely processed, GNU 'm4' produces in 'base.m4f'
+a "frozen" file, that is, a file which contains a kind of snapshot of
+the 'm4' internal state.
+
+ Later calls, containing the '-R' option, are able to reload the
+internal state of 'm4', from 'base.m4f', _prior_ to reading any other
+input files. This means instead of starting with a virgin copy of 'm4',
+input will be read after having effectively recovered the effect of a
+prior run. In our example, the effect is the same as if file 'base.m4'
+has been read anew. However, this effect is achieved a lot faster.
+
+ Only one frozen file may be created or read in any one 'm4'
invocation. It is not possible to recover two frozen files at once.
-However, frozen files may be updated incrementally, through using `-R'
-and `-F' options simultaneously. For example, if some care is taken,
+However, frozen files may be updated incrementally, through using '-R'
+and '-F' options simultaneously. For example, if some care is taken,
the command:
$ m4 file1.m4 file2.m4 file3.m4 file4.m4
@@ -5844,28 +5831,28 @@ output:
$ m4 -R file3.m4f file4.m4
Some care is necessary because not every effort has been made for
-this to work in all cases. In particular, the trace attribute of
-macros is not handled, nor the current setting of `changeword'.
-Currently, `m4wrap' and `sysval' also have problems. Also,
-interactions for some options of `m4', being used in one call and not
-in the next, have not been fully analyzed yet. On the other end, you
-may be confident that stacks of `pushdef' definitions are handled
-correctly, as well as undefined or renamed builtins, and changed
-strings for quotes or comments. And future releases of GNU M4 will
-improve on the utility of frozen files.
-
- When an `m4' run is to be frozen, the automatic undiversion which
+this to work in all cases. In particular, the trace attribute of macros
+is not handled, nor the current setting of 'changeword'. Currently,
+'m4wrap' and 'sysval' also have problems. Also, interactions for some
+options of 'm4', being used in one call and not in the next, have not
+been fully analyzed yet. On the other end, you may be confident that
+stacks of 'pushdef' definitions are handled correctly, as well as
+undefined or renamed builtins, and changed strings for quotes or
+comments. And future releases of GNU M4 will improve on the utility of
+frozen files.
+
+ When an 'm4' run is to be frozen, the automatic undiversion which
takes place at end of execution is inhibited. Instead, all positively
numbered diversions are saved into the frozen file. The active
diversion number is also transmitted.
A frozen file to be reloaded need not reside in the current
-directory. It is looked up the same way as an `include' file (*note
+directory. It is looked up the same way as an 'include' file (*note
Search Path::).
- If the frozen file was generated with a newer version of `m4', and
-contains directives that an older `m4' cannot parse, attempting to load
-the frozen file with option `-R' will cause `m4' to exit with status 63
+ If the frozen file was generated with a newer version of 'm4', and
+contains directives that an older 'm4' cannot parse, attempting to load
+the frozen file with option '-R' will cause 'm4' to exit with status 63
to indicate version mismatch.

@@ -5875,80 +5862,79 @@ File: m4.info, Node: Frozen file format, Prev: Using frozen files, Up: Frozen
=======================
Frozen files are sharable across architectures. It is safe to write a
-frozen file on one machine and read it on another, given that the
-second machine uses the same or newer version of GNU `m4'. It is
-conventional, but not required, to give a frozen file the suffix of
-`.m4f'.
+frozen file on one machine and read it on another, given that the second
+machine uses the same or newer version of GNU 'm4'. It is conventional,
+but not required, to give a frozen file the suffix of '.m4f'.
These are simple (editable) text files, made up of directives, each
starting with a capital letter and ending with a newline (<NL>).
-Wherever a directive is expected, the character `#' introduces a
-comment line; empty lines are also ignored if they are not part of an
-embedded string. In the following descriptions, each LEN refers to the
-length of the corresponding strings STR in the next line of input.
-Numbers are always expressed in decimal. There are no escape
-characters. The directives are:
-
-`C LEN1 , LEN2 <NL> STR1 STR2 <NL>'
+Wherever a directive is expected, the character '#' introduces a comment
+line; empty lines are also ignored if they are not part of an embedded
+string. In the following descriptions, each LEN refers to the length of
+the corresponding strings STR in the next line of input. Numbers are
+always expressed in decimal. There are no escape characters. The
+directives are:
+
+'C LEN1 , LEN2 <NL> STR1 STR2 <NL>'
Uses STR1 and STR2 as the begin-comment and end-comment strings.
- If omitted, then `#' and <NL> are the comment delimiters.
+ If omitted, then '#' and <NL> are the comment delimiters.
-`D NUMBER, LEN <NL> STR <NL>'
+'D NUMBER, LEN <NL> STR <NL>'
Selects diversion NUMBER, making it current, then copy STR in the
current diversion. NUMBER may be a negative number for a
- non-existing diversion. To merely specify an active selection,
- use this command with an empty STR. With 0 as the diversion
- NUMBER, STR will be issued on standard output at reload time. GNU
- `m4' will not produce the `D' directive with non-zero length for
+ non-existing diversion. To merely specify an active selection, use
+ this command with an empty STR. With 0 as the diversion NUMBER,
+ STR will be issued on standard output at reload time. GNU 'm4'
+ will not produce the 'D' directive with non-zero length for
diversion 0, but this can be done with manual edits. This
directive may appear more than once for the same diversion, in
which case the diversion is the concatenation of the various uses.
If omitted, then diversion 0 is current.
-`F LEN1 , LEN2 <NL> STR1 STR2 <NL>'
- Defines, through `pushdef', a definition for STR1 expanding to the
- function whose builtin name is STR2. If the builtin does not
- exist (for example, if the frozen file was produced by a copy of
- `m4' compiled with changeword support, but the version of `m4'
- reloading was compiled without it), the reload is silent, but any
- subsequent use of the definition of STR1 will result in a warning.
- This directive may appear more than once for the same name, and
- its order, along with `T', is important. If omitted, you will
- have no access to any builtins.
-
-`Q LEN1 , LEN2 <NL> STR1 STR2 <NL>'
+'F LEN1 , LEN2 <NL> STR1 STR2 <NL>'
+ Defines, through 'pushdef', a definition for STR1 expanding to the
+ function whose builtin name is STR2. If the builtin does not exist
+ (for example, if the frozen file was produced by a copy of 'm4'
+ compiled with changeword support, but the version of 'm4' reloading
+ was compiled without it), the reload is silent, but any subsequent
+ use of the definition of STR1 will result in a warning. This
+ directive may appear more than once for the same name, and its
+ order, along with 'T', is important. If omitted, you will have no
+ access to any builtins.
+
+'Q LEN1 , LEN2 <NL> STR1 STR2 <NL>'
Uses STR1 and STR2 as the begin-quote and end-quote strings. If
- omitted, then ``' and `'' are the quote delimiters.
+ omitted, then '`' and ''' are the quote delimiters.
-`T LEN1 , LEN2 <NL> STR1 STR2 <NL>'
- Defines, though `pushdef', a definition for STR1 expanding to the
+'T LEN1 , LEN2 <NL> STR1 STR2 <NL>'
+ Defines, though 'pushdef', a definition for STR1 expanding to the
text given by STR2. This directive may appear more than once for
- the same name, and its order, along with `F', is important.
+ the same name, and its order, along with 'F', is important.
-`V NUMBER <NL>'
- Confirms the format of the file. `m4' 1.4.16 only creates and
- understands frozen files where NUMBER is 1. This directive must
- be the first non-comment in the file, and may not appear more than
+'V NUMBER <NL>'
+ Confirms the format of the file. 'm4' 1.4.17 only creates and
+ understands frozen files where NUMBER is 1. This directive must be
+ the first non-comment in the file, and may not appear more than
once.

File: m4.info, Node: Compatibility, Next: Answers, Prev: Frozen files, Up: Top
-16 Compatibility with other versions of `m4'
+16 Compatibility with other versions of 'm4'
********************************************
This chapter describes the many of the differences between this
-implementation of `m4', and of other implementations found under UNIX,
-such as System V Release 3, Solaris, and BSD flavors. In particular,
-it lists the known differences and extensions to POSIX. However, the
-list is not necessarily comprehensive.
+implementation of 'm4', and of other implementations found under UNIX,
+such as System V Release 4, Solaris, and BSD flavors. In particular, it
+lists the known differences and extensions to POSIX. However, the list
+is not necessarily comprehensive.
At the time of this writing, POSIX 2001 (also known as IEEE Std
1003.1-2001) is the latest standard, although a new version of POSIX is
-under development and includes several proposals for modifying what
-`m4' is required to do. The requirements for `m4' are shared between
-SUSv3 and POSIX, and can be viewed at
-`http://www.opengroup.org/onlinepubs/000095399/utilities/m4.html'.
+under development and includes several proposals for modifying what 'm4'
+is required to do. The requirements for 'm4' are shared between SUSv3
+and POSIX, and can be viewed at
+<http://www.opengroup.org/onlinepubs/000095399/utilities/m4.html>.
* Menu:
@@ -5962,17 +5948,17 @@ File: m4.info, Node: Extensions, Next: Incompatibilities, Up: Compatibility
16.1 Extensions in GNU M4
=========================
-This version of `m4' contains a few facilities that do not exist in
-System V `m4'. These extra facilities are all suppressed by using the
-`-G' command line option (*note Invoking m4: Limits control.), unless
+This version of 'm4' contains a few facilities that do not exist in
+System V 'm4'. These extra facilities are all suppressed by using the
+'-G' command line option (*note Invoking m4: Limits control.), unless
overridden by other command line options.
- * In the `$N' notation for macro arguments, N can contain several
- digits, while the System V `m4' only accepts one digit. This
- allows macros in GNU `m4' to take any number of arguments, and not
+ * In the '$N' notation for macro arguments, N can contain several
+ digits, while the System V 'm4' only accepts one digit. This
+ allows macros in GNU 'm4' to take any number of arguments, and not
only nine (*note Arguments::).
- This means that `define(`foo', `$11')' is ambiguous between
+ This means that 'define(`foo', `$11')' is ambiguous between
implementations. To portably choose between grabbing the first
parameter and appending 1 to the expansion, or grabbing the
eleventh parameter, you can do the following:
@@ -5995,76 +5981,76 @@ overridden by other command line options.
Eleventh(`a', `b', `c', `d', `e', `f', `g', `h', `i', `j', `k')
=>k
- Also see the `argn' macro (*note Shift::).
+ Also see the 'argn' macro (*note Shift::).
- * The `divert' (*note Divert::) macro can manage more than 9
- diversions. GNU `m4' treats all positive numbers as valid
+ * The 'divert' (*note Divert::) macro can manage more than 9
+ diversions. GNU 'm4' treats all positive numbers as valid
diversions, rather than discarding diversions greater than 9.
- * Files included with `include' and `sinclude' are sought in a user
+ * Files included with 'include' and 'sinclude' are sought in a user
specified search path, if they are not found in the working
- directory. The search path is specified by the `-I' option and the
- `M4PATH' environment variable (*note Search Path::).
+ directory. The search path is specified by the '-I' option and the
+ 'M4PATH' environment variable (*note Search Path::).
- * Arguments to `undivert' can be non-numeric, in which case the named
+ * Arguments to 'undivert' can be non-numeric, in which case the named
file will be included uninterpreted in the output (*note
Undivert::).
- * Formatted output is supported through the `format' builtin, which
- is modeled after the C library function `printf' (*note Format::).
+ * Formatted output is supported through the 'format' builtin, which
+ is modeled after the C library function 'printf' (*note Format::).
* Searches and text substitution through basic regular expressions
- are supported by the `regexp' (*note Regexp::) and `patsubst'
- (*note Patsubst::) builtins. Some BSD implementations use
- extended regular expressions instead.
+ are supported by the 'regexp' (*note Regexp::) and 'patsubst'
+ (*note Patsubst::) builtins. Some BSD implementations use extended
+ regular expressions instead.
- * The output of shell commands can be read into `m4' with `esyscmd'
+ * The output of shell commands can be read into 'm4' with 'esyscmd'
(*note Esyscmd::).
- * There is indirect access to any builtin macro with `builtin'
- (*note Builtin::).
+ * There is indirect access to any builtin macro with 'builtin' (*note
+ Builtin::).
- * Macros can be called indirectly through `indir' (*note Indir::).
+ * Macros can be called indirectly through 'indir' (*note Indir::).
* The name of the program, the current input file, and the current
input line number are accessible through the builtins
- `__program__', `__file__', and `__line__' (*note Location::).
+ '__program__', '__file__', and '__line__' (*note Location::).
- * The format of the output from `dumpdef' and macro tracing can be
- controlled with `debugmode' (*note Debug Levels::).
+ * The format of the output from 'dumpdef' and macro tracing can be
+ controlled with 'debugmode' (*note Debug Levels::).
* The destination of trace and debug output can be controlled with
- `debugfile' (*note Debug Output::).
+ 'debugfile' (*note Debug Output::).
- * The `maketemp' (*note Mkstemp::) macro behaves like `mkstemp',
+ * The 'maketemp' (*note Mkstemp::) macro behaves like 'mkstemp',
creating a new file with a unique name on every invocation, rather
- than following the insecure behavior of replacing the trailing `X'
- characters with the `m4' process id.
+ than following the insecure behavior of replacing the trailing 'X'
+ characters with the 'm4' process id.
- * POSIX only requires support for the command line options `-s',
- `-D', and `-U', so all other options accepted by GNU M4 are
+ * POSIX only requires support for the command line options '-s',
+ '-D', and '-U', so all other options accepted by GNU M4 are
extensions. *Note Invoking m4::, for a description of these
options.
- The debugging and tracing facilities in GNU `m4' are much more
- extensive than in most other versions of `m4'.
+ The debugging and tracing facilities in GNU 'm4' are much more
+ extensive than in most other versions of 'm4'.

File: m4.info, Node: Incompatibilities, Next: Other Incompatibilities, Prev: Extensions, Up: Compatibility
-16.2 Facilities in System V `m4' not in GNU `m4'
+16.2 Facilities in System V 'm4' not in GNU 'm4'
================================================
-The version of `m4' from System V contains a few facilities that have
-not been implemented in GNU `m4' yet. Additionally, POSIX requires
-some behaviors that GNU `m4' has not implemented yet. Relying on these
-behaviors is non-portable, as a future release of GNU `m4' may change.
+The version of 'm4' from System V contains a few facilities that have
+not been implemented in GNU 'm4' yet. Additionally, POSIX requires some
+behaviors that GNU 'm4' has not implemented yet. Relying on these
+behaviors is non-portable, as a future release of GNU 'm4' may change.
- * POSIX requires support for multiple arguments to `defn', without
- any clarification on how `defn' behaves when one of the multiple
- arguments names a builtin. System V `m4' and some other
+ * POSIX requires support for multiple arguments to 'defn', without
+ any clarification on how 'defn' behaves when one of the multiple
+ arguments names a builtin. System V 'm4' and some other
implementations allow mixing builtins and text macros into a single
- macro. GNU `m4' only supports joining multiple text arguments,
+ macro. GNU 'm4' only supports joining multiple text arguments,
although a future implementation may lift this restriction to
behave more like System V. The only portable way to join text
macros with builtins is via helper macros and implicit
@@ -6072,142 +6058,140 @@ behaviors is non-portable, as a future release of GNU `m4' may change.
* POSIX requires an application to exit with non-zero status if it
wrote an error message to stderr. This has not yet been
- consistently implemented for the various builtins that are
- required to issue an error (such as `eval' (*note Eval::) when an
- argument cannot be parsed).
+ consistently implemented for the various builtins that are required
+ to issue an error (such as 'eval' (*note Eval::) when an argument
+ cannot be parsed).
* Some traditional implementations only allow reading standard input
- once, but GNU `m4' correctly handles multiple instances of `-' on
+ once, but GNU 'm4' correctly handles multiple instances of '-' on
the command line.
- * POSIX requires `m4wrap' (*note M4wrap::) to act in FIFO (first-in,
- first-out) order, but GNU `m4' currently uses LIFO order.
- Furthermore, POSIX states that only the first argument to `m4wrap'
- is saved for later evaluation, but GNU `m4' saves and processes
- all arguments, with output separated by spaces.
+ * POSIX requires 'm4wrap' (*note M4wrap::) to act in FIFO (first-in,
+ first-out) order, but GNU 'm4' currently uses LIFO order.
+ Furthermore, POSIX states that only the first argument to 'm4wrap'
+ is saved for later evaluation, but GNU 'm4' saves and processes all
+ arguments, with output separated by spaces.
* POSIX states that builtins that require arguments, but are called
without arguments, have undefined behavior. Traditional
implementations simply behave as though empty strings had been
- passed. For example, `a`'define`'b' would expand to `ab'. But
- GNU `m4' ignores certain builtins if they have missing arguments,
- giving `adefineb' for the above example.
+ passed. For example, 'a`'define`'b' would expand to 'ab'. But GNU
+ 'm4' ignores certain builtins if they have missing arguments,
+ giving 'adefineb' for the above example.
- * Traditional implementations handle `define(`f',`1')' (*note
+ * Traditional implementations handle 'define(`f',`1')' (*note
Define::) by undefining the entire stack of previous definitions,
- and if doing `undefine(`f')' first. GNU `m4' replaces just the top
- definition on the stack, as if doing `popdef(`f')' followed by
- `pushdef(`f',`1')'. POSIX allows either behavior.
+ and if doing 'undefine(`f')' first. GNU 'm4' replaces just the top
+ definition on the stack, as if doing 'popdef(`f')' followed by
+ 'pushdef(`f',`1')'. POSIX allows either behavior.
- * POSIX 2001 requires `syscmd' (*note Syscmd::) to evaluate command
+ * POSIX 2001 requires 'syscmd' (*note Syscmd::) to evaluate command
output for macro expansion, but this was a mistake that is
- anticipated to be corrected in the next version of POSIX. GNU
- `m4' follows traditional behavior in `syscmd' where output is not
- rescanned, and provides the extension `esyscmd' that does scan the
+ anticipated to be corrected in the next version of POSIX. GNU 'm4'
+ follows traditional behavior in 'syscmd' where output is not
+ rescanned, and provides the extension 'esyscmd' that does scan the
output.
- * At one point, POSIX required `changequote(ARG)' (*note
+ * At one point, POSIX required 'changequote(ARG)' (*note
Changequote::) to use newline as the close quote, but this was a
bug, and the next version of POSIX is anticipated to state that
using empty strings or just one argument is unspecified.
- Meanwhile, the GNU `m4' behavior of treating an empty end-quote
- delimiter as `'' is not portable, as Solaris treats it as
- repeating the start-quote delimiter, and BSD treats it as leaving
- the previous end-quote delimiter unchanged. For predictable
- results, never call changequote with just one argument, or with
- empty strings for arguments.
-
- * At one point, POSIX required `changecom(ARG,)' (*note Changecom::)
+ Meanwhile, the GNU 'm4' behavior of treating an empty end-quote
+ delimiter as ''' is not portable, as Solaris treats it as repeating
+ the start-quote delimiter, and BSD treats it as leaving the
+ previous end-quote delimiter unchanged. For predictable results,
+ never call changequote with just one argument, or with empty
+ strings for arguments.
+
+ * At one point, POSIX required 'changecom(ARG,)' (*note Changecom::)
to make it impossible to end a comment, but this is a bug, and the
next version of POSIX is anticipated to state that using empty
- strings is unspecified. Meanwhile, the GNU `m4' behavior of
- treating an empty end-comment delimiter as newline is not
- portable, as BSD treats it as leaving the previous end-comment
- delimiter unchanged. It is also impossible in BSD implementations
- to disable comments, even though that is required by POSIX. For
- predictable results, never call changecom with empty strings for
- arguments.
-
- * Most implementations of `m4' give macros a higher precedence than
+ strings is unspecified. Meanwhile, the GNU 'm4' behavior of
+ treating an empty end-comment delimiter as newline is not portable,
+ as BSD treats it as leaving the previous end-comment delimiter
+ unchanged. It is also impossible in BSD implementations to disable
+ comments, even though that is required by POSIX. For predictable
+ results, never call changecom with empty strings for arguments.
+
+ * Most implementations of 'm4' give macros a higher precedence than
comments when parsing, meaning that if the start delimiter given to
- `changecom' (*note Changecom::) starts with a macro name, comments
+ 'changecom' (*note Changecom::) starts with a macro name, comments
are effectively disabled. POSIX does not specify what the
- precedence is, so this version of GNU `m4' parser recognizes
+ precedence is, so this version of GNU 'm4' parser recognizes
comments, then macros, then quoted strings.
* Traditional implementations allow argument collection, but not
string and comment processing, to span file boundaries. Thus, if
- `a.m4' contains `len(', and `b.m4' contains `abc)', `m4 a.m4 b.m4'
- outputs `3' with traditional `m4', but gives an error message that
- the end of file was encountered inside a macro with GNU `m4'. On
+ 'a.m4' contains 'len(', and 'b.m4' contains 'abc)', 'm4 a.m4 b.m4'
+ outputs '3' with traditional 'm4', but gives an error message that
+ the end of file was encountered inside a macro with GNU 'm4'. On
the other hand, traditional implementations do end of file
- processing for files included with `include' or `sinclude' (*note
- Include::), while GNU `m4' seamlessly integrates the content of
- those files. Thus `include(`a.m4')include(`b.m4')' will output
- `3' instead of giving an error.
-
- * Traditional `m4' treats `traceon' (*note Trace::) without
- arguments as a global variable, independent of named macro tracing.
- Also, once a macro is undefined, named tracing of that macro is
- lost. On the other hand, when GNU `m4' encounters `traceon'
- without arguments, it turns tracing on for all existing
- definitions at the time, but does not trace future definitions;
- `traceoff' without arguments turns tracing off for all definitions
- regardless of whether they were also traced by name; and tracing
- by name, such as with `-tfoo' at the command line or
- `traceon(`foo')' in the input, is an attribute that is preserved
- even if the macro is currently undefined.
+ processing for files included with 'include' or 'sinclude' (*note
+ Include::), while GNU 'm4' seamlessly integrates the content of
+ those files. Thus 'include(`a.m4')include(`b.m4')' will output '3'
+ instead of giving an error.
+
+ * Traditional 'm4' treats 'traceon' (*note Trace::) without arguments
+ as a global variable, independent of named macro tracing. Also,
+ once a macro is undefined, named tracing of that macro is lost. On
+ the other hand, when GNU 'm4' encounters 'traceon' without
+ arguments, it turns tracing on for all existing definitions at the
+ time, but does not trace future definitions; 'traceoff' without
+ arguments turns tracing off for all definitions regardless of
+ whether they were also traced by name; and tracing by name, such as
+ with '-tfoo' at the command line or 'traceon(`foo')' in the input,
+ is an attribute that is preserved even if the macro is currently
+ undefined.
Additionally, while POSIX requires trace output, it makes no
demands on the formatting of that output. Parsing trace output is
not guaranteed to be reliable, even between different releases of
GNU M4; however, the intent is that any future changes in trace
output will only occur under the direction of additional
- `debugmode' flags (*note Debug Levels::).
+ 'debugmode' flags (*note Debug Levels::).
- * POSIX requires `eval' (*note Eval::) to treat all operators with
- the same precedence as C. However, earlier versions of GNU `m4'
- followed the traditional behavior of other `m4' implementations,
- where bitwise and logical negation (`~' and `!') have lower
+ * POSIX requires 'eval' (*note Eval::) to treat all operators with
+ the same precedence as C. However, earlier versions of GNU 'm4'
+ followed the traditional behavior of other 'm4' implementations,
+ where bitwise and logical negation ('~' and '!') have lower
precedence than equality operators; and where equality operators
- (`==' and `!=') had the same precedence as relational operators
- (such as `<'). Use explicit parentheses to ensure proper
- precedence. As extensions to POSIX, GNU `m4' gives well-defined
+ ('==' and '!=') had the same precedence as relational operators
+ (such as '<'). Use explicit parentheses to ensure proper
+ precedence. As extensions to POSIX, GNU 'm4' gives well-defined
semantics to operations that C leaves undefined, such as when
- overflow occurs, when shifting negative numbers, or when
- performing division by zero. POSIX also requires `=' to cause an
- error, but many traditional implementations allowed it as an alias
- for `=='.
+ overflow occurs, when shifting negative numbers, or when performing
+ division by zero. POSIX also requires '=' to cause an error, but
+ many traditional implementations allowed it as an alias for '=='.
- * POSIX 2001 requires `translit' (*note Translit::) to treat each
- character of the second and third arguments literally. However,
- it is anticipated that the next version of POSIX will allow the
- GNU `m4' behavior of treating `-' as a range operator.
+ * POSIX 2001 requires 'translit' (*note Translit::) to treat each
+ character of the second and third arguments literally. However, it
+ is anticipated that the next version of POSIX will allow the GNU
+ 'm4' behavior of treating '-' as a range operator.
- * POSIX requires `m4' to honor the locale environment variables of
- `LANG', `LC_ALL', `LC_CTYPE', `LC_MESSAGES', and `NLSPATH', but
- this has not yet been implemented in GNU `m4'.
+ * POSIX requires 'm4' to honor the locale environment variables of
+ 'LANG', 'LC_ALL', 'LC_CTYPE', 'LC_MESSAGES', and 'NLSPATH', but
+ this has not yet been implemented in GNU 'm4'.
* POSIX states that only unquoted leading newlines and blanks (that
is, space and tab) are ignored when collecting macro arguments.
However, this appears to be a bug in POSIX, since most traditional
implementations also ignore all whitespace (formfeed, carriage
- return, and vertical tab). GNU `m4' follows tradition and ignores
+ return, and vertical tab). GNU 'm4' follows tradition and ignores
all leading unquoted whitespace.
* A strictly-compliant POSIX client is not allowed to use
- command-line arguments not specified by POSIX. However, since
- this version of M4 ignores `POSIXLY_CORRECT' and enables the option
- `--gnu' by default (*note Invoking m4: Limits control.), a client
+ command-line arguments not specified by POSIX. However, since this
+ version of M4 ignores 'POSIXLY_CORRECT' and enables the option
+ '--gnu' by default (*note Invoking m4: Limits control.), a client
desiring to be strictly compliant has no way to disable GNU
extensions that conflict with POSIX when directly invoking the
- compiled `m4'. A future version of `GNU' M4 will honor the
- environment variable `POSIXLY_CORRECT', implicitly enabling
- `--traditional' if it is set, in order to allow a
+ compiled 'm4'. A future version of 'GNU' M4 will honor the
+ environment variable 'POSIXLY_CORRECT', implicitly enabling
+ '--traditional' if it is set, in order to allow a
strictly-compliant client. In the meantime, a client needing
strict POSIX compliance can use the workaround of invoking a shell
- script wrapper, where the wrapper then adds `--traditional' to the
- arguments passed to the compiled `m4'.
+ script wrapper, where the wrapper then adds '--traditional' to the
+ arguments passed to the compiled 'm4'.

File: m4.info, Node: Other Incompatibilities, Prev: Incompatibilities, Up: Compatibility
@@ -6216,20 +6200,20 @@ File: m4.info, Node: Other Incompatibilities, Prev: Incompatibilities, Up: Co
============================
There are a few other incompatibilities between this implementation of
-`m4', and the System V version.
+'m4', and the System V version.
- * GNU `m4' implements sync lines differently from System V `m4',
- when text is being diverted. GNU `m4' outputs the sync lines when
- the text is being diverted, and System V `m4' when the diverted
- text is being brought back.
+ * GNU 'm4' implements sync lines differently from System V 'm4', when
+ text is being diverted. GNU 'm4' outputs the sync lines when the
+ text is being diverted, and System V 'm4' when the diverted text is
+ being brought back.
The problem is which lines and file names should be attached to
- text that is being, or has been, diverted. System V `m4' regards
+ text that is being, or has been, diverted. System V 'm4' regards
all the diverted text as being generated by the source line
- containing the `undivert' call, whereas GNU `m4' regards the
+ containing the 'undivert' call, whereas GNU 'm4' regards the
diverted text as being generated at the time it is diverted.
- The sync line option is used mostly when using `m4' as a front end
+ The sync line option is used mostly when using 'm4' as a front end
to a compiler. If a diverted line causes a compiler error, the
error messages should most probably refer to the place where the
diversion was made, and not where it was inserted again.
@@ -6245,15 +6229,15 @@ There are a few other incompatibilities between this implementation of
=>#line 1 "stdin"
=>2
- The current `m4' implementation has a limitation that the syncline
+ The current 'm4' implementation has a limitation that the syncline
output at the start of each diversion occurs no matter what, even
if the previous diversion did not end with a newline. This goes
contrary to the claim that synclines appear on a line by
- themselves, so this limitation may be corrected in a future
- version of `m4'. In the meantime, when using `-s', it is wisest
- to make sure all diversions end with newline.
+ themselves, so this limitation may be corrected in a future version
+ of 'm4'. In the meantime, when using '-s', it is wisest to make
+ sure all diversions end with newline.
- * GNU `m4' makes no attempt at prohibiting self-referential
+ * GNU 'm4' makes no attempt at prohibiting self-referential
definitions like:
define(`x', `x')
@@ -6261,19 +6245,19 @@ There are a few other incompatibilities between this implementation of
define(`x', `x ')
=>
- There is nothing inherently wrong with defining `x' to return `x'.
- The wrong thing is to expand `x' unquoted, because that would
- cause an infinite rescan loop. In `m4', one might use macros to
- hold strings, as we do for variables in other programming
- languages, further checking them with:
+ There is nothing inherently wrong with defining 'x' to return 'x'.
+ The wrong thing is to expand 'x' unquoted, because that would cause
+ an infinite rescan loop. In 'm4', one might use macros to hold
+ strings, as we do for variables in other programming languages,
+ further checking them with:
ifelse(defn(`HOLDER'), `VALUE', ...)
- In cases like this one, an interdiction for a macro to hold its
- own name would be a useless limitation. Of course, this leaves
- more rope for the GNU `m4' user to hang himself! Rescanning hangs
- may be avoided through careful programming, a little like for
- endless loops in traditional programming languages.
+ In cases like this one, an interdiction for a macro to hold its own
+ name would be a useless limitation. Of course, this leaves more
+ rope for the GNU 'm4' user to hang himself! Rescanning hangs may
+ be avoided through careful programming, a little like for endless
+ loops in traditional programming languages.

File: m4.info, Node: Answers, Next: Copying This Package, Prev: Compatibility, Up: Top
@@ -6287,25 +6271,25 @@ presented here.
* Menu:
-* Improved exch:: Solution for `exch'
-* Improved forloop:: Solution for `forloop'
-* Improved foreach:: Solution for `foreach'
-* Improved copy:: Solution for `copy'
-* Improved m4wrap:: Solution for `m4wrap'
-* Improved cleardivert:: Solution for `cleardivert'
-* Improved capitalize:: Solution for `capitalize'
-* Improved fatal_error:: Solution for `fatal_error'
+* Improved exch:: Solution for 'exch'
+* Improved forloop:: Solution for 'forloop'
+* Improved foreach:: Solution for 'foreach'
+* Improved copy:: Solution for 'copy'
+* Improved m4wrap:: Solution for 'm4wrap'
+* Improved cleardivert:: Solution for 'cleardivert'
+* Improved capitalize:: Solution for 'capitalize'
+* Improved fatal_error:: Solution for 'fatal_error'

File: m4.info, Node: Improved exch, Next: Improved forloop, Up: Answers
-17.1 Solution for `exch'
+17.1 Solution for 'exch'
========================
-The `exch' macro (*note Arguments::) as presented requires clients to
+The 'exch' macro (*note Arguments::) as presented requires clients to
double quote their arguments. A nicer definition, which lets clients
follow the rule of thumb of one level of quoting per level of
-parentheses, involves adding quotes in the definition of `exch', as
+parentheses, involves adding quotes in the definition of 'exch', as
follows:
define(`exch', ``$2', `$1'')
@@ -6318,17 +6302,17 @@ follows:

File: m4.info, Node: Improved forloop, Next: Improved foreach, Prev: Improved exch, Up: Answers
-17.2 Solution for `forloop'
+17.2 Solution for 'forloop'
===========================
-The `forloop' macro (*note Forloop::) as presented earlier can go into
+The 'forloop' macro (*note Forloop::) as presented earlier can go into
an infinite loop if given an iterator that is not parsed as a macro
name. It does not do any sanity checking on its numeric bounds, and
only permits decimal numbers for bounds. Here is an improved version,
-shipped as `m4-1.4.16/examples/forloop2.m4'; this version also
-optimizes overhead by calling four macros instead of six per iteration
-(excluding those in TEXT), by not dereferencing the ITERATOR in the
-helper `_forloop'.
+shipped as 'm4-1.4.17/examples/forloop2.m4'; this version also optimizes
+overhead by calling four macros instead of six per iteration (excluding
+those in TEXT), by not dereferencing the ITERATOR in the helper
+'_forloop'.
$ m4 -d -I examples
undivert(`forloop2.m4')dnl
@@ -6353,16 +6337,16 @@ helper `_forloop'.
forloop(`i', `5 + 5', `0xc', ` 0x`'eval(i, `16')')
=> 0xa 0xb 0xc
forloop(`i', `a', `b', `non-numeric bounds')
- error-->m4:stdin:6: bad expression in eval (bad input): (a) <= (b)
+ error->m4:stdin:6: bad expression in eval (bad input): (a) <= (b)
=>
- One other change to notice is that the improved version used `_$0'
-rather than `_foreach' to invoke the helper routine. In general, this
+ One other change to notice is that the improved version used '_$0'
+rather than '_foreach' to invoke the helper routine. In general, this
is a good practice to follow, because then the set of macros can be
uniformly transformed. The following example shows a transformation
-that doubles the current quoting and appends a suffix `2' to each
-transformed macro. If `foreach' refers to the literal `_foreach', then
-`foreach2' invokes `_foreach' instead of the intended `_foreach2', and
+that doubles the current quoting and appends a suffix '2' to each
+transformed macro. If 'foreach' refers to the literal '_foreach', then
+'foreach2' invokes '_foreach' instead of the intended '_foreach2', and
the mixing of quoting paradigms leads to an infinite recursion loop in
this example.
@@ -6391,20 +6375,20 @@ this example.
changequote(`[', `]')changequote([``], [''])
=>
forloop2(i, 1, 5, ``ifelse('')forloop2(i, 1, 5, ``)'')
- error-->m4:stdin:12: recursion limit of 9 exceeded, use -L<N> to change it
+ error->m4:stdin:12: recursion limit of 9 exceeded, use -L<N> to change it
One more optimization is still possible. Instead of repeatedly
assigning a variable then invoking or dereferencing it, it is possible
to pass the current iterator value as a single argument. Coupled with
-`curry' if other arguments are needed (*note Composition::), or with
+'curry' if other arguments are needed (*note Composition::), or with
helper macros if the argument is needed in more than one place in the
expansion, the output can be generated with three, rather than four,
macros of overhead per iteration. Notice how the file
-`m4-1.4.16/examples/forloop3.m4' rearranges the arguments of the helper
-`_forloop' to take two arguments that are placed around the current
+'m4-1.4.17/examples/forloop3.m4' rearranges the arguments of the helper
+'_forloop' to take two arguments that are placed around the current
value. By splitting a balanced set of parantheses across multiple
-arguments, the helper macro can now be shared by `forloop' and the new
-`forloop_arg'.
+arguments, the helper macro can now be shared by 'forloop' and the new
+'forloop_arg'.
$ m4 -I examples
include(`forloop3.m4')
@@ -6445,17 +6429,17 @@ arguments, the helper macro can now be shared by `forloop' and the new
Of course, it is possible to make even more improvements, such as
adding an optional step argument, or allowing iteration through
descending sequences. GNU Autoconf provides some of these additional
-bells and whistles in its `m4_for' macro.
+bells and whistles in its 'm4_for' macro.

File: m4.info, Node: Improved foreach, Next: Improved copy, Prev: Improved forloop, Up: Answers
-17.3 Solution for `foreach'
+17.3 Solution for 'foreach'
===========================
-The `foreach' and `foreachq' macros (*note Foreach::) as presented
+The 'foreach' and 'foreachq' macros (*note Foreach::) as presented
earlier each have flaws. First, we will examine and fix the quadratic
-behavior of `foreachq':
+behavior of 'foreachq':
$ m4 -I examples
include(`foreachq.m4')
@@ -6465,34 +6449,34 @@ behavior of `foreachq':
foreachq(`x', ``1', `2', `3', `4'', `x
')dnl
=>1
- error-->m4trace: -3- shift(`1', `2', `3', `4')
- error-->m4trace: -2- shift(`1', `2', `3', `4')
+ error->m4trace: -3- shift(`1', `2', `3', `4')
+ error->m4trace: -2- shift(`1', `2', `3', `4')
=>2
- error-->m4trace: -4- shift(`1', `2', `3', `4')
- error-->m4trace: -3- shift(`2', `3', `4')
- error-->m4trace: -3- shift(`1', `2', `3', `4')
- error-->m4trace: -2- shift(`2', `3', `4')
+ error->m4trace: -4- shift(`1', `2', `3', `4')
+ error->m4trace: -3- shift(`2', `3', `4')
+ error->m4trace: -3- shift(`1', `2', `3', `4')
+ error->m4trace: -2- shift(`2', `3', `4')
=>3
- error-->m4trace: -5- shift(`1', `2', `3', `4')
- error-->m4trace: -4- shift(`2', `3', `4')
- error-->m4trace: -3- shift(`3', `4')
- error-->m4trace: -4- shift(`1', `2', `3', `4')
- error-->m4trace: -3- shift(`2', `3', `4')
- error-->m4trace: -2- shift(`3', `4')
+ error->m4trace: -5- shift(`1', `2', `3', `4')
+ error->m4trace: -4- shift(`2', `3', `4')
+ error->m4trace: -3- shift(`3', `4')
+ error->m4trace: -4- shift(`1', `2', `3', `4')
+ error->m4trace: -3- shift(`2', `3', `4')
+ error->m4trace: -2- shift(`3', `4')
=>4
- error-->m4trace: -6- shift(`1', `2', `3', `4')
- error-->m4trace: -5- shift(`2', `3', `4')
- error-->m4trace: -4- shift(`3', `4')
- error-->m4trace: -3- shift(`4')
-
- Each successive iteration was adding more quoted `shift'
-invocations, and the entire list contents were passing through every
-iteration. In general, when recursing, it is a good idea to make the
-recursion use fewer arguments, rather than adding additional quoted
-uses of `shift'. By doing so, `m4' uses less memory, invokes fewer
-macros, is less likely to run into machine limits, and most
-importantly, performs faster. The fixed version of `foreachq' can be
-found in `m4-1.4.16/examples/foreachq2.m4':
+ error->m4trace: -6- shift(`1', `2', `3', `4')
+ error->m4trace: -5- shift(`2', `3', `4')
+ error->m4trace: -4- shift(`3', `4')
+ error->m4trace: -3- shift(`4')
+
+ Each successive iteration was adding more quoted 'shift' invocations,
+and the entire list contents were passing through every iteration. In
+general, when recursing, it is a good idea to make the recursion use
+fewer arguments, rather than adding additional quoted uses of 'shift'.
+By doing so, 'm4' uses less memory, invokes fewer macros, is less likely
+to run into machine limits, and most importantly, performs faster. The
+fixed version of 'foreachq' can be found in
+'m4-1.4.17/examples/foreachq2.m4':
$ m4 -I examples
include(`foreachq2.m4')
@@ -6513,35 +6497,35 @@ found in `m4-1.4.16/examples/foreachq2.m4':
foreachq(`x', ``1', `2', `3', `4'', `x
')dnl
=>1
- error-->m4trace: -3- shift(`1', `2', `3', `4')
+ error->m4trace: -3- shift(`1', `2', `3', `4')
=>2
- error-->m4trace: -3- shift(`2', `3', `4')
+ error->m4trace: -3- shift(`2', `3', `4')
=>3
- error-->m4trace: -3- shift(`3', `4')
+ error->m4trace: -3- shift(`3', `4')
=>4
Note that the fixed version calls unquoted helper macros in
-`_foreachq' to trim elements immediately; those helper macros in turn
+'_foreachq' to trim elements immediately; those helper macros in turn
must re-supply the layer of quotes lost in the macro invocation.
-Contrast the use of `_arg1q', which quotes the first list element, with
-`_arg1' of the earlier implementation that returned the first list
+Contrast the use of '_arg1q', which quotes the first list element, with
+'_arg1' of the earlier implementation that returned the first list
element directly. Additionally, by calling the helper method
-immediately, the `defn(`ITERATOR')' no longer contains unexpanded
+immediately, the 'defn(`ITERATOR')' no longer contains unexpanded
macros.
The astute m4 programmer might notice that the solution above still
uses more memory and macro invocations, and thus more time, than
-strictly necessary. Note that `$2', which contains an arbitrarily long
+strictly necessary. Note that '$2', which contains an arbitrarily long
quoted list, is expanded and rescanned three times per iteration of
-`_foreachq'. Furthermore, every iteration of the algorithm effectively
+'_foreachq'. Furthermore, every iteration of the algorithm effectively
unboxes then reboxes the list, which costs a couple of macro
invocations. It is possible to rewrite the algorithm for a bit more
-speed by swapping the order of the arguments to `_foreachq' in order to
+speed by swapping the order of the arguments to '_foreachq' in order to
operate on an unboxed list in the first place, and by using the
-fixed-length `$#' instead of an arbitrary length list as the key to end
+fixed-length '$#' instead of an arbitrary length list as the key to end
recursion. The result is an overhead of six macro invocations per loop
(excluding any macros in TEXT), instead of eight. This alternative
-approach is available as `m4-1.4.16/examples/foreach3.m4':
+approach is available as 'm4-1.4.17/examples/foreach3.m4':
$ m4 -I examples
include(`foreachq3.m4')
@@ -6561,65 +6545,65 @@ approach is available as `m4-1.4.16/examples/foreach3.m4':
foreachq(`x', ``1', `2', `3', `4'', `x
')dnl
=>1
- error-->m4trace: -4- shift(`x', `x
- error-->', `', `1', `2', `3', `4')
- error-->m4trace: -3- shift(`x
- error-->', `', `1', `2', `3', `4')
- error-->m4trace: -2- shift(`', `1', `2', `3', `4')
+ error->m4trace: -4- shift(`x', `x
+ error->', `', `1', `2', `3', `4')
+ error->m4trace: -3- shift(`x
+ error->', `', `1', `2', `3', `4')
+ error->m4trace: -2- shift(`', `1', `2', `3', `4')
=>2
- error-->m4trace: -4- shift(`x', `x
- error-->', `1', `2', `3', `4')
- error-->m4trace: -3- shift(`x
- error-->', `1', `2', `3', `4')
- error-->m4trace: -2- shift(`1', `2', `3', `4')
+ error->m4trace: -4- shift(`x', `x
+ error->', `1', `2', `3', `4')
+ error->m4trace: -3- shift(`x
+ error->', `1', `2', `3', `4')
+ error->m4trace: -2- shift(`1', `2', `3', `4')
=>3
- error-->m4trace: -4- shift(`x', `x
- error-->', `2', `3', `4')
- error-->m4trace: -3- shift(`x
- error-->', `2', `3', `4')
- error-->m4trace: -2- shift(`2', `3', `4')
+ error->m4trace: -4- shift(`x', `x
+ error->', `2', `3', `4')
+ error->m4trace: -3- shift(`x
+ error->', `2', `3', `4')
+ error->m4trace: -2- shift(`2', `3', `4')
=>4
- error-->m4trace: -4- shift(`x', `x
- error-->', `3', `4')
- error-->m4trace: -3- shift(`x
- error-->', `3', `4')
- error-->m4trace: -2- shift(`3', `4')
-
- In the current version of M4, every instance of `$@' is rescanned as
-it is encountered. Thus, the `foreachq3.m4' alternative uses much less
-memory than `foreachq2.m4', and executes as much as 10% faster, since
-each iteration encounters fewer `$@'. However, the implementation of
-rescanning every byte in `$@' is quadratic in the number of bytes
-scanned (for example, making the broken version in `foreachq.m4' cubic,
+ error->m4trace: -4- shift(`x', `x
+ error->', `3', `4')
+ error->m4trace: -3- shift(`x
+ error->', `3', `4')
+ error->m4trace: -2- shift(`3', `4')
+
+ In the current version of M4, every instance of '$@' is rescanned as
+it is encountered. Thus, the 'foreachq3.m4' alternative uses much less
+memory than 'foreachq2.m4', and executes as much as 10% faster, since
+each iteration encounters fewer '$@'. However, the implementation of
+rescanning every byte in '$@' is quadratic in the number of bytes
+scanned (for example, making the broken version in 'foreachq.m4' cubic,
rather than quadratic, in behavior). A future release of M4 will
improve the underlying implementation by reusing results of previous
-scans, so that both styles of `foreachq' can become linear in the
-number of bytes scanned. Notice how the implementation injects an
-empty argument prior to expanding `$2' within `foreachq'; the helper
-macro `_foreachq' then ignores the third argument altogether, and ends
+scans, so that both styles of 'foreachq' can become linear in the number
+of bytes scanned. Notice how the implementation injects an empty
+argument prior to expanding '$2' within 'foreachq'; the helper macro
+'_foreachq' then ignores the third argument altogether, and ends
recursion when there are three arguments left because there was nothing
-left to pass through `shift'. Thus, each iteration only needs one
-`ifelse', rather than the two conditionals used in the version from
-`foreachq2.m4'.
+left to pass through 'shift'. Thus, each iteration only needs one
+'ifelse', rather than the two conditionals used in the version from
+'foreachq2.m4'.
- So far, all of the implementations of `foreachq' presented have been
-quadratic with M4 1.4.x. But `forloop' is linear, because each
+ So far, all of the implementations of 'foreachq' presented have been
+quadratic with M4 1.4.x. But 'forloop' is linear, because each
iteration parses a constant amount of arguments. So, it is possible to
-design a variant that uses `forloop' to do the iteration, then uses
-`$@' only once at the end, giving a linear result even with older M4
+design a variant that uses 'forloop' to do the iteration, then uses '$@'
+only once at the end, giving a linear result even with older M4
implementations. This implementation relies on the GNU extension that
-`$10' expands to the tenth argument rather than the first argument
-concatenated with `0'. The trick is to define an intermediate macro
-that repeats the text `m4_define(`$1', `$N')$2`'', with `n' set to
+'$10' expands to the tenth argument rather than the first argument
+concatenated with '0'. The trick is to define an intermediate macro
+that repeats the text 'm4_define(`$1', `$N')$2`'', with 'n' set to
successive integers corresponding to each argument. The helper macro
-`_foreachq_' is needed in order to generate the literal sequences such
-as `$1' into the intermediate macro, rather than expanding them as the
-arguments of `_foreachq'. With this approach, no `shift' calls are
-even needed! Even though there are seven macros of overhead per
-iteration instead of six in `foreachq3.m4', the linear scaling is
-apparent at relatively small list sizes. However, this approach will
-need adjustment when a future version of M4 follows POSIX by no longer
-treating `$10' as the tenth argument; the anticipation is that `${10}'
+'_foreachq_' is needed in order to generate the literal sequences such
+as '$1' into the intermediate macro, rather than expanding them as the
+arguments of '_foreachq'. With this approach, no 'shift' calls are even
+needed! Even though there are seven macros of overhead per iteration
+instead of six in 'foreachq3.m4', the linear scaling is apparent at
+relatively small list sizes. However, this approach will need
+adjustment when a future version of M4 follows POSIX by no longer
+treating '$10' as the tenth argument; the anticipation is that '${10}'
can be used instead, although that alternative syntax is not yet
supported.
@@ -6649,10 +6633,10 @@ supported.
=>3
=>4
- For yet another approach, the improved version of `foreach',
-available in `m4-1.4.16/examples/foreach2.m4', simply overquotes the
-arguments to `_foreach' to begin with, using `dquote_elt'. Then
-`_foreach' can just use `_arg1' to remove the extra layer of quoting
+ For yet another approach, the improved version of 'foreach',
+available in 'm4-1.4.17/examples/foreach2.m4', simply overquotes the
+arguments to '_foreach' to begin with, using 'dquote_elt'. Then
+'_foreach' can just use '_arg1' to remove the extra layer of quoting
that was added up front:
$ m4 -I examples
@@ -6673,36 +6657,36 @@ that was added up front:
=>
foreach(`x', `(`1', `2', `3', `4')', `x
')dnl
- error-->m4trace: -4- shift(`1', `2', `3', `4')
- error-->m4trace: -4- shift(`2', `3', `4')
- error-->m4trace: -4- shift(`3', `4')
+ error->m4trace: -4- shift(`1', `2', `3', `4')
+ error->m4trace: -4- shift(`2', `3', `4')
+ error->m4trace: -4- shift(`3', `4')
=>1
- error-->m4trace: -3- shift(``1'', ``2'', ``3'', ``4'')
+ error->m4trace: -3- shift(``1'', ``2'', ``3'', ``4'')
=>2
- error-->m4trace: -3- shift(``2'', ``3'', ``4'')
+ error->m4trace: -3- shift(``2'', ``3'', ``4'')
=>3
- error-->m4trace: -3- shift(``3'', ``4'')
+ error->m4trace: -3- shift(``3'', ``4'')
=>4
- error-->m4trace: -3- shift(``4'')
-
- It is likewise possible to write a variant of `foreach' that
-performs in linear time on M4 1.4.x; the easiest method is probably
-writing a version of `foreach' that unboxes its list, then invokes
-`_foreachq' as previously defined in `foreachq4.m4'.
-
- In summary, recursion over list elements is trickier than it
-appeared at first glance, but provides a powerful idiom within `m4'
-processing. As a final demonstration, both list styles are now able to
-handle several scenarios that would wreak havoc on one or both of the
-original implementations. This points out one other difference between
-the list styles. `foreach' evaluates unquoted list elements only once,
-in preparation for calling `_foreach', similary for `foreachq' as
-provided by `foreachq3.m4' or `foreachq4.m4'. But `foreachq', as
-provided by `foreachq2.m4', evaluates unquoted list elements twice
-while visiting the first list element, once in `_arg1q' and once in
-`_rest'. When deciding which list style to use, one must take into
-account whether repeating the side effects of unquoted list elements
-will have any detrimental effects.
+ error->m4trace: -3- shift(``4'')
+
+ It is likewise possible to write a variant of 'foreach' that performs
+in linear time on M4 1.4.x; the easiest method is probably writing a
+version of 'foreach' that unboxes its list, then invokes '_foreachq' as
+previously defined in 'foreachq4.m4'.
+
+ In summary, recursion over list elements is trickier than it appeared
+at first glance, but provides a powerful idiom within 'm4' processing.
+As a final demonstration, both list styles are now able to handle
+several scenarios that would wreak havoc on one or both of the original
+implementations. This points out one other difference between the list
+styles. 'foreach' evaluates unquoted list elements only once, in
+preparation for calling '_foreach', similary for 'foreachq' as provided
+by 'foreachq3.m4' or 'foreachq4.m4'. But 'foreachq', as provided by
+'foreachq2.m4', evaluates unquoted list elements twice while visiting
+the first list element, once in '_arg1q' and once in '_rest'. When
+deciding which list style to use, one must take into account whether
+repeating the side effects of unquoted list elements will have any
+detrimental effects.
$ m4 -I examples
include(`foreach2.m4')
@@ -6735,34 +6719,34 @@ will have any detrimental effects.
dnl list of unquoted macros; expansion occurs before recursion
foreach(`x', `(active, active)', `<x>
')dnl
- error-->m4trace: -4- active -> `ACT, IVE'
- error-->m4trace: -4- active -> `ACT, IVE'
+ error->m4trace: -4- active -> `ACT, IVE'
+ error->m4trace: -4- active -> `ACT, IVE'
=><ACT>
=><IVE>
=><ACT>
=><IVE>
foreachq(`x', `active, active', `<x>
')dnl
- error-->m4trace: -3- active -> `ACT, IVE'
- error-->m4trace: -3- active -> `ACT, IVE'
+ error->m4trace: -3- active -> `ACT, IVE'
+ error->m4trace: -3- active -> `ACT, IVE'
=><ACT>
- error-->m4trace: -3- active -> `ACT, IVE'
- error-->m4trace: -3- active -> `ACT, IVE'
+ error->m4trace: -3- active -> `ACT, IVE'
+ error->m4trace: -3- active -> `ACT, IVE'
=><IVE>
=><ACT>
=><IVE>
dnl list of quoted macros; expansion occurs during recursion
foreach(`x', `(`active', `active')', `<x>
')dnl
- error-->m4trace: -1- active -> `ACT, IVE'
+ error->m4trace: -1- active -> `ACT, IVE'
=><ACT, IVE>
- error-->m4trace: -1- active -> `ACT, IVE'
+ error->m4trace: -1- active -> `ACT, IVE'
=><ACT, IVE>
foreachq(`x', ``active', `active'', `<x>
')dnl
- error-->m4trace: -1- active -> `ACT, IVE'
+ error->m4trace: -1- active -> `ACT, IVE'
=><ACT, IVE>
- error-->m4trace: -1- active -> `ACT, IVE'
+ error->m4trace: -1- active -> `ACT, IVE'
=><ACT, IVE>
dnl list of double-quoted macro names; no expansion
foreach(`x', `(``active'', ``active'')', `<x>
@@ -6777,49 +6761,49 @@ will have any detrimental effects.

File: m4.info, Node: Improved copy, Next: Improved m4wrap, Prev: Improved foreach, Up: Answers
-17.4 Solution for `copy'
+17.4 Solution for 'copy'
========================
-The macro `copy' presented above is unable to handle builtin tokens
-with M4 1.4.x, because it tries to pass the builtin token through the
-macro `curry', where it is silently flattened to an empty string (*note
-Composition::). Rather than using the problematic `curry' to work
-around the limitation that `stack_foreach' expects to invoke a macro
+The macro 'copy' presented above is unable to handle builtin tokens with
+M4 1.4.x, because it tries to pass the builtin token through the macro
+'curry', where it is silently flattened to an empty string (*note
+Composition::). Rather than using the problematic 'curry' to work
+around the limitation that 'stack_foreach' expects to invoke a macro
that takes exactly one argument, we can write a new macro that lets us
-form the exact two-argument `pushdef' call sequence needed, so that we
+form the exact two-argument 'pushdef' call sequence needed, so that we
are no longer passing a builtin token through a text macro.
-- Composite: stack_foreach_sep (MACRO, PRE, POST, SEP)
-- Composite: stack_foreach_sep_lifo (MACRO, PRE, POST, SEP)
- For each of the `pushdef' definitions associated with MACRO,
- expand the sequence `PRE`'definition`'POST'. Additionally, expand
- SEP between definitions. `stack_foreach_sep' visits the oldest
- definition first, while `stack_foreach_sep_lifo' visits the
- current definition first. The expansion may dereference MACRO,
- but should not modify it. There are a few special macros, such as
- `defn', which cannot be used as the MACRO parameter.
-
- Note that `stack_foreach(`MACRO', `ACTION')' is equivalent to
-`stack_foreach_sep(`MACRO', `ACTION(', `)')'. By supplying explicit
+ For each of the 'pushdef' definitions associated with MACRO, expand
+ the sequence 'PRE`'definition`'POST'. Additionally, expand SEP
+ between definitions. 'stack_foreach_sep' visits the oldest
+ definition first, while 'stack_foreach_sep_lifo' visits the current
+ definition first. The expansion may dereference MACRO, but should
+ not modify it. There are a few special macros, such as 'defn',
+ which cannot be used as the MACRO parameter.
+
+ Note that 'stack_foreach(`MACRO', `ACTION')' is equivalent to
+'stack_foreach_sep(`MACRO', `ACTION(', `)')'. By supplying explicit
parentheses, split among the PRE and POST arguments to
-`stack_foreach_sep', it is now possible to construct macro calls with
+'stack_foreach_sep', it is now possible to construct macro calls with
more than one argument, without passing builtin tokens through a macro
call. It is likewise possible to directly reference the stack
definitions without a macro call, by leaving PRE and POST empty. Thus,
-in addition to fixing `copy' on builtin tokens, it also executes with
+in addition to fixing 'copy' on builtin tokens, it also executes with
fewer macro invocations.
The new macro also adds a separator that is only output after the
-first iteration of the helper `_stack_reverse_sep', implemented by
+first iteration of the helper '_stack_reverse_sep', implemented by
prepending the original SEP to PRE and omitting a SEP argument in
subsequent iterations. Note that the empty string that separates SEP
from PRE is provided as part of the fourth argument when originally
-calling `_stack_reverse_sep', and not by writing `$4`'$3' as the third
+calling '_stack_reverse_sep', and not by writing '$4`'$3' as the third
argument in the recursive call; while the other approach would give the
same output, it does so at the expense of increasing the argument size
-on each iteration of `_stack_reverse_sep', which results in quadratic
-instead of linear execution time. The improved stack walking macros
-are available in `m4-1.4.16/examples/stack_sep.m4':
+on each iteration of '_stack_reverse_sep', which results in quadratic
+instead of linear execution time. The improved stack walking macros are
+available in 'm4-1.4.17/examples/stack_sep.m4':
$ m4 -I examples
include(`stack_sep.m4')
@@ -6863,15 +6847,15 @@ are available in `m4-1.4.16/examples/stack_sep.m4':

File: m4.info, Node: Improved m4wrap, Next: Improved cleardivert, Prev: Improved copy, Up: Answers
-17.5 Solution for `m4wrap'
+17.5 Solution for 'm4wrap'
==========================
-The replacement `m4wrap' versions presented above, designed to
-guarantee FIFO or LIFO order regardless of the underlying M4
-implementation, share a bug when dealing with wrapped text that looks
-like parameter expansion. Note how the invocation of `m4wrapN'
-interprets these parameters, while using the builtin preserves them for
-their intended use.
+The replacement 'm4wrap' versions presented above, designed to guarantee
+FIFO or LIFO order regardless of the underlying M4 implementation, share
+a bug when dealing with wrapped text that looks like parameter
+expansion. Note how the invocation of 'm4wrapN' interprets these
+parameters, while using the builtin preserves them for their intended
+use.
$ m4 -I examples
include(`wraplifo.m4')
@@ -6886,22 +6870,21 @@ their intended use.
=>bar:-a-a,b-2-
=>m4wrap0:---0-
- Additionally, the computation of `_m4wrap_level' and creation of
-multiple `m4wrapN' placeholders in the original examples is more
+ Additionally, the computation of '_m4wrap_level' and creation of
+multiple 'm4wrapN' placeholders in the original examples is more
expensive in time and memory than strictly necessary. Notice how the
-improved version grabs the wrapped text via `defn' to avoid parameter
-expansion, then undefines `_m4wrap_text', before stripping a level of
-quotes with `_arg1' to expand the text. That way, each level of
+improved version grabs the wrapped text via 'defn' to avoid parameter
+expansion, then undefines '_m4wrap_text', before stripping a level of
+quotes with '_arg1' to expand the text. That way, each level of
wrapping reuses the single placeholder, which starts each nesting level
in an undefined state.
Finally, it is worth emulating the GNU M4 extension of saving all
-arguments to `m4wrap', separated by a space, rather than saving just
-the first argument. This is done with the `join' macro documented
+arguments to 'm4wrap', separated by a space, rather than saving just the
+first argument. This is done with the 'join' macro documented
previously (*note Shift::). The improved LIFO example is shipped as
-`m4-1.4.16/examples/wraplifo2.m4', and can easily be converted to a
-FIFO solution by swapping the adjacent invocations of `joinall' and
-`defn'.
+'m4-1.4.17/examples/wraplifo2.m4', and can easily be converted to a FIFO
+solution by swapping the adjacent invocations of 'joinall' and 'defn'.
$ m4 -I examples
include(`wraplifo2.m4')
@@ -6931,10 +6914,10 @@ FIFO solution by swapping the adjacent invocations of `joinall' and

File: m4.info, Node: Improved cleardivert, Next: Improved capitalize, Prev: Improved m4wrap, Up: Answers
-17.6 Solution for `cleardivert'
+17.6 Solution for 'cleardivert'
===============================
-The `cleardivert' macro (*note Cleardivert::) cannot, as it stands, be
+The 'cleardivert' macro (*note Cleardivert::) cannot, as it stands, be
called without arguments to clear all pending diversions. That is
because using undivert with an empty string for an argument is different
than using it with no arguments at all. Compare the earlier definition
@@ -6966,15 +6949,14 @@ with one that takes the number of arguments into account:

File: m4.info, Node: Improved capitalize, Next: Improved fatal_error, Prev: Improved cleardivert, Up: Answers
-17.7 Solution for `capitalize'
+17.7 Solution for 'capitalize'
==============================
-The `capitalize' macro (*note Patsubst::) as presented earlier does not
+The 'capitalize' macro (*note Patsubst::) as presented earlier does not
allow clients to follow the quoting rule of thumb. Consider the three
-macros `active', `Active', and `ACTIVE', and the difference between
-calling `capitalize' with the expansion of a macro, expanding the
-result of a case change, and changing the case of a double-quoted
-string:
+macros 'active', 'Active', and 'ACTIVE', and the difference between
+calling 'capitalize' with the expansion of a macro, expanding the result
+of a case change, and changing the case of a double-quoted string:
$ m4 -I examples
include(`capitalize.m4')dnl
@@ -7006,46 +6988,46 @@ string:
capitalize(`active')
=>OOPSctive
- First, when `capitalize' is called with more than one argument, it
-was throwing away later arguments, whereas `upcase' and `downcase' used
-`$*' to collect them all. The fix is simple: use `$*' consistently.
+ First, when 'capitalize' is called with more than one argument, it
+was throwing away later arguments, whereas 'upcase' and 'downcase' used
+'$*' to collect them all. The fix is simple: use '$*' consistently.
- Next, with single-quoting, `capitalize' outputs a single character,
-a set of quotes, then the rest of the characters, making it impossible
-to invoke `Active' after the fact, and allowing the alternate macro `A'
-to interfere. Here, the solution is to use additional quoting in the
+ Next, with single-quoting, 'capitalize' outputs a single character, a
+set of quotes, then the rest of the characters, making it impossible to
+invoke 'Active' after the fact, and allowing the alternate macro 'A' to
+interfere. Here, the solution is to use additional quoting in the
helper macros, then pass the final over-quoted output string through
-`_arg1' to remove the extra quoting and finally invoke the concatenated
+'_arg1' to remove the extra quoting and finally invoke the concatenated
portions as a single string.
Finally, when passed a double-quoted string, the nested macro
-`_capitalize' is never invoked because it ended up nested inside
-quotes. This one is the toughest to fix. In short, we have no idea how
-many levels of quotes are in effect on the substring being altered by
-`patsubst'. If the replacement string cannot be expressed entirely in
+'_capitalize' is never invoked because it ended up nested inside quotes.
+This one is the toughest to fix. In short, we have no idea how many
+levels of quotes are in effect on the substring being altered by
+'patsubst'. If the replacement string cannot be expressed entirely in
terms of literal text and backslash substitutions, then we need a
mechanism to guarantee that the helper macros are invoked outside of
-quotes. In other words, this sounds like a job for `changequote'
-(*note Changequote::). By changing the active quoting characters, we
-can guarantee that replacement text injected by `patsubst' always
-occurs in the middle of a string that has exactly one level of
-over-quoting using alternate quotes; so the replacement text closes the
-quoted string, invokes the helper macros, then reopens the quoted
-string. In turn, that means the replacement text has unbalanced quotes,
-necessitating another round of `changequote'.
+quotes. In other words, this sounds like a job for 'changequote' (*note
+Changequote::). By changing the active quoting characters, we can
+guarantee that replacement text injected by 'patsubst' always occurs in
+the middle of a string that has exactly one level of over-quoting using
+alternate quotes; so the replacement text closes the quoted string,
+invokes the helper macros, then reopens the quoted string. In turn,
+that means the replacement text has unbalanced quotes, necessitating
+another round of 'changequote'.
In the fixed version below, (also shipped as
-`m4-1.4.16/examples/capitalize2.m4'), `capitalize' uses the alternate
-quotes of `<<[' and `]>>' (the longer strings are chosen so as to be
+'m4-1.4.17/examples/capitalize2.m4'), 'capitalize' uses the alternate
+quotes of '<<[' and ']>>' (the longer strings are chosen so as to be
less likely to appear in the text being converted). The helpers
-`_to_alt' and `_from_alt' merely reduce the number of characters
-required to perform a `changequote', since the definition changes
-twice. The outermost pair means that `patsubst' and `_capitalize_alt'
-are invoked with alternate quoting; the innermost pair is used so that
-the third argument to `patsubst' can contain an unbalanced `]>>'/`<<['
-pair. Note that `upcase' and `downcase' must be redefined as
-`_upcase_alt' and `_downcase_alt', since they contain nested quotes but
-are invoked with the alternate quoting scheme in effect.
+'_to_alt' and '_from_alt' merely reduce the number of characters
+required to perform a 'changequote', since the definition changes twice.
+The outermost pair means that 'patsubst' and '_capitalize_alt' are
+invoked with alternate quoting; the innermost pair is used so that the
+third argument to 'patsubst' can contain an unbalanced ']>>'/'<<[' pair.
+Note that 'upcase' and 'downcase' must be redefined as '_upcase_alt' and
+'_downcase_alt', since they contain nested quotes but are invoked with
+the alternate quoting scheme in effect.
$ m4 -I examples
include(`capitalize2.m4')dnl
@@ -7079,16 +7061,16 @@ are invoked with the alternate quoting scheme in effect.

File: m4.info, Node: Improved fatal_error, Prev: Improved capitalize, Up: Answers
-17.8 Solution for `fatal_error'
+17.8 Solution for 'fatal_error'
===============================
-The `fatal_error' macro (*note M4exit::) is not robust to versions of
-GNU M4 earlier than 1.4.8, where invoking `__file__' (*note Location::)
-inside `m4wrap' would result in an empty string, and `__line__'
-resulted in `0' even though all files start at line 1. Furthermore,
-versions earlier than 1.4.6 did not support the `__program__' macro.
-If you want `fatal_error' to work across the entire 1.4.x release
-series, a better implementation would be:
+The 'fatal_error' macro (*note M4exit::) is not robust to versions of
+GNU M4 earlier than 1.4.8, where invoking '__file__' (*note Location::)
+inside 'm4wrap' would result in an empty string, and '__line__' resulted
+in '0' even though all files start at line 1. Furthermore, versions
+earlier than 1.4.6 did not support the '__program__' macro. If you want
+'fatal_error' to work across the entire 1.4.x release series, a better
+implementation would be:
define(`fatal_error',
`errprint(ifdef(`__program__', `__program__', ``m4'')'dnl
@@ -7100,9 +7082,9 @@ series, a better implementation would be:
fatal_error(`inside wrapped text')')
=>
^D
- error-->m4:stdin:6: Warning: excess arguments to builtin `divnum' ignored
+ error->m4:stdin:6: Warning: excess arguments to builtin `divnum' ignored
=>0
- error-->m4:stdin:6: fatal error: inside wrapped text
+ error->m4:stdin:6: fatal error: inside wrapped text

File: m4.info, Node: Copying This Package, Next: Copying This Manual, Prev: Answers, Up: Top
@@ -7126,7 +7108,7 @@ A.1 License for copying the M4 package
Version 3, 29 June 2007
- Copyright (C) 2007 Free Software Foundation, Inc. `http://fsf.org/'
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
@@ -7140,11 +7122,11 @@ and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains
-free software for all its users. We, the Free Software Foundation, use
-the GNU General Public License for most of our software; it applies
-also to any other work released this way by its authors. You can apply
-it to your programs, too.
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
@@ -7154,9 +7136,9 @@ want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you
-have certain responsibilities if you distribute copies of the software,
-or if you modify it: responsibilities to respect the freedom of others.
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
@@ -7175,16 +7157,15 @@ changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the
-manufacturer can do so. This is fundamentally incompatible with the
-aim of protecting users' freedom to change the software. The
-systematic pattern of such abuse occurs in the area of products for
-individuals to use, which is precisely where it is most unacceptable.
-Therefore, we have designed this version of the GPL to prohibit the
-practice for those products. If such problems arise substantially in
-other domains, we stand ready to extend this provision to those domains
-in future versions of the GPL, as needed to protect the freedom of
-users.
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
@@ -7221,8 +7202,8 @@ TERMS AND CONDITIONS
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
- infringement under applicable copyright law, except executing it
- on a computer or modifying a private copy. Propagation includes
+ infringement under applicable copyright law, except executing it on
+ a computer or modifying a private copy. Propagation includes
copying, distribution (with or without modification), making
available to the public, and in some countries other activities as
well.
@@ -7236,8 +7217,8 @@ TERMS AND CONDITIONS
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to
- the extent that warranties are provided), that licensees may
- convey the work under this License, and how to view a copy of this
+ the extent that warranties are provided), that licensees may convey
+ the work under this License, and how to view a copy of this
License. If the interface presents a list of user commands or
options, such as a menu, a prominent item in the list meets this
criterion.
@@ -7245,8 +7226,8 @@ TERMS AND CONDITIONS
1. Source Code.
The "source code" for a work means the preferred form of the work
- for making modifications to it. "Object code" means any
- non-source form of a work.
+ for making modifications to it. "Object code" means any non-source
+ form of a work.
A "Standard Interface" means an interface that either is an
official standard defined by a recognized standards body, or, in
@@ -7257,10 +7238,10 @@ TERMS AND CONDITIONS
The "System Libraries" of an executable work include anything,
other than the work as a whole, that (a) is included in the normal
form of packaging a Major Component, but which is not part of that
- Major Component, and (b) serves only to enable use of the work
- with that Major Component, or to implement a Standard Interface
- for which an implementation is available to the public in source
- code form. A "Major Component", in this context, means a major
+ Major Component, and (b) serves only to enable use of the work with
+ that Major Component, or to implement a Standard Interface for
+ which an implementation is available to the public in source code
+ form. A "Major Component", in this context, means a major
essential component (kernel, window system, and so on) of the
specific operating system (if any) on which the executable work
runs, or a compiler used to produce the work, or an object code
@@ -7268,15 +7249,15 @@ TERMS AND CONDITIONS
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
- work) run the object code and to modify the work, including
- scripts to control those activities. However, it does not include
- the work's System Libraries, or general-purpose tools or generally
+ work) run the object code and to modify the work, including scripts
+ to control those activities. However, it does not include the
+ work's System Libraries, or general-purpose tools or generally
available free programs which are used unmodified in performing
those activities but which are not part of the work. For example,
- Corresponding Source includes interface definition files
- associated with source files for the work, and the source code for
- shared libraries and dynamically linked subprograms that the work
- is specifically designed to require, such as by intimate data
+ Corresponding Source includes interface definition files associated
+ with source files for the work, and the source code for shared
+ libraries and dynamically linked subprograms that the work is
+ specifically designed to require, such as by intimate data
communication or control flow between those subprograms and other
parts of the work.
@@ -7293,22 +7274,22 @@ TERMS AND CONDITIONS
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running
- a covered work is covered by this License only if the output,
- given its content, constitutes a covered work. This License
- acknowledges your rights of fair use or other equivalent, as
- provided by copyright law.
+ a covered work is covered by this License only if the output, given
+ its content, constitutes a covered work. This License acknowledges
+ your rights of fair use or other equivalent, as provided by
+ copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise
remains in force. You may convey covered works to others for the
- sole purpose of having them make modifications exclusively for
- you, or provide you with facilities for running those works,
- provided that you comply with the terms of this License in
- conveying all material for which you do not control copyright.
- Those thus making or running the covered works for you must do so
- exclusively on your behalf, under your direction and control, on
- terms that prohibit them from making any copies of your
- copyrighted material outside their relationship with you.
+ sole purpose of having them make modifications exclusively for you,
+ or provide you with facilities for running those works, provided
+ that you comply with the terms of this License in conveying all
+ material for which you do not control copyright. Those thus making
+ or running the covered works for you must do so exclusively on your
+ behalf, under your direction and control, on terms that prohibit
+ them from making any copies of your copyrighted material outside
+ their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section
@@ -7325,8 +7306,8 @@ TERMS AND CONDITIONS
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such
circumvention is effected by exercising rights under this License
- with respect to the covered work, and you disclaim any intention
- to limit operation or modification of the work as a means of
+ with respect to the covered work, and you disclaim any intention to
+ limit operation or modification of the work as a means of
enforcing, against the work's users, your or third parties' legal
rights to forbid circumvention of technological measures.
@@ -7396,8 +7377,8 @@ TERMS AND CONDITIONS
b. Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for
- as long as you offer spare parts or customer support for that
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that
product model, to give anyone who possesses the object code
either (1) a copy of the Corresponding Source for all the
software in the product that is covered by this License, on a
@@ -7407,32 +7388,31 @@ TERMS AND CONDITIONS
to copy the Corresponding Source from a network server at no
charge.
- c. Convey individual copies of the object code with a copy of
- the written offer to provide the Corresponding Source. This
+ c. Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially,
and only if you received the object code with such an offer,
in accord with subsection 6b.
d. Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access
- to the Corresponding Source in the same way through the same
+ place (gratis or for a charge), and offer equivalent access to
+ the Corresponding Source in the same way through the same
place at no further charge. You need not require recipients
to copy the Corresponding Source along with the object code.
If the place to copy the object code is a network server, the
- Corresponding Source may be on a different server (operated
- by you or a third party) that supports equivalent copying
- facilities, provided you maintain clear directions next to
- the object code saying where to find the Corresponding Source.
+ Corresponding Source may be on a different server (operated by
+ you or a third party) that supports equivalent copying
+ facilities, provided you maintain clear directions next to the
+ object code saying where to find the Corresponding Source.
Regardless of what server hosts the Corresponding Source, you
- remain obligated to ensure that it is available for as long
- as needed to satisfy these requirements.
+ remain obligated to ensure that it is available for as long as
+ needed to satisfy these requirements.
e. Convey the object code using peer-to-peer transmission,
provided you inform other peers where the object code and
Corresponding Source of the work are being offered to the
general public at no charge under subsection 6d.
-
A separable portion of the object code, whose source code is
excluded from the Corresponding Source as a System Library, need
not be included in conveying the object code work.
@@ -7440,8 +7420,8 @@ TERMS AND CONDITIONS
A "User Product" is either (1) a "consumer product", which means
any tangible personal property which is normally used for personal,
family, or household purposes, or (2) anything designed or sold for
- incorporation into a dwelling. In determining whether a product
- is a consumer product, doubtful cases shall be resolved in favor of
+ incorporation into a dwelling. In determining whether a product is
+ a consumer product, doubtful cases shall be resolved in favor of
coverage. For a particular product received by a particular user,
"normally used" refers to a typical or common use of that class of
product, regardless of the status of the particular user or of the
@@ -7472,11 +7452,11 @@ TERMS AND CONDITIONS
The requirement to provide Installation Information does not
include a requirement to continue to provide support service,
- warranty, or updates for a work that has been modified or
- installed by the recipient, or for the User Product in which it
- has been modified or installed. Access to a network may be denied
- when the modification itself materially and adversely affects the
- operation of the network or violates the rules and protocols for
+ warranty, or updates for a work that has been modified or installed
+ by the recipient, or for the User Product in which it has been
+ modified or installed. Access to a network may be denied when the
+ modification itself materially and adversely affects the operation
+ of the network or violates the rules and protocols for
communication across the network.
Corresponding Source conveyed, and Installation Information
@@ -7506,8 +7486,8 @@ TERMS AND CONDITIONS
Notwithstanding any other provision of this License, for material
you add to a covered work, you may (if authorized by the copyright
- holders of that material) supplement the terms of this License
- with terms:
+ holders of that material) supplement the terms of this License with
+ terms:
a. Disclaiming warranty or limiting liability differently from
the terms of sections 15 and 16 of this License; or
@@ -7517,9 +7497,8 @@ TERMS AND CONDITIONS
Legal Notices displayed by works containing it; or
c. Prohibiting misrepresentation of the origin of that material,
- or requiring that modified versions of such material be
- marked in reasonable ways as different from the original
- version; or
+ or requiring that modified versions of such material be marked
+ in reasonable ways as different from the original version; or
d. Limiting the use for publicity purposes of names of licensors
or authors of the material; or
@@ -7538,11 +7517,10 @@ TERMS AND CONDITIONS
you received it, or any part of it, contains a notice stating that
it is governed by this License along with a term that is a further
restriction, you may remove that term. If a license document
- contains a further restriction but permits relicensing or
- conveying under this License, you may add to a covered work
- material governed by the terms of that license document, provided
- that the further restriction does not survive such relicensing or
- conveying.
+ contains a further restriction but permits relicensing or conveying
+ under this License, you may add to a covered work material governed
+ by the terms of that license document, provided that the further
+ restriction does not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
@@ -7558,13 +7536,13 @@ TERMS AND CONDITIONS
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights
- under this License (including any patent licenses granted under
- the third paragraph of section 11).
+ under this License (including any patent licenses granted under the
+ third paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
- provisionally, unless and until the copyright holder explicitly
- and finally terminates your license, and (b) permanently, if the
+ provisionally, unless and until the copyright holder explicitly and
+ finally terminates your license, and (b) permanently, if the
copyright holder fails to notify you of the violation by some
reasonable means prior to 60 days after the cessation.
@@ -7576,10 +7554,10 @@ TERMS AND CONDITIONS
after your receipt of the notice.
Termination of your rights under this section does not terminate
- the licenses of parties who have received copies or rights from
- you under this License. If your rights have been terminated and
- not permanently reinstated, you do not qualify to receive new
- licenses for the same material under section 10.
+ the licenses of parties who have received copies or rights from you
+ under this License. If your rights have been terminated and not
+ permanently reinstated, you do not qualify to receive new licenses
+ for the same material under section 10.
9. Acceptance Not Required for Having Copies.
@@ -7593,7 +7571,7 @@ TERMS AND CONDITIONS
by modifying or propagating a covered work, you indicate your
acceptance of this License to do so.
- 10. Automatic Licensing of Downstream Recipients.
+ 10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
@@ -7607,21 +7585,21 @@ TERMS AND CONDITIONS
covered work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or
- could give under the previous paragraph, plus a right to
- possession of the Corresponding Source of the work from the
- predecessor in interest, if the predecessor has it or can get it
- with reasonable efforts.
+ could give under the previous paragraph, plus a right to possession
+ of the Corresponding Source of the work from the predecessor in
+ interest, if the predecessor has it or can get it with reasonable
+ efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you
- may not impose a license fee, royalty, or other charge for
- exercise of rights granted under this License, and you may not
- initiate litigation (including a cross-claim or counterclaim in a
- lawsuit) alleging that any patent claim is infringed by making,
- using, selling, offering for sale, or importing the Program or any
- portion of it.
+ may not impose a license fee, royalty, or other charge for exercise
+ of rights granted under this License, and you may not initiate
+ litigation (including a cross-claim or counterclaim in a lawsuit)
+ alleging that any patent claim is infringed by making, using,
+ selling, offering for sale, or importing the Program or any portion
+ of it.
- 11. Patents.
+ 11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.
@@ -7641,15 +7619,15 @@ TERMS AND CONDITIONS
Each contributor grants you a non-exclusive, worldwide,
royalty-free patent license under the contributor's essential
patent claims, to make, use, sell, offer for sale, import and
- otherwise run, modify and propagate the contents of its
- contributor version.
+ otherwise run, modify and propagate the contents of its contributor
+ version.
In the following three paragraphs, a "patent license" is any
express agreement or commitment, however denominated, not to
enforce a patent (such as an express permission to practice a
- patent or covenant not to sue for patent infringement). To
- "grant" such a patent license to a party means to make such an
- agreement or commitment not to enforce a patent against the party.
+ patent or covenant not to sue for patent infringement). To "grant"
+ such a patent license to a party means to make such an agreement or
+ commitment not to enforce a patent against the party.
If you convey a covered work, knowingly relying on a patent
license, and the Corresponding Source of the work is not available
@@ -7679,36 +7657,35 @@ TERMS AND CONDITIONS
conditioned on the non-exercise of one or more of the rights that
are specifically granted under this License. You may not convey a
covered work if you are a party to an arrangement with a third
- party that is in the business of distributing software, under
- which you make payment to the third party based on the extent of
- your activity of conveying the work, and under which the third
- party grants, to any of the parties who would receive the covered
- work from you, a discriminatory patent license (a) in connection
- with copies of the covered work conveyed by you (or copies made
- from those copies), or (b) primarily for and in connection with
- specific products or compilations that contain the covered work,
- unless you entered into that arrangement, or that patent license
- was granted, prior to 28 March 2007.
+ party that is in the business of distributing software, under which
+ you make payment to the third party based on the extent of your
+ activity of conveying the work, and under which the third party
+ grants, to any of the parties who would receive the covered work
+ from you, a discriminatory patent license (a) in connection with
+ copies of the covered work conveyed by you (or copies made from
+ those copies), or (b) primarily for and in connection with specific
+ products or compilations that contain the covered work, unless you
+ entered into that arrangement, or that patent license was granted,
+ prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
- 12. No Surrender of Others' Freedom.
+ 12. No Surrender of Others' Freedom.
- If conditions are imposed on you (whether by court order,
- agreement or otherwise) that contradict the conditions of this
- License, they do not excuse you from the conditions of this
- License. If you cannot convey a covered work so as to satisfy
- simultaneously your obligations under this License and any other
- pertinent obligations, then as a consequence you may not convey it
- at all. For example, if you agree to terms that obligate you to
- collect a royalty for further conveying from those to whom you
- convey the Program, the only way you could satisfy both those
- terms and this License would be to refrain entirely from conveying
- the Program.
+ If conditions are imposed on you (whether by court order, agreement
+ or otherwise) that contradict the conditions of this License, they
+ do not excuse you from the conditions of this License. If you
+ cannot convey a covered work so as to satisfy simultaneously your
+ obligations under this License and any other pertinent obligations,
+ then as a consequence you may not convey it at all. For example,
+ if you agree to terms that obligate you to collect a royalty for
+ further conveying from those to whom you convey the Program, the
+ only way you could satisfy both those terms and this License would
+ be to refrain entirely from conveying the Program.
- 13. Use with the GNU Affero General Public License.
+ 13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
@@ -7719,22 +7696,21 @@ TERMS AND CONDITIONS
General Public License, section 13, concerning interaction through
a network will apply to the combination as such.
- 14. Revised Versions of this License.
+ 14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new
- versions of the GNU General Public License from time to time.
- Such new versions will be similar in spirit to the present
- version, but may differ in detail to address new problems or
- concerns.
+ versions of the GNU General Public License from time to time. Such
+ new versions will be similar in spirit to the present version, but
+ may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU
General Public License "or any later version" applies to it, you
have the option of following the terms and conditions either of
- that numbered version or of any later version published by the
- Free Software Foundation. If the Program does not specify a
- version number of the GNU General Public License, you may choose
- any version ever published by the Free Software Foundation.
+ that numbered version or of any later version published by the Free
+ Software Foundation. If the Program does not specify a version
+ number of the GNU General Public License, you may choose any
+ version ever published by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that
@@ -7746,7 +7722,7 @@ TERMS AND CONDITIONS
author or copyright holder as a result of your choosing to follow a
later version.
- 15. Disclaimer of Warranty.
+ 15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
@@ -7758,12 +7734,12 @@ TERMS AND CONDITIONS
SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
NECESSARY SERVICING, REPAIR OR CORRECTION.
- 16. Limitation of Liability.
+ 16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES
- AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
- FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+ AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
+ DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
@@ -7771,7 +7747,7 @@ TERMS AND CONDITIONS
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF
THE POSSIBILITY OF SUCH DAMAGES.
- 17. Interpretation of Sections 15 and 16.
+ 17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
@@ -7780,7 +7756,6 @@ TERMS AND CONDITIONS
connection with the Program, unless a warranty or assumption of
liability accompanies a copy of the Program in return for a fee.
-
END OF TERMS AND CONDITIONS
===========================
@@ -7811,7 +7786,7 @@ state the exclusion of warranty; and each file should have at least the
General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program. If not, see `http://www.gnu.org/licenses/'.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper
mail.
@@ -7820,11 +7795,11 @@ mail.
notice like this when it starts in an interactive mode:
PROGRAM Copyright (C) YEAR NAME OF AUTHOR
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
+ under certain conditions; type 'show c' for details.
- The hypothetical commands `show w' and `show c' should show the
+ The hypothetical commands 'show w' and 'show c' should show the
appropriate parts of the General Public License. Of course, your
program's commands might be different; for a GUI interface, you would
use an "about box".
@@ -7832,27 +7807,12 @@ use an "about box".
You should also get your employer (if you work as a programmer) or
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. For more information on this, and how to apply and follow
-the GNU GPL, see `http://www.gnu.org/licenses/'.
+the GNU GPL, see <http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your
program into proprietary programs. If your program is a subroutine
library, you may consider it more useful to permit linking proprietary
applications with the library. If this is what you want to do, use the
GNU Lesser General Public License instead of this License. But first,
-please read `http://www.gnu.org/philosophy/why-not-lgpl.html'.
-
-
-File: m4.info, Node: Copying This Manual, Next: Indices, Prev: Copying This Package, Up: Top
-
-Appendix B How to make copies of this manual
-********************************************
-
-This appendix covers the license for copying this manual. Note that
-some of the longer examples in this manual are also distributed in the
-directory `m4-1.4.16/examples/', where a more permissive license is in
-effect when copying just the examples.
-
-* Menu:
-
-* GNU Free Documentation License:: License for copying this manual
+please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/doc/m4.info-2 b/doc/m4.info-2
index 1ac7d3b..84921f0 100644
--- a/doc/m4.info-2
+++ b/doc/m4.info-2
@@ -1,9 +1,9 @@
-This is m4.info, produced by makeinfo version 4.13 from m4.texinfo.
+This is m4.info, produced by makeinfo version 5.1 from m4.texi.
-This manual (28 February 2011) is for GNU M4 (version 1.4.16), a
+This manual (22 September 2013) is for GNU M4 (version 1.4.17), a
package containing an implementation of the m4 macro language.
- Copyright (C) 1989-1994, 2004-2011 Free Software Foundation, Inc.
+ Copyright (C) 1989-1994, 2004-2013 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
@@ -11,13 +11,27 @@ package containing an implementation of the m4 macro language.
Foundation; with no Invariant Sections, no Front-Cover Texts, and
no Back-Cover Texts. A copy of the license is included in the
section entitled "GNU Free Documentation License."
-
INFO-DIR-SECTION Text creation and manipulation
START-INFO-DIR-ENTRY
* M4: (m4). A powerful macro processor.
END-INFO-DIR-ENTRY

+File: m4.info, Node: Copying This Manual, Next: Indices, Prev: Copying This Package, Up: Top
+
+Appendix B How to make copies of this manual
+********************************************
+
+This appendix covers the license for copying this manual. Note that
+some of the longer examples in this manual are also distributed in the
+directory 'm4-1.4.17/examples/', where a more permissive license is in
+effect when copying just the examples.
+
+* Menu:
+
+* GNU Free Documentation License:: License for copying this manual
+
+
File: m4.info, Node: GNU Free Documentation License, Up: Copying This Manual
B.1 License for copying this manual
@@ -26,7 +40,7 @@ B.1 License for copying this manual
Version 1.3, 3 November 2008
Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
- `http://fsf.org/'
+ <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -51,21 +65,21 @@ B.1 License for copying this manual
free program should come with manuals providing the same freedoms
that the software does. But this License is not limited to
software manuals; it can be used for any textual work, regardless
- of subject matter or whether it is published as a printed book.
- We recommend this License principally for works whose purpose is
+ of subject matter or whether it is published as a printed book. We
+ recommend this License principally for works whose purpose is
instruction or reference.
1. APPLICABILITY AND DEFINITIONS
This License applies to any manual or other work, in any medium,
- that contains a notice placed by the copyright holder saying it
- can be distributed under the terms of this License. Such a notice
+ that contains a notice placed by the copyright holder saying it can
+ be distributed under the terms of this License. Such a notice
grants a world-wide, royalty-free license, unlimited in duration,
to use that work under the conditions stated herein. The
"Document", below, refers to any such manual or work. Any member
- of the public is a licensee, and is addressed as "you". You
- accept the license if you copy, modify or distribute the work in a
- way requiring permission under copyright law.
+ of the public is a licensee, and is addressed as "you". You accept
+ the license if you copy, modify or distribute the work in a way
+ requiring permission under copyright law.
A "Modified Version" of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
@@ -83,12 +97,12 @@ B.1 License for copying this manual
regarding them.
The "Invariant Sections" are certain Secondary Sections whose
- titles are designated, as being those of Invariant Sections, in
- the notice that says that the Document is released under this
- License. If a section does not fit the above definition of
- Secondary then it is not allowed to be designated as Invariant.
- The Document may contain zero Invariant Sections. If the Document
- does not identify any Invariant Sections then there are none.
+ titles are designated, as being those of Invariant Sections, in the
+ notice that says that the Document is released under this License.
+ If a section does not fit the above definition of Secondary then it
+ is not allowed to be designated as Invariant. The Document may
+ contain zero Invariant Sections. If the Document does not identify
+ any Invariant Sections then there are none.
The "Cover Texts" are certain short passages of text that are
listed, as Front-Cover Texts or Back-Cover Texts, in the notice
@@ -99,27 +113,27 @@ B.1 License for copying this manual
A "Transparent" copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
general public, that is suitable for revising the document
- straightforwardly with generic text editors or (for images
- composed of pixels) generic paint programs or (for drawings) some
- widely available drawing editor, and that is suitable for input to
- text formatters or for automatic translation to a variety of
- formats suitable for input to text formatters. A copy made in an
- otherwise Transparent file format whose markup, or absence of
- markup, has been arranged to thwart or discourage subsequent
- modification by readers is not Transparent. An image format is
- not Transparent if used for any substantial amount of text. A
- copy that is not "Transparent" is called "Opaque".
+ straightforwardly with generic text editors or (for images composed
+ of pixels) generic paint programs or (for drawings) some widely
+ available drawing editor, and that is suitable for input to text
+ formatters or for automatic translation to a variety of formats
+ suitable for input to text formatters. A copy made in an otherwise
+ Transparent file format whose markup, or absence of markup, has
+ been arranged to thwart or discourage subsequent modification by
+ readers is not Transparent. An image format is not Transparent if
+ used for any substantial amount of text. A copy that is not
+ "Transparent" is called "Opaque".
Examples of suitable formats for Transparent copies include plain
ASCII without markup, Texinfo input format, LaTeX input format,
- SGML or XML using a publicly available DTD, and
- standard-conforming simple HTML, PostScript or PDF designed for
- human modification. Examples of transparent image formats include
- PNG, XCF and JPG. Opaque formats include proprietary formats that
- can be read and edited only by proprietary word processors, SGML or
- XML for which the DTD and/or processing tools are not generally
- available, and the machine-generated HTML, PostScript or PDF
- produced by some word processors for output purposes only.
+ SGML or XML using a publicly available DTD, and standard-conforming
+ simple HTML, PostScript or PDF designed for human modification.
+ Examples of transparent image formats include PNG, XCF and JPG.
+ Opaque formats include proprietary formats that can be read and
+ edited only by proprietary word processors, SGML or XML for which
+ the DTD and/or processing tools are not generally available, and
+ the machine-generated HTML, PostScript or PDF produced by some word
+ processors for output purposes only.
The "Title Page" means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the
@@ -157,8 +171,8 @@ B.1 License for copying this manual
may not use technical measures to obstruct or control the reading
or further copying of the copies you make or distribute. However,
you may accept compensation in exchange for copies. If you
- distribute a large enough number of copies you must also follow
- the conditions in section 3.
+ distribute a large enough number of copies you must also follow the
+ conditions in section 3.
You may also lend copies, under the same conditions stated above,
and you may publicly display copies.
@@ -172,12 +186,11 @@ B.1 License for copying this manual
these Cover Texts: Front-Cover Texts on the front cover, and
Back-Cover Texts on the back cover. Both covers must also clearly
and legibly identify you as the publisher of these copies. The
- front cover must present the full title with all words of the
- title equally prominent and visible. You may add other material
- on the covers in addition. Copying with changes limited to the
- covers, as long as they preserve the title of the Document and
- satisfy these conditions, can be treated as verbatim copying in
- other respects.
+ front cover must present the full title with all words of the title
+ equally prominent and visible. You may add other material on the
+ covers in addition. Copying with changes limited to the covers, as
+ long as they preserve the title of the Document and satisfy these
+ conditions, can be treated as verbatim copying in other respects.
If the required texts for either cover are too voluminous to fit
legibly, you should put the first ones listed (as many as fit
@@ -185,40 +198,39 @@ B.1 License for copying this manual
adjacent pages.
If you publish or distribute Opaque copies of the Document
- numbering more than 100, you must either include a
- machine-readable Transparent copy along with each Opaque copy, or
- state in or with each Opaque copy a computer-network location from
- which the general network-using public has access to download
- using public-standard network protocols a complete Transparent
- copy of the Document, free of added material. If you use the
- latter option, you must take reasonably prudent steps, when you
- begin distribution of Opaque copies in quantity, to ensure that
- this Transparent copy will remain thus accessible at the stated
- location until at least one year after the last time you
- distribute an Opaque copy (directly or through your agents or
- retailers) of that edition to the public.
+ numbering more than 100, you must either include a machine-readable
+ Transparent copy along with each Opaque copy, or state in or with
+ each Opaque copy a computer-network location from which the general
+ network-using public has access to download using public-standard
+ network protocols a complete Transparent copy of the Document, free
+ of added material. If you use the latter option, you must take
+ reasonably prudent steps, when you begin distribution of Opaque
+ copies in quantity, to ensure that this Transparent copy will
+ remain thus accessible at the stated location until at least one
+ year after the last time you distribute an Opaque copy (directly or
+ through your agents or retailers) of that edition to the public.
It is requested, but not required, that you contact the authors of
- the Document well before redistributing any large number of
- copies, to give them a chance to provide you with an updated
- version of the Document.
+ the Document well before redistributing any large number of copies,
+ to give them a chance to provide you with an updated version of the
+ Document.
4. MODIFICATIONS
You may copy and distribute a Modified Version of the Document
under the conditions of sections 2 and 3 above, provided that you
- release the Modified Version under precisely this License, with
- the Modified Version filling the role of the Document, thus
- licensing distribution and modification of the Modified Version to
- whoever possesses a copy of it. In addition, you must do these
- things in the Modified Version:
+ release the Modified Version under precisely this License, with the
+ Modified Version filling the role of the Document, thus licensing
+ distribution and modification of the Modified Version to whoever
+ possesses a copy of it. In addition, you must do these things in
+ the Modified Version:
A. Use in the Title Page (and on the covers, if any) a title
- distinct from that of the Document, and from those of
- previous versions (which should, if there were any, be listed
- in the History section of the Document). You may use the
- same title as a previous version if the original publisher of
- that version gives permission.
+ distinct from that of the Document, and from those of previous
+ versions (which should, if there were any, be listed in the
+ History section of the Document). You may use the same title
+ as a previous version if the original publisher of that
+ version gives permission.
B. List on the Title Page, as authors, one or more persons or
entities responsible for authorship of the modifications in
@@ -248,31 +260,30 @@ B.1 License for copying this manual
I. Preserve the section Entitled "History", Preserve its Title,
and add to it an item stating at least the title, year, new
- authors, and publisher of the Modified Version as given on
- the Title Page. If there is no section Entitled "History" in
- the Document, create one stating the title, year, authors,
- and publisher of the Document as given on its Title Page,
- then add an item describing the Modified Version as stated in
- the previous sentence.
+ authors, and publisher of the Modified Version as given on the
+ Title Page. If there is no section Entitled "History" in the
+ Document, create one stating the title, year, authors, and
+ publisher of the Document as given on its Title Page, then add
+ an item describing the Modified Version as stated in the
+ previous sentence.
J. Preserve the network location, if any, given in the Document
for public access to a Transparent copy of the Document, and
likewise the network locations given in the Document for
- previous versions it was based on. These may be placed in
- the "History" section. You may omit a network location for a
- work that was published at least four years before the
- Document itself, or if the original publisher of the version
- it refers to gives permission.
+ previous versions it was based on. These may be placed in the
+ "History" section. You may omit a network location for a work
+ that was published at least four years before the Document
+ itself, or if the original publisher of the version it refers
+ to gives permission.
K. For any section Entitled "Acknowledgements" or "Dedications",
- Preserve the Title of the section, and preserve in the
- section all the substance and tone of each of the contributor
+ Preserve the Title of the section, and preserve in the section
+ all the substance and tone of each of the contributor
acknowledgements and/or dedications given therein.
- L. Preserve all the Invariant Sections of the Document,
- unaltered in their text and in their titles. Section numbers
- or the equivalent are not considered part of the section
- titles.
+ L. Preserve all the Invariant Sections of the Document, unaltered
+ in their text and in their titles. Section numbers or the
+ equivalent are not considered part of the section titles.
M. Delete any section Entitled "Endorsements". Such a section
may not be included in the Modified Version.
@@ -285,11 +296,11 @@ B.1 License for copying this manual
If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no
- material copied from the Document, you may at your option
- designate some or all of these sections as invariant. To do this,
- add their titles to the list of Invariant Sections in the Modified
- Version's license notice. These titles must be distinct from any
- other section titles.
+ material copied from the Document, you may at your option designate
+ some or all of these sections as invariant. To do this, add their
+ titles to the list of Invariant Sections in the Modified Version's
+ license notice. These titles must be distinct from any other
+ section titles.
You may add a section Entitled "Endorsements", provided it contains
nothing but endorsements of your Modified Version by various
@@ -298,15 +309,15 @@ B.1 License for copying this manual
definition of a standard.
You may add a passage of up to five words as a Front-Cover Text,
- and a passage of up to 25 words as a Back-Cover Text, to the end
- of the list of Cover Texts in the Modified Version. Only one
- passage of Front-Cover Text and one of Back-Cover Text may be
- added by (or through arrangements made by) any one entity. If the
- Document already includes a cover text for the same cover,
- previously added by you or by arrangement made by the same entity
- you are acting on behalf of, you may not add another; but you may
- replace the old one, on explicit permission from the previous
- publisher that added the old one.
+ and a passage of up to 25 words as a Back-Cover Text, to the end of
+ the list of Cover Texts in the Modified Version. Only one passage
+ of Front-Cover Text and one of Back-Cover Text may be added by (or
+ through arrangements made by) any one entity. If the Document
+ already includes a cover text for the same cover, previously added
+ by you or by arrangement made by the same entity you are acting on
+ behalf of, you may not add another; but you may replace the old
+ one, on explicit permission from the previous publisher that added
+ the old one.
The author(s) and publisher(s) of the Document do not by this
License give permission to use their names for publicity for or to
@@ -316,8 +327,8 @@ B.1 License for copying this manual
You may combine the Document with other documents released under
this License, under the terms defined in section 4 above for
- modified versions, provided that you include in the combination
- all of the Invariant Sections of all of the original documents,
+ modified versions, provided that you include in the combination all
+ of the Invariant Sections of all of the original documents,
unmodified, and list them all as Invariant Sections of your
combined work in its license notice, and that you preserve all
their Warranty Disclaimers.
@@ -344,20 +355,20 @@ B.1 License for copying this manual
documents released under this License, and replace the individual
copies of this License in the various documents with a single copy
that is included in the collection, provided that you follow the
- rules of this License for verbatim copying of each of the
- documents in all other respects.
+ rules of this License for verbatim copying of each of the documents
+ in all other respects.
You may extract a single document from such a collection, and
distribute it individually under this License, provided you insert
- a copy of this License into the extracted document, and follow
- this License in all other respects regarding verbatim copying of
- that document.
+ a copy of this License into the extracted document, and follow this
+ License in all other respects regarding verbatim copying of that
+ document.
7. AGGREGATION WITH INDEPENDENT WORKS
A compilation of the Document or its derivatives with other
- separate and independent documents or works, in or on a volume of
- a storage or distribution medium, is called an "aggregate" if the
+ separate and independent documents or works, in or on a volume of a
+ storage or distribution medium, is called an "aggregate" if the
copyright resulting from the compilation is not used to limit the
legal rights of the compilation's users beyond what the individual
works permit. When the Document is included in an aggregate, this
@@ -402,8 +413,8 @@ B.1 License for copying this manual
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
- provisionally, unless and until the copyright holder explicitly
- and finally terminates your license, and (b) permanently, if the
+ provisionally, unless and until the copyright holder explicitly and
+ finally terminates your license, and (b) permanently, if the
copyright holder fails to notify you of the violation by some
reasonable means prior to 60 days after the cessation.
@@ -415,33 +426,33 @@ B.1 License for copying this manual
after your receipt of the notice.
Termination of your rights under this section does not terminate
- the licenses of parties who have received copies or rights from
- you under this License. If your rights have been terminated and
- not permanently reinstated, receipt of a copy of some or all of
- the same material does not give you any rights to use it.
+ the licenses of parties who have received copies or rights from you
+ under this License. If your rights have been terminated and not
+ permanently reinstated, receipt of a copy of some or all of the
+ same material does not give you any rights to use it.
- 10. FUTURE REVISIONS OF THIS LICENSE
+ 10. FUTURE REVISIONS OF THIS LICENSE
The Free Software Foundation may publish new, revised versions of
the GNU Free Documentation License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns. See
- `http://www.gnu.org/copyleft/'.
+ <http://www.gnu.org/copyleft/>.
Each version of the License is given a distinguishing version
number. If the Document specifies that a particular numbered
version of this License "or any later version" applies to it, you
have the option of following the terms and conditions either of
that specified version or of any later version that has been
- published (not as a draft) by the Free Software Foundation. If
- the Document does not specify a version number of this License,
- you may choose any version ever published (not as a draft) by the
- Free Software Foundation. If the Document specifies that a proxy
- can decide which future versions of this License can be used, that
+ published (not as a draft) by the Free Software Foundation. If the
+ Document does not specify a version number of this License, you may
+ choose any version ever published (not as a draft) by the Free
+ Software Foundation. If the Document specifies that a proxy can
+ decide which future versions of this License can be used, that
proxy's public statement of acceptance of a version permanently
authorizes you to choose that version for the Document.
- 11. RELICENSING
+ 11. RELICENSING
"Massive Multiauthor Collaboration Site" (or "MMC Site") means any
World Wide Web server that publishes copyrightable works and also
@@ -471,7 +482,6 @@ B.1 License for copying this manual
site under CC-BY-SA on the same site at any time before August 1,
2009, provided the MMC is eligible for relicensing.
-
ADDENDUM: How to use this License for your documents
====================================================
@@ -499,9 +509,9 @@ combination of the three, merge those two alternatives to suit the
situation.
If your document contains nontrivial examples of program code, we
-recommend releasing these examples in parallel under your choice of
-free software license, such as the GNU General Public License, to
-permit their use in free software.
+recommend releasing these examples in parallel under your choice of free
+software license, such as the GNU General Public License, to permit
+their use in free software.

File: m4.info, Node: Indices, Prev: Copying This Manual, Up: Top
@@ -511,103 +521,105 @@ Appendix C Indices of concepts and macros
* Menu:
-* Macro index:: Index for all `m4' macros
+* Macro index:: Index for all 'm4' macros
* Concept index:: Index for many concepts

File: m4.info, Node: Macro index, Next: Concept index, Up: Indices
-C.1 Index for all `m4' macros
+C.1 Index for all 'm4' macros
=============================
-This index covers all `m4' builtins, as well as several useful
-composite macros. References are exclusively to the places where a
-macro is introduced the first time.
+This index covers all 'm4' builtins, as well as several useful composite
+macros. References are exclusively to the places where a macro is
+introduced the first time.
* Menu:
-* __file__: Location. (line 10)
-* __gnu__: Platform macros. (line 12)
-* __line__: Location. (line 11)
-* __os2__: Platform macros. (line 13)
-* __program__: Location. (line 12)
-* __unix__: Platform macros. (line 15)
-* __windows__: Platform macros. (line 17)
-* argn: Shift. (line 258)
-* array: Define. (line 56)
-* array_set: Define. (line 57)
-* builtin: Builtin. (line 9)
-* capitalize: Patsubst. (line 55)
-* changecom: Changecom. (line 10)
-* changequote: Changequote. (line 10)
-* changeword: Changeword. (line 23)
-* cleardivert: Cleardivert. (line 26)
-* cond: Shift. (line 53)
-* copy: Composition. (line 120)
-* curry: Composition. (line 68)
-* debugfile: Debug Output. (line 11)
-* debugmode: Debug Levels. (line 78)
-* decr: Incr. (line 11)
-* define: Define. (line 10)
-* define_blind: Composition. (line 11)
-* defn: Defn. (line 10)
-* divert: Divert. (line 9)
-* divnum: Divnum. (line 9)
-* dnl: Dnl. (line 9)
-* downcase: Patsubst. (line 54)
-* dquote: Shift. (line 196)
-* dquote_elt: Shift. (line 197)
-* dumpdef: Dumpdef. (line 10)
-* errprint: Errprint. (line 9)
-* esyscmd: Esyscmd. (line 9)
-* eval: Eval. (line 9)
-* example: Manual. (line 40)
-* exch: Arguments. (line 13)
-* fatal_error: M4exit. (line 25)
-* foreach: Foreach. (line 9)
-* foreachq: Foreach. (line 10)
-* forloop: Forloop. (line 9)
-* format: Format. (line 9)
-* ifdef: Ifdef. (line 10)
-* ifelse: Ifelse. (line 11)
-* include: Include. (line 9)
-* incr: Incr. (line 10)
-* index: Index macro. (line 9)
-* indir: Indir. (line 9)
-* join: Shift. (line 104)
-* joinall: Shift. (line 105)
-* len: Len. (line 9)
-* m4exit: M4exit. (line 10)
-* m4wrap: M4wrap. (line 14)
-* maketemp: Mkstemp. (line 12)
-* mkstemp: Mkstemp. (line 11)
-* nargs: Pseudo Arguments. (line 13)
-* os2: Platform macros. (line 14)
-* patsubst: Patsubst. (line 9)
-* popdef: Pushdef. (line 12)
-* pushdef: Pushdef. (line 11)
-* quote: Shift. (line 195)
-* regexp: Regexp. (line 9)
-* rename: Composition. (line 121)
-* reverse: Shift. (line 32)
-* shift: Shift. (line 17)
-* sinclude: Include. (line 10)
-* stack_foreach: Stacks. (line 12)
-* stack_foreach_lifo: Stacks. (line 13)
-* stack_foreach_sep: Improved copy. (line 16)
-* stack_foreach_sep_lifo: Improved copy. (line 17)
-* substr: Substr. (line 9)
-* syscmd: Syscmd. (line 9)
-* sysval: Sysval. (line 9)
-* traceoff: Trace. (line 11)
-* traceon: Trace. (line 10)
-* translit: Translit. (line 9)
-* undefine: Undefine. (line 9)
-* undivert: Undivert. (line 9)
-* unix: Platform macros. (line 16)
-* upcase: Patsubst. (line 53)
-* windows: Platform macros. (line 18)
+* __file__: Location. (line 9)
+* __gnu__: Platform macros. (line 11)
+* __line__: Location. (line 10)
+* __os2__: Platform macros. (line 12)
+* __program__: Location. (line 11)
+* __unix__: Platform macros. (line 14)
+* __windows__: Platform macros. (line 16)
+* argn: Shift. (line 255)
+* array: Define. (line 55)
+* array_set: Define. (line 56)
+* builtin: Builtin. (line 8)
+* capitalize: Patsubst. (line 54)
+* changecom: Changecom. (line 9)
+* changequote: Changequote. (line 9)
+* changeword: Changeword. (line 22)
+* cleardivert: Cleardivert. (line 25)
+* cond: Shift. (line 51)
+* copy: Composition. (line 119)
+* curry: Composition. (line 67)
+* debugfile: Debug Output. (line 10)
+* debugmode: Debug Levels. (line 77)
+* decr: Incr. (line 10)
+* define: Define. (line 9)
+* define_blind: Composition. (line 10)
+* defn: Defn. (line 9)
+* divert: Divert. (line 8)
+* divnum: Divnum. (line 8)
+* dnl: Dnl. (line 8)
+* downcase: Patsubst. (line 53)
+* dquote: Shift. (line 193)
+* dquote_elt: Shift. (line 194)
+* dumpdef: Dumpdef. (line 9)
+* errprint: Errprint. (line 8)
+* esyscmd: Esyscmd. (line 8)
+* eval: Eval. (line 8)
+* example: Manual. (line 39)
+* exch: Arguments. (line 12)
+* fatal_error: M4exit. (line 24)
+* foreach: Foreach. (line 8)
+* foreachq: Foreach. (line 9)
+* forloop: Forloop. (line 8)
+* format: Format. (line 8)
+* ifdef: Ifdef. (line 9)
+* ifelse: Ifelse. (line 10)
+* ifelse <1>: Ifelse. (line 11)
+* ifelse <2>: Ifelse. (line 12)
+* include: Include. (line 8)
+* incr: Incr. (line 9)
+* index: Index macro. (line 8)
+* indir: Indir. (line 8)
+* join: Shift. (line 101)
+* joinall: Shift. (line 102)
+* len: Len. (line 8)
+* m4exit: M4exit. (line 9)
+* m4wrap: M4wrap. (line 13)
+* maketemp: Mkstemp. (line 11)
+* mkstemp: Mkstemp. (line 10)
+* nargs: Pseudo Arguments. (line 12)
+* os2: Platform macros. (line 13)
+* patsubst: Patsubst. (line 8)
+* popdef: Pushdef. (line 11)
+* pushdef: Pushdef. (line 10)
+* quote: Shift. (line 192)
+* regexp: Regexp. (line 8)
+* rename: Composition. (line 120)
+* reverse: Shift. (line 31)
+* shift: Shift. (line 16)
+* sinclude: Include. (line 9)
+* stack_foreach: Stacks. (line 11)
+* stack_foreach_lifo: Stacks. (line 12)
+* stack_foreach_sep: Improved copy. (line 15)
+* stack_foreach_sep_lifo: Improved copy. (line 16)
+* substr: Substr. (line 8)
+* syscmd: Syscmd. (line 8)
+* sysval: Sysval. (line 8)
+* traceoff: Trace. (line 10)
+* traceon: Trace. (line 9)
+* translit: Translit. (line 8)
+* undefine: Undefine. (line 8)
+* undivert: Undivert. (line 8)
+* unix: Platform macros. (line 15)
+* upcase: Patsubst. (line 52)
+* windows: Platform macros. (line 17)

File: m4.info, Node: Concept index, Prev: Macro index, Up: Indices
@@ -619,24 +631,24 @@ C.2 Index for many concepts
* Menu:
* argument currying: Composition. (line 63)
-* arguments to macros <1>: Arguments. (line 6)
* arguments to macros: Macro Arguments. (line 6)
+* arguments to macros <1>: Arguments. (line 6)
* arguments to macros, special: Pseudo Arguments. (line 6)
-* arguments, joining: Shift. (line 100)
-* arguments, more than nine <1>: Improved foreach. (line 155)
-* arguments, more than nine <2>: Shift. (line 252)
+* arguments, joining: Shift. (line 98)
* arguments, more than nine: Arguments. (line 54)
+* arguments, more than nine <1>: Shift. (line 250)
+* arguments, more than nine <2>: Improved foreach. (line 156)
* arguments, quoted macro: Quoting Arguments. (line 6)
* arguments, reversing: Shift. (line 31)
* arithmetic: Arithmetic. (line 6)
* arrays: Define. (line 52)
* avoiding quadratic behavior: Improved foreach. (line 38)
-* basic regular expressions <1>: Patsubst. (line 6)
* basic regular expressions: Regexp. (line 6)
-* blind macro <1>: Composition. (line 10)
-* blind macro <2>: Ifelse. (line 52)
+* basic regular expressions <1>: Patsubst. (line 6)
* blind macro: Inhibiting Invocation.
- (line 14)
+ (line 13)
+* blind macro <1>: Ifelse. (line 52)
+* blind macro <2>: Composition. (line 10)
* bug reports: Bugs. (line 6)
* builtins, indirect call of: Builtin. (line 6)
* builtins, special tokens: Defn. (line 101)
@@ -660,7 +672,7 @@ C.2 Index for many concepts
* comparing strings: Ifelse. (line 6)
* compatibility: Compatibility. (line 6)
* composing macros: Composition. (line 6)
-* concatenating arguments: Shift. (line 100)
+* concatenating arguments: Shift. (line 98)
* conditional, short-circuiting: Shift. (line 51)
* conditionals: Ifdef. (line 6)
* controlling debugging output: Debug Levels. (line 6)
@@ -674,44 +686,45 @@ C.2 Index for many concepts
* deferring expansion: M4wrap. (line 6)
* deferring output: Diversions. (line 6)
* defining new macros: Definitions. (line 6)
-* definition stack <1>: Stacks. (line 6)
* definition stack: Pushdef. (line 6)
-* definitions, displaying macro <1>: Dumpdef. (line 6)
+* definition stack <1>: Stacks. (line 6)
* definitions, displaying macro: Defn. (line 6)
+* definitions, displaying macro <1>: Dumpdef. (line 6)
* deleting macros: Undefine. (line 6)
* deleting whitespace in input: Dnl. (line 6)
-* delimiters, changing <1>: Changecom. (line 6)
* delimiters, changing: Changequote. (line 6)
+* delimiters, changing <1>: Changecom. (line 6)
* discarding diverted text: Cleardivert. (line 6)
-* discarding input <1>: Divert. (line 42)
-* discarding input <2>: Dnl. (line 6)
* discarding input: Ifelse. (line 6)
+* discarding input <1>: Dnl. (line 6)
+* discarding input <2>: Divert. (line 42)
* displaying macro definitions: Dumpdef. (line 6)
* diversion numbers: Divnum. (line 6)
* diverted text, discarding: Cleardivert. (line 6)
* diverting output to files: Divert. (line 6)
* dumping into frozen file: Using frozen files. (line 6)
* error messages, printing: Errprint. (line 6)
-* errors, fatal: Operation modes. (line 20)
+* errors, fatal: Operation modes. (line 19)
* evaluation, of integer expressions: Eval. (line 6)
* examples, understanding: Manual. (line 6)
* executing shell commands: Shell commands. (line 6)
* exit status from shell commands: Sysval. (line 6)
-* exiting from m4: M4exit. (line 6)
+* exiting from 'm4': M4exit. (line 6)
* expansion of macros: Macro expansion. (line 6)
* expansion, deferring: M4wrap. (line 6)
* expansion, tracing macro: Trace. (line 6)
* expressions, evaluation of integer: Eval. (line 6)
-* expressions, regular <1>: Patsubst. (line 6)
* expressions, regular: Regexp. (line 6)
+* expressions, regular <1>: Patsubst. (line 6)
* extracting substrings: Substr. (line 6)
* fast loading of frozen files: Using frozen files. (line 6)
-* fatal errors: Operation modes. (line 20)
+* fatal errors: Operation modes. (line 19)
* FDL, GNU Free Documentation License: GNU Free Documentation License.
(line 6)
* file format, frozen file: Frozen file format. (line 6)
-* file inclusion <1>: Undivert. (line 13)
* file inclusion: File Inclusion. (line 6)
+* file inclusion <1>: Undivert. (line 13)
+* file inclusion <2>: Undivert. (line 89)
* file names, on the command line: Command line files. (line 6)
* files, diverting output to: Divert. (line 6)
* files, names of temporary: Mkstemp. (line 6)
@@ -724,25 +737,26 @@ C.2 Index for many concepts
* frozen files for fast loading: Using frozen files. (line 6)
* General Public License (GPL), GNU: GNU General Public License.
(line 6)
-* GNU extensions <1>: Extensions. (line 6)
-* GNU extensions <2>: Using frozen files. (line 6)
-* GNU extensions <3>: Mkstemp. (line 59)
-* GNU extensions <4>: Esyscmd. (line 6)
-* GNU extensions <5>: Eval. (line 125)
-* GNU extensions <6>: Format. (line 6)
-* GNU extensions <7>: Patsubst. (line 6)
-* GNU extensions <8>: Regexp. (line 6)
-* GNU extensions <9>: Undivert. (line 13)
-* GNU extensions <10>: Divert. (line 54)
-* GNU extensions <11>: Search Path. (line 6)
-* GNU extensions <12>: Debug Output. (line 6)
-* GNU extensions <13>: Debug Levels. (line 74)
-* GNU extensions <14>: Builtin. (line 6)
-* GNU extensions <15>: Indir. (line 6)
-* GNU extensions <16>: Arguments. (line 54)
-* GNU extensions <17>: Define. (line 41)
* GNU extensions: Inhibiting Invocation.
- (line 14)
+ (line 13)
+* GNU extensions <1>: Define. (line 41)
+* GNU extensions <2>: Arguments. (line 54)
+* GNU extensions <3>: Indir. (line 6)
+* GNU extensions <4>: Builtin. (line 6)
+* GNU extensions <5>: Debug Levels. (line 74)
+* GNU extensions <6>: Debug Output. (line 6)
+* GNU extensions <7>: Search Path. (line 6)
+* GNU extensions <8>: Divert. (line 54)
+* GNU extensions <9>: Undivert. (line 13)
+* GNU extensions <10>: Undivert. (line 89)
+* GNU extensions <11>: Regexp. (line 6)
+* GNU extensions <12>: Patsubst. (line 6)
+* GNU extensions <13>: Format. (line 6)
+* GNU extensions <14>: Eval. (line 113)
+* GNU extensions <15>: Esyscmd. (line 6)
+* GNU extensions <16>: Mkstemp. (line 58)
+* GNU extensions <17>: Using frozen files. (line 6)
+* GNU extensions <18>: Extensions. (line 6)
* GNU Free Documentation License: GNU Free Documentation License.
(line 6)
* GNU General Public License: GNU General Public License.
@@ -750,28 +764,29 @@ C.2 Index for many concepts
* GNU M4, history of: History. (line 6)
* GPL, GNU General Public License: GNU General Public License.
(line 6)
-* history of m4: History. (line 6)
+* history of 'm4': History. (line 6)
* included files, search path for: Search Path. (line 6)
-* inclusion, of files <1>: Undivert. (line 13)
* inclusion, of files: File Inclusion. (line 6)
+* inclusion, of files <1>: Undivert. (line 13)
+* inclusion, of files <2>: Undivert. (line 89)
* increment operator: Incr. (line 6)
* indirect call of builtins: Builtin. (line 6)
* indirect call of macros: Indir. (line 6)
* initialization, frozen state: Using frozen files. (line 6)
-* input location <1>: Location. (line 6)
* input location: Preprocessor features.
(line 28)
+* input location <1>: Location. (line 6)
* input tokens: Syntax. (line 6)
-* input, discarding <1>: Divert. (line 42)
-* input, discarding <2>: Dnl. (line 6)
* input, discarding: Ifelse. (line 6)
+* input, discarding <1>: Dnl. (line 6)
+* input, discarding <2>: Divert. (line 42)
* input, saving: M4wrap. (line 6)
* integer arithmetic: Arithmetic. (line 6)
* integer expression evaluation: Eval. (line 6)
-* invoking m4: Invoking m4. (line 6)
+* invoking 'm4': Invoking m4. (line 6)
* invoking macros: Invocation. (line 6)
* iterating over lists: Foreach. (line 6)
-* joining arguments: Shift. (line 100)
+* joining arguments: Shift. (line 98)
* length of strings: Len. (line 6)
* lexical structure of words: Changeword. (line 6)
* License, code: Copying This Package.
@@ -780,28 +795,28 @@ C.2 Index for many concepts
* limit, nesting: Limits control. (line 43)
* literal output: Pseudo Arguments. (line 106)
* local variables: Pushdef. (line 79)
-* location, input <1>: Location. (line 6)
* location, input: Preprocessor features.
(line 28)
+* location, input <1>: Location. (line 6)
* loops: Shift. (line 10)
* loops, counting: Forloop. (line 6)
* loops, list iteration: Foreach. (line 6)
-* M4PATH: Search Path. (line 9)
+* 'M4PATH': Search Path. (line 9)
* macro composition: Composition. (line 6)
* macro definitions, on the command line: Preprocessor features.
(line 6)
* macro expansion, tracing: Trace. (line 6)
* macro invocation: Invocation. (line 6)
-* macro, blind <1>: Composition. (line 10)
-* macro, blind <2>: Ifelse. (line 52)
* macro, blind: Inhibiting Invocation.
- (line 14)
-* macros, arguments to <1>: Arguments. (line 6)
+ (line 13)
+* macro, blind <1>: Ifelse. (line 52)
+* macro, blind <2>: Composition. (line 10)
* macros, arguments to: Macro Arguments. (line 6)
+* macros, arguments to <1>: Arguments. (line 6)
* macros, copying: Composition. (line 116)
* macros, debugging: Debugging. (line 6)
-* macros, displaying definitions <1>: Dumpdef. (line 6)
* macros, displaying definitions: Defn. (line 6)
+* macros, displaying definitions <1>: Dumpdef. (line 6)
* macros, expansion of: Macro expansion. (line 6)
* macros, how to define new: Definitions. (line 6)
* macros, how to delete: Undefine. (line 6)
@@ -811,57 +826,57 @@ C.2 Index for many concepts
* macros, recursive: Shift. (line 6)
* macros, special arguments to: Pseudo Arguments. (line 6)
* macros, temporary redefinition of: Pushdef. (line 6)
-* manipulating quotes: Shift. (line 191)
+* manipulating quotes: Shift. (line 189)
* messages, printing error: Errprint. (line 6)
-* more than nine arguments <1>: Improved foreach. (line 155)
-* more than nine arguments <2>: Shift. (line 252)
* more than nine arguments: Arguments. (line 54)
+* more than nine arguments <1>: Shift. (line 250)
+* more than nine arguments <2>: Improved foreach. (line 156)
* multibranches: Ifelse. (line 69)
* names: Names. (line 6)
* nesting limit: Limits control. (line 43)
-* nine arguments, more than <1>: Improved foreach. (line 155)
-* nine arguments, more than <2>: Shift. (line 252)
* nine arguments, more than: Arguments. (line 54)
+* nine arguments, more than <1>: Shift. (line 250)
+* nine arguments, more than <2>: Improved foreach. (line 156)
* numbers: Manual. (line 57)
* options, command line: Invoking m4. (line 10)
* output, diverting to files: Divert. (line 6)
* output, formatted: Format. (line 6)
* output, literal: Pseudo Arguments. (line 106)
* output, saving debugging: Debug Output. (line 6)
-* overview of m4: Intro. (line 6)
+* overview of 'm4': Intro. (line 6)
* pattern substitution: Patsubst. (line 6)
* platform macros: Platform macros. (line 6)
* positional parameters, more than nine: Arguments. (line 54)
* POSIX: Extensions. (line 6)
-* POSIXLY_CORRECT <1>: Incompatibilities. (line 146)
-* POSIXLY_CORRECT: Invoking m4. (line 10)
+* 'POSIXLY_CORRECT': Invoking m4. (line 10)
+* 'POSIXLY_CORRECT' <1>: Incompatibilities. (line 144)
* preprocessor features: Preprocessor features.
(line 6)
* printing error messages: Errprint. (line 6)
-* pushdef stack <1>: Stacks. (line 6)
* pushdef stack: Pushdef. (line 6)
+* pushdef stack <1>: Stacks. (line 6)
* quadratic behavior, avoiding: Improved foreach. (line 38)
* quote delimiters, changing: Changequote. (line 6)
-* quote manipulation: Shift. (line 191)
+* quote manipulation: Shift. (line 189)
* quoted macro arguments: Quoting Arguments. (line 6)
* quoted string: Quoted strings. (line 6)
* quoting rule of thumb: Quoting Arguments. (line 22)
* recursive macros: Shift. (line 6)
* redefinition of macros, temporary: Pushdef. (line 6)
-* regular expressions <1>: Patsubst. (line 6)
-* regular expressions <2>: Regexp. (line 6)
* regular expressions: Changeword. (line 6)
+* regular expressions <1>: Regexp. (line 6)
+* regular expressions <2>: Patsubst. (line 6)
* reloading a frozen file: Using frozen files. (line 6)
-* renaming macros <1>: Composition. (line 116)
* renaming macros: Defn. (line 6)
+* renaming macros <1>: Composition. (line 116)
* reporting bugs: Bugs. (line 6)
-* rescanning <1>: Other Incompatibilities.
- (line 52)
-* rescanning <2>: Defn. (line 61)
-* rescanning <3>: Pseudo Arguments. (line 106)
-* rescanning <4>: Inhibiting Invocation.
- (line 87)
* rescanning: Limits control. (line 56)
+* rescanning <1>: Inhibiting Invocation.
+ (line 86)
+* rescanning <2>: Pseudo Arguments. (line 106)
+* rescanning <3>: Defn. (line 61)
+* rescanning <4>: Other Incompatibilities.
+ (line 52)
* reversing arguments: Shift. (line 31)
* rule of thumb, quoting: Quoting Arguments. (line 22)
* running shell commands: Shell commands. (line 6)
@@ -872,13 +887,13 @@ C.2 Index for many concepts
* shell commands, running: Shell commands. (line 6)
* short-circuiting conditional: Shift. (line 51)
* special arguments to macros: Pseudo Arguments. (line 6)
-* stack, macro definition <1>: Stacks. (line 6)
* stack, macro definition: Pushdef. (line 6)
-* standard error, output to <1>: Errprint. (line 6)
-* standard error, output to <2>: Trace. (line 6)
+* stack, macro definition <1>: Stacks. (line 6)
* standard error, output to: Dumpdef. (line 6)
+* standard error, output to <1>: Trace. (line 6)
+* standard error, output to <2>: Errprint. (line 6)
* status of shell commands: Sysval. (line 6)
-* status, setting m4 exit: M4exit. (line 6)
+* status, setting 'm4' exit: M4exit. (line 6)
* string, quoted: Quoted strings. (line 6)
* strings, length of: Len. (line 6)
* substitution by regular expression: Patsubst. (line 6)
@@ -892,7 +907,7 @@ C.2 Index for many concepts
* syntax, changing: Changeword. (line 6)
* temporary file names: Mkstemp. (line 6)
* temporary redefinition of macros: Pushdef. (line 6)
-* TMPDIR: Diversions. (line 10)
+* 'TMPDIR': Diversions. (line 10)
* tokens: Syntax. (line 6)
* tokens, builtin macro: Defn. (line 101)
* tokens, special: Other tokens. (line 6)
@@ -906,4 +921,3 @@ C.2 Index for many concepts
* words: Names. (line 6)
* words, lexical structure of: Changeword. (line 6)
-
diff --git a/doc/m4.texinfo b/doc/m4.texi
index 1dcc8e4..81dd255 100644
--- a/doc/m4.texinfo
+++ b/doc/m4.texi
@@ -43,7 +43,7 @@ This manual (@value{UPDATED}) is for GNU M4 (version
@value{VERSION}), a package containing an implementation of the m4 macro
language.
-Copyright @copyright{} 1989-1994, 2004-2011 Free Software Foundation,
+Copyright @copyright{} 1989-1994, 2004-2013 Free Software Foundation,
Inc.
@quotation
@@ -333,7 +333,7 @@ popularity of GNU Autoconf, which requires GNU
@code{m4} for @emph{generating} @file{configure} scripts, is an incentive
for many to install it, while these people will not themselves
program in @code{m4}. GNU @code{m4} is mostly compatible with the
-System V, Release 3 version, except for some minor differences.
+System V, Release 4 version, except for some minor differences.
@xref{Compatibility}, for more details.
Some people find @code{m4} to be fairly addictive. They first use
@@ -349,19 +349,42 @@ debugging their @code{m4} scripts than doing real work. Beware that
@cindex history of @code{m4}
@cindex GNU M4, history of
-@code{GPM} was an important ancestor of @code{m4}. See
-C. Strachey: ``A General Purpose Macro generator'', Computer Journal
-8,3 (1965), pp.@: 225 ff. @code{GPM} is also succinctly described into
-David Gries classic ``Compiler Construction for Digital Computers''.
-
-The classic B. Kernighan and P.J. Plauger: ``Software Tools'',
-Addison-Wesley, Inc.@: (1976) describes and implements a Unix
+Macro languages were invented early in the history of computing. In the
+1950s Alan Perlis suggested that the macro language be independent of the
+language being processed. Techniques such as conditional and recursive
+macros, and using macros to define other macros, were described by Doug
+McIlroy of Bell Labs in ``Macro Instruction Extensions of Compiler
+Languages'', @emph{Communications of the ACM} 3, 4 (1960), 214--20,
+@url{http://dx.doi.org/10.1145/367177.367223}.
+
+An important precursor of @code{m4} was GPM; see C. Strachey,
+@c The title uses lower case and has no space between "macro" and "generator".
+``A general purpose macrogenerator'', @emph{Computer Journal} 8, 3
+(1965), 225--41, @url{http://dx.doi.org/10.1093/comjnl/8.3.225}. GPM is
+also succinctly described in David Gries's book @emph{Compiler
+Construction for Digital Computers}, Wiley (1971). Strachey was a
+brilliant programmer: GPM fit into 250 machine instructions!
+
+Inspired by GPM while visiting Strachey's Lab in 1968, McIlroy wrote a
+model preprocessor in that fit into a page of Snobol 3 code, and McIlroy
+and Robert Morris developed a series of further models at Bell Labs.
+Andrew D. Hall followed up with M6, a general purpose macro processor
+used to port the Fortran source code of the Altran computer algebra
+system; see Hall's ``The M6 Macro Processor'', Computing Science
+Technical Report #2, Bell Labs (1972),
+@url{http://cm.bell-labs.com/cm/cs/cstr/2.pdf}. M6's source code
+consisted of about 600 Fortran statements. Its name was the first of
+the @code{m4} line.
+
+The Brian Kernighan and P.J. Plauger book @emph{Software Tools},
+Addison-Wesley (1976), describes and implements a Unix
macro-processor language, which inspired Dennis Ritchie to write
@code{m3}, a macro processor for the AP-3 minicomputer.
Kernighan and Ritchie then joined forces to develop the original
-@code{m4}, as described in ``The M4 Macro Processor'', Bell
-Laboratories (1977). It had only 21 builtin macros.
+@code{m4}, described in ``The M4 Macro Processor'', Bell Laboratories
+(1977), @url{http://wolfram.schneider.org/bsd/7thEdManVol2/m4/m4.pdf}.
+It had only 21 builtin macros.
While @code{GPM} was more @emph{pure}, @code{m4} is meant to deal with
the true intricacies of real life: macros can be recognized without
@@ -970,6 +993,9 @@ options.
ifdef(`__unix__', ,
`errprint(` skipping: syscmd does not have unix semantics
')m4exit(`77')')dnl
+syscmd(`echo | cat >&- 2>/dev/null')ifelse(sysval, `0',
+ `errprint(` skipping: system does not allow closing stdout
+')m4exit(`77')')dnl
changequote(`[', `]')dnl
syscmd([echo | ']__program__[' >&-])dnl
@error{}m4: write error: Bad file descriptor
@@ -981,6 +1007,9 @@ sysval
ifdef(`__unix__', ,
`errprint(` skipping: syscmd does not have unix semantics
')m4exit(`77')')dnl
+syscmd(`echo | cat >&- 2>/dev/null')ifelse(sysval, `0',
+ `errprint(` skipping: system does not allow closing stdout
+')m4exit(`77')')dnl
changequote(`[', `]')dnl
syscmd([echo 'esyscmd(echo hi >&2 && echo err"print(bye
)d"nl)dnl' > tmp.m4 \
@@ -1428,7 +1457,7 @@ m4_eval(`1')
@end example
Another alternative is to redefine problematic macros to a name less
-likely to cause conflicts, @xref{Definitions}.
+likely to cause conflicts, using @ref{Definitions}.
If your version of GNU @code{m4} has the @code{changeword} feature
compiled in, it offers far more flexibility in specifying the
@@ -7323,7 +7352,7 @@ once.
@cindex compatibility
This chapter describes the many of the differences between this
implementation of @code{m4}, and of other implementations found under
-UNIX, such as System V Release 3, Solaris, and BSD flavors.
+UNIX, such as System V Release 4, Solaris, and BSD flavors.
In particular, it lists the known differences and extensions to
POSIX. However, the list is not necessarily comprehensive.
diff --git a/doc/stamp-vti b/doc/stamp-vti
index 75abce4..1ba5096 100644
--- a/doc/stamp-vti
+++ b/doc/stamp-vti
@@ -1,4 +1,4 @@
-@set UPDATED 28 February 2011
-@set UPDATED-MONTH February 2011
-@set EDITION 1.4.16
-@set VERSION 1.4.16
+@set UPDATED 22 September 2013
+@set UPDATED-MONTH September 2013
+@set EDITION 1.4.17
+@set VERSION 1.4.17
diff --git a/doc/version.texi b/doc/version.texi
index 75abce4..1ba5096 100644
--- a/doc/version.texi
+++ b/doc/version.texi
@@ -1,4 +1,4 @@
-@set UPDATED 28 February 2011
-@set UPDATED-MONTH February 2011
-@set EDITION 1.4.16
-@set VERSION 1.4.16
+@set UPDATED 22 September 2013
+@set UPDATED-MONTH September 2013
+@set EDITION 1.4.17
+@set VERSION 1.4.17
diff --git a/examples/COPYING b/examples/COPYING
index 2777673..7e73a12 100644
--- a/examples/COPYING
+++ b/examples/COPYING
@@ -2,7 +2,7 @@ The files in this directory provide example uses of GNU M4.
The following copyright notice applies to each of these
description files.
-Copyright (C) 2006, 2010-2011 Free Software Foundation, Inc.
+Copyright (C) 2006, 2010-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.
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 4e0016b..a63d5d6 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -1,6 +1,6 @@
## Makefile.am - template for generating Makefile via Automake
##
-## Copyright (C) 2006-2011 Free Software Foundation, Inc.
+## Copyright (C) 2006-2013 Free Software Foundation, Inc.
##
## This file is part of GNU M4.
##
diff --git a/examples/Makefile.in b/examples/Makefile.in
index 0829e88..98437c2 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.14 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,6 +14,51 @@
@SET_MAKE@
VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -33,49 +77,55 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = examples
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am COPYING
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/ansi-c++.m4 \
- $(top_srcdir)/m4/assert.m4 $(top_srcdir)/m4/autobuild.m4 \
- $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/c-stack.m4 \
- $(top_srcdir)/m4/canonicalize.m4 $(top_srcdir)/m4/cloexec.m4 \
+ $(top_srcdir)/m4/asm-underscore.m4 $(top_srcdir)/m4/assert.m4 \
+ $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \
+ $(top_srcdir)/m4/c-stack.m4 $(top_srcdir)/m4/canonicalize.m4 \
$(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \
- $(top_srcdir)/m4/closein.m4 $(top_srcdir)/m4/closeout.m4 \
- $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/config-h.m4 \
- $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/dirname.m4 \
- $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup2.m4 \
- $(top_srcdir)/m4/eealloc.m4 $(top_srcdir)/m4/environ.m4 \
- $(top_srcdir)/m4/errno_h.m4 $(top_srcdir)/m4/error.m4 \
- $(top_srcdir)/m4/execute.m4 $(top_srcdir)/m4/exponentd.m4 \
- $(top_srcdir)/m4/exponentf.m4 $(top_srcdir)/m4/exponentl.m4 \
- $(top_srcdir)/m4/extensions.m4 \
+ $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/closein.m4 \
+ $(top_srcdir)/m4/closeout.m4 $(top_srcdir)/m4/codeset.m4 \
+ $(top_srcdir)/m4/config-h.m4 $(top_srcdir)/m4/configmake.m4 \
+ $(top_srcdir)/m4/dirent_h.m4 $(top_srcdir)/m4/dirname.m4 \
+ $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \
+ $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
+ $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \
+ $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/execute.m4 \
+ $(top_srcdir)/m4/exponentd.m4 $(top_srcdir)/m4/exponentf.m4 \
+ $(top_srcdir)/m4/exponentl.m4 $(top_srcdir)/m4/extensions.m4 \
+ $(top_srcdir)/m4/extern-inline.m4 \
$(top_srcdir)/m4/fatal-signal.m4 $(top_srcdir)/m4/fclose.m4 \
$(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \
- $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fflush.m4 \
- $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/float_h.m4 \
- $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fpending.m4 \
- $(top_srcdir)/m4/fpieee.m4 $(top_srcdir)/m4/fpurge.m4 \
+ $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopen.m4 \
+ $(top_srcdir)/m4/fflush.m4 $(top_srcdir)/m4/filenamecat.m4 \
+ $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fopen.m4 \
+ $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fpieee.m4 \
+ $(top_srcdir)/m4/fpurge.m4 $(top_srcdir)/m4/freadahead.m4 \
$(top_srcdir)/m4/freading.m4 $(top_srcdir)/m4/frexp.m4 \
- $(top_srcdir)/m4/frexpl.m4 $(top_srcdir)/m4/fseeko.m4 \
+ $(top_srcdir)/m4/frexpl.m4 $(top_srcdir)/m4/fseek.m4 \
+ $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \
$(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \
- $(top_srcdir)/m4/getdtablesize.m4 $(top_srcdir)/m4/getopt.m4 \
- $(top_srcdir)/m4/getpagesize.m4 \
- $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/gl_list.m4 \
- $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \
+ $(top_srcdir)/m4/getcwd.m4 $(top_srcdir)/m4/getdtablesize.m4 \
+ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpagesize.m4 \
+ $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glibc21.m4 \
+ $(top_srcdir)/m4/gnulib-common.m4 \
$(top_srcdir)/m4/gnulib-comp.m4 \
- $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \
+ $(top_srcdir)/m4/include_next.m4 \
$(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \
+ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \
$(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/isnand.m4 \
$(top_srcdir)/m4/isnanf.m4 $(top_srcdir)/m4/isnanl.m4 \
- $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/lcmessage.m4 \
- $(top_srcdir)/m4/ldexp.m4 $(top_srcdir)/m4/ldexpl.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \
- $(top_srcdir)/m4/link.m4 $(top_srcdir)/m4/localcharset.m4 \
- $(top_srcdir)/m4/locale-fr.m4 $(top_srcdir)/m4/locale-ja.m4 \
- $(top_srcdir)/m4/locale-tr.m4 $(top_srcdir)/m4/locale-zh.m4 \
- $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localename.m4 \
+ $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \
+ $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/ldexp.m4 \
+ $(top_srcdir)/m4/ldexpl.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/libsigsegv.m4 $(top_srcdir)/m4/link.m4 \
+ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \
+ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-tr.m4 \
+ $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/locale_h.m4 \
+ $(top_srcdir)/m4/localeconv.m4 $(top_srcdir)/m4/localename.m4 \
$(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \
$(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \
$(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \
@@ -84,40 +134,43 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \
$(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mkdtemp.m4 \
$(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \
- $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/multiarch.m4 \
+ $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \
+ $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \
$(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nocrash.m4 \
- $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/pathmax.m4 \
+ $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/open.m4 \
+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \
$(top_srcdir)/m4/pipe2.m4 $(top_srcdir)/m4/posix_spawn.m4 \
$(top_srcdir)/m4/printf-frexp.m4 \
$(top_srcdir)/m4/printf-frexpl.m4 $(top_srcdir)/m4/printf.m4 \
$(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quotearg.m4 \
- $(top_srcdir)/m4/rawmemchr.m4 $(top_srcdir)/m4/readlink.m4 \
+ $(top_srcdir)/m4/raise.m4 $(top_srcdir)/m4/rawmemchr.m4 \
+ $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readlink.m4 \
$(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/rename.m4 \
$(top_srcdir)/m4/rmdir.m4 $(top_srcdir)/m4/sched_h.m4 \
- $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/setlocale.m4 \
- $(top_srcdir)/m4/sig_atomic_t.m4 $(top_srcdir)/m4/sigaction.m4 \
- $(top_srcdir)/m4/signal_h.m4 \
+ $(top_srcdir)/m4/secure_getenv.m4 $(top_srcdir)/m4/setenv.m4 \
+ $(top_srcdir)/m4/setlocale.m4 $(top_srcdir)/m4/sig_atomic_t.m4 \
+ $(top_srcdir)/m4/sigaction.m4 $(top_srcdir)/m4/signal_h.m4 \
$(top_srcdir)/m4/signalblocking.m4 $(top_srcdir)/m4/signbit.m4 \
- $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/snprintf.m4 \
+ $(top_srcdir)/m4/sigpipe.m4 $(top_srcdir)/m4/size_max.m4 \
+ $(top_srcdir)/m4/sleep.m4 $(top_srcdir)/m4/snprintf.m4 \
$(top_srcdir)/m4/spawn-pipe.m4 $(top_srcdir)/m4/spawn_h.m4 \
$(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat.m4 \
$(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \
$(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \
- $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio-safer.m4 \
- $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib-safer.m4 \
+ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \
$(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strchrnul.m4 \
$(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
$(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strndup.m4 \
$(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strsignal.m4 \
$(top_srcdir)/m4/strstr.m4 $(top_srcdir)/m4/strtod.m4 \
- $(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/symlink.m4 \
+ $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_socket_h.m4 \
$(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \
- $(top_srcdir)/m4/sys_wait_h.m4 $(top_srcdir)/m4/tempname.m4 \
- $(top_srcdir)/m4/threadlib.m4 $(top_srcdir)/m4/time_h.m4 \
- $(top_srcdir)/m4/tls.m4 $(top_srcdir)/m4/tmpdir.m4 \
- $(top_srcdir)/m4/ungetc.m4 $(top_srcdir)/m4/unistd-safer.m4 \
- $(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/unlocked-io.m4 \
- $(top_srcdir)/m4/vasnprintf.m4 \
+ $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/sys_wait_h.m4 \
+ $(top_srcdir)/m4/tempname.m4 $(top_srcdir)/m4/threadlib.m4 \
+ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/tls.m4 \
+ $(top_srcdir)/m4/tmpdir.m4 $(top_srcdir)/m4/ungetc.m4 \
+ $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \
+ $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
$(top_srcdir)/m4/vasprintf-posix.m4 \
$(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/version-etc.m4 \
$(top_srcdir)/m4/wait-process.m4 $(top_srcdir)/m4/waitpid.m4 \
@@ -125,23 +178,36 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \
$(top_srcdir)/m4/wctob.m4 $(top_srcdir)/m4/wctomb.m4 \
$(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wint_t.m4 \
- $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xsize.m4 \
- $(top_srcdir)/m4/xstrndup.m4 $(top_srcdir)/m4/xvasprintf.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/write.m4 $(top_srcdir)/m4/xalloc.m4 \
+ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrndup.m4 \
+ $(top_srcdir)/m4/xvasprintf.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)/lib/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
-am__v_GEN_0 = @echo " GEN " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
+am__v_at_1 =
SOURCES =
DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
pkglibexecdir = @pkglibexecdir@
ACLOCAL = @ACLOCAL@
@@ -150,6 +216,9 @@ ALLOCA_H = @ALLOCA_H@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+AR = @AR@
+ARFLAGS = @ARFLAGS@
+ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -187,47 +256,90 @@ EXEEXT = @EXEEXT@
FLOAT_H = @FLOAT_H@
GETOPT_H = @GETOPT_H@
GLIBC21 = @GLIBC21@
+GNULIB_ACOSF = @GNULIB_ACOSF@
GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
+GNULIB_ASINF = @GNULIB_ASINF@
GNULIB_ASINL = @GNULIB_ASINL@
+GNULIB_ATAN2F = @GNULIB_ATAN2F@
+GNULIB_ATANF = @GNULIB_ATANF@
GNULIB_ATANL = @GNULIB_ATANL@
GNULIB_ATOLL = @GNULIB_ATOLL@
GNULIB_BTOWC = @GNULIB_BTOWC@
GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CBRT = @GNULIB_CBRT@
+GNULIB_CBRTF = @GNULIB_CBRTF@
+GNULIB_CBRTL = @GNULIB_CBRTL@
GNULIB_CEIL = @GNULIB_CEIL@
GNULIB_CEILF = @GNULIB_CEILF@
GNULIB_CEILL = @GNULIB_CEILL@
+GNULIB_CHDIR = @GNULIB_CHDIR@
GNULIB_CHOWN = @GNULIB_CHOWN@
GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@
+GNULIB_COPYSIGN = @GNULIB_COPYSIGN@
+GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@
+GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@
+GNULIB_COSF = @GNULIB_COSF@
+GNULIB_COSHF = @GNULIB_COSHF@
GNULIB_COSL = @GNULIB_COSL@
+GNULIB_DIRFD = @GNULIB_DIRFD@
GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP = @GNULIB_DUP@
GNULIB_DUP2 = @GNULIB_DUP2@
GNULIB_DUP3 = @GNULIB_DUP3@
GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
GNULIB_ENVIRON = @GNULIB_ENVIRON@
GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXP2 = @GNULIB_EXP2@
+GNULIB_EXP2F = @GNULIB_EXP2F@
+GNULIB_EXP2L = @GNULIB_EXP2L@
+GNULIB_EXPF = @GNULIB_EXPF@
GNULIB_EXPL = @GNULIB_EXPL@
+GNULIB_EXPM1 = @GNULIB_EXPM1@
+GNULIB_EXPM1F = @GNULIB_EXPM1F@
+GNULIB_EXPM1L = @GNULIB_EXPM1L@
+GNULIB_FABSF = @GNULIB_FABSF@
+GNULIB_FABSL = @GNULIB_FABSL@
GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
GNULIB_FCHDIR = @GNULIB_FCHDIR@
GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
GNULIB_FCLOSE = @GNULIB_FCLOSE@
GNULIB_FCNTL = @GNULIB_FCNTL@
+GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
+GNULIB_FDOPEN = @GNULIB_FDOPEN@
+GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@
GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FFSL = @GNULIB_FFSL@
+GNULIB_FFSLL = @GNULIB_FFSLL@
+GNULIB_FGETC = @GNULIB_FGETC@
+GNULIB_FGETS = @GNULIB_FGETS@
GNULIB_FLOOR = @GNULIB_FLOOR@
GNULIB_FLOORF = @GNULIB_FLOORF@
GNULIB_FLOORL = @GNULIB_FLOORL@
+GNULIB_FMA = @GNULIB_FMA@
+GNULIB_FMAF = @GNULIB_FMAF@
+GNULIB_FMAL = @GNULIB_FMAL@
+GNULIB_FMOD = @GNULIB_FMOD@
+GNULIB_FMODF = @GNULIB_FMODF@
+GNULIB_FMODL = @GNULIB_FMODL@
GNULIB_FOPEN = @GNULIB_FOPEN@
GNULIB_FPRINTF = @GNULIB_FPRINTF@
GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
GNULIB_FPURGE = @GNULIB_FPURGE@
GNULIB_FPUTC = @GNULIB_FPUTC@
GNULIB_FPUTS = @GNULIB_FPUTS@
+GNULIB_FREAD = @GNULIB_FREAD@
GNULIB_FREOPEN = @GNULIB_FREOPEN@
GNULIB_FREXP = @GNULIB_FREXP@
+GNULIB_FREXPF = @GNULIB_FREXPF@
GNULIB_FREXPL = @GNULIB_FREXPL@
+GNULIB_FSCANF = @GNULIB_FSCANF@
GNULIB_FSEEK = @GNULIB_FSEEK@
GNULIB_FSEEKO = @GNULIB_FSEEKO@
+GNULIB_FSTAT = @GNULIB_FSTAT@
GNULIB_FSTATAT = @GNULIB_FSTATAT@
GNULIB_FSYNC = @GNULIB_FSYNC@
GNULIB_FTELL = @GNULIB_FTELL@
@@ -235,6 +347,8 @@ GNULIB_FTELLO = @GNULIB_FTELLO@
GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
GNULIB_FWRITE = @GNULIB_FWRITE@
+GNULIB_GETC = @GNULIB_GETC@
+GNULIB_GETCHAR = @GNULIB_GETCHAR@
GNULIB_GETCWD = @GNULIB_GETCWD@
GNULIB_GETDELIM = @GNULIB_GETDELIM@
GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
@@ -249,7 +363,18 @@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GL_M4_UNISTD_H_GETOPT = @GNULIB_GL_M4_UNISTD_H_GETOPT@
GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
+GNULIB_HYPOT = @GNULIB_HYPOT@
+GNULIB_HYPOTF = @GNULIB_HYPOTF@
+GNULIB_HYPOTL = @GNULIB_HYPOTL@
+GNULIB_ILOGB = @GNULIB_ILOGB@
+GNULIB_ILOGBF = @GNULIB_ILOGBF@
+GNULIB_ILOGBL = @GNULIB_ILOGBL@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+GNULIB_ISATTY = @GNULIB_ISATTY@
GNULIB_ISFINITE = @GNULIB_ISFINITE@
GNULIB_ISINF = @GNULIB_ISINF@
GNULIB_ISNAN = @GNULIB_ISNAN@
@@ -260,10 +385,25 @@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
GNULIB_LCHMOD = @GNULIB_LCHMOD@
GNULIB_LCHOWN = @GNULIB_LCHOWN@
+GNULIB_LDEXPF = @GNULIB_LDEXPF@
GNULIB_LDEXPL = @GNULIB_LDEXPL@
GNULIB_LINK = @GNULIB_LINK@
GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
+GNULIB_LOG = @GNULIB_LOG@
+GNULIB_LOG10 = @GNULIB_LOG10@
+GNULIB_LOG10F = @GNULIB_LOG10F@
+GNULIB_LOG10L = @GNULIB_LOG10L@
+GNULIB_LOG1P = @GNULIB_LOG1P@
+GNULIB_LOG1PF = @GNULIB_LOG1PF@
+GNULIB_LOG1PL = @GNULIB_LOG1PL@
+GNULIB_LOG2 = @GNULIB_LOG2@
+GNULIB_LOG2F = @GNULIB_LOG2F@
+GNULIB_LOG2L = @GNULIB_LOG2L@
GNULIB_LOGB = @GNULIB_LOGB@
+GNULIB_LOGBF = @GNULIB_LOGBF@
+GNULIB_LOGBL = @GNULIB_LOGBL@
+GNULIB_LOGF = @GNULIB_LOGF@
GNULIB_LOGL = @GNULIB_LOGL@
GNULIB_LSEEK = @GNULIB_LSEEK@
GNULIB_LSTAT = @GNULIB_LSTAT@
@@ -303,16 +443,23 @@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
GNULIB_MKTIME = @GNULIB_MKTIME@
+GNULIB_MODF = @GNULIB_MODF@
+GNULIB_MODFF = @GNULIB_MODFF@
+GNULIB_MODFL = @GNULIB_MODFL@
GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@
GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
GNULIB_OPEN = @GNULIB_OPEN@
GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_OPENDIR = @GNULIB_OPENDIR@
+GNULIB_PCLOSE = @GNULIB_PCLOSE@
GNULIB_PERROR = @GNULIB_PERROR@
GNULIB_PIPE = @GNULIB_PIPE@
GNULIB_PIPE2 = @GNULIB_PIPE2@
GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
GNULIB_POSIX_SPAWN = @GNULIB_POSIX_SPAWN@
GNULIB_POSIX_SPAWNATTR_DESTROY = @GNULIB_POSIX_SPAWNATTR_DESTROY@
GNULIB_POSIX_SPAWNATTR_GETFLAGS = @GNULIB_POSIX_SPAWNATTR_GETFLAGS@
@@ -334,41 +481,63 @@ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDU
GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY@
GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT@
+GNULIB_POWF = @GNULIB_POWF@
GNULIB_PREAD = @GNULIB_PREAD@
GNULIB_PRINTF = @GNULIB_PRINTF@
GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@
GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
GNULIB_PUTC = @GNULIB_PUTC@
GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
GNULIB_PUTENV = @GNULIB_PUTENV@
GNULIB_PUTS = @GNULIB_PUTS@
GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RAISE = @GNULIB_RAISE@
+GNULIB_RANDOM = @GNULIB_RANDOM@
GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READ = @GNULIB_READ@
+GNULIB_READDIR = @GNULIB_READDIR@
GNULIB_READLINK = @GNULIB_READLINK@
GNULIB_READLINKAT = @GNULIB_READLINKAT@
GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMAINDER = @GNULIB_REMAINDER@
+GNULIB_REMAINDERF = @GNULIB_REMAINDERF@
+GNULIB_REMAINDERL = @GNULIB_REMAINDERL@
GNULIB_REMOVE = @GNULIB_REMOVE@
GNULIB_RENAME = @GNULIB_RENAME@
GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+GNULIB_REWINDDIR = @GNULIB_REWINDDIR@
+GNULIB_RINT = @GNULIB_RINT@
+GNULIB_RINTF = @GNULIB_RINTF@
+GNULIB_RINTL = @GNULIB_RINTL@
GNULIB_RMDIR = @GNULIB_RMDIR@
GNULIB_ROUND = @GNULIB_ROUND@
GNULIB_ROUNDF = @GNULIB_ROUNDF@
GNULIB_ROUNDL = @GNULIB_ROUNDL@
GNULIB_RPMATCH = @GNULIB_RPMATCH@
+GNULIB_SCANDIR = @GNULIB_SCANDIR@
+GNULIB_SCANF = @GNULIB_SCANF@
+GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@
GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
GNULIB_SIGACTION = @GNULIB_SIGACTION@
GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
+GNULIB_SINF = @GNULIB_SINF@
+GNULIB_SINHF = @GNULIB_SINHF@
GNULIB_SINL = @GNULIB_SINL@
GNULIB_SLEEP = @GNULIB_SLEEP@
GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_SQRTF = @GNULIB_SQRTF@
GNULIB_SQRTL = @GNULIB_SQRTL@
GNULIB_STAT = @GNULIB_STAT@
+GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@
GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
GNULIB_STPCPY = @GNULIB_STPCPY@
GNULIB_STPNCPY = @GNULIB_STPNCPY@
@@ -386,13 +555,17 @@ GNULIB_STRSEP = @GNULIB_STRSEP@
GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
GNULIB_STRSTR = @GNULIB_STRSTR@
GNULIB_STRTOD = @GNULIB_STRTOD@
+GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@
GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
GNULIB_STRTOLL = @GNULIB_STRTOLL@
GNULIB_STRTOULL = @GNULIB_STRTOULL@
+GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
GNULIB_SYMLINK = @GNULIB_SYMLINK@
GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
+GNULIB_TANF = @GNULIB_TANF@
+GNULIB_TANHF = @GNULIB_TANHF@
GNULIB_TANL = @GNULIB_TANL@
GNULIB_TIMEGM = @GNULIB_TIMEGM@
GNULIB_TIME_R = @GNULIB_TIME_R@
@@ -402,7 +575,7 @@ GNULIB_TRUNC = @GNULIB_TRUNC@
GNULIB_TRUNCF = @GNULIB_TRUNCF@
GNULIB_TRUNCL = @GNULIB_TRUNCL@
GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
-GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
GNULIB_UNLINK = @GNULIB_UNLINK@
GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
@@ -414,8 +587,10 @@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+GNULIB_VFSCANF = @GNULIB_VFSCANF@
GNULIB_VPRINTF = @GNULIB_VPRINTF@
GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+GNULIB_VSCANF = @GNULIB_VSCANF@
GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
GNULIB_WAITPID = @GNULIB_WAITPID@
@@ -458,23 +633,46 @@ GNULIB_WMEMSET = @GNULIB_WMEMSET@
GNULIB_WRITE = @GNULIB_WRITE@
GNULIB__EXIT = @GNULIB__EXIT@
GREP = @GREP@
+HAVE_ACOSF = @HAVE_ACOSF@
HAVE_ACOSL = @HAVE_ACOSL@
+HAVE_ALPHASORT = @HAVE_ALPHASORT@
+HAVE_ASINF = @HAVE_ASINF@
HAVE_ASINL = @HAVE_ASINL@
+HAVE_ATAN2F = @HAVE_ATAN2F@
+HAVE_ATANF = @HAVE_ATANF@
HAVE_ATANL = @HAVE_ATANL@
HAVE_ATOLL = @HAVE_ATOLL@
HAVE_BTOWC = @HAVE_BTOWC@
HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
+HAVE_CBRT = @HAVE_CBRT@
+HAVE_CBRTF = @HAVE_CBRTF@
+HAVE_CBRTL = @HAVE_CBRTL@
HAVE_CHOWN = @HAVE_CHOWN@
+HAVE_CLOSEDIR = @HAVE_CLOSEDIR@
+HAVE_COPYSIGN = @HAVE_COPYSIGN@
+HAVE_COPYSIGNL = @HAVE_COPYSIGNL@
+HAVE_COSF = @HAVE_COSF@
+HAVE_COSHF = @HAVE_COSHF@
HAVE_COSL = @HAVE_COSL@
HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
+HAVE_DECL_CBRTF = @HAVE_DECL_CBRTF@
+HAVE_DECL_CBRTL = @HAVE_DECL_CBRTL@
HAVE_DECL_CEILF = @HAVE_DECL_CEILF@
HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
+HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@
HAVE_DECL_COSL = @HAVE_DECL_COSL@
+HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@
+HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@
+HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@
HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
+HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@
HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
+HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@
HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@
HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@
HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
@@ -488,17 +686,27 @@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
+HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
+HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@
HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
+HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@
+HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@
+HAVE_DECL_LOG2F = @HAVE_DECL_LOG2F@
+HAVE_DECL_LOG2L = @HAVE_DECL_LOG2L@
HAVE_DECL_LOGB = @HAVE_DECL_LOGB@
HAVE_DECL_LOGL = @HAVE_DECL_LOGL@
HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
+HAVE_DECL_REMAINDER = @HAVE_DECL_REMAINDER@
+HAVE_DECL_REMAINDERL = @HAVE_DECL_REMAINDERL@
+HAVE_DECL_RINTF = @HAVE_DECL_RINTF@
HAVE_DECL_ROUND = @HAVE_DECL_ROUND@
HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@
HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@
HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
HAVE_DECL_SINL = @HAVE_DECL_SINL@
HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@
@@ -507,7 +715,9 @@ 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_TANL = @HAVE_DECL_TANL@
HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@
HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@
@@ -517,18 +727,34 @@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+HAVE_DIRENT_H = @HAVE_DIRENT_H@
HAVE_DPRINTF = @HAVE_DPRINTF@
HAVE_DUP2 = @HAVE_DUP2@
HAVE_DUP3 = @HAVE_DUP3@
HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXPF = @HAVE_EXPF@
HAVE_EXPL = @HAVE_EXPL@
+HAVE_EXPM1 = @HAVE_EXPM1@
+HAVE_EXPM1F = @HAVE_EXPM1F@
+HAVE_FABSF = @HAVE_FABSF@
+HAVE_FABSL = @HAVE_FABSL@
HAVE_FACCESSAT = @HAVE_FACCESSAT@
HAVE_FCHDIR = @HAVE_FCHDIR@
HAVE_FCHMODAT = @HAVE_FCHMODAT@
HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FDATASYNC = @HAVE_FDATASYNC@
+HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
HAVE_FEATURES_H = @HAVE_FEATURES_H@
+HAVE_FFSL = @HAVE_FFSL@
+HAVE_FFSLL = @HAVE_FFSLL@
+HAVE_FMA = @HAVE_FMA@
+HAVE_FMAF = @HAVE_FMAF@
+HAVE_FMAL = @HAVE_FMAL@
+HAVE_FMODF = @HAVE_FMODF@
+HAVE_FMODL = @HAVE_FMODL@
+HAVE_FREXPF = @HAVE_FREXPF@
HAVE_FSEEKO = @HAVE_FSEEKO@
HAVE_FSTATAT = @HAVE_FSTATAT@
HAVE_FSYNC = @HAVE_FSYNC@
@@ -544,6 +770,12 @@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
HAVE_GRANTPT = @HAVE_GRANTPT@
+HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
+HAVE_HYPOTF = @HAVE_HYPOTF@
+HAVE_HYPOTL = @HAVE_HYPOTL@
+HAVE_ILOGB = @HAVE_ILOGB@
+HAVE_ILOGBF = @HAVE_ILOGBF@
+HAVE_ILOGBL = @HAVE_ILOGBL@
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
HAVE_ISNAND = @HAVE_ISNAND@
HAVE_ISNANF = @HAVE_ISNANF@
@@ -557,9 +789,18 @@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@
HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@
HAVE_LCHMOD = @HAVE_LCHMOD@
HAVE_LCHOWN = @HAVE_LCHOWN@
+HAVE_LDEXPF = @HAVE_LDEXPF@
HAVE_LIBSIGSEGV = @HAVE_LIBSIGSEGV@
HAVE_LINK = @HAVE_LINK@
HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LOG10F = @HAVE_LOG10F@
+HAVE_LOG10L = @HAVE_LOG10L@
+HAVE_LOG1P = @HAVE_LOG1P@
+HAVE_LOG1PF = @HAVE_LOG1PF@
+HAVE_LOG1PL = @HAVE_LOG1PL@
+HAVE_LOGBF = @HAVE_LOGBF@
+HAVE_LOGBL = @HAVE_LOGBL@
+HAVE_LOGF = @HAVE_LOGF@
HAVE_LOGL = @HAVE_LOGL@
HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
HAVE_LSTAT = @HAVE_LSTAT@
@@ -581,38 +822,64 @@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
HAVE_MKSTEMP = @HAVE_MKSTEMP@
HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
+HAVE_MODFF = @HAVE_MODFF@
+HAVE_MODFL = @HAVE_MODFL@
+HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OPENDIR = @HAVE_OPENDIR@
HAVE_OS_H = @HAVE_OS_H@
+HAVE_PCLOSE = @HAVE_PCLOSE@
HAVE_PIPE = @HAVE_PIPE@
HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_POPEN = @HAVE_POPEN@
+HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
HAVE_POSIX_SPAWN = @HAVE_POSIX_SPAWN@
HAVE_POSIX_SPAWNATTR_T = @HAVE_POSIX_SPAWNATTR_T@
HAVE_POSIX_SPAWN_FILE_ACTIONS_T = @HAVE_POSIX_SPAWN_FILE_ACTIONS_T@
+HAVE_POWF = @HAVE_POWF@
HAVE_PREAD = @HAVE_PREAD@
+HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@
HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RAISE = @HAVE_RAISE@
+HAVE_RANDOM = @HAVE_RANDOM@
HAVE_RANDOM_H = @HAVE_RANDOM_H@
HAVE_RANDOM_R = @HAVE_RANDOM_R@
HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READDIR = @HAVE_READDIR@
HAVE_READLINK = @HAVE_READLINK@
HAVE_READLINKAT = @HAVE_READLINKAT@
HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_REMAINDER = @HAVE_REMAINDER@
+HAVE_REMAINDERF = @HAVE_REMAINDERF@
HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_REWINDDIR = @HAVE_REWINDDIR@
+HAVE_RINT = @HAVE_RINT@
+HAVE_RINTL = @HAVE_RINTL@
HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@
+HAVE_SCANDIR = @HAVE_SCANDIR@
HAVE_SCHED_H = @HAVE_SCHED_H@
+HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
HAVE_SETENV = @HAVE_SETENV@
+HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
HAVE_SIGACTION = @HAVE_SIGACTION@
+HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@
HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
HAVE_SIGSET_T = @HAVE_SIGSET_T@
+HAVE_SINF = @HAVE_SINF@
+HAVE_SINHF = @HAVE_SINHF@
HAVE_SINL = @HAVE_SINL@
HAVE_SLEEP = @HAVE_SLEEP@
HAVE_SPAWN_H = @HAVE_SPAWN_H@
+HAVE_SQRTF = @HAVE_SQRTF@
HAVE_SQRTL = @HAVE_SQRTL@
HAVE_STDINT_H = @HAVE_STDINT_H@
HAVE_STPCPY = @HAVE_STPCPY@
@@ -638,6 +905,8 @@ 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_TANF = @HAVE_TANF@
+HAVE_TANHF = @HAVE_TANHF@
HAVE_TANL = @HAVE_TANL@
HAVE_TIMEGM = @HAVE_TIMEGM@
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
@@ -680,6 +949,7 @@ HAVE_WCSXFRM = @HAVE_WCSXFRM@
HAVE_WCTRANS_T = @HAVE_WCTRANS_T@
HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
HAVE_WCTYPE_T = @HAVE_WCTYPE_T@
+HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
HAVE_WINT_T = @HAVE_WINT_T@
HAVE_WMEMCHR = @HAVE_WMEMCHR@
HAVE_WMEMCMP = @HAVE_WMEMCMP@
@@ -696,6 +966,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@
+INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@
LIBCSTACK = @LIBCSTACK@
@@ -731,10 +1003,12 @@ M4tests_LTLIBOBJS = @M4tests_LTLIBOBJS@
M4tests_WITNESS = @M4tests_WITNESS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
+NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@
NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
@@ -749,15 +1023,18 @@ 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_DIRENT_H = @NEXT_DIRENT_H@
NEXT_ERRNO_H = @NEXT_ERRNO_H@
NEXT_FCNTL_H = @NEXT_FCNTL_H@
NEXT_FLOAT_H = @NEXT_FLOAT_H@
NEXT_GETOPT_H = @NEXT_GETOPT_H@
+NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
NEXT_LOCALE_H = @NEXT_LOCALE_H@
NEXT_MATH_H = @NEXT_MATH_H@
@@ -772,6 +1049,7 @@ 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@
@@ -788,33 +1066,53 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
+PRIPTR_PREFIX = @PRIPTR_PREFIX@
+PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
REPLACE_BTOWC = @REPLACE_BTOWC@
REPLACE_CALLOC = @REPLACE_CALLOC@
REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+REPLACE_CBRTF = @REPLACE_CBRTF@
+REPLACE_CBRTL = @REPLACE_CBRTL@
REPLACE_CEIL = @REPLACE_CEIL@
REPLACE_CEILF = @REPLACE_CEILF@
REPLACE_CEILL = @REPLACE_CEILL@
REPLACE_CHOWN = @REPLACE_CHOWN@
REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@
+REPLACE_DIRFD = @REPLACE_DIRFD@
REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUP2 = @REPLACE_DUP2@
REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_EXP2 = @REPLACE_EXP2@
+REPLACE_EXP2L = @REPLACE_EXP2L@
+REPLACE_EXPM1 = @REPLACE_EXPM1@
+REPLACE_EXPM1F = @REPLACE_EXPM1F@
+REPLACE_FABSL = @REPLACE_FABSL@
REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
REPLACE_FCLOSE = @REPLACE_FCLOSE@
REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDOPEN = @REPLACE_FDOPEN@
+REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
REPLACE_FFLUSH = @REPLACE_FFLUSH@
REPLACE_FLOOR = @REPLACE_FLOOR@
REPLACE_FLOORF = @REPLACE_FLOORF@
REPLACE_FLOORL = @REPLACE_FLOORL@
+REPLACE_FMA = @REPLACE_FMA@
+REPLACE_FMAF = @REPLACE_FMAF@
+REPLACE_FMAL = @REPLACE_FMAL@
+REPLACE_FMOD = @REPLACE_FMOD@
+REPLACE_FMODF = @REPLACE_FMODF@
+REPLACE_FMODL = @REPLACE_FMODL@
REPLACE_FOPEN = @REPLACE_FOPEN@
REPLACE_FPRINTF = @REPLACE_FPRINTF@
REPLACE_FPURGE = @REPLACE_FPURGE@
REPLACE_FREOPEN = @REPLACE_FREOPEN@
REPLACE_FREXP = @REPLACE_FREXP@
+REPLACE_FREXPF = @REPLACE_FREXPF@
REPLACE_FREXPL = @REPLACE_FREXPL@
REPLACE_FSEEK = @REPLACE_FSEEK@
REPLACE_FSEEKO = @REPLACE_FSEEKO@
@@ -822,6 +1120,7 @@ REPLACE_FSTAT = @REPLACE_FSTAT@
REPLACE_FSTATAT = @REPLACE_FSTATAT@
REPLACE_FTELL = @REPLACE_FTELL@
REPLACE_FTELLO = @REPLACE_FTELLO@
+REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
REPLACE_FUTIMENS = @REPLACE_FUTIMENS@
REPLACE_GETCWD = @REPLACE_GETCWD@
REPLACE_GETDELIM = @REPLACE_GETDELIM@
@@ -832,16 +1131,39 @@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
+REPLACE_HYPOT = @REPLACE_HYPOT@
+REPLACE_HYPOTF = @REPLACE_HYPOTF@
+REPLACE_HYPOTL = @REPLACE_HYPOTL@
+REPLACE_ILOGB = @REPLACE_ILOGB@
+REPLACE_ILOGBF = @REPLACE_ILOGBF@
+REPLACE_ISATTY = @REPLACE_ISATTY@
REPLACE_ISFINITE = @REPLACE_ISFINITE@
REPLACE_ISINF = @REPLACE_ISINF@
REPLACE_ISNAN = @REPLACE_ISNAN@
REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_ITOLD = @REPLACE_ITOLD@
REPLACE_LCHOWN = @REPLACE_LCHOWN@
REPLACE_LDEXPL = @REPLACE_LDEXPL@
REPLACE_LINK = @REPLACE_LINK@
REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LOG = @REPLACE_LOG@
+REPLACE_LOG10 = @REPLACE_LOG10@
+REPLACE_LOG10F = @REPLACE_LOG10F@
+REPLACE_LOG10L = @REPLACE_LOG10L@
+REPLACE_LOG1P = @REPLACE_LOG1P@
+REPLACE_LOG1PF = @REPLACE_LOG1PF@
+REPLACE_LOG1PL = @REPLACE_LOG1PL@
+REPLACE_LOG2 = @REPLACE_LOG2@
+REPLACE_LOG2F = @REPLACE_LOG2F@
+REPLACE_LOG2L = @REPLACE_LOG2L@
+REPLACE_LOGB = @REPLACE_LOGB@
+REPLACE_LOGBF = @REPLACE_LOGBF@
+REPLACE_LOGBL = @REPLACE_LOGBL@
+REPLACE_LOGF = @REPLACE_LOGF@
+REPLACE_LOGL = @REPLACE_LOGL@
REPLACE_LSEEK = @REPLACE_LSEEK@
REPLACE_LSTAT = @REPLACE_LSTAT@
REPLACE_MALLOC = @REPLACE_MALLOC@
@@ -859,6 +1181,9 @@ REPLACE_MKFIFO = @REPLACE_MKFIFO@
REPLACE_MKNOD = @REPLACE_MKNOD@
REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_MODF = @REPLACE_MODF@
+REPLACE_MODFF = @REPLACE_MODFF@
+REPLACE_MODFL = @REPLACE_MODFL@
REPLACE_NAN = @REPLACE_NAN@
REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
@@ -866,16 +1191,29 @@ REPLACE_NULL = @REPLACE_NULL@
REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
REPLACE_OPEN = @REPLACE_OPEN@
REPLACE_OPENAT = @REPLACE_OPENAT@
+REPLACE_OPENDIR = @REPLACE_OPENDIR@
REPLACE_PERROR = @REPLACE_PERROR@
REPLACE_POPEN = @REPLACE_POPEN@
REPLACE_POSIX_SPAWN = @REPLACE_POSIX_SPAWN@
+REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@
+REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@
+REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
REPLACE_PREAD = @REPLACE_PREAD@
REPLACE_PRINTF = @REPLACE_PRINTF@
+REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@
+REPLACE_PTSNAME = @REPLACE_PTSNAME@
+REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
REPLACE_PUTENV = @REPLACE_PUTENV@
REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_RAISE = @REPLACE_RAISE@
+REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
+REPLACE_READ = @REPLACE_READ@
REPLACE_READLINK = @REPLACE_READLINK@
REPLACE_REALLOC = @REPLACE_REALLOC@
REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMAINDER = @REPLACE_REMAINDER@
+REPLACE_REMAINDERF = @REPLACE_REMAINDERF@
+REPLACE_REMAINDERL = @REPLACE_REMAINDERL@
REPLACE_REMOVE = @REPLACE_REMOVE@
REPLACE_RENAME = @REPLACE_RENAME@
REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
@@ -890,10 +1228,13 @@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
REPLACE_SLEEP = @REPLACE_SLEEP@
REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_SQRTL = @REPLACE_SQRTL@
REPLACE_STAT = @REPLACE_STAT@
+REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
REPLACE_STPNCPY = @REPLACE_STPNCPY@
REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
REPLACE_STRDUP = @REPLACE_STRDUP@
REPLACE_STRERROR = @REPLACE_STRERROR@
REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
@@ -903,10 +1244,14 @@ REPLACE_STRNLEN = @REPLACE_STRNLEN@
REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
REPLACE_STRSTR = @REPLACE_STRSTR@
REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
+REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
REPLACE_SYMLINK = @REPLACE_SYMLINK@
REPLACE_TIMEGM = @REPLACE_TIMEGM@
REPLACE_TMPFILE = @REPLACE_TMPFILE@
+REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
REPLACE_TRUNC = @REPLACE_TRUNC@
REPLACE_TRUNCF = @REPLACE_TRUNCF@
REPLACE_TRUNCL = @REPLACE_TRUNCL@
@@ -942,6 +1287,8 @@ STDINT_H = @STDINT_H@
STRIP = @STRIP@
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
+UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
@@ -949,6 +1296,8 @@ VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
WERROR_CFLAGS = @WERROR_CFLAGS@
+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@
abs_aux_dir = @abs_aux_dir@
abs_builddir = @abs_builddir@
@@ -1084,11 +1433,11 @@ $(top_srcdir)/configure: $(am__configure_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
-tags: TAGS
-TAGS:
+tags TAGS:
+
+ctags CTAGS:
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
distdir: $(DISTFILES)
@@ -1135,10 +1484,15 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
@@ -1218,15 +1572,16 @@ uninstall-am:
.MAKE: install-am install-strip
-.PHONY: all all-am check check-am clean clean-generic distclean \
- distclean-generic distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am
+.PHONY: all all-am check check-am clean clean-generic cscopelist-am \
+ ctags-am distclean distclean-generic distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags-am uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 064edaf..24e93ac 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -1,6 +1,6 @@
## Makefile.am - template for generating Makefile via Automake
##
-## Copyright (C) 2009-2011 Free Software Foundation, Inc.
+## Copyright (C) 2009-2013 Free Software Foundation, Inc.
##
## This file is part of GNU M4.
##
diff --git a/lib/Makefile.in b/lib/Makefile.in
index b8a9eca..15bc16d 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.14 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,18 +14,75 @@
@SET_MAKE@
-# Copyright (C) 2002-2011 Free Software Foundation, Inc.
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
#
-# This file is free software, distributed under the terms of the GNU
-# General Public License. As a special exception to the GNU General
-# Public License, this file may be distributed as part of a program
-# that contains a configuration script generated by Autoconf, under
+# You should have received a copy of the GNU General Public License
+# along with this file. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License,
+# this file may be distributed as part of a program that
+# contains a configuration script generated by Autoconf, under
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --local-dir=local --lib=libm4 --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --with-tests --with-c++-tests --avoid=lock-tests --avoid=tls-tests --makefile-name=gnulib.mk --no-libtool --macro-prefix=M4 announce-gen assert autobuild avltree-oset binary-io c-stack clean-temp cloexec close-stream closein config-h dirname error execute fclose fdl-1.3 fflush filenamecat fopen fopen-safer fseeko gendocs getopt-gnu git-version-gen gnu-web-doc-update gnumakefile gnupload gpl-3.0 ignore-value intprops maintainer-makefile manywarnings memchr2 mkstemp obstack progname regex rename sigaction spawn-pipe stdbool stdint stdlib-safer strsignal strstr strtod strtol unlocked-io update-copyright vc-list-files verror version-etc version-etc-fsf wait-process xalloc xoset xprintf xvasprintf-posix
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libm4 --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --with-tests --with-c++-tests --avoid=lock-tests --avoid=tls-tests --makefile-name=gnulib.mk --no-conditional-dependencies --no-libtool --macro-prefix=M4 announce-gen assert autobuild avltree-oset binary-io c-stack clean-temp cloexec close-stream closein config-h dirname error execute fclose fdl-1.3 fflush filenamecat fopen fopen-safer fseeko gendocs getopt-gnu git-version-gen gnu-web-doc-update gnumakefile gnupload gpl-3.0 ignore-value intprops maintainer-makefile manywarnings memchr2 mkstemp obstack progname regex rename sigaction sigpipe spawn-pipe stdbool stdint stdlib-safer strsignal strstr strtod unlocked-io update-copyright vc-list-files verror version-etc version-etc-fsf wait-process xalloc xoset xprintf xvasprintf-posix
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@
@@ -44,51 +100,58 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/config.hin $(srcdir)/gnulib.mk
+DIST_COMMON = $(srcdir)/gnulib.mk $(srcdir)/Makefile.in \
+ $(srcdir)/Makefile.am $(srcdir)/config.hin \
+ $(top_srcdir)/build-aux/depcomp
subdir = lib
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/ansi-c++.m4 \
- $(top_srcdir)/m4/assert.m4 $(top_srcdir)/m4/autobuild.m4 \
- $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/c-stack.m4 \
- $(top_srcdir)/m4/canonicalize.m4 $(top_srcdir)/m4/cloexec.m4 \
+ $(top_srcdir)/m4/asm-underscore.m4 $(top_srcdir)/m4/assert.m4 \
+ $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \
+ $(top_srcdir)/m4/c-stack.m4 $(top_srcdir)/m4/canonicalize.m4 \
$(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \
- $(top_srcdir)/m4/closein.m4 $(top_srcdir)/m4/closeout.m4 \
- $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/config-h.m4 \
- $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/dirname.m4 \
- $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup2.m4 \
- $(top_srcdir)/m4/eealloc.m4 $(top_srcdir)/m4/environ.m4 \
- $(top_srcdir)/m4/errno_h.m4 $(top_srcdir)/m4/error.m4 \
- $(top_srcdir)/m4/execute.m4 $(top_srcdir)/m4/exponentd.m4 \
- $(top_srcdir)/m4/exponentf.m4 $(top_srcdir)/m4/exponentl.m4 \
- $(top_srcdir)/m4/extensions.m4 \
+ $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/closein.m4 \
+ $(top_srcdir)/m4/closeout.m4 $(top_srcdir)/m4/codeset.m4 \
+ $(top_srcdir)/m4/config-h.m4 $(top_srcdir)/m4/configmake.m4 \
+ $(top_srcdir)/m4/dirent_h.m4 $(top_srcdir)/m4/dirname.m4 \
+ $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \
+ $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
+ $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \
+ $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/execute.m4 \
+ $(top_srcdir)/m4/exponentd.m4 $(top_srcdir)/m4/exponentf.m4 \
+ $(top_srcdir)/m4/exponentl.m4 $(top_srcdir)/m4/extensions.m4 \
+ $(top_srcdir)/m4/extern-inline.m4 \
$(top_srcdir)/m4/fatal-signal.m4 $(top_srcdir)/m4/fclose.m4 \
$(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \
- $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fflush.m4 \
- $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/float_h.m4 \
- $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fpending.m4 \
- $(top_srcdir)/m4/fpieee.m4 $(top_srcdir)/m4/fpurge.m4 \
+ $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopen.m4 \
+ $(top_srcdir)/m4/fflush.m4 $(top_srcdir)/m4/filenamecat.m4 \
+ $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fopen.m4 \
+ $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fpieee.m4 \
+ $(top_srcdir)/m4/fpurge.m4 $(top_srcdir)/m4/freadahead.m4 \
$(top_srcdir)/m4/freading.m4 $(top_srcdir)/m4/frexp.m4 \
- $(top_srcdir)/m4/frexpl.m4 $(top_srcdir)/m4/fseeko.m4 \
+ $(top_srcdir)/m4/frexpl.m4 $(top_srcdir)/m4/fseek.m4 \
+ $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \
$(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \
- $(top_srcdir)/m4/getdtablesize.m4 $(top_srcdir)/m4/getopt.m4 \
- $(top_srcdir)/m4/getpagesize.m4 \
- $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/gl_list.m4 \
- $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \
+ $(top_srcdir)/m4/getcwd.m4 $(top_srcdir)/m4/getdtablesize.m4 \
+ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpagesize.m4 \
+ $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glibc21.m4 \
+ $(top_srcdir)/m4/gnulib-common.m4 \
$(top_srcdir)/m4/gnulib-comp.m4 \
- $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \
+ $(top_srcdir)/m4/include_next.m4 \
$(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \
+ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \
$(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/isnand.m4 \
$(top_srcdir)/m4/isnanf.m4 $(top_srcdir)/m4/isnanl.m4 \
- $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/lcmessage.m4 \
- $(top_srcdir)/m4/ldexp.m4 $(top_srcdir)/m4/ldexpl.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \
- $(top_srcdir)/m4/link.m4 $(top_srcdir)/m4/localcharset.m4 \
- $(top_srcdir)/m4/locale-fr.m4 $(top_srcdir)/m4/locale-ja.m4 \
- $(top_srcdir)/m4/locale-tr.m4 $(top_srcdir)/m4/locale-zh.m4 \
- $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localename.m4 \
+ $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \
+ $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/ldexp.m4 \
+ $(top_srcdir)/m4/ldexpl.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/libsigsegv.m4 $(top_srcdir)/m4/link.m4 \
+ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \
+ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-tr.m4 \
+ $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/locale_h.m4 \
+ $(top_srcdir)/m4/localeconv.m4 $(top_srcdir)/m4/localename.m4 \
$(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \
$(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \
$(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \
@@ -97,40 +160,43 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \
$(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mkdtemp.m4 \
$(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \
- $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/multiarch.m4 \
+ $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \
+ $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \
$(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nocrash.m4 \
- $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/pathmax.m4 \
+ $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/open.m4 \
+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \
$(top_srcdir)/m4/pipe2.m4 $(top_srcdir)/m4/posix_spawn.m4 \
$(top_srcdir)/m4/printf-frexp.m4 \
$(top_srcdir)/m4/printf-frexpl.m4 $(top_srcdir)/m4/printf.m4 \
$(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quotearg.m4 \
- $(top_srcdir)/m4/rawmemchr.m4 $(top_srcdir)/m4/readlink.m4 \
+ $(top_srcdir)/m4/raise.m4 $(top_srcdir)/m4/rawmemchr.m4 \
+ $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readlink.m4 \
$(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/rename.m4 \
$(top_srcdir)/m4/rmdir.m4 $(top_srcdir)/m4/sched_h.m4 \
- $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/setlocale.m4 \
- $(top_srcdir)/m4/sig_atomic_t.m4 $(top_srcdir)/m4/sigaction.m4 \
- $(top_srcdir)/m4/signal_h.m4 \
+ $(top_srcdir)/m4/secure_getenv.m4 $(top_srcdir)/m4/setenv.m4 \
+ $(top_srcdir)/m4/setlocale.m4 $(top_srcdir)/m4/sig_atomic_t.m4 \
+ $(top_srcdir)/m4/sigaction.m4 $(top_srcdir)/m4/signal_h.m4 \
$(top_srcdir)/m4/signalblocking.m4 $(top_srcdir)/m4/signbit.m4 \
- $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/snprintf.m4 \
+ $(top_srcdir)/m4/sigpipe.m4 $(top_srcdir)/m4/size_max.m4 \
+ $(top_srcdir)/m4/sleep.m4 $(top_srcdir)/m4/snprintf.m4 \
$(top_srcdir)/m4/spawn-pipe.m4 $(top_srcdir)/m4/spawn_h.m4 \
$(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat.m4 \
$(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \
$(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \
- $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio-safer.m4 \
- $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib-safer.m4 \
+ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \
$(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strchrnul.m4 \
$(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
$(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strndup.m4 \
$(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strsignal.m4 \
$(top_srcdir)/m4/strstr.m4 $(top_srcdir)/m4/strtod.m4 \
- $(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/symlink.m4 \
+ $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_socket_h.m4 \
$(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \
- $(top_srcdir)/m4/sys_wait_h.m4 $(top_srcdir)/m4/tempname.m4 \
- $(top_srcdir)/m4/threadlib.m4 $(top_srcdir)/m4/time_h.m4 \
- $(top_srcdir)/m4/tls.m4 $(top_srcdir)/m4/tmpdir.m4 \
- $(top_srcdir)/m4/ungetc.m4 $(top_srcdir)/m4/unistd-safer.m4 \
- $(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/unlocked-io.m4 \
- $(top_srcdir)/m4/vasnprintf.m4 \
+ $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/sys_wait_h.m4 \
+ $(top_srcdir)/m4/tempname.m4 $(top_srcdir)/m4/threadlib.m4 \
+ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/tls.m4 \
+ $(top_srcdir)/m4/tmpdir.m4 $(top_srcdir)/m4/ungetc.m4 \
+ $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \
+ $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
$(top_srcdir)/m4/vasprintf-posix.m4 \
$(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/version-etc.m4 \
$(top_srcdir)/m4/wait-process.m4 $(top_srcdir)/m4/waitpid.m4 \
@@ -138,9 +204,10 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \
$(top_srcdir)/m4/wctob.m4 $(top_srcdir)/m4/wctomb.m4 \
$(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wint_t.m4 \
- $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xsize.m4 \
- $(top_srcdir)/m4/xstrndup.m4 $(top_srcdir)/m4/xvasprintf.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/write.m4 $(top_srcdir)/m4/xalloc.m4 \
+ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrndup.m4 \
+ $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -148,55 +215,93 @@ CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
-AR = ar
-ARFLAGS = cru
-AM_V_AR = $(am__v_AR_$(V))
-am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY))
-am__v_AR_0 = @echo " AR " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
-am__v_at_0 = @
+AM_V_AR = $(am__v_AR_@AM_V@)
+am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
+am__v_AR_0 = @echo " AR " $@;
+am__v_AR_1 =
libm4_a_AR = $(AR) $(ARFLAGS)
am__DEPENDENCIES_1 =
-am_libm4_a_OBJECTS = gl_avltree_oset.$(OBJEXT) c-ctype.$(OBJEXT) \
- c-stack.$(OBJEXT) clean-temp.$(OBJEXT) close-hook.$(OBJEXT) \
- execute.$(OBJEXT) exitfail.$(OBJEXT) fatal-signal.$(OBJEXT) \
+am__dirstamp = $(am__leading_dot)dirstamp
+am_libm4_a_OBJECTS = gl_avltree_oset.$(OBJEXT) binary-io.$(OBJEXT) \
+ c-ctype.$(OBJEXT) c-stack.$(OBJEXT) c-strcasecmp.$(OBJEXT) \
+ c-strncasecmp.$(OBJEXT) clean-temp.$(OBJEXT) cloexec.$(OBJEXT) \
+ close-stream.$(OBJEXT) closein.$(OBJEXT) closeout.$(OBJEXT) \
+ dirname.$(OBJEXT) basename.$(OBJEXT) dirname-lgpl.$(OBJEXT) \
+ basename-lgpl.$(OBJEXT) stripslash.$(OBJEXT) execute.$(OBJEXT) \
+ exitfail.$(OBJEXT) fatal-signal.$(OBJEXT) fd-hook.$(OBJEXT) \
fd-safer-flag.$(OBJEXT) dup-safer-flag.$(OBJEXT) \
- freadahead.$(OBJEXT) freading.$(OBJEXT) \
+ filenamecat.$(OBJEXT) filenamecat-lgpl.$(OBJEXT) \
+ fopen-safer.$(OBJEXT) freading.$(OBJEXT) \
gl_linkedhash_list.$(OBJEXT) gl_list.$(OBJEXT) \
- localcharset.$(OBJEXT) lock.$(OBJEXT) malloca.$(OBJEXT) \
- memchr2.$(OBJEXT) gl_oset.$(OBJEXT) pipe2.$(OBJEXT) \
- pipe2-safer.$(OBJEXT) printf-frexp.$(OBJEXT) \
- printf-frexpl.$(OBJEXT) progname.$(OBJEXT) \
- spawn-pipe.$(OBJEXT) threadlib.$(OBJEXT) tls.$(OBJEXT) \
- tmpdir.$(OBJEXT) verror.$(OBJEXT) version-etc.$(OBJEXT) \
+ localcharset.$(OBJEXT) glthread/lock.$(OBJEXT) \
+ malloca.$(OBJEXT) math.$(OBJEXT) memchr2.$(OBJEXT) \
+ gl_oset.$(OBJEXT) pipe2.$(OBJEXT) pipe2-safer.$(OBJEXT) \
+ printf-frexp.$(OBJEXT) printf-frexpl.$(OBJEXT) \
+ progname.$(OBJEXT) quotearg.$(OBJEXT) sig-handler.$(OBJEXT) \
+ spawn-pipe.$(OBJEXT) mkstemp-safer.$(OBJEXT) \
+ tempname.$(OBJEXT) glthread/threadlib.$(OBJEXT) \
+ glthread/tls.$(OBJEXT) tmpdir.$(OBJEXT) unistd.$(OBJEXT) \
+ dup-safer.$(OBJEXT) fd-safer.$(OBJEXT) pipe-safer.$(OBJEXT) \
+ verror.$(OBJEXT) version-etc.$(OBJEXT) \
version-etc-fsf.$(OBJEXT) wait-process.$(OBJEXT) \
- xalloc-die.$(OBJEXT) gl_xlist.$(OBJEXT) xmalloca.$(OBJEXT) \
- gl_xoset.$(OBJEXT) xprintf.$(OBJEXT) xstrndup.$(OBJEXT) \
+ wctype-h.$(OBJEXT) xmalloc.$(OBJEXT) xalloc-die.$(OBJEXT) \
+ gl_xlist.$(OBJEXT) xmalloca.$(OBJEXT) gl_xoset.$(OBJEXT) \
+ xprintf.$(OBJEXT) xsize.$(OBJEXT) xstrndup.$(OBJEXT) \
xvasprintf.$(OBJEXT) xasprintf.$(OBJEXT)
libm4_a_OBJECTS = $(am_libm4_a_OBJECTS)
+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@
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
-AM_V_lt = $(am__v_lt_$(V))
-am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
-am__v_lt_0 = --silent
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_$(V))
-am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
-am__v_CC_0 = @echo " CC " $@;
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_$(V))
-am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
-am__v_CCLD_0 = @echo " CCLD " $@;
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
-am__v_GEN_0 = @echo " GEN " $@;
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
SOURCES = $(libm4_a_SOURCES) $(EXTRA_libm4_a_SOURCES)
DIST_SOURCES = $(libm4_a_SOURCES) $(EXTRA_libm4_a_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)config.hin
+# 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)
@@ -207,6 +312,9 @@ ALLOCA_H = @ALLOCA_H@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+AR = @AR@
+ARFLAGS = @ARFLAGS@
+ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -244,47 +352,90 @@ EXEEXT = @EXEEXT@
FLOAT_H = @FLOAT_H@
GETOPT_H = @GETOPT_H@
GLIBC21 = @GLIBC21@
+GNULIB_ACOSF = @GNULIB_ACOSF@
GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
+GNULIB_ASINF = @GNULIB_ASINF@
GNULIB_ASINL = @GNULIB_ASINL@
+GNULIB_ATAN2F = @GNULIB_ATAN2F@
+GNULIB_ATANF = @GNULIB_ATANF@
GNULIB_ATANL = @GNULIB_ATANL@
GNULIB_ATOLL = @GNULIB_ATOLL@
GNULIB_BTOWC = @GNULIB_BTOWC@
GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CBRT = @GNULIB_CBRT@
+GNULIB_CBRTF = @GNULIB_CBRTF@
+GNULIB_CBRTL = @GNULIB_CBRTL@
GNULIB_CEIL = @GNULIB_CEIL@
GNULIB_CEILF = @GNULIB_CEILF@
GNULIB_CEILL = @GNULIB_CEILL@
+GNULIB_CHDIR = @GNULIB_CHDIR@
GNULIB_CHOWN = @GNULIB_CHOWN@
GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@
+GNULIB_COPYSIGN = @GNULIB_COPYSIGN@
+GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@
+GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@
+GNULIB_COSF = @GNULIB_COSF@
+GNULIB_COSHF = @GNULIB_COSHF@
GNULIB_COSL = @GNULIB_COSL@
+GNULIB_DIRFD = @GNULIB_DIRFD@
GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP = @GNULIB_DUP@
GNULIB_DUP2 = @GNULIB_DUP2@
GNULIB_DUP3 = @GNULIB_DUP3@
GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
GNULIB_ENVIRON = @GNULIB_ENVIRON@
GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXP2 = @GNULIB_EXP2@
+GNULIB_EXP2F = @GNULIB_EXP2F@
+GNULIB_EXP2L = @GNULIB_EXP2L@
+GNULIB_EXPF = @GNULIB_EXPF@
GNULIB_EXPL = @GNULIB_EXPL@
+GNULIB_EXPM1 = @GNULIB_EXPM1@
+GNULIB_EXPM1F = @GNULIB_EXPM1F@
+GNULIB_EXPM1L = @GNULIB_EXPM1L@
+GNULIB_FABSF = @GNULIB_FABSF@
+GNULIB_FABSL = @GNULIB_FABSL@
GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
GNULIB_FCHDIR = @GNULIB_FCHDIR@
GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
GNULIB_FCLOSE = @GNULIB_FCLOSE@
GNULIB_FCNTL = @GNULIB_FCNTL@
+GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
+GNULIB_FDOPEN = @GNULIB_FDOPEN@
+GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@
GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FFSL = @GNULIB_FFSL@
+GNULIB_FFSLL = @GNULIB_FFSLL@
+GNULIB_FGETC = @GNULIB_FGETC@
+GNULIB_FGETS = @GNULIB_FGETS@
GNULIB_FLOOR = @GNULIB_FLOOR@
GNULIB_FLOORF = @GNULIB_FLOORF@
GNULIB_FLOORL = @GNULIB_FLOORL@
+GNULIB_FMA = @GNULIB_FMA@
+GNULIB_FMAF = @GNULIB_FMAF@
+GNULIB_FMAL = @GNULIB_FMAL@
+GNULIB_FMOD = @GNULIB_FMOD@
+GNULIB_FMODF = @GNULIB_FMODF@
+GNULIB_FMODL = @GNULIB_FMODL@
GNULIB_FOPEN = @GNULIB_FOPEN@
GNULIB_FPRINTF = @GNULIB_FPRINTF@
GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
GNULIB_FPURGE = @GNULIB_FPURGE@
GNULIB_FPUTC = @GNULIB_FPUTC@
GNULIB_FPUTS = @GNULIB_FPUTS@
+GNULIB_FREAD = @GNULIB_FREAD@
GNULIB_FREOPEN = @GNULIB_FREOPEN@
GNULIB_FREXP = @GNULIB_FREXP@
+GNULIB_FREXPF = @GNULIB_FREXPF@
GNULIB_FREXPL = @GNULIB_FREXPL@
+GNULIB_FSCANF = @GNULIB_FSCANF@
GNULIB_FSEEK = @GNULIB_FSEEK@
GNULIB_FSEEKO = @GNULIB_FSEEKO@
+GNULIB_FSTAT = @GNULIB_FSTAT@
GNULIB_FSTATAT = @GNULIB_FSTATAT@
GNULIB_FSYNC = @GNULIB_FSYNC@
GNULIB_FTELL = @GNULIB_FTELL@
@@ -292,6 +443,8 @@ GNULIB_FTELLO = @GNULIB_FTELLO@
GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
GNULIB_FWRITE = @GNULIB_FWRITE@
+GNULIB_GETC = @GNULIB_GETC@
+GNULIB_GETCHAR = @GNULIB_GETCHAR@
GNULIB_GETCWD = @GNULIB_GETCWD@
GNULIB_GETDELIM = @GNULIB_GETDELIM@
GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
@@ -306,7 +459,18 @@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GL_M4_UNISTD_H_GETOPT = @GNULIB_GL_M4_UNISTD_H_GETOPT@
GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
+GNULIB_HYPOT = @GNULIB_HYPOT@
+GNULIB_HYPOTF = @GNULIB_HYPOTF@
+GNULIB_HYPOTL = @GNULIB_HYPOTL@
+GNULIB_ILOGB = @GNULIB_ILOGB@
+GNULIB_ILOGBF = @GNULIB_ILOGBF@
+GNULIB_ILOGBL = @GNULIB_ILOGBL@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+GNULIB_ISATTY = @GNULIB_ISATTY@
GNULIB_ISFINITE = @GNULIB_ISFINITE@
GNULIB_ISINF = @GNULIB_ISINF@
GNULIB_ISNAN = @GNULIB_ISNAN@
@@ -317,10 +481,25 @@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
GNULIB_LCHMOD = @GNULIB_LCHMOD@
GNULIB_LCHOWN = @GNULIB_LCHOWN@
+GNULIB_LDEXPF = @GNULIB_LDEXPF@
GNULIB_LDEXPL = @GNULIB_LDEXPL@
GNULIB_LINK = @GNULIB_LINK@
GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
+GNULIB_LOG = @GNULIB_LOG@
+GNULIB_LOG10 = @GNULIB_LOG10@
+GNULIB_LOG10F = @GNULIB_LOG10F@
+GNULIB_LOG10L = @GNULIB_LOG10L@
+GNULIB_LOG1P = @GNULIB_LOG1P@
+GNULIB_LOG1PF = @GNULIB_LOG1PF@
+GNULIB_LOG1PL = @GNULIB_LOG1PL@
+GNULIB_LOG2 = @GNULIB_LOG2@
+GNULIB_LOG2F = @GNULIB_LOG2F@
+GNULIB_LOG2L = @GNULIB_LOG2L@
GNULIB_LOGB = @GNULIB_LOGB@
+GNULIB_LOGBF = @GNULIB_LOGBF@
+GNULIB_LOGBL = @GNULIB_LOGBL@
+GNULIB_LOGF = @GNULIB_LOGF@
GNULIB_LOGL = @GNULIB_LOGL@
GNULIB_LSEEK = @GNULIB_LSEEK@
GNULIB_LSTAT = @GNULIB_LSTAT@
@@ -360,16 +539,23 @@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
GNULIB_MKTIME = @GNULIB_MKTIME@
+GNULIB_MODF = @GNULIB_MODF@
+GNULIB_MODFF = @GNULIB_MODFF@
+GNULIB_MODFL = @GNULIB_MODFL@
GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@
GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
GNULIB_OPEN = @GNULIB_OPEN@
GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_OPENDIR = @GNULIB_OPENDIR@
+GNULIB_PCLOSE = @GNULIB_PCLOSE@
GNULIB_PERROR = @GNULIB_PERROR@
GNULIB_PIPE = @GNULIB_PIPE@
GNULIB_PIPE2 = @GNULIB_PIPE2@
GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
GNULIB_POSIX_SPAWN = @GNULIB_POSIX_SPAWN@
GNULIB_POSIX_SPAWNATTR_DESTROY = @GNULIB_POSIX_SPAWNATTR_DESTROY@
GNULIB_POSIX_SPAWNATTR_GETFLAGS = @GNULIB_POSIX_SPAWNATTR_GETFLAGS@
@@ -391,41 +577,63 @@ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDU
GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY@
GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT@
+GNULIB_POWF = @GNULIB_POWF@
GNULIB_PREAD = @GNULIB_PREAD@
GNULIB_PRINTF = @GNULIB_PRINTF@
GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@
GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
GNULIB_PUTC = @GNULIB_PUTC@
GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
GNULIB_PUTENV = @GNULIB_PUTENV@
GNULIB_PUTS = @GNULIB_PUTS@
GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RAISE = @GNULIB_RAISE@
+GNULIB_RANDOM = @GNULIB_RANDOM@
GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READ = @GNULIB_READ@
+GNULIB_READDIR = @GNULIB_READDIR@
GNULIB_READLINK = @GNULIB_READLINK@
GNULIB_READLINKAT = @GNULIB_READLINKAT@
GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMAINDER = @GNULIB_REMAINDER@
+GNULIB_REMAINDERF = @GNULIB_REMAINDERF@
+GNULIB_REMAINDERL = @GNULIB_REMAINDERL@
GNULIB_REMOVE = @GNULIB_REMOVE@
GNULIB_RENAME = @GNULIB_RENAME@
GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+GNULIB_REWINDDIR = @GNULIB_REWINDDIR@
+GNULIB_RINT = @GNULIB_RINT@
+GNULIB_RINTF = @GNULIB_RINTF@
+GNULIB_RINTL = @GNULIB_RINTL@
GNULIB_RMDIR = @GNULIB_RMDIR@
GNULIB_ROUND = @GNULIB_ROUND@
GNULIB_ROUNDF = @GNULIB_ROUNDF@
GNULIB_ROUNDL = @GNULIB_ROUNDL@
GNULIB_RPMATCH = @GNULIB_RPMATCH@
+GNULIB_SCANDIR = @GNULIB_SCANDIR@
+GNULIB_SCANF = @GNULIB_SCANF@
+GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@
GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
GNULIB_SIGACTION = @GNULIB_SIGACTION@
GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
+GNULIB_SINF = @GNULIB_SINF@
+GNULIB_SINHF = @GNULIB_SINHF@
GNULIB_SINL = @GNULIB_SINL@
GNULIB_SLEEP = @GNULIB_SLEEP@
GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_SQRTF = @GNULIB_SQRTF@
GNULIB_SQRTL = @GNULIB_SQRTL@
GNULIB_STAT = @GNULIB_STAT@
+GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@
GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
GNULIB_STPCPY = @GNULIB_STPCPY@
GNULIB_STPNCPY = @GNULIB_STPNCPY@
@@ -443,13 +651,17 @@ GNULIB_STRSEP = @GNULIB_STRSEP@
GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
GNULIB_STRSTR = @GNULIB_STRSTR@
GNULIB_STRTOD = @GNULIB_STRTOD@
+GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@
GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
GNULIB_STRTOLL = @GNULIB_STRTOLL@
GNULIB_STRTOULL = @GNULIB_STRTOULL@
+GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
GNULIB_SYMLINK = @GNULIB_SYMLINK@
GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
+GNULIB_TANF = @GNULIB_TANF@
+GNULIB_TANHF = @GNULIB_TANHF@
GNULIB_TANL = @GNULIB_TANL@
GNULIB_TIMEGM = @GNULIB_TIMEGM@
GNULIB_TIME_R = @GNULIB_TIME_R@
@@ -459,7 +671,7 @@ GNULIB_TRUNC = @GNULIB_TRUNC@
GNULIB_TRUNCF = @GNULIB_TRUNCF@
GNULIB_TRUNCL = @GNULIB_TRUNCL@
GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
-GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
GNULIB_UNLINK = @GNULIB_UNLINK@
GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
@@ -471,8 +683,10 @@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+GNULIB_VFSCANF = @GNULIB_VFSCANF@
GNULIB_VPRINTF = @GNULIB_VPRINTF@
GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+GNULIB_VSCANF = @GNULIB_VSCANF@
GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
GNULIB_WAITPID = @GNULIB_WAITPID@
@@ -515,23 +729,46 @@ GNULIB_WMEMSET = @GNULIB_WMEMSET@
GNULIB_WRITE = @GNULIB_WRITE@
GNULIB__EXIT = @GNULIB__EXIT@
GREP = @GREP@
+HAVE_ACOSF = @HAVE_ACOSF@
HAVE_ACOSL = @HAVE_ACOSL@
+HAVE_ALPHASORT = @HAVE_ALPHASORT@
+HAVE_ASINF = @HAVE_ASINF@
HAVE_ASINL = @HAVE_ASINL@
+HAVE_ATAN2F = @HAVE_ATAN2F@
+HAVE_ATANF = @HAVE_ATANF@
HAVE_ATANL = @HAVE_ATANL@
HAVE_ATOLL = @HAVE_ATOLL@
HAVE_BTOWC = @HAVE_BTOWC@
HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
+HAVE_CBRT = @HAVE_CBRT@
+HAVE_CBRTF = @HAVE_CBRTF@
+HAVE_CBRTL = @HAVE_CBRTL@
HAVE_CHOWN = @HAVE_CHOWN@
+HAVE_CLOSEDIR = @HAVE_CLOSEDIR@
+HAVE_COPYSIGN = @HAVE_COPYSIGN@
+HAVE_COPYSIGNL = @HAVE_COPYSIGNL@
+HAVE_COSF = @HAVE_COSF@
+HAVE_COSHF = @HAVE_COSHF@
HAVE_COSL = @HAVE_COSL@
HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
+HAVE_DECL_CBRTF = @HAVE_DECL_CBRTF@
+HAVE_DECL_CBRTL = @HAVE_DECL_CBRTL@
HAVE_DECL_CEILF = @HAVE_DECL_CEILF@
HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
+HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@
HAVE_DECL_COSL = @HAVE_DECL_COSL@
+HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@
+HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@
+HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@
HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
+HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@
HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
+HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@
HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@
HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@
HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
@@ -545,17 +782,27 @@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
+HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
+HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@
HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
+HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@
+HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@
+HAVE_DECL_LOG2F = @HAVE_DECL_LOG2F@
+HAVE_DECL_LOG2L = @HAVE_DECL_LOG2L@
HAVE_DECL_LOGB = @HAVE_DECL_LOGB@
HAVE_DECL_LOGL = @HAVE_DECL_LOGL@
HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
+HAVE_DECL_REMAINDER = @HAVE_DECL_REMAINDER@
+HAVE_DECL_REMAINDERL = @HAVE_DECL_REMAINDERL@
+HAVE_DECL_RINTF = @HAVE_DECL_RINTF@
HAVE_DECL_ROUND = @HAVE_DECL_ROUND@
HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@
HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@
HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
HAVE_DECL_SINL = @HAVE_DECL_SINL@
HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@
@@ -564,7 +811,9 @@ 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_TANL = @HAVE_DECL_TANL@
HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@
HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@
@@ -574,18 +823,34 @@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+HAVE_DIRENT_H = @HAVE_DIRENT_H@
HAVE_DPRINTF = @HAVE_DPRINTF@
HAVE_DUP2 = @HAVE_DUP2@
HAVE_DUP3 = @HAVE_DUP3@
HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXPF = @HAVE_EXPF@
HAVE_EXPL = @HAVE_EXPL@
+HAVE_EXPM1 = @HAVE_EXPM1@
+HAVE_EXPM1F = @HAVE_EXPM1F@
+HAVE_FABSF = @HAVE_FABSF@
+HAVE_FABSL = @HAVE_FABSL@
HAVE_FACCESSAT = @HAVE_FACCESSAT@
HAVE_FCHDIR = @HAVE_FCHDIR@
HAVE_FCHMODAT = @HAVE_FCHMODAT@
HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FDATASYNC = @HAVE_FDATASYNC@
+HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
HAVE_FEATURES_H = @HAVE_FEATURES_H@
+HAVE_FFSL = @HAVE_FFSL@
+HAVE_FFSLL = @HAVE_FFSLL@
+HAVE_FMA = @HAVE_FMA@
+HAVE_FMAF = @HAVE_FMAF@
+HAVE_FMAL = @HAVE_FMAL@
+HAVE_FMODF = @HAVE_FMODF@
+HAVE_FMODL = @HAVE_FMODL@
+HAVE_FREXPF = @HAVE_FREXPF@
HAVE_FSEEKO = @HAVE_FSEEKO@
HAVE_FSTATAT = @HAVE_FSTATAT@
HAVE_FSYNC = @HAVE_FSYNC@
@@ -601,6 +866,12 @@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
HAVE_GRANTPT = @HAVE_GRANTPT@
+HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
+HAVE_HYPOTF = @HAVE_HYPOTF@
+HAVE_HYPOTL = @HAVE_HYPOTL@
+HAVE_ILOGB = @HAVE_ILOGB@
+HAVE_ILOGBF = @HAVE_ILOGBF@
+HAVE_ILOGBL = @HAVE_ILOGBL@
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
HAVE_ISNAND = @HAVE_ISNAND@
HAVE_ISNANF = @HAVE_ISNANF@
@@ -614,9 +885,18 @@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@
HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@
HAVE_LCHMOD = @HAVE_LCHMOD@
HAVE_LCHOWN = @HAVE_LCHOWN@
+HAVE_LDEXPF = @HAVE_LDEXPF@
HAVE_LIBSIGSEGV = @HAVE_LIBSIGSEGV@
HAVE_LINK = @HAVE_LINK@
HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LOG10F = @HAVE_LOG10F@
+HAVE_LOG10L = @HAVE_LOG10L@
+HAVE_LOG1P = @HAVE_LOG1P@
+HAVE_LOG1PF = @HAVE_LOG1PF@
+HAVE_LOG1PL = @HAVE_LOG1PL@
+HAVE_LOGBF = @HAVE_LOGBF@
+HAVE_LOGBL = @HAVE_LOGBL@
+HAVE_LOGF = @HAVE_LOGF@
HAVE_LOGL = @HAVE_LOGL@
HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
HAVE_LSTAT = @HAVE_LSTAT@
@@ -638,38 +918,64 @@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
HAVE_MKSTEMP = @HAVE_MKSTEMP@
HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
+HAVE_MODFF = @HAVE_MODFF@
+HAVE_MODFL = @HAVE_MODFL@
+HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OPENDIR = @HAVE_OPENDIR@
HAVE_OS_H = @HAVE_OS_H@
+HAVE_PCLOSE = @HAVE_PCLOSE@
HAVE_PIPE = @HAVE_PIPE@
HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_POPEN = @HAVE_POPEN@
+HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
HAVE_POSIX_SPAWN = @HAVE_POSIX_SPAWN@
HAVE_POSIX_SPAWNATTR_T = @HAVE_POSIX_SPAWNATTR_T@
HAVE_POSIX_SPAWN_FILE_ACTIONS_T = @HAVE_POSIX_SPAWN_FILE_ACTIONS_T@
+HAVE_POWF = @HAVE_POWF@
HAVE_PREAD = @HAVE_PREAD@
+HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@
HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RAISE = @HAVE_RAISE@
+HAVE_RANDOM = @HAVE_RANDOM@
HAVE_RANDOM_H = @HAVE_RANDOM_H@
HAVE_RANDOM_R = @HAVE_RANDOM_R@
HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READDIR = @HAVE_READDIR@
HAVE_READLINK = @HAVE_READLINK@
HAVE_READLINKAT = @HAVE_READLINKAT@
HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_REMAINDER = @HAVE_REMAINDER@
+HAVE_REMAINDERF = @HAVE_REMAINDERF@
HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_REWINDDIR = @HAVE_REWINDDIR@
+HAVE_RINT = @HAVE_RINT@
+HAVE_RINTL = @HAVE_RINTL@
HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@
+HAVE_SCANDIR = @HAVE_SCANDIR@
HAVE_SCHED_H = @HAVE_SCHED_H@
+HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
HAVE_SETENV = @HAVE_SETENV@
+HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
HAVE_SIGACTION = @HAVE_SIGACTION@
+HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@
HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
HAVE_SIGSET_T = @HAVE_SIGSET_T@
+HAVE_SINF = @HAVE_SINF@
+HAVE_SINHF = @HAVE_SINHF@
HAVE_SINL = @HAVE_SINL@
HAVE_SLEEP = @HAVE_SLEEP@
HAVE_SPAWN_H = @HAVE_SPAWN_H@
+HAVE_SQRTF = @HAVE_SQRTF@
HAVE_SQRTL = @HAVE_SQRTL@
HAVE_STDINT_H = @HAVE_STDINT_H@
HAVE_STPCPY = @HAVE_STPCPY@
@@ -695,6 +1001,8 @@ 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_TANF = @HAVE_TANF@
+HAVE_TANHF = @HAVE_TANHF@
HAVE_TANL = @HAVE_TANL@
HAVE_TIMEGM = @HAVE_TIMEGM@
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
@@ -737,6 +1045,7 @@ HAVE_WCSXFRM = @HAVE_WCSXFRM@
HAVE_WCTRANS_T = @HAVE_WCTRANS_T@
HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
HAVE_WCTYPE_T = @HAVE_WCTYPE_T@
+HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
HAVE_WINT_T = @HAVE_WINT_T@
HAVE_WMEMCHR = @HAVE_WMEMCHR@
HAVE_WMEMCMP = @HAVE_WMEMCMP@
@@ -753,6 +1062,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@
+INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@
LIBCSTACK = @LIBCSTACK@
@@ -788,10 +1099,12 @@ M4tests_LTLIBOBJS = @M4tests_LTLIBOBJS@
M4tests_WITNESS = @M4tests_WITNESS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
+NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@
NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
@@ -806,15 +1119,18 @@ 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_DIRENT_H = @NEXT_DIRENT_H@
NEXT_ERRNO_H = @NEXT_ERRNO_H@
NEXT_FCNTL_H = @NEXT_FCNTL_H@
NEXT_FLOAT_H = @NEXT_FLOAT_H@
NEXT_GETOPT_H = @NEXT_GETOPT_H@
+NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
NEXT_LOCALE_H = @NEXT_LOCALE_H@
NEXT_MATH_H = @NEXT_MATH_H@
@@ -829,6 +1145,7 @@ 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@
@@ -845,33 +1162,53 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
+PRIPTR_PREFIX = @PRIPTR_PREFIX@
+PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
REPLACE_BTOWC = @REPLACE_BTOWC@
REPLACE_CALLOC = @REPLACE_CALLOC@
REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+REPLACE_CBRTF = @REPLACE_CBRTF@
+REPLACE_CBRTL = @REPLACE_CBRTL@
REPLACE_CEIL = @REPLACE_CEIL@
REPLACE_CEILF = @REPLACE_CEILF@
REPLACE_CEILL = @REPLACE_CEILL@
REPLACE_CHOWN = @REPLACE_CHOWN@
REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@
+REPLACE_DIRFD = @REPLACE_DIRFD@
REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUP2 = @REPLACE_DUP2@
REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_EXP2 = @REPLACE_EXP2@
+REPLACE_EXP2L = @REPLACE_EXP2L@
+REPLACE_EXPM1 = @REPLACE_EXPM1@
+REPLACE_EXPM1F = @REPLACE_EXPM1F@
+REPLACE_FABSL = @REPLACE_FABSL@
REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
REPLACE_FCLOSE = @REPLACE_FCLOSE@
REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDOPEN = @REPLACE_FDOPEN@
+REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
REPLACE_FFLUSH = @REPLACE_FFLUSH@
REPLACE_FLOOR = @REPLACE_FLOOR@
REPLACE_FLOORF = @REPLACE_FLOORF@
REPLACE_FLOORL = @REPLACE_FLOORL@
+REPLACE_FMA = @REPLACE_FMA@
+REPLACE_FMAF = @REPLACE_FMAF@
+REPLACE_FMAL = @REPLACE_FMAL@
+REPLACE_FMOD = @REPLACE_FMOD@
+REPLACE_FMODF = @REPLACE_FMODF@
+REPLACE_FMODL = @REPLACE_FMODL@
REPLACE_FOPEN = @REPLACE_FOPEN@
REPLACE_FPRINTF = @REPLACE_FPRINTF@
REPLACE_FPURGE = @REPLACE_FPURGE@
REPLACE_FREOPEN = @REPLACE_FREOPEN@
REPLACE_FREXP = @REPLACE_FREXP@
+REPLACE_FREXPF = @REPLACE_FREXPF@
REPLACE_FREXPL = @REPLACE_FREXPL@
REPLACE_FSEEK = @REPLACE_FSEEK@
REPLACE_FSEEKO = @REPLACE_FSEEKO@
@@ -879,6 +1216,7 @@ REPLACE_FSTAT = @REPLACE_FSTAT@
REPLACE_FSTATAT = @REPLACE_FSTATAT@
REPLACE_FTELL = @REPLACE_FTELL@
REPLACE_FTELLO = @REPLACE_FTELLO@
+REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
REPLACE_FUTIMENS = @REPLACE_FUTIMENS@
REPLACE_GETCWD = @REPLACE_GETCWD@
REPLACE_GETDELIM = @REPLACE_GETDELIM@
@@ -889,16 +1227,39 @@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
+REPLACE_HYPOT = @REPLACE_HYPOT@
+REPLACE_HYPOTF = @REPLACE_HYPOTF@
+REPLACE_HYPOTL = @REPLACE_HYPOTL@
+REPLACE_ILOGB = @REPLACE_ILOGB@
+REPLACE_ILOGBF = @REPLACE_ILOGBF@
+REPLACE_ISATTY = @REPLACE_ISATTY@
REPLACE_ISFINITE = @REPLACE_ISFINITE@
REPLACE_ISINF = @REPLACE_ISINF@
REPLACE_ISNAN = @REPLACE_ISNAN@
REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_ITOLD = @REPLACE_ITOLD@
REPLACE_LCHOWN = @REPLACE_LCHOWN@
REPLACE_LDEXPL = @REPLACE_LDEXPL@
REPLACE_LINK = @REPLACE_LINK@
REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LOG = @REPLACE_LOG@
+REPLACE_LOG10 = @REPLACE_LOG10@
+REPLACE_LOG10F = @REPLACE_LOG10F@
+REPLACE_LOG10L = @REPLACE_LOG10L@
+REPLACE_LOG1P = @REPLACE_LOG1P@
+REPLACE_LOG1PF = @REPLACE_LOG1PF@
+REPLACE_LOG1PL = @REPLACE_LOG1PL@
+REPLACE_LOG2 = @REPLACE_LOG2@
+REPLACE_LOG2F = @REPLACE_LOG2F@
+REPLACE_LOG2L = @REPLACE_LOG2L@
+REPLACE_LOGB = @REPLACE_LOGB@
+REPLACE_LOGBF = @REPLACE_LOGBF@
+REPLACE_LOGBL = @REPLACE_LOGBL@
+REPLACE_LOGF = @REPLACE_LOGF@
+REPLACE_LOGL = @REPLACE_LOGL@
REPLACE_LSEEK = @REPLACE_LSEEK@
REPLACE_LSTAT = @REPLACE_LSTAT@
REPLACE_MALLOC = @REPLACE_MALLOC@
@@ -916,6 +1277,9 @@ REPLACE_MKFIFO = @REPLACE_MKFIFO@
REPLACE_MKNOD = @REPLACE_MKNOD@
REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_MODF = @REPLACE_MODF@
+REPLACE_MODFF = @REPLACE_MODFF@
+REPLACE_MODFL = @REPLACE_MODFL@
REPLACE_NAN = @REPLACE_NAN@
REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
@@ -923,16 +1287,29 @@ REPLACE_NULL = @REPLACE_NULL@
REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
REPLACE_OPEN = @REPLACE_OPEN@
REPLACE_OPENAT = @REPLACE_OPENAT@
+REPLACE_OPENDIR = @REPLACE_OPENDIR@
REPLACE_PERROR = @REPLACE_PERROR@
REPLACE_POPEN = @REPLACE_POPEN@
REPLACE_POSIX_SPAWN = @REPLACE_POSIX_SPAWN@
+REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@
+REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@
+REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
REPLACE_PREAD = @REPLACE_PREAD@
REPLACE_PRINTF = @REPLACE_PRINTF@
+REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@
+REPLACE_PTSNAME = @REPLACE_PTSNAME@
+REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
REPLACE_PUTENV = @REPLACE_PUTENV@
REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_RAISE = @REPLACE_RAISE@
+REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
+REPLACE_READ = @REPLACE_READ@
REPLACE_READLINK = @REPLACE_READLINK@
REPLACE_REALLOC = @REPLACE_REALLOC@
REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMAINDER = @REPLACE_REMAINDER@
+REPLACE_REMAINDERF = @REPLACE_REMAINDERF@
+REPLACE_REMAINDERL = @REPLACE_REMAINDERL@
REPLACE_REMOVE = @REPLACE_REMOVE@
REPLACE_RENAME = @REPLACE_RENAME@
REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
@@ -947,10 +1324,13 @@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
REPLACE_SLEEP = @REPLACE_SLEEP@
REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_SQRTL = @REPLACE_SQRTL@
REPLACE_STAT = @REPLACE_STAT@
+REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
REPLACE_STPNCPY = @REPLACE_STPNCPY@
REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
REPLACE_STRDUP = @REPLACE_STRDUP@
REPLACE_STRERROR = @REPLACE_STRERROR@
REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
@@ -960,10 +1340,14 @@ REPLACE_STRNLEN = @REPLACE_STRNLEN@
REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
REPLACE_STRSTR = @REPLACE_STRSTR@
REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
+REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
REPLACE_SYMLINK = @REPLACE_SYMLINK@
REPLACE_TIMEGM = @REPLACE_TIMEGM@
REPLACE_TMPFILE = @REPLACE_TMPFILE@
+REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
REPLACE_TRUNC = @REPLACE_TRUNC@
REPLACE_TRUNCF = @REPLACE_TRUNCF@
REPLACE_TRUNCL = @REPLACE_TRUNCL@
@@ -999,6 +1383,8 @@ STDINT_H = @STDINT_H@
STRIP = @STRIP@
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
+UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
@@ -1006,6 +1392,8 @@ VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
WERROR_CFLAGS = @WERROR_CFLAGS@
+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@
abs_aux_dir = @abs_aux_dir@
abs_builddir = @abs_builddir@
@@ -1070,127 +1458,145 @@ top_srcdir = @top_srcdir@
# statements but through direct file reference. Therefore this snippet must be
# present in all Makefile.am that need it. This is ensured by the applicability
# 'all' defined above.
-BUILT_SOURCES = $(ALLOCA_H) arg-nonnull.h c++defs.h configmake.h \
- $(ERRNO_H) fcntl.h $(FLOAT_H) $(GETOPT_H) langinfo.h math.h \
- $(SCHED_H) signal.h spawn.h $(STDARG_H) $(STDBOOL_H) \
- $(STDDEF_H) $(STDINT_H) stdio.h stdlib.h string.h sys/stat.h \
- sys/time.h sys/wait.h time.h unistd.h warn-on-use.h wchar.h \
- wctype.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.
+BUILT_SOURCES = $(ALLOCA_H) configmake.h $(ERRNO_H) fcntl.h $(FLOAT_H) \
+ $(GETOPT_H) langinfo.h locale.h math.h $(SCHED_H) signal.h \
+ arg-nonnull.h c++defs.h unused-parameter.h warn-on-use.h \
+ spawn.h $(STDARG_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
CLEANFILES = configmake.h configmake.h-t charset.alias ref-add.sed \
ref-del.sed
-EXTRA_DIST = alloca.in.h $(top_srcdir)/build-aux/announce-gen \
- $(top_srcdir)/build-aux/arg-nonnull.h btowc.c \
- $(top_srcdir)/build-aux/c++defs.h canonicalize-lgpl.c \
- cloexec.c cloexec.h close.c close-hook.h close-stream.c \
- close-stream.h closein.c closein.h closeout.c closeout.h \
- basename.c dirname.c stripslash.c basename-lgpl.c \
- dirname-lgpl.c dirname.h stripslash.c dosname.h dup2.c \
- errno.in.h error.c error.h exitfail.h fclose.c fcntl.c \
- fcntl.in.h fflush.c stdio-impl.h filenamecat.c \
- filenamecat-lgpl.c filenamecat.h float.in.h fopen.c \
- fopen-safer.c stdio--.h stdio-safer.h fpending.c fpending.h \
- fpucw.h fpurge.c stdio-impl.h freadahead.h stdio-impl.h \
- freading.h stdio-impl.h frexp.c frexp.c frexpl.c fseeko.c \
- stdio-impl.h ftello.c stdio-impl.h \
+EXTRA_DIST = alloca.in.h $(top_srcdir)/build-aux/announce-gen btowc.c \
+ c-strcaseeq.h canonicalize-lgpl.c cloexec.h close.c \
+ close-stream.h closein.h closeout.h stripslash.c dirname.h \
+ dosname.h dup2.c errno.in.h error.c error.h exitfail.h \
+ fclose.c fcntl.c fcntl.in.h fd-hook.h fflush.c stdio-impl.h \
+ filenamecat.h float.c float.in.h itold.c fopen.c stdio--.h \
+ stdio-safer.h fpending.c fpending.h fpucw.h fpurge.c \
+ stdio-impl.h freadahead.c freadahead.h stdio-impl.h freading.h \
+ stdio-impl.h frexp.c frexp.c frexpl.c fseek.c fseeko.c \
+ stdio-impl.h fstat.c ftell.c ftello.c stdio-impl.h \
$(top_srcdir)/build-aux/gendocs.sh getdtablesize.c getopt.c \
getopt.in.h getopt1.c getopt_int.h gettimeofday.c \
$(top_srcdir)/build-aux/git-version-gen \
$(top_srcdir)/build-aux/gnu-web-doc-update \
$(top_srcdir)/GNUmakefile $(top_srcdir)/build-aux/gnupload \
- $(top_srcdir)/build-aux/config.rpath intprops.h float+.h \
- isnan.c isnand-nolibm.h isnand.c float+.h isnan.c \
+ $(top_srcdir)/build-aux/config.rpath ignore-value.h intprops.h \
+ float+.h isnan.c isnand-nolibm.h isnand.c float+.h isnan.c \
isnanf-nolibm.h isnanf.c float+.h isnan.c isnanl-nolibm.h \
isnanl.c langinfo.in.h config.charset ref-add.sin ref-del.sin \
- lseek.c lstat.c $(top_srcdir)/maint.mk malloc.c malloc.c \
- malloca.h malloca.valgrind math.in.h mbrtowc.c mbsinit.c \
- mbtowc-impl.h mbtowc.c memchr.c memchr.valgrind \
- memchr2.valgrind mkdtemp.c mkstemp.c nl_langinfo.c obstack.c \
- obstack.h open.c pathmax.h spawn_int.h spawni.c \
- spawn_faction_addclose.c spawn_int.h spawn_faction_adddup2.c \
- spawn_int.h spawn_faction_addopen.c spawn_int.h \
- spawn_faction_destroy.c spawn_faction_init.c spawn_int.h \
- spawnattr_destroy.c spawnattr_init.c spawnattr_setflags.c \
- spawnattr_setsigmask.c spawnp.c printf-frexp.h printf-frexp.c \
- printf-frexpl.h quotearg.c quotearg.h rawmemchr.c \
- rawmemchr.valgrind readlink.c regcomp.c regex.c regex.h \
- regex_internal.c regex_internal.h regexec.c rename.c rmdir.c \
- same-inode.h sched.in.h sig-handler.h sigaction.c signal.in.h \
- float+.h signbitd.c signbitf.c signbitl.c sigprocmask.c \
- snprintf.c spawn.in.h stat.c stdarg.in.h stdbool.in.h \
- stddef.in.h stdint.in.h stdio.in.h stdlib.in.h mkstemp-safer.c \
- stdlib--.h stdlib-safer.h strchrnul.c strchrnul.valgrind \
- streq.h strerror.c string.in.h strndup.c strnlen.c siglist.h \
- strsignal.c str-two-way.h strstr.c strtod.c strtol.c \
- sys_stat.in.h sys_time.in.h sys_wait.in.h tempname.c \
- tempname.h $(top_srcdir)/build-aux/config.rpath time.in.h \
- unistd.in.h dup-safer.c fd-safer.c pipe-safer.c unistd--.h \
- unistd-safer.h unlocked-io.h \
+ locale.in.h localeconv.c lseek.c lstat.c \
+ $(top_srcdir)/maint.mk malloc.c malloc.c malloca.h \
+ malloca.valgrind math.in.h mbrtowc.c mbsinit.c mbtowc-impl.h \
+ mbtowc.c memchr.c memchr.valgrind memchr2.valgrind mkdtemp.c \
+ mkstemp.c msvc-inval.c msvc-inval.h msvc-nothrow.c \
+ msvc-nothrow.h nl_langinfo.c obstack.c obstack.h open.c \
+ pathmax.h spawn_int.h spawni.c spawn_faction_addclose.c \
+ spawn_int.h spawn_faction_adddup2.c spawn_int.h \
+ spawn_faction_addopen.c spawn_int.h spawn_faction_destroy.c \
+ spawn_faction_init.c spawn_int.h spawnattr_destroy.c \
+ spawnattr_init.c spawnattr_setflags.c spawnattr_setsigmask.c \
+ spawnp.c printf-frexp.h printf-frexp.c printf-frexpl.h quote.h \
+ quotearg.h raise.c rawmemchr.c rawmemchr.valgrind readlink.c \
+ regcomp.c regex.c regex.h regex_internal.c regex_internal.h \
+ regexec.c rename.c rmdir.c same-inode.h sched.in.h \
+ secure_getenv.c sig-handler.h sigaction.c signal.in.h float+.h \
+ signbitd.c signbitf.c signbitl.c stdio-write.c sigprocmask.c \
+ $(top_srcdir)/build-aux/snippet/_Noreturn.h \
+ $(top_srcdir)/build-aux/snippet/arg-nonnull.h \
+ $(top_srcdir)/build-aux/snippet/c++defs.h \
+ $(top_srcdir)/build-aux/snippet/unused-parameter.h \
+ $(top_srcdir)/build-aux/snippet/warn-on-use.h snprintf.c \
+ spawn.in.h stat.c stdarg.in.h stdbool.in.h stddef.in.h \
+ stdint.in.h stdio.in.h stdlib.in.h stdlib--.h stdlib-safer.h \
+ strchrnul.c strchrnul.valgrind streq.h strerror.c \
+ strerror-override.c strerror-override.h string.in.h strndup.c \
+ strnlen.c siglist.h strsignal.c str-two-way.h strstr.c \
+ strtod.c sys_stat.in.h sys_time.in.h sys_types.in.h \
+ sys_wait.in.h tempname.h $(top_srcdir)/build-aux/config.rpath \
+ time.in.h unistd.in.h unistd--.h unistd-safer.h unlocked-io.h \
$(top_srcdir)/build-aux/update-copyright \
$(top_srcdir)/build-aux/useless-if-before-free asnprintf.c \
float+.h printf-args.c printf-args.h printf-parse.c \
printf-parse.h vasnprintf.c vasnprintf.h asprintf.c \
- vasprintf.c $(top_srcdir)/build-aux/vc-list-files waitpid.c \
- $(top_srcdir)/build-aux/warn-on-use.h wchar.in.h wcrtomb.c \
- wctype.in.h xalloc.h xmalloc.c xmalloca.h xalloc.h
+ vasprintf.c $(top_srcdir)/build-aux/vc-list-files verify.h \
+ waitpid.c wchar.in.h wcrtomb.c wctype.in.h xalloc.h \
+ xalloc-oversized.h xmalloca.h xalloc.h
MOSTLYCLEANDIRS = sys sys
-MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t arg-nonnull.h \
- arg-nonnull.h-t c++defs.h c++defs.h-t errno.h errno.h-t \
- fcntl.h fcntl.h-t float.h float.h-t getopt.h getopt.h-t \
- langinfo.h langinfo.h-t math.h math.h-t sched.h sched.h-t \
- signal.h signal.h-t spawn.h spawn.h-t stdarg.h stdarg.h-t \
- stdbool.h stdbool.h-t stddef.h stddef.h-t stdint.h stdint.h-t \
- stdio.h stdio.h-t stdlib.h stdlib.h-t string.h string.h-t \
- sys/stat.h sys/stat.h-t sys/time.h sys/time.h-t sys/wait.h \
- sys/wait.h-t time.h time.h-t unistd.h unistd.h-t warn-on-use.h \
- warn-on-use.h-t wchar.h wchar.h-t wctype.h wctype.h-t
+MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t errno.h \
+ errno.h-t fcntl.h fcntl.h-t float.h float.h-t getopt.h \
+ getopt.h-t langinfo.h langinfo.h-t locale.h locale.h-t math.h \
+ math.h-t sched.h sched.h-t signal.h signal.h-t arg-nonnull.h \
+ arg-nonnull.h-t c++defs.h c++defs.h-t unused-parameter.h \
+ unused-parameter.h-t warn-on-use.h warn-on-use.h-t spawn.h \
+ spawn.h-t stdarg.h stdarg.h-t stdbool.h stdbool.h-t stddef.h \
+ stddef.h-t stdint.h stdint.h-t stdio.h stdio.h-t stdlib.h \
+ stdlib.h-t string.h string.h-t 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
SUFFIXES = .sed .sin
noinst_LIBRARIES = libm4.a
libm4_a_SOURCES = gl_avltree_oset.h gl_avltree_oset.c \
- gl_anytree_oset.h binary-io.h c-ctype.h c-ctype.c c-stack.h \
- c-stack.c clean-temp.h clean-temp.c close-hook.c execute.h \
- execute.c w32spawn.h exitfail.c fatal-signal.h fatal-signal.c \
- fd-safer-flag.c dup-safer-flag.c freadahead.c freading.c \
- gettext.h ignore-value.h gl_linkedhash_list.h \
+ gl_anytree_oset.h binary-io.h binary-io.c c-ctype.h c-ctype.c \
+ c-stack.h c-stack.c c-strcase.h c-strcasecmp.c c-strncasecmp.c \
+ clean-temp.h clean-temp.c cloexec.c close-stream.c closein.c \
+ closeout.c dirname.c basename.c dirname-lgpl.c basename-lgpl.c \
+ stripslash.c execute.h execute.c w32spawn.h exitfail.c \
+ fatal-signal.h fatal-signal.c fd-hook.c fd-safer-flag.c \
+ dup-safer-flag.c filenamecat.c filenamecat-lgpl.c \
+ fopen-safer.c freading.c gettext.h gl_linkedhash_list.h \
gl_linkedhash_list.c gl_anyhash_list1.h gl_anyhash_list2.h \
gl_anylinked_list1.h gl_anylinked_list2.h gl_list.h gl_list.c \
localcharset.h localcharset.c glthread/lock.h glthread/lock.c \
- malloca.c memchr2.h memchr2.c gl_oset.h gl_oset.c pipe2.c \
- pipe2-safer.c printf-frexp.c printf-frexpl.c progname.h \
- progname.c size_max.h spawn-pipe.h spawn-pipe.c w32spawn.h \
- glthread/threadlib.c glthread/tls.h glthread/tls.c tmpdir.h \
- tmpdir.c verify.h verror.h verror.c version-etc.h \
- version-etc.c version-etc-fsf.c wait-process.h wait-process.c \
- xalloc-die.c gl_xlist.h gl_xlist.c xmalloca.c gl_xoset.h \
- gl_xoset.c xprintf.h xprintf.c xsize.h xstrndup.h xstrndup.c \
- xvasprintf.h xvasprintf.c xasprintf.c
+ malloca.c math.c memchr2.h memchr2.c gl_oset.h gl_oset.c \
+ pipe2.c pipe2-safer.c printf-frexp.c printf-frexpl.c \
+ progname.h progname.c quotearg.c sig-handler.c size_max.h \
+ spawn-pipe.h spawn-pipe.c w32spawn.h mkstemp-safer.c \
+ tempname.c glthread/threadlib.c glthread/tls.h glthread/tls.c \
+ tmpdir.h tmpdir.c unistd.c dup-safer.c fd-safer.c pipe-safer.c \
+ verror.h verror.c version-etc.h version-etc.c \
+ version-etc-fsf.c wait-process.h wait-process.c wctype-h.c \
+ xmalloc.c xalloc-die.c gl_xlist.h gl_xlist.c xmalloca.c \
+ gl_xoset.h gl_xoset.c xprintf.h xprintf.c xsize.h xsize.c \
+ xstrndup.h xstrndup.c xvasprintf.h xvasprintf.c xasprintf.c
libm4_a_LIBADD = $(M4_LIBOBJS)
libm4_a_DEPENDENCIES = $(M4_LIBOBJS)
-EXTRA_libm4_a_SOURCES = btowc.c canonicalize-lgpl.c cloexec.c close.c \
- close-stream.c closein.c closeout.c basename.c dirname.c \
- stripslash.c basename-lgpl.c dirname-lgpl.c stripslash.c \
- dup2.c error.c fclose.c fcntl.c fflush.c filenamecat.c \
- filenamecat-lgpl.c fopen.c fopen-safer.c fpending.c fpurge.c \
- frexp.c frexp.c frexpl.c fseeko.c ftello.c getdtablesize.c \
- getopt.c getopt1.c gettimeofday.c isnan.c isnand.c isnan.c \
- isnanf.c isnan.c isnanl.c lseek.c lstat.c malloc.c malloc.c \
- mbrtowc.c mbsinit.c mbtowc.c memchr.c mkdtemp.c mkstemp.c \
+EXTRA_libm4_a_SOURCES = btowc.c canonicalize-lgpl.c close.c \
+ stripslash.c dup2.c error.c fclose.c fcntl.c fflush.c float.c \
+ itold.c fopen.c fpending.c fpurge.c freadahead.c frexp.c \
+ frexp.c frexpl.c fseek.c fseeko.c fstat.c ftell.c ftello.c \
+ getdtablesize.c getopt.c getopt1.c gettimeofday.c isnan.c \
+ isnand.c isnan.c isnanf.c isnan.c isnanl.c localeconv.c \
+ lseek.c lstat.c malloc.c malloc.c mbrtowc.c mbsinit.c mbtowc.c \
+ memchr.c mkdtemp.c mkstemp.c msvc-inval.c msvc-nothrow.c \
nl_langinfo.c obstack.c open.c spawni.c \
spawn_faction_addclose.c spawn_faction_adddup2.c \
spawn_faction_addopen.c spawn_faction_destroy.c \
spawn_faction_init.c spawnattr_destroy.c spawnattr_init.c \
spawnattr_setflags.c spawnattr_setsigmask.c spawnp.c \
- printf-frexp.c quotearg.c rawmemchr.c readlink.c regcomp.c \
+ printf-frexp.c raise.c rawmemchr.c readlink.c regcomp.c \
regex.c regex_internal.c regexec.c rename.c rmdir.c \
- sigaction.c signbitd.c signbitf.c signbitl.c sigprocmask.c \
- snprintf.c stat.c mkstemp-safer.c strchrnul.c strerror.c \
- strndup.c strnlen.c strsignal.c strstr.c strtod.c strtol.c \
- tempname.c dup-safer.c fd-safer.c pipe-safer.c asnprintf.c \
- printf-args.c printf-parse.c vasnprintf.c asprintf.c \
- vasprintf.c waitpid.c wcrtomb.c xmalloc.c
-ARG_NONNULL_H = arg-nonnull.h
-CXXDEFS_H = c++defs.h
+ secure_getenv.c sigaction.c signbitd.c signbitf.c signbitl.c \
+ stdio-write.c sigprocmask.c snprintf.c stat.c strchrnul.c \
+ strerror.c strerror-override.c strndup.c strnlen.c strsignal.c \
+ strstr.c strtod.c asnprintf.c printf-args.c printf-parse.c \
+ vasnprintf.c asprintf.c vasprintf.c waitpid.c wcrtomb.c
charset_alias = $(DESTDIR)$(libdir)/charset.alias
charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
+
+# Because this Makefile snippet defines a variable used by other
+# gnulib Makefile snippets, it must be present in all Makefile.am that
+# need it. This is ensured by the applicability 'all' defined above.
+_NORETURN_H = $(top_srcdir)/build-aux/snippet/_Noreturn.h
+ARG_NONNULL_H = arg-nonnull.h
+CXXDEFS_H = c++defs.h
+UNUSED_PARAMETER_H = unused-parameter.h
WARN_ON_USE_H = warn-on-use.h
all: $(BUILT_SOURCES) config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
@@ -1218,6 +1624,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
+$(srcdir)/gnulib.mk:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -1229,10 +1636,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
config.h: stamp-h1
- @if test ! -f $@; then \
- rm -f stamp-h1; \
- $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
- else :; fi
+ @test -f $@ || rm -f stamp-h1
+ @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
stamp-h1: $(srcdir)/config.hin $(top_builddir)/config.status
@rm -f stamp-h1
@@ -1247,13 +1652,27 @@ distclean-hdr:
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-libm4.a: $(libm4_a_OBJECTS) $(libm4_a_DEPENDENCIES)
+glthread/$(am__dirstamp):
+ @$(MKDIR_P) glthread
+ @: > glthread/$(am__dirstamp)
+glthread/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) glthread/$(DEPDIR)
+ @: > glthread/$(DEPDIR)/$(am__dirstamp)
+glthread/lock.$(OBJEXT): glthread/$(am__dirstamp) \
+ glthread/$(DEPDIR)/$(am__dirstamp)
+glthread/threadlib.$(OBJEXT): glthread/$(am__dirstamp) \
+ glthread/$(DEPDIR)/$(am__dirstamp)
+glthread/tls.$(OBJEXT): glthread/$(am__dirstamp) \
+ glthread/$(DEPDIR)/$(am__dirstamp)
+
+libm4.a: $(libm4_a_OBJECTS) $(libm4_a_DEPENDENCIES) $(EXTRA_libm4_a_DEPENDENCIES)
$(AM_V_at)-rm -f libm4.a
$(AM_V_AR)$(libm4_a_AR) libm4.a $(libm4_a_OBJECTS) $(libm4_a_LIBADD)
$(AM_V_at)$(RANLIB) libm4.a
mostlyclean-compile:
-rm -f *.$(OBJEXT)
+ -rm -f glthread/*.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@@ -1262,13 +1681,15 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asprintf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename-lgpl.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/binary-io.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btowc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-ctype.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-stack.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)/canonicalize-lgpl.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clean-temp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cloexec.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close-hook.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close-stream.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/closein.Po@am__quote@
@@ -1284,11 +1705,13 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fatal-signal.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fclose.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcntl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-hook.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-safer-flag.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-safer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fflush.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filenamecat-lgpl.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filenamecat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/float.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fopen-safer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fopen.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpending.Po@am__quote@
@@ -1297,7 +1720,10 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freading.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frexp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frexpl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fseek.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fseeko.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftell.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftello.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdtablesize.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@
@@ -1313,12 +1739,14 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnand.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnanf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnanl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/itold.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localcharset.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lock.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localeconv.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lseek.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloca.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/math.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbrtowc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsinit.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbtowc.Po@am__quote@
@@ -1327,6 +1755,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkdtemp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkstemp-safer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkstemp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvc-inval.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvc-nothrow.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl_langinfo.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/obstack.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open.Po@am__quote@
@@ -1339,6 +1769,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-parse.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/progname.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quotearg.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raise.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawmemchr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regcomp.Po@am__quote@
@@ -1347,6 +1778,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexec.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rename.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmdir.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/secure_getenv.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sig-handler.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigaction.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signbitd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signbitf.Po@am__quote@
@@ -1366,7 +1799,9 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spawni.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spawnp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdio-write.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strchrnul.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror-override.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stripslash.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strndup.Po@am__quote@
@@ -1374,11 +1809,9 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strsignal.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strstr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtod.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtol.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tempname.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/threadlib.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tls.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmpdir.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unistd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasnprintf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasprintf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/verror.Po@am__quote@
@@ -1387,98 +1820,44 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wait-process.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/waitpid.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcrtomb.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctype-h.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xalloc-die.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xasprintf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloca.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xprintf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xsize.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrndup.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xvasprintf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/lock.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/threadlib.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/tls.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
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@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@ $(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-lock.o: glthread/lock.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lock.o -MD -MP -MF $(DEPDIR)/lock.Tpo -c -o lock.o `test -f 'glthread/lock.c' || echo '$(srcdir)/'`glthread/lock.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lock.Tpo $(DEPDIR)/lock.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='glthread/lock.c' object='lock.o' libtool=no @AMDEPBACKSLASH@
+@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@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lock.o `test -f 'glthread/lock.c' || echo '$(srcdir)/'`glthread/lock.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-lock.obj: glthread/lock.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lock.obj -MD -MP -MF $(DEPDIR)/lock.Tpo -c -o lock.obj `if test -f 'glthread/lock.c'; then $(CYGPATH_W) 'glthread/lock.c'; else $(CYGPATH_W) '$(srcdir)/glthread/lock.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lock.Tpo $(DEPDIR)/lock.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='glthread/lock.c' object='lock.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lock.obj `if test -f 'glthread/lock.c'; then $(CYGPATH_W) 'glthread/lock.c'; else $(CYGPATH_W) '$(srcdir)/glthread/lock.c'; fi`
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
-threadlib.o: glthread/threadlib.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT threadlib.o -MD -MP -MF $(DEPDIR)/threadlib.Tpo -c -o threadlib.o `test -f 'glthread/threadlib.c' || echo '$(srcdir)/'`glthread/threadlib.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/threadlib.Tpo $(DEPDIR)/threadlib.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='glthread/threadlib.c' object='threadlib.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o threadlib.o `test -f 'glthread/threadlib.c' || echo '$(srcdir)/'`glthread/threadlib.c
-
-threadlib.obj: glthread/threadlib.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT threadlib.obj -MD -MP -MF $(DEPDIR)/threadlib.Tpo -c -o threadlib.obj `if test -f 'glthread/threadlib.c'; then $(CYGPATH_W) 'glthread/threadlib.c'; else $(CYGPATH_W) '$(srcdir)/glthread/threadlib.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/threadlib.Tpo $(DEPDIR)/threadlib.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='glthread/threadlib.c' object='threadlib.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o threadlib.obj `if test -f 'glthread/threadlib.c'; then $(CYGPATH_W) 'glthread/threadlib.c'; else $(CYGPATH_W) '$(srcdir)/glthread/threadlib.c'; fi`
-
-tls.o: glthread/tls.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tls.o -MD -MP -MF $(DEPDIR)/tls.Tpo -c -o tls.o `test -f 'glthread/tls.c' || echo '$(srcdir)/'`glthread/tls.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tls.Tpo $(DEPDIR)/tls.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='glthread/tls.c' object='tls.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tls.o `test -f 'glthread/tls.c' || echo '$(srcdir)/'`glthread/tls.c
-
-tls.obj: glthread/tls.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tls.obj -MD -MP -MF $(DEPDIR)/tls.Tpo -c -o tls.obj `if test -f 'glthread/tls.c'; then $(CYGPATH_W) 'glthread/tls.c'; else $(CYGPATH_W) '$(srcdir)/glthread/tls.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tls.Tpo $(DEPDIR)/tls.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='glthread/tls.c' object='tls.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tls.obj `if test -f 'glthread/tls.c'; then $(CYGPATH_W) 'glthread/tls.c'; else $(CYGPATH_W) '$(srcdir)/glthread/tls.c'; fi`
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS) config.hin $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@@ -1490,15 +1869,11 @@ TAGS: $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) \
$$unique; \
fi; \
fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) config.hin $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@@ -1507,6 +1882,21 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -1557,10 +1947,15 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
@@ -1570,6 +1965,8 @@ 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)
+ -rm -f glthread/$(DEPDIR)/$(am__dirstamp)
+ -rm -f glthread/$(am__dirstamp)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -1580,7 +1977,7 @@ clean: clean-am
clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
distclean: distclean-am
- -rm -rf ./$(DEPDIR)
+ -rm -rf ./$(DEPDIR) glthread/$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-hdr distclean-local distclean-tags
@@ -1626,7 +2023,7 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
+ -rm -rf ./$(DEPDIR) glthread/$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -1647,45 +2044,32 @@ uninstall-am: uninstall-local
.MAKE: all check install install-am install-strip
-.PHONY: CTAGS GTAGS all all-am all-local check check-am clean \
- clean-generic clean-noinstLIBRARIES ctags distclean \
- distclean-compile distclean-generic distclean-hdr \
- distclean-local distclean-tags distdir dvi dvi-am html html-am \
- info info-am install install-am install-data install-data-am \
- install-dvi install-dvi-am install-exec install-exec-am \
- install-exec-local install-html install-html-am install-info \
- install-info-am install-man install-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-local pdf pdf-am ps ps-am tags \
- uninstall uninstall-am uninstall-local
+.PHONY: CTAGS GTAGS TAGS all all-am all-local check check-am clean \
+ clean-generic clean-noinstLIBRARIES cscopelist-am ctags \
+ ctags-am distclean distclean-compile distclean-generic \
+ distclean-hdr distclean-local distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-exec-local install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-local pdf \
+ pdf-am ps ps-am tags tags-am uninstall uninstall-am \
+ uninstall-local
# We need the following in order to create <alloca.h> when the system
# doesn't have one that works with the given compiler.
-alloca.h: alloca.in.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- cat $(srcdir)/alloca.in.h; \
- } > $@-t && \
- mv -f $@-t $@
-# The arg-nonnull.h that gets inserted into generated .h files is the same as
-# build-aux/arg-nonnull.h, except that it has the copyright header cut off.
-arg-nonnull.h: $(top_srcdir)/build-aux/arg-nonnull.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/GL_ARG_NONNULL/,$$p' \
- < $(top_srcdir)/build-aux/arg-nonnull.h \
- > $@-t && \
- mv $@-t $@
-# The c++defs.h that gets inserted into generated .h files is the same as
-# build-aux/c++defs.h, except that it has the copyright header cut off.
-c++defs.h: $(top_srcdir)/build-aux/c++defs.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/_GL_CXXDEFS/,$$p' \
- < $(top_srcdir)/build-aux/c++defs.h \
- > $@-t && \
- mv $@-t $@
+@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 $@
# Listed in the same order as the GNU makefile conventions, and
# provided by autoconf 2.59c+.
@@ -1722,43 +2106,44 @@ configmake.h: Makefile
echo '#define PKGLIBDIR "$(pkglibdir)"'; \
echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
} | sed '/""/d' > $@-t && \
- if test -f $@ && cmp $@-t $@ > /dev/null; then \
- rm -f $@-t; \
- else \
- rm -f $@; mv $@-t $@; \
- fi
+ mv -f $@-t $@
# We need the following in order to create <errno.h> when the system
# doesn't have one that is POSIX compliant.
-errno.h: errno.in.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
- -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \
- -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \
- -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \
- -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \
- -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \
- -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \
- -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \
- < $(srcdir)/errno.in.h; \
- } > $@-t && \
- mv $@-t $@
+@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_M4|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 <fcntl.h> when the system
# doesn't have one that works with the given compiler.
-fcntl.h: fcntl.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \
- -e 's|@''GNULIB_FCNTL''@|$(GNULIB_FCNTL)|g' \
- -e 's|@''GNULIB_OPEN''@|$(GNULIB_OPEN)|g' \
- -e 's|@''GNULIB_OPENAT''@|$(GNULIB_OPENAT)|g' \
+ -e 's/@''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' \
@@ -1773,23 +2158,28 @@ fcntl.h: fcntl.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
# We need the following in order to create <float.h> when the system
# doesn't have one that works with the given compiler.
-float.h: float.in.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
- -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \
- < $(srcdir)/float.in.h; \
- } > $@-t && \
- mv $@-t $@
+@GL_GENERATE_FLOAT_H_TRUE@float.h: float.in.h $(top_builddir)/config.status
+@GL_GENERATE_FLOAT_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
+@GL_GENERATE_FLOAT_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+@GL_GENERATE_FLOAT_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL_M4|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 <getopt.h> when the system
# doesn't have one that works with the given compiler.
-getopt.h: getopt.in.h $(ARG_NONNULL_H)
+getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|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' \
@@ -1801,19 +2191,20 @@ getopt.h: getopt.in.h $(ARG_NONNULL_H)
distclean-local: clean-GNUmakefile
clean-GNUmakefile:
- test x'$(VPATH)' != x && rm -f $(top_builddir)/GNUmakefile || :
+ test '$(srcdir)' = . || rm -f $(top_builddir)/GNUmakefile
# We need the following in order to create an empty placeholder for
# <langinfo.h> when the system doesn't have one.
-langinfo.h: langinfo.in.h $(CXXDEFS_H) $(WARN_ON_USE_H)
+langinfo.h: langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \
- -e 's|@''GNULIB_NL_LANGINFO''@|$(GNULIB_NL_LANGINFO)|g' \
+ -e 's/@''GNULIB_NL_LANGINFO''@/$(GNULIB_NL_LANGINFO)/g' \
-e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \
-e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \
-e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \
@@ -1885,73 +2276,226 @@ charset.alias: config.charset
sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \
mv t-$@ $@
+# We need the following in order to create <locale.h> 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_M4|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \
+ -e 's/@''GNULIB_LOCALECONV''@/$(GNULIB_LOCALECONV)/g' \
+ -e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \
+ -e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \
+ -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \
+ -e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \
+ -e 's|@''REPLACE_LOCALECONV''@|$(REPLACE_LOCALECONV)|g' \
+ -e 's|@''REPLACE_SETLOCALE''@|$(REPLACE_SETLOCALE)|g' \
+ -e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \
+ -e 's|@''REPLACE_STRUCT_LCONV''@|$(REPLACE_STRUCT_LCONV)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/locale.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
# We need the following in order to create <math.h> when the system
# doesn't have one that works with the given compiler.
-math.h: math.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_AS_FIRST_DIRECTIVE_MATH_H''@|$(NEXT_AS_FIRST_DIRECTIVE_MATH_H)|g' \
- -e 's|@''GNULIB_ACOSL''@|$(GNULIB_ACOSL)|g' \
- -e 's|@''GNULIB_ASINL''@|$(GNULIB_ASINL)|g' \
- -e 's|@''GNULIB_ATANL''@|$(GNULIB_ATANL)|g' \
- -e 's|@''GNULIB_CEIL''@|$(GNULIB_CEIL)|g' \
- -e 's|@''GNULIB_CEILF''@|$(GNULIB_CEILF)|g' \
- -e 's|@''GNULIB_CEILL''@|$(GNULIB_CEILL)|g' \
- -e 's|@''GNULIB_COSL''@|$(GNULIB_COSL)|g' \
- -e 's|@''GNULIB_EXPL''@|$(GNULIB_EXPL)|g' \
- -e 's|@''GNULIB_FLOOR''@|$(GNULIB_FLOOR)|g' \
- -e 's|@''GNULIB_FLOORF''@|$(GNULIB_FLOORF)|g' \
- -e 's|@''GNULIB_FLOORL''@|$(GNULIB_FLOORL)|g' \
- -e 's|@''GNULIB_FREXP''@|$(GNULIB_FREXP)|g' \
- -e 's|@''GNULIB_FREXPL''@|$(GNULIB_FREXPL)|g' \
- -e 's|@''GNULIB_ISFINITE''@|$(GNULIB_ISFINITE)|g' \
- -e 's|@''GNULIB_ISINF''@|$(GNULIB_ISINF)|g' \
- -e 's|@''GNULIB_ISNAN''@|$(GNULIB_ISNAN)|g' \
- -e 's|@''GNULIB_ISNANF''@|$(GNULIB_ISNANF)|g' \
- -e 's|@''GNULIB_ISNAND''@|$(GNULIB_ISNAND)|g' \
- -e 's|@''GNULIB_ISNANL''@|$(GNULIB_ISNANL)|g' \
- -e 's|@''GNULIB_LDEXPL''@|$(GNULIB_LDEXPL)|g' \
- -e 's|@''GNULIB_LOGB''@|$(GNULIB_LOGB)|g' \
- -e 's|@''GNULIB_LOGL''@|$(GNULIB_LOGL)|g' \
- -e 's|@''GNULIB_ROUND''@|$(GNULIB_ROUND)|g' \
- -e 's|@''GNULIB_ROUNDF''@|$(GNULIB_ROUNDF)|g' \
- -e 's|@''GNULIB_ROUNDL''@|$(GNULIB_ROUNDL)|g' \
- -e 's|@''GNULIB_SIGNBIT''@|$(GNULIB_SIGNBIT)|g' \
- -e 's|@''GNULIB_SINL''@|$(GNULIB_SINL)|g' \
- -e 's|@''GNULIB_SQRTL''@|$(GNULIB_SQRTL)|g' \
- -e 's|@''GNULIB_TANL''@|$(GNULIB_TANL)|g' \
- -e 's|@''GNULIB_TRUNC''@|$(GNULIB_TRUNC)|g' \
- -e 's|@''GNULIB_TRUNCF''@|$(GNULIB_TRUNCF)|g' \
- -e 's|@''GNULIB_TRUNCL''@|$(GNULIB_TRUNCL)|g' \
+ -e 's/@''GNULIB_ACOSF''@/$(GNULIB_ACOSF)/g' \
+ -e 's/@''GNULIB_ACOSL''@/$(GNULIB_ACOSL)/g' \
+ -e 's/@''GNULIB_ASINF''@/$(GNULIB_ASINF)/g' \
+ -e 's/@''GNULIB_ASINL''@/$(GNULIB_ASINL)/g' \
+ -e 's/@''GNULIB_ATANF''@/$(GNULIB_ATANF)/g' \
+ -e 's/@''GNULIB_ATANL''@/$(GNULIB_ATANL)/g' \
+ -e 's/@''GNULIB_ATAN2F''@/$(GNULIB_ATAN2F)/g' \
+ -e 's/@''GNULIB_CBRT''@/$(GNULIB_CBRT)/g' \
+ -e 's/@''GNULIB_CBRTF''@/$(GNULIB_CBRTF)/g' \
+ -e 's/@''GNULIB_CBRTL''@/$(GNULIB_CBRTL)/g' \
+ -e 's/@''GNULIB_CEIL''@/$(GNULIB_CEIL)/g' \
+ -e 's/@''GNULIB_CEILF''@/$(GNULIB_CEILF)/g' \
+ -e 's/@''GNULIB_CEILL''@/$(GNULIB_CEILL)/g' \
+ -e 's/@''GNULIB_COPYSIGN''@/$(GNULIB_COPYSIGN)/g' \
+ -e 's/@''GNULIB_COPYSIGNF''@/$(GNULIB_COPYSIGNF)/g' \
+ -e 's/@''GNULIB_COPYSIGNL''@/$(GNULIB_COPYSIGNL)/g' \
+ -e 's/@''GNULIB_COSF''@/$(GNULIB_COSF)/g' \
+ -e 's/@''GNULIB_COSL''@/$(GNULIB_COSL)/g' \
+ -e 's/@''GNULIB_COSHF''@/$(GNULIB_COSHF)/g' \
+ -e 's/@''GNULIB_EXPF''@/$(GNULIB_EXPF)/g' \
+ -e 's/@''GNULIB_EXPL''@/$(GNULIB_EXPL)/g' \
+ -e 's/@''GNULIB_EXP2''@/$(GNULIB_EXP2)/g' \
+ -e 's/@''GNULIB_EXP2F''@/$(GNULIB_EXP2F)/g' \
+ -e 's/@''GNULIB_EXP2L''@/$(GNULIB_EXP2L)/g' \
+ -e 's/@''GNULIB_EXPM1''@/$(GNULIB_EXPM1)/g' \
+ -e 's/@''GNULIB_EXPM1F''@/$(GNULIB_EXPM1F)/g' \
+ -e 's/@''GNULIB_EXPM1L''@/$(GNULIB_EXPM1L)/g' \
+ -e 's/@''GNULIB_FABSF''@/$(GNULIB_FABSF)/g' \
+ -e 's/@''GNULIB_FABSL''@/$(GNULIB_FABSL)/g' \
+ -e 's/@''GNULIB_FLOOR''@/$(GNULIB_FLOOR)/g' \
+ -e 's/@''GNULIB_FLOORF''@/$(GNULIB_FLOORF)/g' \
+ -e 's/@''GNULIB_FLOORL''@/$(GNULIB_FLOORL)/g' \
+ -e 's/@''GNULIB_FMA''@/$(GNULIB_FMA)/g' \
+ -e 's/@''GNULIB_FMAF''@/$(GNULIB_FMAF)/g' \
+ -e 's/@''GNULIB_FMAL''@/$(GNULIB_FMAL)/g' \
+ -e 's/@''GNULIB_FMOD''@/$(GNULIB_FMOD)/g' \
+ -e 's/@''GNULIB_FMODF''@/$(GNULIB_FMODF)/g' \
+ -e 's/@''GNULIB_FMODL''@/$(GNULIB_FMODL)/g' \
+ -e 's/@''GNULIB_FREXPF''@/$(GNULIB_FREXPF)/g' \
+ -e 's/@''GNULIB_FREXP''@/$(GNULIB_FREXP)/g' \
+ -e 's/@''GNULIB_FREXPL''@/$(GNULIB_FREXPL)/g' \
+ -e 's/@''GNULIB_HYPOT''@/$(GNULIB_HYPOT)/g' \
+ -e 's/@''GNULIB_HYPOTF''@/$(GNULIB_HYPOTF)/g' \
+ -e 's/@''GNULIB_HYPOTL''@/$(GNULIB_HYPOTL)/g' \
< $(srcdir)/math.in.h | \
- sed -e 's|@''HAVE_ACOSL''@|$(HAVE_ACOSL)|g' \
+ sed -e 's/@''GNULIB_ILOGB''@/$(GNULIB_ILOGB)/g' \
+ -e 's/@''GNULIB_ILOGBF''@/$(GNULIB_ILOGBF)/g' \
+ -e 's/@''GNULIB_ILOGBL''@/$(GNULIB_ILOGBL)/g' \
+ -e 's/@''GNULIB_ISFINITE''@/$(GNULIB_ISFINITE)/g' \
+ -e 's/@''GNULIB_ISINF''@/$(GNULIB_ISINF)/g' \
+ -e 's/@''GNULIB_ISNAN''@/$(GNULIB_ISNAN)/g' \
+ -e 's/@''GNULIB_ISNANF''@/$(GNULIB_ISNANF)/g' \
+ -e 's/@''GNULIB_ISNAND''@/$(GNULIB_ISNAND)/g' \
+ -e 's/@''GNULIB_ISNANL''@/$(GNULIB_ISNANL)/g' \
+ -e 's/@''GNULIB_LDEXPF''@/$(GNULIB_LDEXPF)/g' \
+ -e 's/@''GNULIB_LDEXPL''@/$(GNULIB_LDEXPL)/g' \
+ -e 's/@''GNULIB_LOG''@/$(GNULIB_LOG)/g' \
+ -e 's/@''GNULIB_LOGF''@/$(GNULIB_LOGF)/g' \
+ -e 's/@''GNULIB_LOGL''@/$(GNULIB_LOGL)/g' \
+ -e 's/@''GNULIB_LOG10''@/$(GNULIB_LOG10)/g' \
+ -e 's/@''GNULIB_LOG10F''@/$(GNULIB_LOG10F)/g' \
+ -e 's/@''GNULIB_LOG10L''@/$(GNULIB_LOG10L)/g' \
+ -e 's/@''GNULIB_LOG1P''@/$(GNULIB_LOG1P)/g' \
+ -e 's/@''GNULIB_LOG1PF''@/$(GNULIB_LOG1PF)/g' \
+ -e 's/@''GNULIB_LOG1PL''@/$(GNULIB_LOG1PL)/g' \
+ -e 's/@''GNULIB_LOG2''@/$(GNULIB_LOG2)/g' \
+ -e 's/@''GNULIB_LOG2F''@/$(GNULIB_LOG2F)/g' \
+ -e 's/@''GNULIB_LOG2L''@/$(GNULIB_LOG2L)/g' \
+ -e 's/@''GNULIB_LOGB''@/$(GNULIB_LOGB)/g' \
+ -e 's/@''GNULIB_LOGBF''@/$(GNULIB_LOGBF)/g' \
+ -e 's/@''GNULIB_LOGBL''@/$(GNULIB_LOGBL)/g' \
+ -e 's/@''GNULIB_MODF''@/$(GNULIB_MODF)/g' \
+ -e 's/@''GNULIB_MODFF''@/$(GNULIB_MODFF)/g' \
+ -e 's/@''GNULIB_MODFL''@/$(GNULIB_MODFL)/g' \
+ -e 's/@''GNULIB_POWF''@/$(GNULIB_POWF)/g' \
+ -e 's/@''GNULIB_REMAINDER''@/$(GNULIB_REMAINDER)/g' \
+ -e 's/@''GNULIB_REMAINDERF''@/$(GNULIB_REMAINDERF)/g' \
+ -e 's/@''GNULIB_REMAINDERL''@/$(GNULIB_REMAINDERL)/g' \
+ -e 's/@''GNULIB_RINT''@/$(GNULIB_RINT)/g' \
+ -e 's/@''GNULIB_RINTF''@/$(GNULIB_RINTF)/g' \
+ -e 's/@''GNULIB_RINTL''@/$(GNULIB_RINTL)/g' \
+ -e 's/@''GNULIB_ROUND''@/$(GNULIB_ROUND)/g' \
+ -e 's/@''GNULIB_ROUNDF''@/$(GNULIB_ROUNDF)/g' \
+ -e 's/@''GNULIB_ROUNDL''@/$(GNULIB_ROUNDL)/g' \
+ -e 's/@''GNULIB_SIGNBIT''@/$(GNULIB_SIGNBIT)/g' \
+ -e 's/@''GNULIB_SINF''@/$(GNULIB_SINF)/g' \
+ -e 's/@''GNULIB_SINL''@/$(GNULIB_SINL)/g' \
+ -e 's/@''GNULIB_SINHF''@/$(GNULIB_SINHF)/g' \
+ -e 's/@''GNULIB_SQRTF''@/$(GNULIB_SQRTF)/g' \
+ -e 's/@''GNULIB_SQRTL''@/$(GNULIB_SQRTL)/g' \
+ -e 's/@''GNULIB_TANF''@/$(GNULIB_TANF)/g' \
+ -e 's/@''GNULIB_TANL''@/$(GNULIB_TANL)/g' \
+ -e 's/@''GNULIB_TANHF''@/$(GNULIB_TANHF)/g' \
+ -e 's/@''GNULIB_TRUNC''@/$(GNULIB_TRUNC)/g' \
+ -e 's/@''GNULIB_TRUNCF''@/$(GNULIB_TRUNCF)/g' \
+ -e 's/@''GNULIB_TRUNCL''@/$(GNULIB_TRUNCL)/g' \
+ | \
+ sed -e 's|@''HAVE_ACOSF''@|$(HAVE_ACOSF)|g' \
+ -e 's|@''HAVE_ACOSL''@|$(HAVE_ACOSL)|g' \
+ -e 's|@''HAVE_ASINF''@|$(HAVE_ASINF)|g' \
-e 's|@''HAVE_ASINL''@|$(HAVE_ASINL)|g' \
+ -e 's|@''HAVE_ATANF''@|$(HAVE_ATANF)|g' \
-e 's|@''HAVE_ATANL''@|$(HAVE_ATANL)|g' \
+ -e 's|@''HAVE_ATAN2F''@|$(HAVE_ATAN2F)|g' \
+ -e 's|@''HAVE_CBRT''@|$(HAVE_CBRT)|g' \
+ -e 's|@''HAVE_CBRTF''@|$(HAVE_CBRTF)|g' \
+ -e 's|@''HAVE_CBRTL''@|$(HAVE_CBRTL)|g' \
+ -e 's|@''HAVE_COPYSIGN''@|$(HAVE_COPYSIGN)|g' \
+ -e 's|@''HAVE_COPYSIGNL''@|$(HAVE_COPYSIGNL)|g' \
+ -e 's|@''HAVE_COSF''@|$(HAVE_COSF)|g' \
-e 's|@''HAVE_COSL''@|$(HAVE_COSL)|g' \
+ -e 's|@''HAVE_COSHF''@|$(HAVE_COSHF)|g' \
+ -e 's|@''HAVE_EXPF''@|$(HAVE_EXPF)|g' \
-e 's|@''HAVE_EXPL''@|$(HAVE_EXPL)|g' \
+ -e 's|@''HAVE_EXPM1''@|$(HAVE_EXPM1)|g' \
+ -e 's|@''HAVE_EXPM1F''@|$(HAVE_EXPM1F)|g' \
+ -e 's|@''HAVE_FABSF''@|$(HAVE_FABSF)|g' \
+ -e 's|@''HAVE_FABSL''@|$(HAVE_FABSL)|g' \
+ -e 's|@''HAVE_FMA''@|$(HAVE_FMA)|g' \
+ -e 's|@''HAVE_FMAF''@|$(HAVE_FMAF)|g' \
+ -e 's|@''HAVE_FMAL''@|$(HAVE_FMAL)|g' \
+ -e 's|@''HAVE_FMODF''@|$(HAVE_FMODF)|g' \
+ -e 's|@''HAVE_FMODL''@|$(HAVE_FMODL)|g' \
+ -e 's|@''HAVE_FREXPF''@|$(HAVE_FREXPF)|g' \
+ -e 's|@''HAVE_HYPOTF''@|$(HAVE_HYPOTF)|g' \
+ -e 's|@''HAVE_HYPOTL''@|$(HAVE_HYPOTL)|g' \
+ -e 's|@''HAVE_ILOGB''@|$(HAVE_ILOGB)|g' \
+ -e 's|@''HAVE_ILOGBF''@|$(HAVE_ILOGBF)|g' \
+ -e 's|@''HAVE_ILOGBL''@|$(HAVE_ILOGBL)|g' \
-e 's|@''HAVE_ISNANF''@|$(HAVE_ISNANF)|g' \
-e 's|@''HAVE_ISNAND''@|$(HAVE_ISNAND)|g' \
-e 's|@''HAVE_ISNANL''@|$(HAVE_ISNANL)|g' \
+ -e 's|@''HAVE_LDEXPF''@|$(HAVE_LDEXPF)|g' \
+ -e 's|@''HAVE_LOGF''@|$(HAVE_LOGF)|g' \
-e 's|@''HAVE_LOGL''@|$(HAVE_LOGL)|g' \
+ -e 's|@''HAVE_LOG10F''@|$(HAVE_LOG10F)|g' \
+ -e 's|@''HAVE_LOG10L''@|$(HAVE_LOG10L)|g' \
+ -e 's|@''HAVE_LOG1P''@|$(HAVE_LOG1P)|g' \
+ -e 's|@''HAVE_LOG1PF''@|$(HAVE_LOG1PF)|g' \
+ -e 's|@''HAVE_LOG1PL''@|$(HAVE_LOG1PL)|g' \
+ -e 's|@''HAVE_LOGBF''@|$(HAVE_LOGBF)|g' \
+ -e 's|@''HAVE_LOGBL''@|$(HAVE_LOGBL)|g' \
+ -e 's|@''HAVE_MODFF''@|$(HAVE_MODFF)|g' \
+ -e 's|@''HAVE_MODFL''@|$(HAVE_MODFL)|g' \
+ -e 's|@''HAVE_POWF''@|$(HAVE_POWF)|g' \
+ -e 's|@''HAVE_REMAINDER''@|$(HAVE_REMAINDER)|g' \
+ -e 's|@''HAVE_REMAINDERF''@|$(HAVE_REMAINDERF)|g' \
+ -e 's|@''HAVE_RINT''@|$(HAVE_RINT)|g' \
+ -e 's|@''HAVE_RINTL''@|$(HAVE_RINTL)|g' \
+ -e 's|@''HAVE_SINF''@|$(HAVE_SINF)|g' \
-e 's|@''HAVE_SINL''@|$(HAVE_SINL)|g' \
+ -e 's|@''HAVE_SINHF''@|$(HAVE_SINHF)|g' \
+ -e 's|@''HAVE_SQRTF''@|$(HAVE_SQRTF)|g' \
-e 's|@''HAVE_SQRTL''@|$(HAVE_SQRTL)|g' \
+ -e 's|@''HAVE_TANF''@|$(HAVE_TANF)|g' \
-e 's|@''HAVE_TANL''@|$(HAVE_TANL)|g' \
+ -e 's|@''HAVE_TANHF''@|$(HAVE_TANHF)|g' \
-e 's|@''HAVE_DECL_ACOSL''@|$(HAVE_DECL_ACOSL)|g' \
-e 's|@''HAVE_DECL_ASINL''@|$(HAVE_DECL_ASINL)|g' \
-e 's|@''HAVE_DECL_ATANL''@|$(HAVE_DECL_ATANL)|g' \
+ -e 's|@''HAVE_DECL_CBRTF''@|$(HAVE_DECL_CBRTF)|g' \
+ -e 's|@''HAVE_DECL_CBRTL''@|$(HAVE_DECL_CBRTL)|g' \
-e 's|@''HAVE_DECL_CEILF''@|$(HAVE_DECL_CEILF)|g' \
-e 's|@''HAVE_DECL_CEILL''@|$(HAVE_DECL_CEILL)|g' \
+ -e 's|@''HAVE_DECL_COPYSIGNF''@|$(HAVE_DECL_COPYSIGNF)|g' \
-e 's|@''HAVE_DECL_COSL''@|$(HAVE_DECL_COSL)|g' \
-e 's|@''HAVE_DECL_EXPL''@|$(HAVE_DECL_EXPL)|g' \
+ -e 's|@''HAVE_DECL_EXP2''@|$(HAVE_DECL_EXP2)|g' \
+ -e 's|@''HAVE_DECL_EXP2F''@|$(HAVE_DECL_EXP2F)|g' \
+ -e 's|@''HAVE_DECL_EXP2L''@|$(HAVE_DECL_EXP2L)|g' \
+ -e 's|@''HAVE_DECL_EXPM1L''@|$(HAVE_DECL_EXPM1L)|g' \
-e 's|@''HAVE_DECL_FLOORF''@|$(HAVE_DECL_FLOORF)|g' \
-e 's|@''HAVE_DECL_FLOORL''@|$(HAVE_DECL_FLOORL)|g' \
-e 's|@''HAVE_DECL_FREXPL''@|$(HAVE_DECL_FREXPL)|g' \
-e 's|@''HAVE_DECL_LDEXPL''@|$(HAVE_DECL_LDEXPL)|g' \
- -e 's|@''HAVE_DECL_LOGB''@|$(HAVE_DECL_LOGB)|g' \
-e 's|@''HAVE_DECL_LOGL''@|$(HAVE_DECL_LOGL)|g' \
+ -e 's|@''HAVE_DECL_LOG10L''@|$(HAVE_DECL_LOG10L)|g' \
+ -e 's|@''HAVE_DECL_LOG2''@|$(HAVE_DECL_LOG2)|g' \
+ -e 's|@''HAVE_DECL_LOG2F''@|$(HAVE_DECL_LOG2F)|g' \
+ -e 's|@''HAVE_DECL_LOG2L''@|$(HAVE_DECL_LOG2L)|g' \
+ -e 's|@''HAVE_DECL_LOGB''@|$(HAVE_DECL_LOGB)|g' \
+ -e 's|@''HAVE_DECL_REMAINDER''@|$(HAVE_DECL_REMAINDER)|g' \
+ -e 's|@''HAVE_DECL_REMAINDERL''@|$(HAVE_DECL_REMAINDERL)|g' \
+ -e 's|@''HAVE_DECL_RINTF''@|$(HAVE_DECL_RINTF)|g' \
-e 's|@''HAVE_DECL_ROUND''@|$(HAVE_DECL_ROUND)|g' \
-e 's|@''HAVE_DECL_ROUNDF''@|$(HAVE_DECL_ROUNDF)|g' \
-e 's|@''HAVE_DECL_ROUNDL''@|$(HAVE_DECL_ROUNDL)|g' \
@@ -1962,25 +2506,67 @@ math.h: math.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''HAVE_DECL_TRUNCF''@|$(HAVE_DECL_TRUNCF)|g' \
-e 's|@''HAVE_DECL_TRUNCL''@|$(HAVE_DECL_TRUNCL)|g' \
| \
- sed -e 's|@''REPLACE_CEIL''@|$(REPLACE_CEIL)|g' \
+ sed -e 's|@''REPLACE_CBRTF''@|$(REPLACE_CBRTF)|g' \
+ -e 's|@''REPLACE_CBRTL''@|$(REPLACE_CBRTL)|g' \
+ -e 's|@''REPLACE_CEIL''@|$(REPLACE_CEIL)|g' \
-e 's|@''REPLACE_CEILF''@|$(REPLACE_CEILF)|g' \
-e 's|@''REPLACE_CEILL''@|$(REPLACE_CEILL)|g' \
+ -e 's|@''REPLACE_EXPM1''@|$(REPLACE_EXPM1)|g' \
+ -e 's|@''REPLACE_EXPM1F''@|$(REPLACE_EXPM1F)|g' \
+ -e 's|@''REPLACE_EXP2''@|$(REPLACE_EXP2)|g' \
+ -e 's|@''REPLACE_EXP2L''@|$(REPLACE_EXP2L)|g' \
+ -e 's|@''REPLACE_FABSL''@|$(REPLACE_FABSL)|g' \
-e 's|@''REPLACE_FLOOR''@|$(REPLACE_FLOOR)|g' \
-e 's|@''REPLACE_FLOORF''@|$(REPLACE_FLOORF)|g' \
-e 's|@''REPLACE_FLOORL''@|$(REPLACE_FLOORL)|g' \
+ -e 's|@''REPLACE_FMA''@|$(REPLACE_FMA)|g' \
+ -e 's|@''REPLACE_FMAF''@|$(REPLACE_FMAF)|g' \
+ -e 's|@''REPLACE_FMAL''@|$(REPLACE_FMAL)|g' \
+ -e 's|@''REPLACE_FMOD''@|$(REPLACE_FMOD)|g' \
+ -e 's|@''REPLACE_FMODF''@|$(REPLACE_FMODF)|g' \
+ -e 's|@''REPLACE_FMODL''@|$(REPLACE_FMODL)|g' \
+ -e 's|@''REPLACE_FREXPF''@|$(REPLACE_FREXPF)|g' \
-e 's|@''REPLACE_FREXP''@|$(REPLACE_FREXP)|g' \
-e 's|@''REPLACE_FREXPL''@|$(REPLACE_FREXPL)|g' \
-e 's|@''REPLACE_HUGE_VAL''@|$(REPLACE_HUGE_VAL)|g' \
+ -e 's|@''REPLACE_HYPOT''@|$(REPLACE_HYPOT)|g' \
+ -e 's|@''REPLACE_HYPOTF''@|$(REPLACE_HYPOTF)|g' \
+ -e 's|@''REPLACE_HYPOTL''@|$(REPLACE_HYPOTL)|g' \
+ -e 's|@''REPLACE_ILOGB''@|$(REPLACE_ILOGB)|g' \
+ -e 's|@''REPLACE_ILOGBF''@|$(REPLACE_ILOGBF)|g' \
-e 's|@''REPLACE_ISFINITE''@|$(REPLACE_ISFINITE)|g' \
-e 's|@''REPLACE_ISINF''@|$(REPLACE_ISINF)|g' \
-e 's|@''REPLACE_ISNAN''@|$(REPLACE_ISNAN)|g' \
+ -e 's|@''REPLACE_ITOLD''@|$(REPLACE_ITOLD)|g' \
-e 's|@''REPLACE_LDEXPL''@|$(REPLACE_LDEXPL)|g' \
+ -e 's|@''REPLACE_LOG''@|$(REPLACE_LOG)|g' \
+ -e 's|@''REPLACE_LOGF''@|$(REPLACE_LOGF)|g' \
+ -e 's|@''REPLACE_LOGL''@|$(REPLACE_LOGL)|g' \
+ -e 's|@''REPLACE_LOG10''@|$(REPLACE_LOG10)|g' \
+ -e 's|@''REPLACE_LOG10F''@|$(REPLACE_LOG10F)|g' \
+ -e 's|@''REPLACE_LOG10L''@|$(REPLACE_LOG10L)|g' \
+ -e 's|@''REPLACE_LOG1P''@|$(REPLACE_LOG1P)|g' \
+ -e 's|@''REPLACE_LOG1PF''@|$(REPLACE_LOG1PF)|g' \
+ -e 's|@''REPLACE_LOG1PL''@|$(REPLACE_LOG1PL)|g' \
+ -e 's|@''REPLACE_LOG2''@|$(REPLACE_LOG2)|g' \
+ -e 's|@''REPLACE_LOG2F''@|$(REPLACE_LOG2F)|g' \
+ -e 's|@''REPLACE_LOG2L''@|$(REPLACE_LOG2L)|g' \
+ -e 's|@''REPLACE_LOGB''@|$(REPLACE_LOGB)|g' \
+ -e 's|@''REPLACE_LOGBF''@|$(REPLACE_LOGBF)|g' \
+ -e 's|@''REPLACE_LOGBL''@|$(REPLACE_LOGBL)|g' \
+ -e 's|@''REPLACE_MODF''@|$(REPLACE_MODF)|g' \
+ -e 's|@''REPLACE_MODFF''@|$(REPLACE_MODFF)|g' \
+ -e 's|@''REPLACE_MODFL''@|$(REPLACE_MODFL)|g' \
-e 's|@''REPLACE_NAN''@|$(REPLACE_NAN)|g' \
+ -e 's|@''REPLACE_REMAINDER''@|$(REPLACE_REMAINDER)|g' \
+ -e 's|@''REPLACE_REMAINDERF''@|$(REPLACE_REMAINDERF)|g' \
+ -e 's|@''REPLACE_REMAINDERL''@|$(REPLACE_REMAINDERL)|g' \
-e 's|@''REPLACE_ROUND''@|$(REPLACE_ROUND)|g' \
-e 's|@''REPLACE_ROUNDF''@|$(REPLACE_ROUNDF)|g' \
-e 's|@''REPLACE_ROUNDL''@|$(REPLACE_ROUNDL)|g' \
-e 's|@''REPLACE_SIGNBIT''@|$(REPLACE_SIGNBIT)|g' \
-e 's|@''REPLACE_SIGNBIT_USING_GCC''@|$(REPLACE_SIGNBIT_USING_GCC)|g' \
+ -e 's|@''REPLACE_SQRTL''@|$(REPLACE_SQRTL)|g' \
-e 's|@''REPLACE_TRUNC''@|$(REPLACE_TRUNC)|g' \
-e 's|@''REPLACE_TRUNCF''@|$(REPLACE_TRUNCF)|g' \
-e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \
@@ -1992,79 +2578,129 @@ math.h: math.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
# We need the following in order to create a replacement for <sched.h> when
# the system doesn't have one.
-sched.h: sched.in.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''HAVE_SCHED_H''@|$(HAVE_SCHED_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_SCHED_H''@|$(NEXT_SCHED_H)|g' \
- -e 's|@''HAVE_STRUCT_SCHED_PARAM''@|$(HAVE_STRUCT_SCHED_PARAM)|g' \
- < $(srcdir)/sched.in.h; \
- } > $@-t && \
- mv $@-t $@
+@GL_GENERATE_SCHED_H_TRUE@sched.h: sched.in.h $(top_builddir)/config.status
+@GL_GENERATE_SCHED_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
+@GL_GENERATE_SCHED_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+@GL_GENERATE_SCHED_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+@GL_GENERATE_SCHED_H_TRUE@ -e 's|@''HAVE_SCHED_H''@|$(HAVE_SCHED_H)|g' \
+@GL_GENERATE_SCHED_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+@GL_GENERATE_SCHED_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+@GL_GENERATE_SCHED_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+@GL_GENERATE_SCHED_H_TRUE@ -e 's|@''NEXT_SCHED_H''@|$(NEXT_SCHED_H)|g' \
+@GL_GENERATE_SCHED_H_TRUE@ -e 's|@''HAVE_STRUCT_SCHED_PARAM''@|$(HAVE_STRUCT_SCHED_PARAM)|g' \
+@GL_GENERATE_SCHED_H_TRUE@ < $(srcdir)/sched.in.h; \
+@GL_GENERATE_SCHED_H_TRUE@ } > $@-t && \
+@GL_GENERATE_SCHED_H_TRUE@ mv $@-t $@
+@GL_GENERATE_SCHED_H_FALSE@sched.h: $(top_builddir)/config.status
+@GL_GENERATE_SCHED_H_FALSE@ rm -f $@
# We need the following in order to create <signal.h> when the system
# doesn't have a complete one.
-signal.h: signal.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \
- -e 's|@''GNULIB_SIGNAL_H_SIGPIPE''@|$(GNULIB_SIGNAL_H_SIGPIPE)|g' \
- -e 's|@''GNULIB_SIGPROCMASK''@|$(GNULIB_SIGPROCMASK)|g' \
- -e 's|@''GNULIB_SIGACTION''@|$(GNULIB_SIGACTION)|g' \
+ -e 's|@''GNULIB_PTHREAD_SIGMASK''@|$(GNULIB_PTHREAD_SIGMASK)|g' \
+ -e 's|@''GNULIB_RAISE''@|$(GNULIB_RAISE)|g' \
+ -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GNULIB_SIGNAL_H_SIGPIPE)/g' \
+ -e 's/@''GNULIB_SIGPROCMASK''@/$(GNULIB_SIGPROCMASK)/g' \
+ -e 's/@''GNULIB_SIGACTION''@/$(GNULIB_SIGACTION)/g' \
-e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \
+ -e 's|@''HAVE_PTHREAD_SIGMASK''@|$(HAVE_PTHREAD_SIGMASK)|g' \
+ -e 's|@''HAVE_RAISE''@|$(HAVE_RAISE)|g' \
-e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \
-e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \
-e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \
-e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \
-e 's|@''HAVE_TYPE_VOLATILE_SIG_ATOMIC_T''@|$(HAVE_TYPE_VOLATILE_SIG_ATOMIC_T)|g' \
+ -e 's|@''HAVE_SIGHANDLER_T''@|$(HAVE_SIGHANDLER_T)|g' \
+ -e 's|@''REPLACE_PTHREAD_SIGMASK''@|$(REPLACE_PTHREAD_SIGMASK)|g' \
+ -e 's|@''REPLACE_RAISE''@|$(REPLACE_RAISE)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
< $(srcdir)/signal.in.h; \
} > $@-t && \
mv $@-t $@
+# The arg-nonnull.h that gets inserted into generated .h files is the same as
+# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut
+# off.
+arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/GL_ARG_NONNULL/,$$p' \
+ < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \
+ > $@-t && \
+ mv $@-t $@
+# The c++defs.h that gets inserted into generated .h files is the same as
+# build-aux/snippet/c++defs.h, except that it has the copyright header cut off.
+c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/_GL_CXXDEFS/,$$p' \
+ < $(top_srcdir)/build-aux/snippet/c++defs.h \
+ > $@-t && \
+ mv $@-t $@
+# The unused-parameter.h that gets inserted into generated .h files is the same
+# as build-aux/snippet/unused-parameter.h, except that it has the copyright
+# header cut off.
+unused-parameter.h: $(top_srcdir)/build-aux/snippet/unused-parameter.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \
+ < $(top_srcdir)/build-aux/snippet/unused-parameter.h \
+ > $@-t && \
+ mv $@-t $@
+# The warn-on-use.h that gets inserted into generated .h files is the same as
+# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut
+# off.
+warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/^.ifndef/,$$p' \
+ < $(top_srcdir)/build-aux/snippet/warn-on-use.h \
+ > $@-t && \
+ mv $@-t $@
# We need the following in order to create a replacement for <spawn.h> when
# the system doesn't have one.
-spawn.h: spawn.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+spawn.h: spawn.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''HAVE_SPAWN_H''@|$(HAVE_SPAWN_H)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''HAVE_SPAWN_H''@|$(HAVE_SPAWN_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_SPAWN_H''@|$(NEXT_SPAWN_H)|g' \
- -e 's|@''GNULIB_POSIX_SPAWN''@|$(GNULIB_POSIX_SPAWN)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNP''@|$(GNULIB_POSIX_SPAWNP)|g' \
- -e 's|@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT''@|$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT)|g' \
- -e 's|@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE''@|$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE)|g' \
- -e 's|@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2''@|$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2)|g' \
- -e 's|@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN''@|$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN)|g' \
- -e 's|@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY''@|$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNATTR_INIT''@|$(GNULIB_POSIX_SPAWNATTR_INIT)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNATTR_GETFLAGS''@|$(GNULIB_POSIX_SPAWNATTR_GETFLAGS)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNATTR_SETFLAGS''@|$(GNULIB_POSIX_SPAWNATTR_SETFLAGS)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNATTR_GETPGROUP''@|$(GNULIB_POSIX_SPAWNATTR_GETPGROUP)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNATTR_SETPGROUP''@|$(GNULIB_POSIX_SPAWNATTR_SETPGROUP)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM''@|$(GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM''@|$(GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY''@|$(GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY''@|$(GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT''@|$(GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT''@|$(GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNATTR_GETSIGMASK''@|$(GNULIB_POSIX_SPAWNATTR_GETSIGMASK)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNATTR_SETSIGMASK''@|$(GNULIB_POSIX_SPAWNATTR_SETSIGMASK)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNATTR_DESTROY''@|$(GNULIB_POSIX_SPAWNATTR_DESTROY)|g' \
+ -e 's/@''GNULIB_POSIX_SPAWN''@/$(GNULIB_POSIX_SPAWN)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNP''@/$(GNULIB_POSIX_SPAWNP)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT''@/$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE''@/$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2''@/$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN''@/$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY''@/$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNATTR_INIT''@/$(GNULIB_POSIX_SPAWNATTR_INIT)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNATTR_GETFLAGS''@/$(GNULIB_POSIX_SPAWNATTR_GETFLAGS)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNATTR_SETFLAGS''@/$(GNULIB_POSIX_SPAWNATTR_SETFLAGS)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNATTR_GETPGROUP''@/$(GNULIB_POSIX_SPAWNATTR_GETPGROUP)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNATTR_SETPGROUP''@/$(GNULIB_POSIX_SPAWNATTR_SETPGROUP)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM''@/$(GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM''@/$(GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY''@/$(GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY''@/$(GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT''@/$(GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT''@/$(GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNATTR_GETSIGMASK''@/$(GNULIB_POSIX_SPAWNATTR_GETSIGMASK)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNATTR_SETSIGMASK''@/$(GNULIB_POSIX_SPAWNATTR_SETSIGMASK)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNATTR_DESTROY''@/$(GNULIB_POSIX_SPAWNATTR_DESTROY)/g' \
-e 's|@''HAVE_POSIX_SPAWN''@|$(HAVE_POSIX_SPAWN)|g' \
-e 's|@''HAVE_POSIX_SPAWNATTR_T''@|$(HAVE_POSIX_SPAWNATTR_T)|g' \
-e 's|@''HAVE_POSIX_SPAWN_FILE_ACTIONS_T''@|$(HAVE_POSIX_SPAWN_FILE_ACTIONS_T)|g' \
-e 's|@''REPLACE_POSIX_SPAWN''@|$(REPLACE_POSIX_SPAWN)|g' \
+ -e 's|@''REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE''@|$(REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE)|g' \
+ -e 's|@''REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2''@|$(REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2)|g' \
+ -e 's|@''REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN''@|$(REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN)|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)' \
@@ -2074,126 +2710,150 @@ spawn.h: spawn.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
# We need the following in order to create <stdarg.h> when the system
# doesn't have one that works with the given compiler.
-stdarg.h: stdarg.in.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
- -e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \
- < $(srcdir)/stdarg.in.h; \
- } > $@-t && \
- mv $@-t $@
+@GL_GENERATE_STDARG_H_TRUE@stdarg.h: stdarg.in.h $(top_builddir)/config.status
+@GL_GENERATE_STDARG_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
+@GL_GENERATE_STDARG_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+@GL_GENERATE_STDARG_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+@GL_GENERATE_STDARG_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+@GL_GENERATE_STDARG_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+@GL_GENERATE_STDARG_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+@GL_GENERATE_STDARG_H_TRUE@ -e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \
+@GL_GENERATE_STDARG_H_TRUE@ < $(srcdir)/stdarg.in.h; \
+@GL_GENERATE_STDARG_H_TRUE@ } > $@-t && \
+@GL_GENERATE_STDARG_H_TRUE@ mv $@-t $@
+@GL_GENERATE_STDARG_H_FALSE@stdarg.h: $(top_builddir)/config.status
+@GL_GENERATE_STDARG_H_FALSE@ rm -f $@
# We need the following in order to create <stdbool.h> when the system
# doesn't have one that works.
-stdbool.h: stdbool.in.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \
- } > $@-t && \
- mv $@-t $@
+@GL_GENERATE_STDBOOL_H_TRUE@stdbool.h: stdbool.in.h $(top_builddir)/config.status
+@GL_GENERATE_STDBOOL_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
+@GL_GENERATE_STDBOOL_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+@GL_GENERATE_STDBOOL_H_TRUE@ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \
+@GL_GENERATE_STDBOOL_H_TRUE@ } > $@-t && \
+@GL_GENERATE_STDBOOL_H_TRUE@ mv $@-t $@
+@GL_GENERATE_STDBOOL_H_FALSE@stdbool.h: $(top_builddir)/config.status
+@GL_GENERATE_STDBOOL_H_FALSE@ rm -f $@
# We need the following in order to create <stddef.h> when the system
# doesn't have one that works with the given compiler.
-stddef.h: stddef.in.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
- -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
- -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
- -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
- < $(srcdir)/stddef.in.h; \
- } > $@-t && \
- mv $@-t $@
+@GL_GENERATE_STDDEF_H_TRUE@stddef.h: stddef.in.h $(top_builddir)/config.status
+@GL_GENERATE_STDDEF_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
+@GL_GENERATE_STDDEF_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+@GL_GENERATE_STDDEF_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL_M4|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 <stdint.h> when the system
# doesn't have one that works with the given compiler.
-stdint.h: stdint.in.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
- -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \
- -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
- -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
- -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
- -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
- -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \
- -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
- -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
- -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
- -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \
- -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \
- -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \
- -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \
- -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \
- -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \
- -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \
- -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \
- -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \
- -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \
- -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \
- -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
- -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
- < $(srcdir)/stdint.in.h; \
- } > $@-t && \
- mv $@-t $@
+@GL_GENERATE_STDINT_H_TRUE@stdint.h: stdint.in.h $(top_builddir)/config.status
+@GL_GENERATE_STDINT_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
+@GL_GENERATE_STDINT_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+@GL_GENERATE_STDINT_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL_M4|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 <stdio.h> when the system
# doesn't have one that works with the given compiler.
-stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \
- -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \
- -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \
- -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \
- -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \
- -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \
- -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \
- -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \
- -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \
- -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \
- -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \
- -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \
- -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \
- -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \
- -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \
- -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \
- -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \
- -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \
- -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \
- -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \
- -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \
- -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \
- -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \
- -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \
- -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \
- -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \
- -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \
- -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \
- -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \
- -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \
- -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \
- -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \
- -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \
- -e 's|@''GNULIB_TMPFILE''@|$(GNULIB_TMPFILE)|g' \
- -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \
- -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \
- -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \
- -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \
- -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \
- -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \
- -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \
- -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \
+ -e 's/@''GNULIB_DPRINTF''@/$(GNULIB_DPRINTF)/g' \
+ -e 's/@''GNULIB_FCLOSE''@/$(GNULIB_FCLOSE)/g' \
+ -e 's/@''GNULIB_FDOPEN''@/$(GNULIB_FDOPEN)/g' \
+ -e 's/@''GNULIB_FFLUSH''@/$(GNULIB_FFLUSH)/g' \
+ -e 's/@''GNULIB_FGETC''@/$(GNULIB_FGETC)/g' \
+ -e 's/@''GNULIB_FGETS''@/$(GNULIB_FGETS)/g' \
+ -e 's/@''GNULIB_FOPEN''@/$(GNULIB_FOPEN)/g' \
+ -e 's/@''GNULIB_FPRINTF''@/$(GNULIB_FPRINTF)/g' \
+ -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GNULIB_FPRINTF_POSIX)/g' \
+ -e 's/@''GNULIB_FPURGE''@/$(GNULIB_FPURGE)/g' \
+ -e 's/@''GNULIB_FPUTC''@/$(GNULIB_FPUTC)/g' \
+ -e 's/@''GNULIB_FPUTS''@/$(GNULIB_FPUTS)/g' \
+ -e 's/@''GNULIB_FREAD''@/$(GNULIB_FREAD)/g' \
+ -e 's/@''GNULIB_FREOPEN''@/$(GNULIB_FREOPEN)/g' \
+ -e 's/@''GNULIB_FSCANF''@/$(GNULIB_FSCANF)/g' \
+ -e 's/@''GNULIB_FSEEK''@/$(GNULIB_FSEEK)/g' \
+ -e 's/@''GNULIB_FSEEKO''@/$(GNULIB_FSEEKO)/g' \
+ -e 's/@''GNULIB_FTELL''@/$(GNULIB_FTELL)/g' \
+ -e 's/@''GNULIB_FTELLO''@/$(GNULIB_FTELLO)/g' \
+ -e 's/@''GNULIB_FWRITE''@/$(GNULIB_FWRITE)/g' \
+ -e 's/@''GNULIB_GETC''@/$(GNULIB_GETC)/g' \
+ -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \
+ -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \
+ -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \
+ -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \
+ -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_POSIX)/g' \
+ -e 's/@''GNULIB_PCLOSE''@/$(GNULIB_PCLOSE)/g' \
+ -e 's/@''GNULIB_PERROR''@/$(GNULIB_PERROR)/g' \
+ -e 's/@''GNULIB_POPEN''@/$(GNULIB_POPEN)/g' \
+ -e 's/@''GNULIB_PRINTF''@/$(GNULIB_PRINTF)/g' \
+ -e 's/@''GNULIB_PRINTF_POSIX''@/$(GNULIB_PRINTF_POSIX)/g' \
+ -e 's/@''GNULIB_PUTC''@/$(GNULIB_PUTC)/g' \
+ -e 's/@''GNULIB_PUTCHAR''@/$(GNULIB_PUTCHAR)/g' \
+ -e 's/@''GNULIB_PUTS''@/$(GNULIB_PUTS)/g' \
+ -e 's/@''GNULIB_REMOVE''@/$(GNULIB_REMOVE)/g' \
+ -e 's/@''GNULIB_RENAME''@/$(GNULIB_RENAME)/g' \
+ -e 's/@''GNULIB_RENAMEAT''@/$(GNULIB_RENAMEAT)/g' \
+ -e 's/@''GNULIB_SCANF''@/$(GNULIB_SCANF)/g' \
+ -e 's/@''GNULIB_SNPRINTF''@/$(GNULIB_SNPRINTF)/g' \
+ -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GNULIB_SPRINTF_POSIX)/g' \
+ -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GNULIB_STDIO_H_NONBLOCKING)/g' \
+ -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GNULIB_STDIO_H_SIGPIPE)/g' \
+ -e 's/@''GNULIB_TMPFILE''@/$(GNULIB_TMPFILE)/g' \
+ -e 's/@''GNULIB_VASPRINTF''@/$(GNULIB_VASPRINTF)/g' \
+ -e 's/@''GNULIB_VDPRINTF''@/$(GNULIB_VDPRINTF)/g' \
+ -e 's/@''GNULIB_VFPRINTF''@/$(GNULIB_VFPRINTF)/g' \
+ -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GNULIB_VFPRINTF_POSIX)/g' \
+ -e 's/@''GNULIB_VFSCANF''@/$(GNULIB_VFSCANF)/g' \
+ -e 's/@''GNULIB_VSCANF''@/$(GNULIB_VSCANF)/g' \
+ -e 's/@''GNULIB_VPRINTF''@/$(GNULIB_VPRINTF)/g' \
+ -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \
+ -e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \
+ -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \
< $(srcdir)/stdio.in.h | \
sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
-e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \
@@ -2206,11 +2866,14 @@ stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \
-e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \
-e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \
+ -e 's|@''HAVE_PCLOSE''@|$(HAVE_PCLOSE)|g' \
+ -e 's|@''HAVE_POPEN''@|$(HAVE_POPEN)|g' \
-e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \
-e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \
-e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \
-e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \
-e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \
+ -e 's|@''REPLACE_FDOPEN''@|$(REPLACE_FDOPEN)|g' \
-e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \
-e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \
-e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \
@@ -2231,6 +2894,7 @@ stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \
-e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \
-e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \
+ -e 's|@''REPLACE_STDIO_READ_FUNCS''@|$(REPLACE_STDIO_READ_FUNCS)|g' \
-e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \
-e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \
-e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \
@@ -2248,41 +2912,47 @@ stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
# We need the following in order to create <stdlib.h> when the system
# doesn't have one that works with the given compiler.
-stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
+ $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
- -e 's|@''GNULIB__EXIT''@|$(GNULIB__EXIT)|g' \
- -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \
- -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \
- -e 's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \
- -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \
- -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \
- -e 's|@''GNULIB_GRANTPT''@|$(GNULIB_GRANTPT)|g' \
- -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \
- -e 's|@''GNULIB_MBTOWC''@|$(GNULIB_MBTOWC)|g' \
- -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
- -e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \
- -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \
- -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \
- -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \
- -e 's|@''GNULIB_PTSNAME''@|$(GNULIB_PTSNAME)|g' \
- -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \
- -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \
- -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \
- -e 's|@''GNULIB_REALPATH''@|$(GNULIB_REALPATH)|g' \
- -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \
- -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \
- -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \
- -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \
- -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \
- -e 's|@''GNULIB_SYSTEM_POSIX''@|$(GNULIB_SYSTEM_POSIX)|g' \
- -e 's|@''GNULIB_UNLOCKPT''@|$(GNULIB_UNLOCKPT)|g' \
- -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \
- -e 's|@''GNULIB_WCTOMB''@|$(GNULIB_WCTOMB)|g' \
+ -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \
+ -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \
+ -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \
+ -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \
+ -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \
+ -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \
+ -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \
+ -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \
+ -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \
+ -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \
+ -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \
+ -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \
+ -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \
+ -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \
+ -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \
+ -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
+ -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \
+ -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \
+ -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \
+ -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \
+ -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \
+ -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \
+ -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \
+ -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \
+ -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \
+ -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \
+ -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \
+ -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \
+ -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \
+ -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \
+ -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \
+ -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \
< $(srcdir)/stdlib.in.h | \
sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
-e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
@@ -2295,11 +2965,15 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
-e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \
-e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \
+ -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \
-e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
+ -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
+ -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \
-e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
-e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
-e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \
-e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \
+ -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \
-e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \
-e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
-e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
@@ -2313,7 +2987,10 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \
-e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
-e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
+ -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
+ -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
-e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
+ -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \
-e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \
-e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
-e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
@@ -2321,6 +2998,7 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \
-e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _Noreturn/r $(_NORETURN_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
} > $@-t && \
@@ -2328,50 +3006,55 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
# We need the following in order to create <string.h> when the system
# doesn't have one that works with the given compiler.
-string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
- -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \
- -e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \
- -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \
- -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \
- -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \
- -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \
- -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \
- -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \
- -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \
- -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \
- -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \
- -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \
- -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \
- -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \
- -e 's|@''GNULIB_MEMCHR''@|$(GNULIB_MEMCHR)|g' \
- -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \
- -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \
- -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \
- -e 's|@''GNULIB_RAWMEMCHR''@|$(GNULIB_RAWMEMCHR)|g' \
- -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \
- -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \
- -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \
- -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \
- -e 's|@''GNULIB_STRNCAT''@|$(GNULIB_STRNCAT)|g' \
- -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \
- -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \
- -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \
- -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \
- -e 's|@''GNULIB_STRSTR''@|$(GNULIB_STRSTR)|g' \
- -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \
- -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \
- -e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \
- -e 's|@''GNULIB_STRERROR_R''@|$(GNULIB_STRERROR_R)|g' \
- -e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \
- -e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \
+ -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \
+ -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \
+ -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \
+ -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \
+ -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \
+ -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \
+ -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \
+ -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \
+ -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \
+ -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \
+ -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \
+ -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \
+ -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \
+ -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \
+ -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \
+ -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \
+ -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \
+ -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \
+ -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \
+ -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \
+ -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \
+ -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \
+ -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \
+ -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \
+ -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \
+ -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \
+ -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \
+ -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \
+ -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \
+ -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \
+ -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \
+ -e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \
+ -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \
+ -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \
+ -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \
+ -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \
+ -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \
< $(srcdir)/string.in.h | \
- sed -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
+ sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
+ -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
+ -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
-e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \
-e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
-e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
@@ -2394,6 +3077,7 @@ string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
-e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
-e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
+ -e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \
-e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
-e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
-e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
@@ -2413,26 +3097,29 @@ string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
# We need the following in order to create <sys/stat.h> when the system
# has one that is incomplete.
-sys/stat.h: sys_stat.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_at)$(MKDIR_P) sys
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
- -e 's|@''GNULIB_FCHMODAT''@|$(GNULIB_FCHMODAT)|g' \
- -e 's|@''GNULIB_FSTATAT''@|$(GNULIB_FSTATAT)|g' \
- -e 's|@''GNULIB_FUTIMENS''@|$(GNULIB_FUTIMENS)|g' \
- -e 's|@''GNULIB_LCHMOD''@|$(GNULIB_LCHMOD)|g' \
- -e 's|@''GNULIB_LSTAT''@|$(GNULIB_LSTAT)|g' \
- -e 's|@''GNULIB_MKDIRAT''@|$(GNULIB_MKDIRAT)|g' \
- -e 's|@''GNULIB_MKFIFO''@|$(GNULIB_MKFIFO)|g' \
- -e 's|@''GNULIB_MKFIFOAT''@|$(GNULIB_MKFIFOAT)|g' \
- -e 's|@''GNULIB_MKNOD''@|$(GNULIB_MKNOD)|g' \
- -e 's|@''GNULIB_MKNODAT''@|$(GNULIB_MKNODAT)|g' \
- -e 's|@''GNULIB_STAT''@|$(GNULIB_STAT)|g' \
- -e 's|@''GNULIB_UTIMENSAT''@|$(GNULIB_UTIMENSAT)|g' \
+ -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \
+ -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \
+ -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \
+ -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \
+ -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \
+ -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \
+ -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \
+ -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \
+ -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \
+ -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \
+ -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \
+ -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \
+ -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \
+ -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \
-e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
-e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
-e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
@@ -2462,19 +3149,22 @@ sys/stat.h: sys_stat.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
# We need the following in order to create <sys/time.h> when the system
# doesn't have one that works with the given compiler.
-sys/time.h: sys_time.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+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/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|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)' \
@@ -2482,17 +3172,34 @@ sys/time.h: sys_time.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
} > $@-t && \
mv $@-t $@
+# We need the following in order to create <sys/types.h> 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_M4|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 <sys/wait.h> when the system
# has one that is incomplete.
-sys/wait.h: sys_wait.in.h $(CXXDEFS_H) $(WARN_ON_USE_H)
+sys/wait.h: sys_wait.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
$(AM_V_at)$(MKDIR_P) sys
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_SYS_WAIT_H''@|$(NEXT_SYS_WAIT_H)|g' \
- -e 's|@''GNULIB_WAITPID''@|$(GNULIB_WAITPID)|g' \
+ -e 's/@''GNULIB_WAITPID''@/$(GNULIB_WAITPID)/g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
< $(srcdir)/sys_wait.in.h; \
@@ -2501,18 +3208,19 @@ sys/wait.h: sys_wait.in.h $(CXXDEFS_H) $(WARN_ON_USE_H)
# We need the following in order to create <time.h> when the system
# doesn't have one that works with the given compiler.
-time.h: time.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
- -e 's|@''GNULIB_MKTIME''@|$(GNULIB_MKTIME)|g' \
- -e 's|@''GNULIB_NANOSLEEP''@|$(GNULIB_NANOSLEEP)|g' \
- -e 's|@''GNULIB_STRPTIME''@|$(GNULIB_STRPTIME)|g' \
- -e 's|@''GNULIB_TIMEGM''@|$(GNULIB_TIMEGM)|g' \
- -e 's|@''GNULIB_TIME_R''@|$(GNULIB_TIME_R)|g' \
+ -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \
+ -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \
+ -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \
+ -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \
+ -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \
-e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
-e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
-e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
@@ -2533,55 +3241,65 @@ time.h: time.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
# We need the following in order to create an empty placeholder for
# <unistd.h> when the system doesn't have one.
-unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
- -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
- -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \
- -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
- -e 's|@''GNULIB_DUP3''@|$(GNULIB_DUP3)|g' \
- -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \
- -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \
- -e 's|@''GNULIB_FACCESSAT''@|$(GNULIB_FACCESSAT)|g' \
- -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \
- -e 's|@''GNULIB_FCHOWNAT''@|$(GNULIB_FCHOWNAT)|g' \
- -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \
- -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \
- -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \
- -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \
- -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \
- -e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \
- -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \
- -e 's|@''GNULIB_GETLOGIN''@|$(GNULIB_GETLOGIN)|g' \
- -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \
- -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \
- -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \
- -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \
- -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \
- -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \
- -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
- -e 's|@''GNULIB_PIPE''@|$(GNULIB_PIPE)|g' \
- -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \
- -e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \
- -e 's|@''GNULIB_PWRITE''@|$(GNULIB_PWRITE)|g' \
- -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
- -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \
- -e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \
- -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
- -e 's|@''GNULIB_SYMLINK''@|$(GNULIB_SYMLINK)|g' \
- -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \
- -e 's|@''GNULIB_TTYNAME_R''@|$(GNULIB_TTYNAME_R)|g' \
- -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \
- -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \
- -e 's|@''GNULIB_UNLINK''@|$(GNULIB_UNLINK)|g' \
- -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \
- -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \
- -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \
+ -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
+ -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \
+ -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
+ -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
+ -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \
+ -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \
+ -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \
+ -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \
+ -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \
+ -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \
+ -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \
+ -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \
+ -e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \
+ -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \
+ -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \
+ -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \
+ -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \
+ -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \
+ -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \
+ -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \
+ -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
+ -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
+ -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
+ -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
+ -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
+ -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \
+ -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \
+ -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \
+ -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \
+ -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \
+ -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \
+ -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \
+ -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \
+ -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \
+ -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \
+ -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \
+ -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \
+ -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \
+ -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \
+ -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \
+ -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \
+ -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \
+ -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \
+ -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_M4_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' \
@@ -2590,6 +3308,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \
-e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \
-e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
+ -e 's|@''HAVE_FDATASYNC''@|$(HAVE_FDATASYNC)|g' \
-e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
-e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
-e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
@@ -2597,6 +3316,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
-e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \
-e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
+ -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \
-e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
-e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
-e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \
@@ -2606,6 +3326,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \
-e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
-e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \
+ -e 's|@''HAVE_SETHOSTNAME''@|$(HAVE_SETHOSTNAME)|g' \
-e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
-e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \
-e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
@@ -2613,10 +3334,12 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
-e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
-e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \
+ -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \
-e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \
-e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
-e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \
-e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \
+ -e 's|@''HAVE_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \
-e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \
-e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
-e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
@@ -2626,17 +3349,20 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
-e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
-e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
+ -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
-e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
-e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
-e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
-e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
-e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
+ -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \
-e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
-e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
-e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \
-e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
-e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \
-e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \
+ -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \
-e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
-e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
-e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
@@ -2653,65 +3379,58 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
} > $@-t && \
mv $@-t $@
-# The warn-on-use.h that gets inserted into generated .h files is the same as
-# build-aux/warn-on-use.h, except that it has the copyright header cut off.
-warn-on-use.h: $(top_srcdir)/build-aux/warn-on-use.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/^.ifndef/,$$p' \
- < $(top_srcdir)/build-aux/warn-on-use.h \
- > $@-t && \
- mv $@-t $@
# We need the following in order to create <wchar.h> when the system
# version does not work standalone.
-wchar.h: wchar.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \
-e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
-e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \
- -e 's|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \
- -e 's|@''GNULIB_WCTOB''@|$(GNULIB_WCTOB)|g' \
- -e 's|@''GNULIB_MBSINIT''@|$(GNULIB_MBSINIT)|g' \
- -e 's|@''GNULIB_MBRTOWC''@|$(GNULIB_MBRTOWC)|g' \
- -e 's|@''GNULIB_MBRLEN''@|$(GNULIB_MBRLEN)|g' \
- -e 's|@''GNULIB_MBSRTOWCS''@|$(GNULIB_MBSRTOWCS)|g' \
- -e 's|@''GNULIB_MBSNRTOWCS''@|$(GNULIB_MBSNRTOWCS)|g' \
- -e 's|@''GNULIB_WCRTOMB''@|$(GNULIB_WCRTOMB)|g' \
- -e 's|@''GNULIB_WCSRTOMBS''@|$(GNULIB_WCSRTOMBS)|g' \
- -e 's|@''GNULIB_WCSNRTOMBS''@|$(GNULIB_WCSNRTOMBS)|g' \
- -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \
- -e 's|@''GNULIB_WMEMCHR''@|$(GNULIB_WMEMCHR)|g' \
- -e 's|@''GNULIB_WMEMCMP''@|$(GNULIB_WMEMCMP)|g' \
- -e 's|@''GNULIB_WMEMCPY''@|$(GNULIB_WMEMCPY)|g' \
- -e 's|@''GNULIB_WMEMMOVE''@|$(GNULIB_WMEMMOVE)|g' \
- -e 's|@''GNULIB_WMEMSET''@|$(GNULIB_WMEMSET)|g' \
- -e 's|@''GNULIB_WCSLEN''@|$(GNULIB_WCSLEN)|g' \
- -e 's|@''GNULIB_WCSNLEN''@|$(GNULIB_WCSNLEN)|g' \
- -e 's|@''GNULIB_WCSCPY''@|$(GNULIB_WCSCPY)|g' \
- -e 's|@''GNULIB_WCPCPY''@|$(GNULIB_WCPCPY)|g' \
- -e 's|@''GNULIB_WCSNCPY''@|$(GNULIB_WCSNCPY)|g' \
- -e 's|@''GNULIB_WCPNCPY''@|$(GNULIB_WCPNCPY)|g' \
- -e 's|@''GNULIB_WCSCAT''@|$(GNULIB_WCSCAT)|g' \
- -e 's|@''GNULIB_WCSNCAT''@|$(GNULIB_WCSNCAT)|g' \
- -e 's|@''GNULIB_WCSCMP''@|$(GNULIB_WCSCMP)|g' \
- -e 's|@''GNULIB_WCSNCMP''@|$(GNULIB_WCSNCMP)|g' \
- -e 's|@''GNULIB_WCSCASECMP''@|$(GNULIB_WCSCASECMP)|g' \
- -e 's|@''GNULIB_WCSNCASECMP''@|$(GNULIB_WCSNCASECMP)|g' \
- -e 's|@''GNULIB_WCSCOLL''@|$(GNULIB_WCSCOLL)|g' \
- -e 's|@''GNULIB_WCSXFRM''@|$(GNULIB_WCSXFRM)|g' \
- -e 's|@''GNULIB_WCSDUP''@|$(GNULIB_WCSDUP)|g' \
- -e 's|@''GNULIB_WCSCHR''@|$(GNULIB_WCSCHR)|g' \
- -e 's|@''GNULIB_WCSRCHR''@|$(GNULIB_WCSRCHR)|g' \
- -e 's|@''GNULIB_WCSCSPN''@|$(GNULIB_WCSCSPN)|g' \
- -e 's|@''GNULIB_WCSSPN''@|$(GNULIB_WCSSPN)|g' \
- -e 's|@''GNULIB_WCSPBRK''@|$(GNULIB_WCSPBRK)|g' \
- -e 's|@''GNULIB_WCSSTR''@|$(GNULIB_WCSSTR)|g' \
- -e 's|@''GNULIB_WCSTOK''@|$(GNULIB_WCSTOK)|g' \
- -e 's|@''GNULIB_WCSWIDTH''@|$(GNULIB_WCSWIDTH)|g' \
+ -e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \
+ -e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \
+ -e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \
+ -e 's/@''GNULIB_MBRTOWC''@/$(GNULIB_MBRTOWC)/g' \
+ -e 's/@''GNULIB_MBRLEN''@/$(GNULIB_MBRLEN)/g' \
+ -e 's/@''GNULIB_MBSRTOWCS''@/$(GNULIB_MBSRTOWCS)/g' \
+ -e 's/@''GNULIB_MBSNRTOWCS''@/$(GNULIB_MBSNRTOWCS)/g' \
+ -e 's/@''GNULIB_WCRTOMB''@/$(GNULIB_WCRTOMB)/g' \
+ -e 's/@''GNULIB_WCSRTOMBS''@/$(GNULIB_WCSRTOMBS)/g' \
+ -e 's/@''GNULIB_WCSNRTOMBS''@/$(GNULIB_WCSNRTOMBS)/g' \
+ -e 's/@''GNULIB_WCWIDTH''@/$(GNULIB_WCWIDTH)/g' \
+ -e 's/@''GNULIB_WMEMCHR''@/$(GNULIB_WMEMCHR)/g' \
+ -e 's/@''GNULIB_WMEMCMP''@/$(GNULIB_WMEMCMP)/g' \
+ -e 's/@''GNULIB_WMEMCPY''@/$(GNULIB_WMEMCPY)/g' \
+ -e 's/@''GNULIB_WMEMMOVE''@/$(GNULIB_WMEMMOVE)/g' \
+ -e 's/@''GNULIB_WMEMSET''@/$(GNULIB_WMEMSET)/g' \
+ -e 's/@''GNULIB_WCSLEN''@/$(GNULIB_WCSLEN)/g' \
+ -e 's/@''GNULIB_WCSNLEN''@/$(GNULIB_WCSNLEN)/g' \
+ -e 's/@''GNULIB_WCSCPY''@/$(GNULIB_WCSCPY)/g' \
+ -e 's/@''GNULIB_WCPCPY''@/$(GNULIB_WCPCPY)/g' \
+ -e 's/@''GNULIB_WCSNCPY''@/$(GNULIB_WCSNCPY)/g' \
+ -e 's/@''GNULIB_WCPNCPY''@/$(GNULIB_WCPNCPY)/g' \
+ -e 's/@''GNULIB_WCSCAT''@/$(GNULIB_WCSCAT)/g' \
+ -e 's/@''GNULIB_WCSNCAT''@/$(GNULIB_WCSNCAT)/g' \
+ -e 's/@''GNULIB_WCSCMP''@/$(GNULIB_WCSCMP)/g' \
+ -e 's/@''GNULIB_WCSNCMP''@/$(GNULIB_WCSNCMP)/g' \
+ -e 's/@''GNULIB_WCSCASECMP''@/$(GNULIB_WCSCASECMP)/g' \
+ -e 's/@''GNULIB_WCSNCASECMP''@/$(GNULIB_WCSNCASECMP)/g' \
+ -e 's/@''GNULIB_WCSCOLL''@/$(GNULIB_WCSCOLL)/g' \
+ -e 's/@''GNULIB_WCSXFRM''@/$(GNULIB_WCSXFRM)/g' \
+ -e 's/@''GNULIB_WCSDUP''@/$(GNULIB_WCSDUP)/g' \
+ -e 's/@''GNULIB_WCSCHR''@/$(GNULIB_WCSCHR)/g' \
+ -e 's/@''GNULIB_WCSRCHR''@/$(GNULIB_WCSRCHR)/g' \
+ -e 's/@''GNULIB_WCSCSPN''@/$(GNULIB_WCSCSPN)/g' \
+ -e 's/@''GNULIB_WCSSPN''@/$(GNULIB_WCSSPN)/g' \
+ -e 's/@''GNULIB_WCSPBRK''@/$(GNULIB_WCSPBRK)/g' \
+ -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \
+ -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \
+ -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \
< $(srcdir)/wchar.in.h | \
sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
-e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
@@ -2775,10 +3494,11 @@ wchar.h: wchar.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
# We need the following in order to create <wctype.h> when the system
# doesn't have one that works with the given compiler.
-wctype.h: wctype.in.h $(CXXDEFS_H) $(WARN_ON_USE_H)
+wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|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' \
@@ -2795,6 +3515,7 @@ wctype.h: wctype.in.h $(CXXDEFS_H) $(WARN_ON_USE_H)
-e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \
-e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \
-e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \
+ -e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
< $(srcdir)/wctype.in.h; \
diff --git a/lib/alloca.in.h b/lib/alloca.in.h
index 5b69c6c..72d28ee 100644
--- a/lib/alloca.in.h
+++ b/lib/alloca.in.h
@@ -1,6 +1,6 @@
/* Memory allocation on the stack.
- Copyright (C) 1995, 1999, 2001-2004, 2006-2011 Free Software Foundation,
+ Copyright (C) 1995, 1999, 2001-2004, 2006-2013 Free Software Foundation,
Inc.
This program is free software; you can redistribute it and/or modify it
@@ -14,9 +14,9 @@
General Public License for more details.
You should have received a copy of the GNU General Public
- License along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- USA. */
+ License along with this program; if not, see
+ <http://www.gnu.org/licenses/>.
+ */
/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H
means there is a real alloca function. */
@@ -44,6 +44,13 @@
# define alloca _alloca
# elif defined __DECC && defined __VMS
# define alloca __ALLOCA
+# elif defined __TANDEM && defined _TNS_E_TARGET
+# ifdef __cplusplus
+extern "C"
+# endif
+void *_alloca (unsigned short);
+# pragma intrinsic (_alloca)
+# define alloca _alloca
# else
# include <stddef.h>
# ifdef __cplusplus
diff --git a/lib/asnprintf.c b/lib/asnprintf.c
index e4fd95c..76e228d 100644
--- a/lib/asnprintf.c
+++ b/lib/asnprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/asprintf.c b/lib/asprintf.c
index 2f13126..713dae1 100644
--- a/lib/asprintf.c
+++ b/lib/asprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007, 2009-2011 Free Software Foundation,
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2013 Free Software Foundation,
Inc.
This program is free software; you can redistribute it and/or modify
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/basename-lgpl.c b/lib/basename-lgpl.c
index 529bc35..9307e83 100644
--- a/lib/basename-lgpl.c
+++ b/lib/basename-lgpl.c
@@ -1,6 +1,6 @@
/* basename.c -- return the last element in a file name
- Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2011 Free Software
+ Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2013 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/basename.c b/lib/basename.c
index 90ac501..d73fd41 100644
--- a/lib/basename.c
+++ b/lib/basename.c
@@ -1,6 +1,6 @@
/* basename.c -- return the last element in a file name
- Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2011 Free Software
+ Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2013 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@@ -40,8 +40,8 @@ base_name (char const *name)
if (ISSLASH (base[length]))
length++;
- /* On systems with drive letters, `a/b:c' must return `./b:c' rather
- than `b:c' to avoid confusion with a drive letter. On systems
+ /* On systems with drive letters, "a/b:c" must return "./b:c" rather
+ than "b:c" to avoid confusion with a drive letter. On systems
with pure POSIX semantics, this is not an issue. */
if (FILE_SYSTEM_PREFIX_LEN (base))
{
diff --git a/lib/binary-io.c b/lib/binary-io.c
new file mode 100644
index 0000000..8bbdb44
--- /dev/null
+++ b/lib/binary-io.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define BINARY_IO_INLINE _GL_EXTERN_INLINE
+#include "binary-io.h"
diff --git a/lib/binary-io.h b/lib/binary-io.h
index c09dbf5..423c2ae 100644
--- a/lib/binary-io.h
+++ b/lib/binary-io.h
@@ -1,5 +1,5 @@
/* Binary mode I/O.
- Copyright (C) 2001, 2003, 2005, 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2005, 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -25,28 +25,51 @@
so we include it here first. */
#include <stdio.h>
-/* SET_BINARY (fd);
- changes the file descriptor fd to perform binary I/O. */
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef BINARY_IO_INLINE
+# define BINARY_IO_INLINE _GL_INLINE
+#endif
+
+/* set_binary_mode (fd, mode)
+ sets the binary/text I/O mode of file descriptor fd to the given mode
+ (must be O_BINARY or O_TEXT) and returns the previous mode. */
#if O_BINARY
# if defined __EMX__ || defined __DJGPP__ || defined __CYGWIN__
# include <io.h> /* declares setmode() */
+# define set_binary_mode setmode
# else
-# define setmode _setmode
+# define set_binary_mode _setmode
# undef fileno
# define fileno _fileno
# endif
-# ifdef __DJGPP__
-# include <unistd.h> /* declares isatty() */
- /* Avoid putting stdin/stdout in binary mode if it is connected to
- the console, because that would make it impossible for the user
- to interrupt the program through Ctrl-C or Ctrl-Break. */
-# define SET_BINARY(fd) ((void) (!isatty (fd) ? (setmode (fd, O_BINARY), 0) : 0))
-# else
-# define SET_BINARY(fd) ((void) setmode (fd, O_BINARY))
-# endif
#else
- /* On reasonable systems, binary I/O is the default. */
-# define SET_BINARY(fd) /* do nothing */ ((void) 0)
+ /* On reasonable systems, binary I/O is the only choice. */
+ /* Use a function rather than a macro, to avoid gcc warnings
+ "warning: statement with no effect". */
+BINARY_IO_INLINE int
+set_binary_mode (int fd, int mode)
+{
+ (void) fd;
+ (void) mode;
+ return O_BINARY;
+}
#endif
+/* SET_BINARY (fd);
+ changes the file descriptor fd to perform binary I/O. */
+#ifdef __DJGPP__
+# include <unistd.h> /* declares isatty() */
+ /* Avoid putting stdin/stdout in binary mode if it is connected to
+ the console, because that would make it impossible for the user
+ to interrupt the program through Ctrl-C or Ctrl-Break. */
+# define SET_BINARY(fd) ((void) (!isatty (fd) ? (set_binary_mode (fd, O_BINARY), 0) : 0))
+#else
+# define SET_BINARY(fd) ((void) set_binary_mode (fd, O_BINARY))
+#endif
+
+_GL_INLINE_HEADER_END
+
#endif /* _BINARY_H */
diff --git a/lib/btowc.c b/lib/btowc.c
index 9b3908d..6c7cbec 100644
--- a/lib/btowc.c
+++ b/lib/btowc.c
@@ -1,5 +1,5 @@
/* Convert unibyte character to wide character.
- Copyright (C) 2008, 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2010-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/c-ctype.c b/lib/c-ctype.c
index 0fb4295..752d2e3 100644
--- a/lib/c-ctype.c
+++ b/lib/c-ctype.c
@@ -1,6 +1,6 @@
/* Character handling in C locale.
- Copyright 2000-2003, 2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright 2000-2003, 2006, 2009-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -13,8 +13,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software Foundation,
-Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/c-ctype.h b/lib/c-ctype.h
index 57e71ee..ad589b5 100644
--- a/lib/c-ctype.h
+++ b/lib/c-ctype.h
@@ -5,7 +5,7 @@
<ctype.h> functions' behaviour depends on the current locale set via
setlocale.
- Copyright (C) 2000-2003, 2006, 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2000-2003, 2006, 2008-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -18,8 +18,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software Foundation,
-Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+along with this program; if not, see <http://www.gnu.org/licenses/>. */
#ifndef C_CTYPE_H
#define C_CTYPE_H
@@ -118,26 +117,27 @@ extern "C" {
if (c_isalpha (*s)) ...
*/
-extern bool c_isascii (int c); /* not locale dependent */
+extern bool c_isascii (int c) _GL_ATTRIBUTE_CONST; /* not locale dependent */
-extern bool c_isalnum (int c);
-extern bool c_isalpha (int c);
-extern bool c_isblank (int c);
-extern bool c_iscntrl (int c);
-extern bool c_isdigit (int c);
-extern bool c_islower (int c);
-extern bool c_isgraph (int c);
-extern bool c_isprint (int c);
-extern bool c_ispunct (int c);
-extern bool c_isspace (int c);
-extern bool c_isupper (int c);
-extern bool c_isxdigit (int c);
+extern 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);
-extern int c_toupper (int c);
+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
+#if (defined __GNUC__ && !defined __STRICT_ANSI__ && defined __OPTIMIZE__ \
+ && !defined __OPTIMIZE_SIZE__ && !defined NO_C_CTYPE_MACROS)
/* ASCII optimizations. */
diff --git a/lib/c-stack.c b/lib/c-stack.c
index 7f0f488..03db242 100644
--- a/lib/c-stack.c
+++ b/lib/c-stack.c
@@ -1,6 +1,6 @@
/* Stack overflow handling.
- Copyright (C) 2002, 2004, 2006, 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2006, 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -104,8 +104,7 @@ static char const * volatile stack_overflow_message;
appears to have been a stack overflow, or with a core dump
otherwise. This function is async-signal-safe. */
-static void die (int) __attribute__ ((noreturn));
-static void
+static _Noreturn void
die (int signo)
{
char const *message;
@@ -182,9 +181,7 @@ static int segv_handler (void *address __attribute__ ((unused)),
/* Handle a segmentation violation that is likely to be a stack
overflow and exit. This function is async-signal-safe. */
-static void overflow_handler (int, stackoverflow_context_t)
- __attribute__ ((noreturn));
-static void
+static _Noreturn void
overflow_handler (int emergency,
stackoverflow_context_t context __attribute__ ((unused)))
{
@@ -223,29 +220,12 @@ c_stack_action (void (*action) (int))
#elif HAVE_SIGALTSTACK && HAVE_DECL_SIGALTSTACK && HAVE_STACK_OVERFLOW_HANDLING
-/* Direction of the C runtime stack. This function is
- async-signal-safe. */
-
-# if STACK_DIRECTION
-# define find_stack_direction(ptr) STACK_DIRECTION
-# else
-# if ! SIGINFO_WORKS || HAVE_XSI_STACK_OVERFLOW_HEURISTIC
-static int
-find_stack_direction (char const *addr)
-{
- char dummy;
- return ! addr ? find_stack_direction (&dummy) : addr < &dummy ? 1 : -1;
-}
-# endif
-# endif
-
# if SIGINFO_WORKS
/* Handle a segmentation violation and exit. This function is
async-signal-safe. */
-static void segv_handler (int, siginfo_t *, void *) __attribute__((noreturn));
-static void
+static _Noreturn void
segv_handler (int signo, siginfo_t *info,
void *context __attribute__ ((unused)))
{
@@ -257,7 +237,7 @@ segv_handler (int signo, siginfo_t *info,
Note that although both Linux and Solaris provide
sigaltstack, SA_ONSTACK, and SA_SIGINFO, currently only
- Solaris satisfies the XSI heueristic. This is because
+ Solaris satisfies the XSI heuristic. This is because
Solaris populates uc_stack with the details of the
interrupted stack, while Linux populates it with the details
of the current stack. */
@@ -266,17 +246,14 @@ segv_handler (int signo, siginfo_t *info,
if (0 < info->si_code)
{
/* If the faulting address is within the stack, or within one
- page of the stack end, assume that it is a stack
- overflow. */
+ page of the stack, assume that it is a stack overflow. */
ucontext_t const *user_context = context;
char const *stack_base = user_context->uc_stack.ss_sp;
size_t stack_size = user_context->uc_stack.ss_size;
char const *faulting_address = info->si_addr;
- size_t s = faulting_address - stack_base;
size_t page_size = sysconf (_SC_PAGESIZE);
- if (find_stack_direction (NULL) < 0)
- s += page_size;
- if (s < stack_size + page_size)
+ size_t s = faulting_address - stack_base + page_size;
+ if (s < stack_size + 2 * page_size)
signo = 0;
# if DEBUG
diff --git a/lib/c-stack.h b/lib/c-stack.h
index 5aadfb5..2e61bdf 100644
--- a/lib/c-stack.h
+++ b/lib/c-stack.h
@@ -1,6 +1,6 @@
/* Stack overflow handling.
- Copyright (C) 2002, 2004, 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/c-strcase.h b/lib/c-strcase.h
index 4148c34..49e1bb0 100644
--- a/tests/c-strcase.h
+++ b/lib/c-strcase.h
@@ -1,5 +1,5 @@
/* Case-insensitive string comparison functions in C locale.
- Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2011 Free Software
+ Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2013 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#ifndef C_STRCASE_H
#define C_STRCASE_H
@@ -40,12 +39,13 @@ extern "C" {
/* Compare strings S1 and S2, ignoring case, returning less than, equal to or
greater than zero if S1 is lexicographically less than, equal to or greater
than S2. */
-extern int c_strcasecmp (const char *s1, const char *s2);
+extern int c_strcasecmp (const char *s1, const char *s2) _GL_ATTRIBUTE_PURE;
/* Compare no more than N characters of strings S1 and S2, ignoring case,
returning less than, equal to or greater than zero if S1 is
lexicographically less than, equal to or greater than S2. */
-extern int c_strncasecmp (const char *s1, const char *s2, size_t n);
+extern int c_strncasecmp (const char *s1, const char *s2, size_t n)
+ _GL_ATTRIBUTE_PURE;
#ifdef __cplusplus
diff --git a/tests/c-strcasecmp.c b/lib/c-strcasecmp.c
index 4c4e106..ef85f0e 100644
--- a/tests/c-strcasecmp.c
+++ b/lib/c-strcasecmp.c
@@ -1,5 +1,5 @@
/* c-strcasecmp.c -- case insensitive string comparator in C locale
- Copyright (C) 1998-1999, 2005-2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2005-2006, 2009-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/c-strcaseeq.h b/lib/c-strcaseeq.h
new file mode 100644
index 0000000..afdea26
--- /dev/null
+++ b/lib/c-strcaseeq.h
@@ -0,0 +1,184 @@
+/* Optimized case-insensitive string comparison in C locale.
+ Copyright (C) 2001-2002, 2007, 2009-2013 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>. */
+
+#include "c-strcase.h"
+#include "c-ctype.h"
+
+/* STRCASEEQ allows to optimize string comparison with a small literal string.
+ STRCASEEQ (s, "UTF-8", 'U','T','F','-','8',0,0,0,0)
+ is semantically equivalent to
+ c_strcasecmp (s, "UTF-8") == 0
+ just faster. */
+
+/* Help GCC to generate good code for string comparisons with
+ immediate strings. */
+#if defined (__GNUC__) && defined (__OPTIMIZE__)
+
+/* Case insensitive comparison of ASCII characters. */
+# if C_CTYPE_ASCII
+# define CASEEQ(other,upper) \
+ (c_isupper (upper) ? ((other) & ~0x20) == (upper) : (other) == (upper))
+# elif C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
+# define CASEEQ(other,upper) \
+ (c_isupper (upper) ? (other) == (upper) || (other) == (upper) - 'A' + 'a' : (other) == (upper))
+# else
+# define CASEEQ(other,upper) \
+ (c_toupper (other) == (upper))
+# endif
+
+static inline int
+strcaseeq9 (const char *s1, const char *s2)
+{
+ return c_strcasecmp (s1 + 9, s2 + 9) == 0;
+}
+
+static inline int
+strcaseeq8 (const char *s1, const char *s2, char s28)
+{
+ if (CASEEQ (s1[8], s28))
+ {
+ if (s28 == 0)
+ return 1;
+ else
+ return strcaseeq9 (s1, s2);
+ }
+ else
+ return 0;
+}
+
+static inline int
+strcaseeq7 (const char *s1, const char *s2, char s27, char s28)
+{
+ if (CASEEQ (s1[7], s27))
+ {
+ if (s27 == 0)
+ return 1;
+ else
+ return strcaseeq8 (s1, s2, s28);
+ }
+ else
+ return 0;
+}
+
+static inline int
+strcaseeq6 (const char *s1, const char *s2, char s26, char s27, char s28)
+{
+ if (CASEEQ (s1[6], s26))
+ {
+ if (s26 == 0)
+ return 1;
+ else
+ return strcaseeq7 (s1, s2, s27, s28);
+ }
+ else
+ return 0;
+}
+
+static inline int
+strcaseeq5 (const char *s1, const char *s2, char s25, char s26, char s27, char s28)
+{
+ if (CASEEQ (s1[5], s25))
+ {
+ if (s25 == 0)
+ return 1;
+ else
+ return strcaseeq6 (s1, s2, s26, s27, s28);
+ }
+ else
+ return 0;
+}
+
+static inline int
+strcaseeq4 (const char *s1, const char *s2, char s24, char s25, char s26, char s27, char s28)
+{
+ if (CASEEQ (s1[4], s24))
+ {
+ if (s24 == 0)
+ return 1;
+ else
+ return strcaseeq5 (s1, s2, s25, s26, s27, s28);
+ }
+ else
+ return 0;
+}
+
+static inline int
+strcaseeq3 (const char *s1, const char *s2, char s23, char s24, char s25, char s26, char s27, char s28)
+{
+ if (CASEEQ (s1[3], s23))
+ {
+ if (s23 == 0)
+ return 1;
+ else
+ return strcaseeq4 (s1, s2, s24, s25, s26, s27, s28);
+ }
+ else
+ return 0;
+}
+
+static inline int
+strcaseeq2 (const char *s1, const char *s2, char s22, char s23, char s24, char s25, char s26, char s27, char s28)
+{
+ if (CASEEQ (s1[2], s22))
+ {
+ if (s22 == 0)
+ return 1;
+ else
+ return strcaseeq3 (s1, s2, s23, s24, s25, s26, s27, s28);
+ }
+ else
+ return 0;
+}
+
+static inline int
+strcaseeq1 (const char *s1, const char *s2, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28)
+{
+ if (CASEEQ (s1[1], s21))
+ {
+ if (s21 == 0)
+ return 1;
+ else
+ return strcaseeq2 (s1, s2, s22, s23, s24, s25, s26, s27, s28);
+ }
+ else
+ return 0;
+}
+
+static inline int
+strcaseeq0 (const char *s1, const char *s2, char s20, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28)
+{
+ if (CASEEQ (s1[0], s20))
+ {
+ if (s20 == 0)
+ return 1;
+ else
+ return strcaseeq1 (s1, s2, s21, s22, s23, s24, s25, s26, s27, s28);
+ }
+ else
+ return 0;
+}
+
+#define STRCASEEQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \
+ strcaseeq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28)
+
+#else
+
+#define STRCASEEQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \
+ (c_strcasecmp (s1, s2) == 0)
+
+#endif
diff --git a/tests/c-strncasecmp.c b/lib/c-strncasecmp.c
index 0c433b9..04404b0 100644
--- a/tests/c-strncasecmp.c
+++ b/lib/c-strncasecmp.c
@@ -1,5 +1,5 @@
/* c-strncasecmp.c -- case insensitive string comparator in C locale
- Copyright (C) 1998-1999, 2005-2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2005-2006, 2009-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/canonicalize-lgpl.c b/lib/canonicalize-lgpl.c
index 9bfb44f..6cbd2e0 100644
--- a/lib/canonicalize-lgpl.c
+++ b/lib/canonicalize-lgpl.c
@@ -1,5 +1,5 @@
/* Return the canonical absolute name of a given file.
- Copyright (C) 1996-2011 Free Software Foundation, Inc.
+ Copyright (C) 1996-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@@ -16,15 +16,16 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _LIBC
+/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
+ optimizes away the name == NULL test below. */
+# define _GL_ARG_NONNULL(params)
+
+# define _GL_USE_STDLIB_ALLOC 1
# include <config.h>
#endif
#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 <stdlib.h>
@@ -50,6 +51,7 @@
# define __realpath realpath
# include "pathmax.h"
# include "malloca.h"
+# include "dosname.h"
# if HAVE_GETCWD
# if IN_RELOCWRAPPER
/* When building the relocatable program wrapper, use the system's getcwd
@@ -68,8 +70,6 @@
# endif
# define __readlink readlink
# define __set_errno(e) errno = (e)
-/* Use the system functions, not the gnulib overrides in this file. */
-# undef malloc
# ifndef MAXSYMLINKS
# ifdef SYMLOOP_MAX
# define MAXSYMLINKS SYMLOOP_MAX
@@ -85,10 +85,10 @@
#if !FUNC_REALPATH_WORKS || defined _LIBC
/* Return the canonical absolute name of file NAME. A canonical name
- does not contain any `.', `..' components nor any repeated path
+ does not contain any ".", ".." components nor any repeated path
separators ('/') or symlinks. All path components must exist. If
RESOLVED is null, the result is malloc'd; otherwise, if the
- canonical name is PATH_MAX chars or more, returns null with `errno'
+ canonical name is PATH_MAX chars or more, returns null with 'errno'
set to ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars,
returns the name in RESOLVED. If the name cannot be resolved and
RESOLVED is non-NULL, it contains the path of the first component
@@ -102,6 +102,7 @@ __realpath (const char *name, char *resolved)
const char *start, *end, *rpath_limit;
long int path_max;
int num_links = 0;
+ size_t prefix_len;
if (name == NULL)
{
@@ -126,7 +127,7 @@ __realpath (const char *name, char *resolved)
#else
path_max = pathconf (name, _PC_PATH_MAX);
if (path_max <= 0)
- path_max = 1024;
+ path_max = 8192;
#endif
if (resolved == NULL)
@@ -144,7 +145,11 @@ __realpath (const char *name, char *resolved)
rpath = resolved;
rpath_limit = rpath + path_max;
- if (name[0] != '/')
+ /* This is always zero for Posix hosts, but can be 2 for MS-Windows
+ and MS-DOS X:/foo/bar file names. */
+ prefix_len = FILE_SYSTEM_PREFIX_LEN (name);
+
+ if (!IS_ABSOLUTE_FILE_NAME (name))
{
if (!__getcwd (rpath, path_max))
{
@@ -152,16 +157,28 @@ __realpath (const char *name, char *resolved)
goto error;
}
dest = strchr (rpath, '\0');
+ start = name;
+ prefix_len = FILE_SYSTEM_PREFIX_LEN (rpath);
}
else
{
- rpath[0] = '/';
- dest = rpath + 1;
- if (DOUBLE_SLASH_IS_DISTINCT_ROOT && name[1] == '/')
- *dest++ = '/';
+ dest = rpath;
+ if (prefix_len)
+ {
+ memcpy (rpath, name, prefix_len);
+ dest += prefix_len;
+ }
+ *dest++ = '/';
+ if (DOUBLE_SLASH_IS_DISTINCT_ROOT)
+ {
+ if (ISSLASH (name[1]) && !ISSLASH (name[2]) && !prefix_len)
+ *dest++ = '/';
+ *dest = '\0';
+ }
+ start = name + prefix_len;
}
- for (start = end = name; *start; start = end)
+ for (end = start; *start; start = end)
{
#ifdef _LIBC
struct stat64 st;
@@ -171,11 +188,11 @@ __realpath (const char *name, char *resolved)
int n;
/* Skip sequence of multiple path-separators. */
- while (*start == '/')
+ while (ISSLASH (*start))
++start;
/* Find end of path component. */
- for (end = start; *end && *end != '/'; ++end)
+ for (end = start; *end && !ISSLASH (*end); ++end)
/* Nothing. */;
if (end - start == 0)
@@ -185,17 +202,19 @@ __realpath (const char *name, char *resolved)
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 == '/')
+ if (dest > rpath + prefix_len + 1)
+ for (--dest; dest > rpath && !ISSLASH (dest[-1]); --dest)
+ continue;
+ if (DOUBLE_SLASH_IS_DISTINCT_ROOT
+ && dest == rpath + 1 && !prefix_len
+ && ISSLASH (*dest) && !ISSLASH (dest[1]))
dest++;
}
else
{
size_t new_size;
- if (dest[-1] != '/')
+ if (!ISSLASH (dest[-1]))
*dest++ = '/';
if (dest + (end - start) >= rpath_limit)
@@ -206,7 +225,7 @@ __realpath (const char *name, char *resolved)
if (resolved)
{
__set_errno (ENAMETOOLONG);
- if (dest > rpath + 1)
+ if (dest > rpath + prefix_len + 1)
dest--;
*dest = '\0';
goto error;
@@ -296,20 +315,32 @@ __realpath (const char *name, char *resolved)
memmove (&extra_buf[n], end, len + 1);
name = end = memcpy (extra_buf, buf, n);
- if (buf[0] == '/')
+ if (IS_ABSOLUTE_FILE_NAME (buf))
{
- dest = rpath + 1; /* It's an absolute symlink */
- if (DOUBLE_SLASH_IS_DISTINCT_ROOT && buf[1] == '/')
- *dest++ = '/';
+ size_t pfxlen = FILE_SYSTEM_PREFIX_LEN (buf);
+
+ if (pfxlen)
+ memcpy (rpath, buf, pfxlen);
+ dest = rpath + pfxlen;
+ *dest++ = '/'; /* It's an absolute symlink */
+ if (DOUBLE_SLASH_IS_DISTINCT_ROOT)
+ {
+ if (ISSLASH (buf[1]) && !ISSLASH (buf[2]) && !pfxlen)
+ *dest++ = '/';
+ *dest = '\0';
+ }
+ /* Install the new prefix to be in effect hereafter. */
+ prefix_len = pfxlen;
}
else
{
/* Back up to previous component, ignore if at root
already: */
- if (dest > rpath + 1)
- while ((--dest)[-1] != '/');
+ if (dest > rpath + prefix_len + 1)
+ for (--dest; dest > rpath && !ISSLASH (dest[-1]); --dest)
+ continue;
if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rpath + 1
- && *dest == '/')
+ && ISSLASH (*dest) && !ISSLASH (dest[1]) && !prefix_len)
dest++;
}
}
@@ -320,9 +351,10 @@ __realpath (const char *name, char *resolved)
}
}
}
- if (dest > rpath + 1 && dest[-1] == '/')
+ if (dest > rpath + prefix_len + 1 && ISSLASH (dest[-1]))
--dest;
- if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rpath + 1 && *dest == '/')
+ if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rpath + 1 && !prefix_len
+ && ISSLASH (*dest) && !ISSLASH (dest[1]))
dest++;
*dest = '\0';
diff --git a/lib/clean-temp.c b/lib/clean-temp.c
index 0ac9fa0..1053312 100644
--- a/lib/clean-temp.c
+++ b/lib/clean-temp.c
@@ -1,5 +1,5 @@
/* Temporary directories and temporary files with automatic cleanup.
- Copyright (C) 2001, 2003, 2006-2007, 2009-2011 Free Software Foundation,
+ Copyright (C) 2001, 2003, 2006-2007, 2009-2013 Free Software Foundation,
Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
@@ -59,13 +59,10 @@
#define _(str) gettext (str)
-/* GNU Hurd doesn't have PATH_MAX. */
+/* GNU Hurd doesn't have PATH_MAX. Use a fallback.
+ Temporary directory names are usually not that long. */
#ifndef PATH_MAX
-# ifdef MAXPATHLEN
-# define PATH_MAX MAXPATHLEN
-# else
-# define PATH_MAX 1024
-# endif
+# define PATH_MAX 1024
#endif
#ifndef uintptr_t
@@ -559,7 +556,10 @@ cleanup_temp_dir (struct temp_dir *dir)
}
else
cleanup_list.tempdir_list[i] = NULL;
- /* Now only we can free the tmpdir->dirname and tmpdir itself. */
+ /* Now only we can free the tmpdir->dirname, tmpdir->subdirs,
+ tmpdir->files, and tmpdir itself. */
+ gl_list_free (tmpdir->files);
+ gl_list_free (tmpdir->subdirs);
free (tmpdir->dirname);
free (tmpdir);
return err;
@@ -582,10 +582,18 @@ static bool
supports_delete_on_close ()
{
static int known; /* 1 = yes, -1 = no, 0 = unknown */
+ /* M4 wants to close and later reopen a temporary file, so
+ delete-on-close must not be used. */
+ known = -1;
if (!known)
{
OSVERSIONINFO v;
+ /* According to
+ <http://msdn.microsoft.com/en-us/library/windows/desktop/ms724451(v=vs.85).aspx>
+ this structure must be initialised as follows: */
+ v.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
+
if (GetVersionEx (&v))
known = (v.dwPlatformId == VER_PLATFORM_WIN32_NT ? 1 : -1);
else
diff --git a/lib/clean-temp.h b/lib/clean-temp.h
index 07c45ab..24aeca8 100644
--- a/lib/clean-temp.h
+++ b/lib/clean-temp.h
@@ -1,5 +1,5 @@
/* Temporary directories and temporary files with automatic cleanup.
- Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2011-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
@@ -39,7 +39,16 @@ extern "C" {
This module provides support for temporary directories and temporary files
inside these temporary directories. Temporary files without temporary
- directories are not supported here. */
+ directories are not supported here. The temporary directories and files
+ are automatically cleaned up (at the latest) when the program exits or
+ dies from a fatal signal such as SIGINT, SIGTERM, SIGHUP, but not if it
+ dies from a fatal signal such as SIGQUIT, SIGKILL, or SIGABRT, SIGSEGV,
+ SIGBUS, SIGILL, SIGFPE.
+
+ For the cleanup in the normal case, programs that use this module need to
+ call 'cleanup_temp_dir' for each successful return of 'create_temp_dir'.
+ The cleanup in the case of a fatal signal such as SIGINT, SIGTERM, SIGHUP,
+ is done entirely automatically by the functions of this module. */
struct temp_dir
{
diff --git a/lib/cloexec.c b/lib/cloexec.c
index d525202..e3e42d2 100644
--- a/lib/cloexec.c
+++ b/lib/cloexec.c
@@ -1,6 +1,6 @@
/* closexec.c - set or clear the close-on-exec descriptor flag
- Copyright (C) 1991, 2004-2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 1991, 2004-2006, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -25,9 +25,9 @@
#include <fcntl.h>
#include <unistd.h>
-/* Set the `FD_CLOEXEC' flag of DESC if VALUE is true,
+/* Set the 'FD_CLOEXEC' flag of DESC if VALUE is true,
or clear the flag if VALUE is false.
- Return 0 on success, or -1 on error with `errno' set.
+ Return 0 on success, or -1 on error with 'errno' set.
Note that on MingW, this function does NOT protect DESC from being
inherited into spawned children. Instead, either use dup_cloexec
diff --git a/lib/cloexec.h b/lib/cloexec.h
index 17c8ac0..0c5935b 100644
--- a/lib/cloexec.h
+++ b/lib/cloexec.h
@@ -1,6 +1,6 @@
/* closexec.c - set or clear the close-on-exec descriptor flag
- Copyright (C) 2004, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,9 +19,9 @@
#include <stdbool.h>
-/* Set the `FD_CLOEXEC' flag of DESC if VALUE is true,
+/* Set the 'FD_CLOEXEC' flag of DESC if VALUE is true,
or clear the flag if VALUE is false.
- Return 0 on success, or -1 on error with `errno' set.
+ Return 0 on success, or -1 on error with 'errno' set.
Note that on MingW, this function does NOT protect DESC from being
inherited into spawned children. Instead, either use dup_cloexec
diff --git a/lib/close-hook.c b/lib/close-hook.c
deleted file mode 100644
index ecc5f46..0000000
--- a/lib/close-hook.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/* Hook for making the close() function extensible.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
- Written by Bruno Haible <bruno@clisp.org>, 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 <http://www.gnu.org/licenses/>. */
-
-#include <config.h>
-
-/* Specification. */
-#include "close-hook.h"
-
-#include <stdlib.h>
-#include <unistd.h>
-
-#undef close
-
-
-/* Currently, this entire code is only needed for the handling of sockets
- on native Windows platforms. */
-#if WINDOWS_SOCKETS
-
-/* The first and last link in the doubly linked list.
- Initially the list is empty. */
-static struct close_hook anchor = { &anchor, &anchor, NULL };
-
-int
-execute_close_hooks (int fd, const struct close_hook *remaining_list)
-{
- if (remaining_list == &anchor)
- /* End of list reached. */
- return close (fd);
- else
- return remaining_list->private_fn (fd, remaining_list->private_next);
-}
-
-int
-execute_all_close_hooks (int fd)
-{
- return execute_close_hooks (fd, anchor.private_next);
-}
-
-void
-register_close_hook (close_hook_fn hook, struct close_hook *link)
-{
- if (link->private_next == NULL && link->private_prev == NULL)
- {
- /* Add the link to the doubly linked list. */
- link->private_next = anchor.private_next;
- link->private_prev = &anchor;
- link->private_fn = hook;
- anchor.private_next->private_prev = link;
- anchor.private_next = link;
- }
- else
- {
- /* The link is already in use. */
- if (link->private_fn != hook)
- abort ();
- }
-}
-
-void
-unregister_close_hook (struct close_hook *link)
-{
- struct close_hook *next = link->private_next;
- struct close_hook *prev = link->private_prev;
-
- if (next != NULL && prev != NULL)
- {
- /* The link is in use. Remove it from the doubly linked list. */
- prev->private_next = next;
- next->private_prev = prev;
- /* Clear the link, to mark it unused. */
- link->private_next = NULL;
- link->private_prev = NULL;
- link->private_fn = NULL;
- }
-}
-
-#endif
diff --git a/lib/close-hook.h b/lib/close-hook.h
deleted file mode 100644
index 283bebb..0000000
--- a/lib/close-hook.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Hook for making the close() function extensible.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-
-#ifndef CLOSE_HOOK_H
-#define CLOSE_HOOK_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* Currently, this entire code is only needed for the handling of sockets
- on native Windows platforms. */
-#if WINDOWS_SOCKETS
-
-
-/* An element of the list of close hooks.
- The fields of this structure are considered private. */
-struct close_hook
-{
- /* Doubly linked list. */
- struct close_hook *private_next;
- struct close_hook *private_prev;
- /* Function that treats the types of FD that it knows about and calls
- execute_close_hooks (FD, REMAINING_LIST) as a fallback. */
- int (*private_fn) (int fd, const struct close_hook *remaining_list);
-};
-
-/* This type of function closes FD, applying special knowledge for the FD
- types it knows about, and calls execute_close_hooks (FD, REMAINING_LIST)
- for the other FD types. */
-typedef int (*close_hook_fn) (int fd, const struct close_hook *remaining_list);
-
-/* Execute the close hooks in REMAINING_LIST.
- Return 0 or -1, like close() would do. */
-extern int execute_close_hooks (int fd, const struct close_hook *remaining_list);
-
-/* Execute all close hooks.
- Return 0 or -1, like close() would do. */
-extern int execute_all_close_hooks (int fd);
-
-/* Add a function to the list of close hooks.
- The LINK variable points to a piece of memory which is guaranteed to be
- accessible until the corresponding call to unregister_close_hook. */
-extern void register_close_hook (close_hook_fn hook, struct close_hook *link);
-
-/* Removes a function from the list of close hooks. */
-extern void unregister_close_hook (struct close_hook *link);
-
-
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* CLOSE_HOOK_H */
diff --git a/lib/close-stream.c b/lib/close-stream.c
index 8819b58..d6a8692 100644
--- a/lib/close-stream.c
+++ b/lib/close-stream.c
@@ -1,6 +1,6 @@
/* Close a stream, with nicer error checking than fclose's.
- Copyright (C) 1998-2002, 2004, 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 1998-2002, 2004, 2006-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -63,7 +63,7 @@ close_stream (FILE *stream)
fclose failed, with one exception: ignore an fclose failure if
there was no previous error, no data remains to be flushed, and
fclose failed with EBADF. That can happen when a program like cp
- is invoked like this `cp a b >&-' (i.e., with standard output
+ is invoked like this 'cp a b >&-' (i.e., with standard output
closed) and doesn't generate any output (hence no previous error
and nothing to be flushed). */
diff --git a/lib/close.c b/lib/close.c
index 1c06c16..f620e54 100644
--- a/lib/close.c
+++ b/lib/close.c
@@ -1,5 +1,5 @@
/* close replacement.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,18 +19,45 @@
/* Specification. */
#include <unistd.h>
-#include "close-hook.h"
+#include <errno.h>
+
+#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)
-#undef close
{
#if WINDOWS_SOCKETS
- int retval = execute_all_close_hooks (fd);
+ int retval = execute_all_close_hooks (close_nothrow, fd);
#else
- int retval = close (fd);
+ int retval = close_nothrow (fd);
#endif
#if REPLACE_FCHDIR
diff --git a/lib/closein.c b/lib/closein.c
index beff8bb..20d5035 100644
--- a/lib/closein.c
+++ b/lib/closein.c
@@ -1,6 +1,6 @@
/* Close standard input, rewinding seekable stdin if necessary.
- Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -55,7 +55,7 @@ close_stdin_set_file_name (const char *file)
For example, POSIX requires that these two commands behave alike:
(sed -ne 1q; cat) < file
- tail -n 1 file
+ tail -n +2 file
Since close_stdin is commonly registered via 'atexit', POSIX
and the C standard both say that it should not call 'exit',
@@ -72,7 +72,7 @@ close_stdin_set_file_name (const char *file)
the removal of these files.
It's important to detect such failures and exit nonzero because many
- tools (most notably `make' and other build-management systems) depend
+ tools (most notably 'make' and other build-management systems) depend
on being able to detect failure in other tools via their exit status. */
void
@@ -82,7 +82,8 @@ close_stdin (void)
/* There is no need to flush stdin if we can determine quickly that stdin's
input buffer is empty; in this case we know that if stdin is seekable,
- fseeko (stdin, 0, SEEK_CUR) == lseek (0, 0, SEEK_CUR). */
+ (fseeko (stdin, 0, SEEK_CUR), ftello (stdin))
+ == lseek (0, 0, SEEK_CUR). */
if (freadahead (stdin) > 0)
{
/* Only attempt flush if stdin is seekable, as fflush is entitled to
diff --git a/lib/closein.h b/lib/closein.h
index 5e614d5..84bbeef 100644
--- a/lib/closein.h
+++ b/lib/closein.h
@@ -1,6 +1,6 @@
/* Close standard input, rewinding seekable stdin if necessary.
- Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/closeout.c b/lib/closeout.c
index f6cdd3f..d4d3edc 100644
--- a/lib/closeout.c
+++ b/lib/closeout.c
@@ -1,6 +1,6 @@
/* Close standard output and standard error, exiting with a diagnostic on error.
- Copyright (C) 1998-2002, 2004, 2006, 2008-2011 Free Software Foundation,
+ Copyright (C) 1998-2002, 2004, 2006, 2008-2013 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
@@ -100,7 +100,7 @@ close_stdout_set_ignore_EPIPE (bool ignore)
can bypass the removal of these files.
It's important to detect such failures and exit nonzero because many
- tools (most notably `make' and other build-management systems) depend
+ tools (most notably 'make' and other build-management systems) depend
on being able to detect failure in other tools via their exit status. */
void
diff --git a/lib/closeout.h b/lib/closeout.h
index ec8d7a6..131fe86 100644
--- a/lib/closeout.h
+++ b/lib/closeout.h
@@ -1,6 +1,6 @@
/* Close standard output and standard error.
- Copyright (C) 1998, 2000, 2003-2004, 2006, 2008-2011 Free Software
+ Copyright (C) 1998, 2000, 2003-2004, 2006, 2008-2013 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/config.charset b/lib/config.charset
index 93b5a5d..a991419 100644
--- a/lib/config.charset
+++ b/lib/config.charset
@@ -1,7 +1,7 @@
#! /bin/sh
# Output a system dependent table of character encoding aliases.
#
-# Copyright (C) 2000-2004, 2006-2011 Free Software Foundation, Inc.
+# Copyright (C) 2000-2004, 2006-2013 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,8 +14,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# with this program; if not, see <http://www.gnu.org/licenses/>.
#
# The table consists of lines of the form
# ALIAS CANONICAL
@@ -30,6 +29,8 @@
# The current list of GNU canonical charset names is as follows.
#
# name MIME? used by which systems
+# (darwin = Mac OS X, woe32 = native Windows)
+#
# ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin cygwin
# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
diff --git a/lib/config.hin b/lib/config.hin
index b4f352c..8cc1535 100644
--- a/lib/config.hin
+++ b/lib/config.hin
@@ -71,9 +71,20 @@
/* Define to 1 if fopen() fails to recognize a trailing slash. */
#undef FOPEN_TRAILING_SLASH_BUG
+/* Enable compile-time and run-time bounds-checking, and some warnings,
+ without upsetting newer glibc. */
+ #if defined __OPTIMIZE__ && __OPTIMIZE__
+ # define _FORTIFY_SOURCE 2
+ #endif
+
+
/* Define to 1 if the system's ftello function has the Solaris bug. */
#undef FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE
+/* Define to 1 if fflush is known to work on stdin as per POSIX.1-2008, 0 if
+ fflush is known to not work, -1 if unknown. */
+#undef FUNC_FFLUSH_STDIN
+
/* Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string. */
#undef FUNC_NL_LANGINFO_YESEXPR_WORKS
@@ -108,6 +119,10 @@
#undef GNULIB_FD_SAFER_FLAG
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+ whether the gnulib module fflush shall be considered present. */
+#undef GNULIB_FFLUSH
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
whether the gnulib module filenamecat shall be considered present. */
#undef GNULIB_FILENAMECAT
@@ -116,6 +131,14 @@
#undef GNULIB_FOPEN_SAFER
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+ whether the gnulib module fscanf shall be considered present. */
+#undef GNULIB_FSCANF
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+ whether the gnulib module lock shall be considered present. */
+#undef GNULIB_LOCK
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
whether the gnulib module malloc-gnu shall be considered present. */
#undef GNULIB_MALLOC_GNU
@@ -124,9 +147,21 @@
#undef GNULIB_PIPE2_SAFER
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+ whether the gnulib module scanf shall be considered present. */
+#undef GNULIB_SCANF
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+ whether the gnulib module sigpipe shall be considered present. */
+#undef GNULIB_SIGPIPE
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
whether the gnulib module snprintf shall be considered present. */
#undef GNULIB_SNPRINTF
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+ whether the gnulib module strerror shall be considered present. */
+#undef GNULIB_STRERROR
+
/* Define to 1 when the gnulib module btowc should be tested. */
#undef GNULIB_TEST_BTOWC
@@ -134,12 +169,21 @@
*/
#undef GNULIB_TEST_CANONICALIZE_FILE_NAME
+/* Define to 1 when the gnulib module chdir should be tested. */
+#undef GNULIB_TEST_CHDIR
+
/* Define to 1 when the gnulib module cloexec should be tested. */
#undef GNULIB_TEST_CLOEXEC
/* Define to 1 when the gnulib module close should be tested. */
#undef GNULIB_TEST_CLOSE
+/* Define to 1 when the gnulib module closedir should be tested. */
+#undef GNULIB_TEST_CLOSEDIR
+
+/* Define to 1 when the gnulib module dup should be tested. */
+#undef GNULIB_TEST_DUP
+
/* Define to 1 when the gnulib module dup2 should be tested. */
#undef GNULIB_TEST_DUP2
@@ -152,6 +196,9 @@
/* Define to 1 when the gnulib module fcntl should be tested. */
#undef GNULIB_TEST_FCNTL
+/* Define to 1 when the gnulib module fdopen should be tested. */
+#undef GNULIB_TEST_FDOPEN
+
/* Define to 1 when the gnulib module fflush should be tested. */
#undef GNULIB_TEST_FFLUSH
@@ -167,15 +214,24 @@
/* Define to 1 when the gnulib module frexpl should be tested. */
#undef GNULIB_TEST_FREXPL
+/* Define to 1 when the gnulib module fseek should be tested. */
+#undef GNULIB_TEST_FSEEK
+
/* Define to 1 when the gnulib module fseeko should be tested. */
#undef GNULIB_TEST_FSEEKO
+/* Define to 1 when the gnulib module fstat should be tested. */
+#undef GNULIB_TEST_FSTAT
+
/* Define to 1 when the gnulib module ftell should be tested. */
#undef GNULIB_TEST_FTELL
/* Define to 1 when the gnulib module ftello should be tested. */
#undef GNULIB_TEST_FTELLO
+/* Define to 1 when the gnulib module getcwd should be tested. */
+#undef GNULIB_TEST_GETCWD
+
/* Define to 1 when the gnulib module getdtablesize should be tested. */
#undef GNULIB_TEST_GETDTABLESIZE
@@ -191,6 +247,9 @@
/* Define to 1 when the gnulib module link should be tested. */
#undef GNULIB_TEST_LINK
+/* Define to 1 when the gnulib module localeconv should be tested. */
+#undef GNULIB_TEST_LOCALECONV
+
/* Define to 1 when the gnulib module lseek should be tested. */
#undef GNULIB_TEST_LSEEK
@@ -224,6 +283,9 @@
/* Define to 1 when the gnulib module open should be tested. */
#undef GNULIB_TEST_OPEN
+/* Define to 1 when the gnulib module opendir should be tested. */
+#undef GNULIB_TEST_OPENDIR
+
/* Define to 1 when the gnulib module pipe2 should be tested. */
#undef GNULIB_TEST_PIPE2
@@ -269,9 +331,15 @@
/* Define to 1 when the gnulib module putenv should be tested. */
#undef GNULIB_TEST_PUTENV
+/* Define to 1 when the gnulib module raise should be tested. */
+#undef GNULIB_TEST_RAISE
+
/* Define to 1 when the gnulib module rawmemchr should be tested. */
#undef GNULIB_TEST_RAWMEMCHR
+/* Define to 1 when the gnulib module readdir should be tested. */
+#undef GNULIB_TEST_READDIR
+
/* Define to 1 when the gnulib module readlink should be tested. */
#undef GNULIB_TEST_READLINK
@@ -284,6 +352,9 @@
/* Define to 1 when the gnulib module rmdir should be tested. */
#undef GNULIB_TEST_RMDIR
+/* Define to 1 when the gnulib module secure_getenv should be tested. */
+#undef GNULIB_TEST_SECURE_GETENV
+
/* Define to 1 when the gnulib module setenv should be tested. */
#undef GNULIB_TEST_SETENV
@@ -299,6 +370,9 @@
/* Define to 1 when the gnulib module sigprocmask should be tested. */
#undef GNULIB_TEST_SIGPROCMASK
+/* Define to 1 when the gnulib module sleep should be tested. */
+#undef GNULIB_TEST_SLEEP
+
/* Define to 1 when the gnulib module snprintf should be tested. */
#undef GNULIB_TEST_SNPRINTF
@@ -350,6 +424,9 @@
/* Define to 1 when the gnulib module wctomb should be tested. */
#undef GNULIB_TEST_WCTOMB
+/* Define to 1 when the gnulib module write should be tested. */
+#undef GNULIB_TEST_WRITE
+
/* Define to 1 if you have 'alloca' after including <alloca.h>, a header that
may be supplied by this distribution. */
#undef HAVE_ALLOCA
@@ -367,14 +444,17 @@
/* Define to 1 if you have the `canonicalize_file_name' function. */
#undef HAVE_CANONICALIZE_FILE_NAME
-/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
+/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the
CoreFoundation framework. */
#undef HAVE_CFLOCALECOPYCURRENT
-/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
+/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
the CoreFoundation framework. */
#undef HAVE_CFPREFERENCESCOPYAPPVALUE
+/* Define to 1 if you have the `closedir' function. */
+#undef HAVE_CLOSEDIR
+
/* Define to 1 if you have the `confstr' function. */
#undef HAVE_CONFSTR
@@ -470,6 +550,14 @@
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 `program_invocation_name', and
to 0 if you don't. */
#undef HAVE_DECL_PROGRAM_INVOCATION_NAME
@@ -494,6 +582,10 @@
don't. */
#undef HAVE_DECL_SIGALTSTACK
+/* Define to 1 if you have the declaration of `sleep', and to 0 if you don't.
+ */
+#undef HAVE_DECL_SLEEP
+
/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
don't. */
#undef HAVE_DECL_SNPRINTF
@@ -502,10 +594,6 @@
*/
#undef HAVE_DECL_STRDUP
-/* Define to 1 if you have the declaration of `strerror', and to 0 if you
- don't. */
-#undef HAVE_DECL_STRERROR
-
/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
don't. */
#undef HAVE_DECL_STRERROR_R
@@ -522,22 +610,30 @@
don't. */
#undef HAVE_DECL_STRSIGNAL
-/* Define to 1 if you have the declaration of `strtod', and to 0 if you don't.
- */
-#undef HAVE_DECL_STRTOD
-
/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you
don't. */
#undef HAVE_DECL_SYS_SIGLIST
+/* 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 `_putenv', and to 0 if you
+ don't. */
+#undef HAVE_DECL__PUTENV
+
/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you
don't. */
#undef HAVE_DECL__SNPRINTF
@@ -546,11 +642,10 @@
don't. */
#undef HAVE_DECL__SYS_SIGLIST
-/* Define to 1 if you have the declaration of `__fpending', and to 0 if you
- don't. */
-#undef HAVE_DECL___FPENDING
+/* Define to 1 if you have the <dirent.h> header file. */
+#undef HAVE_DIRENT_H
-/* Define to 1 if you have the `dup2' function. */
+/* Define to 1 if you have the 'dup2' function. */
#undef HAVE_DUP2
/* Define if you have the declaration of environ. */
@@ -592,11 +687,6 @@
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
-/* Define to 1 if the compiler supports one of the keywords 'inline',
- '__inline__', '__inline' and effectively inlines functions marked as such.
- */
-#undef HAVE_INLINE
-
/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
#undef HAVE_INTMAX_T
@@ -619,6 +709,9 @@
/* Define if the isnan(long double) function is available in libc. */
#undef HAVE_ISNANL_IN_LIBC
+/* Define to 1 if you have the `issetugid' function. */
+#undef HAVE_ISSETUGID
+
/* Define to 1 if you have the `iswcntrl' function. */
#undef HAVE_ISWCNTRL
@@ -678,9 +771,6 @@
/* Define to 1 if <wchar.h> declares mbstate_t. */
#undef HAVE_MBSTATE_T
-/* Define to 1 if you have the `memchr' function. */
-#undef HAVE_MEMCHR
-
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
@@ -696,6 +786,10 @@
/* 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
@@ -705,12 +799,12 @@
/* Define to 1 if libc includes obstacks. */
#undef HAVE_OBSTACK
+/* Define to 1 if you have the `opendir' function. */
+#undef HAVE_OPENDIR
+
/* Define to 1 if you have the <OS.h> header file. */
#undef HAVE_OS_H
-/* Define to 1 if you have the `pathconf' function. */
-#undef HAVE_PATHCONF
-
/* Define to 1 if you have the <paths.h> header file. */
#undef HAVE_PATHS_H
@@ -735,15 +829,24 @@
/* Define if the POSIX multithreading library has read/write locks. */
#undef HAVE_PTHREAD_RWLOCK
+/* Define to 1 if you have the `raise' function. */
+#undef HAVE_RAISE
+
/* Define to 1 if you have the `rawmemchr' function. */
#undef HAVE_RAWMEMCHR
+/* Define to 1 if you have the `readdir' function. */
+#undef HAVE_READDIR
+
/* Define to 1 if you have the `readlink' function. */
#undef HAVE_READLINK
/* Define to 1 if you have the `realpath' function. */
#undef HAVE_REALPATH
+/* Define to 1 if 'long double' and 'double' have the same representation. */
+#undef HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
+
/* Define to 1 if you have the <sched.h> header file. */
#undef HAVE_SCHED_H
@@ -756,6 +859,9 @@
/* Define to 1 if you have the <search.h> header file. */
#undef HAVE_SEARCH_H
+/* Define to 1 if you have the `secure_getenv' function. */
+#undef HAVE_SECURE_GETENV
+
/* Define to 1 if you have the `setegid' function. */
#undef HAVE_SETEGID
@@ -798,6 +904,9 @@
/* Define to 1 if the system has the type `sig_atomic_t'. */
#undef HAVE_SIG_ATOMIC_T
+/* Define to 1 if you have the `sleep' function. */
+#undef HAVE_SLEEP
+
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
@@ -853,8 +962,8 @@
/* Define to 1 if you have the `strsignal' function. */
#undef HAVE_STRSIGNAL
-/* Define to 1 if you have the `strtol' function. */
-#undef HAVE_STRTOL
+/* Define to 1 if `decimal_point' is a member of `struct lconv'. */
+#undef HAVE_STRUCT_LCONV_DECIMAL_POINT
/* Define to 1 if `sa_sigaction' is a member of `struct sigaction'. */
#undef HAVE_STRUCT_SIGACTION_SA_SIGACTION
@@ -892,6 +1001,9 @@
/* Define to 1 if you have the <sys/wait.h> 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
@@ -904,7 +1016,7 @@
/* Define to 1 if you have the `unsetenv' function. */
#undef HAVE_UNSETENV
-/* Define to 1 if the system has the type `unsigned long long int'. */
+/* Define to 1 if the system has the type 'unsigned long long int'. */
#undef HAVE_UNSIGNED_LONG_LONG_INT
/* Define to 1 if you have the `uselocale' function. */
@@ -958,6 +1070,10 @@
/* Define to 1 if O_NOFOLLOW works. */
#undef HAVE_WORKING_O_NOFOLLOW
+/* Define if you have the posix_spawn and posix_spawnp functions and they
+ work. */
+#undef HAVE_WORKING_POSIX_SPAWN
+
/* Define to 1 if you have the <xlocale.h> header file. */
#undef HAVE_XLOCALE_H
@@ -972,15 +1088,24 @@
/* Define to 1 if the system has the type `_Bool'. */
#undef HAVE__BOOL
+/* Define to 1 if you have the `_fseeki64' function. */
+#undef HAVE__FSEEKI64
+
+/* Define to 1 if you have the `_ftelli64' function. */
+#undef HAVE__FTELLI64
+
/* Define to 1 if you have the `_ftime' function. */
#undef HAVE__FTIME
-/* Define to 1 if you have the `__fpending' function. */
-#undef HAVE___FPENDING
+/* Define to 1 if you have the `_set_invalid_parameter_handler' function. */
+#undef HAVE__SET_INVALID_PARAMETER_HANDLER
/* Define to 1 if you have the `__fpurge' function. */
#undef HAVE___FPURGE
+/* Define to 1 if you have the `__freadahead' function. */
+#undef HAVE___FREADAHEAD
+
/* Define to 1 if you have the `__freading' function. */
#undef HAVE___FREADING
@@ -1004,7 +1129,7 @@
/* Define to 1 if lseek does not detect pipes. */
#undef LSEEK_PIPE_BROKEN
-/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
+/* Define to 1 if 'lstat' dereferences a symlink specified with a trailing
slash. */
#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
@@ -1077,9 +1202,6 @@
large precisions without arbitrary bounds. */
#undef NEED_PRINTF_UNBOUNDED_PRECISION
-/* Define to 1 if your C compiler doesn't accept -c and -o together. */
-#undef NO_MINUS_C_MINUS_O
-
/* Define to 1 if open() fails to recognize a trailing slash. */
#undef OPEN_TRAILING_SLASH_BUG
@@ -1113,9 +1235,12 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
-/* the number of pending output bytes on stream `fp' */
+/* the number of pending output bytes on stream 'fp' */
#undef PENDING_OUTPUT_N_BYTES
+/* Define if <inttypes.h> 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
@@ -1160,8 +1285,8 @@
/* Define if nl_langinfo exists but is overridden by gnulib. */
#undef REPLACE_NL_LANGINFO
-/* Define this to 1 if strerror is broken. */
-#undef REPLACE_STRERROR
+/* Define to 1 if strerror(0) does not return a message implying success. */
+#undef REPLACE_STRERROR_0
/* Define if vasnprintf exists but is overridden by gnulib. */
#undef REPLACE_VASNPRINTF
@@ -1208,6 +1333,10 @@
/* Shell used by syscmd and esyscmd, must accept -c argument. */
#undef SYSCMD_SHELL
+/* Define to the prefix of C symbols at the assembler and linker level, either
+ an underscore or empty. */
+#undef USER_LABEL_PREFIX
+
/* Define if the POSIX multithreading library can be used. */
#undef USE_POSIX_THREADS
@@ -1229,13 +1358,45 @@
made weak. */
#undef USE_SOLARIS_THREADS_WEAK
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable general extensions on OS X. */
+#ifndef _DARWIN_C_SOURCE
+# undef _DARWIN_C_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable X/Open extensions if necessary. HP-UX 11.11 defines
+ mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of
+ whether compiling with -Ae or -D_HPUX_SOURCE=1. */
+#ifndef _XOPEN_SOURCE
+# undef _XOPEN_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
/* Define to 1 if you want getc etc. to use unlocked I/O if available.
Unlocked I/O can improve performance in unithreaded apps, but it is not
safe for multithreaded apps. */
#undef USE_UNLOCKED_IO
-/* Define if the Win32 multithreading API can be used. */
-#undef USE_WIN32_THREADS
+/* Define if the native Windows multithreading API can be used. */
+#undef USE_WINDOWS_THREADS
/* Version number of package */
#undef VERSION
@@ -1266,11 +1427,15 @@
# endif
#endif
+/* Enable large inode numbers on Mac OS X 10.5. */
+#undef _DARWIN_USE_64_BIT_INODE
+
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
-/* enable compile-time and run-time bounds-checking, and some warnings */
-#undef _FORTIFY_SOURCE
+/* Define to 1 if Gnulib overrides 'struct stat' on Windows so that struct
+ stat.st_size becomes 64-bit. */
+#undef _GL_WINDOWS_64_BIT_ST_SIZE
/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
#undef _LARGEFILE_SOURCE
@@ -1278,47 +1443,115 @@
/* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES
+/* Define to 1 on Solaris. */
+#undef _LCONV_C99
+
/* Define to 1 if on MINIX. */
#undef _MINIX
+/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */
+#undef _NETBSD_SOURCE
+
+/* The _Noreturn keyword of C11. */
+#if ! (defined _Noreturn \
+ || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
+# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
+ || 0x5110 <= __SUNPRO_C)
+# define _Noreturn __attribute__ ((__noreturn__))
+# elif defined _MSC_VER && 1200 <= _MSC_VER
+# define _Noreturn __declspec (noreturn)
+# else
+# define _Noreturn
+# endif
+#endif
+
+
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
#undef _POSIX_1_SOURCE
-/* Define to 1 if you need to in order for `stat' and other things to work. */
+/* Define to 1 if you need to in order for 'stat' and other things to work. */
#undef _POSIX_SOURCE
+/* Define if you want <regex.h> to include <limits.h>, so that it consistently
+ overrides <limits.h>'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
+/* Define to rpl_ if the getopt replacement functions and variables should be
+ used. */
+#undef __GETOPT_PREFIX
-/* Enable extensions on AIX 3, Interix. */
-#ifndef _ALL_SOURCE
-# undef _ALL_SOURCE
-#endif
-/* Enable GNU extensions on systems that have them. */
-#ifndef _GNU_SOURCE
-# undef _GNU_SOURCE
-#endif
-/* Enable threading extensions on Solaris. */
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# undef _POSIX_PTHREAD_SEMANTICS
+/* Please see the Gnulib manual for how to use these macros.
+
+ Suppress extern inline with HP-UX cc, as it appears to be broken; see
+ <http://lists.gnu.org/archive/html/bug-texinfo/2013-02/msg00030.html>.
+
+ Suppress extern inline with Sun C in standards-conformance mode, as it
+ mishandles inline functions that call each other. E.g., for 'inline void f
+ (void) { } inline void g (void) { f (); }', c99 incorrectly complains
+ 'reference to static identifier "f" in extern inline function'.
+ This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
+
+ Suppress the use of extern inline on problematic Apple configurations, as
+ Libc at least through Libc-825.26 (2013-04-09) mishandles it; see, e.g.,
+ <http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
+ Perhaps Apple will fix this some day. */
+#if (defined __APPLE__ \
+ && ((! defined _DONT_USE_CTYPE_INLINE_ \
+ && (defined __GNUC__ || defined __cplusplus)) \
+ || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
+ && defined __GNUC__ && ! defined __cplusplus)))
+# define _GL_EXTERN_INLINE_APPLE_BUG
#endif
-/* Enable extensions on HP NonStop. */
-#ifndef _TANDEM_SOURCE
-# undef _TANDEM_SOURCE
-#endif
-/* Enable general extensions on Solaris. */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
+#if ((__GNUC__ \
+ ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
+ : (199901L <= __STDC_VERSION__ \
+ && !defined __HP_cc \
+ && !(defined __SUNPRO_C && __STDC__))) \
+ && !defined _GL_EXTERN_INLINE_APPLE_BUG)
+# define _GL_INLINE inline
+# define _GL_EXTERN_INLINE extern inline
+# define _GL_EXTERN_INLINE_IN_USE
+#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
+ && !defined _GL_EXTERN_INLINE_APPLE_BUG)
+# if __GNUC_GNU_INLINE__
+ /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
+# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
+# else
+# define _GL_INLINE extern inline
+# endif
+# define _GL_EXTERN_INLINE extern
+# define _GL_EXTERN_INLINE_IN_USE
+#else
+# define _GL_INLINE static _GL_UNUSED
+# define _GL_EXTERN_INLINE static _GL_UNUSED
#endif
-
-/* Define to rpl_ if the getopt replacement functions and variables should be
- used. */
-#undef __GETOPT_PREFIX
+#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
+# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
+# define _GL_INLINE_HEADER_CONST_PRAGMA
+# else
+# define _GL_INLINE_HEADER_CONST_PRAGMA \
+ _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"")
+# endif
+ /* Suppress GCC's bogus "no previous prototype for 'FOO'"
+ and "no previous declaration for 'FOO'" diagnostics,
+ when FOO is an inline function in the header; see
+ <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>. */
+# define _GL_INLINE_HEADER_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
+ _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \
+ _GL_INLINE_HEADER_CONST_PRAGMA
+# define _GL_INLINE_HEADER_END \
+ _Pragma ("GCC diagnostic pop")
+#else
+# define _GL_INLINE_HEADER_BEGIN
+# define _GL_INLINE_HEADER_END
+#endif
/* Define to `int' if <sys/types.h> doesn't define. */
#undef gid_t
@@ -1341,7 +1574,7 @@
/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
- __APPLE__ && __MACH__ test for MacOS X.
+ __APPLE__ && __MACH__ test for Mac OS X.
__APPLE_CC__ tests for the Apple compiler and its version.
__STDC_VERSION__ tests for the C99 mode. */
#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
@@ -1360,6 +1593,9 @@
/* Define to the type of st_nlink in struct stat, or a supertype. */
#undef nlink_t
+/* Define to `int' if <sys/types.h> 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
@@ -1424,7 +1660,7 @@
#endif
/* Define as an integer type suitable for memory locations that can be
- accessed atomically even in the presence of asynchnonous signals. */
+ accessed atomically even in the presence of asynchronous signals. */
#undef sig_atomic_t
/* Define to `unsigned int' if <sys/types.h> does not define. */
@@ -1448,6 +1684,20 @@
is a misnomer outside of parameter lists. */
#define _UNUSED_PARAMETER_ _GL_UNUSED
+/* The __pure__ attribute was added in gcc 2.96. */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#else
+# define _GL_ATTRIBUTE_PURE /* empty */
+#endif
+
+/* The __const__ attribute was added in gcc 2.95. */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
+# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
+#else
+# define _GL_ATTRIBUTE_CONST /* empty */
+#endif
+
/* Define as a macro for copying va_list variables. */
#undef va_copy
diff --git a/lib/dirname-lgpl.c b/lib/dirname-lgpl.c
index f5b0c0f..82f6630 100644
--- a/lib/dirname-lgpl.c
+++ b/lib/dirname-lgpl.c
@@ -1,6 +1,6 @@
/* dirname.c -- return all but the last element in a file name
- Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2011 Free Software
+ Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2013 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@@ -25,7 +25,7 @@
/* Return the length of the prefix of FILE that will be used by
dir_name. If FILE is in the working directory, this returns zero
- even though `dir_name (FILE)' will return ".". Works properly even
+ even though 'dir_name (FILE)' will return ".". Works properly even
if there are trailing slashes (by effectively ignoring them). */
size_t
@@ -53,9 +53,9 @@ dir_len (char const *file)
}
-/* In general, we can't use the builtin `dirname' function if available,
+/* In general, we can't use the builtin 'dirname' function if available,
since it has different meanings in different environments.
- In some environments the builtin `dirname' modifies its argument.
+ In some environments the builtin 'dirname' modifies its argument.
Return the leading directories part of FILE, allocated with malloc.
Works properly even if there are trailing slashes (by effectively
diff --git a/lib/dirname.c b/lib/dirname.c
index 411ded3..1fb6588 100644
--- a/lib/dirname.c
+++ b/lib/dirname.c
@@ -1,6 +1,6 @@
/* dirname.c -- return all but the last element in a file name
- Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2011 Free Software
+ Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2013 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/dirname.h b/lib/dirname.h
index 2ef9882..4ad0312 100644
--- a/lib/dirname.h
+++ b/lib/dirname.h
@@ -1,6 +1,6 @@
/* Take file names apart into directory and base names.
- Copyright (C) 1998, 2001, 2003-2006, 2009-2011 Free Software Foundation,
+ Copyright (C) 1998, 2001, 2003-2006, 2009-2013 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
@@ -37,9 +37,9 @@ char *dir_name (char const *file);
# endif
char *mdir_name (char const *file);
-size_t base_len (char const *file);
-size_t dir_len (char const *file);
-char *last_component (char const *file);
+size_t base_len (char const *file) _GL_ATTRIBUTE_PURE;
+size_t dir_len (char const *file) _GL_ATTRIBUTE_PURE;
+char *last_component (char const *file) _GL_ATTRIBUTE_PURE;
bool strip_trailing_slashes (char *file);
diff --git a/lib/dosname.h b/lib/dosname.h
index acdd03b..ba63ce4 100644
--- a/lib/dosname.h
+++ b/lib/dosname.h
@@ -1,6 +1,6 @@
/* File names on MS-DOS/Windows systems.
- Copyright (C) 2000-2001, 2004-2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2000-2001, 2004-2006, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/dup-safer-flag.c b/lib/dup-safer-flag.c
index e922b91..8a09821 100644
--- a/lib/dup-safer-flag.c
+++ b/lib/dup-safer-flag.c
@@ -1,7 +1,7 @@
/* Duplicate a file descriptor result, avoiding clobbering
STD{IN,OUT,ERR}_FILENO, with specific flags.
- Copyright (C) 2001, 2004-2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2004-2006, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -26,8 +26,6 @@
#include <fcntl.h>
#include <unistd.h>
-#include "cloexec.h"
-
/* Like dup, but do not return STDIN_FILENO, STDOUT_FILENO, or
STDERR_FILENO. If FLAG contains O_CLOEXEC, behave like
fcntl(F_DUPFD_CLOEXEC) rather than fcntl(F_DUPFD). */
diff --git a/lib/dup-safer.c b/lib/dup-safer.c
index 5441b96..c203107 100644
--- a/lib/dup-safer.c
+++ b/lib/dup-safer.c
@@ -1,6 +1,6 @@
/* Invoke dup, but avoid some glitches.
- Copyright (C) 2001, 2004-2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2004-2006, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/dup2.c b/lib/dup2.c
index e00dc7b..9219eb3 100644
--- a/lib/dup2.c
+++ b/lib/dup2.c
@@ -1,6 +1,6 @@
/* Duplicate an open file descriptor to a specified file descriptor.
- Copyright (C) 1999, 2004-2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2004-2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -25,21 +25,26 @@
#include <errno.h>
#include <fcntl.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* Get declarations of the Win32 API functions. */
-# define WIN32_LEAN_AND_MEAN
-# include <windows.h>
-#endif
-
#if HAVE_DUP2
# undef dup2
-int
-rpl_dup2 (int fd, int desired_fd)
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+/* Get declarations of the native Windows API functions. */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+
+# include "msvc-inval.h"
+
+/* Get _get_osfhandle. */
+# include "msvc-nothrow.h"
+
+static int
+ms_windows_dup2 (int fd, int desired_fd)
{
int result;
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
/* If fd is closed, mingw hangs on dup2 (fd, fd). If fd is open,
dup2 (fd, fd) returns 0, but all further attempts to use fd in
future dup2 calls will hang. */
@@ -52,6 +57,7 @@ rpl_dup2 (int fd, int desired_fd)
}
return fd;
}
+
/* Wine 1.0.1 return 0 when desired_fd is negative but not -1:
http://bugs.winehq.org/show_bug.cgi?id=21289 */
if (desired_fd < 0)
@@ -59,26 +65,48 @@ rpl_dup2 (int fd, int desired_fd)
errno = EBADF;
return -1;
}
-# elif !defined __linux__
- /* On Haiku, dup2 (fd, fd) mistakenly clears FD_CLOEXEC. */
- if (fd == desired_fd)
- return fcntl (fd, F_GETFL) == -1 ? -1 : fd;
-# endif
- result = dup2 (fd, desired_fd);
-# ifdef __linux__
- /* Correct a Linux return value.
- <http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.30.y.git;a=commitdiff;h=2b79bc4f7ebbd5af3c8b867968f9f15602d5f802>
- */
- if (fd == desired_fd && result == (unsigned int) -EBADF)
+
+ TRY_MSVC_INVAL
+ {
+ result = dup2 (fd, desired_fd);
+ }
+ CATCH_MSVC_INVAL
{
errno = EBADF;
result = -1;
}
-# endif
+ DONE_MSVC_INVAL;
+
if (result == 0)
result = desired_fd;
- /* Correct a cygwin 1.5.x errno value. */
- else if (result == -1 && errno == EMFILE)
+
+ return result;
+}
+
+# define dup2 ms_windows_dup2
+
+# endif
+
+int
+rpl_dup2 (int fd, int desired_fd)
+{
+ int result;
+
+# ifdef F_GETFL
+ /* On Linux kernels 2.6.26-2.6.29, dup2 (fd, fd) returns -EBADF.
+ On Cygwin 1.5.x, dup2 (1, 1) returns 0.
+ On Cygwin 1.7.17, dup2 (1, -1) dumps core.
+ On Haiku, dup2 (fd, fd) mistakenly clears FD_CLOEXEC. */
+ if (desired_fd < 0)
+ fd = desired_fd;
+ if (fd == desired_fd)
+ return fcntl (fd, F_GETFL) == -1 ? -1 : fd;
+# endif
+
+ result = dup2 (fd, desired_fd);
+
+ /* Correct an errno value on FreeBSD 6.1 and Cygwin 1.5.x. */
+ if (result == -1 && errno == EMFILE)
errno = EBADF;
# if REPLACE_FCHDIR
if (fd != desired_fd && result != -1)
diff --git a/lib/errno.in.h b/lib/errno.in.h
index a91f591..49b3546 100644
--- a/lib/errno.in.h
+++ b/lib/errno.in.h
@@ -1,6 +1,6 @@
/* A POSIX-like <errno.h>.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -13,10 +13,9 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
-#ifndef _GL_ERRNO_H
+#ifndef _@GUARD_PREFIX@_ERRNO_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
@@ -26,57 +25,125 @@
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_ERRNO_H@
-#ifndef _GL_ERRNO_H
-#define _GL_ERRNO_H
+#ifndef _@GUARD_PREFIX@_ERRNO_H
+#define _@GUARD_PREFIX@_ERRNO_H
/* On native Windows platforms, many macros are not defined. */
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* POSIX says that EAGAIN and EWOULDBLOCK may have the same value. */
-# define EWOULDBLOCK EAGAIN
-
-/* Values >= 100 seem safe to use. */
-# define ETXTBSY 100
-# define GNULIB_defined_ETXTBSY 1
+/* These are the same values as defined by MSVC 10, for interoperability. */
+
+# ifndef ENOMSG
+# define ENOMSG 122
+# define GNULIB_defined_ENOMSG 1
+# endif
+
+# ifndef EIDRM
+# define EIDRM 111
+# define GNULIB_defined_EIDRM 1
+# endif
+
+# ifndef ENOLINK
+# define ENOLINK 121
+# define GNULIB_defined_ENOLINK 1
+# endif
+
+# ifndef EPROTO
+# define EPROTO 134
+# define GNULIB_defined_EPROTO 1
+# endif
+
+# ifndef EBADMSG
+# define EBADMSG 104
+# define GNULIB_defined_EBADMSG 1
+# endif
+
+# ifndef EOVERFLOW
+# define EOVERFLOW 132
+# define GNULIB_defined_EOVERFLOW 1
+# endif
+
+# ifndef ENOTSUP
+# define ENOTSUP 129
+# define GNULIB_defined_ENOTSUP 1
+# endif
+
+# ifndef ENETRESET
+# define ENETRESET 117
+# define GNULIB_defined_ENETRESET 1
+# endif
+
+# ifndef ECONNABORTED
+# define ECONNABORTED 106
+# define GNULIB_defined_ECONNABORTED 1
+# endif
+
+# ifndef ECANCELED
+# define ECANCELED 105
+# define GNULIB_defined_ECANCELED 1
+# endif
+
+# ifndef EOWNERDEAD
+# define EOWNERDEAD 133
+# define GNULIB_defined_EOWNERDEAD 1
+# endif
+
+# ifndef ENOTRECOVERABLE
+# define ENOTRECOVERABLE 127
+# define GNULIB_defined_ENOTRECOVERABLE 1
+# endif
+
+# ifndef EINPROGRESS
+# define EINPROGRESS 112
+# define EALREADY 103
+# define ENOTSOCK 128
+# define EDESTADDRREQ 109
+# define EMSGSIZE 115
+# define EPROTOTYPE 136
+# define ENOPROTOOPT 123
+# define EPROTONOSUPPORT 135
+# define EOPNOTSUPP 130
+# define EAFNOSUPPORT 102
+# define EADDRINUSE 100
+# define EADDRNOTAVAIL 101
+# define ENETDOWN 116
+# define ENETUNREACH 118
+# define ECONNRESET 108
+# define ENOBUFS 119
+# define EISCONN 113
+# define ENOTCONN 126
+# define ETIMEDOUT 138
+# define ECONNREFUSED 107
+# define ELOOP 114
+# define EHOSTUNREACH 110
+# define EWOULDBLOCK 140
+# define GNULIB_defined_ESOCK 1
+# endif
+
+# ifndef ETXTBSY
+# define ETXTBSY 139
+# define ENODATA 120 /* not required by POSIX */
+# define ENOSR 124 /* not required by POSIX */
+# define ENOSTR 125 /* not required by POSIX */
+# define ETIME 137 /* not required by POSIX */
+# define EOTHER 131 /* not required by POSIX */
+# define GNULIB_defined_ESTREAMS 1
+# endif
/* These are intentionally the same values as the WSA* error numbers, defined
in <winsock2.h>. */
-# define EINPROGRESS 10036
-# define EALREADY 10037
-# define ENOTSOCK 10038
-# define EDESTADDRREQ 10039
-# define EMSGSIZE 10040
-# define EPROTOTYPE 10041
-# define ENOPROTOOPT 10042
-# define EPROTONOSUPPORT 10043
# define ESOCKTNOSUPPORT 10044 /* not required by POSIX */
-# define EOPNOTSUPP 10045
# define EPFNOSUPPORT 10046 /* not required by POSIX */
-# define EAFNOSUPPORT 10047
-# define EADDRINUSE 10048
-# define EADDRNOTAVAIL 10049
-# define ENETDOWN 10050
-# define ENETUNREACH 10051
-# define ENETRESET 10052
-# define ECONNABORTED 10053
-# define ECONNRESET 10054
-# define ENOBUFS 10055
-# define EISCONN 10056
-# define ENOTCONN 10057
# define ESHUTDOWN 10058 /* not required by POSIX */
# define ETOOMANYREFS 10059 /* not required by POSIX */
-# define ETIMEDOUT 10060
-# define ECONNREFUSED 10061
-# define ELOOP 10062
# define EHOSTDOWN 10064 /* not required by POSIX */
-# define EHOSTUNREACH 10065
# define EPROCLIM 10067 /* not required by POSIX */
# define EUSERS 10068 /* not required by POSIX */
# define EDQUOT 10069
# define ESTALE 10070
# define EREMOTE 10071 /* not required by POSIX */
-# define GNULIB_defined_ESOCK 1
+# define GNULIB_defined_EWINSOCK 1
# endif
@@ -147,6 +214,16 @@
# define GNULIB_defined_ENOTSUP 1
# endif
+# ifndef ENETRESET
+# define ENETRESET 2011
+# define GNULIB_defined_ENETRESET 1
+# endif
+
+# ifndef ECONNABORTED
+# define ECONNABORTED 2012
+# define GNULIB_defined_ECONNABORTED 1
+# endif
+
# ifndef ESTALE
# define ESTALE 2009
# define GNULIB_defined_ESTALE 1
@@ -162,6 +239,41 @@
# define GNULIB_defined_ECANCELED 1
# endif
+/* On many platforms, the macros EOWNERDEAD and ENOTRECOVERABLE are not
+ defined. */
+
+# ifndef EOWNERDEAD
+# if defined __sun
+ /* Use the same values as defined for Solaris >= 8, for
+ interoperability. */
+# define EOWNERDEAD 58
+# define ENOTRECOVERABLE 59
+# elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* We have a conflict here: pthreads-win32 defines these values
+ differently than MSVC 10. It's hairy to decide which one to use. */
+# if defined __MINGW32__ && !defined USE_WINDOWS_THREADS
+ /* Use the same values as defined by pthreads-win32, for
+ interoperability. */
+# define EOWNERDEAD 43
+# define ENOTRECOVERABLE 44
+# else
+ /* Use the same values as defined by MSVC 10, for
+ interoperability. */
+# define EOWNERDEAD 133
+# define ENOTRECOVERABLE 127
+# endif
+# else
+# define EOWNERDEAD 2013
+# define ENOTRECOVERABLE 2014
+# endif
+# define GNULIB_defined_EOWNERDEAD 1
+# define GNULIB_defined_ENOTRECOVERABLE 1
+# endif
+
+# ifndef EILSEQ
+# define EILSEQ 2015
+# define GNULIB_defined_EILSEQ 1
+# endif
-#endif /* _GL_ERRNO_H */
-#endif /* _GL_ERRNO_H */
+#endif /* _@GUARD_PREFIX@_ERRNO_H */
+#endif /* _@GUARD_PREFIX@_ERRNO_H */
diff --git a/lib/error.c b/lib/error.c
index a2d1c1b..865b293 100644
--- a/lib/error.c
+++ b/lib/error.c
@@ -1,5 +1,5 @@
/* Error handler for noninteractive utilities
- Copyright (C) 1990-1998, 2000-2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 1990-1998, 2000-2007, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@@ -54,7 +54,7 @@
function without parameters instead. */
void (*error_print_progname) (void);
-/* This variable is incremented each time `error' is called. */
+/* This variable is incremented each time 'error' is called. */
unsigned int error_message_count;
#ifdef _LIBC
@@ -65,7 +65,7 @@ unsigned int error_message_count;
# include <limits.h>
# include <libio/libioP.h>
-/* In GNU libc we want do not want to use the common name `error' directly.
+/* In GNU libc we want do not want to use the common name 'error' directly.
Instead make it a weak alias. */
extern void __error (int status, int errnum, const char *message, ...)
__attribute__ ((__format__ (__printf__, 3, 4)));
@@ -89,19 +89,25 @@ extern void __error_at_line (int status, int errnum, const char *file_name,
# include <unistd.h>
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* Get declarations of the Win32 API functions. */
+/* Get declarations of the native Windows API functions. */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
+/* Get _get_osfhandle. */
+# include "msvc-nothrow.h"
# endif
/* The gnulib override of fcntl is not needed in this file. */
# undef fcntl
-# if !HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P
+# if !HAVE_DECL_STRERROR_R
# ifndef HAVE_DECL_STRERROR_R
"this configure-time declaration test was not run"
# endif
+# if STRERROR_R_CHAR_P
char *strerror_r ();
+# else
+int strerror_r ();
+# endif
# endif
/* The calling program should define program_name and set it to the
@@ -115,13 +121,14 @@ extern char *program_name;
#if !_LIBC
/* Return non-zero if FD is open. */
-static inline int
+static int
is_open (int fd)
{
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
- /* On Win32: The initial state of unassigned standard file descriptors is
- that they are open but point to an INVALID_HANDLE_VALUE. There is no
- fcntl, and the gnulib replacement fcntl does not support F_GETFL. */
+ /* On native Windows: The initial state of unassigned standard file
+ descriptors is that they are open but point to an INVALID_HANDLE_VALUE.
+ There is no fcntl, and the gnulib replacement fcntl does not support
+ F_GETFL. */
return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE;
# else
# ifndef F_GETFL
@@ -132,7 +139,7 @@ is_open (int fd)
}
#endif
-static inline void
+static void
flush_stdout (void)
{
#if !_LIBC
diff --git a/lib/error.h b/lib/error.h
index 80f81bc..afcb0e1 100644
--- a/lib/error.h
+++ b/lib/error.h
@@ -1,5 +1,5 @@
/* Declaration for error-reporting function
- Copyright (C) 1995-1997, 2003, 2006, 2008-2011 Free Software Foundation,
+ Copyright (C) 1995-1997, 2003, 2006, 2008-2013 Free Software Foundation,
Inc.
This file is part of the GNU C Library.
@@ -35,9 +35,9 @@
extern "C" {
#endif
-/* Print a message with `fprintf (stderr, FORMAT, ...)';
+/* Print a message with 'fprintf (stderr, FORMAT, ...)';
if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
- If STATUS is nonzero, terminate the program with `exit (STATUS)'. */
+ If STATUS is nonzero, terminate the program with 'exit (STATUS)'. */
extern void error (int __status, int __errnum, const char *__format, ...)
_GL_ATTRIBUTE_FORMAT ((__printf__, 3, 4));
@@ -51,7 +51,7 @@ extern void error_at_line (int __status, int __errnum, const char *__fname,
function without parameters instead. */
extern void (*error_print_progname) (void);
-/* This variable is incremented each time `error' is called. */
+/* This variable is incremented each time 'error' is called. */
extern unsigned int error_message_count;
/* Sometimes we want to have at most one error per line. This
diff --git a/lib/execute.c b/lib/execute.c
index fe57e22..554d3f0 100644
--- a/lib/execute.c
+++ b/lib/execute.c
@@ -1,5 +1,5 @@
/* Creation of autonomous subprocesses.
- Copyright (C) 2001-2004, 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006-2013 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
@@ -37,7 +37,7 @@
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* Native Woe32 API. */
+/* Native Windows API. */
# include <process.h>
# include "w32spawn.h"
@@ -54,13 +54,13 @@
#undef close
-#ifdef EINTR
+#if defined EINTR && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
/* EINTR handling for close(), open().
These functions can return -1/EINTR even though we don't have any
signal handlers set up, namely when we get interrupted via SIGSTOP. */
-static inline int
+static int
nonintr_close (int fd)
{
int retval;
@@ -73,7 +73,7 @@ nonintr_close (int fd)
}
#define close nonintr_close
-static inline int
+static int
nonintr_open (const char *pathname, int oflag, mode_t mode)
{
int retval;
@@ -106,7 +106,7 @@ execute (const char *progname,
{
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
- /* Native Woe32 API. */
+ /* Native Windows API. */
int orig_stdin;
int orig_stdout;
int orig_stderr;
@@ -158,7 +158,7 @@ execute (const char *progname,
(const char **) environ);
if (exitcode < 0 && errno == ENOEXEC)
{
- /* prog is not an native executable. Try to execute it as a
+ /* prog is not a native executable. Try to execute it as a
shell script. Note that prepare_spawn() has already prepended
a hidden element "sh.exe" to prog_argv. */
--prog_argv;
diff --git a/lib/execute.h b/lib/execute.h
index 5750169..1fdc2ab 100644
--- a/lib/execute.h
+++ b/lib/execute.h
@@ -1,5 +1,5 @@
/* Creation of autonomous subprocesses.
- Copyright (C) 2001-2003, 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2008-2013 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/exitfail.c b/lib/exitfail.c
index 953aa02..b0b4ebe 100644
--- a/lib/exitfail.c
+++ b/lib/exitfail.c
@@ -1,6 +1,6 @@
/* Failure exit status
- Copyright (C) 2002-2003, 2005-2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/exitfail.h b/lib/exitfail.h
index 6d01d4f..e54333b 100644
--- a/lib/exitfail.h
+++ b/lib/exitfail.h
@@ -1,6 +1,6 @@
/* Failure exit status
- Copyright (C) 2002, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/fatal-signal.c b/lib/fatal-signal.c
index aca9027..8f7cb8e 100644
--- a/lib/fatal-signal.c
+++ b/lib/fatal-signal.c
@@ -1,5 +1,5 @@
/* Emergency actions in case of a fatal signal.
- Copyright (C) 2003-2004, 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 2003-2004, 2006-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
@@ -71,7 +71,7 @@ static int fatal_signals[] =
#ifdef SIGXFSZ
SIGXFSZ,
#endif
- /* Woe32 signals. */
+ /* Native Windows signals. */
#ifdef SIGBREAK
SIGBREAK,
#endif
@@ -131,8 +131,8 @@ static struct sigaction saved_sigactions[64];
/* Uninstall the handlers. */
-static inline void
-uninstall_handlers ()
+static void
+uninstall_handlers (void)
{
size_t i;
@@ -176,8 +176,8 @@ fatal_signal_handler (int sig)
/* Install the handlers. */
-static inline void
-install_handlers ()
+static void
+install_handlers (void)
{
size_t i;
struct sigaction action;
@@ -251,7 +251,7 @@ at_fatal_signal (action_t action)
static sigset_t fatal_signal_set;
static void
-init_fatal_signal_set ()
+init_fatal_signal_set (void)
{
static bool fatal_signal_set_initialized = false;
if (!fatal_signal_set_initialized)
@@ -271,7 +271,7 @@ init_fatal_signal_set ()
/* Temporarily delay the catchable fatal signals. */
void
-block_fatal_signals ()
+block_fatal_signals (void)
{
init_fatal_signal_set ();
sigprocmask (SIG_BLOCK, &fatal_signal_set, NULL);
@@ -279,7 +279,7 @@ block_fatal_signals ()
/* Stop delaying the catchable fatal signals. */
void
-unblock_fatal_signals ()
+unblock_fatal_signals (void)
{
init_fatal_signal_set ();
sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
diff --git a/lib/fatal-signal.h b/lib/fatal-signal.h
index 9c6aaa2..f5df78a 100644
--- a/lib/fatal-signal.h
+++ b/lib/fatal-signal.h
@@ -1,5 +1,5 @@
/* Emergency actions in case of a fatal signal.
- Copyright (C) 2003-2004, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2003-2004, 2009-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/fclose.c b/lib/fclose.c
index 1d7e85b..90ed653 100644
--- a/lib/fclose.c
+++ b/lib/fclose.c
@@ -1,5 +1,5 @@
/* fclose replacement.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -22,26 +22,89 @@
#include <errno.h>
#include <unistd.h>
-/* Override fclose() to call the overridden close(). */
+#include "freading.h"
+#include "msvc-inval.h"
+
+#undef fclose
+
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+static int
+fclose_nothrow (FILE *fp)
+{
+ int result;
+
+ TRY_MSVC_INVAL
+ {
+ result = fclose (fp);
+ }
+ CATCH_MSVC_INVAL
+ {
+ result = EOF;
+ errno = EBADF;
+ }
+ DONE_MSVC_INVAL;
+
+ return result;
+}
+#else
+# define fclose_nothrow fclose
+#endif
+
+/* Override fclose() to call the overridden fflush() or close(). */
int
rpl_fclose (FILE *fp)
-#undef fclose
{
int saved_errno = 0;
+ int fd;
+ int result = 0;
+
+ /* Don't change behavior on memstreams. */
+ fd = fileno (fp);
+ if (fd < 0)
+ return fclose_nothrow (fp);
- if (fflush (fp))
+ /* We only need to flush the file if it is not reading or if it is
+ seekable. This only guarantees the file position of input files
+ if the fflush module is also in use. */
+ if ((!freading (fp) || lseek (fileno (fp), 0, SEEK_CUR) != -1)
+ && fflush (fp))
saved_errno = errno;
- if (close (fileno (fp)) < 0 && saved_errno == 0)
+ /* fclose() calls close(), but we need to also invoke all hooks that our
+ overridden close() function invokes. See lib/close.c. */
+#if WINDOWS_SOCKETS
+ /* Call the overridden close(), then the original fclose().
+ Note about multithread-safety: There is a race condition where some
+ other thread could open fd between our close and fclose. */
+ if (close (fd) < 0 && saved_errno == 0)
saved_errno = errno;
- fclose (fp); /* will fail with errno = EBADF */
+ fclose_nothrow (fp); /* will fail with errno = EBADF,
+ if we did not lose a race */
+
+#else /* !WINDOWS_SOCKETS */
+ /* Call fclose() and invoke all hooks of the overridden close(). */
+
+# if REPLACE_FCHDIR
+ /* Note about multithread-safety: There is a race condition here as well.
+ Some other thread could open fd between our calls to fclose and
+ _gl_unregister_fd. */
+ result = fclose_nothrow (fp);
+ if (result == 0)
+ _gl_unregister_fd (fd);
+# else
+ /* No race condition here. */
+ result = fclose_nothrow (fp);
+# endif
+
+#endif /* !WINDOWS_SOCKETS */
if (saved_errno != 0)
{
errno = saved_errno;
- return EOF;
+ result = EOF;
}
- return 0;
+
+ return result;
}
diff --git a/lib/fcntl.c b/lib/fcntl.c
index d6a328c..735fa66 100644
--- a/lib/fcntl.c
+++ b/lib/fcntl.c
@@ -1,6 +1,6 @@
/* Provide file descriptor control.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -33,10 +33,13 @@
#undef fcntl
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* Get declarations of the Win32 API functions. */
+/* Get declarations of the native Windows API functions. */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
+/* Get _get_osfhandle. */
+# include "msvc-nothrow.h"
+
/* Upper bound on getdtablesize(). See lib/getdtablesize.c. */
# define OPEN_MAX_MAX 0x10000
@@ -91,7 +94,7 @@ dupfd (int oldfd, int newfd, int flags)
result = -1;
break;
}
- duplicated_fd = _open_osfhandle ((long) new_handle, flags);
+ duplicated_fd = _open_osfhandle ((intptr_t) new_handle, flags);
if (duplicated_fd < 0)
{
CloseHandle (new_handle);
diff --git a/lib/fcntl.in.h b/lib/fcntl.in.h
index 18cac45..1e45a65 100644
--- a/lib/fcntl.in.h
+++ b/lib/fcntl.in.h
@@ -1,6 +1,6 @@
/* Like <fcntl.h>, but with non-working flags defined to 0.
- Copyright (C) 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -25,6 +25,8 @@
#if defined __need_system_fcntl_h
/* Special invocation convention. */
+/* Needed before <sys/stat.h>.
+ May also define off_t to a 64-bit type on native Windows. */
#include <sys/types.h>
/* On some systems other than glibc, <sys/stat.h> is a prerequisite of
<fcntl.h>. On glibc systems, we would like to avoid namespace pollution.
@@ -40,8 +42,10 @@
#else
/* Normal invocation convention. */
-#ifndef _GL_FCNTL_H
+#ifndef _@GUARD_PREFIX@_FCNTL_H
+/* Needed before <sys/stat.h>.
+ May also define off_t to a 64-bit type on native Windows. */
#include <sys/types.h>
/* On some systems other than glibc, <sys/stat.h> is a prerequisite of
<fcntl.h>. On glibc systems, we would like to avoid namespace pollution.
@@ -55,13 +59,19 @@
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_FCNTL_H@
-#ifndef _GL_FCNTL_H
-#define _GL_FCNTL_H
+#ifndef _@GUARD_PREFIX@_FCNTL_H
+#define _@GUARD_PREFIX@_FCNTL_H
#ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */
# include <unistd.h>
#endif
+/* Native Windows platforms declare open(), creat() in <io.h>. */
+#if (@GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \
+ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+# include <io.h>
+#endif
+
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
@@ -177,13 +187,12 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
/* Fix up the O_* macros. */
#if !defined O_DIRECT && defined O_DIRECTIO
-/* Tru64 spells it `O_DIRECTIO'. */
+/* Tru64 spells it 'O_DIRECTIO'. */
# define O_DIRECT O_DIRECTIO
#endif
#if !defined O_CLOEXEC && defined O_NOINHERIT
-/* Mingw spells it `O_NOINHERIT'. Intentionally leave it
- undefined if not available. */
+/* Mingw spells it 'O_NOINHERIT'. */
# define O_CLOEXEC O_NOINHERIT
#endif
@@ -207,6 +216,10 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
# define O_EXEC O_RDONLY /* This is often close enough in older systems. */
#endif
+#ifndef O_IGNORE_CTTY
+# define O_IGNORE_CTTY 0
+#endif
+
#ifndef O_NDELAY
# define O_NDELAY 0
#endif
@@ -219,6 +232,19 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
# define O_NONBLOCK O_NDELAY
#endif
+/* If the gnulib module 'nonblocking' is in use, guarantee a working non-zero
+ value of O_NONBLOCK. Otherwise, O_NONBLOCK is defined (above) to O_NDELAY
+ or to 0 as fallback. */
+#if @GNULIB_NONBLOCKING@
+# if O_NONBLOCK
+# define GNULIB_defined_O_NONBLOCK 0
+# else
+# define GNULIB_defined_O_NONBLOCK 1
+# undef O_NONBLOCK
+# define O_NONBLOCK 0x40000000
+# endif
+#endif
+
#ifndef O_NOCTTY
# define O_NOCTTY 0
#endif
@@ -227,10 +253,18 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
# define O_NOFOLLOW 0
#endif
+#ifndef O_NOLINK
+# define O_NOLINK 0
+#endif
+
#ifndef O_NOLINKS
# define O_NOLINKS 0
#endif
+#ifndef O_NOTRANS
+# define O_NOTRANS 0
+#endif
+
#ifndef O_RSYNC
# define O_RSYNC 0
#endif
@@ -247,6 +281,11 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
# define O_TTY_INIT 0
#endif
+#if ~O_ACCMODE & (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH)
+# undef O_ACCMODE
+# define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH)
+#endif
+
/* For systems that distinguish between text and binary I/O.
O_BINARY is usually declared in fcntl.h */
#if !defined O_BINARY && defined _O_BINARY
@@ -303,6 +342,6 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
#endif
-#endif /* _GL_FCNTL_H */
-#endif /* _GL_FCNTL_H */
+#endif /* _@GUARD_PREFIX@_FCNTL_H */
+#endif /* _@GUARD_PREFIX@_FCNTL_H */
#endif
diff --git a/lib/fd-hook.c b/lib/fd-hook.c
new file mode 100644
index 0000000..e158a52
--- /dev/null
+++ b/lib/fd-hook.c
@@ -0,0 +1,116 @@
+/* Hook for making making file descriptor functions close(), ioctl() extensible.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2009.
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "fd-hook.h"
+
+#include <stdlib.h>
+
+/* 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/lib/fd-hook.h b/lib/fd-hook.h
new file mode 100644
index 0000000..d15b577
--- /dev/null
+++ b/lib/fd-hook.h
@@ -0,0 +1,119 @@
+/* Hook for making making file descriptor functions close(), ioctl() extensible.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+
+#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/lib/fd-safer-flag.c b/lib/fd-safer-flag.c
index 2305b73..8bc14bd 100644
--- a/lib/fd-safer-flag.c
+++ b/lib/fd-safer-flag.c
@@ -1,7 +1,7 @@
/* Adjust a file descriptor result so that it avoids clobbering
STD{IN,OUT,ERR}_FILENO, with specific flags.
- Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/fd-safer.c b/lib/fd-safer.c
index 910fa4c..8ded888 100644
--- a/lib/fd-safer.c
+++ b/lib/fd-safer.c
@@ -1,6 +1,6 @@
/* Return a safer copy of a file descriptor.
- Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/fflush.c b/lib/fflush.c
index 437e310..8ac5dea 100644
--- a/lib/fflush.c
+++ b/lib/fflush.c
@@ -1,5 +1,5 @@
/* fflush.c -- allow flushing input streams
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -28,13 +28,15 @@
#include "stdio-impl.h"
+#include "unused-parameter.h"
+
#undef fflush
#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
/* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */
-static inline void
+static void
clear_ungetc_buffer_preserving_position (FILE *fp)
{
if (fp->_flags & _IO_IN_BACKUP)
@@ -45,10 +47,10 @@ clear_ungetc_buffer_preserving_position (FILE *fp)
#else
/* Clear the stream's ungetc buffer. May modify the value of ftello (fp). */
-static inline void
+static void
clear_ungetc_buffer (FILE *fp)
{
-# if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+# if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
if (HASUB (fp))
{
fp_->_p += fp_->_r;
@@ -60,7 +62,7 @@ clear_ungetc_buffer (FILE *fp)
fp->_ungetc_count = 0;
fp->_rcount = - fp->_rcount;
}
-# elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */
+# elif defined _IOERR /* Minix, AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */
/* Nothing to do. */
# else /* other implementations */
fseeko (fp, 0, SEEK_CUR);
@@ -69,9 +71,11 @@ clear_ungetc_buffer (FILE *fp)
#endif
-#if (defined __sferror || defined __DragonFly__) && defined __SNPT /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */)
+
+# if (defined __sferror || defined __DragonFly__) && defined __SNPT /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
-static inline int
+static int
disable_seek_optimization (FILE *fp)
{
int saved_flags = fp_->_flags & (__SOPT | __SNPT);
@@ -79,22 +83,23 @@ disable_seek_optimization (FILE *fp)
return saved_flags;
}
-static inline void
+static void
restore_seek_optimization (FILE *fp, int saved_flags)
{
fp_->_flags = (fp_->_flags & ~(__SOPT | __SNPT)) | saved_flags;
}
-#endif
+# else
-static inline void
-update_fpos_cache (FILE *fp, off_t pos)
+static void
+update_fpos_cache (FILE *fp _GL_UNUSED_PARAMETER,
+ off_t pos _GL_UNUSED_PARAMETER)
{
-#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
-# if defined __CYGWIN__
+# if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
+# if defined __CYGWIN__
/* fp_->_offset is typed as an integer. */
fp_->_offset = pos;
-# else
+# else
/* fp_->_offset is an fpos_t. */
/* Use a union, since on NetBSD, the compilation flags determine
whether fpos_t is typedef'd to off_t or a struct containing a
@@ -106,10 +111,12 @@ update_fpos_cache (FILE *fp, off_t pos)
} u;
u.o = pos;
fp_->_offset = u.f;
-# endif
+# endif
fp_->_flags |= __SOFF;
-#endif
+# endif
}
+# endif
+#endif
/* Flush all pending data on STREAM according to POSIX rules. Both
output and seekable input streams are supported. */
@@ -188,7 +195,7 @@ rpl_fflush (FILE *stream)
return result;
}
-# if (defined __sferror || defined __DragonFly__) && defined __SNPT /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+# if (defined __sferror || defined __DragonFly__) && defined __SNPT /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
{
/* Disable seek optimization for the next fseeko call. This tells the
diff --git a/lib/filenamecat-lgpl.c b/lib/filenamecat-lgpl.c
index 8cb2da4..60c4988 100644
--- a/lib/filenamecat-lgpl.c
+++ b/lib/filenamecat-lgpl.c
@@ -1,6 +1,6 @@
/* Concatenate two arbitrary file names.
- Copyright (C) 1996-2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 1996-2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@
/* Return the longest suffix of F that is a relative file name.
If it has no such suffix, return the empty string. */
-static char const *
+static char const * _GL_ATTRIBUTE_PURE
longest_relative_suffix (char const *f)
{
for (f += FILE_SYSTEM_PREFIX_LEN (f); ISSLASH (*f); f++)
diff --git a/lib/filenamecat.c b/lib/filenamecat.c
index 86b4e07..8809b57 100644
--- a/lib/filenamecat.c
+++ b/lib/filenamecat.c
@@ -1,6 +1,6 @@
/* Concatenate two arbitrary file names.
- Copyright (C) 1996-2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 1996-2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/filenamecat.h b/lib/filenamecat.h
index 31b3375..1476e14 100644
--- a/lib/filenamecat.h
+++ b/lib/filenamecat.h
@@ -1,6 +1,6 @@
/* Concatenate two arbitrary file names.
- Copyright (C) 1996-1997, 2003, 2005, 2007, 2009-2011 Free Software
+ Copyright (C) 1996-1997, 2003, 2005, 2007, 2009-2013 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/float+.h b/lib/float+.h
index 2e84489..32fb790 100644
--- a/lib/float+.h
+++ b/lib/float+.h
@@ -1,5 +1,5 @@
/* Supplemental information about the floating-point formats.
- Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software; you can redistribute it and/or modify
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#ifndef _FLOATPLUS_H
#define _FLOATPLUS_H
diff --git a/lib/float.c b/lib/float.c
new file mode 100644
index 0000000..366945f
--- /dev/null
+++ b/lib/float.c
@@ -0,0 +1,33 @@
+/* Auxiliary definitions for <float.h>.
+ Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2011.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <float.h>
+
+#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/lib/float.in.h b/lib/float.in.h
index d32f20e..84e1950 100644
--- a/lib/float.in.h
+++ b/lib/float.in.h
@@ -1,6 +1,6 @@
/* A correct <float.h>.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef _GL_FLOAT_H
+#ifndef _@GUARD_PREFIX@_FLOAT_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
@@ -25,10 +25,11 @@
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_FLOAT_H@
-#ifndef _GL_FLOAT_H
-#define _GL_FLOAT_H
+#ifndef _@GUARD_PREFIX@_FLOAT_H
+#define _@GUARD_PREFIX@_FLOAT_H
/* 'long double' properties. */
+
#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
/* Number of mantissa units, in base FLT_RADIX. */
# undef LDBL_MANT_DIG
@@ -59,5 +60,129 @@
# define LDBL_MAX_10_EXP 4932
#endif
-#endif /* _GL_FLOAT_H */
-#endif /* _GL_FLOAT_H */
+/* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of
+ precision in the compiler but 64 bits of precision at runtime. See
+ <http://lists.gnu.org/archive/html/bug-gnulib/2008-07/msg00063.html>. */
+#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/lib/fopen-safer.c b/lib/fopen-safer.c
index c0a1f16..917920d 100644
--- a/lib/fopen-safer.c
+++ b/lib/fopen-safer.c
@@ -1,6 +1,6 @@
/* Invoke fopen, but avoid some glitches.
- Copyright (C) 2001, 2004-2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2004-2006, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/fopen.c b/lib/fopen.c
index 81c8617..f9d6763 100644
--- a/lib/fopen.c
+++ b/lib/fopen.c
@@ -1,5 +1,5 @@
/* Open a stream to a file.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -16,21 +16,26 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+/* If the user's config.h happens to include <stdio.h>, let it include only
+ the system's <stdio.h> here, so that orig_fopen doesn't recurse to
+ rpl_fopen. */
+#define __need_FILE
#include <config.h>
/* Get the original definition of fopen. It might be defined as a macro. */
-#define __need_FILE
#include <stdio.h>
#undef __need_FILE
-static inline FILE *
+static FILE *
orig_fopen (const char *filename, const char *mode)
{
return fopen (filename, mode);
}
/* Specification. */
-#include <stdio.h>
+/* Write "stdio.h" here, not <stdio.h>, otherwise OSF/1 5.1 DTK cc eliminates
+ this include because of the preliminary #include <stdio.h> above. */
+#include "stdio.h"
#include <errno.h>
#include <fcntl.h>
diff --git a/lib/fpending.c b/lib/fpending.c
index 5ec38cb..e917f4f 100644
--- a/lib/fpending.c
+++ b/lib/fpending.c
@@ -1,5 +1,5 @@
/* fpending.c -- return the number of pending output bytes on a stream
- Copyright (C) 2000, 2004, 2006-2007, 2009-2011 Free Software Foundation,
+ Copyright (C) 2000, 2004, 2006-2007, 2009-2013 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/fpending.h b/lib/fpending.h
index d7994f7..4eca3f1 100644
--- a/lib/fpending.h
+++ b/lib/fpending.h
@@ -1,6 +1,6 @@
/* Declare __fpending.
- Copyright (C) 2000, 2003, 2005-2006, 2009-2011 Free Software Foundation,
+ Copyright (C) 2000, 2003, 2005-2006, 2009-2013 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
@@ -20,15 +20,10 @@
#include <stddef.h>
#include <stdio.h>
-
-#ifndef HAVE_DECL___FPENDING
-"this configure-time declaration test was not run"
+#if HAVE_STDIO_EXT_H
+# include <stdio_ext.h>
#endif
-#if HAVE_DECL___FPENDING
-# if HAVE_STDIO_EXT_H
-# include <stdio_ext.h>
-# endif
-#else
+#ifndef __fpending
size_t __fpending (FILE *);
#endif
diff --git a/lib/fpucw.h b/lib/fpucw.h
index 07403bf..0b7f528 100644
--- a/lib/fpucw.h
+++ b/lib/fpucw.h
@@ -1,5 +1,5 @@
/* Manipulating the FPU control word.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify
@@ -30,7 +30,8 @@
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 wrong results.
+ 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
diff --git a/lib/fpurge.c b/lib/fpurge.c
index 7e69fb4..e00187d 100644
--- a/lib/fpurge.c
+++ b/lib/fpurge.c
@@ -1,5 +1,5 @@
/* Flushing buffers of a FILE stream.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -29,13 +29,13 @@
int
fpurge (FILE *fp)
{
-#if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7 */
+#if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7, musl libc */
__fpurge (fp);
/* The __fpurge function does not have a return value. */
return 0;
-#elif HAVE_FPURGE /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin 1.7 */
+#elif HAVE_FPURGE /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin 1.7 */
/* Call the system's fpurge function. */
# undef fpurge
@@ -43,7 +43,7 @@ fpurge (FILE *fp)
extern int fpurge (FILE *);
# endif
int result = fpurge (fp);
-# if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+# if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
if (result == 0)
/* Correct the invariants that fpurge broke.
<stdio.h> on BSD systems says:
@@ -71,7 +71,7 @@ fpurge (FILE *fp)
fp->_IO_save_base = NULL;
}
return 0;
-# elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+# elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
fp_->_p = fp_->_bf._base;
fp_->_r = 0;
fp_->_w = ((fp_->_flags & (__SLBF | __SNBF | __SRD)) == 0 /* fully buffered and not currently reading? */
@@ -91,6 +91,11 @@ fpurge (FILE *fp)
fp->_wcount = 0;
fp->_ungetc_count = 0;
return 0;
+# elif defined __minix /* Minix */
+ fp->_ptr = fp->_buf;
+ if (fp->_ptr != NULL)
+ fp->_count = 0;
+ return 0;
# elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */
fp->_ptr = fp->_base;
if (fp->_ptr != NULL)
@@ -129,6 +134,9 @@ fpurge (FILE *fp)
/* Nothing in the buffer, next putc is nontrivial. */
fp->__put_limit = fp->__buffer;
return 0;
+# elif defined EPLAN9 /* Plan9 */
+ fp->rp = fp->wp = fp->lp = fp->buf;
+ return 0;
# else
# error "Please port gnulib fpurge.c to your platform! Look at the definitions of fflush, setvbuf and ungetc on your system, then report this to bug-gnulib."
# endif
diff --git a/lib/freadahead.c b/lib/freadahead.c
index 27f5c95..f2dae46 100644
--- a/lib/freadahead.c
+++ b/lib/freadahead.c
@@ -1,5 +1,5 @@
/* Retrieve information about a FILE stream.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ freadahead (FILE *fp)
return (fp->_IO_read_end - fp->_IO_read_ptr)
+ (fp->_flags & _IO_IN_BACKUP ? fp->_IO_save_end - fp->_IO_save_base :
0);
-#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
if ((fp_->_flags & __SWR) != 0 || fp_->_r < 0)
return 0;
# if defined __DragonFly__
@@ -48,6 +48,10 @@ freadahead (FILE *fp)
/* equivalent to
(fp->_ungetc_count == 0 ? fp->_rcount : fp->_ungetc_count - fp->_rcount) */
return (fp->_rcount > 0 ? fp->_rcount : fp->_ungetc_count - fp->_rcount);
+#elif defined __minix /* Minix */
+ if ((fp_->_flags & _IOWRITING) != 0)
+ return 0;
+ return fp_->_count;
#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */
if ((fp_->_flag & _IOWRT) != 0)
return 0;
@@ -76,6 +80,10 @@ freadahead (FILE *fp)
return (fp->__pushed_back
? fp->__get_limit - fp->__pushback_bufp + 1
: fp->__get_limit - fp->__bufp);
+#elif defined EPLAN9 /* Plan9 */
+ if (fp->state == 4 /* WR */ || fp->rp >= fp->wp)
+ return 0;
+ return fp->wp - fp->rp;
#elif defined SLOW_BUT_NO_HACKS /* users can define this */
abort ();
return 0;
diff --git a/lib/freadahead.h b/lib/freadahead.h
index af03b89..c691f89 100644
--- a/lib/freadahead.h
+++ b/lib/freadahead.h
@@ -1,5 +1,5 @@
/* Retrieve information about a FILE stream.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,10 +17,6 @@
#include <stddef.h>
#include <stdio.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* Assuming the stream STREAM is open for reading:
Return the number of bytes waiting in the input buffer of STREAM.
This includes both the bytes that have been read from the underlying input
@@ -31,8 +27,21 @@ extern "C" {
STREAM must not be wide-character oriented. */
-extern size_t freadahead (FILE *stream);
+#if HAVE___FREADAHEAD /* musl libc */
+
+# include <stdio_ext.h>
+# define freadahead(stream) __freadahead (stream)
+
+#else
-#ifdef __cplusplus
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+extern size_t freadahead (FILE *stream) _GL_ATTRIBUTE_PURE;
+
+# ifdef __cplusplus
}
+# endif
+
#endif
diff --git a/lib/freading.c b/lib/freading.c
index 51aed0e..8012a7a 100644
--- a/lib/freading.c
+++ b/lib/freading.c
@@ -1,5 +1,5 @@
/* Retrieve information about a FILE stream.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -35,10 +35,12 @@ freading (FILE *fp)
return ((fp->_flags & _IO_NO_WRITES) != 0
|| ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
&& fp->_IO_read_base != NULL));
-# elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+# elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
return (fp_->_flags & __SRD) != 0;
# elif defined __EMX__ /* emx+gcc */
return (fp->_flags & _IOREAD) != 0;
+# elif defined __minix /* Minix */
+ return (fp->_flags & _IOREADING) != 0;
# elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */
# if defined __sun /* Solaris */
return (fp->_flag & _IOREAD) != 0 && (fp->_flag & _IOWRT) == 0;
@@ -60,6 +62,10 @@ freading (FILE *fp)
# else
return (fp->__buffer < fp->__get_limit /*|| fp->__bufp == fp->__put_limit ??*/);
# endif
+# elif defined EPLAN9 /* Plan9 */
+ if (fp->state == 0 /* CLOSED */ || fp->state == 4 /* WR */)
+ return 0;
+ return (fp->state == 3 /* RD */ && (fp->bufl == 0 || fp->rp < fp->wp));
# else
# error "Please port gnulib freading.c to your platform!"
# endif
diff --git a/lib/freading.h b/lib/freading.h
index a19aea6..88ea789 100644
--- a/lib/freading.h
+++ b/lib/freading.h
@@ -1,5 +1,5 @@
/* Retrieve information about a FILE stream.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@
STREAM must not be wide-character oriented. */
#if HAVE___FREADING && (!defined __GLIBC__ || defined __UCLIBC__ || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7))
-/* Solaris >= 7, not glibc >= 2.2, but glibc >= 2.7 */
+/* Solaris >= 7, not glibc >= 2.2, but glibc >= 2.7, or musl libc */
# include <stdio_ext.h>
# define freading(stream) (__freading (stream) != 0)
diff --git a/lib/frexp.c b/lib/frexp.c
index 0f0d41a..d847fa3 100644
--- a/lib/frexp.c
+++ b/lib/frexp.c
@@ -1,5 +1,5 @@
/* Split a double into fraction and mantissa.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,7 +17,9 @@
/* Written by Paolo Bonzini <bonzini@gnu.org>, 2003, and
Bruno Haible <bruno@clisp.org>, 2007. */
-#include <config.h>
+#if ! defined USE_LONG_DOUBLE
+# include <config.h>
+#endif
/* Specification. */
#include <math.h>
diff --git a/lib/frexpl.c b/lib/frexpl.c
index ea635a4..5ec2780 100644
--- a/lib/frexpl.c
+++ b/lib/frexpl.c
@@ -1,5 +1,5 @@
/* Split a 'long double' into fraction and mantissa.
- Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,5 +14,22 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#define USE_LONG_DOUBLE
-#include "frexp.c"
+#include <config.h>
+
+#if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
+
+/* Specification. */
+# include <math.h>
+
+long double
+frexpl (long double x, int *expptr)
+{
+ return frexp (x, expptr);
+}
+
+#else
+
+# define USE_LONG_DOUBLE
+# include "frexp.c"
+
+#endif
diff --git a/lib/fseek.c b/lib/fseek.c
new file mode 100644
index 0000000..4708287
--- /dev/null
+++ b/lib/fseek.c
@@ -0,0 +1,30 @@
+/* An fseek() function that, together with fflush(), is POSIX compliant.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <stdio.h>
+
+/* Get off_t. */
+#include <unistd.h>
+
+int
+fseek (FILE *fp, long offset, int whence)
+{
+ /* Use the replacement fseeko function with all its workarounds. */
+ return fseeko (fp, (off_t)offset, whence);
+}
diff --git a/lib/fseeko.c b/lib/fseeko.c
index 2dd4cdc..c03be3d 100644
--- a/lib/fseeko.c
+++ b/lib/fseeko.c
@@ -1,5 +1,5 @@
/* An fseeko() function that, together with fflush(), is POSIX compliant.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,15 +12,14 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
/* Specification. */
#include <stdio.h>
-/* Get off_t and lseek. */
+/* Get off_t, lseek, _POSIX_VERSION. */
#include <unistd.h>
#include "stdio-impl.h"
@@ -32,6 +31,14 @@ fseeko (FILE *fp, off_t offset, int whence)
# undef fseek
# define fseeko fseek
#endif
+#if _GL_WINDOWS_64_BIT_OFF_T
+# undef fseeko
+# if HAVE__FSEEKI64 /* msvc, mingw64 */
+# define fseeko _fseeki64
+# else /* mingw */
+# define fseeko fseeko64
+# endif
+#endif
{
#if LSEEK_PIPE_BROKEN
/* mingw gives bogus answers rather than failure on non-seekable files. */
@@ -44,7 +51,7 @@ fseeko (FILE *fp, off_t offset, int whence)
if (fp->_IO_read_end == fp->_IO_read_ptr
&& fp->_IO_write_ptr == fp->_IO_write_base
&& fp->_IO_save_base == NULL)
-#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
# if defined __SL64 && defined __SCLE /* Cygwin */
if ((fp->_flags & __SL64) == 0)
{
@@ -69,6 +76,9 @@ fseeko (FILE *fp, off_t offset, int whence)
&& fp->_rcount == 0
&& fp->_wcount == 0
&& fp->_ungetc_count == 0)
+#elif defined __minix /* Minix */
+ if (fp_->_ptr == fp_->_buf
+ && (fp_->_ptr == NULL || fp_->_count == 0))
#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */
if (fp_->_ptr == fp_->_base
&& (fp_->_ptr == NULL || fp_->_cnt == 0))
@@ -86,21 +96,26 @@ fseeko (FILE *fp, off_t offset, int whence)
&& fp->__get_limit == fp->__bufp
&& fp->__put_limit == fp->__bufp
&& !fp->__pushed_back)
+#elif defined EPLAN9 /* Plan9 */
+ if (fp->rp == fp->buf
+ && fp->wp == fp->buf)
+#elif FUNC_FFLUSH_STDIN < 0 && 200809 <= _POSIX_VERSION
+ /* Cross-compiling to some other system advertising conformance to
+ POSIX.1-2008 or later. Assume fseeko and fflush work as advertised.
+ If this assumption is incorrect, please report the bug to
+ bug-gnulib. */
+ if (0)
#else
- #error "Please port gnulib fseeko.c to your platform! Look at the code in fpurge.c, then report this to bug-gnulib."
+ #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib."
#endif
{
- /* We get here when an fflush() call immediately preceded this one. We
- know there are no buffers.
- POSIX requires us to modify the file descriptor's position.
- But we cannot position beyond end of file here. */
- off_t pos =
- lseek (fileno (fp),
- whence == SEEK_END && offset > 0 ? 0 : offset,
- whence);
+ /* We get here when an fflush() call immediately preceded this one (or
+ if ftell() has created buffers but no I/O has occurred on a
+ newly-opened stream). We know there are no buffers. */
+ off_t pos = lseek (fileno (fp), offset, whence);
if (pos == -1)
{
-#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
fp_->_flags &= ~__SOFF;
#endif
return -1;
@@ -108,7 +123,8 @@ fseeko (FILE *fp, off_t offset, int whence)
#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
fp->_flags &= ~_IO_EOF_SEEN;
-#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+ fp->_offset = pos;
+#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
# if defined __CYGWIN__
/* fp_->_offset is typed as an integer. */
fp_->_offset = pos;
@@ -137,10 +153,7 @@ fseeko (FILE *fp, off_t offset, int whence)
fp->__offset = pos;
fp->__eof = 0;
#endif
- /* If we were not requested to position beyond end of file, we're
- done. */
- if (!(whence == SEEK_END && offset > 0))
- return 0;
+ return 0;
}
return fseeko (fp, offset, whence);
}
diff --git a/lib/fstat.c b/lib/fstat.c
new file mode 100644
index 0000000..dc802f5
--- /dev/null
+++ b/lib/fstat.c
@@ -0,0 +1,88 @@
+/* fstat() replacement.
+ 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 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* If the user's config.h happens to include <sys/stat.h>, let it include only
+ the system's <sys/stat.h> here, so that orig_fstat doesn't recurse to
+ rpl_fstat. */
+#define __need_system_sys_stat_h
+#include <config.h>
+
+/* Get the original definition of fstat. It might be defined as a macro. */
+#include <sys/types.h>
+#include <sys/stat.h>
+#if _GL_WINDOWS_64_BIT_ST_SIZE
+# undef stat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */
+# define stat _stati64
+# undef fstat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */
+# define fstat _fstati64
+#endif
+#undef __need_system_sys_stat_h
+
+static int
+orig_fstat (int fd, struct stat *buf)
+{
+ return fstat (fd, buf);
+}
+
+/* Specification. */
+/* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc
+ eliminates this include because of the preliminary #include <sys/stat.h>
+ above. */
+#include "sys/stat.h"
+
+#include <errno.h>
+#include <unistd.h>
+
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+# include "msvc-inval.h"
+#endif
+
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+static int
+fstat_nothrow (int fd, struct stat *buf)
+{
+ int result;
+
+ TRY_MSVC_INVAL
+ {
+ result = orig_fstat (fd, buf);
+ }
+ CATCH_MSVC_INVAL
+ {
+ result = -1;
+ errno = EBADF;
+ }
+ DONE_MSVC_INVAL;
+
+ return result;
+}
+#else
+# define fstat_nothrow orig_fstat
+#endif
+
+int
+rpl_fstat (int fd, struct stat *buf)
+{
+#if REPLACE_FCHDIR && REPLACE_OPEN_DIRECTORY
+ /* Handle the case when rpl_open() used a dummy file descriptor to work
+ around an open() that can't normally visit directories. */
+ const char *name = _gl_directory_name (fd);
+ if (name != NULL)
+ return stat (name, buf);
+#endif
+
+ return fstat_nothrow (fd, buf);
+}
diff --git a/tests/ftell.c b/lib/ftell.c
index 79083fb..4ad13c9 100644
--- a/tests/ftell.c
+++ b/lib/ftell.c
@@ -1,5 +1,5 @@
/* An ftell() function that works around platform bugs.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -20,16 +20,15 @@
#include <stdio.h>
#include <errno.h>
-/* Get off_t. */
-#include <unistd.h>
+#include <limits.h>
long
ftell (FILE *fp)
{
/* Use the replacement ftello function with all its workarounds. */
off_t offset = ftello (fp);
- if (offset == (long)offset)
- return (long)offset;
+ if (LONG_MIN <= offset && offset <= LONG_MAX)
+ return /* (long) */ offset;
else
{
errno = EOVERFLOW;
diff --git a/lib/ftello.c b/lib/ftello.c
index fbdc44f..3a2a0f2 100644
--- a/lib/ftello.c
+++ b/lib/ftello.c
@@ -1,5 +1,5 @@
/* An ftello() function that works around platform bugs.
- Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -31,6 +31,14 @@ ftello (FILE *fp)
# undef ftell
# define ftello ftell
#endif
+#if _GL_WINDOWS_64_BIT_OFF_T
+# undef ftello
+# if HAVE__FTELLI64 /* msvc, mingw64 */
+# define ftello _ftelli64
+# else /* mingw */
+# define ftello ftello64
+# endif
+#endif
{
#if LSEEK_PIPE_BROKEN
/* mingw gives bogus answers rather than failure on non-seekable files. */
diff --git a/lib/getdtablesize.c b/lib/getdtablesize.c
index 60e7f5a..9947405 100644
--- a/lib/getdtablesize.c
+++ b/lib/getdtablesize.c
@@ -1,5 +1,5 @@
/* getdtablesize() function for platforms that don't have it.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
@@ -24,6 +24,29 @@
#include <stdio.h>
+#include "msvc-inval.h"
+
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+static int
+_setmaxstdio_nothrow (int newmax)
+{
+ int result;
+
+ TRY_MSVC_INVAL
+ {
+ result = _setmaxstdio (newmax);
+ }
+ CATCH_MSVC_INVAL
+ {
+ result = -1;
+ }
+ DONE_MSVC_INVAL;
+
+ return result;
+}
+# define _setmaxstdio _setmaxstdio_nothrow
+#endif
+
/* Cache for the previous getdtablesize () result. */
static int dtablesize;
diff --git a/lib/getopt.c b/lib/getopt.c
index c8b3013..ef0f4ce 100644
--- a/lib/getopt.c
+++ b/lib/getopt.c
@@ -2,7 +2,7 @@
NOTE: getopt is part of the C library, so if you don't know what
"Keep this file name-space clean" means, talk to drepper@gnu.org
before changing it!
- Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2011 Free Software
+ Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2013 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
@@ -41,15 +41,15 @@
# include <wchar.h>
#endif
-/* This version of `getopt' appears to the caller like standard Unix `getopt'
+/* This version of 'getopt' appears to the caller like standard Unix 'getopt'
but it behaves differently for the user, since it allows the user
to intersperse the options with the other arguments.
- As `getopt_long' works, it permutes the elements of ARGV so that,
+ As 'getopt_long' works, it permutes the elements of ARGV so that,
when it is done, all the options precede everything else. Thus
all application programs are extended to handle flexible argument order.
- Using `getopt' or setting the environment variable POSIXLY_CORRECT
+ Using 'getopt' or setting the environment variable POSIXLY_CORRECT
disables permutation.
Then the behavior is completely standard.
@@ -58,24 +58,24 @@
#include "getopt_int.h"
-/* For communication from `getopt' to the caller.
- When `getopt' finds an option that takes an argument,
+/* For communication from 'getopt' to the caller.
+ When 'getopt' finds an option that takes an argument,
the argument value is returned here.
- Also, when `ordering' is RETURN_IN_ORDER,
+ Also, when 'ordering' is RETURN_IN_ORDER,
each non-option ARGV-element is returned here. */
char *optarg;
/* Index in ARGV of the next element to be scanned.
This is used for communication to and from the caller
- and for communication between successive calls to `getopt'.
+ and for communication between successive calls to 'getopt'.
- On entry to `getopt', zero means this is the first call; initialize.
+ On entry to 'getopt', zero means this is the first call; initialize.
- When `getopt' returns -1, this is the index of the first of the
+ When 'getopt' returns -1, this is the index of the first of the
non-option elements that the caller should itself scan.
- Otherwise, `optind' communicates from one call to the next
+ Otherwise, 'optind' communicates from one call to the next
how much of ARGV has been scanned so far. */
/* 1003.2 says this must be 1 before any call. */
@@ -137,7 +137,7 @@ extern char *__getopt_nonoption_flags;
The other is elements [last_nonopt,optind), which contains all
the options processed since those non-options were skipped.
- `first_nonopt' and `last_nonopt' are relocated so that they describe
+ 'first_nonopt' and 'last_nonopt' are relocated so that they describe
the new indices of the non-options in ARGV after they are moved. */
static void
@@ -154,7 +154,7 @@ exchange (char **argv, struct _getopt_data *d)
but it consists of two parts that need to be swapped next. */
#if defined _LIBC && defined USE_NONOPTION_FLAGS
- /* First make sure the handling of the `__getopt_nonoption_flags'
+ /* First make sure the handling of the '__getopt_nonoption_flags'
string can work normally. Our top argument must be in the range
of the string. */
if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len)
@@ -291,48 +291,48 @@ _getopt_initialize (int argc _GL_UNUSED,
If an element of ARGV starts with '-', and is not exactly "-" or "--",
then it is an option element. The characters of this element
- (aside from the initial '-') are option characters. If `getopt'
+ (aside from the initial '-') are option characters. If 'getopt'
is called repeatedly, it returns successively each of the option characters
from each of the option elements.
- If `getopt' finds another option character, it returns that character,
- updating `optind' and `nextchar' so that the next call to `getopt' can
+ If 'getopt' finds another option character, it returns that character,
+ updating 'optind' and 'nextchar' so that the next call to 'getopt' can
resume the scan with the following option character or ARGV-element.
- If there are no more option characters, `getopt' returns -1.
- Then `optind' is the index in ARGV of the first ARGV-element
+ If there are no more option characters, 'getopt' returns -1.
+ Then 'optind' is the index in ARGV of the first ARGV-element
that is not an option. (The ARGV-elements have been permuted
so that those that are not options now come last.)
OPTSTRING is a string containing the legitimate option characters.
If an option character is seen that is not listed in OPTSTRING,
- return '?' after printing an error message. If you set `opterr' to
+ return '?' after printing an error message. If you set 'opterr' to
zero, the error message is suppressed but we still return '?'.
If a char in OPTSTRING is followed by a colon, that means it wants an arg,
so the following text in the same ARGV-element, or the text of the following
- ARGV-element, is returned in `optarg'. Two colons mean an option that
+ ARGV-element, is returned in 'optarg'. Two colons mean an option that
wants an optional arg; if there is text in the current ARGV-element,
- it is returned in `optarg', otherwise `optarg' is set to zero.
+ it is returned in 'optarg', otherwise 'optarg' is set to zero.
- If OPTSTRING starts with `-' or `+', it requests different methods of
+ If OPTSTRING starts with '-' or '+', it requests different methods of
handling the non-option ARGV-elements.
See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
- Long-named options begin with `--' instead of `-'.
+ Long-named options begin with '--' instead of '-'.
Their names may be abbreviated as long as the abbreviation is unique
or is an exact match for some defined option. If they have an
argument, it follows the option name in the same ARGV-element, separated
- from the option name by a `=', or else the in next ARGV-element.
- When `getopt' finds a long-named option, it returns 0 if that option's
- `flag' field is nonzero, the value of the option's `val' field
- if the `flag' field is zero.
+ from the option name by a '=', or else the in next ARGV-element.
+ When 'getopt' finds a long-named option, it returns 0 if that option's
+ 'flag' field is nonzero, the value of the option's 'val' field
+ if the 'flag' field is zero.
The elements of ARGV aren't really const, because we permute them.
But we pretend they're const in the prototype to be compatible
with other systems.
- LONGOPTS is a vector of `struct option' terminated by an
+ LONGOPTS is a vector of 'struct option' terminated by an
element containing a name which is zero.
LONGIND returns the index in LONGOPT of the long-named option found.
@@ -409,7 +409,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
d->__last_nonopt = d->optind;
}
- /* The special ARGV-element `--' means premature end of options.
+ /* The special ARGV-element '--' means premature end of options.
Skip it like a null option,
then exchange with previous non-options as if it were an option,
then skip everything else like a non-option. */
@@ -479,23 +479,28 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
|| !strchr (optstring, argv[d->optind][1])))))
{
char *nameend;
+ unsigned int namelen;
const struct option *p;
const struct option *pfound = NULL;
+ struct option_list
+ {
+ const struct option *p;
+ struct option_list *next;
+ } *ambig_list = NULL;
int exact = 0;
- int ambig = 0;
int indfound = -1;
int option_index;
for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++)
/* Do nothing. */ ;
+ namelen = nameend - d->__nextchar;
/* Test all long options for either exact match
or abbreviated matches. */
for (p = longopts, option_index = 0; p->name; p++, option_index++)
- if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar))
+ if (!strncmp (p->name, d->__nextchar, namelen))
{
- if ((unsigned int) (nameend - d->__nextchar)
- == (unsigned int) strlen (p->name))
+ if (namelen == (unsigned int) strlen (p->name))
{
/* Exact match found. */
pfound = p;
@@ -513,35 +518,71 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
|| pfound->has_arg != p->has_arg
|| pfound->flag != p->flag
|| pfound->val != p->val)
- /* Second or later nonexact match found. */
- ambig = 1;
+ {
+ /* Second or later nonexact match found. */
+ struct option_list *newp = malloc (sizeof (*newp));
+ newp->p = p;
+ newp->next = ambig_list;
+ ambig_list = newp;
+ }
}
- if (ambig && !exact)
+ if (ambig_list != NULL && !exact)
{
if (print_errors)
{
+ struct option_list first;
+ first.p = pfound;
+ first.next = ambig_list;
+ ambig_list = &first;
+
#if defined _LIBC && defined USE_IN_LIBIO
- char *buf;
+ char *buf = NULL;
+ size_t buflen = 0;
- if (__asprintf (&buf, _("%s: option '%s' is ambiguous\n"),
- argv[0], argv[d->optind]) >= 0)
+ FILE *fp = open_memstream (&buf, &buflen);
+ if (fp != NULL)
{
- _IO_flockfile (stderr);
+ fprintf (fp,
+ _("%s: option '%s' is ambiguous; possibilities:"),
+ argv[0], argv[d->optind]);
- int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
- ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+ do
+ {
+ fprintf (fp, " '--%s'", ambig_list->p->name);
+ ambig_list = ambig_list->next;
+ }
+ while (ambig_list != NULL);
- __fxprintf (NULL, "%s", buf);
+ fputc_unlocked ('\n', fp);
- ((_IO_FILE *) stderr)->_flags2 = old_flags2;
- _IO_funlockfile (stderr);
+ if (__builtin_expect (fclose (fp) != EOF, 1))
+ {
+ _IO_flockfile (stderr);
- free (buf);
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
}
#else
- fprintf (stderr, _("%s: option '%s' is ambiguous\n"),
+ fprintf (stderr,
+ _("%s: option '%s' is ambiguous; possibilities:"),
argv[0], argv[d->optind]);
+ do
+ {
+ fprintf (stderr, " '--%s'", ambig_list->p->name);
+ ambig_list = ambig_list->next;
+ }
+ while (ambig_list != NULL);
+
+ fputc ('\n', stderr);
#endif
}
d->__nextchar += strlen (d->__nextchar);
@@ -550,6 +591,13 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
return '?';
}
+ while (ambig_list != NULL)
+ {
+ struct option_list *pn = ambig_list->next;
+ free (ambig_list);
+ ambig_list = pn;
+ }
+
if (pfound != NULL)
{
option_index = indfound;
@@ -740,7 +788,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
char c = *d->__nextchar++;
const char *temp = strchr (optstring, c);
- /* Increment `optind' when we start to process its last character. */
+ /* Increment 'optind' when we start to process its last character. */
if (*d->__nextchar == '\0')
++d->optind;
@@ -791,6 +839,9 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
int indfound = 0;
int option_index;
+ if (longopts == NULL)
+ goto no_longs;
+
/* This is an option that requires an argument. */
if (*d->__nextchar != '\0')
{
@@ -836,7 +887,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
return c;
}
else
- /* We already incremented `d->optind' once;
+ /* We already incremented 'd->optind' once;
increment it again when taking next ARGV-elt as argument. */
d->optarg = argv[d->optind++];
@@ -998,8 +1049,10 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
}
return pfound->val;
}
- d->__nextchar = NULL;
- return 'W'; /* Let the application handle it. */
+
+ no_longs:
+ d->__nextchar = NULL;
+ return 'W'; /* Let the application handle it. */
}
if (temp[1] == ':')
{
@@ -1061,7 +1114,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
c = '?';
}
else
- /* We already incremented `optind' once;
+ /* We already incremented 'optind' once;
increment it again when taking next ARGV-elt as argument. */
d->optarg = argv[d->optind++];
d->__nextchar = NULL;
@@ -1124,7 +1177,7 @@ __posix_getopt (int argc, char *const *argv, const char *optstring)
#ifdef TEST
/* Compile with -DTEST to make an executable for use in testing
- the above definition of `getopt'. */
+ the above definition of 'getopt'. */
int
main (int argc, char **argv)
diff --git a/lib/getopt.in.h b/lib/getopt.in.h
index 82e2937..d9c7d81 100644
--- a/lib/getopt.in.h
+++ b/lib/getopt.in.h
@@ -1,5 +1,5 @@
/* Declarations for getopt.
- Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2011 Free Software
+ Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2013 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
@@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef _GL_GETOPT_H
+#ifndef _@GUARD_PREFIX@_GETOPT_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
@@ -32,10 +32,10 @@
# undef _GL_SYSTEM_GETOPT
#endif
-#ifndef _GL_GETOPT_H
+#ifndef _@GUARD_PREFIX@_GETOPT_H
#ifndef __need_getopt
-# define _GL_GETOPT_H 1
+# define _@GUARD_PREFIX@_GETOPT_H 1
#endif
/* Standalone applications should #define __GETOPT_PREFIX to an
@@ -49,7 +49,9 @@
linkers. */
#if defined __GETOPT_PREFIX && !defined __need_getopt
# if !@HAVE_GETOPT_H@
+# define __need_system_stdlib_h
# include <stdlib.h>
+# undef __need_system_stdlib_h
# include <stdio.h>
# include <unistd.h>
# endif
@@ -82,7 +84,7 @@
getopt_long_only can permute argv; this is required for backward
compatibility (e.g., for LSB 2.0.1).
- This used to be `#if defined __GETOPT_PREFIX && !defined __need_getopt',
+ This used to be '#if defined __GETOPT_PREFIX && !defined __need_getopt',
but it caused redefinition warnings if both unistd.h and getopt.h were
included, since unistd.h includes getopt.h having previously defined
__need_getopt.
@@ -128,29 +130,29 @@
extern "C" {
#endif
-/* For communication from `getopt' to the caller.
- When `getopt' finds an option that takes an argument,
+/* For communication from 'getopt' to the caller.
+ When 'getopt' finds an option that takes an argument,
the argument value is returned here.
- Also, when `ordering' is RETURN_IN_ORDER,
+ Also, when 'ordering' is RETURN_IN_ORDER,
each non-option ARGV-element is returned here. */
extern char *optarg;
/* Index in ARGV of the next element to be scanned.
This is used for communication to and from the caller
- and for communication between successive calls to `getopt'.
+ and for communication between successive calls to 'getopt'.
- On entry to `getopt', zero means this is the first call; initialize.
+ On entry to 'getopt', zero means this is the first call; initialize.
- When `getopt' returns -1, this is the index of the first of the
+ When 'getopt' returns -1, this is the index of the first of the
non-option elements that the caller should itself scan.
- Otherwise, `optind' communicates from one call to the next
+ Otherwise, 'optind' communicates from one call to the next
how much of ARGV has been scanned so far. */
extern int optind;
-/* Callers store zero here to inhibit the error message `getopt' prints
+/* Callers store zero here to inhibit the error message 'getopt' prints
for unrecognized options. */
extern int opterr;
@@ -162,24 +164,24 @@ extern int optopt;
#ifndef __need_getopt
/* Describe the long-named options requested by the application.
The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
- of `struct option' terminated by an element containing a name which is
+ of 'struct option' terminated by an element containing a name which is
zero.
- The field `has_arg' is:
+ The field 'has_arg' is:
no_argument (or 0) if the option does not take an argument,
required_argument (or 1) if the option requires an argument,
optional_argument (or 2) if the option takes an optional argument.
- If the field `flag' is not NULL, it points to a variable that is set
- to the value given in the field `val' when the option is found, but
+ If the field 'flag' is not NULL, it points to a variable that is set
+ to the value given in the field 'val' when the option is found, but
left unchanged if the option is not found.
- To have a long-named option do something other than set an `int' to
- a compiled-in constant, such as set a value from `optarg', set the
- option's `flag' field to zero and its `val' field to a nonzero
+ To have a long-named option do something other than set an 'int' to
+ a compiled-in constant, such as set a value from 'optarg', set the
+ option's 'flag' field to zero and its 'val' field to a nonzero
value (the equivalent single-letter option character, if there is
- one). For long options that have a zero `flag' field, `getopt'
- returns the contents of the `val' field. */
+ one). For long options that have a zero 'flag' field, 'getopt'
+ returns the contents of the 'val' field. */
# if !GNULIB_defined_struct_option
struct option
@@ -194,7 +196,7 @@ struct option
# define GNULIB_defined_struct_option 1
# endif
-/* Names for the values of the `has_arg' field of `struct option'. */
+/* Names for the values of the 'has_arg' field of 'struct option'. */
# define no_argument 0
# define required_argument 1
@@ -208,23 +210,23 @@ struct option
Return the option character from OPTS just read. Return -1 when
there are no more options. For unrecognized options, or options
- missing arguments, `optopt' is set to the option letter, and '?' is
+ missing arguments, 'optopt' is set to the option letter, and '?' is
returned.
The OPTS string is a list of characters which are recognized option
letters, optionally followed by colons, specifying that that letter
- takes an argument, to be placed in `optarg'.
+ takes an argument, to be placed in 'optarg'.
If a letter in OPTS is followed by two colons, its argument is
- optional. This behavior is specific to the GNU `getopt'.
+ optional. This behavior is specific to the GNU 'getopt'.
- The argument `--' causes premature termination of argument
- scanning, explicitly telling `getopt' that there are no more
+ The argument '--' causes premature termination of argument
+ scanning, explicitly telling 'getopt' that there are no more
options.
- If OPTS begins with `-', then non-option arguments are treated as
+ If OPTS begins with '-', then non-option arguments are treated as
arguments to the option '\1'. This behavior is specific to the GNU
- `getopt'. If OPTS begins with `+', or POSIXLY_CORRECT is set in
+ 'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in
the environment, then do not permute arguments. */
extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
@@ -249,5 +251,5 @@ extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv,
/* Make sure we later can get all the definitions and declarations. */
#undef __need_getopt
-#endif /* getopt.h */
-#endif /* getopt.h */
+#endif /* _@GUARD_PREFIX@_GETOPT_H */
+#endif /* _@GUARD_PREFIX@_GETOPT_H */
diff --git a/lib/getopt1.c b/lib/getopt1.c
index 3656802..55a6b4e 100644
--- a/lib/getopt1.c
+++ b/lib/getopt1.c
@@ -1,5 +1,5 @@
/* getopt_long and getopt_long_only entry points for GNU getopt.
- Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2011 Free Software
+ Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2013 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
@@ -141,11 +141,11 @@ main (int argc, char **argv)
break;
case 'c':
- printf ("option c with value `%s'\n", optarg);
+ printf ("option c with value '%s'\n", optarg);
break;
case 'd':
- printf ("option d with value `%s'\n", optarg);
+ printf ("option d with value '%s'\n", optarg);
break;
case '?':
diff --git a/lib/getopt_int.h b/lib/getopt_int.h
index 9f0c713..a6e4b9e 100644
--- a/lib/getopt_int.h
+++ b/lib/getopt_int.h
@@ -1,5 +1,5 @@
/* Internal declarations for getopt.
- Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2011 Free Software
+ Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2013 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
@@ -40,7 +40,7 @@ extern int _getopt_internal (int ___argc, char **___argv,
stop option processing when the first non-option is seen.
This is what Unix does.
This mode of operation is selected by either setting the environment
- variable POSIXLY_CORRECT, or using `+' as the first character
+ variable POSIXLY_CORRECT, or using '+' as the first character
of the list of option characters, or by calling getopt.
PERMUTE is the default. We permute the contents of ARGV as we
@@ -52,12 +52,12 @@ extern int _getopt_internal (int ___argc, char **___argv,
written to expect options and other ARGV-elements in any order
and that care about the ordering of the two. We describe each
non-option ARGV-element as if it were the argument of an option
- with character code 1. Using `-' as the first character of the
+ with character code 1. Using '-' as the first character of the
list of option characters selects this mode of operation.
- The special argument `--' forces an end of option-scanning regardless
- of the value of `ordering'. In the case of RETURN_IN_ORDER, only
- `--' can cause `getopt' to return -1 with `optind' != ARGC. */
+ The special argument '--' forces an end of option-scanning regardless
+ of the value of 'ordering'. In the case of RETURN_IN_ORDER, only
+ '--' can cause 'getopt' to return -1 with 'optind' != ARGC. */
enum __ord
{
@@ -99,8 +99,8 @@ struct _getopt_data
/* Handle permutation of arguments. */
/* Describe the part of ARGV that contains non-options that have
- been skipped. `first_nonopt' is the index in ARGV of the first
- of them; `last_nonopt' is the index after the last of them. */
+ been skipped. 'first_nonopt' is the index in ARGV of the first
+ of them; 'last_nonopt' is the index after the last of them. */
int __first_nonopt;
int __last_nonopt;
diff --git a/lib/gettext.h b/lib/gettext.h
index 458e332..d021571 100644
--- a/lib/gettext.h
+++ b/lib/gettext.h
@@ -1,5 +1,5 @@
/* Convenience header for conditional use of GNU <libintl.h>.
- Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2011 Free Software
+ Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2013 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ with this program; if not, see <http://www.gnu.org/licenses/>. */
#ifndef _LIBGETTEXT_H
#define _LIBGETTEXT_H 1
@@ -184,9 +183,12 @@ npgettext_aux (const char *domain,
#include <string.h>
-#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \
- (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \
- /* || __STDC_VERSION__ >= 199901L */ )
+#if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \
+ /* || __STDC_VERSION__ >= 199901L */ )
+# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1
+#else
+# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0
+#endif
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
#include <stdlib.h>
diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c
index adfb51f..ad65c6d 100644
--- a/lib/gettimeofday.c
+++ b/lib/gettimeofday.c
@@ -1,6 +1,6 @@
/* Provide gettimeofday for systems that don't have it or for which it's broken.
- Copyright (C) 2001-2003, 2005-2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2007, 2009-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
/* written by Jim Meyering */
@@ -110,7 +109,18 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz)
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;
diff --git a/lib/gl_anyhash_list1.h b/lib/gl_anyhash_list1.h
index 47400e1..57ead45 100644
--- a/lib/gl_anyhash_list1.h
+++ b/lib/gl_anyhash_list1.h
@@ -1,5 +1,5 @@
/* Sequential list data type implemented by a hash table with another list.
- Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/gl_anyhash_list2.h b/lib/gl_anyhash_list2.h
index 96b98e8..3791ae2 100644
--- a/lib/gl_anyhash_list2.h
+++ b/lib/gl_anyhash_list2.h
@@ -1,5 +1,5 @@
/* Sequential list data type implemented by a hash table with another list.
- Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/gl_anylinked_list1.h b/lib/gl_anylinked_list1.h
index b6bc8b4..c8879f0 100644
--- a/lib/gl_anylinked_list1.h
+++ b/lib/gl_anylinked_list1.h
@@ -1,5 +1,5 @@
/* Sequential list data type implemented by a linked list.
- Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/gl_anylinked_list2.h b/lib/gl_anylinked_list2.h
index c5ba2ff..45ca7c8 100644
--- a/lib/gl_anylinked_list2.h
+++ b/lib/gl_anylinked_list2.h
@@ -1,5 +1,5 @@
/* Sequential list data type implemented by a linked list.
- Copyright (C) 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/gl_anytree_oset.h b/lib/gl_anytree_oset.h
index c0a0a2f..e1f90a9 100644
--- a/lib/gl_anytree_oset.h
+++ b/lib/gl_anytree_oset.h
@@ -1,5 +1,5 @@
/* Ordered set data type implemented by a binary tree.
- Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/gl_avltree_oset.c b/lib/gl_avltree_oset.c
index af473d2..09202ae 100644
--- a/lib/gl_avltree_oset.c
+++ b/lib/gl_avltree_oset.c
@@ -1,5 +1,5 @@
/* Ordered set data type implemented by a binary tree.
- Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/gl_avltree_oset.h b/lib/gl_avltree_oset.h
index 9b888cc..abac895 100644
--- a/lib/gl_avltree_oset.h
+++ b/lib/gl_avltree_oset.h
@@ -1,5 +1,5 @@
/* Ordered set data type implemented by a binary tree.
- Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/gl_linkedhash_list.c b/lib/gl_linkedhash_list.c
index fb6fbec..2f4e05f 100644
--- a/lib/gl_linkedhash_list.c
+++ b/lib/gl_linkedhash_list.c
@@ -1,5 +1,5 @@
/* Sequential list data type implemented by a hash table with a linked list.
- Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2008-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
@@ -43,7 +43,7 @@
#include "gl_anyhash_list2.h"
/* Resize the hash table if needed, after list->count was incremented. */
-static inline void
+static void
hash_resize_after_add (gl_list_t list)
{
size_t count = list->count;
@@ -53,7 +53,7 @@ hash_resize_after_add (gl_list_t list)
}
/* Add a node to the hash table structure. */
-static inline void
+static void
add_to_bucket (gl_list_t list, gl_list_node_t node)
{
size_t bucket = node->h.hashcode % list->table_size;
@@ -65,7 +65,7 @@ add_to_bucket (gl_list_t list, gl_list_node_t node)
#define add_to_bucket(list,node) ((add_to_bucket) (list, node), 0)
/* Remove a node from the hash table structure. */
-static inline void
+static void
remove_from_bucket (gl_list_t list, gl_list_node_t node)
{
size_t bucket = node->h.hashcode % list->table_size;
diff --git a/lib/gl_linkedhash_list.h b/lib/gl_linkedhash_list.h
index c9e7c70..577756c 100644
--- a/lib/gl_linkedhash_list.h
+++ b/lib/gl_linkedhash_list.h
@@ -1,5 +1,5 @@
/* Sequential list data type implemented by a hash table with a linked list.
- Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/gl_list.c b/lib/gl_list.c
index 919a0cd..8793298 100644
--- a/lib/gl_list.c
+++ b/lib/gl_list.c
@@ -1,283 +1,3 @@
-/* Abstract sequential list data type.
- Copyright (C) 2006-2011 Free Software Foundation, Inc.
- Written by Bruno Haible <bruno@clisp.org>, 2006.
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
#include <config.h>
-
-/* Specification. */
+#define GL_LIST_INLINE _GL_EXTERN_INLINE
#include "gl_list.h"
-
-#if !HAVE_INLINE
-
-/* Define all functions of this file as inline accesses to the
- struct gl_list_implementation.
- Use #define to avoid a warning because of extern vs. static. */
-
-gl_list_t
-gl_list_nx_create_empty (gl_list_implementation_t implementation,
- gl_listelement_equals_fn equals_fn,
- gl_listelement_hashcode_fn hashcode_fn,
- gl_listelement_dispose_fn dispose_fn,
- bool allow_duplicates)
-{
- return implementation->nx_create_empty (implementation, equals_fn,
- hashcode_fn, dispose_fn,
- allow_duplicates);
-}
-
-gl_list_t
-gl_list_nx_create (gl_list_implementation_t implementation,
- gl_listelement_equals_fn equals_fn,
- gl_listelement_hashcode_fn hashcode_fn,
- gl_listelement_dispose_fn dispose_fn,
- bool allow_duplicates,
- size_t count, const void **contents)
-{
- return implementation->nx_create (implementation, equals_fn, hashcode_fn,
- dispose_fn, allow_duplicates, count,
- contents);
-}
-
-size_t
-gl_list_size (gl_list_t list)
-{
- return ((const struct gl_list_impl_base *) list)->vtable
- ->size (list);
-}
-
-const void *
-gl_list_node_value (gl_list_t list, gl_list_node_t node)
-{
- return ((const struct gl_list_impl_base *) list)->vtable
- ->node_value (list, node);
-}
-
-int
-gl_list_node_nx_set_value (gl_list_t list, gl_list_node_t node,
- const void *elt)
-{
- return ((const struct gl_list_impl_base *) list)->vtable
- ->node_nx_set_value (list, node, elt);
-}
-
-gl_list_node_t
-gl_list_next_node (gl_list_t list, gl_list_node_t node)
-{
- return ((const struct gl_list_impl_base *) list)->vtable
- ->next_node (list, node);
-}
-
-gl_list_node_t
-gl_list_previous_node (gl_list_t list, gl_list_node_t node)
-{
- return ((const struct gl_list_impl_base *) list)->vtable
- ->previous_node (list, node);
-}
-
-const void *
-gl_list_get_at (gl_list_t list, size_t position)
-{
- return ((const struct gl_list_impl_base *) list)->vtable
- ->get_at (list, position);
-}
-
-gl_list_node_t
-gl_list_nx_set_at (gl_list_t list, size_t position, const void *elt)
-{
- return ((const struct gl_list_impl_base *) list)->vtable
- ->nx_set_at (list, position, elt);
-}
-
-gl_list_node_t
-gl_list_search (gl_list_t list, const void *elt)
-{
- size_t size = ((const struct gl_list_impl_base *) list)->vtable->size (list);
- return ((const struct gl_list_impl_base *) list)->vtable
- ->search_from_to (list, 0, size, elt);
-}
-
-gl_list_node_t
-gl_list_search_from (gl_list_t list, size_t start_index, const void *elt)
-{
- size_t size = ((const struct gl_list_impl_base *) list)->vtable->size (list);
- return ((const struct gl_list_impl_base *) list)->vtable
- ->search_from_to (list, start_index, size, elt);
-}
-
-gl_list_node_t
-gl_list_search_from_to (gl_list_t list, size_t start_index, size_t end_index, const void *elt)
-{
- return ((const struct gl_list_impl_base *) list)->vtable
- ->search_from_to (list, start_index, end_index, elt);
-}
-
-size_t
-gl_list_indexof (gl_list_t list, const void *elt)
-{
- size_t size = ((const struct gl_list_impl_base *) list)->vtable->size (list);
- return ((const struct gl_list_impl_base *) list)->vtable
- ->indexof_from_to (list, 0, size, elt);
-}
-
-size_t
-gl_list_indexof_from (gl_list_t list, size_t start_index, const void *elt)
-{
- size_t size = ((const struct gl_list_impl_base *) list)->vtable->size (list);
- return ((const struct gl_list_impl_base *) list)->vtable
- ->indexof_from_to (list, start_index, size, elt);
-}
-
-size_t
-gl_list_indexof_from_to (gl_list_t list, size_t start_index, size_t end_index, const void *elt)
-{
- return ((const struct gl_list_impl_base *) list)->vtable
- ->indexof_from_to (list, start_index, end_index, elt);
-}
-
-gl_list_node_t
-gl_list_nx_add_first (gl_list_t list, const void *elt)
-{
- return ((const struct gl_list_impl_base *) list)->vtable
- ->nx_add_first (list, elt);
-}
-
-gl_list_node_t
-gl_list_nx_add_last (gl_list_t list, const void *elt)
-{
- return ((const struct gl_list_impl_base *) list)->vtable
- ->nx_add_last (list, elt);
-}
-
-gl_list_node_t
-gl_list_nx_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
-{
- return ((const struct gl_list_impl_base *) list)->vtable
- ->nx_add_before (list, node, elt);
-}
-
-gl_list_node_t
-gl_list_nx_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
-{
- return ((const struct gl_list_impl_base *) list)->vtable
- ->nx_add_after (list, node, elt);
-}
-
-gl_list_node_t
-gl_list_nx_add_at (gl_list_t list, size_t position, const void *elt)
-{
- return ((const struct gl_list_impl_base *) list)->vtable
- ->nx_add_at (list, position, elt);
-}
-
-bool
-gl_list_remove_node (gl_list_t list, gl_list_node_t node)
-{
- return ((const struct gl_list_impl_base *) list)->vtable
- ->remove_node (list, node);
-}
-
-bool
-gl_list_remove_at (gl_list_t list, size_t position)
-{
- return ((const struct gl_list_impl_base *) list)->vtable
- ->remove_at (list, position);
-}
-
-bool
-gl_list_remove (gl_list_t list, const void *elt)
-{
- return ((const struct gl_list_impl_base *) list)->vtable
- ->remove_elt (list, elt);
-}
-
-void
-gl_list_free (gl_list_t list)
-{
- ((const struct gl_list_impl_base *) list)->vtable->list_free (list);
-}
-
-gl_list_iterator_t
-gl_list_iterator (gl_list_t list)
-{
- return ((const struct gl_list_impl_base *) list)->vtable
- ->iterator (list);
-}
-
-gl_list_iterator_t
-gl_list_iterator_from_to (gl_list_t list, size_t start_index, size_t end_index)
-{
- return ((const struct gl_list_impl_base *) list)->vtable
- ->iterator_from_to (list, start_index, end_index);
-}
-
-bool
-gl_list_iterator_next (gl_list_iterator_t *iterator,
- const void **eltp, gl_list_node_t *nodep)
-{
- return iterator->vtable->iterator_next (iterator, eltp, nodep);
-}
-
-void
-gl_list_iterator_free (gl_list_iterator_t *iterator)
-{
- iterator->vtable->iterator_free (iterator);
-}
-
-gl_list_node_t
-gl_sortedlist_search (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
-{
- return ((const struct gl_list_impl_base *) list)->vtable
- ->sortedlist_search (list, compar, elt);
-}
-
-gl_list_node_t
-gl_sortedlist_search_from_to (gl_list_t list, gl_listelement_compar_fn compar, size_t start_index, size_t end_index, const void *elt)
-{
- return ((const struct gl_list_impl_base *) list)->vtable
- ->sortedlist_search_from_to (list, compar, start_index, end_index,
- elt);
-}
-
-size_t
-gl_sortedlist_indexof (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
-{
- return ((const struct gl_list_impl_base *) list)->vtable
- ->sortedlist_indexof (list, compar, elt);
-}
-
-size_t
-gl_sortedlist_indexof_from_to (gl_list_t list, gl_listelement_compar_fn compar, size_t start_index, size_t end_index, const void *elt)
-{
- return ((const struct gl_list_impl_base *) list)->vtable
- ->sortedlist_indexof_from_to (list, compar, start_index, end_index,
- elt);
-}
-
-gl_list_node_t
-gl_sortedlist_nx_add (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
-{
- return ((const struct gl_list_impl_base *) list)->vtable
- ->sortedlist_nx_add (list, compar, elt);
-}
-
-bool
-gl_sortedlist_remove (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
-{
- return ((const struct gl_list_impl_base *) list)->vtable
- ->sortedlist_remove (list, compar, elt);
-}
-
-#endif
diff --git a/lib/gl_list.h b/lib/gl_list.h
index be60020..9094723 100644
--- a/lib/gl_list.h
+++ b/lib/gl_list.h
@@ -1,5 +1,5 @@
/* Abstract sequential list data type.
- Copyright (C) 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
@@ -21,6 +21,14 @@
#include <stdbool.h>
#include <stddef.h>
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef GL_LIST_INLINE
+# define GL_LIST_INLINE _GL_INLINE
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -120,6 +128,8 @@ struct gl_list_implementation;
/* Type representing a list datatype implementation. */
typedef const struct gl_list_implementation * gl_list_implementation_t;
+#if 0 /* Unless otherwise specified, these are defined inline below. */
+
/* Create an empty list.
IMPLEMENTATION is one of GL_ARRAY_LIST, GL_CARRAY_LIST, GL_LINKED_LIST,
GL_AVLTREE_LIST, GL_RBTREE_LIST, GL_LINKEDHASH_LIST, GL_AVLTREEHASH_LIST,
@@ -129,13 +139,12 @@ typedef const struct gl_list_implementation * gl_list_implementation_t;
DISPOSE_FN is an element disposal function or NULL.
ALLOW_DUPLICATES is false if duplicate elements shall not be allowed in
the list. The implementation may verify this at runtime. */
-#if 0 /* declared in gl_xlist.h */
+/* declared in gl_xlist.h */
extern gl_list_t gl_list_create_empty (gl_list_implementation_t implementation,
gl_listelement_equals_fn equals_fn,
gl_listelement_hashcode_fn hashcode_fn,
gl_listelement_dispose_fn dispose_fn,
bool allow_duplicates);
-#endif
/* Likewise. Return NULL upon out-of-memory. */
extern gl_list_t gl_list_nx_create_empty (gl_list_implementation_t implementation,
gl_listelement_equals_fn equals_fn,
@@ -154,14 +163,13 @@ extern gl_list_t gl_list_nx_create_empty (gl_list_implementation_t implementatio
the list. The implementation may verify this at runtime.
COUNT is the number of initial elements.
CONTENTS[0..COUNT-1] is the initial contents. */
-#if 0 /* declared in gl_xlist.h */
+/* declared in gl_xlist.h */
extern gl_list_t gl_list_create (gl_list_implementation_t implementation,
gl_listelement_equals_fn equals_fn,
gl_listelement_hashcode_fn hashcode_fn,
gl_listelement_dispose_fn dispose_fn,
bool allow_duplicates,
size_t count, const void **contents);
-#endif
/* Likewise. Return NULL upon out-of-memory. */
extern gl_list_t gl_list_nx_create (gl_list_implementation_t implementation,
gl_listelement_equals_fn equals_fn,
@@ -177,10 +185,9 @@ extern size_t gl_list_size (gl_list_t list);
extern const void * gl_list_node_value (gl_list_t list, gl_list_node_t node);
/* Replace the element value represented by a list node. */
-#if 0 /* declared in gl_xlist.h */
+/* declared in gl_xlist.h */
extern void gl_list_node_set_value (gl_list_t list, gl_list_node_t node,
const void *elt);
-#endif
/* Likewise. Return 0 upon success, -1 upon out-of-memory. */
extern int gl_list_node_nx_set_value (gl_list_t list, gl_list_node_t node,
const void *elt)
@@ -204,10 +211,9 @@ extern const void * gl_list_get_at (gl_list_t list, size_t position);
/* Replace the element at a given position in the list.
POSITION must be >= 0 and < gl_list_size (list).
Return its node. */
-#if 0 /* declared in gl_xlist.h */
+/* declared in gl_xlist.h */
extern gl_list_node_t gl_list_set_at (gl_list_t list, size_t position,
const void *elt);
-#endif
/* Likewise. Return NULL upon out-of-memory. */
extern gl_list_node_t gl_list_nx_set_at (gl_list_t list, size_t position,
const void *elt)
@@ -253,9 +259,8 @@ extern size_t gl_list_indexof_from_to (gl_list_t list,
/* Add an element as the first element of the list.
Return its node. */
-#if 0 /* declared in gl_xlist.h */
+/* declared in gl_xlist.h */
extern gl_list_node_t gl_list_add_first (gl_list_t list, const void *elt);
-#endif
/* Likewise. Return NULL upon out-of-memory. */
extern gl_list_node_t gl_list_nx_add_first (gl_list_t list, const void *elt)
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
@@ -265,9 +270,8 @@ extern gl_list_node_t gl_list_nx_add_first (gl_list_t list, const void *elt)
/* Add an element as the last element of the list.
Return its node. */
-#if 0 /* declared in gl_xlist.h */
+/* declared in gl_xlist.h */
extern gl_list_node_t gl_list_add_last (gl_list_t list, const void *elt);
-#endif
/* Likewise. Return NULL upon out-of-memory. */
extern gl_list_node_t gl_list_nx_add_last (gl_list_t list, const void *elt)
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
@@ -277,10 +281,9 @@ extern gl_list_node_t gl_list_nx_add_last (gl_list_t list, const void *elt)
/* Add an element before a given element node of the list.
Return its node. */
-#if 0 /* declared in gl_xlist.h */
+/* declared in gl_xlist.h */
extern gl_list_node_t gl_list_add_before (gl_list_t list, gl_list_node_t node,
const void *elt);
-#endif
/* Likewise. Return NULL upon out-of-memory. */
extern gl_list_node_t gl_list_nx_add_before (gl_list_t list,
gl_list_node_t node,
@@ -292,10 +295,9 @@ extern gl_list_node_t gl_list_nx_add_before (gl_list_t list,
/* Add an element after a given element node of the list.
Return its node. */
-#if 0 /* declared in gl_xlist.h */
+/* declared in gl_xlist.h */
extern gl_list_node_t gl_list_add_after (gl_list_t list, gl_list_node_t node,
const void *elt);
-#endif
/* Likewise. Return NULL upon out-of-memory. */
extern gl_list_node_t gl_list_nx_add_after (gl_list_t list, gl_list_node_t node,
const void *elt)
@@ -306,10 +308,9 @@ extern gl_list_node_t gl_list_nx_add_after (gl_list_t list, gl_list_node_t node,
/* Add an element at a given position in the list.
POSITION must be >= 0 and <= gl_list_size (list). */
-#if 0 /* declared in gl_xlist.h */
+/* declared in gl_xlist.h */
extern gl_list_node_t gl_list_add_at (gl_list_t list, size_t position,
const void *elt);
-#endif
/* Likewise. Return NULL upon out-of-memory. */
extern gl_list_node_t gl_list_nx_add_at (gl_list_t list, size_t position,
const void *elt)
@@ -335,6 +336,8 @@ extern bool gl_list_remove (gl_list_t list, const void *elt);
(But this call does not free the elements of the list.) */
extern void gl_list_free (gl_list_t list);
+#endif /* End of inline and gl_xlist.h-defined functions. */
+
/* --------------------- gl_list_iterator_t Data Type --------------------- */
/* Functions for iterating through a list. */
@@ -354,6 +357,8 @@ typedef struct
size_t i; size_t j;
} gl_list_iterator_t;
+#if 0 /* These are defined inline below. */
+
/* Create an iterator traversing a list.
The list contents must not be modified while the iterator is in use,
except for replacing or removing the last returned element. */
@@ -376,6 +381,8 @@ extern bool gl_list_iterator_next (gl_list_iterator_t *iterator,
/* Free an iterator. */
extern void gl_list_iterator_free (gl_list_iterator_t *iterator);
+#endif /* End of inline functions. */
+
/* ---------------------- Sorted gl_list_t Data Type ---------------------- */
/* The following functions are for lists without duplicates where the
@@ -385,6 +392,8 @@ extern void gl_list_iterator_free (gl_list_iterator_t *iterator);
NULL denotes pointer comparison. */
typedef int (*gl_listelement_compar_fn) (const void *elt1, const void *elt2);
+#if 0 /* Unless otherwise specified, these are defined inline below. */
+
/* Search whether an element is already in the list.
The list is assumed to be sorted with COMPAR.
Return its node if found, or NULL if not present in the list.
@@ -434,11 +443,10 @@ extern size_t gl_sortedlist_indexof_from_to (gl_list_t list,
/* Add an element at the appropriate position in the list.
The list is assumed to be sorted with COMPAR.
Return its node. */
-#if 0 /* declared in gl_xlist.h */
+/* declared in gl_xlist.h */
extern gl_list_node_t gl_sortedlist_add (gl_list_t list,
gl_listelement_compar_fn compar,
const void *elt);
-#endif
/* Likewise. Return NULL upon out-of-memory. */
extern gl_list_node_t gl_sortedlist_nx_add (gl_list_t list,
gl_listelement_compar_fn compar,
@@ -457,6 +465,8 @@ extern bool gl_sortedlist_remove (gl_list_t list,
gl_listelement_compar_fn compar,
const void *elt);
+#endif /* End of inline and gl_xlist.h-defined functions. */
+
/* ------------------------ Implementation Details ------------------------ */
struct gl_list_implementation
@@ -539,14 +549,10 @@ struct gl_list_impl_base
bool allow_duplicates;
};
-#if HAVE_INLINE
-
-/* Define all functions of this file as inline accesses to the
- struct gl_list_implementation.
- Use #define to avoid a warning because of extern vs. static. */
+/* Define all functions of this file as accesses to the
+ struct gl_list_implementation. */
-# define gl_list_nx_create_empty gl_list_nx_create_empty_inline
-static inline gl_list_t
+GL_LIST_INLINE gl_list_t
gl_list_nx_create_empty (gl_list_implementation_t implementation,
gl_listelement_equals_fn equals_fn,
gl_listelement_hashcode_fn hashcode_fn,
@@ -558,8 +564,7 @@ gl_list_nx_create_empty (gl_list_implementation_t implementation,
allow_duplicates);
}
-# define gl_list_nx_create gl_list_nx_create_inline
-static inline gl_list_t
+GL_LIST_INLINE gl_list_t
gl_list_nx_create (gl_list_implementation_t implementation,
gl_listelement_equals_fn equals_fn,
gl_listelement_hashcode_fn hashcode_fn,
@@ -572,24 +577,24 @@ gl_list_nx_create (gl_list_implementation_t implementation,
contents);
}
-# define gl_list_size gl_list_size_inline
-static inline size_t
+GL_LIST_INLINE size_t
gl_list_size (gl_list_t list)
{
return ((const struct gl_list_impl_base *) list)->vtable
->size (list);
}
-# define gl_list_node_value gl_list_node_value_inline
-static inline const void *
+GL_LIST_INLINE const void *
gl_list_node_value (gl_list_t list, gl_list_node_t node)
{
return ((const struct gl_list_impl_base *) list)->vtable
->node_value (list, node);
}
-# define gl_list_node_nx_set_value gl_list_node_nx_set_value_inline
-static inline int
+GL_LIST_INLINE int
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ __attribute__ ((__warn_unused_result__))
+#endif
gl_list_node_nx_set_value (gl_list_t list, gl_list_node_t node,
const void *elt)
{
@@ -597,40 +602,38 @@ gl_list_node_nx_set_value (gl_list_t list, gl_list_node_t node,
->node_nx_set_value (list, node, elt);
}
-# define gl_list_next_node gl_list_next_node_inline
-static inline gl_list_node_t
+GL_LIST_INLINE gl_list_node_t
gl_list_next_node (gl_list_t list, gl_list_node_t node)
{
return ((const struct gl_list_impl_base *) list)->vtable
->next_node (list, node);
}
-# define gl_list_previous_node gl_list_previous_node_inline
-static inline gl_list_node_t
+GL_LIST_INLINE gl_list_node_t
gl_list_previous_node (gl_list_t list, gl_list_node_t node)
{
return ((const struct gl_list_impl_base *) list)->vtable
->previous_node (list, node);
}
-# define gl_list_get_at gl_list_get_at_inline
-static inline const void *
+GL_LIST_INLINE const void *
gl_list_get_at (gl_list_t list, size_t position)
{
return ((const struct gl_list_impl_base *) list)->vtable
->get_at (list, position);
}
-# define gl_list_nx_set_at gl_list_nx_set_at_inline
-static inline gl_list_node_t
+GL_LIST_INLINE gl_list_node_t
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ __attribute__ ((__warn_unused_result__))
+#endif
gl_list_nx_set_at (gl_list_t list, size_t position, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
->nx_set_at (list, position, elt);
}
-# define gl_list_search gl_list_search_inline
-static inline gl_list_node_t
+GL_LIST_INLINE gl_list_node_t
gl_list_search (gl_list_t list, const void *elt)
{
size_t size = ((const struct gl_list_impl_base *) list)->vtable->size (list);
@@ -638,8 +641,7 @@ gl_list_search (gl_list_t list, const void *elt)
->search_from_to (list, 0, size, elt);
}
-# define gl_list_search_from gl_list_search_from_inline
-static inline gl_list_node_t
+GL_LIST_INLINE gl_list_node_t
gl_list_search_from (gl_list_t list, size_t start_index, const void *elt)
{
size_t size = ((const struct gl_list_impl_base *) list)->vtable->size (list);
@@ -647,8 +649,7 @@ gl_list_search_from (gl_list_t list, size_t start_index, const void *elt)
->search_from_to (list, start_index, size, elt);
}
-# define gl_list_search_from_to gl_list_search_from_to_inline
-static inline gl_list_node_t
+GL_LIST_INLINE gl_list_node_t
gl_list_search_from_to (gl_list_t list, size_t start_index, size_t end_index,
const void *elt)
{
@@ -656,8 +657,7 @@ gl_list_search_from_to (gl_list_t list, size_t start_index, size_t end_index,
->search_from_to (list, start_index, end_index, elt);
}
-# define gl_list_indexof gl_list_indexof_inline
-static inline size_t
+GL_LIST_INLINE size_t
gl_list_indexof (gl_list_t list, const void *elt)
{
size_t size = ((const struct gl_list_impl_base *) list)->vtable->size (list);
@@ -665,8 +665,7 @@ gl_list_indexof (gl_list_t list, const void *elt)
->indexof_from_to (list, 0, size, elt);
}
-# define gl_list_indexof_from gl_list_indexof_from_inline
-static inline size_t
+GL_LIST_INLINE size_t
gl_list_indexof_from (gl_list_t list, size_t start_index, const void *elt)
{
size_t size = ((const struct gl_list_impl_base *) list)->vtable->size (list);
@@ -674,8 +673,7 @@ gl_list_indexof_from (gl_list_t list, size_t start_index, const void *elt)
->indexof_from_to (list, start_index, size, elt);
}
-# define gl_list_indexof_from_to gl_list_indexof_from_to_inline
-static inline size_t
+GL_LIST_INLINE size_t
gl_list_indexof_from_to (gl_list_t list, size_t start_index, size_t end_index,
const void *elt)
{
@@ -683,118 +681,118 @@ gl_list_indexof_from_to (gl_list_t list, size_t start_index, size_t end_index,
->indexof_from_to (list, start_index, end_index, elt);
}
-# define gl_list_nx_add_first gl_list_nx_add_first_inline
-static inline gl_list_node_t
+GL_LIST_INLINE gl_list_node_t
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ __attribute__ ((__warn_unused_result__))
+#endif
gl_list_nx_add_first (gl_list_t list, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
->nx_add_first (list, elt);
}
-# define gl_list_nx_add_last gl_list_nx_add_last_inline
-static inline gl_list_node_t
+GL_LIST_INLINE gl_list_node_t
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ __attribute__ ((__warn_unused_result__))
+#endif
gl_list_nx_add_last (gl_list_t list, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
->nx_add_last (list, elt);
}
-# define gl_list_nx_add_before gl_list_nx_add_before_inline
-static inline gl_list_node_t
+GL_LIST_INLINE gl_list_node_t
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ __attribute__ ((__warn_unused_result__))
+#endif
gl_list_nx_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
->nx_add_before (list, node, elt);
}
-# define gl_list_nx_add_after gl_list_nx_add_after_inline
-static inline gl_list_node_t
+GL_LIST_INLINE gl_list_node_t
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ __attribute__ ((__warn_unused_result__))
+#endif
gl_list_nx_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
->nx_add_after (list, node, elt);
}
-# define gl_list_nx_add_at gl_list_nx_add_at_inline
-static inline gl_list_node_t
+GL_LIST_INLINE gl_list_node_t
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ __attribute__ ((__warn_unused_result__))
+#endif
gl_list_nx_add_at (gl_list_t list, size_t position, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
->nx_add_at (list, position, elt);
}
-# define gl_list_remove_node gl_list_remove_node_inline
-static inline bool
+GL_LIST_INLINE bool
gl_list_remove_node (gl_list_t list, gl_list_node_t node)
{
return ((const struct gl_list_impl_base *) list)->vtable
->remove_node (list, node);
}
-# define gl_list_remove_at gl_list_remove_at_inline
-static inline bool
+GL_LIST_INLINE bool
gl_list_remove_at (gl_list_t list, size_t position)
{
return ((const struct gl_list_impl_base *) list)->vtable
->remove_at (list, position);
}
-# define gl_list_remove gl_list_remove_inline
-static inline bool
+GL_LIST_INLINE bool
gl_list_remove (gl_list_t list, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
->remove_elt (list, elt);
}
-# define gl_list_free gl_list_free_inline
-static inline void
+GL_LIST_INLINE void
gl_list_free (gl_list_t list)
{
((const struct gl_list_impl_base *) list)->vtable->list_free (list);
}
-# define gl_list_iterator gl_list_iterator_inline
-static inline gl_list_iterator_t
+GL_LIST_INLINE gl_list_iterator_t
gl_list_iterator (gl_list_t list)
{
return ((const struct gl_list_impl_base *) list)->vtable
->iterator (list);
}
-# define gl_list_iterator_from_to gl_list_iterator_from_to_inline
-static inline gl_list_iterator_t
+GL_LIST_INLINE gl_list_iterator_t
gl_list_iterator_from_to (gl_list_t list, size_t start_index, size_t end_index)
{
return ((const struct gl_list_impl_base *) list)->vtable
->iterator_from_to (list, start_index, end_index);
}
-# define gl_list_iterator_next gl_list_iterator_next_inline
-static inline bool
+GL_LIST_INLINE bool
gl_list_iterator_next (gl_list_iterator_t *iterator,
const void **eltp, gl_list_node_t *nodep)
{
return iterator->vtable->iterator_next (iterator, eltp, nodep);
}
-# define gl_list_iterator_free gl_list_iterator_free_inline
-static inline void
+GL_LIST_INLINE void
gl_list_iterator_free (gl_list_iterator_t *iterator)
{
iterator->vtable->iterator_free (iterator);
}
-# define gl_sortedlist_search gl_sortedlist_search_inline
-static inline gl_list_node_t
+GL_LIST_INLINE gl_list_node_t
gl_sortedlist_search (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
->sortedlist_search (list, compar, elt);
}
-# define gl_sortedlist_search_from_to gl_sortedlist_search_from_to_inline
-static inline gl_list_node_t
+GL_LIST_INLINE gl_list_node_t
gl_sortedlist_search_from_to (gl_list_t list, gl_listelement_compar_fn compar, size_t start_index, size_t end_index, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
@@ -802,16 +800,14 @@ gl_sortedlist_search_from_to (gl_list_t list, gl_listelement_compar_fn compar, s
elt);
}
-# define gl_sortedlist_indexof gl_sortedlist_indexof_inline
-static inline size_t
+GL_LIST_INLINE size_t
gl_sortedlist_indexof (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
->sortedlist_indexof (list, compar, elt);
}
-# define gl_sortedlist_indexof_from_to gl_sortedlist_indexof_from_to_inline
-static inline size_t
+GL_LIST_INLINE size_t
gl_sortedlist_indexof_from_to (gl_list_t list, gl_listelement_compar_fn compar, size_t start_index, size_t end_index, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
@@ -819,26 +815,27 @@ gl_sortedlist_indexof_from_to (gl_list_t list, gl_listelement_compar_fn compar,
elt);
}
-# define gl_sortedlist_nx_add gl_sortedlist_nx_add_inline
-static inline gl_list_node_t
+GL_LIST_INLINE gl_list_node_t
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ __attribute__ ((__warn_unused_result__))
+#endif
gl_sortedlist_nx_add (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
->sortedlist_nx_add (list, compar, elt);
}
-# define gl_sortedlist_remove gl_sortedlist_remove_inline
-static inline bool
+GL_LIST_INLINE bool
gl_sortedlist_remove (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
->sortedlist_remove (list, compar, elt);
}
-#endif
-
#ifdef __cplusplus
}
#endif
+_GL_INLINE_HEADER_END
+
#endif /* _GL_LIST_H */
diff --git a/lib/gl_oset.c b/lib/gl_oset.c
index 40e5073..21f731a 100644
--- a/lib/gl_oset.c
+++ b/lib/gl_oset.c
@@ -1,96 +1,3 @@
-/* Abstract ordered set data type.
- Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc.
- Written by Bruno Haible <bruno@clisp.org>, 2006.
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
#include <config.h>
-
-/* Specification. */
+#define GL_OSET_INLINE _GL_EXTERN_INLINE
#include "gl_oset.h"
-
-#if !HAVE_INLINE
-
-/* Define all functions of this file as inline accesses to the
- struct gl_list_implementation.
- Use #define to avoid a warning because of extern vs. static. */
-
-gl_oset_t
-gl_oset_nx_create_empty (gl_oset_implementation_t implementation,
- gl_setelement_compar_fn compar_fn,
- gl_setelement_dispose_fn dispose_fn)
-{
- return implementation->nx_create_empty (implementation, compar_fn,
- dispose_fn);
-}
-
-size_t
-gl_oset_size (gl_oset_t set)
-{
- return ((const struct gl_oset_impl_base *) set)->vtable->size (set);
-}
-
-bool
-gl_oset_search (gl_oset_t set, const void *elt)
-{
- return ((const struct gl_oset_impl_base *) set)->vtable->search (set, elt);
-}
-
-bool
-gl_oset_search_atleast (gl_oset_t set,
- gl_setelement_threshold_fn threshold_fn,
- const void *threshold, const void **eltp)
-{
- return ((const struct gl_oset_impl_base *) set)->vtable
- ->search_atleast (set, threshold_fn, threshold, eltp);
-}
-
-int
-gl_oset_nx_add (gl_oset_t set, const void *elt)
-{
- return ((const struct gl_oset_impl_base *) set)->vtable->nx_add (set, elt);
-}
-
-bool
-gl_oset_remove (gl_oset_t set, const void *elt)
-{
- return ((const struct gl_oset_impl_base *) set)->vtable
- ->remove_elt (set, elt);
-}
-
-void
-gl_oset_free (gl_oset_t set)
-{
- ((const struct gl_oset_impl_base *) set)->vtable->oset_free (set);
-}
-
-gl_oset_iterator_t
-gl_oset_iterator (gl_oset_t set)
-{
- return ((const struct gl_oset_impl_base *) set)->vtable->iterator (set);
-}
-
-bool
-gl_oset_iterator_next (gl_oset_iterator_t *iterator, const void **eltp)
-{
- return iterator->vtable->iterator_next (iterator, eltp);
-}
-
-void
-gl_oset_iterator_free (gl_oset_iterator_t *iterator)
-{
- iterator->vtable->iterator_free (iterator);
-}
-
-#endif
diff --git a/lib/gl_oset.h b/lib/gl_oset.h
index 99d0aba..5134065 100644
--- a/lib/gl_oset.h
+++ b/lib/gl_oset.h
@@ -1,5 +1,5 @@
/* Abstract ordered set data type.
- Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
@@ -21,6 +21,14 @@
#include <stdbool.h>
#include <stddef.h>
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef GL_OSET_INLINE
+# define GL_OSET_INLINE _GL_INLINE
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -85,15 +93,16 @@ struct gl_oset_implementation;
/* Type representing a ordered set datatype implementation. */
typedef const struct gl_oset_implementation * gl_oset_implementation_t;
+#if 0 /* Unless otherwise specified, these are defined inline below. */
+
/* Create an empty set.
IMPLEMENTATION is one of GL_ARRAY_OSET, GL_AVLTREE_OSET, GL_RBTREE_OSET.
COMPAR_FN is an element comparison function or NULL.
DISPOSE_FN is an element disposal function or NULL. */
-#if 0 /* declared in gl_xoset.h */
+/* declared in gl_xoset.h */
extern gl_oset_t gl_oset_create_empty (gl_oset_implementation_t implementation,
gl_setelement_compar_fn compar_fn,
gl_setelement_dispose_fn dispose_fn);
-#endif
/* Likewise. Return NULL upon out-of-memory. */
extern gl_oset_t gl_oset_nx_create_empty (gl_oset_implementation_t implementation,
gl_setelement_compar_fn compar_fn,
@@ -118,9 +127,8 @@ extern bool gl_oset_search_atleast (gl_oset_t set,
/* Add an element to an ordered set.
Return true if it was not already in the set and added, false otherwise. */
-#if 0 /* declared in gl_xoset.h */
+/* declared in gl_xoset.h */
extern bool gl_oset_add (gl_oset_t set, const void *elt);
-#endif
/* Likewise. Return -1 upon out-of-memory. */
extern int gl_oset_nx_add (gl_oset_t set, const void *elt)
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
@@ -136,6 +144,8 @@ extern bool gl_oset_remove (gl_oset_t set, const void *elt);
(But this call does not free the elements of the set.) */
extern void gl_oset_free (gl_oset_t set);
+#endif /* End of inline and gl_xlist.h-defined functions. */
+
/* --------------------- gl_oset_iterator_t Data Type --------------------- */
/* Functions for iterating through an ordered set. */
@@ -155,6 +165,8 @@ typedef struct
size_t i; size_t j;
} gl_oset_iterator_t;
+#if 0 /* These are defined inline below. */
+
/* Create an iterator traversing an ordered set.
The set's contents must not be modified while the iterator is in use,
except for removing the last returned element. */
@@ -168,6 +180,8 @@ extern bool gl_oset_iterator_next (gl_oset_iterator_t *iterator,
/* Free an iterator. */
extern void gl_oset_iterator_free (gl_oset_iterator_t *iterator);
+#endif /* End of inline functions. */
+
/* ------------------------ Implementation Details ------------------------ */
struct gl_oset_implementation
@@ -197,14 +211,10 @@ struct gl_oset_impl_base
gl_setelement_dispose_fn dispose_fn;
};
-#if HAVE_INLINE
-
-/* Define all functions of this file as inline accesses to the
- struct gl_oset_implementation.
- Use #define to avoid a warning because of extern vs. static. */
+/* Define all functions of this file as accesses to the
+ struct gl_oset_implementation. */
-# define gl_oset_nx_create_empty gl_oset_nx_create_empty_inline
-static inline gl_oset_t
+GL_OSET_INLINE gl_oset_t
gl_oset_nx_create_empty (gl_oset_implementation_t implementation,
gl_setelement_compar_fn compar_fn,
gl_setelement_dispose_fn dispose_fn)
@@ -213,22 +223,19 @@ gl_oset_nx_create_empty (gl_oset_implementation_t implementation,
dispose_fn);
}
-# define gl_oset_size gl_oset_size_inline
-static inline size_t
+GL_OSET_INLINE size_t
gl_oset_size (gl_oset_t set)
{
return ((const struct gl_oset_impl_base *) set)->vtable->size (set);
}
-# define gl_oset_search gl_oset_search_inline
-static inline bool
+GL_OSET_INLINE bool
gl_oset_search (gl_oset_t set, const void *elt)
{
return ((const struct gl_oset_impl_base *) set)->vtable->search (set, elt);
}
-# define gl_oset_search_atleast gl_oset_search_atleast_inline
-static inline bool
+GL_OSET_INLINE bool
gl_oset_search_atleast (gl_oset_t set,
gl_setelement_threshold_fn threshold_fn,
const void *threshold, const void **eltp)
@@ -237,53 +244,50 @@ gl_oset_search_atleast (gl_oset_t set,
->search_atleast (set, threshold_fn, threshold, eltp);
}
-# define gl_oset_nx_add gl_oset_nx_add_inline
-static inline int
+GL_OSET_INLINE int
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ __attribute__ ((__warn_unused_result__))
+#endif
gl_oset_nx_add (gl_oset_t set, const void *elt)
{
return ((const struct gl_oset_impl_base *) set)->vtable->nx_add (set, elt);
}
-# define gl_oset_remove gl_oset_remove_inline
-static inline bool
+GL_OSET_INLINE bool
gl_oset_remove (gl_oset_t set, const void *elt)
{
return ((const struct gl_oset_impl_base *) set)->vtable
->remove_elt (set, elt);
}
-# define gl_oset_free gl_oset_free_inline
-static inline void
+GL_OSET_INLINE void
gl_oset_free (gl_oset_t set)
{
((const struct gl_oset_impl_base *) set)->vtable->oset_free (set);
}
-# define gl_oset_iterator gl_oset_iterator_inline
-static inline gl_oset_iterator_t
+GL_OSET_INLINE gl_oset_iterator_t
gl_oset_iterator (gl_oset_t set)
{
return ((const struct gl_oset_impl_base *) set)->vtable->iterator (set);
}
-# define gl_oset_iterator_next gl_oset_iterator_next_inline
-static inline bool
+GL_OSET_INLINE bool
gl_oset_iterator_next (gl_oset_iterator_t *iterator, const void **eltp)
{
return iterator->vtable->iterator_next (iterator, eltp);
}
-# define gl_oset_iterator_free gl_oset_iterator_free_inline
-static inline void
+GL_OSET_INLINE void
gl_oset_iterator_free (gl_oset_iterator_t *iterator)
{
iterator->vtable->iterator_free (iterator);
}
-#endif
-
#ifdef __cplusplus
}
#endif
+_GL_INLINE_HEADER_END
+
#endif /* _GL_OSET_H */
diff --git a/lib/gl_xlist.c b/lib/gl_xlist.c
index f177caa..fe3c893 100644
--- a/lib/gl_xlist.c
+++ b/lib/gl_xlist.c
@@ -1,128 +1,3 @@
-/* Abstract sequential list data type, with out-of-memory checking.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
- Written by Bruno Haible <bruno@clisp.org>, 2009.
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
#include <config.h>
-
-/* Specification. */
+#define GL_XLIST_INLINE _GL_EXTERN_INLINE
#include "gl_xlist.h"
-
-#if !HAVE_INLINE
-
-gl_list_t
-gl_list_create_empty (gl_list_implementation_t implementation,
- gl_listelement_equals_fn equals_fn,
- gl_listelement_hashcode_fn hashcode_fn,
- gl_listelement_dispose_fn dispose_fn,
- bool allow_duplicates)
-{
- gl_list_t result =
- gl_list_nx_create_empty (implementation, equals_fn, hashcode_fn, dispose_fn,
- allow_duplicates);
- if (result == NULL)
- xalloc_die ();
- return result;
-}
-
-gl_list_t
-gl_list_create (gl_list_implementation_t implementation,
- gl_listelement_equals_fn equals_fn,
- gl_listelement_hashcode_fn hashcode_fn,
- gl_listelement_dispose_fn dispose_fn,
- bool allow_duplicates,
- size_t count, const void **contents)
-{
- gl_list_t result =
- gl_list_nx_create (implementation, equals_fn, hashcode_fn, dispose_fn,
- allow_duplicates, count, contents);
- if (result == NULL)
- xalloc_die ();
- return result;
-}
-
-void
-gl_list_node_set_value (gl_list_t list, gl_list_node_t node, const void *elt)
-{
- int result = gl_list_node_nx_set_value (list, node, elt);
- if (result < 0)
- xalloc_die ();
-}
-
-gl_list_node_t
-gl_list_set_at (gl_list_t list, size_t position, const void *elt)
-{
- gl_list_node_t result = gl_list_nx_set_at (list, position, elt);
- if (result == NULL)
- xalloc_die ();
- return result;
-}
-
-gl_list_node_t
-gl_list_add_first (gl_list_t list, const void *elt)
-{
- gl_list_node_t result = gl_list_nx_add_first (list, elt);
- if (result == NULL)
- xalloc_die ();
- return result;
-}
-
-gl_list_node_t
-gl_list_add_last (gl_list_t list, const void *elt)
-{
- gl_list_node_t result = gl_list_nx_add_last (list, elt);
- if (result == NULL)
- xalloc_die ();
- return result;
-}
-
-gl_list_node_t
-gl_list_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
-{
- gl_list_node_t result = gl_list_nx_add_before (list, node, elt);
- if (result == NULL)
- xalloc_die ();
- return result;
-}
-
-gl_list_node_t
-gl_list_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
-{
- gl_list_node_t result = gl_list_nx_add_after (list, node, elt);
- if (result == NULL)
- xalloc_die ();
- return result;
-}
-
-gl_list_node_t
-gl_list_add_at (gl_list_t list, size_t position, const void *elt)
-{
- gl_list_node_t result = gl_list_nx_add_at (list, position, elt);
- if (result == NULL)
- xalloc_die ();
- return result;
-}
-
-gl_list_node_t
-gl_sortedlist_add (gl_list_t list, gl_listelement_compar_fn compar,
- const void *elt)
-{
- gl_list_node_t result = gl_sortedlist_nx_add (list, compar, elt);
- if (result == NULL)
- xalloc_die ();
- return result;
-}
-
-#endif
diff --git a/lib/gl_xlist.h b/lib/gl_xlist.h
index 9bc446d..1c9451c 100644
--- a/lib/gl_xlist.h
+++ b/lib/gl_xlist.h
@@ -1,5 +1,5 @@
/* Abstract sequential list data type, with out-of-memory checking.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This program is free software: you can redistribute it and/or modify
@@ -21,6 +21,14 @@
#include "gl_list.h"
#include "xalloc.h"
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef GL_XLIST_INLINE
+# define GL_XLIST_INLINE _GL_INLINE
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -28,6 +36,7 @@ extern "C" {
/* These functions are thin wrappers around the corresponding functions with
_nx_ infix from gl_list.h. Upon out-of-memory, they invoke xalloc_die (),
instead of returning an error indicator. */
+#if 0 /* These are defined inline below. */
extern gl_list_t gl_list_create_empty (gl_list_implementation_t implementation,
gl_listelement_equals_fn equals_fn,
gl_listelement_hashcode_fn hashcode_fn,
@@ -54,11 +63,9 @@ extern gl_list_node_t gl_list_add_at (gl_list_t list, size_t position,
extern gl_list_node_t gl_sortedlist_add (gl_list_t list,
gl_listelement_compar_fn compar,
const void *elt);
+#endif
-#if HAVE_INLINE
-
-# define gl_list_create_empty gl_list_create_empty_inline
-static inline gl_list_t
+GL_XLIST_INLINE gl_list_t
gl_list_create_empty (gl_list_implementation_t implementation,
gl_listelement_equals_fn equals_fn,
gl_listelement_hashcode_fn hashcode_fn,
@@ -73,8 +80,7 @@ gl_list_create_empty (gl_list_implementation_t implementation,
return result;
}
-# define gl_list_create gl_list_create_inline
-static inline gl_list_t
+GL_XLIST_INLINE gl_list_t
gl_list_create (gl_list_implementation_t implementation,
gl_listelement_equals_fn equals_fn,
gl_listelement_hashcode_fn hashcode_fn,
@@ -90,8 +96,7 @@ gl_list_create (gl_list_implementation_t implementation,
return result;
}
-# define gl_list_node_set_value gl_list_node_set_value_inline
-static inline void
+GL_XLIST_INLINE void
gl_list_node_set_value (gl_list_t list, gl_list_node_t node, const void *elt)
{
int result = gl_list_node_nx_set_value (list, node, elt);
@@ -99,8 +104,7 @@ gl_list_node_set_value (gl_list_t list, gl_list_node_t node, const void *elt)
xalloc_die ();
}
-# define gl_list_set_at gl_list_set_at_inline
-static inline gl_list_node_t
+GL_XLIST_INLINE gl_list_node_t
gl_list_set_at (gl_list_t list, size_t position, const void *elt)
{
gl_list_node_t result = gl_list_nx_set_at (list, position, elt);
@@ -109,8 +113,7 @@ gl_list_set_at (gl_list_t list, size_t position, const void *elt)
return result;
}
-# define gl_list_add_first gl_list_add_first_inline
-static inline gl_list_node_t
+GL_XLIST_INLINE gl_list_node_t
gl_list_add_first (gl_list_t list, const void *elt)
{
gl_list_node_t result = gl_list_nx_add_first (list, elt);
@@ -119,8 +122,7 @@ gl_list_add_first (gl_list_t list, const void *elt)
return result;
}
-# define gl_list_add_last gl_list_add_last_inline
-static inline gl_list_node_t
+GL_XLIST_INLINE gl_list_node_t
gl_list_add_last (gl_list_t list, const void *elt)
{
gl_list_node_t result = gl_list_nx_add_last (list, elt);
@@ -129,8 +131,7 @@ gl_list_add_last (gl_list_t list, const void *elt)
return result;
}
-# define gl_list_add_before gl_list_add_before_inline
-static inline gl_list_node_t
+GL_XLIST_INLINE gl_list_node_t
gl_list_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
{
gl_list_node_t result = gl_list_nx_add_before (list, node, elt);
@@ -139,8 +140,7 @@ gl_list_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
return result;
}
-# define gl_list_add_after gl_list_add_after_inline
-static inline gl_list_node_t
+GL_XLIST_INLINE gl_list_node_t
gl_list_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
{
gl_list_node_t result = gl_list_nx_add_after (list, node, elt);
@@ -149,8 +149,7 @@ gl_list_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
return result;
}
-# define gl_list_add_at gl_list_add_at_inline
-static inline gl_list_node_t
+GL_XLIST_INLINE gl_list_node_t
gl_list_add_at (gl_list_t list, size_t position, const void *elt)
{
gl_list_node_t result = gl_list_nx_add_at (list, position, elt);
@@ -159,8 +158,7 @@ gl_list_add_at (gl_list_t list, size_t position, const void *elt)
return result;
}
-# define gl_sortedlist_add gl_sortedlist_add_inline
-static inline gl_list_node_t
+GL_XLIST_INLINE gl_list_node_t
gl_sortedlist_add (gl_list_t list, gl_listelement_compar_fn compar,
const void *elt)
{
@@ -170,10 +168,10 @@ gl_sortedlist_add (gl_list_t list, gl_listelement_compar_fn compar,
return result;
}
-#endif
-
#ifdef __cplusplus
}
#endif
+_GL_INLINE_HEADER_END
+
#endif /* _GL_XLIST_H */
diff --git a/lib/gl_xoset.c b/lib/gl_xoset.c
index a85b904..6b05d94 100644
--- a/lib/gl_xoset.c
+++ b/lib/gl_xoset.c
@@ -1,46 +1,3 @@
-/* Abstract ordered set data type, with out-of-memory checking.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
- Written by Bruno Haible <bruno@clisp.org>, 2009.
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
#include <config.h>
-
-/* Specification. */
+#define GL_XOSET_INLINE _GL_EXTERN_INLINE
#include "gl_xoset.h"
-
-#if !HAVE_INLINE
-
-gl_oset_t
-gl_oset_create_empty (gl_oset_implementation_t implementation,
- gl_setelement_compar_fn compar_fn,
- gl_setelement_dispose_fn dispose_fn)
-{
- gl_oset_t result =
- gl_oset_nx_create_empty (implementation, compar_fn, dispose_fn);
- if (result == NULL)
- xalloc_die ();
- return result;
-}
-
-bool
-gl_oset_add (gl_oset_t set, const void *elt)
-{
- int result = gl_oset_nx_add (set, elt);
- if (result < 0)
- xalloc_die ();
- return result;
-}
-
-#endif
diff --git a/lib/gl_xoset.h b/lib/gl_xoset.h
index 1fe2dcc..b30b2ce 100644
--- a/lib/gl_xoset.h
+++ b/lib/gl_xoset.h
@@ -1,5 +1,5 @@
/* Abstract ordered set data type, with out-of-memory checking.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This program is free software: you can redistribute it and/or modify
@@ -21,6 +21,15 @@
#include "gl_oset.h"
#include "xalloc.h"
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef GL_XOSET_INLINE
+# define GL_XOSET_INLINE _GL_INLINE
+#endif
+
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -28,15 +37,14 @@ extern "C" {
/* These functions are thin wrappers around the corresponding functions with
_nx_ infix from gl_oset.h. Upon out-of-memory, they invoke xalloc_die (),
instead of returning an error indicator. */
+#if 0 /* These are defined inline below. */
extern gl_oset_t gl_oset_create_empty (gl_oset_implementation_t implementation,
gl_setelement_compar_fn compar_fn,
gl_setelement_dispose_fn dispose_fn);
extern bool gl_oset_add (gl_oset_t set, const void *elt);
+#endif
-#if HAVE_INLINE
-
-# define gl_oset_create_empty gl_oset_create_empty_inline
-static inline gl_oset_t
+GL_XOSET_INLINE gl_oset_t
gl_oset_create_empty (gl_oset_implementation_t implementation,
gl_setelement_compar_fn compar_fn,
gl_setelement_dispose_fn dispose_fn)
@@ -48,8 +56,7 @@ gl_oset_create_empty (gl_oset_implementation_t implementation,
return result;
}
-# define gl_oset_add gl_oset_add_inline
-static inline bool
+GL_XOSET_INLINE bool
gl_oset_add (gl_oset_t set, const void *elt)
{
int result = gl_oset_nx_add (set, elt);
@@ -58,10 +65,10 @@ gl_oset_add (gl_oset_t set, const void *elt)
return result;
}
-#endif
-
#ifdef __cplusplus
}
#endif
+_GL_INLINE_HEADER_END
+
#endif /* _GL_XOSET_H */
diff --git a/lib/glthread/lock.c b/lib/glthread/lock.c
index 64dbd3f..f62aa30 100644
--- a/lib/glthread/lock.c
+++ b/lib/glthread/lock.c
@@ -1,5 +1,5 @@
/* Locking in multithreaded situations.
- Copyright (C) 2005-2011 Free Software Foundation, Inc.
+ Copyright (C) 2005-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2005.
Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h,
@@ -630,7 +629,7 @@ glthread_once_singlethreaded (gl_once_t *once_control)
/* ========================================================================= */
-#if USE_WIN32_THREADS
+#if USE_WINDOWS_THREADS
/* -------------------------- gl_lock_t datatype -------------------------- */
@@ -683,7 +682,7 @@ glthread_lock_destroy_func (gl_lock_t *lock)
/* In this file, the waitqueues are implemented as circular arrays. */
#define gl_waitqueue_t gl_carray_waitqueue_t
-static inline void
+static void
gl_waitqueue_init (gl_waitqueue_t *wq)
{
wq->array = NULL;
@@ -744,7 +743,7 @@ gl_waitqueue_add (gl_waitqueue_t *wq)
}
/* Notifies the first thread from a wait queue and dequeues it. */
-static inline void
+static void
gl_waitqueue_notify_first (gl_waitqueue_t *wq)
{
SetEvent (wq->array[wq->offset + 0]);
@@ -755,7 +754,7 @@ gl_waitqueue_notify_first (gl_waitqueue_t *wq)
}
/* Notifies all threads from a wait queue and dequeues them all. */
-static inline void
+static void
gl_waitqueue_notify_all (gl_waitqueue_t *wq)
{
unsigned int i;
diff --git a/lib/glthread/lock.h b/lib/glthread/lock.h
index 6267500..d20bbde 100644
--- a/lib/glthread/lock.h
+++ b/lib/glthread/lock.h
@@ -1,5 +1,5 @@
/* Locking in multithreaded situations.
- Copyright (C) 2005-2011 Free Software Foundation, Inc.
+ Copyright (C) 2005-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2005.
Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h,
@@ -614,16 +613,17 @@ extern int glthread_once_singlethreaded (gl_once_t *once_control);
/* ========================================================================= */
-#if USE_WIN32_THREADS
+#if USE_WINDOWS_THREADS
+# define WIN32_LEAN_AND_MEAN /* avoid including junk */
# include <windows.h>
# ifdef __cplusplus
extern "C" {
# endif
-/* We can use CRITICAL_SECTION directly, rather than the Win32 Event, Mutex,
- Semaphore types, because
+/* We can use CRITICAL_SECTION directly, rather than the native Windows Event,
+ Mutex, Semaphore types, because
- we need only to synchronize inside a single process (address space),
not inter-process locking,
- we don't need to support trylock operations. (TryEnterCriticalSection
@@ -709,9 +709,9 @@ extern int glthread_rwlock_destroy_func (gl_rwlock_t *lock);
/* --------------------- gl_recursive_lock_t datatype --------------------- */
-/* The Win32 documentation says that CRITICAL_SECTION already implements a
- recursive lock. But we need not rely on it: It's easy to implement a
- recursive lock without this assumption. */
+/* The native Windows documentation says that CRITICAL_SECTION already
+ implements a recursive lock. But we need not rely on it: It's easy to
+ implement a recursive lock without this assumption. */
typedef struct
{
@@ -763,7 +763,7 @@ extern void glthread_once_func (gl_once_t *once_control, void (*initfunction) (v
/* ========================================================================= */
-#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS)
+#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WINDOWS_THREADS)
/* Provide dummy implementation if threads are not supported. */
diff --git a/lib/glthread/threadlib.c b/lib/glthread/threadlib.c
index 646defa..b447657 100644
--- a/lib/glthread/threadlib.c
+++ b/lib/glthread/threadlib.c
@@ -1,5 +1,5 @@
/* Multithreading primitives.
- Copyright (C) 2005-2011 Free Software Foundation, Inc.
+ Copyright (C) 2005-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2005. */
diff --git a/lib/glthread/tls.c b/lib/glthread/tls.c
index 9738ff1..bcd285c 100644
--- a/lib/glthread/tls.c
+++ b/lib/glthread/tls.c
@@ -1,5 +1,5 @@
/* Thread-local storage in multithreaded situations.
- Copyright (C) 2005-2011 Free Software Foundation, Inc.
+ Copyright (C) 2005-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -54,7 +54,7 @@ glthread_tls_get_multithreaded (thread_key_t key)
/* ========================================================================= */
-#if USE_WIN32_THREADS
+#if USE_WINDOWS_THREADS
#endif
diff --git a/lib/glthread/tls.h b/lib/glthread/tls.h
index 0ef32c0..2afe0b4 100644
--- a/lib/glthread/tls.h
+++ b/lib/glthread/tls.h
@@ -1,5 +1,5 @@
/* Thread-local storage in multithreaded situations.
- Copyright (C) 2005, 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -220,8 +220,9 @@ extern void *glthread_tls_get_multithreaded (thread_key_t key);
/* ========================================================================= */
-#if USE_WIN32_THREADS
+#if USE_WINDOWS_THREADS
+# define WIN32_LEAN_AND_MEAN /* avoid including junk */
# include <windows.h>
/* ------------------------- gl_tls_key_t datatype ------------------------- */
@@ -241,7 +242,7 @@ typedef DWORD gl_tls_key_t;
/* ========================================================================= */
-#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WIN32_THREADS)
+#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WINDOWS_THREADS)
/* Provide dummy implementation if threads are not supported. */
diff --git a/lib/gnulib.mk b/lib/gnulib.mk
index 6ea2ec5..2b5de24 100644
--- a/lib/gnulib.mk
+++ b/lib/gnulib.mk
@@ -1,15 +1,27 @@
## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2002-2011 Free Software Foundation, Inc.
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
#
-# This file is free software, distributed under the terms of the GNU
-# General Public License. As a special exception to the GNU General
-# Public License, this file may be distributed as part of a program
-# that contains a configuration script generated by Autoconf, under
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this file. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License,
+# this file may be distributed as part of a program that
+# contains a configuration script generated by Autoconf, under
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --local-dir=local --lib=libm4 --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --with-tests --with-c++-tests --avoid=lock-tests --avoid=tls-tests --makefile-name=gnulib.mk --no-libtool --macro-prefix=M4 announce-gen assert autobuild avltree-oset binary-io c-stack clean-temp cloexec close-stream closein config-h dirname error execute fclose fdl-1.3 fflush filenamecat fopen fopen-safer fseeko gendocs getopt-gnu git-version-gen gnu-web-doc-update gnumakefile gnupload gpl-3.0 ignore-value intprops maintainer-makefile manywarnings memchr2 mkstemp obstack progname regex rename sigaction spawn-pipe stdbool stdint stdlib-safer strsignal strstr strtod strtol unlocked-io update-copyright vc-list-files verror version-etc version-etc-fsf wait-process xalloc xoset xprintf xvasprintf-posix
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libm4 --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --with-tests --with-c++-tests --avoid=lock-tests --avoid=tls-tests --makefile-name=gnulib.mk --no-conditional-dependencies --no-libtool --macro-prefix=M4 announce-gen assert autobuild avltree-oset binary-io c-stack clean-temp cloexec close-stream closein config-h dirname error execute fclose fdl-1.3 fflush filenamecat fopen fopen-safer fseeko gendocs getopt-gnu git-version-gen gnu-web-doc-update gnumakefile gnupload gpl-3.0 ignore-value intprops maintainer-makefile manywarnings memchr2 mkstemp obstack progname regex rename sigaction sigpipe spawn-pipe stdbool stdint stdlib-safer strsignal strstr strtod unlocked-io update-copyright vc-list-files verror version-etc version-etc-fsf wait-process xalloc xoset xprintf xvasprintf-posix
MOSTLYCLEANFILES += core *.stackdump
@@ -26,12 +38,17 @@ BUILT_SOURCES += $(ALLOCA_H)
# We need the following in order to create <alloca.h> when the system
# doesn't have one that works with the given compiler.
-alloca.h: alloca.in.h
+if GL_GENERATE_ALLOCA_H
+alloca.h: alloca.in.h $(top_builddir)/config.status
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
cat $(srcdir)/alloca.in.h; \
} > $@-t && \
mv -f $@-t $@
+else
+alloca.h: $(top_builddir)/config.status
+ rm -f $@
+endif
MOSTLYCLEANFILES += alloca.h alloca.h-t
EXTRA_DIST += alloca.in.h
@@ -45,30 +62,6 @@ EXTRA_DIST += $(top_srcdir)/build-aux/announce-gen
## end gnulib module announce-gen
-## begin gnulib module arg-nonnull
-
-# The BUILT_SOURCES created by this Makefile snippet are not used via #include
-# statements but through direct file reference. Therefore this snippet must be
-# present in all Makefile.am that need it. This is ensured by the applicability
-# 'all' defined above.
-
-BUILT_SOURCES += arg-nonnull.h
-# The arg-nonnull.h that gets inserted into generated .h files is the same as
-# build-aux/arg-nonnull.h, except that it has the copyright header cut off.
-arg-nonnull.h: $(top_srcdir)/build-aux/arg-nonnull.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/GL_ARG_NONNULL/,$$p' \
- < $(top_srcdir)/build-aux/arg-nonnull.h \
- > $@-t && \
- mv $@-t $@
-MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t
-
-ARG_NONNULL_H=arg-nonnull.h
-
-EXTRA_DIST += $(top_srcdir)/build-aux/arg-nonnull.h
-
-## end gnulib module arg-nonnull
-
## begin gnulib module avltree-oset
libm4_a_SOURCES += gl_avltree_oset.h gl_avltree_oset.c gl_anytree_oset.h
@@ -77,7 +70,7 @@ libm4_a_SOURCES += gl_avltree_oset.h gl_avltree_oset.c gl_anytree_oset.h
## begin gnulib module binary-io
-libm4_a_SOURCES += binary-io.h
+libm4_a_SOURCES += binary-io.h binary-io.c
## end gnulib module binary-io
@@ -90,30 +83,6 @@ EXTRA_libm4_a_SOURCES += btowc.c
## end gnulib module btowc
-## begin gnulib module c++defs
-
-# The BUILT_SOURCES created by this Makefile snippet are not used via #include
-# statements but through direct file reference. Therefore this snippet must be
-# present in all Makefile.am that need it. This is ensured by the applicability
-# 'all' defined above.
-
-BUILT_SOURCES += c++defs.h
-# The c++defs.h that gets inserted into generated .h files is the same as
-# build-aux/c++defs.h, except that it has the copyright header cut off.
-c++defs.h: $(top_srcdir)/build-aux/c++defs.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/_GL_CXXDEFS/,$$p' \
- < $(top_srcdir)/build-aux/c++defs.h \
- > $@-t && \
- mv $@-t $@
-MOSTLYCLEANFILES += c++defs.h c++defs.h-t
-
-CXXDEFS_H=c++defs.h
-
-EXTRA_DIST += $(top_srcdir)/build-aux/c++defs.h
-
-## end gnulib module c++defs
-
## begin gnulib module c-ctype
libm4_a_SOURCES += c-ctype.h c-ctype.c
@@ -126,6 +95,19 @@ libm4_a_SOURCES += c-stack.h c-stack.c
## end gnulib module c-stack
+## begin gnulib module c-strcase
+
+libm4_a_SOURCES += c-strcase.h c-strcasecmp.c c-strncasecmp.c
+
+## end gnulib module c-strcase
+
+## begin gnulib module c-strcaseeq
+
+
+EXTRA_DIST += c-strcaseeq.h
+
+## end gnulib module c-strcaseeq
+
## begin gnulib module canonicalize-lgpl
@@ -143,10 +125,9 @@ libm4_a_SOURCES += clean-temp.h clean-temp.c
## begin gnulib module cloexec
+libm4_a_SOURCES += cloexec.c
-EXTRA_DIST += cloexec.c cloexec.h
-
-EXTRA_libm4_a_SOURCES += cloexec.c
+EXTRA_DIST += cloexec.h
## end gnulib module cloexec
@@ -159,38 +140,27 @@ EXTRA_libm4_a_SOURCES += close.c
## end gnulib module close
-## begin gnulib module close-hook
-
-libm4_a_SOURCES += close-hook.c
-
-EXTRA_DIST += close-hook.h
-
-## end gnulib module close-hook
-
## begin gnulib module close-stream
+libm4_a_SOURCES += close-stream.c
-EXTRA_DIST += close-stream.c close-stream.h
-
-EXTRA_libm4_a_SOURCES += close-stream.c
+EXTRA_DIST += close-stream.h
## end gnulib module close-stream
## begin gnulib module closein
+libm4_a_SOURCES += closein.c
-EXTRA_DIST += closein.c closein.h
-
-EXTRA_libm4_a_SOURCES += closein.c
+EXTRA_DIST += closein.h
## end gnulib module closein
## begin gnulib module closeout
+libm4_a_SOURCES += closeout.c
-EXTRA_DIST += closeout.c closeout.h
-
-EXTRA_libm4_a_SOURCES += closeout.c
+EXTRA_DIST += closeout.h
## end gnulib module closeout
@@ -231,11 +201,7 @@ configmake.h: Makefile
echo '#define PKGLIBDIR "$(pkglibdir)"'; \
echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
} | sed '/""/d' > $@-t && \
- if test -f $@ && cmp $@-t $@ > /dev/null; then \
- rm -f $@-t; \
- else \
- rm -f $@; mv $@-t $@; \
- fi
+ mv -f $@-t $@
BUILT_SOURCES += configmake.h
CLEANFILES += configmake.h configmake.h-t
@@ -244,19 +210,19 @@ CLEANFILES += configmake.h configmake.h-t
## begin gnulib module dirname
+libm4_a_SOURCES += dirname.c basename.c
-EXTRA_DIST += basename.c dirname.c stripslash.c
+EXTRA_DIST += stripslash.c
-EXTRA_libm4_a_SOURCES += basename.c dirname.c stripslash.c
+EXTRA_libm4_a_SOURCES += stripslash.c
## end gnulib module dirname
## begin gnulib module dirname-lgpl
+libm4_a_SOURCES += dirname-lgpl.c basename-lgpl.c stripslash.c
-EXTRA_DIST += basename-lgpl.c dirname-lgpl.c dirname.h stripslash.c
-
-EXTRA_libm4_a_SOURCES += basename-lgpl.c dirname-lgpl.c stripslash.c
+EXTRA_DIST += dirname.h
## end gnulib module dirname-lgpl
@@ -282,10 +248,12 @@ BUILT_SOURCES += $(ERRNO_H)
# We need the following in order to create <errno.h> when the system
# doesn't have one that is POSIX compliant.
-errno.h: errno.in.h
+if GL_GENERATE_ERRNO_H
+errno.h: errno.in.h $(top_builddir)/config.status
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|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' \
@@ -298,6 +266,10 @@ errno.h: errno.in.h
< $(srcdir)/errno.in.h; \
} > $@-t && \
mv $@-t $@
+else
+errno.h: $(top_builddir)/config.status
+ rm -f $@
+endif
MOSTLYCLEANFILES += errno.h errno.h-t
EXTRA_DIST += errno.in.h
@@ -357,16 +329,18 @@ BUILT_SOURCES += fcntl.h
# We need the following in order to create <fcntl.h> when the system
# doesn't have one that works with the given compiler.
-fcntl.h: fcntl.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \
- -e 's|@''GNULIB_FCNTL''@|$(GNULIB_FCNTL)|g' \
- -e 's|@''GNULIB_OPEN''@|$(GNULIB_OPEN)|g' \
- -e 's|@''GNULIB_OPENAT''@|$(GNULIB_OPENAT)|g' \
+ -e 's/@''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' \
@@ -384,6 +358,14 @@ EXTRA_DIST += fcntl.in.h
## end gnulib module fcntl-h
+## begin gnulib module fd-hook
+
+libm4_a_SOURCES += fd-hook.c
+
+EXTRA_DIST += fd-hook.h
+
+## end gnulib module fd-hook
+
## begin gnulib module fd-safer-flag
libm4_a_SOURCES += fd-safer-flag.c dup-safer-flag.c
@@ -401,19 +383,15 @@ EXTRA_libm4_a_SOURCES += fflush.c
## begin gnulib module filenamecat
-
-EXTRA_DIST += filenamecat.c
-
-EXTRA_libm4_a_SOURCES += filenamecat.c
+libm4_a_SOURCES += filenamecat.c
## end gnulib module filenamecat
## begin gnulib module filenamecat-lgpl
+libm4_a_SOURCES += filenamecat-lgpl.c
-EXTRA_DIST += filenamecat-lgpl.c filenamecat.h
-
-EXTRA_libm4_a_SOURCES += filenamecat-lgpl.c
+EXTRA_DIST += filenamecat.h
## end gnulib module filenamecat-lgpl
@@ -423,19 +401,28 @@ BUILT_SOURCES += $(FLOAT_H)
# We need the following in order to create <float.h> when the system
# doesn't have one that works with the given compiler.
-float.h: float.in.h
+if GL_GENERATE_FLOAT_H
+float.h: float.in.h $(top_builddir)/config.status
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \
+ -e 's|@''REPLACE_ITOLD''@|$(REPLACE_ITOLD)|g' \
< $(srcdir)/float.in.h; \
} > $@-t && \
mv $@-t $@
+else
+float.h: $(top_builddir)/config.status
+ rm -f $@
+endif
MOSTLYCLEANFILES += float.h float.h-t
-EXTRA_DIST += float.in.h
+EXTRA_DIST += float.c float.in.h itold.c
+
+EXTRA_libm4_a_SOURCES += float.c itold.c
## end gnulib module float
@@ -450,10 +437,9 @@ EXTRA_libm4_a_SOURCES += fopen.c
## begin gnulib module fopen-safer
+libm4_a_SOURCES += fopen-safer.c
-EXTRA_DIST += fopen-safer.c stdio--.h stdio-safer.h
-
-EXTRA_libm4_a_SOURCES += fopen-safer.c
+EXTRA_DIST += stdio--.h stdio-safer.h
## end gnulib module fopen-safer
@@ -484,9 +470,10 @@ EXTRA_libm4_a_SOURCES += fpurge.c
## begin gnulib module freadahead
-libm4_a_SOURCES += freadahead.c
-EXTRA_DIST += freadahead.h stdio-impl.h
+EXTRA_DIST += freadahead.c freadahead.h stdio-impl.h
+
+EXTRA_libm4_a_SOURCES += freadahead.c
## end gnulib module freadahead
@@ -516,6 +503,15 @@ EXTRA_libm4_a_SOURCES += frexp.c frexpl.c
## end gnulib module frexpl-nolibm
+## begin gnulib module fseek
+
+
+EXTRA_DIST += fseek.c
+
+EXTRA_libm4_a_SOURCES += fseek.c
+
+## end gnulib module fseek
+
## begin gnulib module fseeko
@@ -525,6 +521,24 @@ EXTRA_libm4_a_SOURCES += fseeko.c
## end gnulib module fseeko
+## begin gnulib module fstat
+
+
+EXTRA_DIST += fstat.c
+
+EXTRA_libm4_a_SOURCES += fstat.c
+
+## end gnulib module fstat
+
+## begin gnulib module ftell
+
+
+EXTRA_DIST += ftell.c
+
+EXTRA_libm4_a_SOURCES += ftell.c
+
+## end gnulib module ftell
+
## begin gnulib module ftello
@@ -556,10 +570,11 @@ BUILT_SOURCES += $(GETOPT_H)
# We need the following in order to create <getopt.h> when the system
# doesn't have one that works with the given compiler.
-getopt.h: getopt.in.h $(ARG_NONNULL_H)
+getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|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' \
@@ -609,7 +624,7 @@ EXTRA_DIST += $(top_srcdir)/build-aux/gnu-web-doc-update
distclean-local: clean-GNUmakefile
clean-GNUmakefile:
- test x'$(VPATH)' != x && rm -f $(top_builddir)/GNUmakefile || :
+ test '$(srcdir)' = . || rm -f $(top_builddir)/GNUmakefile
EXTRA_DIST += $(top_srcdir)/GNUmakefile
@@ -631,7 +646,8 @@ EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath
## begin gnulib module ignore-value
-libm4_a_SOURCES += ignore-value.h
+
+EXTRA_DIST += ignore-value.h
## end gnulib module ignore-value
@@ -675,15 +691,16 @@ BUILT_SOURCES += langinfo.h
# We need the following in order to create an empty placeholder for
# <langinfo.h> when the system doesn't have one.
-langinfo.h: langinfo.in.h $(CXXDEFS_H) $(WARN_ON_USE_H)
+langinfo.h: langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \
- -e 's|@''GNULIB_NL_LANGINFO''@|$(GNULIB_NL_LANGINFO)|g' \
+ -e 's/@''GNULIB_NL_LANGINFO''@/$(GNULIB_NL_LANGINFO)/g' \
-e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \
-e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \
-e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \
@@ -787,6 +804,50 @@ 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 <locale.h> 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_M4|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_libm4_a_SOURCES += localeconv.c
+
+## end gnulib module localeconv
+
## begin gnulib module lock
libm4_a_SOURCES += glthread/lock.h glthread/lock.c
@@ -846,74 +907,202 @@ EXTRA_DIST += malloca.h malloca.valgrind
## begin gnulib module math
BUILT_SOURCES += math.h
+libm4_a_SOURCES += math.c
# We need the following in order to create <math.h> when the system
# doesn't have one that works with the given compiler.
-math.h: math.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_AS_FIRST_DIRECTIVE_MATH_H''@|$(NEXT_AS_FIRST_DIRECTIVE_MATH_H)|g' \
- -e 's|@''GNULIB_ACOSL''@|$(GNULIB_ACOSL)|g' \
- -e 's|@''GNULIB_ASINL''@|$(GNULIB_ASINL)|g' \
- -e 's|@''GNULIB_ATANL''@|$(GNULIB_ATANL)|g' \
- -e 's|@''GNULIB_CEIL''@|$(GNULIB_CEIL)|g' \
- -e 's|@''GNULIB_CEILF''@|$(GNULIB_CEILF)|g' \
- -e 's|@''GNULIB_CEILL''@|$(GNULIB_CEILL)|g' \
- -e 's|@''GNULIB_COSL''@|$(GNULIB_COSL)|g' \
- -e 's|@''GNULIB_EXPL''@|$(GNULIB_EXPL)|g' \
- -e 's|@''GNULIB_FLOOR''@|$(GNULIB_FLOOR)|g' \
- -e 's|@''GNULIB_FLOORF''@|$(GNULIB_FLOORF)|g' \
- -e 's|@''GNULIB_FLOORL''@|$(GNULIB_FLOORL)|g' \
- -e 's|@''GNULIB_FREXP''@|$(GNULIB_FREXP)|g' \
- -e 's|@''GNULIB_FREXPL''@|$(GNULIB_FREXPL)|g' \
- -e 's|@''GNULIB_ISFINITE''@|$(GNULIB_ISFINITE)|g' \
- -e 's|@''GNULIB_ISINF''@|$(GNULIB_ISINF)|g' \
- -e 's|@''GNULIB_ISNAN''@|$(GNULIB_ISNAN)|g' \
- -e 's|@''GNULIB_ISNANF''@|$(GNULIB_ISNANF)|g' \
- -e 's|@''GNULIB_ISNAND''@|$(GNULIB_ISNAND)|g' \
- -e 's|@''GNULIB_ISNANL''@|$(GNULIB_ISNANL)|g' \
- -e 's|@''GNULIB_LDEXPL''@|$(GNULIB_LDEXPL)|g' \
- -e 's|@''GNULIB_LOGB''@|$(GNULIB_LOGB)|g' \
- -e 's|@''GNULIB_LOGL''@|$(GNULIB_LOGL)|g' \
- -e 's|@''GNULIB_ROUND''@|$(GNULIB_ROUND)|g' \
- -e 's|@''GNULIB_ROUNDF''@|$(GNULIB_ROUNDF)|g' \
- -e 's|@''GNULIB_ROUNDL''@|$(GNULIB_ROUNDL)|g' \
- -e 's|@''GNULIB_SIGNBIT''@|$(GNULIB_SIGNBIT)|g' \
- -e 's|@''GNULIB_SINL''@|$(GNULIB_SINL)|g' \
- -e 's|@''GNULIB_SQRTL''@|$(GNULIB_SQRTL)|g' \
- -e 's|@''GNULIB_TANL''@|$(GNULIB_TANL)|g' \
- -e 's|@''GNULIB_TRUNC''@|$(GNULIB_TRUNC)|g' \
- -e 's|@''GNULIB_TRUNCF''@|$(GNULIB_TRUNCF)|g' \
- -e 's|@''GNULIB_TRUNCL''@|$(GNULIB_TRUNCL)|g' \
+ -e 's/@''GNULIB_ACOSF''@/$(GNULIB_ACOSF)/g' \
+ -e 's/@''GNULIB_ACOSL''@/$(GNULIB_ACOSL)/g' \
+ -e 's/@''GNULIB_ASINF''@/$(GNULIB_ASINF)/g' \
+ -e 's/@''GNULIB_ASINL''@/$(GNULIB_ASINL)/g' \
+ -e 's/@''GNULIB_ATANF''@/$(GNULIB_ATANF)/g' \
+ -e 's/@''GNULIB_ATANL''@/$(GNULIB_ATANL)/g' \
+ -e 's/@''GNULIB_ATAN2F''@/$(GNULIB_ATAN2F)/g' \
+ -e 's/@''GNULIB_CBRT''@/$(GNULIB_CBRT)/g' \
+ -e 's/@''GNULIB_CBRTF''@/$(GNULIB_CBRTF)/g' \
+ -e 's/@''GNULIB_CBRTL''@/$(GNULIB_CBRTL)/g' \
+ -e 's/@''GNULIB_CEIL''@/$(GNULIB_CEIL)/g' \
+ -e 's/@''GNULIB_CEILF''@/$(GNULIB_CEILF)/g' \
+ -e 's/@''GNULIB_CEILL''@/$(GNULIB_CEILL)/g' \
+ -e 's/@''GNULIB_COPYSIGN''@/$(GNULIB_COPYSIGN)/g' \
+ -e 's/@''GNULIB_COPYSIGNF''@/$(GNULIB_COPYSIGNF)/g' \
+ -e 's/@''GNULIB_COPYSIGNL''@/$(GNULIB_COPYSIGNL)/g' \
+ -e 's/@''GNULIB_COSF''@/$(GNULIB_COSF)/g' \
+ -e 's/@''GNULIB_COSL''@/$(GNULIB_COSL)/g' \
+ -e 's/@''GNULIB_COSHF''@/$(GNULIB_COSHF)/g' \
+ -e 's/@''GNULIB_EXPF''@/$(GNULIB_EXPF)/g' \
+ -e 's/@''GNULIB_EXPL''@/$(GNULIB_EXPL)/g' \
+ -e 's/@''GNULIB_EXP2''@/$(GNULIB_EXP2)/g' \
+ -e 's/@''GNULIB_EXP2F''@/$(GNULIB_EXP2F)/g' \
+ -e 's/@''GNULIB_EXP2L''@/$(GNULIB_EXP2L)/g' \
+ -e 's/@''GNULIB_EXPM1''@/$(GNULIB_EXPM1)/g' \
+ -e 's/@''GNULIB_EXPM1F''@/$(GNULIB_EXPM1F)/g' \
+ -e 's/@''GNULIB_EXPM1L''@/$(GNULIB_EXPM1L)/g' \
+ -e 's/@''GNULIB_FABSF''@/$(GNULIB_FABSF)/g' \
+ -e 's/@''GNULIB_FABSL''@/$(GNULIB_FABSL)/g' \
+ -e 's/@''GNULIB_FLOOR''@/$(GNULIB_FLOOR)/g' \
+ -e 's/@''GNULIB_FLOORF''@/$(GNULIB_FLOORF)/g' \
+ -e 's/@''GNULIB_FLOORL''@/$(GNULIB_FLOORL)/g' \
+ -e 's/@''GNULIB_FMA''@/$(GNULIB_FMA)/g' \
+ -e 's/@''GNULIB_FMAF''@/$(GNULIB_FMAF)/g' \
+ -e 's/@''GNULIB_FMAL''@/$(GNULIB_FMAL)/g' \
+ -e 's/@''GNULIB_FMOD''@/$(GNULIB_FMOD)/g' \
+ -e 's/@''GNULIB_FMODF''@/$(GNULIB_FMODF)/g' \
+ -e 's/@''GNULIB_FMODL''@/$(GNULIB_FMODL)/g' \
+ -e 's/@''GNULIB_FREXPF''@/$(GNULIB_FREXPF)/g' \
+ -e 's/@''GNULIB_FREXP''@/$(GNULIB_FREXP)/g' \
+ -e 's/@''GNULIB_FREXPL''@/$(GNULIB_FREXPL)/g' \
+ -e 's/@''GNULIB_HYPOT''@/$(GNULIB_HYPOT)/g' \
+ -e 's/@''GNULIB_HYPOTF''@/$(GNULIB_HYPOTF)/g' \
+ -e 's/@''GNULIB_HYPOTL''@/$(GNULIB_HYPOTL)/g' \
< $(srcdir)/math.in.h | \
- sed -e 's|@''HAVE_ACOSL''@|$(HAVE_ACOSL)|g' \
+ sed -e 's/@''GNULIB_ILOGB''@/$(GNULIB_ILOGB)/g' \
+ -e 's/@''GNULIB_ILOGBF''@/$(GNULIB_ILOGBF)/g' \
+ -e 's/@''GNULIB_ILOGBL''@/$(GNULIB_ILOGBL)/g' \
+ -e 's/@''GNULIB_ISFINITE''@/$(GNULIB_ISFINITE)/g' \
+ -e 's/@''GNULIB_ISINF''@/$(GNULIB_ISINF)/g' \
+ -e 's/@''GNULIB_ISNAN''@/$(GNULIB_ISNAN)/g' \
+ -e 's/@''GNULIB_ISNANF''@/$(GNULIB_ISNANF)/g' \
+ -e 's/@''GNULIB_ISNAND''@/$(GNULIB_ISNAND)/g' \
+ -e 's/@''GNULIB_ISNANL''@/$(GNULIB_ISNANL)/g' \
+ -e 's/@''GNULIB_LDEXPF''@/$(GNULIB_LDEXPF)/g' \
+ -e 's/@''GNULIB_LDEXPL''@/$(GNULIB_LDEXPL)/g' \
+ -e 's/@''GNULIB_LOG''@/$(GNULIB_LOG)/g' \
+ -e 's/@''GNULIB_LOGF''@/$(GNULIB_LOGF)/g' \
+ -e 's/@''GNULIB_LOGL''@/$(GNULIB_LOGL)/g' \
+ -e 's/@''GNULIB_LOG10''@/$(GNULIB_LOG10)/g' \
+ -e 's/@''GNULIB_LOG10F''@/$(GNULIB_LOG10F)/g' \
+ -e 's/@''GNULIB_LOG10L''@/$(GNULIB_LOG10L)/g' \
+ -e 's/@''GNULIB_LOG1P''@/$(GNULIB_LOG1P)/g' \
+ -e 's/@''GNULIB_LOG1PF''@/$(GNULIB_LOG1PF)/g' \
+ -e 's/@''GNULIB_LOG1PL''@/$(GNULIB_LOG1PL)/g' \
+ -e 's/@''GNULIB_LOG2''@/$(GNULIB_LOG2)/g' \
+ -e 's/@''GNULIB_LOG2F''@/$(GNULIB_LOG2F)/g' \
+ -e 's/@''GNULIB_LOG2L''@/$(GNULIB_LOG2L)/g' \
+ -e 's/@''GNULIB_LOGB''@/$(GNULIB_LOGB)/g' \
+ -e 's/@''GNULIB_LOGBF''@/$(GNULIB_LOGBF)/g' \
+ -e 's/@''GNULIB_LOGBL''@/$(GNULIB_LOGBL)/g' \
+ -e 's/@''GNULIB_MODF''@/$(GNULIB_MODF)/g' \
+ -e 's/@''GNULIB_MODFF''@/$(GNULIB_MODFF)/g' \
+ -e 's/@''GNULIB_MODFL''@/$(GNULIB_MODFL)/g' \
+ -e 's/@''GNULIB_POWF''@/$(GNULIB_POWF)/g' \
+ -e 's/@''GNULIB_REMAINDER''@/$(GNULIB_REMAINDER)/g' \
+ -e 's/@''GNULIB_REMAINDERF''@/$(GNULIB_REMAINDERF)/g' \
+ -e 's/@''GNULIB_REMAINDERL''@/$(GNULIB_REMAINDERL)/g' \
+ -e 's/@''GNULIB_RINT''@/$(GNULIB_RINT)/g' \
+ -e 's/@''GNULIB_RINTF''@/$(GNULIB_RINTF)/g' \
+ -e 's/@''GNULIB_RINTL''@/$(GNULIB_RINTL)/g' \
+ -e 's/@''GNULIB_ROUND''@/$(GNULIB_ROUND)/g' \
+ -e 's/@''GNULIB_ROUNDF''@/$(GNULIB_ROUNDF)/g' \
+ -e 's/@''GNULIB_ROUNDL''@/$(GNULIB_ROUNDL)/g' \
+ -e 's/@''GNULIB_SIGNBIT''@/$(GNULIB_SIGNBIT)/g' \
+ -e 's/@''GNULIB_SINF''@/$(GNULIB_SINF)/g' \
+ -e 's/@''GNULIB_SINL''@/$(GNULIB_SINL)/g' \
+ -e 's/@''GNULIB_SINHF''@/$(GNULIB_SINHF)/g' \
+ -e 's/@''GNULIB_SQRTF''@/$(GNULIB_SQRTF)/g' \
+ -e 's/@''GNULIB_SQRTL''@/$(GNULIB_SQRTL)/g' \
+ -e 's/@''GNULIB_TANF''@/$(GNULIB_TANF)/g' \
+ -e 's/@''GNULIB_TANL''@/$(GNULIB_TANL)/g' \
+ -e 's/@''GNULIB_TANHF''@/$(GNULIB_TANHF)/g' \
+ -e 's/@''GNULIB_TRUNC''@/$(GNULIB_TRUNC)/g' \
+ -e 's/@''GNULIB_TRUNCF''@/$(GNULIB_TRUNCF)/g' \
+ -e 's/@''GNULIB_TRUNCL''@/$(GNULIB_TRUNCL)/g' \
+ | \
+ sed -e 's|@''HAVE_ACOSF''@|$(HAVE_ACOSF)|g' \
+ -e 's|@''HAVE_ACOSL''@|$(HAVE_ACOSL)|g' \
+ -e 's|@''HAVE_ASINF''@|$(HAVE_ASINF)|g' \
-e 's|@''HAVE_ASINL''@|$(HAVE_ASINL)|g' \
+ -e 's|@''HAVE_ATANF''@|$(HAVE_ATANF)|g' \
-e 's|@''HAVE_ATANL''@|$(HAVE_ATANL)|g' \
+ -e 's|@''HAVE_ATAN2F''@|$(HAVE_ATAN2F)|g' \
+ -e 's|@''HAVE_CBRT''@|$(HAVE_CBRT)|g' \
+ -e 's|@''HAVE_CBRTF''@|$(HAVE_CBRTF)|g' \
+ -e 's|@''HAVE_CBRTL''@|$(HAVE_CBRTL)|g' \
+ -e 's|@''HAVE_COPYSIGN''@|$(HAVE_COPYSIGN)|g' \
+ -e 's|@''HAVE_COPYSIGNL''@|$(HAVE_COPYSIGNL)|g' \
+ -e 's|@''HAVE_COSF''@|$(HAVE_COSF)|g' \
-e 's|@''HAVE_COSL''@|$(HAVE_COSL)|g' \
+ -e 's|@''HAVE_COSHF''@|$(HAVE_COSHF)|g' \
+ -e 's|@''HAVE_EXPF''@|$(HAVE_EXPF)|g' \
-e 's|@''HAVE_EXPL''@|$(HAVE_EXPL)|g' \
+ -e 's|@''HAVE_EXPM1''@|$(HAVE_EXPM1)|g' \
+ -e 's|@''HAVE_EXPM1F''@|$(HAVE_EXPM1F)|g' \
+ -e 's|@''HAVE_FABSF''@|$(HAVE_FABSF)|g' \
+ -e 's|@''HAVE_FABSL''@|$(HAVE_FABSL)|g' \
+ -e 's|@''HAVE_FMA''@|$(HAVE_FMA)|g' \
+ -e 's|@''HAVE_FMAF''@|$(HAVE_FMAF)|g' \
+ -e 's|@''HAVE_FMAL''@|$(HAVE_FMAL)|g' \
+ -e 's|@''HAVE_FMODF''@|$(HAVE_FMODF)|g' \
+ -e 's|@''HAVE_FMODL''@|$(HAVE_FMODL)|g' \
+ -e 's|@''HAVE_FREXPF''@|$(HAVE_FREXPF)|g' \
+ -e 's|@''HAVE_HYPOTF''@|$(HAVE_HYPOTF)|g' \
+ -e 's|@''HAVE_HYPOTL''@|$(HAVE_HYPOTL)|g' \
+ -e 's|@''HAVE_ILOGB''@|$(HAVE_ILOGB)|g' \
+ -e 's|@''HAVE_ILOGBF''@|$(HAVE_ILOGBF)|g' \
+ -e 's|@''HAVE_ILOGBL''@|$(HAVE_ILOGBL)|g' \
-e 's|@''HAVE_ISNANF''@|$(HAVE_ISNANF)|g' \
-e 's|@''HAVE_ISNAND''@|$(HAVE_ISNAND)|g' \
-e 's|@''HAVE_ISNANL''@|$(HAVE_ISNANL)|g' \
+ -e 's|@''HAVE_LDEXPF''@|$(HAVE_LDEXPF)|g' \
+ -e 's|@''HAVE_LOGF''@|$(HAVE_LOGF)|g' \
-e 's|@''HAVE_LOGL''@|$(HAVE_LOGL)|g' \
+ -e 's|@''HAVE_LOG10F''@|$(HAVE_LOG10F)|g' \
+ -e 's|@''HAVE_LOG10L''@|$(HAVE_LOG10L)|g' \
+ -e 's|@''HAVE_LOG1P''@|$(HAVE_LOG1P)|g' \
+ -e 's|@''HAVE_LOG1PF''@|$(HAVE_LOG1PF)|g' \
+ -e 's|@''HAVE_LOG1PL''@|$(HAVE_LOG1PL)|g' \
+ -e 's|@''HAVE_LOGBF''@|$(HAVE_LOGBF)|g' \
+ -e 's|@''HAVE_LOGBL''@|$(HAVE_LOGBL)|g' \
+ -e 's|@''HAVE_MODFF''@|$(HAVE_MODFF)|g' \
+ -e 's|@''HAVE_MODFL''@|$(HAVE_MODFL)|g' \
+ -e 's|@''HAVE_POWF''@|$(HAVE_POWF)|g' \
+ -e 's|@''HAVE_REMAINDER''@|$(HAVE_REMAINDER)|g' \
+ -e 's|@''HAVE_REMAINDERF''@|$(HAVE_REMAINDERF)|g' \
+ -e 's|@''HAVE_RINT''@|$(HAVE_RINT)|g' \
+ -e 's|@''HAVE_RINTL''@|$(HAVE_RINTL)|g' \
+ -e 's|@''HAVE_SINF''@|$(HAVE_SINF)|g' \
-e 's|@''HAVE_SINL''@|$(HAVE_SINL)|g' \
+ -e 's|@''HAVE_SINHF''@|$(HAVE_SINHF)|g' \
+ -e 's|@''HAVE_SQRTF''@|$(HAVE_SQRTF)|g' \
-e 's|@''HAVE_SQRTL''@|$(HAVE_SQRTL)|g' \
+ -e 's|@''HAVE_TANF''@|$(HAVE_TANF)|g' \
-e 's|@''HAVE_TANL''@|$(HAVE_TANL)|g' \
+ -e 's|@''HAVE_TANHF''@|$(HAVE_TANHF)|g' \
-e 's|@''HAVE_DECL_ACOSL''@|$(HAVE_DECL_ACOSL)|g' \
-e 's|@''HAVE_DECL_ASINL''@|$(HAVE_DECL_ASINL)|g' \
-e 's|@''HAVE_DECL_ATANL''@|$(HAVE_DECL_ATANL)|g' \
+ -e 's|@''HAVE_DECL_CBRTF''@|$(HAVE_DECL_CBRTF)|g' \
+ -e 's|@''HAVE_DECL_CBRTL''@|$(HAVE_DECL_CBRTL)|g' \
-e 's|@''HAVE_DECL_CEILF''@|$(HAVE_DECL_CEILF)|g' \
-e 's|@''HAVE_DECL_CEILL''@|$(HAVE_DECL_CEILL)|g' \
+ -e 's|@''HAVE_DECL_COPYSIGNF''@|$(HAVE_DECL_COPYSIGNF)|g' \
-e 's|@''HAVE_DECL_COSL''@|$(HAVE_DECL_COSL)|g' \
-e 's|@''HAVE_DECL_EXPL''@|$(HAVE_DECL_EXPL)|g' \
+ -e 's|@''HAVE_DECL_EXP2''@|$(HAVE_DECL_EXP2)|g' \
+ -e 's|@''HAVE_DECL_EXP2F''@|$(HAVE_DECL_EXP2F)|g' \
+ -e 's|@''HAVE_DECL_EXP2L''@|$(HAVE_DECL_EXP2L)|g' \
+ -e 's|@''HAVE_DECL_EXPM1L''@|$(HAVE_DECL_EXPM1L)|g' \
-e 's|@''HAVE_DECL_FLOORF''@|$(HAVE_DECL_FLOORF)|g' \
-e 's|@''HAVE_DECL_FLOORL''@|$(HAVE_DECL_FLOORL)|g' \
-e 's|@''HAVE_DECL_FREXPL''@|$(HAVE_DECL_FREXPL)|g' \
-e 's|@''HAVE_DECL_LDEXPL''@|$(HAVE_DECL_LDEXPL)|g' \
- -e 's|@''HAVE_DECL_LOGB''@|$(HAVE_DECL_LOGB)|g' \
-e 's|@''HAVE_DECL_LOGL''@|$(HAVE_DECL_LOGL)|g' \
+ -e 's|@''HAVE_DECL_LOG10L''@|$(HAVE_DECL_LOG10L)|g' \
+ -e 's|@''HAVE_DECL_LOG2''@|$(HAVE_DECL_LOG2)|g' \
+ -e 's|@''HAVE_DECL_LOG2F''@|$(HAVE_DECL_LOG2F)|g' \
+ -e 's|@''HAVE_DECL_LOG2L''@|$(HAVE_DECL_LOG2L)|g' \
+ -e 's|@''HAVE_DECL_LOGB''@|$(HAVE_DECL_LOGB)|g' \
+ -e 's|@''HAVE_DECL_REMAINDER''@|$(HAVE_DECL_REMAINDER)|g' \
+ -e 's|@''HAVE_DECL_REMAINDERL''@|$(HAVE_DECL_REMAINDERL)|g' \
+ -e 's|@''HAVE_DECL_RINTF''@|$(HAVE_DECL_RINTF)|g' \
-e 's|@''HAVE_DECL_ROUND''@|$(HAVE_DECL_ROUND)|g' \
-e 's|@''HAVE_DECL_ROUNDF''@|$(HAVE_DECL_ROUNDF)|g' \
-e 's|@''HAVE_DECL_ROUNDL''@|$(HAVE_DECL_ROUNDL)|g' \
@@ -924,25 +1113,67 @@ math.h: math.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''HAVE_DECL_TRUNCF''@|$(HAVE_DECL_TRUNCF)|g' \
-e 's|@''HAVE_DECL_TRUNCL''@|$(HAVE_DECL_TRUNCL)|g' \
| \
- sed -e 's|@''REPLACE_CEIL''@|$(REPLACE_CEIL)|g' \
+ sed -e 's|@''REPLACE_CBRTF''@|$(REPLACE_CBRTF)|g' \
+ -e 's|@''REPLACE_CBRTL''@|$(REPLACE_CBRTL)|g' \
+ -e 's|@''REPLACE_CEIL''@|$(REPLACE_CEIL)|g' \
-e 's|@''REPLACE_CEILF''@|$(REPLACE_CEILF)|g' \
-e 's|@''REPLACE_CEILL''@|$(REPLACE_CEILL)|g' \
+ -e 's|@''REPLACE_EXPM1''@|$(REPLACE_EXPM1)|g' \
+ -e 's|@''REPLACE_EXPM1F''@|$(REPLACE_EXPM1F)|g' \
+ -e 's|@''REPLACE_EXP2''@|$(REPLACE_EXP2)|g' \
+ -e 's|@''REPLACE_EXP2L''@|$(REPLACE_EXP2L)|g' \
+ -e 's|@''REPLACE_FABSL''@|$(REPLACE_FABSL)|g' \
-e 's|@''REPLACE_FLOOR''@|$(REPLACE_FLOOR)|g' \
-e 's|@''REPLACE_FLOORF''@|$(REPLACE_FLOORF)|g' \
-e 's|@''REPLACE_FLOORL''@|$(REPLACE_FLOORL)|g' \
+ -e 's|@''REPLACE_FMA''@|$(REPLACE_FMA)|g' \
+ -e 's|@''REPLACE_FMAF''@|$(REPLACE_FMAF)|g' \
+ -e 's|@''REPLACE_FMAL''@|$(REPLACE_FMAL)|g' \
+ -e 's|@''REPLACE_FMOD''@|$(REPLACE_FMOD)|g' \
+ -e 's|@''REPLACE_FMODF''@|$(REPLACE_FMODF)|g' \
+ -e 's|@''REPLACE_FMODL''@|$(REPLACE_FMODL)|g' \
+ -e 's|@''REPLACE_FREXPF''@|$(REPLACE_FREXPF)|g' \
-e 's|@''REPLACE_FREXP''@|$(REPLACE_FREXP)|g' \
-e 's|@''REPLACE_FREXPL''@|$(REPLACE_FREXPL)|g' \
-e 's|@''REPLACE_HUGE_VAL''@|$(REPLACE_HUGE_VAL)|g' \
+ -e 's|@''REPLACE_HYPOT''@|$(REPLACE_HYPOT)|g' \
+ -e 's|@''REPLACE_HYPOTF''@|$(REPLACE_HYPOTF)|g' \
+ -e 's|@''REPLACE_HYPOTL''@|$(REPLACE_HYPOTL)|g' \
+ -e 's|@''REPLACE_ILOGB''@|$(REPLACE_ILOGB)|g' \
+ -e 's|@''REPLACE_ILOGBF''@|$(REPLACE_ILOGBF)|g' \
-e 's|@''REPLACE_ISFINITE''@|$(REPLACE_ISFINITE)|g' \
-e 's|@''REPLACE_ISINF''@|$(REPLACE_ISINF)|g' \
-e 's|@''REPLACE_ISNAN''@|$(REPLACE_ISNAN)|g' \
+ -e 's|@''REPLACE_ITOLD''@|$(REPLACE_ITOLD)|g' \
-e 's|@''REPLACE_LDEXPL''@|$(REPLACE_LDEXPL)|g' \
+ -e 's|@''REPLACE_LOG''@|$(REPLACE_LOG)|g' \
+ -e 's|@''REPLACE_LOGF''@|$(REPLACE_LOGF)|g' \
+ -e 's|@''REPLACE_LOGL''@|$(REPLACE_LOGL)|g' \
+ -e 's|@''REPLACE_LOG10''@|$(REPLACE_LOG10)|g' \
+ -e 's|@''REPLACE_LOG10F''@|$(REPLACE_LOG10F)|g' \
+ -e 's|@''REPLACE_LOG10L''@|$(REPLACE_LOG10L)|g' \
+ -e 's|@''REPLACE_LOG1P''@|$(REPLACE_LOG1P)|g' \
+ -e 's|@''REPLACE_LOG1PF''@|$(REPLACE_LOG1PF)|g' \
+ -e 's|@''REPLACE_LOG1PL''@|$(REPLACE_LOG1PL)|g' \
+ -e 's|@''REPLACE_LOG2''@|$(REPLACE_LOG2)|g' \
+ -e 's|@''REPLACE_LOG2F''@|$(REPLACE_LOG2F)|g' \
+ -e 's|@''REPLACE_LOG2L''@|$(REPLACE_LOG2L)|g' \
+ -e 's|@''REPLACE_LOGB''@|$(REPLACE_LOGB)|g' \
+ -e 's|@''REPLACE_LOGBF''@|$(REPLACE_LOGBF)|g' \
+ -e 's|@''REPLACE_LOGBL''@|$(REPLACE_LOGBL)|g' \
+ -e 's|@''REPLACE_MODF''@|$(REPLACE_MODF)|g' \
+ -e 's|@''REPLACE_MODFF''@|$(REPLACE_MODFF)|g' \
+ -e 's|@''REPLACE_MODFL''@|$(REPLACE_MODFL)|g' \
-e 's|@''REPLACE_NAN''@|$(REPLACE_NAN)|g' \
+ -e 's|@''REPLACE_REMAINDER''@|$(REPLACE_REMAINDER)|g' \
+ -e 's|@''REPLACE_REMAINDERF''@|$(REPLACE_REMAINDERF)|g' \
+ -e 's|@''REPLACE_REMAINDERL''@|$(REPLACE_REMAINDERL)|g' \
-e 's|@''REPLACE_ROUND''@|$(REPLACE_ROUND)|g' \
-e 's|@''REPLACE_ROUNDF''@|$(REPLACE_ROUNDF)|g' \
-e 's|@''REPLACE_ROUNDL''@|$(REPLACE_ROUNDL)|g' \
-e 's|@''REPLACE_SIGNBIT''@|$(REPLACE_SIGNBIT)|g' \
-e 's|@''REPLACE_SIGNBIT_USING_GCC''@|$(REPLACE_SIGNBIT_USING_GCC)|g' \
+ -e 's|@''REPLACE_SQRTL''@|$(REPLACE_SQRTL)|g' \
-e 's|@''REPLACE_TRUNC''@|$(REPLACE_TRUNC)|g' \
-e 's|@''REPLACE_TRUNCF''@|$(REPLACE_TRUNCF)|g' \
-e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \
@@ -1019,6 +1250,24 @@ EXTRA_libm4_a_SOURCES += mkstemp.c
## end gnulib module mkstemp
+## begin gnulib module msvc-inval
+
+
+EXTRA_DIST += msvc-inval.c msvc-inval.h
+
+EXTRA_libm4_a_SOURCES += msvc-inval.c
+
+## end gnulib module msvc-inval
+
+## begin gnulib module msvc-nothrow
+
+
+EXTRA_DIST += msvc-nothrow.c msvc-nothrow.h
+
+EXTRA_libm4_a_SOURCES += msvc-nothrow.c
+
+## end gnulib module msvc-nothrow
+
## begin gnulib module nl_langinfo
@@ -1196,13 +1445,21 @@ libm4_a_SOURCES += progname.h progname.c
## begin gnulib module quotearg
+libm4_a_SOURCES += quotearg.c
-EXTRA_DIST += quotearg.c quotearg.h
-
-EXTRA_libm4_a_SOURCES += quotearg.c
+EXTRA_DIST += quote.h quotearg.h
## end gnulib module quotearg
+## begin gnulib module raise
+
+
+EXTRA_DIST += raise.c
+
+EXTRA_libm4_a_SOURCES += raise.c
+
+## end gnulib module raise
+
## begin gnulib module rawmemchr
@@ -1261,10 +1518,12 @@ BUILT_SOURCES += $(SCHED_H)
# We need the following in order to create a replacement for <sched.h> when
# the system doesn't have one.
-sched.h: sched.in.h
+if GL_GENERATE_SCHED_H
+sched.h: sched.in.h $(top_builddir)/config.status
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''HAVE_SCHED_H''@|$(HAVE_SCHED_H)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''HAVE_SCHED_H''@|$(HAVE_SCHED_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' \
@@ -1273,14 +1532,28 @@ sched.h: sched.in.h
< $(srcdir)/sched.in.h; \
} > $@-t && \
mv $@-t $@
+else
+sched.h: $(top_builddir)/config.status
+ rm -f $@
+endif
MOSTLYCLEANFILES += sched.h sched.h-t
EXTRA_DIST += sched.in.h
## end gnulib module sched
+## begin gnulib module secure_getenv
+
+
+EXTRA_DIST += secure_getenv.c
+
+EXTRA_libm4_a_SOURCES += secure_getenv.c
+
+## end gnulib module secure_getenv
+
## begin gnulib module sigaction
+libm4_a_SOURCES += sig-handler.c
EXTRA_DIST += sig-handler.h sigaction.c
@@ -1288,28 +1561,36 @@ EXTRA_libm4_a_SOURCES += sigaction.c
## end gnulib module sigaction
-## begin gnulib module signal
+## begin gnulib module signal-h
BUILT_SOURCES += signal.h
# We need the following in order to create <signal.h> when the system
# doesn't have a complete one.
-signal.h: signal.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \
- -e 's|@''GNULIB_SIGNAL_H_SIGPIPE''@|$(GNULIB_SIGNAL_H_SIGPIPE)|g' \
- -e 's|@''GNULIB_SIGPROCMASK''@|$(GNULIB_SIGPROCMASK)|g' \
- -e 's|@''GNULIB_SIGACTION''@|$(GNULIB_SIGACTION)|g' \
+ -e 's|@''GNULIB_PTHREAD_SIGMASK''@|$(GNULIB_PTHREAD_SIGMASK)|g' \
+ -e 's|@''GNULIB_RAISE''@|$(GNULIB_RAISE)|g' \
+ -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GNULIB_SIGNAL_H_SIGPIPE)/g' \
+ -e 's/@''GNULIB_SIGPROCMASK''@/$(GNULIB_SIGPROCMASK)/g' \
+ -e 's/@''GNULIB_SIGACTION''@/$(GNULIB_SIGACTION)/g' \
-e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \
+ -e 's|@''HAVE_PTHREAD_SIGMASK''@|$(HAVE_PTHREAD_SIGMASK)|g' \
+ -e 's|@''HAVE_RAISE''@|$(HAVE_RAISE)|g' \
-e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \
-e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \
-e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \
-e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \
-e 's|@''HAVE_TYPE_VOLATILE_SIG_ATOMIC_T''@|$(HAVE_TYPE_VOLATILE_SIG_ATOMIC_T)|g' \
+ -e 's|@''HAVE_SIGHANDLER_T''@|$(HAVE_SIGHANDLER_T)|g' \
+ -e 's|@''REPLACE_PTHREAD_SIGMASK''@|$(REPLACE_PTHREAD_SIGMASK)|g' \
+ -e 's|@''REPLACE_RAISE''@|$(REPLACE_RAISE)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
@@ -1320,7 +1601,7 @@ MOSTLYCLEANFILES += signal.h signal.h-t
EXTRA_DIST += signal.in.h
-## end gnulib module signal
+## end gnulib module signal-h
## begin gnulib module signbit
@@ -1331,6 +1612,15 @@ EXTRA_libm4_a_SOURCES += signbitd.c signbitf.c signbitl.c
## end gnulib module signbit
+## begin gnulib module sigpipe
+
+
+EXTRA_DIST += stdio-write.c
+
+EXTRA_libm4_a_SOURCES += stdio-write.c
+
+## end gnulib module sigpipe
+
## begin gnulib module sigprocmask
@@ -1346,6 +1636,112 @@ libm4_a_SOURCES += size_max.h
## end gnulib module size_max
+## begin gnulib module snippet/_Noreturn
+
+# Because this Makefile snippet defines a variable used by other
+# gnulib Makefile snippets, it must be present in all Makefile.am that
+# need it. This is ensured by the applicability 'all' defined above.
+
+_NORETURN_H=$(top_srcdir)/build-aux/snippet/_Noreturn.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/snippet/_Noreturn.h
+
+## end gnulib module snippet/_Noreturn
+
+## begin gnulib module snippet/arg-nonnull
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+
+BUILT_SOURCES += arg-nonnull.h
+# The arg-nonnull.h that gets inserted into generated .h files is the same as
+# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut
+# off.
+arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/GL_ARG_NONNULL/,$$p' \
+ < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \
+ > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t
+
+ARG_NONNULL_H=arg-nonnull.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/snippet/arg-nonnull.h
+
+## end gnulib module snippet/arg-nonnull
+
+## begin gnulib module snippet/c++defs
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+
+BUILT_SOURCES += c++defs.h
+# The c++defs.h that gets inserted into generated .h files is the same as
+# build-aux/snippet/c++defs.h, except that it has the copyright header cut off.
+c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/_GL_CXXDEFS/,$$p' \
+ < $(top_srcdir)/build-aux/snippet/c++defs.h \
+ > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += c++defs.h c++defs.h-t
+
+CXXDEFS_H=c++defs.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/snippet/c++defs.h
+
+## end gnulib module snippet/c++defs
+
+## begin gnulib module snippet/unused-parameter
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+
+BUILT_SOURCES += unused-parameter.h
+# The unused-parameter.h that gets inserted into generated .h files is the same
+# as build-aux/snippet/unused-parameter.h, except that it has the copyright
+# header cut off.
+unused-parameter.h: $(top_srcdir)/build-aux/snippet/unused-parameter.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \
+ < $(top_srcdir)/build-aux/snippet/unused-parameter.h \
+ > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += unused-parameter.h unused-parameter.h-t
+
+UNUSED_PARAMETER_H=unused-parameter.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/snippet/unused-parameter.h
+
+## end gnulib module snippet/unused-parameter
+
+## begin gnulib module snippet/warn-on-use
+
+BUILT_SOURCES += warn-on-use.h
+# The warn-on-use.h that gets inserted into generated .h files is the same as
+# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut
+# off.
+warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/^.ifndef/,$$p' \
+ < $(top_srcdir)/build-aux/snippet/warn-on-use.h \
+ > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t
+
+WARN_ON_USE_H=warn-on-use.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/snippet/warn-on-use.h
+
+## end gnulib module snippet/warn-on-use
+
## begin gnulib module snprintf
@@ -1361,39 +1757,43 @@ BUILT_SOURCES += spawn.h
# We need the following in order to create a replacement for <spawn.h> when
# the system doesn't have one.
-spawn.h: spawn.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+spawn.h: spawn.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''HAVE_SPAWN_H''@|$(HAVE_SPAWN_H)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''HAVE_SPAWN_H''@|$(HAVE_SPAWN_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_SPAWN_H''@|$(NEXT_SPAWN_H)|g' \
- -e 's|@''GNULIB_POSIX_SPAWN''@|$(GNULIB_POSIX_SPAWN)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNP''@|$(GNULIB_POSIX_SPAWNP)|g' \
- -e 's|@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT''@|$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT)|g' \
- -e 's|@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE''@|$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE)|g' \
- -e 's|@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2''@|$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2)|g' \
- -e 's|@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN''@|$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN)|g' \
- -e 's|@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY''@|$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNATTR_INIT''@|$(GNULIB_POSIX_SPAWNATTR_INIT)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNATTR_GETFLAGS''@|$(GNULIB_POSIX_SPAWNATTR_GETFLAGS)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNATTR_SETFLAGS''@|$(GNULIB_POSIX_SPAWNATTR_SETFLAGS)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNATTR_GETPGROUP''@|$(GNULIB_POSIX_SPAWNATTR_GETPGROUP)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNATTR_SETPGROUP''@|$(GNULIB_POSIX_SPAWNATTR_SETPGROUP)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM''@|$(GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM''@|$(GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY''@|$(GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY''@|$(GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT''@|$(GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT''@|$(GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNATTR_GETSIGMASK''@|$(GNULIB_POSIX_SPAWNATTR_GETSIGMASK)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNATTR_SETSIGMASK''@|$(GNULIB_POSIX_SPAWNATTR_SETSIGMASK)|g' \
- -e 's|@''GNULIB_POSIX_SPAWNATTR_DESTROY''@|$(GNULIB_POSIX_SPAWNATTR_DESTROY)|g' \
+ -e 's/@''GNULIB_POSIX_SPAWN''@/$(GNULIB_POSIX_SPAWN)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNP''@/$(GNULIB_POSIX_SPAWNP)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT''@/$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE''@/$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2''@/$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN''@/$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY''@/$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNATTR_INIT''@/$(GNULIB_POSIX_SPAWNATTR_INIT)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNATTR_GETFLAGS''@/$(GNULIB_POSIX_SPAWNATTR_GETFLAGS)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNATTR_SETFLAGS''@/$(GNULIB_POSIX_SPAWNATTR_SETFLAGS)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNATTR_GETPGROUP''@/$(GNULIB_POSIX_SPAWNATTR_GETPGROUP)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNATTR_SETPGROUP''@/$(GNULIB_POSIX_SPAWNATTR_SETPGROUP)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM''@/$(GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM''@/$(GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY''@/$(GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY''@/$(GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT''@/$(GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT''@/$(GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNATTR_GETSIGMASK''@/$(GNULIB_POSIX_SPAWNATTR_GETSIGMASK)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNATTR_SETSIGMASK''@/$(GNULIB_POSIX_SPAWNATTR_SETSIGMASK)/g' \
+ -e 's/@''GNULIB_POSIX_SPAWNATTR_DESTROY''@/$(GNULIB_POSIX_SPAWNATTR_DESTROY)/g' \
-e 's|@''HAVE_POSIX_SPAWN''@|$(HAVE_POSIX_SPAWN)|g' \
-e 's|@''HAVE_POSIX_SPAWNATTR_T''@|$(HAVE_POSIX_SPAWNATTR_T)|g' \
-e 's|@''HAVE_POSIX_SPAWN_FILE_ACTIONS_T''@|$(HAVE_POSIX_SPAWN_FILE_ACTIONS_T)|g' \
-e 's|@''REPLACE_POSIX_SPAWN''@|$(REPLACE_POSIX_SPAWN)|g' \
+ -e 's|@''REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE''@|$(REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE)|g' \
+ -e 's|@''REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2''@|$(REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2)|g' \
+ -e 's|@''REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN''@|$(REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN)|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)' \
@@ -1427,16 +1827,22 @@ BUILT_SOURCES += $(STDARG_H)
# We need the following in order to create <stdarg.h> when the system
# doesn't have one that works with the given compiler.
-stdarg.h: stdarg.in.h
+if GL_GENERATE_STDARG_H
+stdarg.h: stdarg.in.h $(top_builddir)/config.status
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \
< $(srcdir)/stdarg.in.h; \
} > $@-t && \
mv $@-t $@
+else
+stdarg.h: $(top_builddir)/config.status
+ rm -f $@
+endif
MOSTLYCLEANFILES += stdarg.h stdarg.h-t
EXTRA_DIST += stdarg.in.h
@@ -1449,12 +1855,17 @@ BUILT_SOURCES += $(STDBOOL_H)
# We need the following in order to create <stdbool.h> when the system
# doesn't have one that works.
-stdbool.h: stdbool.in.h
+if GL_GENERATE_STDBOOL_H
+stdbool.h: stdbool.in.h $(top_builddir)/config.status
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \
} > $@-t && \
mv $@-t $@
+else
+stdbool.h: $(top_builddir)/config.status
+ rm -f $@
+endif
MOSTLYCLEANFILES += stdbool.h stdbool.h-t
EXTRA_DIST += stdbool.in.h
@@ -1467,10 +1878,12 @@ BUILT_SOURCES += $(STDDEF_H)
# We need the following in order to create <stddef.h> when the system
# doesn't have one that works with the given compiler.
-stddef.h: stddef.in.h
+if GL_GENERATE_STDDEF_H
+stddef.h: stddef.in.h $(top_builddir)/config.status
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|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' \
@@ -1479,6 +1892,10 @@ stddef.h: stddef.in.h
< $(srcdir)/stddef.in.h; \
} > $@-t && \
mv $@-t $@
+else
+stddef.h: $(top_builddir)/config.status
+ rm -f $@
+endif
MOSTLYCLEANFILES += stddef.h stddef.h-t
EXTRA_DIST += stddef.in.h
@@ -1491,10 +1908,12 @@ BUILT_SOURCES += $(STDINT_H)
# We need the following in order to create <stdint.h> when the system
# doesn't have one that works with the given compiler.
-stdint.h: stdint.in.h
+if GL_GENERATE_STDINT_H
+stdint.h: stdint.in.h $(top_builddir)/config.status
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|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' \
@@ -1523,6 +1942,10 @@ stdint.h: stdint.in.h
< $(srcdir)/stdint.in.h; \
} > $@-t && \
mv $@-t $@
+else
+stdint.h: $(top_builddir)/config.status
+ rm -f $@
+endif
MOSTLYCLEANFILES += stdint.h stdint.h-t
EXTRA_DIST += stdint.in.h
@@ -1535,54 +1958,67 @@ BUILT_SOURCES += stdio.h
# We need the following in order to create <stdio.h> when the system
# doesn't have one that works with the given compiler.
-stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \
- -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \
- -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \
- -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \
- -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \
- -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \
- -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \
- -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \
- -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \
- -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \
- -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \
- -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \
- -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \
- -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \
- -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \
- -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \
- -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \
- -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \
- -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \
- -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \
- -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \
- -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \
- -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \
- -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \
- -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \
- -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \
- -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \
- -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \
- -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \
- -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \
- -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \
- -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \
- -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \
- -e 's|@''GNULIB_TMPFILE''@|$(GNULIB_TMPFILE)|g' \
- -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \
- -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \
- -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \
- -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \
- -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \
- -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \
- -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \
- -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \
+ -e 's/@''GNULIB_DPRINTF''@/$(GNULIB_DPRINTF)/g' \
+ -e 's/@''GNULIB_FCLOSE''@/$(GNULIB_FCLOSE)/g' \
+ -e 's/@''GNULIB_FDOPEN''@/$(GNULIB_FDOPEN)/g' \
+ -e 's/@''GNULIB_FFLUSH''@/$(GNULIB_FFLUSH)/g' \
+ -e 's/@''GNULIB_FGETC''@/$(GNULIB_FGETC)/g' \
+ -e 's/@''GNULIB_FGETS''@/$(GNULIB_FGETS)/g' \
+ -e 's/@''GNULIB_FOPEN''@/$(GNULIB_FOPEN)/g' \
+ -e 's/@''GNULIB_FPRINTF''@/$(GNULIB_FPRINTF)/g' \
+ -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GNULIB_FPRINTF_POSIX)/g' \
+ -e 's/@''GNULIB_FPURGE''@/$(GNULIB_FPURGE)/g' \
+ -e 's/@''GNULIB_FPUTC''@/$(GNULIB_FPUTC)/g' \
+ -e 's/@''GNULIB_FPUTS''@/$(GNULIB_FPUTS)/g' \
+ -e 's/@''GNULIB_FREAD''@/$(GNULIB_FREAD)/g' \
+ -e 's/@''GNULIB_FREOPEN''@/$(GNULIB_FREOPEN)/g' \
+ -e 's/@''GNULIB_FSCANF''@/$(GNULIB_FSCANF)/g' \
+ -e 's/@''GNULIB_FSEEK''@/$(GNULIB_FSEEK)/g' \
+ -e 's/@''GNULIB_FSEEKO''@/$(GNULIB_FSEEKO)/g' \
+ -e 's/@''GNULIB_FTELL''@/$(GNULIB_FTELL)/g' \
+ -e 's/@''GNULIB_FTELLO''@/$(GNULIB_FTELLO)/g' \
+ -e 's/@''GNULIB_FWRITE''@/$(GNULIB_FWRITE)/g' \
+ -e 's/@''GNULIB_GETC''@/$(GNULIB_GETC)/g' \
+ -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \
+ -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \
+ -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \
+ -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \
+ -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_POSIX)/g' \
+ -e 's/@''GNULIB_PCLOSE''@/$(GNULIB_PCLOSE)/g' \
+ -e 's/@''GNULIB_PERROR''@/$(GNULIB_PERROR)/g' \
+ -e 's/@''GNULIB_POPEN''@/$(GNULIB_POPEN)/g' \
+ -e 's/@''GNULIB_PRINTF''@/$(GNULIB_PRINTF)/g' \
+ -e 's/@''GNULIB_PRINTF_POSIX''@/$(GNULIB_PRINTF_POSIX)/g' \
+ -e 's/@''GNULIB_PUTC''@/$(GNULIB_PUTC)/g' \
+ -e 's/@''GNULIB_PUTCHAR''@/$(GNULIB_PUTCHAR)/g' \
+ -e 's/@''GNULIB_PUTS''@/$(GNULIB_PUTS)/g' \
+ -e 's/@''GNULIB_REMOVE''@/$(GNULIB_REMOVE)/g' \
+ -e 's/@''GNULIB_RENAME''@/$(GNULIB_RENAME)/g' \
+ -e 's/@''GNULIB_RENAMEAT''@/$(GNULIB_RENAMEAT)/g' \
+ -e 's/@''GNULIB_SCANF''@/$(GNULIB_SCANF)/g' \
+ -e 's/@''GNULIB_SNPRINTF''@/$(GNULIB_SNPRINTF)/g' \
+ -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GNULIB_SPRINTF_POSIX)/g' \
+ -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GNULIB_STDIO_H_NONBLOCKING)/g' \
+ -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GNULIB_STDIO_H_SIGPIPE)/g' \
+ -e 's/@''GNULIB_TMPFILE''@/$(GNULIB_TMPFILE)/g' \
+ -e 's/@''GNULIB_VASPRINTF''@/$(GNULIB_VASPRINTF)/g' \
+ -e 's/@''GNULIB_VDPRINTF''@/$(GNULIB_VDPRINTF)/g' \
+ -e 's/@''GNULIB_VFPRINTF''@/$(GNULIB_VFPRINTF)/g' \
+ -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GNULIB_VFPRINTF_POSIX)/g' \
+ -e 's/@''GNULIB_VFSCANF''@/$(GNULIB_VFSCANF)/g' \
+ -e 's/@''GNULIB_VSCANF''@/$(GNULIB_VSCANF)/g' \
+ -e 's/@''GNULIB_VPRINTF''@/$(GNULIB_VPRINTF)/g' \
+ -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \
+ -e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \
+ -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \
< $(srcdir)/stdio.in.h | \
sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
-e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \
@@ -1595,11 +2031,14 @@ stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \
-e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \
-e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \
+ -e 's|@''HAVE_PCLOSE''@|$(HAVE_PCLOSE)|g' \
+ -e 's|@''HAVE_POPEN''@|$(HAVE_POPEN)|g' \
-e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \
-e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \
-e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \
-e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \
-e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \
+ -e 's|@''REPLACE_FDOPEN''@|$(REPLACE_FDOPEN)|g' \
-e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \
-e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \
-e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \
@@ -1620,6 +2059,7 @@ stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \
-e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \
-e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \
+ -e 's|@''REPLACE_STDIO_READ_FUNCS''@|$(REPLACE_STDIO_READ_FUNCS)|g' \
-e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \
-e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \
-e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \
@@ -1646,41 +2086,47 @@ BUILT_SOURCES += stdlib.h
# We need the following in order to create <stdlib.h> when the system
# doesn't have one that works with the given compiler.
-stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
+ $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
- -e 's|@''GNULIB__EXIT''@|$(GNULIB__EXIT)|g' \
- -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \
- -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \
- -e 's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \
- -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \
- -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \
- -e 's|@''GNULIB_GRANTPT''@|$(GNULIB_GRANTPT)|g' \
- -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \
- -e 's|@''GNULIB_MBTOWC''@|$(GNULIB_MBTOWC)|g' \
- -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
- -e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \
- -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \
- -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \
- -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \
- -e 's|@''GNULIB_PTSNAME''@|$(GNULIB_PTSNAME)|g' \
- -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \
- -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \
- -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \
- -e 's|@''GNULIB_REALPATH''@|$(GNULIB_REALPATH)|g' \
- -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \
- -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \
- -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \
- -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \
- -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \
- -e 's|@''GNULIB_SYSTEM_POSIX''@|$(GNULIB_SYSTEM_POSIX)|g' \
- -e 's|@''GNULIB_UNLOCKPT''@|$(GNULIB_UNLOCKPT)|g' \
- -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \
- -e 's|@''GNULIB_WCTOMB''@|$(GNULIB_WCTOMB)|g' \
+ -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \
+ -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \
+ -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \
+ -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \
+ -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \
+ -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \
+ -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \
+ -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \
+ -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \
+ -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \
+ -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \
+ -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \
+ -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \
+ -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \
+ -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \
+ -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
+ -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \
+ -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \
+ -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \
+ -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \
+ -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \
+ -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \
+ -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \
+ -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \
+ -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \
+ -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \
+ -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \
+ -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \
+ -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \
+ -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \
+ -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \
+ -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \
< $(srcdir)/stdlib.in.h | \
sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
-e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
@@ -1693,11 +2139,15 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
-e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \
-e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \
+ -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \
-e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
+ -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
+ -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \
-e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
-e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
-e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \
-e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \
+ -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \
-e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \
-e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
-e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
@@ -1711,7 +2161,10 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \
-e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
-e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
+ -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
+ -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
-e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
+ -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \
-e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \
-e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
-e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
@@ -1719,6 +2172,7 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \
-e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _Noreturn/r $(_NORETURN_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
} > $@-t && \
@@ -1731,10 +2185,9 @@ EXTRA_DIST += stdlib.in.h
## begin gnulib module stdlib-safer
+libm4_a_SOURCES += mkstemp-safer.c
-EXTRA_DIST += mkstemp-safer.c stdlib--.h stdlib-safer.h
-
-EXTRA_libm4_a_SOURCES += mkstemp-safer.c
+EXTRA_DIST += stdlib--.h stdlib-safer.h
## end gnulib module stdlib-safer
@@ -1763,56 +2216,70 @@ EXTRA_libm4_a_SOURCES += strerror.c
## end gnulib module strerror
+## begin gnulib module strerror-override
+
+
+EXTRA_DIST += strerror-override.c strerror-override.h
+
+EXTRA_libm4_a_SOURCES += strerror-override.c
+
+## end gnulib module strerror-override
+
## begin gnulib module string
BUILT_SOURCES += string.h
# We need the following in order to create <string.h> when the system
# doesn't have one that works with the given compiler.
-string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
- -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \
- -e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \
- -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \
- -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \
- -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \
- -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \
- -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \
- -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \
- -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \
- -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \
- -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \
- -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \
- -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \
- -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \
- -e 's|@''GNULIB_MEMCHR''@|$(GNULIB_MEMCHR)|g' \
- -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \
- -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \
- -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \
- -e 's|@''GNULIB_RAWMEMCHR''@|$(GNULIB_RAWMEMCHR)|g' \
- -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \
- -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \
- -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \
- -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \
- -e 's|@''GNULIB_STRNCAT''@|$(GNULIB_STRNCAT)|g' \
- -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \
- -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \
- -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \
- -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \
- -e 's|@''GNULIB_STRSTR''@|$(GNULIB_STRSTR)|g' \
- -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \
- -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \
- -e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \
- -e 's|@''GNULIB_STRERROR_R''@|$(GNULIB_STRERROR_R)|g' \
- -e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \
- -e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \
+ -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \
+ -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \
+ -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \
+ -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \
+ -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \
+ -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \
+ -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \
+ -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \
+ -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \
+ -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \
+ -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \
+ -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \
+ -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \
+ -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \
+ -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \
+ -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \
+ -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \
+ -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \
+ -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \
+ -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \
+ -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \
+ -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \
+ -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \
+ -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \
+ -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \
+ -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \
+ -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \
+ -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \
+ -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \
+ -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \
+ -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \
+ -e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \
+ -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \
+ -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \
+ -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \
+ -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \
+ -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \
< $(srcdir)/string.in.h | \
- sed -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
+ sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
+ -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
+ -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
-e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \
-e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
-e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
@@ -1835,6 +2302,7 @@ string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
-e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
-e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
+ -e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \
-e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
-e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
-e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
@@ -1902,41 +2370,35 @@ EXTRA_libm4_a_SOURCES += strtod.c
## end gnulib module strtod
-## begin gnulib module strtol
-
-
-EXTRA_DIST += strtol.c
-
-EXTRA_libm4_a_SOURCES += strtol.c
-
-## end gnulib module strtol
-
## begin gnulib module sys_stat
BUILT_SOURCES += sys/stat.h
# We need the following in order to create <sys/stat.h> when the system
# has one that is incomplete.
-sys/stat.h: sys_stat.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_at)$(MKDIR_P) sys
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
- -e 's|@''GNULIB_FCHMODAT''@|$(GNULIB_FCHMODAT)|g' \
- -e 's|@''GNULIB_FSTATAT''@|$(GNULIB_FSTATAT)|g' \
- -e 's|@''GNULIB_FUTIMENS''@|$(GNULIB_FUTIMENS)|g' \
- -e 's|@''GNULIB_LCHMOD''@|$(GNULIB_LCHMOD)|g' \
- -e 's|@''GNULIB_LSTAT''@|$(GNULIB_LSTAT)|g' \
- -e 's|@''GNULIB_MKDIRAT''@|$(GNULIB_MKDIRAT)|g' \
- -e 's|@''GNULIB_MKFIFO''@|$(GNULIB_MKFIFO)|g' \
- -e 's|@''GNULIB_MKFIFOAT''@|$(GNULIB_MKFIFOAT)|g' \
- -e 's|@''GNULIB_MKNOD''@|$(GNULIB_MKNOD)|g' \
- -e 's|@''GNULIB_MKNODAT''@|$(GNULIB_MKNODAT)|g' \
- -e 's|@''GNULIB_STAT''@|$(GNULIB_STAT)|g' \
- -e 's|@''GNULIB_UTIMENSAT''@|$(GNULIB_UTIMENSAT)|g' \
+ -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \
+ -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \
+ -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \
+ -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \
+ -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \
+ -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \
+ -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \
+ -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \
+ -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \
+ -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \
+ -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \
+ -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \
+ -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \
+ -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \
-e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
-e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
-e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
@@ -1976,19 +2438,22 @@ BUILT_SOURCES += sys/time.h
# We need the following in order to create <sys/time.h> when the system
# doesn't have one that works with the given compiler.
-sys/time.h: sys_time.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+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/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|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)' \
@@ -2001,21 +2466,47 @@ 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 <sys/types.h> 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_M4|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 <sys/wait.h> when the system
# has one that is incomplete.
-sys/wait.h: sys_wait.in.h $(CXXDEFS_H) $(WARN_ON_USE_H)
+sys/wait.h: sys_wait.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
$(AM_V_at)$(MKDIR_P) sys
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_SYS_WAIT_H''@|$(NEXT_SYS_WAIT_H)|g' \
- -e 's|@''GNULIB_WAITPID''@|$(GNULIB_WAITPID)|g' \
+ -e 's/@''GNULIB_WAITPID''@/$(GNULIB_WAITPID)/g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
< $(srcdir)/sys_wait.in.h; \
@@ -2030,10 +2521,9 @@ EXTRA_DIST += sys_wait.in.h
## begin gnulib module tempname
+libm4_a_SOURCES += tempname.c
-EXTRA_DIST += tempname.c tempname.h
-
-EXTRA_libm4_a_SOURCES += tempname.c
+EXTRA_DIST += tempname.h
## end gnulib module tempname
@@ -2051,18 +2541,19 @@ BUILT_SOURCES += time.h
# We need the following in order to create <time.h> when the system
# doesn't have one that works with the given compiler.
-time.h: time.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
- -e 's|@''GNULIB_MKTIME''@|$(GNULIB_MKTIME)|g' \
- -e 's|@''GNULIB_NANOSLEEP''@|$(GNULIB_NANOSLEEP)|g' \
- -e 's|@''GNULIB_STRPTIME''@|$(GNULIB_STRPTIME)|g' \
- -e 's|@''GNULIB_TIMEGM''@|$(GNULIB_TIMEGM)|g' \
- -e 's|@''GNULIB_TIME_R''@|$(GNULIB_TIME_R)|g' \
+ -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \
+ -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \
+ -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \
+ -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \
+ -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \
-e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
-e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
-e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
@@ -2101,58 +2592,69 @@ libm4_a_SOURCES += tmpdir.h tmpdir.c
## begin gnulib module unistd
BUILT_SOURCES += unistd.h
+libm4_a_SOURCES += unistd.c
# We need the following in order to create an empty placeholder for
# <unistd.h> when the system doesn't have one.
-unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
- -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
- -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \
- -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
- -e 's|@''GNULIB_DUP3''@|$(GNULIB_DUP3)|g' \
- -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \
- -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \
- -e 's|@''GNULIB_FACCESSAT''@|$(GNULIB_FACCESSAT)|g' \
- -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \
- -e 's|@''GNULIB_FCHOWNAT''@|$(GNULIB_FCHOWNAT)|g' \
- -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \
- -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \
- -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \
- -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \
- -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \
- -e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \
- -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \
- -e 's|@''GNULIB_GETLOGIN''@|$(GNULIB_GETLOGIN)|g' \
- -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \
- -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \
- -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \
- -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \
- -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \
- -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \
- -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
- -e 's|@''GNULIB_PIPE''@|$(GNULIB_PIPE)|g' \
- -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \
- -e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \
- -e 's|@''GNULIB_PWRITE''@|$(GNULIB_PWRITE)|g' \
- -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
- -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \
- -e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \
- -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
- -e 's|@''GNULIB_SYMLINK''@|$(GNULIB_SYMLINK)|g' \
- -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \
- -e 's|@''GNULIB_TTYNAME_R''@|$(GNULIB_TTYNAME_R)|g' \
- -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \
- -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \
- -e 's|@''GNULIB_UNLINK''@|$(GNULIB_UNLINK)|g' \
- -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \
- -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \
- -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \
+ -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
+ -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \
+ -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
+ -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
+ -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \
+ -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \
+ -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \
+ -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \
+ -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \
+ -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \
+ -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \
+ -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \
+ -e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \
+ -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \
+ -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \
+ -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \
+ -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \
+ -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \
+ -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \
+ -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \
+ -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
+ -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
+ -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
+ -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
+ -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
+ -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \
+ -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \
+ -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \
+ -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \
+ -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \
+ -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \
+ -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \
+ -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \
+ -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \
+ -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \
+ -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \
+ -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \
+ -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \
+ -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \
+ -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \
+ -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \
+ -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \
+ -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \
+ -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_M4_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' \
@@ -2161,6 +2663,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \
-e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \
-e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
+ -e 's|@''HAVE_FDATASYNC''@|$(HAVE_FDATASYNC)|g' \
-e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
-e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
-e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
@@ -2168,6 +2671,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
-e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \
-e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
+ -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \
-e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
-e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
-e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \
@@ -2177,6 +2681,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \
-e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
-e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \
+ -e 's|@''HAVE_SETHOSTNAME''@|$(HAVE_SETHOSTNAME)|g' \
-e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
-e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \
-e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
@@ -2184,10 +2689,12 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
-e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
-e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \
+ -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \
-e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \
-e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
-e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \
-e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \
+ -e 's|@''HAVE_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \
-e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \
-e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
-e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
@@ -2197,17 +2704,20 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
-e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
-e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
+ -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
-e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
-e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
-e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
-e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
-e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
+ -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \
-e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
-e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
-e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \
-e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
-e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \
-e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \
+ -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \
-e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
-e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
-e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
@@ -2232,10 +2742,9 @@ EXTRA_DIST += unistd.in.h
## begin gnulib module unistd-safer
+libm4_a_SOURCES += dup-safer.c fd-safer.c pipe-safer.c
-EXTRA_DIST += dup-safer.c fd-safer.c pipe-safer.c unistd--.h unistd-safer.h
-
-EXTRA_libm4_a_SOURCES += dup-safer.c fd-safer.c pipe-safer.c
+EXTRA_DIST += unistd--.h unistd-safer.h
## end gnulib module unistd-safer
@@ -2287,7 +2796,8 @@ EXTRA_DIST += $(top_srcdir)/build-aux/vc-list-files
## begin gnulib module verify
-libm4_a_SOURCES += verify.h
+
+EXTRA_DIST += verify.h
## end gnulib module verify
@@ -2324,79 +2834,61 @@ EXTRA_libm4_a_SOURCES += waitpid.c
## end gnulib module waitpid
-## begin gnulib module warn-on-use
-
-BUILT_SOURCES += warn-on-use.h
-# The warn-on-use.h that gets inserted into generated .h files is the same as
-# build-aux/warn-on-use.h, except that it has the copyright header cut off.
-warn-on-use.h: $(top_srcdir)/build-aux/warn-on-use.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/^.ifndef/,$$p' \
- < $(top_srcdir)/build-aux/warn-on-use.h \
- > $@-t && \
- mv $@-t $@
-MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t
-
-WARN_ON_USE_H=warn-on-use.h
-
-EXTRA_DIST += $(top_srcdir)/build-aux/warn-on-use.h
-
-## end gnulib module warn-on-use
-
## begin gnulib module wchar
BUILT_SOURCES += wchar.h
# We need the following in order to create <wchar.h> when the system
# version does not work standalone.
-wchar.h: wchar.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \
-e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
-e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \
- -e 's|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \
- -e 's|@''GNULIB_WCTOB''@|$(GNULIB_WCTOB)|g' \
- -e 's|@''GNULIB_MBSINIT''@|$(GNULIB_MBSINIT)|g' \
- -e 's|@''GNULIB_MBRTOWC''@|$(GNULIB_MBRTOWC)|g' \
- -e 's|@''GNULIB_MBRLEN''@|$(GNULIB_MBRLEN)|g' \
- -e 's|@''GNULIB_MBSRTOWCS''@|$(GNULIB_MBSRTOWCS)|g' \
- -e 's|@''GNULIB_MBSNRTOWCS''@|$(GNULIB_MBSNRTOWCS)|g' \
- -e 's|@''GNULIB_WCRTOMB''@|$(GNULIB_WCRTOMB)|g' \
- -e 's|@''GNULIB_WCSRTOMBS''@|$(GNULIB_WCSRTOMBS)|g' \
- -e 's|@''GNULIB_WCSNRTOMBS''@|$(GNULIB_WCSNRTOMBS)|g' \
- -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \
- -e 's|@''GNULIB_WMEMCHR''@|$(GNULIB_WMEMCHR)|g' \
- -e 's|@''GNULIB_WMEMCMP''@|$(GNULIB_WMEMCMP)|g' \
- -e 's|@''GNULIB_WMEMCPY''@|$(GNULIB_WMEMCPY)|g' \
- -e 's|@''GNULIB_WMEMMOVE''@|$(GNULIB_WMEMMOVE)|g' \
- -e 's|@''GNULIB_WMEMSET''@|$(GNULIB_WMEMSET)|g' \
- -e 's|@''GNULIB_WCSLEN''@|$(GNULIB_WCSLEN)|g' \
- -e 's|@''GNULIB_WCSNLEN''@|$(GNULIB_WCSNLEN)|g' \
- -e 's|@''GNULIB_WCSCPY''@|$(GNULIB_WCSCPY)|g' \
- -e 's|@''GNULIB_WCPCPY''@|$(GNULIB_WCPCPY)|g' \
- -e 's|@''GNULIB_WCSNCPY''@|$(GNULIB_WCSNCPY)|g' \
- -e 's|@''GNULIB_WCPNCPY''@|$(GNULIB_WCPNCPY)|g' \
- -e 's|@''GNULIB_WCSCAT''@|$(GNULIB_WCSCAT)|g' \
- -e 's|@''GNULIB_WCSNCAT''@|$(GNULIB_WCSNCAT)|g' \
- -e 's|@''GNULIB_WCSCMP''@|$(GNULIB_WCSCMP)|g' \
- -e 's|@''GNULIB_WCSNCMP''@|$(GNULIB_WCSNCMP)|g' \
- -e 's|@''GNULIB_WCSCASECMP''@|$(GNULIB_WCSCASECMP)|g' \
- -e 's|@''GNULIB_WCSNCASECMP''@|$(GNULIB_WCSNCASECMP)|g' \
- -e 's|@''GNULIB_WCSCOLL''@|$(GNULIB_WCSCOLL)|g' \
- -e 's|@''GNULIB_WCSXFRM''@|$(GNULIB_WCSXFRM)|g' \
- -e 's|@''GNULIB_WCSDUP''@|$(GNULIB_WCSDUP)|g' \
- -e 's|@''GNULIB_WCSCHR''@|$(GNULIB_WCSCHR)|g' \
- -e 's|@''GNULIB_WCSRCHR''@|$(GNULIB_WCSRCHR)|g' \
- -e 's|@''GNULIB_WCSCSPN''@|$(GNULIB_WCSCSPN)|g' \
- -e 's|@''GNULIB_WCSSPN''@|$(GNULIB_WCSSPN)|g' \
- -e 's|@''GNULIB_WCSPBRK''@|$(GNULIB_WCSPBRK)|g' \
- -e 's|@''GNULIB_WCSSTR''@|$(GNULIB_WCSSTR)|g' \
- -e 's|@''GNULIB_WCSTOK''@|$(GNULIB_WCSTOK)|g' \
- -e 's|@''GNULIB_WCSWIDTH''@|$(GNULIB_WCSWIDTH)|g' \
+ -e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \
+ -e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \
+ -e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \
+ -e 's/@''GNULIB_MBRTOWC''@/$(GNULIB_MBRTOWC)/g' \
+ -e 's/@''GNULIB_MBRLEN''@/$(GNULIB_MBRLEN)/g' \
+ -e 's/@''GNULIB_MBSRTOWCS''@/$(GNULIB_MBSRTOWCS)/g' \
+ -e 's/@''GNULIB_MBSNRTOWCS''@/$(GNULIB_MBSNRTOWCS)/g' \
+ -e 's/@''GNULIB_WCRTOMB''@/$(GNULIB_WCRTOMB)/g' \
+ -e 's/@''GNULIB_WCSRTOMBS''@/$(GNULIB_WCSRTOMBS)/g' \
+ -e 's/@''GNULIB_WCSNRTOMBS''@/$(GNULIB_WCSNRTOMBS)/g' \
+ -e 's/@''GNULIB_WCWIDTH''@/$(GNULIB_WCWIDTH)/g' \
+ -e 's/@''GNULIB_WMEMCHR''@/$(GNULIB_WMEMCHR)/g' \
+ -e 's/@''GNULIB_WMEMCMP''@/$(GNULIB_WMEMCMP)/g' \
+ -e 's/@''GNULIB_WMEMCPY''@/$(GNULIB_WMEMCPY)/g' \
+ -e 's/@''GNULIB_WMEMMOVE''@/$(GNULIB_WMEMMOVE)/g' \
+ -e 's/@''GNULIB_WMEMSET''@/$(GNULIB_WMEMSET)/g' \
+ -e 's/@''GNULIB_WCSLEN''@/$(GNULIB_WCSLEN)/g' \
+ -e 's/@''GNULIB_WCSNLEN''@/$(GNULIB_WCSNLEN)/g' \
+ -e 's/@''GNULIB_WCSCPY''@/$(GNULIB_WCSCPY)/g' \
+ -e 's/@''GNULIB_WCPCPY''@/$(GNULIB_WCPCPY)/g' \
+ -e 's/@''GNULIB_WCSNCPY''@/$(GNULIB_WCSNCPY)/g' \
+ -e 's/@''GNULIB_WCPNCPY''@/$(GNULIB_WCPNCPY)/g' \
+ -e 's/@''GNULIB_WCSCAT''@/$(GNULIB_WCSCAT)/g' \
+ -e 's/@''GNULIB_WCSNCAT''@/$(GNULIB_WCSNCAT)/g' \
+ -e 's/@''GNULIB_WCSCMP''@/$(GNULIB_WCSCMP)/g' \
+ -e 's/@''GNULIB_WCSNCMP''@/$(GNULIB_WCSNCMP)/g' \
+ -e 's/@''GNULIB_WCSCASECMP''@/$(GNULIB_WCSCASECMP)/g' \
+ -e 's/@''GNULIB_WCSNCASECMP''@/$(GNULIB_WCSNCASECMP)/g' \
+ -e 's/@''GNULIB_WCSCOLL''@/$(GNULIB_WCSCOLL)/g' \
+ -e 's/@''GNULIB_WCSXFRM''@/$(GNULIB_WCSXFRM)/g' \
+ -e 's/@''GNULIB_WCSDUP''@/$(GNULIB_WCSDUP)/g' \
+ -e 's/@''GNULIB_WCSCHR''@/$(GNULIB_WCSCHR)/g' \
+ -e 's/@''GNULIB_WCSRCHR''@/$(GNULIB_WCSRCHR)/g' \
+ -e 's/@''GNULIB_WCSCSPN''@/$(GNULIB_WCSCSPN)/g' \
+ -e 's/@''GNULIB_WCSSPN''@/$(GNULIB_WCSSPN)/g' \
+ -e 's/@''GNULIB_WCSPBRK''@/$(GNULIB_WCSPBRK)/g' \
+ -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \
+ -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \
+ -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \
< $(srcdir)/wchar.in.h | \
sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
-e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
@@ -2475,13 +2967,15 @@ EXTRA_libm4_a_SOURCES += wcrtomb.c
## begin gnulib module wctype-h
BUILT_SOURCES += wctype.h
+libm4_a_SOURCES += wctype-h.c
# We need the following in order to create <wctype.h> when the system
# doesn't have one that works with the given compiler.
-wctype.h: wctype.in.h $(CXXDEFS_H) $(WARN_ON_USE_H)
+wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|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' \
@@ -2498,6 +2992,7 @@ wctype.h: wctype.in.h $(CXXDEFS_H) $(WARN_ON_USE_H)
-e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \
-e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \
-e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \
+ -e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
< $(srcdir)/wctype.in.h; \
@@ -2511,10 +3006,9 @@ EXTRA_DIST += wctype.in.h
## begin gnulib module xalloc
+libm4_a_SOURCES += xmalloc.c
-EXTRA_DIST += xalloc.h xmalloc.c
-
-EXTRA_libm4_a_SOURCES += xmalloc.c
+EXTRA_DIST += xalloc.h
## end gnulib module xalloc
@@ -2524,6 +3018,13 @@ libm4_a_SOURCES += xalloc-die.c
## end gnulib module xalloc-die
+## begin gnulib module xalloc-oversized
+
+
+EXTRA_DIST += xalloc-oversized.h
+
+## end gnulib module xalloc-oversized
+
## begin gnulib module xlist
libm4_a_SOURCES += gl_xlist.h gl_xlist.c
@@ -2552,7 +3053,7 @@ libm4_a_SOURCES += xprintf.h xprintf.c
## begin gnulib module xsize
-libm4_a_SOURCES += xsize.h
+libm4_a_SOURCES += xsize.h xsize.c
## end gnulib module xsize
diff --git a/lib/ignore-value.h b/lib/ignore-value.h
index f021a1a..ebd6bf4 100644
--- a/lib/ignore-value.h
+++ b/lib/ignore-value.h
@@ -1,6 +1,6 @@
/* ignore a function return without a compiler warning
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -33,30 +33,16 @@
declared with attribute warn_unused_result". */
#ifndef _GL_IGNORE_VALUE_H
-# define _GL_IGNORE_VALUE_H
-
-# ifndef _GL_ATTRIBUTE_DEPRECATED
-/* The __attribute__((__deprecated__)) feature
- is available in gcc versions 3.1 and newer. */
-# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 1)
-# define _GL_ATTRIBUTE_DEPRECATED /* empty */
-# else
-# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
-# endif
-# endif
+#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
-
-/* ignore_value works for scalars, pointers and aggregates;
- deprecate ignore_ptr. */
-static inline void _GL_ATTRIBUTE_DEPRECATED
-ignore_ptr (void *p) { (void) p; } /* deprecated: use ignore_value */
+#if 3 < __GNUC__ + (4 <= __GNUC_MINOR__)
+# define ignore_value(x) \
+ (__extension__ ({ __typeof__ (x) __x = (x); (void) __x; }))
+#else
+# define ignore_value(x) ((void) (x))
+#endif
#endif
diff --git a/lib/intprops.h b/lib/intprops.h
index 58b1b3f..f57f9b4 100644
--- a/lib/intprops.h
+++ b/lib/intprops.h
@@ -1,6 +1,6 @@
/* intprops.h -- properties of integer types
- Copyright (C) 2001-2005, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2005, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,70 +17,303 @@
/* Written by Paul Eggert. */
-#ifndef GL_INTPROPS_H
-# define GL_INTPROPS_H
+#ifndef _GL_INTPROPS_H
+#define _GL_INTPROPS_H
-# include <limits.h>
+#include <limits.h>
+
+/* 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
+ <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00406.html>. */
+#define _GL_INT_NEGATE_CONVERT(e, v) (0 * (e) - (v))
/* The extra casts in the following macros work around compiler bugs,
e.g., in Cray C 5.0.3.0. */
/* True if the arithmetic type T is an integer type. bool counts as
an integer. */
-# define TYPE_IS_INTEGER(t) ((t) 1.5 == 1)
+#define TYPE_IS_INTEGER(t) ((t) 1.5 == 1)
/* True if negative values of the signed integer type T use two's
complement, ones' complement, or signed magnitude representation,
respectively. Much GNU code assumes two's complement, but some
people like to be portable to all possible C hosts. */
-# define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1)
-# define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0)
-# define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1)
+#define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1)
+#define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0)
+#define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1)
+
+/* True if the signed integer expression E uses two's complement. */
+#define _GL_INT_TWOS_COMPLEMENT(e) (~ _GL_INT_CONVERT (e, 0) == -1)
/* True if the arithmetic type T is signed. */
-# define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+
+/* Return 1 if the integer expression E, after integer promotion, has
+ a signed type. */
+#define _GL_INT_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
+
-/* The maximum and minimum values for the integer type T. These
+/* Minimum and maximum values for integer types and expressions. These
macros have undefined behavior if T is signed and has padding bits.
If this is a problem for you, please let us know how to fix it for
your host. */
-# define TYPE_MINIMUM(t) \
- ((t) (! TYPE_SIGNED (t) \
- ? (t) 0 \
- : TYPE_SIGNED_MAGNITUDE (t) \
- ? ~ (t) 0 \
+
+/* The maximum and minimum values for the integer type T. */
+#define TYPE_MINIMUM(t) \
+ ((t) (! TYPE_SIGNED (t) \
+ ? (t) 0 \
+ : TYPE_SIGNED_MAGNITUDE (t) \
+ ? ~ (t) 0 \
: ~ TYPE_MAXIMUM (t)))
-# define TYPE_MAXIMUM(t) \
- ((t) (! TYPE_SIGNED (t) \
- ? (t) -1 \
+#define TYPE_MAXIMUM(t) \
+ ((t) (! TYPE_SIGNED (t) \
+ ? (t) -1 \
: ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
-/* Return zero if T can be determined to be an unsigned type.
- Otherwise, return 1.
- When compiling with GCC, INT_STRLEN_BOUND uses this macro to obtain a
- tighter bound. Otherwise, it overestimates the true bound by one byte
- when applied to unsigned types of size 2, 4, 16, ... bytes.
- The symbol signed_type_or_expr__ is private to this header file. */
-# if __GNUC__ >= 2
-# define signed_type_or_expr__(t) TYPE_SIGNED (__typeof__ (t))
-# else
-# define signed_type_or_expr__(t) 1
-# endif
+/* The maximum and minimum values for the type of the expression E,
+ after integer promotion. E should not have side effects. */
+#define _GL_INT_MINIMUM(e) \
+ (_GL_INT_SIGNED (e) \
+ ? - _GL_INT_TWOS_COMPLEMENT (e) - _GL_SIGNED_INT_MAXIMUM (e) \
+ : _GL_INT_CONVERT (e, 0))
+#define _GL_INT_MAXIMUM(e) \
+ (_GL_INT_SIGNED (e) \
+ ? _GL_SIGNED_INT_MAXIMUM (e) \
+ : _GL_INT_NEGATE_CONVERT (e, 1))
+#define _GL_SIGNED_INT_MAXIMUM(e) \
+ (((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1)
+
+
+/* Return 1 if the __typeof__ keyword works. This could be done by
+ 'configure', but for now it's easier to do it by hand. */
+#if 2 <= __GNUC__ || defined __IBM__TYPEOF__ || 0x5110 <= __SUNPRO_C
+# define _GL_HAVE___TYPEOF__ 1
+#else
+# define _GL_HAVE___TYPEOF__ 0
+#endif
+
+/* Return 1 if the integer type or expression T might be signed. Return 0
+ if it is definitely unsigned. This macro does not evaluate its argument,
+ and expands to an integer constant expression. */
+#if _GL_HAVE___TYPEOF__
+# define _GL_SIGNED_TYPE_OR_EXPR(t) TYPE_SIGNED (__typeof__ (t))
+#else
+# define _GL_SIGNED_TYPE_OR_EXPR(t) 1
+#endif
/* Bound on length of the string representing an unsigned integer
value representable in B bits. log10 (2.0) < 146/485. The
smallest value of B where this bound is not tight is 2621. */
-# define INT_BITS_STRLEN_BOUND(b) (((b) * 146 + 484) / 485)
+#define INT_BITS_STRLEN_BOUND(b) (((b) * 146 + 484) / 485)
/* Bound on length of the string representing an integer type or expression T.
Subtract 1 for the sign bit if T is signed, and then add 1 more for
- a minus sign if needed. */
-# define INT_STRLEN_BOUND(t) \
- (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT - signed_type_or_expr__ (t)) \
- + signed_type_or_expr__ (t))
+ a minus sign if needed.
+
+ Because _GL_SIGNED_TYPE_OR_EXPR sometimes returns 0 when its argument is
+ signed, this macro may overestimate the true bound by one byte when
+ applied to unsigned types of size 2, 4, 16, ... bytes. */
+#define INT_STRLEN_BOUND(t) \
+ (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT \
+ - _GL_SIGNED_TYPE_OR_EXPR (t)) \
+ + _GL_SIGNED_TYPE_OR_EXPR (t))
/* Bound on buffer size needed to represent an integer type or expression T,
including the terminating null. */
-# define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1)
+#define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1)
+
+
+/* Range overflow checks.
+
+ The INT_<op>_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_<op>_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
+ <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00401.html>. */
+#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_<op>_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 <op> B would overflow,
+ where OP_RESULT_OVERFLOW (A, B, MIN, MAX) does the actual test,
+ assuming MIN and MAX are the minimum and maximum for the result type.
+ Arguments should be free of side effects. */
+#define _GL_BINARY_OP_OVERFLOW(a, b, op_result_overflow) \
+ op_result_overflow (a, b, \
+ _GL_INT_MINIMUM (0 * (b) + (a)), \
+ _GL_INT_MAXIMUM (0 * (b) + (a)))
-#endif /* GL_INTPROPS_H */
+#endif /* _GL_INTPROPS_H */
diff --git a/lib/isnan.c b/lib/isnan.c
index d9c653d..d95e4ba 100644
--- a/lib/isnan.c
+++ b/lib/isnan.c
@@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
/* Specification. */
#ifdef USE_LONG_DOUBLE
/* Specification found in math.h or isnanl-nolibm.h. */
-extern int rpl_isnanl (long double x);
+extern int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST;
#elif ! defined USE_FLOAT
/* Specification found in math.h or isnand-nolibm.h. */
extern int rpl_isnand (double x);
@@ -83,7 +83,7 @@ int
FUNC (DOUBLE x)
{
#ifdef KNOWN_EXPBIT0_LOCATION
-# if defined USE_LONG_DOUBLE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+# if defined USE_LONG_DOUBLE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
/* Special CPU dependent code is needed to treat bit patterns outside the
IEEE 754 specification (such as Pseudo-NaNs, Pseudo-Infinities,
Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals) as NaNs.
@@ -117,17 +117,20 @@ FUNC (DOUBLE x)
# else
/* Be careful to not do any floating-point operation on x, such as x == x,
because x may be a signaling NaN. */
-# if defined __TINYC__ || defined __SUNPRO_C || defined __DECC \
- || (defined __sgi && !defined __GNUC__) || defined __ICC
- /* The Sun C 5.0, Intel ICC 10.0, and Compaq (ex-DEC) 6.4 compilers don't
- recognize the initializers as constant expressions. The latter compiler
- also fails when constant-folding 0.0 / 0.0 even when constant-folding is
- not required. The SGI MIPSpro C compiler complains about "floating-point
- operation result is out of range". */
+# if defined __SUNPRO_C || defined __ICC || defined _MSC_VER \
+ || defined __DECC || defined __TINYC__ \
+ || (defined __sgi && !defined __GNUC__)
+ /* The Sun C 5.0, Intel ICC 10.0, Microsoft Visual C/C++ 9.0, Compaq (ex-DEC)
+ 6.4, and TinyCC compilers don't recognize the initializers as constant
+ expressions. The Compaq compiler also fails when constant-folding
+ 0.0 / 0.0 even when constant-folding is not required. The Microsoft
+ Visual C/C++ compiler also fails when constant-folding 1.0 / 0.0 even
+ when constant-folding is not required. The SGI MIPSpro C compiler
+ complains about "floating-point operation result is out of range". */
static DOUBLE zero = L_(0.0);
memory_double nan;
- DOUBLE plus_inf = L_(1.0) / L_(0.0);
- DOUBLE minus_inf = -L_(1.0) / L_(0.0);
+ DOUBLE plus_inf = L_(1.0) / zero;
+ DOUBLE minus_inf = -L_(1.0) / zero;
nan.value = zero / zero;
# else
static memory_double nan = { L_(0.0) / L_(0.0) };
@@ -154,7 +157,7 @@ FUNC (DOUBLE x)
the signaling NaNs, handle only the quiet NaNs. */
if (x == x)
{
-# if defined USE_LONG_DOUBLE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+# if defined USE_LONG_DOUBLE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
/* Detect any special bit patterns that pass ==; see comment above. */
memory_double m1;
memory_double m2;
diff --git a/lib/isnand-nolibm.h b/lib/isnand-nolibm.h
index 4c49c32..8a84ff8 100644
--- a/lib/isnand-nolibm.h
+++ b/lib/isnand-nolibm.h
@@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/isnand.c b/lib/isnand.c
index c47ff25..cbad17b 100644
--- a/lib/isnand.c
+++ b/lib/isnand.c
@@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/isnanf-nolibm.h b/lib/isnanf-nolibm.h
index 1a1cbf9..dc43863 100644
--- a/lib/isnanf-nolibm.h
+++ b/lib/isnanf-nolibm.h
@@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -24,6 +24,13 @@
# elif defined isnan
# undef isnanf
# define isnanf(x) isnan ((float)(x))
+# else
+ /* Get declaration of isnanf(), if not declared in <math.h>. */
+# if defined __sgi
+ /* We can't include <ieeefp.h>, because it conflicts with our definition of
+ isnand. Therefore declare isnanf separately. */
+extern int isnanf (float x);
+# endif
# endif
#else
/* Test whether X is a NaN. */
diff --git a/lib/isnanf.c b/lib/isnanf.c
index adb7059..946cb69 100644
--- a/lib/isnanf.c
+++ b/lib/isnanf.c
@@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
- Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/isnanl-nolibm.h b/lib/isnanl-nolibm.h
index bf14228..18eb803 100644
--- a/lib/isnanl-nolibm.h
+++ b/lib/isnanl-nolibm.h
@@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/isnanl.c b/lib/isnanl.c
index 1482fb2..9d9d84b 100644
--- a/lib/isnanl.c
+++ b/lib/isnanl.c
@@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
- Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/itold.c b/lib/itold.c
new file mode 100644
index 0000000..9aabc7e
--- /dev/null
+++ b/lib/itold.c
@@ -0,0 +1,28 @@
+/* Replacement for 'int' to 'long double' conversion routine.
+ Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2011.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <float.h>
+
+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/lib/langinfo.in.h b/lib/langinfo.in.h
index 02e1f26..5388ce6 100644
--- a/lib/langinfo.in.h
+++ b/lib/langinfo.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <langinfo.h>.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,15 +12,14 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
/*
* POSIX <langinfo.h> for platforms that lack it or have an incomplete one.
* <http://www.opengroup.org/onlinepubs/9699919799/basedefs/langinfo.h.html>
*/
-#ifndef _GL_LANGINFO_H
+#ifndef _@GUARD_PREFIX@_LANGINFO_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
@@ -32,8 +31,8 @@
# @INCLUDE_NEXT@ @NEXT_LANGINFO_H@
#endif
-#ifndef _GL_LANGINFO_H
-#define _GL_LANGINFO_H
+#ifndef _@GUARD_PREFIX@_LANGINFO_H
+#define _@GUARD_PREFIX@_LANGINFO_H
#if !@HAVE_LANGINFO_H@
@@ -173,5 +172,5 @@ _GL_WARN_ON_USE (nl_langinfo, "nl_langinfo is not portable - "
#endif
-#endif /* _GL_LANGINFO_H */
-#endif /* _GL_LANGINFO_H */
+#endif /* _@GUARD_PREFIX@_LANGINFO_H */
+#endif /* _@GUARD_PREFIX@_LANGINFO_H */
diff --git a/lib/localcharset.c b/lib/localcharset.c
index 96739c7..a225a2e 100644
--- a/lib/localcharset.c
+++ b/lib/localcharset.c
@@ -1,6 +1,6 @@
/* Determine a canonical name for the current locale's character encoding.
- Copyright (C) 2000-2006, 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2000-2006, 2008-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ with this program; if not, see <http://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>. */
@@ -30,11 +29,11 @@
#include <stdlib.h>
#if defined __APPLE__ && defined __MACH__ && HAVE_LANGINFO_CODESET
-# define DARWIN7 /* Darwin 7 or newer, i.e. MacOS X 10.3 or newer */
+# define DARWIN7 /* Darwin 7 or newer, i.e. Mac OS X 10.3 or newer */
#endif
#if defined _WIN32 || defined __WIN32__
-# define WIN32_NATIVE
+# define WINDOWS_NATIVE
#endif
#if defined __EMX__
@@ -44,7 +43,7 @@
# endif
#endif
-#if !defined WIN32_NATIVE
+#if !defined WINDOWS_NATIVE
# include <unistd.h>
# if HAVE_LANGINFO_CODESET
# include <langinfo.h>
@@ -57,7 +56,7 @@
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# endif
-#elif defined WIN32_NATIVE
+#elif defined WINDOWS_NATIVE
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#endif
@@ -66,6 +65,11 @@
# include <os2.h>
#endif
+/* For MB_CUR_MAX_L */
+#if defined DARWIN7
+# include <xlocale.h>
+#endif
+
#if ENABLE_RELOCATABLE
# include "relocatable.h"
#else
@@ -83,7 +87,7 @@
#endif
#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
- /* Win32, Cygwin, OS/2, DOS */
+ /* Native Windows, Cygwin, OS/2, DOS */
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
#endif
@@ -123,7 +127,7 @@ get_charset_aliases (void)
cp = charset_aliases;
if (cp == NULL)
{
-#if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE || defined __CYGWIN__)
+#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__)
const char *dir;
const char *base = "charset.alias";
char *file_name;
@@ -308,7 +312,7 @@ get_charset_aliases (void)
"DECKOREAN" "\0" "EUC-KR" "\0";
# endif
-# if defined WIN32_NATIVE || defined __CYGWIN__
+# if defined WINDOWS_NATIVE || defined __CYGWIN__
/* To avoid the troubles of installing a separate file in the same
directory as the DLL and of retrieving the DLL's directory at
runtime, simply inline the aliases here. */
@@ -360,7 +364,7 @@ locale_charset (void)
const char *codeset;
const char *aliases;
-#if !(defined WIN32_NATIVE || defined OS2)
+#if !(defined WINDOWS_NATIVE || defined OS2)
# if HAVE_LANGINFO_CODESET
@@ -407,10 +411,10 @@ locale_charset (void)
}
}
- /* Woe32 has a function returning the locale's codepage as a number:
- GetACP(). This encoding is used by Cygwin, unless the user has set
- the environment variable CYGWIN=codepage:oem (which very few people
- do).
+ /* The Windows API has a function returning the locale's codepage as a
+ number: GetACP(). This encoding is used by Cygwin, unless the user
+ has set the environment variable CYGWIN=codepage:oem (which very few
+ people do).
Output directed to console windows needs to be converted (to
GetOEMCP() if the console is using a raster font, or to
GetConsoleOutputCP() if it is using a TrueType font). Cygwin does
@@ -453,12 +457,12 @@ locale_charset (void)
# endif
-#elif defined WIN32_NATIVE
+#elif defined WINDOWS_NATIVE
static char buf[2 + 10 + 1];
- /* Woe32 has a function returning the locale's codepage as a number:
- GetACP().
+ /* The Windows API has a function returning the locale's codepage as a
+ number: GetACP().
When the output goes to a console window, it needs to be provided in
GetOEMCP() encoding if the console is using a raster font, or in
GetConsoleOutputCP() encoding if it is using a TrueType font.
@@ -543,5 +547,12 @@ locale_charset (void)
if (codeset[0] == '\0')
codeset = "ASCII";
+#ifdef DARWIN7
+ /* Mac OS X sets MB_CUR_MAX to 1 when LC_ALL=C, and "UTF-8"
+ (the default codeset) does not work when MB_CUR_MAX is 1. */
+ if (strcmp (codeset, "UTF-8") == 0 && MB_CUR_MAX_L (uselocale (NULL)) <= 1)
+ codeset = "ASCII";
+#endif
+
return codeset;
}
diff --git a/lib/localcharset.h b/lib/localcharset.h
index edbb13b..c209829 100644
--- a/lib/localcharset.h
+++ b/lib/localcharset.h
@@ -1,5 +1,5 @@
/* Determine a canonical name for the current locale's character encoding.
- Copyright (C) 2000-2003, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2000-2003, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU CHARSET Library.
This program is free software; you can redistribute it and/or modify
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ with this program; if not, see <http://www.gnu.org/licenses/>. */
#ifndef _LOCALCHARSET_H
#define _LOCALCHARSET_H
diff --git a/lib/locale.in.h b/lib/locale.in.h
new file mode 100644
index 0000000..264161a
--- /dev/null
+++ b/lib/locale.in.h
@@ -0,0 +1,216 @@
+/* A POSIX <locale.h>.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+#ifdef _GL_ALREADY_INCLUDING_LOCALE_H
+
+/* Special invocation conventions to handle Solaris header files
+ (through Solaris 10) when combined with gettext's libintl.h. */
+
+#@INCLUDE_NEXT@ @NEXT_LOCALE_H@
+
+#else
+/* Normal invocation convention. */
+
+#ifndef _@GUARD_PREFIX@_LOCALE_H
+
+#define _GL_ALREADY_INCLUDING_LOCALE_H
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_LOCALE_H@
+
+#undef _GL_ALREADY_INCLUDING_LOCALE_H
+
+#ifndef _@GUARD_PREFIX@_LOCALE_H
+#define _@GUARD_PREFIX@_LOCALE_H
+
+/* NetBSD 5.0 mis-defines NULL. */
+#include <stddef.h>
+
+/* Mac OS X 10.5 defines the locale_t type in <xlocale.h>. */
+#if @HAVE_XLOCALE_H@
+# include <xlocale.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. */
+
+/* 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
+ <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_04> */
+
+ /* 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
+ <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_03> */
+
+ /* Symbol used as decimal point. */
+ char *mon_decimal_point;
+ /* Symbol used to separate groups of digits to the left of the decimal
+ point. */
+ char *mon_thousands_sep;
+ /* Definition of the size of groups of digits to the left of the decimal
+ point. */
+ char *mon_grouping;
+ /* Sign used to indicate a value >= 0. */
+ char *positive_sign;
+ /* Sign used to indicate a value < 0. */
+ char *negative_sign;
+
+ /* For formatting local currency. */
+ /* Currency symbol (3 characters) followed by separator (1 character). */
+ char *currency_symbol;
+ /* Number of digits after the decimal point. */
+ char frac_digits;
+ /* For values >= 0: 1 if the currency symbol precedes the number, 0 if it
+ comes after the number. */
+ char p_cs_precedes;
+ /* For values >= 0: Position of the sign. */
+ char p_sign_posn;
+ /* For values >= 0: Placement of spaces between currency symbol, sign, and
+ number. */
+ char p_sep_by_space;
+ /* For values < 0: 1 if the currency symbol precedes the number, 0 if it
+ comes after the number. */
+ char n_cs_precedes;
+ /* For values < 0: Position of the sign. */
+ char n_sign_posn;
+ /* For values < 0: Placement of spaces between currency symbol, sign, and
+ number. */
+ char n_sep_by_space;
+
+ /* For formatting international currency. */
+ /* Currency symbol (3 characters) followed by separator (1 character). */
+ char *int_curr_symbol;
+ /* Number of digits after the decimal point. */
+ char int_frac_digits;
+ /* For values >= 0: 1 if the currency symbol precedes the number, 0 if it
+ comes after the number. */
+ char int_p_cs_precedes;
+ /* For values >= 0: Position of the sign. */
+ char int_p_sign_posn;
+ /* For values >= 0: Placement of spaces between currency symbol, sign, and
+ number. */
+ char int_p_sep_by_space;
+ /* For values < 0: 1 if the currency symbol precedes the number, 0 if it
+ comes after the number. */
+ char int_n_cs_precedes;
+ /* For values < 0: Position of the sign. */
+ char int_n_sign_posn;
+ /* For values < 0: Placement of spaces between currency symbol, sign, and
+ number. */
+ char int_n_sep_by_space;
+};
+#endif
+
+#if @GNULIB_LOCALECONV@
+# if @REPLACE_LOCALECONV@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef localeconv
+# define localeconv rpl_localeconv
+# endif
+_GL_FUNCDECL_RPL (localeconv, struct lconv *, (void));
+_GL_CXXALIAS_RPL (localeconv, struct lconv *, (void));
+# else
+_GL_CXXALIAS_SYS (localeconv, struct lconv *, (void));
+# endif
+_GL_CXXALIASWARN (localeconv);
+#elif @REPLACE_STRUCT_LCONV@
+# undef localeconv
+# define localeconv localeconv_used_without_requesting_gnulib_module_localeconv
+#elif defined GNULIB_POSIXCHECK
+# undef localeconv
+# if HAVE_RAW_DECL_LOCALECONV
+_GL_WARN_ON_USE (localeconv,
+ "localeconv returns too few information on some platforms - "
+ "use gnulib module localeconv for portability");
+# endif
+#endif
+
+#if @GNULIB_SETLOCALE@
+# if @REPLACE_SETLOCALE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef setlocale
+# define setlocale rpl_setlocale
+# define GNULIB_defined_setlocale 1
+# endif
+_GL_FUNCDECL_RPL (setlocale, char *, (int category, const char *locale));
+_GL_CXXALIAS_RPL (setlocale, char *, (int category, const char *locale));
+# else
+_GL_CXXALIAS_SYS (setlocale, char *, (int category, const char *locale));
+# endif
+_GL_CXXALIASWARN (setlocale);
+#elif defined GNULIB_POSIXCHECK
+# undef setlocale
+# if HAVE_RAW_DECL_SETLOCALE
+_GL_WARN_ON_USE (setlocale, "setlocale works differently on native Windows - "
+ "use gnulib module setlocale for portability");
+# endif
+#endif
+
+#if @GNULIB_DUPLOCALE@
+# if @REPLACE_DUPLOCALE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef duplocale
+# define duplocale rpl_duplocale
+# endif
+_GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale));
+# else
+# if @HAVE_DUPLOCALE@
+_GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale));
+# endif
+# endif
+# if @HAVE_DUPLOCALE@
+_GL_CXXALIASWARN (duplocale);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef duplocale
+# if HAVE_RAW_DECL_DUPLOCALE
+_GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - "
+ "use gnulib module duplocale for portability");
+# endif
+#endif
+
+#endif /* _@GUARD_PREFIX@_LOCALE_H */
+#endif /* ! _GL_ALREADY_INCLUDING_LOCALE_H */
+#endif /* _@GUARD_PREFIX@_LOCALE_H */
diff --git a/lib/localeconv.c b/lib/localeconv.c
new file mode 100644
index 0000000..7c7c77c
--- /dev/null
+++ b/lib/localeconv.c
@@ -0,0 +1,103 @@
+/* Query locale dependent information for formatting numbers.
+ Copyright (C) 2012-2013 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <locale.h>
+
+#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 <limits.h>
+
+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/lib/lseek.c b/lib/lseek.c
index 8339044..fa7440d 100644
--- a/lib/lseek.c
+++ b/lib/lseek.c
@@ -1,5 +1,5 @@
/* An lseek() function that detects pipes.
- Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
@@ -24,6 +23,8 @@
/* Windows platforms. */
/* Get GetFileType. */
# include <windows.h>
+/* Get _get_osfhandle. */
+# include "msvc-nothrow.h"
#else
# include <sys/stat.h>
#endif
@@ -58,5 +59,9 @@ rpl_lseek (int fd, off_t offset, int whence)
return -1;
}
#endif
+#if _GL_WINDOWS_64_BIT_OFF_T
+ return _lseeki64 (fd, offset, whence);
+#else
return lseek (fd, offset, whence);
+#endif
}
diff --git a/lib/lstat.c b/lib/lstat.c
index b26065e..1a613a8 100644
--- a/lib/lstat.c
+++ b/lib/lstat.c
@@ -1,6 +1,6 @@
/* Work around a bug of lstat on some systems
- Copyright (C) 1997-2006, 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 1997-2006, 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,6 +17,10 @@
/* written by Jim Meyering */
+/* If the user's config.h happens to include <sys/stat.h>, let it include only
+ the system's <sys/stat.h> here, so that orig_lstat doesn't recurse to
+ rpl_lstat. */
+#define __need_system_sys_stat_h
#include <config.h>
#if !HAVE_LSTAT
@@ -27,29 +31,31 @@ typedef int dummy;
#else /* HAVE_LSTAT */
/* Get the original definition of lstat. It might be defined as a macro. */
-# define __need_system_sys_stat_h
# include <sys/types.h>
# include <sys/stat.h>
# undef __need_system_sys_stat_h
-static inline int
+static int
orig_lstat (const char *filename, struct stat *buf)
{
return lstat (filename, buf);
}
/* Specification. */
-# include <sys/stat.h>
+/* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc
+ eliminates this include because of the preliminary #include <sys/stat.h>
+ above. */
+# include "sys/stat.h"
# include <string.h>
# include <errno.h>
/* lstat works differently on Linux and Solaris systems. POSIX (see
- `pathname resolution' in the glossary) requires that programs like
- `ls' take into consideration the fact that FILE has a trailing slash
+ "pathname resolution" in the glossary) requires that programs like
+ 'ls' take into consideration the fact that FILE has a trailing slash
when FILE is a symbolic link. On Linux and Solaris 10 systems, the
lstat function already has the desired semantics (in treating
- `lstat ("symlink/", sbuf)' just like `lstat ("symlink/.", sbuf)',
+ 'lstat ("symlink/", sbuf)' just like 'lstat ("symlink/.", sbuf)',
but on Solaris 9 and earlier it does not.
If FILE has a trailing slash and specifies a symbolic link,
diff --git a/lib/malloc.c b/lib/malloc.c
index a325d61..908735d 100644
--- a/lib/malloc.c
+++ b/lib/malloc.c
@@ -1,6 +1,6 @@
/* malloc() function that is glibc compatible.
- Copyright (C) 1997-1998, 2006-2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 1997-1998, 2006-2007, 2009-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -13,11 +13,11 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
/* written by Jim Meyering and Bruno Haible */
+#define _GL_USE_STDLIB_ALLOC 1
#include <config.h>
/* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */
#ifdef malloc
@@ -28,14 +28,10 @@
# define NEED_MALLOC_GNU 1
#endif
-/* Specification. */
#include <stdlib.h>
#include <errno.h>
-/* Call the system's malloc below. */
-#undef malloc
-
/* Allocate an N-byte block of memory from the heap.
If N is zero, allocate a 1-byte block. */
diff --git a/lib/malloca.c b/lib/malloca.c
index 47a8d7a..311be56 100644
--- a/lib/malloca.c
+++ b/lib/malloca.c
@@ -1,5 +1,5 @@
/* Safe automatic memory allocation.
- Copyright (C) 2003, 2006-2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006-2007, 2009-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify
@@ -13,18 +13,17 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
+#define _GL_USE_STDLIB_ALLOC 1
#include <config.h>
/* Specification. */
#include "malloca.h"
-#include "verify.h"
+#include <stdint.h>
-/* Use the system functions, not the gnulib overrides in this file. */
-#undef malloc
+#include "verify.h"
/* The speed critical point in this file is freea() applied to an alloca()
result: it must be fast, to match the speed of alloca(). The speed of
@@ -50,12 +49,18 @@
#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]; };
+struct preliminary_header { void *next; int magic; };
/* But the header's size must be a multiple of sa_alignment_max. */
#define HEADER_SIZE \
(((sizeof (struct preliminary_header) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max)
-struct header { void *next; char room[HEADER_SIZE - sizeof (struct preliminary_header) + MAGIC_SIZE]; };
-verify (HEADER_SIZE == sizeof (struct header));
+union header {
+ void *next;
+ struct {
+ char room[HEADER_SIZE - MAGIC_SIZE];
+ int word;
+ } magic;
+};
+verify (HEADER_SIZE == sizeof (union header));
/* We make the hash table quite big, so that during lookups the probability
of empty hash buckets is quite high. There is no need to make the hash
table resizable, because when the hash table gets filled so much that the
@@ -75,20 +80,21 @@ mmalloca (size_t n)
if (nplus >= n)
{
- char *p = (char *) malloc (nplus);
+ void *p = malloc (nplus);
if (p != NULL)
{
size_t slot;
+ union header *h = p;
- p += HEADER_SIZE;
+ p = h + 1;
/* Put a magic number into the indicator word. */
- ((int *) p)[-1] = MAGIC_NUMBER;
+ h->magic.word = MAGIC_NUMBER;
/* Enter p into the hash table. */
- slot = (unsigned long) p % HASH_TABLE_SIZE;
- ((struct header *) (p - HEADER_SIZE))->next = mmalloca_results[slot];
+ slot = (uintptr_t) p % HASH_TABLE_SIZE;
+ h->next = mmalloca_results[slot];
mmalloca_results[slot] = p;
return p;
@@ -120,19 +126,21 @@ freea (void *p)
{
/* Looks like a mmalloca() result. To see whether it really is one,
perform a lookup in the hash table. */
- size_t slot = (unsigned long) p % HASH_TABLE_SIZE;
+ size_t slot = (uintptr_t) p % HASH_TABLE_SIZE;
void **chain = &mmalloca_results[slot];
for (; *chain != NULL;)
{
+ union header *h = p;
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;
+ union header *p_begin = h - 1;
+ *chain = p_begin->next;
free (p_begin);
return;
}
- chain = &((struct header *) ((char *) *chain - HEADER_SIZE))->next;
+ h = *chain;
+ chain = &h[-1].next;
}
}
/* At this point, we know it was not a mmalloca() result. */
diff --git a/lib/malloca.h b/lib/malloca.h
index 7083a58..6fbe45e 100644
--- a/lib/malloca.h
+++ b/lib/malloca.h
@@ -1,5 +1,5 @@
/* Safe automatic memory allocation.
- Copyright (C) 2003-2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2003-2007, 2009-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#ifndef _MALLOCA_H
#define _MALLOCA_H
@@ -43,7 +42,7 @@ extern "C" {
and a page size can be as small as 4096 bytes. So we cannot safely
allocate anything larger than 4096 bytes. Also care for the possibility
of a few compiler-allocated temporary stack slots.
- This must be a macro, not an inline function. */
+ This must be a macro, not a function. */
# define safe_alloca(N) ((N) < 4032 ? alloca (N) : NULL)
#else
# define safe_alloca(N) ((void) (N), NULL)
@@ -93,7 +92,7 @@ extern void * nmalloca (size_t n, size_t s);
/* ------------------- Auxiliary, non-public definitions ------------------- */
/* Determine the alignment of a type at compile time. */
-#if defined __GNUC__
+#if defined __GNUC__ || defined __IBM__ALIGNOF__
# define sa_alignof __alignof__
#elif defined __cplusplus
template <class type> struct sa_alignof_helper { char __slot1; type __slot2; };
diff --git a/lib/math.c b/lib/math.c
new file mode 100644
index 0000000..ddb2ded
--- /dev/null
+++ b/lib/math.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define _GL_MATH_INLINE _GL_EXTERN_INLINE
+#include "math.h"
diff --git a/lib/math.in.h b/lib/math.in.h
index 9ac38ba..6cc0f7d 100644
--- a/lib/math.in.h
+++ b/lib/math.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <math.h>.
- Copyright (C) 2002-2003, 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef _GL_MATH_H
+#ifndef _@GUARD_PREFIX@_MATH_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
@@ -25,9 +25,16 @@
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
-#ifndef _GL_MATH_H
-#define _GL_MATH_H
+#ifndef _@GUARD_PREFIX@_MATH_H
+#define _@GUARD_PREFIX@_MATH_H
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_MATH_INLINE
+# define _GL_MATH_INLINE _GL_INLINE
+#endif
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
@@ -35,22 +42,60 @@
/* The definition of _GL_WARN_ON_USE is copied here. */
+#ifdef __cplusplus
+/* Helper macros to define type-generic function FUNC as overloaded functions,
+ rather than as macros like in C. POSIX declares these with an argument of
+ real-floating (that is, one of float, double, or long double). */
+# define _GL_MATH_CXX_REAL_FLOATING_DECL_1(func) \
+static inline int \
+_gl_cxx_ ## func ## f (float f) \
+{ \
+ return func (f); \
+} \
+static inline int \
+_gl_cxx_ ## func ## d (double d) \
+{ \
+ return func (d); \
+} \
+static inline int \
+_gl_cxx_ ## func ## l (long double l) \
+{ \
+ return func (l); \
+}
+# define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func) \
+inline int \
+func (float f) \
+{ \
+ return _gl_cxx_ ## func ## f (f); \
+} \
+inline int \
+func (double d) \
+{ \
+ return _gl_cxx_ ## func ## d (d); \
+} \
+inline int \
+func (long double l) \
+{ \
+ return _gl_cxx_ ## func ## l (l); \
+}
+#endif
+
/* Helper macros to define a portability warning for the
classification macro FUNC called with VALUE. POSIX declares the
classification macros with an argument of real-floating (that is,
one of float, double, or long double). */
#define _GL_WARN_REAL_FLOATING_DECL(func) \
-static inline int \
+_GL_MATH_INLINE int \
rpl_ ## func ## f (float f) \
{ \
return func (f); \
} \
-static inline int \
+_GL_MATH_INLINE int \
rpl_ ## func ## d (double d) \
{ \
return func (d); \
} \
-static inline int \
+_GL_MATH_INLINE int \
rpl_ ## func ## l (long double l) \
{ \
return func (l); \
@@ -67,6 +112,14 @@ _GL_WARN_ON_USE (rpl_ ## func ## l, #func " is unportable - " \
: rpl_ ## func ## l (value))
+#if @REPLACE_ITOLD@
+/* Pull in a function that fixes the 'int' to 'long double' conversion
+ of glibc 2.7. */
+_GL_EXTERN_C void _Qp_itoq (long double *, int);
+static void (*_gl_math_fix_itold) (long double *, int) = _Qp_itoq;
+#endif
+
+
/* POSIX allows platforms that don't support NAN. But all major
machines in the past 15 years have supported something close to
IEEE NaN, so we define this unconditionally. We also must define
@@ -75,9 +128,10 @@ _GL_WARN_ON_USE (rpl_ ## func ## l, #func " is unportable - " \
#if !defined NAN || @REPLACE_NAN@
# if !GNULIB_defined_NAN
# undef NAN
- /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */
-# ifdef __DECC
-static float
+ /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler
+ choke on the expression 0.0 / 0.0. */
+# if defined __DECC || defined _MSC_VER
+_GL_MATH_INLINE float
_NaN ()
{
static float zero = 0.0f;
@@ -94,52 +148,85 @@ _NaN ()
/* Solaris 10 defines HUGE_VAL, but as a function pointer rather
than a floating point constant. */
#if @REPLACE_HUGE_VAL@
+# undef HUGE_VALF
+# define HUGE_VALF (1.0f / 0.0f)
# undef HUGE_VAL
# define HUGE_VAL (1.0 / 0.0)
+# undef HUGE_VALL
+# define HUGE_VALL (1.0L / 0.0L)
#endif
+/* HUGE_VALF is a 'float' Infinity. */
+#ifndef HUGE_VALF
+# if defined _MSC_VER
+/* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */
+# define HUGE_VALF (1e25f * 1e25f)
+# else
+# define HUGE_VALF (1.0f / 0.0f)
+# endif
+#endif
-/* Write x as
- x = mantissa * 2^exp
- where
- If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
- If x is zero: mantissa = x, exp = 0.
- If x is infinite or NaN: mantissa = x, exp unspecified.
- Store exp in *EXPPTR and return mantissa. */
-#if @GNULIB_FREXP@
-# if @REPLACE_FREXP@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# define frexp rpl_frexp
-# endif
-_GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2)));
-_GL_CXXALIAS_RPL (frexp, double, (double x, int *expptr));
+/* HUGE_VAL is a 'double' Infinity. */
+#ifndef HUGE_VAL
+# if defined _MSC_VER
+/* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */
+# define HUGE_VAL (1e250 * 1e250)
# else
-_GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr));
+# define HUGE_VAL (1.0 / 0.0)
# endif
-_GL_CXXALIASWARN (frexp);
-#elif defined GNULIB_POSIXCHECK
-# undef frexp
-/* Assume frexp is always declared. */
-_GL_WARN_ON_USE (frexp, "frexp is unportable - "
- "use gnulib module frexp for portability");
#endif
+/* HUGE_VALL is a 'long double' Infinity. */
+#ifndef HUGE_VALL
+# if defined _MSC_VER
+/* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */
+# define HUGE_VALL (1e250L * 1e250L)
+# else
+# define HUGE_VALL (1.0L / 0.0L)
+# endif
+#endif
-#if @GNULIB_LOGB@
-# if !@HAVE_DECL_LOGB@
-_GL_EXTERN_C double logb (double x);
+
+/* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */
+#if !(defined FP_ILOGB0 && defined FP_ILOGBNAN)
+# if defined __NetBSD__ || defined __sgi
+ /* NetBSD, IRIX 6.5: match what ilogb() does */
+# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
+# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
+# elif defined _AIX
+ /* AIX 5.1: match what ilogb() does in AIX >= 5.2 */
+# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
+# define FP_ILOGBNAN 2147483647 /* INT_MAX */
+# elif defined __sun
+ /* Solaris 9: match what ilogb() does */
+# define FP_ILOGB0 (- 2147483647) /* - INT_MAX */
+# define FP_ILOGBNAN 2147483647 /* INT_MAX */
+# else
+ /* Gnulib defined values. */
+# define FP_ILOGB0 (- 2147483647) /* - INT_MAX */
+# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
# endif
+#endif
+
+
+#if @GNULIB_ACOSF@
+# if !@HAVE_ACOSF@
+# undef acosf
+_GL_FUNCDECL_SYS (acosf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (acosf, float, (float x));
+_GL_CXXALIASWARN (acosf);
#elif defined GNULIB_POSIXCHECK
-# undef logb
-# if HAVE_RAW_DECL_LOGB
-_GL_WARN_ON_USE (logb, "logb is unportable - "
- "use gnulib module logb for portability");
+# undef acosf
+# if HAVE_RAW_DECL_ACOSF
+_GL_WARN_ON_USE (acosf, "acosf is unportable - "
+ "use gnulib module acosf for portability");
# endif
#endif
-
#if @GNULIB_ACOSL@
# if !@HAVE_ACOSL@ || !@HAVE_DECL_ACOSL@
+# undef acosl
_GL_FUNCDECL_SYS (acosl, long double, (long double x));
# endif
_GL_CXXALIAS_SYS (acosl, long double, (long double x));
@@ -148,13 +235,29 @@ _GL_CXXALIASWARN (acosl);
# undef acosl
# if HAVE_RAW_DECL_ACOSL
_GL_WARN_ON_USE (acosl, "acosl is unportable - "
- "use gnulib module mathl for portability");
+ "use gnulib module acosl for portability");
# endif
#endif
+#if @GNULIB_ASINF@
+# if !@HAVE_ASINF@
+# undef asinf
+_GL_FUNCDECL_SYS (asinf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (asinf, float, (float x));
+_GL_CXXALIASWARN (asinf);
+#elif defined GNULIB_POSIXCHECK
+# undef asinf
+# if HAVE_RAW_DECL_ASINF
+_GL_WARN_ON_USE (asinf, "asinf is unportable - "
+ "use gnulib module asinf for portability");
+# endif
+#endif
+
#if @GNULIB_ASINL@
# if !@HAVE_ASINL@ || !@HAVE_DECL_ASINL@
+# undef asinl
_GL_FUNCDECL_SYS (asinl, long double, (long double x));
# endif
_GL_CXXALIAS_SYS (asinl, long double, (long double x));
@@ -163,13 +266,29 @@ _GL_CXXALIASWARN (asinl);
# undef asinl
# if HAVE_RAW_DECL_ASINL
_GL_WARN_ON_USE (asinl, "asinl is unportable - "
- "use gnulib module mathl for portability");
+ "use gnulib module asinl for portability");
# endif
#endif
+#if @GNULIB_ATANF@
+# if !@HAVE_ATANF@
+# undef atanf
+_GL_FUNCDECL_SYS (atanf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (atanf, float, (float x));
+_GL_CXXALIASWARN (atanf);
+#elif defined GNULIB_POSIXCHECK
+# undef atanf
+# if HAVE_RAW_DECL_ATANF
+_GL_WARN_ON_USE (atanf, "atanf is unportable - "
+ "use gnulib module atanf for portability");
+# endif
+#endif
+
#if @GNULIB_ATANL@
# if !@HAVE_ATANL@ || !@HAVE_DECL_ATANL@
+# undef atanl
_GL_FUNCDECL_SYS (atanl, long double, (long double x));
# endif
_GL_CXXALIAS_SYS (atanl, long double, (long double x));
@@ -178,7 +297,84 @@ _GL_CXXALIASWARN (atanl);
# undef atanl
# if HAVE_RAW_DECL_ATANL
_GL_WARN_ON_USE (atanl, "atanl is unportable - "
- "use gnulib module mathl for portability");
+ "use gnulib module atanl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_ATAN2F@
+# if !@HAVE_ATAN2F@
+# undef atan2f
+_GL_FUNCDECL_SYS (atan2f, float, (float y, float x));
+# endif
+_GL_CXXALIAS_SYS (atan2f, float, (float y, float x));
+_GL_CXXALIASWARN (atan2f);
+#elif defined GNULIB_POSIXCHECK
+# undef atan2f
+# if HAVE_RAW_DECL_ATAN2F
+_GL_WARN_ON_USE (atan2f, "atan2f is unportable - "
+ "use gnulib module atan2f for portability");
+# endif
+#endif
+
+
+#if @GNULIB_CBRTF@
+# if @REPLACE_CBRTF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef cbrtf
+# define cbrtf rpl_cbrtf
+# endif
+_GL_FUNCDECL_RPL (cbrtf, float, (float x));
+_GL_CXXALIAS_RPL (cbrtf, float, (float x));
+# else
+# if !@HAVE_DECL_CBRTF@
+_GL_FUNCDECL_SYS (cbrtf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (cbrtf, float, (float x));
+# endif
+_GL_CXXALIASWARN (cbrtf);
+#elif defined GNULIB_POSIXCHECK
+# undef cbrtf
+# if HAVE_RAW_DECL_CBRTF
+_GL_WARN_ON_USE (cbrtf, "cbrtf is unportable - "
+ "use gnulib module cbrtf for portability");
+# endif
+#endif
+
+#if @GNULIB_CBRT@
+# if !@HAVE_CBRT@
+_GL_FUNCDECL_SYS (cbrt, double, (double x));
+# endif
+_GL_CXXALIAS_SYS (cbrt, double, (double x));
+_GL_CXXALIASWARN (cbrt);
+#elif defined GNULIB_POSIXCHECK
+# undef cbrt
+# if HAVE_RAW_DECL_CBRT
+_GL_WARN_ON_USE (cbrt, "cbrt is unportable - "
+ "use gnulib module cbrt for portability");
+# endif
+#endif
+
+#if @GNULIB_CBRTL@
+# if @REPLACE_CBRTL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef cbrtl
+# define cbrtl rpl_cbrtl
+# endif
+_GL_FUNCDECL_RPL (cbrtl, long double, (long double x));
+_GL_CXXALIAS_RPL (cbrtl, long double, (long double x));
+# else
+# if !@HAVE_DECL_CBRTL@
+_GL_FUNCDECL_SYS (cbrtl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (cbrtl, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (cbrtl);
+#elif defined GNULIB_POSIXCHECK
+# undef cbrtl
+# if HAVE_RAW_DECL_CBRTL
+_GL_WARN_ON_USE (cbrtl, "cbrtl is unportable - "
+ "use gnulib module cbrtl for portability");
# endif
#endif
@@ -186,12 +382,14 @@ _GL_WARN_ON_USE (atanl, "atanl is unportable - "
#if @GNULIB_CEILF@
# if @REPLACE_CEILF@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef ceilf
# define ceilf rpl_ceilf
# endif
_GL_FUNCDECL_RPL (ceilf, float, (float x));
_GL_CXXALIAS_RPL (ceilf, float, (float x));
# else
# if !@HAVE_DECL_CEILF@
+# undef ceilf
_GL_FUNCDECL_SYS (ceilf, float, (float x));
# endif
_GL_CXXALIAS_SYS (ceilf, float, (float x));
@@ -221,12 +419,14 @@ _GL_CXXALIASWARN (ceil);
#if @GNULIB_CEILL@
# if @REPLACE_CEILL@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef ceill
# define ceill rpl_ceill
# endif
_GL_FUNCDECL_RPL (ceill, long double, (long double x));
_GL_CXXALIAS_RPL (ceill, long double, (long double x));
# else
# if !@HAVE_DECL_CEILL@
+# undef ceill
_GL_FUNCDECL_SYS (ceill, long double, (long double x));
# endif
_GL_CXXALIAS_SYS (ceill, long double, (long double x));
@@ -241,8 +441,67 @@ _GL_WARN_ON_USE (ceill, "ceill is unportable - "
#endif
+#if @GNULIB_COPYSIGNF@
+# if !@HAVE_DECL_COPYSIGNF@
+_GL_FUNCDECL_SYS (copysignf, float, (float x, float y));
+# endif
+_GL_CXXALIAS_SYS (copysignf, float, (float x, float y));
+_GL_CXXALIASWARN (copysignf);
+#elif defined GNULIB_POSIXCHECK
+# undef copysignf
+# if HAVE_RAW_DECL_COPYSIGNF
+_GL_WARN_ON_USE (copysignf, "copysignf is unportable - "
+ "use gnulib module copysignf for portability");
+# endif
+#endif
+
+#if @GNULIB_COPYSIGN@
+# if !@HAVE_COPYSIGN@
+_GL_FUNCDECL_SYS (copysign, double, (double x, double y));
+# endif
+_GL_CXXALIAS_SYS (copysign, double, (double x, double y));
+_GL_CXXALIASWARN (copysign);
+#elif defined GNULIB_POSIXCHECK
+# undef copysign
+# if HAVE_RAW_DECL_COPYSIGN
+_GL_WARN_ON_USE (copysign, "copysign is unportable - "
+ "use gnulib module copysign for portability");
+# endif
+#endif
+
+#if @GNULIB_COPYSIGNL@
+# if !@HAVE_COPYSIGNL@
+_GL_FUNCDECL_SYS (copysignl, long double, (long double x, long double y));
+# endif
+_GL_CXXALIAS_SYS (copysignl, long double, (long double x, long double y));
+_GL_CXXALIASWARN (copysignl);
+#elif defined GNULIB_POSIXCHECK
+# undef copysignl
+# if HAVE_RAW_DECL_COPYSIGNL
+_GL_WARN_ON_USE (copysign, "copysignl is unportable - "
+ "use gnulib module copysignl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_COSF@
+# if !@HAVE_COSF@
+# undef cosf
+_GL_FUNCDECL_SYS (cosf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (cosf, float, (float x));
+_GL_CXXALIASWARN (cosf);
+#elif defined GNULIB_POSIXCHECK
+# undef cosf
+# if HAVE_RAW_DECL_COSF
+_GL_WARN_ON_USE (cosf, "cosf is unportable - "
+ "use gnulib module cosf for portability");
+# endif
+#endif
+
#if @GNULIB_COSL@
# if !@HAVE_COSL@ || !@HAVE_DECL_COSL@
+# undef cosl
_GL_FUNCDECL_SYS (cosl, long double, (long double x));
# endif
_GL_CXXALIAS_SYS (cosl, long double, (long double x));
@@ -251,13 +510,45 @@ _GL_CXXALIASWARN (cosl);
# undef cosl
# if HAVE_RAW_DECL_COSL
_GL_WARN_ON_USE (cosl, "cosl is unportable - "
- "use gnulib module mathl for portability");
+ "use gnulib module cosl for portability");
# endif
#endif
+#if @GNULIB_COSHF@
+# if !@HAVE_COSHF@
+# undef coshf
+_GL_FUNCDECL_SYS (coshf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (coshf, float, (float x));
+_GL_CXXALIASWARN (coshf);
+#elif defined GNULIB_POSIXCHECK
+# undef coshf
+# if HAVE_RAW_DECL_COSHF
+_GL_WARN_ON_USE (coshf, "coshf is unportable - "
+ "use gnulib module coshf for portability");
+# endif
+#endif
+
+
+#if @GNULIB_EXPF@
+# if !@HAVE_EXPF@
+# undef expf
+_GL_FUNCDECL_SYS (expf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (expf, float, (float x));
+_GL_CXXALIASWARN (expf);
+#elif defined GNULIB_POSIXCHECK
+# undef expf
+# if HAVE_RAW_DECL_EXPF
+_GL_WARN_ON_USE (expf, "expf is unportable - "
+ "use gnulib module expf for portability");
+# endif
+#endif
+
#if @GNULIB_EXPL@
# if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@
+# undef expl
_GL_FUNCDECL_SYS (expl, long double, (long double x));
# endif
_GL_CXXALIAS_SYS (expl, long double, (long double x));
@@ -266,7 +557,171 @@ _GL_CXXALIASWARN (expl);
# undef expl
# if HAVE_RAW_DECL_EXPL
_GL_WARN_ON_USE (expl, "expl is unportable - "
- "use gnulib module mathl for portability");
+ "use gnulib module expl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_EXP2F@
+# if !@HAVE_DECL_EXP2F@
+_GL_FUNCDECL_SYS (exp2f, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (exp2f, float, (float x));
+_GL_CXXALIASWARN (exp2f);
+#elif defined GNULIB_POSIXCHECK
+# undef exp2f
+# if HAVE_RAW_DECL_EXP2F
+_GL_WARN_ON_USE (exp2f, "exp2f is unportable - "
+ "use gnulib module exp2f for portability");
+# endif
+#endif
+
+#if @GNULIB_EXP2@
+# if @REPLACE_EXP2@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef exp2
+# define exp2 rpl_exp2
+# endif
+_GL_FUNCDECL_RPL (exp2, double, (double x));
+_GL_CXXALIAS_RPL (exp2, double, (double x));
+# else
+# if !@HAVE_DECL_EXP2@
+_GL_FUNCDECL_SYS (exp2, double, (double x));
+# endif
+_GL_CXXALIAS_SYS (exp2, double, (double x));
+# endif
+_GL_CXXALIASWARN (exp2);
+#elif defined GNULIB_POSIXCHECK
+# undef exp2
+# if HAVE_RAW_DECL_EXP2
+_GL_WARN_ON_USE (exp2, "exp2 is unportable - "
+ "use gnulib module exp2 for portability");
+# endif
+#endif
+
+#if @GNULIB_EXP2L@
+# if @REPLACE_EXP2L@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef exp2l
+# define exp2l rpl_exp2l
+# endif
+_GL_FUNCDECL_RPL (exp2l, long double, (long double x));
+_GL_CXXALIAS_RPL (exp2l, long double, (long double x));
+# else
+# if !@HAVE_DECL_EXP2L@
+# undef exp2l
+_GL_FUNCDECL_SYS (exp2l, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (exp2l, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (exp2l);
+#elif defined GNULIB_POSIXCHECK
+# undef exp2l
+# if HAVE_RAW_DECL_EXP2L
+_GL_WARN_ON_USE (exp2l, "exp2l is unportable - "
+ "use gnulib module exp2l for portability");
+# endif
+#endif
+
+
+#if @GNULIB_EXPM1F@
+# if @REPLACE_EXPM1F@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef expm1f
+# define expm1f rpl_expm1f
+# endif
+_GL_FUNCDECL_RPL (expm1f, float, (float x));
+_GL_CXXALIAS_RPL (expm1f, float, (float x));
+# else
+# if !@HAVE_EXPM1F@
+_GL_FUNCDECL_SYS (expm1f, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (expm1f, float, (float x));
+# endif
+_GL_CXXALIASWARN (expm1f);
+#elif defined GNULIB_POSIXCHECK
+# undef expm1f
+# if HAVE_RAW_DECL_EXPM1F
+_GL_WARN_ON_USE (expm1f, "expm1f is unportable - "
+ "use gnulib module expm1f for portability");
+# endif
+#endif
+
+#if @GNULIB_EXPM1@
+# if @REPLACE_EXPM1@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef expm1
+# define expm1 rpl_expm1
+# endif
+_GL_FUNCDECL_RPL (expm1, double, (double x));
+_GL_CXXALIAS_RPL (expm1, double, (double x));
+# else
+# if !@HAVE_EXPM1@
+_GL_FUNCDECL_SYS (expm1, double, (double x));
+# endif
+_GL_CXXALIAS_SYS (expm1, double, (double x));
+# endif
+_GL_CXXALIASWARN (expm1);
+#elif defined GNULIB_POSIXCHECK
+# undef expm1
+# if HAVE_RAW_DECL_EXPM1
+_GL_WARN_ON_USE (expm1, "expm1 is unportable - "
+ "use gnulib module expm1 for portability");
+# endif
+#endif
+
+#if @GNULIB_EXPM1L@
+# if !@HAVE_DECL_EXPM1L@
+# undef expm1l
+_GL_FUNCDECL_SYS (expm1l, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (expm1l, long double, (long double x));
+_GL_CXXALIASWARN (expm1l);
+#elif defined GNULIB_POSIXCHECK
+# undef expm1l
+# if HAVE_RAW_DECL_EXPM1L
+_GL_WARN_ON_USE (expm1l, "expm1l is unportable - "
+ "use gnulib module expm1l for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FABSF@
+# if !@HAVE_FABSF@
+# undef fabsf
+_GL_FUNCDECL_SYS (fabsf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (fabsf, float, (float x));
+_GL_CXXALIASWARN (fabsf);
+#elif defined GNULIB_POSIXCHECK
+# undef fabsf
+# if HAVE_RAW_DECL_FABSF
+_GL_WARN_ON_USE (fabsf, "fabsf is unportable - "
+ "use gnulib module fabsf for portability");
+# endif
+#endif
+
+#if @GNULIB_FABSL@
+# if @REPLACE_FABSL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fabsl
+# define fabsl rpl_fabsl
+# endif
+_GL_FUNCDECL_RPL (fabsl, long double, (long double x));
+_GL_CXXALIAS_RPL (fabsl, long double, (long double x));
+# else
+# if !@HAVE_FABSL@
+# undef fabsl
+_GL_FUNCDECL_SYS (fabsl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (fabsl, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (fabsl);
+#elif defined GNULIB_POSIXCHECK
+# undef fabsl
+# if HAVE_RAW_DECL_FABSL
+_GL_WARN_ON_USE (fabsl, "fabsl is unportable - "
+ "use gnulib module fabsl for portability");
# endif
#endif
@@ -274,12 +729,14 @@ _GL_WARN_ON_USE (expl, "expl is unportable - "
#if @GNULIB_FLOORF@
# if @REPLACE_FLOORF@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef floorf
# define floorf rpl_floorf
# endif
_GL_FUNCDECL_RPL (floorf, float, (float x));
_GL_CXXALIAS_RPL (floorf, float, (float x));
# else
# if !@HAVE_DECL_FLOORF@
+# undef floorf
_GL_FUNCDECL_SYS (floorf, float, (float x));
# endif
_GL_CXXALIAS_SYS (floorf, float, (float x));
@@ -309,12 +766,14 @@ _GL_CXXALIASWARN (floor);
#if @GNULIB_FLOORL@
# if @REPLACE_FLOORL@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef floorl
# define floorl rpl_floorl
# endif
_GL_FUNCDECL_RPL (floorl, long double, (long double x));
_GL_CXXALIAS_RPL (floorl, long double, (long double x));
# else
# if !@HAVE_DECL_FLOORL@
+# undef floorl
_GL_FUNCDECL_SYS (floorl, long double, (long double x));
# endif
_GL_CXXALIAS_SYS (floorl, long double, (long double x));
@@ -329,6 +788,206 @@ _GL_WARN_ON_USE (floorl, "floorl is unportable - "
#endif
+#if @GNULIB_FMAF@
+# if @REPLACE_FMAF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fmaf
+# define fmaf rpl_fmaf
+# endif
+_GL_FUNCDECL_RPL (fmaf, float, (float x, float y, float z));
+_GL_CXXALIAS_RPL (fmaf, float, (float x, float y, float z));
+# else
+# if !@HAVE_FMAF@
+_GL_FUNCDECL_SYS (fmaf, float, (float x, float y, float z));
+# endif
+_GL_CXXALIAS_SYS (fmaf, float, (float x, float y, float z));
+# endif
+_GL_CXXALIASWARN (fmaf);
+#elif defined GNULIB_POSIXCHECK
+# undef fmaf
+# if HAVE_RAW_DECL_FMAF
+_GL_WARN_ON_USE (fmaf, "fmaf is unportable - "
+ "use gnulib module fmaf for portability");
+# endif
+#endif
+
+#if @GNULIB_FMA@
+# if @REPLACE_FMA@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fma
+# define fma rpl_fma
+# endif
+_GL_FUNCDECL_RPL (fma, double, (double x, double y, double z));
+_GL_CXXALIAS_RPL (fma, double, (double x, double y, double z));
+# else
+# if !@HAVE_FMA@
+_GL_FUNCDECL_SYS (fma, double, (double x, double y, double z));
+# endif
+_GL_CXXALIAS_SYS (fma, double, (double x, double y, double z));
+# endif
+_GL_CXXALIASWARN (fma);
+#elif defined GNULIB_POSIXCHECK
+# undef fma
+# if HAVE_RAW_DECL_FMA
+_GL_WARN_ON_USE (fma, "fma is unportable - "
+ "use gnulib module fma for portability");
+# endif
+#endif
+
+#if @GNULIB_FMAL@
+# if @REPLACE_FMAL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fmal
+# define fmal rpl_fmal
+# endif
+_GL_FUNCDECL_RPL (fmal, long double,
+ (long double x, long double y, long double z));
+_GL_CXXALIAS_RPL (fmal, long double,
+ (long double x, long double y, long double z));
+# else
+# if !@HAVE_FMAL@
+# undef fmal
+_GL_FUNCDECL_SYS (fmal, long double,
+ (long double x, long double y, long double z));
+# endif
+_GL_CXXALIAS_SYS (fmal, long double,
+ (long double x, long double y, long double z));
+# endif
+_GL_CXXALIASWARN (fmal);
+#elif defined GNULIB_POSIXCHECK
+# undef fmal
+# if HAVE_RAW_DECL_FMAL
+_GL_WARN_ON_USE (fmal, "fmal is unportable - "
+ "use gnulib module fmal for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FMODF@
+# if @REPLACE_FMODF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fmodf
+# define fmodf rpl_fmodf
+# endif
+_GL_FUNCDECL_RPL (fmodf, float, (float x, float y));
+_GL_CXXALIAS_RPL (fmodf, float, (float x, float y));
+# else
+# if !@HAVE_FMODF@
+# undef fmodf
+_GL_FUNCDECL_SYS (fmodf, float, (float x, float y));
+# endif
+_GL_CXXALIAS_SYS (fmodf, float, (float x, float y));
+# endif
+_GL_CXXALIASWARN (fmodf);
+#elif defined GNULIB_POSIXCHECK
+# undef fmodf
+# if HAVE_RAW_DECL_FMODF
+_GL_WARN_ON_USE (fmodf, "fmodf is unportable - "
+ "use gnulib module fmodf for portability");
+# endif
+#endif
+
+#if @GNULIB_FMOD@
+# if @REPLACE_FMOD@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fmod
+# define fmod rpl_fmod
+# endif
+_GL_FUNCDECL_RPL (fmod, double, (double x, double y));
+_GL_CXXALIAS_RPL (fmod, double, (double x, double y));
+# else
+_GL_CXXALIAS_SYS (fmod, double, (double x, double y));
+# endif
+_GL_CXXALIASWARN (fmod);
+#elif defined GNULIB_POSIXCHECK
+# undef fmod
+# if HAVE_RAW_DECL_FMOD
+_GL_WARN_ON_USE (fmod, "fmod has portability problems - "
+ "use gnulib module fmod for portability");
+# endif
+#endif
+
+#if @GNULIB_FMODL@
+# if @REPLACE_FMODL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fmodl
+# define fmodl rpl_fmodl
+# endif
+_GL_FUNCDECL_RPL (fmodl, long double, (long double x, long double y));
+_GL_CXXALIAS_RPL (fmodl, long double, (long double x, long double y));
+# else
+# if !@HAVE_FMODL@
+# undef fmodl
+_GL_FUNCDECL_SYS (fmodl, long double, (long double x, long double y));
+# endif
+_GL_CXXALIAS_SYS (fmodl, long double, (long double x, long double y));
+# endif
+_GL_CXXALIASWARN (fmodl);
+#elif defined GNULIB_POSIXCHECK
+# undef fmodl
+# if HAVE_RAW_DECL_FMODL
+_GL_WARN_ON_USE (fmodl, "fmodl is unportable - "
+ "use gnulib module fmodl for portability");
+# endif
+#endif
+
+
+/* Write x as
+ x = mantissa * 2^exp
+ where
+ If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
+ If x is zero: mantissa = x, exp = 0.
+ If x is infinite or NaN: mantissa = x, exp unspecified.
+ Store exp in *EXPPTR and return mantissa. */
+#if @GNULIB_FREXPF@
+# if @REPLACE_FREXPF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef frexpf
+# define frexpf rpl_frexpf
+# endif
+_GL_FUNCDECL_RPL (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (frexpf, float, (float x, int *expptr));
+# else
+# if !@HAVE_FREXPF@
+# undef frexpf
+_GL_FUNCDECL_SYS (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (frexpf, float, (float x, int *expptr));
+# endif
+_GL_CXXALIASWARN (frexpf);
+#elif defined GNULIB_POSIXCHECK
+# undef frexpf
+# if HAVE_RAW_DECL_FREXPF
+_GL_WARN_ON_USE (frexpf, "frexpf is unportable - "
+ "use gnulib module frexpf for portability");
+# endif
+#endif
+
+/* Write x as
+ x = mantissa * 2^exp
+ where
+ If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
+ If x is zero: mantissa = x, exp = 0.
+ If x is infinite or NaN: mantissa = x, exp unspecified.
+ Store exp in *EXPPTR and return mantissa. */
+#if @GNULIB_FREXP@
+# if @REPLACE_FREXP@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define frexp rpl_frexp
+# endif
+_GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (frexp, double, (double x, int *expptr));
+# else
+_GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr));
+# endif
+_GL_CXXALIASWARN (frexp);
+#elif defined GNULIB_POSIXCHECK
+# undef frexp
+/* Assume frexp is always declared. */
+_GL_WARN_ON_USE (frexp, "frexp is unportable - "
+ "use gnulib module frexp for portability");
+#endif
+
/* Write x as
x = mantissa * 2^exp
where
@@ -338,6 +997,7 @@ _GL_WARN_ON_USE (floorl, "floorl is unportable - "
Store exp in *EXPPTR and return mantissa. */
#if @GNULIB_FREXPL@ && @REPLACE_FREXPL@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef frexpl
# define frexpl rpl_frexpl
# endif
_GL_FUNCDECL_RPL (frexpl, long double,
@@ -364,9 +1024,157 @@ _GL_WARN_ON_USE (frexpl, "frexpl is unportable - "
#endif
+/* Return sqrt(x^2+y^2). */
+#if @GNULIB_HYPOTF@
+# if @REPLACE_HYPOTF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef hypotf
+# define hypotf rpl_hypotf
+# endif
+_GL_FUNCDECL_RPL (hypotf, float, (float x, float y));
+_GL_CXXALIAS_RPL (hypotf, float, (float x, float y));
+# else
+# if !@HAVE_HYPOTF@
+_GL_FUNCDECL_SYS (hypotf, float, (float x, float y));
+# endif
+_GL_CXXALIAS_SYS (hypotf, float, (float x, float y));
+# endif
+_GL_CXXALIASWARN (hypotf);
+#elif defined GNULIB_POSIXCHECK
+# undef hypotf
+# if HAVE_RAW_DECL_HYPOTF
+_GL_WARN_ON_USE (hypotf, "hypotf is unportable - "
+ "use gnulib module hypotf for portability");
+# endif
+#endif
+
+/* Return sqrt(x^2+y^2). */
+#if @GNULIB_HYPOT@
+# if @REPLACE_HYPOT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef hypot
+# define hypot rpl_hypot
+# endif
+_GL_FUNCDECL_RPL (hypot, double, (double x, double y));
+_GL_CXXALIAS_RPL (hypot, double, (double x, double y));
+# else
+_GL_CXXALIAS_SYS (hypot, double, (double x, double y));
+# endif
+_GL_CXXALIASWARN (hypot);
+#elif defined GNULIB_POSIXCHECK
+# undef hypot
+# if HAVE_RAW_DECL_HYPOT
+_GL_WARN_ON_USE (hypotf, "hypot has portability problems - "
+ "use gnulib module hypot for portability");
+# endif
+#endif
+
+/* Return sqrt(x^2+y^2). */
+#if @GNULIB_HYPOTL@
+# if @REPLACE_HYPOTL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef hypotl
+# define hypotl rpl_hypotl
+# endif
+_GL_FUNCDECL_RPL (hypotl, long double, (long double x, long double y));
+_GL_CXXALIAS_RPL (hypotl, long double, (long double x, long double y));
+# else
+# if !@HAVE_HYPOTL@
+_GL_FUNCDECL_SYS (hypotl, long double, (long double x, long double y));
+# endif
+_GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y));
+# endif
+_GL_CXXALIASWARN (hypotl);
+#elif defined GNULIB_POSIXCHECK
+# undef hypotl
+# if HAVE_RAW_DECL_HYPOTL
+_GL_WARN_ON_USE (hypotl, "hypotl is unportable - "
+ "use gnulib module hypotl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_ILOGBF@
+# if @REPLACE_ILOGBF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef ilogbf
+# define ilogbf rpl_ilogbf
+# endif
+_GL_FUNCDECL_RPL (ilogbf, int, (float x));
+_GL_CXXALIAS_RPL (ilogbf, int, (float x));
+# else
+# if !@HAVE_ILOGBF@
+_GL_FUNCDECL_SYS (ilogbf, int, (float x));
+# endif
+_GL_CXXALIAS_SYS (ilogbf, int, (float x));
+# endif
+_GL_CXXALIASWARN (ilogbf);
+#elif defined GNULIB_POSIXCHECK
+# undef ilogbf
+# if HAVE_RAW_DECL_ILOGBF
+_GL_WARN_ON_USE (ilogbf, "ilogbf is unportable - "
+ "use gnulib module ilogbf for portability");
+# endif
+#endif
+
+#if @GNULIB_ILOGB@
+# if @REPLACE_ILOGB@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef ilogb
+# define ilogb rpl_ilogb
+# endif
+_GL_FUNCDECL_RPL (ilogb, int, (double x));
+_GL_CXXALIAS_RPL (ilogb, int, (double x));
+# else
+# if !@HAVE_ILOGB@
+_GL_FUNCDECL_SYS (ilogb, int, (double x));
+# endif
+_GL_CXXALIAS_SYS (ilogb, int, (double x));
+# endif
+_GL_CXXALIASWARN (ilogb);
+#elif defined GNULIB_POSIXCHECK
+# undef ilogb
+# if HAVE_RAW_DECL_ILOGB
+_GL_WARN_ON_USE (ilogb, "ilogb is unportable - "
+ "use gnulib module ilogb for portability");
+# endif
+#endif
+
+#if @GNULIB_ILOGBL@
+# if !@HAVE_ILOGBL@
+_GL_FUNCDECL_SYS (ilogbl, int, (long double x));
+# endif
+_GL_CXXALIAS_SYS (ilogbl, int, (long double x));
+_GL_CXXALIASWARN (ilogbl);
+#elif defined GNULIB_POSIXCHECK
+# undef ilogbl
+# if HAVE_RAW_DECL_ILOGBL
+_GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - "
+ "use gnulib module ilogbl for portability");
+# endif
+#endif
+
+
+/* Return x * 2^exp. */
+#if @GNULIB_LDEXPF@
+# if !@HAVE_LDEXPF@
+# undef ldexpf
+_GL_FUNCDECL_SYS (ldexpf, float, (float x, int exp));
+# endif
+_GL_CXXALIAS_SYS (ldexpf, float, (float x, int exp));
+_GL_CXXALIASWARN (ldexpf);
+#elif defined GNULIB_POSIXCHECK
+# undef ldexpf
+# if HAVE_RAW_DECL_LDEXPF
+_GL_WARN_ON_USE (ldexpf, "ldexpf is unportable - "
+ "use gnulib module ldexpf for portability");
+# endif
+#endif
+
/* Return x * 2^exp. */
#if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef ldexpl
# define ldexpl rpl_ldexpl
# endif
_GL_FUNCDECL_RPL (ldexpl, long double, (long double x, int exp));
@@ -391,17 +1199,553 @@ _GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - "
#endif
+#if @GNULIB_LOGF@
+# if @REPLACE_LOGF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef logf
+# define logf rpl_logf
+# endif
+_GL_FUNCDECL_RPL (logf, float, (float x));
+_GL_CXXALIAS_RPL (logf, float, (float x));
+# else
+# if !@HAVE_LOGF@
+# undef logf
+_GL_FUNCDECL_SYS (logf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (logf, float, (float x));
+# endif
+_GL_CXXALIASWARN (logf);
+#elif defined GNULIB_POSIXCHECK
+# undef logf
+# if HAVE_RAW_DECL_LOGF
+_GL_WARN_ON_USE (logf, "logf is unportable - "
+ "use gnulib module logf for portability");
+# endif
+#endif
+
+#if @GNULIB_LOG@
+# if @REPLACE_LOG@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef log
+# define log rpl_log
+# endif
+_GL_FUNCDECL_RPL (log, double, (double x));
+_GL_CXXALIAS_RPL (log, double, (double x));
+# else
+_GL_CXXALIAS_SYS (log, double, (double x));
+# endif
+_GL_CXXALIASWARN (log);
+#elif defined GNULIB_POSIXCHECK
+# undef log
+# if HAVE_RAW_DECL_LOG
+_GL_WARN_ON_USE (log, "log has portability problems - "
+ "use gnulib module log for portability");
+# endif
+#endif
+
#if @GNULIB_LOGL@
-# if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@
+# if @REPLACE_LOGL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef logl
+# define logl rpl_logl
+# endif
+_GL_FUNCDECL_RPL (logl, long double, (long double x));
+_GL_CXXALIAS_RPL (logl, long double, (long double x));
+# else
+# if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@
+# undef logl
_GL_FUNCDECL_SYS (logl, long double, (long double x));
-# endif
+# endif
_GL_CXXALIAS_SYS (logl, long double, (long double x));
+# endif
_GL_CXXALIASWARN (logl);
#elif defined GNULIB_POSIXCHECK
# undef logl
# if HAVE_RAW_DECL_LOGL
_GL_WARN_ON_USE (logl, "logl is unportable - "
- "use gnulib module mathl for portability");
+ "use gnulib module logl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LOG10F@
+# if @REPLACE_LOG10F@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef log10f
+# define log10f rpl_log10f
+# endif
+_GL_FUNCDECL_RPL (log10f, float, (float x));
+_GL_CXXALIAS_RPL (log10f, float, (float x));
+# else
+# if !@HAVE_LOG10F@
+# undef log10f
+_GL_FUNCDECL_SYS (log10f, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (log10f, float, (float x));
+# endif
+_GL_CXXALIASWARN (log10f);
+#elif defined GNULIB_POSIXCHECK
+# undef log10f
+# if HAVE_RAW_DECL_LOG10F
+_GL_WARN_ON_USE (log10f, "log10f is unportable - "
+ "use gnulib module log10f for portability");
+# endif
+#endif
+
+#if @GNULIB_LOG10@
+# if @REPLACE_LOG10@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef log10
+# define log10 rpl_log10
+# endif
+_GL_FUNCDECL_RPL (log10, double, (double x));
+_GL_CXXALIAS_RPL (log10, double, (double x));
+# else
+_GL_CXXALIAS_SYS (log10, double, (double x));
+# endif
+_GL_CXXALIASWARN (log10);
+#elif defined GNULIB_POSIXCHECK
+# undef log10
+# if HAVE_RAW_DECL_LOG10
+_GL_WARN_ON_USE (log10, "log10 has portability problems - "
+ "use gnulib module log10 for portability");
+# endif
+#endif
+
+#if @GNULIB_LOG10L@
+# if @REPLACE_LOG10L@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef log10l
+# define log10l rpl_log10l
+# endif
+_GL_FUNCDECL_RPL (log10l, long double, (long double x));
+_GL_CXXALIAS_RPL (log10l, long double, (long double x));
+# else
+# if !@HAVE_LOG10L@ || !@HAVE_DECL_LOG10L@
+# undef log10l
+_GL_FUNCDECL_SYS (log10l, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (log10l, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (log10l);
+#elif defined GNULIB_POSIXCHECK
+# undef log10l
+# if HAVE_RAW_DECL_LOG10L
+_GL_WARN_ON_USE (log10l, "log10l is unportable - "
+ "use gnulib module log10l for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LOG1PF@
+# if @REPLACE_LOG1PF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef log1pf
+# define log1pf rpl_log1pf
+# endif
+_GL_FUNCDECL_RPL (log1pf, float, (float x));
+_GL_CXXALIAS_RPL (log1pf, float, (float x));
+# else
+# if !@HAVE_LOG1PF@
+_GL_FUNCDECL_SYS (log1pf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (log1pf, float, (float x));
+# endif
+_GL_CXXALIASWARN (log1pf);
+#elif defined GNULIB_POSIXCHECK
+# undef log1pf
+# if HAVE_RAW_DECL_LOG1PF
+_GL_WARN_ON_USE (log1pf, "log1pf is unportable - "
+ "use gnulib module log1pf for portability");
+# endif
+#endif
+
+#if @GNULIB_LOG1P@
+# if @REPLACE_LOG1P@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef log1p
+# define log1p rpl_log1p
+# endif
+_GL_FUNCDECL_RPL (log1p, double, (double x));
+_GL_CXXALIAS_RPL (log1p, double, (double x));
+# else
+# if !@HAVE_LOG1P@
+_GL_FUNCDECL_SYS (log1p, double, (double x));
+# endif
+_GL_CXXALIAS_SYS (log1p, double, (double x));
+# endif
+_GL_CXXALIASWARN (log1p);
+#elif defined GNULIB_POSIXCHECK
+# undef log1p
+# if HAVE_RAW_DECL_LOG1P
+_GL_WARN_ON_USE (log1p, "log1p has portability problems - "
+ "use gnulib module log1p for portability");
+# endif
+#endif
+
+#if @GNULIB_LOG1PL@
+# if @REPLACE_LOG1PL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef log1pl
+# define log1pl rpl_log1pl
+# endif
+_GL_FUNCDECL_RPL (log1pl, long double, (long double x));
+_GL_CXXALIAS_RPL (log1pl, long double, (long double x));
+# else
+# if !@HAVE_LOG1PL@
+_GL_FUNCDECL_SYS (log1pl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (log1pl, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (log1pl);
+#elif defined GNULIB_POSIXCHECK
+# undef log1pl
+# if HAVE_RAW_DECL_LOG1PL
+_GL_WARN_ON_USE (log1pl, "log1pl has portability problems - "
+ "use gnulib module log1pl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LOG2F@
+# if @REPLACE_LOG2F@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef log2f
+# define log2f rpl_log2f
+# endif
+_GL_FUNCDECL_RPL (log2f, float, (float x));
+_GL_CXXALIAS_RPL (log2f, float, (float x));
+# else
+# if !@HAVE_DECL_LOG2F@
+# undef log2f
+_GL_FUNCDECL_SYS (log2f, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (log2f, float, (float x));
+# endif
+_GL_CXXALIASWARN (log2f);
+#elif defined GNULIB_POSIXCHECK
+# undef log2f
+# if HAVE_RAW_DECL_LOG2F
+_GL_WARN_ON_USE (log2f, "log2f is unportable - "
+ "use gnulib module log2f for portability");
+# endif
+#endif
+
+#if @GNULIB_LOG2@
+# if @REPLACE_LOG2@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef log2
+# define log2 rpl_log2
+# endif
+_GL_FUNCDECL_RPL (log2, double, (double x));
+_GL_CXXALIAS_RPL (log2, double, (double x));
+# else
+# if !@HAVE_DECL_LOG2@
+# undef log2
+_GL_FUNCDECL_SYS (log2, double, (double x));
+# endif
+_GL_CXXALIAS_SYS (log2, double, (double x));
+# endif
+_GL_CXXALIASWARN (log2);
+#elif defined GNULIB_POSIXCHECK
+# undef log2
+# if HAVE_RAW_DECL_LOG2
+_GL_WARN_ON_USE (log2, "log2 is unportable - "
+ "use gnulib module log2 for portability");
+# endif
+#endif
+
+#if @GNULIB_LOG2L@
+# if @REPLACE_LOG2L@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef log2l
+# define log2l rpl_log2l
+# endif
+_GL_FUNCDECL_RPL (log2l, long double, (long double x));
+_GL_CXXALIAS_RPL (log2l, long double, (long double x));
+# else
+# if !@HAVE_DECL_LOG2L@
+_GL_FUNCDECL_SYS (log2l, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (log2l, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (log2l);
+#elif defined GNULIB_POSIXCHECK
+# undef log2l
+# if HAVE_RAW_DECL_LOG2L
+_GL_WARN_ON_USE (log2l, "log2l is unportable - "
+ "use gnulib module log2l for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LOGBF@
+# if @REPLACE_LOGBF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef logbf
+# define logbf rpl_logbf
+# endif
+_GL_FUNCDECL_RPL (logbf, float, (float x));
+_GL_CXXALIAS_RPL (logbf, float, (float x));
+# else
+# if !@HAVE_LOGBF@
+_GL_FUNCDECL_SYS (logbf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (logbf, float, (float x));
+# endif
+_GL_CXXALIASWARN (logbf);
+#elif defined GNULIB_POSIXCHECK
+# undef logbf
+# if HAVE_RAW_DECL_LOGBF
+_GL_WARN_ON_USE (logbf, "logbf is unportable - "
+ "use gnulib module logbf for portability");
+# endif
+#endif
+
+#if @GNULIB_LOGB@
+# if @REPLACE_LOGB@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef logb
+# define logb rpl_logb
+# endif
+_GL_FUNCDECL_RPL (logb, double, (double x));
+_GL_CXXALIAS_RPL (logb, double, (double x));
+# else
+# if !@HAVE_DECL_LOGB@
+_GL_FUNCDECL_SYS (logb, double, (double x));
+# endif
+_GL_CXXALIAS_SYS (logb, double, (double x));
+# endif
+_GL_CXXALIASWARN (logb);
+#elif defined GNULIB_POSIXCHECK
+# undef logb
+# if HAVE_RAW_DECL_LOGB
+_GL_WARN_ON_USE (logb, "logb is unportable - "
+ "use gnulib module logb for portability");
+# endif
+#endif
+
+#if @GNULIB_LOGBL@
+# if @REPLACE_LOGBL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef logbl
+# define logbl rpl_logbl
+# endif
+_GL_FUNCDECL_RPL (logbl, long double, (long double x));
+_GL_CXXALIAS_RPL (logbl, long double, (long double x));
+# else
+# if !@HAVE_LOGBL@
+_GL_FUNCDECL_SYS (logbl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (logbl, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (logbl);
+#elif defined GNULIB_POSIXCHECK
+# undef logbl
+# if HAVE_RAW_DECL_LOGBL
+_GL_WARN_ON_USE (logbl, "logbl is unportable - "
+ "use gnulib module logbl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_MODFF@
+# if @REPLACE_MODFF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef modff
+# define modff rpl_modff
+# endif
+_GL_FUNCDECL_RPL (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (modff, float, (float x, float *iptr));
+# else
+# if !@HAVE_MODFF@
+# undef modff
+_GL_FUNCDECL_SYS (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (modff, float, (float x, float *iptr));
+# endif
+_GL_CXXALIASWARN (modff);
+#elif defined GNULIB_POSIXCHECK
+# undef modff
+# if HAVE_RAW_DECL_MODFF
+_GL_WARN_ON_USE (modff, "modff is unportable - "
+ "use gnulib module modff for portability");
+# endif
+#endif
+
+#if @GNULIB_MODF@
+# if @REPLACE_MODF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef modf
+# define modf rpl_modf
+# endif
+_GL_FUNCDECL_RPL (modf, double, (double x, double *iptr) _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (modf, double, (double x, double *iptr));
+# else
+_GL_CXXALIAS_SYS (modf, double, (double x, double *iptr));
+# endif
+_GL_CXXALIASWARN (modf);
+#elif defined GNULIB_POSIXCHECK
+# undef modf
+# if HAVE_RAW_DECL_MODF
+_GL_WARN_ON_USE (modf, "modf has portability problems - "
+ "use gnulib module modf for portability");
+# endif
+#endif
+
+#if @GNULIB_MODFL@
+# if @REPLACE_MODFL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef modfl
+# define modfl rpl_modfl
+# endif
+_GL_FUNCDECL_RPL (modfl, long double, (long double x, long double *iptr)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (modfl, long double, (long double x, long double *iptr));
+# else
+# if !@HAVE_MODFL@
+# undef modfl
+_GL_FUNCDECL_SYS (modfl, long double, (long double x, long double *iptr)
+ _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (modfl, long double, (long double x, long double *iptr));
+# endif
+_GL_CXXALIASWARN (modfl);
+#elif defined GNULIB_POSIXCHECK
+# undef modfl
+# if HAVE_RAW_DECL_MODFL
+_GL_WARN_ON_USE (modfl, "modfl is unportable - "
+ "use gnulib module modfl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_POWF@
+# if !@HAVE_POWF@
+# undef powf
+_GL_FUNCDECL_SYS (powf, float, (float x, float y));
+# endif
+_GL_CXXALIAS_SYS (powf, float, (float x, float y));
+_GL_CXXALIASWARN (powf);
+#elif defined GNULIB_POSIXCHECK
+# undef powf
+# if HAVE_RAW_DECL_POWF
+_GL_WARN_ON_USE (powf, "powf is unportable - "
+ "use gnulib module powf for portability");
+# endif
+#endif
+
+
+#if @GNULIB_REMAINDERF@
+# if @REPLACE_REMAINDERF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef remainderf
+# define remainderf rpl_remainderf
+# endif
+_GL_FUNCDECL_RPL (remainderf, float, (float x, float y));
+_GL_CXXALIAS_RPL (remainderf, float, (float x, float y));
+# else
+# if !@HAVE_REMAINDERF@
+_GL_FUNCDECL_SYS (remainderf, float, (float x, float y));
+# endif
+_GL_CXXALIAS_SYS (remainderf, float, (float x, float y));
+# endif
+_GL_CXXALIASWARN (remainderf);
+#elif defined GNULIB_POSIXCHECK
+# undef remainderf
+# if HAVE_RAW_DECL_REMAINDERF
+_GL_WARN_ON_USE (remainderf, "remainderf is unportable - "
+ "use gnulib module remainderf for portability");
+# endif
+#endif
+
+#if @GNULIB_REMAINDER@
+# if @REPLACE_REMAINDER@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef remainder
+# define remainder rpl_remainder
+# endif
+_GL_FUNCDECL_RPL (remainder, double, (double x, double y));
+_GL_CXXALIAS_RPL (remainder, double, (double x, double y));
+# else
+# if !@HAVE_REMAINDER@ || !@HAVE_DECL_REMAINDER@
+_GL_FUNCDECL_SYS (remainder, double, (double x, double y));
+# endif
+_GL_CXXALIAS_SYS (remainder, double, (double x, double y));
+# endif
+_GL_CXXALIASWARN (remainder);
+#elif defined GNULIB_POSIXCHECK
+# undef remainder
+# if HAVE_RAW_DECL_REMAINDER
+_GL_WARN_ON_USE (remainder, "remainder is unportable - "
+ "use gnulib module remainder for portability");
+# endif
+#endif
+
+#if @GNULIB_REMAINDERL@
+# if @REPLACE_REMAINDERL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef remainderl
+# define remainderl rpl_remainderl
+# endif
+_GL_FUNCDECL_RPL (remainderl, long double, (long double x, long double y));
+_GL_CXXALIAS_RPL (remainderl, long double, (long double x, long double y));
+# else
+# if !@HAVE_DECL_REMAINDERL@
+# undef remainderl
+_GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y));
+# endif
+_GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y));
+# endif
+_GL_CXXALIASWARN (remainderl);
+#elif defined GNULIB_POSIXCHECK
+# undef remainderl
+# if HAVE_RAW_DECL_REMAINDERL
+_GL_WARN_ON_USE (remainderl, "remainderl is unportable - "
+ "use gnulib module remainderl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_RINTF@
+# if !@HAVE_DECL_RINTF@
+_GL_FUNCDECL_SYS (rintf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (rintf, float, (float x));
+_GL_CXXALIASWARN (rintf);
+#elif defined GNULIB_POSIXCHECK
+# undef rintf
+# if HAVE_RAW_DECL_RINTF
+_GL_WARN_ON_USE (rintf, "rintf is unportable - "
+ "use gnulib module rintf for portability");
+# endif
+#endif
+
+#if @GNULIB_RINT@
+# if !@HAVE_RINT@
+_GL_FUNCDECL_SYS (rint, double, (double x));
+# endif
+_GL_CXXALIAS_SYS (rint, double, (double x));
+_GL_CXXALIASWARN (rint);
+#elif defined GNULIB_POSIXCHECK
+# undef rint
+# if HAVE_RAW_DECL_RINT
+_GL_WARN_ON_USE (rint, "rint is unportable - "
+ "use gnulib module rint for portability");
+# endif
+#endif
+
+#if @GNULIB_RINTL@
+# if !@HAVE_RINTL@
+_GL_FUNCDECL_SYS (rintl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (rintl, long double, (long double x));
+_GL_CXXALIASWARN (rintl);
+#elif defined GNULIB_POSIXCHECK
+# undef rintl
+# if HAVE_RAW_DECL_RINTL
+_GL_WARN_ON_USE (rintl, "rintl is unportable - "
+ "use gnulib module rintl for portability");
# endif
#endif
@@ -462,6 +1806,7 @@ _GL_FUNCDECL_RPL (roundl, long double, (long double x));
_GL_CXXALIAS_RPL (roundl, long double, (long double x));
# else
# if !@HAVE_DECL_ROUNDL@
+# undef roundl
_GL_FUNCDECL_SYS (roundl, long double, (long double x));
# endif
_GL_CXXALIAS_SYS (roundl, long double, (long double x));
@@ -476,8 +1821,24 @@ _GL_WARN_ON_USE (roundl, "roundl is unportable - "
#endif
+#if @GNULIB_SINF@
+# if !@HAVE_SINF@
+# undef sinf
+_GL_FUNCDECL_SYS (sinf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (sinf, float, (float x));
+_GL_CXXALIASWARN (sinf);
+#elif defined GNULIB_POSIXCHECK
+# undef sinf
+# if HAVE_RAW_DECL_SINF
+_GL_WARN_ON_USE (sinf, "sinf is unportable - "
+ "use gnulib module sinf for portability");
+# endif
+#endif
+
#if @GNULIB_SINL@
# if !@HAVE_SINL@ || !@HAVE_DECL_SINL@
+# undef sinl
_GL_FUNCDECL_SYS (sinl, long double, (long double x));
# endif
_GL_CXXALIAS_SYS (sinl, long double, (long double x));
@@ -486,28 +1847,85 @@ _GL_CXXALIASWARN (sinl);
# undef sinl
# if HAVE_RAW_DECL_SINL
_GL_WARN_ON_USE (sinl, "sinl is unportable - "
- "use gnulib module mathl for portability");
+ "use gnulib module sinl for portability");
# endif
#endif
+#if @GNULIB_SINHF@
+# if !@HAVE_SINHF@
+# undef sinhf
+_GL_FUNCDECL_SYS (sinhf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (sinhf, float, (float x));
+_GL_CXXALIASWARN (sinhf);
+#elif defined GNULIB_POSIXCHECK
+# undef sinhf
+# if HAVE_RAW_DECL_SINHF
+_GL_WARN_ON_USE (sinhf, "sinhf is unportable - "
+ "use gnulib module sinhf for portability");
+# endif
+#endif
+
+
+#if @GNULIB_SQRTF@
+# if !@HAVE_SQRTF@
+# undef sqrtf
+_GL_FUNCDECL_SYS (sqrtf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (sqrtf, float, (float x));
+_GL_CXXALIASWARN (sqrtf);
+#elif defined GNULIB_POSIXCHECK
+# undef sqrtf
+# if HAVE_RAW_DECL_SQRTF
+_GL_WARN_ON_USE (sqrtf, "sqrtf is unportable - "
+ "use gnulib module sqrtf for portability");
+# endif
+#endif
+
#if @GNULIB_SQRTL@
-# if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@
+# if @REPLACE_SQRTL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef sqrtl
+# define sqrtl rpl_sqrtl
+# endif
+_GL_FUNCDECL_RPL (sqrtl, long double, (long double x));
+_GL_CXXALIAS_RPL (sqrtl, long double, (long double x));
+# else
+# if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@
+# undef sqrtl
_GL_FUNCDECL_SYS (sqrtl, long double, (long double x));
-# endif
+# endif
_GL_CXXALIAS_SYS (sqrtl, long double, (long double x));
+# endif
_GL_CXXALIASWARN (sqrtl);
#elif defined GNULIB_POSIXCHECK
# undef sqrtl
# if HAVE_RAW_DECL_SQRTL
_GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - "
- "use gnulib module mathl for portability");
+ "use gnulib module sqrtl for portability");
# endif
#endif
+#if @GNULIB_TANF@
+# if !@HAVE_TANF@
+# undef tanf
+_GL_FUNCDECL_SYS (tanf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (tanf, float, (float x));
+_GL_CXXALIASWARN (tanf);
+#elif defined GNULIB_POSIXCHECK
+# undef tanf
+# if HAVE_RAW_DECL_TANF
+_GL_WARN_ON_USE (tanf, "tanf is unportable - "
+ "use gnulib module tanf for portability");
+# endif
+#endif
+
#if @GNULIB_TANL@
# if !@HAVE_TANL@ || !@HAVE_DECL_TANL@
+# undef tanl
_GL_FUNCDECL_SYS (tanl, long double, (long double x));
# endif
_GL_CXXALIAS_SYS (tanl, long double, (long double x));
@@ -516,7 +1934,23 @@ _GL_CXXALIASWARN (tanl);
# undef tanl
# if HAVE_RAW_DECL_TANL
_GL_WARN_ON_USE (tanl, "tanl is unportable - "
- "use gnulib module mathl for portability");
+ "use gnulib module tanl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_TANHF@
+# if !@HAVE_TANHF@
+# undef tanhf
+_GL_FUNCDECL_SYS (tanhf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (tanhf, float, (float x));
+_GL_CXXALIASWARN (tanhf);
+#elif defined GNULIB_POSIXCHECK
+# undef tanhf
+# if HAVE_RAW_DECL_TANHF
+_GL_WARN_ON_USE (tanhf, "tanhf is unportable - "
+ "use gnulib module tanhf for portability");
# endif
#endif
@@ -589,6 +2023,10 @@ _GL_WARN_ON_USE (truncl, "truncl is unportable - "
#endif
+/* Definitions of function-like macros come here, after the function
+ declarations. */
+
+
#if @GNULIB_ISFINITE@
# if @REPLACE_ISFINITE@
_GL_EXTERN_C int gl_isfinitef (float x);
@@ -600,6 +2038,13 @@ _GL_EXTERN_C int gl_isfinitel (long double x);
sizeof (x) == sizeof (double) ? gl_isfinited (x) : \
gl_isfinitef (x))
# endif
+# ifdef __cplusplus
+# ifdef isfinite
+_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite)
+# undef isfinite
+_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite)
+# endif
+# endif
#elif defined GNULIB_POSIXCHECK
# if defined isfinite
_GL_WARN_REAL_FLOATING_DECL (isfinite);
@@ -620,6 +2065,13 @@ _GL_EXTERN_C int gl_isinfl (long double x);
sizeof (x) == sizeof (double) ? gl_isinfd (x) : \
gl_isinff (x))
# endif
+# ifdef __cplusplus
+# ifdef isinf
+_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf)
+# undef isinf
+_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf)
+# endif
+# endif
#elif defined GNULIB_POSIXCHECK
# if defined isinf
_GL_WARN_REAL_FLOATING_DECL (isinf);
@@ -690,7 +2142,7 @@ _GL_EXTERN_C int isnand (double x);
/* Test whether X is a NaN. */
# undef isnanl
# define isnanl rpl_isnanl
-_GL_EXTERN_C int isnanl (long double x);
+_GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST;
# endif
#endif
@@ -716,7 +2168,7 @@ _GL_EXTERN_C int rpl_isnand (double x);
# if @HAVE_ISNANL@ && __GNUC__ >= 4
# define gl_isnan_l(x) __builtin_isnanl ((long double)(x))
# else
-_GL_EXTERN_C int rpl_isnanl (long double x);
+_GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST;
# define gl_isnan_l(x) rpl_isnanl (x)
# endif
# undef isnan
@@ -731,9 +2183,17 @@ _GL_EXTERN_C int rpl_isnanl (long double x);
sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \
__builtin_isnanf ((float)(x)))
# endif
+# ifdef __cplusplus
+# ifdef isnan
+_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan)
+# undef isnan
+_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan)
+# endif
+# else
/* Ensure isnan is a macro. */
-# ifndef isnan
-# define isnan isnan
+# ifndef isnan
+# define isnan isnan
+# endif
# endif
#elif defined GNULIB_POSIXCHECK
# if defined isnan
@@ -758,7 +2218,7 @@ _GL_WARN_REAL_FLOATING_DECL (isnan);
_GL_EXTERN_C int gl_signbitf (float arg);
_GL_EXTERN_C int gl_signbitd (double arg);
_GL_EXTERN_C int gl_signbitl (long double arg);
-# if __GNUC__ >= 2 && !__STRICT_ANSI__
+# if __GNUC__ >= 2 && !defined __STRICT_ANSI__
# define _GL_NUM_UINT_WORDS(type) \
((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
# if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf
@@ -797,6 +2257,13 @@ _GL_EXTERN_C int gl_signbitl (long double arg);
sizeof (x) == sizeof (double) ? gl_signbitd (x) : \
gl_signbitf (x))
# endif
+# ifdef __cplusplus
+# ifdef signbit
+_GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit)
+# undef signbit
+_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit)
+# endif
+# endif
#elif defined GNULIB_POSIXCHECK
# if defined signbit
_GL_WARN_REAL_FLOATING_DECL (signbit);
@@ -805,6 +2272,7 @@ _GL_WARN_REAL_FLOATING_DECL (signbit);
# endif
#endif
+_GL_INLINE_HEADER_END
-#endif /* _GL_MATH_H */
-#endif /* _GL_MATH_H */
+#endif /* _@GUARD_PREFIX@_MATH_H */
+#endif /* _@GUARD_PREFIX@_MATH_H */
diff --git a/lib/mbrtowc.c b/lib/mbrtowc.c
index d9c25cce..5ee44ae 100644
--- a/lib/mbrtowc.c
+++ b/lib/mbrtowc.c
@@ -1,5 +1,5 @@
/* Convert multibyte character to wide character.
- Copyright (C) 1999-2002, 2005-2011 Free Software Foundation, Inc.
+ Copyright (C) 1999-2002, 2005-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
@@ -128,7 +128,7 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
{
const char *encoding = locale_charset ();
- if (STREQ (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0))
+ if (STREQ_OPT (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0))
{
/* Cf. unistr/u8-mblen.c. */
unsigned char c = (unsigned char) p[0];
@@ -185,7 +185,8 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
/* As a reference for this code, you can use the GNU libiconv
implementation. Look for uses of the RET_TOOFEW macro. */
- if (STREQ (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0))
+ if (STREQ_OPT (encoding,
+ "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0))
{
if (m == 1)
{
@@ -208,9 +209,12 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
}
goto invalid;
}
- if (STREQ (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
- || STREQ (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0)
- || STREQ (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0))
+ if (STREQ_OPT (encoding,
+ "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
+ || STREQ_OPT (encoding,
+ "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0)
+ || STREQ_OPT (encoding,
+ "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0))
{
if (m == 1)
{
@@ -221,7 +225,8 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
}
goto invalid;
}
- if (STREQ (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0))
+ if (STREQ_OPT (encoding,
+ "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0))
{
if (m == 1)
{
@@ -239,7 +244,8 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
}
goto invalid;
}
- if (STREQ (encoding, "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0))
+ if (STREQ_OPT (encoding,
+ "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0))
{
if (m == 1)
{
@@ -272,7 +278,7 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
}
goto invalid;
}
- if (STREQ (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0))
+ if (STREQ_OPT (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0))
{
if (m == 1)
{
@@ -335,7 +341,7 @@ rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
{
static mbstate_t internal_state;
- /* Override mbrtowc's internal state. We can not call mbsinit() on the
+ /* Override mbrtowc's internal state. We cannot call mbsinit() on the
hidden internal state, but we can call it on our variable. */
if (ps == NULL)
ps = &internal_state;
diff --git a/lib/mbsinit.c b/lib/mbsinit.c
index 8ac2137..26fbb7f 100644
--- a/lib/mbsinit.c
+++ b/lib/mbsinit.c
@@ -1,5 +1,5 @@
/* Test for initial conversion state.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/mbtowc-impl.h b/lib/mbtowc-impl.h
index 1645eb5..767ab39 100644
--- a/lib/mbtowc-impl.h
+++ b/lib/mbtowc-impl.h
@@ -1,5 +1,5 @@
/* Convert multibyte character to wide character.
- Copyright (C) 2011 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/mbtowc.c b/lib/mbtowc.c
index b3848a1..632f2e1 100644
--- a/lib/mbtowc.c
+++ b/lib/mbtowc.c
@@ -1,5 +1,5 @@
/* Convert multibyte character to wide character.
- Copyright (C) 2011 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/memchr.c b/lib/memchr.c
index 6d903b1..3db38a9 100644
--- a/lib/memchr.c
+++ b/lib/memchr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2011
+/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2013
Free Software Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
diff --git a/lib/memchr2.c b/lib/memchr2.c
index 2e3c7cd..8b105b7 100644
--- a/lib/memchr2.c
+++ b/lib/memchr2.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2011
+/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2013
Free Software Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
@@ -43,6 +43,7 @@ memchr2 (void const *s, int c1_in, int c2_in, size_t n)
typedef unsigned long int longword;
const unsigned char *char_ptr;
+ void const *void_ptr;
const longword *longword_ptr;
longword repeated_one;
longword repeated_c1;
@@ -57,14 +58,18 @@ memchr2 (void const *s, int c1_in, int c2_in, size_t n)
return memchr (s, c1, n);
/* 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 == c1 || *char_ptr == c2)
- return (void *) char_ptr;
+ Do this until VOID_PTR is aligned on a longword boundary. */
+ for (void_ptr = s;
+ n > 0 && (uintptr_t) void_ptr % sizeof (longword) != 0;
+ --n)
+ {
+ char_ptr = void_ptr;
+ if (*char_ptr == c1 || *char_ptr == c2)
+ return (void *) void_ptr;
+ void_ptr = char_ptr + 1;
+ }
- longword_ptr = (const longword *) char_ptr;
+ longword_ptr = void_ptr;
/* All these elucidatory comments refer to 4-byte longwords,
but the theory applies equally well to any size longwords. */
@@ -125,7 +130,7 @@ memchr2 (void const *s, int c1_in, int c2_in, size_t n)
significant bytes (positions j+1..3), but it does not matter since we
already have a non-zero bit at position 8*j+7.
- Similary, we compute tmp2 =
+ Similarly, we compute tmp2 =
((longword2 - repeated_one) & ~longword2) & (repeated_one << 7).
The test whether any byte in longword1 or longword2 is zero is equivalent
diff --git a/lib/memchr2.h b/lib/memchr2.h
index e575223..cc04889 100644
--- a/lib/memchr2.h
+++ b/lib/memchr2.h
@@ -1,5 +1,5 @@
/* Scan memory for the first of two bytes.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -24,7 +24,8 @@ extern "C" {
char) that occurs within N bytes of the memory region S. If
neither byte appears, return NULL. */
-extern void *memchr2 (void const *s, int c1, int c2, size_t n);
+extern void *memchr2 (void const *s, int c1, int c2, size_t n)
+ _GL_ATTRIBUTE_PURE;
#ifdef __cplusplus
}
diff --git a/lib/mkdtemp.c b/lib/mkdtemp.c
index ac38c25..6ba8b65 100644
--- a/lib/mkdtemp.c
+++ b/lib/mkdtemp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2001-2003, 2006-2007, 2009-2011 Free Software
+/* Copyright (C) 1999, 2001-2003, 2006-2007, 2009-2013 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/mkstemp-safer.c b/lib/mkstemp-safer.c
index b0380e8..6431f82 100644
--- a/lib/mkstemp-safer.c
+++ b/lib/mkstemp-safer.c
@@ -1,6 +1,6 @@
/* Invoke mkstemp, but avoid some glitches.
- Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/mkstemp.c b/lib/mkstemp.c
index b0a8df3..7a9af6c 100644
--- a/lib/mkstemp.c
+++ b/lib/mkstemp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2011 Free Software
+/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2013 Free Software
Foundation, Inc.
This file is derived from the one in the GNU C Library.
@@ -38,7 +38,11 @@
/* 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. */
+ 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)
{
diff --git a/lib/msvc-inval.c b/lib/msvc-inval.c
new file mode 100644
index 0000000..396031e
--- /dev/null
+++ b/lib/msvc-inval.c
@@ -0,0 +1,129 @@
+/* Invalid parameter handler for MSVC runtime libraries.
+ 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 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 <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* 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 <stdlib.h>
+
+# 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 <windows.h>
+
+# 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 &not_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 = &not_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/lib/msvc-inval.h b/lib/msvc-inval.h
new file mode 100644
index 0000000..dcb0353
--- /dev/null
+++ b/lib/msvc-inval.h
@@ -0,0 +1,222 @@
+/* Invalid parameter handler for MSVC runtime libraries.
+ 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 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 <http://www.gnu.org/licenses/>. */
+
+#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
+ {
+ <Code that can trigger an invalid parameter notification
+ but does not do 'return', 'break', 'continue', nor 'goto'.>
+ }
+ CATCH_MSVC_INVAL
+ {
+ <Code that handles an invalid parameter notification
+ but does not do 'return', 'break', 'continue', nor 'goto'.>
+ }
+ 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 <excpt.h>
+
+/* Gnulib can define its own status codes, as described in the page
+ "Raising Software Exceptions" on microsoft.com
+ <http://msdn.microsoft.com/en-us/library/het71c37.aspx>.
+ 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
+ <http://msdn.microsoft.com/en-us/library/s58ftw19.aspx>.
+ 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 <setjmp.h>
+
+# 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/lib/msvc-nothrow.c b/lib/msvc-nothrow.c
new file mode 100644
index 0000000..8d65472
--- /dev/null
+++ b/lib/msvc-nothrow.c
@@ -0,0 +1,49 @@
+/* Wrappers that don't throw invalid parameter notifications
+ with MSVC runtime libraries.
+ 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 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 <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "msvc-nothrow.h"
+
+/* Get declarations of the native Windows API functions. */
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+
+#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/lib/msvc-nothrow.h b/lib/msvc-nothrow.h
new file mode 100644
index 0000000..5f52181
--- /dev/null
+++ b/lib/msvc-nothrow.h
@@ -0,0 +1,43 @@
+/* Wrappers that don't throw invalid parameter notifications
+ with MSVC runtime libraries.
+ 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 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 <http://www.gnu.org/licenses/>. */
+
+#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 <io.h>
+
+# 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/lib/nl_langinfo.c b/lib/nl_langinfo.c
index 8406ff1..771c953 100644
--- a/lib/nl_langinfo.c
+++ b/lib/nl_langinfo.c
@@ -1,6 +1,6 @@
/* nl_langinfo() replacement: query locale dependent information.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -141,7 +141,8 @@ nl_langinfo (nl_item item)
{
static char buf[2 + 10 + 1];
- /* Woe32 has a function returning the locale's codepage as a number. */
+ /* The Windows API has a function returning the locale's codepage as
+ a number. */
sprintf (buf, "CP%u", GetACP ());
return buf;
}
diff --git a/lib/obstack.c b/lib/obstack.c
index f31a2e9..d915449 100644
--- a/lib/obstack.c
+++ b/lib/obstack.c
@@ -1,6 +1,6 @@
/* obstack.c - subroutines used implicitly by object stack macros
- Copyright (C) 1988-1994, 1996-2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 1988-1994, 1996-2006, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -34,7 +34,7 @@
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
+ 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. */
#include <stdio.h> /* Random thing to get __GNU_LIBRARY__. */
@@ -74,23 +74,23 @@ enum
/* When we copy a long block of data, this is the unit to do it with.
On some machines, copying successive ints does not work;
- in such a case, redefine COPYING_UNIT to `long' (if that works)
- or `char' as a last resort. */
+ in such a case, redefine COPYING_UNIT to 'long' (if that works)
+ or 'char' as a last resort. */
# ifndef COPYING_UNIT
# define COPYING_UNIT int
# endif
-/* The functions allocating more room by calling `obstack_chunk_alloc'
- jump to the handler pointed to by `obstack_alloc_failed_handler'.
+/* The functions allocating more room by calling 'obstack_chunk_alloc'
+ jump to the handler pointed to by 'obstack_alloc_failed_handler'.
This can be set to a user defined function which should either
abort gracefully or use longjump - but shouldn't return. This
variable by default points to the internal function
- `print_and_abort'. */
-static void print_and_abort (void);
+ 'print_and_abort'. */
+static _Noreturn void print_and_abort (void);
void (*obstack_alloc_failed_handler) (void) = print_and_abort;
-/* Exit value used when `print_and_abort' is used. */
+/* Exit value used when 'print_and_abort' is used. */
# include <stdlib.h>
# ifdef _LIBC
int obstack_exit_failure = EXIT_FAILURE;
@@ -401,15 +401,7 @@ _obstack_memory_used (struct obstack *h)
# include <libio/iolibio.h>
# endif
-# ifndef __attribute__
-/* This feature is available in gcc versions 2.5 and later. */
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
-# define __attribute__(Spec) /* empty */
-# endif
-# endif
-
-static void
-__attribute__ ((noreturn))
+static _Noreturn void
print_and_abort (void)
{
/* Don't change any of these strings. Yes, it would be possible to add
diff --git a/lib/obstack.h b/lib/obstack.h
index 8a8d44b..7cf98ed 100644
--- a/lib/obstack.h
+++ b/lib/obstack.h
@@ -1,5 +1,5 @@
/* obstack.h - object stack macros
- Copyright (C) 1988-1994, 1996-1999, 2003-2006, 2009-2011 Free Software
+ Copyright (C) 1988-1994, 1996-1999, 2003-2006, 2009-2013 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
@@ -32,11 +32,11 @@ stack" is typically an immature growing object, while the rest of the
stack is of mature, fixed size and fixed address objects.
These routines grab large chunks of memory, using a function you
-supply, called `obstack_chunk_alloc'. On occasion, they free chunks,
-by calling `obstack_chunk_free'. You must define them and declare
+supply, called 'obstack_chunk_alloc'. On occasion, they free chunks,
+by calling 'obstack_chunk_free'. You must define them and declare
them before using any obstack macros.
-Each independent stack is represented by a `struct obstack'.
+Each independent stack is represented by a 'struct obstack'.
Each of the obstack macros expects a pointer to such a structure
as the first argument.
@@ -93,7 +93,7 @@ Summary:
Exactly one object is growing in an obstack at any one time.
You can run one obstack per control block.
You may have as many control blocks as you dare.
- Because of the way we do it, you can `unwind' an obstack
+ Because of the way we do it, you can "unwind" an obstack
back to a previous state. (You may remove objects much
as you would with a stack.)
*/
@@ -122,7 +122,7 @@ Summary:
#define __BPTR_ALIGN(B, P, A) ((B) + (((P) - (B) + (A)) & ~(A)))
-/* Similiar to _BPTR_ALIGN (B, P, A), except optimize the common case
+/* Similar to _BPTR_ALIGN (B, P, A), except optimize the common case
where pointers can be converted to integers, aligned as integers,
and converted back again. If PTR_INT_TYPE is narrower than a
pointer (e.g., the AS/400), play it safe and compute the alignment
@@ -159,7 +159,7 @@ struct obstack /* control current object in current chunk */
void *tempptr;
} temp; /* Temporary for some macros. */
int alignment_mask; /* Mask of alignment for each object. */
- /* These prototypes vary based on `use_extra_arg', and we use
+ /* These prototypes vary based on 'use_extra_arg', and we use
casts to the prototypeless function type in all assignments,
but having prototypes here quiets -Wstrict-prototypes. */
struct _obstack_chunk *(*chunkfun) (void *, long);
@@ -193,13 +193,13 @@ extern int _obstack_memory_used (struct obstack *);
extern void __obstack_free (struct obstack *obstack, void *block);
-/* Error handler called when `obstack_chunk_alloc' failed to allocate
+/* Error handler called when 'obstack_chunk_alloc' failed to allocate
more memory. This can be set to a user defined function which
should either abort gracefully or use longjump - but shouldn't
return. The default action is to print a message and abort. */
extern void (*obstack_alloc_failed_handler) (void);
-/* Exit value used when `print_and_abort' is used. */
+/* Exit value used when 'print_and_abort' is used. */
extern int obstack_exit_failure;
/* Pointer to beginning of object being allocated or to be allocated next.
@@ -253,7 +253,7 @@ extern int obstack_exit_failure;
#define obstack_memory_used(h) _obstack_memory_used (h)
-#if defined __GNUC__ && defined __STDC__ && __STDC__
+#if defined __GNUC__
/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
does not implement __extension__. But that compiler doesn't define
__GNUC_MINOR__. */
@@ -264,7 +264,7 @@ extern int obstack_exit_failure;
/* For GNU C, if not -traditional,
we can define these macros to compute all args only once
without using a global variable.
- Also, we can avoid using the `temp' slot, to make faster code. */
+ Also, we can avoid using the 'temp' slot, to make faster code. */
# define obstack_object_size(OBSTACK) \
__extension__ \
@@ -342,14 +342,16 @@ __extension__ \
# define obstack_ptr_grow_fast(OBSTACK,aptr) \
__extension__ \
({ struct obstack *__o1 = (OBSTACK); \
- *(const void **) __o1->next_free = (aptr); \
+ void *__p1 = __o1->next_free; \
+ *(const void **) __p1 = (aptr); \
__o1->next_free += sizeof (const void *); \
(void) 0; })
# define obstack_int_grow_fast(OBSTACK,aint) \
__extension__ \
({ struct obstack *__o1 = (OBSTACK); \
- *(int *) __o1->next_free = (aint); \
+ void *__p1 = __o1->next_free; \
+ *(int *) __p1 = (aint); \
__o1->next_free += sizeof (int); \
(void) 0; })
@@ -405,7 +407,7 @@ __extension__ \
__o->next_free = __o->object_base = (char *)__obj; \
else (__obstack_free) (__o, __obj); })
-#else /* not __GNUC__ or not __STDC__ */
+#else /* not __GNUC__ */
# define obstack_object_size(h) \
(unsigned) ((h)->next_free - (h)->object_base)
@@ -503,7 +505,7 @@ __extension__ \
= (h)->temp.tempint + (char *) (h)->chunk) \
: (((__obstack_free) ((h), (h)->temp.tempint + (char *) (h)->chunk), 0), 0)))
-#endif /* not __GNUC__ or not __STDC__ */
+#endif /* not __GNUC__ */
#ifdef __cplusplus
} /* C++ */
diff --git a/lib/open.c b/lib/open.c
index 2e2cc74..a0c43ea 100644
--- a/lib/open.c
+++ b/lib/open.c
@@ -1,5 +1,5 @@
/* Open a descriptor to a file.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -16,22 +16,27 @@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+/* If the user's config.h happens to include <fcntl.h>, let it include only
+ the system's <fcntl.h> here, so that orig_open doesn't recurse to
+ rpl_open. */
+#define __need_system_fcntl_h
#include <config.h>
/* Get the original definition of open. It might be defined as a macro. */
-#define __need_system_fcntl_h
#include <fcntl.h>
-#undef __need_system_fcntl_h
#include <sys/types.h>
+#undef __need_system_fcntl_h
-static inline int
+static int
orig_open (const char *filename, int flags, mode_t mode)
{
return open (filename, flags, mode);
}
/* Specification. */
-#include <fcntl.h>
+/* Write "fcntl.h" here, not <fcntl.h>, otherwise OSF/1 5.1 DTK cc eliminates
+ this include because of the preliminary #include <fcntl.h> above. */
+#include "fcntl.h"
#include <errno.h>
#include <stdarg.h>
@@ -63,6 +68,15 @@ open (const char *filename, int flags, ...)
va_end (arg);
}
+#if GNULIB_defined_O_NONBLOCK
+ /* The only known platform that lacks O_NONBLOCK is mingw, but it
+ also lacks named pipes and Unix sockets, which are the only two
+ file types that require non-blocking handling in open().
+ Therefore, it is safe to ignore O_NONBLOCK here. It is handy
+ that mingw also lacks openat(), so that is also covered here. */
+ flags &= ~O_NONBLOCK;
+#endif
+
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
if (strcmp (filename, "/dev/null") == 0)
filename = "NUL";
diff --git a/lib/pathmax.h b/lib/pathmax.h
index d471240..a9ddc33 100644
--- a/lib/pathmax.h
+++ b/lib/pathmax.h
@@ -1,5 +1,5 @@
/* Define PATH_MAX somehow. Requires sys/types.h.
- Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2011 Free Software
+ Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2013 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -13,12 +13,32 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#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.
+ <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html>
+ PATH_MAX is not defined on systems which have no limit on filename length,
+ such as GNU/Hurd.
+
+ This file does *not* define PATH_MAX always. Programs that use this file
+ can handle the GNU/Hurd case in several ways:
+ - Either with a package-wide handling, or with a per-file handling,
+ - Either through a
+ #ifdef PATH_MAX
+ or through a fallback like
+ #ifndef PATH_MAX
+ # define PATH_MAX 8192
+ #endif
+ or through a fallback like
+ #ifndef PATH_MAX
+ # define PATH_MAX pathconf ("/", _PC_PATH_MAX)
+ #endif
+ */
+
# include <unistd.h>
# include <limits.h>
@@ -27,11 +47,6 @@
# define _POSIX_PATH_MAX 256
# endif
-# if !defined PATH_MAX && defined _PC_PATH_MAX && defined HAVE_PATHCONF
-# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 \
- : pathconf ("/", _PC_PATH_MAX))
-# endif
-
/* Don't include sys/param.h if it already has been. */
# if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
# include <sys/param.h>
@@ -41,8 +56,28 @@
# define PATH_MAX MAXPATHLEN
# endif
-# ifndef PATH_MAX
-# define PATH_MAX _POSIX_PATH_MAX
+# ifdef __hpux
+/* On HP-UX, PATH_MAX designates the maximum number of bytes in a filename,
+ *not* including the terminating NUL byte, and is set to 1023.
+ Additionally, when _XOPEN_SOURCE is defined to 500 or more, PATH_MAX is
+ not defined at all any more. */
+# undef PATH_MAX
+# define PATH_MAX 1024
+# endif
+
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* The page "Naming Files, Paths, and Namespaces" on msdn.microsoft.com,
+ section "Maximum Path Length Limitation",
+ <http://msdn.microsoft.com/en-us/library/aa365247(v=vs.85).aspx#maxpath>
+ 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 <stdio.h>,
+ - _MAX_PATH in <stdlib.h>,
+ - MAX_PATH in <windef.h>.
+ Undefine the original value, because mingw's <limits.h> gets it wrong. */
+# undef PATH_MAX
+# define PATH_MAX 260
# endif
#endif /* _PATHMAX_H */
diff --git a/lib/pipe-safer.c b/lib/pipe-safer.c
index 928312b..f2e0ad6 100644
--- a/lib/pipe-safer.c
+++ b/lib/pipe-safer.c
@@ -1,5 +1,5 @@
/* Invoke pipe, but avoid some glitches.
- Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/pipe2-safer.c b/lib/pipe2-safer.c
index 4249c03..e831d0c 100644
--- a/lib/pipe2-safer.c
+++ b/lib/pipe2-safer.c
@@ -1,5 +1,5 @@
/* Invoke pipe2, but avoid some glitches.
- Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/pipe2.c b/lib/pipe2.c
index a326754..211d755 100644
--- a/lib/pipe2.c
+++ b/lib/pipe2.c
@@ -1,5 +1,5 @@
/* Create a pipe, with specific opening flags.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
@@ -24,9 +23,14 @@
#include <fcntl.h>
#include "binary-io.h"
+#include "verify.h"
+
+#if GNULIB_defined_O_NONBLOCK
+# include "nonblocking.h"
+#endif
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* Native Woe32 API. */
+/* Native Windows API. */
# include <io.h>
@@ -35,6 +39,13 @@
int
pipe2 (int fd[2], int flags)
{
+ /* Mingw _pipe() corrupts fd on failure; also, if we succeed at
+ creating the pipe but later fail at changing fcntl, we want
+ to leave fd unchanged: http://austingroupbugs.net/view.php?id=467 */
+ int tmp[2];
+ tmp[0] = fd[0];
+ tmp[1] = fd[1];
+
#if HAVE_PIPE2
# undef pipe2
/* Try the system call first, if it exists. (We may be running with a glibc
@@ -55,35 +66,53 @@ pipe2 (int fd[2], int flags)
}
#endif
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* Native Woe32 API. */
-
/* Check the supported flags. */
- if ((flags & ~(O_CLOEXEC | O_BINARY | O_TEXT)) != 0)
+ if ((flags & ~(O_CLOEXEC | O_NONBLOCK | O_BINARY | O_TEXT)) != 0)
{
errno = EINVAL;
return -1;
}
- return _pipe (fd, 4096, flags);
-
-#else
-/* Unix API. */
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Native Windows API. */
- /* Check the supported flags. */
- if ((flags & ~(O_CLOEXEC | O_NONBLOCK | O_TEXT | O_BINARY)) != 0)
+ if (_pipe (fd, 4096, flags & ~O_NONBLOCK) < 0)
{
- errno = EINVAL;
+ fd[0] = tmp[0];
+ fd[1] = tmp[1];
return -1;
}
+ /* O_NONBLOCK handling.
+ On native Windows platforms, O_NONBLOCK is defined by gnulib. Use the
+ functions defined by the gnulib module 'nonblocking'. */
+# if GNULIB_defined_O_NONBLOCK
+ if (flags & O_NONBLOCK)
+ {
+ if (set_nonblocking_flag (fd[0], true) != 0
+ || set_nonblocking_flag (fd[1], true) != 0)
+ goto fail;
+ }
+# else
+ {
+ verify (O_NONBLOCK == 0);
+ }
+# endif
+
+ return 0;
+
+#else
+/* Unix API. */
+
if (pipe (fd) < 0)
return -1;
/* POSIX <http://www.opengroup.org/onlinepubs/9699919799/functions/pipe.html>
says that initially, the O_NONBLOCK and FD_CLOEXEC flags are cleared on
- both fd[0] amd fd[1]. */
+ both fd[0] and fd[1]. */
+ /* O_NONBLOCK handling.
+ On Unix platforms, O_NONBLOCK is defined by the system. Use fcntl(). */
if (flags & O_NONBLOCK)
{
int fcntl_flags;
@@ -109,26 +138,31 @@ pipe2 (int fd[2], int flags)
# if O_BINARY
if (flags & O_BINARY)
{
- setmode (fd[1], O_BINARY);
- setmode (fd[0], O_BINARY);
+ set_binary_mode (fd[1], O_BINARY);
+ set_binary_mode (fd[0], O_BINARY);
}
else if (flags & O_TEXT)
{
- setmode (fd[1], O_TEXT);
- setmode (fd[0], O_TEXT);
+ set_binary_mode (fd[1], O_TEXT);
+ set_binary_mode (fd[0], O_TEXT);
}
# endif
return 0;
+#endif
+
+#if GNULIB_defined_O_NONBLOCK || \
+ !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
fail:
{
int saved_errno = errno;
close (fd[0]);
close (fd[1]);
+ fd[0] = tmp[0];
+ fd[1] = tmp[1];
errno = saved_errno;
return -1;
}
-
#endif
}
diff --git a/lib/printf-args.c b/lib/printf-args.c
index 8f3727b..c27e6bc 100644
--- a/lib/printf-args.c
+++ b/lib/printf-args.c
@@ -1,5 +1,5 @@
/* Decomposed printf argument list.
- Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2011 Free Software
+ Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2013 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ with this program; if not, see <http://www.gnu.org/licenses/>. */
/* This file can be parametrized with the following macros:
ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions.
diff --git a/lib/printf-args.h b/lib/printf-args.h
index 70cca4f..2a9c2a3 100644
--- a/lib/printf-args.h
+++ b/lib/printf-args.h
@@ -1,5 +1,5 @@
/* Decomposed printf argument list.
- Copyright (C) 1999, 2002-2003, 2006-2007, 2011 Free Software
+ Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2013 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ with this program; if not, see <http://www.gnu.org/licenses/>. */
#ifndef _PRINTF_ARGS_H
#define _PRINTF_ARGS_H
diff --git a/lib/printf-frexp.c b/lib/printf-frexp.c
index 7f7e0ec..1a7b0c4 100644
--- a/lib/printf-frexp.c
+++ b/lib/printf-frexp.c
@@ -1,5 +1,5 @@
/* Split a double into fraction and mantissa, for hexadecimal printf.
- Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,7 +14,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include <config.h>
+#if ! defined USE_LONG_DOUBLE
+# include <config.h>
+#endif
/* Specification. */
#ifdef USE_LONG_DOUBLE
diff --git a/lib/printf-frexp.h b/lib/printf-frexp.h
index 10dd371..3976b73 100644
--- a/lib/printf-frexp.h
+++ b/lib/printf-frexp.h
@@ -1,5 +1,5 @@
/* Split a double into fraction and mantissa, for hexadecimal printf.
- Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/printf-frexpl.c b/lib/printf-frexpl.c
index f19f321..26987a7 100644
--- a/lib/printf-frexpl.c
+++ b/lib/printf-frexpl.c
@@ -1,5 +1,5 @@
/* Split a 'long double' into fraction and mantissa, for hexadecimal printf.
- Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,5 +14,24 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#define USE_LONG_DOUBLE
-#include "printf-frexp.c"
+#include <config.h>
+
+#if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
+
+/* Specification. */
+# include "printf-frexpl.h"
+
+# include "printf-frexp.h"
+
+long double
+printf_frexpl (long double x, int *expptr)
+{
+ return printf_frexp (x, expptr);
+}
+
+#else
+
+# define USE_LONG_DOUBLE
+# include "printf-frexp.c"
+
+#endif
diff --git a/lib/printf-frexpl.h b/lib/printf-frexpl.h
index a8cbcbf..3768b09 100644
--- a/lib/printf-frexpl.h
+++ b/lib/printf-frexpl.h
@@ -1,5 +1,5 @@
/* Split a 'long double' into fraction and mantissa, for hexadecimal printf.
- Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/printf-parse.c b/lib/printf-parse.c
index ff24ba4..23cacc1 100644
--- a/lib/printf-parse.c
+++ b/lib/printf-parse.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 1999-2000, 2002-2003, 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 1999-2000, 2002-2003, 2006-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ with this program; if not, see <http://www.gnu.org/licenses/>. */
/* This file can be parametrized with the following macros:
CHAR_T The element type of the format string.
@@ -402,7 +401,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
cp++;
}
#if defined __APPLE__ && defined __MACH__
- /* On MacOS X 10.3, PRIdMAX is defined as "qd".
+ /* On Mac OS X 10.3, PRIdMAX is defined as "qd".
We cannot change it to "lld" because PRIdMAX must also
be understood by the system's printf routines. */
else if (*cp == 'q')
@@ -421,7 +420,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
}
#endif
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
- /* On native Win32, PRIdMAX is defined as "I64d".
+ /* On native Windows, PRIdMAX is defined as "I64d".
We cannot change it to "lld" because PRIdMAX must also
be understood by the system's printf routines. */
else if (*cp == 'I' && cp[1] == '6' && cp[2] == '4')
diff --git a/lib/printf-parse.h b/lib/printf-parse.h
index 76e5ba3..d8474be 100644
--- a/lib/printf-parse.h
+++ b/lib/printf-parse.h
@@ -1,5 +1,5 @@
/* Parse printf format string.
- Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2011 Free Software
+ Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2013 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ with this program; if not, see <http://www.gnu.org/licenses/>. */
#ifndef _PRINTF_PARSE_H
#define _PRINTF_PARSE_H
diff --git a/lib/progname.c b/lib/progname.c
index 2465748..0c195e5 100644
--- a/lib/progname.c
+++ b/lib/progname.c
@@ -1,5 +1,5 @@
/* Program name management.
- Copyright (C) 2001-2003, 2005-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/progname.h b/lib/progname.h
index 0844066..b4f3c27 100644
--- a/lib/progname.h
+++ b/lib/progname.h
@@ -1,5 +1,5 @@
/* Program name management.
- Copyright (C) 2001-2004, 2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006, 2009-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/quote.h b/lib/quote.h
new file mode 100644
index 0000000..1679796
--- /dev/null
+++ b/lib/quote.h
@@ -0,0 +1,46 @@
+/* quote.h - prototypes for quote.c
+
+ Copyright (C) 1998-2001, 2003, 2009-2013 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef QUOTE_H_
+# define QUOTE_H_ 1
+
+# include <stddef.h>
+
+/* The quoting options used by quote_n and quote. Its type is incomplete,
+ so it's useful only in expressions like '&quote_quoting_options'. */
+extern struct quoting_options quote_quoting_options;
+
+/* Return an unambiguous printable representation of ARG (of size
+ ARGSIZE), allocated in slot N, suitable for diagnostics. If
+ ARGSIZE is SIZE_MAX, use the string length of the argument for
+ ARGSIZE. */
+char const *quote_n_mem (int n, char const *arg, size_t argsize);
+
+/* Return an unambiguous printable representation of ARG (of size
+ ARGSIZE), suitable for diagnostics. If ARGSIZE is SIZE_MAX, use
+ the string length of the argument for ARGSIZE. */
+char const *quote_mem (char const *arg, size_t argsize);
+
+/* Return an unambiguous printable representation of ARG, allocated in
+ slot N, suitable for diagnostics. */
+char const *quote_n (int n, char const *arg);
+
+/* Return an unambiguous printable representation of ARG, suitable for
+ diagnostics. */
+char const *quote (char const *arg);
+
+#endif /* !QUOTE_H_ */
diff --git a/lib/quotearg.c b/lib/quotearg.c
index fb49559..40114d7 100644
--- a/lib/quotearg.c
+++ b/lib/quotearg.c
@@ -1,6 +1,6 @@
/* quotearg.c - quote arguments for output
- Copyright (C) 1998-2002, 2004-2011 Free Software Foundation, Inc.
+ Copyright (C) 1998-2002, 2004-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,11 +17,21 @@
/* Written by Paul Eggert <eggert@twinsun.com> */
+/* Without this pragma, gcc 4.7.0 20111124 mistakenly suggests that
+ the quoting_options_from_style function might be candidate for
+ attribute 'pure' */
+#if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
+# pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
+#endif
+
#include <config.h>
#include "quotearg.h"
+#include "quote.h"
#include "xalloc.h"
+#include "c-strcaseeq.h"
+#include "localcharset.h"
#include <ctype.h>
#include <errno.h>
@@ -165,25 +175,54 @@ set_custom_quoting (struct quoting_options *o,
}
/* Return quoting options for STYLE, with no extra quoting. */
-static struct quoting_options
+static struct quoting_options /* NOT PURE!! */
quoting_options_from_style (enum quoting_style style)
{
- struct quoting_options o;
+ struct quoting_options o = { 0, 0, { 0 }, NULL, NULL };
+ if (style == custom_quoting_style)
+ abort ();
o.style = style;
- o.flags = 0;
- memset (o.quote_these_too, 0, sizeof o.quote_these_too);
return o;
}
/* MSGID approximates a quotation mark. Return its translation if it
- has one; otherwise, return either it or "\"", depending on S. */
+ has one; otherwise, return either it or "\"", depending on S.
+
+ S is either clocale_quoting_style or locale_quoting_style. */
static char const *
gettext_quote (char const *msgid, enum quoting_style s)
{
char const *translation = _(msgid);
- if (translation == msgid && s == clocale_quoting_style)
- translation = "\"";
- return translation;
+ char const *locale_code;
+
+ if (translation != msgid)
+ return translation;
+
+ /* For UTF-8 and GB-18030, use single quotes U+2018 and U+2019.
+ Here is a list of other locales that include U+2018 and U+2019:
+
+ ISO-8859-7 0xA1 KOI8-T 0x91
+ CP869 0x8B CP874 0x91
+ CP932 0x81 0x65 CP936 0xA1 0xAE
+ CP949 0xA1 0xAE CP950 0xA1 0xA5
+ CP1250 0x91 CP1251 0x91
+ CP1252 0x91 CP1253 0x91
+ CP1254 0x91 CP1255 0x91
+ CP1256 0x91 CP1257 0x91
+ EUC-JP 0xA1 0xC6 EUC-KR 0xA1 0xAE
+ EUC-TW 0xA1 0xE4 BIG5 0xA1 0xA5
+ BIG5-HKSCS 0xA1 0xA5 EUC-CN 0xA1 0xAE
+ GBK 0xA1 0xAE Georgian-PS 0x91
+ PT154 0x91
+
+ None of these is still in wide use; using iconv is overkill. */
+ locale_code = locale_charset ();
+ if (STRCASEEQ (locale_code, "UTF-8", 'U','T','F','-','8',0,0,0,0))
+ return msgid[0] == '`' ? "\xe2\x80\x98": "\xe2\x80\x99";
+ if (STRCASEEQ (locale_code, "GB18030", 'G','B','1','8','0','3','0',0,0))
+ return msgid[0] == '`' ? "\xa1\ae": "\xa1\xaf";
+
+ return (s == clocale_quoting_style ? "\"" : "'");
}
/* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of
@@ -251,22 +290,24 @@ quotearg_buffer_restyled (char *buffer, size_t buffersize,
{
/* TRANSLATORS:
Get translations for open and closing quotation marks.
-
The message catalog should translate "`" to a left
quotation mark suitable for the locale, and similarly for
- "'". If the catalog has no translation,
- locale_quoting_style quotes `like this', and
- clocale_quoting_style quotes "like this".
-
- For example, an American English Unicode locale should
- translate "`" to U+201C (LEFT DOUBLE QUOTATION MARK), and
- should translate "'" to U+201D (RIGHT DOUBLE QUOTATION
- MARK). A British English Unicode locale should instead
- translate these to U+2018 (LEFT SINGLE QUOTATION MARK)
- and U+2019 (RIGHT SINGLE QUOTATION MARK), respectively.
+ "'". For example, a French Unicode local should translate
+ these to U+00AB (LEFT-POINTING DOUBLE ANGLE
+ QUOTATION MARK), and U+00BB (RIGHT-POINTING DOUBLE ANGLE
+ QUOTATION MARK), respectively.
+
+ If the catalog has no translation, we will try to
+ use Unicode U+2018 (LEFT SINGLE QUOTATION MARK) and
+ Unicode U+2019 (RIGHT SINGLE QUOTATION MARK). If the
+ current locale is not Unicode, locale_quoting_style
+ will quote 'like this', and clocale_quoting_style will
+ quote "like this". You should always include translations
+ for "`" and "'" even if U+2018 and U+2019 are appropriate
+ for your locale.
If you don't know what to put here, please see
- <http://en.wikipedia.org/wiki/Quotation_mark#Glyphs>
+ <http://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
and use glyphs suitable for your language. */
left_quote = gettext_quote (N_("`"), quoting_style);
right_quote = gettext_quote (N_("'"), quoting_style);
@@ -307,7 +348,12 @@ quotearg_buffer_restyled (char *buffer, size_t buffersize,
if (backslash_escapes
&& quote_string_len
- && i + quote_string_len <= argsize
+ && (i + quote_string_len
+ <= (argsize == SIZE_MAX && 1 < quote_string_len
+ /* Use strlen only if we must: when argsize is SIZE_MAX,
+ and when the quote string is more than 1 byte long.
+ If we do call strlen, save the result. */
+ ? (argsize = strlen (arg)) : argsize))
&& memcmp (arg + i, quote_string, quote_string_len) == 0)
{
if (elide_outer_quotes)
@@ -730,7 +776,7 @@ quotearg_n_options (int n, char const *arg, size_t argsize,
if (nslots <= n0)
{
- /* FIXME: technically, the type of n1 should be `unsigned int',
+ /* FIXME: technically, the type of n1 should be 'unsigned int',
but that evokes an unsuppressible warning from gcc-4.0.1 and
older. If gcc ever provides an option to suppress that warning,
revert to the original type, so that the test in xalloc_oversized
@@ -886,3 +932,37 @@ quotearg_custom_mem (char const *left_quote, char const *right_quote,
return quotearg_n_custom_mem (0, left_quote, right_quote, arg,
argsize);
}
+
+
+/* The quoting option used by the functions of quote.h. */
+struct quoting_options quote_quoting_options =
+ {
+ locale_quoting_style,
+ 0,
+ { 0 },
+ NULL, NULL
+ };
+
+char const *
+quote_n_mem (int n, char const *arg, size_t argsize)
+{
+ return quotearg_n_options (n, arg, argsize, &quote_quoting_options);
+}
+
+char const *
+quote_mem (char const *arg, size_t argsize)
+{
+ return quote_n_mem (0, arg, argsize);
+}
+
+char const *
+quote_n (int n, char const *arg)
+{
+ return quote_n_mem (n, arg, SIZE_MAX);
+}
+
+char const *
+quote (char const *arg)
+{
+ return quote_n (0, arg);
+}
diff --git a/lib/quotearg.h b/lib/quotearg.h
index 2756d76..58ee3f6 100644
--- a/lib/quotearg.h
+++ b/lib/quotearg.h
@@ -1,6 +1,6 @@
/* quotearg.h - quote arguments for output
- Copyright (C) 1998-2002, 2004, 2006, 2008-2011 Free Software Foundation,
+ Copyright (C) 1998-2002, 2004, 2006, 2008-2013 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
@@ -112,8 +112,10 @@ enum quoting_style
*/
escape_quoting_style,
- /* Like clocale_quoting_style, but quote `like this' instead of
- "like this" in the default C locale (ls --quoting-style=locale).
+ /* Like clocale_quoting_style, but use single quotes in the
+ default C locale or if the program does not use gettext
+ (ls --quoting-style=locale). For UTF-8 locales, quote
+ characters will use Unicode.
LC_MESSAGES=C
quotearg_buffer:
diff --git a/lib/raise.c b/lib/raise.c
new file mode 100644
index 0000000..5b546d2
--- /dev/null
+++ b/lib/raise.c
@@ -0,0 +1,79 @@
+/* Provide a non-threads replacement for the POSIX raise function.
+
+ Copyright (C) 2002-2003, 2005-2006, 2009-2013 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* written by Jim Meyering and Bruno Haible */
+
+#include <config.h>
+
+/* Specification. */
+#include <signal.h>
+
+#if HAVE_RAISE
+/* Native Windows platform. */
+
+# include <errno.h>
+
+# include "msvc-inval.h"
+
+# undef raise
+
+# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+static int
+raise_nothrow (int sig)
+{
+ int result;
+
+ TRY_MSVC_INVAL
+ {
+ result = raise (sig);
+ }
+ CATCH_MSVC_INVAL
+ {
+ result = -1;
+ errno = EINVAL;
+ }
+ DONE_MSVC_INVAL;
+
+ return result;
+}
+# else
+# define raise_nothrow raise
+# endif
+
+#else
+/* An old Unix platform. */
+
+# include <unistd.h>
+
+# define rpl_raise raise
+
+#endif
+
+int
+rpl_raise (int sig)
+{
+#if GNULIB_defined_signal_blocking && GNULIB_defined_SIGPIPE
+ if (sig == SIGPIPE)
+ return _gl_raise_SIGPIPE ();
+#endif
+
+#if HAVE_RAISE
+ return raise_nothrow (sig);
+#else
+ return kill (getpid (), sig);
+#endif
+}
diff --git a/lib/rawmemchr.c b/lib/rawmemchr.c
index 095a50a..a0298ce 100644
--- a/lib/rawmemchr.c
+++ b/lib/rawmemchr.c
@@ -1,5 +1,5 @@
/* Searching in a string.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/readlink.c b/lib/readlink.c
index 35d045b..f83a1e0 100644
--- a/lib/readlink.c
+++ b/lib/readlink.c
@@ -1,5 +1,5 @@
/* Stub for readlink().
- Copyright (C) 2003-2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2003-2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/ref-add.sin b/lib/ref-add.sin
index a57eaef..112bcdc 100644
--- a/lib/ref-add.sin
+++ b/lib/ref-add.sin
@@ -1,6 +1,6 @@
# Add this package to a list of references stored in a text file.
#
-# Copyright (C) 2000, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2009-2013 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -13,8 +13,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# with this program; if not, see <http://www.gnu.org/licenses/>.
#
# Written by Bruno Haible <haible@clisp.cons.org>.
#
diff --git a/lib/ref-del.sin b/lib/ref-del.sin
index e23097d..6f73868 100644
--- a/lib/ref-del.sin
+++ b/lib/ref-del.sin
@@ -1,6 +1,6 @@
# Remove this package from a list of references stored in a text file.
#
-# Copyright (C) 2000, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2009-2013 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -13,8 +13,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# with this program; if not, see <http://www.gnu.org/licenses/>.
#
# Written by Bruno Haible <haible@clisp.cons.org>.
#
diff --git a/lib/regcomp.c b/lib/regcomp.c
index 747fa40..f0b2e52 100644
--- a/lib/regcomp.c
+++ b/lib/regcomp.c
@@ -1,21 +1,21 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2011 Free Software Foundation, Inc.
+ Copyright (C) 2002-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
- This program is free software; you can redistribute 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.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 3 of the License, or (at your option) any later version.
- This program is distributed in the hope that it will be useful,
+ The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ You should have received a copy of the GNU General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern,
size_t length, reg_syntax_t syntax);
@@ -94,20 +94,20 @@ 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,
+ const char *class_name,
reg_syntax_t syntax);
#else /* not RE_ENABLE_I18N */
static reg_errcode_t build_equiv_class (bitset_t sbcset,
const unsigned char *name);
static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans,
bitset_t sbcset,
- const unsigned char *class_name,
+ const char *class_name,
reg_syntax_t syntax);
#endif /* not RE_ENABLE_I18N */
static bin_tree_t *build_charclass_op (re_dfa_t *dfa,
RE_TRANSLATE_TYPE trans,
- const unsigned char *class_name,
- const unsigned char *extra,
+ const char *class_name,
+ const char *extra,
bool non_match, reg_errcode_t *err);
static bin_tree_t *create_tree (re_dfa_t *dfa,
bin_tree_t *left, bin_tree_t *right,
@@ -206,7 +206,7 @@ static const size_t __re_error_msgid_idx[] =
compiles PATTERN (of length LENGTH) and puts the result in BUFP.
Returns 0 if the pattern was valid, otherwise an error string.
- Assumes the `allocated' (and perhaps `buffer') and `translate' fields
+ Assumes the 'allocated' (and perhaps 'buffer') and 'translate' fields
are set in BUFP on entry. */
#ifdef _LIBC
@@ -241,7 +241,7 @@ re_compile_pattern (const char *pattern, size_t length,
weak_alias (__re_compile_pattern, re_compile_pattern)
#endif
-/* Set by `re_set_syntax' to the current regexp syntax to recognize. Can
+/* Set by 're_set_syntax' to the current regexp syntax to recognize. Can
also be assigned to arbitrarily: each pattern buffer stores its own
syntax, so it can be changed between regex compilations. */
/* This has no initializer because initialized variables in Emacs
@@ -273,7 +273,7 @@ int
re_compile_fastmap (bufp)
struct re_pattern_buffer *bufp;
{
- re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
+ re_dfa_t *dfa = bufp->buffer;
char *fastmap = bufp->fastmap;
memset (fastmap, '\0', sizeof (char) * SBC_MAX);
@@ -292,7 +292,7 @@ weak_alias (__re_compile_fastmap, re_compile_fastmap)
#endif
static inline void
-__attribute ((always_inline))
+__attribute__ ((always_inline))
re_set_fastmap (char *fastmap, bool icase, int ch)
{
fastmap[ch] = 1;
@@ -307,7 +307,7 @@ static void
re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
char *fastmap)
{
- re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
+ re_dfa_t *dfa = bufp->buffer;
Idx node_cnt;
bool icase = (dfa->mb_cur_max == 1 && (bufp->syntax & RE_ICASE));
for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt)
@@ -439,15 +439,15 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
PREG is a regex_t *. We do not expect any fields to be initialized,
since POSIX says we shouldn't. Thus, we set
- `buffer' to the compiled pattern;
- `used' to the length of the compiled pattern;
- `syntax' to RE_SYNTAX_POSIX_EXTENDED if the
+ 'buffer' to the compiled pattern;
+ 'used' to the length of the compiled pattern;
+ 'syntax' to RE_SYNTAX_POSIX_EXTENDED if the
REG_EXTENDED bit in CFLAGS is set; otherwise, to
RE_SYNTAX_POSIX_BASIC;
- `newline_anchor' to REG_NEWLINE being set in CFLAGS;
- `fastmap' to an allocated space for the fastmap;
- `fastmap_accurate' to zero;
- `re_nsub' to the number of subexpressions in PATTERN.
+ 'newline_anchor' to REG_NEWLINE being set in CFLAGS;
+ 'fastmap' to an allocated space for the fastmap;
+ 'fastmap_accurate' to zero;
+ 're_nsub' to the number of subexpressions in PATTERN.
PATTERN is the address of the pattern string.
@@ -586,19 +586,23 @@ weak_alias (__regerror, regerror)
static const bitset_t utf8_sb_map =
{
/* Set the first 128 bits. */
-# if 4 * BITSET_WORD_BITS < ASCII_CHARS
-# error "bitset_word_t is narrower than 32 bits"
-# elif 3 * BITSET_WORD_BITS < ASCII_CHARS
+# if defined __GNUC__ && !defined __STRICT_ANSI__
+ [0 ... 0x80 / BITSET_WORD_BITS - 1] = BITSET_WORD_MAX
+# else
+# if 4 * BITSET_WORD_BITS < ASCII_CHARS
+# error "bitset_word_t is narrower than 32 bits"
+# elif 3 * BITSET_WORD_BITS < ASCII_CHARS
BITSET_WORD_MAX, BITSET_WORD_MAX, BITSET_WORD_MAX,
-# elif 2 * BITSET_WORD_BITS < ASCII_CHARS
+# elif 2 * BITSET_WORD_BITS < ASCII_CHARS
BITSET_WORD_MAX, BITSET_WORD_MAX,
-# elif 1 * BITSET_WORD_BITS < ASCII_CHARS
+# elif 1 * BITSET_WORD_BITS < ASCII_CHARS
BITSET_WORD_MAX,
-# endif
+# endif
(BITSET_WORD_MAX
>> (SBC_MAX % BITSET_WORD_BITS == 0
? 0
: BITSET_WORD_BITS - SBC_MAX % BITSET_WORD_BITS))
+# endif
};
#endif
@@ -657,9 +661,12 @@ void
regfree (preg)
regex_t *preg;
{
- re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+ re_dfa_t *dfa = preg->buffer;
if (BE (dfa != NULL, 1))
- free_dfa_content (dfa);
+ {
+ lock_fini (dfa->lock);
+ free_dfa_content (dfa);
+ }
preg->buffer = NULL;
preg->allocated = 0;
@@ -718,7 +725,7 @@ re_comp (s)
+ __re_error_msgid_idx[(int) REG_ESPACE]);
}
- /* Since `re_exec' always passes NULL for the `regs' argument, we
+ /* Since 're_exec' always passes NULL for the 'regs' argument, we
don't need to initialize the pattern buffer fields which affect it. */
/* Match anchors at newlines. */
@@ -729,7 +736,7 @@ re_comp (s)
if (!ret)
return NULL;
- /* Yes, we're discarding `const' here if !HAVE_LIBINTL. */
+ /* Yes, we're discarding 'const' here if !HAVE_LIBINTL. */
return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]);
}
@@ -764,7 +771,7 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
preg->regs_allocated = REGS_UNALLOCATED;
/* Initialize the dfa. */
- dfa = (re_dfa_t *) preg->buffer;
+ dfa = preg->buffer;
if (BE (preg->allocated < sizeof (re_dfa_t), 0))
{
/* If zero allocated, but buffer is non-null, try to realloc
@@ -775,11 +782,13 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
if (dfa == NULL)
return REG_ESPACE;
preg->allocated = sizeof (re_dfa_t);
- preg->buffer = (unsigned char *) dfa;
+ preg->buffer = dfa;
}
preg->used = sizeof (re_dfa_t);
err = init_dfa (dfa, length);
+ if (BE (err == REG_NOERROR && lock_init (dfa->lock) != 0, 0))
+ err = REG_ESPACE;
if (BE (err != REG_NOERROR, 0))
{
free_dfa_content (dfa);
@@ -793,8 +802,6 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
strncpy (dfa->re_str, pattern, length + 1);
#endif
- __libc_lock_init (dfa->lock);
-
err = re_string_construct (&regexp, pattern, length, preg->translate,
(syntax & RE_ICASE) != 0, dfa);
if (BE (err != REG_NOERROR, 0))
@@ -802,6 +809,7 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
re_compile_internal_free_return:
free_workarea_compile (preg);
re_string_destruct (&regexp);
+ lock_fini (dfa->lock);
free_dfa_content (dfa);
preg->buffer = NULL;
preg->allocated = 0;
@@ -834,6 +842,7 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
if (BE (err != REG_NOERROR, 0))
{
+ lock_fini (dfa->lock);
free_dfa_content (dfa);
preg->buffer = NULL;
preg->allocated = 0;
@@ -850,7 +859,7 @@ init_dfa (re_dfa_t *dfa, size_t pat_len)
{
__re_size_t table_size;
#ifndef _LIBC
- char *codeset_name;
+ const char *codeset_name;
#endif
#ifdef RE_ENABLE_I18N
size_t max_i18n_object_size = MAX (sizeof (wchar_t), sizeof (wctype_t));
@@ -873,7 +882,7 @@ init_dfa (re_dfa_t *dfa, size_t pat_len)
calculation below, and for similar doubling calculations
elsewhere. And it's <= rather than <, because some of the
doubling calculations add 1 afterwards. */
- if (BE (SIZE_MAX / max_object_size / 2 <= pat_len, 0))
+ if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) / 2 <= pat_len, 0))
return REG_ESPACE;
dfa->nodes_alloc = pat_len + 1;
@@ -896,8 +905,10 @@ init_dfa (re_dfa_t *dfa, size_t pat_len)
!= 0);
#else
codeset_name = nl_langinfo (CODESET);
- if (strcasecmp (codeset_name, "UTF-8") == 0
- || strcasecmp (codeset_name, "UTF8") == 0)
+ if ((codeset_name[0] == 'U' || codeset_name[0] == 'u')
+ && (codeset_name[1] == 'T' || codeset_name[1] == 't')
+ && (codeset_name[2] == 'F' || codeset_name[2] == 'f')
+ && strcmp (codeset_name + 3 + (codeset_name[3] == '-'), "8") == 0)
dfa->is_utf8 = 1;
/* We check exhaustively in the loop below if this charset is a
@@ -947,9 +958,43 @@ static void
internal_function
init_word_char (re_dfa_t *dfa)
{
- int i, j, ch;
+ int i = 0;
+ int j;
+ int ch = 0;
dfa->word_ops_used = 1;
- for (i = 0, ch = 0; i < BITSET_WORDS; ++i)
+ if (BE (dfa->map_notascii == 0, 1))
+ {
+ bitset_word_t bits0 = 0x00000000;
+ bitset_word_t bits1 = 0x03ff0000;
+ bitset_word_t bits2 = 0x87fffffe;
+ bitset_word_t bits3 = 0x07fffffe;
+ if (BITSET_WORD_BITS == 64)
+ {
+ dfa->word_char[0] = bits1 << 31 << 1 | bits0;
+ dfa->word_char[1] = bits3 << 31 << 1 | bits2;
+ i = 2;
+ }
+ else if (BITSET_WORD_BITS == 32)
+ {
+ dfa->word_char[0] = bits0;
+ dfa->word_char[1] = bits1;
+ dfa->word_char[2] = bits2;
+ dfa->word_char[3] = bits3;
+ i = 4;
+ }
+ else
+ goto general_case;
+ ch = 128;
+
+ if (BE (dfa->is_utf8, 1))
+ {
+ memset (&dfa->word_char[i], '\0', (SBC_MAX - ch) / 8);
+ return;
+ }
+ }
+
+ general_case:
+ for (; i < BITSET_WORDS; ++i)
for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch)
if (isalnum (ch) || ch == '_')
dfa->word_char[i] |= (bitset_word_t) 1 << j;
@@ -960,7 +1005,7 @@ init_word_char (re_dfa_t *dfa)
static void
free_workarea_compile (regex_t *preg)
{
- re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+ re_dfa_t *dfa = preg->buffer;
bin_tree_storage_t *storage, *next;
for (storage = dfa->str_tree_storage; storage; storage = next)
{
@@ -1144,7 +1189,7 @@ optimize_utf8 (re_dfa_t *dfa)
static reg_errcode_t
analyze (regex_t *preg)
{
- re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+ re_dfa_t *dfa = preg->buffer;
reg_errcode_t ret;
/* Allocate arrays. */
@@ -1325,7 +1370,7 @@ lower_subexps (void *extra, bin_tree_t *node)
static bin_tree_t *
lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node)
{
- re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+ re_dfa_t *dfa = preg->buffer;
bin_tree_t *body = node->left;
bin_tree_t *op, *cls, *tree1, *tree;
@@ -1659,7 +1704,7 @@ calc_eclosure (re_dfa_t *dfa)
/* If we have already calculated, skip it. */
if (dfa->eclosures[node_idx].nelem != 0)
continue;
- /* Calculate epsilon closure of `node_idx'. */
+ /* Calculate epsilon closure of 'node_idx'. */
err = calc_eclosure_iter (&eclosure_elem, dfa, node_idx, true);
if (BE (err != REG_NOERROR, 0))
return err;
@@ -1709,14 +1754,14 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root)
{
re_node_set eclosure_elem;
Idx edest = dfa->edests[node].elems[i];
- /* If calculating the epsilon closure of `edest' is in progress,
+ /* If calculating the epsilon closure of 'edest' is in progress,
return intermediate result. */
if (dfa->eclosures[edest].nelem == REG_MISSING)
{
incomplete = true;
continue;
}
- /* If we haven't calculated the epsilon closure of `edest' yet,
+ /* If we haven't calculated the epsilon closure of 'edest' yet,
calculate now. Otherwise use calculated epsilon closure. */
if (dfa->eclosures[edest].nelem == 0)
{
@@ -1726,11 +1771,11 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root)
}
else
eclosure_elem = dfa->eclosures[edest];
- /* Merge the epsilon closure of `edest'. */
+ /* Merge the epsilon closure of 'edest'. */
err = re_node_set_merge (&eclosure, &eclosure_elem);
if (BE (err != REG_NOERROR, 0))
return err;
- /* If the epsilon closure of `edest' is incomplete,
+ /* If the epsilon closure of 'edest' is incomplete,
the epsilon closure of this node is also incomplete. */
if (dfa->eclosures[edest].nelem == 0)
{
@@ -2092,7 +2137,7 @@ peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
/* Entry point of the parser.
Parse the regular expression REGEXP and return the structure tree.
- If an error is occured, ERR is set by error code, and return NULL.
+ If an error occurs, ERR is set by error code, and return NULL.
This function build the following tree, from regular expression <reg_exp>:
CAT
/ \
@@ -2106,7 +2151,7 @@ static bin_tree_t *
parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax,
reg_errcode_t *err)
{
- re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+ re_dfa_t *dfa = preg->buffer;
bin_tree_t *tree, *eor, *root;
re_token_t current_token;
dfa->syntax = syntax;
@@ -2134,13 +2179,13 @@ parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax,
/ \
<branch1> <branch2>
- ALT means alternative, which represents the operator `|'. */
+ ALT means alternative, which represents the operator '|'. */
static bin_tree_t *
parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
reg_syntax_t syntax, Idx nest, reg_errcode_t *err)
{
- re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+ re_dfa_t *dfa = preg->buffer;
bin_tree_t *tree, *branch = NULL;
tree = parse_branch (regexp, preg, token, syntax, nest, err);
if (BE (*err != REG_NOERROR && tree == NULL, 0))
@@ -2182,7 +2227,7 @@ parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token,
reg_syntax_t syntax, Idx nest, reg_errcode_t *err)
{
bin_tree_t *tree, *expr;
- re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+ re_dfa_t *dfa = preg->buffer;
tree = parse_expression (regexp, preg, token, syntax, nest, err);
if (BE (*err != REG_NOERROR && tree == NULL, 0))
return NULL;
@@ -2193,16 +2238,21 @@ parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token,
expr = parse_expression (regexp, preg, token, syntax, nest, err);
if (BE (*err != REG_NOERROR && expr == NULL, 0))
{
+ if (tree != NULL)
+ postorder (tree, free_tree, NULL);
return NULL;
}
if (tree != NULL && expr != NULL)
{
- tree = create_tree (dfa, tree, expr, CONCAT);
- if (tree == NULL)
+ bin_tree_t *newtree = create_tree (dfa, tree, expr, CONCAT);
+ if (newtree == NULL)
{
+ postorder (expr, free_tree, NULL);
+ postorder (tree, free_tree, NULL);
*err = REG_ESPACE;
return NULL;
}
+ tree = newtree;
}
else if (tree == NULL)
tree = expr;
@@ -2221,7 +2271,7 @@ static bin_tree_t *
parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
reg_syntax_t syntax, Idx nest, reg_errcode_t *err)
{
- re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+ re_dfa_t *dfa = preg->buffer;
bin_tree_t *tree;
switch (token->type)
{
@@ -2377,8 +2427,8 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
case OP_WORD:
case OP_NOTWORD:
tree = build_charclass_op (dfa, regexp->trans,
- (const unsigned char *) "alnum",
- (const unsigned char *) "_",
+ "alnum",
+ "_",
token->type == OP_NOTWORD, err);
if (BE (*err != REG_NOERROR && tree == NULL, 0))
return NULL;
@@ -2386,8 +2436,8 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
case OP_SPACE:
case OP_NOTSPACE:
tree = build_charclass_op (dfa, regexp->trans,
- (const unsigned char *) "space",
- (const unsigned char *) "",
+ "space",
+ "",
token->type == OP_NOTSPACE, err);
if (BE (*err != REG_NOERROR && tree == NULL, 0))
return NULL;
@@ -2437,7 +2487,7 @@ static bin_tree_t *
parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
reg_syntax_t syntax, Idx nest, reg_errcode_t *err)
{
- re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+ re_dfa_t *dfa = preg->buffer;
bin_tree_t *tree;
size_t cur_nsub;
cur_nsub = preg->re_nsub++;
@@ -2451,7 +2501,11 @@ parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
{
tree = parse_reg_exp (regexp, preg, token, syntax, nest, err);
if (BE (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0))
- *err = REG_EPAREN;
+ {
+ if (tree != NULL)
+ postorder (tree, free_tree, NULL);
+ *err = REG_EPAREN;
+ }
if (BE (*err != REG_NOERROR, 0))
return NULL;
}
@@ -2529,6 +2583,12 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
*err = REG_BADBR;
return NULL;
}
+
+ if (BE (RE_DUP_MAX < (end == REG_MISSING ? start : end), 0))
+ {
+ *err = REG_ESIZE;
+ return NULL;
+ }
}
else
{
@@ -2569,7 +2629,10 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
old_tree = NULL;
if (elem->token.type == SUBEXP)
- postorder (elem, mark_opt_subexp, (void *) (long) elem->token.opr.idx);
+ {
+ uintptr_t subidx = elem->token.opr.idx;
+ postorder (elem, mark_opt_subexp, (void *) subidx);
+ }
tree = create_tree (dfa, elem, NULL,
(end == REG_MISSING ? OP_DUP_ASTERISK : OP_ALT));
@@ -2615,7 +2678,7 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
Build the range expression which starts from START_ELEM, and ends
at END_ELEM. The result are written to MBCSET and SBCSET.
RANGE_ALLOC is the allocated size of mbcset->range_starts, and
- mbcset->range_ends, is a pointer argument sinse we may
+ mbcset->range_ends, is a pointer argument since we may
update it. */
static reg_errcode_t
@@ -2654,7 +2717,6 @@ build_range_exp (const reg_syntax_t syntax,
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]
@@ -2668,11 +2730,7 @@ build_range_exp (const reg_syntax_t syntax,
? __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))
+ else if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_wc > end_wc, 0))
return REG_ERANGE;
/* Got valid collation sequence values, add them as a new entry.
@@ -2713,9 +2771,7 @@ build_range_exp (const reg_syntax_t syntax,
/* 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)
+ if (start_wc <= wc && wc <= end_wc)
bitset_set (sbcset, wc);
}
}
@@ -2749,11 +2805,12 @@ build_range_exp (const reg_syntax_t syntax,
static reg_errcode_t
internal_function
-build_collating_symbol (bitset_t sbcset,
# ifdef RE_ENABLE_I18N
- re_charset_t *mbcset, Idx *coll_sym_alloc,
-# endif
- const unsigned char *name)
+build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset,
+ Idx *coll_sym_alloc, const unsigned char *name)
+# else /* not RE_ENABLE_I18N */
+build_collating_symbol (bitset_t sbcset, const unsigned char *name)
+# endif /* not RE_ENABLE_I18N */
{
size_t name_len = strlen ((const char *) name);
if (BE (name_len != 1, 0))
@@ -2781,42 +2838,31 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
const int32_t *symb_table;
const unsigned char *extra;
- /* Local function for parse_bracket_exp used in _LIBC environement.
- Seek the collating symbol entry correspondings to NAME.
- Return the index of the symbol in the SYMB_TABLE. */
+ /* Local function for parse_bracket_exp used in _LIBC environment.
+ Seek the collating symbol entry corresponding to NAME.
+ Return the index of the symbol in the SYMB_TABLE,
+ or -1 if not found. */
auto inline int32_t
- __attribute ((always_inline))
- seek_collating_symbol_entry (name, name_len)
- const unsigned char *name;
- size_t name_len;
+ __attribute__ ((always_inline))
+ seek_collating_symbol_entry (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;
+ int32_t elem;
- 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;
+ for (elem = 0; elem < table_size; elem++)
+ if (symb_table[2 * elem] != 0)
+ {
+ int32_t idx = symb_table[2 * elem + 1];
+ /* Skip the name of collating element name. */
+ idx += 1 + extra[idx];
+ if (/* Compare the length of the name. */
+ name_len == extra[idx]
+ /* Compare the name. */
+ && memcmp (name, &extra[idx + 1], name_len) == 0)
+ /* Yep, this is the entry. */
+ return elem;
+ }
+ return -1;
}
/* Local function for parse_bracket_exp used in _LIBC environment.
@@ -2824,9 +2870,8 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
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;
+ __attribute__ ((always_inline))
+ lookup_collation_sequence_value (bracket_elem_t *br_elem)
{
if (br_elem->type == SB_CHAR)
{
@@ -2854,7 +2899,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
int32_t elem, idx;
elem = seek_collating_symbol_entry (br_elem->opr.name,
sym_name_len);
- if (symb_table[2 * elem] != 0)
+ if (elem != -1)
{
/* We found the entry. */
idx = symb_table[2 * elem + 1];
@@ -2872,7 +2917,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
/* Return the collation sequence value. */
return *(unsigned int *) (extra + idx);
}
- else if (symb_table[2 * elem] == 0 && sym_name_len == 1)
+ else if (sym_name_len == 1)
{
/* No valid character. Match it as a single byte
character. */
@@ -2885,20 +2930,17 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
return UINT_MAX;
}
- /* Local function for parse_bracket_exp used in _LIBC environement.
+ /* Local function for parse_bracket_exp used in _LIBC environment.
Build the range expression which starts from START_ELEM, and ends
at END_ELEM. The result are written to MBCSET and SBCSET.
RANGE_ALLOC is the allocated size of mbcset->range_starts, and
- mbcset->range_ends, is a pointer argument sinse we may
+ mbcset->range_ends, is a pointer argument since we may
update it. */
auto inline reg_errcode_t
- __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;
+ __attribute__ ((always_inline))
+ build_range_exp (bitset_t sbcset, re_charset_t *mbcset, int *range_alloc,
+ bracket_elem_t *start_elem, bracket_elem_t *end_elem)
{
unsigned int ch;
uint32_t start_collseq;
@@ -2911,6 +2953,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
0))
return REG_ERANGE;
+ /* FIXME: Implement rational ranges here, too. */
start_collseq = lookup_collation_sequence_value (start_elem);
end_collseq = lookup_collation_sequence_value (end_elem);
/* Check start/end collation sequence values. */
@@ -2969,33 +3012,30 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
return REG_NOERROR;
}
- /* Local function for parse_bracket_exp used in _LIBC environement.
+ /* Local function for parse_bracket_exp used in _LIBC environment.
Build the collating element which is represented by NAME.
The result are written to MBCSET and SBCSET.
COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a
- pointer argument sinse we may update it. */
+ pointer argument since we may update it. */
auto inline reg_errcode_t
- __attribute ((always_inline))
- build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name)
- re_charset_t *mbcset;
- Idx *coll_sym_alloc;
- bitset_t sbcset;
- const unsigned char *name;
+ __attribute__ ((always_inline))
+ build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset,
+ Idx *coll_sym_alloc, const unsigned char *name)
{
int32_t elem, idx;
size_t name_len = strlen ((const char *) name);
if (nrules != 0)
{
elem = seek_collating_symbol_entry (name, name_len);
- if (symb_table[2 * elem] != 0)
+ if (elem != -1)
{
/* We found the entry. */
idx = symb_table[2 * elem + 1];
/* Skip the name of collating element name. */
idx += 1 + extra[idx];
}
- else if (symb_table[2 * elem] == 0 && name_len == 1)
+ else if (name_len == 1)
{
/* No valid character, treat it as a normal
character. */
@@ -3075,6 +3115,10 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
if (BE (sbcset == NULL, 0))
#endif /* RE_ENABLE_I18N */
{
+ re_free (sbcset);
+#ifdef RE_ENABLE_I18N
+ re_free (mbcset);
+#endif
*err = REG_ESPACE;
return NULL;
}
@@ -3234,7 +3278,8 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
#ifdef RE_ENABLE_I18N
mbcset, &char_class_alloc,
#endif /* RE_ENABLE_I18N */
- start_elem.opr.name, syntax);
+ (const char *) start_elem.opr.name,
+ syntax);
if (BE (*err != REG_NOERROR, 0))
goto parse_bracket_exp_free_return;
break;
@@ -3413,7 +3458,7 @@ parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp,
Build the equivalence class which is represented by NAME.
The result are written to MBCSET and SBCSET.
EQUIV_CLASS_ALLOC is the allocated size of mbcset->equiv_classes,
- is a pointer argument sinse we may update it. */
+ is a pointer argument since we may update it. */
static reg_errcode_t
#ifdef RE_ENABLE_I18N
@@ -3444,19 +3489,18 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name)
_NL_COLLATE_EXTRAMB);
indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
_NL_COLLATE_INDIRECTMB);
- idx1 = findidx (&cp);
- if (BE (idx1 == 0 || cp < name + strlen ((const char *) name), 0))
+ idx1 = findidx (&cp, -1);
+ if (BE (idx1 == 0 || *cp != '\0', 0))
/* This isn't a valid character. */
return REG_ECOLLATE;
- /* Build single byte matcing table for this equivalence class. */
- char_buf[1] = (unsigned char) '\0';
+ /* Build single byte matching table for this equivalence class. */
len = weights[idx1 & 0xffffff];
for (ch = 0; ch < SBC_MAX; ++ch)
{
char_buf[0] = ch;
cp = char_buf;
- idx2 = findidx (&cp);
+ idx2 = findidx (&cp, 1);
/*
idx2 = table[ch];
*/
@@ -3509,20 +3553,20 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name)
Build the character class which is represented by NAME.
The result are written to MBCSET and SBCSET.
CHAR_CLASS_ALLOC is the allocated size of mbcset->char_classes,
- is a pointer argument sinse we may update it. */
+ is a pointer argument since we may update it. */
static reg_errcode_t
#ifdef RE_ENABLE_I18N
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)
+ const 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)
+ const char *class_name, reg_syntax_t syntax)
#endif /* not RE_ENABLE_I18N */
{
int i;
- const char *name = (const char *) class_name;
+ const char *name = class_name;
/* In case of REG_ICASE "upper" and "lower" match the both of
upper and lower cases. */
@@ -3596,8 +3640,8 @@ build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
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,
+ const char *class_name,
+ const char *extra, bool non_match,
reg_errcode_t *err)
{
re_bitset_ptr_t sbcset;
@@ -3703,8 +3747,9 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
}
/* This is intended for the expressions like "a{1,3}".
- Fetch a number from `input', and return the number.
+ Fetch a number from 'input', and return the number.
Return REG_MISSING if the number field is empty like "{,1}".
+ Return RE_DUP_MAX + 1 if the number field is too large.
Return REG_ERROR if an error occurred. */
static Idx
@@ -3723,8 +3768,9 @@ fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax)
num = ((token->type != CHARACTER || c < '0' || '9' < c
|| num == REG_ERROR)
? REG_ERROR
- : ((num == REG_MISSING) ? c - '0' : num * 10 + c - '0'));
- num = (num > RE_DUP_MAX) ? REG_ERROR : num;
+ : num == REG_MISSING
+ ? c - '0'
+ : MIN (RE_DUP_MAX + 1, num * 10 + c - '0'));
}
return num;
}
@@ -3798,7 +3844,7 @@ create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,
static reg_errcode_t
mark_opt_subexp (void *extra, bin_tree_t *node)
{
- Idx idx = (Idx) (long) extra;
+ Idx idx = (uintptr_t) extra;
if (node->token.type == SUBEXP && node->token.opr.idx == idx)
node->token.opt_subexp = 1;
diff --git a/lib/regex.c b/lib/regex.c
index b0aab90..5a0332e 100644
--- a/lib/regex.c
+++ b/lib/regex.c
@@ -1,25 +1,35 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2002-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
- This program is free software; you can redistribute 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.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 3 of the License, or (at your option) any later version.
- This program is distributed in the hope that it will be useful,
+ The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ You should have received a copy of the GNU General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
-#include <config.h>
+#ifndef _LIBC
+# include <config.h>
-/* Make sure noone compiles this code with a C++ compiler. */
+# if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
+# pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
+# endif
+# if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
+# pragma GCC diagnostic ignored "-Wold-style-definition"
+# pragma GCC diagnostic ignored "-Wtype-limits"
+# endif
+#endif
+
+/* Make sure no one compiles this code with a C++ compiler. */
#if defined __cplusplus && defined _LIBC
# error "This is C code, use a C compiler"
#endif
diff --git a/lib/regex.h b/lib/regex.h
index e99c8b8..854c6ed 100644
--- a/lib/regex.h
+++ b/lib/regex.h
@@ -1,22 +1,22 @@
/* Definitions for data structures and routines for the regular
expression library.
- Copyright (C) 1985, 1989-1993, 1995-1998, 2000-2003, 2005-2006, 2009-2011
- Free Software Foundation, Inc.
+ Copyright (C) 1985, 1989-1993, 1995-1998, 2000-2003, 2005-2013 Free Software
+ Foundation, Inc.
This file is part of the GNU C Library.
- This program is free software; you can redistribute it and/or modify
- 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.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 3 of the License, or (at your option) any later version.
- This program is distributed in the hope that it will be useful,
+ The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ You should have received a copy of the GNU General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#ifndef _REGEX_H
#define _REGEX_H 1
@@ -28,13 +28,10 @@
extern "C" {
#endif
-/* Define __USE_GNU_REGEX to declare GNU extensions that violate the
+/* Define __USE_GNU to declare GNU extensions that violate the
POSIX name space rules. */
-#undef __USE_GNU_REGEX
-#if (defined _GNU_SOURCE \
- || (!defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE \
- && !defined _XOPEN_SOURCE))
-# define __USE_GNU_REGEX 1
+#ifdef _GNU_SOURCE
+# define __USE_GNU 1
#endif
#ifdef _REGEX_LARGE_OFFSETS
@@ -45,16 +42,6 @@ extern "C" {
supported within glibc itself, and glibc users should not define
_REGEX_LARGE_OFFSETS. */
-/* The type of the offset of a byte within a string.
- For historical reasons POSIX 1003.1-2004 requires that regoff_t be
- at least as wide as off_t. However, many common POSIX platforms set
- regoff_t to the more-sensible ssize_t and the Open Group has
- signalled its intention to change the requirement to be that
- regoff_t be at least as wide as ptrdiff_t and ssize_t; see XBD ERN
- 60 (2005-08-25). We don't know of any hosts where ssize_t or
- ptrdiff_t is wider than ssize_t, so ssize_t is safe. */
-typedef ssize_t regoff_t;
-
/* The type of nonnegative object indexes. Traditionally, GNU regex
uses 'int' for these. Code that uses __re_idx_t should work
regardless of whether the type is signed. */
@@ -69,10 +56,8 @@ typedef size_t __re_long_size_t;
#else
-/* Use types that are binary-compatible with the traditional GNU regex
- implementation, which mishandles strings longer than INT_MAX. */
-
-typedef int regoff_t;
+/* The traditional GNU regex implementation mishandles strings longer
+ than INT_MAX. */
typedef int __re_idx_t;
typedef unsigned int __re_size_t;
typedef unsigned long int __re_long_size_t;
@@ -93,8 +78,7 @@ typedef unsigned long int active_reg_t;
add or remove a bit, only one other definition need change. */
typedef unsigned long int reg_syntax_t;
-#ifdef __USE_GNU_REGEX
-
+#ifdef __USE_GNU
/* If this bit is not set, then \ inside a bracket expression is literal.
If set, then such a \ quotes the following character. */
# define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1)
@@ -161,9 +145,9 @@ typedef unsigned long int reg_syntax_t;
If not set, newline is literal. */
# define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1)
-/* If this bit is set, then `{...}' defines an interval, and \{ and \}
+/* If this bit is set, then '{...}' defines an interval, and \{ and \}
are literals.
- If not set, then `\{...\}' defines an interval. */
+ If not set, then '\{...\}' defines an interval. */
# define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1)
/* If this bit is set, (...) defines a group, and \( and \) are literals.
@@ -225,8 +209,7 @@ typedef unsigned long int reg_syntax_t;
/* If this bit is set, then no_sub will be set to 1 during
re_compile_pattern. */
# define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1)
-
-#endif /* defined __USE_GNU_REGEX */
+#endif
/* This global variable defines the particular regexp syntax to use (for
some interfaces). When a regexp is compiled, the syntax used is
@@ -234,7 +217,7 @@ typedef unsigned long int reg_syntax_t;
already-compiled regexps. */
extern reg_syntax_t re_syntax_options;
-#ifdef __USE_GNU_REGEX
+#ifdef __USE_GNU
/* Define combinations of the above bits for the standard possibilities.
(The [[[ comments delimit what gets put into the Texinfo file, so
don't delete them!) */
@@ -246,16 +229,19 @@ extern reg_syntax_t re_syntax_options;
| RE_NO_BK_PARENS | RE_NO_BK_REFS \
| RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \
| RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \
+ | RE_CHAR_CLASSES \
| RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS)
# define RE_SYNTAX_GNU_AWK \
- ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DEBUG) \
- & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS \
- | RE_CONTEXT_INVALID_OPS ))
+ ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \
+ | RE_INVALID_INTERVAL_ORD) \
+ & ~(RE_DOT_NOT_NULL | RE_CONTEXT_INDEP_OPS \
+ | RE_CONTEXT_INVALID_OPS ))
# define RE_SYNTAX_POSIX_AWK \
(RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \
- | RE_INTERVALS | RE_NO_GNU_OPS)
+ | RE_INTERVALS | RE_NO_GNU_OPS \
+ | RE_INVALID_INTERVAL_ORD)
# define RE_SYNTAX_GREP \
(RE_BK_PLUS_QM | RE_CHAR_CLASSES \
@@ -306,13 +292,12 @@ extern reg_syntax_t re_syntax_options;
| RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD)
/* [[[end syntaxes]]] */
-#endif /* defined __USE_GNU_REGEX */
-
-#ifdef __USE_GNU_REGEX
-
/* Maximum number of duplicates an interval can allow. POSIX-conforming
systems might define this in <limits.h>, but we want our
value, so remove any previous define. */
+# ifdef _REGEX_INCLUDE_LIMITS_H
+# include <limits.h>
+# endif
# ifdef RE_DUP_MAX
# undef RE_DUP_MAX
# endif
@@ -320,16 +305,15 @@ extern reg_syntax_t re_syntax_options;
/* RE_DUP_MAX is 2**15 - 1 because an earlier implementation stored
the counter as a 2-byte signed integer. This is no longer true, so
RE_DUP_MAX could be increased to (INT_MAX / 10 - 1), or to
- ((SIZE_MAX - 2) / 10 - 1) if _REGEX_LARGE_OFFSETS is defined.
+ ((SIZE_MAX - 9) / 10) if _REGEX_LARGE_OFFSETS is defined.
However, there would be a huge performance problem if someone
actually used a pattern like a\{214748363\}, so RE_DUP_MAX retains
its historical value. */
# define RE_DUP_MAX (0x7fff)
-
-#endif /* defined __USE_GNU_REGEX */
+#endif
-/* POSIX `cflags' bits (i.e., information for `regcomp'). */
+/* POSIX 'cflags' bits (i.e., information for 'regcomp'). */
/* If this bit is set, then use extended regular expression syntax.
If not set, then use basic regular expression syntax. */
@@ -349,7 +333,7 @@ extern reg_syntax_t re_syntax_options;
#define REG_NOSUB (1 << 3)
-/* POSIX `eflags' bits (i.e., information for regexec). */
+/* POSIX 'eflags' bits (i.e., information for regexec). */
/* If this bit is set, then the beginning-of-line operator doesn't match
the beginning of the string (presumably because it's not the
@@ -367,7 +351,7 @@ extern reg_syntax_t re_syntax_options;
/* If any error codes are removed, changed, or added, update the
- `__re_error_msgid' table in regcomp.c. */
+ '__re_error_msgid' table in regcomp.c. */
typedef enum
{
@@ -392,11 +376,11 @@ typedef enum
/* Error codes we've added. */
_REG_EEND, /* Premature end. */
- _REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */
+ _REG_ESIZE, /* Too large (e.g., repeat count too large). */
_REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */
} reg_errcode_t;
-#ifdef _XOPEN_SOURCE
+#if defined _XOPEN_SOURCE || defined __USE_XOPEN2K
# define REG_ENOSYS _REG_ENOSYS
#endif
#define REG_NOERROR _REG_NOERROR
@@ -417,126 +401,127 @@ typedef enum
#define REG_ESIZE _REG_ESIZE
#define REG_ERPAREN _REG_ERPAREN
-/* struct re_pattern_buffer normally uses member names like `buffer'
- that POSIX does not allow. In POSIX mode these members have names
- with leading `re_' (e.g., `re_buffer'). */
-#ifdef __USE_GNU_REGEX
-# define _REG_RE_NAME(id) id
-# define _REG_RM_NAME(id) id
-#else
-# define _REG_RE_NAME(id) re_##id
-# define _REG_RM_NAME(id) rm_##id
+/* This data structure represents a compiled pattern. Before calling
+ the pattern compiler, the fields 'buffer', 'allocated', 'fastmap',
+ and 'translate' can be set. After the pattern has been compiled,
+ the fields 're_nsub', 'not_bol' and 'not_eol' are available. All
+ other fields are private to the regex routines. */
+
+#ifndef RE_TRANSLATE_TYPE
+# define __RE_TRANSLATE_TYPE unsigned char *
+# ifdef __USE_GNU
+# define RE_TRANSLATE_TYPE __RE_TRANSLATE_TYPE
+# endif
#endif
-/* The user can specify the type of the re_translate member by
- defining the macro RE_TRANSLATE_TYPE, which defaults to unsigned
- char *. This pollutes the POSIX name space, so in POSIX mode just
- use unsigned char *. */
-#ifdef __USE_GNU_REGEX
-# ifndef RE_TRANSLATE_TYPE
-# define RE_TRANSLATE_TYPE unsigned char *
-# endif
-# define REG_TRANSLATE_TYPE RE_TRANSLATE_TYPE
+#ifdef __USE_GNU
+# define __REPB_PREFIX(name) name
#else
-# define REG_TRANSLATE_TYPE unsigned char *
+# define __REPB_PREFIX(name) __##name
#endif
-/* This data structure represents a compiled pattern. Before calling
- the pattern compiler, the fields `buffer', `allocated', `fastmap',
- `translate', and `no_sub' can be set. After the pattern has been
- compiled, the `re_nsub' field is available. All other fields are
- private to the regex routines. */
-
struct re_pattern_buffer
{
- /* Space that holds the compiled pattern. It is declared as
- `unsigned char *' because its elements are sometimes used as
- array indexes. */
- unsigned char *_REG_RE_NAME (buffer);
+ /* Space that holds the compiled pattern. The type
+ 'struct re_dfa_t' is private and is not declared here. */
+ struct re_dfa_t *__REPB_PREFIX(buffer);
- /* Number of bytes to which `buffer' points. */
- __re_long_size_t _REG_RE_NAME (allocated);
+ /* Number of bytes to which 'buffer' points. */
+ __re_long_size_t __REPB_PREFIX(allocated);
- /* Number of bytes actually used in `buffer'. */
- __re_long_size_t _REG_RE_NAME (used);
+ /* Number of bytes actually used in 'buffer'. */
+ __re_long_size_t __REPB_PREFIX(used);
/* Syntax setting with which the pattern was compiled. */
- reg_syntax_t _REG_RE_NAME (syntax);
+ reg_syntax_t __REPB_PREFIX(syntax);
/* Pointer to a fastmap, if any, otherwise zero. re_search uses the
fastmap, if there is one, to skip over impossible starting points
for matches. */
- char *_REG_RE_NAME (fastmap);
+ char *__REPB_PREFIX(fastmap);
/* Either a translate table to apply to all characters before
comparing them, or zero for no translation. The translation is
applied to a pattern when it is compiled and to a string when it
is matched. */
- REG_TRANSLATE_TYPE _REG_RE_NAME (translate);
+ __RE_TRANSLATE_TYPE __REPB_PREFIX(translate);
/* Number of subexpressions found by the compiler. */
size_t re_nsub;
/* Zero if this pattern cannot match the empty string, one else.
- Well, in truth it's used only in `re_search_2', to see whether or
+ Well, in truth it's used only in 're_search_2', to see whether or
not we should use the fastmap, so we don't set this absolutely
- perfectly; see `re_compile_fastmap' (the `duplicate' case). */
- unsigned int _REG_RE_NAME (can_be_null) : 1;
+ perfectly; see 're_compile_fastmap' (the "duplicate" case). */
+ unsigned __REPB_PREFIX(can_be_null) : 1;
- /* If REGS_UNALLOCATED, allocate space in the `regs' structure
- for `max (RE_NREGS, re_nsub + 1)' groups.
+ /* If REGS_UNALLOCATED, allocate space in the 'regs' structure
+ for 'max (RE_NREGS, re_nsub + 1)' groups.
If REGS_REALLOCATE, reallocate space if necessary.
If REGS_FIXED, use what's there. */
-#ifdef __USE_GNU_REGEX
+#ifdef __USE_GNU
# define REGS_UNALLOCATED 0
# define REGS_REALLOCATE 1
# define REGS_FIXED 2
#endif
- unsigned int _REG_RE_NAME (regs_allocated) : 2;
+ unsigned __REPB_PREFIX(regs_allocated) : 2;
- /* Set to zero when `re_compile_pattern' compiles a pattern; set to
- one by `re_compile_fastmap' if it updates the fastmap. */
- unsigned int _REG_RE_NAME (fastmap_accurate) : 1;
+ /* Set to zero when 're_compile_pattern' compiles a pattern; set to
+ one by 're_compile_fastmap' if it updates the fastmap. */
+ unsigned __REPB_PREFIX(fastmap_accurate) : 1;
- /* If set, `re_match_2' does not return information about
+ /* If set, 're_match_2' does not return information about
subexpressions. */
- unsigned int _REG_RE_NAME (no_sub) : 1;
+ unsigned __REPB_PREFIX(no_sub) : 1;
/* If set, a beginning-of-line anchor doesn't match at the beginning
of the string. */
- unsigned int _REG_RE_NAME (not_bol) : 1;
+ unsigned __REPB_PREFIX(not_bol) : 1;
/* Similarly for an end-of-line anchor. */
- unsigned int _REG_RE_NAME (not_eol) : 1;
+ unsigned __REPB_PREFIX(not_eol) : 1;
/* If true, an anchor at a newline matches. */
- unsigned int _REG_RE_NAME (newline_anchor) : 1;
-
-/* [[[end pattern_buffer]]] */
+ unsigned __REPB_PREFIX(newline_anchor) : 1;
};
typedef struct re_pattern_buffer regex_t;
+/* Type for byte offsets within the string. POSIX mandates this. */
+#ifdef _REGEX_LARGE_OFFSETS
+/* POSIX 1003.1-2008 requires that regoff_t be at least as wide as
+ ptrdiff_t and ssize_t. We don't know of any hosts where ptrdiff_t
+ is wider than ssize_t, so ssize_t is safe. */
+typedef ssize_t regoff_t;
+#else
+/* The traditional GNU regex implementation mishandles strings longer
+ than INT_MAX. */
+typedef int regoff_t;
+#endif
+
+
+#ifdef __USE_GNU
/* This is the structure we store register match data in. See
regex.texinfo for a full description of what registers match. */
struct re_registers
{
- __re_size_t _REG_RM_NAME (num_regs);
- regoff_t *_REG_RM_NAME (start);
- regoff_t *_REG_RM_NAME (end);
+ __re_size_t num_regs;
+ regoff_t *start;
+ regoff_t *end;
};
-/* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer,
- `re_match_2' returns information about at least this many registers
- the first time a `regs' structure is passed. */
-#if !defined RE_NREGS && defined __USE_GNU_REGEX
-# define RE_NREGS 30
+/* If 'regs_allocated' is REGS_UNALLOCATED in the pattern buffer,
+ 're_match_2' returns information about at least this many registers
+ the first time a 'regs' structure is passed. */
+# ifndef RE_NREGS
+# define RE_NREGS 30
+# endif
#endif
/* POSIX specification for registers. Aside from the different names than
- `re_registers', POSIX uses an array of structures, instead of a
+ 're_registers', POSIX uses an array of structures, instead of a
structure of arrays. */
typedef struct
{
@@ -546,13 +531,19 @@ typedef struct
/* Declarations for routines. */
+#ifdef __USE_GNU
/* Sets the current default syntax to SYNTAX, and return the old syntax.
- You can also simply assign to the `re_syntax_options' variable. */
+ You can also simply assign to the 're_syntax_options' variable. */
extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax);
/* Compile the regular expression PATTERN, with length LENGTH
- and syntax given by the global `re_syntax_options', into the buffer
- BUFFER. Return NULL if successful, and an error string if not. */
+ and syntax given by the global 're_syntax_options', into the buffer
+ BUFFER. Return NULL if successful, and an error string if not.
+
+ To free the allocated storage, you must call 'regfree' on BUFFER.
+ Note that the translate table must either have been initialised by
+ 'regcomp', with a malloc'ed value, or set to NULL before calling
+ 'regfree'. */
extern const char *re_compile_pattern (const char *__pattern, size_t __length,
struct re_pattern_buffer *__buffer);
@@ -574,7 +565,7 @@ extern regoff_t re_search (struct re_pattern_buffer *__buffer,
struct re_registers *__regs);
-/* Like `re_search', but search in the concatenation of STRING1 and
+/* Like 're_search', but search in the concatenation of STRING1 and
STRING2. Also, stop searching at index START + STOP. */
extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer,
const char *__string1, __re_idx_t __length1,
@@ -584,14 +575,14 @@ extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer,
__re_idx_t __stop);
-/* Like `re_search', but return how many characters in STRING the regexp
+/* Like 're_search', but return how many characters in STRING the regexp
in BUFFER matched, starting at position START. */
extern regoff_t re_match (struct re_pattern_buffer *__buffer,
const char *__string, __re_idx_t __length,
__re_idx_t __start, struct re_registers *__regs);
-/* Relates to `re_match' as `re_search_2' relates to `re_search'. */
+/* Relates to 're_match' as 're_search_2' relates to 're_search'. */
extern regoff_t re_match_2 (struct re_pattern_buffer *__buffer,
const char *__string1, __re_idx_t __length1,
const char *__string2, __re_idx_t __length2,
@@ -602,21 +593,22 @@ extern regoff_t re_match_2 (struct re_pattern_buffer *__buffer,
/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
ENDS. Subsequent matches using BUFFER and REGS will use this memory
for recording register information. STARTS and ENDS must be
- allocated with malloc, and must each be at least `NUM_REGS * sizeof
+ allocated with malloc, and must each be at least 'NUM_REGS * sizeof
(regoff_t)' bytes long.
If NUM_REGS == 0, then subsequent matches should allocate their own
register data.
Unless this function is called, the first search or match using
- BUFFER will allocate its own register data, without freeing the old
- data. */
+ BUFFER will allocate its own register data, without
+ freeing the old data. */
extern void re_set_registers (struct re_pattern_buffer *__buffer,
struct re_registers *__regs,
__re_size_t __num_regs,
regoff_t *__starts, regoff_t *__ends);
+#endif /* Use GNU */
-#if defined _REGEX_RE_COMP || defined _LIBC
+#if defined _REGEX_RE_COMP || (defined _LIBC && defined __USE_BSD)
# ifndef _CRAY
/* 4.2 bsd compatibility. */
extern char *re_comp (const char *);
@@ -644,7 +636,7 @@ extern int re_exec (const char *);
#ifndef _Restrict_arr_
# if ((199901L <= __STDC_VERSION__ \
|| ((3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) \
- && !__STRICT_ANSI__)) \
+ && !defined __STRICT_ANSI__)) \
&& !defined __GNUG__)
# define _Restrict_arr_ _Restrict_
# else
diff --git a/lib/regex_internal.c b/lib/regex_internal.c
index c6b3bf2..899b0ae 100644
--- a/lib/regex_internal.c
+++ b/lib/regex_internal.c
@@ -1,21 +1,21 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2011 Free Software Foundation, Inc.
+ Copyright (C) 2002-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
- This program is free software; you can redistribute 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.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 3 of the License, or (at your option) any later version.
- This program is distributed in the hope that it will be useful,
+ The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ You should have received a copy of the GNU General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
static void re_string_construct_common (const char *str, Idx len,
re_string_t *pstr,
@@ -134,9 +134,9 @@ re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len)
{
wint_t *new_wcs;
- /* Avoid overflow. */
- size_t max_object_size = MAX (sizeof (wint_t), sizeof (Idx));
- if (BE (SIZE_MAX / max_object_size < new_buf_len, 0))
+ /* Avoid overflow in realloc. */
+ const size_t max_object_size = MAX (sizeof (wint_t), sizeof (Idx));
+ if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < new_buf_len, 0))
return REG_ESPACE;
new_wcs = re_realloc (pstr->wcs, wint_t, new_buf_len);
@@ -236,13 +236,8 @@ build_wcs_buffer (re_string_t *pstr)
else
p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx;
mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state);
- if (BE (mbclen == (size_t) -2, 0))
- {
- /* The buffer doesn't have enough space, finish to build. */
- pstr->cur_state = prev_st;
- break;
- }
- else if (BE (mbclen == (size_t) -1 || mbclen == 0, 0))
+ if (BE (mbclen == (size_t) -1 || mbclen == 0
+ || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len), 0))
{
/* We treat these cases as a singlebyte character. */
mbclen = 1;
@@ -251,6 +246,12 @@ build_wcs_buffer (re_string_t *pstr)
wc = pstr->trans[wc];
pstr->cur_state = prev_st;
}
+ else if (BE (mbclen == (size_t) -2, 0))
+ {
+ /* The buffer doesn't have enough space, finish to build. */
+ pstr->cur_state = prev_st;
+ break;
+ }
/* Write wide character and padding. */
pstr->wcs[byte_idx++] = wc;
@@ -333,9 +334,11 @@ build_wcs_upper_buffer (re_string_t *pstr)
for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;)
pstr->wcs[byte_idx++] = WEOF;
}
- else if (mbclen == (size_t) -1 || mbclen == 0)
+ else if (mbclen == (size_t) -1 || mbclen == 0
+ || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len))
{
- /* It is an invalid character or '\0'. Just use the byte. */
+ /* It is an invalid character, an incomplete character
+ at the end of the string, or '\0'. Just use the byte. */
int ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx];
pstr->mbs[byte_idx] = ch;
/* And also cast it to wide char. */
@@ -448,7 +451,8 @@ build_wcs_upper_buffer (re_string_t *pstr)
for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;)
pstr->wcs[byte_idx++] = WEOF;
}
- else if (mbclen == (size_t) -1 || mbclen == 0)
+ else if (mbclen == (size_t) -1 || mbclen == 0
+ || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len))
{
/* It is an invalid character or '\0'. Just use the byte. */
int ch = pstr->raw_mbs[pstr->raw_mbs_idx + src_idx];
@@ -495,8 +499,7 @@ re_string_skip_chars (re_string_t *pstr, Idx new_raw_idx, wint_t *last_wc)
rawbuf_idx < new_raw_idx;)
{
wchar_t wc2;
- Idx remain_len;
- remain_len = pstr->len - rawbuf_idx;
+ Idx remain_len = pstr->raw_len - rawbuf_idx;
prev_st = pstr->cur_state;
mbclen = __mbrtowc (&wc2, (const char *) pstr->raw_mbs + rawbuf_idx,
remain_len, &pstr->cur_state);
@@ -732,21 +735,21 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
mbstate_t cur_state;
wchar_t wc2;
Idx mlen = raw + pstr->len - p;
+ unsigned char buf[6];
size_t mbclen;
-#if 0 /* dead code: buf is set but never used */
- unsigned char buf[6];
+ const unsigned char *pp = p;
if (BE (pstr->trans != NULL, 0))
{
int i = mlen < 6 ? mlen : 6;
while (--i >= 0)
buf[i] = pstr->trans[p[i]];
+ pp = buf;
}
-#endif
/* XXX Don't use mbrtowc, we know which conversion
to use (UTF-8 -> UCS4). */
memset (&cur_state, 0, sizeof (cur_state));
- mbclen = __mbrtowc (&wc2, (const char *) p, mlen,
+ mbclen = __mbrtowc (&wc2, (const char *) pp, mlen,
&cur_state);
if (raw + offset - p <= mbclen
&& mbclen < (size_t) -2)
@@ -831,7 +834,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
}
static unsigned char
-internal_function __attribute ((pure))
+internal_function __attribute__ ((pure))
re_string_peek_byte_case (const re_string_t *pstr, Idx idx)
{
int ch;
@@ -868,7 +871,7 @@ re_string_peek_byte_case (const re_string_t *pstr, Idx idx)
}
static unsigned char
-internal_function __attribute ((pure))
+internal_function
re_string_fetch_byte_case (re_string_t *pstr)
{
if (BE (!pstr->mbs_allocated, 1))
@@ -971,7 +974,7 @@ 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))
+ if (BE (set->elems == NULL, 0) && (MALLOC_0_IS_NONNULL || size != 0))
return REG_ESPACE;
return REG_NOERROR;
}
@@ -1351,7 +1354,7 @@ re_node_set_insert_last (re_node_set *set, Idx elem)
Return true if SET1 and SET2 are equivalent. */
static bool
-internal_function __attribute ((pure))
+internal_function __attribute__ ((pure))
re_node_set_compare (const re_node_set *set1, const re_node_set *set2)
{
Idx i;
@@ -1366,7 +1369,7 @@ re_node_set_compare (const re_node_set *set1, const re_node_set *set2)
/* Return (idx + 1) if SET contains the element ELEM, return 0 otherwise. */
static Idx
-internal_function __attribute ((pure))
+internal_function __attribute__ ((pure))
re_node_set_contains (const re_node_set *set, Idx elem)
{
__re_size_t idx, right, mid;
@@ -1412,13 +1415,12 @@ re_dfa_add_node (re_dfa_t *dfa, re_token_t token)
Idx *new_nexts, *new_indices;
re_node_set *new_edests, *new_eclosures;
re_token_t *new_nodes;
- size_t max_object_size =
- MAX (sizeof (re_token_t),
- MAX (sizeof (re_node_set),
- sizeof (Idx)));
- /* Avoid overflows. */
- if (BE (SIZE_MAX / 2 / max_object_size < dfa->nodes_alloc, 0))
+ /* Avoid overflows in realloc. */
+ const size_t max_object_size = MAX (sizeof (re_token_t),
+ MAX (sizeof (re_node_set),
+ sizeof (Idx)));
+ if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < new_nodes_alloc, 0))
return REG_MISSING;
new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc);
@@ -1441,11 +1443,9 @@ re_dfa_add_node (re_dfa_t *dfa, re_token_t token)
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;
- }
+ ((token.type == OP_PERIOD && dfa->mb_cur_max > 1)
+ || token.type == COMPLEX_BRACKET);
#endif
dfa->nexts[dfa->nodes_len] = REG_MISSING;
re_node_set_init_empty (dfa->edests + dfa->nodes_len);
@@ -1453,7 +1453,7 @@ re_dfa_add_node (re_dfa_t *dfa, re_token_t token)
return dfa->nodes_len++;
}
-static inline re_hashval_t
+static re_hashval_t
internal_function
calc_state_hash (const re_node_set *nodes, unsigned int context)
{
@@ -1550,7 +1550,7 @@ re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa,
&& re_node_set_compare (state->entrance_nodes, nodes))
return state;
}
- /* There are no appropriate state in `dfa', create the new one. */
+ /* There are no appropriate state in 'dfa', create the new one. */
new_state = create_cd_newstate (dfa, nodes, context, hash);
if (BE (new_state == NULL, 0))
*err = REG_ESPACE;
@@ -1579,7 +1579,7 @@ register_state (const re_dfa_t *dfa, re_dfastate_t *newstate,
{
Idx elem = newstate->nodes.elems[i];
if (!IS_EPSILON_NODE (dfa->nodes[elem].type))
- if (BE (! re_node_set_insert_last (&newstate->non_eps_nodes, elem), 0))
+ if (! re_node_set_insert_last (&newstate->non_eps_nodes, elem))
return REG_ESPACE;
}
@@ -1614,7 +1614,7 @@ free_state (re_dfastate_t *state)
re_free (state);
}
-/* Create the new state which is independ of contexts.
+/* Create the new state which is independent of contexts.
Return the new state if succeeded, otherwise return NULL. */
static re_dfastate_t *
diff --git a/lib/regex_internal.h b/lib/regex_internal.h
index df4a095..a2b8f16 100644
--- a/lib/regex_internal.h
+++ b/lib/regex_internal.h
@@ -1,47 +1,81 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2011 Free Software Foundation, Inc.
+ Copyright (C) 2002-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
- This program is free software; you can redistribute 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.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 3 of the License, or (at your option) any later version.
- This program is distributed in the hope that it will be useful,
+ The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ You should have received a copy of the GNU General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
#ifndef _REGEX_INTERNAL_H
#define _REGEX_INTERNAL_H 1
#include <assert.h>
#include <ctype.h>
-#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <langinfo.h>
-#ifndef _LIBC
-# include "localcharset.h"
-#endif
#include <locale.h>
-
#include <wchar.h>
#include <wctype.h>
+#include <stdbool.h>
#include <stdint.h>
-#if defined _LIBC
+
+#ifdef _LIBC
# include <bits/libc-lock.h>
+# define lock_define(name) __libc_lock_define (, name)
+# define lock_init(lock) (__libc_lock_init (lock), 0)
+# define lock_fini(lock) 0
+# define lock_lock(lock) __libc_lock_lock (lock)
+# define lock_unlock(lock) __libc_lock_unlock (lock)
+#elif defined GNULIB_LOCK
+# include "glthread/lock.h"
+ /* Use gl_lock_define if empty macro arguments are known to work.
+ Otherwise, fall back on less-portable substitutes. */
+# if ((defined __GNUC__ && !defined __STRICT_ANSI__) \
+ || (defined __STDC_VERSION__ && 199901L <= __STDC_VERSION__))
+# define lock_define(name) gl_lock_define (, name)
+# elif USE_POSIX_THREADS
+# define lock_define(name) pthread_mutex_t name;
+# elif USE_PTH_THREADS
+# define lock_define(name) pth_mutex_t name;
+# elif USE_SOLARIS_THREADS
+# define lock_define(name) mutex_t name;
+# elif USE_WINDOWS_THREADS
+# define lock_define(name) gl_lock_t name;
+# else
+# define lock_define(name)
+# endif
+# define lock_init(lock) glthread_lock_init (&(lock))
+# define lock_fini(lock) glthread_lock_destroy (&(lock))
+# define lock_lock(lock) glthread_lock_lock (&(lock))
+# define lock_unlock(lock) glthread_lock_unlock (&(lock))
+#elif defined GNULIB_PTHREAD
+# include <pthread.h>
+# define lock_define(name) pthread_mutex_t name;
+# define lock_init(lock) pthread_mutex_init (&(lock), 0)
+# define lock_fini(lock) pthread_mutex_destroy (&(lock))
+# define lock_lock(lock) pthread_mutex_lock (&(lock))
+# define lock_unlock(lock) pthread_mutex_unlock (&(lock))
#else
-# define __libc_lock_init(NAME) do { } while (0)
-# define __libc_lock_lock(NAME) do { } while (0)
-# define __libc_lock_unlock(NAME) do { } while (0)
+# define lock_define(name)
+# define lock_init(lock) 0
+# define lock_fini(lock) ((void) 0)
+ /* The 'dfa' avoids an "unused variable 'dfa'" warning from GCC. */
+# define lock_lock(lock) ((void) dfa)
+# define lock_unlock(lock) ((void) 0)
#endif
/* In case that the system doesn't have isblank(). */
@@ -64,7 +98,7 @@
# ifdef _LIBC
# undef gettext
# define gettext(msgid) \
- INTUSE(__dcgettext) (_libc_intl_domainname, msgid, LC_MESSAGES)
+ __dcgettext (_libc_intl_domainname, msgid, LC_MESSAGES)
# endif
#else
# define gettext(msgid) (msgid)
@@ -76,11 +110,6 @@
# define gettext_noop(String) String
#endif
-/* For loser systems without the definition. */
-#ifndef SIZE_MAX
-# define SIZE_MAX ((size_t) -1)
-#endif
-
#if (defined MB_CUR_MAX && HAVE_WCTYPE_H && HAVE_ISWCTYPE && HAVE_WCSCOLL) || _LIBC
# define RE_ENABLE_I18N
#endif
@@ -89,9 +118,6 @@
# define BE(expr, val) __builtin_expect (expr, val)
#else
# define BE(expr, val) (expr)
-# ifdef _LIBC
-# define inline
-# endif
#endif
/* Number of ASCII characters. */
@@ -108,22 +134,27 @@
/* Rename to standard API for using out of glibc. */
#ifndef _LIBC
+# undef __wctype
+# undef __iswctype
# define __wctype wctype
# define __iswctype iswctype
# define __btowc btowc
-# define __wcrtomb wcrtomb
# 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)
+#if __GNUC__ < 3 + (__GNUC_MINOR__ < 1)
+# define __attribute__(arg)
#endif
typedef __re_idx_t Idx;
+#ifdef _REGEX_LARGE_OFFSETS
+# define IDX_MAX (SIZE_MAX - 2)
+#else
+# define IDX_MAX INT_MAX
+#endif
/* Special return value for failure to match. */
#define REG_MISSING ((Idx) -1)
@@ -334,7 +365,7 @@ typedef struct
Idx idx; /* for BACK_REF */
re_context_type ctx_type; /* for ANCHOR */
} opr;
-#if __GNUC__ >= 2 && !__STRICT_ANSI__
+#if __GNUC__ >= 2 && !defined __STRICT_ANSI__
re_token_type_t type : 8;
#else
re_token_type_t type;
@@ -415,26 +446,24 @@ struct re_dfa_t;
typedef struct re_dfa_t re_dfa_t;
#ifndef _LIBC
-# if defined __i386__ && !defined __EMX__
-# define internal_function __attribute ((regparm (3), stdcall))
-# else
-# define internal_function
-# endif
+# define internal_function
#endif
+#ifndef NOT_IN_libc
static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr,
Idx new_buf_len)
internal_function;
-#ifdef RE_ENABLE_I18N
+# ifdef RE_ENABLE_I18N
static void build_wcs_buffer (re_string_t *pstr) internal_function;
static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr)
- internal_function;
-#endif /* RE_ENABLE_I18N */
+ internal_function;
+# endif /* RE_ENABLE_I18N */
static void build_upper_buffer (re_string_t *pstr) internal_function;
static void re_string_translate_buffer (re_string_t *pstr) internal_function;
static unsigned int re_string_context_at (const re_string_t *input, Idx idx,
int eflags)
- internal_function __attribute ((pure));
+ internal_function __attribute__ ((pure));
+#endif
#define re_string_peek_byte(pstr, offset) \
((pstr)->mbs[(pstr)->cur_idx + offset])
#define re_string_fetch_byte(pstr) \
@@ -452,7 +481,9 @@ static unsigned int re_string_context_at (const re_string_t *input, Idx idx,
#define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx))
#define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx))
-#include <alloca.h>
+#if defined _LIBC || HAVE_ALLOCA
+# include <alloca.h>
+#endif
#ifndef _LIBC
# if HAVE_ALLOCA
@@ -469,9 +500,18 @@ static unsigned int re_string_context_at (const re_string_t *input, Idx idx,
# endif
#endif
+#ifdef _LIBC
+# define MALLOC_0_IS_NONNULL 1
+#elif !defined MALLOC_0_IS_NONNULL
+# define MALLOC_0_IS_NONNULL 0
+#endif
+
#ifndef MAX
# define MAX(a,b) ((a) < (b) ? (b) : (a))
#endif
+#ifndef MIN
+# define MIN(a,b) ((a) < (b) ? (a) : (b))
+#endif
#define re_malloc(t,n) ((t *) malloc ((n) * sizeof (t)))
#define re_realloc(p,t,n) ((t *) realloc (p, (n) * sizeof (t)))
@@ -487,8 +527,8 @@ struct bin_tree_t
re_token_t token;
- /* `node_idx' is the index in dfa->nodes, if `type' == 0.
- Otherwise `type' indicate the type of this node. */
+ /* 'node_idx' is the index in dfa->nodes, if 'type' == 0.
+ Otherwise 'type' indicate the type of this node. */
Idx node_idx;
};
typedef struct bin_tree_t bin_tree_t;
@@ -541,9 +581,9 @@ struct re_dfastate_t
struct re_dfastate_t **trtable, **word_trtable;
unsigned int context : 4;
unsigned int halt : 1;
- /* If this state can accept `multi byte'.
+ /* If this state can accept "multi byte".
Note that we refer to multibyte characters, and multi character
- collating elements as `multi byte'. */
+ collating elements as "multi byte". */
unsigned int accept_mb : 1;
/* If this state has backreference node(s). */
unsigned int has_backref : 1;
@@ -672,7 +712,7 @@ struct re_dfa_t
re_bitset_ptr_t sb_char;
int str_tree_storage_idx;
- /* number of subexpressions `re_nsub' is in regex_t. */
+ /* number of subexpressions 're_nsub' is in regex_t. */
re_hashval_t state_hash_mask;
Idx init_node;
Idx nbackref; /* The number of backreference in this dfa. */
@@ -696,9 +736,7 @@ struct re_dfa_t
#ifdef DEBUG
char* re_str;
#endif
-#ifdef _LIBC
- __libc_lock_define (, lock)
-#endif
+ lock_define (lock)
};
#define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set))
@@ -729,33 +767,33 @@ typedef struct
} bracket_elem_t;
-/* Inline functions for bitset_t operation. */
+/* Functions for bitset_t operation. */
-static inline void
+static void
bitset_set (bitset_t set, Idx i)
{
set[i / BITSET_WORD_BITS] |= (bitset_word_t) 1 << i % BITSET_WORD_BITS;
}
-static inline void
+static void
bitset_clear (bitset_t set, Idx i)
{
set[i / BITSET_WORD_BITS] &= ~ ((bitset_word_t) 1 << i % BITSET_WORD_BITS);
}
-static inline bool
+static bool
bitset_contain (const bitset_t set, Idx i)
{
return (set[i / BITSET_WORD_BITS] >> i % BITSET_WORD_BITS) & 1;
}
-static inline void
+static void
bitset_empty (bitset_t set)
{
memset (set, '\0', sizeof (bitset_t));
}
-static inline void
+static void
bitset_set_all (bitset_t set)
{
memset (set, -1, sizeof (bitset_word_t) * (SBC_MAX / BITSET_WORD_BITS));
@@ -764,13 +802,13 @@ bitset_set_all (bitset_t set)
((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1;
}
-static inline void
+static void
bitset_copy (bitset_t dest, const bitset_t src)
{
memcpy (dest, src, sizeof (bitset_t));
}
-static inline void
+static void __attribute__ ((unused))
bitset_not (bitset_t set)
{
int bitset_i;
@@ -782,7 +820,7 @@ bitset_not (bitset_t set)
& ~set[BITSET_WORDS - 1]);
}
-static inline void
+static void __attribute__ ((unused))
bitset_merge (bitset_t dest, const bitset_t src)
{
int bitset_i;
@@ -790,7 +828,7 @@ bitset_merge (bitset_t dest, const bitset_t src)
dest[bitset_i] |= src[bitset_i];
}
-static inline void
+static void __attribute__ ((unused))
bitset_mask (bitset_t dest, const bitset_t src)
{
int bitset_i;
@@ -799,9 +837,9 @@ bitset_mask (bitset_t dest, const bitset_t src)
}
#ifdef RE_ENABLE_I18N
-/* Inline functions for re_string. */
-static inline int
-internal_function __attribute ((pure))
+/* Functions for re_string. */
+static int
+internal_function __attribute__ ((pure, unused))
re_string_char_size_at (const re_string_t *pstr, Idx idx)
{
int byte_idx;
@@ -813,8 +851,8 @@ re_string_char_size_at (const re_string_t *pstr, Idx idx)
return byte_idx;
}
-static inline wint_t
-internal_function __attribute ((pure))
+static wint_t
+internal_function __attribute__ ((pure, unused))
re_string_wchar_at (const re_string_t *pstr, Idx idx)
{
if (pstr->mb_cur_max == 1)
@@ -822,15 +860,15 @@ re_string_wchar_at (const re_string_t *pstr, Idx idx)
return (wint_t) pstr->wcs[idx];
}
+# ifndef NOT_IN_libc
static int
-internal_function __attribute ((pure))
+internal_function __attribute__ ((pure, unused))
re_string_elem_size_at (const re_string_t *pstr, Idx idx)
{
-# ifdef _LIBC
+# ifdef _LIBC
const unsigned char *p, *extra;
const int32_t *table, *indirect;
- int32_t tmp;
-# include <locale/weight.h>
+# include <locale/weight.h>
uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
if (nrules != 0)
@@ -841,13 +879,14 @@ re_string_elem_size_at (const re_string_t *pstr, Idx idx)
indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
_NL_COLLATE_INDIRECTMB);
p = pstr->mbs + idx;
- tmp = findidx (&p);
+ findidx (&p, pstr->len - idx);
return p - pstr->mbs - idx;
}
else
-# endif /* _LIBC */
+# endif /* _LIBC */
return 1;
}
+# endif
#endif /* RE_ENABLE_I18N */
#ifndef __GNUC_PREREQ
diff --git a/lib/regexec.c b/lib/regexec.c
index a704c1b..d29d442 100644
--- a/lib/regexec.c
+++ b/lib/regexec.c
@@ -1,21 +1,21 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2011 Free Software Foundation, Inc.
+ Copyright (C) 2002-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
- This program is free software; you can redistribute 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.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 3 of the License, or (at your option) any later version.
- This program is distributed in the hope that it will be useful,
+ The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ You should have received a copy of the GNU General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags,
Idx n) internal_function;
@@ -51,9 +51,8 @@ static regoff_t re_search_stub (struct re_pattern_buffer *bufp,
regoff_t range, Idx stop,
struct re_registers *regs,
bool ret_len) internal_function;
-static unsigned int re_copy_regs (struct re_registers *regs, regmatch_t *pmatch,
- Idx nregs, int regs_allocated)
- internal_function;
+static unsigned re_copy_regs (struct re_registers *regs, regmatch_t *pmatch,
+ Idx nregs, int regs_allocated) internal_function;
static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx)
internal_function;
static Idx check_matching (re_match_context_t *mctx, bool fl_longest_match,
@@ -200,7 +199,7 @@ static Idx group_nodes_into_DFAstates (const re_dfa_t *dfa,
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)
+static reg_errcode_t extend_buffers (re_match_context_t *mctx, int min_len)
internal_function;
/* Entry point for POSIX code. */
@@ -209,11 +208,11 @@ static reg_errcode_t extend_buffers (re_match_context_t *mctx)
string STRING.
If NMATCH is zero or REG_NOSUB was set in the cflags argument to
- `regcomp', we ignore PMATCH. Otherwise, we assume PMATCH has at
+ 'regcomp', we ignore PMATCH. Otherwise, we assume PMATCH has at
least NMATCH elements, and we set them to the offsets of the
corresponding matched substrings.
- EFLAGS specifies `execution flags' which affect matching: if
+ EFLAGS specifies "execution flags" which affect matching: if
REG_NOTBOL is set, then ^ does not match at the beginning of the
string; if REG_NOTEOL is set, then $ does not match at the end.
@@ -229,9 +228,7 @@ regexec (preg, string, nmatch, pmatch, eflags)
{
reg_errcode_t err;
Idx start, length;
-#ifdef _LIBC
- re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
-#endif
+ re_dfa_t *dfa = preg->buffer;
if (eflags & ~(REG_NOTBOL | REG_NOTEOL | REG_STARTEND))
return REG_BADPAT;
@@ -247,14 +244,14 @@ regexec (preg, string, nmatch, pmatch, eflags)
length = strlen (string);
}
- __libc_lock_lock (dfa->lock);
+ 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);
+ lock_unlock (dfa->lock);
return err != REG_NOERROR;
}
@@ -365,7 +362,6 @@ weak_alias (__re_search_2, re_search_2)
#endif
static regoff_t
-internal_function
re_search_2_stub (struct re_pattern_buffer *bufp,
const char *string1, Idx length1,
const char *string2, Idx length2,
@@ -413,7 +409,6 @@ re_search_2_stub (struct re_pattern_buffer *bufp,
otherwise the position of the match is returned. */
static regoff_t
-internal_function
re_search_stub (struct re_pattern_buffer *bufp,
const char *string, Idx length,
Idx start, regoff_t range, Idx stop, struct re_registers *regs,
@@ -424,9 +419,7 @@ re_search_stub (struct re_pattern_buffer *bufp,
Idx nregs;
regoff_t rval;
int eflags = 0;
-#ifdef _LIBC
- re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
-#endif
+ re_dfa_t *dfa = bufp->buffer;
Idx last_start = start + range;
/* Check for out-of-range. */
@@ -437,7 +430,7 @@ re_search_stub (struct re_pattern_buffer *bufp,
else if (BE (last_start < 0 || (range < 0 && start <= last_start), 0))
last_start = 0;
- __libc_lock_lock (dfa->lock);
+ lock_lock (dfa->lock);
eflags |= (bufp->not_bol) ? REG_NOTBOL : 0;
eflags |= (bufp->not_eol) ? REG_NOTEOL : 0;
@@ -477,9 +470,9 @@ re_search_stub (struct re_pattern_buffer *bufp,
rval = 0;
- /* I hope we needn't fill ther regs with -1's when no match was found. */
+ /* I hope we needn't fill their regs with -1's when no match was found. */
if (result != REG_NOERROR)
- rval = -1;
+ rval = result == REG_NOMATCH ? -1 : -2;
else if (regs != NULL)
{
/* If caller wants register contents data back, copy them. */
@@ -501,19 +494,18 @@ re_search_stub (struct re_pattern_buffer *bufp,
}
re_free (pmatch);
out:
- __libc_lock_unlock (dfa->lock);
+ lock_unlock (dfa->lock);
return rval;
}
-static unsigned int
-internal_function
+static unsigned
re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs,
int regs_allocated)
{
int rval = REGS_REALLOCATE;
Idx i;
Idx need_regs = nregs + 1;
- /* We need one extra element beyond `num_regs' for the `-1' marker GNU code
+ /* We need one extra element beyond 'num_regs' for the '-1' marker GNU code
uses. */
/* Have the register data arrays been allocated? */
@@ -636,7 +628,7 @@ re_exec (s)
(0 <= LAST_START && LAST_START <= LENGTH) */
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
re_search_internal (const regex_t *preg,
const char *string, Idx length,
Idx start, Idx last_start, Idx stop,
@@ -644,7 +636,7 @@ re_search_internal (const regex_t *preg,
int eflags)
{
reg_errcode_t err;
- const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer;
+ const re_dfa_t *dfa = preg->buffer;
Idx left_lim, right_lim;
int incr;
bool fl_longest_match;
@@ -719,7 +711,8 @@ re_search_internal (const regex_t *preg,
if (nmatch > 1 || dfa->has_mb_node)
{
/* Avoid overflow. */
- if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= mctx.input.bufs_len, 0))
+ if (BE ((MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *))
+ <= mctx.input.bufs_len), 0))
{
err = REG_ESPACE;
goto free_return;
@@ -739,7 +732,7 @@ re_search_internal (const regex_t *preg,
mctx.input.tip_context = (eflags & REG_NOTBOL) ? CONTEXT_BEGBUF
: CONTEXT_NEWLINE | CONTEXT_BEGBUF;
- /* Check incrementally whether of not the input string match. */
+ /* Check incrementally whether the input string matches. */
incr = (last_start < start) ? -1 : 1;
left_lim = (last_start < start) ? last_start : start;
right_lim = (last_start < start) ? start : last_start;
@@ -921,7 +914,7 @@ re_search_internal (const regex_t *preg,
goto free_return;
}
- /* At last, add the offset to the each registers, since we slided
+ /* At last, add the offset to each register, since we slid
the buffers so that we could assume that the matching starts
from 0. */
for (reg_idx = 0; reg_idx < nmatch; ++reg_idx)
@@ -971,7 +964,7 @@ re_search_internal (const regex_t *preg,
}
static reg_errcode_t
-internal_function __attribute_warn_unused_result__
+__attribute_warn_unused_result__
prune_impossible_nodes (re_match_context_t *mctx)
{
const re_dfa_t *const dfa = mctx->dfa;
@@ -987,7 +980,7 @@ prune_impossible_nodes (re_match_context_t *mctx)
halt_node = mctx->last_node;
/* Avoid overflow. */
- if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= match_last, 0))
+ if (BE (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) <= match_last, 0))
return REG_ESPACE;
sifted_states = re_malloc (re_dfastate_t *, match_last + 1);
@@ -1067,7 +1060,7 @@ prune_impossible_nodes (re_match_context_t *mctx)
since initial states may have constraints like "\<", "^", etc.. */
static inline re_dfastate_t *
-__attribute ((always_inline)) internal_function
+__attribute__ ((always_inline)) internal_function
acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx,
Idx idx)
{
@@ -1105,7 +1098,7 @@ acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx,
FL_LONGEST_MATCH means we want the POSIX longest matching.
If P_MATCH_FIRST is not NULL, and the match fails, it is set to the
next place where we may want to try matching.
- Note that the matcher assume that the maching starts from the current
+ Note that the matcher assumes that the matching starts from the current
index of the buffer. */
static Idx
@@ -1174,11 +1167,12 @@ check_matching (re_match_context_t *mctx, bool fl_longest_match,
re_dfastate_t *old_state = cur_state;
Idx next_char_idx = re_string_cur_idx (&mctx->input) + 1;
- if (BE (next_char_idx >= mctx->input.bufs_len, 0)
+ if ((BE (next_char_idx >= mctx->input.bufs_len, 0)
+ && mctx->input.bufs_len < mctx->input.len)
|| (BE (next_char_idx >= mctx->input.valid_len, 0)
&& mctx->input.valid_len < mctx->input.len))
{
- err = extend_buffers (mctx);
+ err = extend_buffers (mctx, next_char_idx + 1);
if (BE (err != REG_NOERROR, 0))
{
assert (err == REG_ESPACE);
@@ -1435,7 +1429,7 @@ internal_function __attribute_warn_unused_result__
set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch,
regmatch_t *pmatch, bool fl_backtrack)
{
- const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer;
+ const re_dfa_t *dfa = preg->buffer;
Idx idx, cur_node;
re_node_set eps_via_nodes;
struct re_fail_stack_t *fs;
@@ -1607,21 +1601,21 @@ update_regs (const re_dfa_t *dfa, regmatch_t *pmatch,
and sift the nodes in each states according to the following rules.
Updated state_log will be wrote to STATE_LOG.
- Rules: We throw away the Node `a' in the STATE_LOG[STR_IDX] if...
+ Rules: We throw away the Node 'a' in the STATE_LOG[STR_IDX] if...
1. When STR_IDX == MATCH_LAST(the last index in the state_log):
- If `a' isn't the LAST_NODE and `a' can't epsilon transit to
- the LAST_NODE, we throw away the node `a'.
- 2. When 0 <= STR_IDX < MATCH_LAST and `a' accepts
- string `s' and transit to `b':
+ If 'a' isn't the LAST_NODE and 'a' can't epsilon transit to
+ the LAST_NODE, we throw away the node 'a'.
+ 2. When 0 <= STR_IDX < MATCH_LAST and 'a' accepts
+ string 's' and transit to 'b':
i. If 'b' isn't in the STATE_LOG[STR_IDX+strlen('s')], we throw
- away the node `a'.
+ away the node 'a'.
ii. If 'b' is in the STATE_LOG[STR_IDX+strlen('s')] but 'b' is
- thrown away, we throw away the node `a'.
+ thrown away, we throw away the node 'a'.
3. When 0 <= STR_IDX < MATCH_LAST and 'a' epsilon transit to 'b':
i. If 'b' isn't in the STATE_LOG[STR_IDX], we throw away the
- node `a'.
+ node 'a'.
ii. If 'b' is in the STATE_LOG[STR_IDX] but 'b' is thrown away,
- we throw away the node `a'. */
+ we throw away the node 'a'. */
#define STATE_NODE_CONTAINS(state,node) \
((state) != NULL && re_node_set_contains (&(state)->nodes, node))
@@ -1694,11 +1688,11 @@ build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx,
Idx i;
/* Then build the next sifted state.
- We build the next sifted state on `cur_dest', and update
- `sifted_states[str_idx]' with `cur_dest'.
+ We build the next sifted state on 'cur_dest', and update
+ 'sifted_states[str_idx]' with 'cur_dest'.
Note:
- `cur_dest' is the sifted state from `state_log[str_idx + 1]'.
- `cur_src' points the node_set of the old `state_log[str_idx]'
+ 'cur_dest' is the sifted state from 'state_log[str_idx + 1]'.
+ 'cur_src' points the node_set of the old 'state_log[str_idx]'
(with the epsilon nodes pre-filtered out). */
for (i = 0; i < cur_src->nelem; i++)
{
@@ -1711,7 +1705,7 @@ build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx,
assert (!IS_EPSILON_NODE (type));
#endif
#ifdef RE_ENABLE_I18N
- /* If the node may accept `multi byte'. */
+ /* If the node may accept "multi byte". */
if (dfa->nodes[prev_node].accept_mb)
naccepted = sift_states_iter_mb (mctx, sctx, prev_node,
str_idx, sctx->last_str_idx);
@@ -1752,12 +1746,13 @@ clean_state_log_if_needed (re_match_context_t *mctx, Idx next_state_log_idx)
{
Idx top = mctx->state_log_top;
- if (next_state_log_idx >= mctx->input.bufs_len
+ if ((next_state_log_idx >= mctx->input.bufs_len
+ && mctx->input.bufs_len < mctx->input.len)
|| (next_state_log_idx >= mctx->input.valid_len
&& mctx->input.valid_len < mctx->input.len))
{
reg_errcode_t err;
- err = extend_buffers (mctx);
+ err = extend_buffers (mctx, next_state_log_idx + 1);
if (BE (err != REG_NOERROR, 0))
return err;
}
@@ -2267,17 +2262,17 @@ sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx,
{
const re_dfa_t *const dfa = mctx->dfa;
int naccepted;
- /* Check the node can accept `multi byte'. */
+ /* Check the node can accept "multi byte". */
naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx);
if (naccepted > 0 && str_idx + naccepted <= max_str_idx &&
!STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted],
dfa->nexts[node_idx]))
- /* The node can't accept the `multi byte', or the
+ /* The node can't accept the "multi byte", or the
destination was already thrown away, then the node
- could't accept the current input `multi byte'. */
+ could't accept the current input "multi byte". */
naccepted = 0;
/* Otherwise, it is sure that the node could accept
- `naccepted' bytes input. */
+ 'naccepted' bytes input. */
return naccepted;
}
#endif /* RE_ENABLE_I18N */
@@ -2456,7 +2451,7 @@ find_recover_state (reg_errcode_t *err, re_match_context_t *mctx)
/* From the node set CUR_NODES, pick up the nodes whose types are
OP_OPEN_SUBEXP and which have corresponding back references in the regular
expression. And register them to use them later for evaluating the
- correspoding back references. */
+ corresponding back references. */
static reg_errcode_t
internal_function
@@ -2567,7 +2562,7 @@ transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate)
if (naccepted == 0)
continue;
- /* The node can accepts `naccepted' bytes. */
+ /* The node can accepts 'naccepted' bytes. */
dest_idx = re_string_cur_idx (&mctx->input) + naccepted;
mctx->max_mb_elem_len = ((mctx->max_mb_elem_len < naccepted) ? naccepted
: mctx->max_mb_elem_len);
@@ -2619,7 +2614,7 @@ transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
const re_token_t *node = dfa->nodes + node_idx;
re_node_set *new_dest_nodes;
- /* Check whether `node' is a backreference or not. */
+ /* Check whether 'node' is a backreference or not. */
if (node->type != OP_BACK_REF)
continue;
@@ -2631,14 +2626,14 @@ transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
continue;
}
- /* `node' is a backreference.
+ /* 'node' is a backreference.
Check the substring which the substring matched. */
bkc_idx = mctx->nbkref_ents;
err = get_subexp (mctx, node_idx, cur_str_idx);
if (BE (err != REG_NOERROR, 0))
goto free_return;
- /* And add the epsilon closures (which is `new_dest_nodes') of
+ /* And add the epsilon closures (which is 'new_dest_nodes') of
the backreference to appropriate state_log. */
#ifdef DEBUG
assert (dfa->nexts[node_idx] != REG_MISSING);
@@ -2662,7 +2657,7 @@ transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
dest_state = mctx->state_log[dest_str_idx];
prev_nelem = ((mctx->state_log[cur_str_idx] == NULL) ? 0
: mctx->state_log[cur_str_idx]->nodes.nelem);
- /* Add `new_dest_node' to state_log. */
+ /* Add 'new_dest_node' to state_log. */
if (dest_state == NULL)
{
mctx->state_log[dest_str_idx]
@@ -2814,7 +2809,7 @@ get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx)
if (bkref_str_off >= mctx->input.len)
break;
- err = extend_buffers (mctx);
+ err = extend_buffers (mctx, bkref_str_off + 1);
if (BE (err != REG_NOERROR, 0))
return err;
@@ -2936,9 +2931,12 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node,
{
re_dfastate_t **new_array;
Idx old_alloc = path->alloc;
- Idx new_alloc = old_alloc + last_str + mctx->max_mb_elem_len + 1;
- if (BE (new_alloc < old_alloc, 0)
- || BE (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc, 0))
+ Idx incr_alloc = last_str + mctx->max_mb_elem_len + 1;
+ Idx new_alloc;
+ if (BE (IDX_MAX - old_alloc < incr_alloc, 0))
+ return REG_ESPACE;
+ new_alloc = old_alloc + incr_alloc;
+ if (BE (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc, 0))
return REG_ESPACE;
new_array = re_realloc (path->array, re_dfastate_t *, new_alloc);
if (BE (new_array == NULL, 0))
@@ -3101,7 +3099,7 @@ check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx,
assert (!IS_EPSILON_NODE (type));
#endif
#ifdef RE_ENABLE_I18N
- /* If the node may accept `multi byte'. */
+ /* If the node may accept "multi byte". */
if (dfa->nodes[cur_node].accept_mb)
{
naccepted = check_node_accept_bytes (dfa, cur_node, &mctx->input,
@@ -3358,7 +3356,7 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
bitset_word_t elem, mask;
bool dests_node_malloced = false;
bool dest_states_malloced = false;
- Idx ndests; /* Number of the destination states from `state'. */
+ Idx ndests; /* Number of the destination states from 'state'. */
re_dfastate_t **trtable;
re_dfastate_t **dest_states = NULL, **dest_states_word, **dest_states_nl;
re_node_set follows, *dests_node;
@@ -3372,8 +3370,8 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
} *dests_alloc;
/* We build DFA states which corresponds to the destination nodes
- from `state'. `dests_node[i]' represents the nodes which i-th
- destination state contains, and `dests_ch[i]' represents the
+ from 'state'. 'dests_node[i]' represents the nodes which i-th
+ destination state contains, and 'dests_ch[i]' represents the
characters which i-th destination state accepts. */
if (__libc_use_alloca (sizeof (struct dests_alloc)))
dests_alloc = (struct dests_alloc *) alloca (sizeof (struct dests_alloc));
@@ -3387,16 +3385,17 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
dests_node = dests_alloc->dests_node;
dests_ch = dests_alloc->dests_ch;
- /* Initialize transiton table. */
+ /* Initialize transition table. */
state->word_trtable = state->trtable = NULL;
- /* At first, group all nodes belonging to `state' into several
+ /* At first, group all nodes belonging to 'state' into several
destinations. */
ndests = group_nodes_into_DFAstates (dfa, state, dests_node, dests_ch);
if (BE (! REG_VALID_NONZERO_INDEX (ndests), 0))
{
if (dests_node_malloced)
free (dests_alloc);
+ /* Return false in case of an error, true otherwise. */
if (ndests == 0)
{
state->trtable = (re_dfastate_t **)
@@ -3592,13 +3591,13 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
reg_errcode_t err;
bool ok;
Idx i, j, k;
- Idx ndests; /* Number of the destinations from `state'. */
+ Idx ndests; /* Number of the destinations from 'state'. */
bitset_t accepts; /* Characters a node can accept. */
const re_node_set *cur_nodes = &state->nodes;
bitset_empty (accepts);
ndests = 0;
- /* For all the nodes belonging to `state', */
+ /* For all the nodes belonging to 'state', */
for (i = 0; i < cur_nodes->nelem; ++i)
{
re_token_t *node = &dfa->nodes[cur_nodes->elems[i]];
@@ -3641,7 +3640,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
else
continue;
- /* Check the `accepts' and sift the characters which are not
+ /* Check the 'accepts' and sift the characters which are not
match it the context. */
if (constraint)
{
@@ -3700,7 +3699,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
}
}
- /* Then divide `accepts' into DFA states, or create a new
+ /* Then divide 'accepts' into DFA states, or create a new
state. Above, we make sure that accepts is not empty. */
for (j = 0; j < ndests; ++j)
{
@@ -3713,7 +3712,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
if (type == CHARACTER && !bitset_contain (dests_ch[j], node->opr.c))
continue;
- /* Enumerate the intersection set of this state and `accepts'. */
+ /* Enumerate the intersection set of this state and 'accepts'. */
has_intersec = 0;
for (k = 0; k < BITSET_WORDS; ++k)
has_intersec |= intersec[k] = accepts[k] & dests_ch[j][k];
@@ -3721,7 +3720,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
if (!has_intersec)
continue;
- /* Then check if this state is a subset of `accepts'. */
+ /* Then check if this state is a subset of 'accepts'. */
not_subset = not_consumed = 0;
for (k = 0; k < BITSET_WORDS; ++k)
{
@@ -3729,8 +3728,8 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
not_consumed |= accepts[k] = accepts[k] & ~dests_ch[j][k];
}
- /* If this state isn't a subset of `accepts', create a
- new group state, which has the `remains'. */
+ /* If this state isn't a subset of 'accepts', create a
+ new group state, which has the 'remains'. */
if (not_subset)
{
bitset_copy (dests_ch[ndests], remains);
@@ -3769,7 +3768,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
}
#ifdef RE_ENABLE_I18N
-/* Check how many bytes the node `dfa->nodes[node_idx]' accepts.
+/* Check how many bytes the node 'dfa->nodes[node_idx]' accepts.
Return the number of the bytes the node accepts.
STR_IDX is the current index of the input string.
@@ -3896,7 +3895,6 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
const int32_t *table, *indirect;
const unsigned char *weights, *extra;
const char *collseqwc;
- int32_t idx;
/* This #include defines a local function! */
# include <locale/weight.h>
@@ -3934,6 +3932,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
in_collseq = find_collation_sequence_value (pin, elem_len);
}
/* match with range expression? */
+ /* FIXME: Implement rational ranges here, too. */
for (i = 0; i < cset->nranges; ++i)
if (cset->range_starts[i] <= in_collseq
&& in_collseq <= cset->range_ends[i])
@@ -3954,7 +3953,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
_NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB);
indirect = (const int32_t *)
_NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
- int32_t idx = findidx (&cp);
+ int32_t idx = findidx (&cp, elem_len);
if (idx > 0)
for (i = 0; i < cset->nequiv_classes; ++i)
{
@@ -3985,18 +3984,9 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
# endif /* _LIBC */
{
/* match with range expression? */
-#if __GNUC__ >= 2 && ! (__STDC_VERSION__ < 199901L && __STRICT_ANSI__)
- 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)
+ if (cset->range_starts[i] <= wc && wc <= cset->range_ends[i])
{
match_len = char_len;
goto check_node_accept_bytes_match;
@@ -4066,7 +4056,7 @@ find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len)
/* Skip the collation sequence value. */
idx += sizeof (uint32_t);
/* Skip the wide char sequence of the collating element. */
- idx = idx + sizeof (uint32_t) * (extra[idx] + 1);
+ idx = idx + sizeof (uint32_t) * (*(int32_t *) (extra + idx) + 1);
/* If we found the entry, return the sequence value. */
if (found)
return *(uint32_t *) (extra + idx);
@@ -4134,17 +4124,20 @@ check_node_accept (const re_match_context_t *mctx, const re_token_t *node,
static reg_errcode_t
internal_function __attribute_warn_unused_result__
-extend_buffers (re_match_context_t *mctx)
+extend_buffers (re_match_context_t *mctx, int min_len)
{
reg_errcode_t ret;
re_string_t *pstr = &mctx->input;
/* Avoid overflow. */
- if (BE (SIZE_MAX / 2 / sizeof (re_dfastate_t *) <= pstr->bufs_len, 0))
+ if (BE (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) / 2
+ <= pstr->bufs_len, 0))
return REG_ESPACE;
- /* Double the lengthes of the buffers. */
- ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2);
+ /* Double the lengths of the buffers, but allocate at least MIN_LEN. */
+ ret = re_string_realloc_buffers (pstr,
+ MAX (min_len,
+ MIN (pstr->len, pstr->bufs_len * 2)));
if (BE (ret != REG_NOERROR, 0))
return ret;
@@ -4207,7 +4200,7 @@ match_ctx_init (re_match_context_t *mctx, int eflags, Idx n)
size_t max_object_size =
MAX (sizeof (struct re_backref_cache_entry),
sizeof (re_sub_match_top_t *));
- if (BE (SIZE_MAX / max_object_size < n, 0))
+ if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < n, 0))
return REG_ESPACE;
mctx->bkref_ents = re_malloc (struct re_backref_cache_entry, n);
diff --git a/lib/rename.c b/lib/rename.c
index e498f65..3e463ea 100644
--- a/lib/rename.c
+++ b/lib/rename.c
@@ -1,6 +1,6 @@
/* Work around rename bugs in some systems.
- Copyright (C) 2001-2003, 2005-2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2006, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/rmdir.c b/lib/rmdir.c
index d7395a5..a8d907e 100644
--- a/lib/rmdir.c
+++ b/lib/rmdir.c
@@ -1,6 +1,6 @@
/* Work around rmdir bugs.
- Copyright (C) 1988, 1990, 1999, 2003-2006, 2009-2011 Free Software
+ Copyright (C) 1988, 1990, 1999, 2003-2006, 2009-2013 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/same-inode.h b/lib/same-inode.h
index d434b94..3843b07 100644
--- a/lib/same-inode.h
+++ b/lib/same-inode.h
@@ -1,6 +1,6 @@
/* Determine whether two stat buffers refer to the same file.
- Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -18,8 +18,16 @@
#ifndef SAME_INODE_H
# define SAME_INODE_H 1
-# define SAME_INODE(Stat_buf_1, Stat_buf_2) \
- ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \
- && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev)
+# ifdef __VMS
+# define SAME_INODE(a, b) \
+ ((a).st_ino[0] == (b).st_ino[0] \
+ && (a).st_ino[1] == (b).st_ino[1] \
+ && (a).st_ino[2] == (b).st_ino[2] \
+ && (a).st_dev == (b).st_dev)
+# else
+# define SAME_INODE(a, b) \
+ ((a).st_ino == (b).st_ino \
+ && (a).st_dev == (b).st_dev)
+# endif
#endif
diff --git a/lib/sched.in.h b/lib/sched.in.h
index 8a1135f..731e800 100644
--- a/lib/sched.in.h
+++ b/lib/sched.in.h
@@ -1,5 +1,5 @@
/* Replacement <sched.h> for platforms that lack it.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef _GL_SCHED_H
+#ifndef _@GUARD_PREFIX@_SCHED_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
@@ -26,8 +26,14 @@
# @INCLUDE_NEXT@ @NEXT_SCHED_H@
#endif
-#ifndef _GL_SCHED_H
-#define _GL_SCHED_H
+#ifndef _@GUARD_PREFIX@_SCHED_H
+#define _@GUARD_PREFIX@_SCHED_H
+
+/* Get pid_t.
+ This is needed on glibc 2.11 (see
+ glibc bug <http://sourceware.org/bugzilla/show_bug.cgi?id=13198>)
+ and Mac OS X 10.5. */
+#include <sys/types.h>
#if !@HAVE_STRUCT_SCHED_PARAM@
@@ -47,5 +53,5 @@ struct sched_param
# define SCHED_OTHER 0
#endif
-#endif /* _GL_SCHED_H */
-#endif /* _GL_SCHED_H */
+#endif /* _@GUARD_PREFIX@_SCHED_H */
+#endif /* _@GUARD_PREFIX@_SCHED_H */
diff --git a/lib/secure_getenv.c b/lib/secure_getenv.c
new file mode 100644
index 0000000..6c11c5e
--- /dev/null
+++ b/lib/secure_getenv.c
@@ -0,0 +1,41 @@
+/* Look up an environment variable more securely.
+
+ Copyright 2013 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <stdlib.h>
+
+#if !HAVE___SECURE_GETENV
+# if HAVE_ISSETUGID
+# include <unistd.h>
+# else
+# undef issetugid
+# define issetugid() 1
+# endif
+#endif
+
+char *
+secure_getenv (char const *name)
+{
+#if HAVE___SECURE_GETENV
+ return __secure_getenv (name);
+#else
+ if (issetugid ())
+ return 0;
+ return getenv (name);
+#endif
+}
diff --git a/lib/sig-handler.c b/lib/sig-handler.c
new file mode 100644
index 0000000..52c3621
--- /dev/null
+++ b/lib/sig-handler.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define SIG_HANDLER_INLINE _GL_EXTERN_INLINE
+#include "sig-handler.h"
diff --git a/lib/sig-handler.h b/lib/sig-handler.h
index abb660c..67d061d 100644
--- a/lib/sig-handler.h
+++ b/lib/sig-handler.h
@@ -1,6 +1,6 @@
/* Convenience declarations when working with <signal.h>.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -20,13 +20,21 @@
#include <signal.h>
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef SIG_HANDLER_INLINE
+# define SIG_HANDLER_INLINE _GL_INLINE
+#endif
+
/* Convenience type when working with signal handlers. */
typedef void (*sa_handler_t) (int);
/* Return the handler of a signal, as a sa_handler_t value regardless
of its true type. The resulting function can be compared to
special values like SIG_IGN but it is not portable to call it. */
-static inline sa_handler_t
+SIG_HANDLER_INLINE sa_handler_t
get_handler (struct sigaction const *a)
{
#ifdef SA_SIGINFO
@@ -41,4 +49,6 @@ get_handler (struct sigaction const *a)
return a->sa_handler;
}
+_GL_INLINE_HEADER_END
+
#endif /* _GL_SIG_HANDLER_H */
diff --git a/lib/sigaction.c b/lib/sigaction.c
index e6a55da..97eb76d 100644
--- a/lib/sigaction.c
+++ b/lib/sigaction.c
@@ -1,5 +1,5 @@
/* POSIX compatible signal blocking.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
Written by Eric Blake <ebb9@byu.net>, 2008.
This program is free software: you can redistribute it and/or modify
@@ -24,7 +24,7 @@
#include <stdint.h>
#include <stdlib.h>
-/* This implementation of sigaction is tailored to Woe32 behavior:
+/* This implementation of sigaction is tailored to native Windows behavior:
signal() has SysV semantics (ie. the handler is uninstalled before
it is invoked). This is an inherent data race if an asynchronous
signal is sent twice in a row before we can reinstall our handler,
@@ -39,9 +39,9 @@
- We don't implement SA_NOCLDSTOP or SA_NOCLDWAIT, because SIGCHLD
is not defined.
- We don't implement SA_ONSTACK, because sigaltstack() is not present.
- - We ignore SA_RESTART, because blocking Win32 calls are not interrupted
- anyway when an asynchronous signal occurs, and the MSVCRT runtime
- never sets errno to EINTR.
+ - We ignore SA_RESTART, because blocking native Windows API calls are
+ not interrupted anyway when an asynchronous signal occurs, and the
+ MSVCRT runtime never sets errno to EINTR.
- We don't implement SA_SIGINFO because it is impossible to do so
portably.
diff --git a/lib/siglist.h b/lib/siglist.h
index 104bc68..7817c95 100644
--- a/lib/siglist.h
+++ b/lib/siglist.h
@@ -1,5 +1,5 @@
/* Canonical list of all signal names.
- Copyright (C) 1996-1999, 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 1996-1999, 2008-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/signal.in.h b/lib/signal.in.h
index 7a6d6ee..a531487 100644
--- a/lib/signal.in.h
+++ b/lib/signal.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <signal.h>.
- Copyright (C) 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -20,21 +20,49 @@
#endif
@PRAGMA_COLUMNS@
-#if defined __need_sig_atomic_t || defined __need_sigset_t
-/* Special invocation convention inside glibc header files. */
+#if defined __need_sig_atomic_t || defined __need_sigset_t || defined _GL_ALREADY_INCLUDING_SIGNAL_H || (defined _SIGNAL_H && !defined __SIZEOF_PTHREAD_MUTEX_T)
+/* Special invocation convention:
+ - Inside glibc header files.
+ - On glibc systems we have a sequence of nested includes
+ <signal.h> -> <ucontext.h> -> <signal.h>.
+ In this situation, the functions are not yet declared, therefore we cannot
+ provide the C++ aliases.
+ - On glibc systems with GCC 4.3 we have a sequence of nested includes
+ <csignal> -> </usr/include/signal.h> -> <sys/ucontext.h> -> <signal.h>.
+ In this situation, some of the functions are not yet declared, therefore
+ we cannot provide the C++ aliases. */
# @INCLUDE_NEXT@ @NEXT_SIGNAL_H@
#else
/* Normal invocation convention. */
-#ifndef _GL_SIGNAL_H
+#ifndef _@GUARD_PREFIX@_SIGNAL_H
+
+#define _GL_ALREADY_INCLUDING_SIGNAL_H
+
+/* Define pid_t, uid_t.
+ Also, mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.
+ On Solaris 10, <signal.h> includes <sys/types.h>, which eventually includes
+ us; so include <sys/types.h> now, before the second inclusion guard. */
+#include <sys/types.h>
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_SIGNAL_H@
-#ifndef _GL_SIGNAL_H
-#define _GL_SIGNAL_H
+#undef _GL_ALREADY_INCLUDING_SIGNAL_H
+
+#ifndef _@GUARD_PREFIX@_SIGNAL_H
+#define _@GUARD_PREFIX@_SIGNAL_H
+
+/* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6 declare
+ pthread_sigmask in <pthread.h>, not in <signal.h>.
+ But avoid namespace pollution on glibc systems.*/
+#if (@GNULIB_PTHREAD_SIGMASK@ || defined GNULIB_POSIXCHECK) \
+ && ((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined __osf__ || defined __sun) \
+ && ! defined __GLIBC__
+# include <pthread.h>
+#endif
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
@@ -42,10 +70,6 @@
/* The definition of _GL_WARN_ON_USE is copied here. */
-/* Define pid_t, uid_t.
- Also, mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
-#include <sys/types.h>
-
/* On AIX, sig_atomic_t already includes volatile. C99 requires that
'volatile sig_atomic_t' ignore the extra modifier, but C89 did not.
Hence, redefine this to a non-volatile type as needed. */
@@ -66,6 +90,20 @@ typedef unsigned int sigset_t;
# endif
#endif
+/* Define sighandler_t, the type of signal handlers. A GNU extension. */
+#if !@HAVE_SIGHANDLER_T@
+# ifdef __cplusplus
+extern "C" {
+# endif
+# if !GNULIB_defined_sighandler_t
+typedef void (*sighandler_t) (int);
+# define GNULIB_defined_sighandler_t 1
+# endif
+# ifdef __cplusplus
+}
+# endif
+#endif
+
#if @GNULIB_SIGNAL_H_SIGPIPE@
# ifndef SIGPIPE
@@ -86,9 +124,64 @@ typedef unsigned int sigset_t;
#endif
+#if @GNULIB_PTHREAD_SIGMASK@
+# if @REPLACE_PTHREAD_SIGMASK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_sigmask
+# define pthread_sigmask rpl_pthread_sigmask
+# endif
+_GL_FUNCDECL_RPL (pthread_sigmask, int,
+ (int how, const sigset_t *new_mask, sigset_t *old_mask));
+_GL_CXXALIAS_RPL (pthread_sigmask, int,
+ (int how, const sigset_t *new_mask, sigset_t *old_mask));
+# else
+# if !@HAVE_PTHREAD_SIGMASK@
+_GL_FUNCDECL_SYS (pthread_sigmask, int,
+ (int how, const sigset_t *new_mask, sigset_t *old_mask));
+# endif
+_GL_CXXALIAS_SYS (pthread_sigmask, int,
+ (int how, const sigset_t *new_mask, sigset_t *old_mask));
+# endif
+_GL_CXXALIASWARN (pthread_sigmask);
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_sigmask
+# if HAVE_RAW_DECL_PTHREAD_SIGMASK
+_GL_WARN_ON_USE (pthread_sigmask, "pthread_sigmask is not portable - "
+ "use gnulib module pthread_sigmask for portability");
+# endif
+#endif
+
+
+#if @GNULIB_RAISE@
+# if @REPLACE_RAISE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef raise
+# define raise rpl_raise
+# endif
+_GL_FUNCDECL_RPL (raise, int, (int sig));
+_GL_CXXALIAS_RPL (raise, int, (int sig));
+# else
+# if !@HAVE_RAISE@
+_GL_FUNCDECL_SYS (raise, int, (int sig));
+# endif
+_GL_CXXALIAS_SYS (raise, int, (int sig));
+# endif
+_GL_CXXALIASWARN (raise);
+#elif defined GNULIB_POSIXCHECK
+# undef raise
+/* Assume raise is always declared. */
+_GL_WARN_ON_USE (raise, "raise can crash on native Windows - "
+ "use gnulib module raise for portability");
+#endif
+
+
#if @GNULIB_SIGPROCMASK@
# if !@HAVE_POSIX_SIGNALBLOCKING@
+# ifndef GNULIB_defined_signal_blocking
+# define GNULIB_defined_signal_blocking 1
+# endif
+
/* Maximum signal number + 1. */
# ifndef NSIG
# define NSIG 32
@@ -102,9 +195,23 @@ typedef int verify_NSIG_constraint[NSIG <= 32 ? 1 : -1];
# endif
+/* When also using extern inline, suppress the use of static inline in
+ standard headers of problematic Apple configurations, as Libc at
+ least through Libc-825.26 (2013-04-09) mishandles it; see, e.g.,
+ <http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
+ Perhaps Apple will fix this some day. */
+#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \
+ && (defined __i386__ || defined __x86_64__))
+# undef sigaddset
+# undef sigdelset
+# undef sigemptyset
+# undef sigfillset
+# undef sigismember
+#endif
+
/* Test whether a given signal is contained in a signal set. */
# if @HAVE_POSIX_SIGNALBLOCKING@
-/* This function is defined as a macro on MacOS X. */
+/* This function is defined as a macro on Mac OS X. */
# if defined __cplusplus && defined GNULIB_NAMESPACE
# undef sigismember
# endif
@@ -117,7 +224,7 @@ _GL_CXXALIASWARN (sigismember);
/* Initialize a signal set to the empty set. */
# if @HAVE_POSIX_SIGNALBLOCKING@
-/* This function is defined as a macro on MacOS X. */
+/* This function is defined as a macro on Mac OS X. */
# if defined __cplusplus && defined GNULIB_NAMESPACE
# undef sigemptyset
# endif
@@ -129,7 +236,7 @@ _GL_CXXALIASWARN (sigemptyset);
/* Add a signal to a signal set. */
# if @HAVE_POSIX_SIGNALBLOCKING@
-/* This function is defined as a macro on MacOS X. */
+/* This function is defined as a macro on Mac OS X. */
# if defined __cplusplus && defined GNULIB_NAMESPACE
# undef sigaddset
# endif
@@ -142,7 +249,7 @@ _GL_CXXALIASWARN (sigaddset);
/* Remove a signal from a signal set. */
# if @HAVE_POSIX_SIGNALBLOCKING@
-/* This function is defined as a macro on MacOS X. */
+/* This function is defined as a macro on Mac OS X. */
# if defined __cplusplus && defined GNULIB_NAMESPACE
# undef sigdelset
# endif
@@ -155,7 +262,7 @@ _GL_CXXALIASWARN (sigdelset);
/* Fill a signal set with all possible signals. */
# if @HAVE_POSIX_SIGNALBLOCKING@
-/* This function is defined as a macro on MacOS X. */
+/* This function is defined as a macro on Mac OS X. */
# if defined __cplusplus && defined GNULIB_NAMESPACE
# undef sigfillset
# endif
@@ -214,18 +321,10 @@ _GL_CXXALIAS_SYS (signal, _gl_function_taking_int_returning_void_t,
# endif
_GL_CXXALIASWARN (signal);
-/* Raise signal SIG. */
# if !@HAVE_POSIX_SIGNALBLOCKING@ && GNULIB_defined_SIGPIPE
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef raise
-# define raise rpl_raise
-# endif
-_GL_FUNCDECL_RPL (raise, int, (int sig));
-_GL_CXXALIAS_RPL (raise, int, (int sig));
-# else
-_GL_CXXALIAS_SYS (raise, int, (int sig));
+/* Raise signal SIGPIPE. */
+_GL_EXTERN_C int _gl_raise_SIGPIPE (void);
# endif
-_GL_CXXALIASWARN (raise);
#elif defined GNULIB_POSIXCHECK
# undef sigaddset
@@ -357,6 +456,6 @@ _GL_WARN_ON_USE (sigaction, "sigaction is unportable - "
#endif
-#endif /* _GL_SIGNAL_H */
-#endif /* _GL_SIGNAL_H */
+#endif /* _@GUARD_PREFIX@_SIGNAL_H */
+#endif /* _@GUARD_PREFIX@_SIGNAL_H */
#endif
diff --git a/lib/signbitd.c b/lib/signbitd.c
index 4042349..7a434f8 100644
--- a/lib/signbitd.c
+++ b/lib/signbitd.c
@@ -1,5 +1,5 @@
/* signbit() macro: Determine the sign bit of a floating-point number.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/signbitf.c b/lib/signbitf.c
index 3ec472f..f133be5 100644
--- a/lib/signbitf.c
+++ b/lib/signbitf.c
@@ -1,5 +1,5 @@
/* signbit() macro: Determine the sign bit of a floating-point number.
- Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/signbitl.c b/lib/signbitl.c
index 4453d8f..9e1e900 100644
--- a/lib/signbitl.c
+++ b/lib/signbitl.c
@@ -1,5 +1,5 @@
/* signbit() macro: Determine the sign bit of a floating-point number.
- Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/sigprocmask.c b/lib/sigprocmask.c
index 6780a37..8de3777 100644
--- a/lib/sigprocmask.c
+++ b/lib/sigprocmask.c
@@ -1,5 +1,5 @@
/* POSIX compatible signal blocking.
- Copyright (C) 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
@@ -24,11 +24,15 @@
#include <stdint.h>
#include <stdlib.h>
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+# include "msvc-inval.h"
+#endif
+
/* We assume that a platform without POSIX signal blocking functions
also does not have the POSIX sigaction() function, only the
signal() function. We also assume signal() has SysV semantics,
where any handler is uninstalled prior to being invoked. This is
- true for Woe32 platforms. */
+ true for native Windows platforms. */
/* We use raw signal(), but also provide a wrapper rpl_signal() so
that applications can query or change a blocked signal. */
@@ -58,6 +62,28 @@
typedef void (*handler_t) (int);
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+static handler_t
+signal_nothrow (int sig, handler_t handler)
+{
+ handler_t result;
+
+ TRY_MSVC_INVAL
+ {
+ result = signal (sig, handler);
+ }
+ CATCH_MSVC_INVAL
+ {
+ result = SIG_ERR;
+ errno = EINVAL;
+ }
+ DONE_MSVC_INVAL;
+
+ return result;
+}
+# define signal signal_nothrow
+#endif
+
/* Handling of gnulib defined signals. */
#if GNULIB_defined_SIGPIPE
@@ -80,6 +106,7 @@ ext_signal (int sig, handler_t handler)
return signal (sig, handler);
}
}
+# undef signal
# define signal ext_signal
#endif
@@ -303,27 +330,20 @@ rpl_signal (int sig, handler_t handler)
}
#if GNULIB_defined_SIGPIPE
-/* Raise the signal SIG. */
+/* Raise the signal SIGPIPE. */
int
-rpl_raise (int sig)
-# undef raise
+_gl_raise_SIGPIPE (void)
{
- switch (sig)
+ if (blocked_set & (1U << SIGPIPE))
+ pending_array[SIGPIPE] = 1;
+ else
{
- case SIGPIPE:
- if (blocked_set & (1U << sig))
- pending_array[sig] = 1;
- else
- {
- handler_t handler = SIGPIPE_handler;
- if (handler == SIG_DFL)
- exit (128 + SIGPIPE);
- else if (handler != SIG_IGN)
- (*handler) (sig);
- }
- return 0;
- default: /* System defined signal */
- return raise (sig);
+ handler_t handler = SIGPIPE_handler;
+ if (handler == SIG_DFL)
+ exit (128 + SIGPIPE);
+ else if (handler != SIG_IGN)
+ (*handler) (SIGPIPE);
}
+ return 0;
}
#endif
diff --git a/lib/size_max.h b/lib/size_max.h
index d5f3152..5f33124 100644
--- a/lib/size_max.h
+++ b/lib/size_max.h
@@ -1,5 +1,5 @@
/* size_max.h -- declare SIZE_MAX through system headers
- Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2013 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#ifndef GNULIB_SIZE_MAX_H
#define GNULIB_SIZE_MAX_H
diff --git a/lib/snprintf.c b/lib/snprintf.c
index 9db2379..9c4ab3f 100644
--- a/lib/snprintf.c
+++ b/lib/snprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 2004, 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006-2013 Free Software Foundation, Inc.
Written by Simon Josefsson and Paul Eggert.
This program is free software; you can redistribute it and/or modify
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/spawn-pipe.c b/lib/spawn-pipe.c
index 96d01aa..35567d4 100644
--- a/lib/spawn-pipe.c
+++ b/lib/spawn-pipe.c
@@ -1,5 +1,5 @@
/* Creation of subprocesses, communicating via pipes.
- Copyright (C) 2001-2004, 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006-2013 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
@@ -37,7 +37,7 @@
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* Native Woe32 API. */
+/* Native Windows API. */
# include <process.h>
# include "w32spawn.h"
@@ -60,7 +60,7 @@
These functions can return -1/EINTR even though we don't have any
signal handlers set up, namely when we get interrupted via SIGSTOP. */
-static inline int
+static int
nonintr_close (int fd)
{
int retval;
@@ -73,7 +73,8 @@ nonintr_close (int fd)
}
#define close nonintr_close
-static inline int
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+static int
nonintr_open (const char *pathname, int oflag, mode_t mode)
{
int retval;
@@ -84,8 +85,9 @@ nonintr_open (const char *pathname, int oflag, mode_t mode)
return retval;
}
-#undef open /* avoid warning on VMS */
-#define open nonintr_open
+# undef open /* avoid warning on VMS */
+# define open nonintr_open
+#endif
#endif
@@ -114,7 +116,7 @@ create_pipe (const char *progname,
{
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
- /* Native Woe32 API.
+ /* Native Windows API.
This uses _pipe(), dup2(), and spawnv(). It could also be implemented
using the low-level functions CreatePipe(), DuplicateHandle(),
CreateProcess() and _open_osfhandle(); see the GNU make and GNU clisp
@@ -196,7 +198,7 @@ create_pipe (const char *progname,
(const char **) environ);
if (child < 0 && errno == ENOEXEC)
{
- /* prog is not an native executable. Try to execute it as a
+ /* prog is not a native executable. Try to execute it as a
shell script. Note that prepare_spawn() has already prepended
a hidden element "sh.exe" to prog_argv. */
--prog_argv;
diff --git a/lib/spawn-pipe.h b/lib/spawn-pipe.h
index c69f87a..ea8284f 100644
--- a/lib/spawn-pipe.h
+++ b/lib/spawn-pipe.h
@@ -1,5 +1,5 @@
/* Creation of subprocesses, communicating via pipes.
- Copyright (C) 2001-2003, 2006, 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006, 2008-2013 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
@@ -131,7 +131,7 @@ extern pid_t create_pipe_bidi (const char *progname,
/* The name of the "always silent" device. */
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* Native Woe32 API. */
+/* Native Windows API. */
# define DEV_NULL "NUL"
#else
/* Unix API. */
diff --git a/lib/spawn.in.h b/lib/spawn.in.h
index a145946..bca2998 100644
--- a/lib/spawn.in.h
+++ b/lib/spawn.in.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX spawn interface.
- Copyright (C) 2000, 2003-2004, 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2003-2004, 2008-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef _GL_SPAWN_H
+#ifndef _@GUARD_PREFIX@_SPAWN_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
@@ -27,8 +27,8 @@
# @INCLUDE_NEXT@ @NEXT_SPAWN_H@
#endif
-#ifndef _GL_SPAWN_H
-#define _GL_SPAWN_H
+#ifndef _@GUARD_PREFIX@_SPAWN_H
+#define _@GUARD_PREFIX@_SPAWN_H
/* Get definitions of 'struct sched_param' and 'sigset_t'.
But avoid namespace pollution on glibc systems. */
@@ -63,7 +63,7 @@
#ifndef _Restrict_arr_
# if ((199901L <= __STDC_VERSION__ \
|| ((3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) \
- && !__STRICT_ANSI__)) \
+ && !defined __STRICT_ANSI__)) \
&& !defined __GNUG__)
# define _Restrict_arr_ _Restrict_
# else
@@ -118,7 +118,7 @@ typedef struct
#endif
-/* Flags to be set in the `posix_spawnattr_t'. */
+/* Flags to be set in the 'posix_spawnattr_t'. */
#if @HAVE_POSIX_SPAWN@
/* Use the values from the system, but provide the missing ones. */
# ifndef POSIX_SPAWN_SETSCHEDPARAM
@@ -218,7 +218,7 @@ _GL_WARN_ON_USE (posix_spawn, "posix_spawn is unportable - "
#endif
#if @GNULIB_POSIX_SPAWNP@
-/* Similar to `posix_spawn' but search for FILE in the PATH.
+/* Similar to 'posix_spawn' but search for FILE in the PATH.
This function is a possible cancellation points and therefore not
marked with __THROW. */
@@ -263,7 +263,7 @@ _GL_WARN_ON_USE (posix_spawnp, "posix_spawnp is unportable - "
#if @GNULIB_POSIX_SPAWNATTR_INIT@
-/* Initialize data structure with attributes for `spawn' to default values. */
+/* Initialize data structure with attributes for 'spawn' to default values. */
# if @REPLACE_POSIX_SPAWN@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define posix_spawnattr_init rpl_posix_spawnattr_init
@@ -712,7 +712,7 @@ _GL_WARN_ON_USE (posix_spawnattr_setschedparam,
#if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT@
-/* Initialize data structure for file attribute for `spawn' call. */
+/* Initialize data structure for file attribute for 'spawn' call. */
# if @REPLACE_POSIX_SPAWN@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define posix_spawn_file_actions_init rpl_posix_spawn_file_actions_init
@@ -773,8 +773,8 @@ _GL_WARN_ON_USE (posix_spawn_file_actions_destroy,
#if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
/* Add an action to FILE-ACTIONS which tells the implementation to call
- `open' for the given file during the `spawn' call. */
-# if @REPLACE_POSIX_SPAWN@
+ 'open' for the given file during the 'spawn' call. */
+# if @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define posix_spawn_file_actions_addopen rpl_posix_spawn_file_actions_addopen
# endif
@@ -812,8 +812,8 @@ _GL_WARN_ON_USE (posix_spawn_file_actions_addopen,
#if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@
/* Add an action to FILE-ACTIONS which tells the implementation to call
- `close' for the given file descriptor during the `spawn' call. */
-# if @REPLACE_POSIX_SPAWN@
+ 'close' for the given file descriptor during the 'spawn' call. */
+# if @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define posix_spawn_file_actions_addclose rpl_posix_spawn_file_actions_addclose
# endif
@@ -843,8 +843,8 @@ _GL_WARN_ON_USE (posix_spawn_file_actions_addclose,
#if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@
/* Add an action to FILE-ACTIONS which tells the implementation to call
- `dup2' for the given file descriptors during the `spawn' call. */
-# if @REPLACE_POSIX_SPAWN@
+ 'dup2' for the given file descriptors during the 'spawn' call. */
+# if @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define posix_spawn_file_actions_adddup2 rpl_posix_spawn_file_actions_adddup2
# endif
@@ -877,5 +877,5 @@ _GL_WARN_ON_USE (posix_spawn_file_actions_adddup2,
#endif
-#endif /* _GL_SPAWN_H */
-#endif /* _GL_SPAWN_H */
+#endif /* _@GUARD_PREFIX@_SPAWN_H */
+#endif /* _@GUARD_PREFIX@_SPAWN_H */
diff --git a/lib/spawn_faction_addclose.c b/lib/spawn_faction_addclose.c
index bd8c4db..86a9aba 100644
--- a/lib/spawn_faction_addclose.c
+++ b/lib/spawn_faction_addclose.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2009-2011 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@@ -26,34 +26,44 @@
# define __sysconf(open_max) getdtablesize ()
#endif
-#include "spawn_int.h"
+#if !HAVE_WORKING_POSIX_SPAWN
+# include "spawn_int.h"
+#endif
/* Add an action to FILE-ACTIONS which tells the implementation to call
- `close' for the given file descriptor during the `spawn' call. */
+ 'close' for the given file descriptor during the 'spawn' call. */
int
posix_spawn_file_actions_addclose (posix_spawn_file_actions_t *file_actions,
int fd)
+#undef posix_spawn_file_actions_addclose
{
int maxfd = __sysconf (_SC_OPEN_MAX);
- struct __spawn_action *rec;
/* Test for the validity of the file descriptor. */
if (fd < 0 || fd >= maxfd)
return EBADF;
+#if HAVE_WORKING_POSIX_SPAWN
+ return posix_spawn_file_actions_addclose (file_actions, fd);
+#else
/* Allocate more memory if needed. */
if (file_actions->_used == file_actions->_allocated
&& __posix_spawn_file_actions_realloc (file_actions) != 0)
/* This can only mean we ran out of memory. */
return ENOMEM;
- /* Add the new value. */
- rec = &file_actions->_actions[file_actions->_used];
- rec->tag = spawn_do_close;
- rec->action.open_action.fd = fd;
+ {
+ struct __spawn_action *rec;
+
+ /* Add the new value. */
+ rec = &file_actions->_actions[file_actions->_used];
+ rec->tag = spawn_do_close;
+ rec->action.open_action.fd = fd;
- /* Account for the new entry. */
- ++file_actions->_used;
+ /* Account for the new entry. */
+ ++file_actions->_used;
- return 0;
+ return 0;
+ }
+#endif
}
diff --git a/lib/spawn_faction_adddup2.c b/lib/spawn_faction_adddup2.c
index 1ebea4a..56ff1ec 100644
--- a/lib/spawn_faction_adddup2.c
+++ b/lib/spawn_faction_adddup2.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2009-2011 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@@ -26,35 +26,45 @@
# define __sysconf(open_max) getdtablesize ()
#endif
-#include "spawn_int.h"
+#if !HAVE_WORKING_POSIX_SPAWN
+# include "spawn_int.h"
+#endif
/* Add an action to FILE-ACTIONS which tells the implementation to call
- `dup2' for the given file descriptors during the `spawn' call. */
+ 'dup2' for the given file descriptors during the 'spawn' call. */
int
posix_spawn_file_actions_adddup2 (posix_spawn_file_actions_t *file_actions,
int fd, int newfd)
+#undef posix_spawn_file_actions_adddup2
{
int maxfd = __sysconf (_SC_OPEN_MAX);
- struct __spawn_action *rec;
/* Test for the validity of the file descriptor. */
if (fd < 0 || newfd < 0 || fd >= maxfd || newfd >= maxfd)
return EBADF;
+#if HAVE_WORKING_POSIX_SPAWN
+ return posix_spawn_file_actions_adddup2 (file_actions, fd, newfd);
+#else
/* Allocate more memory if needed. */
if (file_actions->_used == file_actions->_allocated
&& __posix_spawn_file_actions_realloc (file_actions) != 0)
/* This can only mean we ran out of memory. */
return ENOMEM;
- /* Add the new value. */
- rec = &file_actions->_actions[file_actions->_used];
- rec->tag = spawn_do_dup2;
- rec->action.dup2_action.fd = fd;
- rec->action.dup2_action.newfd = newfd;
+ {
+ struct __spawn_action *rec;
+
+ /* Add the new value. */
+ rec = &file_actions->_actions[file_actions->_used];
+ rec->tag = spawn_do_dup2;
+ rec->action.dup2_action.fd = fd;
+ rec->action.dup2_action.newfd = newfd;
- /* Account for the new entry. */
- ++file_actions->_used;
+ /* Account for the new entry. */
+ ++file_actions->_used;
- return 0;
+ return 0;
+ }
+#endif
}
diff --git a/lib/spawn_faction_addopen.c b/lib/spawn_faction_addopen.c
index ad72403..8aaeca6 100644
--- a/lib/spawn_faction_addopen.c
+++ b/lib/spawn_faction_addopen.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2009-2011 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@@ -26,38 +26,48 @@
# define __sysconf(open_max) getdtablesize ()
#endif
-#include "spawn_int.h"
+#if !HAVE_WORKING_POSIX_SPAWN
+# include "spawn_int.h"
+#endif
/* Add an action to FILE-ACTIONS which tells the implementation to call
- `open' for the given file during the `spawn' call. */
+ 'open' for the given file during the 'spawn' call. */
int
posix_spawn_file_actions_addopen (posix_spawn_file_actions_t *file_actions,
int fd, const char *path, int oflag,
mode_t mode)
+#undef posix_spawn_file_actions_addopen
{
int maxfd = __sysconf (_SC_OPEN_MAX);
- struct __spawn_action *rec;
/* Test for the validity of the file descriptor. */
if (fd < 0 || fd >= maxfd)
return EBADF;
+#if HAVE_WORKING_POSIX_SPAWN
+ return posix_spawn_file_actions_addopen (file_actions, fd, path, oflag, mode);
+#else
/* Allocate more memory if needed. */
if (file_actions->_used == file_actions->_allocated
&& __posix_spawn_file_actions_realloc (file_actions) != 0)
/* This can only mean we ran out of memory. */
return ENOMEM;
- /* Add the new value. */
- rec = &file_actions->_actions[file_actions->_used];
- rec->tag = spawn_do_open;
- rec->action.open_action.fd = fd;
- rec->action.open_action.path = path;
- rec->action.open_action.oflag = oflag;
- rec->action.open_action.mode = mode;
+ {
+ struct __spawn_action *rec;
+
+ /* Add the new value. */
+ rec = &file_actions->_actions[file_actions->_used];
+ rec->tag = spawn_do_open;
+ rec->action.open_action.fd = fd;
+ rec->action.open_action.path = path;
+ rec->action.open_action.oflag = oflag;
+ rec->action.open_action.mode = mode;
- /* Account for the new entry. */
- ++file_actions->_used;
+ /* Account for the new entry. */
+ ++file_actions->_used;
- return 0;
+ return 0;
+ }
+#endif
}
diff --git a/lib/spawn_faction_destroy.c b/lib/spawn_faction_destroy.c
index 884209f..942733d 100644
--- a/lib/spawn_faction_destroy.c
+++ b/lib/spawn_faction_destroy.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2009-2011 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@@ -21,7 +21,7 @@
#include <stdlib.h>
-/* Initialize data structure for file attribute for `spawn' call. */
+/* Initialize data structure for file attribute for 'spawn' call. */
int
posix_spawn_file_actions_destroy (posix_spawn_file_actions_t *file_actions)
{
diff --git a/lib/spawn_faction_init.c b/lib/spawn_faction_init.c
index f6ef0c9..cf1d0a6 100644
--- a/lib/spawn_faction_init.c
+++ b/lib/spawn_faction_init.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2009-2011 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@@ -27,7 +27,7 @@
/* Function used to increase the size of the allocated array. This
- function is called from the `add'-functions. */
+ function is called from the 'add'-functions. */
int
__posix_spawn_file_actions_realloc (posix_spawn_file_actions_t *file_actions)
{
@@ -46,7 +46,7 @@ __posix_spawn_file_actions_realloc (posix_spawn_file_actions_t *file_actions)
}
-/* Initialize data structure for file attribute for `spawn' call. */
+/* Initialize data structure for file attribute for 'spawn' call. */
int
posix_spawn_file_actions_init (posix_spawn_file_actions_t *file_actions)
{
diff --git a/lib/spawn_int.h b/lib/spawn_int.h
index 313af62..f22a659 100644
--- a/lib/spawn_int.h
+++ b/lib/spawn_int.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2008-2011 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2008-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/spawnattr_destroy.c b/lib/spawnattr_destroy.c
index 5b498a0..ec6c7cf 100644
--- a/lib/spawnattr_destroy.c
+++ b/lib/spawnattr_destroy.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2009-2011 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@@ -19,7 +19,7 @@
/* Specification. */
#include <spawn.h>
-/* Initialize data structure for file attribute for `spawn' call. */
+/* Initialize data structure for file attribute for 'spawn' call. */
int
posix_spawnattr_destroy (posix_spawnattr_t *attr)
{
diff --git a/lib/spawnattr_init.c b/lib/spawnattr_init.c
index 0475080..b050fb4 100644
--- a/lib/spawnattr_init.c
+++ b/lib/spawnattr_init.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2009-2011 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@@ -21,7 +21,7 @@
#include <string.h>
-/* Initialize data structure for file attribute for `spawn' call. */
+/* Initialize data structure for file attribute for 'spawn' call. */
int
posix_spawnattr_init (posix_spawnattr_t *attr)
{
diff --git a/lib/spawnattr_setflags.c b/lib/spawnattr_setflags.c
index 522d7c2..babbb19 100644
--- a/lib/spawnattr_setflags.c
+++ b/lib/spawnattr_setflags.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2004, 2009-2011 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2004, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/spawnattr_setsigmask.c b/lib/spawnattr_setsigmask.c
index 875d2c9..8aa6da9 100644
--- a/lib/spawnattr_setsigmask.c
+++ b/lib/spawnattr_setsigmask.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2009-2011 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/spawni.c b/lib/spawni.c
index 9af2781..17b903f 100644
--- a/lib/spawni.c
+++ b/lib/spawni.c
@@ -1,5 +1,5 @@
/* Guts of POSIX spawn interface. Generic POSIX.1 version.
- Copyright (C) 2000-2006, 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2000-2006, 2008-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@@ -91,7 +91,7 @@
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* Native Woe32 API. */
+/* Native Windows API. */
int
__spawni (pid_t *pid, const char *file,
const posix_spawn_file_actions_t *file_actions,
@@ -259,7 +259,7 @@ __spawni (pid_t *pid, const char *file,
action->action.open_action.mode);
if (new_fd == -1)
- /* The `open' call failed. */
+ /* The 'open' call failed. */
_exit (SPAWN_ERROR);
/* Make sure the desired file descriptor is used. */
@@ -267,11 +267,11 @@ __spawni (pid_t *pid, const char *file,
{
if (dup2 (new_fd, action->action.open_action.fd)
!= action->action.open_action.fd)
- /* The `dup2' call failed. */
+ /* The 'dup2' call failed. */
_exit (SPAWN_ERROR);
if (close_not_cancel (new_fd) != 0)
- /* The `close' call failed. */
+ /* The 'close' call failed. */
_exit (SPAWN_ERROR);
}
}
@@ -281,7 +281,7 @@ __spawni (pid_t *pid, const char *file,
if (dup2 (action->action.dup2_action.fd,
action->action.dup2_action.newfd)
!= action->action.dup2_action.newfd)
- /* The `dup2' call failed. */
+ /* The 'dup2' call failed. */
_exit (SPAWN_ERROR);
break;
}
@@ -296,7 +296,7 @@ __spawni (pid_t *pid, const char *file,
if (errno == ENOEXEC)
script_execute (file, argv, envp);
- /* Oh, oh. `execve' returns. This is bad. */
+ /* Oh, oh. 'execve' returns. This is bad. */
_exit (SPAWN_ERROR);
}
@@ -305,9 +305,9 @@ __spawni (pid_t *pid, const char *file,
if (path == NULL)
{
#if HAVE_CONFSTR
- /* There is no `PATH' in the environment.
+ /* There is no 'PATH' in the environment.
The default search path is the current directory
- followed by the path `confstr' returns for `_CS_PATH'. */
+ followed by the path 'confstr' returns for '_CS_PATH'. */
len = confstr (_CS_PATH, (char *) NULL, 0);
path = (char *) alloca (1 + len);
path[0] = ':';
@@ -336,7 +336,7 @@ __spawni (pid_t *pid, const char *file,
if (p == path)
/* Two adjacent colons, or a colon at the beginning or the end
- of `PATH' means to search the current directory. */
+ of 'PATH' means to search the current directory. */
startp = name + 1;
else
startp = (char *) memcpy (name - (p - path), path, p - path);
diff --git a/lib/spawnp.c b/lib/spawnp.c
index 5ca0fed..8bc5f99 100644
--- a/lib/spawnp.c
+++ b/lib/spawnp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2009-2011 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/stat.c b/lib/stat.c
index cbc9100..f888130 100644
--- a/lib/stat.c
+++ b/lib/stat.c
@@ -1,5 +1,5 @@
/* Work around platform bugs in stat.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -16,28 +16,59 @@
/* written by Eric Blake */
+/* If the user's config.h happens to include <sys/stat.h>, let it include only
+ the system's <sys/stat.h> here, so that orig_stat doesn't recurse to
+ rpl_stat. */
+#define __need_system_sys_stat_h
#include <config.h>
/* Get the original definition of stat. It might be defined as a macro. */
-#define __need_system_sys_stat_h
#include <sys/types.h>
#include <sys/stat.h>
#undef __need_system_sys_stat_h
-static inline int
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if _GL_WINDOWS_64_BIT_ST_SIZE
+# undef stat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */
+# define stat _stati64
+# define REPLACE_FUNC_STAT_DIR 1
+# undef REPLACE_FUNC_STAT_FILE
+# elif REPLACE_FUNC_STAT_FILE
+/* mingw64 has a broken stat() function, based on _stat(), in libmingwex.a.
+ Bypass it. */
+# define stat _stat
+# define REPLACE_FUNC_STAT_DIR 1
+# undef REPLACE_FUNC_STAT_FILE
+# endif
+#endif
+
+static int
orig_stat (const char *filename, struct stat *buf)
{
return stat (filename, buf);
}
/* Specification. */
-#include <sys/stat.h>
+/* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc
+ eliminates this include because of the preliminary #include <sys/stat.h>
+ above. */
+#include "sys/stat.h"
#include <errno.h>
#include <limits.h>
#include <stdbool.h>
#include <string.h>
#include "dosname.h"
+#include "verify.h"
+
+#if REPLACE_FUNC_STAT_DIR
+# include "pathmax.h"
+ /* The only known systems where REPLACE_FUNC_STAT_DIR is needed also
+ have a constant PATH_MAX. */
+# ifndef PATH_MAX
+# error "Please port this replacement to your platform"
+# endif
+#endif
/* Store information about NAME into ST. Work around bugs with
trailing slashes. Mingw has other bugs (such as st_ino always
@@ -63,6 +94,7 @@ rpl_stat (char const *name, struct stat *st)
}
#endif /* REPLACE_FUNC_STAT_FILE */
#if REPLACE_FUNC_STAT_DIR
+
if (result == -1 && errno == ENOENT)
{
/* Due to mingw's oddities, there are some directories (like
@@ -77,6 +109,7 @@ rpl_stat (char const *name, struct stat *st)
char fixed_name[PATH_MAX + 1] = {0};
size_t len = strlen (name);
bool check_dir = false;
+ verify (PATH_MAX <= 4096);
if (PATH_MAX <= len)
errno = ENAMETOOLONG;
else if (len)
diff --git a/lib/stdarg.in.h b/lib/stdarg.in.h
index 4469d54..7484842 100644
--- a/lib/stdarg.in.h
+++ b/lib/stdarg.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <stdarg.h>.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,10 +12,9 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
-#ifndef _GL_STDARG_H
+#ifndef _@GUARD_PREFIX@_STDARG_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
@@ -25,12 +24,12 @@
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_STDARG_H@
-#ifndef _GL_STDARG_H
-#define _GL_STDARG_H
+#ifndef _@GUARD_PREFIX@_STDARG_H
+#define _@GUARD_PREFIX@_STDARG_H
#ifndef va_copy
# define va_copy(a,b) ((a) = (b))
#endif
-#endif /* _GL_STDARG_H */
-#endif /* _GL_STDARG_H */
+#endif /* _@GUARD_PREFIX@_STDARG_H */
+#endif /* _@GUARD_PREFIX@_STDARG_H */
diff --git a/lib/stdbool.in.h b/lib/stdbool.in.h
index b64dc75..7c15772 100644
--- a/lib/stdbool.in.h
+++ b/lib/stdbool.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2003, 2006-2011 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2003, 2006-2013 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#ifndef _GL_STDBOOL_H
#define _GL_STDBOOL_H
@@ -67,24 +66,19 @@
# undef true
#endif
-/* For the sake of symbolic names in gdb, we define true and false as
- enum constants, not only as macros.
- It is tempting to write
- typedef enum { false = 0, true = 1 } _Bool;
- so that gdb prints values of type 'bool' symbolically. But if we do
- this, values of type '_Bool' may promote to 'int' or 'unsigned int'
- (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int'
- (see ISO C 99 6.3.1.1.(2)). So we add a negative value to the
- enum; this ensures that '_Bool' promotes to 'int'. */
-#if defined __cplusplus || (defined __BEOS__ && !defined __HAIKU__)
+#ifdef __cplusplus
+# define _Bool bool
+# define bool bool
+#else
+# if defined __BEOS__ && !defined __HAIKU__
/* A compiler known to have 'bool'. */
/* If the compiler already has both 'bool' and '_Bool', we can assume they
are the same types. */
-# if !@HAVE__BOOL@
+# if !@HAVE__BOOL@
typedef bool _Bool;
-# endif
-#else
-# if !defined __GNUC__
+# endif
+# else
+# if !defined __GNUC__
/* If @HAVE__BOOL@:
Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when
the built-in _Bool type is used. See
@@ -104,19 +98,35 @@ typedef bool _Bool;
"Invalid enumerator. (badenum)" with HP-UX cc on Tru64.
The only benefit of the enum, debuggability, is not important
with these compilers. So use 'signed char' and no enum. */
-# define _Bool signed char
-# else
+# define _Bool signed char
+# else
/* With this compiler, trust the _Bool type if the compiler has it. */
-# if !@HAVE__BOOL@
+# if !@HAVE__BOOL@
+ /* For the sake of symbolic names in gdb, define true and false as
+ enum constants, not only as macros.
+ It is tempting to write
+ typedef enum { false = 0, true = 1 } _Bool;
+ so that gdb prints values of type 'bool' symbolically. But then
+ values of type '_Bool' might promote to 'int' or 'unsigned int'
+ (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int'
+ (see ISO C 99 6.3.1.1.(2)). So add a negative value to the
+ enum; this ensures that '_Bool' promotes to 'int'. */
typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool;
+# endif
# endif
# endif
+# define bool _Bool
#endif
-#define bool _Bool
/* The other macros must be usable in preprocessor directives. */
-#define false 0
-#define true 1
+#ifdef __cplusplus
+# define false false
+# define true true
+#else
+# define false 0
+# define true 1
+#endif
+
#define __bool_true_false_are_defined 1
#endif /* _GL_STDBOOL_H */
diff --git a/lib/stddef.in.h b/lib/stddef.in.h
index 62a91a7..40f0536 100644
--- a/lib/stddef.in.h
+++ b/lib/stddef.in.h
@@ -1,6 +1,6 @@
/* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
/* Written by Eric Blake. */
@@ -38,9 +37,9 @@
remember if special invocation has ever been used to obtain wint_t,
in which case we need to clean up NULL yet again. */
-# if !(defined _GL_STDDEF_H && defined _GL_STDDEF_WINT_T)
+# if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _GL_STDDEF_WINT_T)
# ifdef __need_wint_t
-# undef _GL_STDDEF_H
+# undef _@GUARD_PREFIX@_STDDEF_H
# define _GL_STDDEF_WINT_T
# endif
# @INCLUDE_NEXT@ @NEXT_STDDEF_H@
@@ -49,14 +48,14 @@
#else
/* Normal invocation convention. */
-# ifndef _GL_STDDEF_H
+# ifndef _@GUARD_PREFIX@_STDDEF_H
/* The include_next requires a split double-inclusion guard. */
# @INCLUDE_NEXT@ @NEXT_STDDEF_H@
-# ifndef _GL_STDDEF_H
-# define _GL_STDDEF_H
+# ifndef _@GUARD_PREFIX@_STDDEF_H
+# define _@GUARD_PREFIX@_STDDEF_H
/* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */
#if @REPLACE_NULL@
@@ -82,6 +81,6 @@
# define wchar_t int
#endif
-# endif /* _GL_STDDEF_H */
-# endif /* _GL_STDDEF_H */
+# endif /* _@GUARD_PREFIX@_STDDEF_H */
+# endif /* _@GUARD_PREFIX@_STDDEF_H */
#endif /* __need_XXX */
diff --git a/lib/stdint.in.h b/lib/stdint.in.h
index b32227b..2db8b2e 100644
--- a/lib/stdint.in.h
+++ b/lib/stdint.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2002, 2004-2011 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2002, 2004-2013 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
This file is part of gnulib.
@@ -13,15 +13,14 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
/*
* ISO C 99 <stdint.h> for platforms that lack it.
* <http://www.opengroup.org/susv3xbd/stdint.h.html>
*/
-#ifndef _GL_STDINT_H
+#ifndef _@GUARD_PREFIX@_STDINT_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
@@ -34,6 +33,16 @@
<inttypes.h>. */
#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
+/* On Android (Bionic libc), <sys/types.h> includes this file before
+ having defined 'time_t'. Therefore in this case avoid including
+ other system header files; just include the system's <stdint.h>.
+ Ideally we should test __BIONIC__ here, but it is only defined after
+ <sys/cdefs.h> has been included; hence test __ANDROID__ instead. */
+#if defined __ANDROID__ \
+ && defined _SYS_TYPES_H_ && !defined __need_size_t
+# @INCLUDE_NEXT@ @NEXT_STDINT_H@
+#else
+
/* Get those types that are already defined in other system include
files, so that we can "#define int8_t signed char" below without
worrying about a later system include file containing a "typedef
@@ -49,28 +58,40 @@
diagnostics. */
# define __STDINT_H__
# endif
+
+ /* Some pre-C++11 <stdint.h> 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 <stdint.h>.
Include it before <inttypes.h>, since any "#include <stdint.h>"
in <inttypes.h> would reinclude us, skipping our contents because
- _GL_STDINT_H is defined.
+ _@GUARD_PREFIX@_STDINT_H is defined.
The include_next requires a split double-inclusion guard. */
# @INCLUDE_NEXT@ @NEXT_STDINT_H@
#endif
-#if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H
-#define _GL_STDINT_H
+#if ! defined _@GUARD_PREFIX@_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+#define _@GUARD_PREFIX@_STDINT_H
/* <sys/types.h> defines some of the stdint.h types as well, on glibc,
IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
AIX 5.2 <sys/types.h> isn't needed and causes troubles.
- MacOS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
+ Mac OS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
relies on the system <stdint.h> definitions, so include
<sys/types.h> after @NEXT_STDINT_H@. */
#if @HAVE_SYS_TYPES_H@ && ! defined _AIX
# include <sys/types.h>
#endif
-/* Get LONG_MIN, LONG_MAX, ULONG_MAX. */
+/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX,
+ LONG_MIN, LONG_MAX, ULONG_MAX. */
#include <limits.h>
#if @HAVE_INTTYPES_H@
@@ -93,7 +114,7 @@
#undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
-/* Minimum and maximum values for a integer type under the usual assumption.
+/* Minimum and maximum values for an integer type under the usual assumption.
Return an unspecified value if BITS == 0, adding a check to pacify
picky compilers. */
@@ -226,8 +247,9 @@ typedef unsigned long long int gl_uint64_t;
/* Here we assume a standard architecture where the hardware integer
types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
- are taken from the same list of types. Assume that 'long int'
- is fast enough for all narrower integers. */
+ are taken from the same list of types. The following code normally
+ uses types consistent with glibc, as that lessens the chance of
+ incompatibility with older GNU hosts. */
#undef int_fast8_t
#undef uint_fast8_t
@@ -237,12 +259,21 @@ typedef unsigned long long int gl_uint64_t;
#undef uint_fast32_t
#undef int_fast64_t
#undef uint_fast64_t
-typedef long int gl_int_fast8_t;
-typedef unsigned long int gl_uint_fast8_t;
-typedef long int gl_int_fast16_t;
-typedef unsigned long int gl_uint_fast16_t;
+typedef signed char gl_int_fast8_t;
+typedef unsigned char gl_uint_fast8_t;
+
+#ifdef __sun
+/* Define types compatible with SunOS 5.10, so that code compiled under
+ earlier SunOS versions works with code compiled under SunOS 5.10. */
+typedef int gl_int_fast32_t;
+typedef unsigned int gl_uint_fast32_t;
+#else
typedef long int gl_int_fast32_t;
typedef unsigned long int gl_uint_fast32_t;
+#endif
+typedef gl_int_fast32_t gl_int_fast16_t;
+typedef gl_uint_fast32_t gl_uint_fast16_t;
+
#define int_fast8_t gl_int_fast8_t
#define uint_fast8_t gl_uint_fast8_t
#define int_fast16_t gl_int_fast16_t
@@ -270,26 +301,36 @@ typedef unsigned long int gl_uintptr_t;
/* Note: These types are compiler dependent. It may be unwise to use them in
public header files. */
-#undef intmax_t
-#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+/* If the system defines INTMAX_MAX, assume that intmax_t works, and
+ similarly for UINTMAX_MAX and uintmax_t. This avoids problems with
+ assuming one type where another is used by the system. */
+
+#ifndef INTMAX_MAX
+# undef INTMAX_C
+# undef intmax_t
+# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
typedef long long int gl_intmax_t;
-# define intmax_t gl_intmax_t
-#elif defined GL_INT64_T
-# define intmax_t int64_t
-#else
+# define intmax_t gl_intmax_t
+# elif defined GL_INT64_T
+# define intmax_t int64_t
+# else
typedef long int gl_intmax_t;
-# define intmax_t gl_intmax_t
+# define intmax_t gl_intmax_t
+# endif
#endif
-#undef uintmax_t
-#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+#ifndef UINTMAX_MAX
+# undef UINTMAX_C
+# undef uintmax_t
+# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
typedef unsigned long long int gl_uintmax_t;
-# define uintmax_t gl_uintmax_t
-#elif defined GL_UINT64_T
-# define uintmax_t uint64_t
-#else
+# define uintmax_t gl_uintmax_t
+# elif defined GL_UINT64_T
+# define uintmax_t uint64_t
+# else
typedef unsigned long int gl_uintmax_t;
-# define uintmax_t gl_uintmax_t
+# define uintmax_t gl_uintmax_t
+# endif
#endif
/* Verify that intmax_t and uintmax_t have the same size. Too much code
@@ -303,8 +344,6 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
/* 7.18.2. Limits of specified-width integer types */
-#if ! defined __cplusplus || defined __STDC_LIMIT_MACROS
-
/* 7.18.2.1. Limits of exact-width integer types */
/* Here we assume a standard architecture where the hardware integer
@@ -390,23 +429,29 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
#undef INT_FAST8_MIN
#undef INT_FAST8_MAX
#undef UINT_FAST8_MAX
-#define INT_FAST8_MIN LONG_MIN
-#define INT_FAST8_MAX LONG_MAX
-#define UINT_FAST8_MAX ULONG_MAX
+#define INT_FAST8_MIN SCHAR_MIN
+#define INT_FAST8_MAX SCHAR_MAX
+#define UINT_FAST8_MAX UCHAR_MAX
#undef INT_FAST16_MIN
#undef INT_FAST16_MAX
#undef UINT_FAST16_MAX
-#define INT_FAST16_MIN LONG_MIN
-#define INT_FAST16_MAX LONG_MAX
-#define UINT_FAST16_MAX ULONG_MAX
+#define INT_FAST16_MIN INT_FAST32_MIN
+#define INT_FAST16_MAX INT_FAST32_MAX
+#define UINT_FAST16_MAX UINT_FAST32_MAX
#undef INT_FAST32_MIN
#undef INT_FAST32_MAX
#undef UINT_FAST32_MAX
-#define INT_FAST32_MIN LONG_MIN
-#define INT_FAST32_MAX LONG_MAX
-#define UINT_FAST32_MAX ULONG_MAX
+#ifdef __sun
+# define INT_FAST32_MIN INT_MIN
+# define INT_FAST32_MAX INT_MAX
+# define UINT_FAST32_MAX UINT_MAX
+#else
+# define INT_FAST32_MIN LONG_MIN
+# define INT_FAST32_MAX LONG_MAX
+# define UINT_FAST32_MAX ULONG_MAX
+#endif
#undef INT_FAST64_MIN
#undef INT_FAST64_MAX
@@ -431,21 +476,23 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
/* 7.18.2.5. Limits of greatest-width integer types */
-#undef INTMAX_MIN
-#undef INTMAX_MAX
-#ifdef INT64_MAX
-# define INTMAX_MIN INT64_MIN
-# define INTMAX_MAX INT64_MAX
-#else
-# define INTMAX_MIN INT32_MIN
-# define INTMAX_MAX INT32_MAX
+#ifndef INTMAX_MAX
+# undef INTMAX_MIN
+# ifdef INT64_MAX
+# define INTMAX_MIN INT64_MIN
+# define INTMAX_MAX INT64_MAX
+# else
+# define INTMAX_MIN INT32_MIN
+# define INTMAX_MAX INT32_MAX
+# endif
#endif
-#undef UINTMAX_MAX
-#ifdef UINT64_MAX
-# define UINTMAX_MAX UINT64_MAX
-#else
-# define UINTMAX_MAX UINT32_MAX
+#ifndef UINTMAX_MAX
+# ifdef UINT64_MAX
+# define UINTMAX_MAX UINT64_MAX
+# else
+# define UINTMAX_MAX UINT32_MAX
+# endif
#endif
/* 7.18.3. Limits of other integer types */
@@ -522,12 +569,8 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
#define WINT_MAX \
_STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
-#endif /* !defined __cplusplus || defined __STDC_LIMIT_MACROS */
-
/* 7.18.4. Macros for integer constants */
-#if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS
-
/* 7.18.4.1. Macros for minimum-width integer constants */
/* According to ISO C 99 Technical Corrigendum 1 */
@@ -568,25 +611,26 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
/* 7.18.4.2. Macros for greatest-width integer constants */
-#undef INTMAX_C
-#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
-# define INTMAX_C(x) x##LL
-#elif defined GL_INT64_T
-# define INTMAX_C(x) INT64_C(x)
-#else
-# define INTMAX_C(x) x##L
+#ifndef INTMAX_C
+# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+# define INTMAX_C(x) x##LL
+# elif defined GL_INT64_T
+# define INTMAX_C(x) INT64_C(x)
+# else
+# define INTMAX_C(x) x##L
+# endif
#endif
-#undef UINTMAX_C
-#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
-# define UINTMAX_C(x) x##ULL
-#elif defined GL_UINT64_T
-# define UINTMAX_C(x) UINT64_C(x)
-#else
-# define UINTMAX_C(x) x##UL
+#ifndef UINTMAX_C
+# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+# define UINTMAX_C(x) x##ULL
+# elif defined GL_UINT64_T
+# define UINTMAX_C(x) UINT64_C(x)
+# else
+# define UINTMAX_C(x) x##UL
+# endif
#endif
-#endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */
-
-#endif /* _GL_STDINT_H */
-#endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */
+#endif /* _@GUARD_PREFIX@_STDINT_H */
+#endif /* !(defined __ANDROID__ && ...) */
+#endif /* !defined _@GUARD_PREFIX@_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */
diff --git a/lib/stdio--.h b/lib/stdio--.h
index adde0f9..fe6d83e 100644
--- a/lib/stdio--.h
+++ b/lib/stdio--.h
@@ -1,6 +1,6 @@
/* Like stdio.h, but redefine some names to avoid glitches.
- Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h
index d41c32f..45291cf 100644
--- a/lib/stdio-impl.h
+++ b/lib/stdio-impl.h
@@ -1,5 +1,5 @@
/* Implementation details of FILE streams.
- Copyright (C) 2007-2008, 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2008, 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -26,7 +26,9 @@
# include <sys/param.h>
#endif
-#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+#include <errno.h> /* For detecting Plan9. */
+
+#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
# if defined __DragonFly__ /* DragonFly */
/* See <http://www.dragonflybsd.org/cvsweb/src/lib/libc/stdio/priv_stdio.h?rev=HEAD&content-type=text/x-cvsweb-markup>. */
@@ -55,7 +57,7 @@
# define fp_ fp
# endif
-# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ /* NetBSD >= 1.5ZA, OpenBSD */
+# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __ANDROID__ /* NetBSD >= 1.5ZA, OpenBSD, Android */
/* See <http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup>
and <http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup> */
struct __sfileext
@@ -64,7 +66,7 @@
/* More fields, not relevant here. */
};
# define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub
-# else /* FreeBSD, NetBSD <= 1.5Z, DragonFly, MacOS X, Cygwin */
+# else /* FreeBSD, NetBSD <= 1.5Z, DragonFly, Mac OS X, Cygwin */
# define fp_ub fp_->_ub
# endif
diff --git a/lib/stdio-safer.h b/lib/stdio-safer.h
index 62fdf64..7b67ae0 100644
--- a/lib/stdio-safer.h
+++ b/lib/stdio-safer.h
@@ -1,6 +1,6 @@
/* Invoke stdio functions, but avoid some glitches.
- Copyright (C) 2001, 2003, 2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2006, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/stdio-write.c b/lib/stdio-write.c
new file mode 100644
index 0000000..68d54ce
--- /dev/null
+++ b/lib/stdio-write.c
@@ -0,0 +1,198 @@
+/* POSIX compatible FILE stream write function.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 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 <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <stdio.h>
+
+/* Replace these functions only if module 'nonblocking' or module 'sigpipe' is
+ requested. */
+#if GNULIB_NONBLOCKING || GNULIB_SIGPIPE
+
+/* On native Windows platforms, SIGPIPE does not exist. When write() is
+ called on a pipe with no readers, WriteFile() fails with error
+ GetLastError() = ERROR_NO_DATA, and write() in consequence fails with
+ error EINVAL. This write() function is at the basis of the function
+ which flushes the buffer of a FILE stream. */
+
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+# include <errno.h>
+# include <signal.h>
+# include <io.h>
+
+# define WIN32_LEAN_AND_MEAN /* avoid including junk */
+# include <windows.h>
+
+# include "msvc-nothrow.h"
+
+# if GNULIB_NONBLOCKING
+# define CLEAR_ERRNO \
+ errno = 0;
+# define HANDLE_ENOSPC \
+ if (errno == ENOSPC && ferror (stream)) \
+ { \
+ int fd = fileno (stream); \
+ if (fd >= 0) \
+ { \
+ HANDLE h = (HANDLE) _get_osfhandle (fd); \
+ if (GetFileType (h) == FILE_TYPE_PIPE) \
+ { \
+ /* h is a pipe or socket. */ \
+ DWORD state; \
+ if (GetNamedPipeHandleState (h, &state, NULL, NULL, \
+ NULL, NULL, 0) \
+ && (state & PIPE_NOWAIT) != 0) \
+ /* h is a pipe in non-blocking mode. \
+ Change errno from ENOSPC to EAGAIN. */ \
+ errno = EAGAIN; \
+ } \
+ } \
+ } \
+ else
+# else
+# define CLEAR_ERRNO
+# define HANDLE_ENOSPC
+# endif
+
+# if GNULIB_SIGPIPE
+# define CLEAR_LastError \
+ SetLastError (0);
+# define HANDLE_ERROR_NO_DATA \
+ if (GetLastError () == ERROR_NO_DATA && ferror (stream)) \
+ { \
+ int fd = fileno (stream); \
+ if (fd >= 0 \
+ && GetFileType ((HANDLE) _get_osfhandle (fd)) \
+ == FILE_TYPE_PIPE) \
+ { \
+ /* Try to raise signal SIGPIPE. */ \
+ raise (SIGPIPE); \
+ /* If it is currently blocked or ignored, change errno from \
+ EINVAL to EPIPE. */ \
+ errno = EPIPE; \
+ } \
+ } \
+ else
+# else
+# define CLEAR_LastError
+# define HANDLE_ERROR_NO_DATA
+# endif
+
+# define CALL_WITH_SIGPIPE_EMULATION(RETTYPE, EXPRESSION, FAILED) \
+ if (ferror (stream)) \
+ return (EXPRESSION); \
+ else \
+ { \
+ RETTYPE ret; \
+ CLEAR_ERRNO \
+ CLEAR_LastError \
+ ret = (EXPRESSION); \
+ if (FAILED) \
+ { \
+ HANDLE_ENOSPC \
+ HANDLE_ERROR_NO_DATA \
+ ; \
+ } \
+ return ret; \
+ }
+
+# if !REPLACE_PRINTF_POSIX /* avoid collision with printf.c */
+int
+printf (const char *format, ...)
+{
+ int retval;
+ va_list args;
+
+ va_start (args, format);
+ retval = vfprintf (stdout, format, args);
+ va_end (args);
+
+ return retval;
+}
+# endif
+
+# if !REPLACE_FPRINTF_POSIX /* avoid collision with fprintf.c */
+int
+fprintf (FILE *stream, const char *format, ...)
+{
+ int retval;
+ va_list args;
+
+ va_start (args, format);
+ retval = vfprintf (stream, format, args);
+ va_end (args);
+
+ return retval;
+}
+# endif
+
+# if !REPLACE_VPRINTF_POSIX /* avoid collision with vprintf.c */
+int
+vprintf (const char *format, va_list args)
+{
+ return vfprintf (stdout, format, args);
+}
+# endif
+
+# if !REPLACE_VFPRINTF_POSIX /* avoid collision with vfprintf.c */
+int
+vfprintf (FILE *stream, const char *format, va_list args)
+#undef vfprintf
+{
+ CALL_WITH_SIGPIPE_EMULATION (int, vfprintf (stream, format, args), ret == EOF)
+}
+# endif
+
+int
+putchar (int c)
+{
+ return fputc (c, stdout);
+}
+
+int
+fputc (int c, FILE *stream)
+#undef fputc
+{
+ CALL_WITH_SIGPIPE_EMULATION (int, fputc (c, stream), ret == EOF)
+}
+
+int
+fputs (const char *string, FILE *stream)
+#undef fputs
+{
+ CALL_WITH_SIGPIPE_EMULATION (int, fputs (string, stream), ret == EOF)
+}
+
+int
+puts (const char *string)
+#undef puts
+{
+ FILE *stream = stdout;
+ CALL_WITH_SIGPIPE_EMULATION (int, puts (string), ret == EOF)
+}
+
+size_t
+fwrite (const void *ptr, size_t s, size_t n, FILE *stream)
+#undef fwrite
+{
+ CALL_WITH_SIGPIPE_EMULATION (size_t, fwrite (ptr, s, n, stream), ret < n)
+}
+
+# endif
+#endif
diff --git a/lib/stdio.in.h b/lib/stdio.in.h
index b7f3b6f..76e62fb 100644
--- a/lib/stdio.in.h
+++ b/lib/stdio.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <stdio.h>.
- Copyright (C) 2004, 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2007-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
@@ -35,7 +34,7 @@
#else
/* Normal invocation convention. */
-#ifndef _GL_STDIO_H
+#ifndef _@GUARD_PREFIX@_STDIO_H
#define _GL_ALREADY_INCLUDING_STDIO_H
@@ -44,8 +43,8 @@
#undef _GL_ALREADY_INCLUDING_STDIO_H
-#ifndef _GL_STDIO_H
-#define _GL_STDIO_H
+#ifndef _@GUARD_PREFIX@_STDIO_H
+#define _@GUARD_PREFIX@_STDIO_H
/* Get va_list. Needed on many systems, including glibc 2.8. */
#include <stdarg.h>
@@ -53,7 +52,8 @@
#include <stddef.h>
/* Get off_t and ssize_t. Needed on many systems, including glibc 2.8
- and eglibc 2.11.2. */
+ and eglibc 2.11.2.
+ May also define off_t to a 64-bit type on native Windows. */
#include <sys/types.h>
/* The __attribute__ feature is available in gcc versions 2.5 and later.
@@ -67,9 +67,45 @@
#else
# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
#endif
-#define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
+
+/* _GL_ATTRIBUTE_FORMAT_PRINTF
+ indicates to GCC that the function takes a format string and arguments,
+ where the format string directives are the ones standardized by ISO C99
+ and POSIX. */
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
+# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
+ _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument))
+#else
+# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
+ _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument))
+#endif
+
+/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF,
+ except that it indicates to GCC that the supported format string directives
+ are the ones of the system printf(), rather than the ones standardized by
+ ISO C99 and POSIX. */
+#define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \
_GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument))
+/* _GL_ATTRIBUTE_FORMAT_SCANF
+ indicates to GCC that the function takes a format string and arguments,
+ where the format string directives are the ones standardized by ISO C99
+ and POSIX. */
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
+# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \
+ _GL_ATTRIBUTE_FORMAT ((__gnu_scanf__, formatstring_parameter, first_argument))
+#else
+# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \
+ _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument))
+#endif
+
+/* _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_SCANF,
+ except that it indicates to GCC that the supported format string directives
+ are the ones of the system scanf(), rather than the ones standardized by
+ ISO C99 and POSIX. */
+#define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \
+ _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument))
+
/* Solaris 10 declares renameat in <unistd.h>, not in <stdio.h>. */
/* But in any case avoid namespace pollution on glibc systems. */
#if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && defined __sun \
@@ -88,6 +124,15 @@
#define _GL_STDIO_STRINGIZE(token) #token
#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token)
+/* When also using extern inline, suppress the use of static inline in
+ standard headers of problematic Apple configurations, as Libc at
+ least through Libc-825.26 (2013-04-09) mishandles it; see, e.g.,
+ <http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
+ Perhaps Apple will fix this some day. */
+#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \
+ && defined __GNUC__ && defined __STDC__)
+# undef putc_unlocked
+#endif
#if @GNULIB_DPRINTF@
# if @REPLACE_DPRINTF@
@@ -134,6 +179,26 @@ _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - "
"use gnulib module fclose for portable POSIX compliance");
#endif
+#if @GNULIB_FDOPEN@
+# if @REPLACE_FDOPEN@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fdopen
+# define fdopen rpl_fdopen
+# endif
+_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode));
+# else
+_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode));
+# endif
+_GL_CXXALIASWARN (fdopen);
+#elif defined GNULIB_POSIXCHECK
+# undef fdopen
+/* Assume fdopen is always declared. */
+_GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - "
+ "use gnulib module fdopen for portability");
+#endif
+
#if @GNULIB_FFLUSH@
/* Flush all pending data on STREAM according to POSIX rules. Both
output and seekable input streams are supported.
@@ -158,11 +223,34 @@ _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - "
"use gnulib module fflush for portable POSIX compliance");
#endif
-/* It is very rare that the developer ever has full control of stdin,
- so any use of gets warrants an unconditional warning. Assume it is
- always declared, since it is required by C89. */
-#undef gets
-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+#if @GNULIB_FGETC@
+# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fgetc
+# define fgetc rpl_fgetc
+# endif
+_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (fgetc, int, (FILE *stream));
+# else
+_GL_CXXALIAS_SYS (fgetc, int, (FILE *stream));
+# endif
+_GL_CXXALIASWARN (fgetc);
+#endif
+
+#if @GNULIB_FGETS@
+# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fgets
+# define fgets rpl_fgets
+# endif
+_GL_FUNCDECL_RPL (fgets, char *, (char *s, int n, FILE *stream)
+ _GL_ARG_NONNULL ((1, 3)));
+_GL_CXXALIAS_RPL (fgets, char *, (char *s, int n, FILE *stream));
+# else
+_GL_CXXALIAS_SYS (fgets, char *, (char *s, int n, FILE *stream));
+# endif
+_GL_CXXALIASWARN (fgets);
+#endif
#if @GNULIB_FOPEN@
# if @REPLACE_FOPEN@
@@ -180,20 +268,26 @@ _GL_CXXALIASWARN (fopen);
#elif defined GNULIB_POSIXCHECK
# undef fopen
/* Assume fopen is always declared. */
-_GL_WARN_ON_USE (fopen, "fopen on Win32 platforms is not POSIX compatible - "
+_GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - "
"use gnulib module fopen for portability");
#endif
#if @GNULIB_FPRINTF_POSIX@ || @GNULIB_FPRINTF@
# if (@GNULIB_FPRINTF_POSIX@ && @REPLACE_FPRINTF@) \
- || (@GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@)
+ || (@GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@))
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define fprintf rpl_fprintf
# endif
# define GNULIB_overrides_fprintf 1
+# if @GNULIB_FPRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@
_GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...)
_GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
_GL_ARG_NONNULL ((1, 2)));
+# else
+_GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...)
+ _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3)
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
_GL_CXXALIAS_RPL (fprintf, int, (FILE *fp, const char *format, ...));
# else
_GL_CXXALIAS_SYS (fprintf, int, (FILE *fp, const char *format, ...));
@@ -239,7 +333,7 @@ _GL_WARN_ON_USE (fpurge, "fpurge is not always present - "
#endif
#if @GNULIB_FPUTC@
-# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef fputc
# define fputc rpl_fputc
@@ -253,7 +347,7 @@ _GL_CXXALIASWARN (fputc);
#endif
#if @GNULIB_FPUTS@
-# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef fputs
# define fputs rpl_fputs
@@ -267,6 +361,21 @@ _GL_CXXALIAS_SYS (fputs, int, (const char *string, FILE *stream));
_GL_CXXALIASWARN (fputs);
#endif
+#if @GNULIB_FREAD@
+# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fread
+# define fread rpl_fread
+# endif
+_GL_FUNCDECL_RPL (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream)
+ _GL_ARG_NONNULL ((4)));
+_GL_CXXALIAS_RPL (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream));
+# else
+_GL_CXXALIAS_SYS (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream));
+# endif
+_GL_CXXALIASWARN (fread);
+#endif
+
#if @GNULIB_FREOPEN@
# if @REPLACE_FREOPEN@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -287,10 +396,26 @@ _GL_CXXALIASWARN (freopen);
# undef freopen
/* Assume freopen is always declared. */
_GL_WARN_ON_USE (freopen,
- "freopen on Win32 platforms is not POSIX compatible - "
+ "freopen on native Windows platforms is not POSIX compliant - "
"use gnulib module freopen for portability");
#endif
+#if @GNULIB_FSCANF@
+# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fscanf
+# define fscanf rpl_fscanf
+# endif
+_GL_FUNCDECL_RPL (fscanf, int, (FILE *stream, const char *format, ...)
+ _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 3)
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (fscanf, int, (FILE *stream, const char *format, ...));
+# else
+_GL_CXXALIAS_SYS (fscanf, int, (FILE *stream, const char *format, ...));
+# endif
+_GL_CXXALIASWARN (fscanf);
+#endif
+
/* Set up the following warnings, based on which modules are in use.
GNU Coding Standards discourage the use of fseek, since it imposes
@@ -365,25 +490,6 @@ _GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)
_GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence));
# endif
_GL_CXXALIASWARN (fseeko);
-# if (@REPLACE_FSEEKO@ || !@HAVE_FSEEKO@) && !@GNULIB_FSEEK@
- /* Provide an fseek function that is consistent with fseeko. */
- /* In order to avoid that fseek gets defined as a macro here, the
- developer can request the 'fseek' module. */
-# if !GNULIB_defined_fseek_function
-# undef fseek
-# define fseek rpl_fseek
-static inline int _GL_ARG_NONNULL ((1))
-rpl_fseek (FILE *fp, long offset, int whence)
-{
-# if @REPLACE_FSEEKO@
- return rpl_fseeko (fp, offset, whence);
-# else
- return fseeko (fp, offset, whence);
-# endif
-}
-# define GNULIB_defined_fseek_function 1
-# endif
-# endif
#elif defined GNULIB_POSIXCHECK
# define _GL_FSEEK_WARN /* Category 1, above. */
# undef fseek
@@ -443,25 +549,6 @@ _GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp));
# endif
_GL_CXXALIASWARN (ftello);
-# if (@REPLACE_FTELLO@ || !@HAVE_FTELLO@) && !@GNULIB_FTELL@
- /* Provide an ftell function that is consistent with ftello. */
- /* In order to avoid that ftell gets defined as a macro here, the
- developer can request the 'ftell' module. */
-# if !GNULIB_defined_ftell_function
-# undef ftell
-# define ftell rpl_ftell
-static inline long _GL_ARG_NONNULL ((1))
-rpl_ftell (FILE *f)
-{
-# if @REPLACE_FTELLO@
- return rpl_ftello (f);
-# else
- return ftello (f);
-# endif
-}
-# define GNULIB_defined_ftell_function 1
-# endif
-# endif
#elif defined GNULIB_POSIXCHECK
# define _GL_FTELL_WARN /* Category 1, above. */
# undef ftell
@@ -483,7 +570,7 @@ _GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB "
#if @GNULIB_FWRITE@
-# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef fwrite
# define fwrite rpl_fwrite
@@ -496,10 +583,61 @@ _GL_CXXALIAS_RPL (fwrite, size_t,
# else
_GL_CXXALIAS_SYS (fwrite, size_t,
(const void *ptr, size_t s, size_t n, FILE *stream));
+
+/* Work around bug 11959 when fortifying glibc 2.4 through 2.15
+ <http://sources.redhat.com/bugzilla/show_bug.cgi?id=11959>,
+ which sometimes causes an unwanted diagnostic for fwrite calls.
+ This affects only function declaration attributes under certain
+ versions of gcc and clang, and is not needed for C++. */
+# if (0 < __USE_FORTIFY_LEVEL \
+ && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \
+ && 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \
+ && !defined __cplusplus)
+# undef fwrite
+# undef fwrite_unlocked
+extern size_t __REDIRECT (rpl_fwrite,
+ (const void *__restrict, size_t, size_t,
+ FILE *__restrict),
+ fwrite);
+extern size_t __REDIRECT (rpl_fwrite_unlocked,
+ (const void *__restrict, size_t, size_t,
+ FILE *__restrict),
+ fwrite_unlocked);
+# define fwrite rpl_fwrite
+# define fwrite_unlocked rpl_fwrite_unlocked
+# endif
# endif
_GL_CXXALIASWARN (fwrite);
#endif
+#if @GNULIB_GETC@
+# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef getc
+# define getc rpl_fgetc
+# endif
+_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL_1 (getc, rpl_fgetc, int, (FILE *stream));
+# else
+_GL_CXXALIAS_SYS (getc, int, (FILE *stream));
+# endif
+_GL_CXXALIASWARN (getc);
+#endif
+
+#if @GNULIB_GETCHAR@
+# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef getchar
+# define getchar rpl_getchar
+# endif
+_GL_FUNCDECL_RPL (getchar, int, (void));
+_GL_CXXALIAS_RPL (getchar, int, (void));
+# else
+_GL_CXXALIAS_SYS (getchar, int, (void));
+# endif
+_GL_CXXALIASWARN (getchar);
+#endif
+
#if @GNULIB_GETDELIM@
/* Read input, up to (and including) the next occurrence of DELIMITER, from
STREAM, store it in *LINEPTR (and NUL-terminate it).
@@ -576,6 +714,15 @@ _GL_WARN_ON_USE (getline, "getline is unportable - "
# endif
#endif
+/* It is very rare that the developer ever has full control of stdin,
+ so any use of gets warrants an unconditional warning; besides, C11
+ removed it. */
+#undef gets
+#if HAVE_RAW_DECL_GETS
+_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+#endif
+
+
#if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
struct obstack;
/* Grow an obstack with formatted output. Return the number of
@@ -627,6 +774,20 @@ _GL_CXXALIAS_SYS (obstack_vprintf, int,
_GL_CXXALIASWARN (obstack_vprintf);
#endif
+#if @GNULIB_PCLOSE@
+# if !@HAVE_PCLOSE@
+_GL_FUNCDECL_SYS (pclose, int, (FILE *stream) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pclose, int, (FILE *stream));
+_GL_CXXALIASWARN (pclose);
+#elif defined GNULIB_POSIXCHECK
+# undef pclose
+# if HAVE_RAW_DECL_PCLOSE
+_GL_WARN_ON_USE (pclose, "pclose is unportable - "
+ "use gnulib module pclose for more portability");
+# endif
+#endif
+
#if @GNULIB_PERROR@
/* Print a message to standard error, describing the value of ERRNO,
(if STRING is not NULL and not empty) prefixed with STRING and ": ",
@@ -658,6 +819,10 @@ _GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode)
_GL_ARG_NONNULL ((1, 2)));
_GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode));
# else
+# if !@HAVE_POPEN@
+_GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode)
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
_GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode));
# endif
_GL_CXXALIASWARN (popen);
@@ -671,18 +836,27 @@ _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - "
#if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@
# if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \
- || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@)
+ || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@))
# if defined __GNUC__
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
/* Don't break __attribute__((format(printf,M,N))). */
# define printf __printf__
# endif
+# if @GNULIB_PRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@
_GL_FUNCDECL_RPL_1 (__printf__, int,
(const char *format, ...)
__asm__ (@ASM_SYMBOL_PREFIX@
_GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf))
_GL_ATTRIBUTE_FORMAT_PRINTF (1, 2)
_GL_ARG_NONNULL ((1)));
+# else
+_GL_FUNCDECL_RPL_1 (__printf__, int,
+ (const char *format, ...)
+ __asm__ (@ASM_SYMBOL_PREFIX@
+ _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf))
+ _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2)
+ _GL_ARG_NONNULL ((1)));
+# endif
_GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...));
# else
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -711,7 +885,7 @@ _GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - "
#endif
#if @GNULIB_PUTC@
-# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef putc
# define putc rpl_fputc
@@ -725,7 +899,7 @@ _GL_CXXALIASWARN (putc);
#endif
#if @GNULIB_PUTCHAR@
-# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef putchar
# define putchar rpl_putchar
@@ -739,7 +913,7 @@ _GL_CXXALIASWARN (putchar);
#endif
#if @GNULIB_PUTS@
-# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef puts
# define puts rpl_puts
@@ -823,6 +997,37 @@ _GL_WARN_ON_USE (renameat, "renameat is not portable - "
# endif
#endif
+#if @GNULIB_SCANF@
+# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
+# if defined __GNUC__
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef scanf
+/* Don't break __attribute__((format(scanf,M,N))). */
+# define scanf __scanf__
+# endif
+_GL_FUNCDECL_RPL_1 (__scanf__, int,
+ (const char *format, ...)
+ __asm__ (@ASM_SYMBOL_PREFIX@
+ _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf))
+ _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *format, ...));
+# else
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef scanf
+# define scanf rpl_scanf
+# endif
+_GL_FUNCDECL_RPL (scanf, int, (const char *format, ...)
+ _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (scanf, int, (const char *format, ...));
+# endif
+# else
+_GL_CXXALIAS_SYS (scanf, int, (const char *format, ...));
+# endif
+_GL_CXXALIASWARN (scanf);
+#endif
+
#if @GNULIB_SNPRINTF@
# if @REPLACE_SNPRINTF@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -853,9 +1058,9 @@ _GL_WARN_ON_USE (snprintf, "snprintf is unportable - "
# endif
#endif
-/* Some people would argue that sprintf should be handled like gets
- (for example, OpenBSD issues a link warning for both functions),
- since both can cause security holes due to buffer overruns.
+/* Some people would argue that all sprintf uses should be warned about
+ (for example, OpenBSD issues a link warning for it),
+ since it can cause security holes due to buffer overruns.
However, we believe that sprintf can be used safely, and is more
efficient than snprintf in those safe cases; and as proof of our
belief, we use sprintf in several gnulib modules. So this header
@@ -982,14 +1187,20 @@ _GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - "
#if @GNULIB_VFPRINTF_POSIX@ || @GNULIB_VFPRINTF@
# if (@GNULIB_VFPRINTF_POSIX@ && @REPLACE_VFPRINTF@) \
- || (@GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@)
+ || (@GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@))
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define vfprintf rpl_vfprintf
# endif
# define GNULIB_overrides_vfprintf 1
+# if @GNULIB_VFPRINTF_POSIX@
_GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)
_GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
_GL_ARG_NONNULL ((1, 2)));
+# else
+_GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)
+ _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0)
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
_GL_CXXALIAS_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args));
# else
/* Need to cast, because on Solaris, the third parameter is
@@ -1010,16 +1221,41 @@ _GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - "
"POSIX compliance");
#endif
+#if @GNULIB_VFSCANF@
+# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef vfscanf
+# define vfscanf rpl_vfscanf
+# endif
+_GL_FUNCDECL_RPL (vfscanf, int,
+ (FILE *stream, const char *format, va_list args)
+ _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 0)
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (vfscanf, int,
+ (FILE *stream, const char *format, va_list args));
+# else
+_GL_CXXALIAS_SYS (vfscanf, int,
+ (FILE *stream, const char *format, va_list args));
+# endif
+_GL_CXXALIASWARN (vfscanf);
+#endif
+
#if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VPRINTF@
# if (@GNULIB_VPRINTF_POSIX@ && @REPLACE_VPRINTF@) \
- || (@GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@)
+ || (@GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@))
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define vprintf rpl_vprintf
# endif
# define GNULIB_overrides_vprintf 1
+# if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@
_GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args)
_GL_ATTRIBUTE_FORMAT_PRINTF (1, 0)
_GL_ARG_NONNULL ((1)));
+# else
+_GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args)
+ _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0)
+ _GL_ARG_NONNULL ((1)));
+# endif
_GL_CXXALIAS_RPL (vprintf, int, (const char *format, va_list args));
# else
/* Need to cast, because on Solaris, the second parameter is
@@ -1039,6 +1275,22 @@ _GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - "
"POSIX compliance");
#endif
+#if @GNULIB_VSCANF@
+# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef vscanf
+# define vscanf rpl_vscanf
+# endif
+_GL_FUNCDECL_RPL (vscanf, int, (const char *format, va_list args)
+ _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 0)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (vscanf, int, (const char *format, va_list args));
+# else
+_GL_CXXALIAS_SYS (vscanf, int, (const char *format, va_list args));
+# endif
+_GL_CXXALIASWARN (vscanf);
+#endif
+
#if @GNULIB_VSNPRINTF@
# if @REPLACE_VSNPRINTF@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -1096,7 +1348,6 @@ _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - "
"POSIX compliance");
#endif
-
-#endif /* _GL_STDIO_H */
-#endif /* _GL_STDIO_H */
+#endif /* _@GUARD_PREFIX@_STDIO_H */
+#endif /* _@GUARD_PREFIX@_STDIO_H */
#endif
diff --git a/lib/stdlib--.h b/lib/stdlib--.h
index 108456c..ac02ece 100644
--- a/lib/stdlib--.h
+++ b/lib/stdlib--.h
@@ -1,6 +1,6 @@
/* Like stdlib.h, but redefine some names to avoid glitches.
- Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/stdlib-safer.h b/lib/stdlib-safer.h
index dd8f1b3..1e31493 100644
--- a/lib/stdlib-safer.h
+++ b/lib/stdlib-safer.h
@@ -1,6 +1,6 @@
/* Invoke stdlib.h functions, but avoid some glitches.
- Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index 2697a4b..c955248 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <stdlib.h>.
- Copyright (C) 1995, 2001-2004, 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001-2004, 2006-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -20,21 +20,22 @@
#endif
@PRAGMA_COLUMNS@
-#if defined __need_malloc_and_calloc
-/* Special invocation convention inside glibc header files. */
+#if defined __need_system_stdlib_h || defined __need_malloc_and_calloc
+/* Special invocation conventions inside some gnulib header files,
+ and inside some glibc header files, respectively. */
#@INCLUDE_NEXT@ @NEXT_STDLIB_H@
#else
/* Normal invocation convention. */
-#ifndef _GL_STDLIB_H
+#ifndef _@GUARD_PREFIX@_STDLIB_H
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_STDLIB_H@
-#ifndef _GL_STDLIB_H
-#define _GL_STDLIB_H
+#ifndef _@GUARD_PREFIX@_STDLIB_H
+#define _@GUARD_PREFIX@_STDLIB_H
/* NetBSD 5.0 mis-defines NULL. */
#include <stddef.h>
@@ -49,6 +50,11 @@
# include <sys/loadavg.h>
#endif
+/* Native Windows platforms declare mktemp() in <io.h>. */
+#if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+# include <io.h>
+#endif
+
#if @GNULIB_RANDOM_R@
/* OSF/1 5.1 declares 'struct random_data' in <random.h>, which is included
@@ -58,7 +64,7 @@
# include <random.h>
# endif
-# if !@HAVE_STRUCT_RANDOM_DATA@ || !@HAVE_RANDOM_R@
+# if !@HAVE_STRUCT_RANDOM_DATA@ || @REPLACE_RANDOM_R@ || !@HAVE_RANDOM_R@
# include <stdint.h>
# endif
@@ -81,19 +87,24 @@ struct random_data
# endif
#endif
-#if (@GNULIB_MKSTEMP@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
-/* On MacOS X 10.3, only <unistd.h> declares mkstemp. */
+#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+/* On Mac OS X 10.3, only <unistd.h> declares mkstemp. */
+/* On Mac OS X 10.5, only <unistd.h> declares mkstemps. */
/* On Cygwin 1.7.1, only <unistd.h> declares getsubopt. */
/* But avoid namespace pollution on glibc systems and native Windows. */
# include <unistd.h>
#endif
-#if 3 <= __GNUC__ || __GNUC__ == 2 && 8 <= __GNUC_MINOR__
-# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
+/* The __attribute__ feature is available in gcc versions 2.5 and later.
+ The attribute __pure__ was added in gcc 2.96. */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
#else
-# define _GL_ATTRIBUTE_NORETURN
+# define _GL_ATTRIBUTE_PURE /* empty */
#endif
+/* The definition of _Noreturn is copied here. */
+
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */
@@ -119,7 +130,7 @@ struct random_data
/* Terminate the current process with the given return code, without running
the 'atexit' handlers. */
# if !@HAVE__EXIT@
-_GL_FUNCDECL_SYS (_Exit, void, (int status) _GL_ATTRIBUTE_NORETURN);
+_GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status));
# endif
_GL_CXXALIAS_SYS (_Exit, void, (int status));
_GL_CXXALIASWARN (_Exit);
@@ -136,7 +147,9 @@ _GL_WARN_ON_USE (_Exit, "_Exit is unportable - "
/* Parse a signed decimal integer.
Returns the value of the integer. Errors are not detected. */
# if !@HAVE_ATOLL@
-_GL_FUNCDECL_SYS (atoll, long long, (const char *string) _GL_ARG_NONNULL ((1)));
+_GL_FUNCDECL_SYS (atoll, long long, (const char *string)
+ _GL_ATTRIBUTE_PURE
+ _GL_ARG_NONNULL ((1)));
# endif
_GL_CXXALIAS_SYS (atoll, long long, (const char *string));
_GL_CXXALIASWARN (atoll);
@@ -250,14 +263,19 @@ _GL_CXXALIASWARN (grantpt);
#elif defined GNULIB_POSIXCHECK
# undef grantpt
# if HAVE_RAW_DECL_GRANTPT
-_GL_WARN_ON_USE (ptsname, "grantpt is not portable - "
+_GL_WARN_ON_USE (grantpt, "grantpt is not portable - "
"use gnulib module grantpt for portability");
# endif
#endif
+/* If _GL_USE_STDLIB_ALLOC is nonzero, the including module does not
+ rely on GNU or POSIX semantics for malloc and realloc (for example,
+ by never specifying a zero size), so it does not need malloc or
+ realloc to be redefined. */
#if @GNULIB_MALLOC_POSIX@
# if @REPLACE_MALLOC@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
+ || _GL_USE_STDLIB_ALLOC)
# undef malloc
# define malloc rpl_malloc
# endif
@@ -267,7 +285,7 @@ _GL_CXXALIAS_RPL (malloc, void *, (size_t size));
_GL_CXXALIAS_SYS (malloc, void *, (size_t size));
# endif
_GL_CXXALIASWARN (malloc);
-#elif defined GNULIB_POSIXCHECK
+#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
# undef malloc
/* Assume malloc is always declared. */
_GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - "
@@ -421,13 +439,38 @@ _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - "
# endif
#endif
+#if @GNULIB_POSIX_OPENPT@
+/* Return an FD open to the master side of a pseudo-terminal. Flags should
+ include O_RDWR, and may also include O_NOCTTY. */
+# if !@HAVE_POSIX_OPENPT@
+_GL_FUNCDECL_SYS (posix_openpt, int, (int flags));
+# endif
+_GL_CXXALIAS_SYS (posix_openpt, int, (int flags));
+_GL_CXXALIASWARN (posix_openpt);
+#elif defined GNULIB_POSIXCHECK
+# undef posix_openpt
+# if HAVE_RAW_DECL_POSIX_OPENPT
+_GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - "
+ "use gnulib module posix_openpt for portability");
+# endif
+#endif
+
#if @GNULIB_PTSNAME@
/* Return the pathname of the pseudo-terminal slave associated with
the master FD is open on, or NULL on errors. */
-# if !@HAVE_PTSNAME@
+# if @REPLACE_PTSNAME@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef ptsname
+# define ptsname rpl_ptsname
+# endif
+_GL_FUNCDECL_RPL (ptsname, char *, (int fd));
+_GL_CXXALIAS_RPL (ptsname, char *, (int fd));
+# else
+# if !@HAVE_PTSNAME@
_GL_FUNCDECL_SYS (ptsname, char *, (int fd));
-# endif
+# endif
_GL_CXXALIAS_SYS (ptsname, char *, (int fd));
+# endif
_GL_CXXALIASWARN (ptsname);
#elif defined GNULIB_POSIXCHECK
# undef ptsname
@@ -437,6 +480,32 @@ _GL_WARN_ON_USE (ptsname, "ptsname is not portable - "
# endif
#endif
+#if @GNULIB_PTSNAME_R@
+/* Set the pathname of the pseudo-terminal slave associated with
+ the master FD is open on and return 0, or set errno and return
+ non-zero on errors. */
+# if @REPLACE_PTSNAME_R@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef ptsname_r
+# define ptsname_r rpl_ptsname_r
+# endif
+_GL_FUNCDECL_RPL (ptsname_r, int, (int fd, char *buf, size_t len));
+_GL_CXXALIAS_RPL (ptsname_r, int, (int fd, char *buf, size_t len));
+# else
+# if !@HAVE_PTSNAME_R@
+_GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
+# endif
+_GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
+# endif
+_GL_CXXALIASWARN (ptsname_r);
+#elif defined GNULIB_POSIXCHECK
+# undef ptsname_r
+# if HAVE_RAW_DECL_PTSNAME_R
+_GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - "
+ "use gnulib module ptsname_r for portability");
+# endif
+#endif
+
#if @GNULIB_PUTENV@
# if @REPLACE_PUTENV@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -460,12 +529,83 @@ _GL_CXXALIASWARN (putenv);
# endif
#endif
+
+#if @GNULIB_RANDOM@
+# if !@HAVE_RANDOM@
+_GL_FUNCDECL_SYS (random, long, (void));
+# endif
+_GL_CXXALIAS_SYS (random, long, (void));
+_GL_CXXALIASWARN (random);
+#elif defined GNULIB_POSIXCHECK
+# undef random
+# if HAVE_RAW_DECL_RANDOM
+_GL_WARN_ON_USE (random, "random is unportable - "
+ "use gnulib module random for portability");
+# endif
+#endif
+
+#if @GNULIB_RANDOM@
+# if !@HAVE_RANDOM@
+_GL_FUNCDECL_SYS (srandom, void, (unsigned int seed));
+# endif
+_GL_CXXALIAS_SYS (srandom, void, (unsigned int seed));
+_GL_CXXALIASWARN (srandom);
+#elif defined GNULIB_POSIXCHECK
+# undef srandom
+# if HAVE_RAW_DECL_SRANDOM
+_GL_WARN_ON_USE (srandom, "srandom is unportable - "
+ "use gnulib module random for portability");
+# endif
+#endif
+
+#if @GNULIB_RANDOM@
+# if !@HAVE_RANDOM@
+_GL_FUNCDECL_SYS (initstate, char *,
+ (unsigned int seed, char *buf, size_t buf_size)
+ _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (initstate, char *,
+ (unsigned int seed, char *buf, size_t buf_size));
+_GL_CXXALIASWARN (initstate);
+#elif defined GNULIB_POSIXCHECK
+# undef initstate
+# if HAVE_RAW_DECL_INITSTATE_R
+_GL_WARN_ON_USE (initstate, "initstate is unportable - "
+ "use gnulib module random for portability");
+# endif
+#endif
+
+#if @GNULIB_RANDOM@
+# if !@HAVE_RANDOM@
+_GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (setstate, char *, (char *arg_state));
+_GL_CXXALIASWARN (setstate);
+#elif defined GNULIB_POSIXCHECK
+# undef setstate
+# if HAVE_RAW_DECL_SETSTATE_R
+_GL_WARN_ON_USE (setstate, "setstate is unportable - "
+ "use gnulib module random for portability");
+# endif
+#endif
+
+
#if @GNULIB_RANDOM_R@
-# if !@HAVE_RANDOM_R@
+# if @REPLACE_RANDOM_R@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef random_r
+# define random_r rpl_random_r
+# endif
+_GL_FUNCDECL_RPL (random_r, int, (struct random_data *buf, int32_t *result)
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (random_r, int, (struct random_data *buf, int32_t *result));
+# else
+# if !@HAVE_RANDOM_R@
_GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result)
_GL_ARG_NONNULL ((1, 2)));
-# endif
+# endif
_GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result));
+# endif
_GL_CXXALIASWARN (random_r);
#elif defined GNULIB_POSIXCHECK
# undef random_r
@@ -476,13 +616,25 @@ _GL_WARN_ON_USE (random_r, "random_r is unportable - "
#endif
#if @GNULIB_RANDOM_R@
-# if !@HAVE_RANDOM_R@
+# if @REPLACE_RANDOM_R@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef srandom_r
+# define srandom_r rpl_srandom_r
+# endif
+_GL_FUNCDECL_RPL (srandom_r, int,
+ (unsigned int seed, struct random_data *rand_state)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (srandom_r, int,
+ (unsigned int seed, struct random_data *rand_state));
+# else
+# if !@HAVE_RANDOM_R@
_GL_FUNCDECL_SYS (srandom_r, int,
(unsigned int seed, struct random_data *rand_state)
_GL_ARG_NONNULL ((2)));
-# endif
+# endif
_GL_CXXALIAS_SYS (srandom_r, int,
(unsigned int seed, struct random_data *rand_state));
+# endif
_GL_CXXALIASWARN (srandom_r);
#elif defined GNULIB_POSIXCHECK
# undef srandom_r
@@ -493,15 +645,29 @@ _GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - "
#endif
#if @GNULIB_RANDOM_R@
-# if !@HAVE_RANDOM_R@
+# if @REPLACE_RANDOM_R@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef initstate_r
+# define initstate_r rpl_initstate_r
+# endif
+_GL_FUNCDECL_RPL (initstate_r, int,
+ (unsigned int seed, char *buf, size_t buf_size,
+ struct random_data *rand_state)
+ _GL_ARG_NONNULL ((2, 4)));
+_GL_CXXALIAS_RPL (initstate_r, int,
+ (unsigned int seed, char *buf, size_t buf_size,
+ struct random_data *rand_state));
+# else
+# if !@HAVE_RANDOM_R@
_GL_FUNCDECL_SYS (initstate_r, int,
(unsigned int seed, char *buf, size_t buf_size,
struct random_data *rand_state)
_GL_ARG_NONNULL ((2, 4)));
-# endif
+# endif
_GL_CXXALIAS_SYS (initstate_r, int,
(unsigned int seed, char *buf, size_t buf_size,
struct random_data *rand_state));
+# endif
_GL_CXXALIASWARN (initstate_r);
#elif defined GNULIB_POSIXCHECK
# undef initstate_r
@@ -512,13 +678,25 @@ _GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - "
#endif
#if @GNULIB_RANDOM_R@
-# if !@HAVE_RANDOM_R@
+# if @REPLACE_RANDOM_R@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef setstate_r
+# define setstate_r rpl_setstate_r
+# endif
+_GL_FUNCDECL_RPL (setstate_r, int,
+ (char *arg_state, struct random_data *rand_state)
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (setstate_r, int,
+ (char *arg_state, struct random_data *rand_state));
+# else
+# if !@HAVE_RANDOM_R@
_GL_FUNCDECL_SYS (setstate_r, int,
(char *arg_state, struct random_data *rand_state)
_GL_ARG_NONNULL ((1, 2)));
-# endif
+# endif
_GL_CXXALIAS_SYS (setstate_r, int,
(char *arg_state, struct random_data *rand_state));
+# endif
_GL_CXXALIASWARN (setstate_r);
#elif defined GNULIB_POSIXCHECK
# undef setstate_r
@@ -531,7 +709,8 @@ _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - "
#if @GNULIB_REALLOC_POSIX@
# if @REPLACE_REALLOC@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
+ || _GL_USE_STDLIB_ALLOC)
# undef realloc
# define realloc rpl_realloc
# endif
@@ -541,7 +720,7 @@ _GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size));
_GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size));
# endif
_GL_CXXALIASWARN (realloc);
-#elif defined GNULIB_POSIXCHECK
+#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
# undef realloc
/* Assume realloc is always declared. */
_GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - "
@@ -588,6 +767,22 @@ _GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - "
# endif
#endif
+#if @GNULIB_SECURE_GETENV@
+/* Look up NAME in the environment, returning 0 in insecure situations. */
+# if !@HAVE_SECURE_GETENV@
+_GL_FUNCDECL_SYS (secure_getenv, char *,
+ (char const *name) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (secure_getenv, char *, (char const *name));
+_GL_CXXALIASWARN (secure_getenv);
+#elif defined GNULIB_POSIXCHECK
+# undef secure_getenv
+# if HAVE_RAW_DECL_SECURE_GETENV
+_GL_WARN_ON_USE (secure_getenv, "secure_getenv is unportable - "
+ "use gnulib module secure_getenv for portability");
+# endif
+#endif
+
#if @GNULIB_SETENV@
/* Set NAME to VALUE in the environment.
If REPLACE is nonzero, overwrite an existing value. */
@@ -754,6 +949,6 @@ _GL_CXXALIASWARN (wctomb);
#endif
-#endif /* _GL_STDLIB_H */
-#endif /* _GL_STDLIB_H */
+#endif /* _@GUARD_PREFIX@_STDLIB_H */
+#endif /* _@GUARD_PREFIX@_STDLIB_H */
#endif
diff --git a/lib/str-two-way.h b/lib/str-two-way.h
index 08a6cd3..707145d 100644
--- a/lib/str-two-way.h
+++ b/lib/str-two-way.h
@@ -1,5 +1,5 @@
/* Byte-wise substring search, using the Two-Way algorithm.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Eric Blake <ebb9@byu.net>, 2008.
@@ -14,8 +14,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ with this program; if not, see <http://www.gnu.org/licenses/>. */
/* Before including this file, you need to include <config.h> and
<string.h>, and define:
diff --git a/lib/strchrnul.c b/lib/strchrnul.c
index 61db4e8..f6b0722 100644
--- a/lib/strchrnul.c
+++ b/lib/strchrnul.c
@@ -1,5 +1,5 @@
/* Searching in a string.
- Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/streq.h b/lib/streq.h
index c7794f6..12c1867 100644
--- a/lib/streq.h
+++ b/lib/streq.h
@@ -1,5 +1,5 @@
/* Optimized string comparison.
- Copyright (C) 2001-2002, 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
@@ -21,8 +21,8 @@
#include <string.h>
-/* STREQ allows to optimize string comparison with a small literal string.
- STREQ (s, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
+/* STREQ_OPT allows to optimize string comparison with a small literal string.
+ STREQ_OPT (s, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
is semantically equivalent to
strcmp (s, "EUC-KR") == 0
just faster. */
@@ -163,12 +163,12 @@ streq0 (const char *s1, const char *s2, char s20, char s21, char s22, char s23,
return 0;
}
-#define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \
+#define STREQ_OPT(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \
streq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28)
#else
-#define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \
+#define STREQ_OPT(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \
(strcmp (s1, s2) == 0)
#endif
diff --git a/lib/strerror-override.c b/lib/strerror-override.c
new file mode 100644
index 0000000..d0ed2fb
--- /dev/null
+++ b/lib/strerror-override.c
@@ -0,0 +1,302 @@
+/* strerror-override.c --- POSIX compatible system error routine
+
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2010. */
+
+#include <config.h>
+
+#include "strerror-override.h"
+
+#include <errno.h>
+
+#if GNULIB_defined_EWINSOCK /* native Windows platforms */
+# if HAVE_WINSOCK2_H
+# include <winsock2.h>
+# endif
+#endif
+
+/* If ERRNUM maps to an errno value defined by gnulib, return a string
+ describing the error. Otherwise return NULL. */
+const char *
+strerror_override (int errnum)
+{
+ /* These error messages are taken from glibc/sysdeps/gnu/errlist.c. */
+ switch (errnum)
+ {
+#if REPLACE_STRERROR_0
+ case 0:
+ return "Success";
+#endif
+
+#if GNULIB_defined_ESOCK /* native Windows platforms with older <errno.h> */
+ case EINPROGRESS:
+ return "Operation now in progress";
+ case EALREADY:
+ return "Operation already in progress";
+ case ENOTSOCK:
+ return "Socket operation on non-socket";
+ case EDESTADDRREQ:
+ return "Destination address required";
+ case EMSGSIZE:
+ return "Message too long";
+ case EPROTOTYPE:
+ return "Protocol wrong type for socket";
+ case ENOPROTOOPT:
+ return "Protocol not available";
+ case EPROTONOSUPPORT:
+ return "Protocol not supported";
+ case EOPNOTSUPP:
+ return "Operation not supported";
+ case EAFNOSUPPORT:
+ return "Address family not supported by protocol";
+ case EADDRINUSE:
+ return "Address already in use";
+ case EADDRNOTAVAIL:
+ return "Cannot assign requested address";
+ case ENETDOWN:
+ return "Network is down";
+ case ENETUNREACH:
+ return "Network is unreachable";
+ case ECONNRESET:
+ return "Connection reset by peer";
+ case ENOBUFS:
+ return "No buffer space available";
+ case EISCONN:
+ return "Transport endpoint is already connected";
+ case ENOTCONN:
+ return "Transport endpoint is not connected";
+ case ETIMEDOUT:
+ return "Connection timed out";
+ case ECONNREFUSED:
+ return "Connection refused";
+ case ELOOP:
+ return "Too many levels of symbolic links";
+ case EHOSTUNREACH:
+ return "No route to host";
+ case EWOULDBLOCK:
+ return "Operation would block";
+#endif
+#if GNULIB_defined_ESTREAMS /* native Windows platforms with older <errno.h> */
+ case ETXTBSY:
+ return "Text file busy";
+ case ENODATA:
+ return "No data available";
+ case ENOSR:
+ return "Out of streams resources";
+ case ENOSTR:
+ return "Device not a stream";
+ case ETIME:
+ return "Timer expired";
+ case EOTHER:
+ return "Other error";
+#endif
+#if GNULIB_defined_EWINSOCK /* native Windows platforms */
+ case ESOCKTNOSUPPORT:
+ return "Socket type not supported";
+ case EPFNOSUPPORT:
+ return "Protocol family not supported";
+ case ESHUTDOWN:
+ return "Cannot send after transport endpoint shutdown";
+ case ETOOMANYREFS:
+ return "Too many references: cannot splice";
+ case EHOSTDOWN:
+ return "Host is down";
+ case EPROCLIM:
+ return "Too many processes";
+ case EUSERS:
+ return "Too many users";
+ case EDQUOT:
+ return "Disk quota exceeded";
+ case ESTALE:
+ return "Stale NFS file handle";
+ case EREMOTE:
+ return "Object is remote";
+# if HAVE_WINSOCK2_H
+ /* WSA_INVALID_HANDLE maps to EBADF */
+ /* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */
+ /* WSA_INVALID_PARAMETER maps to EINVAL */
+ case WSA_OPERATION_ABORTED:
+ return "Overlapped operation aborted";
+ case WSA_IO_INCOMPLETE:
+ return "Overlapped I/O event object not in signaled state";
+ case WSA_IO_PENDING:
+ return "Overlapped operations will complete later";
+ /* WSAEINTR maps to EINTR */
+ /* WSAEBADF maps to EBADF */
+ /* WSAEACCES maps to EACCES */
+ /* WSAEFAULT maps to EFAULT */
+ /* WSAEINVAL maps to EINVAL */
+ /* WSAEMFILE maps to EMFILE */
+ /* WSAEWOULDBLOCK maps to EWOULDBLOCK */
+ /* WSAEINPROGRESS maps to EINPROGRESS */
+ /* WSAEALREADY maps to EALREADY */
+ /* WSAENOTSOCK maps to ENOTSOCK */
+ /* WSAEDESTADDRREQ maps to EDESTADDRREQ */
+ /* WSAEMSGSIZE maps to EMSGSIZE */
+ /* WSAEPROTOTYPE maps to EPROTOTYPE */
+ /* WSAENOPROTOOPT maps to ENOPROTOOPT */
+ /* WSAEPROTONOSUPPORT maps to EPROTONOSUPPORT */
+ /* WSAESOCKTNOSUPPORT is ESOCKTNOSUPPORT */
+ /* WSAEOPNOTSUPP maps to EOPNOTSUPP */
+ /* WSAEPFNOSUPPORT is EPFNOSUPPORT */
+ /* WSAEAFNOSUPPORT maps to EAFNOSUPPORT */
+ /* WSAEADDRINUSE maps to EADDRINUSE */
+ /* WSAEADDRNOTAVAIL maps to EADDRNOTAVAIL */
+ /* WSAENETDOWN maps to ENETDOWN */
+ /* WSAENETUNREACH maps to ENETUNREACH */
+ /* WSAENETRESET maps to ENETRESET */
+ /* WSAECONNABORTED maps to ECONNABORTED */
+ /* WSAECONNRESET maps to ECONNRESET */
+ /* WSAENOBUFS maps to ENOBUFS */
+ /* WSAEISCONN maps to EISCONN */
+ /* WSAENOTCONN maps to ENOTCONN */
+ /* WSAESHUTDOWN is ESHUTDOWN */
+ /* WSAETOOMANYREFS is ETOOMANYREFS */
+ /* WSAETIMEDOUT maps to ETIMEDOUT */
+ /* WSAECONNREFUSED maps to ECONNREFUSED */
+ /* WSAELOOP maps to ELOOP */
+ /* WSAENAMETOOLONG maps to ENAMETOOLONG */
+ /* WSAEHOSTDOWN is EHOSTDOWN */
+ /* WSAEHOSTUNREACH maps to EHOSTUNREACH */
+ /* WSAENOTEMPTY maps to ENOTEMPTY */
+ /* WSAEPROCLIM is EPROCLIM */
+ /* WSAEUSERS is EUSERS */
+ /* WSAEDQUOT is EDQUOT */
+ /* WSAESTALE is ESTALE */
+ /* WSAEREMOTE is EREMOTE */
+ case WSASYSNOTREADY:
+ return "Network subsystem is unavailable";
+ case WSAVERNOTSUPPORTED:
+ return "Winsock.dll version out of range";
+ case WSANOTINITIALISED:
+ return "Successful WSAStartup not yet performed";
+ case WSAEDISCON:
+ return "Graceful shutdown in progress";
+ case WSAENOMORE: case WSA_E_NO_MORE:
+ return "No more results";
+ case WSAECANCELLED: case WSA_E_CANCELLED:
+ return "Call was canceled";
+ case WSAEINVALIDPROCTABLE:
+ return "Procedure call table is invalid";
+ case WSAEINVALIDPROVIDER:
+ return "Service provider is invalid";
+ case WSAEPROVIDERFAILEDINIT:
+ return "Service provider failed to initialize";
+ case WSASYSCALLFAILURE:
+ return "System call failure";
+ case WSASERVICE_NOT_FOUND:
+ return "Service not found";
+ case WSATYPE_NOT_FOUND:
+ return "Class type not found";
+ case WSAEREFUSED:
+ return "Database query was refused";
+ case WSAHOST_NOT_FOUND:
+ return "Host not found";
+ case WSATRY_AGAIN:
+ return "Nonauthoritative host not found";
+ case WSANO_RECOVERY:
+ return "Nonrecoverable error";
+ case WSANO_DATA:
+ return "Valid name, no data record of requested type";
+ /* WSA_QOS_* omitted */
+# endif
+#endif
+
+#if GNULIB_defined_ENOMSG
+ case ENOMSG:
+ return "No message of desired type";
+#endif
+
+#if GNULIB_defined_EIDRM
+ case EIDRM:
+ return "Identifier removed";
+#endif
+
+#if GNULIB_defined_ENOLINK
+ case ENOLINK:
+ return "Link has been severed";
+#endif
+
+#if GNULIB_defined_EPROTO
+ case EPROTO:
+ return "Protocol error";
+#endif
+
+#if GNULIB_defined_EMULTIHOP
+ case EMULTIHOP:
+ return "Multihop attempted";
+#endif
+
+#if GNULIB_defined_EBADMSG
+ case EBADMSG:
+ return "Bad message";
+#endif
+
+#if GNULIB_defined_EOVERFLOW
+ case EOVERFLOW:
+ return "Value too large for defined data type";
+#endif
+
+#if GNULIB_defined_ENOTSUP
+ case ENOTSUP:
+ return "Not supported";
+#endif
+
+#if GNULIB_defined_ENETRESET
+ case ENETRESET:
+ return "Network dropped connection on reset";
+#endif
+
+#if GNULIB_defined_ECONNABORTED
+ case ECONNABORTED:
+ return "Software caused connection abort";
+#endif
+
+#if GNULIB_defined_ESTALE
+ case ESTALE:
+ return "Stale NFS file handle";
+#endif
+
+#if GNULIB_defined_EDQUOT
+ case EDQUOT:
+ return "Disk quota exceeded";
+#endif
+
+#if GNULIB_defined_ECANCELED
+ case ECANCELED:
+ return "Operation canceled";
+#endif
+
+#if GNULIB_defined_EOWNERDEAD
+ case EOWNERDEAD:
+ return "Owner died";
+#endif
+
+#if GNULIB_defined_ENOTRECOVERABLE
+ case ENOTRECOVERABLE:
+ return "State not recoverable";
+#endif
+
+#if GNULIB_defined_EILSEQ
+ case EILSEQ:
+ return "Invalid or incomplete multibyte or wide character";
+#endif
+
+ default:
+ return NULL;
+ }
+}
diff --git a/lib/strerror-override.h b/lib/strerror-override.h
new file mode 100644
index 0000000..3b8f24b
--- /dev/null
+++ b/lib/strerror-override.h
@@ -0,0 +1,56 @@
+/* strerror-override.h --- POSIX compatible system error routine
+
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GL_STRERROR_OVERRIDE_H
+# define _GL_STRERROR_OVERRIDE_H
+
+# include <errno.h>
+# include <stddef.h>
+
+/* Reasonable buffer size that should never trigger ERANGE; if this
+ proves too small, we intentionally abort(), to remind us to fix
+ this value. */
+# define STACKBUF_LEN 256
+
+/* If ERRNUM maps to an errno value defined by gnulib, return a string
+ describing the error. Otherwise return NULL. */
+# if REPLACE_STRERROR_0 \
+ || GNULIB_defined_ESOCK \
+ || GNULIB_defined_ESTREAMS \
+ || GNULIB_defined_EWINSOCK \
+ || GNULIB_defined_ENOMSG \
+ || GNULIB_defined_EIDRM \
+ || GNULIB_defined_ENOLINK \
+ || GNULIB_defined_EPROTO \
+ || GNULIB_defined_EMULTIHOP \
+ || GNULIB_defined_EBADMSG \
+ || GNULIB_defined_EOVERFLOW \
+ || GNULIB_defined_ENOTSUP \
+ || GNULIB_defined_ENETRESET \
+ || GNULIB_defined_ECONNABORTED \
+ || GNULIB_defined_ESTALE \
+ || GNULIB_defined_EDQUOT \
+ || GNULIB_defined_ECANCELED \
+ || GNULIB_defined_EOWNERDEAD \
+ || GNULIB_defined_ENOTRECOVERABLE \
+ || GNULIB_defined_EILSEQ
+extern const char *strerror_override (int errnum);
+# else
+# define strerror_override(ignored) NULL
+# endif
+
+#endif /* _GL_STRERROR_OVERRIDE_H */
diff --git a/lib/strerror.c b/lib/strerror.c
index 5dae111..80a2f2e 100644
--- a/lib/strerror.c
+++ b/lib/strerror.c
@@ -1,6 +1,6 @@
/* strerror.c --- POSIX compatible system error routine
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,340 +17,54 @@
#include <config.h>
+/* Specification. */
#include <string.h>
-#if REPLACE_STRERROR
-
-# include <errno.h>
-# include <stdio.h>
-
-# if GNULIB_defined_ESOCK /* native Windows platforms */
-# if HAVE_WINSOCK2_H
-# include <winsock2.h>
-# endif
-# endif
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
-# include "intprops.h"
+#include "intprops.h"
+#include "strerror-override.h"
+#include "verify.h"
/* Use the system functions, not the gnulib overrides in this file. */
-# undef sprintf
-
-# undef strerror
-# if ! HAVE_DECL_STRERROR
-# define strerror(n) NULL
-# endif
+#undef sprintf
char *
-rpl_strerror (int n)
+strerror (int n)
+#undef strerror
{
- char const *msg = NULL;
- /* These error messages are taken from glibc/sysdeps/gnu/errlist.c. */
- switch (n)
- {
-# if GNULIB_defined_ETXTBSY
- case ETXTBSY:
- msg = "Text file busy";
- break;
-# endif
-
-# if GNULIB_defined_ESOCK /* native Windows platforms */
- /* EWOULDBLOCK is the same as EAGAIN. */
- case EINPROGRESS:
- msg = "Operation now in progress";
- break;
- case EALREADY:
- msg = "Operation already in progress";
- break;
- case ENOTSOCK:
- msg = "Socket operation on non-socket";
- break;
- case EDESTADDRREQ:
- msg = "Destination address required";
- break;
- case EMSGSIZE:
- msg = "Message too long";
- break;
- case EPROTOTYPE:
- msg = "Protocol wrong type for socket";
- break;
- case ENOPROTOOPT:
- msg = "Protocol not available";
- break;
- case EPROTONOSUPPORT:
- msg = "Protocol not supported";
- break;
- case ESOCKTNOSUPPORT:
- msg = "Socket type not supported";
- break;
- case EOPNOTSUPP:
- msg = "Operation not supported";
- break;
- case EPFNOSUPPORT:
- msg = "Protocol family not supported";
- break;
- case EAFNOSUPPORT:
- msg = "Address family not supported by protocol";
- break;
- case EADDRINUSE:
- msg = "Address already in use";
- break;
- case EADDRNOTAVAIL:
- msg = "Cannot assign requested address";
- break;
- case ENETDOWN:
- msg = "Network is down";
- break;
- case ENETUNREACH:
- msg = "Network is unreachable";
- break;
- case ENETRESET:
- msg = "Network dropped connection on reset";
- break;
- case ECONNABORTED:
- msg = "Software caused connection abort";
- break;
- case ECONNRESET:
- msg = "Connection reset by peer";
- break;
- case ENOBUFS:
- msg = "No buffer space available";
- break;
- case EISCONN:
- msg = "Transport endpoint is already connected";
- break;
- case ENOTCONN:
- msg = "Transport endpoint is not connected";
- break;
- case ESHUTDOWN:
- msg = "Cannot send after transport endpoint shutdown";
- break;
- case ETOOMANYREFS:
- msg = "Too many references: cannot splice";
- break;
- case ETIMEDOUT:
- msg = "Connection timed out";
- break;
- case ECONNREFUSED:
- msg = "Connection refused";
- break;
- case ELOOP:
- msg = "Too many levels of symbolic links";
- break;
- case EHOSTDOWN:
- msg = "Host is down";
- break;
- case EHOSTUNREACH:
- msg = "No route to host";
- break;
- case EPROCLIM:
- msg = "Too many processes";
- break;
- case EUSERS:
- msg = "Too many users";
- break;
- case EDQUOT:
- msg = "Disk quota exceeded";
- break;
- case ESTALE:
- msg = "Stale NFS file handle";
- break;
- case EREMOTE:
- msg = "Object is remote";
- break;
-# if HAVE_WINSOCK2_H
- /* WSA_INVALID_HANDLE maps to EBADF */
- /* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */
- /* WSA_INVALID_PARAMETER maps to EINVAL */
- case WSA_OPERATION_ABORTED:
- msg = "Overlapped operation aborted";
- break;
- case WSA_IO_INCOMPLETE:
- msg = "Overlapped I/O event object not in signaled state";
- break;
- case WSA_IO_PENDING:
- msg = "Overlapped operations will complete later";
- break;
- /* WSAEINTR maps to EINTR */
- /* WSAEBADF maps to EBADF */
- /* WSAEACCES maps to EACCES */
- /* WSAEFAULT maps to EFAULT */
- /* WSAEINVAL maps to EINVAL */
- /* WSAEMFILE maps to EMFILE */
- /* WSAEWOULDBLOCK maps to EWOULDBLOCK */
- /* WSAEINPROGRESS is EINPROGRESS */
- /* WSAEALREADY is EALREADY */
- /* WSAENOTSOCK is ENOTSOCK */
- /* WSAEDESTADDRREQ is EDESTADDRREQ */
- /* WSAEMSGSIZE is EMSGSIZE */
- /* WSAEPROTOTYPE is EPROTOTYPE */
- /* WSAENOPROTOOPT is ENOPROTOOPT */
- /* WSAEPROTONOSUPPORT is EPROTONOSUPPORT */
- /* WSAESOCKTNOSUPPORT is ESOCKTNOSUPPORT */
- /* WSAEOPNOTSUPP is EOPNOTSUPP */
- /* WSAEPFNOSUPPORT is EPFNOSUPPORT */
- /* WSAEAFNOSUPPORT is EAFNOSUPPORT */
- /* WSAEADDRINUSE is EADDRINUSE */
- /* WSAEADDRNOTAVAIL is EADDRNOTAVAIL */
- /* WSAENETDOWN is ENETDOWN */
- /* WSAENETUNREACH is ENETUNREACH */
- /* WSAENETRESET is ENETRESET */
- /* WSAECONNABORTED is ECONNABORTED */
- /* WSAECONNRESET is ECONNRESET */
- /* WSAENOBUFS is ENOBUFS */
- /* WSAEISCONN is EISCONN */
- /* WSAENOTCONN is ENOTCONN */
- /* WSAESHUTDOWN is ESHUTDOWN */
- /* WSAETOOMANYREFS is ETOOMANYREFS */
- /* WSAETIMEDOUT is ETIMEDOUT */
- /* WSAECONNREFUSED is ECONNREFUSED */
- /* WSAELOOP is ELOOP */
- /* WSAENAMETOOLONG maps to ENAMETOOLONG */
- /* WSAEHOSTDOWN is EHOSTDOWN */
- /* WSAEHOSTUNREACH is EHOSTUNREACH */
- /* WSAENOTEMPTY maps to ENOTEMPTY */
- /* WSAEPROCLIM is EPROCLIM */
- /* WSAEUSERS is EUSERS */
- /* WSAEDQUOT is EDQUOT */
- /* WSAESTALE is ESTALE */
- /* WSAEREMOTE is EREMOTE */
- case WSASYSNOTREADY:
- msg = "Network subsystem is unavailable";
- break;
- case WSAVERNOTSUPPORTED:
- msg = "Winsock.dll version out of range";
- break;
- case WSANOTINITIALISED:
- msg = "Successful WSAStartup not yet performed";
- break;
- case WSAEDISCON:
- msg = "Graceful shutdown in progress";
- break;
- case WSAENOMORE: case WSA_E_NO_MORE:
- msg = "No more results";
- break;
- case WSAECANCELLED: case WSA_E_CANCELLED:
- msg = "Call was canceled";
- break;
- case WSAEINVALIDPROCTABLE:
- msg = "Procedure call table is invalid";
- break;
- case WSAEINVALIDPROVIDER:
- msg = "Service provider is invalid";
- break;
- case WSAEPROVIDERFAILEDINIT:
- msg = "Service provider failed to initialize";
- break;
- case WSASYSCALLFAILURE:
- msg = "System call failure";
- break;
- case WSASERVICE_NOT_FOUND:
- msg = "Service not found";
- break;
- case WSATYPE_NOT_FOUND:
- msg = "Class type not found";
- break;
- case WSAEREFUSED:
- msg = "Database query was refused";
- break;
- case WSAHOST_NOT_FOUND:
- msg = "Host not found";
- break;
- case WSATRY_AGAIN:
- msg = "Nonauthoritative host not found";
- break;
- case WSANO_RECOVERY:
- msg = "Nonrecoverable error";
- break;
- case WSANO_DATA:
- msg = "Valid name, no data record of requested type";
- break;
- /* WSA_QOS_* omitted */
-# endif
-# endif
-
-# if GNULIB_defined_ENOMSG
- case ENOMSG:
- msg = "No message of desired type";
- break;
-# endif
-
-# if GNULIB_defined_EIDRM
- case EIDRM:
- msg = "Identifier removed";
- break;
-# endif
-
-# if GNULIB_defined_ENOLINK
- case ENOLINK:
- msg = "Link has been severed";
- break;
-# endif
-
-# if GNULIB_defined_EPROTO
- case EPROTO:
- msg = "Protocol error";
- break;
-# endif
-
-# if GNULIB_defined_EMULTIHOP
- case EMULTIHOP:
- msg = "Multihop attempted";
- break;
-# endif
-
-# if GNULIB_defined_EBADMSG
- case EBADMSG:
- msg = "Bad message";
- break;
-# endif
-
-# if GNULIB_defined_EOVERFLOW
- case EOVERFLOW:
- msg = "Value too large for defined data type";
- break;
-# endif
-
-# if GNULIB_defined_ENOTSUP
- case ENOTSUP:
- msg = "Not supported";
- break;
-# endif
-
-# if GNULIB_defined_ESTALE
- case ESTALE:
- msg = "Stale NFS file handle";
- break;
-# endif
-
-# if GNULIB_defined_EDQUOT
- case EDQUOT:
- msg = "Disk quota exceeded";
- break;
-# endif
-
-# if GNULIB_defined_ECANCELED
- case ECANCELED:
- msg = "Operation canceled";
- break;
-# endif
- }
+ static char buf[STACKBUF_LEN];
+ size_t len;
+ /* Cast away const, due to the historical signature of strerror;
+ callers should not be modifying the string. */
+ const char *msg = strerror_override (n);
if (msg)
return (char *) msg;
- {
- char *result = strerror (n);
+ msg = strerror (n);
- if (result == NULL || result[0] == '\0')
- {
- static char const fmt[] = "Unknown error (%d)";
- static char msg_buf[sizeof fmt + INT_STRLEN_BOUND (n)];
- sprintf (msg_buf, fmt, n);
- return msg_buf;
- }
+ /* Our strerror_r implementation might use the system's strerror
+ buffer, so all other clients of strerror have to see the error
+ copied into a buffer that we manage. This is not thread-safe,
+ even if the system strerror is, but portable programs shouldn't
+ be using strerror if they care about thread-safety. */
+ if (!msg || !*msg)
+ {
+ static char const fmt[] = "Unknown error %d";
+ verify (sizeof buf >= sizeof (fmt) + INT_STRLEN_BOUND (n));
+ sprintf (buf, fmt, n);
+ errno = EINVAL;
+ return buf;
+ }
- return result;
- }
-}
+ /* Fix STACKBUF_LEN if this ever aborts. */
+ len = strlen (msg);
+ if (sizeof buf <= len)
+ abort ();
-#endif
+ return memcpy (buf, msg, len + 1);
+}
diff --git a/lib/string.in.h b/lib/string.in.h
index 336e246..d7a6c9c 100644
--- a/lib/string.in.h
+++ b/lib/string.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <string.h>.
- Copyright (C) 1995-1996, 2001-2011 Free Software Foundation, Inc.
+ Copyright (C) 1995-1996, 2001-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -13,10 +13,9 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
-#ifndef _GL_STRING_H
+#ifndef _@GUARD_PREFIX@_STRING_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
@@ -26,8 +25,8 @@
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_STRING_H@
-#ifndef _GL_STRING_H
-#define _GL_STRING_H
+#ifndef _@GUARD_PREFIX@_STRING_H
+#define _@GUARD_PREFIX@_STRING_H
/* NetBSD 5.0 mis-defines NULL. */
#include <stddef.h>
@@ -59,6 +58,36 @@
/* The definition of _GL_WARN_ON_USE is copied here. */
+/* Find the index of the least-significant set bit. */
+#if @GNULIB_FFSL@
+# if !@HAVE_FFSL@
+_GL_FUNCDECL_SYS (ffsl, int, (long int i));
+# endif
+_GL_CXXALIAS_SYS (ffsl, int, (long int i));
+_GL_CXXALIASWARN (ffsl);
+#elif defined GNULIB_POSIXCHECK
+# undef ffsl
+# if HAVE_RAW_DECL_FFSL
+_GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module");
+# endif
+#endif
+
+
+/* Find the index of the least-significant set bit. */
+#if @GNULIB_FFSLL@
+# if !@HAVE_FFSLL@
+_GL_FUNCDECL_SYS (ffsll, int, (long long int i));
+# endif
+_GL_CXXALIAS_SYS (ffsll, int, (long long int i));
+_GL_CXXALIASWARN (ffsll);
+#elif defined GNULIB_POSIXCHECK
+# undef ffsll
+# if HAVE_RAW_DECL_FFSLL
+_GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module");
+# endif
+#endif
+
+
/* Return the first instance of C within N bytes of S, or NULL. */
#if @GNULIB_MEMCHR@
# if @REPLACE_MEMCHR@
@@ -277,17 +306,28 @@ _GL_WARN_ON_USE (strchr, "strchr cannot work correctly on character strings "
/* Find the first occurrence of C in S or the final NUL byte. */
#if @GNULIB_STRCHRNUL@
-# if ! @HAVE_STRCHRNUL@
+# if @REPLACE_STRCHRNUL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define strchrnul rpl_strchrnul
+# endif
+_GL_FUNCDECL_RPL (strchrnul, char *, (const char *__s, int __c_in)
+ _GL_ATTRIBUTE_PURE
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strchrnul, char *,
+ (const char *str, int ch));
+# else
+# if ! @HAVE_STRCHRNUL@
_GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int __c_in)
_GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1)));
-# endif
+# endif
/* On some systems, this function is defined as an overloaded function:
extern "C++" { const char * std::strchrnul (const char *, int); }
extern "C++" { char * std::strchrnul (char *, int); } */
_GL_CXXALIAS_SYS_CAST2 (strchrnul,
char *, (char const *__s, int __c_in),
char const *, (char const *__s, int __c_in));
+# endif
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in));
@@ -684,10 +724,14 @@ _GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - "
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define mbslen rpl_mbslen
# endif
-_GL_FUNCDECL_RPL (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1)));
+_GL_FUNCDECL_RPL (mbslen, size_t, (const char *string)
+ _GL_ATTRIBUTE_PURE
+ _GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (mbslen, size_t, (const char *string));
# else
-_GL_FUNCDECL_SYS (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1)));
+_GL_FUNCDECL_SYS (mbslen, size_t, (const char *string)
+ _GL_ATTRIBUTE_PURE
+ _GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_SYS (mbslen, size_t, (const char *string));
# endif
_GL_CXXALIASWARN (mbslen);
@@ -697,6 +741,7 @@ _GL_CXXALIASWARN (mbslen);
/* Return the number of multibyte characters in the character string starting
at STRING and ending at STRING + LEN. */
_GL_EXTERN_C size_t mbsnlen (const char *string, size_t len)
+ _GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1));
#endif
@@ -710,10 +755,12 @@ _GL_EXTERN_C size_t mbsnlen (const char *string, size_t len)
# define mbschr rpl_mbschr /* avoid collision with HP-UX function */
# endif
_GL_FUNCDECL_RPL (mbschr, char *, (const char *string, int c)
+ _GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (mbschr, char *, (const char *string, int c));
# else
_GL_FUNCDECL_SYS (mbschr, char *, (const char *string, int c)
+ _GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_SYS (mbschr, char *, (const char *string, int c));
# endif
@@ -725,15 +772,17 @@ _GL_CXXALIASWARN (mbschr);
and return a pointer to it. Return NULL if C is not found in STRING.
Unlike strrchr(), this function works correctly in multibyte locales with
encodings such as GB18030. */
-# if defined __hpux
+# if defined __hpux || defined __INTERIX
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# define mbsrchr rpl_mbsrchr /* avoid collision with HP-UX function */
+# define mbsrchr rpl_mbsrchr /* avoid collision with system function */
# endif
_GL_FUNCDECL_RPL (mbsrchr, char *, (const char *string, int c)
+ _GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (mbsrchr, char *, (const char *string, int c));
# else
_GL_FUNCDECL_SYS (mbsrchr, char *, (const char *string, int c)
+ _GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_SYS (mbsrchr, char *, (const char *string, int c));
# endif
@@ -746,6 +795,7 @@ _GL_CXXALIASWARN (mbsrchr);
Unlike strstr(), this function works correctly in multibyte locales with
encodings different from UTF-8. */
_GL_EXTERN_C char * mbsstr (const char *haystack, const char *needle)
+ _GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1, 2));
#endif
@@ -757,6 +807,7 @@ _GL_EXTERN_C char * mbsstr (const char *haystack, const char *needle)
different lengths!
Unlike strcasecmp(), this function works correctly in multibyte locales. */
_GL_EXTERN_C int mbscasecmp (const char *s1, const char *s2)
+ _GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1, 2));
#endif
@@ -771,6 +822,7 @@ _GL_EXTERN_C int mbscasecmp (const char *s1, const char *s2)
Unlike strncasecmp(), this function works correctly in multibyte locales.
But beware that N is not a byte count but a character count! */
_GL_EXTERN_C int mbsncasecmp (const char *s1, const char *s2, size_t n)
+ _GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1, 2));
#endif
@@ -784,6 +836,7 @@ _GL_EXTERN_C int mbsncasecmp (const char *s1, const char *s2, size_t n)
Unlike strncasecmp(), this function works correctly in multibyte
locales. */
_GL_EXTERN_C char * mbspcasecmp (const char *string, const char *prefix)
+ _GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1, 2));
#endif
@@ -794,6 +847,7 @@ _GL_EXTERN_C char * mbspcasecmp (const char *string, const char *prefix)
strlen (haystack) < strlen (needle) !
Unlike strcasestr(), this function works correctly in multibyte locales. */
_GL_EXTERN_C char * mbscasestr (const char *haystack, const char *needle)
+ _GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1, 2));
#endif
@@ -804,6 +858,7 @@ _GL_EXTERN_C char * mbscasestr (const char *haystack, const char *needle)
if none exists.
Unlike strcspn(), this function works correctly in multibyte locales. */
_GL_EXTERN_C size_t mbscspn (const char *string, const char *accept)
+ _GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1, 2));
#endif
@@ -817,10 +872,12 @@ _GL_EXTERN_C size_t mbscspn (const char *string, const char *accept)
# define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */
# endif
_GL_FUNCDECL_RPL (mbspbrk, char *, (const char *string, const char *accept)
+ _GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1, 2)));
_GL_CXXALIAS_RPL (mbspbrk, char *, (const char *string, const char *accept));
# else
_GL_FUNCDECL_SYS (mbspbrk, char *, (const char *string, const char *accept)
+ _GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1, 2)));
_GL_CXXALIAS_SYS (mbspbrk, char *, (const char *string, const char *accept));
# endif
@@ -834,6 +891,7 @@ _GL_CXXALIASWARN (mbspbrk);
if none exists.
Unlike strspn(), this function works correctly in multibyte locales. */
_GL_EXTERN_C size_t mbsspn (const char *string, const char *reject)
+ _GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1, 2));
#endif
@@ -953,6 +1011,7 @@ _GL_WARN_ON_USE (strsignal, "strsignal is unportable - "
#if @GNULIB_STRVERSCMP@
# if !@HAVE_STRVERSCMP@
_GL_FUNCDECL_SYS (strverscmp, int, (const char *, const char *)
+ _GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1, 2)));
# endif
_GL_CXXALIAS_SYS (strverscmp, int, (const char *, const char *));
@@ -966,5 +1025,5 @@ _GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - "
#endif
-#endif /* _GL_STRING_H */
-#endif /* _GL_STRING_H */
+#endif /* _@GUARD_PREFIX@_STRING_H */
+#endif /* _@GUARD_PREFIX@_STRING_H */
diff --git a/lib/stripslash.c b/lib/stripslash.c
index 1212440..0e452a9 100644
--- a/lib/stripslash.c
+++ b/lib/stripslash.c
@@ -1,6 +1,6 @@
/* stripslash.c -- remove redundant trailing slashes from a file name
- Copyright (C) 1990, 2001, 2003-2006, 2009-2011 Free Software Foundation,
+ Copyright (C) 1990, 2001, 2003-2006, 2009-2013 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
@@ -35,7 +35,7 @@ strip_trailing_slashes (char *file)
bool had_slash;
/* last_component returns "" for file system roots, but we need to turn
- `///' into `/'. */
+ "///" into "/". */
if (! *base)
base = file;
base_lim = base + base_len (base);
diff --git a/lib/strndup.c b/lib/strndup.c
index 4a3bece..e60268b 100644
--- a/lib/strndup.c
+++ b/lib/strndup.c
@@ -1,6 +1,6 @@
/* A replacement function, for systems that lack strndup.
- Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2011 Free Software
+ Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2013 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
@@ -14,8 +14,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/strnlen.c b/lib/strnlen.c
index 3cefa97..57fdfe7 100644
--- a/lib/strnlen.c
+++ b/lib/strnlen.c
@@ -1,5 +1,5 @@
/* Find the length of STRING, but scan at most MAXLEN characters.
- Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2009-2013 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/strsignal.c b/lib/strsignal.c
index 5a415ca..12cd881 100644
--- a/lib/strsignal.c
+++ b/lib/strsignal.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994-2002, 2005, 2008-2011 Free Software Foundation,
+/* Copyright (C) 1991, 1994-2002, 2005, 2008-2013 Free Software Foundation,
Inc.
This file is part of the GNU C Library.
@@ -19,10 +19,12 @@
# include <config.h>
#endif
+/* Specification. */
+#include <string.h>
+
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#ifdef _LIBC
# include <libintl.h>
@@ -54,7 +56,9 @@ extern const char *const _sys_siglist_internal[] attribute_hidden;
#else /* !_LIBC */
/* NetBSD declares sys_siglist in unistd.h. */
-# include <unistd.h>
+# if HAVE_UNISTD_H
+# include <unistd.h>
+# endif
# define INTUSE(x) (x)
diff --git a/lib/strstr.c b/lib/strstr.c
index 433cad6..b91acec 100644
--- a/lib/strstr.c
+++ b/lib/strstr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2011 Free Software
+/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2013 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ with this program; if not, see <http://www.gnu.org/licenses/>. */
/* This particular implementation was written by Eric Blake, 2008. */
diff --git a/lib/strtod.c b/lib/strtod.c
index bf6955a..76e37d6 100644
--- a/lib/strtod.c
+++ b/lib/strtod.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1992, 1997, 1999, 2003, 2006, 2008-2011 Free Software
+/* Copyright (C) 1991-1992, 1997, 1999, 2003, 2006, 2008-2013 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@@ -31,9 +31,6 @@
#ifndef HAVE_LDEXP_IN_LIBC
#define HAVE_LDEXP_IN_LIBC 0
#endif
-#ifndef HAVE_RAW_DECL_STRTOD
-#define HAVE_RAW_DECL_STRTOD 0
-#endif
/* Return true if C is a space in the current locale, avoiding
problems with signed char and isspace. */
@@ -149,7 +146,7 @@ parse_number (const char *nptr,
else
{
/* The value of the digit doesn't matter, since we have already
- gotten as many digits as can be represented in a `double'.
+ gotten as many digits as can be represented in a 'double'.
This doesn't necessarily mean the result will overflow.
The exponent may reduce it to within range.
@@ -193,7 +190,7 @@ static double underlying_strtod (const char *, char **);
/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
ICC 10.0 has a bug when optimizing the expression -zero.
The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
- to PowerPC on MacOS X 10.5. */
+ to PowerPC on Mac OS X 10.5. */
#if defined __hpux || defined __sgi || defined __ICC
static double
compute_minus_zero (void)
@@ -344,24 +341,11 @@ strtod (const char *nptr, char **endptr)
return negative ? -num : num;
}
-/* The "underlying" strtod implementation. This must be defined
+/* The underlying strtod implementation. This must be defined
after strtod because it #undefs strtod. */
static double
underlying_strtod (const char *nptr, char **endptr)
{
- if (HAVE_RAW_DECL_STRTOD)
- {
- /* Prefer the native strtod if available. Usually it should
- work and it should give more-accurate results than our
- approximation. */
- #undef strtod
- return strtod (nptr, endptr);
- }
- else
- {
- /* Approximate strtod well enough for this module. There's no
- need to handle anything but finite unsigned decimal
- numbers with nonnull ENDPTR. */
- return parse_number (nptr, 10, 10, 1, 'e', endptr);
- }
+#undef strtod
+ return strtod (nptr, endptr);
}
diff --git a/lib/strtol.c b/lib/strtol.c
deleted file mode 100644
index b6a761e..0000000
--- a/lib/strtol.c
+++ /dev/null
@@ -1,434 +0,0 @@
-/* Convert string representation of a number into an integer value.
-
- Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2011 Free Software
- Foundation, Inc.
-
- NOTE: The canonical source of this file is maintained with the GNU C
- Library. Bugs can be reported to bug-glibc@gnu.org.
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 3 of the License, or any
- later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-#ifdef _LIBC
-# define USE_NUMBER_GROUPING
-#else
-# include <config.h>
-#endif
-
-#include <ctype.h>
-#include <errno.h>
-#ifndef __set_errno
-# define __set_errno(Val) errno = (Val)
-#endif
-
-#include <limits.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-
-#ifdef USE_NUMBER_GROUPING
-# include "../locale/localeinfo.h"
-#endif
-
-/* Nonzero if we are defining `strtoul' or `strtoull', operating on
- unsigned integers. */
-#ifndef UNSIGNED
-# define UNSIGNED 0
-# define INT LONG int
-#else
-# define INT unsigned LONG int
-#endif
-
-/* Determine the name. */
-#ifdef USE_IN_EXTENDED_LOCALE_MODEL
-# if UNSIGNED
-# ifdef USE_WIDE_CHAR
-# ifdef QUAD
-# define strtol __wcstoull_l
-# else
-# define strtol __wcstoul_l
-# endif
-# else
-# ifdef QUAD
-# define strtol __strtoull_l
-# else
-# define strtol __strtoul_l
-# endif
-# endif
-# else
-# ifdef USE_WIDE_CHAR
-# ifdef QUAD
-# define strtol __wcstoll_l
-# else
-# define strtol __wcstol_l
-# endif
-# else
-# ifdef QUAD
-# define strtol __strtoll_l
-# else
-# define strtol __strtol_l
-# endif
-# endif
-# endif
-#else
-# if UNSIGNED
-# ifdef USE_WIDE_CHAR
-# ifdef QUAD
-# define strtol wcstoull
-# else
-# define strtol wcstoul
-# endif
-# else
-# ifdef QUAD
-# define strtol strtoull
-# else
-# define strtol strtoul
-# endif
-# endif
-# else
-# ifdef USE_WIDE_CHAR
-# ifdef QUAD
-# define strtol wcstoll
-# else
-# define strtol wcstol
-# endif
-# else
-# ifdef QUAD
-# define strtol strtoll
-# endif
-# endif
-# endif
-#endif
-
-/* If QUAD is defined, we are defining `strtoll' or `strtoull',
- operating on `long long int's. */
-#ifdef QUAD
-# define LONG long long
-# define STRTOL_LONG_MIN LLONG_MIN
-# define STRTOL_LONG_MAX LLONG_MAX
-# define STRTOL_ULONG_MAX ULLONG_MAX
-
-/* The extra casts in the following macros work around compiler bugs,
- e.g., in Cray C 5.0.3.0. */
-
-/* True if negative values of the signed integer type T use two's
- complement, ones' complement, or signed magnitude representation,
- respectively. Much GNU code assumes two's complement, but some
- people like to be portable to all possible C hosts. */
-# define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1)
-# define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0)
-# define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1)
-
-/* True if the arithmetic type T is signed. */
-# define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
-
-/* The maximum and minimum values for the integer type T. These
- macros have undefined behavior if T is signed and has padding bits.
- If this is a problem for you, please let us know how to fix it for
- your host. */
-# define TYPE_MINIMUM(t) \
- ((t) (! TYPE_SIGNED (t) \
- ? (t) 0 \
- : TYPE_SIGNED_MAGNITUDE (t) \
- ? ~ (t) 0 \
- : ~ TYPE_MAXIMUM (t)))
-# define TYPE_MAXIMUM(t) \
- ((t) (! TYPE_SIGNED (t) \
- ? (t) -1 \
- : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
-
-# ifndef ULLONG_MAX
-# define ULLONG_MAX TYPE_MAXIMUM (unsigned long long)
-# endif
-# ifndef LLONG_MAX
-# define LLONG_MAX TYPE_MAXIMUM (long long int)
-# endif
-# ifndef LLONG_MIN
-# define LLONG_MIN TYPE_MINIMUM (long long int)
-# endif
-
-# if __GNUC__ == 2 && __GNUC_MINOR__ < 7
- /* Work around gcc bug with using this constant. */
- static const unsigned long long int maxquad = ULLONG_MAX;
-# undef STRTOL_ULONG_MAX
-# define STRTOL_ULONG_MAX maxquad
-# endif
-#else
-# define LONG long
-# define STRTOL_LONG_MIN LONG_MIN
-# define STRTOL_LONG_MAX LONG_MAX
-# define STRTOL_ULONG_MAX ULONG_MAX
-#endif
-
-
-/* We use this code also for the extended locale handling where the
- function gets as an additional argument the locale which has to be
- used. To access the values we have to redefine the _NL_CURRENT
- macro. */
-#ifdef USE_IN_EXTENDED_LOCALE_MODEL
-# undef _NL_CURRENT
-# define _NL_CURRENT(category, item) \
- (current->values[_NL_ITEM_INDEX (item)].string)
-# define LOCALE_PARAM , loc
-# define LOCALE_PARAM_PROTO , __locale_t loc
-#else
-# define LOCALE_PARAM
-# define LOCALE_PARAM_PROTO
-#endif
-
-#include <wchar.h>
-
-#ifdef USE_WIDE_CHAR
-# include <wctype.h>
-# define L_(Ch) L##Ch
-# define UCHAR_TYPE wint_t
-# define STRING_TYPE wchar_t
-# ifdef USE_IN_EXTENDED_LOCALE_MODEL
-# define ISSPACE(Ch) __iswspace_l ((Ch), loc)
-# define ISALPHA(Ch) __iswalpha_l ((Ch), loc)
-# define TOUPPER(Ch) __towupper_l ((Ch), loc)
-# else
-# define ISSPACE(Ch) iswspace (Ch)
-# define ISALPHA(Ch) iswalpha (Ch)
-# define TOUPPER(Ch) towupper (Ch)
-# endif
-#else
-# define L_(Ch) Ch
-# define UCHAR_TYPE unsigned char
-# define STRING_TYPE char
-# ifdef USE_IN_EXTENDED_LOCALE_MODEL
-# define ISSPACE(Ch) __isspace_l ((Ch), loc)
-# define ISALPHA(Ch) __isalpha_l ((Ch), loc)
-# define TOUPPER(Ch) __toupper_l ((Ch), loc)
-# else
-# define ISSPACE(Ch) isspace (Ch)
-# define ISALPHA(Ch) isalpha (Ch)
-# define TOUPPER(Ch) toupper (Ch)
-# endif
-#endif
-
-#define INTERNAL(X) INTERNAL1(X)
-#define INTERNAL1(X) __##X##_internal
-#define WEAKNAME(X) WEAKNAME1(X)
-
-#ifdef USE_NUMBER_GROUPING
-/* This file defines a function to check for correct grouping. */
-# include "grouping.h"
-#endif
-
-
-
-/* Convert NPTR to an `unsigned long int' or `long int' in base BASE.
- If BASE is 0 the base is determined by the presence of a leading
- zero, indicating octal or a leading "0x" or "0X", indicating hexadecimal.
- If BASE is < 2 or > 36, it is reset to 10.
- If ENDPTR is not NULL, a pointer to the character after the last
- one converted is stored in *ENDPTR. */
-
-INT
-INTERNAL (strtol) (const STRING_TYPE *nptr, STRING_TYPE **endptr,
- int base, int group LOCALE_PARAM_PROTO)
-{
- int negative;
- register unsigned LONG int cutoff;
- register unsigned int cutlim;
- register unsigned LONG int i;
- register const STRING_TYPE *s;
- register UCHAR_TYPE c;
- const STRING_TYPE *save, *end;
- int overflow;
-
-#ifdef USE_NUMBER_GROUPING
-# ifdef USE_IN_EXTENDED_LOCALE_MODEL
- struct locale_data *current = loc->__locales[LC_NUMERIC];
-# endif
- /* The thousands character of the current locale. */
- wchar_t thousands = L'\0';
- /* The numeric grouping specification of the current locale,
- in the format described in <locale.h>. */
- const char *grouping;
-
- if (group)
- {
- grouping = _NL_CURRENT (LC_NUMERIC, GROUPING);
- if (*grouping <= 0 || *grouping == CHAR_MAX)
- grouping = NULL;
- else
- {
- /* Figure out the thousands separator character. */
-# if defined _LIBC || defined _HAVE_BTOWC
- thousands = __btowc (*_NL_CURRENT (LC_NUMERIC, THOUSANDS_SEP));
- if (thousands == WEOF)
- thousands = L'\0';
-# endif
- if (thousands == L'\0')
- grouping = NULL;
- }
- }
- else
- grouping = NULL;
-#endif
-
- if (base < 0 || base == 1 || base > 36)
- {
- __set_errno (EINVAL);
- return 0;
- }
-
- save = s = nptr;
-
- /* Skip white space. */
- while (ISSPACE (*s))
- ++s;
- if (*s == L_('\0'))
- goto noconv;
-
- /* Check for a sign. */
- if (*s == L_('-'))
- {
- negative = 1;
- ++s;
- }
- else if (*s == L_('+'))
- {
- negative = 0;
- ++s;
- }
- else
- negative = 0;
-
- /* Recognize number prefix and if BASE is zero, figure it out ourselves. */
- if (*s == L_('0'))
- {
- if ((base == 0 || base == 16) && TOUPPER (s[1]) == L_('X'))
- {
- s += 2;
- base = 16;
- }
- else if (base == 0)
- base = 8;
- }
- else if (base == 0)
- base = 10;
-
- /* Save the pointer so we can check later if anything happened. */
- save = s;
-
-#ifdef USE_NUMBER_GROUPING
- if (group)
- {
- /* Find the end of the digit string and check its grouping. */
- end = s;
- for (c = *end; c != L_('\0'); c = *++end)
- if ((wchar_t) c != thousands
- && ((wchar_t) c < L_('0') || (wchar_t) c > L_('9'))
- && (!ISALPHA (c) || (int) (TOUPPER (c) - L_('A') + 10) >= base))
- break;
- if (*s == thousands)
- end = s;
- else
- end = correctly_grouped_prefix (s, end, thousands, grouping);
- }
- else
-#endif
- end = NULL;
-
- cutoff = STRTOL_ULONG_MAX / (unsigned LONG int) base;
- cutlim = STRTOL_ULONG_MAX % (unsigned LONG int) base;
-
- overflow = 0;
- i = 0;
- for (c = *s; c != L_('\0'); c = *++s)
- {
- if (s == end)
- break;
- if (c >= L_('0') && c <= L_('9'))
- c -= L_('0');
- else if (ISALPHA (c))
- c = TOUPPER (c) - L_('A') + 10;
- else
- break;
- if ((int) c >= base)
- break;
- /* Check for overflow. */
- if (i > cutoff || (i == cutoff && c > cutlim))
- overflow = 1;
- else
- {
- i *= (unsigned LONG int) base;
- i += c;
- }
- }
-
- /* Check if anything actually happened. */
- if (s == save)
- goto noconv;
-
- /* Store in ENDPTR the address of one character
- past the last character we converted. */
- if (endptr != NULL)
- *endptr = (STRING_TYPE *) s;
-
-#if !UNSIGNED
- /* Check for a value that is within the range of
- `unsigned LONG int', but outside the range of `LONG int'. */
- if (overflow == 0
- && i > (negative
- ? -((unsigned LONG int) (STRTOL_LONG_MIN + 1)) + 1
- : (unsigned LONG int) STRTOL_LONG_MAX))
- overflow = 1;
-#endif
-
- if (overflow)
- {
- __set_errno (ERANGE);
-#if UNSIGNED
- return STRTOL_ULONG_MAX;
-#else
- return negative ? STRTOL_LONG_MIN : STRTOL_LONG_MAX;
-#endif
- }
-
- /* Return the result of the appropriate sign. */
- return negative ? -i : i;
-
-noconv:
- /* We must handle a special case here: the base is 0 or 16 and the
- first two characters are '0' and 'x', but the rest are no
- hexadecimal digits. This is no error case. We return 0 and
- ENDPTR points to the `x`. */
- if (endptr != NULL)
- {
- if (save - nptr >= 2 && TOUPPER (save[-1]) == L_('X')
- && save[-2] == L_('0'))
- *endptr = (STRING_TYPE *) &save[-1];
- else
- /* There was no number to convert. */
- *endptr = (STRING_TYPE *) nptr;
- }
-
- return 0L;
-}
-
-/* External user entry point. */
-
-
-INT
-#ifdef weak_function
-weak_function
-#endif
-strtol (const STRING_TYPE *nptr, STRING_TYPE **endptr,
- int base LOCALE_PARAM_PROTO)
-{
- return INTERNAL (strtol) (nptr, endptr, base, 0 LOCALE_PARAM);
-}
diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h
index 61cdcc5..acc3694 100644
--- a/lib/sys_stat.in.h
+++ b/lib/sys_stat.in.h
@@ -1,5 +1,5 @@
/* Provide a more complete sys/stat header file.
- Copyright (C) 2005-2011 Free Software Foundation, Inc.
+ Copyright (C) 2005-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
/* Written by Eric Blake, Paul Eggert, and Jim Meyering. */
@@ -34,9 +33,10 @@
#else
/* Normal invocation convention. */
-#ifndef _GL_SYS_STAT_H
+#ifndef _@GUARD_PREFIX@_SYS_STAT_H
-/* Get nlink_t. */
+/* Get nlink_t.
+ May also define off_t to a 64-bit type on native Windows. */
#include <sys/types.h>
/* Get struct timespec. */
@@ -45,8 +45,8 @@
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@
-#ifndef _GL_SYS_STAT_H
-#define _GL_SYS_STAT_H
+#ifndef _@GUARD_PREFIX@_SYS_STAT_H
+#define _@GUARD_PREFIX@_SYS_STAT_H
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
@@ -55,10 +55,27 @@
/* The definition of _GL_WARN_ON_USE is copied here. */
/* Before doing "#define mkdir rpl_mkdir" below, we need to include all
- headers that may declare mkdir(). */
+ headers that may declare mkdir(). Native Windows platforms declare mkdir
+ in <io.h> and/or <direct.h>, not in <unistd.h>. */
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
# include <io.h> /* mingw32, mingw64 */
-# include <direct.h> /* mingw64 */
+# include <direct.h> /* mingw64, MSVC 9 */
+#endif
+
+/* Native Windows platforms declare umask() in <io.h>. */
+#if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+# include <io.h>
+#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
@@ -133,6 +150,10 @@
# endif
#endif
+#ifndef S_ISMPX /* AIX */
+# define S_ISMPX(m) 0
+#endif
+
#ifndef S_ISNAM /* Xenix */
# ifdef S_IFNAM
# define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM)
@@ -312,16 +333,28 @@ _GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - "
#endif
-#if @REPLACE_FSTAT@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# define fstat rpl_fstat
-# endif
+#if @GNULIB_FSTAT@
+# if @REPLACE_FSTAT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fstat
+# define fstat rpl_fstat
+# endif
_GL_FUNCDECL_RPL (fstat, int, (int fd, struct stat *buf) _GL_ARG_NONNULL ((2)));
_GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf));
-#else
+# else
_GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf));
-#endif
+# endif
_GL_CXXALIASWARN (fstat);
+#elif @WINDOWS_64_BIT_ST_SIZE@
+/* Above, we define stat to _stati64. */
+# define fstat _fstati64
+#elif defined GNULIB_POSIXCHECK
+# undef fstat
+# if HAVE_RAW_DECL_FSTAT
+_GL_WARN_ON_USE (fstat, "fstat has portability problems - "
+ "use gnulib module fstat for portability");
+# endif
+#endif
#if @GNULIB_FSTATAT@
@@ -355,7 +388,11 @@ _GL_WARN_ON_USE (fstatat, "fstatat is not portable - "
#if @GNULIB_FUTIMENS@
-# if @REPLACE_FUTIMENS@
+/* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our futimens
+ implementation relies on futimesat, which on Solaris 10 makes an invocation
+ to futimens that is meant to invoke the libc's futimens(), not gnulib's
+ futimens(). */
+# if @REPLACE_FUTIMENS@ || (!@HAVE_FUTIMENS@ && defined __sun)
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef futimens
# define futimens rpl_futimens
@@ -368,7 +405,9 @@ _GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2]));
# endif
_GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2]));
# endif
+# if @HAVE_FUTIMENS@
_GL_CXXALIASWARN (futimens);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef futimens
# if HAVE_RAW_DECL_FUTIMENS
@@ -462,7 +501,7 @@ _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
# if !GNULIB_defined_rpl_mkdir
-static inline int
+static int
rpl_mkdir (char const *name, mode_t mode)
{
return _mkdir (name);
@@ -589,14 +628,55 @@ _GL_WARN_ON_USE (mknodat, "mknodat is not portable - "
/* We can't use the object-like #define stat rpl_stat, because of
struct stat. This means that rpl_stat will not be used if the user
does (stat)(a,b). Oh well. */
-# undef stat
-# ifdef _LARGE_FILES
+# if defined _AIX && defined stat && defined _LARGE_FILES
/* With _LARGE_FILES defined, AIX (only) defines stat to stat64,
so we have to replace stat64() instead of stat(). */
-# define stat stat64
# undef stat64
# define stat64(name, st) rpl_stat (name, st)
-# else /* !_LARGE_FILES */
+# elif @WINDOWS_64_BIT_ST_SIZE@
+ /* Above, we define stat to _stati64. */
+# if defined __MINGW32__ && defined _stati64
+# ifndef _USE_32BIT_TIME_T
+ /* The system headers define _stati64 to _stat64. */
+# undef _stat64
+# define _stat64(name, st) rpl_stat (name, st)
+# endif
+# elif defined _MSC_VER && defined _stati64
+# ifdef _USE_32BIT_TIME_T
+ /* The system headers define _stati64 to _stat32i64. */
+# undef _stat32i64
+# define _stat32i64(name, st) rpl_stat (name, st)
+# else
+ /* The system headers define _stati64 to _stat64. */
+# undef _stat64
+# define _stat64(name, st) rpl_stat (name, st)
+# endif
+# else
+# undef _stati64
+# define _stati64(name, st) rpl_stat (name, st)
+# endif
+# elif defined __MINGW32__ && defined stat
+# ifdef _USE_32BIT_TIME_T
+ /* The system headers define stat to _stat32i64. */
+# undef _stat32i64
+# define _stat32i64(name, st) rpl_stat (name, st)
+# else
+ /* The system headers define stat to _stat64. */
+# undef _stat64
+# define _stat64(name, st) rpl_stat (name, st)
+# endif
+# elif defined _MSC_VER && defined stat
+# ifdef _USE_32BIT_TIME_T
+ /* The system headers define stat to _stat32. */
+# undef _stat32
+# define _stat32(name, st) rpl_stat (name, st)
+# else
+ /* The system headers define stat to _stat64i32. */
+# undef _stat64i32
+# define _stat64i32(name, st) rpl_stat (name, st)
+# endif
+# else /* !(_AIX ||__MINGW32__ || _MSC_VER) */
+# undef stat
# define stat(name, st) rpl_stat (name, st)
# endif /* !_LARGE_FILES */
_GL_EXTERN_C int stat (const char *name, struct stat *buf)
@@ -612,7 +692,11 @@ _GL_WARN_ON_USE (stat, "stat is unportable - "
#if @GNULIB_UTIMENSAT@
-# if @REPLACE_UTIMENSAT@
+/* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our utimensat
+ implementation relies on futimesat, which on Solaris 10 makes an invocation
+ to utimensat that is meant to invoke the libc's utimensat(), not gnulib's
+ utimensat(). */
+# if @REPLACE_UTIMENSAT@ || (!@HAVE_UTIMENSAT@ && defined __sun)
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef utimensat
# define utimensat rpl_utimensat
@@ -631,7 +715,9 @@ _GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name,
_GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name,
struct timespec const times[2], int flag));
# endif
+# if @HAVE_UTIMENSAT@
_GL_CXXALIASWARN (utimensat);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef utimensat
# if HAVE_RAW_DECL_UTIMENSAT
@@ -641,6 +727,6 @@ _GL_WARN_ON_USE (utimensat, "utimensat is not portable - "
#endif
-#endif /* _GL_SYS_STAT_H */
-#endif /* _GL_SYS_STAT_H */
+#endif /* _@GUARD_PREFIX@_SYS_STAT_H */
+#endif /* _@GUARD_PREFIX@_SYS_STAT_H */
#endif
diff --git a/lib/sys_time.in.h b/lib/sys_time.in.h
index d4319d2..f721580 100644
--- a/lib/sys_time.in.h
+++ b/lib/sys_time.in.h
@@ -1,6 +1,6 @@
/* Provide a more complete sys/time.h.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -13,32 +13,47 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
/* Written by Paul Eggert. */
+#ifndef _@GUARD_PREFIX@_SYS_TIME_H
+
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
-#if defined _GL_SYS_TIME_H
+/* On Cygwin and on many BSDish systems, <sys/time.h> includes itself
+ recursively via <sys/select.h>.
+ Simply delegate to the system's header in this case; it is a no-op.
+ Without this extra ifdef, the C++ gettimeofday declaration below
+ would be a forward declaration in gnulib's nested <sys/time.h>. */
+#if defined _CYGWIN_SYS_TIME_H || defined _SYS_TIME_H || defined _SYS_TIME_H_
+# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
+#else
-/* Simply delegate to the system's header, without adding anything. */
-# if @HAVE_SYS_TIME_H@
-# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
-# endif
+/* The include_next requires a split double-inclusion guard. */
+#if @HAVE_SYS_TIME_H@
+# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
+#endif
-#else
+#ifndef _@GUARD_PREFIX@_SYS_TIME_H
+#define _@GUARD_PREFIX@_SYS_TIME_H
-# define _GL_SYS_TIME_H
+#if ! @HAVE_SYS_TIME_H@
+# include <time.h>
+#endif
-# if @HAVE_SYS_TIME_H@
-# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
-# else
-# include <time.h>
-# endif
+/* On native Windows with MSVC, get the 'struct timeval' type.
+ Also, on native Windows with a 64-bit time_t, where we are overriding the
+ 'struct timeval' type, get all declarations of system functions whose
+ signature contains 'struct timeval'. */
+#if (defined _MSC_VER || @REPLACE_STRUCT_TIMEVAL@) && @HAVE_WINSOCK2_H@ && !defined _GL_INCLUDING_WINSOCK2_H
+# define _GL_INCLUDING_WINSOCK2_H
+# include <winsock2.h>
+# undef _GL_INCLUDING_WINSOCK2_H
+#endif
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
@@ -46,56 +61,153 @@
/* The definition of _GL_WARN_ON_USE is copied here. */
-# ifdef __cplusplus
+#ifdef __cplusplus
extern "C" {
-# endif
+#endif
+
+#if !@HAVE_STRUCT_TIMEVAL@ || @REPLACE_STRUCT_TIMEVAL@
-# if ! @HAVE_STRUCT_TIMEVAL@
+# if @REPLACE_STRUCT_TIMEVAL@
+# define timeval rpl_timeval
+# endif
-# if !GNULIB_defined_struct_timeval
+# if !GNULIB_defined_struct_timeval
struct timeval
{
time_t tv_sec;
long int tv_usec;
};
-# define GNULIB_defined_struct_timeval 1
-# endif
-
+# define GNULIB_defined_struct_timeval 1
# endif
-# ifdef __cplusplus
+#endif
+
+#ifdef __cplusplus
}
-# endif
+#endif
-# if @GNULIB_GETTIMEOFDAY@
-# if @REPLACE_GETTIMEOFDAY@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef gettimeofday
-# define gettimeofday rpl_gettimeofday
-# endif
+#if @GNULIB_GETTIMEOFDAY@
+# if @REPLACE_GETTIMEOFDAY@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef gettimeofday
+# define gettimeofday rpl_gettimeofday
+# endif
_GL_FUNCDECL_RPL (gettimeofday, int,
(struct timeval *restrict, void *restrict)
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (gettimeofday, int,
(struct timeval *restrict, void *restrict));
-# else
-# if !@HAVE_GETTIMEOFDAY@
+# else
+# if !@HAVE_GETTIMEOFDAY@
_GL_FUNCDECL_SYS (gettimeofday, int,
(struct timeval *restrict, void *restrict)
_GL_ARG_NONNULL ((1)));
-# endif
+# endif
/* Need to cast, because on glibc systems, by default, the second argument is
struct timezone *. */
_GL_CXXALIAS_SYS_CAST (gettimeofday, int,
(struct timeval *restrict, void *restrict));
-# endif
+# endif
_GL_CXXALIASWARN (gettimeofday);
-# elif defined GNULIB_POSIXCHECK
-# undef gettimeofday
-# if HAVE_RAW_DECL_GETTIMEOFDAY
+#elif defined GNULIB_POSIXCHECK
+# undef gettimeofday
+# if HAVE_RAW_DECL_GETTIMEOFDAY
_GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - "
"use gnulib module gettimeofday for portability");
+# endif
+#endif
+
+/* Hide some function declarations from <winsock2.h>. */
+
+#if defined _MSC_VER && @HAVE_WINSOCK2_H@
+# if !defined _@GUARD_PREFIX@_UNISTD_H
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef close
+# define close close_used_without_including_unistd_h
+# else
+ _GL_WARN_ON_USE (close,
+ "close() used without including <unistd.h>");
+# endif
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef gethostname
+# define gethostname gethostname_used_without_including_unistd_h
+# else
+ _GL_WARN_ON_USE (gethostname,
+ "gethostname() used without including <unistd.h>");
+# endif
+# endif
+# if !defined _@GUARD_PREFIX@_SYS_SOCKET_H
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef socket
+# define socket socket_used_without_including_sys_socket_h
+# undef connect
+# define connect connect_used_without_including_sys_socket_h
+# undef accept
+# define accept accept_used_without_including_sys_socket_h
+# undef bind
+# define bind bind_used_without_including_sys_socket_h
+# undef getpeername
+# define getpeername getpeername_used_without_including_sys_socket_h
+# undef getsockname
+# define getsockname getsockname_used_without_including_sys_socket_h
+# undef getsockopt
+# define getsockopt getsockopt_used_without_including_sys_socket_h
+# undef listen
+# define listen listen_used_without_including_sys_socket_h
+# undef recv
+# define recv recv_used_without_including_sys_socket_h
+# undef send
+# define send send_used_without_including_sys_socket_h
+# undef recvfrom
+# define recvfrom recvfrom_used_without_including_sys_socket_h
+# undef sendto
+# define sendto sendto_used_without_including_sys_socket_h
+# undef setsockopt
+# define setsockopt setsockopt_used_without_including_sys_socket_h
+# undef shutdown
+# define shutdown shutdown_used_without_including_sys_socket_h
+# else
+ _GL_WARN_ON_USE (socket,
+ "socket() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (connect,
+ "connect() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (accept,
+ "accept() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (bind,
+ "bind() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (getpeername,
+ "getpeername() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (getsockname,
+ "getsockname() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (getsockopt,
+ "getsockopt() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (listen,
+ "listen() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (recv,
+ "recv() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (send,
+ "send() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (recvfrom,
+ "recvfrom() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (sendto,
+ "sendto() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (setsockopt,
+ "setsockopt() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (shutdown,
+ "shutdown() used without including <sys/socket.h>");
# endif
# endif
+# if !defined _@GUARD_PREFIX@_SYS_SELECT_H
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef select
+# define select select_used_without_including_sys_select_h
+# else
+ _GL_WARN_ON_USE (select,
+ "select() used without including <sys/select.h>");
+# endif
+# endif
+#endif
-#endif /* _GL_SYS_TIME_H */
+#endif /* _@GUARD_PREFIX@_SYS_TIME_H */
+#endif /* _CYGWIN_SYS_TIME_H */
+#endif /* _@GUARD_PREFIX@_SYS_TIME_H */
diff --git a/lib/sys_types.in.h b/lib/sys_types.in.h
new file mode 100644
index 0000000..d7da356
--- /dev/null
+++ b/lib/sys_types.in.h
@@ -0,0 +1,51 @@
+/* Provide a more complete sys/types.h.
+
+ 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 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 <http://www.gnu.org/licenses/>. */
+
+#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 <stdint.h>. */
+# 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 <stddef.h>, not in <sys/types.h>. */
+/* But avoid namespace pollution on glibc systems. */
+#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \
+ && ! defined __GLIBC__
+# include <stddef.h>
+#endif
+
+#endif /* _@GUARD_PREFIX@_SYS_TYPES_H */
+#endif /* _@GUARD_PREFIX@_SYS_TYPES_H */
diff --git a/lib/sys_wait.in.h b/lib/sys_wait.in.h
index 8eabf6f..bd97d61 100644
--- a/lib/sys_wait.in.h
+++ b/lib/sys_wait.in.h
@@ -1,5 +1,5 @@
/* A POSIX-like <sys/wait.h>.
- Copyright (C) 2001-2003, 2005-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,11 +12,10 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
-#ifndef _GL_SYS_WAIT_H
+#ifndef _@GUARD_PREFIX@_SYS_WAIT_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
@@ -28,8 +27,8 @@
# @INCLUDE_NEXT@ @NEXT_SYS_WAIT_H@
#endif
-#ifndef _GL_SYS_WAIT_H
-#define _GL_SYS_WAIT_H
+#ifndef _@GUARD_PREFIX@_SYS_WAIT_H
+#define _@GUARD_PREFIX@_SYS_WAIT_H
/* Get pid_t. */
#include <sys/types.h>
@@ -126,5 +125,5 @@ _GL_WARN_ON_USE (waitpid, "waitpid is unportable - "
#endif
-#endif /* _GL_SYS_WAIT_H */
-#endif /* _GL_SYS_WAIT_H */
+#endif /* _@GUARD_PREFIX@_SYS_WAIT_H */
+#endif /* _@GUARD_PREFIX@_SYS_WAIT_H */
diff --git a/lib/tempname.c b/lib/tempname.c
index 139e0c3..087b79b 100644
--- a/lib/tempname.c
+++ b/lib/tempname.c
@@ -1,6 +1,6 @@
/* tempname.c - generate the name of a temporary file.
- Copyright (C) 1991-2003, 2005-2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 1991-2003, 2005-2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -67,13 +67,8 @@
# define __gettimeofday gettimeofday
# define __mkdir mkdir
# define __open open
-# define __open64 open
# define __lxstat64(version, file, buf) lstat (file, buf)
-# define __xstat64(version, file, buf) stat (file, buf)
-#endif
-
-#if ! (HAVE___SECURE_GETENV || _LIBC)
-# define __secure_getenv getenv
+# define __secure_getenv secure_getenv
#endif
#ifdef _LIBC
@@ -209,7 +204,7 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind)
/* 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 these combinations. Instead if a reasonable
+ 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)
diff --git a/lib/tempname.h b/lib/tempname.h
index f27b9ba..333267d 100644
--- a/lib/tempname.h
+++ b/lib/tempname.h
@@ -1,6 +1,6 @@
/* Create a temporary file or directory.
- Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/time.in.h b/lib/time.in.h
index cb533a4..8ced794 100644
--- a/lib/time.in.h
+++ b/lib/time.in.h
@@ -1,6 +1,6 @@
/* A more-standard <time.h>.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
@@ -28,13 +27,13 @@
without adding our own declarations. */
#if (defined __need_time_t || defined __need_clock_t \
|| defined __need_timespec \
- || defined _GL_TIME_H)
+ || defined _@GUARD_PREFIX@_TIME_H)
# @INCLUDE_NEXT@ @NEXT_TIME_H@
#else
-# define _GL_TIME_H
+# define _@GUARD_PREFIX@_TIME_H
# @INCLUDE_NEXT@ @NEXT_TIME_H@
diff --git a/lib/tmpdir.c b/lib/tmpdir.c
index 5590ac3..97fc3ff 100644
--- a/lib/tmpdir.c
+++ b/lib/tmpdir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2001-2002, 2006, 2009-2011 Free Software Foundation,
+/* Copyright (C) 1999, 2001-2002, 2006, 2009-2013 Free Software Foundation,
Inc.
This file is part of the GNU C Library.
@@ -33,27 +33,35 @@
#include <stdio.h>
#ifndef P_tmpdir
-# define P_tmpdir "/tmp"
+# ifdef _P_tmpdir /* native Windows */
+# define P_tmpdir _P_tmpdir
+# else
+# define P_tmpdir "/tmp"
+# endif
#endif
#include <sys/stat.h>
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# define WIN32_LEAN_AND_MEAN /* avoid including junk */
+# include <windows.h>
+#endif
+
+#include "pathmax.h"
+
#if _LIBC
# define struct_stat64 struct stat64
#else
# define struct_stat64 struct stat
+# define __libc_secure_getenv secure_getenv
# define __xstat64(version, path, buf) stat (path, buf)
#endif
-#if ! (HAVE___SECURE_GETENV || _LIBC)
-# define __secure_getenv getenv
-#endif
-
/* Pathname support.
ISSLASH(C) tests whether C is a directory separator character.
*/
#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
- /* Win32, Cygwin, OS/2, DOS */
+ /* Native Windows, Cygwin, OS/2, DOS */
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
#else
/* Unix */
@@ -81,6 +89,7 @@ path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx,
{
const char *d;
size_t dlen, plen;
+ bool add_slash;
if (!pfx || !pfx[0])
{
@@ -96,7 +105,7 @@ path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx,
if (try_tmpdir)
{
- d = __secure_getenv ("TMPDIR");
+ d = __libc_secure_getenv ("TMPDIR");
if (d != NULL && direxists (d))
dir = d;
else if (dir != NULL && direxists (dir))
@@ -106,6 +115,19 @@ path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx,
}
if (dir == NULL)
{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ char dirbuf[PATH_MAX];
+ DWORD retval;
+
+ /* Find Windows temporary file directory.
+ We try this before P_tmpdir because Windows defines P_tmpdir to "\\"
+ and will therefore try to put all temporary files in the root
+ directory (unless $TMPDIR is set). */
+ retval = GetTempPath (PATH_MAX, dirbuf);
+ if (retval > 0 && retval < PATH_MAX && direxists (dirbuf))
+ dir = dirbuf;
+ else
+#endif
if (direxists (P_tmpdir))
dir = P_tmpdir;
else if (strcmp (P_tmpdir, "/tmp") != 0 && direxists ("/tmp"))
@@ -118,16 +140,20 @@ path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx,
}
dlen = strlen (dir);
- while (dlen >= 1 && ISSLASH (dir[dlen - 1]))
- dlen--; /* remove trailing slashes */
+#ifdef __VMS
+ add_slash = 0;
+#else
+ add_slash = dlen != 0 && !ISSLASH (dir[dlen - 1]);
+#endif
/* check we have room for "${dir}/${pfx}XXXXXX\0" */
- if (tmpl_len < dlen + 1 + plen + 6 + 1)
+ if (tmpl_len < dlen + add_slash + plen + 6 + 1)
{
__set_errno (EINVAL);
return -1;
}
- sprintf (tmpl, "%.*s/%.*sXXXXXX", (int) dlen, dir, (int) plen, pfx);
+ memcpy (tmpl, dir, dlen);
+ sprintf (tmpl + dlen, &"/%.*sXXXXXX"[!add_slash], (int) plen, pfx);
return 0;
}
diff --git a/lib/tmpdir.h b/lib/tmpdir.h
index 553304f..ff7c70f 100644
--- a/lib/tmpdir.h
+++ b/lib/tmpdir.h
@@ -1,5 +1,5 @@
/* Determine a temporary directory.
- Copyright (C) 2001-2002, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/unistd--.h b/lib/unistd--.h
index 27307c8..ac2de1c 100644
--- a/lib/unistd--.h
+++ b/lib/unistd--.h
@@ -1,6 +1,6 @@
/* Like unistd.h, but redefine some names to avoid glitches.
- Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/unistd-safer.h b/lib/unistd-safer.h
index 14f537f..5c2b55a 100644
--- a/lib/unistd-safer.h
+++ b/lib/unistd-safer.h
@@ -1,6 +1,6 @@
/* Invoke unistd-like functions, but avoid some glitches.
- Copyright (C) 2001, 2003, 2005, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2005, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/unistd.c b/lib/unistd.c
new file mode 100644
index 0000000..6c6a8e2
--- /dev/null
+++ b/lib/unistd.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define _GL_UNISTD_INLINE _GL_EXTERN_INLINE
+#include "unistd.h"
diff --git a/lib/unistd.in.h b/lib/unistd.in.h
index 15893d7..874c628 100644
--- a/lib/unistd.in.h
+++ b/lib/unistd.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <unistd.h>.
- Copyright (C) 2003-2011 Free Software Foundation, Inc.
+ Copyright (C) 2003-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,32 +12,15 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _@GUARD_PREFIX@_UNISTD_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
-/* Special invocation convention:
- - On mingw, several headers, including <winsock2.h>, include <unistd.h>,
- but we need to ensure that both the system <unistd.h> and <winsock2.h>
- are completely included before we replace gethostname. */
-#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \
- && !defined _GL_WINSOCK2_H_WITNESS && defined _WINSOCK2_H
-/* <unistd.h> is being indirectly included for the first time from
- <winsock2.h>; avoid declaring any overrides. */
-# if @HAVE_UNISTD_H@
-# @INCLUDE_NEXT@ @NEXT_UNISTD_H@
-# else
-# error unexpected; report this to bug-gnulib@gnu.org
-# endif
-# define _GL_WINSOCK2_H_WITNESS
-
-/* Normal invocation. */
-#elif !defined _GL_UNISTD_H
-
/* The include_next requires a split double-inclusion guard. */
#if @HAVE_UNISTD_H@
# @INCLUDE_NEXT@ @NEXT_UNISTD_H@
@@ -51,8 +34,8 @@
# undef _GL_INCLUDING_WINSOCK2_H
#endif
-#if !defined _GL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
-#define _GL_UNISTD_H
+#if !defined _@GUARD_PREFIX@_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
+#define _@GUARD_PREFIX@_UNISTD_H
/* NetBSD 5.0 mis-defines NULL. Also get size_t. */
#include <stddef.h>
@@ -75,16 +58,31 @@
#endif
/* mingw fails to declare _exit in <unistd.h>. */
-/* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
+/* mingw, MSVC, BeOS, Haiku declare environ in <stdlib.h>, not in
+ <unistd.h>. */
/* Solaris declares getcwd not only in <unistd.h> but also in <stdlib.h>. */
+/* OSF Tru64 Unix cannot see gnulib rpl_strtod when system <stdlib.h> is
+ included here. */
/* But avoid namespace pollution on glibc systems. */
-#ifndef __GLIBC__
+#if !defined __GLIBC__ && !defined __osf__
+# define __need_system_stdlib_h
# include <stdlib.h>
+# undef __need_system_stdlib_h
#endif
-/* mingw declares getcwd in <io.h>, not in <unistd.h>. */
-#if ((@GNULIB_GETCWD@ || defined GNULIB_POSIXCHECK) \
+/* Native Windows platforms declare chdir, getcwd, rmdir in
+ <io.h> and/or <direct.h>, not in <unistd.h>.
+ They also declare access(), chmod(), close(), dup(), dup2(), isatty(),
+ lseek(), read(), unlink(), write() in <io.h>. */
+#if ((@GNULIB_CHDIR@ || @GNULIB_GETCWD@ || @GNULIB_RMDIR@ \
+ || defined GNULIB_POSIXCHECK) \
&& ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
+# include <io.h> /* mingw32, mingw64 */
+# include <direct.h> /* 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 <io.h>
#endif
@@ -97,7 +95,15 @@
# include <netdb.h>
#endif
-#if (@GNULIB_WRITE@ || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \
+/* MSVC defines off_t in <sys/types.h>.
+ 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 <sys/types.h>
+#endif
+
+#if (@GNULIB_READ@ || @GNULIB_WRITE@ \
+ || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \
|| @GNULIB_PREAD@ || @GNULIB_PWRITE@ || defined GNULIB_POSIXCHECK)
/* Get ssize_t. */
# include <sys/types.h>
@@ -106,9 +112,18 @@
/* Get getopt(), optarg, optind, opterr, optopt.
But avoid namespace pollution on glibc systems. */
#if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT
+# define __need_getopt
# include <getopt.h>
#endif
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_UNISTD_INLINE
+# define _GL_UNISTD_INLINE _GL_INLINE
+#endif
+
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */
@@ -116,78 +131,77 @@
/* The definition of _GL_WARN_ON_USE is copied here. */
-#if @GNULIB_GETHOSTNAME@
-/* Get all possible declarations of gethostname(). */
-# if @UNISTD_H_HAVE_WINSOCK2_H@
-# if !defined _GL_SYS_SOCKET_H
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef socket
-# define socket socket_used_without_including_sys_socket_h
-# undef connect
-# define connect connect_used_without_including_sys_socket_h
-# undef accept
-# define accept accept_used_without_including_sys_socket_h
-# undef bind
-# define bind bind_used_without_including_sys_socket_h
-# undef getpeername
-# define getpeername getpeername_used_without_including_sys_socket_h
-# undef getsockname
-# define getsockname getsockname_used_without_including_sys_socket_h
-# undef getsockopt
-# define getsockopt getsockopt_used_without_including_sys_socket_h
-# undef listen
-# define listen listen_used_without_including_sys_socket_h
-# undef recv
-# define recv recv_used_without_including_sys_socket_h
-# undef send
-# define send send_used_without_including_sys_socket_h
-# undef recvfrom
-# define recvfrom recvfrom_used_without_including_sys_socket_h
-# undef sendto
-# define sendto sendto_used_without_including_sys_socket_h
-# undef setsockopt
-# define setsockopt setsockopt_used_without_including_sys_socket_h
-# undef shutdown
-# define shutdown shutdown_used_without_including_sys_socket_h
-# else
- _GL_WARN_ON_USE (socket,
- "socket() used without including <sys/socket.h>");
- _GL_WARN_ON_USE (connect,
- "connect() used without including <sys/socket.h>");
- _GL_WARN_ON_USE (accept,
- "accept() used without including <sys/socket.h>");
- _GL_WARN_ON_USE (bind,
- "bind() used without including <sys/socket.h>");
- _GL_WARN_ON_USE (getpeername,
- "getpeername() used without including <sys/socket.h>");
- _GL_WARN_ON_USE (getsockname,
- "getsockname() used without including <sys/socket.h>");
- _GL_WARN_ON_USE (getsockopt,
- "getsockopt() used without including <sys/socket.h>");
- _GL_WARN_ON_USE (listen,
- "listen() used without including <sys/socket.h>");
- _GL_WARN_ON_USE (recv,
- "recv() used without including <sys/socket.h>");
- _GL_WARN_ON_USE (send,
- "send() used without including <sys/socket.h>");
- _GL_WARN_ON_USE (recvfrom,
- "recvfrom() used without including <sys/socket.h>");
- _GL_WARN_ON_USE (sendto,
- "sendto() used without including <sys/socket.h>");
- _GL_WARN_ON_USE (setsockopt,
- "setsockopt() used without including <sys/socket.h>");
- _GL_WARN_ON_USE (shutdown,
- "shutdown() used without including <sys/socket.h>");
-# endif
+/* Hide some function declarations from <winsock2.h>. */
+
+#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 <sys/socket.h>");
+ _GL_WARN_ON_USE (connect,
+ "connect() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (accept,
+ "accept() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (bind,
+ "bind() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (getpeername,
+ "getpeername() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (getsockname,
+ "getsockname() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (getsockopt,
+ "getsockopt() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (listen,
+ "listen() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (recv,
+ "recv() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (send,
+ "send() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (recvfrom,
+ "recvfrom() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (sendto,
+ "sendto() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (setsockopt,
+ "setsockopt() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (shutdown,
+ "shutdown() used without including <sys/socket.h>");
# endif
-# if !defined _GL_SYS_SELECT_H
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef select
-# define select select_used_without_including_sys_select_h
-# else
- _GL_WARN_ON_USE (select,
- "select() used without including <sys/select.h>");
-# endif
+# endif
+# if !defined _@GUARD_PREFIX@_SYS_SELECT_H
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef select
+# define select select_used_without_including_sys_select_h
+# else
+ _GL_WARN_ON_USE (select,
+ "select() used without including <sys/select.h>");
# endif
# endif
#endif
@@ -223,12 +237,24 @@ _GL_WARN_ON_USE (access, "the access function is a security risk - "
#endif
+#if @GNULIB_CHDIR@
+_GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIASWARN (chdir);
+#elif defined GNULIB_POSIXCHECK
+# undef chdir
+# if HAVE_RAW_DECL_CHDIR
+_GL_WARN_ON_USE (chown, "chdir is not always in <unistd.h> - "
+ "use gnulib module chdir for portability");
+# endif
+#endif
+
+
#if @GNULIB_CHOWN@
/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE
to GID (if GID is not -1). Follow symbolic links.
Return 0 if successful, otherwise -1 and errno set.
- See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/chown.html>. */
+ See the POSIX:2008 specification
+ <http://pubs.opengroup.org/onlinepubs/9699919799/functions/chown.html. */
# if @REPLACE_CHOWN@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef chown
@@ -279,24 +305,32 @@ _GL_WARN_ON_USE (close, "close does not portably work on sockets - "
#endif
-#if @REPLACE_DUP@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# define dup rpl_dup
-# endif
+#if @GNULIB_DUP@
+# if @REPLACE_DUP@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define dup rpl_dup
+# endif
_GL_FUNCDECL_RPL (dup, int, (int oldfd));
_GL_CXXALIAS_RPL (dup, int, (int oldfd));
-#else
+# else
_GL_CXXALIAS_SYS (dup, int, (int oldfd));
-#endif
+# endif
_GL_CXXALIASWARN (dup);
+#elif defined GNULIB_POSIXCHECK
+# undef dup
+# if HAVE_RAW_DECL_DUP
+_GL_WARN_ON_USE (dup, "dup is unportable - "
+ "use gnulib module dup for portability");
+# endif
+#endif
#if @GNULIB_DUP2@
/* Copy the file descriptor OLDFD into file descriptor NEWFD. Do nothing if
NEWFD = OLDFD, otherwise close NEWFD first if it is open.
Return newfd if successful, otherwise -1 and errno set.
- See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/dup2.html>. */
+ See the POSIX:2008 specification
+ <http://pubs.opengroup.org/onlinepubs/9699919799/functions/dup2.html>. */
# if @REPLACE_DUP2@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define dup2 rpl_dup2
@@ -367,7 +401,7 @@ extern char **environ;
# endif
#elif defined GNULIB_POSIXCHECK
# if HAVE_RAW_DECL_ENVIRON
-static inline char ***
+_GL_UNISTD_INLINE char ***
rpl_environ (void)
{
return &environ;
@@ -425,8 +459,8 @@ _GL_WARN_ON_USE (faccessat, "faccessat is not portable - "
/* Change the process' current working directory to the directory on which
the given file descriptor is open.
Return 0 if successful, otherwise -1 and errno set.
- See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/fchdir.html>. */
+ See the POSIX:2008 specification
+ <http://pubs.opengroup.org/onlinepubs/9699919799/functions/fchdir.html>. */
# if ! @HAVE_FCHDIR@
_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/));
@@ -483,11 +517,30 @@ _GL_WARN_ON_USE (fchownat, "fchownat is not portable - "
#endif
-#if @GNULIB_FSYNC@
+#if @GNULIB_FDATASYNC@
/* Synchronize changes to a file.
Return 0 if successful, otherwise -1 and errno set.
- See POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/fsync.html>. */
+ See POSIX:2008 specification
+ <http://pubs.opengroup.org/onlinepubs/9699919799/functions/fdatasync.html>. */
+# 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
+ <http://pubs.opengroup.org/onlinepubs/9699919799/functions/fsync.html>. */
# if !@HAVE_FSYNC@
_GL_FUNCDECL_SYS (fsync, int, (int fd));
# endif
@@ -505,12 +558,21 @@ _GL_WARN_ON_USE (fsync, "fsync is unportable - "
#if @GNULIB_FTRUNCATE@
/* Change the size of the file to which FD is opened to become equal to LENGTH.
Return 0 if successful, otherwise -1 and errno set.
- See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/ftruncate.html>. */
-# if !@HAVE_FTRUNCATE@
+ See the POSIX:2008 specification
+ <http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html>. */
+# if @REPLACE_FTRUNCATE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef ftruncate
+# define ftruncate rpl_ftruncate
+# endif
+_GL_FUNCDECL_RPL (ftruncate, int, (int fd, off_t length));
+_GL_CXXALIAS_RPL (ftruncate, int, (int fd, off_t length));
+# else
+# if !@HAVE_FTRUNCATE@
_GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length));
-# endif
+# endif
_GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length));
+# endif
_GL_CXXALIASWARN (ftruncate);
#elif defined GNULIB_POSIXCHECK
# undef ftruncate
@@ -526,8 +588,8 @@ _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - "
of BUF.
Return BUF if successful, or NULL if the directory couldn't be determined
or SIZE was too small.
- See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/getcwd.html>.
+ See the POSIX:2008 specification
+ <http://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html>.
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
@@ -797,7 +859,7 @@ _GL_CXXALIAS_RPL (getpagesize, int, (void));
# define getpagesize() _gl_getpagesize ()
# else
# if !GNULIB_defined_getpagesize_function
-static inline int
+_GL_UNISTD_INLINE int
getpagesize ()
{
return _gl_getpagesize ();
@@ -870,12 +932,49 @@ _GL_WARN_ON_USE (endusershell, "endusershell is unportable - "
#endif
+#if @GNULIB_GROUP_MEMBER@
+/* Determine whether group id is in calling user's group list. */
+# if !@HAVE_GROUP_MEMBER@
+_GL_FUNCDECL_SYS (group_member, int, (gid_t gid));
+# endif
+_GL_CXXALIAS_SYS (group_member, int, (gid_t gid));
+_GL_CXXALIASWARN (group_member);
+#elif defined GNULIB_POSIXCHECK
+# undef group_member
+# if HAVE_RAW_DECL_GROUP_MEMBER
+_GL_WARN_ON_USE (group_member, "group_member is unportable - "
+ "use gnulib module group-member for portability");
+# endif
+#endif
+
+
+#if @GNULIB_ISATTY@
+# if @REPLACE_ISATTY@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef isatty
+# define isatty rpl_isatty
+# endif
+_GL_FUNCDECL_RPL (isatty, int, (int fd));
+_GL_CXXALIAS_RPL (isatty, int, (int fd));
+# else
+_GL_CXXALIAS_SYS (isatty, int, (int fd));
+# endif
+_GL_CXXALIASWARN (isatty);
+#elif defined GNULIB_POSIXCHECK
+# undef isatty
+# if HAVE_RAW_DECL_ISATTY
+_GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - "
+ "use gnulib module isatty for portability");
+# endif
+#endif
+
+
#if @GNULIB_LCHOWN@
/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE
to GID (if GID is not -1). Do not follow symbolic links.
Return 0 if successful, otherwise -1 and errno set.
- See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/lchown.html>. */
+ See the POSIX:2008 specification
+ <http://pubs.opengroup.org/onlinepubs/9699919799/functions/lchown.html>. */
# if @REPLACE_LCHOWN@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef lchown
@@ -904,8 +1003,8 @@ _GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - "
#if @GNULIB_LINK@
/* Create a new hard link for an existing file.
Return 0 if successful, otherwise -1 and errno set.
- See POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/link.html>. */
+ See POSIX:2008 specification
+ <http://pubs.opengroup.org/onlinepubs/9699919799/functions/link.html>. */
# if @REPLACE_LINK@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define link rpl_link
@@ -970,8 +1069,8 @@ _GL_WARN_ON_USE (linkat, "linkat is unportable - "
#if @GNULIB_LSEEK@
/* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END.
Return the new offset if successful, otherwise -1 and errno set.
- See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/lseek.html>. */
+ See the POSIX:2008 specification
+ <http://pubs.opengroup.org/onlinepubs/9699919799/functions/lseek.html>. */
# if @REPLACE_LSEEK@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define lseek rpl_lseek
@@ -1041,10 +1140,12 @@ _GL_WARN_ON_USE (pipe2, "pipe2 is unportable - "
#if @GNULIB_PREAD@
/* Read at most BUFSIZE bytes from FD into BUF, starting at OFFSET.
Return the number of bytes placed into BUF if successful, otherwise
- set errno and return -1. 0 indicates EOF. See the POSIX:2001
- specification <http://www.opengroup.org/susv3xsh/pread.html>. */
+ set errno and return -1. 0 indicates EOF.
+ See the POSIX:2008 specification
+ <http://pubs.opengroup.org/onlinepubs/9699919799/functions/pread.html>. */
# if @REPLACE_PREAD@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pread
# define pread rpl_pread
# endif
_GL_FUNCDECL_RPL (pread, ssize_t,
@@ -1075,10 +1176,11 @@ _GL_WARN_ON_USE (pread, "pread is unportable - "
/* Write at most BUFSIZE bytes from BUF into FD, starting at OFFSET.
Return the number of bytes written if successful, otherwise
set errno and return -1. 0 indicates nothing written. See the
- POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/pwrite.html>. */
+ POSIX:2008 specification
+ <http://pubs.opengroup.org/onlinepubs/9699919799/functions/pwrite.html>. */
# if @REPLACE_PWRITE@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pwrite
# define pwrite rpl_pwrite
# endif
_GL_FUNCDECL_RPL (pwrite, ssize_t,
@@ -1105,12 +1207,34 @@ _GL_WARN_ON_USE (pwrite, "pwrite is unportable - "
#endif
+#if @GNULIB_READ@
+/* Read up to COUNT bytes from file descriptor FD into the buffer starting
+ at BUF. See the POSIX:2008 specification
+ <http://pubs.opengroup.org/onlinepubs/9699919799/functions/read.html>. */
+# if @REPLACE_READ@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef read
+# define read rpl_read
+# endif
+_GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count));
+# else
+/* Need to cast, because on mingw, the third parameter is
+ unsigned int count
+ and the return type is 'int'. */
+_GL_CXXALIAS_SYS_CAST (read, ssize_t, (int fd, void *buf, size_t count));
+# endif
+_GL_CXXALIASWARN (read);
+#endif
+
+
#if @GNULIB_READLINK@
/* Read the contents of the symbolic link FILE and place the first BUFSIZE
bytes of it into BUF. Return the number of bytes placed into BUF if
successful, otherwise -1 and errno set.
- See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/readlink.html>. */
+ See the POSIX:2008 specification
+ <http://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>. */
# if @REPLACE_READLINK@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define readlink rpl_readlink
@@ -1178,11 +1302,38 @@ _GL_WARN_ON_USE (rmdir, "rmdir is unportable - "
#endif
+#if @GNULIB_SETHOSTNAME@
+/* Set the host name of the machine.
+ The host name may or may not be fully qualified.
+
+ Put LEN bytes of NAME into the host name.
+ Return 0 if successful, otherwise, set errno and return -1.
+
+ Platforms with no ability to set the hostname return -1 and set
+ errno = ENOSYS. */
+# if !@HAVE_SETHOSTNAME@ || !@HAVE_DECL_SETHOSTNAME@
+_GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len)
+ _GL_ARG_NONNULL ((1)));
+# endif
+/* Need to cast, because on Solaris 11 2011-10, Mac OS X 10.5, IRIX 6.5
+ and FreeBSD 6.4 the second parameter is int. On Solaris 11
+ 2011-10, the first parameter is not const. */
+_GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len));
+_GL_CXXALIASWARN (sethostname);
+#elif defined GNULIB_POSIXCHECK
+# undef sethostname
+# if HAVE_RAW_DECL_SETHOSTNAME
+_GL_WARN_ON_USE (sethostname, "sethostname is unportable - "
+ "use gnulib module sethostname for portability");
+# endif
+#endif
+
+
#if @GNULIB_SLEEP@
/* Pause the execution of the current thread for N seconds.
Returns the number of seconds left to sleep.
- See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/sleep.html>. */
+ See the POSIX:2008 specification
+ <http://pubs.opengroup.org/onlinepubs/9699919799/functions/sleep.html>. */
# if @REPLACE_SLEEP@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef sleep
@@ -1331,7 +1482,7 @@ _GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - "
/* Pause the execution of the current thread for N microseconds.
Returns 0 on completion, or -1 on range error.
See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/sleep.html>. */
+ <http://www.opengroup.org/susv3xsh/usleep.html>. */
# if @REPLACE_USLEEP@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef usleep
@@ -1357,9 +1508,9 @@ _GL_WARN_ON_USE (usleep, "usleep is unportable - "
#if @GNULIB_WRITE@
/* Write up to COUNT bytes starting at BUF to file descriptor FD.
- See the POSIX:2001 specification
- <http://www.opengroup.org/susv3xsh/write.html>. */
-# if @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@
+ See the POSIX:2008 specification
+ <http://pubs.opengroup.org/onlinepubs/9699919799/functions/write.html>. */
+# if @REPLACE_WRITE@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef write
# define write rpl_write
@@ -1376,6 +1527,7 @@ _GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count));
_GL_CXXALIASWARN (write);
#endif
+_GL_INLINE_HEADER_END
-#endif /* _GL_UNISTD_H */
-#endif /* _GL_UNISTD_H */
+#endif /* _@GUARD_PREFIX@_UNISTD_H */
+#endif /* _@GUARD_PREFIX@_UNISTD_H */
diff --git a/lib/unlocked-io.h b/lib/unlocked-io.h
index 901cbdd..df3e139 100644
--- a/lib/unlocked-io.h
+++ b/lib/unlocked-io.h
@@ -1,6 +1,6 @@
/* Prefer faster, non-thread-safe stdio functions if available.
- Copyright (C) 2001-2004, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c
index 3f2e91d..5267b1b 100644
--- a/lib/vasnprintf.c
+++ b/lib/vasnprintf.c
@@ -1,5 +1,5 @@
/* vsprintf with automatic memory allocation.
- Copyright (C) 1999, 2002-2011 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ with this program; if not, see <http://www.gnu.org/licenses/>. */
/* This file can be parametrized with the following macros:
VASNPRINTF The name of the function being defined.
@@ -276,7 +275,7 @@ decimal_point_char (void)
{
const char *point;
/* Determine it in a multithread-safe way. We know nl_langinfo is
- multithread-safe on glibc systems and MacOS X systems, but is not required
+ multithread-safe on glibc systems and Mac OS X systems, but is not required
to be multithread-safe by POSIX. sprintf(), however, is multithread-safe.
localeconv() is rarely multithread-safe. */
# if HAVE_NL_LANGINFO && (__GLIBC__ || defined __UCLIBC__ || (defined __APPLE__ && defined __MACH__))
@@ -553,32 +552,61 @@ divide (mpn_t a, mpn_t b, mpn_t *q)
size_t s;
{
mp_limb_t msd = b_ptr[b_len - 1]; /* = b[n-1], > 0 */
- s = 31;
- if (msd >= 0x10000)
- {
- msd = msd >> 16;
- s -= 16;
- }
- if (msd >= 0x100)
- {
- msd = msd >> 8;
- s -= 8;
- }
- if (msd >= 0x10)
- {
- msd = msd >> 4;
- s -= 4;
- }
- if (msd >= 0x4)
+ /* Determine s = GMP_LIMB_BITS - integer_length (msd).
+ Code copied from gnulib's integer_length.c. */
+# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ s = __builtin_clz (msd);
+# else
+# if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT
+ if (GMP_LIMB_BITS <= DBL_MANT_BIT)
{
- msd = msd >> 2;
- s -= 2;
+ /* Use 'double' operations.
+ Assumes an IEEE 754 'double' implementation. */
+# define DBL_EXP_MASK ((DBL_MAX_EXP - DBL_MIN_EXP) | 7)
+# define DBL_EXP_BIAS (DBL_EXP_MASK / 2 - 1)
+# define NWORDS \
+ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+ union { double value; unsigned int word[NWORDS]; } m;
+
+ /* Use a single integer to floating-point conversion. */
+ m.value = msd;
+
+ s = GMP_LIMB_BITS
+ - (((m.word[DBL_EXPBIT0_WORD] >> DBL_EXPBIT0_BIT) & DBL_EXP_MASK)
+ - DBL_EXP_BIAS);
}
- if (msd >= 0x2)
+ else
+# undef NWORDS
+# endif
{
- msd = msd >> 1;
- s -= 1;
+ s = 31;
+ if (msd >= 0x10000)
+ {
+ msd = msd >> 16;
+ s -= 16;
+ }
+ if (msd >= 0x100)
+ {
+ msd = msd >> 8;
+ s -= 8;
+ }
+ if (msd >= 0x10)
+ {
+ msd = msd >> 4;
+ s -= 4;
+ }
+ if (msd >= 0x4)
+ {
+ msd = msd >> 2;
+ s -= 2;
+ }
+ if (msd >= 0x2)
+ {
+ msd = msd >> 1;
+ s -= 1;
+ }
}
+# endif
}
/* 0 <= s < GMP_LIMB_BITS.
Copy b, shifting it left by s bits. */
@@ -885,9 +913,9 @@ decode_long_double (long double x, int *ep, mpn_t *mp)
y = frexpl (x, &exp);
if (!(y >= 0.0L && y < 1.0L))
abort ();
- /* x = 2^exp * y = 2^(exp - LDBL_MANT_BIT) * (y * LDBL_MANT_BIT), and the
+ /* x = 2^exp * y = 2^(exp - LDBL_MANT_BIT) * (y * 2^LDBL_MANT_BIT), and the
latter is an integer. */
- /* Convert the mantissa (y * LDBL_MANT_BIT) to a sequence of limbs.
+ /* Convert the mantissa (y * 2^LDBL_MANT_BIT) to a sequence of limbs.
I'm not sure whether it's safe to cast a 'long double' value between
2^31 and 2^32 to 'unsigned int', therefore play safe and cast only
'long double' values between 0 and 2^16 (to 'unsigned int' or 'int',
@@ -973,9 +1001,9 @@ decode_double (double x, int *ep, mpn_t *mp)
y = frexp (x, &exp);
if (!(y >= 0.0 && y < 1.0))
abort ();
- /* x = 2^exp * y = 2^(exp - DBL_MANT_BIT) * (y * DBL_MANT_BIT), and the
+ /* x = 2^exp * y = 2^(exp - DBL_MANT_BIT) * (y * 2^DBL_MANT_BIT), and the
latter is an integer. */
- /* Convert the mantissa (y * DBL_MANT_BIT) to a sequence of limbs.
+ /* Convert the mantissa (y * 2^DBL_MANT_BIT) to a sequence of limbs.
I'm not sure whether it's safe to cast a 'double' value between
2^31 and 2^32 to 'unsigned int', therefore play safe and cast only
'double' values between 0 and 2^16 (to 'unsigned int' or 'int',
@@ -1502,7 +1530,7 @@ is_borderline (const char *digits, size_t precision)
/* Returns the number of TCHAR_T units needed as temporary space for the result
of sprintf or SNPRINTF of a single conversion directive. */
-static inline size_t
+static size_t
MAX_ROOM_NEEDED (const arguments *ap, size_t arg_index, FCHAR_T conversion,
arg_type type, int flags, size_t width, int has_precision,
size_t precision, int pad_ourselves)
@@ -2785,7 +2813,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
if (has_width)
{
# if ENABLE_UNISTDIO
- /* Outside POSIX, it's preferrable to compare the width
+ /* Outside POSIX, it's preferable to compare the width
against the number of _characters_ of the converted
value. */
w = DCHAR_MBSNLEN (result + length, characters);
@@ -4856,7 +4884,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
in format strings in writable memory may crash the program
(if compiled with _FORTIFY_SOURCE=2), so we should avoid it
in this situation. */
- /* On native Win32 systems (such as mingw), we can avoid using
+ /* On native Windows systems (such as mingw), we can avoid using
%n because:
- Although the gl_SNPRINTF_TRUNCATION_C99 test fails,
snprintf does not write more than the specified number
@@ -4865,7 +4893,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
- Although the gl_SNPRINTF_RETVAL_C99 test fails, snprintf
allows us to recognize the case of an insufficient
buffer size: it returns -1 in this case.
- On native Win32 systems (such as mingw) where the OS is
+ On native Windows systems (such as mingw) where the OS is
Windows Vista, the use of %n in format strings by default
crashes the program. See
<http://gcc.gnu.org/ml/gcc/2007-06/msg00122.html> and
@@ -5125,7 +5153,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
size_t tmp_length =
MAX_ROOM_NEEDED (&a, dp->arg_index,
dp->conversion, type, flags,
- width, has_precision,
+ has_width ? width : 0,
+ has_precision,
precision, pad_ourselves);
if (maxlen < tmp_length)
@@ -5388,7 +5417,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
{
size_t w;
# if ENABLE_UNISTDIO
- /* Outside POSIX, it's preferrable to compare the width
+ /* Outside POSIX, it's preferable to compare the width
against the number of _characters_ of the converted
value. */
w = DCHAR_MBSNLEN (result + length, count);
diff --git a/lib/vasnprintf.h b/lib/vasnprintf.h
index c9f4c21..7658f50 100644
--- a/lib/vasnprintf.h
+++ b/lib/vasnprintf.h
@@ -1,5 +1,5 @@
/* vsprintf with automatic memory allocation.
- Copyright (C) 2002-2004, 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2002-2004, 2007-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ with this program; if not, see <http://www.gnu.org/licenses/>. */
#ifndef _VASNPRINTF_H
#define _VASNPRINTF_H
diff --git a/lib/vasprintf.c b/lib/vasprintf.c
index 3001c26..d0d4a11 100644
--- a/lib/vasprintf.c
+++ b/lib/vasprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/lib/verify.h b/lib/verify.h
index 5e91abd..d42d075 100644
--- a/lib/verify.h
+++ b/lib/verify.h
@@ -1,6 +1,6 @@
/* Compile-time assert-like macros.
- Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,21 +17,49 @@
/* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */
-#ifndef VERIFY_H
-# define VERIFY_H 1
+#ifndef _GL_VERIFY_H
+#define _GL_VERIFY_H
+
+
+/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per C11.
+ This is supported by GCC 4.6.0 and later, in C mode, and its use
+ here generates easier-to-read diagnostics when verify (R) fails.
+
+ Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per C++11.
+ This will likely be supported by future GCC versions, in C++ mode.
+
+ Use this only with GCC. If we were willing to slow 'configure'
+ down we could also use it with other compilers, but since this
+ affects only the quality of diagnostics, why bother? */
+#if (4 < __GNUC__ + (6 <= __GNUC_MINOR__) \
+ && (201112L <= __STDC_VERSION__ || !defined __STRICT_ANSI__) \
+ && !defined __cplusplus)
+# define _GL_HAVE__STATIC_ASSERT 1
+#endif
+/* The condition (99 < __GNUC__) is temporary, until we know about the
+ first G++ release that supports static_assert. */
+#if (99 < __GNUC__) && defined __cplusplus
+# define _GL_HAVE_STATIC_ASSERT 1
+#endif
+
+/* FreeBSD 9.1 <sys/cdefs.h>, included by <stddef.h> and lots of other
+ system headers, defines a conflicting _Static_assert that is no
+ better than ours; override it. */
+#ifndef _GL_HAVE_STATIC_ASSERT
+# include <stddef.h>
+# undef _Static_assert
+#endif
/* Each of these macros verifies that its argument R is nonzero. To
be portable, R should be an integer constant expression. Unlike
assert (R), there is no run-time overhead.
- There are two macros, since no single macro can be used in all
- contexts in C. verify_true (R) is for scalar contexts, including
- integer constant expression contexts. verify (R) is for declaration
- contexts, e.g., the top level.
-
- Symbols ending in "__" are private to this header.
+ If _Static_assert works, verify (R) uses it directly. Similarly,
+ _GL_VERIFY_TRUE works by packaging a _Static_assert inside a struct
+ that is an operand of sizeof.
- The code below uses several ideas.
+ The code below uses several ideas for C++ compilers, and for C
+ compilers that do not support _Static_assert:
* The first step is ((R) ? 1 : -1). Given an expression R, of
integral or boolean or floating-point type, this yields an
@@ -39,7 +67,9 @@
constant and nonnegative.
* Next this expression W is wrapped in a type
- struct verify_type__ { unsigned int verify_error_if_negative_size__: W; }.
+ struct _gl_verify_type {
+ unsigned int _gl_verify_error_if_negative: W;
+ }.
If W is negative, this yields a compile-time error. No compiler can
deal with a bit-field of negative size.
@@ -53,7 +83,7 @@
void function (int n) { verify (n < 0); }
- * For the verify macro, the struct verify_type__ will need to
+ * For the verify macro, the struct _gl_verify_type will need to
somehow be embedded into a declaration. To be portable, this
declaration must declare an object, a constant, a function, or a
typedef name. If the declared entity uses the type directly,
@@ -91,11 +121,11 @@
Which of the following alternatives can be used?
extern int dummy [sizeof (struct {...})];
- extern int dummy [sizeof (struct verify_type__ {...})];
+ extern int dummy [sizeof (struct _gl_verify_type {...})];
extern void dummy (int [sizeof (struct {...})]);
- extern void dummy (int [sizeof (struct verify_type__ {...})]);
+ extern void dummy (int [sizeof (struct _gl_verify_type {...})]);
extern int (*dummy (void)) [sizeof (struct {...})];
- extern int (*dummy (void)) [sizeof (struct verify_type__ {...})];
+ extern int (*dummy (void)) [sizeof (struct _gl_verify_type {...})];
In the second and sixth case, the struct type is exported to the
outer scope; two such declarations therefore collide. GCC warns
@@ -105,59 +135,121 @@
extern int (*dummy (void)) [sizeof (struct {...})];
* GCC warns about duplicate declarations of the dummy function if
- -Wredundant_decls is used. GCC 4.3 and later have a builtin
+ -Wredundant-decls is used. GCC 4.3 and later have a builtin
__COUNTER__ macro that can let us generate unique identifiers for
each dummy function, to suppress this warning.
- * This implementation exploits the fact that GCC does not warn about
- the last declaration mentioned above. If a future version of GCC
- introduces a warning for this, the problem could be worked around
- by using code specialized to GCC, just as __COUNTER__ is already
- being used if available.
+ * 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.
- #if 4 <= __GNUC__
- # define verify(R) [another version to keep GCC happy]
- #endif
+ * GCC warns if -Wnested-externs is enabled and verify() is used
+ within a function body; but inside a function, you can always
+ arrange to use verify_expr() instead.
* In C++, any struct definition inside sizeof is invalid.
Use a template type to work around the problem. */
/* Concatenate two preprocessor tokens. */
-# define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y)
-# define _GL_CONCAT0(x, y) x##y
+#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
+#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)
+#define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER)
-/* Verify requirement R at compile-time, as an integer constant expression.
- Return 1. */
+/* Verify requirement R at compile-time, as an integer constant expression
+ that returns 1. If R is false, fail at compile-time, preferably
+ with a diagnostic that includes the string-literal DIAGNOSTIC. */
-# ifdef __cplusplus
+#define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \
+ (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC)))
+
+#ifdef __cplusplus
+# if !GNULIB_defined_struct__gl_verify_type
template <int w>
- struct verify_type__ { unsigned int verify_error_if_negative_size__: w; };
-# define verify_true(R) \
- (!!sizeof (verify_type__<(R) ? 1 : -1>))
-# else
-# define verify_true(R) \
- (!!sizeof \
- (struct { unsigned int verify_error_if_negative_size__: (R) ? 1 : -1; }))
+ 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) \
- extern int (* _GL_GENSYM (verify_function) (void)) [verify_true (R)]
+#define verify(R) _GL_VERIFY (R, "verify (" #R ")")
+
+/* @assert.h omit end@ */
#endif
diff --git a/lib/verror.c b/lib/verror.c
index bc90ef3..5f899c1 100644
--- a/lib/verror.c
+++ b/lib/verror.c
@@ -1,5 +1,5 @@
/* va_list error handler for noninteractive utilities
- Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -34,9 +34,9 @@
# define _(String) String
#endif
-/* Print a message with `vfprintf (stderr, FORMAT, ARGS)';
+/* Print a message with 'vfprintf (stderr, FORMAT, ARGS)';
if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
- If STATUS is nonzero, terminate the program with `exit (STATUS)'.
+ If STATUS is nonzero, terminate the program with 'exit (STATUS)'.
Use the globals error_print_progname and error_message_count similarly
to error(). */
void
@@ -45,10 +45,10 @@ verror (int status, int errnum, const char *format, va_list args)
verror_at_line (status, errnum, NULL, 0, format, args);
}
-/* Print a message with `vfprintf (stderr, FORMAT, ARGS)';
+/* Print a message with 'vfprintf (stderr, FORMAT, ARGS)';
if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
- If STATUS is nonzero, terminate the program with `exit (STATUS)'.
- If FNAME is not NULL, prepend the message with `FNAME:LINENO:'.
+ If STATUS is nonzero, terminate the program with 'exit (STATUS)'.
+ If FNAME is not NULL, prepend the message with "FNAME:LINENO:".
Use the globals error_print_progname, error_message_count, and
error_one_per_line similarly to error_at_line(). */
void
diff --git a/lib/verror.h b/lib/verror.h
index 8cb511c..7e7284a 100644
--- a/lib/verror.h
+++ b/lib/verror.h
@@ -1,5 +1,5 @@
/* Declaration for va_list error-reporting function
- Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,34 +17,35 @@
#ifndef _VERROR_H
#define _VERROR_H 1
-#include "error.h"
#include <stdarg.h>
+#include "error.h" /* for _GL_ATTRIBUTE_FORMAT */
+
#ifdef __cplusplus
extern "C" {
#endif
-/* Print a message with `vfprintf (stderr, FORMAT, ARGS)';
+/* Print a message with 'vfprintf (stderr, FORMAT, ARGS)';
if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
- If STATUS is nonzero, terminate the program with `exit (STATUS)'.
+ If STATUS is nonzero, terminate the program with 'exit (STATUS)'.
Use the globals error_print_progname and error_message_count similarly
to error(). */
extern void verror (int __status, int __errnum, const char *__format,
va_list __args)
- __attribute__ ((__format__ (__printf__, 3, 0)));
+ _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 0));
-/* Print a message with `vfprintf (stderr, FORMAT, ARGS)';
+/* Print a message with 'vfprintf (stderr, FORMAT, ARGS)';
if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
- If STATUS is nonzero, terminate the program with `exit (STATUS)'.
- If FNAME is not NULL, prepend the message with `FNAME:LINENO:'.
+ If STATUS is nonzero, terminate the program with 'exit (STATUS)'.
+ If FNAME is not NULL, prepend the message with "FNAME:LINENO:".
Use the globals error_print_progname, error_message_count, and
error_one_per_line similarly to error_at_line(). */
extern void verror_at_line (int __status, int __errnum, const char *__fname,
unsigned int __lineno, const char *__format,
va_list __args)
- __attribute__ ((__format__ (__printf__, 5, 0)));
+ _GL_ATTRIBUTE_FORMAT ((__printf__, 5, 0));
#ifdef __cplusplus
}
diff --git a/lib/version-etc-fsf.c b/lib/version-etc-fsf.c
index c821583..e1c69da 100644
--- a/lib/version-etc-fsf.c
+++ b/lib/version-etc-fsf.c
@@ -1,5 +1,5 @@
/* Variable with FSF copyright information, for version-etc.
- Copyright (C) 1999-2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 1999-2006, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/version-etc.c b/lib/version-etc.c
index b8d4724..b7d23ab 100644
--- a/lib/version-etc.c
+++ b/lib/version-etc.c
@@ -1,5 +1,5 @@
/* Print --version and bug-reporting information in a consistent format.
- Copyright (C) 1999-2011 Free Software Foundation, Inc.
+ Copyright (C) 1999-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -38,7 +38,7 @@
# define PACKAGE PACKAGE_TARNAME
#endif
-enum { COPYRIGHT_YEAR = 2011 };
+enum { COPYRIGHT_YEAR = 2013 };
/* The three functions below display the --version information the
standard way.
diff --git a/lib/version-etc.h b/lib/version-etc.h
index a9b313d..6c3d084 100644
--- a/lib/version-etc.h
+++ b/lib/version-etc.h
@@ -1,5 +1,5 @@
/* Print --version and bug-reporting information in a consistent format.
- Copyright (C) 1999, 2003, 2005, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2003, 2005, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
# include <stdarg.h>
# include <stdio.h>
-/* The `sentinel' attribute was added in gcc 4.0. */
+/* The 'sentinel' attribute was added in gcc 4.0. */
#ifndef _GL_ATTRIBUTE_SENTINEL
# if 4 <= __GNUC__
# define _GL_ATTRIBUTE_SENTINEL __attribute__ ((__sentinel__))
@@ -37,7 +37,7 @@ extern const char version_etc_copyright[];
standard way: command and package names, package version, followed
by a short GPLv3+ notice and a list of up to 10 author names.
- If COMMAND_NAME is NULL, the PACKAGE is asumed to be the name of
+ If COMMAND_NAME is NULL, the PACKAGE is assumed to be the name of
the program. The formats are therefore:
PACKAGE VERSION
@@ -72,7 +72,7 @@ extern void version_etc (FILE *stream,
/* const char *author1, ..., NULL */ ...)
_GL_ATTRIBUTE_SENTINEL;
-/* Display the usual `Report bugs to' stanza */
+/* Display the usual "Report bugs to" stanza. */
extern void emit_bug_reporting_address (void);
#endif /* VERSION_ETC_H */
diff --git a/lib/w32spawn.h b/lib/w32spawn.h
index 58b0392..3b5c08a 100644
--- a/lib/w32spawn.h
+++ b/lib/w32spawn.h
@@ -1,5 +1,5 @@
-/* Auxiliary functions for the creation of subprocesses. Native Woe32 API.
- Copyright (C) 2001, 2003-2011 Free Software Foundation, Inc.
+/* Auxiliary functions for the creation of subprocesses. Native Windows API.
+ Copyright (C) 2001, 2003-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
@@ -15,11 +15,11 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-/* Get declarations of the Win32 API functions. */
+/* Get declarations of the native Windows API functions. */
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
-/* Get _get_osfhandle() and _open_osfhandle(). */
+/* Get _open_osfhandle(). */
#include <io.h>
#include <stdbool.h>
@@ -27,6 +27,9 @@
#include <unistd.h>
#include <errno.h>
+/* Get _get_osfhandle(). */
+#include "msvc-nothrow.h"
+
#include "cloexec.h"
#include "xalloc.h"
@@ -98,7 +101,7 @@ undup_safer_noinherit (int tempfd, int origfd)
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()
+ CreateProcess(). We must quote the arguments since Windows CreateProcess()
interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
special way:
- Space and tab are interpreted as delimiters. They are not treated as
@@ -112,8 +115,15 @@ undup_safer_noinherit (int tempfd, int origfd)
\" -> "
\\\" -> \"
\\\\\" -> \\"
+ - '*', '?' characters may get expanded through wildcard expansion in the
+ callee: By default, in the callee, the initialization code before main()
+ takes the result of GetCommandLine(), wildcard-expands it, and passes it
+ to main(). The exceptions to this rule are:
+ - programs that inspect GetCommandLine() and ignore argv,
+ - mingw programs that have a global variable 'int _CRT_glob = 0;',
+ - Cygwin programs, when invoked from a Cygwin program.
*/
-#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_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"
static char **
prepare_spawn (char **argv)
@@ -133,7 +143,7 @@ prepare_spawn (char **argv)
script, not a program.
On Unix, this would be "/bin/sh". On native Windows, "sh" is actually
"sh.exe". We have to omit the directory part and rely on the search in
- PATH, because the mingw "mount points" are not visible inside Win32
+ PATH, because the mingw "mount points" are not visible inside Windows
CreateProcess(). */
*new_argv++ = "sh.exe";
diff --git a/lib/wait-process.c b/lib/wait-process.c
index 37ca7b9..17a2430 100644
--- a/lib/wait-process.c
+++ b/lib/wait-process.c
@@ -1,5 +1,5 @@
/* Waiting for a subprocess to finish.
- Copyright (C) 2001-2003, 2005-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2013 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
@@ -171,7 +171,7 @@ register_slave_subprocess (pid_t child)
}
/* Unregister a child from the list of slave subprocesses. */
-static inline void
+static void
unregister_slave_subprocess (pid_t child)
{
/* The easiest way to remove an entry from a list that can be used by
diff --git a/lib/wait-process.h b/lib/wait-process.h
index 3c178c1..6d8f0d2 100644
--- a/lib/wait-process.h
+++ b/lib/wait-process.h
@@ -1,5 +1,5 @@
/* Waiting for a subprocess to finish.
- Copyright (C) 2001-2003, 2006, 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006, 2008-2013 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/waitpid.c b/lib/waitpid.c
index ee8b472..d28a70b 100644
--- a/lib/waitpid.c
+++ b/lib/waitpid.c
@@ -1,5 +1,5 @@
/* Wait for process state change.
- Copyright (C) 2001-2003, 2005-2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,15 +12,14 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
/* Specification. */
#include <sys/wait.h>
-/* Implementation for native Win32 systems. */
+/* Implementation for native Windows systems. */
#include <process.h> /* for _cwait, WAIT_CHILD */
diff --git a/lib/wchar.in.h b/lib/wchar.in.h
index 49e502f..b6e4362 100644
--- a/lib/wchar.in.h
+++ b/lib/wchar.in.h
@@ -1,6 +1,6 @@
/* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
/* Written by Eric Blake. */
@@ -49,7 +48,7 @@
#else
/* Normal invocation convention. */
-#ifndef _GL_WCHAR_H
+#ifndef _@GUARD_PREFIX@_WCHAR_H
#define _GL_ALREADY_INCLUDING_WCHAR_H
@@ -61,9 +60,13 @@
<wchar.h>.
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
included before <wchar.h>.
+ In some builds of uClibc, <wchar.h> is nonexistent and wchar_t is defined
+ by <stddef.h>.
But avoid namespace pollution on glibc systems. */
-#ifndef __GLIBC__
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
# include <stddef.h>
+#endif
+#ifndef __GLIBC__
# include <stdio.h>
# include <time.h>
#endif
@@ -77,8 +80,16 @@
#undef _GL_ALREADY_INCLUDING_WCHAR_H
-#ifndef _GL_WCHAR_H
-#define _GL_WCHAR_H
+#ifndef _@GUARD_PREFIX@_WCHAR_H
+#define _@GUARD_PREFIX@_WCHAR_H
+
+/* The __attribute__ feature is available in gcc versions 2.5 and later.
+ The attribute __pure__ was added in gcc 2.96. */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#else
+# define _GL_ATTRIBUTE_PURE /* empty */
+#endif
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
@@ -94,6 +105,18 @@
# define WEOF -1
# endif
#else
+/* MSVC defines wint_t as 'unsigned short' in <crtdefs.h>.
+ 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 <crtdefs.h>
+typedef unsigned int rpl_wint_t;
+# undef wint_t
+# define wint_t rpl_wint_t
+# define GNULIB_defined_wint_t 1
+# endif
+# endif
# ifndef WEOF
# define WEOF ((wint_t) -1)
# endif
@@ -120,11 +143,11 @@ typedef int rpl_mbstate_t;
# undef btowc
# define btowc rpl_btowc
# endif
-_GL_FUNCDECL_RPL (btowc, wint_t, (int c));
+_GL_FUNCDECL_RPL (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE);
_GL_CXXALIAS_RPL (btowc, wint_t, (int c));
# else
# if !@HAVE_BTOWC@
-_GL_FUNCDECL_SYS (btowc, wint_t, (int c));
+_GL_FUNCDECL_SYS (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE);
# endif
_GL_CXXALIAS_SYS (btowc, wint_t, (int c));
# endif
@@ -145,12 +168,12 @@ _GL_WARN_ON_USE (btowc, "btowc is unportable - "
# undef wctob
# define wctob rpl_wctob
# endif
-_GL_FUNCDECL_RPL (wctob, int, (wint_t wc));
+_GL_FUNCDECL_RPL (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE);
_GL_CXXALIAS_RPL (wctob, int, (wint_t wc));
# else
# if !defined wctob && !@HAVE_DECL_WCTOB@
/* wctob is provided by gnulib, or wctob exists but is not declared. */
-_GL_FUNCDECL_SYS (wctob, int, (wint_t wc));
+_GL_FUNCDECL_SYS (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE);
# endif
_GL_CXXALIAS_SYS (wctob, int, (wint_t wc));
# endif
@@ -411,12 +434,12 @@ _GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - "
# undef wcwidth
# define wcwidth rpl_wcwidth
# endif
-_GL_FUNCDECL_RPL (wcwidth, int, (wchar_t));
+_GL_FUNCDECL_RPL (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE);
_GL_CXXALIAS_RPL (wcwidth, int, (wchar_t));
# else
# if !@HAVE_DECL_WCWIDTH@
/* wcwidth exists but is not declared. */
-_GL_FUNCDECL_SYS (wcwidth, int, (wchar_t));
+_GL_FUNCDECL_SYS (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE);
# endif
_GL_CXXALIAS_SYS (wcwidth, int, (wchar_t));
# endif
@@ -433,10 +456,25 @@ _GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - "
/* Search N wide characters of S for C. */
#if @GNULIB_WMEMCHR@
# if !@HAVE_WMEMCHR@
-_GL_FUNCDECL_SYS (wmemchr, wchar_t *, (const wchar_t *s, wchar_t c, size_t n));
-# endif
-_GL_CXXALIAS_SYS (wmemchr, wchar_t *, (const wchar_t *s, wchar_t c, size_t n));
+_GL_FUNCDECL_SYS (wmemchr, wchar_t *, (const wchar_t *s, wchar_t c, size_t n)
+ _GL_ATTRIBUTE_PURE);
+# endif
+ /* On some systems, this function is defined as an overloaded function:
+ extern "C++" {
+ const wchar_t * std::wmemchr (const wchar_t *, wchar_t, size_t);
+ wchar_t * std::wmemchr (wchar_t *, wchar_t, size_t);
+ } */
+_GL_CXXALIAS_SYS_CAST2 (wmemchr,
+ wchar_t *, (const wchar_t *, wchar_t, size_t),
+ const wchar_t *, (const wchar_t *, wchar_t, size_t));
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (wmemchr, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
+_GL_CXXALIASWARN1 (wmemchr, const wchar_t *,
+ (const wchar_t *s, wchar_t c, size_t n));
+# else
_GL_CXXALIASWARN (wmemchr);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef wmemchr
# if HAVE_RAW_DECL_WMEMCHR
@@ -450,7 +488,8 @@ _GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - "
#if @GNULIB_WMEMCMP@
# if !@HAVE_WMEMCMP@
_GL_FUNCDECL_SYS (wmemcmp, int,
- (const wchar_t *s1, const wchar_t *s2, size_t n));
+ (const wchar_t *s1, const wchar_t *s2, size_t n)
+ _GL_ATTRIBUTE_PURE);
# endif
_GL_CXXALIAS_SYS (wmemcmp, int,
(const wchar_t *s1, const wchar_t *s2, size_t n));
@@ -520,7 +559,7 @@ _GL_WARN_ON_USE (wmemset, "wmemset is unportable - "
/* Return the number of wide characters in S. */
#if @GNULIB_WCSLEN@
# if !@HAVE_WCSLEN@
-_GL_FUNCDECL_SYS (wcslen, size_t, (const wchar_t *s));
+_GL_FUNCDECL_SYS (wcslen, size_t, (const wchar_t *s) _GL_ATTRIBUTE_PURE);
# endif
_GL_CXXALIAS_SYS (wcslen, size_t, (const wchar_t *s));
_GL_CXXALIASWARN (wcslen);
@@ -536,7 +575,8 @@ _GL_WARN_ON_USE (wcslen, "wcslen is unportable - "
/* Return the number of wide characters in S, but at most MAXLEN. */
#if @GNULIB_WCSNLEN@
# if !@HAVE_WCSNLEN@
-_GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen));
+_GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen)
+ _GL_ATTRIBUTE_PURE);
# endif
_GL_CXXALIAS_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen));
_GL_CXXALIASWARN (wcsnlen);
@@ -655,7 +695,8 @@ _GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - "
/* Compare S1 and S2. */
#if @GNULIB_WCSCMP@
# if !@HAVE_WCSCMP@
-_GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2));
+_GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)
+ _GL_ATTRIBUTE_PURE);
# endif
_GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2));
_GL_CXXALIASWARN (wcscmp);
@@ -672,7 +713,8 @@ _GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - "
#if @GNULIB_WCSNCMP@
# if !@HAVE_WCSNCMP@
_GL_FUNCDECL_SYS (wcsncmp, int,
- (const wchar_t *s1, const wchar_t *s2, size_t n));
+ (const wchar_t *s1, const wchar_t *s2, size_t n)
+ _GL_ATTRIBUTE_PURE);
# endif
_GL_CXXALIAS_SYS (wcsncmp, int,
(const wchar_t *s1, const wchar_t *s2, size_t n));
@@ -689,7 +731,8 @@ _GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - "
/* Compare S1 and S2, ignoring case. */
#if @GNULIB_WCSCASECMP@
# if !@HAVE_WCSCASECMP@
-_GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2));
+_GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2)
+ _GL_ATTRIBUTE_PURE);
# endif
_GL_CXXALIAS_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2));
_GL_CXXALIASWARN (wcscasecmp);
@@ -706,7 +749,8 @@ _GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - "
#if @GNULIB_WCSNCASECMP@
# if !@HAVE_WCSNCASECMP@
_GL_FUNCDECL_SYS (wcsncasecmp, int,
- (const wchar_t *s1, const wchar_t *s2, size_t n));
+ (const wchar_t *s1, const wchar_t *s2, size_t n)
+ _GL_ATTRIBUTE_PURE);
# endif
_GL_CXXALIAS_SYS (wcsncasecmp, int,
(const wchar_t *s1, const wchar_t *s2, size_t n));
@@ -774,10 +818,24 @@ _GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - "
/* Find the first occurrence of WC in WCS. */
#if @GNULIB_WCSCHR@
# if !@HAVE_WCSCHR@
-_GL_FUNCDECL_SYS (wcschr, wchar_t *, (const wchar_t *wcs, wchar_t wc));
-# endif
-_GL_CXXALIAS_SYS (wcschr, wchar_t *, (const wchar_t *wcs, wchar_t wc));
+_GL_FUNCDECL_SYS (wcschr, wchar_t *, (const wchar_t *wcs, wchar_t wc)
+ _GL_ATTRIBUTE_PURE);
+# endif
+ /* On some systems, this function is defined as an overloaded function:
+ extern "C++" {
+ const wchar_t * std::wcschr (const wchar_t *, wchar_t);
+ wchar_t * std::wcschr (wchar_t *, wchar_t);
+ } */
+_GL_CXXALIAS_SYS_CAST2 (wcschr,
+ wchar_t *, (const wchar_t *, wchar_t),
+ const wchar_t *, (const wchar_t *, wchar_t));
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (wcschr, wchar_t *, (wchar_t *wcs, wchar_t wc));
+_GL_CXXALIASWARN1 (wcschr, const wchar_t *, (const wchar_t *wcs, wchar_t wc));
+# else
_GL_CXXALIASWARN (wcschr);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef wcschr
# if HAVE_RAW_DECL_WCSCHR
@@ -790,10 +848,24 @@ _GL_WARN_ON_USE (wcschr, "wcschr is unportable - "
/* Find the last occurrence of WC in WCS. */
#if @GNULIB_WCSRCHR@
# if !@HAVE_WCSRCHR@
-_GL_FUNCDECL_SYS (wcsrchr, wchar_t *, (const wchar_t *wcs, wchar_t wc));
-# endif
-_GL_CXXALIAS_SYS (wcsrchr, wchar_t *, (const wchar_t *wcs, wchar_t wc));
+_GL_FUNCDECL_SYS (wcsrchr, wchar_t *, (const wchar_t *wcs, wchar_t wc)
+ _GL_ATTRIBUTE_PURE);
+# endif
+ /* On some systems, this function is defined as an overloaded function:
+ extern "C++" {
+ const wchar_t * std::wcsrchr (const wchar_t *, wchar_t);
+ wchar_t * std::wcsrchr (wchar_t *, wchar_t);
+ } */
+_GL_CXXALIAS_SYS_CAST2 (wcsrchr,
+ wchar_t *, (const wchar_t *, wchar_t),
+ const wchar_t *, (const wchar_t *, wchar_t));
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (wcsrchr, wchar_t *, (wchar_t *wcs, wchar_t wc));
+_GL_CXXALIASWARN1 (wcsrchr, const wchar_t *, (const wchar_t *wcs, wchar_t wc));
+# else
_GL_CXXALIASWARN (wcsrchr);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef wcsrchr
# if HAVE_RAW_DECL_WCSRCHR
@@ -807,7 +879,8 @@ _GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - "
of wide characters not in REJECT. */
#if @GNULIB_WCSCSPN@
# if !@HAVE_WCSCSPN@
-_GL_FUNCDECL_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject));
+_GL_FUNCDECL_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject)
+ _GL_ATTRIBUTE_PURE);
# endif
_GL_CXXALIAS_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject));
_GL_CXXALIASWARN (wcscspn);
@@ -824,7 +897,8 @@ _GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - "
of wide characters in ACCEPT. */
#if @GNULIB_WCSSPN@
# if !@HAVE_WCSSPN@
-_GL_FUNCDECL_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept));
+_GL_FUNCDECL_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept)
+ _GL_ATTRIBUTE_PURE);
# endif
_GL_CXXALIAS_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept));
_GL_CXXALIASWARN (wcsspn);
@@ -841,11 +915,26 @@ _GL_WARN_ON_USE (wcsspn, "wcsspn is unportable - "
#if @GNULIB_WCSPBRK@
# if !@HAVE_WCSPBRK@
_GL_FUNCDECL_SYS (wcspbrk, wchar_t *,
- (const wchar_t *wcs, const wchar_t *accept));
-# endif
-_GL_CXXALIAS_SYS (wcspbrk, wchar_t *,
- (const wchar_t *wcs, const wchar_t *accept));
+ (const wchar_t *wcs, const wchar_t *accept)
+ _GL_ATTRIBUTE_PURE);
+# endif
+ /* On some systems, this function is defined as an overloaded function:
+ extern "C++" {
+ const wchar_t * std::wcspbrk (const wchar_t *, const wchar_t *);
+ wchar_t * std::wcspbrk (wchar_t *, const wchar_t *);
+ } */
+_GL_CXXALIAS_SYS_CAST2 (wcspbrk,
+ wchar_t *, (const wchar_t *, const wchar_t *),
+ const wchar_t *, (const wchar_t *, const wchar_t *));
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (wcspbrk, wchar_t *,
+ (wchar_t *wcs, const wchar_t *accept));
+_GL_CXXALIASWARN1 (wcspbrk, const wchar_t *,
+ (const wchar_t *wcs, const wchar_t *accept));
+# else
_GL_CXXALIASWARN (wcspbrk);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef wcspbrk
# if HAVE_RAW_DECL_WCSPBRK
@@ -859,11 +948,26 @@ _GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - "
#if @GNULIB_WCSSTR@
# if !@HAVE_WCSSTR@
_GL_FUNCDECL_SYS (wcsstr, wchar_t *,
- (const wchar_t *haystack, const wchar_t *needle));
-# endif
-_GL_CXXALIAS_SYS (wcsstr, wchar_t *,
- (const wchar_t *haystack, const wchar_t *needle));
+ (const wchar_t *haystack, const wchar_t *needle)
+ _GL_ATTRIBUTE_PURE);
+# endif
+ /* On some systems, this function is defined as an overloaded function:
+ extern "C++" {
+ const wchar_t * std::wcsstr (const wchar_t *, const wchar_t *);
+ wchar_t * std::wcsstr (wchar_t *, const wchar_t *);
+ } */
+_GL_CXXALIAS_SYS_CAST2 (wcsstr,
+ wchar_t *, (const wchar_t *, const wchar_t *),
+ const wchar_t *, (const wchar_t *, const wchar_t *));
+# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
+ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+_GL_CXXALIASWARN1 (wcsstr, wchar_t *,
+ (wchar_t *haystack, const wchar_t *needle));
+_GL_CXXALIASWARN1 (wcsstr, const wchar_t *,
+ (const wchar_t *haystack, const wchar_t *needle));
+# else
_GL_CXXALIASWARN (wcsstr);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef wcsstr
# if HAVE_RAW_DECL_WCSSTR
@@ -899,11 +1003,13 @@ _GL_WARN_ON_USE (wcstok, "wcstok is unportable - "
# undef wcswidth
# define wcswidth rpl_wcswidth
# endif
-_GL_FUNCDECL_RPL (wcswidth, int, (const wchar_t *s, size_t n));
+_GL_FUNCDECL_RPL (wcswidth, int, (const wchar_t *s, size_t n)
+ _GL_ATTRIBUTE_PURE);
_GL_CXXALIAS_RPL (wcswidth, int, (const wchar_t *s, size_t n));
# else
# if !@HAVE_WCSWIDTH@
-_GL_FUNCDECL_SYS (wcswidth, int, (const wchar_t *s, size_t n));
+_GL_FUNCDECL_SYS (wcswidth, int, (const wchar_t *s, size_t n)
+ _GL_ATTRIBUTE_PURE);
# endif
_GL_CXXALIAS_SYS (wcswidth, int, (const wchar_t *s, size_t n));
# endif
@@ -917,6 +1023,6 @@ _GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - "
#endif
-#endif /* _GL_WCHAR_H */
-#endif /* _GL_WCHAR_H */
+#endif /* _@GUARD_PREFIX@_WCHAR_H */
+#endif /* _@GUARD_PREFIX@_WCHAR_H */
#endif
diff --git a/lib/wcrtomb.c b/lib/wcrtomb.c
index 6632589..da42809 100644
--- a/lib/wcrtomb.c
+++ b/lib/wcrtomb.c
@@ -1,5 +1,5 @@
/* Convert wide character to multibyte character.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/wctype-h.c b/lib/wctype-h.c
new file mode 100644
index 0000000..bb5f847
--- /dev/null
+++ b/lib/wctype-h.c
@@ -0,0 +1,4 @@
+/* Normally this would be wctype.c, but that name's already taken. */
+#include <config.h>
+#define _GL_WCTYPE_INLINE _GL_EXTERN_INLINE
+#include "wctype.h"
diff --git a/lib/wctype.in.h b/lib/wctype.in.h
index 65879aa..10b5c33 100644
--- a/lib/wctype.in.h
+++ b/lib/wctype.in.h
@@ -1,6 +1,6 @@
/* A substitute for ISO C99 <wctype.h>, for platforms that lack it.
- Copyright (C) 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
/* Written by Bruno Haible and Paul Eggert. */
@@ -26,7 +25,7 @@
* wctrans_t, and wctype_t are not yet implemented.
*/
-#ifndef _GL_WCTYPE_H
+#ifndef _@GUARD_PREFIX@_WCTYPE_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
@@ -45,6 +44,13 @@
# include <wchar.h>
#endif
+/* mingw has declarations of towupper and towlower in <ctype.h> as
+ well <wctype.h>. Include <ctype.h> in advance to avoid rpl_ prefix
+ being added to the declarations. */
+#ifdef __MINGW32__
+# include <ctype.h>
+#endif
+
/* Include the original <wctype.h> if it exists.
BeOS 5 has the functions but no <wctype.h>. */
/* The include_next requires a split double-inclusion guard. */
@@ -52,13 +58,34 @@
# @INCLUDE_NEXT@ @NEXT_WCTYPE_H@
#endif
-#ifndef _GL_WCTYPE_H
-#define _GL_WCTYPE_H
+#ifndef _@GUARD_PREFIX@_WCTYPE_H
+#define _@GUARD_PREFIX@_WCTYPE_H
+
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_WCTYPE_INLINE
+# define _GL_WCTYPE_INLINE _GL_INLINE
+#endif
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
/* The definition of _GL_WARN_ON_USE is copied here. */
+/* Solaris 2.6 <wctype.h> includes <widec.h> which includes <euc.h> which
+ #defines a number of identifiers in the application namespace. Revert
+ these #defines. */
+#ifdef __sun
+# undef multibyte
+# undef eucw1
+# undef eucw2
+# undef eucw3
+# undef scrw1
+# undef scrw2
+# undef scrw3
+#endif
+
/* Define wint_t and WEOF. (Also done in wchar.in.h.) */
#if !@HAVE_WINT_T@ && !defined wint_t
# define wint_t int
@@ -66,6 +93,18 @@
# define WEOF -1
# endif
#else
+/* MSVC defines wint_t as 'unsigned short' in <crtdefs.h>.
+ 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 <crtdefs.h>
+typedef unsigned int rpl_wint_t;
+# undef wint_t
+# define wint_t rpl_wint_t
+# define GNULIB_defined_wint_t 1
+# endif
+# endif
# ifndef WEOF
# define WEOF ((wint_t) -1)
# endif
@@ -115,12 +154,16 @@
# 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
+_GL_WCTYPE_INLINE int
# if @REPLACE_ISWCNTRL@
rpl_iswalnum
# else
@@ -132,7 +175,7 @@ iswalnum
|| ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'));
}
-static inline int
+_GL_WCTYPE_INLINE int
# if @REPLACE_ISWCNTRL@
rpl_iswalpha
# else
@@ -143,7 +186,7 @@ iswalpha
return (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z';
}
-static inline int
+_GL_WCTYPE_INLINE int
# if @REPLACE_ISWCNTRL@
rpl_iswblank
# else
@@ -154,7 +197,7 @@ iswblank
return wc == ' ' || wc == '\t';
}
-static inline int
+_GL_WCTYPE_INLINE int
# if @REPLACE_ISWCNTRL@
rpl_iswcntrl
# else
@@ -165,7 +208,7 @@ iswcntrl
return (wc & ~0x1f) == 0 || wc == 0x7f;
}
-static inline int
+_GL_WCTYPE_INLINE int
# if @REPLACE_ISWCNTRL@
rpl_iswdigit
# else
@@ -176,7 +219,7 @@ iswdigit
return wc >= '0' && wc <= '9';
}
-static inline int
+_GL_WCTYPE_INLINE int
# if @REPLACE_ISWCNTRL@
rpl_iswgraph
# else
@@ -187,7 +230,7 @@ iswgraph
return wc >= '!' && wc <= '~';
}
-static inline int
+_GL_WCTYPE_INLINE int
# if @REPLACE_ISWCNTRL@
rpl_iswlower
# else
@@ -198,7 +241,7 @@ iswlower
return wc >= 'a' && wc <= 'z';
}
-static inline int
+_GL_WCTYPE_INLINE int
# if @REPLACE_ISWCNTRL@
rpl_iswprint
# else
@@ -209,7 +252,7 @@ iswprint
return wc >= ' ' && wc <= '~';
}
-static inline int
+_GL_WCTYPE_INLINE int
# if @REPLACE_ISWCNTRL@
rpl_iswpunct
# else
@@ -222,7 +265,7 @@ iswpunct
|| ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z')));
}
-static inline int
+_GL_WCTYPE_INLINE int
# if @REPLACE_ISWCNTRL@
rpl_iswspace
# else
@@ -234,7 +277,7 @@ iswspace
|| wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r');
}
-static inline int
+_GL_WCTYPE_INLINE int
# if @REPLACE_ISWCNTRL@
rpl_iswupper
# else
@@ -245,7 +288,7 @@ iswupper
return wc >= 'A' && wc <= 'Z';
}
-static inline int
+_GL_WCTYPE_INLINE int
# if @REPLACE_ISWCNTRL@
rpl_iswxdigit
# else
@@ -257,8 +300,8 @@ iswxdigit
|| ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F'));
}
-static inline wint_t
-# if @REPLACE_ISWCNTRL@
+_GL_WCTYPE_INLINE wint_t
+# if @REPLACE_TOWLOWER@
rpl_towlower
# else
towlower
@@ -268,8 +311,8 @@ towlower
return (wc >= 'A' && wc <= 'Z' ? wc - 'A' + 'a' : wc);
}
-static inline wint_t
-# if @REPLACE_ISWCNTRL@
+_GL_WCTYPE_INLINE wint_t
+# if @REPLACE_TOWLOWER@
rpl_towupper
# else
towupper
@@ -308,7 +351,7 @@ _GL_FUNCDECL_SYS (iswblank, int, (wint_t wc));
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
+_GL_WCTYPE_INLINE wint_t
rpl_towlower (wint_t wc)
{
return (wint_t) (wchar_t) towlower (wc);
@@ -317,7 +360,7 @@ rpl_towlower (wint_t wc)
# define towlower rpl_towlower
# endif
-static inline wint_t
+_GL_WCTYPE_INLINE wint_t
rpl_towupper (wint_t wc)
{
return (wint_t) (wchar_t) towupper (wc);
@@ -416,7 +459,7 @@ _GL_WARN_ON_USE (iswctype, "iswctype is unportable - "
# endif
#endif
-#if @REPLACE_ISWCNTRL@ || defined __MINGW32__
+#if @REPLACE_TOWLOWER@ || defined __MINGW32__
_GL_CXXALIAS_RPL (towlower, wint_t, (wint_t wc));
_GL_CXXALIAS_RPL (towupper, wint_t, (wint_t wc));
#else
@@ -465,6 +508,7 @@ _GL_WARN_ON_USE (towctrans, "towctrans is unportable - "
# endif
#endif
+_GL_INLINE_HEADER_END
-#endif /* _GL_WCTYPE_H */
-#endif /* _GL_WCTYPE_H */
+#endif /* _@GUARD_PREFIX@_WCTYPE_H */
+#endif /* _@GUARD_PREFIX@_WCTYPE_H */
diff --git a/lib/xalloc-die.c b/lib/xalloc-die.c
index aba4a06..daa403b 100644
--- a/lib/xalloc-die.c
+++ b/lib/xalloc-die.c
@@ -1,6 +1,6 @@
/* Report a memory allocation failure and exit.
- Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2011 Free Software
+ Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2013 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@@ -33,7 +33,7 @@ xalloc_die (void)
{
error (exit_failure, 0, "%s", _("memory exhausted"));
- /* The `noreturn' cannot be given to error, since it may return if
+ /* _Noreturn cannot be given to error, since it may return if
its first argument is 0. To help compilers understand the
xalloc_die does not return, call abort. Also, the abort is a
safety feature if exit_failure is 0 (which shouldn't happen). */
diff --git a/lib/xalloc-oversized.h b/lib/xalloc-oversized.h
new file mode 100644
index 0000000..a971c78
--- /dev/null
+++ b/lib/xalloc-oversized.h
@@ -0,0 +1,38 @@
+/* xalloc-oversized.h -- memory allocation size checking
+
+ Copyright (C) 1990-2000, 2003-2004, 2006-2013 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef XALLOC_OVERSIZED_H_
+# define XALLOC_OVERSIZED_H_
+
+# include <stddef.h>
+
+/* Return 1 if an array of N objects, each of size S, cannot exist due
+ to size arithmetic overflow. S must be positive and N must be
+ nonnegative. This is a macro, not a function, so that it
+ works correctly even when SIZE_MAX < N.
+
+ By gnulib convention, SIZE_MAX represents overflow in size
+ calculations, so the conservative dividend to use here is
+ SIZE_MAX - 1, since SIZE_MAX might represent an overflowed value.
+ However, malloc (SIZE_MAX) fails on all known hosts where
+ sizeof (ptrdiff_t) <= sizeof (size_t), so do not bother to test for
+ exactly-SIZE_MAX allocations on such hosts; this avoids a test and
+ branch when S is known to be 1. */
+# define xalloc_oversized(n, s) \
+ ((size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) < (n))
+
+#endif /* !XALLOC_OVERSIZED_H_ */
diff --git a/lib/xalloc.h b/lib/xalloc.h
index 86b9b3e..6c9b53b 100644
--- a/lib/xalloc.h
+++ b/lib/xalloc.h
@@ -1,6 +1,6 @@
/* xalloc.h -- malloc with out-of-memory checking
- Copyright (C) 1990-2000, 2003-2004, 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 1990-2000, 2003-2004, 2006-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -16,40 +16,43 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef XALLOC_H_
-# define XALLOC_H_
+#define XALLOC_H_
-# include <stddef.h>
+#include <stddef.h>
+#include "xalloc-oversized.h"
-# ifdef __cplusplus
-extern "C" {
-# endif
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef XALLOC_INLINE
+# define XALLOC_INLINE _GL_INLINE
+#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
-# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)
-# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
-# else
-# define _GL_ATTRIBUTE_NORETURN /* empty */
-# endif
-# if __GNUC__ >= 3
-# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
-# else
-# define _GL_ATTRIBUTE_MALLOC
-# endif
+#if __GNUC__ >= 3
+# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
+#else
+# define _GL_ATTRIBUTE_MALLOC
+#endif
-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
-# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args))
-# else
-# define _GL_ATTRIBUTE_ALLOC_SIZE(args)
-# endif
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args))
+#else
+# define _GL_ATTRIBUTE_ALLOC_SIZE(args)
+#endif
/* This function is always triggered when memory is exhausted.
It must be defined by the application, either explicitly
or by using gnulib's xalloc-die module. This is the
function to call when one wants the program to die because of a
memory allocation failure. */
-extern void xalloc_die (void) _GL_ATTRIBUTE_NORETURN;
+extern _Noreturn void xalloc_die (void);
void *xmalloc (size_t s)
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1));
@@ -65,22 +68,6 @@ void *xmemdup (void const *p, size_t s)
char *xstrdup (char const *str)
_GL_ATTRIBUTE_MALLOC;
-/* Return 1 if an array of N objects, each of size S, cannot exist due
- to size arithmetic overflow. S must be positive and N must be
- nonnegative. This is a macro, not an inline function, so that it
- works correctly even when SIZE_MAX < N.
-
- By gnulib convention, SIZE_MAX represents overflow in size
- calculations, so the conservative dividend to use here is
- SIZE_MAX - 1, since SIZE_MAX might represent an overflowed value.
- However, malloc (SIZE_MAX) fails on all known hosts where
- sizeof (ptrdiff_t) <= sizeof (size_t), so do not bother to test for
- exactly-SIZE_MAX allocations on such hosts; this avoids a test and
- branch when S is known to be 1. */
-# define xalloc_oversized(n, s) \
- ((size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) < (n))
-
-
/* In the following macros, T must be an elementary or structure/union or
typedef'ed type, or a pointer to such a type. To apply one of the
following macros to a function pointer or array type, you need to typedef
@@ -88,45 +75,31 @@ char *xstrdup (char const *str)
/* Allocate an object of type T dynamically, with error checking. */
/* extern t *XMALLOC (typename t); */
-# define XMALLOC(t) ((t *) xmalloc (sizeof (t)))
+#define XMALLOC(t) ((t *) xmalloc (sizeof (t)))
/* Allocate memory for N elements of type T, with error checking. */
/* extern t *XNMALLOC (size_t n, typename t); */
-# define XNMALLOC(n, t) \
- ((t *) (sizeof (t) == 1 ? xmalloc (n) : xnmalloc (n, sizeof (t))))
+#define XNMALLOC(n, t) \
+ ((t *) (sizeof (t) == 1 ? xmalloc (n) : xnmalloc (n, sizeof (t))))
/* Allocate an object of type T dynamically, with error checking,
and zero it. */
/* extern t *XZALLOC (typename t); */
-# define XZALLOC(t) ((t *) xzalloc (sizeof (t)))
+#define XZALLOC(t) ((t *) xzalloc (sizeof (t)))
/* Allocate memory for N elements of type T, with error checking,
and zero it. */
/* extern t *XCALLOC (size_t n, typename t); */
-# define XCALLOC(n, t) \
- ((t *) (sizeof (t) == 1 ? xzalloc (n) : xcalloc (n, sizeof (t))))
+#define XCALLOC(n, t) \
+ ((t *) (sizeof (t) == 1 ? xzalloc (n) : xcalloc (n, sizeof (t))))
-# if HAVE_INLINE
-# define static_inline static inline
-# else
-void *xnmalloc (size_t n, size_t s)
- _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2));
-void *xnrealloc (void *p, size_t n, size_t s)
- _GL_ATTRIBUTE_ALLOC_SIZE ((2, 3));
-void *x2nrealloc (void *p, size_t *pn, size_t s);
-char *xcharalloc (size_t n)
- _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1));
-# endif
-
-# ifdef static_inline
-
/* Allocate an array of N objects, each with S bytes of memory,
dynamically, with error checking. S must be nonzero. */
-static_inline void *xnmalloc (size_t n, size_t s)
+XALLOC_INLINE void *xnmalloc (size_t n, size_t s)
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2));
-static_inline void *
+XALLOC_INLINE void *
xnmalloc (size_t n, size_t s)
{
if (xalloc_oversized (n, s))
@@ -137,9 +110,9 @@ xnmalloc (size_t n, size_t s)
/* Change the size of an allocated block of memory P to an array of N
objects each of S bytes, with error checking. S must be nonzero. */
-static_inline void *xnrealloc (void *p, size_t n, size_t s)
+XALLOC_INLINE void *xnrealloc (void *p, size_t n, size_t s)
_GL_ATTRIBUTE_ALLOC_SIZE ((2, 3));
-static_inline void *
+XALLOC_INLINE void *
xnrealloc (void *p, size_t n, size_t s)
{
if (xalloc_oversized (n, s))
@@ -202,7 +175,7 @@ xnrealloc (void *p, size_t n, size_t s)
*/
-static_inline void *
+XALLOC_INLINE void *
x2nrealloc (void *p, size_t *pn, size_t s)
{
size_t n = *pn;
@@ -213,9 +186,9 @@ x2nrealloc (void *p, size_t *pn, size_t s)
{
/* The approximate size to use for initial small allocation
requests, when the invoking code specifies an old size of
- zero. 64 bytes is the largest "small" request for the
- GNU C library malloc. */
- enum { DEFAULT_MXFAST = 64 };
+ zero. This is the largest "small" request for the GNU C
+ library malloc. */
+ enum { DEFAULT_MXFAST = 64 * sizeof (size_t) / 4 };
n = DEFAULT_MXFAST / s;
n += !n;
@@ -239,17 +212,15 @@ x2nrealloc (void *p, size_t *pn, size_t s)
/* Return a pointer to a new buffer of N bytes. This is like xmalloc,
except it returns char *. */
-static_inline char *xcharalloc (size_t n)
+XALLOC_INLINE char *xcharalloc (size_t n)
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1));
-static_inline char *
+XALLOC_INLINE char *
xcharalloc (size_t n)
{
return XNMALLOC (n, char);
}
-# endif
-
-# ifdef __cplusplus
+#ifdef __cplusplus
}
/* C++ does not allow conversions from void * to other pointer types
@@ -286,7 +257,7 @@ xmemdup (T const *p, size_t s)
return (T *) xmemdup ((void const *) p, s);
}
-# endif
+#endif
#endif /* !XALLOC_H_ */
diff --git a/lib/xasprintf.c b/lib/xasprintf.c
index 05e6e7e..1808b70 100644
--- a/lib/xasprintf.c
+++ b/lib/xasprintf.c
@@ -1,5 +1,5 @@
/* vasprintf and asprintf with out-of-memory checking.
- Copyright (C) 1999, 2002-2004, 2006, 2009-2011 Free Software Foundation,
+ Copyright (C) 1999, 2002-2004, 2006, 2009-2013 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/xmalloc.c b/lib/xmalloc.c
index 74a8614..57e34b7 100644
--- a/lib/xmalloc.c
+++ b/lib/xmalloc.c
@@ -1,6 +1,6 @@
/* xmalloc.c -- malloc with out of memory checking
- Copyright (C) 1990-2000, 2002-2006, 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 1990-2000, 2002-2006, 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,11 +17,9 @@
#include <config.h>
-#if ! HAVE_INLINE
-# define static_inline
-#endif
+#define XALLOC_INLINE _GL_EXTERN_INLINE
+
#include "xalloc.h"
-#undef static_inline
#include <stdlib.h>
#include <string.h>
@@ -52,8 +50,16 @@ xmalloc (size_t n)
void *
xrealloc (void *p, size_t n)
{
+ if (!n && p)
+ {
+ /* The GNU and C99 realloc behaviors disagree here. Act like
+ GNU, even if the underlying realloc is C99. */
+ free (p);
+ return NULL;
+ }
+
p = realloc (p, n);
- if (!p && n != 0)
+ if (!p && n)
xalloc_die ();
return p;
}
diff --git a/lib/xmalloca.c b/lib/xmalloca.c
index aec8459..50ee480 100644
--- a/lib/xmalloca.c
+++ b/lib/xmalloca.c
@@ -1,5 +1,5 @@
/* Safe automatic memory allocation with out of memory checking.
- Copyright (C) 2003, 2006-2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006-2007, 2009-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/xmalloca.h b/lib/xmalloca.h
index 12f7e3d..2f7567d 100644
--- a/lib/xmalloca.h
+++ b/lib/xmalloca.h
@@ -1,5 +1,5 @@
/* Safe automatic memory allocation with out of memory checking.
- Copyright (C) 2003, 2005, 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005, 2007, 2009-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/xprintf.c b/lib/xprintf.c
index edb97eb..e24b4f1 100644
--- a/lib/xprintf.c
+++ b/lib/xprintf.c
@@ -1,5 +1,5 @@
/* printf wrappers that fail immediately for non-file-related errors
- Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/xprintf.h b/lib/xprintf.h
index ca48ce7..62986a8 100644
--- a/lib/xprintf.h
+++ b/lib/xprintf.h
@@ -1,5 +1,5 @@
/* printf wrappers that fail immediately for non-file-related errors
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/xsize.c b/lib/xsize.c
new file mode 100644
index 0000000..4b4914c
--- /dev/null
+++ b/lib/xsize.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define XSIZE_INLINE _GL_EXTERN_INLINE
+#include "xsize.h"
diff --git a/lib/xsize.h b/lib/xsize.h
index 6505c42..5675593 100644
--- a/lib/xsize.h
+++ b/lib/xsize.h
@@ -1,6 +1,6 @@
/* xsize.h -- Checked size_t computations.
- Copyright (C) 2003, 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2008-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#ifndef _XSIZE_H
#define _XSIZE_H
@@ -28,6 +27,14 @@
# include <stdint.h>
#endif
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef XSIZE_INLINE
+# define XSIZE_INLINE _GL_INLINE
+#endif
+
/* The size of memory objects is often computed through expressions of
type size_t. Example:
void* p = malloc (header_size + n * element_size).
@@ -49,7 +56,7 @@
((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX)
/* Sum of two sizes, with overflow check. */
-static inline size_t
+XSIZE_INLINE size_t
#if __GNUC__ >= 3
__attribute__ ((__pure__))
#endif
@@ -60,7 +67,7 @@ xsum (size_t size1, size_t size2)
}
/* Sum of three sizes, with overflow check. */
-static inline size_t
+XSIZE_INLINE size_t
#if __GNUC__ >= 3
__attribute__ ((__pure__))
#endif
@@ -70,7 +77,7 @@ xsum3 (size_t size1, size_t size2, size_t size3)
}
/* Sum of four sizes, with overflow check. */
-static inline size_t
+XSIZE_INLINE size_t
#if __GNUC__ >= 3
__attribute__ ((__pure__))
#endif
@@ -80,7 +87,7 @@ xsum4 (size_t size1, size_t size2, size_t size3, size_t size4)
}
/* Maximum of two sizes, with overflow check. */
-static inline size_t
+XSIZE_INLINE size_t
#if __GNUC__ >= 3
__attribute__ ((__pure__))
#endif
@@ -93,7 +100,7 @@ xmax (size_t size1, size_t size2)
/* Multiplication of a count with an element size, with overflow check.
The count must be >= 0 and the element size must be > 0.
- This is a macro, not an inline function, so that it works correctly even
+ This is a macro, not a function, so that it works correctly even
when N is of a wider type and N > SIZE_MAX. */
#define xtimes(N, ELSIZE) \
((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX)
@@ -105,4 +112,6 @@ xmax (size_t size1, size_t size2)
#define size_in_bounds_p(SIZE) \
((SIZE) != SIZE_MAX)
+_GL_INLINE_HEADER_END
+
#endif /* _XSIZE_H */
diff --git a/lib/xstrndup.c b/lib/xstrndup.c
index d58302a..eae92d0 100644
--- a/lib/xstrndup.c
+++ b/lib/xstrndup.c
@@ -1,6 +1,6 @@
/* Duplicate a bounded initial segment of a string, with out-of-memory
checking.
- Copyright (C) 2003, 2006-2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006-2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/xstrndup.h b/lib/xstrndup.h
index f96a538..59673b0 100644
--- a/lib/xstrndup.h
+++ b/lib/xstrndup.h
@@ -1,6 +1,6 @@
/* Duplicate a bounded initial segment of a string, with out-of-memory
checking.
- Copyright (C) 2003, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/xvasprintf.c b/lib/xvasprintf.c
index 4a089ae..702b5e6 100644
--- a/lib/xvasprintf.c
+++ b/lib/xvasprintf.c
@@ -1,5 +1,5 @@
/* vasprintf and asprintf with out-of-memory checking.
- Copyright (C) 1999, 2002-2004, 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002-2004, 2006-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@
/* Checked size_t computations. */
#include "xsize.h"
-static inline char *
+static char *
xstrcat (size_t argcount, va_list args)
{
char *result;
diff --git a/lib/xvasprintf.h b/lib/xvasprintf.h
index 197c9ea..1208fa1 100644
--- a/lib/xvasprintf.h
+++ b/lib/xvasprintf.h
@@ -1,5 +1,5 @@
/* vasprintf and asprintf with out-of-memory checking.
- Copyright (C) 2002-2004, 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 2002-2004, 2006-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/m4/00gnulib.m4 b/m4/00gnulib.m4
index 7feed46..d4ad759 100644
--- a/m4/00gnulib.m4
+++ b/m4/00gnulib.m4
@@ -1,5 +1,5 @@
# 00gnulib.m4 serial 2
-dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/alloca.m4 b/m4/alloca.m4
index e2e8a05..270abd0 100644
--- a/m4/alloca.m4
+++ b/m4/alloca.m4
@@ -1,5 +1,5 @@
-# alloca.m4 serial 10
-dnl Copyright (C) 2002-2004, 2006-2007, 2009-2011 Free Software Foundation,
+# alloca.m4 serial 14
+dnl Copyright (C) 2002-2004, 2006-2007, 2009-2013 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -36,8 +36,86 @@ AC_DEFUN([gl_FUNC_ALLOCA],
ALLOCA_H=alloca.h
fi
AC_SUBST([ALLOCA_H])
+ AM_CONDITIONAL([GL_GENERATE_ALLOCA_H], [test -n "$ALLOCA_H"])
])
# Prerequisites of lib/alloca.c.
# STACK_DIRECTION is already handled by AC_FUNC_ALLOCA.
AC_DEFUN([gl_PREREQ_ALLOCA], [:])
+
+# This works around a bug in autoconf <= 2.68.
+# See <http://lists.gnu.org/archive/html/bug-gnulib/2011-06/msg00277.html>.
+
+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/m4/ansi-c++.m4 b/m4/ansi-c++.m4
index d6352ee..8319dd3 100644
--- a/m4/ansi-c++.m4
+++ b/m4/ansi-c++.m4
@@ -1,5 +1,5 @@
-# ansi-c++.m4 serial 7
-dnl Copyright (C) 2002-2003, 2005, 2010-2011 Free Software Foundation, Inc.
+# ansi-c++.m4 serial 9
+dnl Copyright (C) 2002-2003, 2005, 2010-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -41,7 +41,7 @@ AC_DEFUN([gl_CXX_CHOICE],
# gl_PROG_ANSI_CXX([ANSICXX_VARIABLE], [ANSICXX_CONDITIONAL])
# Sets ANSICXX_VARIABLE to the name of a sufficiently ANSI C++ compliant
-# compiler, or to ":" if none is found.
+# compiler, or to "no" if none is found.
# Defines the Automake condition ANSICXX_CONDITIONAL to true if such a compiler
# was found, or to false if not.
@@ -51,7 +51,7 @@ AC_DEFUN([gl_PROG_ANSI_CXX],
m4_if([$1], [CXX], [],
[gl_save_CXX="$CXX"])
if test "$CXX_CHOICE" = no; then
- CXX=":"
+ CXX=no
fi
if test -z "$CXX"; then
if test -n "$CCC"; then
@@ -62,7 +62,7 @@ AC_DEFUN([gl_PROG_ANSI_CXX],
[:])
fi
fi
- if test "$CXX" != ":"; then
+ if test "$CXX" != no; then
dnl Use a modified version of AC_PROG_CXX_WORKS that does not exit
dnl upon failure.
AC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works])
@@ -84,7 +84,7 @@ AC_DEFUN([gl_PROG_ANSI_CXX],
AC_LANG_POP([C++])
AC_MSG_RESULT([$gl_cv_prog_ansicxx_works])
if test $gl_cv_prog_ansicxx_works = no; then
- CXX=:
+ CXX=no
else
dnl Test for namespaces.
dnl We don't bother supporting pre-ANSI-C++ compilers.
@@ -105,7 +105,7 @@ EOF
AC_LANG_POP([C++])
AC_MSG_RESULT([$gl_cv_prog_ansicxx_namespaces])
if test $gl_cv_prog_ansicxx_namespaces = no; then
- CXX=:
+ CXX=no
fi
fi
fi
@@ -114,13 +114,13 @@ EOF
CXX="$gl_save_CXX"])
AC_SUBST([$1])
- AM_CONDITIONAL([$2], [test "$$1" != ":"])
+ AM_CONDITIONAL([$2], [test "$$1" != no])
- if test "$$1" != ":"; then
+ if test "$$1" != no; then
dnl This macro invocation resolves an automake error:
dnl /usr/local/share/automake-1.11/am/depend2.am: am__fastdepCXX does not appear in AM_CONDITIONAL
- dnl /usr/local/share/automake-1.11/am/depend2.am: The usual way to define `am__fastdepCXX' is to add `AC_PROG_CXX'
- dnl /usr/local/share/automake-1.11/am/depend2.am: to `configure.ac' and run `aclocal' and `autoconf' again.
+ dnl /usr/local/share/automake-1.11/am/depend2.am: The usual way to define 'am__fastdepCXX' is to add 'AC_PROG_CXX'
+ dnl /usr/local/share/automake-1.11/am/depend2.am: to 'configure.ac' and run 'aclocal' and 'autoconf' again.
_AM_DEPENDENCIES([CXX])
else
AM_CONDITIONAL([am__fastdepCXX], [false])
diff --git a/m4/asm-underscore.m4 b/m4/asm-underscore.m4
new file mode 100644
index 0000000..b1159d5
--- /dev/null
+++ b/m4/asm-underscore.m4
@@ -0,0 +1,71 @@
+# asm-underscore.m4 serial 2
+dnl Copyright (C) 2010-2013 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible. Based on as-underscore.m4 in GNU clisp.
+
+# gl_ASM_SYMBOL_PREFIX
+# Tests for the prefix of C symbols at the assembly language level and the
+# linker level. This prefix is either an underscore or empty. Defines the
+# C macro USER_LABEL_PREFIX to this prefix, and sets ASM_SYMBOL_PREFIX to
+# a stringified variant of this prefix.
+
+AC_DEFUN([gl_ASM_SYMBOL_PREFIX],
+[
+ dnl We don't use GCC's __USER_LABEL_PREFIX__ here, because
+ dnl 1. It works only for GCC.
+ dnl 2. It is incorrectly defined on some platforms, in some GCC versions.
+ AC_REQUIRE([gl_C_ASM])
+ AC_CACHE_CHECK(
+ [whether C symbols are prefixed with underscore at the linker level],
+ [gl_cv_prog_as_underscore],
+ [cat > conftest.c <<EOF
+#ifdef __cplusplus
+extern "C" int foo (void);
+#endif
+int foo(void) { return 0; }
+EOF
+ # Look for the assembly language name in the .s file.
+ AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1
+ if grep _foo conftest.$gl_asmext >/dev/null ; then
+ gl_cv_prog_as_underscore=yes
+ else
+ gl_cv_prog_as_underscore=no
+ fi
+ rm -f conftest*
+ ])
+ if test $gl_cv_prog_as_underscore = yes; then
+ USER_LABEL_PREFIX=_
+ else
+ USER_LABEL_PREFIX=
+ fi
+ AC_DEFINE_UNQUOTED([USER_LABEL_PREFIX], [$USER_LABEL_PREFIX],
+ [Define to the prefix of C symbols at the assembler and linker level,
+ either an underscore or empty.])
+ ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"'
+ AC_SUBST([ASM_SYMBOL_PREFIX])
+])
+
+# gl_C_ASM
+# Determines how to produce an assembly language file from C source code.
+# Sets the variables:
+# gl_asmext - the extension of assembly language output,
+# gl_c_asm_opt - the C compiler option that produces assembly language output.
+
+AC_DEFUN([gl_C_ASM],
+[
+ AC_EGREP_CPP([MicrosoftCompiler],
+ [
+#ifdef _MSC_VER
+MicrosoftCompiler
+#endif
+ ],
+ [gl_asmext='asm'
+ gl_c_asm_opt='-c -Fa'
+ ],
+ [gl_asmext='s'
+ gl_c_asm_opt='-S'
+ ])
+])
diff --git a/m4/assert.m4 b/m4/assert.m4
index 2de5ef5..013fade 100644
--- a/m4/assert.m4
+++ b/m4/assert.m4
@@ -1,6 +1,6 @@
#serial 7
-# Copyright (C) 1998-1999, 2001, 2004, 2008-2011 Free Software Foundation, Inc.
+# Copyright (C) 1998-1999, 2001, 2004, 2008-2013 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/m4/autobuild.m4 b/m4/autobuild.m4
index 04971d4..3147b5b 100644
--- a/m4/autobuild.m4
+++ b/m4/autobuild.m4
@@ -1,5 +1,5 @@
# autobuild.m4 serial 7
-dnl Copyright (C) 2004, 2006-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/btowc.m4 b/m4/btowc.m4
index 603298f..978a06e 100644
--- a/m4/btowc.m4
+++ b/m4/btowc.m4
@@ -1,5 +1,5 @@
-# btowc.m4 serial 8
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# btowc.m4 serial 10
+dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -108,11 +108,6 @@ int main ()
*) REPLACE_BTOWC=1 ;;
esac
fi
- if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
- gl_REPLACE_WCHAR_H
- AC_LIBOBJ([btowc])
- gl_PREREQ_BTOWC
- fi
])
# Prerequisites of lib/btowc.c.
diff --git a/m4/c-stack.m4 b/m4/c-stack.m4
index d613fa8..5760dbe 100644
--- a/m4/c-stack.m4
+++ b/m4/c-stack.m4
@@ -1,17 +1,16 @@
# Check prerequisites for compiling lib/c-stack.c.
-# Copyright (C) 2002-2004, 2008-2011 Free Software Foundation, Inc.
+# Copyright (C) 2002-2004, 2008-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.
# Written by Paul Eggert.
-# serial 12
+# serial 15
AC_DEFUN([AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC],
- [# for STACK_DIRECTION
- AC_REQUIRE([AC_FUNC_ALLOCA])
+ [
AC_REQUIRE([AC_CANONICAL_HOST])
AC_CHECK_FUNCS_ONCE([setrlimit])
AC_CHECK_HEADERS_ONCE([ucontext.h])
@@ -24,7 +23,7 @@ AC_DEFUN([AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC],
FAULT_YIELDS_SIGBUS=1 ;;
hpux*) # HP-UX
FAULT_YIELDS_SIGBUS=1 ;;
- macos* | darwin*) # MacOS X
+ macos* | darwin*) # Mac OS X
FAULT_YIELDS_SIGBUS=1 ;;
gnu*) # Hurd
FAULT_YIELDS_SIGBUS=1 ;;
@@ -339,7 +338,7 @@ AC_DEFUN([gl_PREREQ_C_STACK],
AC_REQUIRE([AC_FUNC_ALLOCA])
AC_CHECK_FUNCS_ONCE([sigaltstack])
- AC_CHECK_DECLS([sigaltstack], , , [#include <signal.h>])
+ AC_CHECK_DECLS([sigaltstack], , , [[#include <signal.h>]])
AC_CHECK_HEADERS_ONCE([unistd.h ucontext.h])
diff --git a/m4/canonicalize.m4 b/m4/canonicalize.m4
index dcc6039..cef3124 100644
--- a/m4/canonicalize.m4
+++ b/m4/canonicalize.m4
@@ -1,6 +1,6 @@
-# canonicalize.m4 serial 17
+# canonicalize.m4 serial 26
-dnl Copyright (C) 2003-2007, 2009-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2007, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -10,40 +10,49 @@ dnl with or without modifications, as long as this notice is preserved.
# not provide or fix realpath.
AC_DEFUN([gl_FUNC_CANONICALIZE_FILENAME_MODE],
[
- AC_LIBOBJ([canonicalize])
-
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_CHECK_FUNCS_ONCE([canonicalize_file_name])
AC_REQUIRE([gl_DOUBLE_SLASH_ROOT])
AC_REQUIRE([gl_FUNC_REALPATH_WORKS])
if test $ac_cv_func_canonicalize_file_name = no; then
HAVE_CANONICALIZE_FILE_NAME=0
- elif test "$gl_cv_func_realpath_works" != yes; then
- REPLACE_CANONICALIZE_FILE_NAME=1
+ else
+ case "$gl_cv_func_realpath_works" in
+ *yes) ;;
+ *) REPLACE_CANONICALIZE_FILE_NAME=1 ;;
+ esac
fi
])
# Provides canonicalize_file_name and realpath.
AC_DEFUN([gl_CANONICALIZE_LGPL],
[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_REQUIRE([gl_CANONICALIZE_LGPL_SEPARATE])
if test $ac_cv_func_canonicalize_file_name = no; then
HAVE_CANONICALIZE_FILE_NAME=0
- AC_LIBOBJ([canonicalize-lgpl])
if test $ac_cv_func_realpath = no; then
HAVE_REALPATH=0
- elif test "$gl_cv_func_realpath_works" != yes; then
- REPLACE_REALPATH=1
+ else
+ case "$gl_cv_func_realpath_works" in
+ *yes) ;;
+ *) REPLACE_REALPATH=1 ;;
+ esac
fi
- elif test "$gl_cv_func_realpath_works" != yes; then
- AC_LIBOBJ([canonicalize-lgpl])
- REPLACE_REALPATH=1
- REPLACE_CANONICALIZE_FILE_NAME=1
+ else
+ case "$gl_cv_func_realpath_works" in
+ *yes)
+ ;;
+ *)
+ REPLACE_CANONICALIZE_FILE_NAME=1
+ REPLACE_REALPATH=1
+ ;;
+ esac
fi
])
# Like gl_CANONICALIZE_LGPL, except prepare for separate compilation
-# (no AC_LIBOBJ).
+# (no REPLACE_CANONICALIZE_FILE_NAME, no REPLACE_REALPATH, no AC_LIBOBJ).
AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE],
[
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
@@ -59,11 +68,15 @@ AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE],
AC_DEFUN([gl_FUNC_REALPATH_WORKS],
[
AC_CHECK_FUNCS_ONCE([realpath])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether realpath works], [gl_cv_func_realpath_works], [
touch conftest.a
+ mkdir conftest.d
AC_RUN_IFELSE([
AC_LANG_PROGRAM([[
+ ]GL_NOCRASH[
#include <stdlib.h>
+ #include <string.h>
]], [[
int result = 0;
{
@@ -81,14 +94,31 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS],
if (name != NULL)
result |= 4;
}
+ {
+ char *name1 = realpath (".", NULL);
+ char *name2 = realpath ("conftest.d//./..", NULL);
+ if (strcmp (name1, name2) != 0)
+ result |= 8;
+ }
return result;
]])
- ], [gl_cv_func_realpath_works=yes], [gl_cv_func_realpath_works=no],
- [gl_cv_func_realpath_works="guessing no"])
+ ],
+ [gl_cv_func_realpath_works=yes],
+ [gl_cv_func_realpath_works=no],
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_realpath_works="guessing no" ;;
+ esac
+ ])
+ rm -rf conftest.a conftest.d
])
- if test "$gl_cv_func_realpath_works" = yes; then
- AC_DEFINE([FUNC_REALPATH_WORKS], [1], [Define to 1 if realpath()
- can malloc memory, always gives an absolute path, and handles
- trailing slash correctly.])
- fi
+ case "$gl_cv_func_realpath_works" in
+ *yes)
+ AC_DEFINE([FUNC_REALPATH_WORKS], [1], [Define to 1 if realpath()
+ can malloc memory, always gives an absolute path, and handles
+ trailing slash correctly.])
+ ;;
+ esac
])
diff --git a/m4/close-stream.m4 b/m4/close-stream.m4
index 2a7349c..0a80c37 100644
--- a/m4/close-stream.m4
+++ b/m4/close-stream.m4
@@ -1,13 +1,11 @@
-#serial 3
-dnl Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc.
+#serial 4
+dnl Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl Prerequisites of lib/close-stream.c.
AC_DEFUN([gl_CLOSE_STREAM],
[
- AC_LIBOBJ([close-stream])
-
- dnl Prerequisites of lib/close-stream.c.
:
])
diff --git a/m4/close.m4 b/m4/close.m4
index fc13138..bccd981 100644
--- a/m4/close.m4
+++ b/m4/close.m4
@@ -1,26 +1,33 @@
-# close.m4 serial 5
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# close.m4 serial 8
+dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
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.
- gl_REPLACE_CLOSE
+ 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
])
-])
-
-AC_DEFUN([gl_REPLACE_CLOSE],
-[
- AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
- REPLACE_CLOSE=1
- AC_LIBOBJ([close])
- gl_REPLACE_FCLOSE
])
diff --git a/m4/closedir.m4 b/m4/closedir.m4
new file mode 100644
index 0000000..bb8708b
--- /dev/null
+++ b/m4/closedir.m4
@@ -0,0 +1,25 @@
+# closedir.m4 serial 2
+dnl Copyright (C) 2011-2013 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_CLOSEDIR],
+[
+ AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
+
+ AC_CHECK_FUNCS([closedir])
+ if test $ac_cv_func_closedir = no; then
+ HAVE_CLOSEDIR=0
+ fi
+ dnl Replace closedir() for supporting the gnulib-defined fchdir() function,
+ dnl to keep fchdir's bookkeeping up-to-date.
+ m4_ifdef([gl_FUNC_FCHDIR], [
+ gl_TEST_FCHDIR
+ if test $HAVE_FCHDIR = 0; then
+ if test $HAVE_CLOSEDIR = 1; then
+ REPLACE_CLOSEDIR=1
+ fi
+ fi
+ ])
+])
diff --git a/m4/closein.m4 b/m4/closein.m4
index a5731ee..ca03c76 100644
--- a/m4/closein.m4
+++ b/m4/closein.m4
@@ -1,13 +1,11 @@
-# closein.m4 serial 1
-dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+# closein.m4 serial 2
+dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl Prerequisites of lib/closein.c.
AC_DEFUN([gl_CLOSEIN],
[
- AC_LIBOBJ([closein])
-
- dnl Prerequisites of lib/closein.c.
:
])
diff --git a/m4/closeout.m4 b/m4/closeout.m4
index 0586b32..759feaa 100644
--- a/m4/closeout.m4
+++ b/m4/closeout.m4
@@ -1,14 +1,12 @@
-# closeout.m4 serial 5
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation,
+# closeout.m4 serial 6
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2013 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl Prerequisites of lib/closeout.c.
AC_DEFUN([gl_CLOSEOUT],
[
- AC_LIBOBJ([closeout])
-
- dnl Prerequisites of lib/closeout.c.
:
])
diff --git a/m4/codeset.m4 b/m4/codeset.m4
index da73552..c2761be 100644
--- a/m4/codeset.m4
+++ b/m4/codeset.m4
@@ -1,5 +1,5 @@
# codeset.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2000-2002, 2006, 2008-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2006, 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/config-h.m4 b/m4/config-h.m4
index 2dc77a6..9158d66 100644
--- a/m4/config-h.m4
+++ b/m4/config-h.m4
@@ -1,6 +1,6 @@
# Say that -DHAVE_CONFIG_H is not needed.
-dnl Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/configmake.m4 b/m4/configmake.m4
index a029823..823ffc0 100644
--- a/m4/configmake.m4
+++ b/m4/configmake.m4
@@ -1,5 +1,5 @@
# configmake.m4 serial 1
-dnl Copyright (C) 2010-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/dirent_h.m4 b/m4/dirent_h.m4
new file mode 100644
index 0000000..54c1663
--- /dev/null
+++ b/m4/dirent_h.m4
@@ -0,0 +1,64 @@
+# dirent_h.m4 serial 16
+dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Bruno Haible.
+
+AC_DEFUN([gl_DIRENT_H],
+[
+ dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+ dnl once only, before all statements that occur in other macros.
+ AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
+
+ dnl <dirent.h> is always overridden, because of GNULIB_POSIXCHECK.
+ gl_CHECK_NEXT_HEADERS([dirent.h])
+ if test $ac_cv_header_dirent_h = yes; then
+ HAVE_DIRENT_H=1
+ else
+ HAVE_DIRENT_H=0
+ fi
+ AC_SUBST([HAVE_DIRENT_H])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[#include <dirent.h>
+ ]], [alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir])
+])
+
+AC_DEFUN([gl_DIRENT_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
+ gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+ dnl Define it also as a C macro, for the benefit of the unit tests.
+ gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_DIRENT_H_DEFAULTS],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR
+ GNULIB_OPENDIR=0; AC_SUBST([GNULIB_OPENDIR])
+ GNULIB_READDIR=0; AC_SUBST([GNULIB_READDIR])
+ GNULIB_REWINDDIR=0; AC_SUBST([GNULIB_REWINDDIR])
+ GNULIB_CLOSEDIR=0; AC_SUBST([GNULIB_CLOSEDIR])
+ GNULIB_DIRFD=0; AC_SUBST([GNULIB_DIRFD])
+ GNULIB_FDOPENDIR=0; AC_SUBST([GNULIB_FDOPENDIR])
+ GNULIB_SCANDIR=0; AC_SUBST([GNULIB_SCANDIR])
+ GNULIB_ALPHASORT=0; AC_SUBST([GNULIB_ALPHASORT])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_OPENDIR=1; AC_SUBST([HAVE_OPENDIR])
+ HAVE_READDIR=1; AC_SUBST([HAVE_READDIR])
+ HAVE_REWINDDIR=1; AC_SUBST([HAVE_REWINDDIR])
+ HAVE_CLOSEDIR=1; AC_SUBST([HAVE_CLOSEDIR])
+ HAVE_DECL_DIRFD=1; AC_SUBST([HAVE_DECL_DIRFD])
+ HAVE_DECL_FDOPENDIR=1;AC_SUBST([HAVE_DECL_FDOPENDIR])
+ HAVE_FDOPENDIR=1; AC_SUBST([HAVE_FDOPENDIR])
+ HAVE_SCANDIR=1; AC_SUBST([HAVE_SCANDIR])
+ HAVE_ALPHASORT=1; AC_SUBST([HAVE_ALPHASORT])
+ REPLACE_OPENDIR=0; AC_SUBST([REPLACE_OPENDIR])
+ REPLACE_CLOSEDIR=0; AC_SUBST([REPLACE_CLOSEDIR])
+ REPLACE_DIRFD=0; AC_SUBST([REPLACE_DIRFD])
+ REPLACE_FDOPENDIR=0; AC_SUBST([REPLACE_FDOPENDIR])
+])
diff --git a/m4/dirname.m4 b/m4/dirname.m4
index 9d5f40d..5897a2a 100644
--- a/m4/dirname.m4
+++ b/m4/dirname.m4
@@ -1,5 +1,5 @@
-#serial 9 -*- autoconf -*-
-dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc.
+#serial 10 -*- autoconf -*-
+dnl Copyright (C) 2002-2006, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,16 +7,10 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_DIRNAME],
[
AC_REQUIRE([gl_DIRNAME_LGPL])
- AC_LIBOBJ([basename])
- AC_LIBOBJ([dirname])
])
AC_DEFUN([gl_DIRNAME_LGPL],
[
- AC_LIBOBJ([basename-lgpl])
- AC_LIBOBJ([dirname-lgpl])
- AC_LIBOBJ([stripslash])
-
dnl Prerequisites of lib/dirname.h.
AC_REQUIRE([gl_DOUBLE_SLASH_ROOT])
diff --git a/m4/double-slash-root.m4 b/m4/double-slash-root.m4
index 16a4e3e..bd6f867 100644
--- a/m4/double-slash-root.m4
+++ b/m4/double-slash-root.m4
@@ -1,5 +1,5 @@
# double-slash-root.m4 serial 4 -*- Autoconf -*-
-dnl Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/dup.m4 b/m4/dup.m4
new file mode 100644
index 0000000..5105b6e
--- /dev/null
+++ b/m4/dup.m4
@@ -0,0 +1,25 @@
+# dup.m4 serial 3
+dnl Copyright (C) 2011-2013 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_DUP],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([gl_MSVC_INVAL])
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ REPLACE_DUP=1
+ fi
+ dnl Replace dup() for supporting the gnulib-defined fchdir() function,
+ dnl to keep fchdir's bookkeeping up-to-date.
+ m4_ifdef([gl_FUNC_FCHDIR], [
+ gl_TEST_FCHDIR
+ if test $HAVE_FCHDIR = 0; then
+ REPLACE_DUP=1
+ fi
+ ])
+])
+
+# Prerequisites of lib/dup.c.
+AC_DEFUN([gl_PREREQ_DUP], [:])
diff --git a/m4/dup2.m4 b/m4/dup2.m4
index def263b..269cfdc 100644
--- a/m4/dup2.m4
+++ b/m4/dup2.m4
@@ -1,5 +1,5 @@
-#serial 12
-dnl Copyright (C) 2002, 2005, 2007, 2009-2011 Free Software Foundation, Inc.
+#serial 19
+dnl Copyright (C) 2002, 2005, 2007, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -8,24 +8,28 @@ AC_DEFUN([gl_FUNC_DUP2],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
AC_REQUIRE([AC_CANONICAL_HOST])
- AC_CHECK_FUNCS_ONCE([dup2 fcntl])
- if test $ac_cv_func_dup2 = no; then
- HAVE_DUP2=0
- AC_LIBOBJ([dup2])
- else
+ m4_ifdef([gl_FUNC_DUP2_OBSOLETE], [
+ AC_CHECK_FUNCS_ONCE([dup2])
+ if test $ac_cv_func_dup2 = no; then
+ HAVE_DUP2=0
+ fi
+ ], [
+ AC_DEFINE([HAVE_DUP2], [1], [Define to 1 if you have the 'dup2' function.])
+ ])
+ if test $HAVE_DUP2 = 1; then
AC_CACHE_CHECK([whether dup2 works], [gl_cv_func_dup2_works],
[AC_RUN_IFELSE([
AC_LANG_PROGRAM([[#include <unistd.h>
#include <fcntl.h>
#include <errno.h>]],
[int result = 0;
-#if HAVE_FCNTL
+#ifdef FD_CLOEXEC
if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
result |= 1;
-#endif HAVE_FCNTL
+#endif
if (dup2 (1, 1) == 0)
result |= 2;
-#if HAVE_FCNTL
+#ifdef FD_CLOEXEC
if (fcntl (1, F_GETFD) != FD_CLOEXEC)
result |= 4;
#endif
@@ -35,36 +39,46 @@ AC_DEFUN([gl_FUNC_DUP2],
/* Many gnulib modules require POSIX conformance of EBADF. */
if (dup2 (2, 1000000) == -1 && errno != EBADF)
result |= 16;
+ /* Flush out a cygwin core dump. */
+ if (dup2 (2, -1) != -1 || errno != EBADF)
+ result |= 32;
return result;
])
],
[gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no],
[case "$host_os" in
mingw*) # on this platform, dup2 always returns 0 for success
- gl_cv_func_dup2_works=no;;
+ gl_cv_func_dup2_works="guessing no" ;;
cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
- gl_cv_func_dup2_works=no;;
+ gl_cv_func_dup2_works="guessing no" ;;
linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
# closed fd may yield -EBADF instead of -1 / errno=EBADF.
- gl_cv_func_dup2_works=no;;
+ gl_cv_func_dup2_works="guessing no" ;;
freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
- gl_cv_func_dup2_works=no;;
+ gl_cv_func_dup2_works="guessing no" ;;
haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
- gl_cv_func_dup2_works=no;;
- *) gl_cv_func_dup2_works=yes;;
+ gl_cv_func_dup2_works="guessing no" ;;
+ *) gl_cv_func_dup2_works="guessing yes" ;;
esac])
])
- if test "$gl_cv_func_dup2_works" = no; then
- gl_REPLACE_DUP2
- fi
+ case "$gl_cv_func_dup2_works" in
+ *yes) ;;
+ *)
+ REPLACE_DUP2=1
+ ;;
+ esac
fi
+ dnl Replace dup2() for supporting the gnulib-defined fchdir() function,
+ dnl to keep fchdir's bookkeeping up-to-date.
+ m4_ifdef([gl_FUNC_FCHDIR], [
+ gl_TEST_FCHDIR
+ if test $HAVE_FCHDIR = 0; then
+ if test $HAVE_DUP2 = 1; then
+ REPLACE_DUP2=1
+ fi
+ fi
+ ])
])
-AC_DEFUN([gl_REPLACE_DUP2],
-[
- AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
- if test $ac_cv_func_dup2 = yes; then
- REPLACE_DUP2=1
- fi
- AC_LIBOBJ([dup2])
-])
+# Prerequisites of lib/dup2.c.
+AC_DEFUN([gl_PREREQ_DUP2], [])
diff --git a/m4/eealloc.m4 b/m4/eealloc.m4
index 3006c48..c640ec1 100644
--- a/m4/eealloc.m4
+++ b/m4/eealloc.m4
@@ -1,5 +1,5 @@
-# eealloc.m4 serial 2
-dnl Copyright (C) 2003, 2009-2011 Free Software Foundation, Inc.
+# eealloc.m4 serial 3
+dnl Copyright (C) 2003, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -8,7 +8,6 @@ AC_DEFUN([gl_EEALLOC],
[
AC_REQUIRE([gl_EEMALLOC])
AC_REQUIRE([gl_EEREALLOC])
- AC_REQUIRE([AC_C_INLINE])
])
AC_DEFUN([gl_EEMALLOC],
diff --git a/m4/environ.m4 b/m4/environ.m4
index 7457ad1..593a33e 100644
--- a/m4/environ.m4
+++ b/m4/environ.m4
@@ -1,5 +1,5 @@
-# environ.m4 serial 5
-dnl Copyright (C) 2001-2004, 2006-2011 Free Software Foundation, Inc.
+# environ.m4 serial 6
+dnl Copyright (C) 2001-2004, 2006-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -9,7 +9,16 @@ AC_DEFUN_ONCE([gl_ENVIRON],
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
dnl Persuade glibc <unistd.h> to declare environ.
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
- gt_CHECK_VAR_DECL([#include <unistd.h>], environ)
+
+ AC_CHECK_HEADERS_ONCE([unistd.h])
+ gt_CHECK_VAR_DECL(
+ [#if HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif
+ /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
+ #include <stdlib.h>
+ ],
+ [environ])
if test $gt_cv_var_environ_declaration != yes; then
HAVE_DECL_ENVIRON=0
fi
diff --git a/m4/errno_h.m4 b/m4/errno_h.m4
index 687baff..c813ea5 100644
--- a/m4/errno_h.m4
+++ b/m4/errno_h.m4
@@ -1,5 +1,5 @@
-# errno_h.m4 serial 8
-dnl Copyright (C) 2004, 2006, 2008-2011 Free Software Foundation, Inc.
+# errno_h.m4 serial 12
+dnl Copyright (C) 2004, 2006, 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -10,6 +10,9 @@ AC_DEFUN_ONCE([gl_HEADER_ERRNO_H],
AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [
AC_EGREP_CPP([booboo],[
#include <errno.h>
+#if !defined ETXTBSY
+booboo
+#endif
#if !defined ENOMSG
booboo
#endif
@@ -34,6 +37,12 @@ booboo
#if !defined ENOTSUP
booboo
#endif
+#if !defined ENETRESET
+booboo
+#endif
+#if !defined ECONNABORTED
+booboo
+#endif
#if !defined ESTALE
booboo
#endif
@@ -43,6 +52,15 @@ booboo
#if !defined ECANCELED
booboo
#endif
+#if !defined EOWNERDEAD
+booboo
+#endif
+#if !defined ENOTRECOVERABLE
+booboo
+#endif
+#if !defined EILSEQ
+booboo
+#endif
],
[gl_cv_header_errno_h_complete=no],
[gl_cv_header_errno_h_complete=yes])
@@ -54,6 +72,7 @@ booboo
ERRNO_H='errno.h'
fi
AC_SUBST([ERRNO_H])
+ AM_CONDITIONAL([GL_GENERATE_ERRNO_H], [test -n "$ERRNO_H"])
gl_REPLACE_ERRNO_VALUE([EMULTIHOP])
gl_REPLACE_ERRNO_VALUE([ENOLINK])
gl_REPLACE_ERRNO_VALUE([EOVERFLOW])
diff --git a/m4/error.m4 b/m4/error.m4
index 6ea75ac..29e6fdc 100644
--- a/m4/error.m4
+++ b/m4/error.m4
@@ -1,6 +1,6 @@
-#serial 13
+#serial 14
-# Copyright (C) 1996-1998, 2001-2004, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 1996-1998, 2001-2004, 2009-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -8,16 +8,8 @@
AC_DEFUN([gl_ERROR],
[
- AC_FUNC_ERROR_AT_LINE
- dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]).
- gl_PREREQ_ERROR
-])
-
-# Redefine AC_FUNC_ERROR_AT_LINE, because it is no longer maintained in
-# Autoconf.
-AC_DEFUN([AC_FUNC_ERROR_AT_LINE],
-[
- AC_LIBSOURCES([error.h, error.c])dnl
+ dnl We don't use AC_FUNC_ERROR_AT_LINE any more, because it is no longer
+ dnl maintained in Autoconf and because it invokes AC_LIBOBJ.
AC_CACHE_CHECK([for error_at_line], [ac_cv_lib_error_at_line],
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
@@ -25,15 +17,11 @@ AC_DEFUN([AC_FUNC_ERROR_AT_LINE],
[[error_at_line (0, 0, "", 0, "an error occurred");]])],
[ac_cv_lib_error_at_line=yes],
[ac_cv_lib_error_at_line=no])])
- if test $ac_cv_lib_error_at_line = no; then
- AC_LIBOBJ([error])
- fi
])
# Prerequisites of lib/error.c.
AC_DEFUN([gl_PREREQ_ERROR],
[
AC_REQUIRE([AC_FUNC_STRERROR_R])
- AC_REQUIRE([AC_C_INLINE])
:
])
diff --git a/m4/execute.m4 b/m4/execute.m4
index 6ab4076..0b0836d 100644
--- a/m4/execute.m4
+++ b/m4/execute.m4
@@ -1,5 +1,5 @@
-# execute.m4 serial 4
-dnl Copyright (C) 2003, 2008-2011 Free Software Foundation, Inc.
+# execute.m4 serial 5
+dnl Copyright (C) 2003, 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,6 +7,5 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_EXECUTE],
[
dnl Prerequisites of lib/execute.c.
- AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([AC_TYPE_MODE_T])
])
diff --git a/m4/exponentd.m4 b/m4/exponentd.m4
index 7e91924..09df468 100644
--- a/m4/exponentd.m4
+++ b/m4/exponentd.m4
@@ -1,5 +1,5 @@
-# exponentd.m4 serial 2
-dnl Copyright (C) 2007-2008, 2010-2011 Free Software Foundation, Inc.
+# exponentd.m4 serial 3
+dnl Copyright (C) 2007-2008, 2010-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -80,7 +80,8 @@ int main ()
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 consistenly.
+ 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
diff --git a/m4/exponentf.m4 b/m4/exponentf.m4
index 3a00840..55a04e6 100644
--- a/m4/exponentf.m4
+++ b/m4/exponentf.m4
@@ -1,5 +1,5 @@
# exponentf.m4 serial 2
-dnl Copyright (C) 2007-2008, 2010-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2008, 2010-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/exponentl.m4 b/m4/exponentl.m4
index 2e706b2..f877cf1 100644
--- a/m4/exponentl.m4
+++ b/m4/exponentl.m4
@@ -1,5 +1,5 @@
# exponentl.m4 serial 3
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/extensions.m4 b/m4/extensions.m4
index 1330503..e30f122 100644
--- a/m4/extensions.m4
+++ b/m4/extensions.m4
@@ -1,14 +1,14 @@
-# serial 9 -*- Autoconf -*-
+# serial 13 -*- Autoconf -*-
# Enable extensions on systems that normally disable them.
-# Copyright (C) 2003, 2006-2011 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2013 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS
+# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from git
# Autoconf. Perhaps we can remove this once we can assume Autoconf
-# 2.62 or later everywhere, but since CVS Autoconf mutates rapidly
+# 2.70 or later everywhere, but since Autoconf mutates rapidly
# enough in this area it's likely we'll need to redefine
# AC_USE_SYSTEM_EXTENSIONS for quite some time.
@@ -30,6 +30,7 @@
# ------------------------
# Enable extensions on systems that normally disable them,
# typically due to standards-conformance issues.
+#
# Remember that #undef in AH_VERBATIM gets replaced with #define by
# AC_DEFINE. The goal here is to define all known feature-enabling
# macros, then, if reports of conflicts are made, disable macros that
@@ -38,35 +39,31 @@ 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
+ [Define to 1 if you need to in order for 'stat' and other
things to work.])
AC_DEFINE([_POSIX_1_SOURCE], [2],
[Define to 2 if the system does not provide POSIX.1 features
except with this defined.])
AC_DEFINE([_MINIX], [1],
[Define to 1 if on MINIX.])
+ AC_DEFINE([_NETBSD_SOURCE], [1],
+ [Define to 1 to make NetBSD features available. MINIX 3 needs this.])
fi
- dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500,
- dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already
- dnl provided.
- case "$host_os" in
- hpux*)
- AC_DEFINE([_XOPEN_SOURCE], [500],
- [Define to 500 only on HP-UX.])
- ;;
- esac
-
- AH_VERBATIM([__EXTENSIONS__],
+dnl Use a different key than __EXTENSIONS__, as that name broke existing
+dnl configure.ac when using autoheader 2.62.
+ AH_VERBATIM([USE_SYSTEM_EXTENSIONS],
[/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
+/* Enable general extensions on 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
@@ -79,6 +76,12 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
+/* Enable X/Open extensions if necessary. HP-UX 11.11 defines
+ mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of
+ whether compiling with -Ae or -D_HPUX_SOURCE=1. */
+#ifndef _XOPEN_SOURCE
+# undef _XOPEN_SOURCE
+#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
@@ -95,9 +98,26 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
test $ac_cv_safe_to_define___extensions__ = yes &&
AC_DEFINE([__EXTENSIONS__])
AC_DEFINE([_ALL_SOURCE])
+ AC_DEFINE([_DARWIN_C_SOURCE])
AC_DEFINE([_GNU_SOURCE])
AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
AC_DEFINE([_TANDEM_SOURCE])
+ AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined],
+ [ac_cv_should_define__xopen_source],
+ [ac_cv_should_define__xopen_source=no
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ #include <wchar.h>
+ mbstate_t x;]])],
+ [],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ #define _XOPEN_SOURCE 500
+ #include <wchar.h>
+ mbstate_t x;]])],
+ [ac_cv_should_define__xopen_source=yes])])])
+ test $ac_cv_should_define__xopen_source = yes &&
+ AC_DEFINE([_XOPEN_SOURCE], [500])
])# AC_USE_SYSTEM_EXTENSIONS
# gl_USE_SYSTEM_EXTENSIONS
diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4
new file mode 100644
index 0000000..4862d60
--- /dev/null
+++ b/m4/extern-inline.m4
@@ -0,0 +1,79 @@
+dnl 'extern inline' a la ISO C99.
+
+dnl Copyright 2012-2013 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_EXTERN_INLINE],
+[
+ AH_VERBATIM([extern_inline],
+[/* Please see the Gnulib manual for how to use these macros.
+
+ Suppress extern inline with HP-UX cc, as it appears to be broken; see
+ <http://lists.gnu.org/archive/html/bug-texinfo/2013-02/msg00030.html>.
+
+ Suppress extern inline with Sun C in standards-conformance mode, as it
+ mishandles inline functions that call each other. E.g., for 'inline void f
+ (void) { } inline void g (void) { f (); }', c99 incorrectly complains
+ 'reference to static identifier "f" in extern inline function'.
+ This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
+
+ Suppress the use of extern inline on problematic Apple configurations, as
+ Libc at least through Libc-825.26 (2013-04-09) mishandles it; see, e.g.,
+ <http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
+ Perhaps Apple will fix this some day. */
+#if (defined __APPLE__ \
+ && ((! defined _DONT_USE_CTYPE_INLINE_ \
+ && (defined __GNUC__ || defined __cplusplus)) \
+ || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
+ && defined __GNUC__ && ! defined __cplusplus)))
+# define _GL_EXTERN_INLINE_APPLE_BUG
+#endif
+#if ((__GNUC__ \
+ ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
+ : (199901L <= __STDC_VERSION__ \
+ && !defined __HP_cc \
+ && !(defined __SUNPRO_C && __STDC__))) \
+ && !defined _GL_EXTERN_INLINE_APPLE_BUG)
+# define _GL_INLINE inline
+# define _GL_EXTERN_INLINE extern inline
+# define _GL_EXTERN_INLINE_IN_USE
+#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
+ && !defined _GL_EXTERN_INLINE_APPLE_BUG)
+# if __GNUC_GNU_INLINE__
+ /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
+# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
+# else
+# define _GL_INLINE extern inline
+# endif
+# define _GL_EXTERN_INLINE extern
+# define _GL_EXTERN_INLINE_IN_USE
+#else
+# define _GL_INLINE static _GL_UNUSED
+# define _GL_EXTERN_INLINE static _GL_UNUSED
+#endif
+
+#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
+# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
+# define _GL_INLINE_HEADER_CONST_PRAGMA
+# else
+# define _GL_INLINE_HEADER_CONST_PRAGMA \
+ _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"")
+# endif
+ /* Suppress GCC's bogus "no previous prototype for 'FOO'"
+ and "no previous declaration for 'FOO'" diagnostics,
+ when FOO is an inline function in the header; see
+ <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>. */
+# define _GL_INLINE_HEADER_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
+ _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \
+ _GL_INLINE_HEADER_CONST_PRAGMA
+# define _GL_INLINE_HEADER_END \
+ _Pragma ("GCC diagnostic pop")
+#else
+# define _GL_INLINE_HEADER_BEGIN
+# define _GL_INLINE_HEADER_END
+#endif])
+])
diff --git a/m4/fatal-signal.m4 b/m4/fatal-signal.m4
index 1a3281a..ae8b65c 100644
--- a/m4/fatal-signal.m4
+++ b/m4/fatal-signal.m4
@@ -1,12 +1,11 @@
-# fatal-signal.m4 serial 8
-dnl Copyright (C) 2003-2004, 2006, 2008-2011 Free Software Foundation, Inc.
+# fatal-signal.m4 serial 9
+dnl Copyright (C) 2003-2004, 2006, 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FATAL_SIGNAL],
[
- AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([gt_TYPE_SIG_ATOMIC_T])
AC_CHECK_HEADERS_ONCE([unistd.h])
gl_PREREQ_SIG_HANDLER_H
diff --git a/m4/fclose.m4 b/m4/fclose.m4
index 278859c..b306b6d 100644
--- a/m4/fclose.m4
+++ b/m4/fclose.m4
@@ -1,16 +1,20 @@
-# fclose.m4 serial 2
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# fclose.m4 serial 6
+dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_FCLOSE],
[
-])
-
-AC_DEFUN([gl_REPLACE_FCLOSE],
-[
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
- REPLACE_FCLOSE=1
- AC_LIBOBJ([fclose])
+
+ gl_FUNC_FFLUSH_STDIN
+ if test $gl_cv_func_fflush_stdin != yes; then
+ REPLACE_FCLOSE=1
+ fi
+
+ AC_REQUIRE([gl_FUNC_CLOSE])
+ if test $REPLACE_CLOSE = 1; then
+ REPLACE_FCLOSE=1
+ fi
])
diff --git a/m4/fcntl-o.m4 b/m4/fcntl-o.m4
index 88db07e..87cc4bd 100644
--- a/m4/fcntl-o.m4
+++ b/m4/fcntl-o.m4
@@ -1,5 +1,5 @@
-# fcntl-o.m4 serial 3
-dnl Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
+# fcntl-o.m4 serial 4
+dnl Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -17,12 +17,21 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
[AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
[AC_REQUIRE([AC_GNU_SOURCE])])
+
+ AC_CHECK_HEADERS_ONCE([unistd.h])
+ AC_CHECK_FUNCS_ONCE([symlink])
AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h],
[AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[[#include <sys/types.h>
#include <sys/stat.h>
- #include <unistd.h>
+ #if HAVE_UNISTD_H
+ # include <unistd.h>
+ #else /* on Windows with MSVC */
+ # include <io.h>
+ # include <stdlib.h>
+ # defined sleep(n) _sleep ((n) * 1000)
+ #endif
#include <fcntl.h>
#ifndef O_NOATIME
#define O_NOATIME 0
@@ -38,9 +47,21 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
]],
[[
int result = !constants;
+ #if HAVE_SYMLINK
{
static char const sym[] = "conftest.sym";
- if (symlink (".", sym) != 0)
+ if (symlink ("/dev/null", sym) != 0)
+ result |= 2;
+ else
+ {
+ int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
+ if (fd >= 0)
+ {
+ close (fd);
+ result |= 4;
+ }
+ }
+ if (unlink (sym) != 0 || symlink (".", sym) != 0)
result |= 2;
else
{
@@ -53,6 +74,7 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
}
unlink (sym);
}
+ #endif
{
static char const file[] = "confdefs.h";
int fd = open (file, O_RDONLY | O_NOATIME);
diff --git a/m4/fcntl.m4 b/m4/fcntl.m4
index a93ed85..5481cae 100644
--- a/m4/fcntl.m4
+++ b/m4/fcntl.m4
@@ -1,5 +1,5 @@
-# fcntl.m4 serial 4
-dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# fcntl.m4 serial 5
+dnl Copyright (C) 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -73,6 +73,14 @@ choke me
dnl No witness macro needed for this bug.
fi
fi
+ dnl Replace fcntl() for supporting the gnulib-defined fchdir() function,
+ dnl to keep fchdir's bookkeeping up-to-date.
+ m4_ifdef([gl_FUNC_FCHDIR], [
+ gl_TEST_FCHDIR
+ if test $HAVE_FCHDIR = 0; then
+ gl_REPLACE_FCNTL
+ fi
+ ])
])
AC_DEFUN([gl_REPLACE_FCNTL],
@@ -84,5 +92,4 @@ AC_DEFUN([gl_REPLACE_FCNTL],
else
REPLACE_FCNTL=1
fi
- AC_LIBOBJ([fcntl])
])
diff --git a/m4/fcntl_h.m4 b/m4/fcntl_h.m4
index 1ef4f45..3cff1fd 100644
--- a/m4/fcntl_h.m4
+++ b/m4/fcntl_h.m4
@@ -1,6 +1,6 @@
-# serial 13
+# serial 15
# Configure fcntl.h.
-dnl Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -13,6 +13,12 @@ AC_DEFUN([gl_FCNTL_H],
AC_REQUIRE([gl_FCNTL_O_FLAGS])
gl_NEXT_HEADERS([fcntl.h])
+ dnl Ensure the type pid_t gets defined.
+ AC_REQUIRE([AC_TYPE_PID_T])
+
+ dnl Ensure the type mode_t gets defined.
+ AC_REQUIRE([AC_TYPE_MODE_T])
+
dnl Check for declarations of anything we want to poison if the
dnl corresponding gnulib module is not in use, if it is not common
dnl enough to be declared everywhere.
@@ -31,13 +37,14 @@ AC_DEFUN([gl_FCNTL_MODULE_INDICATOR],
AC_DEFUN([gl_FCNTL_H_DEFAULTS],
[
- GNULIB_FCNTL=0; AC_SUBST([GNULIB_FCNTL])
- GNULIB_OPEN=0; AC_SUBST([GNULIB_OPEN])
- GNULIB_OPENAT=0; AC_SUBST([GNULIB_OPENAT])
+ GNULIB_FCNTL=0; AC_SUBST([GNULIB_FCNTL])
+ GNULIB_NONBLOCKING=0; AC_SUBST([GNULIB_NONBLOCKING])
+ GNULIB_OPEN=0; AC_SUBST([GNULIB_OPEN])
+ GNULIB_OPENAT=0; AC_SUBST([GNULIB_OPENAT])
dnl Assume proper GNU behavior unless another module says otherwise.
- HAVE_FCNTL=1; AC_SUBST([HAVE_FCNTL])
- HAVE_OPENAT=1; AC_SUBST([HAVE_OPENAT])
- REPLACE_FCNTL=0; AC_SUBST([REPLACE_FCNTL])
- REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN])
- REPLACE_OPENAT=0; AC_SUBST([REPLACE_OPENAT])
+ HAVE_FCNTL=1; AC_SUBST([HAVE_FCNTL])
+ HAVE_OPENAT=1; AC_SUBST([HAVE_OPENAT])
+ REPLACE_FCNTL=0; AC_SUBST([REPLACE_FCNTL])
+ REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN])
+ REPLACE_OPENAT=0; AC_SUBST([REPLACE_OPENAT])
])
diff --git a/m4/fdopen.m4 b/m4/fdopen.m4
new file mode 100644
index 0000000..74d1649
--- /dev/null
+++ b/m4/fdopen.m4
@@ -0,0 +1,47 @@
+# fdopen.m4 serial 3
+dnl Copyright (C) 2011-2013 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+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 <stdio.h>
+#include <errno.h>
+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/m4/fflush.m4 b/m4/fflush.m4
index f7645de..c16b314 100644
--- a/m4/fflush.m4
+++ b/m4/fflush.m4
@@ -1,6 +1,6 @@
-# fflush.m4 serial 8
+# fflush.m4 serial 15
-# Copyright (C) 2007-2011 Free Software Foundation, Inc.
+# Copyright (C) 2007-2013 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -12,13 +12,30 @@ dnl unread input on seekable streams, rather than C99 undefined semantics.
AC_DEFUN([gl_FUNC_FFLUSH],
[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ gl_FUNC_FFLUSH_STDIN
+ if test $gl_cv_func_fflush_stdin != yes; then
+ REPLACE_FFLUSH=1
+ fi
+])
+
+dnl Determine whether fflush works on input streams.
+dnl Sets gl_cv_func_fflush_stdin.
+
+AC_DEFUN([gl_FUNC_FFLUSH_STDIN],
+[
+ AC_CHECK_HEADERS_ONCE([unistd.h])
AC_CACHE_CHECK([whether fflush works on input streams],
[gl_cv_func_fflush_stdin],
[echo hello world > conftest.txt
AC_RUN_IFELSE([AC_LANG_PROGRAM(
[[
#include <stdio.h>
-#include <unistd.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#else /* on Windows with MSVC */
+# include <io.h>
+#endif
]], [[FILE *f = fopen ("conftest.txt", "r");
char buffer[10];
int fd;
@@ -55,27 +72,18 @@ AC_DEFUN([gl_FUNC_FFLUSH],
return 7;
return 0;
]])], [gl_cv_func_fflush_stdin=yes], [gl_cv_func_fflush_stdin=no],
- [dnl Pessimistically assume fflush is broken.
- gl_cv_func_fflush_stdin=no])
+ [gl_cv_func_fflush_stdin=cross])
rm conftest.txt
])
- if test $gl_cv_func_fflush_stdin = no; then
- gl_REPLACE_FFLUSH
- fi
-])
-
-AC_DEFUN([gl_REPLACE_FFLUSH],
-[
- AC_LIBOBJ([fflush])
- AC_REQUIRE([gl_STDIO_H_DEFAULTS])
- REPLACE_FFLUSH=1
- gl_PREREQ_FFLUSH
- gl_REPLACE_FSEEKO
+ case $gl_cv_func_fflush_stdin in
+ yes) gl_func_fflush_stdin=1 ;;
+ no) gl_func_fflush_stdin=0 ;;
+ *) gl_func_fflush_stdin='(-1)' ;;
+ esac
+ AC_DEFINE_UNQUOTED([FUNC_FFLUSH_STDIN], [$gl_func_fflush_stdin],
+ [Define to 1 if fflush is known to work on stdin as per POSIX.1-2008,
+ 0 if fflush is known to not work, -1 if unknown.])
])
# Prerequisites of lib/fflush.c.
-AC_DEFUN([gl_PREREQ_FFLUSH],
-[
- AC_REQUIRE([AC_C_INLINE])
- :
-])
+AC_DEFUN([gl_PREREQ_FFLUSH], [:])
diff --git a/m4/filenamecat.m4 b/m4/filenamecat.m4
index b90cf9e..40946e8 100644
--- a/m4/filenamecat.m4
+++ b/m4/filenamecat.m4
@@ -1,5 +1,5 @@
-# filenamecat.m4 serial 10
-dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc.
+# filenamecat.m4 serial 11
+dnl Copyright (C) 2002-2006, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,13 +7,10 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FILE_NAME_CONCAT],
[
AC_REQUIRE([gl_FILE_NAME_CONCAT_LGPL])
- AC_LIBOBJ([filenamecat])
])
AC_DEFUN([gl_FILE_NAME_CONCAT_LGPL],
[
- AC_LIBOBJ([filenamecat-lgpl])
-
dnl Prerequisites of lib/filenamecat-lgpl.c.
AC_CHECK_FUNCS_ONCE([mempcpy])
])
diff --git a/m4/float_h.m4 b/m4/float_h.m4
index 265a4c1..397f2d1 100644
--- a/m4/float_h.m4
+++ b/m4/float_h.m4
@@ -1,5 +1,5 @@
-# float_h.m4 serial 5
-dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+# float_h.m4 serial 9
+dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -9,11 +9,90 @@ AC_DEFUN([gl_FLOAT_H],
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_CANONICAL_HOST])
FLOAT_H=
+ REPLACE_FLOAT_LDBL=0
case "$host_os" in
- beos* | openbsd* | mirbsd*)
+ aix* | beos* | openbsd* | mirbsd* | irix*)
FLOAT_H=float.h
- gl_NEXT_HEADERS([float.h])
+ ;;
+ freebsd*)
+ case "$host_cpu" in
+changequote(,)dnl
+ i[34567]86 )
+changequote([,])dnl
+ FLOAT_H=float.h
+ ;;
+ x86_64 )
+ # On x86_64 systems, the C compiler may still be generating
+ # 32-bit code.
+ AC_EGREP_CPP([yes],
+ [#if defined __LP64__ || defined __x86_64__ || defined __amd64__
+ yes
+ #endif],
+ [],
+ [FLOAT_H=float.h])
+ ;;
+ esac
+ ;;
+ linux*)
+ case "$host_cpu" in
+ powerpc*)
+ FLOAT_H=float.h
+ ;;
+ esac
+ ;;
+ esac
+ case "$host_os" in
+ aix* | freebsd* | linux*)
+ if test -n "$FLOAT_H"; then
+ REPLACE_FLOAT_LDBL=1
+ fi
;;
esac
+
+ dnl Test against glibc-2.7 Linux/SPARC64 bug.
+ REPLACE_ITOLD=0
+ AC_CACHE_CHECK([whether conversion from 'int' to 'long double' works],
+ [gl_cv_func_itold_works],
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+int i = -1;
+volatile long double ld;
+int main ()
+{
+ ld += i * 1.0L;
+ if (ld > 0)
+ return 1;
+ return 0;
+}]])],
+ [gl_cv_func_itold_works=yes],
+ [gl_cv_func_itold_works=no],
+ [case "$host" in
+ sparc*-*-linux*)
+ AC_EGREP_CPP([yes],
+ [#if defined __LP64__ || defined __arch64__
+ yes
+ #endif],
+ [gl_cv_func_itold_works="guessing no"],
+ [gl_cv_func_itold_works="guessing yes"])
+ ;;
+ *) gl_cv_func_itold_works="guessing yes" ;;
+ esac
+ ])
+ ])
+ case "$gl_cv_func_itold_works" in
+ *no)
+ REPLACE_ITOLD=1
+ dnl We add the workaround to <float.h> but also to <math.h>,
+ 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/m4/fopen.m4 b/m4/fopen.m4
index 8407ed4..3337cc9 100644
--- a/m4/fopen.m4
+++ b/m4/fopen.m4
@@ -1,5 +1,5 @@
-# fopen.m4 serial 7
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+# fopen.m4 serial 9
+dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -52,14 +52,7 @@ changequote([,])dnl
REPLACE_FOPEN=1
;;
esac
- if test $REPLACE_FOPEN = 1; then
- AC_LIBOBJ([fopen])
- gl_PREREQ_FOPEN
- fi
])
# Prerequisites of lib/fopen.c.
-AC_DEFUN([gl_PREREQ_FOPEN],
-[
- AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_PREREQ_FOPEN], [:])
diff --git a/m4/fpending.m4 b/m4/fpending.m4
index 314e003..c8d9e8b 100644
--- a/m4/fpending.m4
+++ b/m4/fpending.m4
@@ -1,6 +1,6 @@
-# serial 15
+# serial 20
-# Copyright (C) 2000-2001, 2004-2011 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 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.
@@ -16,68 +16,80 @@ dnl we have to grub around in the FILE struct.
AC_DEFUN([gl_FUNC_FPENDING],
[
AC_CHECK_HEADERS_ONCE([stdio_ext.h])
- AC_CHECK_FUNCS_ONCE([__fpending])
- fp_headers='
-# include <stdio.h>
-# if HAVE_STDIO_EXT_H
-# include <stdio_ext.h>
-# endif
-'
- AC_CHECK_DECLS([__fpending], , , $fp_headers)
- if test $ac_cv_func___fpending = no; then
- AC_CACHE_CHECK(
+ AC_CACHE_CHECK([for __fpending], [gl_cv_func___fpending],
+ [
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdio.h>
+ #if HAVE_STDIO_EXT_H
+ # include <stdio_ext.h>
+ #endif
+ ]],
+ [[return ! __fpending (stdin);]])],
+ [gl_cv_func___fpending=yes],
+ [gl_cv_func___fpending=no])
+ ])
+])
+
+AC_DEFUN([gl_PREREQ_FPENDING],
+[
+ AC_CACHE_CHECK(
[how to determine the number of pending output bytes on a stream],
- ac_cv_sys_pending_output_n_bytes,
- [
- for ac_expr in \
- \
- '# glibc2' \
- 'fp->_IO_write_ptr - fp->_IO_write_base' \
- \
- '# traditional Unix' \
- 'fp->_ptr - fp->_base' \
- \
- '# BSD' \
- 'fp->_p - fp->_bf._base' \
- \
- '# SCO, Unixware' \
- '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
- \
- '# QNX' \
- '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
- \
- '# old glibc?' \
- 'fp->__bufp - fp->__buffer' \
- \
- '# old glibc iostream?' \
- 'fp->_pptr - fp->_pbase' \
- \
- '# emx+gcc' \
- 'fp->_ptr - fp->_buffer' \
- \
- '# VMS' \
- '(*fp)->_ptr - (*fp)->_base' \
- \
- '# e.g., DGUX R4.11; the info is not available' \
- 1 \
- ; do
+ ac_cv_sys_pending_output_n_bytes,
+ [
+ for ac_expr in \
+ \
+ '# glibc2' \
+ 'fp->_IO_write_ptr - fp->_IO_write_base' \
+ \
+ '# traditional Unix' \
+ 'fp->_ptr - fp->_base' \
+ \
+ '# BSD' \
+ 'fp->_p - fp->_bf._base' \
+ \
+ '# SCO, Unixware' \
+ '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
+ \
+ '# QNX' \
+ '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
+ \
+ '# old glibc?' \
+ 'fp->__bufp - fp->__buffer' \
+ \
+ '# old glibc iostream?' \
+ 'fp->_pptr - fp->_pbase' \
+ \
+ '# emx+gcc' \
+ 'fp->_ptr - fp->_buffer' \
+ \
+ '# Minix' \
+ 'fp->_ptr - fp->_buf' \
+ \
+ '# Plan9' \
+ 'fp->wp - fp->buf' \
+ \
+ '# VMS' \
+ '(*fp)->_ptr - (*fp)->_base' \
+ \
+ '# e.g., DGUX R4.11; the info is not available' \
+ 1 \
+ ; do
- # Skip each embedded comment.
- case "$ac_expr" in '#'*) continue;; esac
+ # Skip each embedded comment.
+ case "$ac_expr" in '#'*) continue;; esac
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]],
- [[FILE *fp = stdin; (void) ($ac_expr);]])],
- [fp_done=yes]
- )
- test "$fp_done" = yes && break
- done
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]],
+ [[FILE *fp = stdin; (void) ($ac_expr);]])],
+ [fp_done=yes]
+ )
+ test "$fp_done" = yes && break
+ done
- ac_cv_sys_pending_output_n_bytes=$ac_expr
- ]
- )
- AC_DEFINE_UNQUOTED([PENDING_OUTPUT_N_BYTES],
- $ac_cv_sys_pending_output_n_bytes,
- [the number of pending output bytes on stream `fp'])
- AC_LIBOBJ([fpending])
- fi
+ ac_cv_sys_pending_output_n_bytes=$ac_expr
+ ]
+ )
+ AC_DEFINE_UNQUOTED([PENDING_OUTPUT_N_BYTES],
+ $ac_cv_sys_pending_output_n_bytes,
+ [the number of pending output bytes on stream 'fp'])
])
diff --git a/m4/fpieee.m4 b/m4/fpieee.m4
index 7872876..97941bb 100644
--- a/m4/fpieee.m4
+++ b/m4/fpieee.m4
@@ -1,5 +1,5 @@
-# fpieee.m4 serial 1
-dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+# fpieee.m4 serial 2
+dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -36,9 +36,11 @@ AC_DEFUN([gl_FP_IEEE],
# <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
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.
+ # 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
;;
diff --git a/m4/fpurge.m4 b/m4/fpurge.m4
index a62c2fe..2059a56 100644
--- a/m4/fpurge.m4
+++ b/m4/fpurge.m4
@@ -1,5 +1,5 @@
-# fpurge.m4 serial 6
-dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+# fpurge.m4 serial 7
+dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -11,6 +11,7 @@ AC_DEFUN([gl_FUNC_FPURGE],
AC_CHECK_FUNCS_ONCE([__fpurge])
AC_CHECK_DECLS([fpurge], , , [[#include <stdio.h>]])
if test "x$ac_cv_func_fpurge" = xyes; then
+ HAVE_FPURGE=1
# Detect BSD bug. Only cygwin 1.7 is known to be immune.
AC_CACHE_CHECK([whether fpurge works], [gl_cv_func_fpurge_works],
[AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
@@ -34,10 +35,9 @@ AC_DEFUN([gl_FUNC_FPURGE],
[gl_cv_func_fpurge_works='guessing no'])])
if test "x$gl_cv_func_fpurge_works" != xyes; then
REPLACE_FPURGE=1
- AC_LIBOBJ([fpurge])
fi
else
- AC_LIBOBJ([fpurge])
+ HAVE_FPURGE=0
fi
if test "x$ac_cv_have_decl_fpurge" = xno; then
HAVE_DECL_FPURGE=0
diff --git a/m4/gl_list.m4 b/m4/freadahead.m4
index 5cefb32..0f2d47c 100644
--- a/m4/gl_list.m4
+++ b/m4/freadahead.m4
@@ -1,10 +1,10 @@
-# gl_list.m4 serial 2
-dnl Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
+# freadahead.m4 serial 1
+dnl Copyright (C) 2012-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-AC_DEFUN([gl_LIST],
+AC_DEFUN([gl_FUNC_FREADAHEAD],
[
- AC_REQUIRE([gl_INLINE])
+ AC_CHECK_FUNCS_ONCE([__freadahead])
])
diff --git a/m4/freading.m4 b/m4/freading.m4
index 59d502e..1e1f6f2 100644
--- a/m4/freading.m4
+++ b/m4/freading.m4
@@ -1,5 +1,5 @@
# freading.m4 serial 1
-dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/frexp.m4 b/m4/frexp.m4
index 2e0fb3b..2eb98a1 100644
--- a/m4/frexp.m4
+++ b/m4/frexp.m4
@@ -1,5 +1,5 @@
-# frexp.m4 serial 10
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+# frexp.m4 serial 15
+dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -44,8 +44,6 @@ AC_DEFUN([gl_FUNC_FREXP],
if test $gl_func_frexp = yes; then
AC_DEFINE([HAVE_FREXP], [1],
[Define if the frexp() function is available and works.])
- else
- AC_LIBOBJ([frexp])
fi
AC_SUBST([FREXP_LIBM])
])
@@ -68,8 +66,6 @@ AC_DEFUN([gl_FUNC_FREXP_NO_LIBM],
if test $gl_func_frexp_no_libm = yes; then
AC_DEFINE([HAVE_FREXP_IN_LIBC], [1],
[Define if the frexp() function is available in libc.])
- else
- AC_LIBOBJ([frexp])
fi
])
@@ -92,11 +88,12 @@ AC_DEFUN([gl_CHECK_FREXP_NO_LIBM],
dnl Test whether frexp() works also on denormalized numbers (this fails e.g. on
dnl NetBSD 3.0), on infinite numbers (this fails e.g. on IRIX 6.5 and mingw),
-dnl and on negative zero (this fails e.g. on NetBSD 4.99).
+dnl and on negative zero (this fails e.g. on NetBSD 4.99 and mingw).
AC_DEFUN([gl_FUNC_FREXP_WORKS],
[
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CHECK_DECLS_ONCE([alarm])
AC_CACHE_CHECK([whether frexp works], [gl_cv_func_frexp_works],
[
AC_RUN_IFELSE(
@@ -104,10 +101,14 @@ AC_DEFUN([gl_FUNC_FREXP_WORKS],
#include <float.h>
#include <math.h>
#include <string.h>
+#if HAVE_DECL_ALARM
+# include <signal.h>
+# include <unistd.h>
+#endif
/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
ICC 10.0 has a bug when optimizing the expression -zero.
The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
- to PowerPC on MacOS X 10.5. */
+ to PowerPC on Mac OS X 10.5. */
#if defined __hpux || defined __sgi || defined __ICC
static double
compute_minus_zero (void)
@@ -124,6 +125,12 @@ int main()
int i;
volatile double x;
double zero = 0.0;
+#if HAVE_DECL_ALARM
+ /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
+ number. Let the test fail in this case. */
+ signal (SIGALRM, SIG_DFL);
+ alarm (5);
+#endif
/* Test on denormalized numbers. */
for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
;
@@ -137,7 +144,7 @@ int main()
result |= 1;
}
/* Test on infinite numbers. */
- x = 1.0 / 0.0;
+ x = 1.0 / zero;
{
int exp;
double y = frexp (x, &exp);
diff --git a/m4/frexpl.m4 b/m4/frexpl.m4
index 49d8821..3b64c52 100644
--- a/m4/frexpl.m4
+++ b/m4/frexpl.m4
@@ -1,5 +1,5 @@
-# frexpl.m4 serial 13
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+# frexpl.m4 serial 20
+dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,9 +7,15 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_FREXPL],
[
AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
+
+ dnl Persuade glibc <math.h> to declare frexpl().
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
dnl Check whether it's declared.
- dnl MacOS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>.
- AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [#include <math.h>])
+ dnl Mac OS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>.
+ AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [[#include <math.h>]])
+
FREXPL_LIBM=
if test $HAVE_DECL_FREXPL = 1; then
gl_CHECK_FREXPL_NO_LIBM
@@ -40,7 +46,7 @@ AC_DEFUN([gl_FUNC_FREXPL],
LIBS="$save_LIBS"
case "$gl_cv_func_frexpl_works" in
*yes) gl_func_frexpl=yes ;;
- *) gl_func_frexpl=no; REPLACE_FREXPL=1; FREXPL_LIBM= ;;
+ *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
esac
else
gl_func_frexpl=no
@@ -51,7 +57,13 @@ AC_DEFUN([gl_FUNC_FREXPL],
fi
fi
if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
- AC_LIBOBJ([frexpl])
+ dnl Find libraries needed to link lib/frexpl.c.
+ if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
+ AC_REQUIRE([gl_FUNC_FREXP])
+ FREXPL_LIBM="$FREXP_LIBM"
+ else
+ FREXPL_LIBM=
+ fi
fi
AC_SUBST([FREXPL_LIBM])
])
@@ -59,9 +71,10 @@ AC_DEFUN([gl_FUNC_FREXPL],
AC_DEFUN([gl_FUNC_FREXPL_NO_LIBM],
[
AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
dnl Check whether it's declared.
- dnl MacOS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>.
- AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [#include <math.h>])
+ dnl Mac OS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>.
+ AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [[#include <math.h>]])
if test $HAVE_DECL_FREXPL = 1; then
gl_CHECK_FREXPL_NO_LIBM
if test $gl_cv_func_frexpl_no_libm = yes; then
@@ -80,9 +93,6 @@ AC_DEFUN([gl_FUNC_FREXPL_NO_LIBM],
[Define if the frexpl() function is available in libc.])
fi
fi
- if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
- AC_LIBOBJ([frexpl])
- fi
])
dnl Test whether frexpl() can be used without linking with libm.
@@ -103,8 +113,8 @@ AC_DEFUN([gl_CHECK_FREXPL_NO_LIBM],
])
dnl Test whether frexpl() works on finite numbers (this fails on
-dnl MacOS X 10.4/PowerPC, on AIX 5.1, and on BeOS), on denormalized numbers
-dnl (this fails on MacOS X 10.5/i386), and also on infinite numbers (this
+dnl Mac OS X 10.4/PowerPC, on AIX 5.1, and on BeOS), on denormalized numbers
+dnl (this fails on Mac OS X 10.5/i386), and also on infinite numbers (this
dnl fails e.g. on IRIX 6.5 and mingw).
AC_DEFUN([gl_FUNC_FREXPL_WORKS],
[
@@ -121,7 +131,25 @@ AC_DEFUN([gl_FUNC_FREXPL_WORKS],
# undef LDBL_MIN_EXP
# define LDBL_MIN_EXP (-16381)
#endif
-extern long double frexpl (long double, int *);
+#if defined __i386__ && defined __FreeBSD__
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP (-16381)
+#endif
+#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
+#endif
+#if defined __sgi && (LDBL_MANT_DIG >= 106)
+# if defined __GNUC__
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP DBL_MIN_EXP
+# endif
+#endif
+extern
+#ifdef __cplusplus
+"C"
+#endif
+long double frexpl (long double, int *);
int main()
{
int result = 0;
@@ -134,7 +162,7 @@ int main()
if (exp != 5)
result |= 1;
}
- /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl
+ /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
function returns an invalid (incorrectly normalized) value: it returns
y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
but the correct result is
@@ -173,7 +201,7 @@ int main()
int exp;
long double y = frexpl (x, &exp);
/* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
- exp = -16382, y = 0.5. On MacOS X 10.5: exp = -16384, y = 0.5. */
+ exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
if (exp != LDBL_MIN_EXP - 1)
result |= 8;
}
diff --git a/m4/fseek.m4 b/m4/fseek.m4
new file mode 100644
index 0000000..74f6656
--- /dev/null
+++ b/m4/fseek.m4
@@ -0,0 +1,15 @@
+# fseek.m4 serial 4
+dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_FSEEK],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_REQUIRE([gl_FUNC_FSEEKO])
+ dnl When fseeko needs fixes, fseek needs them too.
+ if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
+ REPLACE_FSEEK=1
+ fi
+])
diff --git a/m4/fseeko.m4 b/m4/fseeko.m4
index 76507d1..ca9da28 100644
--- a/m4/fseeko.m4
+++ b/m4/fseeko.m4
@@ -1,5 +1,5 @@
-# fseeko.m4 serial 11
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+# fseeko.m4 serial 17
+dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,28 +7,8 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_FSEEKO],
[
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
- AC_REQUIRE([gl_HAVE_FSEEKO])
AC_REQUIRE([gl_STDIN_LARGE_OFFSET])
-
- AC_CHECK_DECLS_ONCE([fseeko])
- if test $ac_cv_have_decl_fseeko = no; then
- HAVE_DECL_FSEEKO=0
- fi
-
- if test $gl_cv_func_fseeko = no; then
- HAVE_FSEEKO=0
- gl_REPLACE_FSEEKO
- else
- if test $gl_cv_var_stdin_large_offset = no; then
- gl_REPLACE_FSEEKO
- fi
- fi
-])
-
-dnl Tests whether fseeko is available.
-dnl Result is gl_cv_func_fseeko.
-AC_DEFUN([gl_HAVE_FSEEKO],
-[
+ AC_REQUIRE([gl_SYS_TYPES_H])
AC_REQUIRE([AC_PROG_CC])
dnl Persuade glibc <stdio.h> to declare fseeko().
@@ -40,18 +20,28 @@ AC_DEFUN([gl_HAVE_FSEEKO],
]], [fseeko (stdin, 0, 0);])],
[gl_cv_func_fseeko=yes], [gl_cv_func_fseeko=no])
])
-])
-AC_DEFUN([gl_REPLACE_FSEEKO],
-[
- AC_REQUIRE([gl_STDIO_H_DEFAULTS])
- AC_REQUIRE([gl_HAVE_FSEEKO])
- if test $gl_cv_func_fseeko = yes; then
- REPLACE_FSEEKO=1
+ AC_CHECK_DECLS_ONCE([fseeko])
+ if test $ac_cv_have_decl_fseeko = no; then
+ HAVE_DECL_FSEEKO=0
+ fi
+
+ if test $gl_cv_func_fseeko = no; then
+ HAVE_FSEEKO=0
+ else
+ if test $WINDOWS_64_BIT_OFF_T = 1; then
+ REPLACE_FSEEKO=1
+ fi
+ if test $gl_cv_var_stdin_large_offset = no; then
+ REPLACE_FSEEKO=1
+ fi
+ m4_ifdef([gl_FUNC_FFLUSH_STDIN], [
+ gl_FUNC_FFLUSH_STDIN
+ if test $gl_cv_func_fflush_stdin != yes; then
+ REPLACE_FSEEKO=1
+ fi
+ ])
fi
- AC_LIBOBJ([fseeko])
- dnl If we are also using the fseek module, then fseek needs replacing, too.
- m4_ifdef([gl_REPLACE_FSEEK], [gl_REPLACE_FSEEK])
])
dnl Code shared by fseeko and ftello. Determine if large files are supported,
@@ -73,3 +63,11 @@ AC_DEFUN([gl_STDIN_LARGE_OFFSET],
[gl_cv_var_stdin_large_offset=yes],
[gl_cv_var_stdin_large_offset=no])])
])
+
+# Prerequisites of lib/fseeko.c.
+AC_DEFUN([gl_PREREQ_FSEEKO],
+[
+ dnl Native Windows has the function _fseeki64. mingw hides it, but mingw64
+ dnl makes it usable again.
+ AC_CHECK_FUNCS([_fseeki64])
+])
diff --git a/m4/fstat.m4 b/m4/fstat.m4
new file mode 100644
index 0000000..b2cf2ad
--- /dev/null
+++ b/m4/fstat.m4
@@ -0,0 +1,36 @@
+# fstat.m4 serial 4
+dnl Copyright (C) 2011-2013 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_FSTAT],
+[
+ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+
+ AC_REQUIRE([gl_MSVC_INVAL])
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ REPLACE_FSTAT=1
+ fi
+
+ AC_REQUIRE([gl_HEADER_SYS_STAT_H])
+ if test $WINDOWS_64_BIT_ST_SIZE = 1; then
+ REPLACE_FSTAT=1
+ fi
+
+ dnl Replace fstat() for supporting the gnulib-defined open() on directories.
+ m4_ifdef([gl_FUNC_FCHDIR], [
+ gl_TEST_FCHDIR
+ if test $HAVE_FCHDIR = 0; then
+ case "$gl_cv_func_open_directory_works" in
+ *yes) ;;
+ *)
+ REPLACE_FSTAT=1
+ ;;
+ esac
+ fi
+ ])
+])
+
+# Prerequisites of lib/fstat.c.
+AC_DEFUN([gl_PREREQ_FSTAT], [:])
diff --git a/m4/ftell.m4 b/m4/ftell.m4
index 8d88485..5acd752 100644
--- a/m4/ftell.m4
+++ b/m4/ftell.m4
@@ -1,5 +1,5 @@
-# ftell.m4 serial 1
-dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+# ftell.m4 serial 3
+dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -9,8 +9,7 @@ AC_DEFUN([gl_FUNC_FTELL],
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
AC_REQUIRE([gl_FUNC_FTELLO])
dnl When ftello needs fixes, ftell needs them too.
- if test $REPLACE_FTELLO != 0; then
- AC_LIBOBJ([ftell])
+ if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
REPLACE_FTELL=1
fi
])
diff --git a/m4/ftello.m4 b/m4/ftello.m4
index 599f8f2..678039e 100644
--- a/m4/ftello.m4
+++ b/m4/ftello.m4
@@ -1,5 +1,5 @@
-# ftello.m4 serial 9
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+# ftello.m4 serial 11
+dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -9,6 +9,7 @@ AC_DEFUN([gl_FUNC_FTELLO],
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([gl_STDIN_LARGE_OFFSET])
+ AC_REQUIRE([gl_SYS_TYPES_H])
dnl Persuade glibc <stdio.h> to declare ftello().
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
@@ -30,9 +31,13 @@ AC_DEFUN([gl_FUNC_FTELLO],
if test $gl_cv_func_ftello = no; then
HAVE_FTELLO=0
else
+ if test $WINDOWS_64_BIT_OFF_T = 1; then
+ REPLACE_FTELLO=1
+ fi
if test $gl_cv_var_stdin_large_offset = no; then
REPLACE_FTELLO=1
- else
+ fi
+ if test $REPLACE_FTELLO = 0; then
dnl Detect bug on Solaris.
dnl ftell and ftello produce incorrect results after putc that followed a
dnl getc call that reached EOF on Solaris. This is because the _IOREAD
@@ -124,12 +129,12 @@ main (void)
esac
fi
fi
- if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
- gl_REPLACE_FTELLO
- fi
])
-AC_DEFUN([gl_REPLACE_FTELLO],
+# Prerequisites of lib/ftello.c.
+AC_DEFUN([gl_PREREQ_FTELLO],
[
- AC_LIBOBJ([ftello])
+ dnl Native Windows has the function _ftelli64. mingw hides it, but mingw64
+ dnl makes it usable again.
+ AC_CHECK_FUNCS([_ftelli64])
])
diff --git a/m4/getcwd.m4 b/m4/getcwd.m4
new file mode 100644
index 0000000..6f91bd9
--- /dev/null
+++ b/m4/getcwd.m4
@@ -0,0 +1,155 @@
+# getcwd.m4 - check for working getcwd that is compatible with glibc
+
+# Copyright (C) 2001, 2003-2007, 2009-2013 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# 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 <unistd.h>
+# else /* on Windows with MSVC */
+# include <direct.h>
+# 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 <unistd.h>]],
+ [[extern
+ #ifdef __cplusplus
+ "C"
+ #endif
+ char *getcwd (char *, size_t);
+ ]])
+ ],
+ [gl_cv_func_getcwd_posix_signature=yes],
+ [gl_cv_func_getcwd_posix_signature=no])
+ ])
+])
+
+dnl Guarantee that getcwd will malloc with a NULL first argument. Assumes
+dnl that either the system getcwd is robust, or that calling code is okay
+dnl with spurious failures when run from a directory with an absolute name
+dnl larger than 4k bytes.
+dnl
+dnl Assumes that getcwd exists; if you are worried about obsolete
+dnl platforms that lacked getcwd(), then you need to use the GPL module.
+AC_DEFUN([gl_FUNC_GETCWD_LGPL],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([gl_FUNC_GETCWD_NULL])
+ AC_REQUIRE([gl_FUNC_GETCWD_SIGNATURE])
+
+ case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
+ *yes,yes) ;;
+ *)
+ dnl Minimal replacement lib/getcwd-lgpl.c.
+ REPLACE_GETCWD=1
+ ;;
+ esac
+])
+
+dnl Check for all known getcwd bugs; useful for a program likely to be
+dnl executed from an arbitrary location.
+AC_DEFUN([gl_FUNC_GETCWD],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([gl_FUNC_GETCWD_NULL])
+ AC_REQUIRE([gl_FUNC_GETCWD_SIGNATURE])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ gl_abort_bug=no
+ case "$host_os" in
+ mingw*)
+ gl_cv_func_getcwd_path_max=yes
+ ;;
+ *)
+ gl_FUNC_GETCWD_PATH_MAX
+ case "$gl_cv_func_getcwd_null" in
+ *yes)
+ gl_FUNC_GETCWD_ABORT_BUG([gl_abort_bug=yes])
+ ;;
+ esac
+ ;;
+ esac
+ dnl Define HAVE_MINIMALLY_WORKING_GETCWD and HAVE_PARTLY_WORKING_GETCWD
+ dnl if appropriate.
+ case "$gl_cv_func_getcwd_path_max" in
+ "no"|"no, it has the AIX bug") ;;
+ *)
+ AC_DEFINE([HAVE_MINIMALLY_WORKING_GETCWD], [1],
+ [Define to 1 if getcwd minimally works, that is, its result can be
+ trusted when it succeeds.])
+ ;;
+ esac
+ case "$gl_cv_func_getcwd_path_max" in
+ "no, but it is partly working")
+ AC_DEFINE([HAVE_PARTLY_WORKING_GETCWD], [1],
+ [Define to 1 if getcwd works, except it sometimes fails when it
+ shouldn't, setting errno to ERANGE, ENAMETOOLONG, or ENOENT.])
+ ;;
+ esac
+
+ if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
+ || test $gl_cv_func_getcwd_posix_signature != yes \
+ || test "$gl_cv_func_getcwd_path_max" != yes \
+ || test $gl_abort_bug = yes; then
+ REPLACE_GETCWD=1
+ fi
+])
+
+# Prerequisites of lib/getcwd.c, when full replacement is in effect.
+AC_DEFUN([gl_PREREQ_GETCWD],
+[
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO])
+ :
+])
diff --git a/m4/getdtablesize.m4 b/m4/getdtablesize.m4
index 55bda5a..8f04b3b 100644
--- a/m4/getdtablesize.m4
+++ b/m4/getdtablesize.m4
@@ -1,5 +1,5 @@
-# getdtablesize.m4 serial 1
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# getdtablesize.m4 serial 4
+dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -10,6 +10,8 @@ AC_DEFUN([gl_FUNC_GETDTABLESIZE],
AC_CHECK_FUNCS_ONCE([getdtablesize])
if test $ac_cv_func_getdtablesize != yes; then
HAVE_GETDTABLESIZE=0
- AC_LIBOBJ([getdtablesize])
fi
])
+
+# Prerequisites of lib/getdtablesize.c.
+AC_DEFUN([gl_PREREQ_GETDTABLESIZE], [:])
diff --git a/m4/getopt.m4 b/m4/getopt.m4
index 035a530..50f4509 100644
--- a/m4/getopt.m4
+++ b/m4/getopt.m4
@@ -1,5 +1,5 @@
-# getopt.m4 serial 34
-dnl Copyright (C) 2002-2006, 2008-2011 Free Software Foundation, Inc.
+# getopt.m4 serial 44
+dnl Copyright (C) 2002-2006, 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -9,10 +9,22 @@ AC_DEFUN([gl_FUNC_GETOPT_POSIX],
[
m4_divert_text([DEFAULTS], [gl_getopt_required=POSIX])
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
- gl_GETOPT_IFELSE([
- gl_REPLACE_GETOPT
- ],
- [])
+ AC_REQUIRE([gl_GETOPT_CHECK_HEADERS])
+ dnl Other modules can request the gnulib implementation of the getopt
+ dnl functions unconditionally, by defining gl_REPLACE_GETOPT_ALWAYS.
+ dnl argp.m4 does this.
+ m4_ifdef([gl_REPLACE_GETOPT_ALWAYS], [
+ REPLACE_GETOPT=1
+ ], [
+ REPLACE_GETOPT=0
+ if test -n "$gl_replace_getopt"; then
+ REPLACE_GETOPT=1
+ fi
+ ])
+ if test $REPLACE_GETOPT = 1; then
+ dnl Arrange for getopt.h to be created.
+ gl_GETOPT_SUBSTITUTE_HEADER
+ fi
])
# Request a POSIX compliant getopt function with GNU extensions (such as
@@ -25,27 +37,6 @@ AC_DEFUN([gl_FUNC_GETOPT_GNU],
AC_REQUIRE([gl_FUNC_GETOPT_POSIX])
])
-# Request the gnulib implementation of the getopt functions unconditionally.
-# argp.m4 uses this.
-AC_DEFUN([gl_REPLACE_GETOPT],
-[
- dnl Arrange for getopt.h to be created.
- gl_GETOPT_SUBSTITUTE_HEADER
- dnl Arrange for unistd.h to include getopt.h.
- GNULIB_UNISTD_H_GETOPT=1
- dnl Arrange to compile the getopt implementation.
- AC_LIBOBJ([getopt])
- AC_LIBOBJ([getopt1])
- gl_PREREQ_GETOPT
-])
-
-# emacs' configure.in uses this.
-AC_DEFUN([gl_GETOPT_IFELSE],
-[
- AC_REQUIRE([gl_GETOPT_CHECK_HEADERS])
- AS_IF([test -n "$gl_replace_getopt"], [$1], [$2])
-])
-
# Determine whether to replace the entire getopt facility.
AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
[
@@ -75,11 +66,6 @@ AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
AC_CHECK_FUNCS([getopt_long_only], [], [gl_replace_getopt=yes])
fi
- dnl mingw's getopt (in libmingwex.a) does weird things when the options
- dnl strings starts with '+' and it's not the first call. Some internal state
- dnl is left over from earlier calls, and neither setting optind = 0 nor
- dnl setting optreset = 1 get rid of this internal state.
- dnl POSIX is silent on optind vs. optreset, so we allow either behavior.
dnl POSIX 2008 does not specify leading '+' behavior, but see
dnl http://austingroupbugs.net/view.php?id=191 for a recommendation on
dnl the next version of POSIX. For now, we only guarantee leading '+'
@@ -88,30 +74,16 @@ AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
AC_CACHE_CHECK([whether getopt is POSIX compatible],
[gl_cv_func_getopt_posix],
[
- dnl BSD getopt_long uses an incompatible method to reset
- dnl option processing. Existence of the variable, in and of
- dnl itself, is not a reason to replace getopt, but knowledge
- dnl of the variable is needed to determine how to reset and
- dnl whether a reset reparses the environment. Solaris
- dnl supports neither optreset nor optind=0, but keeps no state
- dnl that needs a reset beyond setting optind=1; detect Solaris
- dnl by getopt_clip.
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <unistd.h>]],
- [[int *p = &optreset; return optreset;]])],
- [gl_optind_min=1],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <getopt.h>]],
- [[return !getopt_clip;]])],
- [gl_optind_min=1],
- [gl_optind_min=0])])
-
- dnl This test fails on mingw and succeeds on many other platforms.
- gl_save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min"
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ dnl Merging these three different test programs into a single one
+ dnl would require a reset mechanism. On BSD systems, it can be done
+ dnl through 'optreset'; on some others (glibc), it can be done by
+ dnl setting 'optind' to 0; on others again (HP-UX, IRIX, OSF/1,
+ dnl Solaris 9, musl libc), there is no such mechanism.
+ if test $cross_compiling = no; then
+ dnl Sanity check. Succeeds everywhere (except on MSVC,
+ dnl which lacks <unistd.h> and getopt() entirely).
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
@@ -119,91 +91,107 @@ AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
int
main ()
{
- {
- int argc = 0;
- char *argv[10];
- int c;
-
- argv[argc++] = "program";
- argv[argc++] = "-a";
- argv[argc++] = "foo";
- argv[argc++] = "bar";
- argv[argc] = NULL;
- optind = OPTIND_MIN;
- opterr = 0;
+ static char program[] = "program";
+ static char a[] = "-a";
+ static char foo[] = "foo";
+ static char bar[] = "bar";
+ char *argv[] = { program, a, foo, bar, NULL };
+ int c;
- c = getopt (argc, argv, "ab");
- if (!(c == 'a'))
- return 1;
- c = getopt (argc, argv, "ab");
- if (!(c == -1))
- return 2;
- if (!(optind == 2))
- return 3;
- }
- /* Some internal state exists at this point. */
- {
- int argc = 0;
- char *argv[10];
- int c;
+ c = getopt (4, argv, "ab");
+ if (!(c == 'a'))
+ return 1;
+ c = getopt (4, argv, "ab");
+ if (!(c == -1))
+ return 2;
+ if (!(optind == 2))
+ return 3;
+ return 0;
+}
+]])],
+ [gl_cv_func_getopt_posix=maybe],
+ [gl_cv_func_getopt_posix=no])
+ if test $gl_cv_func_getopt_posix = maybe; then
+ dnl Sanity check with '+'. Succeeds everywhere (except on MSVC,
+ dnl which lacks <unistd.h> and getopt() entirely).
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
- argv[argc++] = "program";
- argv[argc++] = "donald";
- argv[argc++] = "-p";
- argv[argc++] = "billy";
- argv[argc++] = "duck";
- argv[argc++] = "-a";
- argv[argc++] = "bar";
- argv[argc] = NULL;
- optind = OPTIND_MIN;
- opterr = 0;
+int
+main ()
+{
+ static char program[] = "program";
+ static char donald[] = "donald";
+ static char p[] = "-p";
+ static char billy[] = "billy";
+ static char duck[] = "duck";
+ static char a[] = "-a";
+ static char bar[] = "bar";
+ char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
+ int c;
- c = getopt (argc, argv, "+abp:q:");
- if (!(c == -1))
- return 4;
- if (!(strcmp (argv[0], "program") == 0))
- return 5;
- if (!(strcmp (argv[1], "donald") == 0))
- return 6;
- if (!(strcmp (argv[2], "-p") == 0))
- return 7;
- if (!(strcmp (argv[3], "billy") == 0))
- return 8;
- if (!(strcmp (argv[4], "duck") == 0))
- return 9;
- if (!(strcmp (argv[5], "-a") == 0))
- return 10;
- if (!(strcmp (argv[6], "bar") == 0))
- return 11;
- if (!(optind == 1))
- return 12;
- }
- /* Detect MacOS 10.5, AIX 7.1 bug. */
- {
- char *argv[3] = { "program", "-ab", NULL };
- optind = OPTIND_MIN;
- opterr = 0;
- if (getopt (2, argv, "ab:") != 'a')
- return 13;
- if (getopt (2, argv, "ab:") != '?')
- return 14;
- if (optopt != 'b')
- return 15;
- if (optind != 2)
- return 16;
- }
+ c = getopt (7, argv, "+abp:q:");
+ if (!(c == -1))
+ return 4;
+ if (!(strcmp (argv[0], "program") == 0))
+ return 5;
+ if (!(strcmp (argv[1], "donald") == 0))
+ return 6;
+ if (!(strcmp (argv[2], "-p") == 0))
+ return 7;
+ if (!(strcmp (argv[3], "billy") == 0))
+ return 8;
+ if (!(strcmp (argv[4], "duck") == 0))
+ return 9;
+ if (!(strcmp (argv[5], "-a") == 0))
+ return 10;
+ if (!(strcmp (argv[6], "bar") == 0))
+ return 11;
+ if (!(optind == 1))
+ return 12;
+ return 0;
+}
+]])],
+ [gl_cv_func_getopt_posix=maybe],
+ [gl_cv_func_getopt_posix=no])
+ fi
+ if test $gl_cv_func_getopt_posix = maybe; then
+ dnl Detect Mac OS X 10.5, AIX 7.1, mingw bug.
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+int
+main ()
+{
+ static char program[] = "program";
+ static char ab[] = "-ab";
+ char *argv[3] = { program, ab, NULL };
+ if (getopt (2, argv, "ab:") != 'a')
+ return 13;
+ if (getopt (2, argv, "ab:") != '?')
+ return 14;
+ if (optopt != 'b')
+ return 15;
+ if (optind != 2)
+ return 16;
return 0;
}
]])],
- [gl_cv_func_getopt_posix=yes], [gl_cv_func_getopt_posix=no],
- [case "$host_os" in
- mingw*) gl_cv_func_getopt_posix="guessing no";;
- darwin* | aix*) gl_cv_func_getopt_posix="guessing no";;
- *) gl_cv_func_getopt_posix="guessing yes";;
- esac
- ])
- CPPFLAGS=$gl_save_CPPFLAGS
+ [gl_cv_func_getopt_posix=yes],
+ [gl_cv_func_getopt_posix=no])
+ fi
+ else
+ case "$host_os" in
+ darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
+ *) gl_cv_func_getopt_posix="guessing yes";;
+ esac
+ fi
])
case "$gl_cv_func_getopt_posix" in
*no) gl_replace_getopt=yes ;;
@@ -232,25 +220,32 @@ dnl is ambiguous with environment values that contain newlines.
[AC_LANG_PROGRAM([[#include <getopt.h>
#include <stddef.h>
#include <string.h>
+ ]GL_NOCRASH[
]], [[
int result = 0;
+
+ nocrash_init();
+
/* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
- and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
+ and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
OSF/1 5.1, Solaris 10. */
{
- char *myargv[3];
- myargv[0] = "conftest";
- myargv[1] = "-+";
- myargv[2] = 0;
+ static char conftest[] = "conftest";
+ static char plus[] = "-+";
+ char *argv[3] = { conftest, plus, NULL };
opterr = 0;
- if (getopt (2, myargv, "+a") != '?')
+ if (getopt (2, argv, "+a") != '?')
result |= 1;
}
/* This code succeeds on glibc 2.8, mingw,
- and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
+ and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
{
- char *argv[] = { "program", "-p", "foo", "bar", NULL };
+ static char program[] = "program";
+ static char p[] = "-p";
+ static char foo[] = "foo";
+ static char bar[] = "bar";
+ char *argv[] = { program, p, foo, bar, NULL };
optind = 1;
if (getopt (4, argv, "p::") != 'p')
@@ -264,32 +259,44 @@ dnl is ambiguous with environment values that contain newlines.
}
/* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
{
- char *argv[] = { "program", "foo", "-p", NULL };
+ static char program[] = "program";
+ static char foo[] = "foo";
+ static char p[] = "-p";
+ char *argv[] = { program, foo, p, NULL };
optind = 0;
if (getopt (3, argv, "-p") != 1)
result |= 16;
else if (getopt (3, argv, "-p") != 'p')
- result |= 32;
+ result |= 16;
}
/* This code fails on glibc 2.11. */
{
- char *argv[] = { "program", "-b", "-a", NULL };
+ static char program[] = "program";
+ static char b[] = "-b";
+ static char a[] = "-a";
+ char *argv[] = { program, b, a, NULL };
optind = opterr = 0;
if (getopt (3, argv, "+:a:b") != 'b')
- result |= 64;
+ result |= 32;
else if (getopt (3, argv, "+:a:b") != ':')
+ result |= 32;
+ }
+ /* This code dumps core on glibc 2.14. */
+ {
+ static char program[] = "program";
+ static char w[] = "-W";
+ static char dummy[] = "dummy";
+ char *argv[] = { program, w, dummy, NULL };
+ optind = opterr = 1;
+ if (getopt (3, argv, "W;") != 'W')
result |= 64;
}
return result;
]])],
[gl_cv_func_getopt_gnu=yes],
[gl_cv_func_getopt_gnu=no],
- [dnl Cross compiling. Guess based on host and declarations.
- case $host_os:$ac_cv_have_decl_optreset in
- *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;;
- *:yes) gl_cv_func_getopt_gnu=no;;
- *) gl_cv_func_getopt_gnu=yes;;
- esac
+ [dnl Cross compiling. Assume the worst, even on glibc platforms.
+ gl_cv_func_getopt_gnu="guessing no"
])
case $gl_had_POSIXLY_CORRECT in
exported) ;;
@@ -297,13 +304,54 @@ dnl is ambiguous with environment values that contain newlines.
*) AS_UNSET([POSIXLY_CORRECT]) ;;
esac
])
- if test "$gl_cv_func_getopt_gnu" = "no"; then
+ if test "$gl_cv_func_getopt_gnu" != yes; then
gl_replace_getopt=yes
+ else
+ AC_CACHE_CHECK([for working GNU getopt_long function],
+ [gl_cv_func_getopt_long_gnu],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <getopt.h>
+ #include <stddef.h>
+ #include <string.h>
+ ]],
+ [[static const struct option long_options[] =
+ {
+ { "xtremely-",no_argument, NULL, 1003 },
+ { "xtra", no_argument, NULL, 1001 },
+ { "xtreme", no_argument, NULL, 1002 },
+ { "xtremely", no_argument, NULL, 1003 },
+ { NULL, 0, NULL, 0 }
+ };
+ /* This code fails on OpenBSD 5.0. */
+ {
+ static char program[] = "program";
+ static char xtremel[] = "--xtremel";
+ char *argv[] = { program, xtremel, NULL };
+ int option_index;
+ optind = 1; opterr = 0;
+ if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
+ return 1;
+ }
+ return 0;
+ ]])],
+ [gl_cv_func_getopt_long_gnu=yes],
+ [gl_cv_func_getopt_long_gnu=no],
+ [dnl Cross compiling. Guess no on OpenBSD, yes otherwise.
+ case "$host_os" in
+ openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
+ *) gl_cv_func_getopt_long_gnu="guessing yes";;
+ esac
+ ])
+ ])
+ case "$gl_cv_func_getopt_long_gnu" in
+ *yes) ;;
+ *) gl_replace_getopt=yes ;;
+ esac
fi
fi
])
-# emacs' configure.in uses this.
AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER],
[
GETOPT_H=getopt.h
@@ -314,7 +362,6 @@ AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER],
])
# Prerequisites of lib/getopt*.
-# emacs' configure.in uses this.
AC_DEFUN([gl_PREREQ_GETOPT],
[
AC_CHECK_DECLS_ONCE([getenv])
diff --git a/m4/getpagesize.m4 b/m4/getpagesize.m4
index 79dfbbe..06e893d 100644
--- a/m4/getpagesize.m4
+++ b/m4/getpagesize.m4
@@ -1,5 +1,5 @@
-# getpagesize.m4 serial 8
-dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2011 Free Software Foundation,
+# getpagesize.m4 serial 9
+dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2013 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -24,7 +24,6 @@ AC_DEFUN([gl_FUNC_GETPAGESIZE],
case "$host_os" in
mingw*)
REPLACE_GETPAGESIZE=1
- AC_LIBOBJ([getpagesize])
;;
esac
dnl Also check whether it's declared.
diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4
index 84acadf..3c05e59 100644
--- a/m4/gettimeofday.m4
+++ b/m4/gettimeofday.m4
@@ -1,6 +1,6 @@
-# serial 15
+# serial 20
-# Copyright (C) 2001-2003, 2005, 2007, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2001-2003, 2005, 2007, 2009-2013 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -17,8 +17,6 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY],
gl_gettimeofday_timezone=void
if test $ac_cv_func_gettimeofday != yes; then
HAVE_GETTIMEOFDAY=0
- AC_LIBOBJ([gettimeofday])
- gl_PREREQ_GETTIMEOFDAY
else
gl_FUNC_GETTIMEOFDAY_CLOBBER
AC_CACHE_CHECK([for gettimeofday with POSIX signature],
@@ -51,9 +49,24 @@ int gettimeofday (struct timeval *restrict, struct timezone *restrict);
gl_gettimeofday_timezone='struct timezone'
elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
REPLACE_GETTIMEOFDAY=1
- AC_LIBOBJ([gettimeofday])
- gl_PREREQ_GETTIMEOFDAY
fi
+ 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
@@ -71,6 +84,7 @@ 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],
@@ -93,20 +107,26 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
]])],
[gl_cv_func_gettimeofday_clobber=no],
[gl_cv_func_gettimeofday_clobber=yes],
- dnl When crosscompiling, assume it is broken.
- [gl_cv_func_gettimeofday_clobber=yes])])
+ [# 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
+ ])])
- if test $gl_cv_func_gettimeofday_clobber = yes; then
- REPLACE_GETTIMEOFDAY=1
- gl_GETTIMEOFDAY_REPLACE_LOCALTIME
- AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1],
- [Define if gettimeofday clobbers the localtime buffer.])
- fi
+ 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_LIBOBJ([gettimeofday])
- gl_PREREQ_GETTIMEOFDAY
AC_DEFINE([gmtime], [rpl_gmtime],
[Define to rpl_gmtime if the replacement function should be used.])
AC_DEFINE([localtime], [rpl_localtime],
diff --git a/m4/glibc21.m4 b/m4/glibc21.m4
index bc81c11..613fb2a 100644
--- a/m4/glibc21.m4
+++ b/m4/glibc21.m4
@@ -1,5 +1,5 @@
# glibc21.m4 serial 5
-dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2011 Free Software Foundation,
+dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2013 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/gnulib-cache.m4 b/m4/gnulib-cache.m4
index d7aa3bb..34a8b37 100644
--- a/m4/gnulib-cache.m4
+++ b/m4/gnulib-cache.m4
@@ -1,9 +1,21 @@
-# Copyright (C) 2002-2011 Free Software Foundation, Inc.
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
#
-# This file is free software, distributed under the terms of the GNU
-# General Public License. As a special exception to the GNU General
-# Public License, this file may be distributed as part of a program
-# that contains a configuration script generated by Autoconf, under
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this file. If not, see <http://www.gnu.org/licenses/>.
+#
+# 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.
@@ -15,10 +27,10 @@
# Specification in the form of a command-line invocation:
-# gnulib-tool --import --dir=. --local-dir=local --lib=libm4 --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --with-tests --with-c++-tests --avoid=lock-tests --avoid=tls-tests --makefile-name=gnulib.mk --no-libtool --macro-prefix=M4 announce-gen assert autobuild avltree-oset binary-io c-stack clean-temp cloexec close-stream closein config-h dirname error execute fclose fdl-1.3 fflush filenamecat fopen fopen-safer fseeko gendocs getopt-gnu git-version-gen gnu-web-doc-update gnumakefile gnupload gpl-3.0 ignore-value intprops maintainer-makefile manywarnings memchr2 mkstemp obstack progname regex rename sigaction spawn-pipe stdbool stdint stdlib-safer strsignal strstr strtod strtol unlocked-io update-copyright vc-list-files verror version-etc version-etc-fsf wait-process xalloc xoset xprintf xvasprintf-posix
+# gnulib-tool --import --dir=. --local-dir=gl --lib=libm4 --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --with-tests --with-c++-tests --avoid=lock-tests --avoid=tls-tests --makefile-name=gnulib.mk --no-conditional-dependencies --no-libtool --macro-prefix=M4 announce-gen assert autobuild avltree-oset binary-io c-stack clean-temp cloexec close-stream closein config-h dirname error execute fclose fdl-1.3 fflush filenamecat fopen fopen-safer fseeko gendocs getopt-gnu git-version-gen gnu-web-doc-update gnumakefile gnupload gpl-3.0 ignore-value intprops maintainer-makefile manywarnings memchr2 mkstemp obstack progname regex rename sigaction sigpipe spawn-pipe stdbool stdint stdlib-safer strsignal strstr strtod unlocked-io update-copyright vc-list-files verror version-etc version-etc-fsf wait-process xalloc xoset xprintf xvasprintf-posix
# Specification in the form of a few gnulib-tool.m4 macro invocations:
-gl_LOCAL_DIR([local])
+gl_LOCAL_DIR([gl])
gl_MODULES([
announce-gen
assert
@@ -59,6 +71,7 @@ gl_MODULES([
regex
rename
sigaction
+ sigpipe
spawn-pipe
stdbool
stdint
@@ -66,7 +79,6 @@ gl_MODULES([
strsignal
strstr
strtod
- strtol
unlocked-io
update-copyright
vc-list-files
@@ -91,3 +103,4 @@ gl_LIB([libm4])
gl_MAKEFILE_NAME([gnulib.mk])
gl_MACRO_PREFIX([M4])
gl_PO_DOMAIN([])
+gl_WITNESS_C_MACRO([])
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index ecbf336..0ae5a9e 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -1,5 +1,5 @@
-# gnulib-common.m4 serial 23
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+# gnulib-common.m4 serial 33
+dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -12,11 +12,25 @@ AC_DEFUN([gl_COMMON], [
AC_REQUIRE([gl_COMMON_BODY])
])
AC_DEFUN([gl_COMMON_BODY], [
+ AH_VERBATIM([_Noreturn],
+[/* The _Noreturn keyword of C11. */
+#if ! (defined _Noreturn \
+ || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
+# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
+ || 0x5110 <= __SUNPRO_C)
+# define _Noreturn __attribute__ ((__noreturn__))
+# elif defined _MSC_VER && 1200 <= _MSC_VER
+# define _Noreturn __declspec (noreturn)
+# else
+# define _Noreturn
+# endif
+#endif
+])
AH_VERBATIM([isoc99_inline],
[/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
- __APPLE__ && __MACH__ test for MacOS X.
+ __APPLE__ && __MACH__ test for Mac OS X.
__APPLE_CC__ tests for the Apple compiler and its version.
__STDC_VERSION__ tests for the C99 mode. */
#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
@@ -34,6 +48,20 @@ AC_DEFUN([gl_COMMON_BODY], [
/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
is a misnomer outside of parameter lists. */
#define _UNUSED_PARAMETER_ _GL_UNUSED
+
+/* The __pure__ attribute was added in gcc 2.96. */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#else
+# define _GL_ATTRIBUTE_PURE /* empty */
+#endif
+
+/* The __const__ attribute was added in gcc 2.95. */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
+# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
+#else
+# define _GL_ATTRIBUTE_CONST /* empty */
+#endif
])
dnl Preparation for running test programs:
dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not
@@ -47,16 +75,49 @@ AC_DEFUN([gl_COMMON_BODY], [
# expands to a C preprocessor expression that evaluates to 1 or 0, depending
# whether a gnulib module that has been requested shall be considered present
# or not.
-AC_DEFUN([gl_MODULE_INDICATOR_CONDITION], [1])
+m4_define([gl_MODULE_INDICATOR_CONDITION], [1])
# gl_MODULE_INDICATOR_SET_VARIABLE([modulename])
# sets the shell variable that indicates the presence of the given module to
# a C preprocessor expression that will evaluate to 1.
AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE],
[
- GNULIB_[]m4_translit([[$1]],
- [abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=gl_MODULE_INDICATOR_CONDITION
+ gl_MODULE_INDICATOR_SET_VARIABLE_AUX(
+ [GNULIB_[]m4_translit([[$1]],
+ [abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])],
+ [gl_MODULE_INDICATOR_CONDITION])
+])
+
+# gl_MODULE_INDICATOR_SET_VARIABLE_AUX([variable])
+# modifies the shell variable to include the gl_MODULE_INDICATOR_CONDITION.
+# The shell variable's value is a C preprocessor expression that evaluates
+# to 0 or 1.
+AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX],
+[
+ m4_if(m4_defn([gl_MODULE_INDICATOR_CONDITION]), [1],
+ [
+ dnl Simplify the expression VALUE || 1 to 1.
+ $1=1
+ ],
+ [gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([$1],
+ [gl_MODULE_INDICATOR_CONDITION])])
+])
+
+# gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([variable], [condition])
+# modifies the shell variable to include the given condition. The shell
+# variable's value is a C preprocessor expression that evaluates to 0 or 1.
+AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR],
+[
+ dnl Simplify the expression 1 || CONDITION to 1.
+ if test "$[]$1" != 1; then
+ dnl Simplify the expression 0 || CONDITION to CONDITION.
+ if test "$[]$1" = 0; then
+ $1=$2
+ else
+ $1="($[]$1 || $2)"
+ fi
+ fi
])
# gl_MODULE_INDICATOR([modulename])
@@ -109,7 +170,8 @@ AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS],
AC_DEFUN([gl_ASSERT_NO_GNULIB_POSIXCHECK],
[
dnl Override gl_WARN_ON_USE_PREPARE.
- AC_DEFUN([gl_WARN_ON_USE_PREPARE], [])
+ dnl But hide this definition from 'aclocal'.
+ AC_DEFUN([gl_W][ARN_ON_USE_PREPARE], [])
])
# gl_ASSERT_NO_GNULIB_TESTS
@@ -150,11 +212,90 @@ 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
+# <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00367.html>,
+# but many more packages use AC_PROG_CC_STDC than AC_PROG_CC_C99
+# <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00441.html>.
+# Remaining problems:
+# - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options
+# to CC twice
+# <http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00431.html>.
+# - AC_PROG_CC_STDC is likely to change now that C11 is an ISO standard.
+AC_DEFUN([gl_PROG_CC_C99],
+[
+ dnl Change that version number to the minimum Autoconf version that supports
+ dnl mixing AC_PROG_CC_C99 calls with AC_PROG_CC_STDC calls.
+ m4_version_prereq([9.0],
+ [AC_REQUIRE([AC_PROG_CC_C99])],
+ [AC_REQUIRE([AC_PROG_CC_STDC])])
+])
+
+# gl_PROG_AR_RANLIB
+# Determines the values for AR, ARFLAGS, RANLIB that fit with the compiler.
+# The user can set the variables AR, ARFLAGS, RANLIB if he wants to override
+# the values.
+AC_DEFUN([gl_PROG_AR_RANLIB],
+[
+ dnl Minix 3 comes with two toolchains: The Amsterdam Compiler Kit compiler
+ dnl as "cc", and GCC as "gcc". They have different object file formats and
+ dnl library formats. In particular, the GNU binutils programs ar, ranlib
+ dnl produce libraries that work only with gcc, not with cc.
+ AC_REQUIRE([AC_PROG_CC])
+ AC_CACHE_CHECK([for Minix Amsterdam compiler], [gl_cv_c_amsterdam_compiler],
+ [
+ AC_EGREP_CPP([Amsterdam],
+ [
+#ifdef __ACK__
+Amsterdam
+#endif
+ ],
+ [gl_cv_c_amsterdam_compiler=yes],
+ [gl_cv_c_amsterdam_compiler=no])
+ ])
+ if test -z "$AR"; then
+ if test $gl_cv_c_amsterdam_compiler = yes; then
+ AR='cc -c.a'
+ if test -z "$ARFLAGS"; then
+ ARFLAGS='-o'
+ fi
+ else
+ dnl Use the Automake-documented default values for AR and ARFLAGS,
+ dnl but prefer ${host}-ar over ar (useful for cross-compiling).
+ AC_CHECK_TOOL([AR], [ar], [ar])
+ if test -z "$ARFLAGS"; then
+ ARFLAGS='cru'
+ fi
+ fi
+ else
+ if test -z "$ARFLAGS"; then
+ ARFLAGS='cru'
+ fi
+ fi
+ AC_SUBST([AR])
+ AC_SUBST([ARFLAGS])
+ if test -z "$RANLIB"; then
+ if test $gl_cv_c_amsterdam_compiler = yes; then
+ RANLIB=':'
+ else
+ dnl Use the ranlib program if it is available.
+ AC_PROG_RANLIB
+ fi
+ fi
+ AC_SUBST([RANLIB])
+])
+
# AC_PROG_MKDIR_P
# is a backport of autoconf-2.60's AC_PROG_MKDIR_P, with a fix
# for interoperability with automake-1.9.6 from autoconf-2.62.
# Remove this macro when we can assume autoconf >= 2.62 or
# autoconf >= 2.60 && automake >= 1.10.
+# AC_AUTOCONF_VERSION was introduced in 2.62, so use that as the witness.
+m4_ifndef([AC_AUTOCONF_VERSION],[
m4_ifdef([AC_PROG_MKDIR_P], [
dnl For automake-1.9.6 && autoconf < 2.62: Ensure MKDIR_P is AC_SUBSTed.
m4_define([AC_PROG_MKDIR_P],
@@ -165,13 +306,15 @@ m4_ifdef([AC_PROG_MKDIR_P], [
[AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
MKDIR_P='$(mkdir_p)'
AC_SUBST([MKDIR_P])])])
+])
# AC_C_RESTRICT
# This definition overrides the AC_C_RESTRICT macro from autoconf 2.60..2.61,
# so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++
# works.
# This definition can be removed once autoconf >= 2.62 can be assumed.
-m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.62]),[-1],[
+# AC_AUTOCONF_VERSION was introduced in 2.62, so use that as the witness.
+m4_ifndef([AC_AUTOCONF_VERSION],[
AC_DEFUN([AC_C_RESTRICT],
[AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict],
[ac_cv_c_restrict=no
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index 9a51c9f..2fe7131 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -1,10 +1,22 @@
# DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2002-2011 Free Software Foundation, Inc.
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
#
-# This file is free software, distributed under the terms of the GNU
-# General Public License. As a special exception to the GNU General
-# Public License, this file may be distributed as part of a program
-# that contains a configuration script generated by Autoconf, under
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this file. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License,
+# this file may be distributed as part of a program that
+# contains a configuration script generated by Autoconf, under
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
@@ -25,13 +37,12 @@ AC_DEFUN([M4_EARLY],
m4_pattern_allow([^gl_ES$])dnl a valid locale name
m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
- AC_REQUIRE([AC_PROG_RANLIB])
+ AC_REQUIRE([gl_PROG_AR_RANLIB])
AC_REQUIRE([AM_PROG_CC_C_O])
# Code from module alloca-opt:
# Code from module alloca-opt-tests:
# Code from module announce-gen:
# Code from module ansi-c++-opt:
- # Code from module arg-nonnull:
# Code from module array-list:
# Code from module array-list-tests:
# Code from module array-oset:
@@ -45,31 +56,39 @@ AC_DEFUN([M4_EARLY],
# Code from module binary-io-tests:
# Code from module btowc:
# Code from module btowc-tests:
- # Code from module c++defs:
# Code from module c-ctype:
# Code from module c-ctype-tests:
# Code from module c-stack:
# Code from module c-stack-tests:
# Code from module c-strcase:
# Code from module c-strcase-tests:
+ # Code from module c-strcaseeq:
# Code from module canonicalize-lgpl:
# Code from module canonicalize-lgpl-tests:
+ # Code from module chdir:
+ # Code from module chdir-tests:
# Code from module clean-temp:
# Code from module cloexec:
# Code from module cloexec-tests:
# Code from module close:
- # Code from module close-hook:
# Code from module close-stream:
+ # Code from module close-tests:
+ # Code from module closedir:
# Code from module closein:
# Code from module closein-tests:
# Code from module closeout:
# Code from module config-h:
# Code from module configmake:
+ # Code from module dirent:
+ # Code from module dirent-c++-tests:
+ # Code from module dirent-tests:
# Code from module dirname:
# Code from module dirname-lgpl:
# Code from module dirname-tests:
# Code from module dosname:
# Code from module double-slash-root:
+ # Code from module dup:
+ # Code from module dup-tests:
# Code from module dup2:
# Code from module dup2-tests:
# Code from module environ:
@@ -81,22 +100,30 @@ AC_DEFUN([M4_EARLY],
# Code from module exitfail:
# Code from module extensions:
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ # Code from module extern-inline:
# Code from module fatal-signal:
# Code from module fclose:
+ # Code from module fclose-tests:
# Code from module fcntl:
# Code from module fcntl-h:
# Code from module fcntl-h-c++-tests:
# Code from module fcntl-h-tests:
# Code from module fcntl-tests:
+ # Code from module fd-hook:
# Code from module fd-safer-flag:
# Code from module fdl-1.3:
+ # Code from module fdopen:
+ # Code from module fdopen-tests:
# Code from module fflush:
AC_REQUIRE([AC_FUNC_FSEEKO])
# Code from module fflush-tests:
+ # Code from module fgetc-tests:
+ # Code from module filename:
# Code from module filenamecat:
# Code from module filenamecat-lgpl:
# Code from module filenamecat-tests:
# Code from module float:
+ # Code from module float-tests:
# Code from module fopen:
# Code from module fopen-safer:
# Code from module fopen-safer-tests:
@@ -108,6 +135,8 @@ AC_DEFUN([M4_EARLY],
# Code from module fpucw:
# Code from module fpurge:
# Code from module fpurge-tests:
+ # Code from module fputc-tests:
+ # Code from module fread-tests:
# Code from module freadahead:
# Code from module freadahead-tests:
# Code from module freading:
@@ -116,15 +145,22 @@ AC_DEFUN([M4_EARLY],
# Code from module frexp-nolibm-tests:
# Code from module frexpl-nolibm:
# Code from module frexpl-nolibm-tests:
+ # Code from module fseek:
+ # Code from module fseek-tests:
# Code from module fseeko:
AC_REQUIRE([AC_FUNC_FSEEKO])
# Code from module fseeko-tests:
+ # Code from module fstat:
+ # Code from module fstat-tests:
# Code from module ftell:
# Code from module ftell-tests:
# Code from module ftello:
AC_REQUIRE([AC_FUNC_FSEEKO])
# Code from module ftello-tests:
+ # Code from module fwrite-tests:
# Code from module gendocs:
+ # Code from module getcwd-lgpl:
+ # Code from module getcwd-lgpl-tests:
# Code from module getdtablesize:
# Code from module getdtablesize-tests:
# Code from module getopt-gnu:
@@ -143,8 +179,11 @@ AC_DEFUN([M4_EARLY],
# Code from module ignore-value:
# Code from module ignore-value-tests:
# Code from module include_next:
- # Code from module inline:
# Code from module intprops:
+ # Code from module intprops-tests:
+ # Code from module inttypes:
+ # Code from module inttypes-incomplete:
+ # Code from module inttypes-tests:
# Code from module isnand-nolibm:
# Code from module isnand-nolibm-tests:
# Code from module isnanf-nolibm:
@@ -154,6 +193,8 @@ AC_DEFUN([M4_EARLY],
# Code from module langinfo:
# Code from module langinfo-c++-tests:
# Code from module langinfo-tests:
+ # Code from module largefile:
+ AC_REQUIRE([AC_SYS_LARGEFILE])
# Code from module libsigsegv:
# Code from module link:
# Code from module link-tests:
@@ -164,6 +205,8 @@ AC_DEFUN([M4_EARLY],
# Code from module locale:
# Code from module locale-c++-tests:
# 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:
@@ -192,6 +235,8 @@ AC_DEFUN([M4_EARLY],
# Code from module memchr2-tests:
# Code from module mkdtemp:
# 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:
@@ -199,15 +244,20 @@ AC_DEFUN([M4_EARLY],
# Code from module obstack:
# Code from module open:
# Code from module open-tests:
+ # Code from module opendir:
# Code from module oset:
# Code from module pathmax:
+ # Code from module pathmax-tests:
# Code from module pipe2:
# Code from module pipe2-safer:
# Code from module pipe2-tests:
# Code from module posix_spawn-internal:
# Code from module posix_spawn_file_actions_addclose:
+ # Code from module posix_spawn_file_actions_addclose-tests:
# Code from module posix_spawn_file_actions_adddup2:
+ # Code from module posix_spawn_file_actions_adddup2-tests:
# Code from module posix_spawn_file_actions_addopen:
+ # Code from module posix_spawn_file_actions_addopen-tests:
# Code from module posix_spawn_file_actions_destroy:
# Code from module posix_spawn_file_actions_init:
# Code from module posix_spawnattr_destroy:
@@ -226,11 +276,15 @@ AC_DEFUN([M4_EARLY],
# Code from module quotearg:
# Code from module quotearg-simple:
# Code from module quotearg-simple-tests:
+ # Code from module raise:
+ # Code from module raise-tests:
# Code from module rawmemchr:
# Code from module rawmemchr-tests:
+ # Code from module readdir:
# Code from module readlink:
# Code from module readlink-tests:
# Code from module regex:
+ # Code from module regex-tests:
# Code from module rename:
# Code from module rename-tests:
# Code from module rmdir:
@@ -238,19 +292,30 @@ AC_DEFUN([M4_EARLY],
# Code from module same-inode:
# Code from module sched:
# Code from module sched-tests:
+ # Code from module secure_getenv:
# Code from module setenv:
# Code from module setenv-tests:
# Code from module setlocale:
# Code from module setlocale-tests:
# Code from module sigaction:
# Code from module sigaction-tests:
- # Code from module signal:
- # Code from module signal-c++-tests:
- # Code from module signal-tests:
+ # Code from module signal-h:
+ # Code from module signal-h-c++-tests:
+ # Code from module signal-h-tests:
# Code from module signbit:
# Code from module signbit-tests:
+ # Code from module sigpipe:
+ # Code from module sigpipe-tests:
# Code from module sigprocmask:
+ # Code from module sigprocmask-tests:
# Code from module size_max:
+ # Code from module sleep:
+ # Code from module sleep-tests:
+ # Code from module snippet/_Noreturn:
+ # Code from module snippet/arg-nonnull:
+ # Code from module snippet/c++defs:
+ # Code from module snippet/unused-parameter:
+ # Code from module snippet/warn-on-use:
# Code from module snprintf:
# Code from module snprintf-tests:
# Code from module spawn:
@@ -264,9 +329,9 @@ AC_DEFUN([M4_EARLY],
# Code from module stdarg:
dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode
dnl for the builtin va_copy to work. With Autoconf 2.60 or later,
- dnl AC_PROG_CC_STDC arranges for this. With older Autoconf AC_PROG_CC_STDC
+ dnl gl_PROG_CC_C99 arranges for this. With older Autoconf gl_PROG_CC_C99
dnl shouldn't hurt, though installers are on their own to set c99 mode.
- AC_REQUIRE([AC_PROG_CC_STDC])
+ gl_PROG_CC_C99
# Code from module stdbool:
# Code from module stdbool-tests:
# Code from module stddef:
@@ -285,6 +350,7 @@ AC_DEFUN([M4_EARLY],
# Code from module strdup-posix:
# Code from module streq:
# Code from module strerror:
+ # Code from module strerror-override:
# Code from module strerror-tests:
# Code from module string:
# Code from module string-c++-tests:
@@ -299,7 +365,6 @@ AC_DEFUN([M4_EARLY],
# Code from module strstr-tests:
# Code from module strtod:
# Code from module strtod-tests:
- # Code from module strtol:
# Code from module symlink:
# Code from module symlink-tests:
# Code from module sys_stat:
@@ -308,10 +373,15 @@ AC_DEFUN([M4_EARLY],
# Code from module sys_time:
# Code from module sys_time-c++-tests:
# Code from module sys_time-tests:
+ # Code from module sys_types:
+ # Code from module sys_types-c++-tests:
+ # Code from module sys_types-tests:
# Code from module sys_wait:
# Code from module sys_wait-c++-tests:
# 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 threadlib:
gl_THREADLIB_EARLY
# Code from module time:
@@ -346,7 +416,6 @@ AC_DEFUN([M4_EARLY],
# Code from module version-etc-tests:
# Code from module wait-process:
# Code from module waitpid:
- # Code from module warn-on-use:
# Code from module warnings:
# Code from module wchar:
# Code from module wchar-c++-tests:
@@ -358,9 +427,12 @@ AC_DEFUN([M4_EARLY],
# Code from module wctype-h:
# Code from module wctype-h-c++-tests:
# Code from module wctype-h-tests:
+ # Code from module write:
+ # Code from module write-tests:
# Code from module xalloc:
# Code from module xalloc-die:
# Code from module xalloc-die-tests:
+ # Code from module xalloc-oversized:
# Code from module xlist:
# Code from module xmalloca:
# Code from module xoset:
@@ -388,141 +460,182 @@ AC_DEFUN([M4_INIT],
m4_pushdef([M4_LIBSOURCES_DIR], [])
gl_COMMON
gl_source_base='lib'
- # Code from module alloca-opt:
gl_FUNC_ALLOCA
- # Code from module announce-gen:
- # Code from module arg-nonnull:
- # Code from module assert:
gl_ASSERT
- # Code from module autobuild:
- # Code from module avltree-oset:
- # Code from module binary-io:
- # Code from module btowc:
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])
- # Code from module c++defs:
- # Code from module c-ctype:
- # Code from module c-stack:
gl_C_STACK
- # Code from module canonicalize-lgpl:
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])
- # Code from module clean-temp:
+ gl_UNISTD_MODULE_INDICATOR([chdir])
AC_DEFINE([SIGNAL_SAFE_LIST], [1], [Define if lists must be signal-safe.])
- # Code from module cloexec:
- gl_CLOEXEC
gl_MODULE_INDICATOR_FOR_TESTS([cloexec])
- # Code from module close:
gl_FUNC_CLOSE
+ if test $REPLACE_CLOSE = 1; then
+ AC_LIBOBJ([close])
+ fi
gl_UNISTD_MODULE_INDICATOR([close])
- # Code from module close-hook:
- # Code from module close-stream:
gl_CLOSE_STREAM
gl_MODULE_INDICATOR([close-stream])
- # Code from module closein:
gl_CLOSEIN
- # Code from module closeout:
gl_CLOSEOUT
- # Code from module config-h:
gl_CONFIG_H
- # Code from module configmake:
gl_CONFIGMAKE_PREP
- # Code from module dirname:
gl_DIRNAME
gl_MODULE_INDICATOR([dirname])
- # Code from module dirname-lgpl:
gl_DIRNAME_LGPL
- # Code from module dosname:
- # Code from module double-slash-root:
gl_DOUBLE_SLASH_ROOT
- # Code from module dup2:
gl_FUNC_DUP2
+ if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
+ AC_LIBOBJ([dup2])
+ gl_PREREQ_DUP2
+ fi
gl_UNISTD_MODULE_INDICATOR([dup2])
- # Code from module environ:
gl_ENVIRON
gl_UNISTD_MODULE_INDICATOR([environ])
- # Code from module errno:
gl_HEADER_ERRNO_H
- # Code from module error:
gl_ERROR
+ if test $ac_cv_lib_error_at_line = no; then
+ AC_LIBOBJ([error])
+ gl_PREREQ_ERROR
+ fi
m4_ifdef([AM_XGETTEXT_OPTION],
[AM_][XGETTEXT_OPTION([--flag=error:3:c-format])
AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
- # Code from module execute:
gl_EXECUTE
- # Code from module exitfail:
- # Code from module extensions:
- # Code from module fatal-signal:
+ AC_REQUIRE([gl_EXTERN_INLINE])
gl_FATAL_SIGNAL
- # Code from module fclose:
gl_FUNC_FCLOSE
+ if test $REPLACE_FCLOSE = 1; then
+ AC_LIBOBJ([fclose])
+ fi
gl_STDIO_MODULE_INDICATOR([fclose])
- # Code from module fcntl:
gl_FUNC_FCNTL
+ if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
+ AC_LIBOBJ([fcntl])
+ fi
gl_FCNTL_MODULE_INDICATOR([fcntl])
- # Code from module fcntl-h:
gl_FCNTL_H
- # Code from module fd-safer-flag:
gl_MODULE_INDICATOR([fd-safer-flag])
- # Code from module fdl-1.3:
- # Code from module fflush:
gl_FUNC_FFLUSH
+ if test $REPLACE_FFLUSH = 1; then
+ AC_LIBOBJ([fflush])
+ gl_PREREQ_FFLUSH
+ fi
+ gl_MODULE_INDICATOR([fflush])
gl_STDIO_MODULE_INDICATOR([fflush])
- # Code from module filenamecat:
gl_FILE_NAME_CONCAT
gl_MODULE_INDICATOR([filenamecat])
- # Code from module filenamecat-lgpl:
gl_FILE_NAME_CONCAT_LGPL
- # Code from module float:
gl_FLOAT_H
- # Code from module fopen:
+ if test $REPLACE_FLOAT_LDBL = 1; then
+ AC_LIBOBJ([float])
+ fi
+ if test $REPLACE_ITOLD = 1; then
+ AC_LIBOBJ([itold])
+ fi
gl_FUNC_FOPEN
+ if test $REPLACE_FOPEN = 1; then
+ AC_LIBOBJ([fopen])
+ gl_PREREQ_FOPEN
+ fi
gl_STDIO_MODULE_INDICATOR([fopen])
- # Code from module fopen-safer:
- gl_FOPEN_SAFER
gl_MODULE_INDICATOR([fopen-safer])
- # Code from module fpending:
gl_FUNC_FPENDING
- # Code from module fpieee:
- # Code from module fpucw:
- # Code from module fpurge:
+ if test $gl_cv_func___fpending = no; then
+ AC_LIBOBJ([fpending])
+ gl_PREREQ_FPENDING
+ fi
gl_FUNC_FPURGE
+ if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
+ AC_LIBOBJ([fpurge])
+ fi
gl_STDIO_MODULE_INDICATOR([fpurge])
- # Code from module freadahead:
- # Code from module freading:
+ gl_FUNC_FREADAHEAD
+ if test $ac_cv_func___freadahead = no; then
+ AC_LIBOBJ([freadahead])
+ fi
gl_FUNC_FREADING
- # Code from module frexp-nolibm:
gl_FUNC_FREXP_NO_LIBM
+ if test $gl_func_frexp_no_libm != yes; then
+ AC_LIBOBJ([frexp])
+ fi
gl_MATH_MODULE_INDICATOR([frexp])
- # Code from module frexpl-nolibm:
gl_FUNC_FREXPL_NO_LIBM
+ if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then
+ AC_LIBOBJ([frexpl])
+ fi
gl_MATH_MODULE_INDICATOR([frexpl])
- # Code from module fseeko:
+ gl_FUNC_FSEEK
+ if test $REPLACE_FSEEK = 1; then
+ AC_LIBOBJ([fseek])
+ fi
+ gl_STDIO_MODULE_INDICATOR([fseek])
gl_FUNC_FSEEKO
+ if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
+ AC_LIBOBJ([fseeko])
+ gl_PREREQ_FSEEKO
+ fi
gl_STDIO_MODULE_INDICATOR([fseeko])
- # Code from module ftello:
+ gl_FUNC_FSTAT
+ if test $REPLACE_FSTAT = 1; then
+ AC_LIBOBJ([fstat])
+ gl_PREREQ_FSTAT
+ fi
+ gl_SYS_STAT_MODULE_INDICATOR([fstat])
+ gl_FUNC_FTELL
+ if test $REPLACE_FTELL = 1; then
+ AC_LIBOBJ([ftell])
+ fi
+ gl_STDIO_MODULE_INDICATOR([ftell])
gl_FUNC_FTELLO
+ if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
+ AC_LIBOBJ([ftello])
+ gl_PREREQ_FTELLO
+ fi
gl_STDIO_MODULE_INDICATOR([ftello])
- # Code from module gendocs:
- # Code from module getdtablesize:
gl_FUNC_GETDTABLESIZE
+ if test $HAVE_GETDTABLESIZE = 0; then
+ AC_LIBOBJ([getdtablesize])
+ gl_PREREQ_GETDTABLESIZE
+ fi
gl_UNISTD_MODULE_INDICATOR([getdtablesize])
- # Code from module getopt-gnu:
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_M4_UNISTD_H_GETOPT=1
+ fi
+ AC_SUBST([GNULIB_GL_M4_UNISTD_H_GETOPT])
gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
- # Code from module getopt-posix:
gl_FUNC_GETOPT_POSIX
- # Code from module gettext-h:
+ 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_M4_UNISTD_H_GETOPT=1
+ fi
+ AC_SUBST([GNULIB_GL_M4_UNISTD_H_GETOPT])
AC_SUBST([LIBINTL])
AC_SUBST([LTLIBINTL])
- # Code from module gettimeofday:
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])
- # Code from module git-version-gen:
- # Code from module gnu-web-doc-update:
- # Code from module gnumakefile:
# Autoconf 2.61a.99 and earlier don't support linking a file only
# in VPATH builds. But since GNUmakefile is for maintainer use
# only, it does not matter if we skip the link with older autoconf.
@@ -530,350 +643,379 @@ AC_DEFUN([M4_INIT],
# builds, so use a shell variable to bypass this.
GNUmakefile=GNUmakefile
m4_if(m4_version_compare([2.61a.100],
- m4_defn([m4_PACKAGE_VERSION])), [1], [],
+ m4_defn([m4_PACKAGE_VERSION])), [1], [],
[AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
- [GNUmakefile=$GNUmakefile])])
- # Code from module gnupload:
- # Code from module gpl-3.0:
- # Code from module havelib:
- # Code from module ignore-value:
- AC_REQUIRE([AC_C_INLINE])
- # Code from module include_next:
- # Code from module inline:
- gl_INLINE
- # Code from module intprops:
- # Code from module isnand-nolibm:
+ [GNUmakefile=$GNUmakefile])])
gl_FUNC_ISNAND_NO_LIBM
- # Code from module isnanf-nolibm:
+ if test $gl_func_isnand_no_libm != yes; then
+ AC_LIBOBJ([isnand])
+ gl_PREREQ_ISNAND
+ fi
gl_FUNC_ISNANF_NO_LIBM
- # Code from module isnanl-nolibm:
+ if test $gl_func_isnanf_no_libm != yes; then
+ AC_LIBOBJ([isnanf])
+ gl_PREREQ_ISNANF
+ fi
gl_FUNC_ISNANL_NO_LIBM
- # Code from module langinfo:
+ if test $gl_func_isnanl_no_libm != yes; then
+ AC_LIBOBJ([isnanl])
+ gl_PREREQ_ISNANL
+ fi
gl_LANGINFO_H
- # Code from module libsigsegv:
+ AC_REQUIRE([gl_LARGEFILE])
gl_LIBSIGSEGV
- # Code from module linkedhash-list:
- # Code from module list:
- gl_LIST
- # Code from module localcharset:
gl_LOCALCHARSET
- LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\""
+ LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
- # Code from module lock:
+ gl_LOCALE_H
+ gl_FUNC_LOCALECONV
+ if test $REPLACE_LOCALECONV = 1; then
+ AC_LIBOBJ([localeconv])
+ gl_PREREQ_LOCALECONV
+ fi
+ gl_LOCALE_MODULE_INDICATOR([localeconv])
gl_LOCK
- # Code from module lseek:
+ gl_MODULE_INDICATOR([lock])
gl_FUNC_LSEEK
+ if test $REPLACE_LSEEK = 1; then
+ AC_LIBOBJ([lseek])
+ fi
gl_UNISTD_MODULE_INDICATOR([lseek])
- # Code from module lstat:
gl_FUNC_LSTAT
+ if test $REPLACE_LSTAT = 1; then
+ AC_LIBOBJ([lstat])
+ gl_PREREQ_LSTAT
+ fi
gl_SYS_STAT_MODULE_INDICATOR([lstat])
- # Code from module maintainer-makefile:
AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER],
[AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])])
- # Code from module malloc-gnu:
gl_FUNC_MALLOC_GNU
+ if test $REPLACE_MALLOC = 1; then
+ AC_LIBOBJ([malloc])
+ fi
gl_MODULE_INDICATOR([malloc-gnu])
- # Code from module malloc-posix:
gl_FUNC_MALLOC_POSIX
+ if test $REPLACE_MALLOC = 1; then
+ AC_LIBOBJ([malloc])
+ fi
gl_STDLIB_MODULE_INDICATOR([malloc-posix])
- # Code from module malloca:
gl_MALLOCA
- # Code from module manywarnings:
- # Code from module math:
gl_MATH_H
- # Code from module mbrtowc:
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])
- # Code from module mbsinit:
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])
- # Code from module mbtowc:
gl_FUNC_MBTOWC
+ if test $REPLACE_MBTOWC = 1; then
+ AC_LIBOBJ([mbtowc])
+ gl_PREREQ_MBTOWC
+ fi
gl_STDLIB_MODULE_INDICATOR([mbtowc])
- # Code from module memchr:
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])
- # Code from module memchr2:
- # Code from module mkdtemp:
- gt_FUNC_MKDTEMP
+ gl_FUNC_MKDTEMP
+ if test $HAVE_MKDTEMP = 0; then
+ AC_LIBOBJ([mkdtemp])
+ gl_PREREQ_MKDTEMP
+ fi
gl_STDLIB_MODULE_INDICATOR([mkdtemp])
- # Code from module mkstemp:
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])
- # Code from module multiarch:
+ gl_MSVC_INVAL
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ AC_LIBOBJ([msvc-inval])
+ fi
+ gl_MSVC_NOTHROW
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ AC_LIBOBJ([msvc-nothrow])
+ fi
gl_MULTIARCH
- # Code from module nl_langinfo:
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])
- # Code from module nocrash:
- # Code from module obstack:
AC_FUNC_OBSTACK
dnl Note: AC_FUNC_OBSTACK does AC_LIBSOURCES([obstack.h, obstack.c]).
- # Code from module open:
gl_FUNC_OPEN
+ if test $REPLACE_OPEN = 1; then
+ AC_LIBOBJ([open])
+ gl_PREREQ_OPEN
+ fi
gl_FCNTL_MODULE_INDICATOR([open])
- # Code from module oset:
- gl_LIST
- # Code from module pathmax:
gl_PATHMAX
- # Code from module pipe2:
gl_FUNC_PIPE2
gl_UNISTD_MODULE_INDICATOR([pipe2])
- # Code from module pipe2-safer:
gl_MODULE_INDICATOR([pipe2-safer])
- # Code from module posix_spawn-internal:
- # Code from module posix_spawn_file_actions_addclose:
- gl_POSIX_SPAWN
- if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
- gl_REPLACE_SPAWN_H
+ gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = 1; then
AC_LIBOBJ([spawn_faction_addclose])
fi
gl_SPAWN_MODULE_INDICATOR([posix_spawn_file_actions_addclose])
- # Code from module posix_spawn_file_actions_adddup2:
- gl_POSIX_SPAWN
- if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
- gl_REPLACE_SPAWN_H
+ gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = 1; then
AC_LIBOBJ([spawn_faction_adddup2])
fi
gl_SPAWN_MODULE_INDICATOR([posix_spawn_file_actions_adddup2])
- # Code from module posix_spawn_file_actions_addopen:
- gl_POSIX_SPAWN
- if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
- gl_REPLACE_SPAWN_H
+ gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = 1; then
AC_LIBOBJ([spawn_faction_addopen])
fi
gl_SPAWN_MODULE_INDICATOR([posix_spawn_file_actions_addopen])
- # Code from module posix_spawn_file_actions_destroy:
gl_POSIX_SPAWN
if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
- gl_REPLACE_SPAWN_H
AC_LIBOBJ([spawn_faction_destroy])
fi
gl_SPAWN_MODULE_INDICATOR([posix_spawn_file_actions_destroy])
- # Code from module posix_spawn_file_actions_init:
gl_POSIX_SPAWN
if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
- gl_REPLACE_SPAWN_H
AC_LIBOBJ([spawn_faction_init])
fi
gl_SPAWN_MODULE_INDICATOR([posix_spawn_file_actions_init])
- # Code from module posix_spawnattr_destroy:
gl_POSIX_SPAWN
if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
- gl_REPLACE_SPAWN_H
AC_LIBOBJ([spawnattr_destroy])
fi
gl_SPAWN_MODULE_INDICATOR([posix_spawnattr_destroy])
- # Code from module posix_spawnattr_init:
gl_POSIX_SPAWN
if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
- gl_REPLACE_SPAWN_H
AC_LIBOBJ([spawnattr_init])
fi
gl_SPAWN_MODULE_INDICATOR([posix_spawnattr_init])
- # Code from module posix_spawnattr_setflags:
gl_POSIX_SPAWN
if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
- gl_REPLACE_SPAWN_H
AC_LIBOBJ([spawnattr_setflags])
fi
gl_SPAWN_MODULE_INDICATOR([posix_spawnattr_setflags])
- # Code from module posix_spawnattr_setsigmask:
gl_POSIX_SPAWN
if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
- gl_REPLACE_SPAWN_H
AC_LIBOBJ([spawnattr_setsigmask])
fi
gl_SPAWN_MODULE_INDICATOR([posix_spawnattr_setsigmask])
- # Code from module posix_spawnp:
gl_POSIX_SPAWN
if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
- gl_REPLACE_SPAWN_H
AC_LIBOBJ([spawnp])
- gl_POSIX_SPAWN_INTERNAL
+ AC_LIBOBJ([spawni])
+ gl_PREREQ_POSIX_SPAWN_INTERNAL
fi
gl_SPAWN_MODULE_INDICATOR([posix_spawnp])
- # Code from module printf-frexp:
gl_FUNC_PRINTF_FREXP
- # Code from module printf-frexpl:
gl_FUNC_PRINTF_FREXPL
- # Code from module printf-safe:
m4_divert_text([INIT_PREPARE], [gl_printf_safe=yes])
- # Code from module progname:
AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>])
AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>])
- # Code from module quotearg:
gl_QUOTEARG
- # Code from module quotearg-simple:
- # Code from module rawmemchr:
+ gl_FUNC_RAISE
+ if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
+ AC_LIBOBJ([raise])
+ gl_PREREQ_RAISE
+ fi
+ gl_SIGNAL_MODULE_INDICATOR([raise])
gl_FUNC_RAWMEMCHR
+ if test $HAVE_RAWMEMCHR = 0; then
+ AC_LIBOBJ([rawmemchr])
+ gl_PREREQ_RAWMEMCHR
+ fi
gl_STRING_MODULE_INDICATOR([rawmemchr])
- # Code from module readlink:
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])
- # Code from module regex:
gl_REGEX
- # Code from module rename:
+ if test $ac_use_included_regex = yes; then
+ AC_LIBOBJ([regex])
+ gl_PREREQ_REGEX
+ fi
gl_FUNC_RENAME
+ if test $REPLACE_RENAME = 1; then
+ AC_LIBOBJ([rename])
+ fi
gl_STDIO_MODULE_INDICATOR([rename])
- # Code from module rmdir:
gl_FUNC_RMDIR
+ if test $REPLACE_RMDIR = 1; then
+ AC_LIBOBJ([rmdir])
+ fi
gl_UNISTD_MODULE_INDICATOR([rmdir])
- # Code from module same-inode:
- # Code from module sched:
gl_SCHED_H
- # Code from module sigaction:
+ gl_FUNC_SECURE_GETENV
+ if test $HAVE_SECURE_GETENV = 0; then
+ AC_LIBOBJ([secure_getenv])
+ gl_PREREQ_SECURE_GETENV
+ fi
+ gl_STDLIB_MODULE_INDICATOR([secure_getenv])
gl_SIGACTION
+ if test $HAVE_SIGACTION = 0; then
+ AC_LIBOBJ([sigaction])
+ gl_PREREQ_SIGACTION
+ fi
gl_SIGNAL_MODULE_INDICATOR([sigaction])
- # Code from module signal:
gl_SIGNAL_H
- # Code from module signbit:
gl_SIGNBIT
+ if test $REPLACE_SIGNBIT = 1; then
+ AC_LIBOBJ([signbitf])
+ AC_LIBOBJ([signbitd])
+ AC_LIBOBJ([signbitl])
+ fi
gl_MATH_MODULE_INDICATOR([signbit])
- # Code from module sigprocmask:
+ gl_SIGNAL_SIGPIPE
+ dnl Define the C macro GNULIB_SIGPIPE to 1.
+ gl_MODULE_INDICATOR([sigpipe])
+ dnl Define the substituted variable GNULIB_SIGNAL_H_SIGPIPE to 1.
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ GNULIB_SIGNAL_H_SIGPIPE=1
+ dnl Define the substituted variable GNULIB_STDIO_H_SIGPIPE to 1.
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_REQUIRE([gl_ASM_SYMBOL_PREFIX])
+ GNULIB_STDIO_H_SIGPIPE=1
+ dnl Define the substituted variable GNULIB_UNISTD_H_SIGPIPE to 1.
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ GNULIB_UNISTD_H_SIGPIPE=1
gl_SIGNALBLOCKING
+ if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
+ AC_LIBOBJ([sigprocmask])
+ gl_PREREQ_SIGPROCMASK
+ fi
gl_SIGNAL_MODULE_INDICATOR([sigprocmask])
- # Code from module size_max:
gl_SIZE_MAX
- # Code from module snprintf:
gl_FUNC_SNPRINTF
gl_STDIO_MODULE_INDICATOR([snprintf])
gl_MODULE_INDICATOR([snprintf])
- # Code from module spawn:
gl_SPAWN_H
- # Code from module spawn-pipe:
gl_SPAWN_PIPE
- # Code from module ssize_t:
gt_TYPE_SSIZE_T
- # Code from module stat:
gl_FUNC_STAT
+ if test $REPLACE_STAT = 1; then
+ AC_LIBOBJ([stat])
+ gl_PREREQ_STAT
+ fi
gl_SYS_STAT_MODULE_INDICATOR([stat])
- # Code from module stdarg:
gl_STDARG_H
- # Code from module stdbool:
AM_STDBOOL_H
- # Code from module stddef:
gl_STDDEF_H
- # Code from module stdint:
gl_STDINT_H
- # Code from module stdio:
gl_STDIO_H
- # Code from module stdlib:
gl_STDLIB_H
- # Code from module stdlib-safer:
- gl_STDLIB_SAFER
- # Code from module strchrnul:
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])
- # Code from module streq:
- # Code from module strerror:
gl_FUNC_STRERROR
+ if test $REPLACE_STRERROR = 1; then
+ AC_LIBOBJ([strerror])
+ fi
+ gl_MODULE_INDICATOR([strerror])
gl_STRING_MODULE_INDICATOR([strerror])
- # Code from module string:
+ AC_REQUIRE([gl_HEADER_ERRNO_H])
+ AC_REQUIRE([gl_FUNC_STRERROR_0])
+ if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
+ AC_LIBOBJ([strerror-override])
+ gl_PREREQ_SYS_H_WINSOCK2
+ fi
gl_HEADER_STRING_H
- # Code from module strndup:
gl_FUNC_STRNDUP
+ if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
+ AC_LIBOBJ([strndup])
+ fi
gl_STRING_MODULE_INDICATOR([strndup])
- # Code from module strnlen:
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])
- # Code from module strsignal:
gl_FUNC_STRSIGNAL
+ if test $HAVE_STRSIGNAL = 0 || test $REPLACE_STRSIGNAL = 1; then
+ AC_LIBOBJ([strsignal])
+ gl_PREREQ_STRSIGNAL
+ fi
gl_STRING_MODULE_INDICATOR([strsignal])
- # Code from module strstr:
gl_FUNC_STRSTR
- # Code from module strstr-simple:
+ 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])
- # Code from module strtod:
gl_FUNC_STRTOD
+ if test $HAVE_STRTOD = 0 || test $REPLACE_STRTOD = 1; then
+ AC_LIBOBJ([strtod])
+ gl_PREREQ_STRTOD
+ fi
gl_STDLIB_MODULE_INDICATOR([strtod])
- # Code from module strtol:
- gl_FUNC_STRTOL
- # Code from module sys_stat:
gl_HEADER_SYS_STAT_H
AC_PROG_MKDIR_P
- # Code from module sys_time:
gl_HEADER_SYS_TIME_H
AC_PROG_MKDIR_P
- # Code from module sys_wait:
+ gl_SYS_TYPES_H
+ AC_PROG_MKDIR_P
gl_SYS_WAIT_H
AC_PROG_MKDIR_P
- # Code from module tempname:
gl_FUNC_GEN_TEMPNAME
- # Code from module threadlib:
gl_THREADLIB
- # Code from module time:
gl_HEADER_TIME_H
- # Code from module tls:
gl_TLS
- # Code from module tmpdir:
gt_TMPDIR
- # Code from module unistd:
gl_UNISTD_H
- # Code from module unistd-safer:
gl_UNISTD_SAFER
- # Code from module unlocked-io:
gl_FUNC_GLIBC_UNLOCKED_IO
- # Code from module update-copyright:
- # Code from module useless-if-before-free:
- # Code from module vasnprintf:
gl_FUNC_VASNPRINTF
- # Code from module vasprintf:
gl_FUNC_VASPRINTF
gl_STDIO_MODULE_INDICATOR([vasprintf])
m4_ifdef([AM_XGETTEXT_OPTION],
[AM_][XGETTEXT_OPTION([--flag=asprintf:2:c-format])
AM_][XGETTEXT_OPTION([--flag=vasprintf:2:c-format])])
- # Code from module vasprintf-posix:
gl_FUNC_VASPRINTF_POSIX
- # Code from module vc-list-files:
- # Code from module verify:
- # Code from module verror:
m4_ifdef([AM_XGETTEXT_OPTION],
[AM_][XGETTEXT_OPTION([--flag=verror:3:c-format])
AM_][XGETTEXT_OPTION([--flag=verror_at_line:5:c-format])])
- # Code from module version-etc:
gl_VERSION_ETC
- # Code from module version-etc-fsf:
- # Code from module wait-process:
gl_WAIT_PROCESS
- # Code from module waitpid:
gl_FUNC_WAITPID
+ if test $HAVE_WAITPID = 0; then
+ AC_LIBOBJ([waitpid])
+ fi
gl_SYS_WAIT_MODULE_INDICATOR([waitpid])
- # Code from module warn-on-use:
- # Code from module warnings:
- AC_SUBST([WARN_CFLAGS])
- # Code from module wchar:
gl_WCHAR_H
- # Code from module wcrtomb:
gl_FUNC_WCRTOMB
+ if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
+ AC_LIBOBJ([wcrtomb])
+ gl_PREREQ_WCRTOMB
+ fi
gl_WCHAR_MODULE_INDICATOR([wcrtomb])
- # Code from module wctype-h:
gl_WCTYPE_H
- # Code from module xalloc:
gl_XALLOC
- # Code from module xalloc-die:
- # Code from module xlist:
- gl_LIST
- # Code from module xmalloca:
- # Code from module xoset:
- gl_LIST
- # Code from module xprintf:
m4_ifdef([AM_XGETTEXT_OPTION],
[AM_][XGETTEXT_OPTION([--flag=xprintf:1:c-format])
AM_][XGETTEXT_OPTION([--flag=xvprintf:1:c-format])
AM_][XGETTEXT_OPTION([--flag=xfprintf:2:c-format])
AM_][XGETTEXT_OPTION([--flag=xvfprintf:2:c-format])])
- # Code from module xsize:
gl_XSIZE
- # Code from module xstrndup:
gl_XSTRNDUP
- # Code from module xvasprintf:
gl_XVASPRINTF
m4_ifdef([AM_XGETTEXT_OPTION],
[AM_][XGETTEXT_OPTION([--flag=xasprintf:1:c-format])])
- # Code from module xvasprintf-posix:
# End of code from modules
m4_ifval(M4_LIBSOURCES_LIST, [
m4_syscmd([test ! -d ]m4_defn([M4_LIBSOURCES_DIR])[ ||
@@ -925,19 +1067,49 @@ changequote([, ])dnl
gt_LOCALE_FR_UTF8
gt_LOCALE_FR
gt_LOCALE_TR_UTF8
+ gl_FUNC_CLOSEDIR
+ if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
+ AC_LIBOBJ([closedir])
+ fi
+ gl_DIRENT_MODULE_INDICATOR([closedir])
+ gl_DIRENT_H
+ gl_FUNC_DUP
+ if test $REPLACE_DUP = 1; then
+ AC_LIBOBJ([dup])
+ gl_PREREQ_DUP
+ fi
+ gl_UNISTD_MODULE_INDICATOR([dup])
+ gl_FUNC_FDOPEN
+ if test $REPLACE_FDOPEN = 1; then
+ AC_LIBOBJ([fdopen])
+ gl_PREREQ_FDOPEN
+ fi
+ gl_STDIO_MODULE_INDICATOR([fdopen])
gl_FUNC_UNGETC_WORKS
- gl_FUNC_FTELL
- gl_STDIO_MODULE_INDICATOR([ftell])
gl_FUNC_UNGETC_WORKS
gl_FUNC_UNGETC_WORKS
+ gl_FUNC_UNGETC_WORKS
+ 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])
+ gl_INTTYPES_H
+ gl_INTTYPES_INCOMPLETE
gl_DOUBLE_EXPONENT_LOCATION
gl_FLOAT_EXPONENT_LOCATION
gl_LONG_DOUBLE_EXPONENT_LOCATION
+ AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
gl_FUNC_LINK
+ if test $HAVE_LINK = 0 || test $REPLACE_LINK = 1; then
+ AC_LIBOBJ([link])
+ fi
gl_UNISTD_MODULE_INDICATOR([link])
- gl_LOCALE_H
AC_CHECK_FUNCS_ONCE([newlocale])
gl_LOCALENAME
AC_CHECK_FUNCS_ONCE([newlocale])
@@ -955,6 +1127,11 @@ changequote([, ])dnl
AC_CHECK_FUNCS_ONCE([mprotect])
gt_LOCALE_FR
gt_LOCALE_FR_UTF8
+ gl_FUNC_OPENDIR
+ if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
+ AC_LIBOBJ([opendir])
+ fi
+ gl_DIRENT_MODULE_INDICATOR([opendir])
AC_EGREP_CPP([notposix], [[
#if defined _MSC_VER || defined __MINGW32__
notposix
@@ -964,14 +1141,35 @@ changequote([, ])dnl
[posix_spawn_ported=yes])
AM_CONDITIONAL([POSIX_SPAWN_PORTED], [test $posix_spawn_ported = yes])
gl_FUNC_PUTENV
+ if test $REPLACE_PUTENV = 1; then
+ AC_LIBOBJ([putenv])
+ gl_PREREQ_PUTENV
+ fi
gl_STDLIB_MODULE_INDICATOR([putenv])
dnl Check for prerequisites for memory fence checks.
+ dnl FIXME: zerosize-ptr.h requires these: make a module for it
gl_FUNC_MMAP_ANON
AC_CHECK_HEADERS_ONCE([sys/mman.h])
AC_CHECK_FUNCS_ONCE([mprotect])
+ 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_READDIR
+ if test $HAVE_READDIR = 0; then
+ AC_LIBOBJ([readdir])
+ fi
+ gl_DIRENT_MODULE_INDICATOR([readdir])
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
@@ -980,9 +1178,19 @@ changequote([, ])dnl
AC_REQUIRE([gl_FLOAT_EXPONENT_LOCATION])
AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION])
AC_REQUIRE([gl_LONG_DOUBLE_EXPONENT_LOCATION])
- gt_TYPE_WCHAR_T
- gt_TYPE_WINT_T
+ gl_FUNC_SLEEP
+ if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
+ AC_LIBOBJ([sleep])
+ fi
+ gl_UNISTD_MODULE_INDICATOR([sleep])
+ AC_CHECK_DECLS_ONCE([alarm])
+ AC_REQUIRE([gt_TYPE_WCHAR_T])
+ AC_REQUIRE([gt_TYPE_WINT_T])
gl_FUNC_STRDUP_POSIX
+ if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
+ AC_LIBOBJ([strdup])
+ gl_PREREQ_STRDUP
+ fi
gl_STRING_MODULE_INDICATOR([strdup])
dnl Check for prerequisites for memory fence checks.
gl_FUNC_MMAP_ANON
@@ -993,11 +1201,19 @@ changequote([, ])dnl
AC_CHECK_HEADERS_ONCE([sys/mman.h])
AC_CHECK_FUNCS_ONCE([mprotect])
gl_FUNC_SYMLINK
+ if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
+ AC_LIBOBJ([symlink])
+ fi
gl_UNISTD_MODULE_INDICATOR([symlink])
gl_FUNC_UNSETENV
+ if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
+ AC_LIBOBJ([unsetenv])
+ gl_PREREQ_UNSETENV
+ fi
gl_STDLIB_MODULE_INDICATOR([unsetenv])
abs_aux_dir=`cd "$ac_aux_dir"; pwd`
AC_SUBST([abs_aux_dir])
+ AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
abs_aux_dir=`cd "$ac_aux_dir"; pwd`
AC_SUBST([abs_aux_dir])
gt_LOCALE_FR
@@ -1005,9 +1221,23 @@ changequote([, ])dnl
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_FUNC_WRITE
+ if test $REPLACE_WRITE = 1; then
+ AC_LIBOBJ([write])
+ gl_PREREQ_WRITE
+ fi
+ gl_UNISTD_MODULE_INDICATOR([write])
m4_popdef([gl_MODULE_INDICATOR_CONDITION])
m4_ifval(M4tests_LIBSOURCES_LIST, [
m4_syscmd([test ! -d ]m4_defn([M4tests_LIBSOURCES_DIR])[ ||
@@ -1105,17 +1335,19 @@ AC_DEFUN([M4tests_LIBSOURCES], [
# gnulib-tool and may be removed by future gnulib-tool invocations.
AC_DEFUN([M4_FILE_LIST], [
build-aux/announce-gen
- build-aux/arg-nonnull.h
- build-aux/c++defs.h
build-aux/config.rpath
build-aux/gendocs.sh
build-aux/git-version-gen
build-aux/gnu-web-doc-update
build-aux/gnupload
+ build-aux/snippet/_Noreturn.h
+ build-aux/snippet/arg-nonnull.h
+ build-aux/snippet/c++defs.h
+ build-aux/snippet/unused-parameter.h
+ build-aux/snippet/warn-on-use.h
build-aux/update-copyright
build-aux/useless-if-before-free
build-aux/vc-list-files
- build-aux/warn-on-use.h
doc/fdl-1.3.texi
doc/gendocs_template
doc/gpl-3.0.texi
@@ -1124,19 +1356,22 @@ AC_DEFUN([M4_FILE_LIST], [
lib/asprintf.c
lib/basename-lgpl.c
lib/basename.c
+ lib/binary-io.c
lib/binary-io.h
lib/btowc.c
lib/c-ctype.c
lib/c-ctype.h
lib/c-stack.c
lib/c-stack.h
+ lib/c-strcase.h
+ lib/c-strcasecmp.c
+ lib/c-strcaseeq.h
+ lib/c-strncasecmp.c
lib/canonicalize-lgpl.c
lib/clean-temp.c
lib/clean-temp.h
lib/cloexec.c
lib/cloexec.h
- lib/close-hook.c
- lib/close-hook.h
lib/close-stream.c
lib/close-stream.h
lib/close.c
@@ -1164,6 +1399,8 @@ AC_DEFUN([M4_FILE_LIST], [
lib/fclose.c
lib/fcntl.c
lib/fcntl.in.h
+ lib/fd-hook.c
+ lib/fd-hook.h
lib/fd-safer-flag.c
lib/fd-safer.c
lib/fflush.c
@@ -1171,6 +1408,7 @@ AC_DEFUN([M4_FILE_LIST], [
lib/filenamecat.c
lib/filenamecat.h
lib/float+.h
+ lib/float.c
lib/float.in.h
lib/fopen-safer.c
lib/fopen.c
@@ -1184,7 +1422,10 @@ AC_DEFUN([M4_FILE_LIST], [
lib/freading.h
lib/frexp.c
lib/frexpl.c
+ lib/fseek.c
lib/fseeko.c
+ lib/fstat.c
+ lib/ftell.c
lib/ftello.c
lib/getdtablesize.c
lib/getopt.c
@@ -1224,15 +1465,19 @@ AC_DEFUN([M4_FILE_LIST], [
lib/isnanf.c
lib/isnanl-nolibm.h
lib/isnanl.c
+ lib/itold.c
lib/langinfo.in.h
lib/localcharset.c
lib/localcharset.h
+ lib/locale.in.h
+ lib/localeconv.c
lib/lseek.c
lib/lstat.c
lib/malloc.c
lib/malloca.c
lib/malloca.h
lib/malloca.valgrind
+ lib/math.c
lib/math.in.h
lib/mbrtowc.c
lib/mbsinit.c
@@ -1246,6 +1491,10 @@ AC_DEFUN([M4_FILE_LIST], [
lib/mkdtemp.c
lib/mkstemp-safer.c
lib/mkstemp.c
+ lib/msvc-inval.c
+ lib/msvc-inval.h
+ lib/msvc-nothrow.c
+ lib/msvc-nothrow.h
lib/nl_langinfo.c
lib/obstack.c
lib/obstack.h
@@ -1264,8 +1513,10 @@ AC_DEFUN([M4_FILE_LIST], [
lib/printf-parse.h
lib/progname.c
lib/progname.h
+ lib/quote.h
lib/quotearg.c
lib/quotearg.h
+ lib/raise.c
lib/rawmemchr.c
lib/rawmemchr.valgrind
lib/readlink.c
@@ -1281,6 +1532,8 @@ AC_DEFUN([M4_FILE_LIST], [
lib/rmdir.c
lib/same-inode.h
lib/sched.in.h
+ lib/secure_getenv.c
+ lib/sig-handler.c
lib/sig-handler.h
lib/sigaction.c
lib/siglist.h
@@ -1314,6 +1567,7 @@ AC_DEFUN([M4_FILE_LIST], [
lib/stdio--.h
lib/stdio-impl.h
lib/stdio-safer.h
+ lib/stdio-write.c
lib/stdio.in.h
lib/stdlib--.h
lib/stdlib-safer.h
@@ -1322,6 +1576,8 @@ AC_DEFUN([M4_FILE_LIST], [
lib/strchrnul.c
lib/strchrnul.valgrind
lib/streq.h
+ lib/strerror-override.c
+ lib/strerror-override.h
lib/strerror.c
lib/string.in.h
lib/stripslash.c
@@ -1330,9 +1586,9 @@ AC_DEFUN([M4_FILE_LIST], [
lib/strsignal.c
lib/strstr.c
lib/strtod.c
- lib/strtol.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
@@ -1341,6 +1597,7 @@ AC_DEFUN([M4_FILE_LIST], [
lib/tmpdir.h
lib/unistd--.h
lib/unistd-safer.h
+ lib/unistd.c
lib/unistd.in.h
lib/unlocked-io.h
lib/vasnprintf.c
@@ -1358,8 +1615,10 @@ AC_DEFUN([M4_FILE_LIST], [
lib/waitpid.c
lib/wchar.in.h
lib/wcrtomb.c
+ lib/wctype-h.c
lib/wctype.in.h
lib/xalloc-die.c
+ lib/xalloc-oversized.h
lib/xalloc.h
lib/xasprintf.c
lib/xmalloc.c
@@ -1367,6 +1626,7 @@ AC_DEFUN([M4_FILE_LIST], [
lib/xmalloca.h
lib/xprintf.c
lib/xprintf.h
+ lib/xsize.c
lib/xsize.h
lib/xstrndup.c
lib/xstrndup.h
@@ -1375,21 +1635,24 @@ AC_DEFUN([M4_FILE_LIST], [
m4/00gnulib.m4
m4/alloca.m4
m4/ansi-c++.m4
+ m4/asm-underscore.m4
m4/assert.m4
m4/autobuild.m4
m4/btowc.m4
m4/c-stack.m4
m4/canonicalize.m4
- m4/cloexec.m4
m4/close-stream.m4
m4/close.m4
+ m4/closedir.m4
m4/closein.m4
m4/closeout.m4
m4/codeset.m4
m4/config-h.m4
m4/configmake.m4
+ m4/dirent_h.m4
m4/dirname.m4
m4/double-slash-root.m4
+ m4/dup.m4
m4/dup2.m4
m4/eealloc.m4
m4/environ.m4
@@ -1400,11 +1663,13 @@ AC_DEFUN([M4_FILE_LIST], [
m4/exponentf.m4
m4/exponentl.m4
m4/extensions.m4
+ m4/extern-inline.m4
m4/fatal-signal.m4
m4/fclose.m4
m4/fcntl-o.m4
m4/fcntl.m4
m4/fcntl_h.m4
+ m4/fdopen.m4
m4/fflush.m4
m4/filenamecat.m4
m4/float_h.m4
@@ -1412,28 +1677,33 @@ AC_DEFUN([M4_FILE_LIST], [
m4/fpending.m4
m4/fpieee.m4
m4/fpurge.m4
+ m4/freadahead.m4
m4/freading.m4
m4/frexp.m4
m4/frexpl.m4
+ m4/fseek.m4
m4/fseeko.m4
+ m4/fstat.m4
m4/ftell.m4
m4/ftello.m4
+ m4/getcwd.m4
m4/getdtablesize.m4
m4/getopt.m4
m4/getpagesize.m4
m4/gettimeofday.m4
- m4/gl_list.m4
m4/glibc21.m4
m4/gnulib-common.m4
m4/include_next.m4
- m4/inline.m4
m4/intlmacosx.m4
m4/intmax_t.m4
+ m4/inttypes-pri.m4
+ m4/inttypes.m4
m4/inttypes_h.m4
m4/isnand.m4
m4/isnanf.m4
m4/isnanl.m4
m4/langinfo_h.m4
+ m4/largefile.m4
m4/lcmessage.m4
m4/ldexp.m4
m4/ldexpl.m4
@@ -1448,6 +1718,7 @@ AC_DEFUN([M4_FILE_LIST], [
m4/locale-tr.m4
m4/locale-zh.m4
m4/locale_h.m4
+ m4/localeconv.m4
m4/localename.m4
m4/lock.m4
m4/longlong.m4
@@ -1466,10 +1737,14 @@ AC_DEFUN([M4_FILE_LIST], [
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/open.m4
+ m4/opendir.m4
m4/pathmax.m4
m4/pipe2.m4
m4/posix_spawn.m4
@@ -1478,12 +1753,15 @@ AC_DEFUN([M4_FILE_LIST], [
m4/printf.m4
m4/putenv.m4
m4/quotearg.m4
+ m4/raise.m4
m4/rawmemchr.m4
+ m4/readdir.m4
m4/readlink.m4
m4/regex.m4
m4/rename.m4
m4/rmdir.m4
m4/sched_h.m4
+ m4/secure_getenv.m4
m4/setenv.m4
m4/setlocale.m4
m4/sig_atomic_t.m4
@@ -1491,7 +1769,9 @@ AC_DEFUN([M4_FILE_LIST], [
m4/signal_h.m4
m4/signalblocking.m4
m4/signbit.m4
+ m4/sigpipe.m4
m4/size_max.m4
+ m4/sleep.m4
m4/snprintf.m4
m4/spawn-pipe.m4
m4/spawn_h.m4
@@ -1502,9 +1782,7 @@ AC_DEFUN([M4_FILE_LIST], [
m4/stddef_h.m4
m4/stdint.m4
m4/stdint_h.m4
- m4/stdio-safer.m4
m4/stdio_h.m4
- m4/stdlib-safer.m4
m4/stdlib_h.m4
m4/strchrnul.m4
m4/strdup.m4
@@ -1515,10 +1793,11 @@ AC_DEFUN([M4_FILE_LIST], [
m4/strsignal.m4
m4/strstr.m4
m4/strtod.m4
- m4/strtol.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/threadlib.m4
@@ -1544,14 +1823,18 @@ AC_DEFUN([M4_FILE_LIST], [
m4/wctomb.m4
m4/wctype_h.m4
m4/wint_t.m4
+ m4/write.m4
m4/xalloc.m4
m4/xsize.m4
m4/xstrndup.m4
m4/xvasprintf.m4
+ tests/infinity.h
tests/init.sh
tests/macros.h
tests/minus-zero.h
tests/nan.h
+ tests/randomd.c
+ tests/randoml.c
tests/signature.h
tests/test-alloca-opt.c
tests/test-array_list.c
@@ -1570,35 +1853,55 @@ AC_DEFUN([M4_FILE_LIST], [
tests/test-c-strcasecmp.c
tests/test-c-strncasecmp.c
tests/test-canonicalize-lgpl.c
+ tests/test-chdir.c
tests/test-cloexec.c
+ tests/test-close.c
tests/test-closein.c
tests/test-closein.sh
+ tests/test-dirent-c++.cc
+ tests/test-dirent.c
tests/test-dirname.c
tests/test-dup-safer.c
+ tests/test-dup.c
tests/test-dup2.c
tests/test-environ.c
tests/test-errno.c
+ tests/test-fclose.c
tests/test-fcntl-h-c++.cc
tests/test-fcntl-h.c
tests/test-fcntl.c
+ tests/test-fdopen.c
tests/test-fflush.c
tests/test-fflush2.c
tests/test-fflush2.sh
+ tests/test-fgetc.c
tests/test-filenamecat.c
+ tests/test-float.c
tests/test-fopen-safer.c
tests/test-fopen.c
tests/test-fopen.h
tests/test-fpending.c
tests/test-fpending.sh
tests/test-fpurge.c
+ tests/test-fputc.c
+ tests/test-fread.c
tests/test-freadahead.c
tests/test-freadahead.sh
tests/test-freading.c
tests/test-frexp.c
+ tests/test-frexp.h
tests/test-frexpl.c
+ tests/test-fseek.c
+ tests/test-fseek.sh
+ tests/test-fseek2.sh
tests/test-fseeko.c
tests/test-fseeko.sh
tests/test-fseeko2.sh
+ tests/test-fseeko3.c
+ tests/test-fseeko3.sh
+ tests/test-fseeko4.c
+ tests/test-fseeko4.sh
+ tests/test-fstat.c
tests/test-ftell.c
tests/test-ftell.sh
tests/test-ftell2.sh
@@ -1607,12 +1910,19 @@ AC_DEFUN([M4_FILE_LIST], [
tests/test-ftello.sh
tests/test-ftello2.sh
tests/test-ftello3.c
+ tests/test-ftello4.c
+ tests/test-ftello4.sh
+ tests/test-fwrite.c
+ tests/test-getcwd-lgpl.c
tests/test-getdtablesize.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-isnand-nolibm.c
tests/test-isnand.h
tests/test-isnanf-nolibm.c
@@ -1627,6 +1937,7 @@ AC_DEFUN([M4_FILE_LIST], [
tests/test-locale-c++.cc
tests/test-locale-c++2.cc
tests/test-locale.c
+ tests/test-localeconv.c
tests/test-localename.c
tests/test-lseek.c
tests/test-lseek.sh
@@ -1656,18 +1967,24 @@ AC_DEFUN([M4_FILE_LIST], [
tests/test-nl_langinfo.sh
tests/test-open.c
tests/test-open.h
+ tests/test-pathmax.c
tests/test-pipe2.c
tests/test-posix_spawn1.c
tests/test-posix_spawn1.in.sh
tests/test-posix_spawn2.c
tests/test-posix_spawn2.in.sh
+ tests/test-posix_spawn_file_actions_addclose.c
+ tests/test-posix_spawn_file_actions_adddup2.c
+ tests/test-posix_spawn_file_actions_addopen.c
tests/test-printf-frexp.c
tests/test-printf-frexpl.c
tests/test-quotearg-simple.c
tests/test-quotearg.h
+ tests/test-raise.c
tests/test-rawmemchr.c
tests/test-readlink.c
tests/test-readlink.h
+ tests/test-regex.c
tests/test-rename.c
tests/test-rename.h
tests/test-rmdir.c
@@ -1679,13 +1996,18 @@ AC_DEFUN([M4_FILE_LIST], [
tests/test-setlocale2.c
tests/test-setlocale2.sh
tests/test-sigaction.c
- tests/test-signal-c++.cc
- tests/test-signal-c++2.cc
- tests/test-signal.c
+ tests/test-signal-h-c++.cc
+ tests/test-signal-h-c++2.cc
+ tests/test-signal-h.c
tests/test-signbit.c
+ tests/test-sigpipe.c
+ tests/test-sigpipe.sh
+ tests/test-sigprocmask.c
+ tests/test-sleep.c
tests/test-snprintf.c
tests/test-spawn-c++.cc
- tests/test-spawn-pipe.c
+ tests/test-spawn-pipe-child.c
+ tests/test-spawn-pipe-main.c
tests/test-spawn-pipe.sh
tests/test-spawn.c
tests/test-stat.c
@@ -1714,6 +2036,8 @@ AC_DEFUN([M4_FILE_LIST], [
tests/test-sys_stat.c
tests/test-sys_time-c++.cc
tests/test-sys_time.c
+ tests/test-sys_types-c++.cc
+ tests/test-sys_types.c
tests/test-sys_wait-c++.cc
tests/test-sys_wait.c
tests/test-sys_wait.h
@@ -1745,32 +2069,40 @@ AC_DEFUN([M4_FILE_LIST], [
tests/test-wcrtomb.sh
tests/test-wctype-h-c++.cc
tests/test-wctype-h.c
+ tests/test-write.c
tests/test-xalloc-die.c
tests/test-xalloc-die.sh
tests/test-xvasprintf.c
tests/zerosize-ptr.h
- tests=lib/c-strcase.h
- tests=lib/c-strcasecmp.c
- tests=lib/c-strncasecmp.c
- tests=lib/ftell.c
+ tests=lib/closedir.c
+ tests=lib/dirent-private.h
+ tests=lib/dirent.in.h
+ tests=lib/dup.c
+ tests=lib/fdopen.c
+ tests=lib/filename.h
+ tests=lib/getcwd-lgpl.c
tests=lib/getpagesize.c
tests=lib/gl_array_list.c
tests=lib/gl_array_list.h
tests=lib/gl_array_oset.c
tests=lib/gl_array_oset.h
+ tests=lib/inttypes.in.h
tests=lib/link.c
- tests=lib/locale.in.h
tests=lib/localename.c
tests=lib/localename.h
+ tests=lib/opendir.c
tests=lib/putenv.c
+ tests=lib/readdir.c
tests=lib/setenv.c
tests=lib/setlocale.c
+ tests=lib/sleep.c
tests=lib/strdup.c
tests=lib/symlink.c
tests=lib/unsetenv.c
tests=lib/wctob.c
tests=lib/wctomb-impl.h
tests=lib/wctomb.c
+ tests=lib/write.c
top/GNUmakefile
top/maint.mk
])
diff --git a/m4/include_next.m4 b/m4/include_next.m4
index b3c7849..108d945 100644
--- a/m4/include_next.m4
+++ b/m4/include_next.m4
@@ -1,5 +1,5 @@
-# include_next.m4 serial 18
-dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
+# include_next.m4 serial 23
+dnl Copyright (C) 2006-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -143,7 +143,7 @@ choke me
# even if the compiler does not support include_next.
# The three "///" are to pacify Sun C 5.8, which otherwise would say
# "warning: #include of /usr/include/... may be non-portable".
-# Use `""', not `<>', so that the /// cannot be confused with a C99 comment.
+# Use '""', not '<>', so that the /// cannot be confused with a C99 comment.
# Note: This macro assumes that the header file is not empty after
# preprocessing, i.e. it does not only define preprocessor macros but also
# provides some type/enum definitions or function/variable declarations.
@@ -175,11 +175,13 @@ AC_DEFUN([gl_NEXT_HEADERS_INTERNAL],
[AC_CHECK_HEADERS_ONCE([$1])
])
+dnl FIXME: gl_next_header and gl_header_exists must be used unquoted
+dnl until we can assume autoconf 2.64 or newer.
m4_foreach_w([gl_HEADER_NAME], [$1],
[AS_VAR_PUSHDEF([gl_next_header],
[gl_cv_next_]m4_defn([gl_HEADER_NAME]))
if test $gl_cv_have_include_next = yes; then
- AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
+ AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>'])
else
AC_CACHE_CHECK(
[absolute name of <]m4_defn([gl_HEADER_NAME])[>],
@@ -205,33 +207,57 @@ AC_DEFUN([gl_NEXT_HEADERS_INTERNAL],
aix*) gl_absname_cpp="$ac_cpp -C" ;;
*) gl_absname_cpp="$ac_cpp" ;;
esac
+changequote(,)
+ case "$host_os" in
+ mingw*)
+ dnl For the sake of native Windows compilers (excluding gcc),
+ dnl treat backslash as a directory separator, like /.
+ dnl Actually, these compilers use a double-backslash as
+ dnl directory separator, inside the
+ dnl # line "filename"
+ dnl directives.
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ dnl A sed expression that turns a string into a basic regular
+ dnl expression, for use within "/.../".
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+changequote([,])
+ gl_header_literal_regex=`echo ']m4_defn([gl_HEADER_NAME])[' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+changequote(,)dnl
+ s|^/[^/]|//&|
+changequote([,])dnl
+ p
+ q
+ }'
dnl eval is necessary to expand gl_absname_cpp.
dnl Ultrix and Pyramid sh refuse to redirect output of eval,
dnl so use subshell.
- AS_VAR_SET([gl_next_header],
+ AS_VAR_SET(gl_next_header,
['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
- sed -n '\#/]m4_defn([gl_HEADER_NAME])[#{
- s#.*"\(.*/]m4_defn([gl_HEADER_NAME])[\)".*#\1#
- s#^/[^/]#//&#
- p
- q
- }'`'"'])
+ sed -n "$gl_absolute_header_sed"`'"'])
m4_if([$2], [check],
[else
- AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
+ AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>'])
fi
])
])
fi
AC_SUBST(
AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])),
- [AS_VAR_GET([gl_next_header])])
+ [AS_VAR_GET(gl_next_header)])
if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
gl_next_as_first_directive='<'gl_HEADER_NAME'>'
else
# INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
- gl_next_as_first_directive=AS_VAR_GET([gl_next_header])
+ gl_next_as_first_directive=AS_VAR_GET(gl_next_header)
fi
AC_SUBST(
AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])),
diff --git a/m4/inline.m4 b/m4/inline.m4
deleted file mode 100644
index a459080..0000000
--- a/m4/inline.m4
+++ /dev/null
@@ -1,40 +0,0 @@
-# inline.m4 serial 4
-dnl Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl Test for the 'inline' keyword or equivalent.
-dnl Define 'inline' to a supported equivalent, or to nothing if not supported,
-dnl like AC_C_INLINE does. Also, define HAVE_INLINE if 'inline' or an
-dnl equivalent is effectively supported, i.e. if the compiler is likely to
-dnl drop unused 'static inline' functions.
-AC_DEFUN([gl_INLINE],
-[
- AC_REQUIRE([AC_C_INLINE])
- AC_CACHE_CHECK([whether the compiler generally respects inline],
- [gl_cv_c_inline_effective],
- [if test $ac_cv_c_inline = no; then
- gl_cv_c_inline_effective=no
- else
- dnl GCC defines __NO_INLINE__ if not optimizing or if -fno-inline is
- dnl specified.
- dnl Use AC_COMPILE_IFELSE here, not AC_EGREP_CPP, because the result
- dnl depends on optimization flags, which can be in CFLAGS.
- dnl (AC_EGREP_CPP looks only at the CPPFLAGS.)
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[]],
- [[#ifdef __NO_INLINE__
- #error "inline is not effective"
- #endif]])],
- [gl_cv_c_inline_effective=yes],
- [gl_cv_c_inline_effective=no])
- fi
- ])
- if test $gl_cv_c_inline_effective = yes; then
- AC_DEFINE([HAVE_INLINE], [1],
- [Define to 1 if the compiler supports one of the keywords
- 'inline', '__inline__', '__inline' and effectively inlines
- functions marked as such.])
- fi
-])
diff --git a/m4/intlmacosx.m4 b/m4/intlmacosx.m4
index 51f8547..ab97d39 100644
--- a/m4/intlmacosx.m4
+++ b/m4/intlmacosx.m4
@@ -1,5 +1,5 @@
-# intlmacosx.m4 serial 4 (gettext-0.18.2)
-dnl Copyright (C) 2004-2011 Free Software Foundation, Inc.
+# intlmacosx.m4 serial 5 (gettext-0.18.2)
+dnl Copyright (C) 2004-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -13,11 +13,11 @@ dnl by the GNU Library General Public License, and the rest of the GNU
dnl gettext package package is covered by the GNU General Public License.
dnl They are *not* in the public domain.
-dnl Checks for special options needed on MacOS X.
+dnl Checks for special options needed on Mac OS X.
dnl Defines INTL_MACOSX_LIBS.
AC_DEFUN([gt_INTL_MACOSX],
[
- dnl Check for API introduced in MacOS X 10.2.
+ dnl Check for API introduced in Mac OS X 10.2.
AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
[gt_cv_func_CFPreferencesCopyAppValue],
[gt_save_LIBS="$LIBS"
@@ -31,9 +31,9 @@ AC_DEFUN([gt_INTL_MACOSX],
LIBS="$gt_save_LIBS"])
if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
- [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
+ [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
fi
- dnl Check for API introduced in MacOS X 10.3.
+ dnl Check for API introduced in Mac OS X 10.3.
AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
[gt_save_LIBS="$LIBS"
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
@@ -46,7 +46,7 @@ AC_DEFUN([gt_INTL_MACOSX],
LIBS="$gt_save_LIBS"])
if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
- [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
+ [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
fi
INTL_MACOSX_LIBS=
if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
diff --git a/m4/intmax_t.m4 b/m4/intmax_t.m4
index 7341054..6ea7053 100644
--- a/m4/intmax_t.m4
+++ b/m4/intmax_t.m4
@@ -1,5 +1,5 @@
# intmax_t.m4 serial 8
-dnl Copyright (C) 1997-2004, 2006-2007, 2009-2011 Free Software Foundation,
+dnl Copyright (C) 1997-2004, 2006-2007, 2009-2013 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/inttypes-pri.m4 b/m4/inttypes-pri.m4
new file mode 100644
index 0000000..e5a1e05
--- /dev/null
+++ b/m4/inttypes-pri.m4
@@ -0,0 +1,42 @@
+# inttypes-pri.m4 serial 7 (gettext-0.18.2)
+dnl Copyright (C) 1997-2002, 2006, 2008-2013 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_PREREQ([2.53])
+
+# Define PRI_MACROS_BROKEN if <inttypes.h> 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 <inttypes.h>
+#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 <inttypes.h> exists and defines unusable PRI* macros.])
+ PRI_MACROS_BROKEN=1
+ else
+ PRI_MACROS_BROKEN=0
+ fi
+ AC_SUBST([PRI_MACROS_BROKEN])
+])
diff --git a/m4/inttypes.m4 b/m4/inttypes.m4
new file mode 100644
index 0000000..3b483d3
--- /dev/null
+++ b/m4/inttypes.m4
@@ -0,0 +1,157 @@
+# inttypes.m4 serial 26
+dnl Copyright (C) 2006-2013 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Derek Price, Bruno Haible.
+dnl Test whether <inttypes.h> 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 <inttypes.h> 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 <inttypes.h>
+ ]], [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 <stdint.h>. It always defines intptr_t to 'long'.
+ PRIPTR_PREFIX='"l"'
+ else
+ dnl Using the system's <stdint.h>.
+ 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 <stdint.h>
+ 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 <limits.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #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/m4/inttypes_h.m4 b/m4/inttypes_h.m4
index f10fd54..5f05ac5 100644
--- a/m4/inttypes_h.m4
+++ b/m4/inttypes_h.m4
@@ -1,5 +1,5 @@
# inttypes_h.m4 serial 10
-dnl Copyright (C) 1997-2004, 2006, 2008-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006, 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/isnand.m4 b/m4/isnand.m4
index fb2c0f9..ee05e0f 100644
--- a/m4/isnand.m4
+++ b/m4/isnand.m4
@@ -1,5 +1,5 @@
-# isnand.m4 serial 8
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+# isnand.m4 serial 11
+dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -24,7 +24,6 @@ AC_DEFUN([gl_FUNC_ISNAND],
else
gl_func_isnand=no
HAVE_ISNAND=0
- gl_BUILD_ISNAND
fi
AC_SUBST([ISNAND_LIBM])
])
@@ -34,19 +33,17 @@ dnl Check how to get or define isnand() without linking with libm.
AC_DEFUN([gl_FUNC_ISNAND_NO_LIBM],
[
gl_HAVE_ISNAND_NO_LIBM
+ gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
if test $gl_cv_func_isnand_no_libm = yes; then
AC_DEFINE([HAVE_ISNAND_IN_LIBC], [1],
[Define if the isnan(double) function is available in libc.])
- else
- gl_BUILD_ISNAND
fi
])
-dnl Pull in replacement isnand definition. It does not need -lm.
-AC_DEFUN([gl_BUILD_ISNAND],
+dnl Prerequisites of replacement isnand definition. It does not need -lm.
+AC_DEFUN([gl_PREREQ_ISNAND],
[
- AC_LIBOBJ([isnand])
- gl_DOUBLE_EXPONENT_LOCATION
+ AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION])
])
dnl Test whether isnand() can be used with libm.
diff --git a/m4/isnanf.m4 b/m4/isnanf.m4
index 92024bb..f01886a 100644
--- a/m4/isnanf.m4
+++ b/m4/isnanf.m4
@@ -1,5 +1,5 @@
-# isnanf.m4 serial 12
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+# isnanf.m4 serial 14
+dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -17,6 +17,7 @@ AC_DEFUN([gl_FUNC_ISNANF],
ISNANF_LIBM=-lm
fi
fi
+ dnl The variable gl_func_isnanf set here is used by isnan.m4.
if test $gl_cv_func_isnanf_no_libm = yes \
|| test $gl_cv_func_isnanf_in_libm = yes; then
save_LIBS="$LIBS"
@@ -32,7 +33,6 @@ AC_DEFUN([gl_FUNC_ISNANF],
fi
if test $gl_func_isnanf != yes; then
HAVE_ISNANF=0
- gl_BUILD_ISNANF
fi
AC_SUBST([ISNANF_LIBM])
])
@@ -51,17 +51,17 @@ AC_DEFUN([gl_FUNC_ISNANF_NO_LIBM],
*) false;;
esac
}; then
+ gl_func_isnanf_no_libm=yes
AC_DEFINE([HAVE_ISNANF_IN_LIBC], [1],
[Define if the isnan(float) function is available in libc.])
else
- gl_BUILD_ISNANF
+ gl_func_isnanf_no_libm=no
fi
])
-dnl Pull in replacement isnanf definition. It does not need -lm.
-AC_DEFUN([gl_BUILD_ISNANF],
+dnl Prerequisites of replacement isnanf definition. It does not need -lm.
+AC_DEFUN([gl_PREREQ_ISNANF],
[
- AC_LIBOBJ([isnanf])
gl_FLOAT_EXPONENT_LOCATION
])
diff --git a/m4/isnanl.m4 b/m4/isnanl.m4
index 5d73759..ed5bbf8 100644
--- a/m4/isnanl.m4
+++ b/m4/isnanl.m4
@@ -1,5 +1,5 @@
-# isnanl.m4 serial 14
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+# isnanl.m4 serial 17
+dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,7 @@ AC_DEFUN([gl_FUNC_ISNANL],
ISNANL_LIBM=-lm
fi
fi
+ dnl The variable gl_func_isnanl set here is used by isnan.m4.
if test $gl_cv_func_isnanl_no_libm = yes \
|| test $gl_cv_func_isnanl_in_libm = yes; then
save_LIBS="$LIBS"
@@ -30,7 +31,6 @@ AC_DEFUN([gl_FUNC_ISNANL],
fi
if test $gl_func_isnanl != yes; then
HAVE_ISNANL=0
- gl_BUILD_ISNANL
fi
AC_SUBST([ISNANL_LIBM])
])
@@ -49,16 +49,14 @@ AC_DEFUN([gl_FUNC_ISNANL_NO_LIBM],
if test $gl_func_isnanl_no_libm = yes; then
AC_DEFINE([HAVE_ISNANL_IN_LIBC], [1],
[Define if the isnan(long double) function is available in libc.])
- else
- gl_BUILD_ISNANL
fi
])
-dnl Pull in replacement isnanl definition. It does not need -lm.
-AC_DEFUN([gl_BUILD_ISNANL],
+dnl Prerequisites of replacement isnanl definition. It does not need -lm.
+AC_DEFUN([gl_PREREQ_ISNANL],
[
- AC_LIBOBJ([isnanl])
gl_LONG_DOUBLE_EXPONENT_LOCATION
+ AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
])
dnl Test whether isnanl() can be used without libm.
@@ -119,6 +117,7 @@ AC_DEFUN([gl_FUNC_ISNANL_WORKS],
[
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([gl_BIGENDIAN])
+ AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether isnanl works], [gl_cv_func_isnanl_works],
[
@@ -172,7 +171,7 @@ int main ()
result |= 1;
}
-#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
/* Representation of an 80-bit 'long double' as an initializer for a sequence
of 'unsigned int' words. */
# ifdef WORDS_BIGENDIAN
diff --git a/m4/langinfo_h.m4 b/m4/langinfo_h.m4
index 4cced8a..73bef8b 100644
--- a/m4/langinfo_h.m4
+++ b/m4/langinfo_h.m4
@@ -1,5 +1,5 @@
# langinfo_h.m4 serial 7
-dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/largefile.m4 b/m4/largefile.m4
new file mode 100644
index 0000000..1e605e3
--- /dev/null
+++ b/m4/largefile.m4
@@ -0,0 +1,146 @@
+# Enable large files on systems where this is not the default.
+
+# Copyright 1992-1996, 1998-2013 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# The following implementation works around a problem in autoconf <= 2.69;
+# AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5,
+# or configures them incorrectly in some cases.
+m4_version_prereq([2.70], [] ,[
+
+# _AC_SYS_LARGEFILE_TEST_INCLUDES
+# -------------------------------
+m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES],
+[@%:@include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1]];[]dnl
+])
+
+
+# _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE,
+# CACHE-VAR,
+# DESCRIPTION,
+# PROLOGUE, [FUNCTION-BODY])
+# --------------------------------------------------------
+m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE],
+[AC_CACHE_CHECK([for $1 value needed for large files], [$3],
+[while :; do
+ m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])(
+ [AC_LANG_PROGRAM([$5], [$6])],
+ [$3=no; break])
+ m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])(
+ [AC_LANG_PROGRAM([@%:@define $1 $2
+$5], [$6])],
+ [$3=$2; break])
+ $3=unknown
+ break
+done])
+case $$3 in #(
+ no | unknown) ;;
+ *) AC_DEFINE_UNQUOTED([$1], [$$3], [$4]);;
+esac
+rm -rf conftest*[]dnl
+])# _AC_SYS_LARGEFILE_MACRO_VALUE
+
+
+# AC_SYS_LARGEFILE
+# ----------------
+# By default, many hosts won't let programs access large files;
+# one must use special compiler options to get large-file access to work.
+# For more details about this brain damage please see:
+# http://www.unix-systems.org/version2/whatsnew/lfs20mar.html
+AC_DEFUN([AC_SYS_LARGEFILE],
+[AC_ARG_ENABLE(largefile,
+ [ --disable-largefile omit support for large files])
+if test "$enable_largefile" != no; then
+
+ AC_CACHE_CHECK([for special C compiler options needed for large files],
+ ac_cv_sys_largefile_CC,
+ [ac_cv_sys_largefile_CC=no
+ if test "$GCC" != yes; then
+ ac_save_CC=$CC
+ while :; do
+ # IRIX 6.2 and later do not support large files by default,
+ # so use the C compiler's -n32 option if that helps.
+ AC_LANG_CONFTEST([AC_LANG_PROGRAM([_AC_SYS_LARGEFILE_TEST_INCLUDES])])
+ AC_COMPILE_IFELSE([], [break])
+ CC="$CC -n32"
+ AC_COMPILE_IFELSE([], [ac_cv_sys_largefile_CC=' -n32'; break])
+ break
+ done
+ CC=$ac_save_CC
+ rm -f conftest.$ac_ext
+ fi])
+ if test "$ac_cv_sys_largefile_CC" != no; then
+ CC=$CC$ac_cv_sys_largefile_CC
+ fi
+
+ _AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64,
+ ac_cv_sys_file_offset_bits,
+ [Number of bits in a file offset, on hosts where this is settable.],
+ [_AC_SYS_LARGEFILE_TEST_INCLUDES])
+ if test $ac_cv_sys_file_offset_bits = unknown; then
+ _AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1,
+ ac_cv_sys_large_files,
+ [Define for large files, on AIX-style hosts.],
+ [_AC_SYS_LARGEFILE_TEST_INCLUDES])
+ fi
+
+ AC_DEFINE([_DARWIN_USE_64_BIT_INODE], [1],
+ [Enable large inode numbers on Mac OS X 10.5.])
+fi
+])# AC_SYS_LARGEFILE
+])# m4_version_prereq 2.70
+
+# Enable large files on systems where this is implemented by Gnulib, not by the
+# system headers.
+# Set the variables WINDOWS_64_BIT_OFF_T, WINDOWS_64_BIT_ST_SIZE if Gnulib
+# overrides ensure that off_t or 'struct size.st_size' are 64-bit, respectively.
+AC_DEFUN([gl_LARGEFILE],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ case "$host_os" in
+ mingw*)
+ dnl Native Windows.
+ dnl mingw64 defines off_t to a 64-bit type already, if
+ dnl _FILE_OFFSET_BITS=64, which is ensured by AC_SYS_LARGEFILE.
+ AC_CACHE_CHECK([for 64-bit off_t], [gl_cv_type_off_t_64],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/types.h>
+ 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/m4/lcmessage.m4 b/m4/lcmessage.m4
index baf41c5..d62a175 100644
--- a/m4/lcmessage.m4
+++ b/m4/lcmessage.m4
@@ -1,5 +1,5 @@
# lcmessage.m4 serial 7 (gettext-0.18.2)
-dnl Copyright (C) 1995-2002, 2004-2005, 2008-2011 Free Software Foundation,
+dnl Copyright (C) 1995-2002, 2004-2005, 2008-2013 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/ldexp.m4 b/m4/ldexp.m4
index dd400d4..7a75b1b 100644
--- a/m4/ldexp.m4
+++ b/m4/ldexp.m4
@@ -1,5 +1,5 @@
# ldexp.m4 serial 1
-dnl Copyright (C) 2010-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/ldexpl.m4 b/m4/ldexpl.m4
index 37dc230..1223711 100644
--- a/m4/ldexpl.m4
+++ b/m4/ldexpl.m4
@@ -1,5 +1,5 @@
-# ldexpl.m4 serial 10
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+# ldexpl.m4 serial 16
+dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,10 +7,16 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_LDEXPL],
[
AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
AC_REQUIRE([gl_FUNC_ISNANL]) dnl for ISNANL_LIBM
+
+ dnl Persuade glibc <math.h> to declare ldexpl().
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
dnl Check whether it's declared.
- dnl MacOS X 10.3 has ldexpl() in libc but doesn't declare it in <math.h>.
- AC_CHECK_DECL([ldexpl], , [HAVE_DECL_LDEXPL=0], [#include <math.h>])
+ dnl Mac OS X 10.3 has ldexpl() in libc but doesn't declare it in <math.h>.
+ AC_CHECK_DECL([ldexpl], , [HAVE_DECL_LDEXPL=0], [[#include <math.h>]])
+
LDEXPL_LIBM=
if test $HAVE_DECL_LDEXPL = 1; then
gl_CHECK_LDEXPL_NO_LIBM
@@ -52,8 +58,13 @@ AC_DEFUN([gl_FUNC_LDEXPL],
fi
fi
if test $HAVE_DECL_LDEXPL = 0 || test $gl_func_ldexpl = no; then
- AC_LIBOBJ([ldexpl])
- LDEXPL_LIBM="$ISNANL_LIBM"
+ dnl Find libraries needed to link lib/ldexpl.c.
+ if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
+ AC_REQUIRE([gl_FUNC_LDEXP])
+ LDEXPL_LIBM="$LDEXP_LIBM"
+ else
+ LDEXPL_LIBM="$ISNANL_LIBM"
+ fi
fi
AC_SUBST([LDEXPL_LIBM])
])
@@ -76,7 +87,7 @@ AC_DEFUN([gl_CHECK_LDEXPL_NO_LIBM],
])
dnl Test whether ldexpl() works on finite numbers (this fails on AIX 5.1
-dnl and MacOS X 10.4/PowerPC).
+dnl and Mac OS X 10.4/PowerPC).
AC_DEFUN([gl_FUNC_LDEXPL_WORKS],
[
AC_REQUIRE([AC_PROG_CC])
@@ -86,7 +97,11 @@ AC_DEFUN([gl_FUNC_LDEXPL_WORKS],
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <math.h>
-extern long double ldexpl (long double, int);
+extern
+#ifdef __cplusplus
+"C"
+#endif
+long double ldexpl (long double, int);
int main()
{
int result = 0;
diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4
index ae003f7..c145e47 100644
--- a/m4/lib-ld.m4
+++ b/m4/lib-ld.m4
@@ -1,33 +1,39 @@
-# lib-ld.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 1996-2003, 2009-2011 Free Software Foundation, Inc.
+# lib-ld.m4 serial 6
+dnl Copyright (C) 1996-2003, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl Subroutines of libtool.m4,
-dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-dnl with libtool.m4.
+dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
+dnl collision with libtool.m4.
-dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
AC_DEFUN([AC_LIB_PROG_LD_GNU],
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
case `$LD -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
- acl_cv_prog_gnu_ld=yes ;;
+ acl_cv_prog_gnu_ld=yes
+ ;;
*)
- acl_cv_prog_gnu_ld=no ;;
+ acl_cv_prog_gnu_ld=no
+ ;;
esac])
with_gnu_ld=$acl_cv_prog_gnu_ld
])
-dnl From libtool-1.4. Sets the variable LD.
+dnl From libtool-2.4. Sets the variable LD.
AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH([gnu-ld],
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
+[AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+AC_ARG_WITH([gnu-ld],
+ [AS_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld [default=no]])],
+ [test "$withval" = no || with_gnu_ld=yes],
+ [with_gnu_ld=no])dnl
+
# Prepare PATH_SEPARATOR.
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
@@ -40,10 +46,11 @@ if test "${PATH_SEPARATOR+set}" != set; then
|| PATH_SEPARATOR=';'
}
fi
+
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
+ AC_MSG_CHECKING([for ld used by $CC])
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -53,11 +60,11 @@ if test "$GCC" = yes; then
esac
case $ac_prog in
# Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
- [re_direlt='/[^/][^/]*/\.\./']
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
+ while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
done
test -z "$LD" && LD="$ac_prog"
@@ -78,23 +85,26 @@ else
fi
AC_CACHE_VAL([acl_cv_path_LD],
[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
+ IFS="$acl_save_ifs"
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
acl_cv_path_LD="$ac_dir/$ac_prog"
# Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
+ # but apparently some variants of GNU ld only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+ case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break ;;
+ test "$with_gnu_ld" != no && break
+ ;;
*)
- test "$with_gnu_ld" != yes && break ;;
+ test "$with_gnu_ld" != yes && break
+ ;;
esac
fi
done
- IFS="$ac_save_ifs"
+ IFS="$acl_save_ifs"
else
acl_cv_path_LD="$LD" # Let the user override the test with a path.
fi])
diff --git a/m4/lib-link.m4 b/m4/lib-link.m4
index e7c9ba9..073f040 100644
--- a/m4/lib-link.m4
+++ b/m4/lib-link.m4
@@ -1,5 +1,5 @@
# lib-link.m4 serial 26 (gettext-0.18.2)
-dnl Copyright (C) 2001-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4
index 7e5f0bd..60908e8 100644
--- a/m4/lib-prefix.m4
+++ b/m4/lib-prefix.m4
@@ -1,5 +1,5 @@
# lib-prefix.m4 serial 7 (gettext-0.18)
-dnl Copyright (C) 2001-2005, 2008-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2005, 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/libsigsegv.m4 b/m4/libsigsegv.m4
index 4156400..3f3e7db 100644
--- a/m4/libsigsegv.m4
+++ b/m4/libsigsegv.m4
@@ -1,5 +1,5 @@
# libsigsegv.m4 serial 4
-dnl Copyright (C) 2002-2003, 2008-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/link.m4 b/m4/link.m4
index 479083c..7cc0ceb 100644
--- a/m4/link.m4
+++ b/m4/link.m4
@@ -1,5 +1,5 @@
-# link.m4 serial 5
-dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# link.m4 serial 8
+dnl Copyright (C) 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,12 +7,12 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_LINK],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_FUNCS_ONCE([link])
if test $ac_cv_func_link = no; then
HAVE_LINK=0
- AC_LIBOBJ([link])
else
- AC_CACHE_CHECK([whether link handles trailing slash correctly],
+ AC_CACHE_CHECK([whether link obeys POSIX],
[gl_cv_func_link_works],
[touch conftest.a
# Assume that if we have lstat, we can also check symlinks.
@@ -29,15 +29,27 @@ AC_DEFUN([gl_FUNC_LINK],
#if HAVE_LSTAT
if (!link ("conftest.lnk/", "conftest.b"))
result |= 2;
+ if (rename ("conftest.a", "conftest.b"))
+ result |= 4;
+ if (!link ("conftest.b", "conftest.lnk"))
+ result |= 8;
#endif
return result;
]])],
[gl_cv_func_link_works=yes], [gl_cv_func_link_works=no],
- [gl_cv_func_link_works="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_link_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_link_works="guessing no" ;;
+ esac
+ ])
rm -f conftest.a conftest.b conftest.lnk])
- if test "$gl_cv_func_link_works" != yes; then
- REPLACE_LINK=1
- AC_LIBOBJ([link])
- fi
+ case "$gl_cv_func_link_works" in
+ *yes) ;;
+ *)
+ REPLACE_LINK=1
+ ;;
+ esac
fi
])
diff --git a/m4/localcharset.m4 b/m4/localcharset.m4
index 6801ca9..2e93e58 100644
--- a/m4/localcharset.m4
+++ b/m4/localcharset.m4
@@ -1,5 +1,5 @@
# localcharset.m4 serial 7
-dnl Copyright (C) 2002, 2004, 2006, 2009-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004, 2006, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/locale-fr.m4 b/m4/locale-fr.m4
index 3f4f954..ef199e3 100644
--- a/m4/locale-fr.m4
+++ b/m4/locale-fr.m4
@@ -1,5 +1,5 @@
-# locale-fr.m4 serial 13
-dnl Copyright (C) 2003, 2005-2011 Free Software Foundation, Inc.
+# locale-fr.m4 serial 17
+dnl Copyright (C) 2003, 2005-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -26,9 +26,9 @@ char buf[16];
int main () {
/* Check whether the given locale name is recognized by the system. */
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Win32, setlocale(category, "") looks at the system settings,
+ /* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -37,7 +37,7 @@ int main () {
if (setlocale (LC_ALL, "") == NULL) return 1;
#endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -63,10 +63,12 @@ int main () {
one byte long. This excludes the UTF-8 encoding. */
t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
+#endif
return 0;
}
changequote([,])dnl
@@ -80,7 +82,7 @@ changequote([,])dnl
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
mingw*)
- # Test for the native Win32 locale name.
+ # Test for the native Windows locale name.
if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_fr=French_France.1252
else
@@ -90,7 +92,7 @@ changequote([,])dnl
;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the usual locale name.
@@ -152,9 +154,9 @@ int main () {
#if !(defined __BEOS__ || defined __HAIKU__)
/* Check whether the given locale name is recognized by the system. */
# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Win32, setlocale(category, "") looks at the system settings,
+ /* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -163,7 +165,7 @@ int main () {
if (setlocale (LC_ALL, "") == NULL) return 1;
# endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -189,10 +191,12 @@ int main () {
|| buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
return 1;
#endif
+#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
+#endif
return 0;
}
changequote([,])dnl
@@ -206,7 +210,7 @@ changequote([,])dnl
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
mingw*)
- # Test for the hypothetical native Win32 locale name.
+ # Test for the hypothetical native Windows locale name.
if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_fr_utf8=French_France.65001
else
@@ -216,7 +220,7 @@ changequote([,])dnl
;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the usual locale name.
diff --git a/m4/locale-ja.m4 b/m4/locale-ja.m4
index d44c2c8..132a3e7 100644
--- a/m4/locale-ja.m4
+++ b/m4/locale-ja.m4
@@ -1,5 +1,5 @@
-# locale-ja.m4 serial 9
-dnl Copyright (C) 2003, 2005-2011 Free Software Foundation, Inc.
+# locale-ja.m4 serial 12
+dnl Copyright (C) 2003, 2005-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -28,9 +28,9 @@ int main ()
const char *p;
/* Check whether the given locale name is recognized by the system. */
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Win32, setlocale(category, "") looks at the system settings,
+ /* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -39,7 +39,7 @@ int main ()
if (setlocale (LC_ALL, "") == NULL) return 1;
#endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -84,13 +84,14 @@ changequote([,])dnl
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
mingw*)
- # Note that on native Win32, the Japanese locale is Japanese_Japan.932,
- # and CP932 is very different from EUC-JP, so we cannot use it here.
+ # Note that on native Windows, the Japanese locale is
+ # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
+ # cannot use it here.
gt_cv_locale_ja=none
;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the AIX locale name.
diff --git a/m4/locale-tr.m4 b/m4/locale-tr.m4
index 19ded1b..aeb5615 100644
--- a/m4/locale-tr.m4
+++ b/m4/locale-tr.m4
@@ -1,5 +1,5 @@
-# locale-tr.m4 serial 7
-dnl Copyright (C) 2003, 2005-2011 Free Software Foundation, Inc.
+# locale-tr.m4 serial 10
+dnl Copyright (C) 2003, 2005-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -31,9 +31,9 @@ int main () {
program return 1 on BeOS. */
/* Check whether the given locale name is recognized by the system. */
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Win32, setlocale(category, "") looks at the system settings,
+ /* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -42,7 +42,7 @@ int main () {
if (setlocale (LC_ALL, "") == NULL) return 1;
#endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On MacOS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
+ On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -85,7 +85,7 @@ changequote([,])dnl
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
mingw*)
- # Test for the hypothetical native Win32 locale name.
+ # Test for the hypothetical native Windows locale name.
if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_tr_utf8=Turkish_Turkey.65001
else
@@ -95,7 +95,7 @@ changequote([,])dnl
;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the usual locale name.
diff --git a/m4/locale-zh.m4 b/m4/locale-zh.m4
index e03f91f..4eed73f 100644
--- a/m4/locale-zh.m4
+++ b/m4/locale-zh.m4
@@ -1,5 +1,5 @@
-# locale-zh.m4 serial 8
-dnl Copyright (C) 2003, 2005-2011 Free Software Foundation, Inc.
+# locale-zh.m4 serial 12
+dnl Copyright (C) 2003, 2005-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -29,9 +29,9 @@ int main ()
const char *p;
/* Check whether the given locale name is recognized by the system. */
#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Win32, setlocale(category, "") looks at the system settings,
+ /* On native Windows, setlocale(category, "") looks at the system settings,
not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
category of the locale to "C". */
if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
|| strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
@@ -40,7 +40,7 @@ int main ()
if (setlocale (LC_ALL, "") == NULL) return 1;
#endif
/* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
succeeds but then nl_langinfo(CODESET) is "646". In this situation,
@@ -85,7 +85,7 @@ changequote([,])dnl
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
mingw*)
- # Test for the hypothetical native Win32 locale name.
+ # Test for the hypothetical native Windows locale name.
if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_zh_CN=Chinese_China.54936
else
@@ -93,9 +93,15 @@ changequote([,])dnl
gt_cv_locale_zh_CN=none
fi
;;
+ solaris2.8)
+ # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
+ # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
+ # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
+ gt_cv_locale_zh_CN=none
+ ;;
*)
# Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
# configure script would override the LC_ALL setting. Likewise for
# LC_CTYPE, which is also set at the beginning of the configure script.
# Test for the locale name without encoding suffix.
diff --git a/m4/locale_h.m4 b/m4/locale_h.m4
index 4d0f894..8bd12e8 100644
--- a/m4/locale_h.m4
+++ b/m4/locale_h.m4
@@ -1,5 +1,5 @@
-# locale_h.m4 serial 13
-dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+# locale_h.m4 serial 19
+dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -10,18 +10,29 @@ AC_DEFUN([gl_LOCALE_H],
dnl once only, before all statements that occur in other macros.
AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
- dnl Persuade glibc <locale.h> to define locale_t.
+ dnl Persuade glibc <locale.h> to define locale_t and the int_p_*, int_n_*
+ dnl members of 'struct lconv'.
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
dnl If <stddef.h> is replaced, then <locale.h> 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 <locale.h>
- int x = LC_MESSAGES;]],
+ int x = LC_MESSAGES;
+ int y = sizeof (((struct lconv *) 0)->decimal_point);]],
[[]])],
[gl_cv_header_locale_h_posix2001=yes],
[gl_cv_header_locale_h_posix2001=no])])
@@ -31,7 +42,7 @@ AC_DEFUN([gl_LOCALE_H],
if test $ac_cv_header_xlocale_h = yes; then
HAVE_XLOCALE_H=1
dnl Check whether use of locale_t requires inclusion of <xlocale.h>,
- dnl e.g. on MacOS X 10.5. If <locale.h> does not define locale_t by
+ dnl e.g. on Mac OS X 10.5. If <locale.h> does not define locale_t by
dnl itself, we assume that <xlocale.h> will do so.
AC_CACHE_CHECK([whether locale.h defines locale_t],
[gl_cv_header_locale_has_locale_t],
@@ -54,15 +65,29 @@ AC_DEFUN([gl_LOCALE_H],
fi
AC_SUBST([HAVE_XLOCALE_H])
+ dnl Check whether 'struct lconv' is complete.
+ dnl Bionic libc's 'struct lconv' is just a dummy.
+ dnl On OpenBSD 4.9, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.5.x,
+ dnl mingw, MSVC 9, it lacks the int_p_* and int_n_* members.
+ AC_CACHE_CHECK([whether struct lconv is properly defined],
+ [gl_cv_sys_struct_lconv_ok],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <locale.h>
+ 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 <locale.h> is always overridden, because of GNULIB_POSIXCHECK.
gl_NEXT_HEADERS([locale.h])
- if test -n "$STDDEF_H" \
- || test $gl_cv_header_locale_h_posix2001 = no \
- || test $gl_cv_header_locale_h_needs_xlocale_h = yes; then
- gl_REPLACE_LOCALE_H
- fi
-
dnl Check for declarations of anything we want to poison if the
dnl corresponding gnulib module is not in use.
gl_WARN_ON_USE_PREPARE([[#include <locale.h>
@@ -74,13 +99,6 @@ AC_DEFUN([gl_LOCALE_H],
[setlocale duplocale])
])
-dnl Unconditionally enables the replacement of <locale.h>.
-AC_DEFUN([gl_REPLACE_LOCALE_H],
-[
- dnl This is a no-op, because <locale.h> is always overridden.
- :
-])
-
AC_DEFUN([gl_LOCALE_MODULE_INDICATOR],
[
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
@@ -92,10 +110,13 @@ AC_DEFUN([gl_LOCALE_MODULE_INDICATOR],
AC_DEFUN([gl_LOCALE_H_DEFAULTS],
[
+ GNULIB_LOCALECONV=0; AC_SUBST([GNULIB_LOCALECONV])
GNULIB_SETLOCALE=0; AC_SUBST([GNULIB_SETLOCALE])
GNULIB_DUPLOCALE=0; AC_SUBST([GNULIB_DUPLOCALE])
dnl Assume proper GNU behavior unless another module says otherwise.
- HAVE_DUPLOCALE=1; AC_SUBST([HAVE_DUPLOCALE])
- REPLACE_SETLOCALE=0; AC_SUBST([REPLACE_SETLOCALE])
- REPLACE_DUPLOCALE=0; AC_SUBST([REPLACE_DUPLOCALE])
+ HAVE_DUPLOCALE=1; AC_SUBST([HAVE_DUPLOCALE])
+ REPLACE_LOCALECONV=0; AC_SUBST([REPLACE_LOCALECONV])
+ REPLACE_SETLOCALE=0; AC_SUBST([REPLACE_SETLOCALE])
+ REPLACE_DUPLOCALE=0; AC_SUBST([REPLACE_DUPLOCALE])
+ REPLACE_STRUCT_LCONV=0; AC_SUBST([REPLACE_STRUCT_LCONV])
])
diff --git a/m4/localeconv.m4 b/m4/localeconv.m4
new file mode 100644
index 0000000..b8bb596
--- /dev/null
+++ b/m4/localeconv.m4
@@ -0,0 +1,22 @@
+# localeconv.m4 serial 1
+dnl Copyright (C) 2012-2013 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_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 <locale.h>]])
+])
diff --git a/m4/localename.m4 b/m4/localename.m4
index 926ada6..361ed73 100644
--- a/m4/localename.m4
+++ b/m4/localename.m4
@@ -1,5 +1,5 @@
# localename.m4 serial 2
-dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/lock.m4 b/m4/lock.m4
index 9686945..aae1701 100644
--- a/m4/lock.m4
+++ b/m4/lock.m4
@@ -1,5 +1,5 @@
-# lock.m4 serial 11 (gettext-0.18.2)
-dnl Copyright (C) 2005-2011 Free Software Foundation, Inc.
+# lock.m4 serial 13 (gettext-0.18.2)
+dnl Copyright (C) 2005-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -10,7 +10,7 @@ AC_DEFUN([gl_LOCK],
[
AC_REQUIRE([gl_THREADLIB])
if test "$gl_threads_api" = posix; then
- # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the
+ # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
# pthread_rwlock_* functions.
AC_CHECK_TYPE([pthread_rwlock_t],
[AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1],
@@ -24,6 +24,9 @@ AC_DEFUN([gl_LOCK],
[[
#if __FreeBSD__ == 4
error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
+#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
+ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
+error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
#else
int x = (int)PTHREAD_MUTEX_RECURSIVE;
return !x;
@@ -35,7 +38,5 @@ return !x;
gl_PREREQ_LOCK
])
-# Prerequisites of lib/lock.c.
-AC_DEFUN([gl_PREREQ_LOCK], [
- AC_REQUIRE([AC_C_INLINE])
-])
+# Prerequisites of lib/glthread/lock.c.
+AC_DEFUN([gl_PREREQ_LOCK], [:])
diff --git a/m4/longlong.m4 b/m4/longlong.m4
index aed816c..3af6ab5 100644
--- a/m4/longlong.m4
+++ b/m4/longlong.m4
@@ -1,5 +1,5 @@
-# longlong.m4 serial 16
-dnl Copyright (C) 1999-2007, 2009-2011 Free Software Foundation, Inc.
+# longlong.m4 serial 17
+dnl Copyright (C) 1999-2007, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -51,7 +51,7 @@ AC_DEFUN([AC_TYPE_LONG_LONG_INT],
fi])
if test $ac_cv_type_long_long_int = yes; then
AC_DEFINE([HAVE_LONG_LONG_INT], [1],
- [Define to 1 if the system has the type `long long int'.])
+ [Define to 1 if the system has the type 'long long int'.])
fi
])
@@ -77,7 +77,7 @@ AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
fi])
if test $ac_cv_type_unsigned_long_long_int = yes; then
AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
- [Define to 1 if the system has the type `unsigned long long int'.])
+ [Define to 1 if the system has the type 'unsigned long long int'.])
fi
])
diff --git a/m4/lseek.m4 b/m4/lseek.m4
index f6452f6..df9302a 100644
--- a/m4/lseek.m4
+++ b/m4/lseek.m4
@@ -1,5 +1,5 @@
-# lseek.m4 serial 6
-dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+# lseek.m4 serial 10
+dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,43 +7,65 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_LSEEK],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+
+ AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AC_PROG_CC])
+ AC_CHECK_HEADERS_ONCE([unistd.h])
AC_CACHE_CHECK([whether lseek detects pipes], [gl_cv_func_lseek_pipe],
- [if test $cross_compiling = no; then
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ [case "$host_os" in
+ mingw*)
+ dnl Native Windows.
+ dnl The result of lseek (fd, (off_t)0, SEEK_CUR) or
+ dnl SetFilePointer(handle, 0, NULL, FILE_CURRENT)
+ dnl for a pipe depends on the environment: In a Cygwin 1.5
+ dnl environment it succeeds (wrong); in a Cygwin 1.7 environment
+ dnl it fails with a wrong errno value.
+ gl_cv_func_lseek_pipe=no
+ ;;
+ *)
+ if test $cross_compiling = no; then
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h> /* for off_t */
#include <stdio.h> /* for SEEK_CUR */
-#include <unistd.h>]], [[
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#else /* on Windows with MSVC */
+# include <io.h>
+#endif
+]], [[
/* Exit with success only if stdin is seekable. */
return lseek (0, (off_t)0, SEEK_CUR) < 0;
]])],
- [if test -s conftest$ac_exeext \
- && ./conftest$ac_exeext < conftest.$ac_ext \
- && test 1 = "`echo hi \
- | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
- gl_cv_func_lseek_pipe=yes
- else
- gl_cv_func_lseek_pipe=no
- fi],
- [gl_cv_func_lseek_pipe=no])
- else
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
-#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__
-/* mingw and BeOS mistakenly return 0 when trying to seek on pipes. */
+ [if test -s conftest$ac_exeext \
+ && ./conftest$ac_exeext < conftest.$ac_ext \
+ && test 1 = "`echo hi \
+ | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
+ gl_cv_func_lseek_pipe=yes
+ else
+ gl_cv_func_lseek_pipe=no
+ fi
+ ],
+ [gl_cv_func_lseek_pipe=no])
+ else
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([[
+#if defined __BEOS__
+/* BeOS mistakenly return 0 when trying to seek on pipes. */
Choke me.
#endif]])],
- [gl_cv_func_lseek_pipe=yes], [gl_cv_func_lseek_pipe=no])
- fi])
+ [gl_cv_func_lseek_pipe=yes], [gl_cv_func_lseek_pipe=no])
+ fi
+ ;;
+ esac
+ ])
if test $gl_cv_func_lseek_pipe = no; then
- gl_REPLACE_LSEEK
+ REPLACE_LSEEK=1
+ AC_DEFINE([LSEEK_PIPE_BROKEN], [1],
+ [Define to 1 if lseek does not detect pipes.])
fi
-])
-AC_DEFUN([gl_REPLACE_LSEEK],
-[
- AC_LIBOBJ([lseek])
- AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
- REPLACE_LSEEK=1
- AC_DEFINE([LSEEK_PIPE_BROKEN], [1],
- [Define to 1 if lseek does not detect pipes.])
+ AC_REQUIRE([gl_SYS_TYPES_H])
+ if test $WINDOWS_64_BIT_OFF_T = 1; then
+ REPLACE_LSEEK=1
+ fi
])
diff --git a/m4/lstat.m4 b/m4/lstat.m4
index b9b22a6..5f4db64 100644
--- a/m4/lstat.m4
+++ b/m4/lstat.m4
@@ -1,6 +1,6 @@
-# serial 21
+# serial 26
-# Copyright (C) 1997-2001, 2003-2011 Free Software Foundation, Inc.
+# Copyright (C) 1997-2001, 2003-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -15,24 +15,26 @@ AC_DEFUN([gl_FUNC_LSTAT],
dnl "#define lstat stat", and lstat.c is a no-op.
AC_CHECK_FUNCS_ONCE([lstat])
if test $ac_cv_func_lstat = yes; then
- AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
- if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
- dnl Note: AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK does AC_LIBOBJ([lstat]).
- REPLACE_LSTAT=1
- fi
- # Prerequisites of lib/lstat.c.
- AC_REQUIRE([AC_C_INLINE])
+ AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
+ case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
+ *no)
+ REPLACE_LSTAT=1
+ ;;
+ esac
else
HAVE_LSTAT=0
fi
])
-# Redefine AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, because it is no longer
-# maintained in Autoconf.
-AC_DEFUN([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
+# Prerequisites of lib/lstat.c.
+AC_DEFUN([gl_PREREQ_LSTAT], [:])
+
+AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
[
+ dnl We don't use AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK any more, because it
+ dnl is no longer maintained in Autoconf and because it invokes AC_LIBOBJ.
AC_CACHE_CHECK([whether lstat correctly handles trailing slash],
- [ac_cv_func_lstat_dereferences_slashed_symlink],
+ [gl_cv_func_lstat_dereferences_slashed_symlink],
[rm -f conftest.sym conftest.file
echo >conftest.file
if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
@@ -45,25 +47,27 @@ AC_DEFUN([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
have to compile and use the lstat wrapper. */
return lstat ("conftest.sym/", &sbuf) == 0;
]])],
- [ac_cv_func_lstat_dereferences_slashed_symlink=yes],
- [ac_cv_func_lstat_dereferences_slashed_symlink=no],
- [# When cross-compiling, be pessimistic so we will end up using the
- # replacement version of lstat that checks for trailing slashes and
- # calls lstat a second time when necessary.
- ac_cv_func_lstat_dereferences_slashed_symlink=no
+ [gl_cv_func_lstat_dereferences_slashed_symlink=yes],
+ [gl_cv_func_lstat_dereferences_slashed_symlink=no],
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
+ esac
])
else
# If the 'ln -s' command failed, then we probably don't even
# have an lstat function.
- ac_cv_func_lstat_dereferences_slashed_symlink=no
+ gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
fi
rm -f conftest.sym conftest.file
])
- test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
- AC_DEFINE_UNQUOTED([LSTAT_FOLLOWS_SLASHED_SYMLINK], [1],
- [Define to 1 if `lstat' dereferences a symlink specified
- with a trailing slash.])
- if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
- AC_LIBOBJ([lstat])
- fi
+ case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
+ *yes)
+ AC_DEFINE_UNQUOTED([LSTAT_FOLLOWS_SLASHED_SYMLINK], [1],
+ [Define to 1 if 'lstat' dereferences a symlink specified
+ with a trailing slash.])
+ ;;
+ esac
])
diff --git a/m4/malloc.m4 b/m4/malloc.m4
index 8094444..4b24a0b 100644
--- a/m4/malloc.m4
+++ b/m4/malloc.m4
@@ -1,9 +1,47 @@
-# malloc.m4 serial 12
-dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+# malloc.m4 serial 14
+dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+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 <stdlib.h>
+ #else
+ char *malloc ();
+ #endif
+ ]],
+ [[return ! malloc (0);]])
+ ],
+ [ac_cv_func_malloc_0_nonnull=yes],
+ [ac_cv_func_malloc_0_nonnull=no],
+ [case "$host_os" in
+ # Guess yes on platforms where we know the result.
+ *-gnu* | freebsd* | netbsd* | openbsd* \
+ | hpux* | solaris* | cygwin* | mingw*)
+ ac_cv_func_malloc_0_nonnull=yes ;;
+ # If we don't know, assume the worst.
+ *) ac_cv_func_malloc_0_nonnull=no ;;
+ esac
+ ])
+ ])
+ AS_IF([test $ac_cv_func_malloc_0_nonnull = yes], [$1], [$2])
+])# _AC_FUNC_MALLOC_IF
+
+])
+
# gl_FUNC_MALLOC_GNU
# ------------------
# Test whether 'malloc (0)' is handled like in GNU libc, and replace malloc if
@@ -17,7 +55,7 @@ AC_DEFUN([gl_FUNC_MALLOC_GNU],
[Define to 1 if your system has a GNU libc compatible 'malloc'
function, and to 0 otherwise.])],
[AC_DEFINE([HAVE_MALLOC_GNU], [0])
- gl_REPLACE_MALLOC
+ REPLACE_MALLOC=1
])
])
@@ -33,7 +71,7 @@ AC_DEFUN([gl_FUNC_MALLOC_POSIX],
AC_DEFINE([HAVE_MALLOC_POSIX], [1],
[Define if the 'malloc' function is POSIX compliant.])
else
- gl_REPLACE_MALLOC
+ REPLACE_MALLOC=1
fi
])
@@ -58,9 +96,3 @@ AC_DEFUN([gl_CHECK_MALLOC_POSIX],
[gl_cv_func_malloc_posix=no])
])
])
-
-AC_DEFUN([gl_REPLACE_MALLOC],
-[
- AC_LIBOBJ([malloc])
- REPLACE_MALLOC=1
-])
diff --git a/m4/malloca.m4 b/m4/malloca.m4
index aec43f5..791ce10 100644
--- a/m4/malloca.m4
+++ b/m4/malloca.m4
@@ -1,5 +1,5 @@
# malloca.m4 serial 1
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2011 Free Software Foundation,
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2013 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/manywarnings.m4 b/m4/manywarnings.m4
index e928821..be6d4c9 100644
--- a/m4/manywarnings.m4
+++ b/m4/manywarnings.m4
@@ -1,5 +1,5 @@
-# manywarnings.m4 serial 1
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# manywarnings.m4 serial 5
+dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -30,79 +30,193 @@ AC_DEFUN([gl_MANYWARN_COMPLEMENT],
# gl_MANYWARN_ALL_GCC(VARIABLE)
# -----------------------------
-# Add all documented GCC (currently as per version 4.4) warning
-# parameters to variable VARIABLE. Note that you need to test them
-# using gl_WARN_ADD if you want to make sure your gcc understands it.
+# Add all documented GCC warning parameters to variable VARIABLE.
+# Note that you need to test them using gl_WARN_ADD if you want to
+# make sure your gcc understands it.
AC_DEFUN([gl_MANYWARN_ALL_GCC],
[
- gl_manywarn_set=
- for gl_manywarn_item in \
- -Wall \
- -W \
- -Wformat-y2k \
- -Wformat-nonliteral \
- -Wformat-security \
- -Winit-self \
- -Wmissing-include-dirs \
- -Wswitch-default \
- -Wswitch-enum \
- -Wunused \
- -Wunknown-pragmas \
- -Wstrict-aliasing \
- -Wstrict-overflow \
- -Wsystem-headers \
- -Wfloat-equal \
- -Wtraditional \
- -Wtraditional-conversion \
- -Wdeclaration-after-statement \
- -Wundef \
- -Wshadow \
- -Wunsafe-loop-optimizations \
- -Wpointer-arith \
- -Wbad-function-cast \
- -Wc++-compat \
- -Wcast-qual \
- -Wcast-align \
- -Wwrite-strings \
- -Wconversion \
- -Wsign-conversion \
- -Wlogical-op \
- -Waggregate-return \
- -Wstrict-prototypes \
- -Wold-style-definition \
- -Wmissing-prototypes \
- -Wmissing-declarations \
- -Wmissing-noreturn \
- -Wmissing-format-attribute \
- -Wpacked \
- -Wpadded \
- -Wredundant-decls \
- -Wnested-externs \
- -Wunreachable-code \
- -Winline \
- -Winvalid-pch \
- -Wlong-long \
- -Wvla \
- -Wvolatile-register-var \
- -Wdisabled-optimization \
- -Wstack-protector \
- -Woverlength-strings \
- -Wbuiltin-macro-redefined \
- -Wmudflap \
- -Wpacked-bitfield-compat \
- -Wsync-nand \
- ; do
- gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
- done
- # The following are not documented in the manual but are included in
- # output from gcc --help=warnings.
- for gl_manywarn_item in \
- -Wattributes \
- -Wcoverage-mismatch \
- -Wmultichar \
- -Wunused-macros \
- ; do
+ dnl First, check for some issues that only occur when combining multiple
+ dnl gcc warning categories.
+ AC_REQUIRE([AC_PROG_CC])
+ if test -n "$GCC"; then
+
+ dnl Check if -W -Werror -Wno-missing-field-initializers is supported
+ dnl with the current $CC $CFLAGS $CPPFLAGS.
+ AC_MSG_CHECKING([whether -Wno-missing-field-initializers is supported])
+ AC_CACHE_VAL([gl_cv_cc_nomfi_supported], [
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[]], [[]])],
+ [gl_cv_cc_nomfi_supported=yes],
+ [gl_cv_cc_nomfi_supported=no])
+ CFLAGS="$gl_save_CFLAGS"])
+ AC_MSG_RESULT([$gl_cv_cc_nomfi_supported])
+
+ if test "$gl_cv_cc_nomfi_supported" = yes; then
+ dnl Now check whether -Wno-missing-field-initializers is needed
+ dnl for the { 0, } construct.
+ AC_MSG_CHECKING([whether -Wno-missing-field-initializers is needed])
+ AC_CACHE_VAL([gl_cv_cc_nomfi_needed], [
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -W -Werror"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[void f (void)
+ {
+ typedef struct { int a; int b; } s_t;
+ s_t s1 = { 0, };
+ }
+ ]],
+ [[]])],
+ [gl_cv_cc_nomfi_needed=no],
+ [gl_cv_cc_nomfi_needed=yes])
+ CFLAGS="$gl_save_CFLAGS"
+ ])
+ AC_MSG_RESULT([$gl_cv_cc_nomfi_needed])
+ fi
+
+ dnl Next, check if -Werror -Wuninitialized is useful with the
+ dnl user's choice of $CFLAGS; some versions of gcc warn that it
+ dnl has no effect if -O is not also used
+ AC_MSG_CHECKING([whether -Wuninitialized is supported])
+ AC_CACHE_VAL([gl_cv_cc_uninitialized_supported], [
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wuninitialized"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[]], [[]])],
+ [gl_cv_cc_uninitialized_supported=yes],
+ [gl_cv_cc_uninitialized_supported=no])
+ CFLAGS="$gl_save_CFLAGS"])
+ AC_MSG_RESULT([$gl_cv_cc_uninitialized_supported])
+
+ fi
+
+ # List all gcc warning categories.
+ gl_manywarn_set=
+ for gl_manywarn_item in \
+ -W \
+ -Wabi \
+ -Waddress \
+ -Waggressive-loop-optimizations \
+ -Wall \
+ -Warray-bounds \
+ -Wattributes \
+ -Wbad-function-cast \
+ -Wbuiltin-macro-redefined \
+ -Wcast-align \
+ -Wchar-subscripts \
+ -Wclobbered \
+ -Wcomment \
+ -Wcomments \
+ -Wcoverage-mismatch \
+ -Wcpp \
+ -Wdeprecated \
+ -Wdeprecated-declarations \
+ -Wdisabled-optimization \
+ -Wdiv-by-zero \
+ -Wdouble-promotion \
+ -Wempty-body \
+ -Wendif-labels \
+ -Wenum-compare \
+ -Wextra \
+ -Wformat-contains-nul \
+ -Wformat-extra-args \
+ -Wformat-nonliteral \
+ -Wformat-security \
+ -Wformat-y2k \
+ -Wformat-zero-length \
+ -Wfree-nonheap-object \
+ -Wignored-qualifiers \
+ -Wimplicit \
+ -Wimplicit-function-declaration \
+ -Wimplicit-int \
+ -Winit-self \
+ -Winline \
+ -Wint-to-pointer-cast \
+ -Winvalid-memory-model \
+ -Winvalid-pch \
+ -Wjump-misses-init \
+ -Wlogical-op \
+ -Wmain \
+ -Wmaybe-uninitialized \
+ -Wmissing-braces \
+ -Wmissing-declarations \
+ -Wmissing-field-initializers \
+ -Wmissing-include-dirs \
+ -Wmissing-parameter-type \
+ -Wmissing-prototypes \
+ -Wmudflap \
+ -Wmultichar \
+ -Wnarrowing \
+ -Wnested-externs \
+ -Wnonnull \
+ -Wnormalized=nfc \
+ -Wold-style-declaration \
+ -Wold-style-definition \
+ -Woverflow \
+ -Woverlength-strings \
+ -Woverride-init \
+ -Wpacked \
+ -Wpacked-bitfield-compat \
+ -Wparentheses \
+ -Wpointer-arith \
+ -Wpointer-sign \
+ -Wpointer-to-int-cast \
+ -Wpragmas \
+ -Wreturn-local-addr \
+ -Wreturn-type \
+ -Wsequence-point \
+ -Wshadow \
+ -Wsizeof-pointer-memaccess \
+ -Wstack-protector \
+ -Wstrict-aliasing \
+ -Wstrict-overflow \
+ -Wstrict-prototypes \
+ -Wsuggest-attribute=const \
+ -Wsuggest-attribute=format \
+ -Wsuggest-attribute=noreturn \
+ -Wsuggest-attribute=pure \
+ -Wswitch \
+ -Wswitch-default \
+ -Wsync-nand \
+ -Wsystem-headers \
+ -Wtrampolines \
+ -Wtrigraphs \
+ -Wtype-limits \
+ -Wuninitialized \
+ -Wunknown-pragmas \
+ -Wunsafe-loop-optimizations \
+ -Wunused \
+ -Wunused-but-set-parameter \
+ -Wunused-but-set-variable \
+ -Wunused-function \
+ -Wunused-label \
+ -Wunused-local-typedefs \
+ -Wunused-macros \
+ -Wunused-parameter \
+ -Wunused-result \
+ -Wunused-value \
+ -Wunused-variable \
+ -Wvarargs \
+ -Wvariadic-macros \
+ -Wvector-operation-performance \
+ -Wvla \
+ -Wvolatile-register-var \
+ -Wwrite-strings \
+ \
+ ; do
gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
done
+
+ # Disable specific options as needed.
+ if test "$gl_cv_cc_nomfi_needed" = yes; then
+ gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
+ fi
+
+ if test "$gl_cv_cc_uninitialized_supported" = no; then
+ gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
+ fi
+
$1=$gl_manywarn_set
])
diff --git a/m4/math_h.m4 b/m4/math_h.m4
index 7b46aee..bf0845f 100644
--- a/m4/math_h.m4
+++ b/m4/math_h.m4
@@ -1,5 +1,5 @@
-# math_h.m4 serial 25
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+# math_h.m4 serial 114
+dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -8,7 +8,6 @@ AC_DEFUN([gl_MATH_H],
[
AC_REQUIRE([gl_MATH_H_DEFAULTS])
gl_CHECK_NEXT_HEADERS([math.h])
- AC_REQUIRE([AC_C_INLINE])
AC_CACHE_CHECK([whether NAN macro works], [gl_cv_header_math_nan_works],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <math.h>]],
@@ -38,9 +37,20 @@ AC_DEFUN([gl_MATH_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 <math.h>
- ]], [acosl asinl atanl ceilf ceill cosl expl floorf floorl frexpl
- ldexpl logb logl round roundf roundl sinl sqrtl tanl trunc truncf truncl])
+ gl_WARN_ON_USE_PREPARE([[#include <math.h>]],
+ [acosf acosl asinf asinl atanf atanl
+ cbrt cbrtf cbrtl ceilf ceill copysign copysignf copysignl cosf cosl coshf
+ expf expl exp2 exp2f exp2l expm1 expm1f expm1l
+ fabsf fabsl floorf floorl fma fmaf fmal
+ fmod fmodf fmodl frexpf frexpl hypotf hypotl
+ ilogb ilogbf ilogbl
+ ldexpf ldexpl
+ log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l
+ logb logbf logbl
+ modf modff modfl powf
+ remainder remainderf remainderl
+ rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl
+ tanf tanl tanhf trunc truncf truncl])
])
AC_DEFUN([gl_MATH_MODULE_INDICATOR],
@@ -54,64 +64,189 @@ AC_DEFUN([gl_MATH_MODULE_INDICATOR],
AC_DEFUN([gl_MATH_H_DEFAULTS],
[
- GNULIB_ACOSL=0; AC_SUBST([GNULIB_ACOSL])
- GNULIB_ASINL=0; AC_SUBST([GNULIB_ASINL])
- GNULIB_ATANL=0; AC_SUBST([GNULIB_ATANL])
- GNULIB_CEIL=0; AC_SUBST([GNULIB_CEIL])
- GNULIB_CEILF=0; AC_SUBST([GNULIB_CEILF])
- GNULIB_CEILL=0; AC_SUBST([GNULIB_CEILL])
- GNULIB_COSL=0; AC_SUBST([GNULIB_COSL])
- GNULIB_EXPL=0; AC_SUBST([GNULIB_EXPL])
- GNULIB_FLOOR=0; AC_SUBST([GNULIB_FLOOR])
- GNULIB_FLOORF=0; AC_SUBST([GNULIB_FLOORF])
- GNULIB_FLOORL=0; AC_SUBST([GNULIB_FLOORL])
- GNULIB_FREXP=0; AC_SUBST([GNULIB_FREXP])
- GNULIB_FREXPL=0; AC_SUBST([GNULIB_FREXPL])
- GNULIB_ISFINITE=0; AC_SUBST([GNULIB_ISFINITE])
- GNULIB_ISINF=0; AC_SUBST([GNULIB_ISINF])
- GNULIB_ISNAN=0; AC_SUBST([GNULIB_ISNAN])
- GNULIB_ISNANF=0; AC_SUBST([GNULIB_ISNANF])
- GNULIB_ISNAND=0; AC_SUBST([GNULIB_ISNAND])
- GNULIB_ISNANL=0; AC_SUBST([GNULIB_ISNANL])
- GNULIB_LDEXPL=0; AC_SUBST([GNULIB_LDEXPL])
- GNULIB_LOGB=0; AC_SUBST([GNULIB_LOGB])
- GNULIB_LOGL=0; AC_SUBST([GNULIB_LOGL])
- GNULIB_ROUND=0; AC_SUBST([GNULIB_ROUND])
- GNULIB_ROUNDF=0; AC_SUBST([GNULIB_ROUNDF])
- GNULIB_ROUNDL=0; AC_SUBST([GNULIB_ROUNDL])
- GNULIB_SIGNBIT=0; AC_SUBST([GNULIB_SIGNBIT])
- GNULIB_SINL=0; AC_SUBST([GNULIB_SINL])
- GNULIB_SQRTL=0; AC_SUBST([GNULIB_SQRTL])
- GNULIB_TANL=0; AC_SUBST([GNULIB_TANL])
- GNULIB_TRUNC=0; AC_SUBST([GNULIB_TRUNC])
- GNULIB_TRUNCF=0; AC_SUBST([GNULIB_TRUNCF])
- GNULIB_TRUNCL=0; AC_SUBST([GNULIB_TRUNCL])
+ GNULIB_ACOSF=0; AC_SUBST([GNULIB_ACOSF])
+ GNULIB_ACOSL=0; AC_SUBST([GNULIB_ACOSL])
+ GNULIB_ASINF=0; AC_SUBST([GNULIB_ASINF])
+ GNULIB_ASINL=0; AC_SUBST([GNULIB_ASINL])
+ GNULIB_ATANF=0; AC_SUBST([GNULIB_ATANF])
+ GNULIB_ATANL=0; AC_SUBST([GNULIB_ATANL])
+ GNULIB_ATAN2F=0; AC_SUBST([GNULIB_ATAN2F])
+ GNULIB_CBRT=0; AC_SUBST([GNULIB_CBRT])
+ GNULIB_CBRTF=0; AC_SUBST([GNULIB_CBRTF])
+ GNULIB_CBRTL=0; AC_SUBST([GNULIB_CBRTL])
+ GNULIB_CEIL=0; AC_SUBST([GNULIB_CEIL])
+ GNULIB_CEILF=0; AC_SUBST([GNULIB_CEILF])
+ GNULIB_CEILL=0; AC_SUBST([GNULIB_CEILL])
+ GNULIB_COPYSIGN=0; AC_SUBST([GNULIB_COPYSIGN])
+ GNULIB_COPYSIGNF=0; AC_SUBST([GNULIB_COPYSIGNF])
+ GNULIB_COPYSIGNL=0; AC_SUBST([GNULIB_COPYSIGNL])
+ GNULIB_COSF=0; AC_SUBST([GNULIB_COSF])
+ GNULIB_COSL=0; AC_SUBST([GNULIB_COSL])
+ GNULIB_COSHF=0; AC_SUBST([GNULIB_COSHF])
+ GNULIB_EXPF=0; AC_SUBST([GNULIB_EXPF])
+ GNULIB_EXPL=0; AC_SUBST([GNULIB_EXPL])
+ GNULIB_EXP2=0; AC_SUBST([GNULIB_EXP2])
+ GNULIB_EXP2F=0; AC_SUBST([GNULIB_EXP2F])
+ GNULIB_EXP2L=0; AC_SUBST([GNULIB_EXP2L])
+ GNULIB_EXPM1=0; AC_SUBST([GNULIB_EXPM1])
+ GNULIB_EXPM1F=0; AC_SUBST([GNULIB_EXPM1F])
+ GNULIB_EXPM1L=0; AC_SUBST([GNULIB_EXPM1L])
+ GNULIB_FABSF=0; AC_SUBST([GNULIB_FABSF])
+ GNULIB_FABSL=0; AC_SUBST([GNULIB_FABSL])
+ GNULIB_FLOOR=0; AC_SUBST([GNULIB_FLOOR])
+ GNULIB_FLOORF=0; AC_SUBST([GNULIB_FLOORF])
+ GNULIB_FLOORL=0; AC_SUBST([GNULIB_FLOORL])
+ GNULIB_FMA=0; AC_SUBST([GNULIB_FMA])
+ GNULIB_FMAF=0; AC_SUBST([GNULIB_FMAF])
+ GNULIB_FMAL=0; AC_SUBST([GNULIB_FMAL])
+ GNULIB_FMOD=0; AC_SUBST([GNULIB_FMOD])
+ GNULIB_FMODF=0; AC_SUBST([GNULIB_FMODF])
+ GNULIB_FMODL=0; AC_SUBST([GNULIB_FMODL])
+ GNULIB_FREXPF=0; AC_SUBST([GNULIB_FREXPF])
+ GNULIB_FREXP=0; AC_SUBST([GNULIB_FREXP])
+ GNULIB_FREXPL=0; AC_SUBST([GNULIB_FREXPL])
+ GNULIB_HYPOT=0; AC_SUBST([GNULIB_HYPOT])
+ GNULIB_HYPOTF=0; AC_SUBST([GNULIB_HYPOTF])
+ GNULIB_HYPOTL=0; AC_SUBST([GNULIB_HYPOTL])
+ GNULIB_ILOGB=0; AC_SUBST([GNULIB_ILOGB])
+ GNULIB_ILOGBF=0; AC_SUBST([GNULIB_ILOGBF])
+ GNULIB_ILOGBL=0; AC_SUBST([GNULIB_ILOGBL])
+ GNULIB_ISFINITE=0; AC_SUBST([GNULIB_ISFINITE])
+ GNULIB_ISINF=0; AC_SUBST([GNULIB_ISINF])
+ GNULIB_ISNAN=0; AC_SUBST([GNULIB_ISNAN])
+ GNULIB_ISNANF=0; AC_SUBST([GNULIB_ISNANF])
+ GNULIB_ISNAND=0; AC_SUBST([GNULIB_ISNAND])
+ GNULIB_ISNANL=0; AC_SUBST([GNULIB_ISNANL])
+ GNULIB_LDEXPF=0; AC_SUBST([GNULIB_LDEXPF])
+ GNULIB_LDEXPL=0; AC_SUBST([GNULIB_LDEXPL])
+ GNULIB_LOG=0; AC_SUBST([GNULIB_LOG])
+ GNULIB_LOGF=0; AC_SUBST([GNULIB_LOGF])
+ GNULIB_LOGL=0; AC_SUBST([GNULIB_LOGL])
+ GNULIB_LOG10=0; AC_SUBST([GNULIB_LOG10])
+ GNULIB_LOG10F=0; AC_SUBST([GNULIB_LOG10F])
+ GNULIB_LOG10L=0; AC_SUBST([GNULIB_LOG10L])
+ GNULIB_LOG1P=0; AC_SUBST([GNULIB_LOG1P])
+ GNULIB_LOG1PF=0; AC_SUBST([GNULIB_LOG1PF])
+ GNULIB_LOG1PL=0; AC_SUBST([GNULIB_LOG1PL])
+ GNULIB_LOG2=0; AC_SUBST([GNULIB_LOG2])
+ GNULIB_LOG2F=0; AC_SUBST([GNULIB_LOG2F])
+ GNULIB_LOG2L=0; AC_SUBST([GNULIB_LOG2L])
+ GNULIB_LOGB=0; AC_SUBST([GNULIB_LOGB])
+ GNULIB_LOGBF=0; AC_SUBST([GNULIB_LOGBF])
+ GNULIB_LOGBL=0; AC_SUBST([GNULIB_LOGBL])
+ GNULIB_MODF=0; AC_SUBST([GNULIB_MODF])
+ GNULIB_MODFF=0; AC_SUBST([GNULIB_MODFF])
+ GNULIB_MODFL=0; AC_SUBST([GNULIB_MODFL])
+ GNULIB_POWF=0; AC_SUBST([GNULIB_POWF])
+ GNULIB_REMAINDER=0; AC_SUBST([GNULIB_REMAINDER])
+ GNULIB_REMAINDERF=0; AC_SUBST([GNULIB_REMAINDERF])
+ GNULIB_REMAINDERL=0; AC_SUBST([GNULIB_REMAINDERL])
+ GNULIB_RINT=0; AC_SUBST([GNULIB_RINT])
+ GNULIB_RINTF=0; AC_SUBST([GNULIB_RINTF])
+ GNULIB_RINTL=0; AC_SUBST([GNULIB_RINTL])
+ GNULIB_ROUND=0; AC_SUBST([GNULIB_ROUND])
+ GNULIB_ROUNDF=0; AC_SUBST([GNULIB_ROUNDF])
+ GNULIB_ROUNDL=0; AC_SUBST([GNULIB_ROUNDL])
+ GNULIB_SIGNBIT=0; AC_SUBST([GNULIB_SIGNBIT])
+ GNULIB_SINF=0; AC_SUBST([GNULIB_SINF])
+ GNULIB_SINL=0; AC_SUBST([GNULIB_SINL])
+ GNULIB_SINHF=0; AC_SUBST([GNULIB_SINHF])
+ GNULIB_SQRTF=0; AC_SUBST([GNULIB_SQRTF])
+ GNULIB_SQRTL=0; AC_SUBST([GNULIB_SQRTL])
+ GNULIB_TANF=0; AC_SUBST([GNULIB_TANF])
+ GNULIB_TANL=0; AC_SUBST([GNULIB_TANL])
+ GNULIB_TANHF=0; AC_SUBST([GNULIB_TANHF])
+ GNULIB_TRUNC=0; AC_SUBST([GNULIB_TRUNC])
+ GNULIB_TRUNCF=0; AC_SUBST([GNULIB_TRUNCF])
+ GNULIB_TRUNCL=0; AC_SUBST([GNULIB_TRUNCL])
dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_ACOSF=1; AC_SUBST([HAVE_ACOSF])
HAVE_ACOSL=1; AC_SUBST([HAVE_ACOSL])
+ HAVE_ASINF=1; AC_SUBST([HAVE_ASINF])
HAVE_ASINL=1; AC_SUBST([HAVE_ASINL])
+ HAVE_ATANF=1; AC_SUBST([HAVE_ATANF])
HAVE_ATANL=1; AC_SUBST([HAVE_ATANL])
+ HAVE_ATAN2F=1; AC_SUBST([HAVE_ATAN2F])
+ HAVE_CBRT=1; AC_SUBST([HAVE_CBRT])
+ HAVE_CBRTF=1; AC_SUBST([HAVE_CBRTF])
+ HAVE_CBRTL=1; AC_SUBST([HAVE_CBRTL])
+ HAVE_COPYSIGN=1; AC_SUBST([HAVE_COPYSIGN])
+ HAVE_COPYSIGNL=1; AC_SUBST([HAVE_COPYSIGNL])
+ HAVE_COSF=1; AC_SUBST([HAVE_COSF])
HAVE_COSL=1; AC_SUBST([HAVE_COSL])
+ HAVE_COSHF=1; AC_SUBST([HAVE_COSHF])
+ HAVE_EXPF=1; AC_SUBST([HAVE_EXPF])
HAVE_EXPL=1; AC_SUBST([HAVE_EXPL])
+ HAVE_EXPM1=1; AC_SUBST([HAVE_EXPM1])
+ HAVE_EXPM1F=1; AC_SUBST([HAVE_EXPM1F])
+ HAVE_FABSF=1; AC_SUBST([HAVE_FABSF])
+ HAVE_FABSL=1; AC_SUBST([HAVE_FABSL])
+ HAVE_FMA=1; AC_SUBST([HAVE_FMA])
+ HAVE_FMAF=1; AC_SUBST([HAVE_FMAF])
+ HAVE_FMAL=1; AC_SUBST([HAVE_FMAL])
+ HAVE_FMODF=1; AC_SUBST([HAVE_FMODF])
+ HAVE_FMODL=1; AC_SUBST([HAVE_FMODL])
+ HAVE_FREXPF=1; AC_SUBST([HAVE_FREXPF])
+ HAVE_HYPOTF=1; AC_SUBST([HAVE_HYPOTF])
+ HAVE_HYPOTL=1; AC_SUBST([HAVE_HYPOTL])
+ HAVE_ILOGB=1; AC_SUBST([HAVE_ILOGB])
+ HAVE_ILOGBF=1; AC_SUBST([HAVE_ILOGBF])
+ HAVE_ILOGBL=1; AC_SUBST([HAVE_ILOGBL])
HAVE_ISNANF=1; AC_SUBST([HAVE_ISNANF])
HAVE_ISNAND=1; AC_SUBST([HAVE_ISNAND])
HAVE_ISNANL=1; AC_SUBST([HAVE_ISNANL])
+ HAVE_LDEXPF=1; AC_SUBST([HAVE_LDEXPF])
+ HAVE_LOGF=1; AC_SUBST([HAVE_LOGF])
HAVE_LOGL=1; AC_SUBST([HAVE_LOGL])
+ HAVE_LOG10F=1; AC_SUBST([HAVE_LOG10F])
+ HAVE_LOG10L=1; AC_SUBST([HAVE_LOG10L])
+ HAVE_LOG1P=1; AC_SUBST([HAVE_LOG1P])
+ HAVE_LOG1PF=1; AC_SUBST([HAVE_LOG1PF])
+ HAVE_LOG1PL=1; AC_SUBST([HAVE_LOG1PL])
+ HAVE_LOGBF=1; AC_SUBST([HAVE_LOGBF])
+ HAVE_LOGBL=1; AC_SUBST([HAVE_LOGBL])
+ HAVE_MODFF=1; AC_SUBST([HAVE_MODFF])
+ HAVE_MODFL=1; AC_SUBST([HAVE_MODFL])
+ HAVE_POWF=1; AC_SUBST([HAVE_POWF])
+ HAVE_REMAINDER=1; AC_SUBST([HAVE_REMAINDER])
+ HAVE_REMAINDERF=1; AC_SUBST([HAVE_REMAINDERF])
+ HAVE_RINT=1; AC_SUBST([HAVE_RINT])
+ HAVE_RINTL=1; AC_SUBST([HAVE_RINTL])
+ HAVE_SINF=1; AC_SUBST([HAVE_SINF])
HAVE_SINL=1; AC_SUBST([HAVE_SINL])
+ HAVE_SINHF=1; AC_SUBST([HAVE_SINHF])
+ HAVE_SQRTF=1; AC_SUBST([HAVE_SQRTF])
HAVE_SQRTL=1; AC_SUBST([HAVE_SQRTL])
+ HAVE_TANF=1; AC_SUBST([HAVE_TANF])
HAVE_TANL=1; AC_SUBST([HAVE_TANL])
+ HAVE_TANHF=1; AC_SUBST([HAVE_TANHF])
HAVE_DECL_ACOSL=1; AC_SUBST([HAVE_DECL_ACOSL])
HAVE_DECL_ASINL=1; AC_SUBST([HAVE_DECL_ASINL])
HAVE_DECL_ATANL=1; AC_SUBST([HAVE_DECL_ATANL])
+ HAVE_DECL_CBRTF=1; AC_SUBST([HAVE_DECL_CBRTF])
+ HAVE_DECL_CBRTL=1; AC_SUBST([HAVE_DECL_CBRTL])
HAVE_DECL_CEILF=1; AC_SUBST([HAVE_DECL_CEILF])
HAVE_DECL_CEILL=1; AC_SUBST([HAVE_DECL_CEILL])
+ HAVE_DECL_COPYSIGNF=1; AC_SUBST([HAVE_DECL_COPYSIGNF])
HAVE_DECL_COSL=1; AC_SUBST([HAVE_DECL_COSL])
HAVE_DECL_EXPL=1; AC_SUBST([HAVE_DECL_EXPL])
+ HAVE_DECL_EXP2=1; AC_SUBST([HAVE_DECL_EXP2])
+ HAVE_DECL_EXP2F=1; AC_SUBST([HAVE_DECL_EXP2F])
+ HAVE_DECL_EXP2L=1; AC_SUBST([HAVE_DECL_EXP2L])
+ HAVE_DECL_EXPM1L=1; AC_SUBST([HAVE_DECL_EXPM1L])
HAVE_DECL_FLOORF=1; AC_SUBST([HAVE_DECL_FLOORF])
HAVE_DECL_FLOORL=1; AC_SUBST([HAVE_DECL_FLOORL])
HAVE_DECL_FREXPL=1; AC_SUBST([HAVE_DECL_FREXPL])
HAVE_DECL_LDEXPL=1; AC_SUBST([HAVE_DECL_LDEXPL])
- HAVE_DECL_LOGB=1; AC_SUBST([HAVE_DECL_LOGB])
HAVE_DECL_LOGL=1; AC_SUBST([HAVE_DECL_LOGL])
+ HAVE_DECL_LOG10L=1; AC_SUBST([HAVE_DECL_LOG10L])
+ HAVE_DECL_LOG2=1; AC_SUBST([HAVE_DECL_LOG2])
+ HAVE_DECL_LOG2F=1; AC_SUBST([HAVE_DECL_LOG2F])
+ HAVE_DECL_LOG2L=1; AC_SUBST([HAVE_DECL_LOG2L])
+ HAVE_DECL_LOGB=1; AC_SUBST([HAVE_DECL_LOGB])
+ HAVE_DECL_REMAINDER=1; AC_SUBST([HAVE_DECL_REMAINDER])
+ HAVE_DECL_REMAINDERL=1; AC_SUBST([HAVE_DECL_REMAINDERL])
+ HAVE_DECL_RINTF=1; AC_SUBST([HAVE_DECL_RINTF])
HAVE_DECL_ROUND=1; AC_SUBST([HAVE_DECL_ROUND])
HAVE_DECL_ROUNDF=1; AC_SUBST([HAVE_DECL_ROUNDF])
HAVE_DECL_ROUNDL=1; AC_SUBST([HAVE_DECL_ROUNDL])
@@ -121,26 +256,98 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
HAVE_DECL_TRUNC=1; AC_SUBST([HAVE_DECL_TRUNC])
HAVE_DECL_TRUNCF=1; AC_SUBST([HAVE_DECL_TRUNCF])
HAVE_DECL_TRUNCL=1; AC_SUBST([HAVE_DECL_TRUNCL])
+ REPLACE_CBRTF=0; AC_SUBST([REPLACE_CBRTF])
+ REPLACE_CBRTL=0; AC_SUBST([REPLACE_CBRTL])
REPLACE_CEIL=0; AC_SUBST([REPLACE_CEIL])
REPLACE_CEILF=0; AC_SUBST([REPLACE_CEILF])
REPLACE_CEILL=0; AC_SUBST([REPLACE_CEILL])
+ REPLACE_EXPM1=0; AC_SUBST([REPLACE_EXPM1])
+ REPLACE_EXPM1F=0; AC_SUBST([REPLACE_EXPM1F])
+ REPLACE_EXP2=0; AC_SUBST([REPLACE_EXP2])
+ REPLACE_EXP2L=0; AC_SUBST([REPLACE_EXP2L])
+ REPLACE_FABSL=0; AC_SUBST([REPLACE_FABSL])
REPLACE_FLOOR=0; AC_SUBST([REPLACE_FLOOR])
REPLACE_FLOORF=0; AC_SUBST([REPLACE_FLOORF])
REPLACE_FLOORL=0; AC_SUBST([REPLACE_FLOORL])
+ REPLACE_FMA=0; AC_SUBST([REPLACE_FMA])
+ REPLACE_FMAF=0; AC_SUBST([REPLACE_FMAF])
+ REPLACE_FMAL=0; AC_SUBST([REPLACE_FMAL])
+ REPLACE_FMOD=0; AC_SUBST([REPLACE_FMOD])
+ REPLACE_FMODF=0; AC_SUBST([REPLACE_FMODF])
+ REPLACE_FMODL=0; AC_SUBST([REPLACE_FMODL])
+ REPLACE_FREXPF=0; AC_SUBST([REPLACE_FREXPF])
REPLACE_FREXP=0; AC_SUBST([REPLACE_FREXP])
REPLACE_FREXPL=0; AC_SUBST([REPLACE_FREXPL])
REPLACE_HUGE_VAL=0; AC_SUBST([REPLACE_HUGE_VAL])
+ REPLACE_HYPOT=0; AC_SUBST([REPLACE_HYPOT])
+ REPLACE_HYPOTF=0; AC_SUBST([REPLACE_HYPOTF])
+ REPLACE_HYPOTL=0; AC_SUBST([REPLACE_HYPOTL])
+ REPLACE_ILOGB=0; AC_SUBST([REPLACE_ILOGB])
+ REPLACE_ILOGBF=0; AC_SUBST([REPLACE_ILOGBF])
REPLACE_ISFINITE=0; AC_SUBST([REPLACE_ISFINITE])
REPLACE_ISINF=0; AC_SUBST([REPLACE_ISINF])
REPLACE_ISNAN=0; AC_SUBST([REPLACE_ISNAN])
REPLACE_LDEXPL=0; AC_SUBST([REPLACE_LDEXPL])
+ REPLACE_LOG=0; AC_SUBST([REPLACE_LOG])
+ REPLACE_LOGF=0; AC_SUBST([REPLACE_LOGF])
+ REPLACE_LOGL=0; AC_SUBST([REPLACE_LOGL])
+ REPLACE_LOG10=0; AC_SUBST([REPLACE_LOG10])
+ REPLACE_LOG10F=0; AC_SUBST([REPLACE_LOG10F])
+ REPLACE_LOG10L=0; AC_SUBST([REPLACE_LOG10L])
+ REPLACE_LOG1P=0; AC_SUBST([REPLACE_LOG1P])
+ REPLACE_LOG1PF=0; AC_SUBST([REPLACE_LOG1PF])
+ REPLACE_LOG1PL=0; AC_SUBST([REPLACE_LOG1PL])
+ REPLACE_LOG2=0; AC_SUBST([REPLACE_LOG2])
+ REPLACE_LOG2F=0; AC_SUBST([REPLACE_LOG2F])
+ REPLACE_LOG2L=0; AC_SUBST([REPLACE_LOG2L])
+ REPLACE_LOGB=0; AC_SUBST([REPLACE_LOGB])
+ REPLACE_LOGBF=0; AC_SUBST([REPLACE_LOGBF])
+ REPLACE_LOGBL=0; AC_SUBST([REPLACE_LOGBL])
+ REPLACE_MODF=0; AC_SUBST([REPLACE_MODF])
+ REPLACE_MODFF=0; AC_SUBST([REPLACE_MODFF])
+ REPLACE_MODFL=0; AC_SUBST([REPLACE_MODFL])
REPLACE_NAN=0; AC_SUBST([REPLACE_NAN])
+ REPLACE_REMAINDER=0; AC_SUBST([REPLACE_REMAINDER])
+ REPLACE_REMAINDERF=0; AC_SUBST([REPLACE_REMAINDERF])
+ REPLACE_REMAINDERL=0; AC_SUBST([REPLACE_REMAINDERL])
REPLACE_ROUND=0; AC_SUBST([REPLACE_ROUND])
REPLACE_ROUNDF=0; AC_SUBST([REPLACE_ROUNDF])
REPLACE_ROUNDL=0; AC_SUBST([REPLACE_ROUNDL])
REPLACE_SIGNBIT=0; AC_SUBST([REPLACE_SIGNBIT])
REPLACE_SIGNBIT_USING_GCC=0; AC_SUBST([REPLACE_SIGNBIT_USING_GCC])
+ REPLACE_SQRTL=0; AC_SUBST([REPLACE_SQRTL])
REPLACE_TRUNC=0; AC_SUBST([REPLACE_TRUNC])
REPLACE_TRUNCF=0; AC_SUBST([REPLACE_TRUNCF])
REPLACE_TRUNCL=0; AC_SUBST([REPLACE_TRUNCL])
])
+
+# gl_LONG_DOUBLE_VS_DOUBLE
+# determines whether 'long double' and 'double' have the same representation.
+# Sets variable HAVE_SAME_LONG_DOUBLE_AS_DOUBLE to 0 or 1, and defines
+# HAVE_SAME_LONG_DOUBLE_AS_DOUBLE accordingly.
+# The currently known platforms where this is the case are:
+# Linux/HPPA, Minix 3.1.8, AIX 5, AIX 6 and 7 with xlc, MSVC 9.
+AC_DEFUN([gl_LONG_DOUBLE_VS_DOUBLE],
+[
+ AC_CACHE_CHECK([whether long double and double are the same],
+ [gl_cv_long_double_equals_double],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <float.h>]],
+ [[typedef int check[sizeof (long double) == sizeof (double)
+ && LDBL_MANT_DIG == DBL_MANT_DIG
+ && LDBL_MAX_EXP == DBL_MAX_EXP
+ && LDBL_MIN_EXP == DBL_MIN_EXP
+ ? 1 : -1];
+ ]])],
+ [gl_cv_long_double_equals_double=yes],
+ [gl_cv_long_double_equals_double=no])
+ ])
+ if test $gl_cv_long_double_equals_double = yes; then
+ AC_DEFINE([HAVE_SAME_LONG_DOUBLE_AS_DOUBLE], [1],
+ [Define to 1 if 'long double' and 'double' have the same representation.])
+ HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
+ else
+ HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
+ fi
+ AC_SUBST([HAVE_SAME_LONG_DOUBLE_AS_DOUBLE])
+])
diff --git a/m4/mbrtowc.m4 b/m4/mbrtowc.m4
index c353862..4c9f388 100644
--- a/m4/mbrtowc.m4
+++ b/m4/mbrtowc.m4
@@ -1,5 +1,5 @@
-# mbrtowc.m4 serial 22
-dnl Copyright (C) 2001-2002, 2004-2005, 2008-2011 Free Software Foundation,
+# mbrtowc.m4 serial 25
+dnl Copyright (C) 2001-2002, 2004-2005, 2008-2013 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -15,6 +15,22 @@ AC_DEFUN([gl_FUNC_MBRTOWC],
AC_CHECK_FUNCS_ONCE([mbrtowc])
if test $ac_cv_func_mbrtowc = no; then
HAVE_MBRTOWC=0
+ AC_CHECK_DECLS([mbrtowc],,, [[
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+]])
+ if test $ac_cv_have_decl_mbrtowc = yes; then
+ dnl On Minix 3.1.8, the system's <wchar.h> declares mbrtowc() although
+ dnl it does not have the function. Avoid a collision with gnulib's
+ dnl replacement.
+ REPLACE_MBRTOWC=1
+ fi
else
if test $REPLACE_MBSTATE_T = 1; then
REPLACE_MBRTOWC=1
@@ -53,11 +69,6 @@ AC_DEFUN([gl_FUNC_MBRTOWC],
esac
fi
fi
- if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
- gl_REPLACE_WCHAR_H
- AC_LIBOBJ([mbrtowc])
- gl_PREREQ_MBRTOWC
- fi
])
dnl Test whether mbsinit() and mbrtowc() need to be overridden in a way that
@@ -88,9 +99,6 @@ AC_DEFUN([gl_MBSTATE_T_BROKEN],
else
REPLACE_MBSTATE_T=1
fi
- if test $REPLACE_MBSTATE_T = 1; then
- gl_REPLACE_WCHAR_H
- fi
])
dnl Test whether mbrtowc puts the state into non-initial state when parsing an
diff --git a/m4/mbsinit.m4 b/m4/mbsinit.m4
index 47e2d14..2e6d092 100644
--- a/m4/mbsinit.m4
+++ b/m4/mbsinit.m4
@@ -1,5 +1,5 @@
-# mbsinit.m4 serial 5
-dnl Copyright (C) 2008, 2010-2011 Free Software Foundation, Inc.
+# mbsinit.m4 serial 8
+dnl Copyright (C) 2008, 2010-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,22 @@ AC_DEFUN([gl_FUNC_MBSINIT],
AC_CHECK_FUNCS_ONCE([mbsinit])
if test $ac_cv_func_mbsinit = no; then
HAVE_MBSINIT=0
+ AC_CHECK_DECLS([mbsinit],,, [[
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+]])
+ if test $ac_cv_have_decl_mbsinit = yes; then
+ dnl On Minix 3.1.8, the system's <wchar.h> declares mbsinit() although
+ dnl it does not have the function. Avoid a collision with gnulib's
+ dnl replacement.
+ REPLACE_MBSINIT=1
+ fi
else
if test $REPLACE_MBSTATE_T = 1; then
REPLACE_MBSINIT=1
@@ -27,11 +43,6 @@ AC_DEFUN([gl_FUNC_MBSINIT],
esac
fi
fi
- if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
- gl_REPLACE_WCHAR_H
- AC_LIBOBJ([mbsinit])
- gl_PREREQ_MBSINIT
- fi
])
# Prerequisites of lib/mbsinit.c.
diff --git a/m4/mbstate_t.m4 b/m4/mbstate_t.m4
index f7c46b8..ed00117 100644
--- a/m4/mbstate_t.m4
+++ b/m4/mbstate_t.m4
@@ -1,5 +1,5 @@
# mbstate_t.m4 serial 13
-dnl Copyright (C) 2000-2002, 2008-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/mbtowc.m4 b/m4/mbtowc.m4
index 9215892..e479461 100644
--- a/m4/mbtowc.m4
+++ b/m4/mbtowc.m4
@@ -1,5 +1,5 @@
-# mbtowc.m4 serial 1
-dnl Copyright (C) 2011 Free Software Foundation, Inc.
+# mbtowc.m4 serial 2
+dnl Copyright (C) 2011-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -11,10 +11,6 @@ AC_DEFUN([gl_FUNC_MBTOWC],
if false; then
REPLACE_MBTOWC=1
fi
- if test $REPLACE_MBTOWC = 1; then
- AC_LIBOBJ([mbtowc])
- gl_PREREQ_MBTOWC
- fi
])
# Prerequisites of lib/mbtowc.c.
diff --git a/m4/memchr.m4 b/m4/memchr.m4
index 3c2b313..2d8abe7 100644
--- a/m4/memchr.m4
+++ b/m4/memchr.m4
@@ -1,5 +1,5 @@
-# memchr.m4 serial 10
-dnl Copyright (C) 2002-2004, 2009-2011 Free Software Foundation, Inc.
+# memchr.m4 serial 12
+dnl Copyright (C) 2002-2004, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -11,10 +11,16 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
AC_CHECK_HEADERS_ONCE([sys/mman.h])
AC_CHECK_FUNCS_ONCE([mprotect])
- dnl These days, we assume memchr is present. But just in case...
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
- AC_CHECK_FUNCS_ONCE([memchr])
- if test $ac_cv_func_memchr = yes; then
+ m4_ifdef([gl_FUNC_MEMCHR_OBSOLETE], [
+ dnl These days, we assume memchr is present. But if support for old
+ dnl platforms is desired:
+ AC_CHECK_FUNCS_ONCE([memchr])
+ if test $ac_cv_func_memchr = no; then
+ HAVE_MEMCHR=0
+ fi
+ ])
+ if test $HAVE_MEMCHR = 1; then
# Detect platform-specific bugs in some versions of glibc:
# memchr should not dereference anything with length 0
# http://bugzilla.redhat.com/499689
@@ -73,12 +79,6 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
if test "$gl_cv_func_memchr_works" != yes; then
REPLACE_MEMCHR=1
fi
- else
- HAVE_MEMCHR=0
- fi
- if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
- AC_LIBOBJ([memchr])
- gl_PREREQ_MEMCHR
fi
])
diff --git a/m4/mkdtemp.m4 b/m4/mkdtemp.m4
index 0ef7dfb..b7c0a61 100644
--- a/m4/mkdtemp.m4
+++ b/m4/mkdtemp.m4
@@ -1,17 +1,16 @@
-# mkdtemp.m4 serial 6
-dnl Copyright (C) 2001-2003, 2006-2007, 2009-2011 Free Software Foundation,
+# mkdtemp.m4 serial 8
+dnl Copyright (C) 2001-2003, 2006-2007, 2009-2013 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-AC_DEFUN([gt_FUNC_MKDTEMP],
+AC_DEFUN([gl_FUNC_MKDTEMP],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
- AC_REPLACE_FUNCS([mkdtemp])
+ AC_CHECK_FUNCS([mkdtemp])
if test $ac_cv_func_mkdtemp = no; then
HAVE_MKDTEMP=0
- gl_PREREQ_MKDTEMP
fi
])
diff --git a/m4/mkstemp.m4 b/m4/mkstemp.m4
index c5cd282..ac6c7cd 100644
--- a/m4/mkstemp.m4
+++ b/m4/mkstemp.m4
@@ -1,6 +1,6 @@
-#serial 19
+#serial 23
-# Copyright (C) 2001, 2003-2007, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003-2007, 2009-2013 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -10,11 +10,13 @@
# 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_SYS_LARGEFILE])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_FUNCS_ONCE([mkstemp])
if test $ac_cv_func_mkstemp = yes; then
@@ -30,6 +32,7 @@ AC_DEFUN([gl_FUNC_MKSTEMP],
off_t large = (off_t) 4294967295u;
if (large < 0)
large = 2147483647;
+ umask (0);
for (i = 0; i < 70; i++)
{
char templ[] = "conftest.mkstemp/coXXXXXX";
@@ -39,26 +42,37 @@ AC_DEFUN([gl_FUNC_MKSTEMP],
result |= 1;
else
{
+ struct stat st;
if (lseek (fd, large, SEEK_SET) != large)
result |= 2;
- close (fd);
+ 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],
- [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
])
- if test $gl_cv_func_working_mkstemp != yes; then
- REPLACE_MKSTEMP=1
- AC_LIBOBJ([mkstemp])
- gl_PREREQ_MKSTEMP
- fi
+ case "$gl_cv_func_working_mkstemp" in
+ *yes) ;;
+ *)
+ REPLACE_MKSTEMP=1
+ ;;
+ esac
else
HAVE_MKSTEMP=0
- AC_LIBOBJ([mkstemp])
- gl_PREREQ_MKSTEMP
fi
])
diff --git a/m4/mmap-anon.m4 b/m4/mmap-anon.m4
index 7ba7fd2..9b60ddf 100644
--- a/m4/mmap-anon.m4
+++ b/m4/mmap-anon.m4
@@ -1,5 +1,5 @@
-# mmap-anon.m4 serial 9
-dnl Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc.
+# mmap-anon.m4 serial 10
+dnl Copyright (C) 2005, 2007, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -9,7 +9,7 @@ dnl with or without modifications, as long as this notice is preserved.
# - On Linux, AIX, OSF/1, Solaris, Cygwin, Interix, Haiku, both MAP_ANONYMOUS
# and MAP_ANON exist and have the same value.
# - On HP-UX, only MAP_ANONYMOUS exists.
-# - On MacOS X, FreeBSD, NetBSD, OpenBSD, only MAP_ANON exists.
+# - On Mac OS X, FreeBSD, NetBSD, OpenBSD, only MAP_ANON exists.
# - On IRIX, neither exists, and a file descriptor opened to /dev/zero must be
# used.
@@ -27,18 +27,18 @@ AC_DEFUN([gl_FUNC_MMAP_ANON],
gl_have_mmap_anonymous=no
if test $gl_have_mmap = yes; then
AC_MSG_CHECKING([for MAP_ANONYMOUS])
- AC_EGREP_CPP([I cant identify this map.], [
+ AC_EGREP_CPP([I cannot identify this map], [
#include <sys/mman.h>
#ifdef MAP_ANONYMOUS
- I cant identify this map.
+ I cannot identify this map
#endif
],
[gl_have_mmap_anonymous=yes])
if test $gl_have_mmap_anonymous != yes; then
- AC_EGREP_CPP([I cant identify this map.], [
+ AC_EGREP_CPP([I cannot identify this map], [
#include <sys/mman.h>
#ifdef MAP_ANON
- I cant identify this map.
+ I cannot identify this map
#endif
],
[AC_DEFINE([MAP_ANONYMOUS], [MAP_ANON],
diff --git a/m4/mode_t.m4 b/m4/mode_t.m4
index f9cf704..d5b66d4 100644
--- a/m4/mode_t.m4
+++ b/m4/mode_t.m4
@@ -1,5 +1,5 @@
# mode_t.m4 serial 2
-dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/msvc-inval.m4 b/m4/msvc-inval.m4
new file mode 100644
index 0000000..9a6a47a
--- /dev/null
+++ b/m4/msvc-inval.m4
@@ -0,0 +1,19 @@
+# msvc-inval.m4 serial 1
+dnl Copyright (C) 2011-2013 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+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/m4/cloexec.m4 b/m4/msvc-nothrow.m4
index c936f43..a39618a 100644
--- a/m4/cloexec.m4
+++ b/m4/msvc-nothrow.m4
@@ -1,10 +1,10 @@
-#serial 6
-dnl Copyright (C) 2004-2006, 2009-2011 Free Software Foundation, Inc.
+# msvc-nothrow.m4 serial 1
+dnl Copyright (C) 2011-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-AC_DEFUN([gl_CLOEXEC],
+AC_DEFUN([gl_MSVC_NOTHROW],
[
- AC_LIBOBJ([cloexec])
+ AC_REQUIRE([gl_MSVC_INVAL])
])
diff --git a/m4/multiarch.m4 b/m4/multiarch.m4
index 691d892..552ec7e 100644
--- a/m4/multiarch.m4
+++ b/m4/multiarch.m4
@@ -1,12 +1,12 @@
-# multiarch.m4 serial 6
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# multiarch.m4 serial 7
+dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Determine whether the compiler is or may be producing universal binaries.
#
-# On MacOS X 10.5 and later systems, the user can create libraries and
+# On Mac OS X 10.5 and later systems, the user can create libraries and
# executables that work on multiple system types--known as "fat" or
# "universal" binaries--by specifying multiple '-arch' options to the
# compiler but only a single '-arch' option to the preprocessor. Like
diff --git a/m4/nl_langinfo.m4 b/m4/nl_langinfo.m4
index ca9d28d..25e2101 100644
--- a/m4/nl_langinfo.m4
+++ b/m4/nl_langinfo.m4
@@ -1,5 +1,5 @@
-# nl_langinfo.m4 serial 4
-dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# nl_langinfo.m4 serial 5
+dnl Copyright (C) 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -43,10 +43,8 @@ AC_DEFUN([gl_FUNC_NL_LANGINFO],
REPLACE_NL_LANGINFO=1
AC_DEFINE([REPLACE_NL_LANGINFO], [1],
[Define if nl_langinfo exists but is overridden by gnulib.])
- AC_LIBOBJ([nl_langinfo])
fi
else
HAVE_NL_LANGINFO=0
- AC_LIBOBJ([nl_langinfo])
fi
])
diff --git a/m4/nocrash.m4 b/m4/nocrash.m4
index 0cc0d53..105b884 100644
--- a/m4/nocrash.m4
+++ b/m4/nocrash.m4
@@ -1,5 +1,5 @@
-# nocrash.m4 serial 2
-dnl Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc.
+# nocrash.m4 serial 4
+dnl Copyright (C) 2005, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -18,7 +18,7 @@ dnl int main() { nocrash_init(); ... }
AC_DEFUN([GL_NOCRASH],[[
#include <stdlib.h>
#if defined __MACH__ && defined __APPLE__
-/* Avoid a crash on MacOS X. */
+/* Avoid a crash on Mac OS X. */
#include <mach/mach.h>
#include <mach/mach_error.h>
#include <mach/thread_status.h>
@@ -79,6 +79,34 @@ nocrash_init (void)
}
}
}
+#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Avoid a crash on native Windows. */
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <winerror.h>
+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 <signal.h>
diff --git a/m4/off_t.m4 b/m4/off_t.m4
new file mode 100644
index 0000000..d355d01
--- /dev/null
+++ b/m4/off_t.m4
@@ -0,0 +1,18 @@
+# off_t.m4 serial 1
+dnl Copyright (C) 2012-2013 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+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/m4/open.m4 b/m4/open.m4
index bfebdab..a6cb101 100644
--- a/m4/open.m4
+++ b/m4/open.m4
@@ -1,5 +1,5 @@
-# open.m4 serial 11
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+# open.m4 serial 14
+dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -9,7 +9,7 @@ AC_DEFUN([gl_FUNC_OPEN],
AC_REQUIRE([AC_CANONICAL_HOST])
case "$host_os" in
mingw* | pw*)
- gl_REPLACE_OPEN
+ REPLACE_OPEN=1
;;
*)
dnl open("foo/") should not create a file when the file name has a
@@ -57,25 +57,35 @@ changequote([,])dnl
*no)
AC_DEFINE([OPEN_TRAILING_SLASH_BUG], [1],
[Define to 1 if open() fails to recognize a trailing slash.])
- gl_REPLACE_OPEN
+ REPLACE_OPEN=1
;;
esac
;;
esac
-])
-
-AC_DEFUN([gl_REPLACE_OPEN],
-[
- AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
- REPLACE_OPEN=1
- AC_LIBOBJ([open])
- gl_PREREQ_OPEN
+ dnl Replace open() for supporting the gnulib-defined fchdir() function,
+ dnl to keep fchdir's bookkeeping up-to-date.
+ m4_ifdef([gl_FUNC_FCHDIR], [
+ if test $REPLACE_OPEN = 0; then
+ gl_TEST_FCHDIR
+ if test $HAVE_FCHDIR = 0; then
+ REPLACE_OPEN=1
+ fi
+ fi
+ ])
+ dnl Replace open() for supporting the gnulib-defined O_NONBLOCK flag.
+ m4_ifdef([gl_NONBLOCKING_IO], [
+ if test $REPLACE_OPEN = 0; then
+ gl_NONBLOCKING_IO
+ if test $gl_cv_have_open_O_NONBLOCK != yes; then
+ REPLACE_OPEN=1
+ fi
+ fi
+ ])
])
# Prerequisites of lib/open.c.
AC_DEFUN([gl_PREREQ_OPEN],
[
- AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T])
:
])
diff --git a/m4/opendir.m4 b/m4/opendir.m4
new file mode 100644
index 0000000..d411680
--- /dev/null
+++ b/m4/opendir.m4
@@ -0,0 +1,25 @@
+# opendir.m4 serial 2
+dnl Copyright (C) 2011-2013 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_OPENDIR],
+[
+ AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
+
+ AC_CHECK_FUNCS([opendir])
+ if test $ac_cv_func_opendir = no; then
+ HAVE_OPENDIR=0
+ fi
+ dnl Replace opendir() for supporting the gnulib-defined fchdir() function,
+ dnl to keep fchdir's bookkeeping up-to-date.
+ m4_ifdef([gl_FUNC_FCHDIR], [
+ gl_TEST_FCHDIR
+ if test $HAVE_FCHDIR = 0; then
+ if test $HAVE_OPENDIR = 1; then
+ REPLACE_OPENDIR=1
+ fi
+ fi
+ ])
+])
diff --git a/m4/pathmax.m4 b/m4/pathmax.m4
index 17b3d64..e11bf57 100644
--- a/m4/pathmax.m4
+++ b/m4/pathmax.m4
@@ -1,5 +1,5 @@
-# pathmax.m4 serial 8
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation,
+# pathmax.m4 serial 10
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2013 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -8,6 +8,35 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_PATHMAX],
[
dnl Prerequisites of lib/pathmax.h.
- AC_CHECK_FUNCS_ONCE([pathconf])
AC_CHECK_HEADERS_ONCE([sys/param.h])
])
+
+# Expands to a piece of C program that defines PATH_MAX in the same way as
+# "pathmax.h" will do.
+AC_DEFUN([gl_PATHMAX_SNIPPET], [[
+/* Arrange to define PATH_MAX, like "pathmax.h" does. */
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#include <limits.h>
+#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
+# include <sys/param.h>
+#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/m4/pipe2.m4 b/m4/pipe2.m4
index 10f1e14..6ccee10 100644
--- a/m4/pipe2.m4
+++ b/m4/pipe2.m4
@@ -1,5 +1,5 @@
# pipe2.m4 serial 2
-dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/posix_spawn.m4 b/m4/posix_spawn.m4
index 63e9473..69eaf63 100644
--- a/m4/posix_spawn.m4
+++ b/m4/posix_spawn.m4
@@ -1,5 +1,5 @@
-# posix_spawn.m4 serial 8
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# posix_spawn.m4 serial 11
+dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -36,6 +36,9 @@ AC_DEFUN([gl_POSIX_SPAWN_BODY],
gl_POSIX_SPAWN_WORKS
case "$gl_cv_func_posix_spawn_works" in
*yes)
+ AC_DEFINE([HAVE_WORKING_POSIX_SPAWN], [1],
+ [Define if you have the posix_spawn and posix_spawnp functions and
+ they work.])
dnl Assume that these functions are available if POSIX_SPAWN_SETSCHEDULER
dnl evaluates to nonzero.
dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_getschedpolicy])
@@ -391,10 +394,134 @@ main (int argc, char *argv[])
])
])
-AC_DEFUN([gl_POSIX_SPAWN_INTERNAL],
+# Prerequisites of lib/spawni.c.
+AC_DEFUN([gl_PREREQ_POSIX_SPAWN_INTERNAL],
[
- AC_LIBOBJ([spawni])
- dnl Prerequisites of lib/spawni.c.
AC_CHECK_HEADERS([paths.h])
AC_CHECK_FUNCS([confstr sched_setparam sched_setscheduler setegid seteuid vfork])
])
+
+AC_DEFUN([gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE],
+[
+ AC_REQUIRE([gl_SPAWN_H_DEFAULTS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ gl_POSIX_SPAWN
+ if test $REPLACE_POSIX_SPAWN = 1; then
+ REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
+ else
+ dnl On Solaris 11 2011-11, posix_spawn_file_actions_addclose succeeds even
+ dnl if the fd argument is out of range.
+ AC_CACHE_CHECK([whether posix_spawn_file_actions_addclose works],
+ [gl_cv_func_posix_spawn_file_actions_addclose_works],
+ [AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <spawn.h>
+int main ()
+{
+ posix_spawn_file_actions_t actions;
+ if (posix_spawn_file_actions_init (&actions) != 0)
+ return 1;
+ if (posix_spawn_file_actions_addclose (&actions, 10000000) == 0)
+ return 2;
+ return 0;
+}]])],
+ [gl_cv_func_posix_spawn_file_actions_addclose_works=yes],
+ [gl_cv_func_posix_spawn_file_actions_addclose_works=no],
+ [# Guess no on Solaris, yes otherwise.
+ case "$host_os" in
+ solaris*) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no";;
+ *) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing yes";;
+ esac
+ ])
+ ])
+ case "$gl_cv_func_posix_spawn_file_actions_addclose_works" in
+ *yes) ;;
+ *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1 ;;
+ esac
+ fi
+])
+
+AC_DEFUN([gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2],
+[
+ AC_REQUIRE([gl_SPAWN_H_DEFAULTS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ gl_POSIX_SPAWN
+ if test $REPLACE_POSIX_SPAWN = 1; then
+ REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
+ else
+ dnl On Solaris 11 2011-11, posix_spawn_file_actions_adddup2 succeeds even
+ dnl if the fd argument is out of range.
+ AC_CACHE_CHECK([whether posix_spawn_file_actions_adddup2 works],
+ [gl_cv_func_posix_spawn_file_actions_adddup2_works],
+ [AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <spawn.h>
+int main ()
+{
+ posix_spawn_file_actions_t actions;
+ if (posix_spawn_file_actions_init (&actions) != 0)
+ return 1;
+ if (posix_spawn_file_actions_adddup2 (&actions, 10000000, 2) == 0)
+ return 2;
+ return 0;
+}]])],
+ [gl_cv_func_posix_spawn_file_actions_adddup2_works=yes],
+ [gl_cv_func_posix_spawn_file_actions_adddup2_works=no],
+ [# Guess no on Solaris, yes otherwise.
+ case "$host_os" in
+ solaris*) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no";;
+ *) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing yes";;
+ esac
+ ])
+ ])
+ case "$gl_cv_func_posix_spawn_file_actions_adddup2_works" in
+ *yes) ;;
+ *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1 ;;
+ esac
+ fi
+])
+
+AC_DEFUN([gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN],
+[
+ AC_REQUIRE([gl_SPAWN_H_DEFAULTS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ gl_POSIX_SPAWN
+ if test $REPLACE_POSIX_SPAWN = 1; then
+ REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
+ else
+ dnl On Solaris 11 2011-11, posix_spawn_file_actions_addopen succeeds even
+ dnl if the fd argument is out of range.
+ AC_CACHE_CHECK([whether posix_spawn_file_actions_addopen works],
+ [gl_cv_func_posix_spawn_file_actions_addopen_works],
+ [AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <spawn.h>
+#include <fcntl.h>
+int main ()
+{
+ posix_spawn_file_actions_t actions;
+ if (posix_spawn_file_actions_init (&actions) != 0)
+ return 1;
+ if (posix_spawn_file_actions_addopen (&actions, 10000000, "foo", 0, O_RDONLY)
+ == 0)
+ return 2;
+ return 0;
+}]])],
+ [gl_cv_func_posix_spawn_file_actions_addopen_works=yes],
+ [gl_cv_func_posix_spawn_file_actions_addopen_works=no],
+ [# Guess no on Solaris, yes otherwise.
+ case "$host_os" in
+ solaris*) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no";;
+ *) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing yes";;
+ esac
+ ])
+ ])
+ case "$gl_cv_func_posix_spawn_file_actions_addopen_works" in
+ *yes) ;;
+ *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1 ;;
+ esac
+ fi
+])
diff --git a/m4/printf-frexp.m4 b/m4/printf-frexp.m4
index 83ff9ce..8b373b1 100644
--- a/m4/printf-frexp.m4
+++ b/m4/printf-frexp.m4
@@ -1,5 +1,5 @@
# printf-frexp.m4 serial 5
-dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/printf-frexpl.m4 b/m4/printf-frexpl.m4
index 9c13d4e..f1ce4c8 100644
--- a/m4/printf-frexpl.m4
+++ b/m4/printf-frexpl.m4
@@ -1,5 +1,5 @@
-# printf-frexpl.m4 serial 7
-dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+# printf-frexpl.m4 serial 10
+dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -9,6 +9,8 @@ dnl Check how to define printf_frexpl() without linking with libm.
AC_DEFUN([gl_FUNC_PRINTF_FREXPL],
[
AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
+
dnl Subset of gl_FUNC_FREXPL_NO_LIBM.
gl_CHECK_FREXPL_NO_LIBM
if test $gl_cv_func_frexpl_no_libm = yes; then
@@ -26,8 +28,8 @@ AC_DEFUN([gl_FUNC_PRINTF_FREXPL],
AC_DEFINE([HAVE_FREXPL_IN_LIBC], [1],
[Define if the frexpl function is available in libc.])
dnl Also check whether it's declared.
- dnl MacOS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>.
- AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [#include <math.h>])
+ dnl Mac OS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>.
+ AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [[#include <math.h>]])
fi
gl_CHECK_LDEXPL_NO_LIBM
@@ -38,8 +40,8 @@ AC_DEFUN([gl_FUNC_PRINTF_FREXPL],
AC_DEFINE([HAVE_LDEXPL_IN_LIBC], [1],
[Define if the ldexpl function is available in libc.])
dnl Also check whether it's declared.
- dnl MacOS X 10.3 has ldexpl() in libc but doesn't declare it in <math.h>.
- AC_CHECK_DECL([ldexpl], , [HAVE_DECL_LDEXPL=0], [#include <math.h>])
+ dnl Mac OS X 10.3 has ldexpl() in libc but doesn't declare it in <math.h>.
+ AC_CHECK_DECL([ldexpl], , [HAVE_DECL_LDEXPL=0], [[#include <math.h>]])
;;
esac
fi
diff --git a/m4/printf.m4 b/m4/printf.m4
index 9c2ed1e..ef44f78 100644
--- a/m4/printf.m4
+++ b/m4/printf.m4
@@ -1,5 +1,5 @@
-# printf.m4 serial 42
-dnl Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc.
+# printf.m4 serial 50
+dnl Copyright (C) 2003, 2007-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -63,7 +63,7 @@ changequote(,)dnl
# Guess yes on FreeBSD >= 5.
freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
- # Guess yes on MacOS X >= 10.3.
+ # Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";;
darwin*) gl_cv_func_printf_sizes_c99="guessing yes";;
# Guess yes on OpenBSD >= 3.9.
@@ -178,28 +178,28 @@ static double zero = 0.0;
int main ()
{
int result = 0;
- if (sprintf (buf, "%f", 1.0 / 0.0) < 0
+ if (sprintf (buf, "%f", 1.0 / zero) < 0
|| (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
result |= 1;
- if (sprintf (buf, "%f", -1.0 / 0.0) < 0
+ if (sprintf (buf, "%f", -1.0 / zero) < 0
|| (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
result |= 1;
if (sprintf (buf, "%f", zero / zero) < 0
|| !strisnan (buf, 0, strlen (buf)))
result |= 2;
- if (sprintf (buf, "%e", 1.0 / 0.0) < 0
+ if (sprintf (buf, "%e", 1.0 / zero) < 0
|| (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
result |= 4;
- if (sprintf (buf, "%e", -1.0 / 0.0) < 0
+ if (sprintf (buf, "%e", -1.0 / zero) < 0
|| (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
result |= 4;
if (sprintf (buf, "%e", zero / zero) < 0
|| !strisnan (buf, 0, strlen (buf)))
result |= 8;
- if (sprintf (buf, "%g", 1.0 / 0.0) < 0
+ if (sprintf (buf, "%g", 1.0 / zero) < 0
|| (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
result |= 16;
- if (sprintf (buf, "%g", -1.0 / 0.0) < 0
+ if (sprintf (buf, "%g", -1.0 / zero) < 0
|| (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
result |= 16;
if (sprintf (buf, "%g", zero / zero) < 0
@@ -222,7 +222,7 @@ changequote(,)dnl
# Guess yes on FreeBSD >= 6.
freebsd[1-5]*) gl_cv_func_printf_infinite="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
- # Guess yes on MacOS X >= 10.3.
+ # Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";;
darwin*) gl_cv_func_printf_infinite="guessing yes";;
# Guess yes on HP-UX >= 11.
@@ -251,6 +251,7 @@ AC_DEFUN([gl_PRINTF_INFINITE_LONG_DOUBLE],
AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([gl_BIGENDIAN])
+ AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
dnl The user can set or unset the variable gl_printf_safe to indicate
dnl that he wishes a safe handling of non-IEEE-754 'long double' values.
@@ -294,34 +295,34 @@ int main ()
{
int result = 0;
nocrash_init();
- if (sprintf (buf, "%Lf", 1.0L / 0.0L) < 0
+ if (sprintf (buf, "%Lf", 1.0L / zeroL) < 0
|| (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
result |= 1;
- if (sprintf (buf, "%Lf", -1.0L / 0.0L) < 0
+ if (sprintf (buf, "%Lf", -1.0L / zeroL) < 0
|| (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
result |= 1;
if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
|| !strisnan (buf, 0, strlen (buf)))
result |= 1;
- if (sprintf (buf, "%Le", 1.0L / 0.0L) < 0
+ if (sprintf (buf, "%Le", 1.0L / zeroL) < 0
|| (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
result |= 1;
- if (sprintf (buf, "%Le", -1.0L / 0.0L) < 0
+ if (sprintf (buf, "%Le", -1.0L / zeroL) < 0
|| (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
result |= 1;
if (sprintf (buf, "%Le", zeroL / zeroL) < 0
|| !strisnan (buf, 0, strlen (buf)))
result |= 1;
- if (sprintf (buf, "%Lg", 1.0L / 0.0L) < 0
+ if (sprintf (buf, "%Lg", 1.0L / zeroL) < 0
|| (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
result |= 1;
- if (sprintf (buf, "%Lg", -1.0L / 0.0L) < 0
+ if (sprintf (buf, "%Lg", -1.0L / zeroL) < 0
|| (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
result |= 1;
if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
|| !strisnan (buf, 0, strlen (buf)))
result |= 1;
-#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
/* Representation of an 80-bit 'long double' as an initializer for a sequence
of 'unsigned int' words. */
# ifdef WORDS_BIGENDIAN
@@ -478,6 +479,7 @@ AC_DEFUN([gl_PRINTF_DIRECTIVE_A],
#include <stdio.h>
#include <string.h>
static char buf[100];
+static double zero = 0.0;
int main ()
{
int result = 0;
@@ -502,17 +504,17 @@ int main ()
result |= 4;
/* This catches a FreeBSD 6.1 bug. See
<http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
- if (sprintf (buf, "%010a %d", 1.0 / 0.0, 33, 44, 55) < 0
+ if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0
|| buf[0] == '0')
result |= 8;
- /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug. */
+ /* This catches a Mac OS X 10.3.9 (Darwin 7.9) bug. */
if (sprintf (buf, "%.1a", 1.999) < 0
|| (strcmp (buf, "0x1.0p+1") != 0
&& strcmp (buf, "0x2.0p+0") != 0
&& strcmp (buf, "0x4.0p-1") != 0
&& strcmp (buf, "0x8.0p-2") != 0))
result |= 16;
- /* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a
+ /* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a
glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
if (sprintf (buf, "%.1La", 1.999L) < 0
|| (strcmp (buf, "0x1.0p+1") != 0
@@ -562,13 +564,14 @@ AC_DEFUN([gl_PRINTF_DIRECTIVE_F],
#include <stdio.h>
#include <string.h>
static char buf[100];
+static double zero = 0.0;
int main ()
{
int result = 0;
if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
|| strcmp (buf, "1234567.000000 33") != 0)
result |= 1;
- if (sprintf (buf, "%F", 1.0 / 0.0) < 0
+ if (sprintf (buf, "%F", 1.0 / zero) < 0
|| (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
result |= 2;
/* This catches a Cygwin 1.5.x bug. */
@@ -587,7 +590,7 @@ changequote(,)dnl
# Guess yes on FreeBSD >= 6.
freebsd[1-5]*) gl_cv_func_printf_directive_f="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
- # Guess yes on MacOS X >= 10.3.
+ # Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";;
darwin*) gl_cv_func_printf_directive_f="guessing yes";;
# Guess yes on Solaris >= 2.10.
@@ -615,12 +618,27 @@ AC_DEFUN([gl_PRINTF_DIRECTIVE_N],
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
+#ifdef _MSC_VER
+/* See page about "Parameter Validation" on msdn.microsoft.com. */
+static void cdecl
+invalid_parameter_handler (const wchar_t *expression,
+ const wchar_t *function,
+ const wchar_t *file, unsigned int line,
+ uintptr_t dummy)
+{
+ exit (1);
+}
+#endif
static char fmtstring[10];
static char buf[100];
int main ()
{
int count = -1;
+#ifdef _MSC_VER
+ _set_invalid_parameter_handler (invalid_parameter_handler);
+#endif
/* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
support %n in format strings in read-only memory but not in writable
memory. */
@@ -636,7 +654,8 @@ int main ()
[
changequote(,)dnl
case "$host_os" in
- *) gl_cv_func_printf_directive_n="guessing yes";;
+ mingw*) gl_cv_func_printf_directive_n="guessing no";;
+ *) gl_cv_func_printf_directive_n="guessing yes";;
esac
changequote([,])dnl
])
@@ -862,9 +881,10 @@ AC_DEFUN([gl_PRINTF_FLAG_ZERO],
#include <stdio.h>
#include <string.h>
static char buf[100];
+static double zero = 0.0;
int main ()
{
- if (sprintf (buf, "%010f", 1.0 / 0.0, 33, 44, 55) < 0
+ if (sprintf (buf, "%010f", 1.0 / zero, 33, 44, 55) < 0
|| (strcmp (buf, " inf") != 0
&& strcmp (buf, " infinity") != 0))
return 1;
@@ -892,7 +912,8 @@ dnl On mingw, precisions larger than 512 are treated like 512, in integer,
dnl floating-point or pointer output. On Solaris 10/x86, precisions larger
dnl than 510 in floating-point output crash the program. On Solaris 10/SPARC,
dnl precisions larger than 510 in floating-point output yield wrong results.
-dnl On BeOS, precisions larger than 1044 crash the program.
+dnl On AIX 7.1, precisions larger than 998 in floating-point output yield
+dnl wrong results. On BeOS, precisions larger than 1044 crash the program.
dnl Result is gl_cv_func_printf_precision.
AC_DEFUN([gl_PRINTF_PRECISION],
@@ -921,6 +942,9 @@ int main ()
if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5
|| buf[0] != '1')
result |= 4;
+ if (sprintf (buf, "%.999f %d", 1.0, 33, 44) < 999 + 5
+ || buf[0] != '1')
+ result |= 4;
return result;
}]])],
[gl_cv_func_printf_precision=yes],
@@ -928,7 +952,7 @@ int main ()
[
changequote(,)dnl
case "$host_os" in
- # Guess no only on Solaris, native Win32, and BeOS systems.
+ # Guess no only on Solaris, native Windows, and BeOS systems.
solaris*) gl_cv_func_printf_precision="guessing no" ;;
mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
beos*) gl_cv_func_printf_precision="guessing no" ;;
@@ -1004,8 +1028,9 @@ int main()
changequote([,])dnl
])])
if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
- (./conftest
+ (./conftest 2>&AS_MESSAGE_LOG_FD
result=$?
+ _AS_ECHO_LOG([\$? = $result])
if test $result != 0 && test $result != 77; then result=1; fi
exit $result
) >/dev/null 2>/dev/null
@@ -1019,7 +1044,7 @@ changequote([,])dnl
fi
rm -fr conftest*
else
- dnl A universal build on Apple MacOS X platforms.
+ dnl A universal build on Apple Mac OS X platforms.
dnl The result would be 'no' in 32-bit mode and 'yes' in 64-bit mode.
dnl But we need a configuration result that is valid in both modes.
gl_cv_func_printf_enomem="guessing no"
@@ -1072,6 +1097,7 @@ AC_DEFUN([gl_SNPRINTF_TRUNCATION_C99],
[
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_REQUIRE([gl_SNPRINTF_PRESENCE])
AC_CACHE_CHECK([whether snprintf truncates the result as in C99],
[gl_cv_func_snprintf_truncation_c99],
[
@@ -1079,11 +1105,25 @@ AC_DEFUN([gl_SNPRINTF_TRUNCATION_C99],
[AC_LANG_SOURCE([[
#include <stdio.h>
#include <string.h>
+#if HAVE_SNPRINTF
+# define my_snprintf snprintf
+#else
+# include <stdarg.h>
+static int my_snprintf (char *buf, int size, const char *format, ...)
+{
+ va_list args;
+ int ret;
+ va_start (args, format);
+ ret = vsnprintf (buf, size, format, args);
+ va_end (args);
+ return ret;
+}
+#endif
static char buf[100];
int main ()
{
strcpy (buf, "ABCDEF");
- snprintf (buf, 3, "%d %d", 4567, 89);
+ my_snprintf (buf, 3, "%d %d", 4567, 89);
if (memcmp (buf, "45\0DEF", 6) != 0)
return 1;
return 0;
@@ -1098,7 +1138,7 @@ changequote(,)dnl
# Guess yes on FreeBSD >= 5.
freebsd[1-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
- # Guess yes on MacOS X >= 10.3.
+ # Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";;
darwin*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
# Guess yes on OpenBSD >= 3.9.
@@ -1153,6 +1193,7 @@ AC_DEFUN_ONCE([gl_SNPRINTF_RETVAL_C99],
[
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_REQUIRE([gl_SNPRINTF_PRESENCE])
AC_CACHE_CHECK([whether snprintf returns a byte count as in C99],
[gl_cv_func_snprintf_retval_c99],
[
@@ -1160,15 +1201,29 @@ AC_DEFUN_ONCE([gl_SNPRINTF_RETVAL_C99],
[AC_LANG_SOURCE([[
#include <stdio.h>
#include <string.h>
+#if HAVE_SNPRINTF
+# define my_snprintf snprintf
+#else
+# include <stdarg.h>
+static int my_snprintf (char *buf, int size, const char *format, ...)
+{
+ va_list args;
+ int ret;
+ va_start (args, format);
+ ret = vsnprintf (buf, size, format, args);
+ va_end (args);
+ return ret;
+}
+#endif
static char buf[100];
int main ()
{
strcpy (buf, "ABCDEF");
- if (snprintf (buf, 3, "%d %d", 4567, 89) != 7)
+ if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
return 1;
- if (snprintf (buf, 0, "%d %d", 4567, 89) != 7)
+ if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
return 2;
- if (snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
+ if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
return 3;
return 0;
}]])],
@@ -1182,7 +1237,7 @@ changequote(,)dnl
# Guess yes on FreeBSD >= 5.
freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
- # Guess yes on MacOS X >= 10.3.
+ # Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
# Guess yes on OpenBSD >= 3.9.
@@ -1217,6 +1272,7 @@ AC_DEFUN([gl_SNPRINTF_DIRECTIVE_N],
[
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_REQUIRE([gl_SNPRINTF_PRESENCE])
AC_CACHE_CHECK([whether snprintf fully supports the 'n' directive],
[gl_cv_func_snprintf_directive_n],
[
@@ -1224,6 +1280,20 @@ AC_DEFUN([gl_SNPRINTF_DIRECTIVE_N],
[AC_LANG_SOURCE([[
#include <stdio.h>
#include <string.h>
+#if HAVE_SNPRINTF
+# define my_snprintf snprintf
+#else
+# include <stdarg.h>
+static int my_snprintf (char *buf, int size, const char *format, ...)
+{
+ va_list args;
+ int ret;
+ va_start (args, format);
+ ret = vsnprintf (buf, size, format, args);
+ va_end (args);
+ return ret;
+}
+#endif
static char fmtstring[10];
static char buf[100];
int main ()
@@ -1233,7 +1303,7 @@ int main ()
support %n in format strings in read-only memory but not in writable
memory. */
strcpy (fmtstring, "%d %n");
- snprintf (buf, 4, fmtstring, 12345, &count, 33, 44, 55);
+ my_snprintf (buf, 4, fmtstring, 12345, &count, 33, 44, 55);
if (count != 6)
return 1;
return 0;
@@ -1248,7 +1318,7 @@ changequote(,)dnl
# Guess yes on FreeBSD >= 5.
freebsd[1-4]*) gl_cv_func_snprintf_directive_n="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
- # Guess yes on MacOS X >= 10.3.
+ # Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_snprintf_directive_n="guessing no";;
darwin*) gl_cv_func_snprintf_directive_n="guessing yes";;
# Guess yes on Solaris >= 2.6.
@@ -1285,16 +1355,31 @@ dnl Result is gl_cv_func_snprintf_size1.
AC_DEFUN([gl_SNPRINTF_SIZE1],
[
AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gl_SNPRINTF_PRESENCE])
AC_CACHE_CHECK([whether snprintf respects a size of 1],
[gl_cv_func_snprintf_size1],
[
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <stdio.h>
+#if HAVE_SNPRINTF
+# define my_snprintf snprintf
+#else
+# include <stdarg.h>
+static int my_snprintf (char *buf, int size, const char *format, ...)
+{
+ va_list args;
+ int ret;
+ va_start (args, format);
+ ret = vsnprintf (buf, size, format, args);
+ va_end (args);
+ return ret;
+}
+#endif
int main()
{
static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
- snprintf (buf, 1, "%d", 12345);
+ my_snprintf (buf, 1, "%d", 12345);
return buf[1] != 'E';
}]])],
[gl_cv_func_snprintf_size1=yes],
@@ -1375,7 +1460,7 @@ changequote(,)dnl
# Guess yes on FreeBSD >= 5.
freebsd[1-4]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
- # Guess yes on MacOS X >= 10.3.
+ # Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
# Guess yes on Cygwin.
@@ -1455,17 +1540,18 @@ dnl 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
dnl glibc 2.5 . . . . . . . . . . . . . . . . . . . .
dnl glibc 2.3.6 . . . . # . . . . . . . . . . . . . . .
dnl FreeBSD 5.4, 6.1 . . . . # . . . . . . # . # . . . . . .
-dnl MacOS X 10.5.8 . . . # # . . . . . . # . . . . . . . .
-dnl MacOS X 10.3.9 . . . . # . . . . . . # . # . . . . . .
+dnl Mac OS X 10.5.8 . . . # # . . . . . . # . . . . . . . .
+dnl Mac OS X 10.3.9 . . . . # . . . . . . # . # . . . . . .
dnl OpenBSD 3.9, 4.0 . . # # # # . # . # . # . # . . . . . .
dnl Cygwin 1.7.0 (2009) . . . # . . . ? . . . . . ? . . . . . .
dnl Cygwin 1.5.25 (2008) . . . # # . . # . . . . . # . . . . . .
dnl Cygwin 1.5.19 (2006) # . . # # # . # . # . # # # . . . . . .
-dnl Solaris 11 2010-11 . . # # # . . # . . . # . . . . . . . .
+dnl Solaris 11 2011-11 . . # # # . . # . . . # . . . . . . . .
dnl Solaris 10 . . # # # . . # . . . # # . . . . . . .
dnl Solaris 2.6 ... 9 # . # # # # . # . . . # # . . . # . . .
dnl Solaris 2.5.1 # . # # # # . # . . . # . . # # # # # #
-dnl AIX 5.2, 7.1 . . # # # . . . . . . # . . . . . . . .
+dnl AIX 7.1 . . # # # . . . . . . # # . . . . . . .
+dnl AIX 5.2 . . # # # . . . . . . # . . . . . . . .
dnl AIX 4.3.2, 5.1 # . # # # # . . . . . # . . . . # . . .
dnl HP-UX 11.31 . . . . # . . . . . . # . . . . # # . .
dnl HP-UX 11.{00,11,23} # . . . # # . . . . . # . . . . # # . #
@@ -1478,4 +1564,7 @@ dnl NetBSD 4.0 . ? ? ? ? ? . ? . ? ? ? ? ? .
dnl NetBSD 3.0 . . . . # # . ? # # ? # . # . . . . . .
dnl Haiku . . . # # # . # . . . . . ? . . ? . . .
dnl BeOS # # . # # # . ? # . ? . # ? . . ? . . .
-dnl mingw # # # # # # . . # # . # # ? . # # # . .
+dnl old mingw / msvcrt # # # # # # . . # # . # # ? . # # # . .
+dnl MSVC 9 # # # # # # # . # # . # # ? # # # # . .
+dnl mingw 2009-2011 . # . # . . . . # # . . . ? . . . . . .
+dnl mingw-w64 2011 # # # # # # . . # # . # # ? . # # # . .
diff --git a/m4/putenv.m4 b/m4/putenv.m4
index de3900b..c33b5b5 100644
--- a/m4/putenv.m4
+++ b/m4/putenv.m4
@@ -1,5 +1,5 @@
-# putenv.m4 serial 17
-dnl Copyright (C) 2002-2011 Free Software Foundation, Inc.
+# putenv.m4 serial 20
+dnl Copyright (C) 2002-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -12,6 +12,7 @@ dnl The putenv in libc on at least SunOS 4.1.4 does *not* do that.
AC_DEFUN([gl_FUNC_PUTENV],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([for putenv compatible with GNU and SVID],
[gl_cv_func_svid_putenv],
[AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],[[
@@ -32,10 +33,24 @@ AC_DEFUN([gl_FUNC_PUTENV],
gl_cv_func_svid_putenv=yes,
gl_cv_func_svid_putenv=no,
dnl When crosscompiling, assume putenv is broken.
- gl_cv_func_svid_putenv=no)
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_svid_putenv="guessing no" ;;
+ esac
+ ])
])
- if test $gl_cv_func_svid_putenv = no; then
- REPLACE_PUTENV=1
- AC_LIBOBJ([putenv])
- fi
+ case "$gl_cv_func_svid_putenv" in
+ *yes) ;;
+ *)
+ REPLACE_PUTENV=1
+ ;;
+ esac
+])
+
+# Prerequisites of lib/putenv.c.
+AC_DEFUN([gl_PREREQ_PUTENV],
+[
+ AC_CHECK_DECLS([_putenv])
])
diff --git a/m4/quotearg.m4 b/m4/quotearg.m4
index ff4a2fa..bc0ef0c 100644
--- a/m4/quotearg.m4
+++ b/m4/quotearg.m4
@@ -1,10 +1,10 @@
-# quotearg.m4 serial 8
-dnl Copyright (C) 2002, 2004-2011 Free Software Foundation, Inc.
+# quotearg.m4 serial 9
+dnl Copyright (C) 2002, 2004-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_QUOTEARG],
[
- AC_LIBOBJ([quotearg])
+ :
])
diff --git a/m4/raise.m4 b/m4/raise.m4
new file mode 100644
index 0000000..7df3317
--- /dev/null
+++ b/m4/raise.m4
@@ -0,0 +1,34 @@
+# raise.m4 serial 3
+dnl Copyright (C) 2011-2013 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_RAISE],
+[
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gl_MSVC_INVAL])
+ AC_CHECK_FUNCS([raise])
+ if test $ac_cv_func_raise = no; then
+ HAVE_RAISE=0
+ else
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ REPLACE_RAISE=1
+ fi
+ m4_ifdef([gl_SIGNALBLOCKING], [
+ gl_SIGNALBLOCKING
+ if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
+ m4_ifdef([gl_SIGNAL_SIGPIPE], [
+ gl_SIGNAL_SIGPIPE
+ if test $gl_cv_header_signal_h_SIGPIPE != yes; then
+ REPLACE_RAISE=1
+ fi
+ ], [:])
+ fi
+ ])
+ fi
+])
+
+# Prerequisites of lib/raise.c.
+AC_DEFUN([gl_PREREQ_RAISE], [:])
diff --git a/m4/rawmemchr.m4 b/m4/rawmemchr.m4
index 542cba1..8c50054 100644
--- a/m4/rawmemchr.m4
+++ b/m4/rawmemchr.m4
@@ -1,5 +1,5 @@
-# rawmemchr.m4 serial 1
-dnl Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc.
+# rawmemchr.m4 serial 2
+dnl Copyright (C) 2003, 2007-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -10,10 +10,9 @@ AC_DEFUN([gl_FUNC_RAWMEMCHR],
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
- AC_REPLACE_FUNCS([rawmemchr])
+ AC_CHECK_FUNCS([rawmemchr])
if test $ac_cv_func_rawmemchr = no; then
HAVE_RAWMEMCHR=0
- gl_PREREQ_RAWMEMCHR
fi
])
diff --git a/m4/readdir.m4 b/m4/readdir.m4
new file mode 100644
index 0000000..4269bb4
--- /dev/null
+++ b/m4/readdir.m4
@@ -0,0 +1,15 @@
+# readdir.m4 serial 1
+dnl Copyright (C) 2011-2013 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_READDIR],
+[
+ AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
+
+ AC_CHECK_FUNCS([readdir])
+ if test $ac_cv_func_readdir = no; then
+ HAVE_READDIR=0
+ fi
+])
diff --git a/m4/readlink.m4 b/m4/readlink.m4
index a502ca5..96e5042 100644
--- a/m4/readlink.m4
+++ b/m4/readlink.m4
@@ -1,5 +1,5 @@
-# readlink.m4 serial 9
-dnl Copyright (C) 2003, 2007, 2009-2011 Free Software Foundation, Inc.
+# readlink.m4 serial 12
+dnl Copyright (C) 2003, 2007, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,11 +7,10 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_READLINK],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_FUNCS_ONCE([readlink])
if test $ac_cv_func_readlink = no; then
HAVE_READLINK=0
- AC_LIBOBJ([readlink])
- gl_PREREQ_READLINK
else
AC_CACHE_CHECK([whether readlink signature is correct],
[gl_cv_decl_readlink_works],
@@ -34,21 +33,31 @@ AC_DEFUN([gl_FUNC_READLINK],
]], [[char buf[20];
return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;]])],
[gl_cv_func_readlink_works=yes], [gl_cv_func_readlink_works=no],
- [gl_cv_func_readlink_works="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_readlink_works="guessing no" ;;
+ esac
+ ])
rm -f conftest.link conftest.lnk2])
- if test "$gl_cv_func_readlink_works" != yes; then
- AC_DEFINE([READLINK_TRAILING_SLASH_BUG], [1], [Define to 1 if readlink
- fails to recognize a trailing slash.])
- REPLACE_READLINK=1
- AC_LIBOBJ([readlink])
- elif test "$gl_cv_decl_readlink_works" != yes; then
- REPLACE_READLINK=1
- AC_LIBOBJ([readlink])
- fi
+ case "$gl_cv_func_readlink_works" in
+ *yes)
+ if test "$gl_cv_decl_readlink_works" != yes; then
+ REPLACE_READLINK=1
+ fi
+ ;;
+ *)
+ AC_DEFINE([READLINK_TRAILING_SLASH_BUG], [1], [Define to 1 if readlink
+ fails to recognize a trailing slash.])
+ REPLACE_READLINK=1
+ ;;
+ esac
fi
])
-# Like gl_FUNC_READLINK, except prepare for separate compilation (no AC_LIBOBJ).
+# Like gl_FUNC_READLINK, except prepare for separate compilation
+# (no REPLACE_READLINK, no AC_LIBOBJ).
AC_DEFUN([gl_FUNC_READLINK_SEPARATE],
[
AC_CHECK_FUNCS_ONCE([readlink])
diff --git a/m4/regex.m4 b/m4/regex.m4
index 24198b5..0945c11 100644
--- a/m4/regex.m4
+++ b/m4/regex.m4
@@ -1,6 +1,6 @@
-# serial 58
+# serial 64
-# Copyright (C) 1996-2001, 2003-2011 Free Software Foundation, Inc.
+# Copyright (C) 1996-2001, 2003-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -27,15 +27,21 @@ AC_DEFUN([gl_REGEX],
# following run test, then default to *not* using the included regex.c.
# If cross compiling, assume the test would fail and use the included
# regex.c.
+ AC_CHECK_DECLS_ONCE([alarm])
AC_CACHE_CHECK([for working re_compile_pattern],
[gl_cv_func_re_compile_pattern_working],
[AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
- [AC_INCLUDES_DEFAULT[
- #include <locale.h>
- #include <limits.h>
- #include <regex.h>
- ]],
+ [[#include <regex.h>
+
+ #include <locale.h>
+ #include <limits.h>
+ #include <string.h>
+ #if HAVE_DECL_ALARM
+ # include <unistd.h>
+ # include <signal.h>
+ #endif
+ ]],
[[int result = 0;
static struct re_pattern_buffer regex;
unsigned char folded_chars[UCHAR_MAX + 1];
@@ -43,26 +49,65 @@ AC_DEFUN([gl_REGEX],
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 HAVE_DECL_ALARM
+ /* Some builds of glibc go into an infinite loop on this test. */
+ signal (SIGALRM, SIG_DFL);
+ alarm (2);
+#endif
if (setlocale (LC_ALL, "en_US.UTF-8"))
{
- static char const pat[] = "insert into";
- static char const data[] =
- "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
- re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
- | RE_ICASE);
- memset (&regex, 0, sizeof regex);
- s = re_compile_pattern (pat, sizeof pat - 1, &regex);
- if (s)
- result |= 1;
- else if (re_search (&regex, data, sizeof data - 1,
- 0, sizeof data - 1, &regs)
- != -1)
- result |= 1;
+ {
+ /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
+ This test needs valgrind to catch the bug on Debian
+ GNU/Linux 3.1 x86, but it might catch the bug better
+ on other platforms and it shouldn't hurt to try the
+ test here. */
+ static char const pat[] = "insert into";
+ static char const data[] =
+ "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
+ re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
+ | RE_ICASE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern (pat, sizeof pat - 1, &regex);
+ if (s)
+ result |= 1;
+ else if (re_search (&regex, data, sizeof data - 1,
+ 0, sizeof data - 1, &regs)
+ != -1)
+ result |= 1;
+ }
+
+ {
+ /* This test is from glibc bug 15078.
+ The test case is from Andreas Schwab in
+ <http://www.sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
+ */
+ static char const pat[] = "[^x]x";
+ static char const data[] =
+ /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
+ "\xe1\x80\x80"
+ "\xe1\x80\xbb"
+ "\xe1\x80\xbd"
+ "\xe1\x80\x94"
+ "\xe1\x80\xba"
+ "\xe1\x80\xaf"
+ "\xe1\x80\x95"
+ "\xe1\x80\xba"
+ "x";
+ re_set_syntax (0);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern (pat, sizeof pat - 1, &regex);
+ if (s)
+ result |= 1;
+ else
+ {
+ i = re_search (&regex, data, sizeof data - 1,
+ 0, sizeof data - 1, 0);
+ if (i != 0 && i != 21)
+ result |= 1;
+ }
+ }
+
if (! setlocale (LC_ALL, "C"))
return 1;
}
@@ -175,6 +220,9 @@ AC_DEFUN([gl_REGEX],
esac
if test $ac_use_included_regex = yes; then
+ AC_DEFINE([_REGEX_INCLUDE_LIMITS_H], [1],
+ [Define if you want <regex.h> to include <limits.h>, so that it
+ consistently overrides <limits.h>'s RE_DUP_MAX.])
AC_DEFINE([_REGEX_LARGE_OFFSETS], [1],
[Define if you want regoff_t to be at least as wide POSIX requires.])
AC_DEFINE([re_syntax_options], [rpl_re_syntax_options],
@@ -207,8 +255,6 @@ AC_DEFUN([gl_REGEX],
[Define to rpl_regerror if the replacement should be used.])
AC_DEFINE([regfree], [rpl_regfree],
[Define to rpl_regfree if the replacement should be used.])
- AC_LIBOBJ([regex])
- gl_PREREQ_REGEX
fi
])
@@ -219,7 +265,9 @@ AC_DEFUN([gl_PREREQ_REGEX],
AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([AC_C_RESTRICT])
AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ AC_REQUIRE([gl_EEMALLOC])
+ AC_REQUIRE([gl_GLIBC21])
AC_CHECK_HEADERS([libintl.h])
AC_CHECK_FUNCS_ONCE([isblank iswctype wcscoll])
- AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>])
+ AC_CHECK_DECLS([isblank], [], [], [[#include <ctype.h>]])
])
diff --git a/m4/rename.m4 b/m4/rename.m4
index 6648542..66430aa 100644
--- a/m4/rename.m4
+++ b/m4/rename.m4
@@ -1,6 +1,6 @@
-# serial 23
+# serial 26
-# Copyright (C) 2001, 2003, 2005-2006, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005-2006, 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.
@@ -54,16 +54,24 @@ AC_DEFUN([gl_FUNC_RENAME],
[gl_cv_func_rename_slash_dst_works=yes],
[gl_cv_func_rename_slash_dst_works=no],
dnl When crosscompiling, assume rename is broken.
- [gl_cv_func_rename_slash_dst_works="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
+ esac
+ ])
rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
])
- if test "x$gl_cv_func_rename_slash_dst_works" != xyes; then
- AC_LIBOBJ([rename])
- REPLACE_RENAME=1
- AC_DEFINE([RENAME_TRAILING_SLASH_DEST_BUG], [1],
- [Define if rename does not correctly handle slashes on the destination
- argument, such as on Solaris 10 or NetBSD 1.6.])
- fi
+ case "$gl_cv_func_rename_slash_dst_works" in
+ *yes) ;;
+ *)
+ REPLACE_RENAME=1
+ AC_DEFINE([RENAME_TRAILING_SLASH_DEST_BUG], [1],
+ [Define if rename does not correctly handle slashes on the destination
+ argument, such as on Solaris 10 or NetBSD 1.6.])
+ ;;
+ esac
dnl SunOS 4.1.1_U1 mistakenly forbids rename("dir/","name").
dnl Solaris 9 mistakenly allows rename("file/","name").
@@ -98,58 +106,79 @@ AC_DEFUN([gl_FUNC_RENAME],
[gl_cv_func_rename_slash_src_works=yes],
[gl_cv_func_rename_slash_src_works=no],
dnl When crosscompiling, assume rename is broken.
- [gl_cv_func_rename_slash_src_works="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_rename_slash_src_works="guessing no" ;;
+ esac
+ ])
rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
])
- if test "x$gl_cv_func_rename_slash_src_works" != xyes; then
- AC_LIBOBJ([rename])
- REPLACE_RENAME=1
- AC_DEFINE([RENAME_TRAILING_SLASH_SOURCE_BUG], [1],
- [Define if rename does not correctly handle slashes on the source
- argument, such as on Solaris 9 or cygwin 1.5.])
- fi
+ case "$gl_cv_func_rename_slash_src_works" in
+ *yes) ;;
+ *)
+ REPLACE_RENAME=1
+ AC_DEFINE([RENAME_TRAILING_SLASH_SOURCE_BUG], [1],
+ [Define if rename does not correctly handle slashes on the source
+ argument, such as on Solaris 9 or cygwin 1.5.])
+ ;;
+ esac
dnl NetBSD 1.6 and cygwin 1.5.x mistakenly reduce hard link count
dnl on rename("h1","h2").
dnl This bug requires stat'ting targets prior to attempting rename.
+ AC_CHECK_FUNCS_ONCE([link])
AC_CACHE_CHECK([whether rename manages hard links correctly],
[gl_cv_func_rename_link_works],
- [rm -rf conftest.f conftest.f1
- if touch conftest.f && ln conftest.f conftest.f1 &&
- set x `ls -i conftest.f conftest.f1` && test "$2" = "$4"; then
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM([[
-# include <stdio.h>
-# include <stdlib.h>
-# include <unistd.h>
- ]],
- [[int result = 0;
- if (rename ("conftest.f", "conftest.f1"))
- result |= 1;
- if (unlink ("conftest.f1"))
- result |= 2;
- if (rename ("conftest.f", "conftest.f"))
- result |= 4;
- if (rename ("conftest.f1", "conftest.f1") == 0)
- result |= 8;
- return result;
- ]])],
- [gl_cv_func_rename_link_works=yes],
- [gl_cv_func_rename_link_works=no],
- dnl When crosscompiling, assume rename is broken.
- [gl_cv_func_rename_link_works="guessing no"])
- else
- gl_cv_func_rename_link_works="guessing no"
- fi
- rm -rf conftest.f conftest.f1
- ])
- if test "x$gl_cv_func_rename_link_works" != xyes; then
- AC_LIBOBJ([rename])
- REPLACE_RENAME=1
- AC_DEFINE([RENAME_HARD_LINK_BUG], [1],
- [Define if rename fails to leave hard links alone, as on NetBSD 1.6
- or Cygwin 1.5.])
- fi
+ [if test $ac_cv_func_link = yes; then
+ rm -rf conftest.f conftest.f1
+ if touch conftest.f && ln conftest.f conftest.f1 &&
+ set x `ls -i conftest.f conftest.f1` && test "$2" = "$4"; then
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM([[
+# include <stdio.h>
+# include <stdlib.h>
+# include <unistd.h>
+ ]],
+ [[int result = 0;
+ if (rename ("conftest.f", "conftest.f1"))
+ result |= 1;
+ if (unlink ("conftest.f1"))
+ result |= 2;
+ if (rename ("conftest.f", "conftest.f"))
+ result |= 4;
+ if (rename ("conftest.f1", "conftest.f1") == 0)
+ result |= 8;
+ return result;
+ ]])],
+ [gl_cv_func_rename_link_works=yes],
+ [gl_cv_func_rename_link_works=no],
+ dnl When crosscompiling, assume rename is broken.
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_rename_link_works="guessing no" ;;
+ esac
+ ])
+ else
+ gl_cv_func_rename_link_works="guessing no"
+ fi
+ rm -rf conftest.f conftest.f1
+ else
+ gl_cv_func_rename_link_works=yes
+ fi
+ ])
+ case "$gl_cv_func_rename_link_works" in
+ *yes) ;;
+ *)
+ REPLACE_RENAME=1
+ AC_DEFINE([RENAME_HARD_LINK_BUG], [1],
+ [Define if rename fails to leave hard links alone, as on NetBSD 1.6
+ or Cygwin 1.5.])
+ ;;
+ esac
dnl Cygwin 1.5.x mistakenly allows rename("dir","file").
dnl mingw mistakenly forbids rename("dir1","dir2").
@@ -175,14 +204,22 @@ AC_DEFUN([gl_FUNC_RENAME],
[gl_cv_func_rename_dest_works=yes],
[gl_cv_func_rename_dest_works=no],
dnl When crosscompiling, assume rename is broken.
- [gl_cv_func_rename_dest_works="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_rename_dest_works="guessing no" ;;
+ esac
+ ])
rm -rf conftest.f conftest.d1 conftest.d2
])
- if test "x$gl_cv_func_rename_dest_works" != xyes; then
- AC_LIBOBJ([rename])
- REPLACE_RENAME=1
- AC_DEFINE([RENAME_DEST_EXISTS_BUG], [1],
- [Define if rename does not work when the destination file exists,
- as on Cygwin 1.5 or Windows.])
- fi
+ case "$gl_cv_func_rename_dest_works" in
+ *yes) ;;
+ *)
+ REPLACE_RENAME=1
+ AC_DEFINE([RENAME_DEST_EXISTS_BUG], [1],
+ [Define if rename does not work when the destination file exists,
+ as on Cygwin 1.5 or Windows.])
+ ;;
+ esac
])
diff --git a/m4/rmdir.m4 b/m4/rmdir.m4
index 41705a1..f6a02dd 100644
--- a/m4/rmdir.m4
+++ b/m4/rmdir.m4
@@ -1,5 +1,5 @@
-# rmdir.m4 serial 10
-dnl Copyright (C) 2002, 2005, 2009-2011 Free Software Foundation, Inc.
+# rmdir.m4 serial 13
+dnl Copyright (C) 2002, 2005, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,7 +7,9 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_RMDIR],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
dnl Detect cygwin 1.5.x bug.
+ AC_CHECK_HEADERS_ONCE([unistd.h])
AC_CACHE_CHECK([whether rmdir works], [gl_cv_func_rmdir_works],
[mkdir conftest.dir
touch conftest.file
@@ -15,7 +17,11 @@ AC_DEFUN([gl_FUNC_RMDIR],
[AC_LANG_PROGRAM(
[[#include <stdio.h>
#include <errno.h>
- #include <unistd.h>
+ #if HAVE_UNISTD_H
+ # include <unistd.h>
+ #else /* on Windows with MSVC */
+ # include <direct.h>
+ #endif
]], [[int result = 0;
if (!rmdir ("conftest.file/"))
result |= 1;
@@ -26,10 +32,18 @@ AC_DEFUN([gl_FUNC_RMDIR],
return result;
]])],
[gl_cv_func_rmdir_works=yes], [gl_cv_func_rmdir_works=no],
- [gl_cv_func_rmdir_works="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_rmdir_works="guessing no" ;;
+ esac
+ ])
rm -rf conftest.dir conftest.file])
- if test x"$gl_cv_func_rmdir_works" != xyes; then
- REPLACE_RMDIR=1
- AC_LIBOBJ([rmdir])
- fi
+ case "$gl_cv_func_rmdir_works" in
+ *yes) ;;
+ *)
+ REPLACE_RMDIR=1
+ ;;
+ esac
])
diff --git a/m4/sched_h.m4 b/m4/sched_h.m4
index 6a46e47..931358f 100644
--- a/m4/sched_h.m4
+++ b/m4/sched_h.m4
@@ -1,5 +1,5 @@
-# sched_h.m4 serial 3
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# sched_h.m4 serial 6
+dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -13,6 +13,7 @@ AC_DEFUN([gl_SCHED_H],
#include <sched.h>
struct sched_param a;
int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER };
+ pid_t t1;
]])],
[SCHED_H=''],
[SCHED_H='sched.h'
@@ -30,6 +31,10 @@ AC_DEFUN([gl_SCHED_H],
[HAVE_STRUCT_SCHED_PARAM=1], [HAVE_STRUCT_SCHED_PARAM=0],
[#include <sched.h>])
AC_SUBST([HAVE_STRUCT_SCHED_PARAM])
+
+ dnl Ensure the type pid_t gets defined.
+ AC_REQUIRE([AC_TYPE_PID_T])
])
AC_SUBST([SCHED_H])
+ AM_CONDITIONAL([GL_GENERATE_SCHED_H], [test -n "$SCHED_H"])
])
diff --git a/m4/secure_getenv.m4 b/m4/secure_getenv.m4
new file mode 100644
index 0000000..5da5298
--- /dev/null
+++ b/m4/secure_getenv.m4
@@ -0,0 +1,25 @@
+# Look up an environment variable more securely.
+dnl Copyright 2013 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_SECURE_GETENV],
+[
+ dnl Persuade glibc <stdlib.h> to declare secure_getenv().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([secure_getenv])
+ if test $ac_cv_func_secure_getenv = no; then
+ HAVE_SECURE_GETENV=0
+ fi
+])
+
+# Prerequisites of lib/secure_getenv.c.
+AC_DEFUN([gl_PREREQ_SECURE_GETENV], [
+ AC_CHECK_FUNCS([__secure_getenv])
+ if test $ac_cv_func___secure_getenv = no; then
+ AC_CHECK_FUNCS([issetugid])
+ fi
+])
diff --git a/m4/setenv.m4 b/m4/setenv.m4
index ba619b0..cb5351a 100644
--- a/m4/setenv.m4
+++ b/m4/setenv.m4
@@ -1,5 +1,5 @@
-# setenv.m4 serial 21
-dnl Copyright (C) 2001-2004, 2006-2011 Free Software Foundation, Inc.
+# setenv.m4 serial 26
+dnl Copyright (C) 2001-2004, 2006-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,20 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_SETENV],
[
AC_REQUIRE([gl_FUNC_SETENV_SEPARATE])
- if test $HAVE_SETENV$REPLACE_SETENV != 10; then
- AC_LIBOBJ([setenv])
- fi
-])
-
-# Like gl_FUNC_SETENV, except prepare for separate compilation (no AC_LIBOBJ).
-AC_DEFUN([gl_FUNC_SETENV_SEPARATE],
-[
- AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
- AC_CHECK_DECLS_ONCE([setenv])
- if test $ac_cv_have_decl_setenv = no; then
- HAVE_DECL_SETENV=0
- fi
- AC_CHECK_FUNCS_ONCE([setenv])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
if test $ac_cv_func_setenv = no; then
HAVE_SETENV=0
else
@@ -47,27 +34,48 @@ AC_DEFUN([gl_FUNC_SETENV_SEPARATE],
return result;
]])],
[gl_cv_func_setenv_works=yes], [gl_cv_func_setenv_works=no],
- [gl_cv_func_setenv_works="guessing no"])])
- if test "$gl_cv_func_setenv_works" != yes; then
- REPLACE_SETENV=1
- AC_LIBOBJ([setenv])
- fi
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_setenv_works="guessing no" ;;
+ esac
+ ])])
+ case "$gl_cv_func_setenv_works" in
+ *yes) ;;
+ *)
+ REPLACE_SETENV=1
+ ;;
+ esac
fi
+])
+
+# Like gl_FUNC_SETENV, except prepare for separate compilation
+# (no REPLACE_SETENV, no AC_LIBOBJ).
+AC_DEFUN([gl_FUNC_SETENV_SEPARATE],
+[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_CHECK_DECLS_ONCE([setenv])
+ if test $ac_cv_have_decl_setenv = no; then
+ HAVE_DECL_SETENV=0
+ fi
+ AC_CHECK_FUNCS_ONCE([setenv])
gl_PREREQ_SETENV
])
AC_DEFUN([gl_FUNC_UNSETENV],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_DECLS_ONCE([unsetenv])
if test $ac_cv_have_decl_unsetenv = no; then
HAVE_DECL_UNSETENV=0
fi
AC_CHECK_FUNCS([unsetenv])
if test $ac_cv_func_unsetenv = no; then
- AC_LIBOBJ([unsetenv])
- gl_PREREQ_UNSETENV
+ HAVE_UNSETENV=0
else
+ HAVE_UNSETENV=1
dnl Some BSDs return void, failing to do error checking.
AC_CACHE_CHECK([for unsetenv() return type], [gt_cv_func_unsetenv_ret],
[AC_COMPILE_IFELSE(
@@ -80,11 +88,7 @@ extern
#ifdef __cplusplus
"C"
#endif
-#if defined(__STDC__) || defined(__cplusplus)
int unsetenv (const char *name);
-#else
-int unsetenv();
-#endif
]],
[[]])],
[gt_cv_func_unsetenv_ret='int'],
@@ -93,7 +97,6 @@ int unsetenv();
AC_DEFINE([VOID_UNSETENV], [1], [Define to 1 if unsetenv returns void
instead of int.])
REPLACE_UNSETENV=1
- AC_LIBOBJ([unsetenv])
fi
dnl Solaris 10 unsetenv does not remove all copies of a name.
@@ -123,11 +126,19 @@ int unsetenv();
if (getenv ("a")) return 6;
]])],
[gl_cv_func_unsetenv_works=yes], [gl_cv_func_unsetenv_works=no],
- [gl_cv_func_unsetenv_works="guessing no"])])
- if test "$gl_cv_func_unsetenv_works" != yes; then
- REPLACE_UNSETENV=1
- AC_LIBOBJ([unsetenv])
- fi
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_unsetenv_works="guessing no" ;;
+ esac
+ ])])
+ case "$gl_cv_func_unsetenv_works" in
+ *yes) ;;
+ *)
+ REPLACE_UNSETENV=1
+ ;;
+ esac
fi
])
diff --git a/m4/setlocale.m4 b/m4/setlocale.m4
index 6672c34..1133e65 100644
--- a/m4/setlocale.m4
+++ b/m4/setlocale.m4
@@ -1,5 +1,5 @@
-# setlocale.m4 serial 1
-dnl Copyright (C) 2011 Free Software Foundation, Inc.
+# setlocale.m4 serial 4
+dnl Copyright (C) 2011-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -12,12 +12,14 @@ AC_DEFUN([gl_FUNC_SETLOCALE],
dnl On native Windows systems, setlocale(category,NULL) does not look at
dnl the environment variables LC_ALL, category, and LANG.
mingw*) REPLACE_SETLOCALE=1 ;;
+ dnl On Cygwin 1.5.x, setlocale always succeeds but setlocale(LC_CTYPE,NULL)
+ dnl is then still "C".
+ cygwin*)
+ case `uname -r` in
+ 1.5.*) REPLACE_SETLOCALE=1 ;;
+ esac
+ ;;
esac
- if test $REPLACE_SETLOCALE = 1; then
- gl_REPLACE_LOCALE_H
- AC_LIBOBJ([setlocale])
- gl_PREREQ_SETLOCALE
- fi
])
# Prerequisites of lib/setlocale.c.
diff --git a/m4/sig_atomic_t.m4 b/m4/sig_atomic_t.m4
index 4ffbfeb..f2dfd59 100644
--- a/m4/sig_atomic_t.m4
+++ b/m4/sig_atomic_t.m4
@@ -1,5 +1,5 @@
-# sig_atomic_t.m4 serial 2
-dnl Copyright (C) 2003, 2009-2011 Free Software Foundation, Inc.
+# sig_atomic_t.m4 serial 3
+dnl Copyright (C) 2003, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -9,6 +9,6 @@ AC_DEFUN([gt_TYPE_SIG_ATOMIC_T],
AC_CHECK_TYPES([sig_atomic_t], ,
[AC_DEFINE([sig_atomic_t], [int],
[Define as an integer type suitable for memory locations that can be
- accessed atomically even in the presence of asynchnonous signals.])],
+ accessed atomically even in the presence of asynchronous signals.])],
[#include <signal.h>])
])
diff --git a/m4/sigaction.m4 b/m4/sigaction.m4
index ce82232..116b068 100644
--- a/m4/sigaction.m4
+++ b/m4/sigaction.m4
@@ -1,5 +1,5 @@
-# sigaction.m4 serial 5
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# sigaction.m4 serial 7
+dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -17,8 +17,6 @@ AC_DEFUN([gl_SIGACTION],
fi
else
HAVE_SIGACTION=0
- AC_LIBOBJ([sigaction])
- gl_PREREQ_SIGACTION
fi
])
@@ -39,7 +37,4 @@ AC_DEFUN([gl_PREREQ_SIGACTION],
])
# Prerequisites of lib/sig-handler.h.
-AC_DEFUN([gl_PREREQ_SIG_HANDLER_H],
-[
- AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_PREREQ_SIG_HANDLER_H], [:])
diff --git a/m4/signal_h.m4 b/m4/signal_h.m4
index 77eb125..3de9f27 100644
--- a/m4/signal_h.m4
+++ b/m4/signal_h.m4
@@ -1,5 +1,5 @@
-# signal_h.m4 serial 11
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+# signal_h.m4 serial 18
+dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,22 +7,49 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_SIGNAL_H],
[
AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ AC_REQUIRE([gl_CHECK_TYPE_SIGSET_T])
gl_NEXT_HEADERS([signal.h])
+
# AIX declares sig_atomic_t to already include volatile, and C89 compilers
# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
AC_CHECK_TYPE([volatile sig_atomic_t], [],
[HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0], [[
#include <signal.h>
]])
+
+ dnl Ensure the type pid_t gets defined.
+ AC_REQUIRE([AC_TYPE_PID_T])
+
AC_REQUIRE([AC_TYPE_UID_T])
+ dnl Persuade glibc <signal.h> to define sighandler_t.
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+ AC_CHECK_TYPE([sighandler_t], [], [HAVE_SIGHANDLER_T=0], [[
+#include <signal.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 <signal.h>
- ]], [sigaction sigaddset sigdelset sigemptyset sigfillset sigismember
+ ]], [pthread_sigmask sigaction
+ sigaddset sigdelset sigemptyset sigfillset sigismember
sigpending sigprocmask])
])
+AC_DEFUN([gl_CHECK_TYPE_SIGSET_T],
+[
+ AC_CHECK_TYPES([sigset_t],
+ [gl_cv_type_sigset_t=yes], [gl_cv_type_sigset_t=no],
+ [[
+ #include <signal.h>
+ /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
+ #include <sys/types.h>
+ ]])
+ if test $gl_cv_type_sigset_t != yes; then
+ HAVE_SIGSET_T=0
+ fi
+])
+
AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR],
[
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
@@ -34,11 +61,15 @@ AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR],
AC_DEFUN([gl_SIGNAL_H_DEFAULTS],
[
+ GNULIB_PTHREAD_SIGMASK=0; AC_SUBST([GNULIB_PTHREAD_SIGMASK])
+ GNULIB_RAISE=0; AC_SUBST([GNULIB_RAISE])
GNULIB_SIGNAL_H_SIGPIPE=0; AC_SUBST([GNULIB_SIGNAL_H_SIGPIPE])
GNULIB_SIGPROCMASK=0; AC_SUBST([GNULIB_SIGPROCMASK])
GNULIB_SIGACTION=0; AC_SUBST([GNULIB_SIGACTION])
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_POSIX_SIGNALBLOCKING=1; AC_SUBST([HAVE_POSIX_SIGNALBLOCKING])
+ HAVE_PTHREAD_SIGMASK=1; AC_SUBST([HAVE_PTHREAD_SIGMASK])
+ HAVE_RAISE=1; AC_SUBST([HAVE_RAISE])
HAVE_SIGSET_T=1; AC_SUBST([HAVE_SIGSET_T])
HAVE_SIGINFO_T=1; AC_SUBST([HAVE_SIGINFO_T])
HAVE_SIGACTION=1; AC_SUBST([HAVE_SIGACTION])
@@ -46,4 +77,7 @@ AC_DEFUN([gl_SIGNAL_H_DEFAULTS],
AC_SUBST([HAVE_STRUCT_SIGACTION_SA_SIGACTION])
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
AC_SUBST([HAVE_TYPE_VOLATILE_SIG_ATOMIC_T])
+ HAVE_SIGHANDLER_T=1; AC_SUBST([HAVE_SIGHANDLER_T])
+ REPLACE_PTHREAD_SIGMASK=0; AC_SUBST([REPLACE_PTHREAD_SIGMASK])
+ REPLACE_RAISE=0; AC_SUBST([REPLACE_RAISE])
])
diff --git a/m4/signalblocking.m4 b/m4/signalblocking.m4
index 5ad8dbf..a00e704 100644
--- a/m4/signalblocking.m4
+++ b/m4/signalblocking.m4
@@ -1,5 +1,5 @@
-# signalblocking.m4 serial 10
-dnl Copyright (C) 2001-2002, 2006-2011 Free Software Foundation, Inc.
+# signalblocking.m4 serial 14
+dnl Copyright (C) 2001-2002, 2006-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -12,31 +12,14 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_SIGNALBLOCKING],
[
AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
- signals_not_posix=
- AC_EGREP_HEADER([sigset_t], [signal.h], , [signals_not_posix=1])
- if test -z "$signals_not_posix"; then
+ AC_REQUIRE([gl_CHECK_TYPE_SIGSET_T])
+ if test $gl_cv_type_sigset_t = yes; then
AC_CHECK_FUNC([sigprocmask], [gl_cv_func_sigprocmask=1])
fi
if test -z "$gl_cv_func_sigprocmask"; then
HAVE_POSIX_SIGNALBLOCKING=0
- AC_LIBOBJ([sigprocmask])
- gl_PREREQ_SIGPROCMASK
fi
])
-# Prerequisites of the part of lib/signal.in.h and of lib/sigprocmask.c.
-AC_DEFUN([gl_PREREQ_SIGPROCMASK],
-[
- AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
- AC_CHECK_TYPES([sigset_t],
- [gl_cv_type_sigset_t=yes], [gl_cv_type_sigset_t=no],
- [#include <signal.h>
-/* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
-#include <sys/types.h>])
- if test $gl_cv_type_sigset_t != yes; then
- HAVE_SIGSET_T=0
- fi
- dnl HAVE_SIGSET_T is 1 if the system lacks the sigprocmask function but has
- dnl the sigset_t type.
- AC_SUBST([HAVE_SIGSET_T])
-])
+# Prerequisites of lib/sigprocmask.c.
+AC_DEFUN([gl_PREREQ_SIGPROCMASK], [:])
diff --git a/m4/signbit.m4 b/m4/signbit.m4
index 6973a71..d58caaf 100644
--- a/m4/signbit.m4
+++ b/m4/signbit.m4
@@ -1,5 +1,5 @@
-# signbit.m4 serial 9
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+# signbit.m4 serial 13
+dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_SIGNBIT],
[
AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([for signbit macro], [gl_cv_func_signbit],
[
AC_RUN_IFELSE(
@@ -27,7 +28,13 @@ AC_DEFUN([gl_SIGNBIT],
])],
[gl_cv_func_signbit=yes],
[gl_cv_func_signbit=no],
- [gl_cv_func_signbit="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_signbit="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_signbit="guessing no" ;;
+ esac
+ ])
])
dnl GCC 4.0 and newer provides three built-ins for signbit.
dnl They can be used without warnings, also in C++, regardless of <math.h>.
@@ -50,89 +57,99 @@ AC_DEFUN([gl_SIGNBIT],
])],
[gl_cv_func_signbit_gcc=yes],
[gl_cv_func_signbit_gcc=no],
- [gl_cv_func_signbit_gcc="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_signbit_gcc="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_signbit_gcc="guessing no" ;;
+ esac
+ ])
])
dnl Use the compiler built-ins whenever possible, because they are more
dnl efficient than the system library functions (if they exist).
- if test "$gl_cv_func_signbit_gcc" = yes; then
- REPLACE_SIGNBIT_USING_GCC=1
- else
- if test "$gl_cv_func_signbit" != yes; then
- REPLACE_SIGNBIT=1
- AC_LIBOBJ([signbitf])
- AC_LIBOBJ([signbitd])
- AC_LIBOBJ([signbitl])
- gl_FLOAT_SIGN_LOCATION
- gl_DOUBLE_SIGN_LOCATION
- gl_LONG_DOUBLE_SIGN_LOCATION
- if test "$gl_cv_cc_float_signbit" = unknown; then
- dnl Test whether copysignf() is declared.
- AC_CHECK_DECLS([copysignf], , , [#include <math.h>])
- if test "$ac_cv_have_decl_copysignf" = yes; then
- dnl Test whether copysignf() can be used without libm.
- AC_CACHE_CHECK([whether copysignf can be used without linking with libm],
- [gl_cv_func_copysignf_no_libm],
- [
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <math.h>
- float x, y;]],
- [[return copysignf (x, y) < 0;]])],
- [gl_cv_func_copysignf_no_libm=yes],
- [gl_cv_func_copysignf_no_libm=no])
- ])
- if test $gl_cv_func_copysignf_no_libm = yes; then
- AC_DEFINE([HAVE_COPYSIGNF_IN_LIBC], [1],
- [Define if the copysignf function is declared in <math.h> and available in libc.])
+ case "$gl_cv_func_signbit_gcc" in
+ *yes)
+ REPLACE_SIGNBIT_USING_GCC=1
+ ;;
+ *)
+ case "$gl_cv_func_signbit" in
+ *yes) ;;
+ *)
+ dnl REPLACE_SIGNBIT=1 makes sure the signbit[fdl] functions get built.
+ REPLACE_SIGNBIT=1
+ gl_FLOAT_SIGN_LOCATION
+ gl_DOUBLE_SIGN_LOCATION
+ gl_LONG_DOUBLE_SIGN_LOCATION
+ if test "$gl_cv_cc_float_signbit" = unknown; then
+ dnl Test whether copysignf() is declared.
+ AC_CHECK_DECLS([copysignf], , , [[#include <math.h>]])
+ if test "$ac_cv_have_decl_copysignf" = yes; then
+ dnl Test whether copysignf() can be used without libm.
+ AC_CACHE_CHECK([whether copysignf can be used without linking with libm],
+ [gl_cv_func_copysignf_no_libm],
+ [
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <math.h>
+ float x, y;]],
+ [[return copysignf (x, y) < 0;]])],
+ [gl_cv_func_copysignf_no_libm=yes],
+ [gl_cv_func_copysignf_no_libm=no])
+ ])
+ if test $gl_cv_func_copysignf_no_libm = yes; then
+ AC_DEFINE([HAVE_COPYSIGNF_IN_LIBC], [1],
+ [Define if the copysignf function is declared in <math.h> and available in libc.])
+ fi
+ fi
fi
- fi
- fi
- if test "$gl_cv_cc_double_signbit" = unknown; then
- dnl Test whether copysign() is declared.
- AC_CHECK_DECLS([copysign], , , [#include <math.h>])
- if test "$ac_cv_have_decl_copysign" = yes; then
- dnl Test whether copysign() can be used without libm.
- AC_CACHE_CHECK([whether copysign can be used without linking with libm],
- [gl_cv_func_copysign_no_libm],
- [
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <math.h>
- double x, y;]],
- [[return copysign (x, y) < 0;]])],
- [gl_cv_func_copysign_no_libm=yes],
- [gl_cv_func_copysign_no_libm=no])
- ])
- if test $gl_cv_func_copysign_no_libm = yes; then
- AC_DEFINE([HAVE_COPYSIGN_IN_LIBC], [1],
- [Define if the copysign function is declared in <math.h> and available in libc.])
+ if test "$gl_cv_cc_double_signbit" = unknown; then
+ dnl Test whether copysign() is declared.
+ AC_CHECK_DECLS([copysign], , , [[#include <math.h>]])
+ if test "$ac_cv_have_decl_copysign" = yes; then
+ dnl Test whether copysign() can be used without libm.
+ AC_CACHE_CHECK([whether copysign can be used without linking with libm],
+ [gl_cv_func_copysign_no_libm],
+ [
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <math.h>
+ double x, y;]],
+ [[return copysign (x, y) < 0;]])],
+ [gl_cv_func_copysign_no_libm=yes],
+ [gl_cv_func_copysign_no_libm=no])
+ ])
+ if test $gl_cv_func_copysign_no_libm = yes; then
+ AC_DEFINE([HAVE_COPYSIGN_IN_LIBC], [1],
+ [Define if the copysign function is declared in <math.h> and available in libc.])
+ fi
+ fi
fi
- fi
- fi
- if test "$gl_cv_cc_long_double_signbit" = unknown; then
- dnl Test whether copysignl() is declared.
- AC_CHECK_DECLS([copysignl], , , [#include <math.h>])
- if test "$ac_cv_have_decl_copysignl" = yes; then
- dnl Test whether copysignl() can be used without libm.
- AC_CACHE_CHECK([whether copysignl can be used without linking with libm],
- [gl_cv_func_copysignl_no_libm],
- [
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <math.h>
- long double x, y;]],
- [[return copysignl (x, y) < 0;]])],
- [gl_cv_func_copysignl_no_libm=yes],
- [gl_cv_func_copysignl_no_libm=no])
- ])
- if test $gl_cv_func_copysignl_no_libm = yes; then
- AC_DEFINE([HAVE_COPYSIGNL_IN_LIBC], [1],
- [Define if the copysignl function is declared in <math.h> and available in libc.])
+ if test "$gl_cv_cc_long_double_signbit" = unknown; then
+ dnl Test whether copysignl() is declared.
+ AC_CHECK_DECLS([copysignl], , , [[#include <math.h>]])
+ if test "$ac_cv_have_decl_copysignl" = yes; then
+ dnl Test whether copysignl() can be used without libm.
+ AC_CACHE_CHECK([whether copysignl can be used without linking with libm],
+ [gl_cv_func_copysignl_no_libm],
+ [
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <math.h>
+ long double x, y;]],
+ [[return copysignl (x, y) < 0;]])],
+ [gl_cv_func_copysignl_no_libm=yes],
+ [gl_cv_func_copysignl_no_libm=no])
+ ])
+ if test $gl_cv_func_copysignl_no_libm = yes; then
+ AC_DEFINE([HAVE_COPYSIGNL_IN_LIBC], [1],
+ [Define if the copysignl function is declared in <math.h> and available in libc.])
+ fi
+ fi
fi
- fi
- fi
- fi
- fi
+ ;;
+ esac
+ ;;
+ esac
])
AC_DEFUN([gl_SIGNBIT_TEST_PROGRAM], [[
@@ -153,7 +170,7 @@ double m0d = -p0d;
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
So we use another constant expression instead.
But that expression does not work on other platforms, such as when
- cross-compiling to PowerPC on MacOS X 10.5. */
+ cross-compiling to PowerPC on Mac OS X 10.5. */
long double p0l = 0.0L;
#if defined __hpux || defined __sgi
long double m0l = -LDBL_MIN * LDBL_MIN;
diff --git a/m4/sigpipe.m4 b/m4/sigpipe.m4
new file mode 100644
index 0000000..169889d
--- /dev/null
+++ b/m4/sigpipe.m4
@@ -0,0 +1,29 @@
+# sigpipe.m4 serial 2
+dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Tests whether SIGPIPE is provided by <signal.h>.
+dnl Sets gl_cv_header_signal_h_SIGPIPE.
+AC_DEFUN([gl_SIGNAL_SIGPIPE],
+[
+ 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_SIGNAL_SIGPIPE_BODY])
+])
+
+AC_DEFUN([gl_SIGNAL_SIGPIPE_BODY],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_CACHE_CHECK([for SIGPIPE], [gl_cv_header_signal_h_SIGPIPE], [
+ AC_EGREP_CPP([booboo],[
+#include <signal.h>
+#if !defined SIGPIPE
+booboo
+#endif
+ ],
+ [gl_cv_header_signal_h_SIGPIPE=no],
+ [gl_cv_header_signal_h_SIGPIPE=yes])
+ ])
+])
diff --git a/m4/size_max.m4 b/m4/size_max.m4
index e807098..4b247ab 100644
--- a/m4/size_max.m4
+++ b/m4/size_max.m4
@@ -1,5 +1,5 @@
# size_max.m4 serial 10
-dnl Copyright (C) 2003, 2005-2006, 2008-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2006, 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/sleep.m4 b/m4/sleep.m4
new file mode 100644
index 0000000..a27baa6
--- /dev/null
+++ b/m4/sleep.m4
@@ -0,0 +1,62 @@
+# sleep.m4 serial 7
+dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_SLEEP],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ dnl We expect to see the declaration of sleep() in a header file.
+ dnl Older versions of mingw have a sleep() function that is an alias to
+ dnl _sleep() in MSVCRT. It has a different signature than POSIX sleep():
+ dnl it takes the number of milliseconds as argument and returns void.
+ dnl mingw does not declare this function.
+ AC_CHECK_DECLS([sleep], , , [[#include <unistd.h>]])
+ AC_CHECK_FUNCS_ONCE([sleep])
+ if test $ac_cv_have_decl_sleep != yes; then
+ HAVE_SLEEP=0
+ else
+ dnl Cygwin 1.5.x has a bug where sleep can't exceed 49.7 days.
+ AC_CACHE_CHECK([for working sleep], [gl_cv_func_sleep_works],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <errno.h>
+#include <unistd.h>
+#include <signal.h>
+static void
+handle_alarm (int sig)
+{
+ if (sig != SIGALRM)
+ _exit (2);
+}
+]], [[
+ /* Failure to compile this test due to missing alarm is okay,
+ since all such platforms (mingw) also lack sleep. */
+ unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */
+ unsigned int remaining;
+ signal (SIGALRM, handle_alarm);
+ alarm (1);
+ remaining = sleep (pentecost);
+ if (remaining > pentecost)
+ return 3;
+ if (remaining <= pentecost - 10)
+ return 4;
+ return 0;
+ ]])],
+ [gl_cv_func_sleep_works=yes], [gl_cv_func_sleep_works=no],
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_sleep_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_sleep_works="guessing no" ;;
+ esac
+ ])])
+ case "$gl_cv_func_sleep_works" in
+ *yes) ;;
+ *)
+ REPLACE_SLEEP=1
+ ;;
+ esac
+ fi
+])
diff --git a/m4/snprintf.m4 b/m4/snprintf.m4
index 8aa5dbe..3698e84 100644
--- a/m4/snprintf.m4
+++ b/m4/snprintf.m4
@@ -1,9 +1,13 @@
-# snprintf.m4 serial 5
-dnl Copyright (C) 2002-2004, 2007-2011 Free Software Foundation, Inc.
+# snprintf.m4 serial 6
+dnl Copyright (C) 2002-2004, 2007-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl Libintl 0.17 will replace snprintf only if it does not support %1$s,
+dnl but defers to any gnulib snprintf replacements. Therefore, gnulib
+dnl must guarantee that the decision for replacing snprintf is a superset
+dnl of the reasons checked by libintl.
AC_DEFUN([gl_FUNC_SNPRINTF],
[
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
@@ -16,7 +20,12 @@ AC_DEFUN([gl_FUNC_SNPRINTF],
gl_SNPRINTF_RETVAL_C99
case "$gl_cv_func_snprintf_retval_c99" in
*yes)
- gl_cv_func_snprintf_usable=yes
+ gl_PRINTF_POSITIONS
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ gl_cv_func_snprintf_usable=yes
+ ;;
+ esac
;;
esac
;;
diff --git a/m4/spawn-pipe.m4 b/m4/spawn-pipe.m4
index 05df507..d272935 100644
--- a/m4/spawn-pipe.m4
+++ b/m4/spawn-pipe.m4
@@ -1,5 +1,5 @@
-# spawn-pipe.m4 serial 1
-dnl Copyright (C) 2004, 2008-2011 Free Software Foundation, Inc.
+# spawn-pipe.m4 serial 2
+dnl Copyright (C) 2004, 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,6 +7,5 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_SPAWN_PIPE],
[
dnl Prerequisites of lib/spawn-pipe.c.
- AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([AC_TYPE_MODE_T])
])
diff --git a/m4/spawn_h.m4 b/m4/spawn_h.m4
index a044e37..ba08c5d 100644
--- a/m4/spawn_h.m4
+++ b/m4/spawn_h.m4
@@ -1,5 +1,5 @@
-# spawn_h.m4 serial 12
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# spawn_h.m4 serial 16
+dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -28,10 +28,15 @@ AC_DEFUN([gl_SPAWN_H],
HAVE_SPAWN_H=0
HAVE_POSIX_SPAWNATTR_T=0
HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
- gl_REPLACE_SPAWN_H
fi
AC_SUBST([HAVE_SPAWN_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])
+
AC_REQUIRE([gl_HAVE_POSIX_SPAWN])
AC_REQUIRE([AC_C_RESTRICT])
@@ -65,13 +70,6 @@ AC_DEFUN([gl_HAVE_POSIX_SPAWN],
fi
])
-dnl Unconditionally enables the replacement of <spawn.h>.
-AC_DEFUN([gl_REPLACE_SPAWN_H],
-[
- dnl This is a no-op, because <spawn.h> is always overridden.
- :
-])
-
AC_DEFUN([gl_SPAWN_MODULE_INDICATOR],
[
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
@@ -110,4 +108,10 @@ AC_DEFUN([gl_SPAWN_H_DEFAULTS],
HAVE_POSIX_SPAWN_FILE_ACTIONS_T=1;
AC_SUBST([HAVE_POSIX_SPAWN_FILE_ACTIONS_T])
REPLACE_POSIX_SPAWN=0; AC_SUBST([REPLACE_POSIX_SPAWN])
+ REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
+ AC_SUBST([REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE])
+ REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
+ AC_SUBST([REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2])
+ REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
+ AC_SUBST([REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN])
])
diff --git a/m4/ssize_t.m4 b/m4/ssize_t.m4
index d712752..6338134 100644
--- a/m4/ssize_t.m4
+++ b/m4/ssize_t.m4
@@ -1,5 +1,5 @@
# ssize_t.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2001-2003, 2006, 2010-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2003, 2006, 2010-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/stat.m4 b/m4/stat.m4
index 27f82d5..2456297 100644
--- a/m4/stat.m4
+++ b/m4/stat.m4
@@ -1,6 +1,6 @@
-# serial 7
+# serial 11
-# Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -23,8 +23,9 @@ AC_DEFUN([gl_FUNC_STAT],
mingw*) gl_cv_func_stat_dir_slash="guessing no";;
*) gl_cv_func_stat_dir_slash="guessing yes";;
esac])])
- dnl AIX 7.1, Solaris 9 mistakenly succeed on stat("file/")
- dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/")
+ dnl AIX 7.1, Solaris 9, mingw64 mistakenly succeed on stat("file/").
+ dnl (For mingw, this is due to a broken stat() override in libmingwex.a.)
+ dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/").
AC_CACHE_CHECK([whether stat handles trailing slashes on files],
[gl_cv_func_stat_file_slash],
[touch conftest.tmp
@@ -46,7 +47,13 @@ AC_DEFUN([gl_FUNC_STAT],
return result;
]])],
[gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no],
- [gl_cv_func_stat_file_slash="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_stat_file_slash="guessing no" ;;
+ esac
+ ])
rm -f conftest.tmp conftest.lnk])
case $gl_cv_func_stat_dir_slash in
*no) REPLACE_STAT=1
@@ -58,9 +65,7 @@ AC_DEFUN([gl_FUNC_STAT],
AC_DEFINE([REPLACE_FUNC_STAT_FILE], [1], [Define to 1 if stat needs
help when passed a file name with a trailing slash]);;
esac
- if test $REPLACE_STAT = 1; then
- AC_LIBOBJ([stat])
- dnl Prerequisites of lib/stat.c.
- AC_REQUIRE([AC_C_INLINE])
- fi
])
+
+# Prerequisites of lib/stat.c.
+AC_DEFUN([gl_PREREQ_STAT], [:])
diff --git a/m4/stdarg.m4 b/m4/stdarg.m4
index a1ef178..c087f61 100644
--- a/m4/stdarg.m4
+++ b/m4/stdarg.m4
@@ -1,5 +1,5 @@
-# stdarg.m4 serial 5
-dnl Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc.
+# stdarg.m4 serial 6
+dnl Copyright (C) 2006, 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -9,8 +9,8 @@ dnl Provide a working va_copy in combination with <stdarg.h>.
AC_DEFUN([gl_STDARG_H],
[
- STDARG_H=''; AC_SUBST([STDARG_H])
- NEXT_STDARG_H='<stdarg.h>'; AC_SUBST([NEXT_STDARG_H])
+ STDARG_H=''
+ NEXT_STDARG_H='<stdarg.h>'
AC_MSG_CHECKING([for va_copy])
AC_CACHE_VAL([gl_cv_func_va_copy], [
AC_COMPILE_IFELSE(
@@ -72,4 +72,7 @@ error, bail out
fi
fi
fi
+ AC_SUBST([STDARG_H])
+ AM_CONDITIONAL([GL_GENERATE_STDARG_H], [test -n "$STDARG_H"])
+ AC_SUBST([NEXT_STDARG_H])
])
diff --git a/m4/stdbool.m4 b/m4/stdbool.m4
index 838cf0f..80d5559 100644
--- a/m4/stdbool.m4
+++ b/m4/stdbool.m4
@@ -1,11 +1,11 @@
# Check for stdbool.h that conforms to C99.
-dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-#serial 4
+#serial 5
# Prepare for substituting <stdbool.h> if it is not supported.
@@ -21,6 +21,7 @@ AC_DEFUN([AM_STDBOOL_H],
STDBOOL_H='stdbool.h'
fi
AC_SUBST([STDBOOL_H])
+ AM_CONDITIONAL([GL_GENERATE_STDBOOL_H], [test -n "$STDBOOL_H"])
if test "$ac_cv_type__Bool" = yes; then
HAVE__BOOL=1
diff --git a/m4/stddef_h.m4 b/m4/stddef_h.m4
index 1942b6a..5da8ab1 100644
--- a/m4/stddef_h.m4
+++ b/m4/stddef_h.m4
@@ -1,6 +1,6 @@
dnl A placeholder for POSIX 2008 <stddef.h>, for platforms that have issues.
-# stddef_h.m4 serial 3
-dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# stddef_h.m4 serial 4
+dnl Copyright (C) 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -9,6 +9,7 @@ AC_DEFUN([gl_STDDEF_H],
[
AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
AC_REQUIRE([gt_TYPE_WCHAR_T])
+ STDDEF_H=
if test $gt_cv_c_wchar_t = no; then
HAVE_WCHAR_T=0
STDDEF_H=stddef.h
@@ -24,6 +25,8 @@ AC_DEFUN([gl_STDDEF_H],
REPLACE_NULL=1
STDDEF_H=stddef.h
fi
+ AC_SUBST([STDDEF_H])
+ AM_CONDITIONAL([GL_GENERATE_STDDEF_H], [test -n "$STDDEF_H"])
if test -n "$STDDEF_H"; then
gl_NEXT_HEADERS([stddef.h])
fi
@@ -41,5 +44,4 @@ AC_DEFUN([gl_STDDEF_H_DEFAULTS],
dnl Assume proper GNU behavior unless another module says otherwise.
REPLACE_NULL=0; AC_SUBST([REPLACE_NULL])
HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T])
- STDDEF_H=''; AC_SUBST([STDDEF_H])
])
diff --git a/m4/stdint.m4 b/m4/stdint.m4
index e7d0d07..27cdcdb 100644
--- a/m4/stdint.m4
+++ b/m4/stdint.m4
@@ -1,5 +1,5 @@
-# stdint.m4 serial 39
-dnl Copyright (C) 2001-2011 Free Software Foundation, Inc.
+# stdint.m4 serial 43
+dnl Copyright (C) 2001-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
dnl From Paul Eggert and Bruno Haible.
dnl Test whether <stdint.h> is supported or must be substituted.
-AC_DEFUN([gl_STDINT_H],
+AC_DEFUN_ONCE([gl_STDINT_H],
[
AC_PREREQ([2.59])dnl
@@ -69,8 +69,6 @@ AC_DEFUN([gl_STDINT_H],
[gl_cv_header_working_stdint_h=no
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
-#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
-#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
#include <stdint.h>
/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
@@ -219,8 +217,6 @@ struct s {
dnl This detects a bug on HP-UX 11.23/ia64.
AC_RUN_IFELSE([
AC_LANG_PROGRAM([[
-#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
-#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
#include <stdint.h>
]
@@ -305,6 +301,7 @@ static const char *macro_values[] =
STDINT_H=stdint.h
fi
AC_SUBST([STDINT_H])
+ AM_CONDITIONAL([GL_GENERATE_STDINT_H], [test -n "$STDINT_H"])
])
dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES)
@@ -465,6 +462,14 @@ AC_DEFUN([gl_STDINT_TYPE_PROPERTIES],
fi
gl_INTEGER_TYPE_SUFFIX([sig_atomic_t wchar_t wint_t],
[gl_STDINT_INCLUDES])
+
+ dnl If wint_t is smaller than 'int', it cannot satisfy the ISO C 99
+ dnl requirement that wint_t is "unchanged by default argument promotions".
+ dnl In this case gnulib's <wchar.h> and <wctype.h> override wint_t.
+ dnl Set the variable BITSIZEOF_WINT_T accordingly.
+ if test $BITSIZEOF_WINT_T -lt 32; then
+ BITSIZEOF_WINT_T=32
+ fi
])
dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in.
diff --git a/m4/stdint_h.m4 b/m4/stdint_h.m4
index 356b14e..511ab4e 100644
--- a/m4/stdint_h.m4
+++ b/m4/stdint_h.m4
@@ -1,5 +1,5 @@
# stdint_h.m4 serial 9
-dnl Copyright (C) 1997-2004, 2006, 2008-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006, 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/stdio-safer.m4 b/m4/stdio-safer.m4
deleted file mode 100644
index 0cf08c2..0000000
--- a/m4/stdio-safer.m4
+++ /dev/null
@@ -1,25 +0,0 @@
-#serial 12
-dnl Copyright (C) 2002, 2005-2007, 2009-2011 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_FOPEN_SAFER],
-[
- AC_LIBOBJ([fopen-safer])
-])
-
-AC_DEFUN([gl_FREOPEN_SAFER],
-[
- AC_LIBOBJ([freopen-safer])
-])
-
-AC_DEFUN([gl_POPEN_SAFER],
-[
- AC_LIBOBJ([popen-safer])
-])
-
-AC_DEFUN([gl_TMPFILE_SAFER],
-[
- AC_LIBOBJ([tmpfile-safer])
-])
diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4
index 7f3ae56..ebade06 100644
--- a/m4/stdio_h.m4
+++ b/m4/stdio_h.m4
@@ -1,5 +1,5 @@
-# stdio_h.m4 serial 33
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+# stdio_h.m4 serial 43
+dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,8 +7,32 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_STDIO_H],
[
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
- AC_REQUIRE([AC_C_INLINE])
gl_NEXT_HEADERS([stdio.h])
+
+ dnl No need to create extra modules for these functions. Everyone who uses
+ dnl <stdio.h> likely needs them.
+ GNULIB_FSCANF=1
+ gl_MODULE_INDICATOR([fscanf])
+ GNULIB_SCANF=1
+ gl_MODULE_INDICATOR([scanf])
+ GNULIB_FGETC=1
+ GNULIB_GETC=1
+ GNULIB_GETCHAR=1
+ 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 <stdio.h> likely needs them.
GNULIB_FPRINTF=1
@@ -21,9 +45,11 @@ AC_DEFUN([gl_STDIO_H],
GNULIB_FPUTS=1
GNULIB_PUTS=1
GNULIB_FWRITE=1
- dnl This ifdef is just an optimization, to avoid performing a configure
- dnl check whose result is not used. It does not make the test of
- dnl GNULIB_STDIO_H_SIGPIPE or GNULIB_SIGPIPE redundant.
+ dnl This ifdef is necessary to avoid an error "missing file lib/stdio-write.c"
+ dnl "expected source file, required through AC_LIBSOURCES, not found". It is
+ dnl also an optimization, to avoid performing a configure check whose result
+ dnl is not used. But it does not make the test of GNULIB_STDIO_H_SIGPIPE or
+ dnl GNULIB_SIGPIPE redundant.
m4_ifdef([gl_SIGNAL_SIGPIPE], [
gl_SIGNAL_SIGPIPE
if test $gl_cv_header_signal_h_SIGPIPE != yes; then
@@ -31,13 +57,25 @@ AC_DEFUN([gl_STDIO_H],
AC_LIBOBJ([stdio-write])
fi
])
+ dnl This ifdef is necessary to avoid an error "missing file lib/stdio-write.c"
+ dnl "expected source file, required through AC_LIBSOURCES, not found". It is
+ dnl also an optimization, to avoid performing a configure check whose result
+ dnl is not used. But it does not make the test of GNULIB_STDIO_H_NONBLOCKING
+ dnl or GNULIB_NONBLOCKING redundant.
+ m4_ifdef([gl_NONBLOCKING_IO], [
+ gl_NONBLOCKING_IO
+ if test $gl_cv_have_nonblocking != yes; then
+ REPLACE_STDIO_WRITE_FUNCS=1
+ AC_LIBOBJ([stdio-write])
+ fi
+ ])
dnl Check for declarations of anything we want to poison if the
dnl corresponding gnulib module is not in use, and which is not
- dnl guaranteed by C89.
+ dnl guaranteed by both C89 and C11.
gl_WARN_ON_USE_PREPARE([[#include <stdio.h>
- ]], [dprintf fpurge fseeko ftello getdelim getline popen renameat
- snprintf tmpfile vdprintf vsnprintf])
+ ]], [dprintf fpurge fseeko ftello getdelim getline gets pclose popen
+ renameat snprintf tmpfile vdprintf vsnprintf])
])
AC_DEFUN([gl_STDIO_MODULE_INDICATOR],
@@ -53,23 +91,31 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS],
[
GNULIB_DPRINTF=0; AC_SUBST([GNULIB_DPRINTF])
GNULIB_FCLOSE=0; AC_SUBST([GNULIB_FCLOSE])
+ GNULIB_FDOPEN=0; AC_SUBST([GNULIB_FDOPEN])
GNULIB_FFLUSH=0; AC_SUBST([GNULIB_FFLUSH])
+ GNULIB_FGETC=0; AC_SUBST([GNULIB_FGETC])
+ GNULIB_FGETS=0; AC_SUBST([GNULIB_FGETS])
GNULIB_FOPEN=0; AC_SUBST([GNULIB_FOPEN])
GNULIB_FPRINTF=0; AC_SUBST([GNULIB_FPRINTF])
GNULIB_FPRINTF_POSIX=0; AC_SUBST([GNULIB_FPRINTF_POSIX])
GNULIB_FPURGE=0; AC_SUBST([GNULIB_FPURGE])
GNULIB_FPUTC=0; AC_SUBST([GNULIB_FPUTC])
GNULIB_FPUTS=0; AC_SUBST([GNULIB_FPUTS])
+ GNULIB_FREAD=0; AC_SUBST([GNULIB_FREAD])
GNULIB_FREOPEN=0; AC_SUBST([GNULIB_FREOPEN])
+ GNULIB_FSCANF=0; AC_SUBST([GNULIB_FSCANF])
GNULIB_FSEEK=0; AC_SUBST([GNULIB_FSEEK])
GNULIB_FSEEKO=0; AC_SUBST([GNULIB_FSEEKO])
GNULIB_FTELL=0; AC_SUBST([GNULIB_FTELL])
GNULIB_FTELLO=0; AC_SUBST([GNULIB_FTELLO])
GNULIB_FWRITE=0; AC_SUBST([GNULIB_FWRITE])
+ GNULIB_GETC=0; AC_SUBST([GNULIB_GETC])
+ GNULIB_GETCHAR=0; AC_SUBST([GNULIB_GETCHAR])
GNULIB_GETDELIM=0; AC_SUBST([GNULIB_GETDELIM])
GNULIB_GETLINE=0; AC_SUBST([GNULIB_GETLINE])
GNULIB_OBSTACK_PRINTF=0; AC_SUBST([GNULIB_OBSTACK_PRINTF])
GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX])
+ GNULIB_PCLOSE=0; AC_SUBST([GNULIB_PCLOSE])
GNULIB_PERROR=0; AC_SUBST([GNULIB_PERROR])
GNULIB_POPEN=0; AC_SUBST([GNULIB_POPEN])
GNULIB_PRINTF=0; AC_SUBST([GNULIB_PRINTF])
@@ -80,11 +126,15 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS],
GNULIB_REMOVE=0; AC_SUBST([GNULIB_REMOVE])
GNULIB_RENAME=0; AC_SUBST([GNULIB_RENAME])
GNULIB_RENAMEAT=0; AC_SUBST([GNULIB_RENAMEAT])
+ GNULIB_SCANF=0; AC_SUBST([GNULIB_SCANF])
GNULIB_SNPRINTF=0; AC_SUBST([GNULIB_SNPRINTF])
GNULIB_SPRINTF_POSIX=0; AC_SUBST([GNULIB_SPRINTF_POSIX])
+ GNULIB_STDIO_H_NONBLOCKING=0; AC_SUBST([GNULIB_STDIO_H_NONBLOCKING])
GNULIB_STDIO_H_SIGPIPE=0; AC_SUBST([GNULIB_STDIO_H_SIGPIPE])
GNULIB_TMPFILE=0; AC_SUBST([GNULIB_TMPFILE])
GNULIB_VASPRINTF=0; AC_SUBST([GNULIB_VASPRINTF])
+ GNULIB_VFSCANF=0; AC_SUBST([GNULIB_VFSCANF])
+ GNULIB_VSCANF=0; AC_SUBST([GNULIB_VSCANF])
GNULIB_VDPRINTF=0; AC_SUBST([GNULIB_VDPRINTF])
GNULIB_VFPRINTF=0; AC_SUBST([GNULIB_VFPRINTF])
GNULIB_VFPRINTF_POSIX=0; AC_SUBST([GNULIB_VFPRINTF_POSIX])
@@ -104,11 +154,14 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS],
HAVE_DPRINTF=1; AC_SUBST([HAVE_DPRINTF])
HAVE_FSEEKO=1; AC_SUBST([HAVE_FSEEKO])
HAVE_FTELLO=1; AC_SUBST([HAVE_FTELLO])
+ HAVE_PCLOSE=1; AC_SUBST([HAVE_PCLOSE])
+ HAVE_POPEN=1; AC_SUBST([HAVE_POPEN])
HAVE_RENAMEAT=1; AC_SUBST([HAVE_RENAMEAT])
HAVE_VASPRINTF=1; AC_SUBST([HAVE_VASPRINTF])
HAVE_VDPRINTF=1; AC_SUBST([HAVE_VDPRINTF])
REPLACE_DPRINTF=0; AC_SUBST([REPLACE_DPRINTF])
REPLACE_FCLOSE=0; AC_SUBST([REPLACE_FCLOSE])
+ REPLACE_FDOPEN=0; AC_SUBST([REPLACE_FDOPEN])
REPLACE_FFLUSH=0; AC_SUBST([REPLACE_FFLUSH])
REPLACE_FOPEN=0; AC_SUBST([REPLACE_FOPEN])
REPLACE_FPRINTF=0; AC_SUBST([REPLACE_FPRINTF])
@@ -129,6 +182,7 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS],
REPLACE_RENAMEAT=0; AC_SUBST([REPLACE_RENAMEAT])
REPLACE_SNPRINTF=0; AC_SUBST([REPLACE_SNPRINTF])
REPLACE_SPRINTF=0; AC_SUBST([REPLACE_SPRINTF])
+ REPLACE_STDIO_READ_FUNCS=0; AC_SUBST([REPLACE_STDIO_READ_FUNCS])
REPLACE_STDIO_WRITE_FUNCS=0; AC_SUBST([REPLACE_STDIO_WRITE_FUNCS])
REPLACE_TMPFILE=0; AC_SUBST([REPLACE_TMPFILE])
REPLACE_VASPRINTF=0; AC_SUBST([REPLACE_VASPRINTF])
diff --git a/m4/stdlib-safer.m4 b/m4/stdlib-safer.m4
deleted file mode 100644
index 692624c..0000000
--- a/m4/stdlib-safer.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-# stdlib-safer.m4 serial 2
-dnl Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_STDLIB_SAFER],
-[
- AC_LIBOBJ([mkstemp-safer])
-])
diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4
index 25fdada..2027ab3 100644
--- a/m4/stdlib_h.m4
+++ b/m4/stdlib_h.m4
@@ -1,5 +1,5 @@
-# stdlib_h.m4 serial 37
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+# stdlib_h.m4 serial 42
+dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -19,10 +19,11 @@ AC_DEFUN([gl_STDLIB_H],
#if HAVE_RANDOM_H
# include <random.h>
#endif
- ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp
- mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r
- setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt
- unsetenv])
+ ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt
+ initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps
+ posix_openpt ptsname ptsname_r random random_r realpath rpmatch
+ secure_getenv setenv setstate setstate_r srandom srandom_r
+ strtod strtoll strtoull unlockpt unsetenv])
])
AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
@@ -50,12 +51,16 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
GNULIB_MKOSTEMPS=0; AC_SUBST([GNULIB_MKOSTEMPS])
GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP])
GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS])
+ GNULIB_POSIX_OPENPT=0; AC_SUBST([GNULIB_POSIX_OPENPT])
GNULIB_PTSNAME=0; AC_SUBST([GNULIB_PTSNAME])
+ GNULIB_PTSNAME_R=0; AC_SUBST([GNULIB_PTSNAME_R])
GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV])
+ GNULIB_RANDOM=0; AC_SUBST([GNULIB_RANDOM])
GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R])
GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH])
GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH])
+ GNULIB_SECURE_GETENV=0; AC_SUBST([GNULIB_SECURE_GETENV])
GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV])
GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD])
GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL])
@@ -76,11 +81,15 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS])
HAVE_MKSTEMP=1; AC_SUBST([HAVE_MKSTEMP])
HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS])
+ HAVE_POSIX_OPENPT=1; AC_SUBST([HAVE_POSIX_OPENPT])
HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME])
+ HAVE_PTSNAME_R=1; AC_SUBST([HAVE_PTSNAME_R])
+ HAVE_RANDOM=1; AC_SUBST([HAVE_RANDOM])
HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H])
HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R])
HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH])
HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH])
+ HAVE_SECURE_GETENV=1; AC_SUBST([HAVE_SECURE_GETENV])
HAVE_SETENV=1; AC_SUBST([HAVE_SETENV])
HAVE_DECL_SETENV=1; AC_SUBST([HAVE_DECL_SETENV])
HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD])
@@ -95,7 +104,10 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC])
REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC])
REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP])
+ REPLACE_PTSNAME=0; AC_SUBST([REPLACE_PTSNAME])
+ REPLACE_PTSNAME_R=0; AC_SUBST([REPLACE_PTSNAME_R])
REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV])
+ REPLACE_RANDOM_R=0; AC_SUBST([REPLACE_RANDOM_R])
REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC])
REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH])
REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV])
diff --git a/m4/strchrnul.m4 b/m4/strchrnul.m4
index a64e805..b59eda9 100644
--- a/m4/strchrnul.m4
+++ b/m4/strchrnul.m4
@@ -1,5 +1,5 @@
-# strchrnul.m4 serial 7
-dnl Copyright (C) 2003, 2007, 2009-2011 Free Software Foundation, Inc.
+# strchrnul.m4 serial 9
+dnl Copyright (C) 2003, 2007, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -10,10 +10,39 @@ AC_DEFUN([gl_FUNC_STRCHRNUL],
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
- AC_REPLACE_FUNCS([strchrnul])
+ AC_CHECK_FUNCS([strchrnul])
if test $ac_cv_func_strchrnul = no; then
HAVE_STRCHRNUL=0
- gl_PREREQ_STRCHRNUL
+ else
+ AC_CACHE_CHECK([whether strchrnul works],
+ [gl_cv_func_strchrnul_works],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <string.h> /* 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 <cygwin/version.h>
+ #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
])
diff --git a/m4/strdup.m4 b/m4/strdup.m4
index 3fb36dd..efe2d57 100644
--- a/m4/strdup.m4
+++ b/m4/strdup.m4
@@ -1,6 +1,6 @@
-# strdup.m4 serial 12
+# strdup.m4 serial 13
-dnl Copyright (C) 2002-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -10,10 +10,6 @@ AC_DEFUN([gl_FUNC_STRDUP],
[
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
AC_CHECK_FUNCS_ONCE([strdup])
- if test $ac_cv_func_strdup != yes; then
- AC_LIBOBJ([strdup])
- gl_PREREQ_STRDUP
- fi
AC_CHECK_DECLS_ONCE([strdup])
if test $ac_cv_have_decl_strdup = no; then
HAVE_DECL_STRDUP=0
@@ -28,12 +24,7 @@ AC_DEFUN([gl_FUNC_STRDUP_POSIX],
if test $ac_cv_func_strdup = yes; then
if test $gl_cv_func_malloc_posix != yes; then
REPLACE_STRDUP=1
- AC_LIBOBJ([strdup])
- gl_PREREQ_STRDUP
fi
- else
- AC_LIBOBJ([strdup])
- gl_PREREQ_STRDUP
fi
AC_CHECK_DECLS_ONCE([strdup])
if test $ac_cv_have_decl_strdup = no; then
diff --git a/m4/strerror.m4 b/m4/strerror.m4
index 73d1d54..3989844 100644
--- a/m4/strerror.m4
+++ b/m4/strerror.m4
@@ -1,68 +1,96 @@
-# strerror.m4 serial 9
-dnl Copyright (C) 2002, 2007-2011 Free Software Foundation, Inc.
+# strerror.m4 serial 17
+dnl Copyright (C) 2002, 2007-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_STRERROR],
[
- AC_REQUIRE([gl_FUNC_STRERROR_SEPARATE])
- if test $REPLACE_STRERROR = 1; then
- AC_LIBOBJ([strerror])
- AC_DEFINE_UNQUOTED([REPLACE_STRERROR], [$REPLACE_STRERROR],
- [Define this to 1 if strerror is broken.])
- fi
-])
-
-# Like gl_FUNC_STRERROR, except prepare for separate compilation (no AC_LIBOBJ).
-AC_DEFUN([gl_FUNC_STRERROR_SEPARATE],
-[
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
AC_REQUIRE([gl_HEADER_ERRNO_H])
- if test -z "$ERRNO_H"; then
+ AC_REQUIRE([gl_FUNC_STRERROR_0])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [
+ AC_REQUIRE([gl_FUNC_STRERROR_R_WORKS])
+ ])
+ if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
AC_CACHE_CHECK([for working strerror function],
[gl_cv_func_working_strerror],
[AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[[#include <string.h>
]],
- [[return !*strerror (-2);]])],
+ [[if (!*strerror (-2)) return 1;]])],
[gl_cv_func_working_strerror=yes],
[gl_cv_func_working_strerror=no],
- [dnl Assume crossbuild works if it compiles.
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <string.h>
- ]],
- [[return !*strerror (-2);]])],
- [gl_cv_func_working_strerror=yes],
- [gl_cv_func_working_strerror=no])
- ])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_working_strerror="guessing no" ;;
+ esac
+ ])
+ ])
+ case "$gl_cv_func_working_strerror" in
+ *yes) ;;
+ *)
+ dnl The system's strerror() fails to return a string for out-of-range
+ dnl integers. Replace it.
+ REPLACE_STRERROR=1
+ ;;
+ esac
+ m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [
+ dnl If the system's strerror_r or __xpg_strerror_r clobbers strerror's
+ dnl buffer, we must replace strerror.
+ case "$gl_cv_func_strerror_r_works" in
+ *no) REPLACE_STRERROR=1 ;;
+ esac
])
- if test $gl_cv_func_working_strerror = no; then
- dnl The system's strerror() fails to return a string for out-of-range
- dnl integers. Replace it.
- REPLACE_STRERROR=1
- fi
else
dnl The system's strerror() cannot know about the new errno values we add
- dnl to <errno.h>. Replace it.
+ dnl to <errno.h>, or any fix for strerror(0). Replace it.
REPLACE_STRERROR=1
fi
- if test $REPLACE_STRERROR = 1; then
- gl_PREREQ_STRERROR
- fi
])
-# Prerequisites of lib/strerror.c.
-AC_DEFUN([gl_PREREQ_STRERROR], [
- AC_CHECK_DECLS([strerror])
- AC_CHECK_HEADERS_ONCE([sys/socket.h])
- if test $ac_cv_header_sys_socket_h != yes; then
- dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make
- dnl the check for those headers unconditional; yet cygwin reports
- dnl that the headers are present but cannot be compiled (since on
- dnl cygwin, all socket information should come from sys/socket.h).
- AC_CHECK_HEADERS([winsock2.h])
- fi
+dnl Detect if strerror(0) passes (that is, does not set errno, and does not
+dnl return a string that matches strerror(-1)).
+AC_DEFUN([gl_FUNC_STRERROR_0],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ REPLACE_STRERROR_0=0
+ AC_CACHE_CHECK([whether strerror(0) succeeds],
+ [gl_cv_func_strerror_0_works],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <string.h>
+ #include <errno.h>
+ ]],
+ [[int result = 0;
+ char *str;
+ errno = 0;
+ str = strerror (0);
+ if (!*str) result |= 1;
+ if (errno) result |= 2;
+ if (strstr (str, "nknown") || strstr (str, "ndefined"))
+ result |= 4;
+ return result;]])],
+ [gl_cv_func_strerror_0_works=yes],
+ [gl_cv_func_strerror_0_works=no],
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_strerror_0_works="guessing no" ;;
+ esac
+ ])
+ ])
+ case "$gl_cv_func_strerror_0_works" in
+ *yes) ;;
+ *)
+ REPLACE_STRERROR_0=1
+ AC_DEFINE([REPLACE_STRERROR_0], [1], [Define to 1 if strerror(0)
+ does not return a message implying success.])
+ ;;
+ esac
])
diff --git a/m4/string_h.m4 b/m4/string_h.m4
index 30ddfbc..cc5fbbb 100644
--- a/m4/string_h.m4
+++ b/m4/string_h.m4
@@ -1,11 +1,11 @@
# Configure a GNU-like replacement for <string.h>.
-# Copyright (C) 2007-2011 Free Software Foundation, Inc.
+# Copyright (C) 2007-2013 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 19
+# serial 21
# Written by Paul Eggert.
@@ -27,9 +27,9 @@ AC_DEFUN([gl_HEADER_STRING_H_BODY],
dnl guaranteed by C89.
gl_WARN_ON_USE_PREPARE([[#include <string.h>
]],
- [memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup
- strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r
- strsignal strverscmp])
+ [ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul
+ strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r
+ strerror_r strsignal strverscmp])
])
AC_DEFUN([gl_STRING_MODULE_INDICATOR],
@@ -43,6 +43,8 @@ AC_DEFUN([gl_STRING_MODULE_INDICATOR],
AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
[
+ GNULIB_FFSL=0; AC_SUBST([GNULIB_FFSL])
+ GNULIB_FFSLL=0; AC_SUBST([GNULIB_FFSLL])
GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR])
GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM])
GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY])
@@ -80,6 +82,8 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP])
HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN])
dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_FFSL=1; AC_SUBST([HAVE_FFSL])
+ HAVE_FFSLL=1; AC_SUBST([HAVE_FFSLL])
HAVE_MEMCHR=1; AC_SUBST([HAVE_MEMCHR])
HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM])
HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY])
@@ -104,6 +108,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP])
REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR])
REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR])
+ REPLACE_STRCHRNUL=0; AC_SUBST([REPLACE_STRCHRNUL])
REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR])
REPLACE_STRERROR_R=0; AC_SUBST([REPLACE_STRERROR_R])
REPLACE_STRNCAT=0; AC_SUBST([REPLACE_STRNCAT])
diff --git a/m4/strndup.m4 b/m4/strndup.m4
index d8f00ca..a1f8274 100644
--- a/m4/strndup.m4
+++ b/m4/strndup.m4
@@ -1,5 +1,5 @@
-# strndup.m4 serial 18
-dnl Copyright (C) 2002-2003, 2005-2011 Free Software Foundation, Inc.
+# strndup.m4 serial 21
+dnl Copyright (C) 2002-2003, 2005-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -18,13 +18,18 @@ AC_DEFUN([gl_FUNC_STRNDUP],
fi
if test $ac_cv_func_strndup = yes; then
+ HAVE_STRNDUP=1
# AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
AC_CACHE_CHECK([for working strndup], [gl_cv_func_strndup_works],
[AC_RUN_IFELSE([
AC_LANG_PROGRAM([[#include <string.h>
#include <stdlib.h>]], [[
-#ifndef HAVE_DECL_STRNDUP
- extern char *strndup (const char *, size_t);
+#if !HAVE_DECL_STRNDUP
+ extern
+ #ifdef __cplusplus
+ "C"
+ #endif
+ char *strndup (const char *, size_t);
#endif
char *s;
s = strndup ("some longer string", 15);
@@ -42,12 +47,9 @@ changequote(,)dnl
changequote([,])dnl
])])
case $gl_cv_func_strndup_works in
- *no)
- REPLACE_STRNDUP=1
- AC_LIBOBJ([strndup])
- ;;
+ *no) REPLACE_STRNDUP=1 ;;
esac
else
- AC_LIBOBJ([strndup])
+ HAVE_STRNDUP=0
fi
])
diff --git a/m4/strnlen.m4 b/m4/strnlen.m4
index a1c59ac..eae82b7 100644
--- a/m4/strnlen.m4
+++ b/m4/strnlen.m4
@@ -1,5 +1,5 @@
-# strnlen.m4 serial 12
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2011 Free Software Foundation,
+# strnlen.m4 serial 13
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2013 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -16,16 +16,14 @@ AC_DEFUN([gl_FUNC_STRNLEN],
if test $ac_cv_have_decl_strnlen = no; then
HAVE_DECL_STRNLEN=0
else
- AC_FUNC_STRNLEN
+ m4_pushdef([AC_LIBOBJ], [:])
dnl Note: AC_FUNC_STRNLEN does AC_LIBOBJ([strnlen]).
+ AC_FUNC_STRNLEN
+ m4_popdef([AC_LIBOBJ])
if test $ac_cv_func_strnlen_working = no; then
REPLACE_STRNLEN=1
fi
fi
- if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
- AC_LIBOBJ([strnlen])
- gl_PREREQ_STRNLEN
- fi
])
# Prerequisites of lib/strnlen.c.
diff --git a/m4/strsignal.m4 b/m4/strsignal.m4
index 856f8af..8f6ea2e 100644
--- a/m4/strsignal.m4
+++ b/m4/strsignal.m4
@@ -1,5 +1,5 @@
-# strsignal.m4 serial 5
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# strsignal.m4 serial 8
+dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -19,6 +19,7 @@ AC_DEFUN([gl_FUNC_STRSIGNAL],
AC_CHECK_FUNCS([strsignal])
if test $ac_cv_func_strsignal = yes; then
+ HAVE_STRSIGNAL=1
dnl Check if strsignal behaves reasonably for out-of-range signal numbers.
dnl On Solaris it returns NULL; on AIX 5.1 it returns (char *) -1.
AC_CACHE_CHECK([whether strsignal always returns a string],
@@ -42,21 +43,17 @@ AC_DEFUN([gl_FUNC_STRSIGNAL],
solaris* | aix*) gl_cv_func_working_strsignal=no;;
*) gl_cv_func_working_strsignal="guessing yes";;
esac])])
- else
- gl_cv_func_working_strsignal=no
- fi
-
- if test "$gl_cv_func_working_strsignal" = no; then
- if test $ac_cv_func_strsignal = yes; then
+ if test "$gl_cv_func_working_strsignal" = no; then
REPLACE_STRSIGNAL=1
fi
- AC_LIBOBJ([strsignal])
- gl_PREREQ_STRSIGNAL
+ else
+ HAVE_STRSIGNAL=0
fi
])
# Prerequisites of lib/strsignal.c.
AC_DEFUN([gl_PREREQ_STRSIGNAL], [
+ AC_CHECK_HEADERS_ONCE([unistd.h])
AC_REQUIRE([AC_DECL_SYS_SIGLIST])
- AC_CHECK_DECLS([_sys_siglist], [], [], [#include <signal.h>])
+ AC_CHECK_DECLS([_sys_siglist], [], [], [[#include <signal.h>]])
])
diff --git a/m4/strstr.m4 b/m4/strstr.m4
index a42a1db..c486bdb 100644
--- a/m4/strstr.m4
+++ b/m4/strstr.m4
@@ -1,5 +1,5 @@
-# strstr.m4 serial 13
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# strstr.m4 serial 16
+dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -11,7 +11,6 @@ AC_DEFUN([gl_FUNC_STRSTR_SIMPLE],
AC_REQUIRE([gl_FUNC_MEMCHR])
if test "$gl_cv_func_memchr_works" != yes; then
REPLACE_STRSTR=1
- AC_LIBOBJ([strstr])
else
dnl Detect http://sourceware.org/bugzilla/show_bug.cgi?id=12092.
AC_CACHE_CHECK([whether strstr works],
@@ -47,14 +46,16 @@ AC_DEFUN([gl_FUNC_STRSTR_SIMPLE],
Lucky user
#endif
],
- [gl_cv_func_strstr_works_always=yes],
+ [gl_cv_func_strstr_works_always="guessing yes"],
[gl_cv_func_strstr_works_always="guessing no"])
])
])
- if test "$gl_cv_func_strstr_works_always" != yes; then
- REPLACE_STRSTR=1
- AC_LIBOBJ([strstr])
- fi
+ case "$gl_cv_func_strstr_works_always" in
+ *yes) ;;
+ *)
+ REPLACE_STRSTR=1
+ ;;
+ esac
fi
]) # gl_FUNC_STRSTR_SIMPLE
@@ -95,13 +96,15 @@ static void quit (int sig) { exit (sig + 128); }
return result;
]])],
[gl_cv_func_strstr_linear=yes], [gl_cv_func_strstr_linear=no],
- [dnl Only glibc > 2.12 and cygwin > 1.7.7 are known to have a
- dnl bug-free strstr that works in linear time.
+ [dnl Only glibc > 2.12 on processors without SSE 4.2 instructions and
+ dnl cygwin > 1.7.7 are known to have a bug-free strstr that works in
+ dnl linear time.
AC_EGREP_CPP([Lucky user],
[
#include <features.h>
#ifdef __GNU_LIBRARY__
#if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
+ && !(defined __i386__ || defined __x86_64__) \
&& !defined __UCLIBC__
Lucky user
#endif
@@ -113,15 +116,15 @@ static void quit (int sig) { exit (sig + 128); }
#endif
#endif
],
- [gl_cv_func_strstr_linear=yes],
+ [gl_cv_func_strstr_linear="guessing yes"],
[gl_cv_func_strstr_linear="guessing no"])
])
])
- if test "$gl_cv_func_strstr_linear" != yes; then
- REPLACE_STRSTR=1
- fi
- fi
- if test $REPLACE_STRSTR = 1; then
- AC_LIBOBJ([strstr])
+ case "$gl_cv_func_strstr_linear" in
+ *yes) ;;
+ *)
+ REPLACE_STRSTR=1
+ ;;
+ esac
fi
]) # gl_FUNC_STRSTR
diff --git a/m4/strtod.m4 b/m4/strtod.m4
index 4619c33..06ba60f 100644
--- a/m4/strtod.m4
+++ b/m4/strtod.m4
@@ -1,5 +1,5 @@
-# strtod.m4 serial 19
-dnl Copyright (C) 2002-2003, 2006-2011 Free Software Foundation, Inc.
+# strtod.m4 serial 22
+dnl Copyright (C) 2002-2003, 2006-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,15 +7,18 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_STRTOD],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
- dnl Test whether strtod is declared.
- dnl Don't call AC_FUNC_STRTOD, because it does not have the right guess
- dnl when cross-compiling.
- dnl Don't call AC_CHECK_FUNCS([strtod]) because it would collide with the
- dnl ac_cv_func_strtod variable set by the AC_FUNC_STRTOD macro.
- AC_CHECK_DECLS_ONCE([strtod])
- if test $ac_cv_have_decl_strtod != yes; then
- HAVE_STRTOD=0
- else
+ m4_ifdef([gl_FUNC_STRTOD_OBSOLETE], [
+ dnl Test whether strtod is declared.
+ dnl Don't call AC_FUNC_STRTOD, because it does not have the right guess
+ dnl when cross-compiling.
+ dnl Don't call AC_CHECK_FUNCS([strtod]) because it would collide with the
+ dnl ac_cv_func_strtod variable set by the AC_FUNC_STRTOD macro.
+ AC_CHECK_DECLS_ONCE([strtod])
+ if test $ac_cv_have_decl_strtod != yes; then
+ HAVE_STRTOD=0
+ fi
+ ])
+ if test $HAVE_STRTOD = 1; then
AC_CACHE_CHECK([whether strtod obeys C99], [gl_cv_func_strtod_works],
[AC_RUN_IFELSE([AC_LANG_PROGRAM([[
#include <stdlib.h>
@@ -98,7 +101,7 @@ numeric_equal (double x, double y)
[gl_cv_func_strtod_works=yes],
[gl_cv_func_strtod_works=no],
[dnl The last known bugs in glibc strtod(), as of this writing,
- dnl were fixed in version 2.8
+ dnl were fixed in version 2.8
AC_EGREP_CPP([Lucky user],
[
#include <features.h>
@@ -109,15 +112,14 @@ numeric_equal (double x, double y)
#endif
#endif
],
- [gl_cv_func_strtod_works=yes],
+ [gl_cv_func_strtod_works="guessing yes"],
[gl_cv_func_strtod_works="guessing no"])])])
- if test "$gl_cv_func_strtod_works" != yes; then
- REPLACE_STRTOD=1
- fi
- fi
- if test $HAVE_STRTOD = 0 || test $REPLACE_STRTOD = 1; then
- AC_LIBOBJ([strtod])
- gl_PREREQ_STRTOD
+ case "$gl_cv_func_strtod_works" in
+ *yes) ;;
+ *)
+ REPLACE_STRTOD=1
+ ;;
+ esac
fi
])
diff --git a/m4/strtol.m4 b/m4/strtol.m4
deleted file mode 100644
index 10f0284..0000000
--- a/m4/strtol.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-# strtol.m4 serial 5
-dnl Copyright (C) 2002-2003, 2006, 2009-2011 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_FUNC_STRTOL],
-[
- AC_REPLACE_FUNCS([strtol])
-])
diff --git a/m4/symlink.m4 b/m4/symlink.m4
index 917d5f0..82ede2a 100644
--- a/m4/symlink.m4
+++ b/m4/symlink.m4
@@ -1,7 +1,7 @@
-# serial 4
+# serial 6
# See if we need to provide symlink replacement.
-dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -11,13 +11,13 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_SYMLINK],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_FUNCS_ONCE([symlink])
dnl The best we can do on mingw is provide a dummy that always fails, so
dnl that compilation can proceed with fewer ifdefs. On FreeBSD 7.2, AIX 7.1,
dnl and Solaris 9, we want to fix a bug with trailing slash handling.
if test $ac_cv_func_symlink = no; then
HAVE_SYMLINK=0
- AC_LIBOBJ([symlink])
else
AC_CACHE_CHECK([whether symlink handles trailing slash correctly],
[gl_cv_func_symlink_works],
@@ -35,11 +35,19 @@ AC_DEFUN([gl_FUNC_SYMLINK],
return result;
]])],
[gl_cv_func_symlink_works=yes], [gl_cv_func_symlink_works=no],
- [gl_cv_func_symlink_works="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_symlink_works="guessing no" ;;
+ esac
+ ])
rm -f conftest.f conftest.link conftest.lnk2])
- if test "$gl_cv_func_symlink_works" != yes; then
- REPLACE_SYMLINK=1
- AC_LIBOBJ([symlink])
- fi
+ case "$gl_cv_func_symlink_works" in
+ *yes) ;;
+ *)
+ REPLACE_SYMLINK=1
+ ;;
+ esac
fi
])
diff --git a/m4/sys_socket_h.m4 b/m4/sys_socket_h.m4
new file mode 100644
index 0000000..9486377
--- /dev/null
+++ b/m4/sys_socket_h.m4
@@ -0,0 +1,176 @@
+# sys_socket_h.m4 serial 23
+dnl Copyright (C) 2005-2013 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Simon Josefsson.
+
+AC_DEFUN([gl_HEADER_SYS_SOCKET],
+[
+ AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
+ dnl On OSF/1, the functions recv(), send(), recvfrom(), sendto() have
+ dnl old-style declarations (with return type 'int' instead of 'ssize_t')
+ dnl unless _POSIX_PII_SOCKET is defined.
+ case "$host_os" in
+ osf*)
+ AC_DEFINE([_POSIX_PII_SOCKET], [1],
+ [Define to 1 in order to get the POSIX compatible declarations
+ of socket functions.])
+ ;;
+ esac
+
+ AC_CACHE_CHECK([whether <sys/socket.h> is self-contained],
+ [gl_cv_header_sys_socket_h_selfcontained],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]], [[]])],
+ [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, <sys/socket.h> 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 <sys/socket.h> defines the SHUT_* macros],
+ [gl_cv_header_sys_socket_h_shut],
+ [
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <sys/socket.h>]],
+ [[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 <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#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 <sys/types.h>
+ #ifdef HAVE_SYS_SOCKET_H
+ #include <sys/socket.h>
+ #endif
+ #ifdef HAVE_WS2TCPIP_H
+ #include <ws2tcpip.h>
+ #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 <sys/types.h>
+#include <sys/socket.h>
+ ]], [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 <sys/socket.h> 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 <sys/socket.h> replacement and of the
+# <sys/select.h> 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/m4/sys_stat_h.m4 b/m4/sys_stat_h.m4
index fc41912..6dd3d99 100644
--- a/m4/sys_stat_h.m4
+++ b/m4/sys_stat_h.m4
@@ -1,5 +1,5 @@
-# sys_stat_h.m4 serial 24 -*- Autoconf -*-
-dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
+# sys_stat_h.m4 serial 28 -*- Autoconf -*-
+dnl Copyright (C) 2006-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -11,14 +11,27 @@ 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 <sys/types.h> or
dnl <sys/stat.h>.
AC_CHECK_TYPE([nlink_t], [],
@@ -30,7 +43,7 @@ AC_DEFUN([gl_HEADER_SYS_STAT_H],
dnl Check for declarations of anything we want to poison if the
dnl corresponding gnulib module is not in use.
gl_WARN_ON_USE_PREPARE([[#include <sys/stat.h>
- ]], [fchmodat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat
+ ]], [fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat
mknod mknodat stat utimensat])
]) # gl_HEADER_SYS_STAT_H
@@ -47,6 +60,7 @@ AC_DEFUN([gl_SYS_STAT_H_DEFAULTS],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR
GNULIB_FCHMODAT=0; AC_SUBST([GNULIB_FCHMODAT])
+ GNULIB_FSTAT=0; AC_SUBST([GNULIB_FSTAT])
GNULIB_FSTATAT=0; AC_SUBST([GNULIB_FSTATAT])
GNULIB_FUTIMENS=0; AC_SUBST([GNULIB_FUTIMENS])
GNULIB_LCHMOD=0; AC_SUBST([GNULIB_LCHMOD])
diff --git a/m4/sys_time_h.m4 b/m4/sys_time_h.m4
index 3a3adc8..0ac71ac 100644
--- a/m4/sys_time_h.m4
+++ b/m4/sys_time_h.m4
@@ -1,7 +1,7 @@
# Configure a replacement for <sys/time.h>.
-# serial 6
+# serial 8
-# Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -27,6 +27,9 @@ AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY],
HAVE_SYS_TIME_H=0
fi
+ dnl On native Windows with MSVC, 'struct timeval' is defined in <winsock2.h>
+ 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(
@@ -34,12 +37,46 @@ AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY],
#include <sys/time.h>
#endif
#include <time.h>
+ #if HAVE_WINSOCK2_H
+ # include <winsock2.h>
+ #endif
]],
[[static struct timeval x; x.tv_sec = x.tv_usec;]])],
[gl_cv_sys_struct_timeval=yes],
- [gl_cv_sys_struct_timeval=no])])
+ [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 <sys/time.h> and <winsock2.h> for mingw64, in <winsock2.h> only
+ dnl for MSVC) with a tv_sec field of type 'long' (32-bit!), which is
+ dnl smaller than the 'time_t' type mandated by POSIX.
+ 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 <sys/time.h>
+ #endif
+ #include <time.h>
+ #if HAVE_WINSOCK2_H
+ # include <winsock2.h>
+ #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
@@ -69,4 +106,5 @@ AC_DEFUN([gl_HEADER_SYS_TIME_H_DEFAULTS],
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/m4/sys_types_h.m4 b/m4/sys_types_h.m4
new file mode 100644
index 0000000..d15c1b3
--- /dev/null
+++ b/m4/sys_types_h.m4
@@ -0,0 +1,24 @@
+# sys_types_h.m4 serial 5
+dnl Copyright (C) 2011-2013 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN_ONCE([gl_SYS_TYPES_H],
+[
+ AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS])
+ gl_NEXT_HEADERS([sys/types.h])
+
+ dnl Ensure the type pid_t gets defined.
+ AC_REQUIRE([AC_TYPE_PID_T])
+
+ dnl Ensure the type mode_t gets defined.
+ AC_REQUIRE([AC_TYPE_MODE_T])
+
+ dnl Whether to override the 'off_t' type.
+ AC_REQUIRE([gl_TYPE_OFF_T])
+])
+
+AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS],
+[
+])
diff --git a/m4/sys_wait_h.m4 b/m4/sys_wait_h.m4
index e3b147c..a6c59d6 100644
--- a/m4/sys_wait_h.m4
+++ b/m4/sys_wait_h.m4
@@ -1,5 +1,5 @@
-# sys_wait_h.m4 serial 5
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# sys_wait_h.m4 serial 6
+dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -11,6 +11,9 @@ AC_DEFUN([gl_SYS_WAIT_H],
dnl <sys/wait.h> 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 <sys/wait.h>]],
diff --git a/m4/tempname.m4 b/m4/tempname.m4
index 6bd74ab..a6e42dc 100644
--- a/m4/tempname.m4
+++ b/m4/tempname.m4
@@ -1,6 +1,6 @@
-#serial 3
+#serial 5
-# Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -9,9 +9,6 @@
# it as a public API, and provide it on systems that are lacking.
AC_DEFUN([gl_FUNC_GEN_TEMPNAME],
[
- AC_REQUIRE([AC_SYS_LARGEFILE])
-
- AC_LIBOBJ([tempname])
gl_PREREQ_TEMPNAME
])
diff --git a/m4/threadlib.m4 b/m4/threadlib.m4
index 8a621fd..26bdeb5 100644
--- a/m4/threadlib.m4
+++ b/m4/threadlib.m4
@@ -1,5 +1,5 @@
-# threadlib.m4 serial 8 (gettext-0.18.2)
-dnl Copyright (C) 2005-2011 Free Software Foundation, Inc.
+# threadlib.m4 serial 10 (gettext-0.18.2)
+dnl Copyright (C) 2005-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -15,7 +15,7 @@ dnl default is 'no', otherwise it is system dependent. In both cases, the user
dnl can change the choice through the options --enable-threads=choice or
dnl --disable-threads.
dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS,
-dnl USE_PTH_THREADS, USE_WIN32_THREADS
+dnl USE_PTH_THREADS, USE_WINDOWS_THREADS
dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use
dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with
dnl libtool).
@@ -53,7 +53,7 @@ AC_DEFUN([gl_THREADLIB_EARLY_BODY],
[m4_divert_text([DEFAULTS], [gl_use_threads_default=no])],
[m4_divert_text([DEFAULTS], [gl_use_threads_default=])])
AC_ARG_ENABLE([threads],
-AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
+AC_HELP_STRING([--enable-threads={posix|solaris|pth|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
AC_HELP_STRING([--disable-threads], [build without multithread safety])]),
[gl_use_threads=$enableval],
[if test -n "$gl_use_threads_default"; then
@@ -276,17 +276,19 @@ int main ()
fi
fi
if test -z "$gl_have_pthread"; then
- if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then
- if { case "$host_os" in
- mingw*) true;;
- *) false;;
- esac
- }; then
- gl_threads_api=win32
- AC_DEFINE([USE_WIN32_THREADS], [1],
- [Define if the Win32 multithreading API can be used.])
- fi
- fi
+ case "$gl_use_threads" in
+ yes | windows | win32) # The 'win32' is for backward compatibility.
+ if { case "$host_os" in
+ mingw*) true;;
+ *) false;;
+ esac
+ }; then
+ gl_threads_api=windows
+ AC_DEFINE([USE_WINDOWS_THREADS], [1],
+ [Define if the native Windows multithreading API can be used.])
+ fi
+ ;;
+ esac
fi
fi
AC_MSG_CHECKING([for multithread API to use])
@@ -317,50 +319,50 @@ AC_DEFUN([gl_DISABLE_THREADS], [
dnl Survey of platforms:
dnl
-dnl Platform Available Compiler Supports test-lock
-dnl flavours option weak result
-dnl --------------- --------- --------- -------- ---------
-dnl Linux 2.4/glibc posix -lpthread Y OK
+dnl Platform Available Compiler Supports test-lock
+dnl flavours option weak result
+dnl --------------- --------- --------- -------- ---------
+dnl Linux 2.4/glibc posix -lpthread Y OK
dnl
-dnl GNU Hurd/glibc posix
+dnl GNU Hurd/glibc posix
dnl
-dnl FreeBSD 5.3 posix -lc_r Y
-dnl posix -lkse ? Y
-dnl posix -lpthread ? Y
-dnl posix -lthr Y
+dnl FreeBSD 5.3 posix -lc_r Y
+dnl posix -lkse ? Y
+dnl posix -lpthread ? Y
+dnl posix -lthr Y
dnl
-dnl FreeBSD 5.2 posix -lc_r Y
-dnl posix -lkse Y
-dnl posix -lthr Y
+dnl FreeBSD 5.2 posix -lc_r Y
+dnl posix -lkse Y
+dnl posix -lthr Y
dnl
-dnl FreeBSD 4.0,4.10 posix -lc_r Y OK
+dnl FreeBSD 4.0,4.10 posix -lc_r Y OK
dnl
-dnl NetBSD 1.6 --
+dnl NetBSD 1.6 --
dnl
-dnl OpenBSD 3.4 posix -lpthread Y OK
+dnl OpenBSD 3.4 posix -lpthread Y OK
dnl
-dnl MacOS X 10.[123] posix -lpthread Y OK
+dnl Mac OS X 10.[123] posix -lpthread Y OK
dnl
-dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9: OK
-dnl solaris -lthread Y Sol 7,8: 0.0; Sol 9: OK
+dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9: OK
+dnl solaris -lthread Y Sol 7,8: 0.0; Sol 9: OK
dnl
-dnl HP-UX 11 posix -lpthread N (cc) OK
+dnl HP-UX 11 posix -lpthread N (cc) OK
dnl Y (gcc)
dnl
-dnl IRIX 6.5 posix -lpthread Y 0.5
+dnl IRIX 6.5 posix -lpthread Y 0.5
dnl
-dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK
+dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK
dnl
-dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK
+dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK
dnl -lpthread (gcc) Y
dnl
-dnl Cygwin posix -lpthread Y OK
+dnl Cygwin posix -lpthread Y OK
dnl
-dnl Any of the above pth -lpth 0.0
+dnl Any of the above pth -lpth 0.0
dnl
-dnl Mingw win32 N OK
+dnl Mingw windows N OK
dnl
-dnl BeOS 5 --
+dnl BeOS 5 --
dnl
dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is
dnl turned off:
diff --git a/m4/time_h.m4 b/m4/time_h.m4
index 615da1c..3b83900 100644
--- a/m4/time_h.m4
+++ b/m4/time_h.m4
@@ -1,8 +1,8 @@
# Configure a more-standard replacement for <time.h>.
-# Copyright (C) 2000-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2013 Free Software Foundation, Inc.
-# serial 4
+# serial 7
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -25,7 +25,7 @@ AC_DEFUN([gl_HEADER_TIME_H_BODY],
AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
])
-dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared
+dnl Check whether 'struct timespec' is declared
dnl in time.h, sys/time.h, or pthread.h.
AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
diff --git a/m4/tls.m4 b/m4/tls.m4
index bb318b3..8ef1913 100644
--- a/m4/tls.m4
+++ b/m4/tls.m4
@@ -1,5 +1,5 @@
# tls.m4 serial 2 (gettext-0.18)
-dnl Copyright (C) 2005, 2008-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/tmpdir.m4 b/m4/tmpdir.m4
index 9d4b170..6dd5f70 100644
--- a/m4/tmpdir.m4
+++ b/m4/tmpdir.m4
@@ -1,12 +1,9 @@
-# tmpdir.m4 serial 3
-dnl Copyright (C) 2001-2002, 2006, 2009-2011 Free Software Foundation, Inc.
+# tmpdir.m4 serial 4
+dnl Copyright (C) 2001-2002, 2006, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Prerequisites for lib/tmpdir.c
-AC_DEFUN([gt_TMPDIR],
-[
- AC_CHECK_FUNCS([__secure_getenv])
-])
+AC_DEFUN([gt_TMPDIR], [:])
diff --git a/m4/ungetc.m4 b/m4/ungetc.m4
index 749f6bd..4e3577a 100644
--- a/m4/ungetc.m4
+++ b/m4/ungetc.m4
@@ -1,5 +1,5 @@
-# ungetc.m4 serial 2
-dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# ungetc.m4 serial 3
+dnl Copyright (C) 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN_ONCE([gl_FUNC_UNGETC_WORKS],
[
AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether ungetc works on arbitrary bytes],
[gl_cv_func_ungetc_works],
@@ -27,10 +28,19 @@ AC_DEFUN_ONCE([gl_FUNC_UNGETC_WORKS],
if (fgetc (f) != 'c') return 11;
fclose (f); remove ("conftest.tmp");])],
[gl_cv_func_ungetc_works=yes], [gl_cv_func_ungetc_works=no],
- [gl_cv_func_ungetc_works='guessing no'])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_ungetc_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_ungetc_works="guessing no" ;;
+ esac
+ ])
])
- if test "$gl_cv_func_ungetc_works" != yes; then
- AC_DEFINE([FUNC_UNGETC_BROKEN], [1],
- [Define to 1 if ungetc is broken when used on arbitrary bytes.])
- fi
+ case "$gl_cv_func_ungetc_works" in
+ *yes) ;;
+ *)
+ AC_DEFINE([FUNC_UNGETC_BROKEN], [1],
+ [Define to 1 if ungetc is broken when used on arbitrary bytes.])
+ ;;
+ esac
])
diff --git a/m4/unistd-safer.m4 b/m4/unistd-safer.m4
index 00ff1bd..e65c3c9 100644
--- a/m4/unistd-safer.m4
+++ b/m4/unistd-safer.m4
@@ -1,5 +1,5 @@
-#serial 8
-dnl Copyright (C) 2002, 2005-2006, 2009-2011 Free Software Foundation, Inc.
+#serial 9
+dnl Copyright (C) 2002, 2005-2006, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,7 +7,4 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_UNISTD_SAFER],
[
AC_CHECK_FUNCS_ONCE([pipe])
- AC_LIBOBJ([dup-safer])
- AC_LIBOBJ([fd-safer])
- AC_LIBOBJ([pipe-safer])
])
diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4
index c81a113..32dcfa5 100644
--- a/m4/unistd_h.m4
+++ b/m4/unistd_h.m4
@@ -1,5 +1,5 @@
-# unistd_h.m4 serial 53
-dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
+# unistd_h.m4 serial 66
+dnl Copyright (C) 2006-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -11,7 +11,6 @@ AC_DEFUN([gl_UNISTD_H],
dnl Use AC_REQUIRE here, so that the default behavior below is expanded
dnl once only, before all statements that occur in other macros.
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
- AC_REQUIRE([AC_C_INLINE])
gl_CHECK_NEXT_HEADERS([unistd.h])
if test $ac_cv_header_unistd_h = yes; then
@@ -21,9 +20,18 @@ AC_DEFUN([gl_UNISTD_H],
fi
AC_SUBST([HAVE_UNISTD_H])
+ dnl Ensure the type pid_t gets defined.
+ AC_REQUIRE([AC_TYPE_PID_T])
+
+ dnl Determine WINDOWS_64_BIT_OFF_T.
+ AC_REQUIRE([gl_TYPE_OFF_T])
+
dnl Check for declarations of anything we want to poison if the
dnl corresponding gnulib module is not in use.
- gl_WARN_ON_USE_PREPARE([[#include <unistd.h>
+ gl_WARN_ON_USE_PREPARE([[
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
/* Some systems declare various items in the wrong headers. */
#if !(defined __GLIBC__ && !defined __UCLIBC__)
# include <fcntl.h>
@@ -33,12 +41,13 @@ AC_DEFUN([gl_UNISTD_H],
# include <io.h>
# endif
#endif
- ]], [chown dup2 dup3 environ euidaccess faccessat fchdir fchownat
- fsync ftruncate getcwd getdomainname getdtablesize getgroups
- gethostname getlogin getlogin_r getpagesize getusershell setusershell
- endusershell lchown link linkat lseek pipe pipe2 pread pwrite readlink
- readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat
- usleep])
+ ]], [chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat
+ fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups
+ gethostname getlogin getlogin_r getpagesize
+ getusershell setusershell endusershell
+ group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite
+ readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r
+ unlink unlinkat usleep])
])
AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
@@ -52,47 +61,54 @@ AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
AC_DEFUN([gl_UNISTD_H_DEFAULTS],
[
- GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN])
- GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE])
- GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2])
- GNULIB_DUP3=0; AC_SUBST([GNULIB_DUP3])
- GNULIB_ENVIRON=0; AC_SUBST([GNULIB_ENVIRON])
- GNULIB_EUIDACCESS=0; AC_SUBST([GNULIB_EUIDACCESS])
- GNULIB_FACCESSAT=0; AC_SUBST([GNULIB_FACCESSAT])
- GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR])
- GNULIB_FCHOWNAT=0; AC_SUBST([GNULIB_FCHOWNAT])
- GNULIB_FSYNC=0; AC_SUBST([GNULIB_FSYNC])
- GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE])
- GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD])
- GNULIB_GETDOMAINNAME=0; AC_SUBST([GNULIB_GETDOMAINNAME])
- GNULIB_GETDTABLESIZE=0; AC_SUBST([GNULIB_GETDTABLESIZE])
- GNULIB_GETGROUPS=0; AC_SUBST([GNULIB_GETGROUPS])
- GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME])
- GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN])
- GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R])
- GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE])
- GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL])
- GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN])
- GNULIB_LINK=0; AC_SUBST([GNULIB_LINK])
- GNULIB_LINKAT=0; AC_SUBST([GNULIB_LINKAT])
- GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK])
- GNULIB_PIPE=0; AC_SUBST([GNULIB_PIPE])
- GNULIB_PIPE2=0; AC_SUBST([GNULIB_PIPE2])
- GNULIB_PREAD=0; AC_SUBST([GNULIB_PREAD])
- GNULIB_PWRITE=0; AC_SUBST([GNULIB_PWRITE])
- GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK])
- GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT])
- GNULIB_RMDIR=0; AC_SUBST([GNULIB_RMDIR])
- GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP])
- GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK])
- GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT])
- GNULIB_TTYNAME_R=0; AC_SUBST([GNULIB_TTYNAME_R])
- GNULIB_UNISTD_H_GETOPT=0; AC_SUBST([GNULIB_UNISTD_H_GETOPT])
- GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE])
- GNULIB_UNLINK=0; AC_SUBST([GNULIB_UNLINK])
- GNULIB_UNLINKAT=0; AC_SUBST([GNULIB_UNLINKAT])
- GNULIB_USLEEP=0; AC_SUBST([GNULIB_USLEEP])
- GNULIB_WRITE=0; AC_SUBST([GNULIB_WRITE])
+ GNULIB_CHDIR=0; AC_SUBST([GNULIB_CHDIR])
+ GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN])
+ GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE])
+ GNULIB_DUP=0; AC_SUBST([GNULIB_DUP])
+ GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2])
+ GNULIB_DUP3=0; AC_SUBST([GNULIB_DUP3])
+ GNULIB_ENVIRON=0; AC_SUBST([GNULIB_ENVIRON])
+ GNULIB_EUIDACCESS=0; AC_SUBST([GNULIB_EUIDACCESS])
+ GNULIB_FACCESSAT=0; AC_SUBST([GNULIB_FACCESSAT])
+ GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR])
+ GNULIB_FCHOWNAT=0; AC_SUBST([GNULIB_FCHOWNAT])
+ GNULIB_FDATASYNC=0; AC_SUBST([GNULIB_FDATASYNC])
+ GNULIB_FSYNC=0; AC_SUBST([GNULIB_FSYNC])
+ GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE])
+ GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD])
+ GNULIB_GETDOMAINNAME=0; AC_SUBST([GNULIB_GETDOMAINNAME])
+ GNULIB_GETDTABLESIZE=0; AC_SUBST([GNULIB_GETDTABLESIZE])
+ GNULIB_GETGROUPS=0; AC_SUBST([GNULIB_GETGROUPS])
+ GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME])
+ GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN])
+ GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R])
+ GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE])
+ GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL])
+ GNULIB_GROUP_MEMBER=0; AC_SUBST([GNULIB_GROUP_MEMBER])
+ GNULIB_ISATTY=0; AC_SUBST([GNULIB_ISATTY])
+ GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN])
+ GNULIB_LINK=0; AC_SUBST([GNULIB_LINK])
+ GNULIB_LINKAT=0; AC_SUBST([GNULIB_LINKAT])
+ GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK])
+ GNULIB_PIPE=0; AC_SUBST([GNULIB_PIPE])
+ GNULIB_PIPE2=0; AC_SUBST([GNULIB_PIPE2])
+ GNULIB_PREAD=0; AC_SUBST([GNULIB_PREAD])
+ GNULIB_PWRITE=0; AC_SUBST([GNULIB_PWRITE])
+ GNULIB_READ=0; AC_SUBST([GNULIB_READ])
+ GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK])
+ GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT])
+ GNULIB_RMDIR=0; AC_SUBST([GNULIB_RMDIR])
+ GNULIB_SETHOSTNAME=0; AC_SUBST([GNULIB_SETHOSTNAME])
+ GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP])
+ GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK])
+ GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT])
+ GNULIB_TTYNAME_R=0; AC_SUBST([GNULIB_TTYNAME_R])
+ GNULIB_UNISTD_H_NONBLOCKING=0; AC_SUBST([GNULIB_UNISTD_H_NONBLOCKING])
+ GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE])
+ GNULIB_UNLINK=0; AC_SUBST([GNULIB_UNLINK])
+ GNULIB_UNLINKAT=0; AC_SUBST([GNULIB_UNLINKAT])
+ GNULIB_USLEEP=0; AC_SUBST([GNULIB_USLEEP])
+ GNULIB_WRITE=0; AC_SUBST([GNULIB_WRITE])
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_CHOWN=1; AC_SUBST([HAVE_CHOWN])
HAVE_DUP2=1; AC_SUBST([HAVE_DUP2])
@@ -101,6 +117,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
HAVE_FACCESSAT=1; AC_SUBST([HAVE_FACCESSAT])
HAVE_FCHDIR=1; AC_SUBST([HAVE_FCHDIR])
HAVE_FCHOWNAT=1; AC_SUBST([HAVE_FCHOWNAT])
+ HAVE_FDATASYNC=1; AC_SUBST([HAVE_FDATASYNC])
HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC])
HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE])
HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE])
@@ -108,6 +125,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME])
HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN])
HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE])
+ HAVE_GROUP_MEMBER=1; AC_SUBST([HAVE_GROUP_MEMBER])
HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN])
HAVE_LINK=1; AC_SUBST([HAVE_LINK])
HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT])
@@ -117,6 +135,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
HAVE_PWRITE=1; AC_SUBST([HAVE_PWRITE])
HAVE_READLINK=1; AC_SUBST([HAVE_READLINK])
HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT])
+ HAVE_SETHOSTNAME=1; AC_SUBST([HAVE_SETHOSTNAME])
HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP])
HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK])
HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT])
@@ -124,10 +143,12 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP])
HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON])
HAVE_DECL_FCHDIR=1; AC_SUBST([HAVE_DECL_FCHDIR])
+ HAVE_DECL_FDATASYNC=1; AC_SUBST([HAVE_DECL_FDATASYNC])
HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME])
HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R])
HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE])
HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL])
+ HAVE_DECL_SETHOSTNAME=1; AC_SUBST([HAVE_DECL_SETHOSTNAME])
HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R])
HAVE_OS_H=0; AC_SUBST([HAVE_OS_H])
HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H])
@@ -136,17 +157,20 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
REPLACE_DUP=0; AC_SUBST([REPLACE_DUP])
REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2])
REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT])
+ REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE])
REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD])
REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME])
REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R])
REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS])
REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE])
+ REPLACE_ISATTY=0; AC_SUBST([REPLACE_ISATTY])
REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN])
REPLACE_LINK=0; AC_SUBST([REPLACE_LINK])
REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT])
REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK])
REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD])
REPLACE_PWRITE=0; AC_SUBST([REPLACE_PWRITE])
+ REPLACE_READ=0; AC_SUBST([REPLACE_READ])
REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK])
REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR])
REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP])
diff --git a/m4/unlocked-io.m4 b/m4/unlocked-io.m4
index be4323c..f146206 100644
--- a/m4/unlocked-io.m4
+++ b/m4/unlocked-io.m4
@@ -1,6 +1,6 @@
# unlocked-io.m4 serial 15
-# Copyright (C) 1998-2006, 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 1998-2006, 2009-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/m4/vasnprintf.m4 b/m4/vasnprintf.m4
index 32ea985..d730e43 100644
--- a/m4/vasnprintf.m4
+++ b/m4/vasnprintf.m4
@@ -1,5 +1,5 @@
-# vasnprintf.m4 serial 32
-dnl Copyright (C) 2002-2004, 2006-2011 Free Software Foundation, Inc.
+# vasnprintf.m4 serial 36
+dnl Copyright (C) 2002-2004, 2006-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -29,7 +29,7 @@ AC_DEFUN([gl_REPLACE_VASNPRINTF],
gl_PREREQ_ASNPRINTF
])
-# Prequisites of lib/printf-args.h, lib/printf-args.c.
+# Prerequisites of lib/printf-args.h, lib/printf-args.c.
AC_DEFUN([gl_PREREQ_PRINTF_ARGS],
[
AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
@@ -37,7 +37,7 @@ AC_DEFUN([gl_PREREQ_PRINTF_ARGS],
AC_REQUIRE([gt_TYPE_WINT_T])
])
-# Prequisites of lib/printf-parse.h, lib/printf-parse.c.
+# Prerequisites of lib/printf-parse.h, lib/printf-parse.c.
AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
[
AC_REQUIRE([gl_FEATURES_H])
@@ -55,7 +55,6 @@ AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
# Prerequisites of lib/vasnprintf.c.
AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF],
[
- AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([AC_FUNC_ALLOCA])
AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
AC_REQUIRE([gt_TYPE_WCHAR_T])
@@ -63,7 +62,10 @@ AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF],
AC_CHECK_FUNCS([snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb])
dnl Use the _snprintf function only if it is declared (because on NetBSD it
dnl is defined as a weak alias of snprintf; we prefer to use the latter).
- AC_CHECK_DECLS([_snprintf], , , [#include <stdio.h>])
+ AC_CHECK_DECLS([_snprintf], , , [[#include <stdio.h>]])
+ dnl Knowing DBL_EXPBIT0_WORD and DBL_EXPBIT0_BIT enables an optimization
+ dnl in the code for NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE.
+ AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION])
dnl We can avoid a lot of code by assuming that snprintf's return value
dnl conforms to ISO C99. So check that.
AC_REQUIRE([gl_SNPRINTF_RETVAL_C99])
diff --git a/m4/vasprintf-posix.m4 b/m4/vasprintf-posix.m4
index 06390a8..c2b0901 100644
--- a/m4/vasprintf-posix.m4
+++ b/m4/vasprintf-posix.m4
@@ -1,5 +1,5 @@
# vasprintf-posix.m4 serial 13
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/vasprintf.m4 b/m4/vasprintf.m4
index 6db52b1..c214ff1 100644
--- a/m4/vasprintf.m4
+++ b/m4/vasprintf.m4
@@ -1,5 +1,5 @@
# vasprintf.m4 serial 6
-dnl Copyright (C) 2002-2003, 2006-2007, 2009-2011 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2006-2007, 2009-2013 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/version-etc.m4 b/m4/version-etc.m4
index 5032bf8..5dbef8e 100644
--- a/m4/version-etc.m4
+++ b/m4/version-etc.m4
@@ -1,5 +1,5 @@
# version-etc.m4 serial 1
-# Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/m4/wait-process.m4 b/m4/wait-process.m4
index 078d094..693bebf 100644
--- a/m4/wait-process.m4
+++ b/m4/wait-process.m4
@@ -1,5 +1,5 @@
-# wait-process.m4 serial 5
-dnl Copyright (C) 2003, 2008-2011 Free Software Foundation, Inc.
+# wait-process.m4 serial 6
+dnl Copyright (C) 2003, 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,7 +7,6 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_WAIT_PROCESS],
[
dnl Prerequisites of lib/wait-process.c.
- AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([gt_TYPE_SIG_ATOMIC_T])
AC_CHECK_FUNCS([waitid])
])
diff --git a/m4/waitpid.m4 b/m4/waitpid.m4
index ccc25e4..26ce890 100644
--- a/m4/waitpid.m4
+++ b/m4/waitpid.m4
@@ -1,5 +1,5 @@
-# waitpid.m4 serial 1
-dnl Copyright (C) 2010-2011 Free Software Foundation, Inc.
+# waitpid.m4 serial 2
+dnl Copyright (C) 2010-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,9 +7,8 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_WAITPID],
[
AC_REQUIRE([AC_CANONICAL_HOST])
+ HAVE_WAITPID=1
case $host_os in
- mingw*)
- AC_LIBOBJ([waitpid])
- ;;
+ mingw*) HAVE_WAITPID=0 ;;
esac
])
diff --git a/m4/warnings.m4 b/m4/warnings.m4
index a8f3466..5f5da51 100644
--- a/m4/warnings.m4
+++ b/m4/warnings.m4
@@ -1,5 +1,5 @@
-# warnings.m4 serial 2
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# warnings.m4 serial 10
+dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -14,23 +14,66 @@ m4_ifdef([AS_VAR_APPEND],
[m4_define([gl_AS_VAR_APPEND],
[AS_VAR_SET([$1], [AS_VAR_GET([$1])$2])])])
-# gl_WARN_ADD(PARAMETER, [VARIABLE = WARN_CFLAGS])
-# ------------------------------------------------
-# Adds parameter to WARN_CFLAGS if the compiler supports it. For example,
-# gl_WARN_ADD([-Wparentheses]).
-AC_DEFUN([gl_WARN_ADD],
-[AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_$1])dnl
-AC_CACHE_CHECK([whether compiler handles $1], [gl_Warn], [
- save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="${CPPFLAGS} $1"
- AC_PREPROC_IFELSE([AC_LANG_PROGRAM([])],
- [AS_VAR_SET([gl_Warn], [yes])],
- [AS_VAR_SET([gl_Warn], [no])])
- CPPFLAGS="$save_CPPFLAGS"
+
+# gl_COMPILER_OPTION_IF(OPTION, [IF-SUPPORTED], [IF-NOT-SUPPORTED],
+# [PROGRAM = AC_LANG_PROGRAM()])
+# -----------------------------------------------------------------
+# Check if the compiler supports OPTION when compiling PROGRAM.
+#
+# FIXME: gl_Warn must be used unquoted until we can assume Autoconf
+# 2.64 or newer.
+AC_DEFUN([gl_COMPILER_OPTION_IF],
+[AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_[]_AC_LANG_ABBREV[]_$1])dnl
+AS_VAR_PUSHDEF([gl_Flags], [_AC_LANG_PREFIX[]FLAGS])dnl
+AS_LITERAL_IF([$1],
+ [m4_pushdef([gl_Positive], m4_bpatsubst([$1], [^-Wno-], [-W]))],
+ [gl_positive="$1"
+case $gl_positive in
+ -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
+esac
+m4_pushdef([gl_Positive], [$gl_positive])])dnl
+AC_CACHE_CHECK([whether _AC_LANG compiler handles $1], m4_defn([gl_Warn]), [
+ gl_save_compiler_FLAGS="$gl_Flags"
+ gl_AS_VAR_APPEND(m4_defn([gl_Flags]),
+ [" $gl_unknown_warnings_are_errors ]m4_defn([gl_Positive])["])
+ AC_COMPILE_IFELSE([m4_default([$4], [AC_LANG_PROGRAM([])])],
+ [AS_VAR_SET(gl_Warn, [yes])],
+ [AS_VAR_SET(gl_Warn, [no])])
+ gl_Flags="$gl_save_compiler_FLAGS"
])
-AS_VAR_PUSHDEF([gl_Flags], m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]))dnl
-AS_VAR_IF([gl_Warn], [yes], [gl_AS_VAR_APPEND([gl_Flags], [" $1"])])
+AS_VAR_IF(gl_Warn, [yes], [$2], [$3])
+m4_popdef([gl_Positive])dnl
AS_VAR_POPDEF([gl_Flags])dnl
AS_VAR_POPDEF([gl_Warn])dnl
-m4_ifval([$2], [AS_LITERAL_IF([$2], [AC_SUBST([$2])], [])])dnl
])
+
+# gl_UNKNOWN_WARNINGS_ARE_ERRORS
+# ------------------------------
+# Clang doesn't complain about unknown warning options unless one also
+# specifies -Wunknown-warning-option -Werror. Detect this.
+AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS],
+[gl_COMPILER_OPTION_IF([-Werror -Wunknown-warning-option],
+ [gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'],
+ [gl_unknown_warnings_are_errors=])])
+
+# gl_WARN_ADD(OPTION, [VARIABLE = WARN_CFLAGS],
+# [PROGRAM = AC_LANG_PROGRAM()])
+# ---------------------------------------------
+# Adds parameter to WARN_CFLAGS if the compiler supports it when
+# compiling PROGRAM. For example, gl_WARN_ADD([-Wparentheses]).
+#
+# If VARIABLE is a variable name, AC_SUBST it.
+AC_DEFUN([gl_WARN_ADD],
+[AC_REQUIRE([gl_UNKNOWN_WARNINGS_ARE_ERRORS])
+gl_COMPILER_OPTION_IF([$1],
+ [gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]), [" $1"])],
+ [],
+ [$3])
+m4_ifval([$2],
+ [AS_LITERAL_IF([$2], [AC_SUBST([$2])])],
+ [AC_SUBST([WARN_CFLAGS])])dnl
+])
+
+# Local Variables:
+# mode: autoconf
+# End:
diff --git a/m4/wchar_h.m4 b/m4/wchar_h.m4
index 6255ff3..bedb15a 100644
--- a/m4/wchar_h.m4
+++ b/m4/wchar_h.m4
@@ -1,13 +1,13 @@
dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
-dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl Written by Eric Blake.
-# wchar_h.m4 serial 38
+# wchar_h.m4 serial 39
AC_DEFUN([gl_WCHAR_H],
[
@@ -119,13 +119,6 @@ Configuration aborted.])
fi
])
-dnl Unconditionally enables the replacement of <wchar.h>.
-AC_DEFUN([gl_REPLACE_WCHAR_H],
-[
- dnl This is a no-op, because <wchar.h> is always overridden.
- :
-])
-
AC_DEFUN([gl_WCHAR_MODULE_INDICATOR],
[
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
diff --git a/m4/wchar_t.m4 b/m4/wchar_t.m4
index d2c03c4..e1e1e69 100644
--- a/m4/wchar_t.m4
+++ b/m4/wchar_t.m4
@@ -1,5 +1,5 @@
# wchar_t.m4 serial 4 (gettext-0.18.2)
-dnl Copyright (C) 2002-2003, 2008-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/wcrtomb.m4 b/m4/wcrtomb.m4
index 2905d9b..f56b5ba 100644
--- a/m4/wcrtomb.m4
+++ b/m4/wcrtomb.m4
@@ -1,5 +1,5 @@
-# wcrtomb.m4 serial 8
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# wcrtomb.m4 serial 11
+dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -14,6 +14,22 @@ AC_DEFUN([gl_FUNC_WCRTOMB],
AC_CHECK_FUNCS_ONCE([wcrtomb])
if test $ac_cv_func_wcrtomb = no; then
HAVE_WCRTOMB=0
+ AC_CHECK_DECLS([wcrtomb],,, [[
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+]])
+ if test $ac_cv_have_decl_wcrtomb = yes; then
+ dnl On Minix 3.1.8, the system's <wchar.h> declares wcrtomb() although
+ dnl it does not have the function. Avoid a collision with gnulib's
+ dnl replacement.
+ REPLACE_WCRTOMB=1
+ fi
else
if test $REPLACE_MBSTATE_T = 1; then
REPLACE_WCRTOMB=1
@@ -88,11 +104,6 @@ int main ()
esac
fi
fi
- if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
- gl_REPLACE_WCHAR_H
- AC_LIBOBJ([wcrtomb])
- gl_PREREQ_WCRTOMB
- fi
])
# Prerequisites of lib/wcrtomb.c.
diff --git a/m4/wctob.m4 b/m4/wctob.m4
index 3b4633c..edc0d79 100644
--- a/m4/wctob.m4
+++ b/m4/wctob.m4
@@ -1,5 +1,5 @@
-# wctob.m4 serial 7
-dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# wctob.m4 serial 10
+dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -10,11 +10,10 @@ AC_DEFUN([gl_FUNC_WCTOB],
AC_CHECK_FUNCS_ONCE([wctob])
if test $ac_cv_func_wctob = no; then
+ HAVE_WCTOB=0
HAVE_DECL_WCTOB=0
- gl_REPLACE_WCHAR_H
- AC_LIBOBJ([wctob])
- gl_PREREQ_WCTOB
else
+ HAVE_WCTOB=1
dnl Solaris 9 has the wctob() function but it does not work.
dnl Cygwin 1.7.2 has the wctob() function but it clobbers caller-owned
@@ -102,14 +101,10 @@ int main ()
*yes) ;;
*) REPLACE_WCTOB=1 ;;
esac
- if test $REPLACE_WCTOB = 1; then
- gl_REPLACE_WCHAR_H
- AC_LIBOBJ([wctob])
- gl_PREREQ_WCTOB
- else
+ if test $REPLACE_WCTOB = 0; then
dnl IRIX 6.5 has the wctob() function but does not declare it.
- AC_CHECK_DECLS([wctob], [], [], [
+ AC_CHECK_DECLS([wctob], [], [], [[
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
<wchar.h>.
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
@@ -118,10 +113,9 @@ int main ()
#include <stdio.h>
#include <time.h>
#include <wchar.h>
-])
+]])
if test $ac_cv_have_decl_wctob != yes; then
HAVE_DECL_WCTOB=0
- gl_REPLACE_WCHAR_H
fi
fi
fi
diff --git a/m4/wctomb.m4 b/m4/wctomb.m4
index bc21b5b..7deba92 100644
--- a/m4/wctomb.m4
+++ b/m4/wctomb.m4
@@ -1,5 +1,5 @@
-# wctomb.m4 serial 1
-dnl Copyright (C) 2011 Free Software Foundation, Inc.
+# wctomb.m4 serial 2
+dnl Copyright (C) 2011-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -11,10 +11,6 @@ AC_DEFUN([gl_FUNC_WCTOMB],
if false; then
REPLACE_WCTOMB=1
fi
- if test $REPLACE_WCTOMB = 1; then
- AC_LIBOBJ([wctomb])
- gl_PREREQ_WCTOMB
- fi
])
# Prerequisites of lib/wctomb.c.
diff --git a/m4/wctype_h.m4 b/m4/wctype_h.m4
index ef9fb04..82ada0e 100644
--- a/m4/wctype_h.m4
+++ b/m4/wctype_h.m4
@@ -1,8 +1,8 @@
-# wctype_h.m4 serial 14
+# wctype_h.m4 serial 18
dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
-dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -22,8 +22,6 @@ AC_DEFUN([gl_WCTYPE_H],
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
@@ -57,7 +55,8 @@ AC_DEFUN([gl_WCTYPE_H],
#if __GNU_LIBRARY__ == 1
Linux libc5 i18n is broken.
#endif]], [])],
- [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no])
+ [gl_cv_func_iswcntrl_works="guessing yes"],
+ [gl_cv_func_iswcntrl_works="guessing no"])
])
])
fi
@@ -67,15 +66,51 @@ AC_DEFUN([gl_WCTYPE_H],
fi
AC_SUBST([HAVE_WCTYPE_H])
- if test "$gl_cv_func_iswcntrl_works" = no; then
- REPLACE_ISWCNTRL=1
- else
- REPLACE_ISWCNTRL=0
- fi
+ case "$gl_cv_func_iswcntrl_works" in
+ *yes) REPLACE_ISWCNTRL=0 ;;
+ *) REPLACE_ISWCNTRL=1 ;;
+ esac
AC_SUBST([REPLACE_ISWCNTRL])
if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
- dnl Redefine all of iswcntrl, ..., towupper in <wctype.h>.
+ dnl Redefine all of iswcntrl, ..., iswxdigit in <wctype.h>.
+ :
+ fi
+
+ if test $REPLACE_ISWCNTRL = 1; then
+ REPLACE_TOWLOWER=1
+ else
+ AC_CHECK_FUNCS([towlower])
+ if test $ac_cv_func_towlower = yes; then
+ REPLACE_TOWLOWER=0
+ else
+ AC_CHECK_DECLS([towlower],,,
+ [[/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
+ included before <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
+ must be included before <wchar.h>. */
+ #include <stddef.h>
+ #include <stdio.h>
+ #include <time.h>
+ #include <wchar.h>
+ #if HAVE_WCTYPE_H
+ # include <wctype.h>
+ #endif
+ ]])
+ if test $ac_cv_have_decl_towlower = yes; then
+ dnl On Minix 3.1.8, the system's <wctype.h> declares towlower() and
+ dnl towupper() although it does not have the functions. Avoid a
+ dnl collision with gnulib's replacement.
+ REPLACE_TOWLOWER=1
+ else
+ REPLACE_TOWLOWER=0
+ fi
+ fi
+ fi
+ AC_SUBST([REPLACE_TOWLOWER])
+
+ if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
+ dnl Redefine towlower, towupper in <wctype.h>.
:
fi
diff --git a/m4/wint_t.m4 b/m4/wint_t.m4
index da1ce3d..d7cd3db 100644
--- a/m4/wint_t.m4
+++ b/m4/wint_t.m4
@@ -1,5 +1,5 @@
# wint_t.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/write.m4 b/m4/write.m4
new file mode 100644
index 0000000..a79b2cc
--- /dev/null
+++ b/m4/write.m4
@@ -0,0 +1,32 @@
+# write.m4 serial 5
+dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_WRITE],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([gl_MSVC_INVAL])
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ REPLACE_WRITE=1
+ fi
+ dnl This ifdef is just an optimization, to avoid performing a configure
+ dnl check whose result is not used. It does not make the test of
+ dnl GNULIB_UNISTD_H_SIGPIPE or GNULIB_SIGPIPE redundant.
+ m4_ifdef([gl_SIGNAL_SIGPIPE], [
+ gl_SIGNAL_SIGPIPE
+ if test $gl_cv_header_signal_h_SIGPIPE != yes; then
+ REPLACE_WRITE=1
+ fi
+ ])
+ m4_ifdef([gl_NONBLOCKING_IO], [
+ gl_NONBLOCKING_IO
+ if test $gl_cv_have_nonblocking != yes; then
+ REPLACE_WRITE=1
+ fi
+ ])
+])
+
+# Prerequisites of lib/write.c.
+AC_DEFUN([gl_PREREQ_WRITE], [:])
diff --git a/m4/xalloc.m4 b/m4/xalloc.m4
index 4900820..64ca701 100644
--- a/m4/xalloc.m4
+++ b/m4/xalloc.m4
@@ -1,24 +1,7 @@
-# xalloc.m4 serial 16
-dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc.
+# xalloc.m4 serial 18
+dnl Copyright (C) 2002-2006, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-AC_DEFUN([gl_XALLOC],
-[
- AC_LIBOBJ([xmalloc])
-
- gl_PREREQ_XALLOC
- gl_PREREQ_XMALLOC
-])
-
-# Prerequisites of lib/xalloc.h.
-AC_DEFUN([gl_PREREQ_XALLOC], [
- AC_REQUIRE([gl_INLINE])
- :
-])
-
-# Prerequisites of lib/xmalloc.c.
-AC_DEFUN([gl_PREREQ_XMALLOC], [
- :
-])
+AC_DEFUN([gl_XALLOC], [:])
diff --git a/m4/xsize.m4 b/m4/xsize.m4
index 8c693bc..8ea9f2c 100644
--- a/m4/xsize.m4
+++ b/m4/xsize.m4
@@ -1,5 +1,5 @@
-# xsize.m4 serial 4
-dnl Copyright (C) 2003-2004, 2008-2011 Free Software Foundation, Inc.
+# xsize.m4 serial 5
+dnl Copyright (C) 2003-2004, 2008-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -8,6 +8,5 @@ AC_DEFUN([gl_XSIZE],
[
dnl Prerequisites of lib/xsize.h.
AC_REQUIRE([gl_SIZE_MAX])
- AC_REQUIRE([AC_C_INLINE])
AC_CHECK_HEADERS([stdint.h])
])
diff --git a/m4/xstrndup.m4 b/m4/xstrndup.m4
index 1400b0f..4a9330b 100644
--- a/m4/xstrndup.m4
+++ b/m4/xstrndup.m4
@@ -1,5 +1,5 @@
# xstrndup.m4 serial 2
-dnl Copyright (C) 2003, 2009-2011 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/xvasprintf.m4 b/m4/xvasprintf.m4
index 7abfaef..772dcc8 100644
--- a/m4/xvasprintf.m4
+++ b/m4/xvasprintf.m4
@@ -1,11 +1,8 @@
-# xvasprintf.m4 serial 1
-dnl Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
+# xvasprintf.m4 serial 2
+dnl Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-AC_DEFUN([gl_XVASPRINTF],
-[
- dnl Prerequisites of lib/xvasprintf.c.
- AC_REQUIRE([AC_C_INLINE])
-])
+dnl Prerequisites of lib/xvasprintf.c.
+AC_DEFUN([gl_XVASPRINTF], [:])
diff --git a/maint.mk b/maint.mk
index 90c22cf..c1b786f 100644
--- a/maint.mk
+++ b/maint.mk
@@ -2,7 +2,7 @@
# This Makefile fragment tries to be general-purpose enough to be
# used by many projects via the gnulib maintainer-makefile module.
-## Copyright (C) 2001-2011 Free Software Foundation, Inc.
+## Copyright (C) 2001-2013 Free Software Foundation, Inc.
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -21,8 +21,34 @@
# ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
ME := maint.mk
-# Override this in cfg.mk if you use a non-standard build-aux directory.
-build_aux ?= $(srcdir)/build-aux
+# Diagnostic for continued use of deprecated variable.
+# Remove in 2013
+ifneq ($(build_aux),)
+ $(error "$(ME): \
+set $$(_build-aux) relative to $$(srcdir) instead of $$(build_aux)")
+endif
+
+# Helper variables.
+_empty =
+_sp = $(_empty) $(_empty)
+
+# _equal,S1,S2
+# ------------
+# If S1 == S2, return S1, otherwise the empty string.
+_equal = $(and $(findstring $(1),$(2)),$(findstring $(2),$(1)))
+
+# member-check,VARIABLE,VALID-VALUES
+# ----------------------------------
+# Check that $(VARIABLE) is in the space-separated list of VALID-VALUES, and
+# return it. Die otherwise.
+member-check = \
+ $(strip \
+ $(if $($(1)), \
+ $(if $(findstring $(_sp),$($(1))), \
+ $(error invalid $(1): '$($(1))', expected $(2)), \
+ $(or $(findstring $(_sp)$($(1))$(_sp),$(_sp)$(2)$(_sp)), \
+ $(error invalid $(1): '$($(1))', expected $(2)))), \
+ $(error $(1) undefined)))
# Do not save the original name or timestamp in the .tar.gz file.
# Use --rsyncable if available.
@@ -33,9 +59,8 @@ GZIP_ENV = '--no-name --best $(gzip_rsyncable)'
GIT = git
VC = $(GIT)
-VC-tag = git tag -s -m '$(VERSION)' -u '$(gpg_key_ID)'
-VC_LIST = $(build_aux)/vc-list-files -C $(srcdir)
+VC_LIST = $(srcdir)/$(_build-aux)/vc-list-files -C $(srcdir)
# You can override this variable in cfg.mk to set your own regexp
# matching files to ignore.
@@ -49,19 +74,21 @@ _dot_escaped_srcdir = $(subst .,\.,$(srcdir))
# Post-process $(VC_LIST) output, prepending $(srcdir)/, but only
# when $(srcdir) is not ".".
ifeq ($(srcdir),.)
-_prepend_srcdir_prefix =
+ _prepend_srcdir_prefix =
else
-_prepend_srcdir_prefix = | sed 's|^|$(srcdir)/|'
+ _prepend_srcdir_prefix = | sed 's|^|$(srcdir)/|'
endif
# In order to be able to consistently filter "."-relative names,
# (i.e., with no $(srcdir) prefix), this definition is careful to
# remove any $(srcdir) prefix, and to restore what it removes.
+_sc_excl = \
+ $(or $(exclude_file_name_regexp--$@),^$$)
VC_LIST_EXCEPT = \
$(VC_LIST) | sed 's|^$(_dot_escaped_srcdir)/||' \
| if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; \
else grep -Ev -e "$${VC_LIST_EXCEPT_DEFAULT-ChangeLog}"; fi \
- | grep -Ev -e '$(VC_LIST_ALWAYS_EXCLUDE_REGEX)' \
+ | grep -Ev -e '($(VC_LIST_ALWAYS_EXCLUDE_REGEX)|$(_sc_excl))' \
$(_prepend_srcdir_prefix)
ifeq ($(origin prev_version_file), undefined)
@@ -73,32 +100,41 @@ VERSION_REGEXP = $(subst .,\.,$(VERSION))
PREV_VERSION_REGEXP = $(subst .,\.,$(PREV_VERSION))
ifeq ($(VC),$(GIT))
-this-vc-tag = v$(VERSION)
-this-vc-tag-regexp = v$(VERSION_REGEXP)
+ this-vc-tag = v$(VERSION)
+ this-vc-tag-regexp = v$(VERSION_REGEXP)
else
-tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]')
-tag-this-version = $(subst .,_,$(VERSION))
-this-vc-tag = $(tag-package)-$(tag-this-version)
-this-vc-tag-regexp = $(this-vc-tag)
+ tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]')
+ tag-this-version = $(subst .,_,$(VERSION))
+ this-vc-tag = $(tag-package)-$(tag-this-version)
+ this-vc-tag-regexp = $(this-vc-tag)
endif
my_distdir = $(PACKAGE)-$(VERSION)
# Old releases are stored here.
release_archive_dir ?= ../release
+# If RELEASE_TYPE is undefined, but RELEASE is, use its second word.
+# But overwrite VERSION.
+ifdef RELEASE
+ VERSION := $(word 1, $(RELEASE))
+ RELEASE_TYPE ?= $(word 2, $(RELEASE))
+endif
+
+# Validate and return $(RELEASE_TYPE), or die.
+RELEASE_TYPES = alpha beta stable
+release-type = $(call member-check,RELEASE_TYPE,$(RELEASE_TYPES))
+
# Override gnu_rel_host and url_dir_list in cfg.mk if these are not right.
# Use alpha.gnu.org for alpha and beta releases.
# Use ftp.gnu.org for stable releases.
gnu_ftp_host-alpha = alpha.gnu.org
gnu_ftp_host-beta = alpha.gnu.org
gnu_ftp_host-stable = ftp.gnu.org
-gnu_rel_host ?= $(gnu_ftp_host-$(RELEASE_TYPE))
+gnu_rel_host ?= $(gnu_ftp_host-$(release-type))
-ifeq ($(gnu_rel_host),ftp.gnu.org)
-url_dir_list ?= http://ftpmirror.gnu.org/$(PACKAGE)
-else
-url_dir_list ?= ftp://$(gnu_rel_host)/gnu/$(PACKAGE)
-endif
+url_dir_list ?= $(if $(call _equal,$(gnu_rel_host),ftp.gnu.org), \
+ http://ftpmirror.gnu.org/$(PACKAGE), \
+ ftp://$(gnu_rel_host)/gnu/$(PACKAGE))
# Override this in cfg.mk if you are using a different format in your
# NEWS file.
@@ -119,17 +155,17 @@ export LC_ALL = C
## Sanity checks. ##
## --------------- ##
-_cfg_mk := $(shell test -f $(srcdir)/cfg.mk && echo '$(srcdir)/cfg.mk')
+_cfg_mk := $(wildcard $(srcdir)/cfg.mk)
-# Collect the names of rules starting with `sc_'.
+# Collect the names of rules starting with 'sc_'.
syntax-check-rules := $(sort $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' \
$(srcdir)/$(ME) $(_cfg_mk)))
.PHONY: $(syntax-check-rules)
ifeq ($(shell $(VC_LIST) >/dev/null 2>&1; echo $$?),0)
-local-checks-available += $(syntax-check-rules)
+ local-checks-available += $(syntax-check-rules)
else
-local-checks-available += no-vc-detected
+ local-checks-available += no-vc-detected
no-vc-detected:
@echo "No version control files detected; skipping syntax check"
endif
@@ -173,11 +209,20 @@ syntax-check: $(local-check)
# Regular expression (ERE) denoting either a forbidden construct
# or a required construct. Those arguments are exclusive.
#
+# exclude
+#
+# Regular expression (ERE) denoting lines to ignore that matched
+# a prohibit construct. For example, this can be used to exclude
+# comments that mention why the nearby code uses an alternative
+# construct instead of the simpler prohibited construct.
+#
# in_vc_files | in_files
#
-# grep-E-style regexp denoting the files to check. If no files
-# are specified the default are all the files that are under
-# version control.
+# grep-E-style regexp selecting the files to check. For in_vc_files,
+# the regexp is used to select matching files from the list of all
+# version-controlled files; for in_files, it's from the names printed
+# by "find $(srcdir)". When neither is specified, use all files that
+# are under version control.
#
# containing | non_containing
#
@@ -196,6 +241,27 @@ syntax-check: $(local-check)
# halt
#
# Message to display before to halting execution.
+#
+# Finally, you may exempt files based on an ERE matching file names.
+# For example, to exempt from the sc_space_tab check all files with the
+# .diff suffix, set this Make variable:
+#
+# exclude_file_name_regexp--sc_space_tab = \.diff$
+#
+# Note that while this functionality is mostly inherited via VC_LIST_EXCEPT,
+# when filtering by name via in_files, we explicitly filter out matching
+# names here as well.
+
+# Initialize each, so that envvar settings cannot interfere.
+export require =
+export prohibit =
+export exclude =
+export in_vc_files =
+export in_files =
+export containing =
+export non_containing =
+export halt =
+export with_grep_options =
# By default, _sc_search_regexp does not ignore case.
export ignore_case =
@@ -206,15 +272,6 @@ define _sc_say_and_exit
{ printf '%s\n' "$(ME): $$msg" 1>&2; exit 1; };
endef
-# _sc_search_regexp used to be named _prohibit_regexp. However,
-# upgrading to the new definition and leaving the old name undefined
-# would usually convert each custom rule using $(_prohibit_regexp)
-# (usually defined in cfg.mk) into a no-op. This definition ensures
-# that people know right away if they're still using the old name.
-# FIXME: remove in 2012.
-_prohibit_regexp = \
- $(error '*** you need to s/_prohibit_regexp/_sc_search_regexp/, and adapt')
-
define _sc_search_regexp
dummy=; : so we do not need a semicolon before each use; \
\
@@ -225,6 +282,9 @@ define _sc_search_regexp
test -z "$$prohibit" && test -z "$$require" \
&& { msg='Should specify either prohibit or require' \
$(_sc_say_and_exit) } || :; \
+ test -z "$$prohibit" && test -n "$$exclude" \
+ && { msg='Use of exclude requires a prohibit pattern' \
+ $(_sc_say_and_exit) } || :; \
test -n "$$in_vc_files" && test -n "$$in_files" \
&& { msg='Cannot specify both in_vc_files and in_files' \
$(_sc_say_and_exit) } || :; \
@@ -233,7 +293,8 @@ define _sc_search_regexp
\
: Filter by file name; \
if test -n "$$in_files"; then \
- files=$$(find $(srcdir) | grep -E "$$in_files"); \
+ files=$$(find $(srcdir) | grep -E "$$in_files" \
+ | grep -Ev '$(_sc_excl)'); \
else \
files=$$($(VC_LIST_EXCEPT)); \
if test -n "$$in_vc_files"; then \
@@ -251,6 +312,7 @@ define _sc_search_regexp
if test -n "$$files"; then \
if test -n "$$prohibit"; then \
grep $$with_grep_options $(_ignore_case) -nE "$$prohibit" $$files \
+ | grep -vE "$${exclude:-^$$}" \
&& { msg="$$halt" $(_sc_say_and_exit) } || :; \
else \
grep $$with_grep_options $(_ignore_case) -LE "$$require" $$files \
@@ -262,24 +324,24 @@ define _sc_search_regexp
endef
sc_avoid_if_before_free:
- @$(build_aux)/useless-if-before-free \
+ @$(srcdir)/$(_build-aux)/useless-if-before-free \
$(useless_free_options) \
$$($(VC_LIST_EXCEPT) | grep -v useless-if-before-free) && \
{ echo '$(ME): found useless "if" before "free" above' 1>&2; \
exit 1; } || :
sc_cast_of_argument_to_free:
- @prohibit='\<free *\( *\(' halt='don'\''t cast free argument' \
+ @prohibit='\<free *\( *\(' halt="don't cast free argument" \
$(_sc_search_regexp)
sc_cast_of_x_alloc_return_value:
@prohibit='\*\) *x(m|c|re)alloc\>' \
- halt='don'\''t cast x*alloc return value' \
+ halt="don't cast x*alloc return value" \
$(_sc_search_regexp)
sc_cast_of_alloca_return_value:
@prohibit='\*\) *alloca\>' \
- halt='don'\''t cast alloca return value' \
+ halt="don't cast alloca return value" \
$(_sc_search_regexp)
sc_space_tab:
@@ -287,7 +349,7 @@ sc_space_tab:
halt='found SPACE-TAB sequence; remove the SPACE' \
$(_sc_search_regexp)
-# Don't use *scanf or the old ato* functions in `real' code.
+# Don't use *scanf or the old ato* functions in "real" code.
# They provide no error checking mechanism.
# Instead, use strto* functions.
sc_prohibit_atoi_atof:
@@ -296,12 +358,20 @@ sc_prohibit_atoi_atof:
$(_sc_search_regexp)
# Use STREQ rather than comparing strcmp == 0, or != 0.
+sp_ = strcmp *\(.+\)
sc_prohibit_strcmp:
- @grep -nE '! *str''cmp *\(|\<str''cmp *\(.+\) *[!=]=' \
- $$($(VC_LIST_EXCEPT)) \
- | grep -vE ':# *define STRN?EQ\(' && \
- { echo '$(ME): replace str''cmp calls above with STREQ/STRNEQ' \
- 1>&2; exit 1; } || :
+ @prohibit='! *strcmp *\(|\<$(sp_) *[!=]=|[!=]= *$(sp_)' \
+ exclude='# *define STRN?EQ\(' \
+ halt='replace strcmp calls above with STREQ/STRNEQ' \
+ $(_sc_search_regexp)
+
+# Really. You don't want to use this function.
+# It may fail to NUL-terminate the destination,
+# and always NUL-pads out to the specified length.
+sc_prohibit_strncpy:
+ @prohibit='\<strncpy *\(' \
+ halt='do not use strncpy, period' \
+ $(_sc_search_regexp)
# Pass EXIT_*, not number, to usage, exit, and error (when exiting)
# Convert all uses automatically, via these two commands:
@@ -314,20 +384,21 @@ sc_prohibit_strcmp:
# | xargs --no-run-if-empty \
# perl -pi -e 's/(^|[^.])\b(exit ?)\(0\)/$1$2(EXIT_SUCCESS)/'
sc_prohibit_magic_number_exit:
- @prohibit='(^|[^.])\<(usage|exit) ?\([0-9]|\<error ?\([1-9][0-9]*,' \
- halt='use EXIT_* values rather than magic number' \
+ @prohibit='(^|[^.])\<(usage|exit|error) ?\(-?[0-9]+[,)]' \
+ exclude='exit \(77\)|error ?\(((0|77),|[^,]*)' \
+ halt='use EXIT_* values rather than magic number' \
$(_sc_search_regexp)
# Using EXIT_SUCCESS as the first argument to error is misleading,
-# since when that parameter is 0, error does not exit. Use `0' instead.
+# since when that parameter is 0, error does not exit. Use '0' instead.
sc_error_exit_success:
@prohibit='error *\(EXIT_SUCCESS,' \
in_vc_files='\.[chly]$$' \
halt='found error (EXIT_SUCCESS' \
$(_sc_search_regexp)
-# `FATAL:' should be fully upper-cased in error messages
-# `WARNING:' should be fully upper-cased, or fully lower-cased
+# "FATAL:" should be fully upper-cased in error messages
+# "WARNING:" should be fully upper-cased, or fully lower-cased
sc_error_message_warn_fatal:
@grep -nEA2 '[^rp]error *\(' $$($(VC_LIST_EXCEPT)) \
| grep -E '"Warning|"Fatal|"fatal' && \
@@ -393,11 +464,11 @@ sc_prohibit_HAVE_MBRTOWC:
$(_sc_search_regexp)
# To use this "command" macro, you must first define two shell variables:
-# h: the header, enclosed in <> or ""
+# h: the header name, with no enclosing <> or ""
# re: a regular expression that matches IFF something provided by $h is used.
define _sc_header_without_use
dummy=; : so we do not need a semicolon before each use; \
- h_esc=`echo "$$h"|sed 's/\./\\\\./g'`; \
+ h_esc=`echo '[<"]'"$$h"'[">]'|sed 's/\./\\\\./g'`; \
if $(VC_LIST_EXCEPT) | grep -l '\.c$$' > /dev/null; then \
files=$$(grep -l '^# *include '"$$h_esc" \
$$($(VC_LIST_EXCEPT) | grep '\.c$$')) && \
@@ -410,42 +481,43 @@ endef
# Prohibit the inclusion of assert.h without an actual use of assert.
sc_prohibit_assert_without_use:
- @h='<assert.h>' re='\<assert *\(' $(_sc_header_without_use)
+ @h='assert.h' re='\<assert *\(' $(_sc_header_without_use)
# Prohibit the inclusion of close-stream.h without an actual use.
sc_prohibit_close_stream_without_use:
- @h='"close-stream.h"' re='\<close_stream *\(' $(_sc_header_without_use)
+ @h='close-stream.h' re='\<close_stream *\(' $(_sc_header_without_use)
# Prohibit the inclusion of getopt.h without an actual use.
sc_prohibit_getopt_without_use:
- @h='<getopt.h>' re='\<getopt(_long)? *\(' $(_sc_header_without_use)
+ @h='getopt.h' re='\<getopt(_long)? *\(' $(_sc_header_without_use)
# Don't include quotearg.h unless you use one of its functions.
sc_prohibit_quotearg_without_use:
- @h='"quotearg.h"' re='\<quotearg(_[^ ]+)? *\(' $(_sc_header_without_use)
+ @h='quotearg.h' re='\<quotearg(_[^ ]+)? *\(' $(_sc_header_without_use)
# Don't include quote.h unless you use one of its functions.
sc_prohibit_quote_without_use:
- @h='"quote.h"' re='\<quote(_n)? *\(' $(_sc_header_without_use)
+ @h='quote.h' re='\<quote((_n)? *\(|_quoting_options\>)' \
+ $(_sc_header_without_use)
# Don't include this header unless you use one of its functions.
sc_prohibit_long_options_without_use:
- @h='"long-options.h"' re='\<parse_long_options *\(' \
+ @h='long-options.h' re='\<parse_long_options *\(' \
$(_sc_header_without_use)
# Don't include this header unless you use one of its functions.
sc_prohibit_inttostr_without_use:
- @h='"inttostr.h"' re='\<(off|[iu]max|uint)tostr *\(' \
+ @h='inttostr.h' re='\<(off|[iu]max|uint)tostr *\(' \
$(_sc_header_without_use)
# Don't include this header unless you use one of its functions.
sc_prohibit_ignore_value_without_use:
- @h='"ignore-value.h"' re='\<ignore_(value|ptr) *\(' \
+ @h='ignore-value.h' re='\<ignore_(value|ptr) *\(' \
$(_sc_header_without_use)
# Don't include this header unless you use one of its functions.
sc_prohibit_error_without_use:
- @h='"error.h"' \
+ @h='error.h' \
re='\<error(_at_line|_print_progname|_one_per_line|_message_count)? *\('\
$(_sc_header_without_use)
@@ -468,7 +540,7 @@ sc_prohibit_error_without_use:
_xa1 = x(((2n?)?re|char|n(re|m)|[cmz])alloc|alloc_(oversized|die)|(mem|str)dup)
_xa2 = X([CZ]|N?M)ALLOC
sc_prohibit_xalloc_without_use:
- @h='"xalloc.h"' \
+ @h='xalloc.h' \
re='\<($(_xa1)|$(_xa2)) *\('\
$(_sc_header_without_use)
@@ -479,36 +551,46 @@ clear|delete|free|get_(first|next)|insert|lookup|print_statistics|reset_tuning
_hash_fn = \<($(_hash_re)) *\(
_hash_struct = (struct )?\<[Hh]ash_(table|tuning)\>
sc_prohibit_hash_without_use:
- @h='"hash.h"' \
+ @h='hash.h' \
re='$(_hash_fn)|$(_hash_struct)'\
$(_sc_header_without_use)
+sc_prohibit_cloexec_without_use:
+ @h='cloexec.h' re='\<(set_cloexec_flag|dup_cloexec) *\(' \
+ $(_sc_header_without_use)
+
+sc_prohibit_posixver_without_use:
+ @h='posixver.h' re='\<posix2_version *\(' $(_sc_header_without_use)
+
+sc_prohibit_same_without_use:
+ @h='same.h' re='\<same_name *\(' $(_sc_header_without_use)
+
sc_prohibit_hash_pjw_without_use:
- @h='"hash-pjw.h"' \
- re='\<hash_pjw *\(' \
+ @h='hash-pjw.h' \
+ re='\<hash_pjw\>' \
$(_sc_header_without_use)
sc_prohibit_safe_read_without_use:
- @h='"safe-read.h"' re='(\<SAFE_READ_ERROR\>|\<safe_read *\()' \
+ @h='safe-read.h' re='(\<SAFE_READ_ERROR\>|\<safe_read *\()' \
$(_sc_header_without_use)
sc_prohibit_argmatch_without_use:
- @h='"argmatch.h"' \
- re='(\<(ARRAY_CARDINALITY|X?ARGMATCH(|_TO_ARGUMENT|_VERIFY))\>|\<argmatch(_exit_fn|_(in)?valid) *\()' \
+ @h='argmatch.h' \
+ re='(\<(ARRAY_CARDINALITY|X?ARGMATCH(|_TO_ARGUMENT|_VERIFY))\>|\<(invalid_arg|argmatch(_exit_fn|_(in)?valid)?) *\()' \
$(_sc_header_without_use)
sc_prohibit_canonicalize_without_use:
- @h='"canonicalize.h"' \
- re='CAN_(EXISTING|ALL_BUT_LAST|MISSING)|canonicalize_(mode_t|filename_mode)' \
+ @h='canonicalize.h' \
+ re='CAN_(EXISTING|ALL_BUT_LAST|MISSING)|canonicalize_(mode_t|filename_mode|file_name)' \
$(_sc_header_without_use)
sc_prohibit_root_dev_ino_without_use:
- @h='"root-dev-ino.h"' \
+ @h='root-dev-ino.h' \
re='(\<ROOT_DEV_INO_(CHECK|WARN)\>|\<get_root_dev_ino *\()' \
$(_sc_header_without_use)
sc_prohibit_openat_without_use:
- @h='"openat.h"' \
+ @h='openat.h' \
re='\<(openat_(permissive|needs_fchdir|(save|restore)_fail)|l?(stat|ch(own|mod))at|(euid)?accessat)\>' \
$(_sc_header_without_use)
@@ -516,11 +598,9 @@ sc_prohibit_openat_without_use:
ctype_re = isalnum|isalpha|isascii|isblank|iscntrl|isdigit|isgraph|islower\
|isprint|ispunct|isspace|isupper|isxdigit|tolower|toupper
sc_prohibit_c_ctype_without_use:
- @h='[<"]c-ctype.h[">]' re='\<c_($(ctype_re)) *\(' \
+ @h='c-ctype.h' re='\<c_($(ctype_re)) *\(' \
$(_sc_header_without_use)
-_empty =
-_sp = $(_empty) $(_empty)
# The following list was generated by running:
# man signal.h|col -b|perl -ne '/bsd_signal.*;/.../sigwaitinfo.*;/ and print' \
# | perl -lne '/^\s+(?:int|void).*?(\w+).*/ and print $1' | fmt
@@ -552,37 +632,73 @@ _sig_syms_re = $(subst $(_sp),|,$(strip $(_sig_names) $(_sig_types_and_consts)))
# Prohibit the inclusion of signal.h without an actual use.
sc_prohibit_signal_without_use:
- @h='<signal.h>' \
+ @h='signal.h' \
re='\<($(_sig_function_re)) *\(|\<($(_sig_syms_re))\>' \
$(_sc_header_without_use)
+# Don't include stdio--.h unless you use one of its functions.
+sc_prohibit_stdio--_without_use:
+ @h='stdio--.h' re='\<((f(re)?|p)open|tmpfile) *\(' \
+ $(_sc_header_without_use)
+
+# Don't include stdio-safer.h unless you use one of its functions.
+sc_prohibit_stdio-safer_without_use:
+ @h='stdio-safer.h' re='\<((f(re)?|p)open|tmpfile)_safer *\(' \
+ $(_sc_header_without_use)
+
# Prohibit the inclusion of strings.h without a sensible use.
# Using the likes of bcmp, bcopy, bzero, index or rindex is not sensible.
sc_prohibit_strings_without_use:
- @h='<strings.h>' \
+ @h='strings.h' \
re='\<(strn?casecmp|ffs(ll)?)\>' \
$(_sc_header_without_use)
# Get the list of symbol names with this:
-# perl -lne '/^# *define (\w+)\(/ and print $1' lib/intprops.h|grep -v '^s'|fmt
+# perl -lne '/^# *define ([A-Z]\w+)\(/ and print $1' lib/intprops.h|fmt
_intprops_names = \
TYPE_IS_INTEGER TYPE_TWOS_COMPLEMENT TYPE_ONES_COMPLEMENT \
TYPE_SIGNED_MAGNITUDE TYPE_SIGNED TYPE_MINIMUM TYPE_MAXIMUM \
- INT_STRLEN_BOUND INT_BUFSIZE_BOUND
+ INT_BITS_STRLEN_BOUND INT_STRLEN_BOUND INT_BUFSIZE_BOUND \
+ INT_ADD_RANGE_OVERFLOW INT_SUBTRACT_RANGE_OVERFLOW \
+ INT_NEGATE_RANGE_OVERFLOW INT_MULTIPLY_RANGE_OVERFLOW \
+ INT_DIVIDE_RANGE_OVERFLOW INT_REMAINDER_RANGE_OVERFLOW \
+ INT_LEFT_SHIFT_RANGE_OVERFLOW INT_ADD_OVERFLOW INT_SUBTRACT_OVERFLOW \
+ INT_NEGATE_OVERFLOW INT_MULTIPLY_OVERFLOW INT_DIVIDE_OVERFLOW \
+ INT_REMAINDER_OVERFLOW INT_LEFT_SHIFT_OVERFLOW
_intprops_syms_re = $(subst $(_sp),|,$(strip $(_intprops_names)))
# Prohibit the inclusion of intprops.h without an actual use.
sc_prohibit_intprops_without_use:
- @h='"intprops.h"' \
+ @h='intprops.h' \
re='\<($(_intprops_syms_re)) *\(' \
$(_sc_header_without_use)
_stddef_syms_re = NULL|offsetof|ptrdiff_t|size_t|wchar_t
# Prohibit the inclusion of stddef.h without an actual use.
sc_prohibit_stddef_without_use:
- @h='<stddef.h>' \
- re='\<($(_stddef_syms_re)) *\(' \
+ @h='stddef.h' \
+ re='\<($(_stddef_syms_re))\>' \
+ $(_sc_header_without_use)
+
+_de1 = dirfd|(close|(fd)?open|read|rewind|seek|tell)dir(64)?(_r)?
+_de2 = (versionsort|struct dirent|getdirentries|alphasort|scandir(at)?)(64)?
+_de3 = MAXNAMLEN|DIR|ino_t|d_ino|d_fileno|d_namlen
+_dirent_syms_re = $(_de1)|$(_de2)|$(_de3)
+# Prohibit the inclusion of dirent.h without an actual use.
+sc_prohibit_dirent_without_use:
+ @h='dirent.h' \
+ re='\<($(_dirent_syms_re))\>' \
+ $(_sc_header_without_use)
+
+# Prohibit the inclusion of verify.h without an actual use.
+sc_prohibit_verify_without_use:
+ @h='verify.h' \
+ re='\<(verify(true|expr)?|static_assert) *\(' \
$(_sc_header_without_use)
+# Don't include xfreopen.h unless you use one of its functions.
+sc_prohibit_xfreopen_without_use:
+ @h='xfreopen.h' re='\<xfreopen *\(' $(_sc_header_without_use)
+
sc_obsolete_symbols:
@prohibit='\<(HAVE''_FCNTL_H|O''_NDELAY)\>' \
halt='do not use HAVE''_FCNTL_H or O'_NDELAY \
@@ -634,15 +750,10 @@ sc_require_test_exit_idiom:
exit 1; } || :; \
fi
-sc_the_the:
- @prohibit='\<the ''the\>' \
- ignore_case=1 \
- halt='found use of "the ''the";' \
- $(_sc_search_regexp)
-
sc_trailing_blank:
@prohibit='[ ]$$' \
halt='found trailing blank(s)' \
+ exclude='^Binary file .* matches$$' \
$(_sc_search_regexp)
# Match lines like the following, but where there is only one space
@@ -654,14 +765,17 @@ sc_two_space_separator_in_usage:
halt='help2man requires at least two spaces between an option and its description'\
$(_sc_search_regexp)
+# A regexp matching function names like "error" that may be used
+# to emit translatable messages.
+_gl_translatable_diag_func_re ?= error
+
# Look for diagnostics that aren't marked for translation.
# This won't find any for which error's format string is on a separate line.
sc_unmarked_diagnostics:
- @grep -nE \
- '\<error *\([^"]*"[^"]*[a-z]{3}' $$($(VC_LIST_EXCEPT)) \
- | grep -v '_''(' && \
- { echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
- exit 1; } || :
+ @prohibit='\<$(_gl_translatable_diag_func_re) *\([^"]*"[^"]*[a-z]{3}' \
+ exclude='(_|ngettext ?)\(' \
+ halt='found unmarked diagnostic(s)' \
+ $(_sc_search_regexp)
# Avoid useless parentheses like those in this example:
# #if defined (SYMBOL) || defined (SYM2)
@@ -694,6 +808,11 @@ sc_prohibit_always_true_header_tests:
' with the corresponding gnulib module, they are always true') \
$(_sc_search_regexp)
+sc_prohibit_defined_have_decl_tests:
+ @prohibit='(#[ ]*ifn?def|\<defined)\>[ (]+HAVE_DECL_' \
+ halt='HAVE_DECL macros are always defined' \
+ $(_sc_search_regexp)
+
# ==================================================================
gl_other_headers_ ?= \
intprops.h \
@@ -702,10 +821,13 @@ gl_other_headers_ ?= \
# Perl -lne code to extract "significant" cpp-defined symbols from a
# gnulib header file, eliminating a few common false-positives.
+# The exempted names below are defined only conditionally in gnulib,
+# and hence sometimes must/may be defined in application code.
gl_extract_significant_defines_ = \
/^\# *define ([^_ (][^ (]*)(\s*\(|\s+\w+)/\
&& $$2 !~ /(?:rpl_|_used_without_)/\
- && $$1 !~ /^(?:NSIG|ATTRIBUTE_NORETURN)$$/\
+ && $$1 !~ /^(?:NSIG|ENODATA)$$/\
+ && $$1 !~ /^(?:SA_RESETHAND|SA_RESTART)$$/\
and print $$1
# Create a list of regular expressions matching the names
@@ -714,10 +836,10 @@ define def_sym_regex
gen_h=$(gl_generated_headers_); \
(cd $(gnulib_dir)/lib; \
for f in *.in.h $(gl_other_headers_); do \
- perl -lne '$(gl_extract_significant_defines_)' $$f; \
+ test -f $$f \
+ && perl -lne '$(gl_extract_significant_defines_)' $$f; \
done; \
) | sort -u \
- | grep -Ev '^ATTRIBUTE_NORETURN' \
| sed 's/^/^ *# *(define|undef) */;s/$$/\\>/'
endef
@@ -783,7 +905,7 @@ sc_prohibit_cvs_keyword:
#
# This is a perl script that is expected to be the single-quoted argument
# to a command-line "-le". The remaining arguments are file names.
-# Print the name of each file that ends in exactly one newline byte.
+# Print the name of each file that does not end in exactly one newline byte.
# I.e., warn if there are blank lines (2 or more newlines), or if the
# last byte is not a newline. However, currently we don't complain
# about any file that contains exactly one byte.
@@ -810,8 +932,8 @@ require_exactly_one_NL_at_EOF_ = \
END { exit defined $$fail }
sc_prohibit_empty_lines_at_EOF:
@perl -le '$(require_exactly_one_NL_at_EOF_)' $$($(VC_LIST_EXCEPT)) \
- || { echo '$(ME): empty line(s) or no newline at EOF' \
- 1>&2; exit 1; } || :; \
+ || { echo '$(ME): empty line(s) or no newline at EOF' \
+ 1>&2; exit 1; } || :
# Make sure we don't use st_blocks. Use ST_NBLOCKS instead.
# This is a bit of a kludge, since it prevents use of the string
@@ -828,6 +950,57 @@ sc_prohibit_S_IS_definition:
halt='do not define S_IS* macros; include <sys/stat.h>' \
$(_sc_search_regexp)
+# Perl block to convert a match to FILE_NAME:LINENO:TEST,
+# that is shared by two definitions below.
+perl_filename_lineno_text_ = \
+ -e ' {' \
+ -e ' $$n = ($$` =~ tr/\n/\n/ + 1);' \
+ -e ' ($$v = $$&) =~ s/\n/\\n/g;' \
+ -e ' print "$$ARGV:$$n:$$v\n";' \
+ -e ' }'
+
+prohibit_doubled_word_RE_ ?= \
+ /\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt]o)\s+\1\b/gims
+prohibit_doubled_word_ = \
+ -e 'while ($(prohibit_doubled_word_RE_))' \
+ $(perl_filename_lineno_text_)
+
+# Define this to a regular expression that matches
+# any filename:dd:match lines you want to ignore.
+# The default is to ignore no matches.
+ignore_doubled_word_match_RE_ ?= ^$$
+
+sc_prohibit_doubled_word:
+ @perl -n -0777 $(prohibit_doubled_word_) $$($(VC_LIST_EXCEPT)) \
+ | grep -vE '$(ignore_doubled_word_match_RE_)' \
+ | grep . && { echo '$(ME): doubled words' 1>&2; exit 1; } || :
+
+# A regular expression matching undesirable combinations of words like
+# "can not"; this matches them even when the two words appear on different
+# lines, but not when there is an intervening delimiter like "#" or "*".
+# Similarly undesirable, "See @xref{...}", since an @xref should start
+# a sentence. Explicitly prohibit any prefix of "see" or "also".
+# Also prohibit a prefix matching "\w+ +".
+# @pxref gets the same see/also treatment and should be parenthesized;
+# presume it must *not* start a sentence.
+bad_xref_re_ ?= (?:[\w,:;] +|(?:see|also)\s+)\@xref\{
+bad_pxref_re_ ?= (?:[.!?]|(?:see|also))\s+\@pxref\{
+prohibit_undesirable_word_seq_RE_ ?= \
+ /(?:\bcan\s+not\b|$(bad_xref_re_)|$(bad_pxref_re_))/gims
+prohibit_undesirable_word_seq_ = \
+ -e 'while ($(prohibit_undesirable_word_seq_RE_))' \
+ $(perl_filename_lineno_text_)
+# Define this to a regular expression that matches
+# any filename:dd:match lines you want to ignore.
+# The default is to ignore no matches.
+ignore_undesirable_word_sequence_RE_ ?= ^$$
+
+sc_prohibit_undesirable_word_seq:
+ @perl -n -0777 $(prohibit_undesirable_word_seq_) \
+ $$($(VC_LIST_EXCEPT)) \
+ | grep -vE '$(ignore_undesirable_word_sequence_RE_)' | grep . \
+ && { echo '$(ME): undesirable word sequence' >&2; exit 1; } || :
+
_ptm1 = use "test C1 && test C2", not "test C1 -''a C2"
_ptm2 = use "test C1 || test C2", not "test C1 -''o C2"
# Using test's -a and -o operators is not portable.
@@ -875,10 +1048,10 @@ sc_redundant_const:
$(_sc_search_regexp)
sc_const_long_option:
- @grep '^ *static.*struct option ' $$($(VC_LIST_EXCEPT)) \
- | grep -Ev 'const struct option|struct option const' && { \
- echo 1>&2 '$(ME): add "const" to the above declarations'; \
- exit 1; } || :
+ @prohibit='^ *static.*struct option ' \
+ exclude='const struct option|struct option const' \
+ halt='add "const" to the above declarations' \
+ $(_sc_search_regexp)
NEWS_hash = \
$$(sed -n '/^\*.* $(PREV_VERSION_REGEXP) ([0-9-]*)/,$$p' \
@@ -904,20 +1077,27 @@ update-NEWS-hash: NEWS
# Ensure that we use only the standard $(VAR) notation,
# not @...@ in Makefile.am, now that we can rely on automake
# to emit a definition for each substituted variable.
-# We use perl rather than "grep -nE ..." to exempt a single
-# use of an @...@-delimited variable name in src/Makefile.am.
+# However, there is still one case in which @VAR@ use is not just
+# legitimate, but actually required: when augmenting an automake-defined
+# variable with a prefix. For example, gettext uses this:
+# MAKEINFO = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= @MAKEINFO@
+# otherwise, makeinfo would put German or French (current locale)
+# navigation hints in the otherwise-English documentation.
+#
# Allow the package to add exceptions via a hook in cfg.mk;
# for example, @PRAGMA_SYSTEM_HEADER@ can be permitted by
# setting this to ' && !/PRAGMA_SYSTEM_HEADER/'.
_makefile_at_at_check_exceptions ?=
sc_makefile_at_at_check:
- @perl -ne '/\@[A-Z_0-9]+\@/'$(_makefile_at_at_check_exceptions) \
+ @perl -ne '/\@\w+\@/' \
+ -e ' && !/(\w+)\s+=.*\@\1\@$$/' \
+ -e ''$(_makefile_at_at_check_exceptions) \
-e 'and (print "$$ARGV:$$.: $$_"), $$m=1; END {exit !$$m}' \
- $$($(VC_LIST_EXCEPT) | grep -E '(^|/)Makefile\.am$$') \
+ $$($(VC_LIST_EXCEPT) | grep -E '(^|/)(Makefile\.am|[^/]+\.mk)$$') \
&& { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || :
news-check: NEWS
- if sed -n $(news-check-lines-spec)p $(srcdir)/NEWS \
+ $(AM_V_GEN)if sed -n $(news-check-lines-spec)p $< \
| grep -E $(news-check-regexp) >/dev/null; then \
:; \
else \
@@ -941,14 +1121,17 @@ fix_po_file_diag = \
'you have changed the set of files with translatable diagnostics;\n\
apply the above patch\n'
-# Verify that all source files using _() are listed in po/POTFILES.in.
-po_file = po/POTFILES.in
+# Verify that all source files using _() (more specifically, files that
+# match $(_gl_translatable_string_re)) are listed in po/POTFILES.in.
+po_file ?= $(srcdir)/po/POTFILES.in
+generated_files ?= $(srcdir)/lib/*.[ch]
+_gl_translatable_string_re ?= \b(N?_|gettext *)\([^)"]*("|$$)
sc_po_check:
@if test -f $(po_file); then \
grep -E -v '^(#|$$)' $(po_file) \
| grep -v '^src/false\.c$$' | sort > $@-1; \
files=; \
- for file in $$($(VC_LIST_EXCEPT)) lib/*.[ch]; do \
+ for file in $$($(VC_LIST_EXCEPT)) $(generated_files); do \
test -r $$file || continue; \
case $$file in \
*.m4|*.mk) continue ;; \
@@ -962,8 +1145,8 @@ sc_po_check:
esac; \
files="$$files $$file"; \
done; \
- grep -E -l '\b(N?_|gettext *)\([^)"]*("|$$)' $$files \
- | sort -u > $@-2; \
+ grep -E -l '$(_gl_translatable_string_re)' $$files \
+ | sed 's|^$(_dot_escaped_srcdir)/||' | sort -u > $@-2; \
diff -u -L $(po_file) -L $(po_file) $@-1 $@-2 \
|| { printf '$(ME): '$(fix_po_file_diag) 1>&2; exit 1; }; \
rm -f $@-1 $@-2; \
@@ -971,24 +1154,28 @@ sc_po_check:
# Sometimes it is useful to change the PATH environment variable
# in Makefiles. When doing so, it's better not to use the Unix-centric
-# path separator of `:', but rather the automake-provided `$(PATH_SEPARATOR)'.
-msg = '$(ME): Do not use `:'\'' above; use $$(PATH_SEPARATOR) instead'
+# path separator of ':', but rather the automake-provided '$(PATH_SEPARATOR)'.
+msg = 'Do not use ":" above; use $$(PATH_SEPARATOR) instead'
sc_makefile_path_separator_check:
@prohibit='PATH[=].*:' \
in_vc_files='akefile|\.mk$$' \
halt=$(msg) \
$(_sc_search_regexp)
-# Check that `make alpha' will not fail at the end of the process.
+# Check that 'make alpha' will not fail at the end of the process,
+# i.e., when pkg-M.N.tar.xz already exists (either in "." or in ../release)
+# and is read-only.
writable-files:
- if test -d $(release_archive_dir); then :; else \
- for file in $(distdir).tar.gz \
- $(release_archive_dir)/$(distdir).tar.gz; do \
- test -e $$file || continue; \
- test -w $$file \
- || { echo ERROR: $$file is not writable; fail=1; }; \
+ $(AM_V_GEN)if test -d $(release_archive_dir); then \
+ for file in $(DIST_ARCHIVES); do \
+ for p in ./ $(release_archive_dir)/; do \
+ test -e $$p$$file || continue; \
+ test -w $$p$$file \
+ || { echo ERROR: $$p$$file is not writable; fail=1; }; \
+ done; \
done; \
test "$$fail" && exit 1 || : ; \
+ else :; \
fi
v_etc_file = $(gnulib_dir)/lib/version-etc.c
@@ -1019,6 +1206,7 @@ sc_copyright_check:
# the other init.sh-using tests also get it right.
_hv_file ?= $(srcdir)/tests/help-version
_hv_regex_weak ?= ^ *\. .*/init\.sh"
+# Fix syntax-highlighters "
_hv_regex_strong ?= ^ *\. "\$${srcdir=\.}/init\.sh"
sc_cross_check_PATH_usage_in_tests:
@if test -f $(_hv_file); then \
@@ -1036,6 +1224,16 @@ sc_cross_check_PATH_usage_in_tests:
1>&2; exit 1; } || :; \
fi
+# BRE regex of file contents to identify a test script.
+_test_script_regex ?= \<init\.sh\>
+
+# In tests, use "compare expected actual", not the reverse.
+sc_prohibit_reversed_compare_failure:
+ @prohibit='\<compare [^ ]+ ([^ ]*exp|/dev/null)' \
+ containing='$(_test_script_regex)' \
+ halt='reversed compare arguments' \
+ $(_sc_search_regexp)
+
# #if HAVE_... will evaluate to false for any non numeric string.
# That would be flagged by using -Wundef, however gnulib currently
# tests many undefined macros, and so we can't enable that option.
@@ -1046,18 +1244,35 @@ sc_Wundef_boolean:
halt='Use 0 or 1 for macro values' \
$(_sc_search_regexp)
+# Even if you use pathmax.h to guarantee that PATH_MAX is defined, it might
+# not be constant, or might overflow a stack. In general, use PATH_MAX as
+# a limit, not an array or alloca size.
+sc_prohibit_path_max_allocation:
+ @prohibit='(\balloca *\([^)]*|\[[^]]*)\bPATH_MAX' \
+ halt='Avoid stack allocations of size PATH_MAX' \
+ $(_sc_search_regexp)
+
sc_vulnerable_makefile_CVE-2009-4029:
@prohibit='perm -777 -exec chmod a\+rwx|chmod 777 \$$\(distdir\)' \
- in_files=$$(find $(srcdir) -name Makefile.in) \
+ in_files='(^|/)Makefile\.in$$' \
halt=$$(printf '%s\n' \
'the above files are vulnerable; beware of running' \
' "make dist*" rules, and upgrade to fixed automake' \
' see http://bugzilla.redhat.com/542609 for details') \
$(_sc_search_regexp)
+sc_vulnerable_makefile_CVE-2012-3386:
+ @prohibit='chmod a\+w \$$\(distdir\)' \
+ in_files='(^|/)Makefile\.in$$' \
+ halt=$$(printf '%s\n' \
+ 'the above files are vulnerable; beware of running' \
+ ' "make distcheck", and upgrade to fixed automake' \
+ ' see http://bugzilla.redhat.com/CVE-2012-3386 for details') \
+ $(_sc_search_regexp)
+
vc-diff-check:
- (unset CDPATH; cd $(srcdir) && $(VC) diff) > vc-diffs || :
- if test -s vc-diffs; then \
+ $(AM_V_GEN)(unset CDPATH; cd $(srcdir) && $(VC) diff) > vc-diffs || :
+ $(AM_V_at)if test -s vc-diffs; then \
cat vc-diffs; \
echo "Some files are locally modified:" 1>&2; \
exit 1; \
@@ -1073,32 +1288,55 @@ bootstrap-tools ?= autoconf,automake,gnulib
# If it's not already specified, derive the GPG key ID from
# the signed tag we've just applied to mark this release.
-gpg_key_ID ?= \
- $$(git cat-file tag v$(VERSION) > .ann-sig \
- && gpgv .ann-sig - < /dev/null 2>&1 \
- | sed -n '/.*key ID \([0-9A-F]*\)/s//\1/p'; rm -f .ann-sig)
+gpg_key_ID ?= \
+ $$(cd $(srcdir) \
+ && git cat-file tag v$(VERSION) \
+ | gpgv --status-fd 1 --keyring /dev/null - - 2>/dev/null \
+ | awk '/^\[GNUPG:\] ERRSIG / {print $$3; exit}')
translation_project_ ?= coordinator@translationproject.org
-announcement_Cc_ ?= $(translation_project_), $(PACKAGE_BUGREPORT)
-announcement_mail_headers_ ?= \
-To: info-gnu@gnu.org \
-Cc: $(announcement_Cc_) \
-Mail-Followup-To: $(PACKAGE_BUGREPORT)
+# Make info-gnu the default only for a stable release.
+announcement_Cc_stable = $(translation_project_), $(PACKAGE_BUGREPORT)
+announcement_mail_headers_stable = \
+ To: info-gnu@gnu.org \
+ Cc: $(announcement_Cc_) \
+ Mail-Followup-To: $(PACKAGE_BUGREPORT)
+
+announcement_Cc_alpha = $(translation_project_)
+announcement_mail_headers_alpha = \
+ To: $(PACKAGE_BUGREPORT) \
+ Cc: $(announcement_Cc_)
+
+announcement_mail_Cc_beta = $(announcement_mail_Cc_alpha)
+announcement_mail_headers_beta = $(announcement_mail_headers_alpha)
+
+announcement_mail_Cc_ ?= $(announcement_mail_Cc_$(release-type))
+announcement_mail_headers_ ?= $(announcement_mail_headers_$(release-type))
announcement: NEWS ChangeLog $(rel-files)
- @$(build_aux)/announce-gen \
+# Not $(AM_V_GEN) since the output of this command serves as
+# announcement message: it would start with " GEN announcement".
+ $(AM_V_at)$(srcdir)/$(_build-aux)/announce-gen \
--mail-headers='$(announcement_mail_headers_)' \
- --release-type=$(RELEASE_TYPE) \
+ --release-type=$(release-type) \
--package=$(PACKAGE) \
--prev=$(PREV_VERSION) \
--curr=$(VERSION) \
--gpg-key-id=$(gpg_key_ID) \
+ --srcdir=$(srcdir) \
--news=$(srcdir)/NEWS \
--bootstrap-tools=$(bootstrap-tools) \
- --gnulib-version=$(gnulib-version) \
+ $$(case ,$(bootstrap-tools), in (*,gnulib,*) \
+ echo --gnulib-version=$(gnulib-version);; esac) \
--no-print-checksums \
$(addprefix --url-dir=, $(url_dir_list))
+.PHONY: release-commit
+release-commit:
+ $(AM_V_GEN)cd $(srcdir) \
+ && $(_build-aux)/do-release-commit-and-tag \
+ -C $(abs_builddir) $(RELEASE)
+
## ---------------- ##
## Updating files. ##
## ---------------- ##
@@ -1107,26 +1345,33 @@ ftp-gnu = ftp://ftp.gnu.org/gnu
www-gnu = http://www.gnu.org
upload_dest_dir_ ?= $(PACKAGE)
+upload_command = \
+ $(srcdir)/$(_build-aux)/gnupload $(GNUPLOADFLAGS) \
+ --to $(gnu_rel_host):$(upload_dest_dir_) \
+ $(rel-files)
emit_upload_commands:
@echo =====================================
@echo =====================================
- @echo "$(build_aux)/gnupload $(GNUPLOADFLAGS) \\"
- @echo " --to $(gnu_rel_host):$(upload_dest_dir_) \\"
- @echo " $(rel-files)"
+ @echo '$(upload_command)'
@echo '# send the ~/announce-$(my_distdir) e-mail'
@echo =====================================
@echo =====================================
+.PHONY: upload
+upload:
+ $(AM_V_GEN)$(upload_command)
+
define emit-commit-log
- printf '%s\n' 'post-release administrivia' '' \
- '* NEWS: Add header line for next release.' \
- '* .prev-version: Record previous version.' \
+ printf '%s\n' 'maint: post-release administrivia' '' \
+ '* NEWS: Add header line for next release.' \
+ '* .prev-version: Record previous version.' \
'* cfg.mk (old_NEWS_hash): Auto-update.'
endef
.PHONY: no-submodule-changes
no-submodule-changes:
- if test -d $(srcdir)/.git; then \
+ $(AM_V_GEN)if test -d $(srcdir)/.git \
+ && git --version >/dev/null 2>&1; then \
diff=$$(cd $(srcdir) && git submodule -q foreach \
git diff-index --name-only HEAD) \
|| exit 1; \
@@ -1144,10 +1389,12 @@ submodule-checks ?= no-submodule-changes public-submodule-commit
# cannot be built from a fresh clone.
.PHONY: public-submodule-commit
public-submodule-commit:
- $(AM_V_GEN)if test -d $(srcdir)/.git; then \
+ $(AM_V_GEN)if test -d $(srcdir)/.git \
+ && git --version >/dev/null 2>&1; then \
cd $(srcdir) && \
- git submodule --quiet foreach test '$$(git rev-parse $$sha1)' \
- = '$$(git merge-base origin $$sha1)' \
+ git submodule --quiet foreach \
+ test '"$$(git rev-parse "$$sha1")"' \
+ = '"$$(git merge-base origin "$$sha1")"' \
|| { echo '$(ME): found non-public submodule commit' >&2; \
exit 1; }; \
else \
@@ -1162,19 +1409,22 @@ public-submodule-commit:
gl_public_submodule_commit ?= public-submodule-commit
check: $(gl_public_submodule_commit)
-.PHONY: alpha beta stable
+.PHONY: alpha beta stable release
ALL_RECURSIVE_TARGETS += alpha beta stable
alpha beta stable: $(local-check) writable-files $(submodule-checks)
- test $@ = stable \
+ $(AM_V_GEN)test $@ = stable \
&& { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$' \
|| { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\
|| :
- $(MAKE) vc-diff-check
- $(MAKE) news-check
- $(MAKE) distcheck
- $(MAKE) dist XZ_OPT=-9ev
- $(MAKE) $(release-prep-hook) RELEASE_TYPE=$@
- $(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
+ $(AM_V_at)$(MAKE) vc-diff-check
+ $(AM_V_at)$(MAKE) news-check
+ $(AM_V_at)$(MAKE) distcheck
+ $(AM_V_at)$(MAKE) dist
+ $(AM_V_at)$(MAKE) $(release-prep-hook) RELEASE_TYPE=$@
+ $(AM_V_at)$(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
+
+release:
+ $(AM_V_GEN)$(MAKE) $(release-type)
# Override this in cfg.mk if you follow different procedures.
release-prep-hook ?= release-prep
@@ -1182,19 +1432,19 @@ release-prep-hook ?= release-prep
gl_noteworthy_news_ = * Noteworthy changes in release ?.? (????-??-??) [?]
.PHONY: release-prep
release-prep:
- case $$RELEASE_TYPE in alpha|beta|stable) ;; \
- *) echo "invalid RELEASE_TYPE: $$RELEASE_TYPE" 1>&2; exit 1;; esac
- $(MAKE) -s announcement > ~/announce-$(my_distdir)
- if test -d $(release_archive_dir); then \
+ $(AM_V_GEN)$(MAKE) --no-print-directory -s announcement \
+ > ~/announce-$(my_distdir)
+ $(AM_V_at)if test -d $(release_archive_dir); then \
ln $(rel-files) $(release_archive_dir); \
chmod a-w $(rel-files); \
fi
- echo $(VERSION) > $(prev_version_file)
- $(MAKE) update-NEWS-hash
- perl -pi -e '$$. == 3 and print "$(gl_noteworthy_news_)\n\n\n"' NEWS
- $(emit-commit-log) > .ci-msg
- $(VC) commit -F .ci-msg -a
- rm .ci-msg
+ $(AM_V_at)echo $(VERSION) > $(prev_version_file)
+ $(AM_V_at)$(MAKE) update-NEWS-hash
+ $(AM_V_at)perl -pi \
+ -e '$$. == 3 and print "$(gl_noteworthy_news_)\n\n\n"' \
+ $(srcdir)/NEWS
+ $(AM_V_at)msg=$$($(emit-commit-log)) || exit 1; \
+ cd $(srcdir) && $(VC) commit -m "$$msg" -a
# Override this with e.g., -s $(srcdir)/some_other_name.texi
# if the default $(PACKAGE)-derived name doesn't apply.
@@ -1202,14 +1452,20 @@ gendocs_options_ ?=
.PHONY: web-manual
web-manual:
- @test -z "$(manual_title)" \
+ $(AM_V_GEN)test -z "$(manual_title)" \
&& { echo define manual_title in cfg.mk 1>&2; exit 1; } || :
- @cd '$(srcdir)/doc'; \
- $(SHELL) ../build-aux/gendocs.sh $(gendocs_options_) \
+ $(AM_V_at)cd '$(srcdir)/doc'; \
+ $(SHELL) ../$(_build-aux)/gendocs.sh $(gendocs_options_) \
-o '$(abs_builddir)/doc/manual' \
--email $(PACKAGE_BUGREPORT) $(PACKAGE) \
"$(PACKAGE_NAME) - $(manual_title)"
- @echo " *** Upload the doc/manual directory to web-cvs."
+ $(AM_V_at)echo " *** Upload the doc/manual directory to web-cvs."
+
+.PHONY: web-manual-update
+web-manual-update:
+ $(AM_V_GEN)cd $(srcdir) \
+ && $(_build-aux)/gnu-web-doc-update -C $(abs_builddir)
+
# Code Coverage
@@ -1235,6 +1491,31 @@ gen-coverage:
coverage: init-coverage build-coverage gen-coverage
+# Some projects carry local adjustments for gnulib modules via patches in
+# a gnulib patch directory whose default name is gl/ (defined in bootstrap
+# via local_gl_dir=gl). Those patches become stale as the originals evolve
+# in gnulib. Use this rule to refresh any stale patches. It applies each
+# patch to the original in $(gnulib_dir) and uses the temporary result to
+# generate a fuzz-free .diff file. If you customize the name of your local
+# gnulib patch directory via bootstrap.conf, this rule detects that name.
+# Run this from a non-VPATH (i.e., srcdir) build directory.
+.PHONY: refresh-gnulib-patches
+refresh-gnulib-patches:
+ gl=gl; \
+ if test -f bootstrap.conf; then \
+ t=$$(perl -lne '/^\s*local_gl_dir=(\S+)/ and $$d=$$1;' \
+ -e 'END{defined $$d and print $$d}' bootstrap.conf); \
+ test -n "$$t" && gl=$$t; \
+ fi; \
+ for diff in $$(cd $$gl; git ls-files | grep '\.diff$$'); do \
+ b=$$(printf %s "$$diff"|sed 's/\.diff$$//'); \
+ VERSION_CONTROL=none \
+ patch "$(gnulib_dir)/$$b" "$$gl/$$diff" || exit 1; \
+ ( cd $(gnulib_dir) || exit 1; \
+ git diff "$$b" > "../$$gl/$$diff"; \
+ git checkout $$b ) || exit 1; \
+ done
+
# Update gettext files.
PACKAGE ?= $(shell basename $(PWD))
PO_DOMAIN ?= $(PACKAGE)
@@ -1246,7 +1527,7 @@ refresh-po:
wget --no-verbose --directory-prefix $(PODIR) --no-directories --recursive --level 1 --accept .po --accept .po.1 $(POURL) && \
echo 'en@boldquot' > $(PODIR)/LINGUAS && \
echo 'en@quot' >> $(PODIR)/LINGUAS && \
- ls $(PODIR)/*.po | sed 's/\.po//' | sed 's,$(PODIR)/,,' | sort >> $(PODIR)/LINGUAS
+ ls $(PODIR)/*.po | sed 's/\.po//;s,$(PODIR)/,,' | sort >> $(PODIR)/LINGUAS
# Running indent once is not idempotent, but running it twice is.
INDENT_SOURCES ?= $(C_SOURCES)
@@ -1268,6 +1549,108 @@ update-copyright-env ?=
# in the file .x-update-copyright.
.PHONY: update-copyright
update-copyright:
- grep -l -w Copyright \
+ $(AM_V_GEN)grep -l -w Copyright \
$$(export VC_LIST_EXCEPT_DEFAULT=COPYING && $(VC_LIST_EXCEPT)) \
- | $(update-copyright-env) xargs $(build_aux)/$@
+ | $(update-copyright-env) xargs $(srcdir)/$(_build-aux)/$@
+
+# This tight_scope test is skipped with a warning if $(_gl_TS_headers) is not
+# overridden and $(_gl_TS_dir)/Makefile.am does not mention noinst_HEADERS.
+
+# NOTE: to override any _gl_TS_* default value, you must
+# define the variable(s) using "export" in cfg.mk.
+_gl_TS_dir ?= src
+
+ALL_RECURSIVE_TARGETS += sc_tight_scope
+sc_tight_scope: tight-scope.mk
+ @fail=0; \
+ if ! grep '^ *export _gl_TS_headers *=' $(srcdir)/cfg.mk \
+ > /dev/null \
+ && ! grep -w noinst_HEADERS $(srcdir)/$(_gl_TS_dir)/Makefile.am \
+ > /dev/null 2>&1; then \
+ echo '$(ME): skipping $@'; \
+ else \
+ $(MAKE) -s -C $(_gl_TS_dir) \
+ -f Makefile \
+ -f $(abs_top_srcdir)/cfg.mk \
+ -f $(abs_top_builddir)/$< \
+ _gl_tight_scope \
+ || fail=1; \
+ fi; \
+ rm -f $<; \
+ exit $$fail
+
+tight-scope.mk: $(ME)
+ @rm -f $@ $@-t
+ @perl -ne '/^# TS-start/.../^# TS-end/ and print' $(srcdir)/$(ME) > $@-t
+ @chmod a=r $@-t && mv $@-t $@
+
+ifeq (a,b)
+# TS-start
+
+# Most functions should have static scope.
+# Any that don't must be marked with 'extern', but 'main'
+# and 'usage' are exceptions: they're always extern, but
+# do not need to be marked. Symbols matching '__.*' are
+# reserved by the compiler, so are automatically excluded below.
+_gl_TS_unmarked_extern_functions ?= main usage
+_gl_TS_function_match ?= /^(?:$(_gl_TS_extern)) +.*?(\S+) *\(/
+
+# If your project uses a macro like "XTERN", then put
+# the following in cfg.mk to override this default:
+# export _gl_TS_extern = extern|XTERN
+_gl_TS_extern ?= extern
+
+# The second nm|grep checks for file-scope variables with 'extern' scope.
+# Without gnulib's progname module, you might put program_name here.
+# Symbols matching '__.*' are reserved by the compiler,
+# so are automatically excluded below.
+_gl_TS_unmarked_extern_vars ?=
+
+# NOTE: the _match variables are perl expressions -- not mere regular
+# expressions -- so that you can extend them to match other patterns
+# and easily extract matched variable names.
+# For example, if your project declares some global variables via
+# a macro like this: GLOBAL(type, var_name, initializer), then you
+# can override this definition to automatically extract those names:
+# export _gl_TS_var_match = \
+# /^(?:$(_gl_TS_extern)) .*?\**(\w+)(\[.*?\])?;/ || /\bGLOBAL\(.*?,\s*(.*?),/
+_gl_TS_var_match ?= /^(?:$(_gl_TS_extern)) .*?(\w+)(\[.*?\])?;/
+
+# The names of object files in (or relative to) $(_gl_TS_dir).
+_gl_TS_obj_files ?= *.$(OBJEXT)
+
+# Files in which to search for the one-line style extern declarations.
+# $(_gl_TS_dir)-relative.
+_gl_TS_headers ?= $(noinst_HEADERS)
+_gl_TS_other_headers ?= *.h
+
+.PHONY: _gl_tight_scope
+_gl_tight_scope: $(bin_PROGRAMS)
+ t=exceptions-$$$$; \
+ trap 's=$$?; rm -f $$t; exit $$s' 0; \
+ for sig in 1 2 3 13 15; do \
+ eval "trap 'v=`expr $$sig + 128`; (exit $$v); exit $$v' $$sig"; \
+ done; \
+ src=`for f in $(SOURCES); do \
+ test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`; \
+ hdr=`for f in $(_gl_TS_headers); do \
+ test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`; \
+ ( printf '^%s$$\n' '__.*' $(_gl_TS_unmarked_extern_functions); \
+ grep -h -A1 '^extern .*[^;]$$' $$src \
+ | grep -vE '^(extern |--)' | sed 's/ .*//'; \
+ perl -lne \
+ '$(_gl_TS_function_match) and print "^$$1\$$"' $$hdr; \
+ ) | sort -u > $$t; \
+ nm -e $(_gl_TS_obj_files) | sed -n 's/.* T //p'|grep -Ev -f $$t \
+ && { echo the above functions should have static scope >&2; \
+ exit 1; } || : ; \
+ ( printf '^%s$$\n' '__.*' $(_gl_TS_unmarked_extern_vars); \
+ perl -lne '$(_gl_TS_var_match) and print "^$$1\$$"' \
+ $$hdr $(_gl_TS_other_headers) \
+ ) | sort -u > $$t; \
+ nm -e $(_gl_TS_obj_files) | sed -n 's/.* [BCDGRS] //p' \
+ | sort -u | grep -Ev -f $$t \
+ && { echo the above variables should have static scope >&2; \
+ exit 1; } || :
+# TS-end
+endif
diff --git a/src/Makefile.am b/src/Makefile.am
index b9b809d..29e05c0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,6 @@
## Makefile.am - template for generating Makefile via Automake
##
-## Copyright (C) 2006-2011 Free Software Foundation, Inc.
+## Copyright (C) 2006-2013 Free Software Foundation, Inc.
##
## This file is part of GNU M4.
##
@@ -23,6 +23,7 @@ AUTOMAKE_OPTIONS = nostdinc
AM_CPPFLAGS = -I$(top_srcdir)/lib -I../lib
AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
bin_PROGRAMS = m4
-m4_SOURCES = m4.h m4.c builtin.c debug.c eval.c format.c freeze.c input.c \
+noinst_HEADERS = m4.h
+m4_SOURCES = m4.c builtin.c debug.c eval.c format.c freeze.c input.c \
macro.c output.c path.c symtab.c
m4_LDADD = ../lib/libm4.a $(LIBM4_LIBDEPS) $(LIBCSTACK) $(LIBTHREAD)
diff --git a/src/Makefile.in b/src/Makefile.in
index 502d651..1859012 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.14 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,7 +14,53 @@
@SET_MAKE@
+
VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -35,49 +80,56 @@ build_triplet = @build@
host_triplet = @host@
bin_PROGRAMS = m4$(EXEEXT)
subdir = src
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/build-aux/depcomp $(noinst_HEADERS)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/ansi-c++.m4 \
- $(top_srcdir)/m4/assert.m4 $(top_srcdir)/m4/autobuild.m4 \
- $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/c-stack.m4 \
- $(top_srcdir)/m4/canonicalize.m4 $(top_srcdir)/m4/cloexec.m4 \
+ $(top_srcdir)/m4/asm-underscore.m4 $(top_srcdir)/m4/assert.m4 \
+ $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \
+ $(top_srcdir)/m4/c-stack.m4 $(top_srcdir)/m4/canonicalize.m4 \
$(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \
- $(top_srcdir)/m4/closein.m4 $(top_srcdir)/m4/closeout.m4 \
- $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/config-h.m4 \
- $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/dirname.m4 \
- $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup2.m4 \
- $(top_srcdir)/m4/eealloc.m4 $(top_srcdir)/m4/environ.m4 \
- $(top_srcdir)/m4/errno_h.m4 $(top_srcdir)/m4/error.m4 \
- $(top_srcdir)/m4/execute.m4 $(top_srcdir)/m4/exponentd.m4 \
- $(top_srcdir)/m4/exponentf.m4 $(top_srcdir)/m4/exponentl.m4 \
- $(top_srcdir)/m4/extensions.m4 \
+ $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/closein.m4 \
+ $(top_srcdir)/m4/closeout.m4 $(top_srcdir)/m4/codeset.m4 \
+ $(top_srcdir)/m4/config-h.m4 $(top_srcdir)/m4/configmake.m4 \
+ $(top_srcdir)/m4/dirent_h.m4 $(top_srcdir)/m4/dirname.m4 \
+ $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \
+ $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
+ $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \
+ $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/execute.m4 \
+ $(top_srcdir)/m4/exponentd.m4 $(top_srcdir)/m4/exponentf.m4 \
+ $(top_srcdir)/m4/exponentl.m4 $(top_srcdir)/m4/extensions.m4 \
+ $(top_srcdir)/m4/extern-inline.m4 \
$(top_srcdir)/m4/fatal-signal.m4 $(top_srcdir)/m4/fclose.m4 \
$(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \
- $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fflush.m4 \
- $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/float_h.m4 \
- $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fpending.m4 \
- $(top_srcdir)/m4/fpieee.m4 $(top_srcdir)/m4/fpurge.m4 \
+ $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopen.m4 \
+ $(top_srcdir)/m4/fflush.m4 $(top_srcdir)/m4/filenamecat.m4 \
+ $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fopen.m4 \
+ $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fpieee.m4 \
+ $(top_srcdir)/m4/fpurge.m4 $(top_srcdir)/m4/freadahead.m4 \
$(top_srcdir)/m4/freading.m4 $(top_srcdir)/m4/frexp.m4 \
- $(top_srcdir)/m4/frexpl.m4 $(top_srcdir)/m4/fseeko.m4 \
+ $(top_srcdir)/m4/frexpl.m4 $(top_srcdir)/m4/fseek.m4 \
+ $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \
$(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \
- $(top_srcdir)/m4/getdtablesize.m4 $(top_srcdir)/m4/getopt.m4 \
- $(top_srcdir)/m4/getpagesize.m4 \
- $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/gl_list.m4 \
- $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \
+ $(top_srcdir)/m4/getcwd.m4 $(top_srcdir)/m4/getdtablesize.m4 \
+ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpagesize.m4 \
+ $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glibc21.m4 \
+ $(top_srcdir)/m4/gnulib-common.m4 \
$(top_srcdir)/m4/gnulib-comp.m4 \
- $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \
+ $(top_srcdir)/m4/include_next.m4 \
$(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \
+ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \
$(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/isnand.m4 \
$(top_srcdir)/m4/isnanf.m4 $(top_srcdir)/m4/isnanl.m4 \
- $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/lcmessage.m4 \
- $(top_srcdir)/m4/ldexp.m4 $(top_srcdir)/m4/ldexpl.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \
- $(top_srcdir)/m4/link.m4 $(top_srcdir)/m4/localcharset.m4 \
- $(top_srcdir)/m4/locale-fr.m4 $(top_srcdir)/m4/locale-ja.m4 \
- $(top_srcdir)/m4/locale-tr.m4 $(top_srcdir)/m4/locale-zh.m4 \
- $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localename.m4 \
+ $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \
+ $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/ldexp.m4 \
+ $(top_srcdir)/m4/ldexpl.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/libsigsegv.m4 $(top_srcdir)/m4/link.m4 \
+ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \
+ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-tr.m4 \
+ $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/locale_h.m4 \
+ $(top_srcdir)/m4/localeconv.m4 $(top_srcdir)/m4/localename.m4 \
$(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \
$(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \
$(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \
@@ -86,40 +138,43 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \
$(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mkdtemp.m4 \
$(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \
- $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/multiarch.m4 \
+ $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \
+ $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \
$(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nocrash.m4 \
- $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/pathmax.m4 \
+ $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/open.m4 \
+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \
$(top_srcdir)/m4/pipe2.m4 $(top_srcdir)/m4/posix_spawn.m4 \
$(top_srcdir)/m4/printf-frexp.m4 \
$(top_srcdir)/m4/printf-frexpl.m4 $(top_srcdir)/m4/printf.m4 \
$(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quotearg.m4 \
- $(top_srcdir)/m4/rawmemchr.m4 $(top_srcdir)/m4/readlink.m4 \
+ $(top_srcdir)/m4/raise.m4 $(top_srcdir)/m4/rawmemchr.m4 \
+ $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readlink.m4 \
$(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/rename.m4 \
$(top_srcdir)/m4/rmdir.m4 $(top_srcdir)/m4/sched_h.m4 \
- $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/setlocale.m4 \
- $(top_srcdir)/m4/sig_atomic_t.m4 $(top_srcdir)/m4/sigaction.m4 \
- $(top_srcdir)/m4/signal_h.m4 \
+ $(top_srcdir)/m4/secure_getenv.m4 $(top_srcdir)/m4/setenv.m4 \
+ $(top_srcdir)/m4/setlocale.m4 $(top_srcdir)/m4/sig_atomic_t.m4 \
+ $(top_srcdir)/m4/sigaction.m4 $(top_srcdir)/m4/signal_h.m4 \
$(top_srcdir)/m4/signalblocking.m4 $(top_srcdir)/m4/signbit.m4 \
- $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/snprintf.m4 \
+ $(top_srcdir)/m4/sigpipe.m4 $(top_srcdir)/m4/size_max.m4 \
+ $(top_srcdir)/m4/sleep.m4 $(top_srcdir)/m4/snprintf.m4 \
$(top_srcdir)/m4/spawn-pipe.m4 $(top_srcdir)/m4/spawn_h.m4 \
$(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat.m4 \
$(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \
$(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \
- $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio-safer.m4 \
- $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib-safer.m4 \
+ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \
$(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strchrnul.m4 \
$(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
$(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strndup.m4 \
$(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strsignal.m4 \
$(top_srcdir)/m4/strstr.m4 $(top_srcdir)/m4/strtod.m4 \
- $(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/symlink.m4 \
+ $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_socket_h.m4 \
$(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \
- $(top_srcdir)/m4/sys_wait_h.m4 $(top_srcdir)/m4/tempname.m4 \
- $(top_srcdir)/m4/threadlib.m4 $(top_srcdir)/m4/time_h.m4 \
- $(top_srcdir)/m4/tls.m4 $(top_srcdir)/m4/tmpdir.m4 \
- $(top_srcdir)/m4/ungetc.m4 $(top_srcdir)/m4/unistd-safer.m4 \
- $(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/unlocked-io.m4 \
- $(top_srcdir)/m4/vasnprintf.m4 \
+ $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/sys_wait_h.m4 \
+ $(top_srcdir)/m4/tempname.m4 $(top_srcdir)/m4/threadlib.m4 \
+ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/tls.m4 \
+ $(top_srcdir)/m4/tmpdir.m4 $(top_srcdir)/m4/ungetc.m4 \
+ $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \
+ $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
$(top_srcdir)/m4/vasprintf-posix.m4 \
$(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/version-etc.m4 \
$(top_srcdir)/m4/wait-process.m4 $(top_srcdir)/m4/waitpid.m4 \
@@ -127,9 +182,10 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \
$(top_srcdir)/m4/wctob.m4 $(top_srcdir)/m4/wctomb.m4 \
$(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wint_t.m4 \
- $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xsize.m4 \
- $(top_srcdir)/m4/xstrndup.m4 $(top_srcdir)/m4/xvasprintf.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/write.m4 $(top_srcdir)/m4/xalloc.m4 \
+ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrndup.m4 \
+ $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -146,28 +202,59 @@ m4_OBJECTS = $(am_m4_OBJECTS)
am__DEPENDENCIES_1 =
m4_DEPENDENCIES = ../lib/libm4.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(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 =
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_$(V))
-am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
-am__v_CC_0 = @echo " CC " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
-am__v_at_0 = @
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_$(V))
-am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
-am__v_CCLD_0 = @echo " CCLD " $@;
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
-am__v_GEN_0 = @echo " GEN " $@;
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
SOURCES = $(m4_SOURCES)
DIST_SOURCES = $(m4_SOURCES)
+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)
+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)
@@ -178,6 +265,9 @@ ALLOCA_H = @ALLOCA_H@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+AR = @AR@
+ARFLAGS = @ARFLAGS@
+ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -215,47 +305,90 @@ EXEEXT = @EXEEXT@
FLOAT_H = @FLOAT_H@
GETOPT_H = @GETOPT_H@
GLIBC21 = @GLIBC21@
+GNULIB_ACOSF = @GNULIB_ACOSF@
GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
+GNULIB_ASINF = @GNULIB_ASINF@
GNULIB_ASINL = @GNULIB_ASINL@
+GNULIB_ATAN2F = @GNULIB_ATAN2F@
+GNULIB_ATANF = @GNULIB_ATANF@
GNULIB_ATANL = @GNULIB_ATANL@
GNULIB_ATOLL = @GNULIB_ATOLL@
GNULIB_BTOWC = @GNULIB_BTOWC@
GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CBRT = @GNULIB_CBRT@
+GNULIB_CBRTF = @GNULIB_CBRTF@
+GNULIB_CBRTL = @GNULIB_CBRTL@
GNULIB_CEIL = @GNULIB_CEIL@
GNULIB_CEILF = @GNULIB_CEILF@
GNULIB_CEILL = @GNULIB_CEILL@
+GNULIB_CHDIR = @GNULIB_CHDIR@
GNULIB_CHOWN = @GNULIB_CHOWN@
GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@
+GNULIB_COPYSIGN = @GNULIB_COPYSIGN@
+GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@
+GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@
+GNULIB_COSF = @GNULIB_COSF@
+GNULIB_COSHF = @GNULIB_COSHF@
GNULIB_COSL = @GNULIB_COSL@
+GNULIB_DIRFD = @GNULIB_DIRFD@
GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP = @GNULIB_DUP@
GNULIB_DUP2 = @GNULIB_DUP2@
GNULIB_DUP3 = @GNULIB_DUP3@
GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
GNULIB_ENVIRON = @GNULIB_ENVIRON@
GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXP2 = @GNULIB_EXP2@
+GNULIB_EXP2F = @GNULIB_EXP2F@
+GNULIB_EXP2L = @GNULIB_EXP2L@
+GNULIB_EXPF = @GNULIB_EXPF@
GNULIB_EXPL = @GNULIB_EXPL@
+GNULIB_EXPM1 = @GNULIB_EXPM1@
+GNULIB_EXPM1F = @GNULIB_EXPM1F@
+GNULIB_EXPM1L = @GNULIB_EXPM1L@
+GNULIB_FABSF = @GNULIB_FABSF@
+GNULIB_FABSL = @GNULIB_FABSL@
GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
GNULIB_FCHDIR = @GNULIB_FCHDIR@
GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
GNULIB_FCLOSE = @GNULIB_FCLOSE@
GNULIB_FCNTL = @GNULIB_FCNTL@
+GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
+GNULIB_FDOPEN = @GNULIB_FDOPEN@
+GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@
GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FFSL = @GNULIB_FFSL@
+GNULIB_FFSLL = @GNULIB_FFSLL@
+GNULIB_FGETC = @GNULIB_FGETC@
+GNULIB_FGETS = @GNULIB_FGETS@
GNULIB_FLOOR = @GNULIB_FLOOR@
GNULIB_FLOORF = @GNULIB_FLOORF@
GNULIB_FLOORL = @GNULIB_FLOORL@
+GNULIB_FMA = @GNULIB_FMA@
+GNULIB_FMAF = @GNULIB_FMAF@
+GNULIB_FMAL = @GNULIB_FMAL@
+GNULIB_FMOD = @GNULIB_FMOD@
+GNULIB_FMODF = @GNULIB_FMODF@
+GNULIB_FMODL = @GNULIB_FMODL@
GNULIB_FOPEN = @GNULIB_FOPEN@
GNULIB_FPRINTF = @GNULIB_FPRINTF@
GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
GNULIB_FPURGE = @GNULIB_FPURGE@
GNULIB_FPUTC = @GNULIB_FPUTC@
GNULIB_FPUTS = @GNULIB_FPUTS@
+GNULIB_FREAD = @GNULIB_FREAD@
GNULIB_FREOPEN = @GNULIB_FREOPEN@
GNULIB_FREXP = @GNULIB_FREXP@
+GNULIB_FREXPF = @GNULIB_FREXPF@
GNULIB_FREXPL = @GNULIB_FREXPL@
+GNULIB_FSCANF = @GNULIB_FSCANF@
GNULIB_FSEEK = @GNULIB_FSEEK@
GNULIB_FSEEKO = @GNULIB_FSEEKO@
+GNULIB_FSTAT = @GNULIB_FSTAT@
GNULIB_FSTATAT = @GNULIB_FSTATAT@
GNULIB_FSYNC = @GNULIB_FSYNC@
GNULIB_FTELL = @GNULIB_FTELL@
@@ -263,6 +396,8 @@ GNULIB_FTELLO = @GNULIB_FTELLO@
GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
GNULIB_FWRITE = @GNULIB_FWRITE@
+GNULIB_GETC = @GNULIB_GETC@
+GNULIB_GETCHAR = @GNULIB_GETCHAR@
GNULIB_GETCWD = @GNULIB_GETCWD@
GNULIB_GETDELIM = @GNULIB_GETDELIM@
GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
@@ -277,7 +412,18 @@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GL_M4_UNISTD_H_GETOPT = @GNULIB_GL_M4_UNISTD_H_GETOPT@
GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
+GNULIB_HYPOT = @GNULIB_HYPOT@
+GNULIB_HYPOTF = @GNULIB_HYPOTF@
+GNULIB_HYPOTL = @GNULIB_HYPOTL@
+GNULIB_ILOGB = @GNULIB_ILOGB@
+GNULIB_ILOGBF = @GNULIB_ILOGBF@
+GNULIB_ILOGBL = @GNULIB_ILOGBL@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+GNULIB_ISATTY = @GNULIB_ISATTY@
GNULIB_ISFINITE = @GNULIB_ISFINITE@
GNULIB_ISINF = @GNULIB_ISINF@
GNULIB_ISNAN = @GNULIB_ISNAN@
@@ -288,10 +434,25 @@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
GNULIB_LCHMOD = @GNULIB_LCHMOD@
GNULIB_LCHOWN = @GNULIB_LCHOWN@
+GNULIB_LDEXPF = @GNULIB_LDEXPF@
GNULIB_LDEXPL = @GNULIB_LDEXPL@
GNULIB_LINK = @GNULIB_LINK@
GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
+GNULIB_LOG = @GNULIB_LOG@
+GNULIB_LOG10 = @GNULIB_LOG10@
+GNULIB_LOG10F = @GNULIB_LOG10F@
+GNULIB_LOG10L = @GNULIB_LOG10L@
+GNULIB_LOG1P = @GNULIB_LOG1P@
+GNULIB_LOG1PF = @GNULIB_LOG1PF@
+GNULIB_LOG1PL = @GNULIB_LOG1PL@
+GNULIB_LOG2 = @GNULIB_LOG2@
+GNULIB_LOG2F = @GNULIB_LOG2F@
+GNULIB_LOG2L = @GNULIB_LOG2L@
GNULIB_LOGB = @GNULIB_LOGB@
+GNULIB_LOGBF = @GNULIB_LOGBF@
+GNULIB_LOGBL = @GNULIB_LOGBL@
+GNULIB_LOGF = @GNULIB_LOGF@
GNULIB_LOGL = @GNULIB_LOGL@
GNULIB_LSEEK = @GNULIB_LSEEK@
GNULIB_LSTAT = @GNULIB_LSTAT@
@@ -331,16 +492,23 @@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
GNULIB_MKTIME = @GNULIB_MKTIME@
+GNULIB_MODF = @GNULIB_MODF@
+GNULIB_MODFF = @GNULIB_MODFF@
+GNULIB_MODFL = @GNULIB_MODFL@
GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@
GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
GNULIB_OPEN = @GNULIB_OPEN@
GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_OPENDIR = @GNULIB_OPENDIR@
+GNULIB_PCLOSE = @GNULIB_PCLOSE@
GNULIB_PERROR = @GNULIB_PERROR@
GNULIB_PIPE = @GNULIB_PIPE@
GNULIB_PIPE2 = @GNULIB_PIPE2@
GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
GNULIB_POSIX_SPAWN = @GNULIB_POSIX_SPAWN@
GNULIB_POSIX_SPAWNATTR_DESTROY = @GNULIB_POSIX_SPAWNATTR_DESTROY@
GNULIB_POSIX_SPAWNATTR_GETFLAGS = @GNULIB_POSIX_SPAWNATTR_GETFLAGS@
@@ -362,41 +530,63 @@ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDU
GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY@
GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT@
+GNULIB_POWF = @GNULIB_POWF@
GNULIB_PREAD = @GNULIB_PREAD@
GNULIB_PRINTF = @GNULIB_PRINTF@
GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@
GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
GNULIB_PUTC = @GNULIB_PUTC@
GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
GNULIB_PUTENV = @GNULIB_PUTENV@
GNULIB_PUTS = @GNULIB_PUTS@
GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RAISE = @GNULIB_RAISE@
+GNULIB_RANDOM = @GNULIB_RANDOM@
GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READ = @GNULIB_READ@
+GNULIB_READDIR = @GNULIB_READDIR@
GNULIB_READLINK = @GNULIB_READLINK@
GNULIB_READLINKAT = @GNULIB_READLINKAT@
GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMAINDER = @GNULIB_REMAINDER@
+GNULIB_REMAINDERF = @GNULIB_REMAINDERF@
+GNULIB_REMAINDERL = @GNULIB_REMAINDERL@
GNULIB_REMOVE = @GNULIB_REMOVE@
GNULIB_RENAME = @GNULIB_RENAME@
GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+GNULIB_REWINDDIR = @GNULIB_REWINDDIR@
+GNULIB_RINT = @GNULIB_RINT@
+GNULIB_RINTF = @GNULIB_RINTF@
+GNULIB_RINTL = @GNULIB_RINTL@
GNULIB_RMDIR = @GNULIB_RMDIR@
GNULIB_ROUND = @GNULIB_ROUND@
GNULIB_ROUNDF = @GNULIB_ROUNDF@
GNULIB_ROUNDL = @GNULIB_ROUNDL@
GNULIB_RPMATCH = @GNULIB_RPMATCH@
+GNULIB_SCANDIR = @GNULIB_SCANDIR@
+GNULIB_SCANF = @GNULIB_SCANF@
+GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@
GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
GNULIB_SIGACTION = @GNULIB_SIGACTION@
GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
+GNULIB_SINF = @GNULIB_SINF@
+GNULIB_SINHF = @GNULIB_SINHF@
GNULIB_SINL = @GNULIB_SINL@
GNULIB_SLEEP = @GNULIB_SLEEP@
GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_SQRTF = @GNULIB_SQRTF@
GNULIB_SQRTL = @GNULIB_SQRTL@
GNULIB_STAT = @GNULIB_STAT@
+GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@
GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
GNULIB_STPCPY = @GNULIB_STPCPY@
GNULIB_STPNCPY = @GNULIB_STPNCPY@
@@ -414,13 +604,17 @@ GNULIB_STRSEP = @GNULIB_STRSEP@
GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
GNULIB_STRSTR = @GNULIB_STRSTR@
GNULIB_STRTOD = @GNULIB_STRTOD@
+GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@
GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
GNULIB_STRTOLL = @GNULIB_STRTOLL@
GNULIB_STRTOULL = @GNULIB_STRTOULL@
+GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
GNULIB_SYMLINK = @GNULIB_SYMLINK@
GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
+GNULIB_TANF = @GNULIB_TANF@
+GNULIB_TANHF = @GNULIB_TANHF@
GNULIB_TANL = @GNULIB_TANL@
GNULIB_TIMEGM = @GNULIB_TIMEGM@
GNULIB_TIME_R = @GNULIB_TIME_R@
@@ -430,7 +624,7 @@ GNULIB_TRUNC = @GNULIB_TRUNC@
GNULIB_TRUNCF = @GNULIB_TRUNCF@
GNULIB_TRUNCL = @GNULIB_TRUNCL@
GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
-GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
GNULIB_UNLINK = @GNULIB_UNLINK@
GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
@@ -442,8 +636,10 @@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+GNULIB_VFSCANF = @GNULIB_VFSCANF@
GNULIB_VPRINTF = @GNULIB_VPRINTF@
GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+GNULIB_VSCANF = @GNULIB_VSCANF@
GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
GNULIB_WAITPID = @GNULIB_WAITPID@
@@ -486,23 +682,46 @@ GNULIB_WMEMSET = @GNULIB_WMEMSET@
GNULIB_WRITE = @GNULIB_WRITE@
GNULIB__EXIT = @GNULIB__EXIT@
GREP = @GREP@
+HAVE_ACOSF = @HAVE_ACOSF@
HAVE_ACOSL = @HAVE_ACOSL@
+HAVE_ALPHASORT = @HAVE_ALPHASORT@
+HAVE_ASINF = @HAVE_ASINF@
HAVE_ASINL = @HAVE_ASINL@
+HAVE_ATAN2F = @HAVE_ATAN2F@
+HAVE_ATANF = @HAVE_ATANF@
HAVE_ATANL = @HAVE_ATANL@
HAVE_ATOLL = @HAVE_ATOLL@
HAVE_BTOWC = @HAVE_BTOWC@
HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
+HAVE_CBRT = @HAVE_CBRT@
+HAVE_CBRTF = @HAVE_CBRTF@
+HAVE_CBRTL = @HAVE_CBRTL@
HAVE_CHOWN = @HAVE_CHOWN@
+HAVE_CLOSEDIR = @HAVE_CLOSEDIR@
+HAVE_COPYSIGN = @HAVE_COPYSIGN@
+HAVE_COPYSIGNL = @HAVE_COPYSIGNL@
+HAVE_COSF = @HAVE_COSF@
+HAVE_COSHF = @HAVE_COSHF@
HAVE_COSL = @HAVE_COSL@
HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
+HAVE_DECL_CBRTF = @HAVE_DECL_CBRTF@
+HAVE_DECL_CBRTL = @HAVE_DECL_CBRTL@
HAVE_DECL_CEILF = @HAVE_DECL_CEILF@
HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
+HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@
HAVE_DECL_COSL = @HAVE_DECL_COSL@
+HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@
+HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@
+HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@
HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
+HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@
HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
+HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@
HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@
HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@
HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
@@ -516,17 +735,27 @@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
+HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
+HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@
HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
+HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@
+HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@
+HAVE_DECL_LOG2F = @HAVE_DECL_LOG2F@
+HAVE_DECL_LOG2L = @HAVE_DECL_LOG2L@
HAVE_DECL_LOGB = @HAVE_DECL_LOGB@
HAVE_DECL_LOGL = @HAVE_DECL_LOGL@
HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
+HAVE_DECL_REMAINDER = @HAVE_DECL_REMAINDER@
+HAVE_DECL_REMAINDERL = @HAVE_DECL_REMAINDERL@
+HAVE_DECL_RINTF = @HAVE_DECL_RINTF@
HAVE_DECL_ROUND = @HAVE_DECL_ROUND@
HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@
HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@
HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
HAVE_DECL_SINL = @HAVE_DECL_SINL@
HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@
@@ -535,7 +764,9 @@ 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_TANL = @HAVE_DECL_TANL@
HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@
HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@
@@ -545,18 +776,34 @@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+HAVE_DIRENT_H = @HAVE_DIRENT_H@
HAVE_DPRINTF = @HAVE_DPRINTF@
HAVE_DUP2 = @HAVE_DUP2@
HAVE_DUP3 = @HAVE_DUP3@
HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXPF = @HAVE_EXPF@
HAVE_EXPL = @HAVE_EXPL@
+HAVE_EXPM1 = @HAVE_EXPM1@
+HAVE_EXPM1F = @HAVE_EXPM1F@
+HAVE_FABSF = @HAVE_FABSF@
+HAVE_FABSL = @HAVE_FABSL@
HAVE_FACCESSAT = @HAVE_FACCESSAT@
HAVE_FCHDIR = @HAVE_FCHDIR@
HAVE_FCHMODAT = @HAVE_FCHMODAT@
HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FDATASYNC = @HAVE_FDATASYNC@
+HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
HAVE_FEATURES_H = @HAVE_FEATURES_H@
+HAVE_FFSL = @HAVE_FFSL@
+HAVE_FFSLL = @HAVE_FFSLL@
+HAVE_FMA = @HAVE_FMA@
+HAVE_FMAF = @HAVE_FMAF@
+HAVE_FMAL = @HAVE_FMAL@
+HAVE_FMODF = @HAVE_FMODF@
+HAVE_FMODL = @HAVE_FMODL@
+HAVE_FREXPF = @HAVE_FREXPF@
HAVE_FSEEKO = @HAVE_FSEEKO@
HAVE_FSTATAT = @HAVE_FSTATAT@
HAVE_FSYNC = @HAVE_FSYNC@
@@ -572,6 +819,12 @@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
HAVE_GRANTPT = @HAVE_GRANTPT@
+HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
+HAVE_HYPOTF = @HAVE_HYPOTF@
+HAVE_HYPOTL = @HAVE_HYPOTL@
+HAVE_ILOGB = @HAVE_ILOGB@
+HAVE_ILOGBF = @HAVE_ILOGBF@
+HAVE_ILOGBL = @HAVE_ILOGBL@
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
HAVE_ISNAND = @HAVE_ISNAND@
HAVE_ISNANF = @HAVE_ISNANF@
@@ -585,9 +838,18 @@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@
HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@
HAVE_LCHMOD = @HAVE_LCHMOD@
HAVE_LCHOWN = @HAVE_LCHOWN@
+HAVE_LDEXPF = @HAVE_LDEXPF@
HAVE_LIBSIGSEGV = @HAVE_LIBSIGSEGV@
HAVE_LINK = @HAVE_LINK@
HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LOG10F = @HAVE_LOG10F@
+HAVE_LOG10L = @HAVE_LOG10L@
+HAVE_LOG1P = @HAVE_LOG1P@
+HAVE_LOG1PF = @HAVE_LOG1PF@
+HAVE_LOG1PL = @HAVE_LOG1PL@
+HAVE_LOGBF = @HAVE_LOGBF@
+HAVE_LOGBL = @HAVE_LOGBL@
+HAVE_LOGF = @HAVE_LOGF@
HAVE_LOGL = @HAVE_LOGL@
HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
HAVE_LSTAT = @HAVE_LSTAT@
@@ -609,38 +871,64 @@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
HAVE_MKSTEMP = @HAVE_MKSTEMP@
HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
+HAVE_MODFF = @HAVE_MODFF@
+HAVE_MODFL = @HAVE_MODFL@
+HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OPENDIR = @HAVE_OPENDIR@
HAVE_OS_H = @HAVE_OS_H@
+HAVE_PCLOSE = @HAVE_PCLOSE@
HAVE_PIPE = @HAVE_PIPE@
HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_POPEN = @HAVE_POPEN@
+HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
HAVE_POSIX_SPAWN = @HAVE_POSIX_SPAWN@
HAVE_POSIX_SPAWNATTR_T = @HAVE_POSIX_SPAWNATTR_T@
HAVE_POSIX_SPAWN_FILE_ACTIONS_T = @HAVE_POSIX_SPAWN_FILE_ACTIONS_T@
+HAVE_POWF = @HAVE_POWF@
HAVE_PREAD = @HAVE_PREAD@
+HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@
HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RAISE = @HAVE_RAISE@
+HAVE_RANDOM = @HAVE_RANDOM@
HAVE_RANDOM_H = @HAVE_RANDOM_H@
HAVE_RANDOM_R = @HAVE_RANDOM_R@
HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READDIR = @HAVE_READDIR@
HAVE_READLINK = @HAVE_READLINK@
HAVE_READLINKAT = @HAVE_READLINKAT@
HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_REMAINDER = @HAVE_REMAINDER@
+HAVE_REMAINDERF = @HAVE_REMAINDERF@
HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_REWINDDIR = @HAVE_REWINDDIR@
+HAVE_RINT = @HAVE_RINT@
+HAVE_RINTL = @HAVE_RINTL@
HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@
+HAVE_SCANDIR = @HAVE_SCANDIR@
HAVE_SCHED_H = @HAVE_SCHED_H@
+HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
HAVE_SETENV = @HAVE_SETENV@
+HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
HAVE_SIGACTION = @HAVE_SIGACTION@
+HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@
HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
HAVE_SIGSET_T = @HAVE_SIGSET_T@
+HAVE_SINF = @HAVE_SINF@
+HAVE_SINHF = @HAVE_SINHF@
HAVE_SINL = @HAVE_SINL@
HAVE_SLEEP = @HAVE_SLEEP@
HAVE_SPAWN_H = @HAVE_SPAWN_H@
+HAVE_SQRTF = @HAVE_SQRTF@
HAVE_SQRTL = @HAVE_SQRTL@
HAVE_STDINT_H = @HAVE_STDINT_H@
HAVE_STPCPY = @HAVE_STPCPY@
@@ -666,6 +954,8 @@ 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_TANF = @HAVE_TANF@
+HAVE_TANHF = @HAVE_TANHF@
HAVE_TANL = @HAVE_TANL@
HAVE_TIMEGM = @HAVE_TIMEGM@
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
@@ -708,6 +998,7 @@ HAVE_WCSXFRM = @HAVE_WCSXFRM@
HAVE_WCTRANS_T = @HAVE_WCTRANS_T@
HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
HAVE_WCTYPE_T = @HAVE_WCTYPE_T@
+HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
HAVE_WINT_T = @HAVE_WINT_T@
HAVE_WMEMCHR = @HAVE_WMEMCHR@
HAVE_WMEMCMP = @HAVE_WMEMCMP@
@@ -724,6 +1015,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@
+INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@
LIBCSTACK = @LIBCSTACK@
@@ -759,10 +1052,12 @@ M4tests_LTLIBOBJS = @M4tests_LTLIBOBJS@
M4tests_WITNESS = @M4tests_WITNESS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
+NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@
NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
@@ -777,15 +1072,18 @@ 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_DIRENT_H = @NEXT_DIRENT_H@
NEXT_ERRNO_H = @NEXT_ERRNO_H@
NEXT_FCNTL_H = @NEXT_FCNTL_H@
NEXT_FLOAT_H = @NEXT_FLOAT_H@
NEXT_GETOPT_H = @NEXT_GETOPT_H@
+NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
NEXT_LOCALE_H = @NEXT_LOCALE_H@
NEXT_MATH_H = @NEXT_MATH_H@
@@ -800,6 +1098,7 @@ 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@
@@ -816,33 +1115,53 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
+PRIPTR_PREFIX = @PRIPTR_PREFIX@
+PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
REPLACE_BTOWC = @REPLACE_BTOWC@
REPLACE_CALLOC = @REPLACE_CALLOC@
REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+REPLACE_CBRTF = @REPLACE_CBRTF@
+REPLACE_CBRTL = @REPLACE_CBRTL@
REPLACE_CEIL = @REPLACE_CEIL@
REPLACE_CEILF = @REPLACE_CEILF@
REPLACE_CEILL = @REPLACE_CEILL@
REPLACE_CHOWN = @REPLACE_CHOWN@
REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@
+REPLACE_DIRFD = @REPLACE_DIRFD@
REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUP2 = @REPLACE_DUP2@
REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_EXP2 = @REPLACE_EXP2@
+REPLACE_EXP2L = @REPLACE_EXP2L@
+REPLACE_EXPM1 = @REPLACE_EXPM1@
+REPLACE_EXPM1F = @REPLACE_EXPM1F@
+REPLACE_FABSL = @REPLACE_FABSL@
REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
REPLACE_FCLOSE = @REPLACE_FCLOSE@
REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDOPEN = @REPLACE_FDOPEN@
+REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
REPLACE_FFLUSH = @REPLACE_FFLUSH@
REPLACE_FLOOR = @REPLACE_FLOOR@
REPLACE_FLOORF = @REPLACE_FLOORF@
REPLACE_FLOORL = @REPLACE_FLOORL@
+REPLACE_FMA = @REPLACE_FMA@
+REPLACE_FMAF = @REPLACE_FMAF@
+REPLACE_FMAL = @REPLACE_FMAL@
+REPLACE_FMOD = @REPLACE_FMOD@
+REPLACE_FMODF = @REPLACE_FMODF@
+REPLACE_FMODL = @REPLACE_FMODL@
REPLACE_FOPEN = @REPLACE_FOPEN@
REPLACE_FPRINTF = @REPLACE_FPRINTF@
REPLACE_FPURGE = @REPLACE_FPURGE@
REPLACE_FREOPEN = @REPLACE_FREOPEN@
REPLACE_FREXP = @REPLACE_FREXP@
+REPLACE_FREXPF = @REPLACE_FREXPF@
REPLACE_FREXPL = @REPLACE_FREXPL@
REPLACE_FSEEK = @REPLACE_FSEEK@
REPLACE_FSEEKO = @REPLACE_FSEEKO@
@@ -850,6 +1169,7 @@ REPLACE_FSTAT = @REPLACE_FSTAT@
REPLACE_FSTATAT = @REPLACE_FSTATAT@
REPLACE_FTELL = @REPLACE_FTELL@
REPLACE_FTELLO = @REPLACE_FTELLO@
+REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
REPLACE_FUTIMENS = @REPLACE_FUTIMENS@
REPLACE_GETCWD = @REPLACE_GETCWD@
REPLACE_GETDELIM = @REPLACE_GETDELIM@
@@ -860,16 +1180,39 @@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
+REPLACE_HYPOT = @REPLACE_HYPOT@
+REPLACE_HYPOTF = @REPLACE_HYPOTF@
+REPLACE_HYPOTL = @REPLACE_HYPOTL@
+REPLACE_ILOGB = @REPLACE_ILOGB@
+REPLACE_ILOGBF = @REPLACE_ILOGBF@
+REPLACE_ISATTY = @REPLACE_ISATTY@
REPLACE_ISFINITE = @REPLACE_ISFINITE@
REPLACE_ISINF = @REPLACE_ISINF@
REPLACE_ISNAN = @REPLACE_ISNAN@
REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_ITOLD = @REPLACE_ITOLD@
REPLACE_LCHOWN = @REPLACE_LCHOWN@
REPLACE_LDEXPL = @REPLACE_LDEXPL@
REPLACE_LINK = @REPLACE_LINK@
REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LOG = @REPLACE_LOG@
+REPLACE_LOG10 = @REPLACE_LOG10@
+REPLACE_LOG10F = @REPLACE_LOG10F@
+REPLACE_LOG10L = @REPLACE_LOG10L@
+REPLACE_LOG1P = @REPLACE_LOG1P@
+REPLACE_LOG1PF = @REPLACE_LOG1PF@
+REPLACE_LOG1PL = @REPLACE_LOG1PL@
+REPLACE_LOG2 = @REPLACE_LOG2@
+REPLACE_LOG2F = @REPLACE_LOG2F@
+REPLACE_LOG2L = @REPLACE_LOG2L@
+REPLACE_LOGB = @REPLACE_LOGB@
+REPLACE_LOGBF = @REPLACE_LOGBF@
+REPLACE_LOGBL = @REPLACE_LOGBL@
+REPLACE_LOGF = @REPLACE_LOGF@
+REPLACE_LOGL = @REPLACE_LOGL@
REPLACE_LSEEK = @REPLACE_LSEEK@
REPLACE_LSTAT = @REPLACE_LSTAT@
REPLACE_MALLOC = @REPLACE_MALLOC@
@@ -887,6 +1230,9 @@ REPLACE_MKFIFO = @REPLACE_MKFIFO@
REPLACE_MKNOD = @REPLACE_MKNOD@
REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_MODF = @REPLACE_MODF@
+REPLACE_MODFF = @REPLACE_MODFF@
+REPLACE_MODFL = @REPLACE_MODFL@
REPLACE_NAN = @REPLACE_NAN@
REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
@@ -894,16 +1240,29 @@ REPLACE_NULL = @REPLACE_NULL@
REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
REPLACE_OPEN = @REPLACE_OPEN@
REPLACE_OPENAT = @REPLACE_OPENAT@
+REPLACE_OPENDIR = @REPLACE_OPENDIR@
REPLACE_PERROR = @REPLACE_PERROR@
REPLACE_POPEN = @REPLACE_POPEN@
REPLACE_POSIX_SPAWN = @REPLACE_POSIX_SPAWN@
+REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@
+REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@
+REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
REPLACE_PREAD = @REPLACE_PREAD@
REPLACE_PRINTF = @REPLACE_PRINTF@
+REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@
+REPLACE_PTSNAME = @REPLACE_PTSNAME@
+REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
REPLACE_PUTENV = @REPLACE_PUTENV@
REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_RAISE = @REPLACE_RAISE@
+REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
+REPLACE_READ = @REPLACE_READ@
REPLACE_READLINK = @REPLACE_READLINK@
REPLACE_REALLOC = @REPLACE_REALLOC@
REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMAINDER = @REPLACE_REMAINDER@
+REPLACE_REMAINDERF = @REPLACE_REMAINDERF@
+REPLACE_REMAINDERL = @REPLACE_REMAINDERL@
REPLACE_REMOVE = @REPLACE_REMOVE@
REPLACE_RENAME = @REPLACE_RENAME@
REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
@@ -918,10 +1277,13 @@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
REPLACE_SLEEP = @REPLACE_SLEEP@
REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_SQRTL = @REPLACE_SQRTL@
REPLACE_STAT = @REPLACE_STAT@
+REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
REPLACE_STPNCPY = @REPLACE_STPNCPY@
REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
REPLACE_STRDUP = @REPLACE_STRDUP@
REPLACE_STRERROR = @REPLACE_STRERROR@
REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
@@ -931,10 +1293,14 @@ REPLACE_STRNLEN = @REPLACE_STRNLEN@
REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
REPLACE_STRSTR = @REPLACE_STRSTR@
REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
+REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
REPLACE_SYMLINK = @REPLACE_SYMLINK@
REPLACE_TIMEGM = @REPLACE_TIMEGM@
REPLACE_TMPFILE = @REPLACE_TMPFILE@
+REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
REPLACE_TRUNC = @REPLACE_TRUNC@
REPLACE_TRUNCF = @REPLACE_TRUNCF@
REPLACE_TRUNCL = @REPLACE_TRUNCL@
@@ -970,6 +1336,8 @@ STDINT_H = @STDINT_H@
STRIP = @STRIP@
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
+UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
@@ -977,6 +1345,8 @@ VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
WERROR_CFLAGS = @WERROR_CFLAGS@
+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@
abs_aux_dir = @abs_aux_dir@
abs_builddir = @abs_builddir@
@@ -1034,7 +1404,8 @@ top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = nostdinc
AM_CPPFLAGS = -I$(top_srcdir)/lib -I../lib
AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
-m4_SOURCES = m4.h m4.c builtin.c debug.c eval.c format.c freeze.c input.c \
+noinst_HEADERS = m4.h
+m4_SOURCES = m4.c builtin.c debug.c eval.c format.c freeze.c input.c \
macro.c output.c path.c symtab.c
m4_LDADD = ../lib/libm4.a $(LIBM4_LIBDEPS) $(LIBCSTACK) $(LIBTHREAD)
@@ -1074,14 +1445,18 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
- while read p p1; do if test -f $$p; \
- then echo "$$p"; echo "$$p"; else :; fi; \
+ while read p p1; do if test -f $$p \
+ ; then echo "$$p"; echo "$$p"; else :; fi; \
done | \
- sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ sed -e 'p;s,.*/,,;n;h' \
+ -e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
@@ -1102,14 +1477,16 @@ uninstall-binPROGRAMS:
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
- -e 's/$$/$(EXEEXT)/' `; \
+ -e 's/$$/$(EXEEXT)/' \
+ `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-m4$(EXEEXT): $(m4_OBJECTS) $(m4_DEPENDENCIES)
+
+m4$(EXEEXT): $(m4_OBJECTS) $(m4_DEPENDENCIES) $(EXTRA_m4_DEPENDENCIES)
@rm -f m4$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(m4_OBJECTS) $(m4_LDADD) $(LIBS)
@@ -1132,41 +1509,30 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symtab.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
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@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@ $(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@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@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@@ -1178,15 +1544,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$unique; \
fi; \
fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@@ -1195,6 +1557,21 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -1231,7 +1608,7 @@ distdir: $(DISTFILES)
done
check-am: all-am
check: check-am
-all-am: Makefile $(PROGRAMS)
+all-am: Makefile $(PROGRAMS) $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
@@ -1246,10 +1623,15 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
@@ -1332,18 +1714,19 @@ uninstall-am: uninstall-binPROGRAMS
.MAKE: install-am install-strip
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic ctags distclean distclean-compile \
- distclean-generic distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-binPROGRAMS \
- install-data install-data-am install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-man install-pdf \
- install-pdf-am install-ps install-ps-am install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
- uninstall-am uninstall-binPROGRAMS
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
+ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \
+ distclean distclean-compile distclean-generic distclean-tags \
+ distdir dvi dvi-am html html-am info info-am install \
+ install-am install-binPROGRAMS install-data install-data-am \
+ install-dvi install-dvi-am install-exec install-exec-am \
+ install-html install-html-am install-info install-info-am \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
+ ps ps-am tags tags-am uninstall uninstall-am \
+ uninstall-binPROGRAMS
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/src/builtin.c b/src/builtin.c
index 632ef79..b3700c3 100644
--- a/src/builtin.c
+++ b/src/builtin.c
@@ -1,6 +1,6 @@
/* GNU m4 -- A simple macro processor
- Copyright (C) 1989-1994, 2000, 2004, 2006-2011 Free Software
+ Copyright (C) 1989-1994, 2000, 2004, 2006-2013 Free Software
Foundation, Inc.
This file is part of GNU M4.
@@ -26,6 +26,7 @@
#include "execute.h"
#include "memchr2.h"
+#include "progname.h"
#include "regex.h"
#include "spawn-pipe.h"
#include "wait-process.h"
@@ -173,7 +174,7 @@ static predefined const predefined_tab[] =
| Find the builtin, which lives on ADDR. |
`----------------------------------------*/
-const builtin *
+const builtin * M4_GNUC_PURE
find_builtin_by_addr (builtin_func *func)
{
const builtin *bp;
@@ -191,7 +192,7 @@ find_builtin_by_addr (builtin_func *func)
| placeholder builtin. |
`----------------------------------------------------------*/
-const builtin *
+const builtin * M4_GNUC_PURE
find_builtin_by_name (const char *name)
{
const builtin *bp;
@@ -894,7 +895,7 @@ m4_defn (struct obstack *obs, int argc, token_data **argv)
if (bad_argc (argv[0], argc, 2, -1))
return;
- assert (0 < argc && argc <= INT_MAX);
+ assert (0 < argc);
for (i = 1; i < (unsigned) argc; i++)
{
const char *arg = ARG((int) i);
diff --git a/src/debug.c b/src/debug.c
index 0fef85c..c13a205 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -1,6 +1,6 @@
/* GNU m4 -- A simple macro processor
- Copyright (C) 1991-1994, 2004, 2006-2007, 2009-2011 Free Software
+ Copyright (C) 1991-1994, 2004, 2006-2007, 2009-2013 Free Software
Foundation, Inc.
This file is part of GNU M4.
@@ -30,8 +30,6 @@ FILE *debug = NULL;
/* Obstack for trace messages. */
static struct obstack trace;
-extern int expansion_level;
-
static void debug_set_file (FILE *);
/*----------------------------------.
diff --git a/src/eval.c b/src/eval.c
index b74bce8..8b4b05a 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1,6 +1,6 @@
/* GNU m4 -- A simple macro processor
- Copyright (C) 1989-1994, 2006-2007, 2009-2011 Free Software
+ Copyright (C) 1989-1994, 2006-2007, 2009-2013 Free Software
Foundation, Inc.
This file is part of GNU M4.
diff --git a/src/format.c b/src/format.c
index 43a23cd..fd8830e 100644
--- a/src/format.c
+++ b/src/format.c
@@ -1,6 +1,6 @@
/* GNU m4 -- A simple macro processor
- Copyright (C) 1989-1994, 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 1989-1994, 2006-2013 Free Software Foundation, Inc.
This file is part of GNU M4.
@@ -348,6 +348,12 @@ expand_format (struct obstack *obs, int argc, token_data **argv)
*p++ = c;
*p = '\0';
+ /* Our constructed format string in fstart is safe. */
+#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wformat-nonliteral"
+#endif
+
switch (datatype)
{
case CHAR:
@@ -373,6 +379,9 @@ expand_format (struct obstack *obs, int argc, token_data **argv)
default:
abort();
}
+#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
+# pragma GCC diagnostic pop
+#endif
/* NULL was returned on failure, such as invalid format string. For
now, just silently ignore that bad specifier. */
diff --git a/src/freeze.c b/src/freeze.c
index bf47376..edc0568 100644
--- a/src/freeze.c
+++ b/src/freeze.c
@@ -1,6 +1,6 @@
/* GNU m4 -- A simple macro processor
- Copyright (C) 1989-1994, 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 1989-1994, 2006-2013 Free Software Foundation, Inc.
This file is part of GNU M4.
diff --git a/src/input.c b/src/input.c
index be259a0..579fadd 100644
--- a/src/input.c
+++ b/src/input.c
@@ -1,6 +1,6 @@
/* GNU m4 -- A simple macro processor
- Copyright (C) 1989-1994, 2004-2011 Free Software Foundation, Inc.
+ Copyright (C) 1989-1994, 2004-2013 Free Software Foundation, Inc.
This file is part of GNU M4.
diff --git a/src/m4.c b/src/m4.c
index d7ad7cd..3e56e9d 100644
--- a/src/m4.c
+++ b/src/m4.c
@@ -1,6 +1,6 @@
/* GNU m4 -- A simple macro processor
- Copyright (C) 1989-1994, 2004-2011 Free Software Foundation, Inc.
+ Copyright (C) 1989-1994, 2004-2013 Free Software Foundation, Inc.
This file is part of GNU M4.
@@ -99,6 +99,7 @@ m4_error (int status, int errnum, const char *format, ...)
current_line, format, args);
if (fatal_warnings && ! retcode)
retcode = EXIT_FAILURE;
+ va_end (args);
}
/*-------------------------------.
@@ -114,6 +115,7 @@ m4_error_at_line (int status, int errnum, const char *file, int line,
verror_at_line (status, errnum, line ? file : NULL, line, format, args);
if (fatal_warnings && ! retcode)
retcode = EXIT_FAILURE;
+ va_end (args);
}
#ifndef SIGBUS
@@ -138,7 +140,7 @@ static const char * volatile signal_message[NSIG];
must be aysnc-signal safe, since it is executed as a signal
handler. If SIGNO is zero, this represents a stack overflow; in
that case, we return to allow c_stack_action to handle things. */
-static void
+static void M4_GNUC_PURE
fault_handler (int signo)
{
if (signo)
diff --git a/src/m4.h b/src/m4.h
index 3708a7c..96e549e 100644
--- a/src/m4.h
+++ b/src/m4.h
@@ -1,6 +1,6 @@
/* GNU m4 -- A simple macro processor
- Copyright (C) 1989-1994, 2004-2011 Free Software Foundation, Inc.
+ Copyright (C) 1989-1994, 2004-2013 Free Software Foundation, Inc.
This file is part of GNU M4.
@@ -118,6 +118,7 @@ typedef unsigned int bool_bitfield;
#define M4_GNUC_PRINTF(fmt, arg) \
M4_GNUC_ATTRIBUTE ((__format__ (__printf__, fmt, arg)))
#define M4_GNUC_NORETURN M4_GNUC_ATTRIBUTE ((__noreturn__))
+#define M4_GNUC_PURE M4_GNUC_ATTRIBUTE ((__pure__))
/* File: m4.c --- global definitions. */
@@ -137,11 +138,10 @@ extern const char *user_word_regexp; /* -W */
/* Error handling. */
extern int retcode;
-extern const char *program_name;
-void m4_error (int, int, const char *, ...) M4_GNUC_PRINTF(3, 4);
-void m4_error_at_line (int, int, const char *, int,
- const char *, ...) M4_GNUC_PRINTF(5, 6);
+extern void m4_error (int, int, const char *, ...) M4_GNUC_PRINTF(3, 4);
+extern void m4_error_at_line (int, int, const char *, int,
+ const char *, ...) M4_GNUC_PRINTF(5, 6);
#define M4ERROR(Arglist) (m4_error Arglist)
#define M4ERROR_AT_LINE(Arglist) (m4_error_at_line Arglist)
@@ -231,15 +231,15 @@ extern FILE *debug;
} \
while (0)
-void debug_init (void);
-int debug_decode (const char *);
-void debug_flush_files (void);
-bool debug_set_output (const char *);
-void debug_message_prefix (void);
+extern void debug_init (void);
+extern int debug_decode (const char *);
+extern void debug_flush_files (void);
+extern bool debug_set_output (const char *);
+extern void debug_message_prefix (void);
-void trace_prepre (const char *, int);
-void trace_pre (const char *, int, int, token_data **);
-void trace_post (const char *, int, int, const char *);
+extern void trace_prepre (const char *, int);
+extern void trace_pre (const char *, int, int, token_data **);
+extern void trace_post (const char *, int, int, const char *);
/* File: input.c --- lexical definitions. */
@@ -292,50 +292,52 @@ struct token_data
typedef enum token_type token_type;
typedef enum token_data_type token_data_type;
-void input_init (void);
-token_type peek_token (void);
-token_type next_token (token_data *, int *);
-void skip_line (void);
+extern void input_init (void);
+extern token_type peek_token (void);
+extern token_type next_token (token_data *, int *);
+extern void skip_line (void);
/* push back input */
-void push_file (FILE *, const char *, bool);
-void push_macro (builtin_func *);
-struct obstack *push_string_init (void);
-const char *push_string_finish (void);
-void push_wrapup (const char *);
-bool pop_wrapup (void);
+extern void push_file (FILE *, const char *, bool);
+extern void push_macro (builtin_func *);
+extern struct obstack *push_string_init (void);
+extern const char *push_string_finish (void);
+extern void push_wrapup (const char *);
+extern bool pop_wrapup (void);
/* current input file, and line */
extern const char *current_file;
extern int current_line;
/* left and right quote, begin and end comment */
-extern STRING bcomm, ecomm;
-extern STRING lquote, rquote;
+extern STRING bcomm;
+extern STRING ecomm;
+extern STRING lquote;
+extern STRING rquote;
#define DEF_LQUOTE "`"
#define DEF_RQUOTE "\'"
#define DEF_BCOMM "#"
#define DEF_ECOMM "\n"
-void set_quotes (const char *, const char *);
-void set_comment (const char *, const char *);
+extern void set_quotes (const char *, const char *);
+extern void set_comment (const char *, const char *);
#ifdef ENABLE_CHANGEWORD
-void set_word_regexp (const char *);
+extern void set_word_regexp (const char *);
#endif
/* File: output.c --- output functions. */
extern int current_diversion;
extern int output_current_line;
-void output_init (void);
-void output_exit (void);
-void output_text (const char *, int);
-void shipout_text (struct obstack *, const char *, int, int);
-void make_diversion (int);
-void insert_diversion (int);
-void insert_file (FILE *);
-void freeze_diversions (FILE *);
+extern void output_init (void);
+extern void output_exit (void);
+extern void output_text (const char *, int);
+extern void shipout_text (struct obstack *, const char *, int, int);
+extern void make_diversion (int);
+extern void insert_diversion (int);
+extern void insert_file (FILE *);
+extern void freeze_diversions (FILE *);
/* File symtab.c --- symbol table definitions. */
@@ -384,15 +386,17 @@ typedef void hack_symbol (symbol *, void *);
extern symbol **symtab;
-void free_symbol (symbol *sym);
-void symtab_init (void);
-symbol *lookup_symbol (const char *, symbol_lookup);
-void hack_all_symbols (hack_symbol *, void *);
+extern void free_symbol (symbol *sym);
+extern void symtab_init (void);
+extern symbol *lookup_symbol (const char *, symbol_lookup);
+extern void hack_all_symbols (hack_symbol *, void *);
/* File: macro.c --- macro expansion. */
-void expand_input (void);
-void call_macro (symbol *, int, token_data **, struct obstack *);
+extern int expansion_level;
+
+extern void expand_input (void);
+extern void call_macro (symbol *, int, token_data **, struct obstack *);
/* File: builtin.c --- builtins. */
@@ -422,39 +426,40 @@ struct re_registers;
syntax (new in 2.0). */
#define DEFAULT_MACRO_SEQUENCE "\\$\\({[^}]*}\\|[0-9][0-9]+\\)"
-void builtin_init (void);
-void define_builtin (const char *, const builtin *, symbol_lookup);
-void set_macro_sequence (const char *);
-void free_macro_sequence (void);
-void define_user_macro (const char *, const char *, symbol_lookup);
-void undivert_all (void);
-void expand_user_macro (struct obstack *, symbol *, int, token_data **);
-void m4_placeholder (struct obstack *, int, token_data **);
-void init_pattern_buffer (struct re_pattern_buffer *, struct re_registers *);
-const char *ntoa (int32_t, int);
-
-const builtin *find_builtin_by_addr (builtin_func *);
-const builtin *find_builtin_by_name (const char *);
+extern void builtin_init (void);
+extern void define_builtin (const char *, const builtin *, symbol_lookup);
+extern void set_macro_sequence (const char *);
+extern void free_macro_sequence (void);
+extern void define_user_macro (const char *, const char *, symbol_lookup);
+extern void undivert_all (void);
+extern void expand_user_macro (struct obstack *, symbol *, int, token_data **);
+extern void m4_placeholder (struct obstack *, int, token_data **);
+extern void init_pattern_buffer (struct re_pattern_buffer *,
+ struct re_registers *);
+extern const char *ntoa (int32_t, int);
+
+extern const builtin *find_builtin_by_addr (builtin_func *);
+extern const builtin *find_builtin_by_name (const char *);
/* File: path.c --- path search for include files. */
-void include_init (void);
-void include_env_init (void);
-void add_include_directory (const char *);
-FILE *m4_path_search (const char *, char **);
+extern void include_init (void);
+extern void include_env_init (void);
+extern void add_include_directory (const char *);
+extern FILE *m4_path_search (const char *, char **);
/* File: eval.c --- expression evaluation. */
-bool evaluate (const char *, int32_t *);
+extern bool evaluate (const char *, int32_t *);
/* File: format.c --- printf like formatting. */
-void expand_format (struct obstack *, int, token_data **);
+extern void expand_format (struct obstack *, int, token_data **);
/* File: freeze.c --- frozen state files. */
-void produce_frozen_state (const char *);
-void reload_frozen_state (const char *);
+extern void produce_frozen_state (const char *);
+extern void reload_frozen_state (const char *);
/* Debugging the memory allocator. */
diff --git a/src/macro.c b/src/macro.c
index e2e2499..0e76243 100644
--- a/src/macro.c
+++ b/src/macro.c
@@ -1,6 +1,6 @@
/* GNU m4 -- A simple macro processor
- Copyright (C) 1989-1994, 2006-2007, 2009-2011 Free Software
+ Copyright (C) 1989-1994, 2006-2007, 2009-2013 Free Software
Foundation, Inc.
This file is part of GNU M4.
diff --git a/src/output.c b/src/output.c
index 91ff9f0..c378afe 100644
--- a/src/output.c
+++ b/src/output.c
@@ -1,6 +1,6 @@
/* GNU m4 -- A simple macro processor
- Copyright (C) 1989-1994, 2004-2011 Free Software Foundation, Inc.
+ Copyright (C) 1989-1994, 2004-2013 Free Software Foundation, Inc.
This file is part of GNU M4.
diff --git a/src/path.c b/src/path.c
index 0e3c6e5..278200b 100644
--- a/src/path.c
+++ b/src/path.c
@@ -1,6 +1,6 @@
/* GNU m4 -- A simple macro processor
- Copyright (C) 1989-1993, 2004, 2006-2011 Free Software Foundation,
+ Copyright (C) 1989-1993, 2004, 2006-2013 Free Software Foundation,
Inc.
This file is part of GNU M4.
diff --git a/src/symtab.c b/src/symtab.c
index 4965027..fe37bee 100644
--- a/src/symtab.c
+++ b/src/symtab.c
@@ -1,6 +1,6 @@
/* GNU m4 -- A simple macro processor
- Copyright (C) 1989-1994, 2003, 2006-2011 Free Software Foundation,
+ Copyright (C) 1989-1994, 2003, 2006-2013 Free Software Foundation,
Inc.
This file is part of GNU M4.
@@ -120,7 +120,7 @@ symtab_init (void)
| Return a hashvalue for a string, from GNU-emacs. |
`--------------------------------------------------*/
-static size_t
+static size_t M4_GNUC_PURE
hash (const char *s)
{
register size_t val = 0;
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 669f296..05f9f11 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,6 +1,6 @@
## Makefile.am - template for generating Makefile via Automake
##
-## Copyright (C) 2009-2011 Free Software Foundation, Inc.
+## Copyright (C) 2009-2013 Free Software Foundation, Inc.
##
## This file is part of GNU M4.
##
diff --git a/tests/Makefile.in b/tests/Makefile.in
index af0d2b3..e4d2575 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.14 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,12 +14,24 @@
@SET_MAKE@
-# Copyright (C) 2002-2011 Free Software Foundation, Inc.
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
#
-# This file is free software, distributed under the terms of the GNU
-# General Public License. As a special exception to the GNU General
-# Public License, this file may be distributed as part of a program
-# that contains a configuration script generated by Autoconf, under
+# You should have received a copy of the GNU General Public License
+# along with this file. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License,
+# this file may be distributed as part of a program that
+# contains a configuration script generated by Autoconf, under
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
@@ -28,6 +39,51 @@
VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -45,63 +101,80 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(srcdir)/gnulib.mk
+DIST_COMMON = $(srcdir)/gnulib.mk $(srcdir)/Makefile.in \
+ $(srcdir)/Makefile.am $(top_srcdir)/build-aux/depcomp \
+ $(noinst_HEADERS) $(top_srcdir)/build-aux/test-driver
TESTS = test-alloca-opt$(EXEEXT) test-array_list$(EXEEXT) \
test-array_oset$(EXEEXT) test-avltree_oset$(EXEEXT) \
test-binary-io.sh test-btowc1.sh test-btowc2.sh \
test-c-ctype$(EXEEXT) test-c-stack.sh test-c-stack2.sh \
test-c-strcase.sh test-canonicalize-lgpl$(EXEEXT) \
- test-cloexec$(EXEEXT) test-closein.sh test-dirname$(EXEEXT) \
- test-dup2$(EXEEXT) test-environ$(EXEEXT) test-errno$(EXEEXT) \
- $(am__EXEEXT_1) test-fcntl-h$(EXEEXT) test-fcntl$(EXEEXT) \
- test-fflush$(EXEEXT) test-fflush2.sh test-filenamecat$(EXEEXT) \
- test-fopen-safer$(EXEEXT) test-fopen$(EXEEXT) test-fpending.sh \
- test-fpurge$(EXEEXT) test-freadahead.sh test-freading$(EXEEXT) \
- test-frexp-nolibm$(EXEEXT) test-frexpl-nolibm$(EXEEXT) \
- test-fseeko.sh test-fseeko2.sh test-ftell.sh test-ftell2.sh \
+ test-chdir$(EXEEXT) test-cloexec$(EXEEXT) test-close$(EXEEXT) \
+ test-closein.sh $(am__EXEEXT_1) test-dirent$(EXEEXT) \
+ test-dirname$(EXEEXT) test-dup$(EXEEXT) test-dup2$(EXEEXT) \
+ test-environ$(EXEEXT) test-errno$(EXEEXT) test-fclose$(EXEEXT) \
+ $(am__EXEEXT_2) test-fcntl-h$(EXEEXT) test-fcntl$(EXEEXT) \
+ test-fdopen$(EXEEXT) test-fflush$(EXEEXT) test-fflush2.sh \
+ test-fgetc$(EXEEXT) test-filenamecat$(EXEEXT) \
+ test-float$(EXEEXT) test-fopen-safer$(EXEEXT) \
+ test-fopen$(EXEEXT) test-fpending.sh test-fpurge$(EXEEXT) \
+ test-fputc$(EXEEXT) test-fread$(EXEEXT) test-freadahead.sh \
+ test-freading$(EXEEXT) test-frexp-nolibm$(EXEEXT) \
+ test-frexpl-nolibm$(EXEEXT) test-fseek.sh test-fseek2.sh \
+ test-fseeko.sh test-fseeko2.sh test-fseeko3.sh test-fseeko4.sh \
+ test-fstat$(EXEEXT) test-ftell.sh test-ftell2.sh \
test-ftell3$(EXEEXT) test-ftello.sh test-ftello2.sh \
- test-ftello3$(EXEEXT) test-getdtablesize$(EXEEXT) \
+ test-ftello3$(EXEEXT) test-ftello4.sh test-fwrite$(EXEEXT) \
+ test-getcwd-lgpl$(EXEEXT) test-getdtablesize$(EXEEXT) \
test-getopt$(EXEEXT) test-gettimeofday$(EXEEXT) \
- test-ignore-value$(EXEEXT) test-isnand-nolibm$(EXEEXT) \
+ test-ignore-value$(EXEEXT) test-intprops$(EXEEXT) \
+ test-inttypes$(EXEEXT) test-isnand-nolibm$(EXEEXT) \
test-isnanf-nolibm$(EXEEXT) test-isnanl-nolibm$(EXEEXT) \
- $(am__EXEEXT_2) test-langinfo$(EXEEXT) test-link$(EXEEXT) \
- test-linkedhash_list$(EXEEXT) $(am__EXEEXT_3) \
- test-locale$(EXEEXT) test-localename$(EXEEXT) test-lseek.sh \
- test-lstat$(EXEEXT) test-malloc-gnu$(EXEEXT) \
- test-malloca$(EXEEXT) $(am__EXEEXT_4) test-math$(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-memchr$(EXEEXT) \
- test-memchr2$(EXEEXT) test-nl_langinfo.sh test-open$(EXEEXT) \
- test-pipe2$(EXEEXT) $(am__EXEEXT_5) test-printf-frexp$(EXEEXT) \
- test-printf-frexpl$(EXEEXT) test-quotearg-simple$(EXEEXT) \
+ $(am__EXEEXT_3) test-langinfo$(EXEEXT) test-link$(EXEEXT) \
+ test-linkedhash_list$(EXEEXT) $(am__EXEEXT_4) \
+ test-locale$(EXEEXT) test-localeconv$(EXEEXT) \
+ test-localename$(EXEEXT) test-lseek.sh test-lstat$(EXEEXT) \
+ test-malloc-gnu$(EXEEXT) test-malloca$(EXEEXT) $(am__EXEEXT_5) \
+ test-math$(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-memchr$(EXEEXT) test-memchr2$(EXEEXT) test-nl_langinfo.sh \
+ test-open$(EXEEXT) test-pathmax$(EXEEXT) test-pipe2$(EXEEXT) \
+ test-posix_spawn_file_actions_addclose$(EXEEXT) \
+ test-posix_spawn_file_actions_adddup2$(EXEEXT) \
+ test-posix_spawn_file_actions_addopen$(EXEEXT) $(am__EXEEXT_6) \
+ test-printf-frexp$(EXEEXT) test-printf-frexpl$(EXEEXT) \
+ test-quotearg-simple$(EXEEXT) test-raise$(EXEEXT) \
test-rawmemchr$(EXEEXT) test-readlink$(EXEEXT) \
- test-rename$(EXEEXT) test-rmdir$(EXEEXT) test-sched$(EXEEXT) \
- test-setenv$(EXEEXT) test-setlocale1.sh test-setlocale2.sh \
- test-sigaction$(EXEEXT) $(am__EXEEXT_6) test-signal$(EXEEXT) \
- test-signbit$(EXEEXT) test-snprintf$(EXEEXT) $(am__EXEEXT_7) \
- test-spawn-pipe.sh test-spawn$(EXEEXT) test-stat$(EXEEXT) \
- test-stdbool$(EXEEXT) test-stddef$(EXEEXT) \
- test-stdint$(EXEEXT) $(am__EXEEXT_8) test-stdio$(EXEEXT) \
- $(am__EXEEXT_9) test-stdlib$(EXEEXT) test-strchrnul$(EXEEXT) \
- test-strerror$(EXEEXT) $(am__EXEEXT_10) test-string$(EXEEXT) \
- test-strnlen$(EXEEXT) test-strsignal$(EXEEXT) \
- test-strstr$(EXEEXT) test-strtod$(EXEEXT) \
- test-symlink$(EXEEXT) $(am__EXEEXT_11) test-sys_stat$(EXEEXT) \
- $(am__EXEEXT_12) test-sys_time$(EXEEXT) $(am__EXEEXT_13) \
- test-sys_wait$(EXEEXT) $(am__EXEEXT_14) test-time$(EXEEXT) \
- $(am__EXEEXT_15) test-dup-safer$(EXEEXT) test-unistd$(EXEEXT) \
- test-unsetenv$(EXEEXT) test-update-copyright.sh \
- test-vasnprintf$(EXEEXT) test-vasprintf-posix$(EXEEXT) \
- test-vasprintf$(EXEEXT) test-vc-list-files-git.sh \
- test-vc-list-files-cvs.sh test-verify$(EXEEXT) test-verify.sh \
- test-version-etc.sh $(am__EXEEXT_16) test-wchar$(EXEEXT) \
- test-wcrtomb.sh test-wcrtomb-w32-1.sh test-wcrtomb-w32-2.sh \
+ test-regex$(EXEEXT) test-rename$(EXEEXT) test-rmdir$(EXEEXT) \
+ test-sched$(EXEEXT) test-setenv$(EXEEXT) test-setlocale1.sh \
+ test-setlocale2.sh test-sigaction$(EXEEXT) $(am__EXEEXT_7) \
+ test-signal-h$(EXEEXT) test-signbit$(EXEEXT) test-sigpipe.sh \
+ test-sigprocmask$(EXEEXT) test-sleep$(EXEEXT) \
+ test-snprintf$(EXEEXT) $(am__EXEEXT_8) test-spawn-pipe.sh \
+ test-spawn$(EXEEXT) test-stat$(EXEEXT) test-stdbool$(EXEEXT) \
+ test-stddef$(EXEEXT) test-stdint$(EXEEXT) $(am__EXEEXT_9) \
+ test-stdio$(EXEEXT) $(am__EXEEXT_10) test-stdlib$(EXEEXT) \
+ test-strchrnul$(EXEEXT) test-strerror$(EXEEXT) \
+ $(am__EXEEXT_11) test-string$(EXEEXT) test-strnlen$(EXEEXT) \
+ test-strsignal$(EXEEXT) test-strstr$(EXEEXT) \
+ test-strtod$(EXEEXT) test-symlink$(EXEEXT) $(am__EXEEXT_12) \
+ test-sys_stat$(EXEEXT) $(am__EXEEXT_13) test-sys_time$(EXEEXT) \
+ $(am__EXEEXT_14) test-sys_types$(EXEEXT) $(am__EXEEXT_15) \
+ test-sys_wait$(EXEEXT) test-init.sh $(am__EXEEXT_16) \
+ test-time$(EXEEXT) $(am__EXEEXT_17) test-dup-safer$(EXEEXT) \
+ test-unistd$(EXEEXT) test-unsetenv$(EXEEXT) \
+ test-update-copyright.sh test-vasnprintf$(EXEEXT) \
+ test-vasprintf-posix$(EXEEXT) test-vasprintf$(EXEEXT) \
+ test-vc-list-files-git.sh test-vc-list-files-cvs.sh \
+ test-verify$(EXEEXT) test-verify.sh test-version-etc.sh \
+ $(am__EXEEXT_18) 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 $(am__EXEEXT_17) test-wctype-h$(EXEEXT) \
- test-xalloc-die.sh test-xvasprintf$(EXEEXT)
+ test-wcrtomb-w32-5.sh $(am__EXEEXT_19) test-wctype-h$(EXEEXT) \
+ test-write$(EXEEXT) test-xalloc-die.sh \
+ test-xvasprintf$(EXEEXT)
XFAIL_TESTS =
noinst_PROGRAMS =
check_PROGRAMS = test-alloca-opt$(EXEEXT) test-array_list$(EXEEXT) \
@@ -109,139 +182,165 @@ check_PROGRAMS = test-alloca-opt$(EXEEXT) test-array_list$(EXEEXT) \
test-binary-io$(EXEEXT) test-btowc$(EXEEXT) \
test-c-ctype$(EXEEXT) test-c-stack$(EXEEXT) \
test-c-strcasecmp$(EXEEXT) test-c-strncasecmp$(EXEEXT) \
- test-canonicalize-lgpl$(EXEEXT) test-cloexec$(EXEEXT) \
- test-closein$(EXEEXT) test-dirname$(EXEEXT) test-dup2$(EXEEXT) \
- test-environ$(EXEEXT) test-errno$(EXEEXT) $(am__EXEEXT_1) \
- test-fcntl-h$(EXEEXT) test-fcntl$(EXEEXT) test-fflush$(EXEEXT) \
- test-fflush2$(EXEEXT) test-filenamecat$(EXEEXT) \
+ test-canonicalize-lgpl$(EXEEXT) test-chdir$(EXEEXT) \
+ test-cloexec$(EXEEXT) test-close$(EXEEXT) \
+ test-closein$(EXEEXT) $(am__EXEEXT_1) test-dirent$(EXEEXT) \
+ test-dirname$(EXEEXT) test-dup$(EXEEXT) test-dup2$(EXEEXT) \
+ test-environ$(EXEEXT) test-errno$(EXEEXT) test-fclose$(EXEEXT) \
+ $(am__EXEEXT_2) test-fcntl-h$(EXEEXT) test-fcntl$(EXEEXT) \
+ test-fdopen$(EXEEXT) test-fflush$(EXEEXT) \
+ test-fflush2$(EXEEXT) test-fgetc$(EXEEXT) \
+ test-filenamecat$(EXEEXT) test-float$(EXEEXT) \
test-fopen-safer$(EXEEXT) test-fopen$(EXEEXT) \
test-fpending$(EXEEXT) test-fpurge$(EXEEXT) \
+ test-fputc$(EXEEXT) test-fread$(EXEEXT) \
test-freadahead$(EXEEXT) test-freading$(EXEEXT) \
test-frexp-nolibm$(EXEEXT) test-frexpl-nolibm$(EXEEXT) \
- test-fseeko$(EXEEXT) test-ftell$(EXEEXT) test-ftell3$(EXEEXT) \
- test-ftello$(EXEEXT) test-ftello3$(EXEEXT) \
+ test-fseek$(EXEEXT) test-fseeko$(EXEEXT) test-fseeko3$(EXEEXT) \
+ test-fseeko4$(EXEEXT) test-fstat$(EXEEXT) test-ftell$(EXEEXT) \
+ test-ftell3$(EXEEXT) test-ftello$(EXEEXT) \
+ test-ftello3$(EXEEXT) test-ftello4$(EXEEXT) \
+ test-fwrite$(EXEEXT) test-getcwd-lgpl$(EXEEXT) \
test-getdtablesize$(EXEEXT) test-getopt$(EXEEXT) \
test-gettimeofday$(EXEEXT) test-ignore-value$(EXEEXT) \
+ test-intprops$(EXEEXT) test-inttypes$(EXEEXT) \
test-isnand-nolibm$(EXEEXT) test-isnanf-nolibm$(EXEEXT) \
- test-isnanl-nolibm$(EXEEXT) $(am__EXEEXT_2) \
+ test-isnanl-nolibm$(EXEEXT) $(am__EXEEXT_3) \
test-langinfo$(EXEEXT) test-link$(EXEEXT) \
- test-linkedhash_list$(EXEEXT) $(am__EXEEXT_3) \
- test-locale$(EXEEXT) test-localename$(EXEEXT) \
- test-lseek$(EXEEXT) test-lstat$(EXEEXT) \
- test-malloc-gnu$(EXEEXT) test-malloca$(EXEEXT) $(am__EXEEXT_4) \
- test-math$(EXEEXT) test-mbrtowc$(EXEEXT) \
- test-mbrtowc-w32$(EXEEXT) test-mbsinit$(EXEEXT) \
- test-memchr$(EXEEXT) test-memchr2$(EXEEXT) \
- test-nl_langinfo$(EXEEXT) test-open$(EXEEXT) \
- test-pipe2$(EXEEXT) $(am__EXEEXT_5) test-printf-frexp$(EXEEXT) \
- test-printf-frexpl$(EXEEXT) test-quotearg-simple$(EXEEXT) \
+ test-linkedhash_list$(EXEEXT) $(am__EXEEXT_4) \
+ test-locale$(EXEEXT) test-localeconv$(EXEEXT) \
+ test-localename$(EXEEXT) test-lseek$(EXEEXT) \
+ test-lstat$(EXEEXT) test-malloc-gnu$(EXEEXT) \
+ test-malloca$(EXEEXT) $(am__EXEEXT_5) test-math$(EXEEXT) \
+ test-mbrtowc$(EXEEXT) test-mbrtowc-w32$(EXEEXT) \
+ test-mbsinit$(EXEEXT) test-memchr$(EXEEXT) \
+ test-memchr2$(EXEEXT) test-nl_langinfo$(EXEEXT) \
+ test-open$(EXEEXT) test-pathmax$(EXEEXT) test-pipe2$(EXEEXT) \
+ test-posix_spawn_file_actions_addclose$(EXEEXT) \
+ test-posix_spawn_file_actions_adddup2$(EXEEXT) \
+ test-posix_spawn_file_actions_addopen$(EXEEXT) $(am__EXEEXT_6) \
+ test-printf-frexp$(EXEEXT) test-printf-frexpl$(EXEEXT) \
+ test-quotearg-simple$(EXEEXT) test-raise$(EXEEXT) \
test-rawmemchr$(EXEEXT) test-readlink$(EXEEXT) \
- test-rename$(EXEEXT) test-rmdir$(EXEEXT) test-sched$(EXEEXT) \
- test-setenv$(EXEEXT) test-setlocale1$(EXEEXT) \
- test-setlocale2$(EXEEXT) test-sigaction$(EXEEXT) \
- $(am__EXEEXT_6) test-signal$(EXEEXT) test-signbit$(EXEEXT) \
- test-snprintf$(EXEEXT) $(am__EXEEXT_7) \
- test-spawn-pipe$(EXEEXT) test-spawn$(EXEEXT) \
- test-stat$(EXEEXT) test-stdbool$(EXEEXT) test-stddef$(EXEEXT) \
- test-stdint$(EXEEXT) $(am__EXEEXT_8) test-stdio$(EXEEXT) \
- $(am__EXEEXT_9) test-stdlib$(EXEEXT) test-strchrnul$(EXEEXT) \
- test-strerror$(EXEEXT) $(am__EXEEXT_10) test-string$(EXEEXT) \
- test-strnlen$(EXEEXT) test-strsignal$(EXEEXT) \
- test-strstr$(EXEEXT) test-strtod$(EXEEXT) \
- test-symlink$(EXEEXT) $(am__EXEEXT_11) test-sys_stat$(EXEEXT) \
- $(am__EXEEXT_12) test-sys_time$(EXEEXT) $(am__EXEEXT_13) \
- test-sys_wait$(EXEEXT) $(am__EXEEXT_14) test-time$(EXEEXT) \
- $(am__EXEEXT_15) test-dup-safer$(EXEEXT) test-unistd$(EXEEXT) \
+ test-regex$(EXEEXT) test-rename$(EXEEXT) test-rmdir$(EXEEXT) \
+ test-sched$(EXEEXT) test-setenv$(EXEEXT) \
+ test-setlocale1$(EXEEXT) test-setlocale2$(EXEEXT) \
+ test-sigaction$(EXEEXT) $(am__EXEEXT_7) test-signal-h$(EXEEXT) \
+ test-signbit$(EXEEXT) test-sigpipe$(EXEEXT) \
+ test-sigprocmask$(EXEEXT) test-sleep$(EXEEXT) \
+ test-snprintf$(EXEEXT) $(am__EXEEXT_8) \
+ test-spawn-pipe-main$(EXEEXT) test-spawn-pipe-child$(EXEEXT) \
+ test-spawn$(EXEEXT) test-stat$(EXEEXT) test-stdbool$(EXEEXT) \
+ test-stddef$(EXEEXT) test-stdint$(EXEEXT) $(am__EXEEXT_9) \
+ test-stdio$(EXEEXT) $(am__EXEEXT_10) test-stdlib$(EXEEXT) \
+ test-strchrnul$(EXEEXT) test-strerror$(EXEEXT) \
+ $(am__EXEEXT_11) test-string$(EXEEXT) test-strnlen$(EXEEXT) \
+ test-strsignal$(EXEEXT) test-strstr$(EXEEXT) \
+ test-strtod$(EXEEXT) test-symlink$(EXEEXT) $(am__EXEEXT_12) \
+ test-sys_stat$(EXEEXT) $(am__EXEEXT_13) test-sys_time$(EXEEXT) \
+ $(am__EXEEXT_14) test-sys_types$(EXEEXT) $(am__EXEEXT_15) \
+ test-sys_wait$(EXEEXT) $(am__EXEEXT_16) test-time$(EXEEXT) \
+ $(am__EXEEXT_17) test-dup-safer$(EXEEXT) test-unistd$(EXEEXT) \
test-unsetenv$(EXEEXT) test-vasnprintf$(EXEEXT) \
test-vasprintf-posix$(EXEEXT) test-vasprintf$(EXEEXT) \
test-verify$(EXEEXT) test-version-etc$(EXEEXT) \
- $(am__EXEEXT_16) test-wchar$(EXEEXT) test-wcrtomb$(EXEEXT) \
- test-wcrtomb-w32$(EXEEXT) $(am__EXEEXT_17) \
- test-wctype-h$(EXEEXT) test-xalloc-die$(EXEEXT) \
- test-xvasprintf$(EXEEXT)
-@ANSICXX_TRUE@am__append_1 = test-fcntl-h-c++
-@ANSICXX_TRUE@am__append_2 = test-fcntl-h-c++
-@ANSICXX_TRUE@am__append_3 = test-langinfo-c++
-@ANSICXX_TRUE@am__append_4 = test-langinfo-c++
-@ANSICXX_TRUE@am__append_5 = test-locale-c++
-@ANSICXX_TRUE@am__append_6 = test-locale-c++
-@ANSICXX_TRUE@am__append_7 = test-math-c++
-@ANSICXX_TRUE@am__append_8 = test-math-c++
-@POSIX_SPAWN_PORTED_TRUE@am__append_9 = test-posix_spawn1 test-posix_spawn2
-@POSIX_SPAWN_PORTED_TRUE@am__append_10 = test-posix_spawn1 test-posix_spawn2
-@POSIX_SPAWN_PORTED_TRUE@am__append_11 = test-posix_spawn1.sh \
+ $(am__EXEEXT_18) test-wchar$(EXEEXT) test-wcrtomb$(EXEEXT) \
+ test-wcrtomb-w32$(EXEEXT) $(am__EXEEXT_19) \
+ test-wctype-h$(EXEEXT) test-write$(EXEEXT) \
+ test-xalloc-die$(EXEEXT) test-xvasprintf$(EXEEXT)
+@ANSICXX_TRUE@am__append_1 = test-dirent-c++
+@ANSICXX_TRUE@am__append_2 = test-dirent-c++
+@ANSICXX_TRUE@am__append_3 = test-fcntl-h-c++
+@ANSICXX_TRUE@am__append_4 = test-fcntl-h-c++
+@ANSICXX_TRUE@am__append_5 = test-langinfo-c++
+@ANSICXX_TRUE@am__append_6 = test-langinfo-c++
+@ANSICXX_TRUE@am__append_7 = test-locale-c++
+@ANSICXX_TRUE@am__append_8 = test-locale-c++
+@ANSICXX_TRUE@am__append_9 = test-math-c++
+@ANSICXX_TRUE@am__append_10 = test-math-c++
+@POSIX_SPAWN_PORTED_TRUE@am__append_11 = test-posix_spawn1 test-posix_spawn2
+@POSIX_SPAWN_PORTED_TRUE@am__append_12 = test-posix_spawn1 test-posix_spawn2
+@POSIX_SPAWN_PORTED_TRUE@am__append_13 = test-posix_spawn1.sh \
@POSIX_SPAWN_PORTED_TRUE@ test-posix_spawn2.sh
-@POSIX_SPAWN_PORTED_TRUE@am__append_12 = test-posix_spawn1.sh \
+@POSIX_SPAWN_PORTED_TRUE@am__append_14 = test-posix_spawn1.sh \
@POSIX_SPAWN_PORTED_TRUE@ test-posix_spawn1.sh-t \
@POSIX_SPAWN_PORTED_TRUE@ test-posix_spawn2.sh \
@POSIX_SPAWN_PORTED_TRUE@ test-posix_spawn2.sh-t
-@ANSICXX_TRUE@am__append_13 = test-signal-c++
-@ANSICXX_TRUE@am__append_14 = test-signal-c++
-@ANSICXX_TRUE@am__append_15 = test-spawn-c++
-@ANSICXX_TRUE@am__append_16 = test-spawn-c++
-@ANSICXX_TRUE@am__append_17 = test-stdio-c++
-@ANSICXX_TRUE@am__append_18 = test-stdio-c++
-@ANSICXX_TRUE@am__append_19 = test-stdlib-c++
-@ANSICXX_TRUE@am__append_20 = test-stdlib-c++
-@ANSICXX_TRUE@am__append_21 = test-string-c++
-@ANSICXX_TRUE@am__append_22 = test-string-c++
-@ANSICXX_TRUE@am__append_23 = test-sys_stat-c++
-@ANSICXX_TRUE@am__append_24 = test-sys_stat-c++
-@ANSICXX_TRUE@am__append_25 = test-sys_time-c++
-@ANSICXX_TRUE@am__append_26 = test-sys_time-c++
-@ANSICXX_TRUE@am__append_27 = test-sys_wait-c++
-@ANSICXX_TRUE@am__append_28 = test-sys_wait-c++
-@ANSICXX_TRUE@am__append_29 = test-time-c++
-@ANSICXX_TRUE@am__append_30 = test-time-c++
-@ANSICXX_TRUE@am__append_31 = test-unistd-c++
-@ANSICXX_TRUE@am__append_32 = test-unistd-c++
-@ANSICXX_TRUE@am__append_33 = test-wchar-c++
-@ANSICXX_TRUE@am__append_34 = test-wchar-c++
-@ANSICXX_TRUE@am__append_35 = test-wctype-h-c++
-@ANSICXX_TRUE@am__append_36 = test-wctype-h-c++
+@ANSICXX_TRUE@am__append_15 = test-signal-h-c++
+@ANSICXX_TRUE@am__append_16 = test-signal-h-c++
+@ANSICXX_TRUE@am__append_17 = test-spawn-c++
+@ANSICXX_TRUE@am__append_18 = test-spawn-c++
+@ANSICXX_TRUE@am__append_19 = test-stdio-c++
+@ANSICXX_TRUE@am__append_20 = test-stdio-c++
+@ANSICXX_TRUE@am__append_21 = test-stdlib-c++
+@ANSICXX_TRUE@am__append_22 = test-stdlib-c++
+@ANSICXX_TRUE@am__append_23 = test-string-c++
+@ANSICXX_TRUE@am__append_24 = test-string-c++
+@ANSICXX_TRUE@am__append_25 = test-sys_stat-c++
+@ANSICXX_TRUE@am__append_26 = test-sys_stat-c++
+@ANSICXX_TRUE@am__append_27 = test-sys_time-c++
+@ANSICXX_TRUE@am__append_28 = test-sys_time-c++
+@ANSICXX_TRUE@am__append_29 = test-sys_types-c++
+@ANSICXX_TRUE@am__append_30 = test-sys_types-c++
+@ANSICXX_TRUE@am__append_31 = test-sys_wait-c++
+@ANSICXX_TRUE@am__append_32 = test-sys_wait-c++
+@ANSICXX_TRUE@am__append_33 = test-time-c++
+@ANSICXX_TRUE@am__append_34 = test-time-c++
+@ANSICXX_TRUE@am__append_35 = test-unistd-c++
+@ANSICXX_TRUE@am__append_36 = test-unistd-c++
+@ANSICXX_TRUE@am__append_37 = test-wchar-c++
+@ANSICXX_TRUE@am__append_38 = test-wchar-c++
+@ANSICXX_TRUE@am__append_39 = test-wctype-h-c++
+@ANSICXX_TRUE@am__append_40 = test-wctype-h-c++
subdir = tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/ansi-c++.m4 \
- $(top_srcdir)/m4/assert.m4 $(top_srcdir)/m4/autobuild.m4 \
- $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/c-stack.m4 \
- $(top_srcdir)/m4/canonicalize.m4 $(top_srcdir)/m4/cloexec.m4 \
+ $(top_srcdir)/m4/asm-underscore.m4 $(top_srcdir)/m4/assert.m4 \
+ $(top_srcdir)/m4/autobuild.m4 $(top_srcdir)/m4/btowc.m4 \
+ $(top_srcdir)/m4/c-stack.m4 $(top_srcdir)/m4/canonicalize.m4 \
$(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \
- $(top_srcdir)/m4/closein.m4 $(top_srcdir)/m4/closeout.m4 \
- $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/config-h.m4 \
- $(top_srcdir)/m4/configmake.m4 $(top_srcdir)/m4/dirname.m4 \
- $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup2.m4 \
- $(top_srcdir)/m4/eealloc.m4 $(top_srcdir)/m4/environ.m4 \
- $(top_srcdir)/m4/errno_h.m4 $(top_srcdir)/m4/error.m4 \
- $(top_srcdir)/m4/execute.m4 $(top_srcdir)/m4/exponentd.m4 \
- $(top_srcdir)/m4/exponentf.m4 $(top_srcdir)/m4/exponentl.m4 \
- $(top_srcdir)/m4/extensions.m4 \
+ $(top_srcdir)/m4/closedir.m4 $(top_srcdir)/m4/closein.m4 \
+ $(top_srcdir)/m4/closeout.m4 $(top_srcdir)/m4/codeset.m4 \
+ $(top_srcdir)/m4/config-h.m4 $(top_srcdir)/m4/configmake.m4 \
+ $(top_srcdir)/m4/dirent_h.m4 $(top_srcdir)/m4/dirname.m4 \
+ $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup.m4 \
+ $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
+ $(top_srcdir)/m4/environ.m4 $(top_srcdir)/m4/errno_h.m4 \
+ $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/execute.m4 \
+ $(top_srcdir)/m4/exponentd.m4 $(top_srcdir)/m4/exponentf.m4 \
+ $(top_srcdir)/m4/exponentl.m4 $(top_srcdir)/m4/extensions.m4 \
+ $(top_srcdir)/m4/extern-inline.m4 \
$(top_srcdir)/m4/fatal-signal.m4 $(top_srcdir)/m4/fclose.m4 \
$(top_srcdir)/m4/fcntl-o.m4 $(top_srcdir)/m4/fcntl.m4 \
- $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fflush.m4 \
- $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/float_h.m4 \
- $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fpending.m4 \
- $(top_srcdir)/m4/fpieee.m4 $(top_srcdir)/m4/fpurge.m4 \
+ $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/fdopen.m4 \
+ $(top_srcdir)/m4/fflush.m4 $(top_srcdir)/m4/filenamecat.m4 \
+ $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fopen.m4 \
+ $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fpieee.m4 \
+ $(top_srcdir)/m4/fpurge.m4 $(top_srcdir)/m4/freadahead.m4 \
$(top_srcdir)/m4/freading.m4 $(top_srcdir)/m4/frexp.m4 \
- $(top_srcdir)/m4/frexpl.m4 $(top_srcdir)/m4/fseeko.m4 \
+ $(top_srcdir)/m4/frexpl.m4 $(top_srcdir)/m4/fseek.m4 \
+ $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/fstat.m4 \
$(top_srcdir)/m4/ftell.m4 $(top_srcdir)/m4/ftello.m4 \
- $(top_srcdir)/m4/getdtablesize.m4 $(top_srcdir)/m4/getopt.m4 \
- $(top_srcdir)/m4/getpagesize.m4 \
- $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/gl_list.m4 \
- $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \
+ $(top_srcdir)/m4/getcwd.m4 $(top_srcdir)/m4/getdtablesize.m4 \
+ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpagesize.m4 \
+ $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glibc21.m4 \
+ $(top_srcdir)/m4/gnulib-common.m4 \
$(top_srcdir)/m4/gnulib-comp.m4 \
- $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \
+ $(top_srcdir)/m4/include_next.m4 \
$(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax_t.m4 \
+ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \
$(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/isnand.m4 \
$(top_srcdir)/m4/isnanf.m4 $(top_srcdir)/m4/isnanl.m4 \
- $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/lcmessage.m4 \
- $(top_srcdir)/m4/ldexp.m4 $(top_srcdir)/m4/ldexpl.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \
- $(top_srcdir)/m4/link.m4 $(top_srcdir)/m4/localcharset.m4 \
- $(top_srcdir)/m4/locale-fr.m4 $(top_srcdir)/m4/locale-ja.m4 \
- $(top_srcdir)/m4/locale-tr.m4 $(top_srcdir)/m4/locale-zh.m4 \
- $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localename.m4 \
+ $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \
+ $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/ldexp.m4 \
+ $(top_srcdir)/m4/ldexpl.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/libsigsegv.m4 $(top_srcdir)/m4/link.m4 \
+ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \
+ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-tr.m4 \
+ $(top_srcdir)/m4/locale-zh.m4 $(top_srcdir)/m4/locale_h.m4 \
+ $(top_srcdir)/m4/localeconv.m4 $(top_srcdir)/m4/localename.m4 \
$(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \
$(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/lstat.m4 \
$(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \
@@ -250,40 +349,43 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mbtowc.m4 \
$(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/mkdtemp.m4 \
$(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mmap-anon.m4 \
- $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/multiarch.m4 \
+ $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \
+ $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \
$(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nocrash.m4 \
- $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/pathmax.m4 \
+ $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/open.m4 \
+ $(top_srcdir)/m4/opendir.m4 $(top_srcdir)/m4/pathmax.m4 \
$(top_srcdir)/m4/pipe2.m4 $(top_srcdir)/m4/posix_spawn.m4 \
$(top_srcdir)/m4/printf-frexp.m4 \
$(top_srcdir)/m4/printf-frexpl.m4 $(top_srcdir)/m4/printf.m4 \
$(top_srcdir)/m4/putenv.m4 $(top_srcdir)/m4/quotearg.m4 \
- $(top_srcdir)/m4/rawmemchr.m4 $(top_srcdir)/m4/readlink.m4 \
+ $(top_srcdir)/m4/raise.m4 $(top_srcdir)/m4/rawmemchr.m4 \
+ $(top_srcdir)/m4/readdir.m4 $(top_srcdir)/m4/readlink.m4 \
$(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/rename.m4 \
$(top_srcdir)/m4/rmdir.m4 $(top_srcdir)/m4/sched_h.m4 \
- $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/setlocale.m4 \
- $(top_srcdir)/m4/sig_atomic_t.m4 $(top_srcdir)/m4/sigaction.m4 \
- $(top_srcdir)/m4/signal_h.m4 \
+ $(top_srcdir)/m4/secure_getenv.m4 $(top_srcdir)/m4/setenv.m4 \
+ $(top_srcdir)/m4/setlocale.m4 $(top_srcdir)/m4/sig_atomic_t.m4 \
+ $(top_srcdir)/m4/sigaction.m4 $(top_srcdir)/m4/signal_h.m4 \
$(top_srcdir)/m4/signalblocking.m4 $(top_srcdir)/m4/signbit.m4 \
- $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/snprintf.m4 \
+ $(top_srcdir)/m4/sigpipe.m4 $(top_srcdir)/m4/size_max.m4 \
+ $(top_srcdir)/m4/sleep.m4 $(top_srcdir)/m4/snprintf.m4 \
$(top_srcdir)/m4/spawn-pipe.m4 $(top_srcdir)/m4/spawn_h.m4 \
$(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat.m4 \
$(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \
$(top_srcdir)/m4/stddef_h.m4 $(top_srcdir)/m4/stdint.m4 \
- $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio-safer.m4 \
- $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib-safer.m4 \
+ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/stdio_h.m4 \
$(top_srcdir)/m4/stdlib_h.m4 $(top_srcdir)/m4/strchrnul.m4 \
$(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
$(top_srcdir)/m4/string_h.m4 $(top_srcdir)/m4/strndup.m4 \
$(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strsignal.m4 \
$(top_srcdir)/m4/strstr.m4 $(top_srcdir)/m4/strtod.m4 \
- $(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/symlink.m4 \
+ $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_socket_h.m4 \
$(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \
- $(top_srcdir)/m4/sys_wait_h.m4 $(top_srcdir)/m4/tempname.m4 \
- $(top_srcdir)/m4/threadlib.m4 $(top_srcdir)/m4/time_h.m4 \
- $(top_srcdir)/m4/tls.m4 $(top_srcdir)/m4/tmpdir.m4 \
- $(top_srcdir)/m4/ungetc.m4 $(top_srcdir)/m4/unistd-safer.m4 \
- $(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/unlocked-io.m4 \
- $(top_srcdir)/m4/vasnprintf.m4 \
+ $(top_srcdir)/m4/sys_types_h.m4 $(top_srcdir)/m4/sys_wait_h.m4 \
+ $(top_srcdir)/m4/tempname.m4 $(top_srcdir)/m4/threadlib.m4 \
+ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/tls.m4 \
+ $(top_srcdir)/m4/tmpdir.m4 $(top_srcdir)/m4/ungetc.m4 \
+ $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \
+ $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
$(top_srcdir)/m4/vasprintf-posix.m4 \
$(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/version-etc.m4 \
$(top_srcdir)/m4/wait-process.m4 $(top_srcdir)/m4/waitpid.m4 \
@@ -291,9 +393,10 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wcrtomb.m4 \
$(top_srcdir)/m4/wctob.m4 $(top_srcdir)/m4/wctomb.m4 \
$(top_srcdir)/m4/wctype_h.m4 $(top_srcdir)/m4/wint_t.m4 \
- $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xsize.m4 \
- $(top_srcdir)/m4/xstrndup.m4 $(top_srcdir)/m4/xvasprintf.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/write.m4 $(top_srcdir)/m4/xalloc.m4 \
+ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrndup.m4 \
+ $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -301,38 +404,35 @@ CONFIG_HEADER = $(top_builddir)/lib/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
-AR = ar
-ARFLAGS = cru
-AM_V_AR = $(am__v_AR_$(V))
-am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY))
-am__v_AR_0 = @echo " AR " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
-am__v_at_0 = @
+AM_V_AR = $(am__v_AR_@AM_V@)
+am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
+am__v_AR_0 = @echo " AR " $@;
+am__v_AR_1 =
libtests_a_AR = $(AR) $(ARFLAGS)
am__DEPENDENCIES_1 =
am_libtests_a_OBJECTS = gl_array_list.$(OBJEXT) \
- gl_array_oset.$(OBJEXT) c-strcasecmp.$(OBJEXT) \
- c-strncasecmp.$(OBJEXT) localename.$(OBJEXT)
+ gl_array_oset.$(OBJEXT) localename.$(OBJEXT)
libtests_a_OBJECTS = $(am_libtests_a_OBJECTS)
-@ANSICXX_TRUE@am__EXEEXT_1 = test-fcntl-h-c++$(EXEEXT)
-@ANSICXX_TRUE@am__EXEEXT_2 = test-langinfo-c++$(EXEEXT)
-@ANSICXX_TRUE@am__EXEEXT_3 = test-locale-c++$(EXEEXT)
-@ANSICXX_TRUE@am__EXEEXT_4 = test-math-c++$(EXEEXT)
-@POSIX_SPAWN_PORTED_TRUE@am__EXEEXT_5 = test-posix_spawn1$(EXEEXT) \
+@ANSICXX_TRUE@am__EXEEXT_1 = test-dirent-c++$(EXEEXT)
+@ANSICXX_TRUE@am__EXEEXT_2 = test-fcntl-h-c++$(EXEEXT)
+@ANSICXX_TRUE@am__EXEEXT_3 = test-langinfo-c++$(EXEEXT)
+@ANSICXX_TRUE@am__EXEEXT_4 = test-locale-c++$(EXEEXT)
+@ANSICXX_TRUE@am__EXEEXT_5 = test-math-c++$(EXEEXT)
+@POSIX_SPAWN_PORTED_TRUE@am__EXEEXT_6 = test-posix_spawn1$(EXEEXT) \
@POSIX_SPAWN_PORTED_TRUE@ test-posix_spawn2$(EXEEXT)
-@ANSICXX_TRUE@am__EXEEXT_6 = test-signal-c++$(EXEEXT)
-@ANSICXX_TRUE@am__EXEEXT_7 = test-spawn-c++$(EXEEXT)
-@ANSICXX_TRUE@am__EXEEXT_8 = test-stdio-c++$(EXEEXT)
-@ANSICXX_TRUE@am__EXEEXT_9 = test-stdlib-c++$(EXEEXT)
-@ANSICXX_TRUE@am__EXEEXT_10 = test-string-c++$(EXEEXT)
-@ANSICXX_TRUE@am__EXEEXT_11 = test-sys_stat-c++$(EXEEXT)
-@ANSICXX_TRUE@am__EXEEXT_12 = test-sys_time-c++$(EXEEXT)
-@ANSICXX_TRUE@am__EXEEXT_13 = test-sys_wait-c++$(EXEEXT)
-@ANSICXX_TRUE@am__EXEEXT_14 = test-time-c++$(EXEEXT)
-@ANSICXX_TRUE@am__EXEEXT_15 = test-unistd-c++$(EXEEXT)
-@ANSICXX_TRUE@am__EXEEXT_16 = test-wchar-c++$(EXEEXT)
-@ANSICXX_TRUE@am__EXEEXT_17 = test-wctype-h-c++$(EXEEXT)
+@ANSICXX_TRUE@am__EXEEXT_7 = test-signal-h-c++$(EXEEXT)
+@ANSICXX_TRUE@am__EXEEXT_8 = test-spawn-c++$(EXEEXT)
+@ANSICXX_TRUE@am__EXEEXT_9 = test-stdio-c++$(EXEEXT)
+@ANSICXX_TRUE@am__EXEEXT_10 = test-stdlib-c++$(EXEEXT)
+@ANSICXX_TRUE@am__EXEEXT_11 = test-string-c++$(EXEEXT)
+@ANSICXX_TRUE@am__EXEEXT_12 = test-sys_stat-c++$(EXEEXT)
+@ANSICXX_TRUE@am__EXEEXT_13 = test-sys_time-c++$(EXEEXT)
+@ANSICXX_TRUE@am__EXEEXT_14 = test-sys_types-c++$(EXEEXT)
+@ANSICXX_TRUE@am__EXEEXT_15 = test-sys_wait-c++$(EXEEXT)
+@ANSICXX_TRUE@am__EXEEXT_16 = test-time-c++$(EXEEXT)
+@ANSICXX_TRUE@am__EXEEXT_17 = test-unistd-c++$(EXEEXT)
+@ANSICXX_TRUE@am__EXEEXT_18 = test-wchar-c++$(EXEEXT)
+@ANSICXX_TRUE@am__EXEEXT_19 = test-wctype-h-c++$(EXEEXT)
PROGRAMS = $(noinst_PROGRAMS)
test_alloca_opt_SOURCES = test-alloca-opt.c
test_alloca_opt_OBJECTS = test-alloca-opt.$(OBJEXT)
@@ -388,17 +488,42 @@ test_canonicalize_lgpl_OBJECTS = test-canonicalize-lgpl.$(OBJEXT)
test_canonicalize_lgpl_LDADD = $(LDADD)
test_canonicalize_lgpl_DEPENDENCIES = libtests.a ../lib/libm4.a \
libtests.a $(am__DEPENDENCIES_1)
+test_chdir_SOURCES = test-chdir.c
+test_chdir_OBJECTS = test-chdir.$(OBJEXT)
+test_chdir_LDADD = $(LDADD)
+test_chdir_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_cloexec_SOURCES = test-cloexec.c
test_cloexec_OBJECTS = test-cloexec.$(OBJEXT)
test_cloexec_LDADD = $(LDADD)
test_cloexec_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
$(am__DEPENDENCIES_1)
+test_close_SOURCES = test-close.c
+test_close_OBJECTS = test-close.$(OBJEXT)
+test_close_LDADD = $(LDADD)
+test_close_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_closein_SOURCES = test-closein.c
test_closein_OBJECTS = test-closein.$(OBJEXT)
test_closein_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_dirent_SOURCES = test-dirent.c
+test_dirent_OBJECTS = test-dirent.$(OBJEXT)
+test_dirent_LDADD = $(LDADD)
+test_dirent_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
+am__test_dirent_c___SOURCES_DIST = test-dirent-c++.cc
+@ANSICXX_TRUE@am_test_dirent_c___OBJECTS = test-dirent-c++.$(OBJEXT)
+test_dirent_c___OBJECTS = $(am_test_dirent_c___OBJECTS)
+@ANSICXX_TRUE@test_dirent_c___DEPENDENCIES = $(am__DEPENDENCIES_2) \
+@ANSICXX_TRUE@ $(am__DEPENDENCIES_1)
test_dirname_SOURCES = test-dirname.c
test_dirname_OBJECTS = test-dirname.$(OBJEXT)
test_dirname_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_dup_SOURCES = test-dup.c
+test_dup_OBJECTS = test-dup.$(OBJEXT)
+test_dup_LDADD = $(LDADD)
+test_dup_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_dup_safer_SOURCES = test-dup-safer.c
test_dup_safer_OBJECTS = test-dup-safer.$(OBJEXT)
test_dup_safer_LDADD = $(LDADD)
@@ -419,6 +544,11 @@ test_errno_OBJECTS = test-errno.$(OBJEXT)
test_errno_LDADD = $(LDADD)
test_errno_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
$(am__DEPENDENCIES_1)
+test_fclose_SOURCES = test-fclose.c
+test_fclose_OBJECTS = test-fclose.$(OBJEXT)
+test_fclose_LDADD = $(LDADD)
+test_fclose_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_fcntl_SOURCES = test-fcntl.c
test_fcntl_OBJECTS = test-fcntl.$(OBJEXT)
test_fcntl_LDADD = $(LDADD)
@@ -435,6 +565,11 @@ am__test_fcntl_h_c___SOURCES_DIST = test-fcntl-h-c++.cc
test_fcntl_h_c___OBJECTS = $(am_test_fcntl_h_c___OBJECTS)
@ANSICXX_TRUE@test_fcntl_h_c___DEPENDENCIES = $(am__DEPENDENCIES_2) \
@ANSICXX_TRUE@ $(am__DEPENDENCIES_1)
+test_fdopen_SOURCES = test-fdopen.c
+test_fdopen_OBJECTS = test-fdopen.$(OBJEXT)
+test_fdopen_LDADD = $(LDADD)
+test_fdopen_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_fflush_SOURCES = test-fflush.c
test_fflush_OBJECTS = test-fflush.$(OBJEXT)
test_fflush_LDADD = $(LDADD)
@@ -445,9 +580,19 @@ test_fflush2_OBJECTS = test-fflush2.$(OBJEXT)
test_fflush2_LDADD = $(LDADD)
test_fflush2_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
$(am__DEPENDENCIES_1)
+test_fgetc_SOURCES = test-fgetc.c
+test_fgetc_OBJECTS = test-fgetc.$(OBJEXT)
+test_fgetc_LDADD = $(LDADD)
+test_fgetc_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_filenamecat_SOURCES = test-filenamecat.c
test_filenamecat_OBJECTS = test-filenamecat.$(OBJEXT)
test_filenamecat_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_float_SOURCES = test-float.c
+test_float_OBJECTS = test-float.$(OBJEXT)
+test_float_LDADD = $(LDADD)
+test_float_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_fopen_SOURCES = test-fopen.c
test_fopen_OBJECTS = test-fopen.$(OBJEXT)
test_fopen_LDADD = $(LDADD)
@@ -468,6 +613,16 @@ test_fpurge_OBJECTS = test-fpurge.$(OBJEXT)
test_fpurge_LDADD = $(LDADD)
test_fpurge_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
$(am__DEPENDENCIES_1)
+test_fputc_SOURCES = test-fputc.c
+test_fputc_OBJECTS = test-fputc.$(OBJEXT)
+test_fputc_LDADD = $(LDADD)
+test_fputc_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_fread_SOURCES = test-fread.c
+test_fread_OBJECTS = test-fread.$(OBJEXT)
+test_fread_LDADD = $(LDADD)
+test_fread_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_freadahead_SOURCES = test-freadahead.c
test_freadahead_OBJECTS = test-freadahead.$(OBJEXT)
test_freadahead_LDADD = $(LDADD)
@@ -478,21 +633,42 @@ test_freading_OBJECTS = test-freading.$(OBJEXT)
test_freading_LDADD = $(LDADD)
test_freading_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
$(am__DEPENDENCIES_1)
-am_test_frexp_nolibm_OBJECTS = test-frexp.$(OBJEXT)
+am_test_frexp_nolibm_OBJECTS = test-frexp.$(OBJEXT) randomd.$(OBJEXT)
test_frexp_nolibm_OBJECTS = $(am_test_frexp_nolibm_OBJECTS)
test_frexp_nolibm_LDADD = $(LDADD)
test_frexp_nolibm_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
$(am__DEPENDENCIES_1)
-am_test_frexpl_nolibm_OBJECTS = test-frexpl.$(OBJEXT)
+am_test_frexpl_nolibm_OBJECTS = test-frexpl.$(OBJEXT) \
+ randoml.$(OBJEXT)
test_frexpl_nolibm_OBJECTS = $(am_test_frexpl_nolibm_OBJECTS)
test_frexpl_nolibm_LDADD = $(LDADD)
test_frexpl_nolibm_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
$(am__DEPENDENCIES_1)
+test_fseek_SOURCES = test-fseek.c
+test_fseek_OBJECTS = test-fseek.$(OBJEXT)
+test_fseek_LDADD = $(LDADD)
+test_fseek_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_fseeko_SOURCES = test-fseeko.c
test_fseeko_OBJECTS = test-fseeko.$(OBJEXT)
test_fseeko_LDADD = $(LDADD)
test_fseeko_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
$(am__DEPENDENCIES_1)
+test_fseeko3_SOURCES = test-fseeko3.c
+test_fseeko3_OBJECTS = test-fseeko3.$(OBJEXT)
+test_fseeko3_LDADD = $(LDADD)
+test_fseeko3_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_fseeko4_SOURCES = test-fseeko4.c
+test_fseeko4_OBJECTS = test-fseeko4.$(OBJEXT)
+test_fseeko4_LDADD = $(LDADD)
+test_fseeko4_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_fstat_SOURCES = test-fstat.c
+test_fstat_OBJECTS = test-fstat.$(OBJEXT)
+test_fstat_LDADD = $(LDADD)
+test_fstat_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_ftell_SOURCES = test-ftell.c
test_ftell_OBJECTS = test-ftell.$(OBJEXT)
test_ftell_LDADD = $(LDADD)
@@ -513,6 +689,20 @@ test_ftello3_OBJECTS = test-ftello3.$(OBJEXT)
test_ftello3_LDADD = $(LDADD)
test_ftello3_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
$(am__DEPENDENCIES_1)
+test_ftello4_SOURCES = test-ftello4.c
+test_ftello4_OBJECTS = test-ftello4.$(OBJEXT)
+test_ftello4_LDADD = $(LDADD)
+test_ftello4_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_fwrite_SOURCES = test-fwrite.c
+test_fwrite_OBJECTS = test-fwrite.$(OBJEXT)
+test_fwrite_LDADD = $(LDADD)
+test_fwrite_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_getcwd_lgpl_SOURCES = test-getcwd-lgpl.c
+test_getcwd_lgpl_OBJECTS = test-getcwd-lgpl.$(OBJEXT)
+test_getcwd_lgpl_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_1)
test_getdtablesize_SOURCES = test-getdtablesize.c
test_getdtablesize_OBJECTS = test-getdtablesize.$(OBJEXT)
test_getdtablesize_LDADD = $(LDADD)
@@ -531,6 +721,16 @@ test_ignore_value_OBJECTS = test-ignore-value.$(OBJEXT)
test_ignore_value_LDADD = $(LDADD)
test_ignore_value_DEPENDENCIES = libtests.a ../lib/libm4.a 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 ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_inttypes_SOURCES = test-inttypes.c
+test_inttypes_OBJECTS = test-inttypes.$(OBJEXT)
+test_inttypes_LDADD = $(LDADD)
+test_inttypes_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_isnand_nolibm_SOURCES = test-isnand-nolibm.c
test_isnand_nolibm_OBJECTS = test-isnand-nolibm.$(OBJEXT)
test_isnand_nolibm_LDADD = $(LDADD)
@@ -581,9 +781,15 @@ test_locale_c___OBJECTS = $(am_test_locale_c___OBJECTS)
test_locale_c___LDADD = $(LDADD)
test_locale_c___DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
$(am__DEPENDENCIES_1)
+test_localeconv_SOURCES = test-localeconv.c
+test_localeconv_OBJECTS = test-localeconv.$(OBJEXT)
+test_localeconv_LDADD = $(LDADD)
+test_localeconv_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_localename_SOURCES = test-localename.c
test_localename_OBJECTS = test-localename.$(OBJEXT)
-test_localename_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_localename_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_1)
test_lseek_SOURCES = test-lseek.c
test_lseek_OBJECTS = test-lseek.$(OBJEXT)
test_lseek_LDADD = $(LDADD)
@@ -613,9 +819,7 @@ am__test_math_c___SOURCES_DIST = test-math-c++.cc test-math-c++2.cc
@ANSICXX_TRUE@am_test_math_c___OBJECTS = test-math-c++.$(OBJEXT) \
@ANSICXX_TRUE@ test-math-c++2.$(OBJEXT)
test_math_c___OBJECTS = $(am_test_math_c___OBJECTS)
-test_math_c___LDADD = $(LDADD)
-test_math_c___DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
- $(am__DEPENDENCIES_1)
+@ANSICXX_TRUE@test_math_c___DEPENDENCIES = $(am__DEPENDENCIES_2)
test_mbrtowc_SOURCES = test-mbrtowc.c
test_mbrtowc_OBJECTS = test-mbrtowc.$(OBJEXT)
test_mbrtowc_LDADD = $(LDADD)
@@ -651,11 +855,14 @@ test_open_OBJECTS = test-open.$(OBJEXT)
test_open_LDADD = $(LDADD)
test_open_DEPENDENCIES = libtests.a ../lib/libm4.a 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 ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_pipe2_SOURCES = test-pipe2.c
test_pipe2_OBJECTS = test-pipe2.$(OBJEXT)
-test_pipe2_LDADD = $(LDADD)
-test_pipe2_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
- $(am__DEPENDENCIES_1)
+test_pipe2_DEPENDENCIES = $(am__DEPENDENCIES_2)
test_posix_spawn1_SOURCES = test-posix_spawn1.c
test_posix_spawn1_OBJECTS = test-posix_spawn1.$(OBJEXT)
test_posix_spawn1_LDADD = $(LDADD)
@@ -666,6 +873,27 @@ test_posix_spawn2_OBJECTS = test-posix_spawn2.$(OBJEXT)
test_posix_spawn2_LDADD = $(LDADD)
test_posix_spawn2_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
$(am__DEPENDENCIES_1)
+test_posix_spawn_file_actions_addclose_SOURCES = \
+ test-posix_spawn_file_actions_addclose.c
+test_posix_spawn_file_actions_addclose_OBJECTS = \
+ test-posix_spawn_file_actions_addclose.$(OBJEXT)
+test_posix_spawn_file_actions_addclose_LDADD = $(LDADD)
+test_posix_spawn_file_actions_addclose_DEPENDENCIES = libtests.a \
+ ../lib/libm4.a libtests.a $(am__DEPENDENCIES_1)
+test_posix_spawn_file_actions_adddup2_SOURCES = \
+ test-posix_spawn_file_actions_adddup2.c
+test_posix_spawn_file_actions_adddup2_OBJECTS = \
+ test-posix_spawn_file_actions_adddup2.$(OBJEXT)
+test_posix_spawn_file_actions_adddup2_LDADD = $(LDADD)
+test_posix_spawn_file_actions_adddup2_DEPENDENCIES = libtests.a \
+ ../lib/libm4.a libtests.a $(am__DEPENDENCIES_1)
+test_posix_spawn_file_actions_addopen_SOURCES = \
+ test-posix_spawn_file_actions_addopen.c
+test_posix_spawn_file_actions_addopen_OBJECTS = \
+ test-posix_spawn_file_actions_addopen.$(OBJEXT)
+test_posix_spawn_file_actions_addopen_LDADD = $(LDADD)
+test_posix_spawn_file_actions_addopen_DEPENDENCIES = libtests.a \
+ ../lib/libm4.a libtests.a $(am__DEPENDENCIES_1)
test_printf_frexp_SOURCES = test-printf-frexp.c
test_printf_frexp_OBJECTS = test-printf-frexp.$(OBJEXT)
test_printf_frexp_LDADD = $(LDADD)
@@ -679,6 +907,11 @@ test_printf_frexpl_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
test_quotearg_simple_SOURCES = test-quotearg-simple.c
test_quotearg_simple_OBJECTS = test-quotearg-simple.$(OBJEXT)
test_quotearg_simple_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_raise_SOURCES = test-raise.c
+test_raise_OBJECTS = test-raise.$(OBJEXT)
+test_raise_LDADD = $(LDADD)
+test_raise_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_rawmemchr_SOURCES = test-rawmemchr.c
test_rawmemchr_OBJECTS = test-rawmemchr.$(OBJEXT)
test_rawmemchr_LDADD = $(LDADD)
@@ -689,6 +922,9 @@ test_readlink_OBJECTS = test-readlink.$(OBJEXT)
test_readlink_LDADD = $(LDADD)
test_readlink_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
$(am__DEPENDENCIES_1)
+test_regex_SOURCES = test-regex.c
+test_regex_OBJECTS = test-regex.$(OBJEXT)
+test_regex_DEPENDENCIES = $(am__DEPENDENCIES_2)
test_rename_SOURCES = test-rename.c
test_rename_OBJECTS = test-rename.$(OBJEXT)
test_rename_LDADD = $(LDADD)
@@ -724,23 +960,39 @@ test_sigaction_OBJECTS = test-sigaction.$(OBJEXT)
test_sigaction_LDADD = $(LDADD)
test_sigaction_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
$(am__DEPENDENCIES_1)
-test_signal_SOURCES = test-signal.c
-test_signal_OBJECTS = test-signal.$(OBJEXT)
-test_signal_LDADD = $(LDADD)
-test_signal_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
- $(am__DEPENDENCIES_1)
-am__test_signal_c___SOURCES_DIST = test-signal-c++.cc \
- test-signal-c++2.cc
-@ANSICXX_TRUE@am_test_signal_c___OBJECTS = test-signal-c++.$(OBJEXT) \
-@ANSICXX_TRUE@ test-signal-c++2.$(OBJEXT)
-test_signal_c___OBJECTS = $(am_test_signal_c___OBJECTS)
-@ANSICXX_TRUE@test_signal_c___DEPENDENCIES = $(am__DEPENDENCIES_2) \
+test_signal_h_SOURCES = test-signal-h.c
+test_signal_h_OBJECTS = test-signal-h.$(OBJEXT)
+test_signal_h_LDADD = $(LDADD)
+test_signal_h_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
+am__test_signal_h_c___SOURCES_DIST = test-signal-h-c++.cc \
+ test-signal-h-c++2.cc
+@ANSICXX_TRUE@am_test_signal_h_c___OBJECTS = \
+@ANSICXX_TRUE@ test-signal-h-c++.$(OBJEXT) \
+@ANSICXX_TRUE@ test-signal-h-c++2.$(OBJEXT)
+test_signal_h_c___OBJECTS = $(am_test_signal_h_c___OBJECTS)
+@ANSICXX_TRUE@test_signal_h_c___DEPENDENCIES = $(am__DEPENDENCIES_2) \
@ANSICXX_TRUE@ $(am__DEPENDENCIES_1)
test_signbit_SOURCES = test-signbit.c
test_signbit_OBJECTS = test-signbit.$(OBJEXT)
test_signbit_LDADD = $(LDADD)
test_signbit_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
$(am__DEPENDENCIES_1)
+test_sigpipe_SOURCES = test-sigpipe.c
+test_sigpipe_OBJECTS = test-sigpipe.$(OBJEXT)
+test_sigpipe_LDADD = $(LDADD)
+test_sigpipe_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_sigprocmask_SOURCES = test-sigprocmask.c
+test_sigprocmask_OBJECTS = test-sigprocmask.$(OBJEXT)
+test_sigprocmask_LDADD = $(LDADD)
+test_sigprocmask_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
+test_sleep_SOURCES = test-sleep.c
+test_sleep_OBJECTS = test-sleep.$(OBJEXT)
+test_sleep_LDADD = $(LDADD)
+test_sleep_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_snprintf_SOURCES = test-snprintf.c
test_snprintf_OBJECTS = test-snprintf.$(OBJEXT)
test_snprintf_LDADD = $(LDADD)
@@ -756,14 +1008,15 @@ am__test_spawn_c___SOURCES_DIST = test-spawn-c++.cc
test_spawn_c___OBJECTS = $(am_test_spawn_c___OBJECTS)
@ANSICXX_TRUE@test_spawn_c___DEPENDENCIES = $(am__DEPENDENCIES_2) \
@ANSICXX_TRUE@ $(am__DEPENDENCIES_1)
-test_spawn_pipe_SOURCES = test-spawn-pipe.c
-test_spawn_pipe_OBJECTS = test-spawn-pipe.$(OBJEXT)
-test_spawn_pipe_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_spawn_pipe_child_SOURCES = test-spawn-pipe-child.c
+test_spawn_pipe_child_OBJECTS = test-spawn-pipe-child.$(OBJEXT)
+test_spawn_pipe_child_DEPENDENCIES =
+test_spawn_pipe_main_SOURCES = test-spawn-pipe-main.c
+test_spawn_pipe_main_OBJECTS = test-spawn-pipe-main.$(OBJEXT)
+test_spawn_pipe_main_DEPENDENCIES = $(am__DEPENDENCIES_2)
test_stat_SOURCES = test-stat.c
test_stat_OBJECTS = test-stat.$(OBJEXT)
-test_stat_LDADD = $(LDADD)
-test_stat_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
- $(am__DEPENDENCIES_1)
+test_stat_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
test_stdbool_SOURCES = test-stdbool.c
test_stdbool_OBJECTS = test-stdbool.$(OBJEXT)
test_stdbool_LDADD = $(LDADD)
@@ -870,6 +1123,18 @@ am__test_sys_time_c___SOURCES_DIST = test-sys_time-c++.cc
test_sys_time_c___OBJECTS = $(am_test_sys_time_c___OBJECTS)
@ANSICXX_TRUE@test_sys_time_c___DEPENDENCIES = $(am__DEPENDENCIES_2) \
@ANSICXX_TRUE@ $(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 ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
+am__test_sys_types_c___SOURCES_DIST = test-sys_types-c++.cc
+@ANSICXX_TRUE@am_test_sys_types_c___OBJECTS = \
+@ANSICXX_TRUE@ test-sys_types-c++.$(OBJEXT)
+test_sys_types_c___OBJECTS = $(am_test_sys_types_c___OBJECTS)
+test_sys_types_c___LDADD = $(LDADD)
+test_sys_types_c___DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_sys_wait_SOURCES = test-sys_wait.c
test_sys_wait_OBJECTS = test-sys_wait.$(OBJEXT)
test_sys_wait_LDADD = $(LDADD)
@@ -962,123 +1227,162 @@ am__test_wctype_h_c___SOURCES_DIST = test-wctype-h-c++.cc
test_wctype_h_c___OBJECTS = $(am_test_wctype_h_c___OBJECTS)
@ANSICXX_TRUE@test_wctype_h_c___DEPENDENCIES = $(am__DEPENDENCIES_2) \
@ANSICXX_TRUE@ $(am__DEPENDENCIES_1)
+test_write_SOURCES = test-write.c
+test_write_OBJECTS = test-write.$(OBJEXT)
+test_write_LDADD = $(LDADD)
+test_write_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_xalloc_die_SOURCES = test-xalloc-die.c
test_xalloc_die_OBJECTS = test-xalloc-die.$(OBJEXT)
test_xalloc_die_DEPENDENCIES = $(am__DEPENDENCIES_2)
test_xvasprintf_SOURCES = test-xvasprintf.c
test_xvasprintf_OBJECTS = test-xvasprintf.$(OBJEXT)
test_xvasprintf_DEPENDENCIES = $(am__DEPENDENCIES_2)
+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)/lib
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_$(V))
-am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
-am__v_CC_0 = @echo " CC " $@;
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_$(V))
-am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
-am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_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 =
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-AM_V_CXX = $(am__v_CXX_$(V))
-am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
-am__v_CXX_0 = @echo " CXX " $@;
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo " CXX " $@;
+am__v_CXX_1 =
CXXLD = $(CXX)
CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
-o $@
-AM_V_CXXLD = $(am__v_CXXLD_$(V))
-am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
-am__v_CXXLD_0 = @echo " CXXLD " $@;
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
-am__v_GEN_0 = @echo " GEN " $@;
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+am__v_CXXLD_1 =
SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \
test-alloca-opt.c test-array_list.c test-array_oset.c \
test-avltree_oset.c test-binary-io.c test-btowc.c \
test-c-ctype.c test-c-stack.c test-c-strcasecmp.c \
- test-c-strncasecmp.c test-canonicalize-lgpl.c test-cloexec.c \
- test-closein.c test-dirname.c test-dup-safer.c test-dup2.c \
- test-environ.c test-errno.c test-fcntl.c test-fcntl-h.c \
- $(test_fcntl_h_c___SOURCES) test-fflush.c test-fflush2.c \
- test-filenamecat.c test-fopen.c test-fopen-safer.c \
- test-fpending.c test-fpurge.c test-freadahead.c \
- test-freading.c $(test_frexp_nolibm_SOURCES) \
- $(test_frexpl_nolibm_SOURCES) test-fseeko.c test-ftell.c \
- test-ftell3.c test-ftello.c test-ftello3.c \
+ test-c-strncasecmp.c test-canonicalize-lgpl.c test-chdir.c \
+ test-cloexec.c test-close.c test-closein.c test-dirent.c \
+ $(test_dirent_c___SOURCES) test-dirname.c test-dup.c \
+ test-dup-safer.c test-dup2.c test-environ.c test-errno.c \
+ test-fclose.c test-fcntl.c test-fcntl-h.c \
+ $(test_fcntl_h_c___SOURCES) test-fdopen.c test-fflush.c \
+ test-fflush2.c test-fgetc.c test-filenamecat.c test-float.c \
+ test-fopen.c test-fopen-safer.c test-fpending.c test-fpurge.c \
+ test-fputc.c test-fread.c test-freadahead.c test-freading.c \
+ $(test_frexp_nolibm_SOURCES) $(test_frexpl_nolibm_SOURCES) \
+ test-fseek.c test-fseeko.c test-fseeko3.c test-fseeko4.c \
+ test-fstat.c test-ftell.c test-ftell3.c test-ftello.c \
+ test-ftello3.c test-ftello4.c test-fwrite.c test-getcwd-lgpl.c \
test-getdtablesize.c test-getopt.c test-gettimeofday.c \
- test-ignore-value.c test-isnand-nolibm.c test-isnanf-nolibm.c \
- test-isnanl-nolibm.c test-langinfo.c \
- $(test_langinfo_c___SOURCES) test-link.c \
+ test-ignore-value.c test-intprops.c test-inttypes.c \
+ test-isnand-nolibm.c test-isnanf-nolibm.c test-isnanl-nolibm.c \
+ test-langinfo.c $(test_langinfo_c___SOURCES) test-link.c \
test-linkedhash_list.c test-locale.c \
- $(test_locale_c___SOURCES) test-localename.c test-lseek.c \
- test-lstat.c test-malloc-gnu.c test-malloca.c test-math.c \
- $(test_math_c___SOURCES) test-mbrtowc.c test-mbrtowc-w32.c \
- test-mbsinit.c test-memchr.c test-memchr2.c test-nl_langinfo.c \
- test-open.c test-pipe2.c test-posix_spawn1.c \
- test-posix_spawn2.c test-printf-frexp.c test-printf-frexpl.c \
- test-quotearg-simple.c test-rawmemchr.c test-readlink.c \
- test-rename.c test-rmdir.c test-sched.c test-setenv.c \
- test-setlocale1.c test-setlocale2.c test-sigaction.c \
- test-signal.c $(test_signal_c___SOURCES) test-signbit.c \
- test-snprintf.c test-spawn.c $(test_spawn_c___SOURCES) \
- test-spawn-pipe.c test-stat.c test-stdbool.c test-stddef.c \
- test-stdint.c test-stdio.c $(test_stdio_c___SOURCES) \
- test-stdlib.c $(test_stdlib_c___SOURCES) test-strchrnul.c \
- test-strerror.c test-string.c $(test_string_c___SOURCES) \
- test-strnlen.c test-strsignal.c test-strstr.c test-strtod.c \
- test-symlink.c test-sys_stat.c $(test_sys_stat_c___SOURCES) \
- test-sys_time.c $(test_sys_time_c___SOURCES) test-sys_wait.c \
+ $(test_locale_c___SOURCES) test-localeconv.c test-localename.c \
+ test-lseek.c test-lstat.c test-malloc-gnu.c test-malloca.c \
+ test-math.c $(test_math_c___SOURCES) test-mbrtowc.c \
+ test-mbrtowc-w32.c test-mbsinit.c test-memchr.c test-memchr2.c \
+ test-nl_langinfo.c test-open.c test-pathmax.c test-pipe2.c \
+ test-posix_spawn1.c test-posix_spawn2.c \
+ test-posix_spawn_file_actions_addclose.c \
+ test-posix_spawn_file_actions_adddup2.c \
+ test-posix_spawn_file_actions_addopen.c test-printf-frexp.c \
+ test-printf-frexpl.c test-quotearg-simple.c test-raise.c \
+ test-rawmemchr.c test-readlink.c test-regex.c test-rename.c \
+ test-rmdir.c test-sched.c test-setenv.c test-setlocale1.c \
+ test-setlocale2.c test-sigaction.c test-signal-h.c \
+ $(test_signal_h_c___SOURCES) test-signbit.c test-sigpipe.c \
+ test-sigprocmask.c test-sleep.c test-snprintf.c test-spawn.c \
+ $(test_spawn_c___SOURCES) test-spawn-pipe-child.c \
+ test-spawn-pipe-main.c test-stat.c test-stdbool.c \
+ test-stddef.c test-stdint.c test-stdio.c \
+ $(test_stdio_c___SOURCES) test-stdlib.c \
+ $(test_stdlib_c___SOURCES) test-strchrnul.c test-strerror.c \
+ test-string.c $(test_string_c___SOURCES) test-strnlen.c \
+ test-strsignal.c test-strstr.c test-strtod.c test-symlink.c \
+ test-sys_stat.c $(test_sys_stat_c___SOURCES) test-sys_time.c \
+ $(test_sys_time_c___SOURCES) test-sys_types.c \
+ $(test_sys_types_c___SOURCES) test-sys_wait.c \
$(test_sys_wait_c___SOURCES) test-time.c \
$(test_time_c___SOURCES) test-unistd.c \
$(test_unistd_c___SOURCES) test-unsetenv.c test-vasnprintf.c \
test-vasprintf.c test-vasprintf-posix.c test-verify.c \
test-version-etc.c test-wchar.c $(test_wchar_c___SOURCES) \
test-wcrtomb.c test-wcrtomb-w32.c test-wctype-h.c \
- $(test_wctype_h_c___SOURCES) test-xalloc-die.c \
+ $(test_wctype_h_c___SOURCES) test-write.c test-xalloc-die.c \
test-xvasprintf.c
DIST_SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \
test-alloca-opt.c test-array_list.c test-array_oset.c \
test-avltree_oset.c test-binary-io.c test-btowc.c \
test-c-ctype.c test-c-stack.c test-c-strcasecmp.c \
- test-c-strncasecmp.c test-canonicalize-lgpl.c test-cloexec.c \
- test-closein.c test-dirname.c test-dup-safer.c test-dup2.c \
- test-environ.c test-errno.c test-fcntl.c test-fcntl-h.c \
- $(am__test_fcntl_h_c___SOURCES_DIST) test-fflush.c \
- test-fflush2.c test-filenamecat.c test-fopen.c \
- test-fopen-safer.c test-fpending.c test-fpurge.c \
- test-freadahead.c test-freading.c $(test_frexp_nolibm_SOURCES) \
- $(test_frexpl_nolibm_SOURCES) test-fseeko.c test-ftell.c \
- test-ftell3.c test-ftello.c test-ftello3.c \
- test-getdtablesize.c test-getopt.c test-gettimeofday.c \
- test-ignore-value.c test-isnand-nolibm.c test-isnanf-nolibm.c \
- test-isnanl-nolibm.c test-langinfo.c \
+ test-c-strncasecmp.c test-canonicalize-lgpl.c test-chdir.c \
+ test-cloexec.c test-close.c test-closein.c test-dirent.c \
+ $(am__test_dirent_c___SOURCES_DIST) test-dirname.c test-dup.c \
+ test-dup-safer.c test-dup2.c test-environ.c test-errno.c \
+ test-fclose.c test-fcntl.c test-fcntl-h.c \
+ $(am__test_fcntl_h_c___SOURCES_DIST) test-fdopen.c \
+ test-fflush.c test-fflush2.c test-fgetc.c test-filenamecat.c \
+ test-float.c test-fopen.c test-fopen-safer.c test-fpending.c \
+ test-fpurge.c test-fputc.c test-fread.c test-freadahead.c \
+ test-freading.c $(test_frexp_nolibm_SOURCES) \
+ $(test_frexpl_nolibm_SOURCES) test-fseek.c test-fseeko.c \
+ test-fseeko3.c test-fseeko4.c test-fstat.c test-ftell.c \
+ test-ftell3.c test-ftello.c test-ftello3.c test-ftello4.c \
+ test-fwrite.c test-getcwd-lgpl.c test-getdtablesize.c \
+ test-getopt.c test-gettimeofday.c test-ignore-value.c \
+ test-intprops.c test-inttypes.c test-isnand-nolibm.c \
+ test-isnanf-nolibm.c test-isnanl-nolibm.c test-langinfo.c \
$(am__test_langinfo_c___SOURCES_DIST) test-link.c \
test-linkedhash_list.c test-locale.c \
- $(am__test_locale_c___SOURCES_DIST) test-localename.c \
- test-lseek.c test-lstat.c test-malloc-gnu.c test-malloca.c \
- test-math.c $(am__test_math_c___SOURCES_DIST) test-mbrtowc.c \
- test-mbrtowc-w32.c test-mbsinit.c test-memchr.c test-memchr2.c \
- test-nl_langinfo.c test-open.c test-pipe2.c \
- test-posix_spawn1.c test-posix_spawn2.c test-printf-frexp.c \
- test-printf-frexpl.c test-quotearg-simple.c test-rawmemchr.c \
- test-readlink.c test-rename.c test-rmdir.c test-sched.c \
- test-setenv.c test-setlocale1.c test-setlocale2.c \
- test-sigaction.c test-signal.c \
- $(am__test_signal_c___SOURCES_DIST) test-signbit.c \
- test-snprintf.c test-spawn.c \
- $(am__test_spawn_c___SOURCES_DIST) test-spawn-pipe.c \
- test-stat.c test-stdbool.c test-stddef.c test-stdint.c \
- test-stdio.c $(am__test_stdio_c___SOURCES_DIST) test-stdlib.c \
+ $(am__test_locale_c___SOURCES_DIST) test-localeconv.c \
+ test-localename.c test-lseek.c test-lstat.c test-malloc-gnu.c \
+ test-malloca.c test-math.c $(am__test_math_c___SOURCES_DIST) \
+ test-mbrtowc.c test-mbrtowc-w32.c test-mbsinit.c test-memchr.c \
+ test-memchr2.c test-nl_langinfo.c test-open.c test-pathmax.c \
+ test-pipe2.c test-posix_spawn1.c test-posix_spawn2.c \
+ test-posix_spawn_file_actions_addclose.c \
+ test-posix_spawn_file_actions_adddup2.c \
+ test-posix_spawn_file_actions_addopen.c test-printf-frexp.c \
+ test-printf-frexpl.c test-quotearg-simple.c test-raise.c \
+ test-rawmemchr.c test-readlink.c test-regex.c test-rename.c \
+ test-rmdir.c test-sched.c test-setenv.c test-setlocale1.c \
+ test-setlocale2.c test-sigaction.c test-signal-h.c \
+ $(am__test_signal_h_c___SOURCES_DIST) test-signbit.c \
+ test-sigpipe.c test-sigprocmask.c test-sleep.c test-snprintf.c \
+ test-spawn.c $(am__test_spawn_c___SOURCES_DIST) \
+ test-spawn-pipe-child.c test-spawn-pipe-main.c test-stat.c \
+ test-stdbool.c test-stddef.c test-stdint.c test-stdio.c \
+ $(am__test_stdio_c___SOURCES_DIST) test-stdlib.c \
$(am__test_stdlib_c___SOURCES_DIST) test-strchrnul.c \
test-strerror.c test-string.c \
$(am__test_string_c___SOURCES_DIST) test-strnlen.c \
test-strsignal.c test-strstr.c test-strtod.c test-symlink.c \
test-sys_stat.c $(am__test_sys_stat_c___SOURCES_DIST) \
test-sys_time.c $(am__test_sys_time_c___SOURCES_DIST) \
+ test-sys_types.c $(am__test_sys_types_c___SOURCES_DIST) \
test-sys_wait.c $(am__test_sys_wait_c___SOURCES_DIST) \
test-time.c $(am__test_time_c___SOURCES_DIST) test-unistd.c \
$(am__test_unistd_c___SOURCES_DIST) test-unsetenv.c \
@@ -1086,37 +1390,70 @@ DIST_SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \
test-verify.c test-version-etc.c test-wchar.c \
$(am__test_wchar_c___SOURCES_DIST) test-wcrtomb.c \
test-wcrtomb-w32.c test-wctype-h.c \
- $(am__test_wctype_h_c___SOURCES_DIST) test-xalloc-die.c \
- test-xvasprintf.c
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-dvi-recursive install-exec-recursive \
- install-html-recursive install-info-recursive \
- install-pdf-recursive install-ps-recursive install-recursive \
- installcheck-recursive installdirs-recursive pdf-recursive \
- ps-recursive uninstall-recursive
+ $(am__test_wctype_h_c___SOURCES_DIST) test-write.c \
+ test-xalloc-die.c test-xvasprintf.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=) \
- $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
- check check-html recheck recheck-html distdir
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ check recheck distdir
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
-# If stdout is a non-dumb tty, use colors. If test -t is not supported,
-# then this fails; a conservative approach. Of course do not redirect
-# stdout here, just stderr.
-am__tty_colors = \
-red=; grn=; lgn=; blu=; std=; \
-test "X$(AM_COLOR_TESTS)" != Xno \
-&& test "X$$TERM" != Xdumb \
-&& { test "X$(AM_COLOR_TESTS)" = Xalways || test -t 1 2>/dev/null; } \
-&& { \
- red=''; \
- grn=''; \
- lgn=''; \
- blu=''; \
- std=''; \
+am__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+am__tty_colors = { \
+ $(am__tty_colors_dummy); \
+ if test "X$(AM_COLOR_TESTS)" = Xno; then \
+ am__color_tests=no; \
+ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+ am__color_tests=yes; \
+ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+ am__color_tests=yes; \
+ fi; \
+ if test $$am__color_tests = yes; then \
+ red=''; \
+ grn=''; \
+ lgn=''; \
+ blu=''; \
+ mgn=''; \
+ brg=''; \
+ std=''; \
+ fi; \
}
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
@@ -1139,54 +1476,166 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-# Restructured Text title and section.
-am__rst_title = sed 's/.*/ & /;h;s/./=/g;p;x;p;g;p;s/.*//'
-am__rst_section = sed 'p;s/./=/g;p;g'
-# Put stdin (possibly several lines separated by ". ") in a box.
-am__text_box = $(AWK) '{ \
- n = split($$0, lines, "\\. "); max = 0; \
- for (i = 1; i <= n; ++i) \
- if (max < length(lines[i])) \
- max = length(lines[i]); \
- for (i = 0; i < max; ++i) line = line "="; \
- print line; \
- for (i = 1; i <= n; ++i) if (lines[i]) print lines[i];\
- print line; \
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__recheck_rx = ^[ ]*:recheck:[ ]*
+am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
+am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+ recheck = 1; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ { \
+ if ((getline line2 < ($$0 ".log")) < 0) \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+ { \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+ { \
+ break; \
+ } \
+ }; \
+ if (recheck) \
+ print $$0; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+ print "fatal: making $@: " msg | "cat >&2"; \
+ exit 1; \
+} \
+function rst_section(header) \
+{ \
+ print header; \
+ len = length(header); \
+ for (i = 1; i <= len; i = i + 1) \
+ printf "="; \
+ printf "\n\n"; \
+} \
+{ \
+ copy_in_global_log = 1; \
+ global_test_result = "RUN"; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".trs"); \
+ if (line ~ /$(am__global_test_result_rx)/) \
+ { \
+ sub("$(am__global_test_result_rx)", "", line); \
+ sub("[ ]*$$", "", line); \
+ global_test_result = line; \
+ } \
+ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+ copy_in_global_log = 0; \
+ }; \
+ if (copy_in_global_log) \
+ { \
+ rst_section(global_test_result ": " $$0); \
+ while ((rc = (getline line < ($$0 ".log"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".log"); \
+ print line; \
+ }; \
+ printf "\n"; \
+ }; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
# Solaris 10 'make', and several other traditional 'make' implementations,
-# pass "-e" to $(SHELL). This contradicts POSIX. Work around the problem
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
# by disabling -e (using the XSI extension "set +e") if it's set.
am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+ --color-tests "$$am__color_tests" \
+ --enable-hard-errors "$$am__enable_hard_errors" \
+ --expect-failure "$$am__expect_failure"
# To be inserted before the command running the test. Creates the
# directory for the log if needed. Stores in $dir the directory
-# containing $f, in $tst the test, in $log the log, and passes
-# TESTS_ENVIRONMENT. Save and restore TERM around use of
-# TESTS_ENVIRONMENT, in case that unsets it.
+# containing $f, in $tst the test, in $log the log. Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
am__check_pre = \
$(am__sh_e_setup); \
$(am__vpath_adj_setup) $(am__vpath_adj) \
+$(am__tty_colors); \
srcdir=$(srcdir); export srcdir; \
-rm -f $@-t; \
-trap 'st=$$?; rm -f '\''$(abs_builddir)/$@-t'\''; (exit $$st); exit $$st' \
- 1 2 13 15; \
-am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`; \
-test "x$$am__odir" = x. || $(MKDIR_P) "$$am__odir" || exit $$?; \
+case "$@" in \
+ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
+ *) am__odir=.;; \
+esac; \
+test "x$$am__odir" = x"." || test -d "$$am__odir" \
+ || $(MKDIR_P) "$$am__odir" || exit $$?; \
if test -f "./$$f"; then dir=./; \
elif test -f "$$f"; then dir=; \
else dir="$(srcdir)/"; fi; \
-tst=$$dir$$f; log='$@'; __SAVED_TERM=$$TERM; \
-$(TESTS_ENVIRONMENT)
+tst=$$dir$$f; log='$@'; \
+if test -n '$(DISABLE_HARD_ERRORS)'; then \
+ am__enable_hard_errors=no; \
+else \
+ am__enable_hard_errors=yes; \
+fi; \
+case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
+ am__expect_failure=yes;; \
+ *) \
+ am__expect_failure=no;; \
+esac; \
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed). The result is saved in the shell variable
+# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+ bases='$(TEST_LOGS)'; \
+ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+ bases=`echo $$bases`
RECHECK_LOGS = $(TEST_LOGS)
TEST_SUITE_LOG = test-suite.log
-TEST_SUITE_HTML = $(TEST_SUITE_LOG:.log=.html)
TEST_EXTENSIONS = @EXEEXT@ .test
+LOG_DRIVER = $(SHELL) $(top_srcdir)/build-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-aux/test-driver
TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
$(TEST_LOG_FLAGS)
-TEST_LOGS_TMP = $(TEST_LOGS:.log=.log-t)
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
@@ -1221,6 +1670,9 @@ ALLOCA_H = @ALLOCA_H@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+AR = @AR@
+ARFLAGS = @ARFLAGS@
+ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -1258,47 +1710,90 @@ EXEEXT = @EXEEXT@
FLOAT_H = @FLOAT_H@
GETOPT_H = @GETOPT_H@
GLIBC21 = @GLIBC21@
+GNULIB_ACOSF = @GNULIB_ACOSF@
GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
+GNULIB_ASINF = @GNULIB_ASINF@
GNULIB_ASINL = @GNULIB_ASINL@
+GNULIB_ATAN2F = @GNULIB_ATAN2F@
+GNULIB_ATANF = @GNULIB_ATANF@
GNULIB_ATANL = @GNULIB_ATANL@
GNULIB_ATOLL = @GNULIB_ATOLL@
GNULIB_BTOWC = @GNULIB_BTOWC@
GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CBRT = @GNULIB_CBRT@
+GNULIB_CBRTF = @GNULIB_CBRTF@
+GNULIB_CBRTL = @GNULIB_CBRTL@
GNULIB_CEIL = @GNULIB_CEIL@
GNULIB_CEILF = @GNULIB_CEILF@
GNULIB_CEILL = @GNULIB_CEILL@
+GNULIB_CHDIR = @GNULIB_CHDIR@
GNULIB_CHOWN = @GNULIB_CHOWN@
GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@
+GNULIB_COPYSIGN = @GNULIB_COPYSIGN@
+GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@
+GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@
+GNULIB_COSF = @GNULIB_COSF@
+GNULIB_COSHF = @GNULIB_COSHF@
GNULIB_COSL = @GNULIB_COSL@
+GNULIB_DIRFD = @GNULIB_DIRFD@
GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP = @GNULIB_DUP@
GNULIB_DUP2 = @GNULIB_DUP2@
GNULIB_DUP3 = @GNULIB_DUP3@
GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
GNULIB_ENVIRON = @GNULIB_ENVIRON@
GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXP2 = @GNULIB_EXP2@
+GNULIB_EXP2F = @GNULIB_EXP2F@
+GNULIB_EXP2L = @GNULIB_EXP2L@
+GNULIB_EXPF = @GNULIB_EXPF@
GNULIB_EXPL = @GNULIB_EXPL@
+GNULIB_EXPM1 = @GNULIB_EXPM1@
+GNULIB_EXPM1F = @GNULIB_EXPM1F@
+GNULIB_EXPM1L = @GNULIB_EXPM1L@
+GNULIB_FABSF = @GNULIB_FABSF@
+GNULIB_FABSL = @GNULIB_FABSL@
GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
GNULIB_FCHDIR = @GNULIB_FCHDIR@
GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
GNULIB_FCLOSE = @GNULIB_FCLOSE@
GNULIB_FCNTL = @GNULIB_FCNTL@
+GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
+GNULIB_FDOPEN = @GNULIB_FDOPEN@
+GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@
GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FFSL = @GNULIB_FFSL@
+GNULIB_FFSLL = @GNULIB_FFSLL@
+GNULIB_FGETC = @GNULIB_FGETC@
+GNULIB_FGETS = @GNULIB_FGETS@
GNULIB_FLOOR = @GNULIB_FLOOR@
GNULIB_FLOORF = @GNULIB_FLOORF@
GNULIB_FLOORL = @GNULIB_FLOORL@
+GNULIB_FMA = @GNULIB_FMA@
+GNULIB_FMAF = @GNULIB_FMAF@
+GNULIB_FMAL = @GNULIB_FMAL@
+GNULIB_FMOD = @GNULIB_FMOD@
+GNULIB_FMODF = @GNULIB_FMODF@
+GNULIB_FMODL = @GNULIB_FMODL@
GNULIB_FOPEN = @GNULIB_FOPEN@
GNULIB_FPRINTF = @GNULIB_FPRINTF@
GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
GNULIB_FPURGE = @GNULIB_FPURGE@
GNULIB_FPUTC = @GNULIB_FPUTC@
GNULIB_FPUTS = @GNULIB_FPUTS@
+GNULIB_FREAD = @GNULIB_FREAD@
GNULIB_FREOPEN = @GNULIB_FREOPEN@
GNULIB_FREXP = @GNULIB_FREXP@
+GNULIB_FREXPF = @GNULIB_FREXPF@
GNULIB_FREXPL = @GNULIB_FREXPL@
+GNULIB_FSCANF = @GNULIB_FSCANF@
GNULIB_FSEEK = @GNULIB_FSEEK@
GNULIB_FSEEKO = @GNULIB_FSEEKO@
+GNULIB_FSTAT = @GNULIB_FSTAT@
GNULIB_FSTATAT = @GNULIB_FSTATAT@
GNULIB_FSYNC = @GNULIB_FSYNC@
GNULIB_FTELL = @GNULIB_FTELL@
@@ -1306,6 +1801,8 @@ GNULIB_FTELLO = @GNULIB_FTELLO@
GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
GNULIB_FWRITE = @GNULIB_FWRITE@
+GNULIB_GETC = @GNULIB_GETC@
+GNULIB_GETCHAR = @GNULIB_GETCHAR@
GNULIB_GETCWD = @GNULIB_GETCWD@
GNULIB_GETDELIM = @GNULIB_GETDELIM@
GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
@@ -1320,7 +1817,18 @@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_GL_M4_UNISTD_H_GETOPT = @GNULIB_GL_M4_UNISTD_H_GETOPT@
GNULIB_GRANTPT = @GNULIB_GRANTPT@
+GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
+GNULIB_HYPOT = @GNULIB_HYPOT@
+GNULIB_HYPOTF = @GNULIB_HYPOTF@
+GNULIB_HYPOTL = @GNULIB_HYPOTL@
+GNULIB_ILOGB = @GNULIB_ILOGB@
+GNULIB_ILOGBF = @GNULIB_ILOGBF@
+GNULIB_ILOGBL = @GNULIB_ILOGBL@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+GNULIB_ISATTY = @GNULIB_ISATTY@
GNULIB_ISFINITE = @GNULIB_ISFINITE@
GNULIB_ISINF = @GNULIB_ISINF@
GNULIB_ISNAN = @GNULIB_ISNAN@
@@ -1331,10 +1839,25 @@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
GNULIB_LCHMOD = @GNULIB_LCHMOD@
GNULIB_LCHOWN = @GNULIB_LCHOWN@
+GNULIB_LDEXPF = @GNULIB_LDEXPF@
GNULIB_LDEXPL = @GNULIB_LDEXPL@
GNULIB_LINK = @GNULIB_LINK@
GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
+GNULIB_LOG = @GNULIB_LOG@
+GNULIB_LOG10 = @GNULIB_LOG10@
+GNULIB_LOG10F = @GNULIB_LOG10F@
+GNULIB_LOG10L = @GNULIB_LOG10L@
+GNULIB_LOG1P = @GNULIB_LOG1P@
+GNULIB_LOG1PF = @GNULIB_LOG1PF@
+GNULIB_LOG1PL = @GNULIB_LOG1PL@
+GNULIB_LOG2 = @GNULIB_LOG2@
+GNULIB_LOG2F = @GNULIB_LOG2F@
+GNULIB_LOG2L = @GNULIB_LOG2L@
GNULIB_LOGB = @GNULIB_LOGB@
+GNULIB_LOGBF = @GNULIB_LOGBF@
+GNULIB_LOGBL = @GNULIB_LOGBL@
+GNULIB_LOGF = @GNULIB_LOGF@
GNULIB_LOGL = @GNULIB_LOGL@
GNULIB_LSEEK = @GNULIB_LSEEK@
GNULIB_LSTAT = @GNULIB_LSTAT@
@@ -1374,16 +1897,23 @@ GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
GNULIB_MKTIME = @GNULIB_MKTIME@
+GNULIB_MODF = @GNULIB_MODF@
+GNULIB_MODFF = @GNULIB_MODFF@
+GNULIB_MODFL = @GNULIB_MODFL@
GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@
GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
GNULIB_OPEN = @GNULIB_OPEN@
GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_OPENDIR = @GNULIB_OPENDIR@
+GNULIB_PCLOSE = @GNULIB_PCLOSE@
GNULIB_PERROR = @GNULIB_PERROR@
GNULIB_PIPE = @GNULIB_PIPE@
GNULIB_PIPE2 = @GNULIB_PIPE2@
GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
GNULIB_POSIX_SPAWN = @GNULIB_POSIX_SPAWN@
GNULIB_POSIX_SPAWNATTR_DESTROY = @GNULIB_POSIX_SPAWNATTR_DESTROY@
GNULIB_POSIX_SPAWNATTR_GETFLAGS = @GNULIB_POSIX_SPAWNATTR_GETFLAGS@
@@ -1405,41 +1935,63 @@ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDU
GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY@
GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT@
+GNULIB_POWF = @GNULIB_POWF@
GNULIB_PREAD = @GNULIB_PREAD@
GNULIB_PRINTF = @GNULIB_PRINTF@
GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@
GNULIB_PTSNAME = @GNULIB_PTSNAME@
+GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
GNULIB_PUTC = @GNULIB_PUTC@
GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
GNULIB_PUTENV = @GNULIB_PUTENV@
GNULIB_PUTS = @GNULIB_PUTS@
GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_RAISE = @GNULIB_RAISE@
+GNULIB_RANDOM = @GNULIB_RANDOM@
GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READ = @GNULIB_READ@
+GNULIB_READDIR = @GNULIB_READDIR@
GNULIB_READLINK = @GNULIB_READLINK@
GNULIB_READLINKAT = @GNULIB_READLINKAT@
GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMAINDER = @GNULIB_REMAINDER@
+GNULIB_REMAINDERF = @GNULIB_REMAINDERF@
+GNULIB_REMAINDERL = @GNULIB_REMAINDERL@
GNULIB_REMOVE = @GNULIB_REMOVE@
GNULIB_RENAME = @GNULIB_RENAME@
GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+GNULIB_REWINDDIR = @GNULIB_REWINDDIR@
+GNULIB_RINT = @GNULIB_RINT@
+GNULIB_RINTF = @GNULIB_RINTF@
+GNULIB_RINTL = @GNULIB_RINTL@
GNULIB_RMDIR = @GNULIB_RMDIR@
GNULIB_ROUND = @GNULIB_ROUND@
GNULIB_ROUNDF = @GNULIB_ROUNDF@
GNULIB_ROUNDL = @GNULIB_ROUNDL@
GNULIB_RPMATCH = @GNULIB_RPMATCH@
+GNULIB_SCANDIR = @GNULIB_SCANDIR@
+GNULIB_SCANF = @GNULIB_SCANF@
+GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@
GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
GNULIB_SIGACTION = @GNULIB_SIGACTION@
GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
+GNULIB_SINF = @GNULIB_SINF@
+GNULIB_SINHF = @GNULIB_SINHF@
GNULIB_SINL = @GNULIB_SINL@
GNULIB_SLEEP = @GNULIB_SLEEP@
GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_SQRTF = @GNULIB_SQRTF@
GNULIB_SQRTL = @GNULIB_SQRTL@
GNULIB_STAT = @GNULIB_STAT@
+GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@
GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
GNULIB_STPCPY = @GNULIB_STPCPY@
GNULIB_STPNCPY = @GNULIB_STPNCPY@
@@ -1457,13 +2009,17 @@ GNULIB_STRSEP = @GNULIB_STRSEP@
GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
GNULIB_STRSTR = @GNULIB_STRSTR@
GNULIB_STRTOD = @GNULIB_STRTOD@
+GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@
GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
GNULIB_STRTOLL = @GNULIB_STRTOLL@
GNULIB_STRTOULL = @GNULIB_STRTOULL@
+GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
GNULIB_SYMLINK = @GNULIB_SYMLINK@
GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
+GNULIB_TANF = @GNULIB_TANF@
+GNULIB_TANHF = @GNULIB_TANHF@
GNULIB_TANL = @GNULIB_TANL@
GNULIB_TIMEGM = @GNULIB_TIMEGM@
GNULIB_TIME_R = @GNULIB_TIME_R@
@@ -1473,7 +2029,7 @@ GNULIB_TRUNC = @GNULIB_TRUNC@
GNULIB_TRUNCF = @GNULIB_TRUNCF@
GNULIB_TRUNCL = @GNULIB_TRUNCL@
GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
-GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
GNULIB_UNLINK = @GNULIB_UNLINK@
GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
@@ -1485,8 +2041,10 @@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+GNULIB_VFSCANF = @GNULIB_VFSCANF@
GNULIB_VPRINTF = @GNULIB_VPRINTF@
GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+GNULIB_VSCANF = @GNULIB_VSCANF@
GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
GNULIB_WAITPID = @GNULIB_WAITPID@
@@ -1529,23 +2087,46 @@ GNULIB_WMEMSET = @GNULIB_WMEMSET@
GNULIB_WRITE = @GNULIB_WRITE@
GNULIB__EXIT = @GNULIB__EXIT@
GREP = @GREP@
+HAVE_ACOSF = @HAVE_ACOSF@
HAVE_ACOSL = @HAVE_ACOSL@
+HAVE_ALPHASORT = @HAVE_ALPHASORT@
+HAVE_ASINF = @HAVE_ASINF@
HAVE_ASINL = @HAVE_ASINL@
+HAVE_ATAN2F = @HAVE_ATAN2F@
+HAVE_ATANF = @HAVE_ATANF@
HAVE_ATANL = @HAVE_ATANL@
HAVE_ATOLL = @HAVE_ATOLL@
HAVE_BTOWC = @HAVE_BTOWC@
HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
+HAVE_CBRT = @HAVE_CBRT@
+HAVE_CBRTF = @HAVE_CBRTF@
+HAVE_CBRTL = @HAVE_CBRTL@
HAVE_CHOWN = @HAVE_CHOWN@
+HAVE_CLOSEDIR = @HAVE_CLOSEDIR@
+HAVE_COPYSIGN = @HAVE_COPYSIGN@
+HAVE_COPYSIGNL = @HAVE_COPYSIGNL@
+HAVE_COSF = @HAVE_COSF@
+HAVE_COSHF = @HAVE_COSHF@
HAVE_COSL = @HAVE_COSL@
HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
+HAVE_DECL_CBRTF = @HAVE_DECL_CBRTF@
+HAVE_DECL_CBRTL = @HAVE_DECL_CBRTL@
HAVE_DECL_CEILF = @HAVE_DECL_CEILF@
HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
+HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@
HAVE_DECL_COSL = @HAVE_DECL_COSL@
+HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@
+HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@
+HAVE_DECL_EXP2L = @HAVE_DECL_EXP2L@
HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
+HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@
HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
+HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@
HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@
HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@
HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
@@ -1559,17 +2140,27 @@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
+HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
+HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@
HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
+HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@
+HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@
+HAVE_DECL_LOG2F = @HAVE_DECL_LOG2F@
+HAVE_DECL_LOG2L = @HAVE_DECL_LOG2L@
HAVE_DECL_LOGB = @HAVE_DECL_LOGB@
HAVE_DECL_LOGL = @HAVE_DECL_LOGL@
HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
+HAVE_DECL_REMAINDER = @HAVE_DECL_REMAINDER@
+HAVE_DECL_REMAINDERL = @HAVE_DECL_REMAINDERL@
+HAVE_DECL_RINTF = @HAVE_DECL_RINTF@
HAVE_DECL_ROUND = @HAVE_DECL_ROUND@
HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@
HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@
HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
+HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
HAVE_DECL_SINL = @HAVE_DECL_SINL@
HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@
@@ -1578,7 +2169,9 @@ 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_TANL = @HAVE_DECL_TANL@
HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@
HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@
@@ -1588,18 +2181,34 @@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+HAVE_DIRENT_H = @HAVE_DIRENT_H@
HAVE_DPRINTF = @HAVE_DPRINTF@
HAVE_DUP2 = @HAVE_DUP2@
HAVE_DUP3 = @HAVE_DUP3@
HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXPF = @HAVE_EXPF@
HAVE_EXPL = @HAVE_EXPL@
+HAVE_EXPM1 = @HAVE_EXPM1@
+HAVE_EXPM1F = @HAVE_EXPM1F@
+HAVE_FABSF = @HAVE_FABSF@
+HAVE_FABSL = @HAVE_FABSL@
HAVE_FACCESSAT = @HAVE_FACCESSAT@
HAVE_FCHDIR = @HAVE_FCHDIR@
HAVE_FCHMODAT = @HAVE_FCHMODAT@
HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FDATASYNC = @HAVE_FDATASYNC@
+HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
HAVE_FEATURES_H = @HAVE_FEATURES_H@
+HAVE_FFSL = @HAVE_FFSL@
+HAVE_FFSLL = @HAVE_FFSLL@
+HAVE_FMA = @HAVE_FMA@
+HAVE_FMAF = @HAVE_FMAF@
+HAVE_FMAL = @HAVE_FMAL@
+HAVE_FMODF = @HAVE_FMODF@
+HAVE_FMODL = @HAVE_FMODL@
+HAVE_FREXPF = @HAVE_FREXPF@
HAVE_FSEEKO = @HAVE_FSEEKO@
HAVE_FSTATAT = @HAVE_FSTATAT@
HAVE_FSYNC = @HAVE_FSYNC@
@@ -1615,6 +2224,12 @@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
HAVE_GRANTPT = @HAVE_GRANTPT@
+HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
+HAVE_HYPOTF = @HAVE_HYPOTF@
+HAVE_HYPOTL = @HAVE_HYPOTL@
+HAVE_ILOGB = @HAVE_ILOGB@
+HAVE_ILOGBF = @HAVE_ILOGBF@
+HAVE_ILOGBL = @HAVE_ILOGBL@
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
HAVE_ISNAND = @HAVE_ISNAND@
HAVE_ISNANF = @HAVE_ISNANF@
@@ -1628,9 +2243,18 @@ HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@
HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@
HAVE_LCHMOD = @HAVE_LCHMOD@
HAVE_LCHOWN = @HAVE_LCHOWN@
+HAVE_LDEXPF = @HAVE_LDEXPF@
HAVE_LIBSIGSEGV = @HAVE_LIBSIGSEGV@
HAVE_LINK = @HAVE_LINK@
HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LOG10F = @HAVE_LOG10F@
+HAVE_LOG10L = @HAVE_LOG10L@
+HAVE_LOG1P = @HAVE_LOG1P@
+HAVE_LOG1PF = @HAVE_LOG1PF@
+HAVE_LOG1PL = @HAVE_LOG1PL@
+HAVE_LOGBF = @HAVE_LOGBF@
+HAVE_LOGBL = @HAVE_LOGBL@
+HAVE_LOGF = @HAVE_LOGF@
HAVE_LOGL = @HAVE_LOGL@
HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
HAVE_LSTAT = @HAVE_LSTAT@
@@ -1652,38 +2276,64 @@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
HAVE_MKSTEMP = @HAVE_MKSTEMP@
HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
+HAVE_MODFF = @HAVE_MODFF@
+HAVE_MODFL = @HAVE_MODFL@
+HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OPENDIR = @HAVE_OPENDIR@
HAVE_OS_H = @HAVE_OS_H@
+HAVE_PCLOSE = @HAVE_PCLOSE@
HAVE_PIPE = @HAVE_PIPE@
HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_POPEN = @HAVE_POPEN@
+HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
HAVE_POSIX_SPAWN = @HAVE_POSIX_SPAWN@
HAVE_POSIX_SPAWNATTR_T = @HAVE_POSIX_SPAWNATTR_T@
HAVE_POSIX_SPAWN_FILE_ACTIONS_T = @HAVE_POSIX_SPAWN_FILE_ACTIONS_T@
+HAVE_POWF = @HAVE_POWF@
HAVE_PREAD = @HAVE_PREAD@
+HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@
HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_RAISE = @HAVE_RAISE@
+HAVE_RANDOM = @HAVE_RANDOM@
HAVE_RANDOM_H = @HAVE_RANDOM_H@
HAVE_RANDOM_R = @HAVE_RANDOM_R@
HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READDIR = @HAVE_READDIR@
HAVE_READLINK = @HAVE_READLINK@
HAVE_READLINKAT = @HAVE_READLINKAT@
HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_REMAINDER = @HAVE_REMAINDER@
+HAVE_REMAINDERF = @HAVE_REMAINDERF@
HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_REWINDDIR = @HAVE_REWINDDIR@
+HAVE_RINT = @HAVE_RINT@
+HAVE_RINTL = @HAVE_RINTL@
HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@
+HAVE_SCANDIR = @HAVE_SCANDIR@
HAVE_SCHED_H = @HAVE_SCHED_H@
+HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
HAVE_SETENV = @HAVE_SETENV@
+HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
HAVE_SIGACTION = @HAVE_SIGACTION@
+HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@
HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
HAVE_SIGSET_T = @HAVE_SIGSET_T@
+HAVE_SINF = @HAVE_SINF@
+HAVE_SINHF = @HAVE_SINHF@
HAVE_SINL = @HAVE_SINL@
HAVE_SLEEP = @HAVE_SLEEP@
HAVE_SPAWN_H = @HAVE_SPAWN_H@
+HAVE_SQRTF = @HAVE_SQRTF@
HAVE_SQRTL = @HAVE_SQRTL@
HAVE_STDINT_H = @HAVE_STDINT_H@
HAVE_STPCPY = @HAVE_STPCPY@
@@ -1709,6 +2359,8 @@ 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_TANF = @HAVE_TANF@
+HAVE_TANHF = @HAVE_TANHF@
HAVE_TANL = @HAVE_TANL@
HAVE_TIMEGM = @HAVE_TIMEGM@
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
@@ -1751,6 +2403,7 @@ HAVE_WCSXFRM = @HAVE_WCSXFRM@
HAVE_WCTRANS_T = @HAVE_WCTRANS_T@
HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
HAVE_WCTYPE_T = @HAVE_WCTYPE_T@
+HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
HAVE_WINT_T = @HAVE_WINT_T@
HAVE_WMEMCHR = @HAVE_WMEMCHR@
HAVE_WMEMCMP = @HAVE_WMEMCMP@
@@ -1767,6 +2420,8 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@
+INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@
LIBCSTACK = @LIBCSTACK@
@@ -1802,10 +2457,12 @@ M4tests_LTLIBOBJS = @M4tests_LTLIBOBJS@
M4tests_WITNESS = @M4tests_WITNESS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
+NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@
NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
@@ -1820,15 +2477,18 @@ 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_DIRENT_H = @NEXT_DIRENT_H@
NEXT_ERRNO_H = @NEXT_ERRNO_H@
NEXT_FCNTL_H = @NEXT_FCNTL_H@
NEXT_FLOAT_H = @NEXT_FLOAT_H@
NEXT_GETOPT_H = @NEXT_GETOPT_H@
+NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
NEXT_LOCALE_H = @NEXT_LOCALE_H@
NEXT_MATH_H = @NEXT_MATH_H@
@@ -1843,6 +2503,7 @@ 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@
@@ -1859,33 +2520,53 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
+PRIPTR_PREFIX = @PRIPTR_PREFIX@
+PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
REPLACE_BTOWC = @REPLACE_BTOWC@
REPLACE_CALLOC = @REPLACE_CALLOC@
REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+REPLACE_CBRTF = @REPLACE_CBRTF@
+REPLACE_CBRTL = @REPLACE_CBRTL@
REPLACE_CEIL = @REPLACE_CEIL@
REPLACE_CEILF = @REPLACE_CEILF@
REPLACE_CEILL = @REPLACE_CEILL@
REPLACE_CHOWN = @REPLACE_CHOWN@
REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@
+REPLACE_DIRFD = @REPLACE_DIRFD@
REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUP2 = @REPLACE_DUP2@
REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_EXP2 = @REPLACE_EXP2@
+REPLACE_EXP2L = @REPLACE_EXP2L@
+REPLACE_EXPM1 = @REPLACE_EXPM1@
+REPLACE_EXPM1F = @REPLACE_EXPM1F@
+REPLACE_FABSL = @REPLACE_FABSL@
REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
REPLACE_FCLOSE = @REPLACE_FCLOSE@
REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDOPEN = @REPLACE_FDOPEN@
+REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
REPLACE_FFLUSH = @REPLACE_FFLUSH@
REPLACE_FLOOR = @REPLACE_FLOOR@
REPLACE_FLOORF = @REPLACE_FLOORF@
REPLACE_FLOORL = @REPLACE_FLOORL@
+REPLACE_FMA = @REPLACE_FMA@
+REPLACE_FMAF = @REPLACE_FMAF@
+REPLACE_FMAL = @REPLACE_FMAL@
+REPLACE_FMOD = @REPLACE_FMOD@
+REPLACE_FMODF = @REPLACE_FMODF@
+REPLACE_FMODL = @REPLACE_FMODL@
REPLACE_FOPEN = @REPLACE_FOPEN@
REPLACE_FPRINTF = @REPLACE_FPRINTF@
REPLACE_FPURGE = @REPLACE_FPURGE@
REPLACE_FREOPEN = @REPLACE_FREOPEN@
REPLACE_FREXP = @REPLACE_FREXP@
+REPLACE_FREXPF = @REPLACE_FREXPF@
REPLACE_FREXPL = @REPLACE_FREXPL@
REPLACE_FSEEK = @REPLACE_FSEEK@
REPLACE_FSEEKO = @REPLACE_FSEEKO@
@@ -1893,6 +2574,7 @@ REPLACE_FSTAT = @REPLACE_FSTAT@
REPLACE_FSTATAT = @REPLACE_FSTATAT@
REPLACE_FTELL = @REPLACE_FTELL@
REPLACE_FTELLO = @REPLACE_FTELLO@
+REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
REPLACE_FUTIMENS = @REPLACE_FUTIMENS@
REPLACE_GETCWD = @REPLACE_GETCWD@
REPLACE_GETDELIM = @REPLACE_GETDELIM@
@@ -1903,16 +2585,39 @@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
+REPLACE_HYPOT = @REPLACE_HYPOT@
+REPLACE_HYPOTF = @REPLACE_HYPOTF@
+REPLACE_HYPOTL = @REPLACE_HYPOTL@
+REPLACE_ILOGB = @REPLACE_ILOGB@
+REPLACE_ILOGBF = @REPLACE_ILOGBF@
+REPLACE_ISATTY = @REPLACE_ISATTY@
REPLACE_ISFINITE = @REPLACE_ISFINITE@
REPLACE_ISINF = @REPLACE_ISINF@
REPLACE_ISNAN = @REPLACE_ISNAN@
REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_ITOLD = @REPLACE_ITOLD@
REPLACE_LCHOWN = @REPLACE_LCHOWN@
REPLACE_LDEXPL = @REPLACE_LDEXPL@
REPLACE_LINK = @REPLACE_LINK@
REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LOG = @REPLACE_LOG@
+REPLACE_LOG10 = @REPLACE_LOG10@
+REPLACE_LOG10F = @REPLACE_LOG10F@
+REPLACE_LOG10L = @REPLACE_LOG10L@
+REPLACE_LOG1P = @REPLACE_LOG1P@
+REPLACE_LOG1PF = @REPLACE_LOG1PF@
+REPLACE_LOG1PL = @REPLACE_LOG1PL@
+REPLACE_LOG2 = @REPLACE_LOG2@
+REPLACE_LOG2F = @REPLACE_LOG2F@
+REPLACE_LOG2L = @REPLACE_LOG2L@
+REPLACE_LOGB = @REPLACE_LOGB@
+REPLACE_LOGBF = @REPLACE_LOGBF@
+REPLACE_LOGBL = @REPLACE_LOGBL@
+REPLACE_LOGF = @REPLACE_LOGF@
+REPLACE_LOGL = @REPLACE_LOGL@
REPLACE_LSEEK = @REPLACE_LSEEK@
REPLACE_LSTAT = @REPLACE_LSTAT@
REPLACE_MALLOC = @REPLACE_MALLOC@
@@ -1930,6 +2635,9 @@ REPLACE_MKFIFO = @REPLACE_MKFIFO@
REPLACE_MKNOD = @REPLACE_MKNOD@
REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_MODF = @REPLACE_MODF@
+REPLACE_MODFF = @REPLACE_MODFF@
+REPLACE_MODFL = @REPLACE_MODFL@
REPLACE_NAN = @REPLACE_NAN@
REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
@@ -1937,16 +2645,29 @@ REPLACE_NULL = @REPLACE_NULL@
REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
REPLACE_OPEN = @REPLACE_OPEN@
REPLACE_OPENAT = @REPLACE_OPENAT@
+REPLACE_OPENDIR = @REPLACE_OPENDIR@
REPLACE_PERROR = @REPLACE_PERROR@
REPLACE_POPEN = @REPLACE_POPEN@
REPLACE_POSIX_SPAWN = @REPLACE_POSIX_SPAWN@
+REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@
+REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@
+REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
REPLACE_PREAD = @REPLACE_PREAD@
REPLACE_PRINTF = @REPLACE_PRINTF@
+REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@
+REPLACE_PTSNAME = @REPLACE_PTSNAME@
+REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
REPLACE_PUTENV = @REPLACE_PUTENV@
REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_RAISE = @REPLACE_RAISE@
+REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
+REPLACE_READ = @REPLACE_READ@
REPLACE_READLINK = @REPLACE_READLINK@
REPLACE_REALLOC = @REPLACE_REALLOC@
REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMAINDER = @REPLACE_REMAINDER@
+REPLACE_REMAINDERF = @REPLACE_REMAINDERF@
+REPLACE_REMAINDERL = @REPLACE_REMAINDERL@
REPLACE_REMOVE = @REPLACE_REMOVE@
REPLACE_RENAME = @REPLACE_RENAME@
REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
@@ -1961,10 +2682,13 @@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
REPLACE_SLEEP = @REPLACE_SLEEP@
REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_SQRTL = @REPLACE_SQRTL@
REPLACE_STAT = @REPLACE_STAT@
+REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
REPLACE_STPNCPY = @REPLACE_STPNCPY@
REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
REPLACE_STRDUP = @REPLACE_STRDUP@
REPLACE_STRERROR = @REPLACE_STRERROR@
REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
@@ -1974,10 +2698,14 @@ REPLACE_STRNLEN = @REPLACE_STRNLEN@
REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
REPLACE_STRSTR = @REPLACE_STRSTR@
REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
+REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
REPLACE_SYMLINK = @REPLACE_SYMLINK@
REPLACE_TIMEGM = @REPLACE_TIMEGM@
REPLACE_TMPFILE = @REPLACE_TMPFILE@
+REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
REPLACE_TRUNC = @REPLACE_TRUNC@
REPLACE_TRUNCF = @REPLACE_TRUNCF@
REPLACE_TRUNCL = @REPLACE_TRUNCL@
@@ -2013,6 +2741,8 @@ STDINT_H = @STDINT_H@
STRIP = @STRIP@
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
+UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
@@ -2020,6 +2750,8 @@ VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
WERROR_CFLAGS = @WERROR_CFLAGS@
+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@
abs_aux_dir = @abs_aux_dir@
abs_builddir = @abs_builddir@
@@ -2074,7 +2806,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-AUTOMAKE_OPTIONS = 1.5 foreign
+AUTOMAKE_OPTIONS = 1.9.6 foreign
SUBDIRS = .
TESTS_ENVIRONMENT = EXEEXT='@EXEEXT@' srcdir='$(srcdir)' \
LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
@@ -2092,45 +2824,59 @@ TESTS_ENVIRONMENT = EXEEXT='@EXEEXT@' srcdir='$(srcdir)' \
noinst_HEADERS =
noinst_LIBRARIES =
check_LIBRARIES = libtests.a
-EXTRA_DIST = test-alloca-opt.c $(top_srcdir)/build-aux/arg-nonnull.h \
- test-array_list.c macros.h test-array_oset.c macros.h \
- test-avltree_oset.c macros.h test-binary-io.sh \
- test-binary-io.c macros.h test-btowc1.sh test-btowc2.sh \
- test-btowc.c signature.h macros.h \
- $(top_srcdir)/build-aux/c++defs.h test-c-ctype.c macros.h \
- test-c-stack.c test-c-stack.sh test-c-stack2.sh macros.h \
- test-c-strcase.sh test-c-strcasecmp.c test-c-strncasecmp.c \
- macros.h test-canonicalize-lgpl.c signature.h macros.h \
- test-cloexec.c macros.h test-closein.sh test-closein.c \
- test-dirname.c test-dup2.c signature.h macros.h test-environ.c \
- test-errno.c test-fcntl-h-c++.cc signature.h test-fcntl-h.c \
- test-fcntl.c signature.h macros.h test-fflush.c \
+EXTRA_DIST = test-alloca-opt.c test-array_list.c macros.h \
+ test-array_oset.c macros.h test-avltree_oset.c macros.h \
+ 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-stack.c test-c-stack.sh \
+ test-c-stack2.sh macros.h test-c-strcase.sh \
+ test-c-strcasecmp.c test-c-strncasecmp.c macros.h \
+ test-canonicalize-lgpl.c signature.h macros.h test-chdir.c \
+ signature.h macros.h test-cloexec.c macros.h test-close.c \
+ signature.h macros.h closedir.c dirent-private.h \
+ test-closein.sh test-closein.c dirent.in.h test-dirent-c++.cc \
+ signature.h test-dirent.c test-dirname.c dup.c test-dup.c \
+ signature.h macros.h test-dup2.c signature.h macros.h \
+ test-environ.c test-errno.c test-fclose.c test-fcntl-h-c++.cc \
+ signature.h test-fcntl-h.c test-fcntl.c signature.h macros.h \
+ fdopen.c test-fdopen.c signature.h macros.h test-fflush.c \
test-fflush2.sh test-fflush2.c signature.h macros.h \
- test-filenamecat.c test-fopen.h test-fopen-safer.c macros.h \
- test-fopen.h test-fopen.c signature.h macros.h test-fpending.c \
- test-fpending.sh macros.h test-fpurge.c macros.h \
- test-freadahead.c test-freadahead.sh macros.h test-freading.c \
- macros.h test-frexp.c minus-zero.h nan.h signature.h macros.h \
- test-frexpl.c minus-zero.h nan.h signature.h macros.h \
- test-fseeko.c test-fseeko.sh test-fseeko2.sh signature.h \
- macros.h ftell.c test-ftell.c test-ftell.sh test-ftell2.sh \
- test-ftell3.c signature.h macros.h test-ftello.c \
- test-ftello.sh test-ftello2.sh test-ftello3.c signature.h \
- macros.h test-getdtablesize.c signature.h macros.h macros.h \
- signature.h test-getopt.c test-getopt.h test-getopt_long.h \
- getpagesize.c signature.h test-gettimeofday.c \
- test-ignore-value.c test-isnand-nolibm.c test-isnand.h \
- minus-zero.h nan.h macros.h test-isnanf-nolibm.c test-isnanf.h \
- minus-zero.h nan.h macros.h test-isnanl-nolibm.c test-isnanl.h \
- minus-zero.h nan.h macros.h test-langinfo-c++.cc signature.h \
+ test-fgetc.c signature.h macros.h filename.h \
+ test-filenamecat.c test-float.c macros.h test-fopen.h \
+ test-fopen-safer.c macros.h test-fopen.h test-fopen.c \
+ signature.h macros.h test-fpending.c test-fpending.sh macros.h \
+ test-fpurge.c macros.h test-fputc.c signature.h macros.h \
+ test-fread.c signature.h macros.h test-freadahead.c \
+ test-freadahead.sh macros.h test-freading.c macros.h \
+ test-frexp.c test-frexp.h minus-zero.h infinity.h nan.h \
+ signature.h macros.h randomd.c test-frexpl.c test-frexp.h \
+ minus-zero.h infinity.h nan.h signature.h macros.h randoml.c \
+ test-fseek.c test-fseek.sh test-fseek2.sh signature.h macros.h \
+ test-fseeko.c test-fseeko.sh test-fseeko2.sh test-fseeko3.c \
+ test-fseeko3.sh test-fseeko4.c test-fseeko4.sh signature.h \
+ macros.h test-fstat.c signature.h macros.h test-ftell.c \
+ test-ftell.sh test-ftell2.sh test-ftell3.c signature.h \
+ macros.h test-ftello.c test-ftello.sh test-ftello2.sh \
+ test-ftello3.c test-ftello4.c test-ftello4.sh signature.h \
+ macros.h test-fwrite.c signature.h macros.h getcwd-lgpl.c \
+ test-getcwd-lgpl.c signature.h macros.h test-getdtablesize.c \
+ signature.h macros.h macros.h signature.h test-getopt.c \
+ test-getopt.h test-getopt_long.h getpagesize.c signature.h \
+ test-gettimeofday.c test-ignore-value.c test-intprops.c \
+ macros.h inttypes.in.h test-inttypes.c test-isnand-nolibm.c \
+ test-isnand.h minus-zero.h infinity.h nan.h macros.h \
+ test-isnanf-nolibm.c test-isnanf.h minus-zero.h infinity.h \
+ nan.h macros.h test-isnanl-nolibm.c test-isnanl.h minus-zero.h \
+ infinity.h nan.h macros.h test-langinfo-c++.cc signature.h \
test-langinfo.c link.c test-link.h test-link.c signature.h \
- macros.h test-linkedhash_list.c macros.h locale.in.h \
- test-locale-c++.cc test-locale-c++2.cc signature.h \
- test-locale.c localename.h test-localename.c macros.h \
- test-lseek.c test-lseek.sh signature.h macros.h test-lstat.h \
- test-lstat.c signature.h macros.h test-malloc-gnu.c \
- test-malloca.c test-math-c++.cc test-math-c++2.cc signature.h \
- test-math.c test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh \
+ macros.h test-linkedhash_list.c macros.h test-locale-c++.cc \
+ test-locale-c++2.cc signature.h test-locale.c \
+ test-localeconv.c signature.h macros.h localename.h \
+ test-localename.c macros.h test-lseek.c test-lseek.sh \
+ signature.h macros.h test-lstat.h test-lstat.c signature.h \
+ macros.h test-malloc-gnu.c test-malloca.c test-math-c++.cc \
+ test-math-c++2.cc signature.h test-math.c macros.h \
+ test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh \
test-mbrtowc4.sh test-mbrtowc.c test-mbrtowc-w32-1.sh \
test-mbrtowc-w32-2.sh test-mbrtowc-w32-3.sh \
test-mbrtowc-w32-4.sh test-mbrtowc-w32-5.sh test-mbrtowc-w32.c \
@@ -2138,53 +2884,66 @@ EXTRA_DIST = test-alloca-opt.c $(top_srcdir)/build-aux/arg-nonnull.h \
signature.h macros.h test-memchr.c zerosize-ptr.h signature.h \
macros.h test-memchr2.c zerosize-ptr.h macros.h \
test-nl_langinfo.sh test-nl_langinfo.c signature.h macros.h \
- test-open.h test-open.c signature.h macros.h test-pipe2.c \
- signature.h macros.h test-posix_spawn1.c \
- test-posix_spawn1.in.sh test-posix_spawn2.c \
- test-posix_spawn2.in.sh signature.h test-printf-frexp.c \
- macros.h test-printf-frexpl.c macros.h putenv.c \
- test-quotearg-simple.c test-quotearg.h macros.h \
+ test-open.h test-open.c signature.h macros.h dirent-private.h \
+ opendir.c test-pathmax.c test-pipe2.c signature.h macros.h \
+ test-posix_spawn_file_actions_addclose.c signature.h macros.h \
+ test-posix_spawn_file_actions_adddup2.c signature.h macros.h \
+ test-posix_spawn_file_actions_addopen.c signature.h macros.h \
+ test-posix_spawn1.c test-posix_spawn1.in.sh \
+ test-posix_spawn2.c test-posix_spawn2.in.sh signature.h \
+ test-printf-frexp.c macros.h test-printf-frexpl.c macros.h \
+ putenv.c test-quotearg-simple.c test-quotearg.h macros.h \
+ zerosize-ptr.h test-raise.c signature.h macros.h \
test-rawmemchr.c zerosize-ptr.h signature.h macros.h \
- test-readlink.h test-readlink.c signature.h macros.h \
- test-rename.h test-rename.c signature.h macros.h test-rmdir.h \
- test-rmdir.c signature.h macros.h test-sched.c setenv.c \
- test-setenv.c signature.h macros.h setlocale.c \
- test-setlocale1.sh test-setlocale1.c test-setlocale2.sh \
- test-setlocale2.c signature.h macros.h test-sigaction.c \
- signature.h macros.h test-signal-c++.cc test-signal-c++2.cc \
- signature.h test-signal.c test-signbit.c minus-zero.h macros.h \
- test-snprintf.c signature.h macros.h test-spawn-c++.cc \
- signature.h test-spawn-pipe.sh test-spawn-pipe.c macros.h \
- test-spawn.c test-stat.h test-stat.c signature.h macros.h \
- test-stdbool.c test-stddef.c test-stdint.c test-stdio-c++.cc \
- test-stdio-c++2.cc signature.h test-stdio.c test-stdlib-c++.cc \
- test-stdlib-c++2.cc signature.h test-stdlib.c test-sys_wait.h \
- test-strchrnul.c signature.h macros.h strdup.c test-strerror.c \
- signature.h macros.h test-string-c++.cc test-string-c++2.cc \
- signature.h test-string.c test-strnlen.c zerosize-ptr.h \
- signature.h macros.h test-strsignal.c signature.h macros.h \
- test-strstr.c zerosize-ptr.h signature.h macros.h \
- test-strtod.c signature.h minus-zero.h macros.h symlink.c \
- test-symlink.h test-symlink.c signature.h macros.h \
- test-sys_stat-c++.cc signature.h test-sys_stat.c \
- test-sys_time-c++.cc signature.h test-sys_time.c \
+ dirent-private.h readdir.c test-readlink.h test-readlink.c \
+ signature.h macros.h test-regex.c macros.h test-rename.h \
+ test-rename.c signature.h macros.h test-rmdir.h test-rmdir.c \
+ signature.h macros.h test-sched.c setenv.c test-setenv.c \
+ signature.h macros.h setlocale.c test-setlocale1.sh \
+ test-setlocale1.c test-setlocale2.sh test-setlocale2.c \
+ signature.h macros.h test-sigaction.c signature.h macros.h \
+ test-signal-h-c++.cc test-signal-h-c++2.cc signature.h \
+ test-signal-h.c test-signbit.c minus-zero.h infinity.h \
+ macros.h test-sigpipe.c test-sigpipe.sh test-sigprocmask.c \
+ signature.h macros.h sleep.c test-sleep.c signature.h macros.h \
+ $(top_srcdir)/build-aux/snippet/_Noreturn.h \
+ $(top_srcdir)/build-aux/snippet/arg-nonnull.h \
+ $(top_srcdir)/build-aux/snippet/c++defs.h \
+ $(top_srcdir)/build-aux/snippet/unused-parameter.h \
+ $(top_srcdir)/build-aux/snippet/warn-on-use.h test-snprintf.c \
+ signature.h macros.h test-spawn-c++.cc signature.h \
+ test-spawn-pipe.sh test-spawn-pipe-main.c \
+ test-spawn-pipe-child.c macros.h test-spawn.c test-stat.h \
+ test-stat.c signature.h macros.h test-stdbool.c test-stddef.c \
+ test-stdint.c test-stdio-c++.cc test-stdio-c++2.cc signature.h \
+ test-stdio.c test-stdlib-c++.cc test-stdlib-c++2.cc \
+ signature.h test-stdlib.c test-sys_wait.h test-strchrnul.c \
+ signature.h macros.h strdup.c test-strerror.c signature.h \
+ macros.h test-string-c++.cc test-string-c++2.cc signature.h \
+ test-string.c test-strnlen.c zerosize-ptr.h signature.h \
+ macros.h test-strsignal.c signature.h macros.h test-strstr.c \
+ zerosize-ptr.h signature.h macros.h test-strtod.c signature.h \
+ minus-zero.h macros.h symlink.c test-symlink.h test-symlink.c \
+ signature.h macros.h test-sys_stat-c++.cc signature.h \
+ test-sys_stat.c test-sys_time-c++.cc signature.h \
+ test-sys_time.c test-sys_types-c++.cc test-sys_types.c \
test-sys_wait-c++.cc signature.h test-sys_wait.c \
- test-sys_wait.h test-time-c++.cc test-time-c++2.cc signature.h \
- test-time.c test-unistd-c++.cc signature.h test-dup-safer.c \
- macros.h test-unistd.c unsetenv.c test-unsetenv.c signature.h \
- macros.h test-update-copyright.sh test-vasnprintf.c macros.h \
- test-vasprintf-posix.c minus-zero.h nan.h macros.h \
- test-vasprintf.c signature.h macros.h \
- test-vc-list-files-git.sh test-vc-list-files-cvs.sh init.sh \
- test-verify.c test-verify.sh init.sh test-version-etc.c \
- test-version-etc.sh $(top_srcdir)/build-aux/warn-on-use.h \
- test-wchar-c++.cc signature.h test-wchar.c test-wcrtomb.sh \
- test-wcrtomb.c test-wcrtomb-w32-1.sh test-wcrtomb-w32-2.sh \
- test-wcrtomb-w32-3.sh test-wcrtomb-w32-4.sh \
- test-wcrtomb-w32-5.sh test-wcrtomb-w32.c signature.h macros.h \
- wctob.c wctomb-impl.h wctomb.c test-wctype-h-c++.cc \
- signature.h test-wctype-h.c macros.h test-xalloc-die.c \
- test-xalloc-die.sh init.sh test-xvasprintf.c macros.h
+ test-sys_wait.h init.sh test-init.sh test-time-c++.cc \
+ test-time-c++2.cc signature.h test-time.c test-unistd-c++.cc \
+ signature.h test-dup-safer.c macros.h test-unistd.c unsetenv.c \
+ test-unsetenv.c signature.h macros.h test-update-copyright.sh \
+ test-vasnprintf.c macros.h test-vasprintf-posix.c minus-zero.h \
+ infinity.h nan.h macros.h test-vasprintf.c signature.h \
+ macros.h test-vc-list-files-git.sh test-vc-list-files-cvs.sh \
+ test-verify.c test-verify.sh test-version-etc.c \
+ test-version-etc.sh test-wchar-c++.cc signature.h test-wchar.c \
+ test-wcrtomb.sh test-wcrtomb.c test-wcrtomb-w32-1.sh \
+ test-wcrtomb-w32-2.sh test-wcrtomb-w32-3.sh \
+ test-wcrtomb-w32-4.sh test-wcrtomb-w32-5.sh test-wcrtomb-w32.c \
+ signature.h macros.h wctob.c wctomb-impl.h wctomb.c \
+ test-wctype-h-c++.cc signature.h test-wctype-h.c macros.h \
+ write.c test-write.c signature.h macros.h test-xalloc-die.c \
+ test-xalloc-die.sh test-xvasprintf.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
@@ -2195,14 +2954,20 @@ EXTRA_DIST = test-alloca-opt.c $(top_srcdir)/build-aux/arg-nonnull.h \
# statements but through direct file reference. Therefore this snippet must be
# present in all Makefile.am that need it. This is ensured by the applicability
# 'all' defined above.
-BUILT_SOURCES = arg-nonnull.h c++defs.h locale.h $(am__append_11) \
- warn-on-use.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.
+BUILT_SOURCES = dirent.h inttypes.h $(am__append_13) arg-nonnull.h \
+ c++defs.h unused-parameter.h warn-on-use.h
SUFFIXES =
-MOSTLYCLEANFILES = core *.stackdump arg-nonnull.h arg-nonnull.h-t \
- c++defs.h c++defs.h-t t-c-stack.tmp t-c-stack2.tmp \
- test-fflush.txt test-fpending.t t-fpurge.tmp t-freading.tmp \
- t-ftell3.tmp t-ftello3.tmp locale.h locale.h-t \
- $(am__append_12) warn-on-use.h warn-on-use.h-t
+MOSTLYCLEANFILES = core *.stackdump t-c-stack.tmp t-c-stack2.tmp \
+ dirent.h dirent.h-t test-fflush.txt test-fpending.t \
+ t-fpurge.tmp t-freading.tmp t-ftell3.tmp t-ftello3.tmp \
+ inttypes.h inttypes.h-t $(am__append_14) 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 =
@@ -2215,36 +2980,55 @@ AM_CPPFLAGS = \
LDADD = libtests.a ../lib/libm4.a libtests.a $(LIBTESTS_LIBDEPS)
libtests_a_SOURCES = gl_array_list.h gl_array_list.c gl_array_oset.h \
- gl_array_oset.c c-strcase.h c-strcasecmp.c c-strncasecmp.c \
- localename.c
+ gl_array_oset.c localename.c
libtests_a_LIBADD = $(M4tests_LIBOBJS)
libtests_a_DEPENDENCIES = $(M4tests_LIBOBJS)
-EXTRA_libtests_a_SOURCES = ftell.c getpagesize.c link.c putenv.c \
- setenv.c setlocale.c strdup.c symlink.c unsetenv.c wctob.c \
- wctomb.c
+EXTRA_libtests_a_SOURCES = closedir.c dup.c fdopen.c getcwd-lgpl.c \
+ getpagesize.c link.c opendir.c putenv.c readdir.c setenv.c \
+ setlocale.c sleep.c strdup.c symlink.c unsetenv.c wctob.c \
+ wctomb.c write.c
AM_LIBTOOLFLAGS = --preserve-dup-deps
-ARG_NONNULL_H = arg-nonnull.h
test_array_oset_LDADD = $(LDADD) @LIBINTL@
-CXXDEFS_H = c++defs.h
test_c_stack_LDADD = $(LDADD) $(LIBCSTACK) @LIBINTL@
test_closein_LDADD = $(LDADD) @LIBINTL@
+@ANSICXX_TRUE@test_dirent_c___SOURCES = test-dirent-c++.cc
+@ANSICXX_TRUE@test_dirent_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_NANOSLEEP)
test_dirname_LDADD = $(LDADD) @LIBINTL@
@ANSICXX_TRUE@test_fcntl_h_c___SOURCES = test-fcntl-h-c++.cc
@ANSICXX_TRUE@test_fcntl_h_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) $(LIBSOCKET)
test_filenamecat_LDADD = $(LDADD) @LIBINTL@
-test_frexp_nolibm_SOURCES = test-frexp.c
-test_frexpl_nolibm_SOURCES = test-frexpl.c
+test_frexp_nolibm_SOURCES = test-frexp.c randomd.c
+test_frexpl_nolibm_SOURCES = test-frexpl.c randoml.c
+test_getcwd_lgpl_LDADD = $(LDADD) $(LIBINTL)
test_getopt_LDADD = $(LDADD) $(LIBINTL)
@ANSICXX_TRUE@test_langinfo_c___SOURCES = test-langinfo-c++.cc
@ANSICXX_TRUE@test_locale_c___SOURCES = test-locale-c++.cc test-locale-c++2.cc
-test_localename_LDADD = $(LDADD) @INTL_MACOSX_LIBS@
+test_localename_LDADD = $(LDADD) @INTL_MACOSX_LIBS@ $(LIBTHREAD)
@ANSICXX_TRUE@test_math_c___SOURCES = test-math-c++.cc test-math-c++2.cc
+# These link dependencies are needed on IRIX 6.5 with cc.
+@ANSICXX_TRUE@test_math_c___LDADD = $(LDADD) $(COPYSIGNL_LIBM) $(RINT_LIBM) $(RINTL_LIBM)
+test_pipe2_LDADD = $(LDADD) $(LIBSOCKET)
test_quotearg_simple_LDADD = $(LDADD) @LIBINTL@
-@ANSICXX_TRUE@test_signal_c___SOURCES = test-signal-c++.cc test-signal-c++2.cc
-@ANSICXX_TRUE@test_signal_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_NANOSLEEP)
+test_regex_LDADD = $(LDADD) @LIBINTL@
+@ANSICXX_TRUE@test_signal_h_c___SOURCES = test-signal-h-c++.cc test-signal-h-c++2.cc
+@ANSICXX_TRUE@test_signal_h_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_NANOSLEEP) $(LIB_PTHREAD_SIGMASK)
+
+# Because this Makefile snippet defines a variable used by other
+# gnulib Makefile snippets, it must be present in all Makefile.am that
+# need it. This is ensured by the applicability 'all' defined above.
+_NORETURN_H = $(top_srcdir)/build-aux/snippet/_Noreturn.h
+ARG_NONNULL_H = arg-nonnull.h
+CXXDEFS_H = c++defs.h
+UNUSED_PARAMETER_H = unused-parameter.h
+WARN_ON_USE_H = warn-on-use.h
@ANSICXX_TRUE@test_spawn_c___SOURCES = test-spawn-c++.cc
@ANSICXX_TRUE@test_spawn_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_NANOSLEEP)
-test_spawn_pipe_LDADD = $(LDADD) @LIBINTL@
+test_spawn_pipe_main_LDADD = $(LDADD) @LIBINTL@
+# The test-spawn-pipe-child program must be a real executable, not a libtool
+# wrapper script, and should link against as few libraries as possible.
+# Therefore don't link it against any libraries other than -lc.
+test_spawn_pipe_child_LDADD =
+test_stat_LDADD = $(LDADD) $(LIBINTL)
@ANSICXX_TRUE@test_stdio_c___SOURCES = test-stdio-c++.cc test-stdio-c++2.cc
@ANSICXX_TRUE@test_stdio_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_NANOSLEEP) $(LIB_EACCESS)
@ANSICXX_TRUE@test_stdlib_c___SOURCES = test-stdlib-c++.cc test-stdlib-c++2.cc
@@ -2256,13 +3040,13 @@ test_strsignal_LDADD = $(LDADD) @LIBINTL@ $(LIBTHREAD)
@ANSICXX_TRUE@test_sys_stat_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_CLOCK_GETTIME)
@ANSICXX_TRUE@test_sys_time_c___SOURCES = test-sys_time-c++.cc
@ANSICXX_TRUE@test_sys_time_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_NANOSLEEP)
+@ANSICXX_TRUE@test_sys_types_c___SOURCES = test-sys_types-c++.cc
@ANSICXX_TRUE@test_sys_wait_c___SOURCES = test-sys_wait-c++.cc
@ANSICXX_TRUE@test_time_c___SOURCES = test-time-c++.cc test-time-c++2.cc
@ANSICXX_TRUE@test_time_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_NANOSLEEP)
@ANSICXX_TRUE@test_unistd_c___SOURCES = test-unistd-c++.cc
@ANSICXX_TRUE@test_unistd_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) $(LIBSOCKET)
test_version_etc_LDADD = $(LDADD) @LIBINTL@
-WARN_ON_USE_H = warn-on-use.h
@ANSICXX_TRUE@test_wchar_c___SOURCES = test-wchar-c++.cc
@ANSICXX_TRUE@test_wchar_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_NANOSLEEP) $(LIB_EACCESS)
@ANSICXX_TRUE@test_wctype_h_c___SOURCES = test-wctype-h-c++.cc
@@ -2273,7 +3057,7 @@ all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
-.SUFFIXES: .c .cc .html .log .o .obj .test .test$(EXEEXT)
+.SUFFIXES: .c .cc .log .o .obj .test .test$(EXEEXT) .trs
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/gnulib.mk $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@@ -2295,6 +3079,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
+$(srcdir)/gnulib.mk:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -2310,7 +3095,8 @@ clean-checkLIBRARIES:
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-libtests.a: $(libtests_a_OBJECTS) $(libtests_a_DEPENDENCIES)
+
+libtests.a: $(libtests_a_OBJECTS) $(libtests_a_DEPENDENCIES) $(EXTRA_libtests_a_DEPENDENCIES)
$(AM_V_at)-rm -f libtests.a
$(AM_V_AR)$(libtests_a_AR) libtests.a $(libtests_a_OBJECTS) $(libtests_a_LIBADD)
$(AM_V_at)$(RANLIB) libtests.a
@@ -2320,385 +3106,648 @@ clean-checkPROGRAMS:
clean-noinstPROGRAMS:
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
-test-alloca-opt$(EXEEXT): $(test_alloca_opt_OBJECTS) $(test_alloca_opt_DEPENDENCIES)
+
+test-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-array_list$(EXEEXT): $(test_array_list_OBJECTS) $(test_array_list_DEPENDENCIES)
+
+test-array_list$(EXEEXT): $(test_array_list_OBJECTS) $(test_array_list_DEPENDENCIES) $(EXTRA_test_array_list_DEPENDENCIES)
@rm -f test-array_list$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_array_list_OBJECTS) $(test_array_list_LDADD) $(LIBS)
-test-array_oset$(EXEEXT): $(test_array_oset_OBJECTS) $(test_array_oset_DEPENDENCIES)
+
+test-array_oset$(EXEEXT): $(test_array_oset_OBJECTS) $(test_array_oset_DEPENDENCIES) $(EXTRA_test_array_oset_DEPENDENCIES)
@rm -f test-array_oset$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_array_oset_OBJECTS) $(test_array_oset_LDADD) $(LIBS)
-test-avltree_oset$(EXEEXT): $(test_avltree_oset_OBJECTS) $(test_avltree_oset_DEPENDENCIES)
+
+test-avltree_oset$(EXEEXT): $(test_avltree_oset_OBJECTS) $(test_avltree_oset_DEPENDENCIES) $(EXTRA_test_avltree_oset_DEPENDENCIES)
@rm -f test-avltree_oset$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_avltree_oset_OBJECTS) $(test_avltree_oset_LDADD) $(LIBS)
-test-binary-io$(EXEEXT): $(test_binary_io_OBJECTS) $(test_binary_io_DEPENDENCIES)
+
+test-binary-io$(EXEEXT): $(test_binary_io_OBJECTS) $(test_binary_io_DEPENDENCIES) $(EXTRA_test_binary_io_DEPENDENCIES)
@rm -f test-binary-io$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_binary_io_OBJECTS) $(test_binary_io_LDADD) $(LIBS)
-test-btowc$(EXEEXT): $(test_btowc_OBJECTS) $(test_btowc_DEPENDENCIES)
+
+test-btowc$(EXEEXT): $(test_btowc_OBJECTS) $(test_btowc_DEPENDENCIES) $(EXTRA_test_btowc_DEPENDENCIES)
@rm -f test-btowc$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_btowc_OBJECTS) $(test_btowc_LDADD) $(LIBS)
-test-c-ctype$(EXEEXT): $(test_c_ctype_OBJECTS) $(test_c_ctype_DEPENDENCIES)
+
+test-c-ctype$(EXEEXT): $(test_c_ctype_OBJECTS) $(test_c_ctype_DEPENDENCIES) $(EXTRA_test_c_ctype_DEPENDENCIES)
@rm -f test-c-ctype$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_c_ctype_OBJECTS) $(test_c_ctype_LDADD) $(LIBS)
-test-c-stack$(EXEEXT): $(test_c_stack_OBJECTS) $(test_c_stack_DEPENDENCIES)
+
+test-c-stack$(EXEEXT): $(test_c_stack_OBJECTS) $(test_c_stack_DEPENDENCIES) $(EXTRA_test_c_stack_DEPENDENCIES)
@rm -f test-c-stack$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_c_stack_OBJECTS) $(test_c_stack_LDADD) $(LIBS)
-test-c-strcasecmp$(EXEEXT): $(test_c_strcasecmp_OBJECTS) $(test_c_strcasecmp_DEPENDENCIES)
+
+test-c-strcasecmp$(EXEEXT): $(test_c_strcasecmp_OBJECTS) $(test_c_strcasecmp_DEPENDENCIES) $(EXTRA_test_c_strcasecmp_DEPENDENCIES)
@rm -f test-c-strcasecmp$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_c_strcasecmp_OBJECTS) $(test_c_strcasecmp_LDADD) $(LIBS)
-test-c-strncasecmp$(EXEEXT): $(test_c_strncasecmp_OBJECTS) $(test_c_strncasecmp_DEPENDENCIES)
+
+test-c-strncasecmp$(EXEEXT): $(test_c_strncasecmp_OBJECTS) $(test_c_strncasecmp_DEPENDENCIES) $(EXTRA_test_c_strncasecmp_DEPENDENCIES)
@rm -f test-c-strncasecmp$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_c_strncasecmp_OBJECTS) $(test_c_strncasecmp_LDADD) $(LIBS)
-test-canonicalize-lgpl$(EXEEXT): $(test_canonicalize_lgpl_OBJECTS) $(test_canonicalize_lgpl_DEPENDENCIES)
+
+test-canonicalize-lgpl$(EXEEXT): $(test_canonicalize_lgpl_OBJECTS) $(test_canonicalize_lgpl_DEPENDENCIES) $(EXTRA_test_canonicalize_lgpl_DEPENDENCIES)
@rm -f test-canonicalize-lgpl$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_canonicalize_lgpl_OBJECTS) $(test_canonicalize_lgpl_LDADD) $(LIBS)
-test-cloexec$(EXEEXT): $(test_cloexec_OBJECTS) $(test_cloexec_DEPENDENCIES)
+
+test-chdir$(EXEEXT): $(test_chdir_OBJECTS) $(test_chdir_DEPENDENCIES) $(EXTRA_test_chdir_DEPENDENCIES)
+ @rm -f test-chdir$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_chdir_OBJECTS) $(test_chdir_LDADD) $(LIBS)
+
+test-cloexec$(EXEEXT): $(test_cloexec_OBJECTS) $(test_cloexec_DEPENDENCIES) $(EXTRA_test_cloexec_DEPENDENCIES)
@rm -f test-cloexec$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_cloexec_OBJECTS) $(test_cloexec_LDADD) $(LIBS)
-test-closein$(EXEEXT): $(test_closein_OBJECTS) $(test_closein_DEPENDENCIES)
+
+test-close$(EXEEXT): $(test_close_OBJECTS) $(test_close_DEPENDENCIES) $(EXTRA_test_close_DEPENDENCIES)
+ @rm -f test-close$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_close_OBJECTS) $(test_close_LDADD) $(LIBS)
+
+test-closein$(EXEEXT): $(test_closein_OBJECTS) $(test_closein_DEPENDENCIES) $(EXTRA_test_closein_DEPENDENCIES)
@rm -f test-closein$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_closein_OBJECTS) $(test_closein_LDADD) $(LIBS)
-test-dirname$(EXEEXT): $(test_dirname_OBJECTS) $(test_dirname_DEPENDENCIES)
+
+test-dirent$(EXEEXT): $(test_dirent_OBJECTS) $(test_dirent_DEPENDENCIES) $(EXTRA_test_dirent_DEPENDENCIES)
+ @rm -f test-dirent$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_dirent_OBJECTS) $(test_dirent_LDADD) $(LIBS)
+
+test-dirent-c++$(EXEEXT): $(test_dirent_c___OBJECTS) $(test_dirent_c___DEPENDENCIES) $(EXTRA_test_dirent_c___DEPENDENCIES)
+ @rm -f test-dirent-c++$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(test_dirent_c___OBJECTS) $(test_dirent_c___LDADD) $(LIBS)
+
+test-dirname$(EXEEXT): $(test_dirname_OBJECTS) $(test_dirname_DEPENDENCIES) $(EXTRA_test_dirname_DEPENDENCIES)
@rm -f test-dirname$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_dirname_OBJECTS) $(test_dirname_LDADD) $(LIBS)
-test-dup-safer$(EXEEXT): $(test_dup_safer_OBJECTS) $(test_dup_safer_DEPENDENCIES)
+
+test-dup$(EXEEXT): $(test_dup_OBJECTS) $(test_dup_DEPENDENCIES) $(EXTRA_test_dup_DEPENDENCIES)
+ @rm -f test-dup$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_dup_OBJECTS) $(test_dup_LDADD) $(LIBS)
+
+test-dup-safer$(EXEEXT): $(test_dup_safer_OBJECTS) $(test_dup_safer_DEPENDENCIES) $(EXTRA_test_dup_safer_DEPENDENCIES)
@rm -f test-dup-safer$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_dup_safer_OBJECTS) $(test_dup_safer_LDADD) $(LIBS)
-test-dup2$(EXEEXT): $(test_dup2_OBJECTS) $(test_dup2_DEPENDENCIES)
+
+test-dup2$(EXEEXT): $(test_dup2_OBJECTS) $(test_dup2_DEPENDENCIES) $(EXTRA_test_dup2_DEPENDENCIES)
@rm -f test-dup2$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_dup2_OBJECTS) $(test_dup2_LDADD) $(LIBS)
-test-environ$(EXEEXT): $(test_environ_OBJECTS) $(test_environ_DEPENDENCIES)
+
+test-environ$(EXEEXT): $(test_environ_OBJECTS) $(test_environ_DEPENDENCIES) $(EXTRA_test_environ_DEPENDENCIES)
@rm -f test-environ$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_environ_OBJECTS) $(test_environ_LDADD) $(LIBS)
-test-errno$(EXEEXT): $(test_errno_OBJECTS) $(test_errno_DEPENDENCIES)
+
+test-errno$(EXEEXT): $(test_errno_OBJECTS) $(test_errno_DEPENDENCIES) $(EXTRA_test_errno_DEPENDENCIES)
@rm -f test-errno$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_errno_OBJECTS) $(test_errno_LDADD) $(LIBS)
-test-fcntl$(EXEEXT): $(test_fcntl_OBJECTS) $(test_fcntl_DEPENDENCIES)
+
+test-fclose$(EXEEXT): $(test_fclose_OBJECTS) $(test_fclose_DEPENDENCIES) $(EXTRA_test_fclose_DEPENDENCIES)
+ @rm -f test-fclose$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fclose_OBJECTS) $(test_fclose_LDADD) $(LIBS)
+
+test-fcntl$(EXEEXT): $(test_fcntl_OBJECTS) $(test_fcntl_DEPENDENCIES) $(EXTRA_test_fcntl_DEPENDENCIES)
@rm -f test-fcntl$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_fcntl_OBJECTS) $(test_fcntl_LDADD) $(LIBS)
-test-fcntl-h$(EXEEXT): $(test_fcntl_h_OBJECTS) $(test_fcntl_h_DEPENDENCIES)
+
+test-fcntl-h$(EXEEXT): $(test_fcntl_h_OBJECTS) $(test_fcntl_h_DEPENDENCIES) $(EXTRA_test_fcntl_h_DEPENDENCIES)
@rm -f test-fcntl-h$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_fcntl_h_OBJECTS) $(test_fcntl_h_LDADD) $(LIBS)
-test-fcntl-h-c++$(EXEEXT): $(test_fcntl_h_c___OBJECTS) $(test_fcntl_h_c___DEPENDENCIES)
+
+test-fcntl-h-c++$(EXEEXT): $(test_fcntl_h_c___OBJECTS) $(test_fcntl_h_c___DEPENDENCIES) $(EXTRA_test_fcntl_h_c___DEPENDENCIES)
@rm -f test-fcntl-h-c++$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(test_fcntl_h_c___OBJECTS) $(test_fcntl_h_c___LDADD) $(LIBS)
-test-fflush$(EXEEXT): $(test_fflush_OBJECTS) $(test_fflush_DEPENDENCIES)
+
+test-fdopen$(EXEEXT): $(test_fdopen_OBJECTS) $(test_fdopen_DEPENDENCIES) $(EXTRA_test_fdopen_DEPENDENCIES)
+ @rm -f test-fdopen$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fdopen_OBJECTS) $(test_fdopen_LDADD) $(LIBS)
+
+test-fflush$(EXEEXT): $(test_fflush_OBJECTS) $(test_fflush_DEPENDENCIES) $(EXTRA_test_fflush_DEPENDENCIES)
@rm -f test-fflush$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_fflush_OBJECTS) $(test_fflush_LDADD) $(LIBS)
-test-fflush2$(EXEEXT): $(test_fflush2_OBJECTS) $(test_fflush2_DEPENDENCIES)
+
+test-fflush2$(EXEEXT): $(test_fflush2_OBJECTS) $(test_fflush2_DEPENDENCIES) $(EXTRA_test_fflush2_DEPENDENCIES)
@rm -f test-fflush2$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_fflush2_OBJECTS) $(test_fflush2_LDADD) $(LIBS)
-test-filenamecat$(EXEEXT): $(test_filenamecat_OBJECTS) $(test_filenamecat_DEPENDENCIES)
+
+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-filenamecat$(EXEEXT): $(test_filenamecat_OBJECTS) $(test_filenamecat_DEPENDENCIES) $(EXTRA_test_filenamecat_DEPENDENCIES)
@rm -f test-filenamecat$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_filenamecat_OBJECTS) $(test_filenamecat_LDADD) $(LIBS)
-test-fopen$(EXEEXT): $(test_fopen_OBJECTS) $(test_fopen_DEPENDENCIES)
+
+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-fopen$(EXEEXT): $(test_fopen_OBJECTS) $(test_fopen_DEPENDENCIES) $(EXTRA_test_fopen_DEPENDENCIES)
@rm -f test-fopen$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_fopen_OBJECTS) $(test_fopen_LDADD) $(LIBS)
-test-fopen-safer$(EXEEXT): $(test_fopen_safer_OBJECTS) $(test_fopen_safer_DEPENDENCIES)
+
+test-fopen-safer$(EXEEXT): $(test_fopen_safer_OBJECTS) $(test_fopen_safer_DEPENDENCIES) $(EXTRA_test_fopen_safer_DEPENDENCIES)
@rm -f test-fopen-safer$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_fopen_safer_OBJECTS) $(test_fopen_safer_LDADD) $(LIBS)
-test-fpending$(EXEEXT): $(test_fpending_OBJECTS) $(test_fpending_DEPENDENCIES)
+
+test-fpending$(EXEEXT): $(test_fpending_OBJECTS) $(test_fpending_DEPENDENCIES) $(EXTRA_test_fpending_DEPENDENCIES)
@rm -f test-fpending$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_fpending_OBJECTS) $(test_fpending_LDADD) $(LIBS)
-test-fpurge$(EXEEXT): $(test_fpurge_OBJECTS) $(test_fpurge_DEPENDENCIES)
+
+test-fpurge$(EXEEXT): $(test_fpurge_OBJECTS) $(test_fpurge_DEPENDENCIES) $(EXTRA_test_fpurge_DEPENDENCIES)
@rm -f test-fpurge$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_fpurge_OBJECTS) $(test_fpurge_LDADD) $(LIBS)
-test-freadahead$(EXEEXT): $(test_freadahead_OBJECTS) $(test_freadahead_DEPENDENCIES)
+
+test-fputc$(EXEEXT): $(test_fputc_OBJECTS) $(test_fputc_DEPENDENCIES) $(EXTRA_test_fputc_DEPENDENCIES)
+ @rm -f test-fputc$(EXEEXT)
+ $(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-freadahead$(EXEEXT): $(test_freadahead_OBJECTS) $(test_freadahead_DEPENDENCIES) $(EXTRA_test_freadahead_DEPENDENCIES)
@rm -f test-freadahead$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_freadahead_OBJECTS) $(test_freadahead_LDADD) $(LIBS)
-test-freading$(EXEEXT): $(test_freading_OBJECTS) $(test_freading_DEPENDENCIES)
+
+test-freading$(EXEEXT): $(test_freading_OBJECTS) $(test_freading_DEPENDENCIES) $(EXTRA_test_freading_DEPENDENCIES)
@rm -f test-freading$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_freading_OBJECTS) $(test_freading_LDADD) $(LIBS)
-test-frexp-nolibm$(EXEEXT): $(test_frexp_nolibm_OBJECTS) $(test_frexp_nolibm_DEPENDENCIES)
+
+test-frexp-nolibm$(EXEEXT): $(test_frexp_nolibm_OBJECTS) $(test_frexp_nolibm_DEPENDENCIES) $(EXTRA_test_frexp_nolibm_DEPENDENCIES)
@rm -f test-frexp-nolibm$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_frexp_nolibm_OBJECTS) $(test_frexp_nolibm_LDADD) $(LIBS)
-test-frexpl-nolibm$(EXEEXT): $(test_frexpl_nolibm_OBJECTS) $(test_frexpl_nolibm_DEPENDENCIES)
+
+test-frexpl-nolibm$(EXEEXT): $(test_frexpl_nolibm_OBJECTS) $(test_frexpl_nolibm_DEPENDENCIES) $(EXTRA_test_frexpl_nolibm_DEPENDENCIES)
@rm -f test-frexpl-nolibm$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_frexpl_nolibm_OBJECTS) $(test_frexpl_nolibm_LDADD) $(LIBS)
-test-fseeko$(EXEEXT): $(test_fseeko_OBJECTS) $(test_fseeko_DEPENDENCIES)
+
+test-fseek$(EXEEXT): $(test_fseek_OBJECTS) $(test_fseek_DEPENDENCIES) $(EXTRA_test_fseek_DEPENDENCIES)
+ @rm -f test-fseek$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fseek_OBJECTS) $(test_fseek_LDADD) $(LIBS)
+
+test-fseeko$(EXEEXT): $(test_fseeko_OBJECTS) $(test_fseeko_DEPENDENCIES) $(EXTRA_test_fseeko_DEPENDENCIES)
@rm -f test-fseeko$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_fseeko_OBJECTS) $(test_fseeko_LDADD) $(LIBS)
-test-ftell$(EXEEXT): $(test_ftell_OBJECTS) $(test_ftell_DEPENDENCIES)
+
+test-fseeko3$(EXEEXT): $(test_fseeko3_OBJECTS) $(test_fseeko3_DEPENDENCIES) $(EXTRA_test_fseeko3_DEPENDENCIES)
+ @rm -f test-fseeko3$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fseeko3_OBJECTS) $(test_fseeko3_LDADD) $(LIBS)
+
+test-fseeko4$(EXEEXT): $(test_fseeko4_OBJECTS) $(test_fseeko4_DEPENDENCIES) $(EXTRA_test_fseeko4_DEPENDENCIES)
+ @rm -f test-fseeko4$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fseeko4_OBJECTS) $(test_fseeko4_LDADD) $(LIBS)
+
+test-fstat$(EXEEXT): $(test_fstat_OBJECTS) $(test_fstat_DEPENDENCIES) $(EXTRA_test_fstat_DEPENDENCIES)
+ @rm -f test-fstat$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fstat_OBJECTS) $(test_fstat_LDADD) $(LIBS)
+
+test-ftell$(EXEEXT): $(test_ftell_OBJECTS) $(test_ftell_DEPENDENCIES) $(EXTRA_test_ftell_DEPENDENCIES)
@rm -f test-ftell$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_ftell_OBJECTS) $(test_ftell_LDADD) $(LIBS)
-test-ftell3$(EXEEXT): $(test_ftell3_OBJECTS) $(test_ftell3_DEPENDENCIES)
+
+test-ftell3$(EXEEXT): $(test_ftell3_OBJECTS) $(test_ftell3_DEPENDENCIES) $(EXTRA_test_ftell3_DEPENDENCIES)
@rm -f test-ftell3$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_ftell3_OBJECTS) $(test_ftell3_LDADD) $(LIBS)
-test-ftello$(EXEEXT): $(test_ftello_OBJECTS) $(test_ftello_DEPENDENCIES)
+
+test-ftello$(EXEEXT): $(test_ftello_OBJECTS) $(test_ftello_DEPENDENCIES) $(EXTRA_test_ftello_DEPENDENCIES)
@rm -f test-ftello$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_ftello_OBJECTS) $(test_ftello_LDADD) $(LIBS)
-test-ftello3$(EXEEXT): $(test_ftello3_OBJECTS) $(test_ftello3_DEPENDENCIES)
+
+test-ftello3$(EXEEXT): $(test_ftello3_OBJECTS) $(test_ftello3_DEPENDENCIES) $(EXTRA_test_ftello3_DEPENDENCIES)
@rm -f test-ftello3$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_ftello3_OBJECTS) $(test_ftello3_LDADD) $(LIBS)
-test-getdtablesize$(EXEEXT): $(test_getdtablesize_OBJECTS) $(test_getdtablesize_DEPENDENCIES)
+
+test-ftello4$(EXEEXT): $(test_ftello4_OBJECTS) $(test_ftello4_DEPENDENCIES) $(EXTRA_test_ftello4_DEPENDENCIES)
+ @rm -f test-ftello4$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_ftello4_OBJECTS) $(test_ftello4_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-getdtablesize$(EXEEXT): $(test_getdtablesize_OBJECTS) $(test_getdtablesize_DEPENDENCIES) $(EXTRA_test_getdtablesize_DEPENDENCIES)
@rm -f test-getdtablesize$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_getdtablesize_OBJECTS) $(test_getdtablesize_LDADD) $(LIBS)
-test-getopt$(EXEEXT): $(test_getopt_OBJECTS) $(test_getopt_DEPENDENCIES)
+
+test-getopt$(EXEEXT): $(test_getopt_OBJECTS) $(test_getopt_DEPENDENCIES) $(EXTRA_test_getopt_DEPENDENCIES)
@rm -f test-getopt$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_getopt_OBJECTS) $(test_getopt_LDADD) $(LIBS)
-test-gettimeofday$(EXEEXT): $(test_gettimeofday_OBJECTS) $(test_gettimeofday_DEPENDENCIES)
+
+test-gettimeofday$(EXEEXT): $(test_gettimeofday_OBJECTS) $(test_gettimeofday_DEPENDENCIES) $(EXTRA_test_gettimeofday_DEPENDENCIES)
@rm -f test-gettimeofday$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_gettimeofday_OBJECTS) $(test_gettimeofday_LDADD) $(LIBS)
-test-ignore-value$(EXEEXT): $(test_ignore_value_OBJECTS) $(test_ignore_value_DEPENDENCIES)
+
+test-ignore-value$(EXEEXT): $(test_ignore_value_OBJECTS) $(test_ignore_value_DEPENDENCIES) $(EXTRA_test_ignore_value_DEPENDENCIES)
@rm -f test-ignore-value$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_ignore_value_OBJECTS) $(test_ignore_value_LDADD) $(LIBS)
-test-isnand-nolibm$(EXEEXT): $(test_isnand_nolibm_OBJECTS) $(test_isnand_nolibm_DEPENDENCIES)
+
+test-intprops$(EXEEXT): $(test_intprops_OBJECTS) $(test_intprops_DEPENDENCIES) $(EXTRA_test_intprops_DEPENDENCIES)
+ @rm -f test-intprops$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_intprops_OBJECTS) $(test_intprops_LDADD) $(LIBS)
+
+test-inttypes$(EXEEXT): $(test_inttypes_OBJECTS) $(test_inttypes_DEPENDENCIES) $(EXTRA_test_inttypes_DEPENDENCIES)
+ @rm -f test-inttypes$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_inttypes_OBJECTS) $(test_inttypes_LDADD) $(LIBS)
+
+test-isnand-nolibm$(EXEEXT): $(test_isnand_nolibm_OBJECTS) $(test_isnand_nolibm_DEPENDENCIES) $(EXTRA_test_isnand_nolibm_DEPENDENCIES)
@rm -f test-isnand-nolibm$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_isnand_nolibm_OBJECTS) $(test_isnand_nolibm_LDADD) $(LIBS)
-test-isnanf-nolibm$(EXEEXT): $(test_isnanf_nolibm_OBJECTS) $(test_isnanf_nolibm_DEPENDENCIES)
+
+test-isnanf-nolibm$(EXEEXT): $(test_isnanf_nolibm_OBJECTS) $(test_isnanf_nolibm_DEPENDENCIES) $(EXTRA_test_isnanf_nolibm_DEPENDENCIES)
@rm -f test-isnanf-nolibm$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_isnanf_nolibm_OBJECTS) $(test_isnanf_nolibm_LDADD) $(LIBS)
-test-isnanl-nolibm$(EXEEXT): $(test_isnanl_nolibm_OBJECTS) $(test_isnanl_nolibm_DEPENDENCIES)
+
+test-isnanl-nolibm$(EXEEXT): $(test_isnanl_nolibm_OBJECTS) $(test_isnanl_nolibm_DEPENDENCIES) $(EXTRA_test_isnanl_nolibm_DEPENDENCIES)
@rm -f test-isnanl-nolibm$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_isnanl_nolibm_OBJECTS) $(test_isnanl_nolibm_LDADD) $(LIBS)
-test-langinfo$(EXEEXT): $(test_langinfo_OBJECTS) $(test_langinfo_DEPENDENCIES)
+
+test-langinfo$(EXEEXT): $(test_langinfo_OBJECTS) $(test_langinfo_DEPENDENCIES) $(EXTRA_test_langinfo_DEPENDENCIES)
@rm -f test-langinfo$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_langinfo_OBJECTS) $(test_langinfo_LDADD) $(LIBS)
-test-langinfo-c++$(EXEEXT): $(test_langinfo_c___OBJECTS) $(test_langinfo_c___DEPENDENCIES)
+
+test-langinfo-c++$(EXEEXT): $(test_langinfo_c___OBJECTS) $(test_langinfo_c___DEPENDENCIES) $(EXTRA_test_langinfo_c___DEPENDENCIES)
@rm -f test-langinfo-c++$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(test_langinfo_c___OBJECTS) $(test_langinfo_c___LDADD) $(LIBS)
-test-link$(EXEEXT): $(test_link_OBJECTS) $(test_link_DEPENDENCIES)
+
+test-link$(EXEEXT): $(test_link_OBJECTS) $(test_link_DEPENDENCIES) $(EXTRA_test_link_DEPENDENCIES)
@rm -f test-link$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_link_OBJECTS) $(test_link_LDADD) $(LIBS)
-test-linkedhash_list$(EXEEXT): $(test_linkedhash_list_OBJECTS) $(test_linkedhash_list_DEPENDENCIES)
+
+test-linkedhash_list$(EXEEXT): $(test_linkedhash_list_OBJECTS) $(test_linkedhash_list_DEPENDENCIES) $(EXTRA_test_linkedhash_list_DEPENDENCIES)
@rm -f test-linkedhash_list$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_linkedhash_list_OBJECTS) $(test_linkedhash_list_LDADD) $(LIBS)
-test-locale$(EXEEXT): $(test_locale_OBJECTS) $(test_locale_DEPENDENCIES)
+
+test-locale$(EXEEXT): $(test_locale_OBJECTS) $(test_locale_DEPENDENCIES) $(EXTRA_test_locale_DEPENDENCIES)
@rm -f test-locale$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_locale_OBJECTS) $(test_locale_LDADD) $(LIBS)
-test-locale-c++$(EXEEXT): $(test_locale_c___OBJECTS) $(test_locale_c___DEPENDENCIES)
+
+test-locale-c++$(EXEEXT): $(test_locale_c___OBJECTS) $(test_locale_c___DEPENDENCIES) $(EXTRA_test_locale_c___DEPENDENCIES)
@rm -f test-locale-c++$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(test_locale_c___OBJECTS) $(test_locale_c___LDADD) $(LIBS)
-test-localename$(EXEEXT): $(test_localename_OBJECTS) $(test_localename_DEPENDENCIES)
+
+test-localeconv$(EXEEXT): $(test_localeconv_OBJECTS) $(test_localeconv_DEPENDENCIES) $(EXTRA_test_localeconv_DEPENDENCIES)
+ @rm -f test-localeconv$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_localeconv_OBJECTS) $(test_localeconv_LDADD) $(LIBS)
+
+test-localename$(EXEEXT): $(test_localename_OBJECTS) $(test_localename_DEPENDENCIES) $(EXTRA_test_localename_DEPENDENCIES)
@rm -f test-localename$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_localename_OBJECTS) $(test_localename_LDADD) $(LIBS)
-test-lseek$(EXEEXT): $(test_lseek_OBJECTS) $(test_lseek_DEPENDENCIES)
+
+test-lseek$(EXEEXT): $(test_lseek_OBJECTS) $(test_lseek_DEPENDENCIES) $(EXTRA_test_lseek_DEPENDENCIES)
@rm -f test-lseek$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_lseek_OBJECTS) $(test_lseek_LDADD) $(LIBS)
-test-lstat$(EXEEXT): $(test_lstat_OBJECTS) $(test_lstat_DEPENDENCIES)
+
+test-lstat$(EXEEXT): $(test_lstat_OBJECTS) $(test_lstat_DEPENDENCIES) $(EXTRA_test_lstat_DEPENDENCIES)
@rm -f test-lstat$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_lstat_OBJECTS) $(test_lstat_LDADD) $(LIBS)
-test-malloc-gnu$(EXEEXT): $(test_malloc_gnu_OBJECTS) $(test_malloc_gnu_DEPENDENCIES)
+
+test-malloc-gnu$(EXEEXT): $(test_malloc_gnu_OBJECTS) $(test_malloc_gnu_DEPENDENCIES) $(EXTRA_test_malloc_gnu_DEPENDENCIES)
@rm -f test-malloc-gnu$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_malloc_gnu_OBJECTS) $(test_malloc_gnu_LDADD) $(LIBS)
-test-malloca$(EXEEXT): $(test_malloca_OBJECTS) $(test_malloca_DEPENDENCIES)
+
+test-malloca$(EXEEXT): $(test_malloca_OBJECTS) $(test_malloca_DEPENDENCIES) $(EXTRA_test_malloca_DEPENDENCIES)
@rm -f test-malloca$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_malloca_OBJECTS) $(test_malloca_LDADD) $(LIBS)
-test-math$(EXEEXT): $(test_math_OBJECTS) $(test_math_DEPENDENCIES)
+
+test-math$(EXEEXT): $(test_math_OBJECTS) $(test_math_DEPENDENCIES) $(EXTRA_test_math_DEPENDENCIES)
@rm -f test-math$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_math_OBJECTS) $(test_math_LDADD) $(LIBS)
-test-math-c++$(EXEEXT): $(test_math_c___OBJECTS) $(test_math_c___DEPENDENCIES)
+
+test-math-c++$(EXEEXT): $(test_math_c___OBJECTS) $(test_math_c___DEPENDENCIES) $(EXTRA_test_math_c___DEPENDENCIES)
@rm -f test-math-c++$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(test_math_c___OBJECTS) $(test_math_c___LDADD) $(LIBS)
-test-mbrtowc$(EXEEXT): $(test_mbrtowc_OBJECTS) $(test_mbrtowc_DEPENDENCIES)
+
+test-mbrtowc$(EXEEXT): $(test_mbrtowc_OBJECTS) $(test_mbrtowc_DEPENDENCIES) $(EXTRA_test_mbrtowc_DEPENDENCIES)
@rm -f test-mbrtowc$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_mbrtowc_OBJECTS) $(test_mbrtowc_LDADD) $(LIBS)
-test-mbrtowc-w32$(EXEEXT): $(test_mbrtowc_w32_OBJECTS) $(test_mbrtowc_w32_DEPENDENCIES)
+
+test-mbrtowc-w32$(EXEEXT): $(test_mbrtowc_w32_OBJECTS) $(test_mbrtowc_w32_DEPENDENCIES) $(EXTRA_test_mbrtowc_w32_DEPENDENCIES)
@rm -f test-mbrtowc-w32$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_mbrtowc_w32_OBJECTS) $(test_mbrtowc_w32_LDADD) $(LIBS)
-test-mbsinit$(EXEEXT): $(test_mbsinit_OBJECTS) $(test_mbsinit_DEPENDENCIES)
+
+test-mbsinit$(EXEEXT): $(test_mbsinit_OBJECTS) $(test_mbsinit_DEPENDENCIES) $(EXTRA_test_mbsinit_DEPENDENCIES)
@rm -f test-mbsinit$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_mbsinit_OBJECTS) $(test_mbsinit_LDADD) $(LIBS)
-test-memchr$(EXEEXT): $(test_memchr_OBJECTS) $(test_memchr_DEPENDENCIES)
+
+test-memchr$(EXEEXT): $(test_memchr_OBJECTS) $(test_memchr_DEPENDENCIES) $(EXTRA_test_memchr_DEPENDENCIES)
@rm -f test-memchr$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_memchr_OBJECTS) $(test_memchr_LDADD) $(LIBS)
-test-memchr2$(EXEEXT): $(test_memchr2_OBJECTS) $(test_memchr2_DEPENDENCIES)
+
+test-memchr2$(EXEEXT): $(test_memchr2_OBJECTS) $(test_memchr2_DEPENDENCIES) $(EXTRA_test_memchr2_DEPENDENCIES)
@rm -f test-memchr2$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_memchr2_OBJECTS) $(test_memchr2_LDADD) $(LIBS)
-test-nl_langinfo$(EXEEXT): $(test_nl_langinfo_OBJECTS) $(test_nl_langinfo_DEPENDENCIES)
+
+test-nl_langinfo$(EXEEXT): $(test_nl_langinfo_OBJECTS) $(test_nl_langinfo_DEPENDENCIES) $(EXTRA_test_nl_langinfo_DEPENDENCIES)
@rm -f test-nl_langinfo$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_nl_langinfo_OBJECTS) $(test_nl_langinfo_LDADD) $(LIBS)
-test-open$(EXEEXT): $(test_open_OBJECTS) $(test_open_DEPENDENCIES)
+
+test-open$(EXEEXT): $(test_open_OBJECTS) $(test_open_DEPENDENCIES) $(EXTRA_test_open_DEPENDENCIES)
@rm -f test-open$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_open_OBJECTS) $(test_open_LDADD) $(LIBS)
-test-pipe2$(EXEEXT): $(test_pipe2_OBJECTS) $(test_pipe2_DEPENDENCIES)
+
+test-pathmax$(EXEEXT): $(test_pathmax_OBJECTS) $(test_pathmax_DEPENDENCIES) $(EXTRA_test_pathmax_DEPENDENCIES)
+ @rm -f test-pathmax$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_pathmax_OBJECTS) $(test_pathmax_LDADD) $(LIBS)
+
+test-pipe2$(EXEEXT): $(test_pipe2_OBJECTS) $(test_pipe2_DEPENDENCIES) $(EXTRA_test_pipe2_DEPENDENCIES)
@rm -f test-pipe2$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_pipe2_OBJECTS) $(test_pipe2_LDADD) $(LIBS)
-test-posix_spawn1$(EXEEXT): $(test_posix_spawn1_OBJECTS) $(test_posix_spawn1_DEPENDENCIES)
+
+test-posix_spawn1$(EXEEXT): $(test_posix_spawn1_OBJECTS) $(test_posix_spawn1_DEPENDENCIES) $(EXTRA_test_posix_spawn1_DEPENDENCIES)
@rm -f test-posix_spawn1$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_posix_spawn1_OBJECTS) $(test_posix_spawn1_LDADD) $(LIBS)
-test-posix_spawn2$(EXEEXT): $(test_posix_spawn2_OBJECTS) $(test_posix_spawn2_DEPENDENCIES)
+
+test-posix_spawn2$(EXEEXT): $(test_posix_spawn2_OBJECTS) $(test_posix_spawn2_DEPENDENCIES) $(EXTRA_test_posix_spawn2_DEPENDENCIES)
@rm -f test-posix_spawn2$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_posix_spawn2_OBJECTS) $(test_posix_spawn2_LDADD) $(LIBS)
-test-printf-frexp$(EXEEXT): $(test_printf_frexp_OBJECTS) $(test_printf_frexp_DEPENDENCIES)
+
+test-posix_spawn_file_actions_addclose$(EXEEXT): $(test_posix_spawn_file_actions_addclose_OBJECTS) $(test_posix_spawn_file_actions_addclose_DEPENDENCIES) $(EXTRA_test_posix_spawn_file_actions_addclose_DEPENDENCIES)
+ @rm -f test-posix_spawn_file_actions_addclose$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_posix_spawn_file_actions_addclose_OBJECTS) $(test_posix_spawn_file_actions_addclose_LDADD) $(LIBS)
+
+test-posix_spawn_file_actions_adddup2$(EXEEXT): $(test_posix_spawn_file_actions_adddup2_OBJECTS) $(test_posix_spawn_file_actions_adddup2_DEPENDENCIES) $(EXTRA_test_posix_spawn_file_actions_adddup2_DEPENDENCIES)
+ @rm -f test-posix_spawn_file_actions_adddup2$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_posix_spawn_file_actions_adddup2_OBJECTS) $(test_posix_spawn_file_actions_adddup2_LDADD) $(LIBS)
+
+test-posix_spawn_file_actions_addopen$(EXEEXT): $(test_posix_spawn_file_actions_addopen_OBJECTS) $(test_posix_spawn_file_actions_addopen_DEPENDENCIES) $(EXTRA_test_posix_spawn_file_actions_addopen_DEPENDENCIES)
+ @rm -f test-posix_spawn_file_actions_addopen$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_posix_spawn_file_actions_addopen_OBJECTS) $(test_posix_spawn_file_actions_addopen_LDADD) $(LIBS)
+
+test-printf-frexp$(EXEEXT): $(test_printf_frexp_OBJECTS) $(test_printf_frexp_DEPENDENCIES) $(EXTRA_test_printf_frexp_DEPENDENCIES)
@rm -f test-printf-frexp$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_printf_frexp_OBJECTS) $(test_printf_frexp_LDADD) $(LIBS)
-test-printf-frexpl$(EXEEXT): $(test_printf_frexpl_OBJECTS) $(test_printf_frexpl_DEPENDENCIES)
+
+test-printf-frexpl$(EXEEXT): $(test_printf_frexpl_OBJECTS) $(test_printf_frexpl_DEPENDENCIES) $(EXTRA_test_printf_frexpl_DEPENDENCIES)
@rm -f test-printf-frexpl$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_printf_frexpl_OBJECTS) $(test_printf_frexpl_LDADD) $(LIBS)
-test-quotearg-simple$(EXEEXT): $(test_quotearg_simple_OBJECTS) $(test_quotearg_simple_DEPENDENCIES)
+
+test-quotearg-simple$(EXEEXT): $(test_quotearg_simple_OBJECTS) $(test_quotearg_simple_DEPENDENCIES) $(EXTRA_test_quotearg_simple_DEPENDENCIES)
@rm -f test-quotearg-simple$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_quotearg_simple_OBJECTS) $(test_quotearg_simple_LDADD) $(LIBS)
-test-rawmemchr$(EXEEXT): $(test_rawmemchr_OBJECTS) $(test_rawmemchr_DEPENDENCIES)
+
+test-raise$(EXEEXT): $(test_raise_OBJECTS) $(test_raise_DEPENDENCIES) $(EXTRA_test_raise_DEPENDENCIES)
+ @rm -f test-raise$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_raise_OBJECTS) $(test_raise_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)
+
+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-rename$(EXEEXT): $(test_rename_OBJECTS) $(test_rename_DEPENDENCIES)
+
+test-regex$(EXEEXT): $(test_regex_OBJECTS) $(test_regex_DEPENDENCIES) $(EXTRA_test_regex_DEPENDENCIES)
+ @rm -f test-regex$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_regex_OBJECTS) $(test_regex_LDADD) $(LIBS)
+
+test-rename$(EXEEXT): $(test_rename_OBJECTS) $(test_rename_DEPENDENCIES) $(EXTRA_test_rename_DEPENDENCIES)
@rm -f test-rename$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_rename_OBJECTS) $(test_rename_LDADD) $(LIBS)
-test-rmdir$(EXEEXT): $(test_rmdir_OBJECTS) $(test_rmdir_DEPENDENCIES)
+
+test-rmdir$(EXEEXT): $(test_rmdir_OBJECTS) $(test_rmdir_DEPENDENCIES) $(EXTRA_test_rmdir_DEPENDENCIES)
@rm -f test-rmdir$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_rmdir_OBJECTS) $(test_rmdir_LDADD) $(LIBS)
-test-sched$(EXEEXT): $(test_sched_OBJECTS) $(test_sched_DEPENDENCIES)
+
+test-sched$(EXEEXT): $(test_sched_OBJECTS) $(test_sched_DEPENDENCIES) $(EXTRA_test_sched_DEPENDENCIES)
@rm -f test-sched$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_sched_OBJECTS) $(test_sched_LDADD) $(LIBS)
-test-setenv$(EXEEXT): $(test_setenv_OBJECTS) $(test_setenv_DEPENDENCIES)
+
+test-setenv$(EXEEXT): $(test_setenv_OBJECTS) $(test_setenv_DEPENDENCIES) $(EXTRA_test_setenv_DEPENDENCIES)
@rm -f test-setenv$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_setenv_OBJECTS) $(test_setenv_LDADD) $(LIBS)
-test-setlocale1$(EXEEXT): $(test_setlocale1_OBJECTS) $(test_setlocale1_DEPENDENCIES)
+
+test-setlocale1$(EXEEXT): $(test_setlocale1_OBJECTS) $(test_setlocale1_DEPENDENCIES) $(EXTRA_test_setlocale1_DEPENDENCIES)
@rm -f test-setlocale1$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_setlocale1_OBJECTS) $(test_setlocale1_LDADD) $(LIBS)
-test-setlocale2$(EXEEXT): $(test_setlocale2_OBJECTS) $(test_setlocale2_DEPENDENCIES)
+
+test-setlocale2$(EXEEXT): $(test_setlocale2_OBJECTS) $(test_setlocale2_DEPENDENCIES) $(EXTRA_test_setlocale2_DEPENDENCIES)
@rm -f test-setlocale2$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_setlocale2_OBJECTS) $(test_setlocale2_LDADD) $(LIBS)
-test-sigaction$(EXEEXT): $(test_sigaction_OBJECTS) $(test_sigaction_DEPENDENCIES)
+
+test-sigaction$(EXEEXT): $(test_sigaction_OBJECTS) $(test_sigaction_DEPENDENCIES) $(EXTRA_test_sigaction_DEPENDENCIES)
@rm -f test-sigaction$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_sigaction_OBJECTS) $(test_sigaction_LDADD) $(LIBS)
-test-signal$(EXEEXT): $(test_signal_OBJECTS) $(test_signal_DEPENDENCIES)
- @rm -f test-signal$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(test_signal_OBJECTS) $(test_signal_LDADD) $(LIBS)
-test-signal-c++$(EXEEXT): $(test_signal_c___OBJECTS) $(test_signal_c___DEPENDENCIES)
- @rm -f test-signal-c++$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(test_signal_c___OBJECTS) $(test_signal_c___LDADD) $(LIBS)
-test-signbit$(EXEEXT): $(test_signbit_OBJECTS) $(test_signbit_DEPENDENCIES)
+
+test-signal-h$(EXEEXT): $(test_signal_h_OBJECTS) $(test_signal_h_DEPENDENCIES) $(EXTRA_test_signal_h_DEPENDENCIES)
+ @rm -f test-signal-h$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_signal_h_OBJECTS) $(test_signal_h_LDADD) $(LIBS)
+
+test-signal-h-c++$(EXEEXT): $(test_signal_h_c___OBJECTS) $(test_signal_h_c___DEPENDENCIES) $(EXTRA_test_signal_h_c___DEPENDENCIES)
+ @rm -f test-signal-h-c++$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(test_signal_h_c___OBJECTS) $(test_signal_h_c___LDADD) $(LIBS)
+
+test-signbit$(EXEEXT): $(test_signbit_OBJECTS) $(test_signbit_DEPENDENCIES) $(EXTRA_test_signbit_DEPENDENCIES)
@rm -f test-signbit$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_signbit_OBJECTS) $(test_signbit_LDADD) $(LIBS)
-test-snprintf$(EXEEXT): $(test_snprintf_OBJECTS) $(test_snprintf_DEPENDENCIES)
+
+test-sigpipe$(EXEEXT): $(test_sigpipe_OBJECTS) $(test_sigpipe_DEPENDENCIES) $(EXTRA_test_sigpipe_DEPENDENCIES)
+ @rm -f test-sigpipe$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_sigpipe_OBJECTS) $(test_sigpipe_LDADD) $(LIBS)
+
+test-sigprocmask$(EXEEXT): $(test_sigprocmask_OBJECTS) $(test_sigprocmask_DEPENDENCIES) $(EXTRA_test_sigprocmask_DEPENDENCIES)
+ @rm -f test-sigprocmask$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_sigprocmask_OBJECTS) $(test_sigprocmask_LDADD) $(LIBS)
+
+test-sleep$(EXEEXT): $(test_sleep_OBJECTS) $(test_sleep_DEPENDENCIES) $(EXTRA_test_sleep_DEPENDENCIES)
+ @rm -f test-sleep$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_sleep_OBJECTS) $(test_sleep_LDADD) $(LIBS)
+
+test-snprintf$(EXEEXT): $(test_snprintf_OBJECTS) $(test_snprintf_DEPENDENCIES) $(EXTRA_test_snprintf_DEPENDENCIES)
@rm -f test-snprintf$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_snprintf_OBJECTS) $(test_snprintf_LDADD) $(LIBS)
-test-spawn$(EXEEXT): $(test_spawn_OBJECTS) $(test_spawn_DEPENDENCIES)
+
+test-spawn$(EXEEXT): $(test_spawn_OBJECTS) $(test_spawn_DEPENDENCIES) $(EXTRA_test_spawn_DEPENDENCIES)
@rm -f test-spawn$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_spawn_OBJECTS) $(test_spawn_LDADD) $(LIBS)
-test-spawn-c++$(EXEEXT): $(test_spawn_c___OBJECTS) $(test_spawn_c___DEPENDENCIES)
+
+test-spawn-c++$(EXEEXT): $(test_spawn_c___OBJECTS) $(test_spawn_c___DEPENDENCIES) $(EXTRA_test_spawn_c___DEPENDENCIES)
@rm -f test-spawn-c++$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(test_spawn_c___OBJECTS) $(test_spawn_c___LDADD) $(LIBS)
-test-spawn-pipe$(EXEEXT): $(test_spawn_pipe_OBJECTS) $(test_spawn_pipe_DEPENDENCIES)
- @rm -f test-spawn-pipe$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(test_spawn_pipe_OBJECTS) $(test_spawn_pipe_LDADD) $(LIBS)
-test-stat$(EXEEXT): $(test_stat_OBJECTS) $(test_stat_DEPENDENCIES)
+
+test-spawn-pipe-child$(EXEEXT): $(test_spawn_pipe_child_OBJECTS) $(test_spawn_pipe_child_DEPENDENCIES) $(EXTRA_test_spawn_pipe_child_DEPENDENCIES)
+ @rm -f test-spawn-pipe-child$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_spawn_pipe_child_OBJECTS) $(test_spawn_pipe_child_LDADD) $(LIBS)
+
+test-spawn-pipe-main$(EXEEXT): $(test_spawn_pipe_main_OBJECTS) $(test_spawn_pipe_main_DEPENDENCIES) $(EXTRA_test_spawn_pipe_main_DEPENDENCIES)
+ @rm -f test-spawn-pipe-main$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_spawn_pipe_main_OBJECTS) $(test_spawn_pipe_main_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)
+
+test-stdbool$(EXEEXT): $(test_stdbool_OBJECTS) $(test_stdbool_DEPENDENCIES) $(EXTRA_test_stdbool_DEPENDENCIES)
@rm -f test-stdbool$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_stdbool_OBJECTS) $(test_stdbool_LDADD) $(LIBS)
-test-stddef$(EXEEXT): $(test_stddef_OBJECTS) $(test_stddef_DEPENDENCIES)
+
+test-stddef$(EXEEXT): $(test_stddef_OBJECTS) $(test_stddef_DEPENDENCIES) $(EXTRA_test_stddef_DEPENDENCIES)
@rm -f test-stddef$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_stddef_OBJECTS) $(test_stddef_LDADD) $(LIBS)
-test-stdint$(EXEEXT): $(test_stdint_OBJECTS) $(test_stdint_DEPENDENCIES)
+
+test-stdint$(EXEEXT): $(test_stdint_OBJECTS) $(test_stdint_DEPENDENCIES) $(EXTRA_test_stdint_DEPENDENCIES)
@rm -f test-stdint$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_stdint_OBJECTS) $(test_stdint_LDADD) $(LIBS)
-test-stdio$(EXEEXT): $(test_stdio_OBJECTS) $(test_stdio_DEPENDENCIES)
+
+test-stdio$(EXEEXT): $(test_stdio_OBJECTS) $(test_stdio_DEPENDENCIES) $(EXTRA_test_stdio_DEPENDENCIES)
@rm -f test-stdio$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_stdio_OBJECTS) $(test_stdio_LDADD) $(LIBS)
-test-stdio-c++$(EXEEXT): $(test_stdio_c___OBJECTS) $(test_stdio_c___DEPENDENCIES)
+
+test-stdio-c++$(EXEEXT): $(test_stdio_c___OBJECTS) $(test_stdio_c___DEPENDENCIES) $(EXTRA_test_stdio_c___DEPENDENCIES)
@rm -f test-stdio-c++$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(test_stdio_c___OBJECTS) $(test_stdio_c___LDADD) $(LIBS)
-test-stdlib$(EXEEXT): $(test_stdlib_OBJECTS) $(test_stdlib_DEPENDENCIES)
+
+test-stdlib$(EXEEXT): $(test_stdlib_OBJECTS) $(test_stdlib_DEPENDENCIES) $(EXTRA_test_stdlib_DEPENDENCIES)
@rm -f test-stdlib$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_stdlib_OBJECTS) $(test_stdlib_LDADD) $(LIBS)
-test-stdlib-c++$(EXEEXT): $(test_stdlib_c___OBJECTS) $(test_stdlib_c___DEPENDENCIES)
+
+test-stdlib-c++$(EXEEXT): $(test_stdlib_c___OBJECTS) $(test_stdlib_c___DEPENDENCIES) $(EXTRA_test_stdlib_c___DEPENDENCIES)
@rm -f test-stdlib-c++$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(test_stdlib_c___OBJECTS) $(test_stdlib_c___LDADD) $(LIBS)
-test-strchrnul$(EXEEXT): $(test_strchrnul_OBJECTS) $(test_strchrnul_DEPENDENCIES)
+
+test-strchrnul$(EXEEXT): $(test_strchrnul_OBJECTS) $(test_strchrnul_DEPENDENCIES) $(EXTRA_test_strchrnul_DEPENDENCIES)
@rm -f test-strchrnul$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_strchrnul_OBJECTS) $(test_strchrnul_LDADD) $(LIBS)
-test-strerror$(EXEEXT): $(test_strerror_OBJECTS) $(test_strerror_DEPENDENCIES)
+
+test-strerror$(EXEEXT): $(test_strerror_OBJECTS) $(test_strerror_DEPENDENCIES) $(EXTRA_test_strerror_DEPENDENCIES)
@rm -f test-strerror$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_strerror_OBJECTS) $(test_strerror_LDADD) $(LIBS)
-test-string$(EXEEXT): $(test_string_OBJECTS) $(test_string_DEPENDENCIES)
+
+test-string$(EXEEXT): $(test_string_OBJECTS) $(test_string_DEPENDENCIES) $(EXTRA_test_string_DEPENDENCIES)
@rm -f test-string$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_string_OBJECTS) $(test_string_LDADD) $(LIBS)
-test-string-c++$(EXEEXT): $(test_string_c___OBJECTS) $(test_string_c___DEPENDENCIES)
+
+test-string-c++$(EXEEXT): $(test_string_c___OBJECTS) $(test_string_c___DEPENDENCIES) $(EXTRA_test_string_c___DEPENDENCIES)
@rm -f test-string-c++$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(test_string_c___OBJECTS) $(test_string_c___LDADD) $(LIBS)
-test-strnlen$(EXEEXT): $(test_strnlen_OBJECTS) $(test_strnlen_DEPENDENCIES)
+
+test-strnlen$(EXEEXT): $(test_strnlen_OBJECTS) $(test_strnlen_DEPENDENCIES) $(EXTRA_test_strnlen_DEPENDENCIES)
@rm -f test-strnlen$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_strnlen_OBJECTS) $(test_strnlen_LDADD) $(LIBS)
-test-strsignal$(EXEEXT): $(test_strsignal_OBJECTS) $(test_strsignal_DEPENDENCIES)
+
+test-strsignal$(EXEEXT): $(test_strsignal_OBJECTS) $(test_strsignal_DEPENDENCIES) $(EXTRA_test_strsignal_DEPENDENCIES)
@rm -f test-strsignal$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_strsignal_OBJECTS) $(test_strsignal_LDADD) $(LIBS)
-test-strstr$(EXEEXT): $(test_strstr_OBJECTS) $(test_strstr_DEPENDENCIES)
+
+test-strstr$(EXEEXT): $(test_strstr_OBJECTS) $(test_strstr_DEPENDENCIES) $(EXTRA_test_strstr_DEPENDENCIES)
@rm -f test-strstr$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_strstr_OBJECTS) $(test_strstr_LDADD) $(LIBS)
-test-strtod$(EXEEXT): $(test_strtod_OBJECTS) $(test_strtod_DEPENDENCIES)
+
+test-strtod$(EXEEXT): $(test_strtod_OBJECTS) $(test_strtod_DEPENDENCIES) $(EXTRA_test_strtod_DEPENDENCIES)
@rm -f test-strtod$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_strtod_OBJECTS) $(test_strtod_LDADD) $(LIBS)
-test-symlink$(EXEEXT): $(test_symlink_OBJECTS) $(test_symlink_DEPENDENCIES)
+
+test-symlink$(EXEEXT): $(test_symlink_OBJECTS) $(test_symlink_DEPENDENCIES) $(EXTRA_test_symlink_DEPENDENCIES)
@rm -f test-symlink$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_symlink_OBJECTS) $(test_symlink_LDADD) $(LIBS)
-test-sys_stat$(EXEEXT): $(test_sys_stat_OBJECTS) $(test_sys_stat_DEPENDENCIES)
+
+test-sys_stat$(EXEEXT): $(test_sys_stat_OBJECTS) $(test_sys_stat_DEPENDENCIES) $(EXTRA_test_sys_stat_DEPENDENCIES)
@rm -f test-sys_stat$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_sys_stat_OBJECTS) $(test_sys_stat_LDADD) $(LIBS)
-test-sys_stat-c++$(EXEEXT): $(test_sys_stat_c___OBJECTS) $(test_sys_stat_c___DEPENDENCIES)
+
+test-sys_stat-c++$(EXEEXT): $(test_sys_stat_c___OBJECTS) $(test_sys_stat_c___DEPENDENCIES) $(EXTRA_test_sys_stat_c___DEPENDENCIES)
@rm -f test-sys_stat-c++$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(test_sys_stat_c___OBJECTS) $(test_sys_stat_c___LDADD) $(LIBS)
-test-sys_time$(EXEEXT): $(test_sys_time_OBJECTS) $(test_sys_time_DEPENDENCIES)
+
+test-sys_time$(EXEEXT): $(test_sys_time_OBJECTS) $(test_sys_time_DEPENDENCIES) $(EXTRA_test_sys_time_DEPENDENCIES)
@rm -f test-sys_time$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_sys_time_OBJECTS) $(test_sys_time_LDADD) $(LIBS)
-test-sys_time-c++$(EXEEXT): $(test_sys_time_c___OBJECTS) $(test_sys_time_c___DEPENDENCIES)
+
+test-sys_time-c++$(EXEEXT): $(test_sys_time_c___OBJECTS) $(test_sys_time_c___DEPENDENCIES) $(EXTRA_test_sys_time_c___DEPENDENCIES)
@rm -f test-sys_time-c++$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(test_sys_time_c___OBJECTS) $(test_sys_time_c___LDADD) $(LIBS)
-test-sys_wait$(EXEEXT): $(test_sys_wait_OBJECTS) $(test_sys_wait_DEPENDENCIES)
+
+test-sys_types$(EXEEXT): $(test_sys_types_OBJECTS) $(test_sys_types_DEPENDENCIES) $(EXTRA_test_sys_types_DEPENDENCIES)
+ @rm -f test-sys_types$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_sys_types_OBJECTS) $(test_sys_types_LDADD) $(LIBS)
+
+test-sys_types-c++$(EXEEXT): $(test_sys_types_c___OBJECTS) $(test_sys_types_c___DEPENDENCIES) $(EXTRA_test_sys_types_c___DEPENDENCIES)
+ @rm -f test-sys_types-c++$(EXEEXT)
+ $(AM_V_CXXLD)$(CXXLINK) $(test_sys_types_c___OBJECTS) $(test_sys_types_c___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-sys_wait-c++$(EXEEXT): $(test_sys_wait_c___OBJECTS) $(test_sys_wait_c___DEPENDENCIES)
+
+test-sys_wait-c++$(EXEEXT): $(test_sys_wait_c___OBJECTS) $(test_sys_wait_c___DEPENDENCIES) $(EXTRA_test_sys_wait_c___DEPENDENCIES)
@rm -f test-sys_wait-c++$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(test_sys_wait_c___OBJECTS) $(test_sys_wait_c___LDADD) $(LIBS)
-test-time$(EXEEXT): $(test_time_OBJECTS) $(test_time_DEPENDENCIES)
+
+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-time-c++$(EXEEXT): $(test_time_c___OBJECTS) $(test_time_c___DEPENDENCIES)
+
+test-time-c++$(EXEEXT): $(test_time_c___OBJECTS) $(test_time_c___DEPENDENCIES) $(EXTRA_test_time_c___DEPENDENCIES)
@rm -f test-time-c++$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(test_time_c___OBJECTS) $(test_time_c___LDADD) $(LIBS)
-test-unistd$(EXEEXT): $(test_unistd_OBJECTS) $(test_unistd_DEPENDENCIES)
+
+test-unistd$(EXEEXT): $(test_unistd_OBJECTS) $(test_unistd_DEPENDENCIES) $(EXTRA_test_unistd_DEPENDENCIES)
@rm -f test-unistd$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_unistd_OBJECTS) $(test_unistd_LDADD) $(LIBS)
-test-unistd-c++$(EXEEXT): $(test_unistd_c___OBJECTS) $(test_unistd_c___DEPENDENCIES)
+
+test-unistd-c++$(EXEEXT): $(test_unistd_c___OBJECTS) $(test_unistd_c___DEPENDENCIES) $(EXTRA_test_unistd_c___DEPENDENCIES)
@rm -f test-unistd-c++$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(test_unistd_c___OBJECTS) $(test_unistd_c___LDADD) $(LIBS)
-test-unsetenv$(EXEEXT): $(test_unsetenv_OBJECTS) $(test_unsetenv_DEPENDENCIES)
+
+test-unsetenv$(EXEEXT): $(test_unsetenv_OBJECTS) $(test_unsetenv_DEPENDENCIES) $(EXTRA_test_unsetenv_DEPENDENCIES)
@rm -f test-unsetenv$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_unsetenv_OBJECTS) $(test_unsetenv_LDADD) $(LIBS)
-test-vasnprintf$(EXEEXT): $(test_vasnprintf_OBJECTS) $(test_vasnprintf_DEPENDENCIES)
+
+test-vasnprintf$(EXEEXT): $(test_vasnprintf_OBJECTS) $(test_vasnprintf_DEPENDENCIES) $(EXTRA_test_vasnprintf_DEPENDENCIES)
@rm -f test-vasnprintf$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_vasnprintf_OBJECTS) $(test_vasnprintf_LDADD) $(LIBS)
-test-vasprintf$(EXEEXT): $(test_vasprintf_OBJECTS) $(test_vasprintf_DEPENDENCIES)
+
+test-vasprintf$(EXEEXT): $(test_vasprintf_OBJECTS) $(test_vasprintf_DEPENDENCIES) $(EXTRA_test_vasprintf_DEPENDENCIES)
@rm -f test-vasprintf$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_vasprintf_OBJECTS) $(test_vasprintf_LDADD) $(LIBS)
-test-vasprintf-posix$(EXEEXT): $(test_vasprintf_posix_OBJECTS) $(test_vasprintf_posix_DEPENDENCIES)
+
+test-vasprintf-posix$(EXEEXT): $(test_vasprintf_posix_OBJECTS) $(test_vasprintf_posix_DEPENDENCIES) $(EXTRA_test_vasprintf_posix_DEPENDENCIES)
@rm -f test-vasprintf-posix$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_vasprintf_posix_OBJECTS) $(test_vasprintf_posix_LDADD) $(LIBS)
-test-verify$(EXEEXT): $(test_verify_OBJECTS) $(test_verify_DEPENDENCIES)
+
+test-verify$(EXEEXT): $(test_verify_OBJECTS) $(test_verify_DEPENDENCIES) $(EXTRA_test_verify_DEPENDENCIES)
@rm -f test-verify$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_verify_OBJECTS) $(test_verify_LDADD) $(LIBS)
-test-version-etc$(EXEEXT): $(test_version_etc_OBJECTS) $(test_version_etc_DEPENDENCIES)
+
+test-version-etc$(EXEEXT): $(test_version_etc_OBJECTS) $(test_version_etc_DEPENDENCIES) $(EXTRA_test_version_etc_DEPENDENCIES)
@rm -f test-version-etc$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_version_etc_OBJECTS) $(test_version_etc_LDADD) $(LIBS)
-test-wchar$(EXEEXT): $(test_wchar_OBJECTS) $(test_wchar_DEPENDENCIES)
+
+test-wchar$(EXEEXT): $(test_wchar_OBJECTS) $(test_wchar_DEPENDENCIES) $(EXTRA_test_wchar_DEPENDENCIES)
@rm -f test-wchar$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_wchar_OBJECTS) $(test_wchar_LDADD) $(LIBS)
-test-wchar-c++$(EXEEXT): $(test_wchar_c___OBJECTS) $(test_wchar_c___DEPENDENCIES)
+
+test-wchar-c++$(EXEEXT): $(test_wchar_c___OBJECTS) $(test_wchar_c___DEPENDENCIES) $(EXTRA_test_wchar_c___DEPENDENCIES)
@rm -f test-wchar-c++$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(test_wchar_c___OBJECTS) $(test_wchar_c___LDADD) $(LIBS)
-test-wcrtomb$(EXEEXT): $(test_wcrtomb_OBJECTS) $(test_wcrtomb_DEPENDENCIES)
+
+test-wcrtomb$(EXEEXT): $(test_wcrtomb_OBJECTS) $(test_wcrtomb_DEPENDENCIES) $(EXTRA_test_wcrtomb_DEPENDENCIES)
@rm -f test-wcrtomb$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_wcrtomb_OBJECTS) $(test_wcrtomb_LDADD) $(LIBS)
-test-wcrtomb-w32$(EXEEXT): $(test_wcrtomb_w32_OBJECTS) $(test_wcrtomb_w32_DEPENDENCIES)
+
+test-wcrtomb-w32$(EXEEXT): $(test_wcrtomb_w32_OBJECTS) $(test_wcrtomb_w32_DEPENDENCIES) $(EXTRA_test_wcrtomb_w32_DEPENDENCIES)
@rm -f test-wcrtomb-w32$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_wcrtomb_w32_OBJECTS) $(test_wcrtomb_w32_LDADD) $(LIBS)
-test-wctype-h$(EXEEXT): $(test_wctype_h_OBJECTS) $(test_wctype_h_DEPENDENCIES)
+
+test-wctype-h$(EXEEXT): $(test_wctype_h_OBJECTS) $(test_wctype_h_DEPENDENCIES) $(EXTRA_test_wctype_h_DEPENDENCIES)
@rm -f test-wctype-h$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_wctype_h_OBJECTS) $(test_wctype_h_LDADD) $(LIBS)
-test-wctype-h-c++$(EXEEXT): $(test_wctype_h_c___OBJECTS) $(test_wctype_h_c___DEPENDENCIES)
+
+test-wctype-h-c++$(EXEEXT): $(test_wctype_h_c___OBJECTS) $(test_wctype_h_c___DEPENDENCIES) $(EXTRA_test_wctype_h_c___DEPENDENCIES)
@rm -f test-wctype-h-c++$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(test_wctype_h_c___OBJECTS) $(test_wctype_h_c___LDADD) $(LIBS)
-test-xalloc-die$(EXEEXT): $(test_xalloc_die_OBJECTS) $(test_xalloc_die_DEPENDENCIES)
+
+test-write$(EXEEXT): $(test_write_OBJECTS) $(test_write_DEPENDENCIES) $(EXTRA_test_write_DEPENDENCIES)
+ @rm -f test-write$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_write_OBJECTS) $(test_write_LDADD) $(LIBS)
+
+test-xalloc-die$(EXEEXT): $(test_xalloc_die_OBJECTS) $(test_xalloc_die_DEPENDENCIES) $(EXTRA_test_xalloc_die_DEPENDENCIES)
@rm -f test-xalloc-die$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_xalloc_die_OBJECTS) $(test_xalloc_die_LDADD) $(LIBS)
-test-xvasprintf$(EXEEXT): $(test_xvasprintf_OBJECTS) $(test_xvasprintf_DEPENDENCIES)
+
+test-xvasprintf$(EXEEXT): $(test_xvasprintf_OBJECTS) $(test_xvasprintf_DEPENDENCIES) $(EXTRA_test_xvasprintf_DEPENDENCIES)
@rm -f test-xvasprintf$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_xvasprintf_OBJECTS) $(test_xvasprintf_LDADD) $(LIBS)
@@ -2708,17 +3757,23 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@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)/ftell.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/closedir.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdopen.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)/gl_array_list.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_array_oset.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/link.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localename.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendir.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/putenv.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/randomd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/randoml.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readdir.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)/sleep.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strdup.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@
@@ -2732,36 +3787,56 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strcasecmp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strncasecmp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-canonicalize-lgpl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-chdir.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-cloexec.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-close.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-closein.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dirent-c++.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dirent.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dirname.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dup-safer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dup.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dup2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-environ.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-errno.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fclose.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fcntl-h-c++.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fcntl-h.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fcntl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fdopen.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fflush.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fflush2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fgetc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-filenamecat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-float.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fopen-safer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fopen.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fpending.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fpurge.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fputc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fread.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-freadahead.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-freading.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-frexp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-frexpl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fseek.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fseeko.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fseeko3.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fseeko4.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fstat.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftell.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftell3.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftello.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftello3.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftello4.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-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-getdtablesize.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-isnand-nolibm.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isnanf-nolibm.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isnanl-nolibm.Po@am__quote@
@@ -2772,6 +3847,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-locale-c++.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-locale-c++2.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-lseek.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-lstat.Po@am__quote@
@@ -2787,14 +3863,20 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-memchr2.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-pipe2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-posix_spawn1.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-posix_spawn2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-posix_spawn_file_actions_addclose.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-posix_spawn_file_actions_adddup2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-posix_spawn_file_actions_addopen.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-printf-frexp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-printf-frexpl.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-quotearg-simple.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-raise.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-rawmemchr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-readlink.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-regex.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-rename.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-rmdir.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sched.Po@am__quote@
@@ -2802,13 +3884,17 @@ distclean-compile:
@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-sigaction.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-signal-c++.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-signal-c++2.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-signal.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-signal-h-c++.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-signal-h-c++2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-signal-h.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-signbit.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sigpipe.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sigprocmask.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sleep.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-snprintf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-spawn-c++.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-spawn-pipe.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-spawn-pipe-child.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-spawn-pipe-main.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-spawn.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@
@@ -2834,6 +3920,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_stat.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_time-c++.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-c++.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-c++.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_wait.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-time-c++.Po@am__quote@
@@ -2853,61 +3941,66 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wcrtomb.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wctype-h-c++.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wctype-h.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-write.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-xalloc-die.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-xvasprintf.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@./$(DEPDIR)/write.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
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@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@ $(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@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@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.cc.o:
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
.cc.obj:
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
@@ -2922,57 +4015,12 @@ $(RECURSIVE_TARGETS):
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-$(RECURSIVE_CLEAN_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
@@ -2988,12 +4036,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@@ -3005,15 +4048,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$unique; \
fi; \
fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@@ -3022,458 +4061,1447 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-# To be appended to the command running the test. Handle the stdout
-# and stderr redirection, and catch the exit status.
-am__check_post = \
->$@-t 2>&1; \
-estatus=$$?; \
-if test -n '$(DISABLE_HARD_ERRORS)' \
- && test $$estatus -eq 99; then \
- estatus=1; \
-fi; \
-TERM=$$__SAVED_TERM; export TERM; \
-$(am__tty_colors); \
-xfailed=PASS; \
-case " $(XFAIL_TESTS) " in \
- *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
- xfailed=XFAIL;; \
-esac; \
-case $$estatus:$$xfailed in \
- 0:XFAIL) col=$$red; res=XPASS;; \
- 0:*) col=$$grn; res=PASS ;; \
- 77:*) col=$$blu; res=SKIP ;; \
- 99:*) col=$$red; res=FAIL ;; \
- *:XFAIL) col=$$lgn; res=XFAIL;; \
- *:*) col=$$red; res=FAIL ;; \
-esac; \
-echo "$${col}$$res$${std}: $$f"; \
-echo "$$res: $$f (exit: $$estatus)" | \
- $(am__rst_section) >$@; \
-cat $@-t >>$@; \
-rm -f $@-t
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+ rm -f $< $@
+ $(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+ @:
$(TEST_SUITE_LOG): $(TEST_LOGS)
- @$(am__sh_e_setup); \
- list='$(TEST_LOGS)'; \
- results=`for f in $$list; do \
- read line < $$f && echo "$$line" || echo FAIL; \
- done`; \
- all=`echo "$$results" | sed '/^$$/d' | wc -l | sed -e 's/^[ ]*//'`; \
- fail=`echo "$$results" | grep -c '^FAIL'`; \
- pass=`echo "$$results" | grep -c '^PASS'`; \
- skip=`echo "$$results" | grep -c '^SKIP'`; \
- xfail=`echo "$$results" | grep -c '^XFAIL'`; \
- xpass=`echo "$$results" | grep -c '^XPASS'`; \
- failures=`expr $$fail + $$xpass`; \
- all=`expr $$all - $$skip`; \
- if test "$$all" -eq 1; then tests=test; All=; \
- else tests=tests; All="All "; fi; \
- case fail=$$fail:xpass=$$xpass:xfail=$$xfail in \
- fail=0:xpass=0:xfail=0) \
- msg="$$All$$all $$tests passed. "; \
- exit=true;; \
- fail=0:xpass=0:xfail=*) \
- msg="$$All$$all $$tests behaved as expected"; \
- if test "$$xfail" -eq 1; then xfailures=failure; \
- else xfailures=failures; fi; \
- msg="$$msg ($$xfail expected $$xfailures). "; \
- exit=true;; \
- fail=*:xpass=0:xfail=*) \
- msg="$$fail of $$all $$tests failed. "; \
- exit=false;; \
- fail=*:xpass=*:xfail=*) \
- msg="$$failures of $$all $$tests did not behave as expected"; \
- if test "$$xpass" -eq 1; then xpasses=pass; \
- else xpasses=passes; fi; \
- msg="$$msg ($$xpass unexpected $$xpasses). "; \
- exit=false;; \
- *) \
- echo >&2 "incorrect case"; exit 4;; \
- esac; \
- if test "$$skip" -ne 0; then \
- if test "$$skip" -eq 1; then \
- msg="$$msg($$skip test was not run). "; \
- else \
- msg="$$msg($$skip tests were not run). "; \
- fi; \
- fi; \
+ @$(am__set_TESTS_bases); \
+ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+ redo_bases=`for i in $$bases; do \
+ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+ done`; \
+ if test -n "$$redo_bases"; then \
+ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+ if $(am__make_dryrun); then :; else \
+ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
+ fi; \
+ fi; \
+ if test -n "$$am__remaking_logs"; then \
+ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+ "recursion detected" >&2; \
+ else \
+ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+ fi; \
+ if $(am__make_dryrun); then :; else \
+ st=0; \
+ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+ for i in $$redo_bases; do \
+ test -f $$i.trs && test -r $$i.trs \
+ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+ test -f $$i.log && test -r $$i.log \
+ || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+ done; \
+ test $$st -eq 0 || exit 1; \
+ fi
+ @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+ ws='[ ]'; \
+ results=`for b in $$bases; do echo $$b.trs; done`; \
+ test -n "$$results" || results=/dev/null; \
+ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
+ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
+ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
+ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
+ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+ if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+ success=true; \
+ else \
+ success=false; \
+ fi; \
+ br='==================='; br=$$br$$br$$br$$br; \
+ result_count () \
+ { \
+ if test x"$$1" = x"--maybe-color"; then \
+ maybe_colorize=yes; \
+ elif test x"$$1" = x"--no-color"; then \
+ maybe_colorize=no; \
+ else \
+ echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+ fi; \
+ shift; \
+ desc=$$1 count=$$2; \
+ if test $$maybe_colorize = yes && test $$count -gt 0; then \
+ color_start=$$3 color_end=$$std; \
+ else \
+ color_start= color_end=; \
+ fi; \
+ echo "$${color_start}# $$desc $$count$${color_end}"; \
+ }; \
+ create_testsuite_report () \
+ { \
+ result_count $$1 "TOTAL:" $$all "$$brg"; \
+ result_count $$1 "PASS: " $$pass "$$grn"; \
+ result_count $$1 "SKIP: " $$skip "$$blu"; \
+ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+ result_count $$1 "FAIL: " $$fail "$$red"; \
+ result_count $$1 "XPASS:" $$xpass "$$red"; \
+ result_count $$1 "ERROR:" $$error "$$mgn"; \
+ }; \
{ \
echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
$(am__rst_title); \
- echo "$$msg"; \
+ create_testsuite_report --no-color; \
echo; \
echo ".. contents:: :depth: 2"; \
echo; \
- for f in $$list; do \
- read line < $$f; \
- case $$line in \
- PASS:*|XFAIL:*);; \
- *) echo; cat $$f;; \
- esac; \
- done; \
- } >$(TEST_SUITE_LOG).tmp; \
+ for b in $$bases; do echo $$b; done \
+ | $(am__create_global_log); \
+ } >$(TEST_SUITE_LOG).tmp || exit 1; \
mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
- if test "$$failures" -ne 0; then \
- msg="$${msg}See $(subdir)/$(TEST_SUITE_LOG). "; \
+ if $$success; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
+ fi; \
+ echo "$${col}$$br$${std}"; \
+ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
+ echo "$${col}$$br$${std}"; \
+ create_testsuite_report --maybe-color; \
+ echo "$$col$$br$$std"; \
+ if $$success; then :; else \
+ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
if test -n "$(PACKAGE_BUGREPORT)"; then \
- msg="$${msg}Please report to $(PACKAGE_BUGREPORT). "; \
+ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
fi; \
+ echo "$$col$$br$$std"; \
fi; \
- test x"$$VERBOSE" = x || $$exit || cat $(TEST_SUITE_LOG); \
- $(am__tty_colors); \
- if $$exit; then \
- echo $(ECHO_N) "$$grn$(ECHO_C)"; \
- else \
- echo $(ECHO_N) "$$red$(ECHO_C)"; \
- fi; \
- echo "$$msg" | $(am__text_box); \
- echo $(ECHO_N) "$$std$(ECHO_C)"; \
- $$exit
+ $$success || exit 1
-# Run all the tests.
check-TESTS:
- @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+ @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+ @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
- @list='$(TEST_LOGS)'; \
- list=`for f in $$list; do \
- test .log = $$f || echo $$f; \
- done | tr '\012\015' ' '`; \
- $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$list"
-
-.log.html:
- @list='$(RST2HTML) $$RST2HTML rst2html rst2html.py'; \
- for r2h in $$list; do \
- if ($$r2h --version) >/dev/null 2>&1; then \
- R2H=$$r2h; \
- fi; \
- done; \
- if test -z "$$R2H"; then \
- echo >&2 "cannot find rst2html, cannot create $@"; \
- exit 2; \
- fi; \
- $$R2H $< >$@.tmp
- @mv $@.tmp $@
-
-# Be sure to run check first, and then to convert the result.
-# Beware of concurrent executions. Run "check" not "check-TESTS", as
-# check-SCRIPTS and other dependencies are rebuilt by the former only.
-# And expect check to fail.
-check-html:
- @if $(MAKE) $(AM_MAKEFLAGS) check; then \
- rv=0; else rv=$$?; \
- fi; \
- $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) || exit 4; \
- exit $$rv
-recheck recheck-html:
- @target=`echo $@ | sed 's,^re,,'`; \
- list='$(TEST_LOGS)'; \
- list=`for f in $$list; do \
- test -f $$f || continue; \
- if read line < $$f; then \
- case $$line in FAIL*|XPASS*) echo $$f;; esac; \
- else echo $$f; fi; \
- done | tr '\012\015' ' '`; \
- $(MAKE) $(AM_MAKEFLAGS) $$target AM_MAKEFLAGS='$(AM_MAKEFLAGS) TEST_LOGS="'"$$list"'"'
+ @set +e; $(am__set_TESTS_bases); \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+ exit $$?;
+recheck: all $(check_LIBRARIES) $(check_PROGRAMS)
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ bases=`for i in $$bases; do echo $$i; done \
+ | $(am__list_recheck_tests)` || exit 1; \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ log_list=`echo $$log_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+ am__force_recheck=am--force-recheck \
+ TEST_LOGS="$$log_list"; \
+ exit $$?
test-alloca-opt.log: test-alloca-opt$(EXEEXT)
- @p='test-alloca-opt$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-alloca-opt$(EXEEXT)'; \
+ b='test-alloca-opt'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-array_list.log: test-array_list$(EXEEXT)
- @p='test-array_list$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-array_list$(EXEEXT)'; \
+ b='test-array_list'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-array_oset.log: test-array_oset$(EXEEXT)
- @p='test-array_oset$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-array_oset$(EXEEXT)'; \
+ b='test-array_oset'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-avltree_oset.log: test-avltree_oset$(EXEEXT)
- @p='test-avltree_oset$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-avltree_oset$(EXEEXT)'; \
+ b='test-avltree_oset'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-binary-io.sh.log: test-binary-io.sh
- @p='test-binary-io.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-binary-io.sh'; \
+ b='test-binary-io.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-btowc1.sh.log: test-btowc1.sh
- @p='test-btowc1.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-btowc1.sh'; \
+ b='test-btowc1.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-btowc2.sh.log: test-btowc2.sh
- @p='test-btowc2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-btowc2.sh'; \
+ b='test-btowc2.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-c-ctype.log: test-c-ctype$(EXEEXT)
- @p='test-c-ctype$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-c-ctype$(EXEEXT)'; \
+ b='test-c-ctype'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-c-stack.sh.log: test-c-stack.sh
- @p='test-c-stack.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-c-stack.sh'; \
+ b='test-c-stack.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-stack2.sh.log: test-c-stack2.sh
- @p='test-c-stack2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-c-stack2.sh'; \
+ b='test-c-stack2.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-c-strcase.sh.log: test-c-strcase.sh
- @p='test-c-strcase.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-c-strcase.sh'; \
+ b='test-c-strcase.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-canonicalize-lgpl.log: test-canonicalize-lgpl$(EXEEXT)
- @p='test-canonicalize-lgpl$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-canonicalize-lgpl$(EXEEXT)'; \
+ b='test-canonicalize-lgpl'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-chdir.log: test-chdir$(EXEEXT)
+ @p='test-chdir$(EXEEXT)'; \
+ b='test-chdir'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-cloexec.log: test-cloexec$(EXEEXT)
- @p='test-cloexec$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-cloexec$(EXEEXT)'; \
+ b='test-cloexec'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-closein.sh.log: test-closein.sh
- @p='test-closein.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-closein.sh'; \
+ b='test-closein.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-dirent-c++.log: test-dirent-c++$(EXEEXT)
+ @p='test-dirent-c++$(EXEEXT)'; \
+ b='test-dirent-c++'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-dirent.log: test-dirent$(EXEEXT)
+ @p='test-dirent$(EXEEXT)'; \
+ b='test-dirent'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-dirname.log: test-dirname$(EXEEXT)
- @p='test-dirname$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-dirname$(EXEEXT)'; \
+ b='test-dirname'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-dup.log: test-dup$(EXEEXT)
+ @p='test-dup$(EXEEXT)'; \
+ b='test-dup'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-dup2.log: test-dup2$(EXEEXT)
- @p='test-dup2$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-dup2$(EXEEXT)'; \
+ b='test-dup2'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-environ.log: test-environ$(EXEEXT)
- @p='test-environ$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-environ$(EXEEXT)'; \
+ b='test-environ'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-errno.log: test-errno$(EXEEXT)
- @p='test-errno$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-errno$(EXEEXT)'; \
+ b='test-errno'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-fclose.log: test-fclose$(EXEEXT)
+ @p='test-fclose$(EXEEXT)'; \
+ b='test-fclose'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-c++.log: test-fcntl-h-c++$(EXEEXT)
- @p='test-fcntl-h-c++$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-fcntl-h-c++$(EXEEXT)'; \
+ b='test-fcntl-h-c++'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-fcntl-h.log: test-fcntl-h$(EXEEXT)
- @p='test-fcntl-h$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-fcntl-h$(EXEEXT)'; \
+ b='test-fcntl-h'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-fcntl.log: test-fcntl$(EXEEXT)
- @p='test-fcntl$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-fcntl$(EXEEXT)'; \
+ b='test-fcntl'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-fflush.log: test-fflush$(EXEEXT)
- @p='test-fflush$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-fflush$(EXEEXT)'; \
+ b='test-fflush'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-fflush2.sh.log: test-fflush2.sh
- @p='test-fflush2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-fflush2.sh'; \
+ b='test-fflush2.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-filenamecat.log: test-filenamecat$(EXEEXT)
- @p='test-filenamecat$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-filenamecat$(EXEEXT)'; \
+ b='test-filenamecat'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-fopen-safer.log: test-fopen-safer$(EXEEXT)
- @p='test-fopen-safer$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-fopen-safer$(EXEEXT)'; \
+ b='test-fopen-safer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-fopen.log: test-fopen$(EXEEXT)
- @p='test-fopen$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-fopen$(EXEEXT)'; \
+ b='test-fopen'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-fpending.sh.log: test-fpending.sh
- @p='test-fpending.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-fpending.sh'; \
+ b='test-fpending.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-fpurge.log: test-fpurge$(EXEEXT)
- @p='test-fpurge$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-fpurge$(EXEEXT)'; \
+ b='test-fpurge'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-freadahead.sh.log: test-freadahead.sh
- @p='test-freadahead.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-freadahead.sh'; \
+ b='test-freadahead.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-freading.log: test-freading$(EXEEXT)
- @p='test-freading$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-freading$(EXEEXT)'; \
+ b='test-freading'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-frexp-nolibm.log: test-frexp-nolibm$(EXEEXT)
- @p='test-frexp-nolibm$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-frexp-nolibm$(EXEEXT)'; \
+ b='test-frexp-nolibm'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-frexpl-nolibm.log: test-frexpl-nolibm$(EXEEXT)
- @p='test-frexpl-nolibm$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-frexpl-nolibm$(EXEEXT)'; \
+ b='test-frexpl-nolibm'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-fseek.sh.log: test-fseek.sh
+ @p='test-fseek.sh'; \
+ b='test-fseek.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-fseek2.sh.log: test-fseek2.sh
+ @p='test-fseek2.sh'; \
+ b='test-fseek2.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-fseeko.sh.log: test-fseeko.sh
- @p='test-fseeko.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-fseeko.sh'; \
+ b='test-fseeko.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-fseeko2.sh.log: test-fseeko2.sh
- @p='test-fseeko2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-fseeko2.sh'; \
+ b='test-fseeko2.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-fseeko3.sh.log: test-fseeko3.sh
+ @p='test-fseeko3.sh'; \
+ b='test-fseeko3.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-fseeko4.sh.log: test-fseeko4.sh
+ @p='test-fseeko4.sh'; \
+ b='test-fseeko4.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-ftell.sh.log: test-ftell.sh
- @p='test-ftell.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-ftell.sh'; \
+ b='test-ftell.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-ftell2.sh.log: test-ftell2.sh
- @p='test-ftell2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-ftell2.sh'; \
+ b='test-ftell2.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-ftell3.log: test-ftell3$(EXEEXT)
- @p='test-ftell3$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-ftell3$(EXEEXT)'; \
+ b='test-ftell3'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-ftello.sh.log: test-ftello.sh
- @p='test-ftello.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-ftello.sh'; \
+ b='test-ftello.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-ftello2.sh.log: test-ftello2.sh
- @p='test-ftello2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-ftello2.sh'; \
+ b='test-ftello2.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-ftello3.log: test-ftello3$(EXEEXT)
- @p='test-ftello3$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-ftello3$(EXEEXT)'; \
+ b='test-ftello3'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-ftello4.sh.log: test-ftello4.sh
+ @p='test-ftello4.sh'; \
+ b='test-ftello4.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-getdtablesize.log: test-getdtablesize$(EXEEXT)
- @p='test-getdtablesize$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-getdtablesize$(EXEEXT)'; \
+ b='test-getdtablesize'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-getopt.log: test-getopt$(EXEEXT)
- @p='test-getopt$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-getopt$(EXEEXT)'; \
+ b='test-getopt'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-gettimeofday.log: test-gettimeofday$(EXEEXT)
- @p='test-gettimeofday$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-gettimeofday$(EXEEXT)'; \
+ b='test-gettimeofday'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-ignore-value.log: test-ignore-value$(EXEEXT)
- @p='test-ignore-value$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-ignore-value$(EXEEXT)'; \
+ b='test-ignore-value'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-intprops.log: test-intprops$(EXEEXT)
+ @p='test-intprops$(EXEEXT)'; \
+ b='test-intprops'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-inttypes.log: test-inttypes$(EXEEXT)
+ @p='test-inttypes$(EXEEXT)'; \
+ b='test-inttypes'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-isnand-nolibm.log: test-isnand-nolibm$(EXEEXT)
- @p='test-isnand-nolibm$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-isnand-nolibm$(EXEEXT)'; \
+ b='test-isnand-nolibm'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-isnanf-nolibm.log: test-isnanf-nolibm$(EXEEXT)
- @p='test-isnanf-nolibm$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-isnanf-nolibm$(EXEEXT)'; \
+ b='test-isnanf-nolibm'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-isnanl-nolibm.log: test-isnanl-nolibm$(EXEEXT)
- @p='test-isnanl-nolibm$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-isnanl-nolibm$(EXEEXT)'; \
+ b='test-isnanl-nolibm'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-c++.log: test-langinfo-c++$(EXEEXT)
- @p='test-langinfo-c++$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-langinfo-c++$(EXEEXT)'; \
+ b='test-langinfo-c++'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-langinfo.log: test-langinfo$(EXEEXT)
- @p='test-langinfo$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-langinfo$(EXEEXT)'; \
+ b='test-langinfo'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-link.log: test-link$(EXEEXT)
- @p='test-link$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-link$(EXEEXT)'; \
+ b='test-link'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-linkedhash_list.log: test-linkedhash_list$(EXEEXT)
- @p='test-linkedhash_list$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-linkedhash_list$(EXEEXT)'; \
+ b='test-linkedhash_list'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-c++.log: test-locale-c++$(EXEEXT)
- @p='test-locale-c++$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-locale-c++$(EXEEXT)'; \
+ b='test-locale-c++'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-locale.log: test-locale$(EXEEXT)
- @p='test-locale$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-locale$(EXEEXT)'; \
+ b='test-locale'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-localeconv.log: test-localeconv$(EXEEXT)
+ @p='test-localeconv$(EXEEXT)'; \
+ b='test-localeconv'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-localename.log: test-localename$(EXEEXT)
- @p='test-localename$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-localename$(EXEEXT)'; \
+ b='test-localename'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-lseek.sh.log: test-lseek.sh
- @p='test-lseek.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-lseek.sh'; \
+ b='test-lseek.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-lstat.log: test-lstat$(EXEEXT)
- @p='test-lstat$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-lstat$(EXEEXT)'; \
+ b='test-lstat'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-malloc-gnu.log: test-malloc-gnu$(EXEEXT)
- @p='test-malloc-gnu$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-malloc-gnu$(EXEEXT)'; \
+ b='test-malloc-gnu'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-malloca.log: test-malloca$(EXEEXT)
- @p='test-malloca$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-malloca$(EXEEXT)'; \
+ b='test-malloca'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-math-c++.log: test-math-c++$(EXEEXT)
- @p='test-math-c++$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-math-c++$(EXEEXT)'; \
+ b='test-math-c++'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-math.log: test-math$(EXEEXT)
- @p='test-math$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-math$(EXEEXT)'; \
+ b='test-math'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-mbrtowc1.sh.log: test-mbrtowc1.sh
- @p='test-mbrtowc1.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-mbrtowc1.sh'; \
+ b='test-mbrtowc1.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-mbrtowc2.sh.log: test-mbrtowc2.sh
- @p='test-mbrtowc2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-mbrtowc2.sh'; \
+ b='test-mbrtowc2.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-mbrtowc3.sh.log: test-mbrtowc3.sh
- @p='test-mbrtowc3.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-mbrtowc3.sh'; \
+ b='test-mbrtowc3.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-mbrtowc4.sh.log: test-mbrtowc4.sh
- @p='test-mbrtowc4.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-mbrtowc4.sh'; \
+ b='test-mbrtowc4.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-mbrtowc-w32-1.sh.log: test-mbrtowc-w32-1.sh
- @p='test-mbrtowc-w32-1.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-mbrtowc-w32-1.sh'; \
+ b='test-mbrtowc-w32-1.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-mbrtowc-w32-2.sh.log: test-mbrtowc-w32-2.sh
- @p='test-mbrtowc-w32-2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-mbrtowc-w32-2.sh'; \
+ b='test-mbrtowc-w32-2.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-mbrtowc-w32-3.sh.log: test-mbrtowc-w32-3.sh
- @p='test-mbrtowc-w32-3.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-mbrtowc-w32-3.sh'; \
+ b='test-mbrtowc-w32-3.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-mbrtowc-w32-4.sh.log: test-mbrtowc-w32-4.sh
- @p='test-mbrtowc-w32-4.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-mbrtowc-w32-4.sh'; \
+ b='test-mbrtowc-w32-4.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-mbrtowc-w32-5.sh.log: test-mbrtowc-w32-5.sh
- @p='test-mbrtowc-w32-5.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-mbrtowc-w32-5.sh'; \
+ b='test-mbrtowc-w32-5.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-mbsinit.sh.log: test-mbsinit.sh
- @p='test-mbsinit.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-mbsinit.sh'; \
+ b='test-mbsinit.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-memchr.log: test-memchr$(EXEEXT)
- @p='test-memchr$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-memchr$(EXEEXT)'; \
+ b='test-memchr'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-memchr2.log: test-memchr2$(EXEEXT)
- @p='test-memchr2$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-memchr2$(EXEEXT)'; \
+ b='test-memchr2'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-nl_langinfo.sh.log: test-nl_langinfo.sh
- @p='test-nl_langinfo.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-nl_langinfo.sh'; \
+ b='test-nl_langinfo.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-open.log: test-open$(EXEEXT)
- @p='test-open$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-open$(EXEEXT)'; \
+ b='test-open'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-pathmax.log: test-pathmax$(EXEEXT)
+ @p='test-pathmax$(EXEEXT)'; \
+ b='test-pathmax'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-pipe2.log: test-pipe2$(EXEEXT)
- @p='test-pipe2$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-pipe2$(EXEEXT)'; \
+ b='test-pipe2'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-posix_spawn_file_actions_addclose.log: test-posix_spawn_file_actions_addclose$(EXEEXT)
+ @p='test-posix_spawn_file_actions_addclose$(EXEEXT)'; \
+ b='test-posix_spawn_file_actions_addclose'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-posix_spawn_file_actions_adddup2.log: test-posix_spawn_file_actions_adddup2$(EXEEXT)
+ @p='test-posix_spawn_file_actions_adddup2$(EXEEXT)'; \
+ b='test-posix_spawn_file_actions_adddup2'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-posix_spawn_file_actions_addopen.log: test-posix_spawn_file_actions_addopen$(EXEEXT)
+ @p='test-posix_spawn_file_actions_addopen$(EXEEXT)'; \
+ b='test-posix_spawn_file_actions_addopen'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-posix_spawn1.log: test-posix_spawn1$(EXEEXT)
- @p='test-posix_spawn1$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-posix_spawn1$(EXEEXT)'; \
+ b='test-posix_spawn1'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-posix_spawn2.log: test-posix_spawn2$(EXEEXT)
- @p='test-posix_spawn2$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-posix_spawn2$(EXEEXT)'; \
+ b='test-posix_spawn2'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-printf-frexp.log: test-printf-frexp$(EXEEXT)
- @p='test-printf-frexp$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-printf-frexp$(EXEEXT)'; \
+ b='test-printf-frexp'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-printf-frexpl.log: test-printf-frexpl$(EXEEXT)
- @p='test-printf-frexpl$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-printf-frexpl$(EXEEXT)'; \
+ b='test-printf-frexpl'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-quotearg-simple.log: test-quotearg-simple$(EXEEXT)
- @p='test-quotearg-simple$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-quotearg-simple$(EXEEXT)'; \
+ b='test-quotearg-simple'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-raise.log: test-raise$(EXEEXT)
+ @p='test-raise$(EXEEXT)'; \
+ b='test-raise'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-rawmemchr$(EXEEXT)'; \
+ b='test-rawmemchr'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-readlink.log: test-readlink$(EXEEXT)
- @p='test-readlink$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-readlink$(EXEEXT)'; \
+ b='test-readlink'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-regex.log: test-regex$(EXEEXT)
+ @p='test-regex$(EXEEXT)'; \
+ b='test-regex'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-rename.log: test-rename$(EXEEXT)
- @p='test-rename$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-rename$(EXEEXT)'; \
+ b='test-rename'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-rmdir.log: test-rmdir$(EXEEXT)
- @p='test-rmdir$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-rmdir$(EXEEXT)'; \
+ b='test-rmdir'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-sched.log: test-sched$(EXEEXT)
- @p='test-sched$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-sched$(EXEEXT)'; \
+ b='test-sched'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-setenv.log: test-setenv$(EXEEXT)
- @p='test-setenv$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-setenv$(EXEEXT)'; \
+ b='test-setenv'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-setlocale1.sh.log: test-setlocale1.sh
- @p='test-setlocale1.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-setlocale1.sh'; \
+ b='test-setlocale1.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-setlocale2.sh.log: test-setlocale2.sh
- @p='test-setlocale2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-setlocale2.sh'; \
+ b='test-setlocale2.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-sigaction.log: test-sigaction$(EXEEXT)
- @p='test-sigaction$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
-test-signal-c++.log: test-signal-c++$(EXEEXT)
- @p='test-signal-c++$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
-test-signal.log: test-signal$(EXEEXT)
- @p='test-signal$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-sigaction$(EXEEXT)'; \
+ b='test-sigaction'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-signal-h-c++.log: test-signal-h-c++$(EXEEXT)
+ @p='test-signal-h-c++$(EXEEXT)'; \
+ b='test-signal-h-c++'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-signal-h.log: test-signal-h$(EXEEXT)
+ @p='test-signal-h$(EXEEXT)'; \
+ b='test-signal-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-signbit.log: test-signbit$(EXEEXT)
- @p='test-signbit$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-signbit$(EXEEXT)'; \
+ b='test-signbit'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-sigpipe.sh.log: test-sigpipe.sh
+ @p='test-sigpipe.sh'; \
+ b='test-sigpipe.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-sigprocmask.log: test-sigprocmask$(EXEEXT)
+ @p='test-sigprocmask$(EXEEXT)'; \
+ b='test-sigprocmask'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-sleep.log: test-sleep$(EXEEXT)
+ @p='test-sleep$(EXEEXT)'; \
+ b='test-sleep'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-snprintf.log: test-snprintf$(EXEEXT)
- @p='test-snprintf$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-snprintf$(EXEEXT)'; \
+ b='test-snprintf'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-spawn-c++.log: test-spawn-c++$(EXEEXT)
- @p='test-spawn-c++$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-spawn-c++$(EXEEXT)'; \
+ b='test-spawn-c++'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-spawn-pipe.sh.log: test-spawn-pipe.sh
- @p='test-spawn-pipe.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-spawn-pipe.sh'; \
+ b='test-spawn-pipe.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-spawn.log: test-spawn$(EXEEXT)
- @p='test-spawn$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-spawn$(EXEEXT)'; \
+ b='test-spawn'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-stat.log: test-stat$(EXEEXT)
- @p='test-stat$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-stat$(EXEEXT)'; \
+ b='test-stat'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-stdbool.log: test-stdbool$(EXEEXT)
- @p='test-stdbool$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-stdbool$(EXEEXT)'; \
+ b='test-stdbool'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-stddef.log: test-stddef$(EXEEXT)
- @p='test-stddef$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-stddef$(EXEEXT)'; \
+ b='test-stddef'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-stdint.log: test-stdint$(EXEEXT)
- @p='test-stdint$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-stdint$(EXEEXT)'; \
+ b='test-stdint'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-stdio-c++.log: test-stdio-c++$(EXEEXT)
- @p='test-stdio-c++$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-stdio-c++$(EXEEXT)'; \
+ b='test-stdio-c++'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-stdio.log: test-stdio$(EXEEXT)
- @p='test-stdio$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-stdio$(EXEEXT)'; \
+ b='test-stdio'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-stdlib-c++.log: test-stdlib-c++$(EXEEXT)
- @p='test-stdlib-c++$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-stdlib-c++$(EXEEXT)'; \
+ b='test-stdlib-c++'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-stdlib.log: test-stdlib$(EXEEXT)
- @p='test-stdlib$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-stdlib$(EXEEXT)'; \
+ b='test-stdlib'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-strchrnul.log: test-strchrnul$(EXEEXT)
- @p='test-strchrnul$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @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-strerror.log: test-strerror$(EXEEXT)
- @p='test-strerror$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-strerror$(EXEEXT)'; \
+ b='test-strerror'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-c++.log: test-string-c++$(EXEEXT)
- @p='test-string-c++$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-string-c++$(EXEEXT)'; \
+ b='test-string-c++'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-string.log: test-string$(EXEEXT)
- @p='test-string$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-string$(EXEEXT)'; \
+ b='test-string'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-strnlen.log: test-strnlen$(EXEEXT)
- @p='test-strnlen$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-strnlen$(EXEEXT)'; \
+ b='test-strnlen'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-strsignal.log: test-strsignal$(EXEEXT)
- @p='test-strsignal$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-strsignal$(EXEEXT)'; \
+ b='test-strsignal'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-strstr.log: test-strstr$(EXEEXT)
- @p='test-strstr$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-strstr$(EXEEXT)'; \
+ b='test-strstr'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-strtod.log: test-strtod$(EXEEXT)
- @p='test-strtod$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-strtod$(EXEEXT)'; \
+ b='test-strtod'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-symlink.log: test-symlink$(EXEEXT)
- @p='test-symlink$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-symlink$(EXEEXT)'; \
+ b='test-symlink'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-sys_stat-c++.log: test-sys_stat-c++$(EXEEXT)
- @p='test-sys_stat-c++$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-sys_stat-c++$(EXEEXT)'; \
+ b='test-sys_stat-c++'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-sys_stat.log: test-sys_stat$(EXEEXT)
- @p='test-sys_stat$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-sys_stat$(EXEEXT)'; \
+ b='test-sys_stat'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-sys_time-c++.log: test-sys_time-c++$(EXEEXT)
- @p='test-sys_time-c++$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-sys_time-c++$(EXEEXT)'; \
+ b='test-sys_time-c++'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @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-c++.log: test-sys_types-c++$(EXEEXT)
+ @p='test-sys_types-c++$(EXEEXT)'; \
+ b='test-sys_types-c++'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-c++.log: test-sys_wait-c++$(EXEEXT)
- @p='test-sys_wait-c++$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-sys_wait-c++$(EXEEXT)'; \
+ b='test-sys_wait-c++'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-sys_wait.log: test-sys_wait$(EXEEXT)
- @p='test-sys_wait$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-sys_wait$(EXEEXT)'; \
+ b='test-sys_wait'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-init.sh.log: test-init.sh
+ @p='test-init.sh'; \
+ b='test-init.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-time-c++.log: test-time-c++$(EXEEXT)
- @p='test-time-c++$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-time-c++$(EXEEXT)'; \
+ b='test-time-c++'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-time.log: test-time$(EXEEXT)
- @p='test-time$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-time$(EXEEXT)'; \
+ b='test-time'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-unistd-c++.log: test-unistd-c++$(EXEEXT)
- @p='test-unistd-c++$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-unistd-c++$(EXEEXT)'; \
+ b='test-unistd-c++'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-dup-safer.log: test-dup-safer$(EXEEXT)
- @p='test-dup-safer$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-dup-safer$(EXEEXT)'; \
+ b='test-dup-safer'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-unistd.log: test-unistd$(EXEEXT)
- @p='test-unistd$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-unistd$(EXEEXT)'; \
+ b='test-unistd'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-unsetenv.log: test-unsetenv$(EXEEXT)
- @p='test-unsetenv$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-unsetenv$(EXEEXT)'; \
+ b='test-unsetenv'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-update-copyright.sh.log: test-update-copyright.sh
- @p='test-update-copyright.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-update-copyright.sh'; \
+ b='test-update-copyright.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-vasnprintf.log: test-vasnprintf$(EXEEXT)
- @p='test-vasnprintf$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-vasnprintf$(EXEEXT)'; \
+ b='test-vasnprintf'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-vasprintf-posix.log: test-vasprintf-posix$(EXEEXT)
- @p='test-vasprintf-posix$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-vasprintf-posix$(EXEEXT)'; \
+ b='test-vasprintf-posix'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-vasprintf.log: test-vasprintf$(EXEEXT)
- @p='test-vasprintf$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-vasprintf$(EXEEXT)'; \
+ b='test-vasprintf'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-vc-list-files-git.sh.log: test-vc-list-files-git.sh
- @p='test-vc-list-files-git.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-vc-list-files-git.sh'; \
+ b='test-vc-list-files-git.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-vc-list-files-cvs.sh.log: test-vc-list-files-cvs.sh
- @p='test-vc-list-files-cvs.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-vc-list-files-cvs.sh'; \
+ b='test-vc-list-files-cvs.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-verify.log: test-verify$(EXEEXT)
- @p='test-verify$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-verify$(EXEEXT)'; \
+ b='test-verify'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-verify.sh.log: test-verify.sh
- @p='test-verify.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-verify.sh'; \
+ b='test-verify.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-version-etc.sh.log: test-version-etc.sh
- @p='test-version-etc.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-version-etc.sh'; \
+ b='test-version-etc.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-c++.log: test-wchar-c++$(EXEEXT)
- @p='test-wchar-c++$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-wchar-c++$(EXEEXT)'; \
+ b='test-wchar-c++'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-wchar.log: test-wchar$(EXEEXT)
- @p='test-wchar$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-wchar$(EXEEXT)'; \
+ b='test-wchar'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-wcrtomb.sh.log: test-wcrtomb.sh
- @p='test-wcrtomb.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-wcrtomb.sh'; \
+ b='test-wcrtomb.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-wcrtomb-w32-1.sh.log: test-wcrtomb-w32-1.sh
- @p='test-wcrtomb-w32-1.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-wcrtomb-w32-1.sh'; \
+ b='test-wcrtomb-w32-1.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-wcrtomb-w32-2.sh.log: test-wcrtomb-w32-2.sh
- @p='test-wcrtomb-w32-2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-wcrtomb-w32-2.sh'; \
+ b='test-wcrtomb-w32-2.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-wcrtomb-w32-3.sh.log: test-wcrtomb-w32-3.sh
- @p='test-wcrtomb-w32-3.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-wcrtomb-w32-3.sh'; \
+ b='test-wcrtomb-w32-3.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-wcrtomb-w32-4.sh.log: test-wcrtomb-w32-4.sh
- @p='test-wcrtomb-w32-4.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-wcrtomb-w32-4.sh'; \
+ b='test-wcrtomb-w32-4.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-wcrtomb-w32-5.sh.log: test-wcrtomb-w32-5.sh
- @p='test-wcrtomb-w32-5.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-wcrtomb-w32-5.sh'; \
+ b='test-wcrtomb-w32-5.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-wctype-h-c++.log: test-wctype-h-c++$(EXEEXT)
- @p='test-wctype-h-c++$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-wctype-h-c++$(EXEEXT)'; \
+ b='test-wctype-h-c++'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-wctype-h.log: test-wctype-h$(EXEEXT)
- @p='test-wctype-h$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-wctype-h$(EXEEXT)'; \
+ b='test-wctype-h'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-write.log: test-write$(EXEEXT)
+ @p='test-write$(EXEEXT)'; \
+ b='test-write'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-xalloc-die.sh.log: test-xalloc-die.sh
- @p='test-xalloc-die.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-xalloc-die.sh'; \
+ b='test-xalloc-die.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$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-xvasprintf.log: test-xvasprintf$(EXEEXT)
- @p='test-xvasprintf$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='test-xvasprintf$(EXEEXT)'; \
+ b='test-xvasprintf'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
.test.log:
- @p='$<'; $(am__check_pre) $(TEST_LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='$<'; \
+ $(am__set_b); \
+ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
@am__EXEEXT_TRUE@.test$(EXEEXT).log:
-@am__EXEEXT_TRUE@ @p='$<'; $(am__check_pre) $(TEST_LOG_COMPILE) "$$tst" $(am__check_post)
+@am__EXEEXT_TRUE@ @p='$<'; \
+@am__EXEEXT_TRUE@ $(am__set_b); \
+@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
+@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -3507,13 +5535,10 @@ distdir: $(DISTFILES)
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(MKDIR_P) "$(distdir)/$$subdir" \
- || exit 1; \
- fi; \
- done
- @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
@@ -3552,15 +5577,19 @@ install-am: all-am
installcheck: installcheck-recursive
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
- -test -z "$(TEST_LOGS_TMP)" || rm -f $(TEST_LOGS_TMP)
- -test -z "$(TEST_SUITE_HTML)" || rm -f $(TEST_SUITE_HTML)
+ -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
clean-generic:
@@ -3648,15 +5677,14 @@ ps-am:
uninstall-am:
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
- check-am check-html ctags-recursive install install-am \
- install-strip recheck recheck-html tags-recursive
+.MAKE: $(am__recursive_targets) all check check-am install install-am \
+ install-strip
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am check check-TESTS check-am check-html clean \
- clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \
- clean-local clean-noinstLIBRARIES clean-noinstPROGRAMS ctags \
- ctags-recursive distclean distclean-compile distclean-generic \
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+ check-TESTS check-am clean clean-checkLIBRARIES \
+ clean-checkPROGRAMS clean-generic clean-local \
+ clean-noinstLIBRARIES clean-noinstPROGRAMS cscopelist-am ctags \
+ ctags-am distclean distclean-compile distclean-generic \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
@@ -3665,45 +5693,81 @@ uninstall-am:
install-strip installcheck installcheck-am installdirs \
installdirs-am maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic \
- mostlyclean-local pdf pdf-am ps ps-am recheck recheck-html \
- tags tags-recursive uninstall uninstall-am
+ mostlyclean-local pdf pdf-am ps ps-am recheck tags tags-am \
+ uninstall uninstall-am
-# The arg-nonnull.h that gets inserted into generated .h files is the same as
-# build-aux/arg-nonnull.h, except that it has the copyright header cut off.
-arg-nonnull.h: $(top_srcdir)/build-aux/arg-nonnull.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/GL_ARG_NONNULL/,$$p' \
- < $(top_srcdir)/build-aux/arg-nonnull.h \
- > $@-t && \
- mv $@-t $@
-# The c++defs.h that gets inserted into generated .h files is the same as
-# build-aux/c++defs.h, except that it has the copyright header cut off.
-c++defs.h: $(top_srcdir)/build-aux/c++defs.h
+
+# We need the following in order to create <dirent.h> when the system
+# doesn't have one that works with the given compiler.
+dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/_GL_CXXDEFS/,$$p' \
- < $(top_srcdir)/build-aux/c++defs.h \
- > $@-t && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''HAVE_DIRENT_H''@|$(HAVE_DIRENT_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_DIRENT_H''@|$(NEXT_DIRENT_H)|g' \
+ -e 's/@''GNULIB_OPENDIR''@/$(GNULIB_OPENDIR)/g' \
+ -e 's/@''GNULIB_READDIR''@/$(GNULIB_READDIR)/g' \
+ -e 's/@''GNULIB_REWINDDIR''@/$(GNULIB_REWINDDIR)/g' \
+ -e 's/@''GNULIB_CLOSEDIR''@/$(GNULIB_CLOSEDIR)/g' \
+ -e 's/@''GNULIB_DIRFD''@/$(GNULIB_DIRFD)/g' \
+ -e 's/@''GNULIB_FDOPENDIR''@/$(GNULIB_FDOPENDIR)/g' \
+ -e 's/@''GNULIB_SCANDIR''@/$(GNULIB_SCANDIR)/g' \
+ -e 's/@''GNULIB_ALPHASORT''@/$(GNULIB_ALPHASORT)/g' \
+ -e 's/@''HAVE_OPENDIR''@/$(HAVE_OPENDIR)/g' \
+ -e 's/@''HAVE_READDIR''@/$(HAVE_READDIR)/g' \
+ -e 's/@''HAVE_REWINDDIR''@/$(HAVE_REWINDDIR)/g' \
+ -e 's/@''HAVE_CLOSEDIR''@/$(HAVE_CLOSEDIR)/g' \
+ -e 's|@''HAVE_DECL_DIRFD''@|$(HAVE_DECL_DIRFD)|g' \
+ -e 's|@''HAVE_DECL_FDOPENDIR''@|$(HAVE_DECL_FDOPENDIR)|g' \
+ -e 's|@''HAVE_FDOPENDIR''@|$(HAVE_FDOPENDIR)|g' \
+ -e 's|@''HAVE_SCANDIR''@|$(HAVE_SCANDIR)|g' \
+ -e 's|@''HAVE_ALPHASORT''@|$(HAVE_ALPHASORT)|g' \
+ -e 's|@''REPLACE_OPENDIR''@|$(REPLACE_OPENDIR)|g' \
+ -e 's|@''REPLACE_CLOSEDIR''@|$(REPLACE_CLOSEDIR)|g' \
+ -e 's|@''REPLACE_DIRFD''@|$(REPLACE_DIRFD)|g' \
+ -e 's|@''REPLACE_FDOPENDIR''@|$(REPLACE_FDOPENDIR)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/dirent.in.h; \
+ } > $@-t && \
mv $@-t $@
-# We need the following in order to create <locale.h> when the system
-# doesn't have one that provides all definitions.
-locale.h: locale.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+# We need the following in order to create <inttypes.h> 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|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ { 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_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \
- -e 's|@''GNULIB_SETLOCALE''@|$(GNULIB_SETLOCALE)|g' \
- -e 's|@''GNULIB_DUPLOCALE''@|$(GNULIB_DUPLOCALE)|g' \
- -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \
- -e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \
- -e 's|@''REPLACE_SETLOCALE''@|$(REPLACE_SETLOCALE)|g' \
- -e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \
+ -e '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)/locale.in.h; \
+ < $(srcdir)/inttypes.in.h; \
} > $@-t && \
mv $@-t $@
@POSIX_SPAWN_PORTED_TRUE@test-posix_spawn1.sh: test-posix_spawn1.in.sh
@@ -3714,12 +5778,39 @@ locale.h: locale.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
@POSIX_SPAWN_PORTED_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
@POSIX_SPAWN_PORTED_TRUE@ cp $(srcdir)/test-posix_spawn2.in.sh $@-t && \
@POSIX_SPAWN_PORTED_TRUE@ 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-aux/snippet/arg-nonnull.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/GL_ARG_NONNULL/,$$p' \
+ < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \
+ > $@-t && \
+ mv $@-t $@
+# The c++defs.h that gets inserted into generated .h files is the same as
+# build-aux/snippet/c++defs.h, except that it has the copyright header cut off.
+c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/_GL_CXXDEFS/,$$p' \
+ < $(top_srcdir)/build-aux/snippet/c++defs.h \
+ > $@-t && \
+ mv $@-t $@
+# The unused-parameter.h that gets inserted into generated .h files is the same
+# as build-aux/snippet/unused-parameter.h, except that it has the copyright
+# header cut off.
+unused-parameter.h: $(top_srcdir)/build-aux/snippet/unused-parameter.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \
+ < $(top_srcdir)/build-aux/snippet/unused-parameter.h \
+ > $@-t && \
+ mv $@-t $@
# The warn-on-use.h that gets inserted into generated .h files is the same as
-# build-aux/warn-on-use.h, except that it has the copyright header cut off.
-warn-on-use.h: $(top_srcdir)/build-aux/warn-on-use.h
+# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut
+# off.
+warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h
$(AM_V_GEN)rm -f $@-t $@ && \
sed -n -e '/^.ifndef/,$$p' \
- < $(top_srcdir)/build-aux/warn-on-use.h \
+ < $(top_srcdir)/build-aux/snippet/warn-on-use.h \
> $@-t && \
mv $@-t $@
diff --git a/tests/closedir.c b/tests/closedir.c
new file mode 100644
index 0000000..fa8e210
--- /dev/null
+++ b/tests/closedir.c
@@ -0,0 +1,67 @@
+/* Stop reading the entries of a directory.
+ Copyright (C) 2006-2013 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <dirent.h>
+
+#if REPLACE_FCHDIR
+# include <unistd.h>
+#endif
+
+#if HAVE_CLOSEDIR
+
+/* Override closedir(), to keep track of the open file descriptors.
+ Needed because there is a function dirfd(). */
+
+#else
+
+# include <stdlib.h>
+
+# include "dirent-private.h"
+
+#endif
+
+int
+closedir (DIR *dirp)
+{
+# if REPLACE_FCHDIR
+ int fd = dirfd (dirp);
+# endif
+ int retval;
+
+#if HAVE_CLOSEDIR
+# undef closedir
+
+ retval = closedir (dirp);
+
+#else
+
+ if (dirp->current != INVALID_HANDLE_VALUE)
+ FindClose (dirp->current);
+ free (dirp);
+
+ retval = 0;
+
+#endif
+
+#if REPLACE_FCHDIR
+ if (retval >= 0)
+ _gl_unregister_fd (fd);
+#endif
+ return retval;
+}
diff --git a/tests/dirent-private.h b/tests/dirent-private.h
new file mode 100644
index 0000000..441071c
--- /dev/null
+++ b/tests/dirent-private.h
@@ -0,0 +1,40 @@
+/* Private details of the DIR type.
+ 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 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _DIRENT_PRIVATE_H
+#define _DIRENT_PRIVATE_H 1
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+
+struct gl_directory
+{
+ /* Status, or error code to produce in next readdir() call.
+ -2 means the end of the directory is already reached,
+ -1 means the entry was already filled by FindFirstFile,
+ 0 means the entry needs to be filled using FindNextFile.
+ A positive value is an error code. */
+ int status;
+ /* Handle, reading the directory, at current position. */
+ HANDLE current;
+ /* Found directory entry. */
+ WIN32_FIND_DATA entry;
+ /* Argument to pass to FindFirstFile. It consists of the absolutized
+ directory name, followed by a directory separator and the wildcards. */
+ char dir_name_mask[1];
+};
+
+#endif /* _DIRENT_PRIVATE_H */
diff --git a/tests/dirent.in.h b/tests/dirent.in.h
new file mode 100644
index 0000000..fad3797
--- /dev/null
+++ b/tests/dirent.in.h
@@ -0,0 +1,258 @@
+/* A GNU-like <dirent.h>.
+ Copyright (C) 2006-2013 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _@GUARD_PREFIX@_DIRENT_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* The include_next requires a split double-inclusion guard. */
+#if @HAVE_DIRENT_H@
+# @INCLUDE_NEXT@ @NEXT_DIRENT_H@
+#endif
+
+#ifndef _@GUARD_PREFIX@_DIRENT_H
+#define _@GUARD_PREFIX@_DIRENT_H
+
+/* Get ino_t. Needed on some systems, including glibc 2.8. */
+#include <sys/types.h>
+
+#if !@HAVE_DIRENT_H@
+/* Define types DIR and 'struct dirent'. */
+# if !GNULIB_defined_struct_dirent
+struct dirent
+{
+ char d_type;
+ char d_name[1];
+};
+/* Possible values for 'd_type'. */
+# define DT_UNKNOWN 0
+# define DT_FIFO 1 /* FIFO */
+# define DT_CHR 2 /* character device */
+# define DT_DIR 4 /* directory */
+# define DT_BLK 6 /* block device */
+# define DT_REG 8 /* regular file */
+# define DT_LNK 10 /* symbolic link */
+# define DT_SOCK 12 /* socket */
+# define DT_WHT 14 /* whiteout */
+typedef struct gl_directory DIR;
+# define GNULIB_defined_struct_dirent 1
+# endif
+#endif
+
+/* The __attribute__ feature is available in gcc versions 2.5 and later.
+ The attribute __pure__ was added in gcc 2.96. */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#else
+# define _GL_ATTRIBUTE_PURE /* empty */
+#endif
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+
+/* Declare overridden functions. */
+
+#if @GNULIB_OPENDIR@
+# if @REPLACE_OPENDIR@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef opendir
+# define opendir rpl_opendir
+# endif
+_GL_FUNCDECL_RPL (opendir, DIR *, (const char *dir_name) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (opendir, DIR *, (const char *dir_name));
+# else
+# if !@HAVE_OPENDIR@
+_GL_FUNCDECL_SYS (opendir, DIR *, (const char *dir_name) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (opendir, DIR *, (const char *dir_name));
+# endif
+_GL_CXXALIASWARN (opendir);
+#elif defined GNULIB_POSIXCHECK
+# undef opendir
+# if HAVE_RAW_DECL_OPENDIR
+_GL_WARN_ON_USE (opendir, "opendir is not portable - "
+ "use gnulib module opendir for portability");
+# endif
+#endif
+
+#if @GNULIB_READDIR@
+# if !@HAVE_READDIR@
+_GL_FUNCDECL_SYS (readdir, struct dirent *, (DIR *dirp) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (readdir, struct dirent *, (DIR *dirp));
+_GL_CXXALIASWARN (readdir);
+#elif defined GNULIB_POSIXCHECK
+# undef readdir
+# if HAVE_RAW_DECL_READDIR
+_GL_WARN_ON_USE (readdir, "readdir is not portable - "
+ "use gnulib module readdir for portability");
+# endif
+#endif
+
+#if @GNULIB_REWINDDIR@
+# if !@HAVE_REWINDDIR@
+_GL_FUNCDECL_SYS (rewinddir, void, (DIR *dirp) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (rewinddir, void, (DIR *dirp));
+_GL_CXXALIASWARN (rewinddir);
+#elif defined GNULIB_POSIXCHECK
+# undef rewinddir
+# if HAVE_RAW_DECL_REWINDDIR
+_GL_WARN_ON_USE (rewinddir, "rewinddir is not portable - "
+ "use gnulib module rewinddir for portability");
+# endif
+#endif
+
+#if @GNULIB_CLOSEDIR@
+# if @REPLACE_CLOSEDIR@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef closedir
+# define closedir rpl_closedir
+# endif
+_GL_FUNCDECL_RPL (closedir, int, (DIR *dirp) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (closedir, int, (DIR *dirp));
+# else
+# if !@HAVE_CLOSEDIR@
+_GL_FUNCDECL_SYS (closedir, int, (DIR *dirp) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (closedir, int, (DIR *dirp));
+# endif
+_GL_CXXALIASWARN (closedir);
+#elif defined GNULIB_POSIXCHECK
+# undef closedir
+# if HAVE_RAW_DECL_CLOSEDIR
+_GL_WARN_ON_USE (closedir, "closedir is not portable - "
+ "use gnulib module closedir for portability");
+# endif
+#endif
+
+#if @GNULIB_DIRFD@
+/* Return the file descriptor associated with the given directory stream,
+ or -1 if none exists. */
+# if @REPLACE_DIRFD@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef dirfd
+# define dirfd rpl_dirfd
+# endif
+_GL_FUNCDECL_RPL (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (dirfd, int, (DIR *));
+# else
+# if defined __cplusplus && defined GNULIB_NAMESPACE && defined dirfd
+ /* dirfd is defined as a macro and not as a function.
+ Turn it into a function and get rid of the macro. */
+static inline int (dirfd) (DIR *dp) { return dirfd (dp); }
+# undef dirfd
+# endif
+# if !(@HAVE_DECL_DIRFD@ || defined dirfd)
+_GL_FUNCDECL_SYS (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (dirfd, int, (DIR *));
+# endif
+_GL_CXXALIASWARN (dirfd);
+#elif defined GNULIB_POSIXCHECK
+# undef dirfd
+# if HAVE_RAW_DECL_DIRFD
+_GL_WARN_ON_USE (dirfd, "dirfd is unportable - "
+ "use gnulib module dirfd for portability");
+# endif
+#endif
+
+#if @GNULIB_FDOPENDIR@
+/* Open a directory stream visiting the given directory file
+ descriptor. Return NULL and set errno if fd is not visiting a
+ directory. On success, this function consumes fd (it will be
+ implicitly closed either by this function or by a subsequent
+ closedir). */
+# if @REPLACE_FDOPENDIR@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fdopendir
+# define fdopendir rpl_fdopendir
+# endif
+_GL_FUNCDECL_RPL (fdopendir, DIR *, (int fd));
+_GL_CXXALIAS_RPL (fdopendir, DIR *, (int fd));
+# else
+# if !@HAVE_FDOPENDIR@ || !@HAVE_DECL_FDOPENDIR@
+_GL_FUNCDECL_SYS (fdopendir, DIR *, (int fd));
+# endif
+_GL_CXXALIAS_SYS (fdopendir, DIR *, (int fd));
+# endif
+_GL_CXXALIASWARN (fdopendir);
+#elif defined GNULIB_POSIXCHECK
+# undef fdopendir
+# if HAVE_RAW_DECL_FDOPENDIR
+_GL_WARN_ON_USE (fdopendir, "fdopendir is unportable - "
+ "use gnulib module fdopendir for portability");
+# endif
+#endif
+
+#if @GNULIB_SCANDIR@
+/* Scan the directory DIR, calling FILTER on each directory entry.
+ Entries for which FILTER returns nonzero are individually malloc'd,
+ sorted using qsort with CMP, and collected in a malloc'd array in
+ *NAMELIST. Returns the number of entries selected, or -1 on error. */
+# if !@HAVE_SCANDIR@
+_GL_FUNCDECL_SYS (scandir, int,
+ (const char *dir, struct dirent ***namelist,
+ int (*filter) (const struct dirent *),
+ int (*cmp) (const struct dirent **, const struct dirent **))
+ _GL_ARG_NONNULL ((1, 2, 4)));
+# endif
+/* Need to cast, because on glibc systems, the fourth parameter is
+ int (*cmp) (const void *, const void *). */
+_GL_CXXALIAS_SYS_CAST (scandir, int,
+ (const char *dir, struct dirent ***namelist,
+ int (*filter) (const struct dirent *),
+ int (*cmp) (const struct dirent **, const struct dirent **)));
+_GL_CXXALIASWARN (scandir);
+#elif defined GNULIB_POSIXCHECK
+# undef scandir
+# if HAVE_RAW_DECL_SCANDIR
+_GL_WARN_ON_USE (scandir, "scandir is unportable - "
+ "use gnulib module scandir for portability");
+# endif
+#endif
+
+#if @GNULIB_ALPHASORT@
+/* Compare two 'struct dirent' entries alphabetically. */
+# if !@HAVE_ALPHASORT@
+_GL_FUNCDECL_SYS (alphasort, int,
+ (const struct dirent **, const struct dirent **)
+ _GL_ATTRIBUTE_PURE
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
+/* Need to cast, because on glibc systems, the parameters are
+ (const void *, const void *). */
+_GL_CXXALIAS_SYS_CAST (alphasort, int,
+ (const struct dirent **, const struct dirent **));
+_GL_CXXALIASWARN (alphasort);
+#elif defined GNULIB_POSIXCHECK
+# undef alphasort
+# if HAVE_RAW_DECL_ALPHASORT
+_GL_WARN_ON_USE (alphasort, "alphasort is unportable - "
+ "use gnulib module alphasort for portability");
+# endif
+#endif
+
+
+#endif /* _@GUARD_PREFIX@_DIRENT_H */
+#endif /* _@GUARD_PREFIX@_DIRENT_H */
diff --git a/tests/dup.c b/tests/dup.c
new file mode 100644
index 0000000..564d93c
--- /dev/null
+++ b/tests/dup.c
@@ -0,0 +1,61 @@
+/* Duplicate an open file descriptor.
+
+ 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 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <unistd.h>
+
+#include <errno.h>
+
+#include "msvc-inval.h"
+
+#undef dup
+
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+static int
+dup_nothrow (int fd)
+{
+ int result;
+
+ TRY_MSVC_INVAL
+ {
+ result = dup (fd);
+ }
+ CATCH_MSVC_INVAL
+ {
+ result = -1;
+ errno = EBADF;
+ }
+ DONE_MSVC_INVAL;
+
+ return result;
+}
+#else
+# define dup_nothrow dup
+#endif
+
+int
+rpl_dup (int fd)
+{
+ int result = dup_nothrow (fd);
+#if REPLACE_FCHDIR
+ if (result >= 0)
+ result = _gl_register_dup (fd, result);
+#endif
+ return result;
+}
diff --git a/tests/fdopen.c b/tests/fdopen.c
new file mode 100644
index 0000000..c717f71
--- /dev/null
+++ b/tests/fdopen.c
@@ -0,0 +1,69 @@
+/* Open a stream with a given file descriptor.
+ 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 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <stdio.h>
+
+#include <errno.h>
+
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+# include "msvc-inval.h"
+#endif
+
+#undef fdopen
+
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+static FILE *
+fdopen_nothrow (int fd, const char *mode)
+{
+ FILE *result;
+
+ TRY_MSVC_INVAL
+ {
+ result = fdopen (fd, mode);
+ }
+ CATCH_MSVC_INVAL
+ {
+ result = NULL;
+ }
+ DONE_MSVC_INVAL;
+
+ return result;
+}
+#else
+# define fdopen_nothrow fdopen
+#endif
+
+FILE *
+rpl_fdopen (int fd, const char *mode)
+{
+ int saved_errno = errno;
+ FILE *fp;
+
+ errno = 0;
+ fp = fdopen_nothrow (fd, mode);
+ if (fp == NULL)
+ {
+ if (errno == 0)
+ errno = EBADF;
+ }
+ else
+ errno = saved_errno;
+
+ return fp;
+}
diff --git a/tests/filename.h b/tests/filename.h
new file mode 100644
index 0000000..b82a0ac
--- /dev/null
+++ b/tests/filename.h
@@ -0,0 +1,54 @@
+/* Basic filename support macros.
+ Copyright (C) 2001-2004, 2007-2013 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _FILENAME_H
+#define _FILENAME_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Pathname support.
+ ISSLASH(C) tests whether C is a directory separator character.
+ IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not,
+ it may be concatenated to a directory pathname.
+ IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
+ */
+#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
+ /* Native Windows, Cygwin, OS/2, DOS */
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+# define HAS_DEVICE(P) \
+ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
+ && (P)[1] == ':')
+# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
+# define IS_PATH_WITH_DIR(P) \
+ (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
+# define FILE_SYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0)
+#else
+ /* Unix */
+# define ISSLASH(C) ((C) == '/')
+# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
+# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
+# define FILE_SYSTEM_PREFIX_LEN(P) 0
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _FILENAME_H */
diff --git a/tests/getcwd-lgpl.c b/tests/getcwd-lgpl.c
new file mode 100644
index 0000000..cebe8f7
--- /dev/null
+++ b/tests/getcwd-lgpl.c
@@ -0,0 +1,126 @@
+/* Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ This file is part of gnulib.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification */
+#include <unistd.h>
+
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+
+#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/tests/getpagesize.c b/tests/getpagesize.c
index d7c1ba8..274c591 100644
--- a/tests/getpagesize.c
+++ b/tests/getpagesize.c
@@ -1,6 +1,6 @@
/* getpagesize emulation for systems where it cannot be done in a C macro.
- Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
/* Specification. */
#include <unistd.h>
-/* This implementation is only for native Win32 systems. */
+/* This implementation is only for native Windows systems. */
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
# define WIN32_LEAN_AND_MEAN
diff --git a/tests/gl_array_list.c b/tests/gl_array_list.c
index d0e2336..af5f891 100644
--- a/tests/gl_array_list.c
+++ b/tests/gl_array_list.c
@@ -1,5 +1,5 @@
/* Sequential list data type implemented by an array.
- Copyright (C) 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
diff --git a/tests/gl_array_list.h b/tests/gl_array_list.h
index 72e8062..b0f2d02 100644
--- a/tests/gl_array_list.h
+++ b/tests/gl_array_list.h
@@ -1,5 +1,5 @@
/* Sequential list data type implemented by an array.
- Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
diff --git a/tests/gl_array_oset.c b/tests/gl_array_oset.c
index ca2419c..94f506f 100644
--- a/tests/gl_array_oset.c
+++ b/tests/gl_array_oset.c
@@ -1,5 +1,5 @@
/* Ordered set data type implemented by an array.
- Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
@@ -184,7 +184,7 @@ grow (gl_oset_t set)
/* Add the given element ELT at the given position,
0 <= position <= gl_oset_size (set).
Return 1 upon success, -1 upon out-of-memory. */
-static inline int
+static int
gl_array_nx_add_at (gl_oset_t set, size_t position, const void *elt)
{
size_t count = set->count;
@@ -204,7 +204,7 @@ gl_array_nx_add_at (gl_oset_t set, size_t position, const void *elt)
/* Remove the element at the given position,
0 <= position < gl_oset_size (set). */
-static inline void
+static void
gl_array_remove_at (gl_oset_t set, size_t position)
{
size_t count = set->count;
diff --git a/tests/gl_array_oset.h b/tests/gl_array_oset.h
index 79a6404..13ebb61 100644
--- a/tests/gl_array_oset.h
+++ b/tests/gl_array_oset.h
@@ -1,5 +1,5 @@
/* Ordered set data type implemented by an array.
- Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
diff --git a/tests/gnulib.mk b/tests/gnulib.mk
index f05a797..f883fa6 100644
--- a/tests/gnulib.mk
+++ b/tests/gnulib.mk
@@ -1,16 +1,28 @@
## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2002-2011 Free Software Foundation, Inc.
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
#
-# This file is free software, distributed under the terms of the GNU
-# General Public License. As a special exception to the GNU General
-# Public License, this file may be distributed as part of a program
-# that contains a configuration script generated by Autoconf, under
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this file. If not, see <http://www.gnu.org/licenses/>.
+#
+# 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
+AUTOMAKE_OPTIONS = 1.9.6 foreign
SUBDIRS = .
TESTS =
@@ -55,30 +67,6 @@ EXTRA_DIST += test-alloca-opt.c
## end gnulib module alloca-opt-tests
-## begin gnulib module arg-nonnull
-
-# The BUILT_SOURCES created by this Makefile snippet are not used via #include
-# statements but through direct file reference. Therefore this snippet must be
-# present in all Makefile.am that need it. This is ensured by the applicability
-# 'all' defined above.
-
-BUILT_SOURCES += arg-nonnull.h
-# The arg-nonnull.h that gets inserted into generated .h files is the same as
-# build-aux/arg-nonnull.h, except that it has the copyright header cut off.
-arg-nonnull.h: $(top_srcdir)/build-aux/arg-nonnull.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/GL_ARG_NONNULL/,$$p' \
- < $(top_srcdir)/build-aux/arg-nonnull.h \
- > $@-t && \
- mv $@-t $@
-MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t
-
-ARG_NONNULL_H=arg-nonnull.h
-
-EXTRA_DIST += $(top_srcdir)/build-aux/arg-nonnull.h
-
-## end gnulib module arg-nonnull
-
## begin gnulib module array-list
libtests_a_SOURCES += gl_array_list.h gl_array_list.c
@@ -137,30 +125,6 @@ EXTRA_DIST += test-btowc1.sh test-btowc2.sh test-btowc.c signature.h macros.h
## end gnulib module btowc-tests
-## begin gnulib module c++defs
-
-# The BUILT_SOURCES created by this Makefile snippet are not used via #include
-# statements but through direct file reference. Therefore this snippet must be
-# present in all Makefile.am that need it. This is ensured by the applicability
-# 'all' defined above.
-
-BUILT_SOURCES += c++defs.h
-# The c++defs.h that gets inserted into generated .h files is the same as
-# build-aux/c++defs.h, except that it has the copyright header cut off.
-c++defs.h: $(top_srcdir)/build-aux/c++defs.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/_GL_CXXDEFS/,$$p' \
- < $(top_srcdir)/build-aux/c++defs.h \
- > $@-t && \
- mv $@-t $@
-MOSTLYCLEANFILES += c++defs.h c++defs.h-t
-
-CXXDEFS_H=c++defs.h
-
-EXTRA_DIST += $(top_srcdir)/build-aux/c++defs.h
-
-## end gnulib module c++defs
-
## begin gnulib module c-ctype-tests
TESTS += test-c-ctype
@@ -181,12 +145,6 @@ EXTRA_DIST += test-c-stack.c test-c-stack.sh test-c-stack2.sh macros.h
## end gnulib module c-stack-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
@@ -204,6 +162,14 @@ EXTRA_DIST += test-canonicalize-lgpl.c signature.h macros.h
## end gnulib module canonicalize-lgpl-tests
+## begin gnulib module chdir-tests
+
+TESTS += test-chdir
+check_PROGRAMS += test-chdir
+EXTRA_DIST += test-chdir.c signature.h macros.h
+
+## end gnulib module chdir-tests
+
## begin gnulib module cloexec-tests
TESTS += test-cloexec
@@ -212,6 +178,23 @@ EXTRA_DIST += test-cloexec.c macros.h
## end gnulib module cloexec-tests
+## begin gnulib module close-tests
+
+TESTS += test-close
+check_PROGRAMS += test-close
+EXTRA_DIST += test-close.c signature.h macros.h
+
+## end gnulib module close-tests
+
+## begin gnulib module closedir
+
+
+EXTRA_DIST += closedir.c dirent-private.h
+
+EXTRA_libtests_a_SOURCES += closedir.c
+
+## end gnulib module closedir
+
## begin gnulib module closein-tests
TESTS += test-closein.sh
@@ -221,6 +204,74 @@ EXTRA_DIST += test-closein.sh test-closein.c
## end gnulib module closein-tests
+## begin gnulib module dirent
+
+BUILT_SOURCES += dirent.h
+
+# We need the following in order to create <dirent.h> when the system
+# doesn't have one that works with the given compiler.
+dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+ -e 's|@''HAVE_DIRENT_H''@|$(HAVE_DIRENT_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_DIRENT_H''@|$(NEXT_DIRENT_H)|g' \
+ -e 's/@''GNULIB_OPENDIR''@/$(GNULIB_OPENDIR)/g' \
+ -e 's/@''GNULIB_READDIR''@/$(GNULIB_READDIR)/g' \
+ -e 's/@''GNULIB_REWINDDIR''@/$(GNULIB_REWINDDIR)/g' \
+ -e 's/@''GNULIB_CLOSEDIR''@/$(GNULIB_CLOSEDIR)/g' \
+ -e 's/@''GNULIB_DIRFD''@/$(GNULIB_DIRFD)/g' \
+ -e 's/@''GNULIB_FDOPENDIR''@/$(GNULIB_FDOPENDIR)/g' \
+ -e 's/@''GNULIB_SCANDIR''@/$(GNULIB_SCANDIR)/g' \
+ -e 's/@''GNULIB_ALPHASORT''@/$(GNULIB_ALPHASORT)/g' \
+ -e 's/@''HAVE_OPENDIR''@/$(HAVE_OPENDIR)/g' \
+ -e 's/@''HAVE_READDIR''@/$(HAVE_READDIR)/g' \
+ -e 's/@''HAVE_REWINDDIR''@/$(HAVE_REWINDDIR)/g' \
+ -e 's/@''HAVE_CLOSEDIR''@/$(HAVE_CLOSEDIR)/g' \
+ -e 's|@''HAVE_DECL_DIRFD''@|$(HAVE_DECL_DIRFD)|g' \
+ -e 's|@''HAVE_DECL_FDOPENDIR''@|$(HAVE_DECL_FDOPENDIR)|g' \
+ -e 's|@''HAVE_FDOPENDIR''@|$(HAVE_FDOPENDIR)|g' \
+ -e 's|@''HAVE_SCANDIR''@|$(HAVE_SCANDIR)|g' \
+ -e 's|@''HAVE_ALPHASORT''@|$(HAVE_ALPHASORT)|g' \
+ -e 's|@''REPLACE_OPENDIR''@|$(REPLACE_OPENDIR)|g' \
+ -e 's|@''REPLACE_CLOSEDIR''@|$(REPLACE_CLOSEDIR)|g' \
+ -e 's|@''REPLACE_DIRFD''@|$(REPLACE_DIRFD)|g' \
+ -e 's|@''REPLACE_FDOPENDIR''@|$(REPLACE_FDOPENDIR)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/dirent.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += dirent.h dirent.h-t
+
+EXTRA_DIST += dirent.in.h
+
+## end gnulib module dirent
+
+## begin gnulib module dirent-c++-tests
+
+if ANSICXX
+TESTS += test-dirent-c++
+check_PROGRAMS += test-dirent-c++
+test_dirent_c___SOURCES = test-dirent-c++.cc
+test_dirent_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_NANOSLEEP)
+endif
+EXTRA_DIST += test-dirent-c++.cc signature.h
+
+## end gnulib module dirent-c++-tests
+
+## begin gnulib module dirent-tests
+
+TESTS += test-dirent
+check_PROGRAMS += test-dirent
+EXTRA_DIST += test-dirent.c
+
+## end gnulib module dirent-tests
+
## begin gnulib module dirname-tests
TESTS += test-dirname
@@ -230,6 +281,23 @@ EXTRA_DIST += test-dirname.c
## end gnulib module dirname-tests
+## begin gnulib module dup
+
+
+EXTRA_DIST += dup.c
+
+EXTRA_libtests_a_SOURCES += dup.c
+
+## end gnulib module dup
+
+## begin gnulib module dup-tests
+
+TESTS += test-dup
+check_PROGRAMS += test-dup
+EXTRA_DIST += test-dup.c signature.h macros.h
+
+## end gnulib module dup-tests
+
## begin gnulib module dup2-tests
TESTS += test-dup2
@@ -256,6 +324,14 @@ EXTRA_DIST += test-errno.c
## end gnulib module errno-tests
+## begin gnulib module fclose-tests
+
+TESTS += test-fclose
+check_PROGRAMS += test-fclose
+EXTRA_DIST += test-fclose.c
+
+## end gnulib module fclose-tests
+
## begin gnulib module fcntl-h-c++-tests
if ANSICXX
@@ -284,6 +360,23 @@ EXTRA_DIST += test-fcntl.c signature.h macros.h
## end gnulib module fcntl-tests
+## 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 fflush-tests
TESTS += test-fflush test-fflush2.sh
@@ -293,6 +386,21 @@ EXTRA_DIST += test-fflush.c test-fflush2.sh test-fflush2.c signature.h macros.h
## end gnulib module fflush-tests
+## begin gnulib module fgetc-tests
+
+TESTS += test-fgetc
+check_PROGRAMS += test-fgetc
+EXTRA_DIST += test-fgetc.c signature.h macros.h
+
+## end gnulib module fgetc-tests
+
+## begin gnulib module filename
+
+
+EXTRA_DIST += filename.h
+
+## end gnulib module filename
+
## begin gnulib module filenamecat-tests
TESTS += test-filenamecat
@@ -302,6 +410,14 @@ EXTRA_DIST += test-filenamecat.c
## end gnulib module filenamecat-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 fopen-safer-tests
TESTS += test-fopen-safer
@@ -337,6 +453,22 @@ EXTRA_DIST += test-fpurge.c macros.h
## end gnulib module fpurge-tests
+## begin gnulib module fputc-tests
+
+TESTS += test-fputc
+check_PROGRAMS += test-fputc
+EXTRA_DIST += test-fputc.c signature.h macros.h
+
+## end gnulib module fputc-tests
+
+## begin gnulib module fread-tests
+
+TESTS += test-fread
+check_PROGRAMS += test-fread
+EXTRA_DIST += test-fread.c signature.h macros.h
+
+## end gnulib module fread-tests
+
## begin gnulib module freadahead-tests
TESTS += test-freadahead.sh
@@ -358,8 +490,8 @@ EXTRA_DIST += test-freading.c macros.h
TESTS += test-frexp-nolibm
check_PROGRAMS += test-frexp-nolibm
-test_frexp_nolibm_SOURCES = test-frexp.c
-EXTRA_DIST += test-frexp.c minus-zero.h nan.h signature.h macros.h
+test_frexp_nolibm_SOURCES = test-frexp.c randomd.c
+EXTRA_DIST += test-frexp.c test-frexp.h minus-zero.h infinity.h nan.h signature.h macros.h randomd.c
## end gnulib module frexp-nolibm-tests
@@ -367,27 +499,34 @@ EXTRA_DIST += test-frexp.c minus-zero.h nan.h signature.h macros.h
TESTS += test-frexpl-nolibm
check_PROGRAMS += test-frexpl-nolibm
-test_frexpl_nolibm_SOURCES = test-frexpl.c
-EXTRA_DIST += test-frexpl.c minus-zero.h nan.h signature.h macros.h
+test_frexpl_nolibm_SOURCES = test-frexpl.c randoml.c
+EXTRA_DIST += test-frexpl.c test-frexp.h minus-zero.h infinity.h nan.h signature.h macros.h randoml.c
## end gnulib module frexpl-nolibm-tests
-## begin gnulib module fseeko-tests
+## begin gnulib module fseek-tests
-TESTS += test-fseeko.sh test-fseeko2.sh
-check_PROGRAMS += test-fseeko
-EXTRA_DIST += test-fseeko.c test-fseeko.sh test-fseeko2.sh signature.h macros.h
+TESTS += test-fseek.sh test-fseek2.sh
+check_PROGRAMS += test-fseek
+EXTRA_DIST += test-fseek.c test-fseek.sh test-fseek2.sh signature.h macros.h
-## end gnulib module fseeko-tests
+## end gnulib module fseek-tests
+
+## begin gnulib module fseeko-tests
-## begin gnulib module ftell
+TESTS += test-fseeko.sh test-fseeko2.sh test-fseeko3.sh test-fseeko4.sh
+check_PROGRAMS += test-fseeko test-fseeko3 test-fseeko4
+EXTRA_DIST += test-fseeko.c test-fseeko.sh test-fseeko2.sh test-fseeko3.c test-fseeko3.sh test-fseeko4.c test-fseeko4.sh signature.h macros.h
+## end gnulib module fseeko-tests
-EXTRA_DIST += ftell.c
+## begin gnulib module fstat-tests
-EXTRA_libtests_a_SOURCES += ftell.c
+TESTS += test-fstat
+check_PROGRAMS += test-fstat
+EXTRA_DIST += test-fstat.c signature.h macros.h
-## end gnulib module ftell
+## end gnulib module fstat-tests
## begin gnulib module ftell-tests
@@ -400,13 +539,39 @@ EXTRA_DIST += test-ftell.c test-ftell.sh test-ftell2.sh test-ftell3.c signature.
## begin gnulib module ftello-tests
-TESTS += test-ftello.sh test-ftello2.sh test-ftello3
-check_PROGRAMS += test-ftello test-ftello3
+TESTS += test-ftello.sh test-ftello2.sh test-ftello3 test-ftello4.sh
+check_PROGRAMS += test-ftello test-ftello3 test-ftello4
MOSTLYCLEANFILES += t-ftello3.tmp
-EXTRA_DIST += test-ftello.c test-ftello.sh test-ftello2.sh test-ftello3.c signature.h macros.h
+EXTRA_DIST += test-ftello.c test-ftello.sh test-ftello2.sh test-ftello3.c test-ftello4.c test-ftello4.sh signature.h macros.h
## end gnulib module ftello-tests
+## begin gnulib module 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 getdtablesize-tests
TESTS += test-getdtablesize
@@ -450,12 +615,72 @@ EXTRA_DIST += test-ignore-value.c
## end gnulib module ignore-value-tests
+## begin gnulib module intprops-tests
+
+TESTS += test-intprops
+check_PROGRAMS += test-intprops
+EXTRA_DIST += test-intprops.c macros.h
+
+## end gnulib module intprops-tests
+
+## begin gnulib module inttypes-incomplete
+
+BUILT_SOURCES += inttypes.h
+
+# We need the following in order to create <inttypes.h> 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 isnand-nolibm-tests
TESTS += test-isnand-nolibm
check_PROGRAMS += test-isnand-nolibm
-EXTRA_DIST += test-isnand-nolibm.c test-isnand.h minus-zero.h nan.h macros.h
+EXTRA_DIST += test-isnand-nolibm.c test-isnand.h minus-zero.h infinity.h nan.h macros.h
## end gnulib module isnand-nolibm-tests
@@ -464,7 +689,7 @@ EXTRA_DIST += test-isnand-nolibm.c test-isnand.h minus-zero.h nan.h macros.h
TESTS += test-isnanf-nolibm
check_PROGRAMS += test-isnanf-nolibm
-EXTRA_DIST += test-isnanf-nolibm.c test-isnanf.h minus-zero.h nan.h macros.h
+EXTRA_DIST += test-isnanf-nolibm.c test-isnanf.h minus-zero.h infinity.h nan.h macros.h
## end gnulib module isnanf-nolibm-tests
@@ -473,7 +698,7 @@ EXTRA_DIST += test-isnanf-nolibm.c test-isnanf.h minus-zero.h nan.h macros.h
TESTS += test-isnanl-nolibm
check_PROGRAMS += test-isnanl-nolibm
-EXTRA_DIST += test-isnanl-nolibm.c test-isnanl.h minus-zero.h nan.h macros.h
+EXTRA_DIST += test-isnanl-nolibm.c test-isnanl.h minus-zero.h infinity.h nan.h macros.h
## end gnulib module isnanl-nolibm-tests
@@ -521,37 +746,6 @@ EXTRA_DIST += test-linkedhash_list.c macros.h
## end gnulib module linkedhash-list-tests
-## begin gnulib module locale
-
-BUILT_SOURCES += locale.h
-
-# We need the following in order to create <locale.h> when the system
-# doesn't have one that provides all definitions.
-locale.h: locale.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
- $(AM_V_GEN)rm -f $@-t $@ && \
- { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
- -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
- -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
- -e 's|@''NEXT_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \
- -e 's|@''GNULIB_SETLOCALE''@|$(GNULIB_SETLOCALE)|g' \
- -e 's|@''GNULIB_DUPLOCALE''@|$(GNULIB_DUPLOCALE)|g' \
- -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \
- -e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \
- -e 's|@''REPLACE_SETLOCALE''@|$(REPLACE_SETLOCALE)|g' \
- -e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \
- -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
- -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
- -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
- < $(srcdir)/locale.in.h; \
- } > $@-t && \
- mv $@-t $@
-MOSTLYCLEANFILES += locale.h locale.h-t
-
-EXTRA_DIST += locale.in.h
-
-## end gnulib module locale
-
## begin gnulib module locale-c++-tests
if ANSICXX
@@ -571,6 +765,14 @@ EXTRA_DIST += test-locale.c
## end gnulib module locale-tests
+## begin gnulib module localeconv-tests
+
+TESTS += test-localeconv
+check_PROGRAMS += test-localeconv
+EXTRA_DIST += test-localeconv.c signature.h macros.h
+
+## end gnulib module localeconv-tests
+
## begin gnulib module localename
libtests_a_SOURCES += localename.c
@@ -583,7 +785,7 @@ EXTRA_DIST += localename.h
TESTS += test-localename
check_PROGRAMS += test-localename
-test_localename_LDADD = $(LDADD) @INTL_MACOSX_LIBS@
+test_localename_LDADD = $(LDADD) @INTL_MACOSX_LIBS@ $(LIBTHREAD)
EXTRA_DIST += test-localename.c macros.h
@@ -628,6 +830,8 @@ if ANSICXX
TESTS += test-math-c++
check_PROGRAMS += test-math-c++
test_math_c___SOURCES = test-math-c++.cc test-math-c++2.cc
+# These link dependencies are needed on IRIX 6.5 with cc.
+test_math_c___LDADD = $(LDADD) $(COPYSIGNL_LIBM) $(RINT_LIBM) $(RINTL_LIBM)
endif
EXTRA_DIST += test-math-c++.cc test-math-c++2.cc signature.h
@@ -637,7 +841,7 @@ EXTRA_DIST += test-math-c++.cc test-math-c++2.cc signature.h
TESTS += test-math
check_PROGRAMS += test-math
-EXTRA_DIST += test-math.c
+EXTRA_DIST += test-math.c macros.h
## end gnulib module math-tests
@@ -701,14 +905,56 @@ EXTRA_DIST += test-open.h test-open.c signature.h macros.h
## end gnulib module open-tests
+## begin gnulib module opendir
+
+
+EXTRA_DIST += dirent-private.h opendir.c
+
+EXTRA_libtests_a_SOURCES += opendir.c
+
+## end gnulib module opendir
+
+## 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 pipe2-tests
TESTS += test-pipe2
check_PROGRAMS += test-pipe2
+test_pipe2_LDADD = $(LDADD) $(LIBSOCKET)
EXTRA_DIST += test-pipe2.c signature.h macros.h
## end gnulib module pipe2-tests
+## begin gnulib module posix_spawn_file_actions_addclose-tests
+
+TESTS += test-posix_spawn_file_actions_addclose
+check_PROGRAMS += test-posix_spawn_file_actions_addclose
+EXTRA_DIST += test-posix_spawn_file_actions_addclose.c signature.h macros.h
+
+## end gnulib module posix_spawn_file_actions_addclose-tests
+
+## begin gnulib module posix_spawn_file_actions_adddup2-tests
+
+TESTS += test-posix_spawn_file_actions_adddup2
+check_PROGRAMS += test-posix_spawn_file_actions_adddup2
+EXTRA_DIST += test-posix_spawn_file_actions_adddup2.c signature.h macros.h
+
+## end gnulib module posix_spawn_file_actions_adddup2-tests
+
+## begin gnulib module posix_spawn_file_actions_addopen-tests
+
+TESTS += test-posix_spawn_file_actions_addopen
+check_PROGRAMS += test-posix_spawn_file_actions_addopen
+EXTRA_DIST += test-posix_spawn_file_actions_addopen.c signature.h macros.h
+
+## end gnulib module posix_spawn_file_actions_addopen-tests
+
## begin gnulib module posix_spawnp-tests
if POSIX_SPAWN_PORTED
@@ -763,10 +1009,18 @@ EXTRA_libtests_a_SOURCES += putenv.c
TESTS += test-quotearg-simple
check_PROGRAMS += test-quotearg-simple
test_quotearg_simple_LDADD = $(LDADD) @LIBINTL@
-EXTRA_DIST += test-quotearg-simple.c test-quotearg.h macros.h
+EXTRA_DIST += test-quotearg-simple.c test-quotearg.h macros.h zerosize-ptr.h
## end gnulib module quotearg-simple-tests
+## begin gnulib module raise-tests
+
+TESTS += test-raise
+check_PROGRAMS += test-raise
+EXTRA_DIST += test-raise.c signature.h macros.h
+
+## end gnulib module raise-tests
+
## begin gnulib module rawmemchr-tests
TESTS += test-rawmemchr
@@ -775,6 +1029,15 @@ EXTRA_DIST += test-rawmemchr.c zerosize-ptr.h signature.h macros.h
## end gnulib module rawmemchr-tests
+## begin gnulib module readdir
+
+
+EXTRA_DIST += dirent-private.h readdir.c
+
+EXTRA_libtests_a_SOURCES += readdir.c
+
+## end gnulib module readdir
+
## begin gnulib module readlink-tests
TESTS += test-readlink
@@ -783,6 +1046,15 @@ EXTRA_DIST += test-readlink.h test-readlink.c signature.h macros.h
## end gnulib module readlink-tests
+## begin gnulib module regex-tests
+
+TESTS += test-regex
+check_PROGRAMS += test-regex
+test_regex_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += test-regex.c macros.h
+
+## end gnulib module regex-tests
+
## begin gnulib module rename-tests
TESTS += test-rename
@@ -854,35 +1126,175 @@ EXTRA_DIST += test-sigaction.c signature.h macros.h
## end gnulib module sigaction-tests
-## begin gnulib module signal-c++-tests
+## begin gnulib module signal-h-c++-tests
if ANSICXX
-TESTS += test-signal-c++
-check_PROGRAMS += test-signal-c++
-test_signal_c___SOURCES = test-signal-c++.cc test-signal-c++2.cc
-test_signal_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_NANOSLEEP)
+TESTS += test-signal-h-c++
+check_PROGRAMS += test-signal-h-c++
+test_signal_h_c___SOURCES = test-signal-h-c++.cc test-signal-h-c++2.cc
+test_signal_h_c___LDADD = $(LDADD) $(LIBINTL) $(LIB_NANOSLEEP) $(LIB_PTHREAD_SIGMASK)
endif
-EXTRA_DIST += test-signal-c++.cc test-signal-c++2.cc signature.h
+EXTRA_DIST += test-signal-h-c++.cc test-signal-h-c++2.cc signature.h
-## end gnulib module signal-c++-tests
+## end gnulib module signal-h-c++-tests
-## begin gnulib module signal-tests
+## begin gnulib module signal-h-tests
-TESTS += test-signal
-check_PROGRAMS += test-signal
-EXTRA_DIST += test-signal.c
+TESTS += test-signal-h
+check_PROGRAMS += test-signal-h
+EXTRA_DIST += test-signal-h.c
-## end gnulib module signal-tests
+## end gnulib module signal-h-tests
## begin gnulib module signbit-tests
TESTS += test-signbit
check_PROGRAMS += test-signbit
-EXTRA_DIST += test-signbit.c minus-zero.h macros.h
+EXTRA_DIST += test-signbit.c minus-zero.h infinity.h macros.h
## end gnulib module signbit-tests
+## begin gnulib module sigpipe-tests
+
+TESTS += test-sigpipe.sh
+check_PROGRAMS += test-sigpipe
+
+EXTRA_DIST += test-sigpipe.c test-sigpipe.sh
+
+## end gnulib module sigpipe-tests
+
+## begin gnulib module sigprocmask-tests
+
+TESTS += test-sigprocmask
+check_PROGRAMS += test-sigprocmask
+EXTRA_DIST += test-sigprocmask.c signature.h macros.h
+
+## end gnulib module sigprocmask-tests
+
+## begin gnulib module sleep
+
+
+EXTRA_DIST += sleep.c
+
+EXTRA_libtests_a_SOURCES += sleep.c
+
+## end gnulib module sleep
+
+## begin gnulib module sleep-tests
+
+TESTS += test-sleep
+check_PROGRAMS += test-sleep
+EXTRA_DIST += test-sleep.c signature.h macros.h
+
+## end gnulib module sleep-tests
+
+## begin gnulib module snippet/_Noreturn
+
+# Because this Makefile snippet defines a variable used by other
+# gnulib Makefile snippets, it must be present in all Makefile.am that
+# need it. This is ensured by the applicability 'all' defined above.
+
+_NORETURN_H=$(top_srcdir)/build-aux/snippet/_Noreturn.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/snippet/_Noreturn.h
+
+## end gnulib module snippet/_Noreturn
+
+## begin gnulib module snippet/arg-nonnull
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+
+BUILT_SOURCES += arg-nonnull.h
+# The arg-nonnull.h that gets inserted into generated .h files is the same as
+# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut
+# off.
+arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/GL_ARG_NONNULL/,$$p' \
+ < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \
+ > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t
+
+ARG_NONNULL_H=arg-nonnull.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/snippet/arg-nonnull.h
+
+## end gnulib module snippet/arg-nonnull
+
+## begin gnulib module snippet/c++defs
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+
+BUILT_SOURCES += c++defs.h
+# The c++defs.h that gets inserted into generated .h files is the same as
+# build-aux/snippet/c++defs.h, except that it has the copyright header cut off.
+c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/_GL_CXXDEFS/,$$p' \
+ < $(top_srcdir)/build-aux/snippet/c++defs.h \
+ > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += c++defs.h c++defs.h-t
+
+CXXDEFS_H=c++defs.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/snippet/c++defs.h
+
+## end gnulib module snippet/c++defs
+
+## begin gnulib module snippet/unused-parameter
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+
+BUILT_SOURCES += unused-parameter.h
+# The unused-parameter.h that gets inserted into generated .h files is the same
+# as build-aux/snippet/unused-parameter.h, except that it has the copyright
+# header cut off.
+unused-parameter.h: $(top_srcdir)/build-aux/snippet/unused-parameter.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \
+ < $(top_srcdir)/build-aux/snippet/unused-parameter.h \
+ > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += unused-parameter.h unused-parameter.h-t
+
+UNUSED_PARAMETER_H=unused-parameter.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/snippet/unused-parameter.h
+
+## end gnulib module snippet/unused-parameter
+
+## begin gnulib module snippet/warn-on-use
+
+BUILT_SOURCES += warn-on-use.h
+# The warn-on-use.h that gets inserted into generated .h files is the same as
+# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut
+# off.
+warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/^.ifndef/,$$p' \
+ < $(top_srcdir)/build-aux/snippet/warn-on-use.h \
+ > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t
+
+WARN_ON_USE_H=warn-on-use.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/snippet/warn-on-use.h
+
+## end gnulib module snippet/warn-on-use
+
## begin gnulib module snprintf-tests
TESTS += test-snprintf
@@ -907,9 +1319,13 @@ EXTRA_DIST += test-spawn-c++.cc signature.h
## begin gnulib module spawn-pipe-tests
TESTS += test-spawn-pipe.sh
-check_PROGRAMS += test-spawn-pipe
-test_spawn_pipe_LDADD = $(LDADD) @LIBINTL@
-EXTRA_DIST += test-spawn-pipe.sh test-spawn-pipe.c macros.h
+check_PROGRAMS += test-spawn-pipe-main test-spawn-pipe-child
+test_spawn_pipe_main_LDADD = $(LDADD) @LIBINTL@
+# The test-spawn-pipe-child program must be a real executable, not a libtool
+# wrapper script, and should link against as few libraries as possible.
+# Therefore don't link it against any libraries other than -lc.
+test_spawn_pipe_child_LDADD =
+EXTRA_DIST += test-spawn-pipe.sh test-spawn-pipe-main.c test-spawn-pipe-child.c macros.h
## end gnulib module spawn-pipe-tests
@@ -925,6 +1341,7 @@ EXTRA_DIST += test-spawn.c
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
@@ -1128,6 +1545,25 @@ EXTRA_DIST += test-sys_time.c
## end gnulib module sys_time-tests
+## begin gnulib module sys_types-c++-tests
+
+if ANSICXX
+TESTS += test-sys_types-c++
+check_PROGRAMS += test-sys_types-c++
+test_sys_types_c___SOURCES = test-sys_types-c++.cc
+endif
+EXTRA_DIST += test-sys_types-c++.cc
+
+## end gnulib module sys_types-c++-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-c++-tests
if ANSICXX
@@ -1147,6 +1583,14 @@ 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 time-c++-tests
if ANSICXX
@@ -1234,7 +1678,7 @@ EXTRA_DIST += test-vasnprintf.c macros.h
TESTS += test-vasprintf-posix
check_PROGRAMS += test-vasprintf-posix
-EXTRA_DIST += test-vasprintf-posix.c minus-zero.h nan.h macros.h
+EXTRA_DIST += test-vasprintf-posix.c minus-zero.h infinity.h nan.h macros.h
## end gnulib module vasprintf-posix-tests
@@ -1252,7 +1696,7 @@ EXTRA_DIST += test-vasprintf.c signature.h macros.h
TESTS += test-vc-list-files-git.sh
TESTS += test-vc-list-files-cvs.sh
TESTS_ENVIRONMENT += abs_aux_dir='$(abs_aux_dir)'
-EXTRA_DIST += test-vc-list-files-git.sh test-vc-list-files-cvs.sh init.sh
+EXTRA_DIST += test-vc-list-files-git.sh test-vc-list-files-cvs.sh
## end gnulib module vc-list-files-tests
@@ -1261,7 +1705,7 @@ EXTRA_DIST += test-vc-list-files-git.sh test-vc-list-files-cvs.sh init.sh
TESTS_ENVIRONMENT += MAKE='$(MAKE)'
TESTS += test-verify test-verify.sh
check_PROGRAMS += test-verify
-EXTRA_DIST += test-verify.c test-verify.sh init.sh
+EXTRA_DIST += test-verify.c test-verify.sh
## end gnulib module verify-tests
@@ -1274,25 +1718,6 @@ EXTRA_DIST += test-version-etc.c test-version-etc.sh
## end gnulib module version-etc-tests
-## begin gnulib module warn-on-use
-
-BUILT_SOURCES += warn-on-use.h
-# The warn-on-use.h that gets inserted into generated .h files is the same as
-# build-aux/warn-on-use.h, except that it has the copyright header cut off.
-warn-on-use.h: $(top_srcdir)/build-aux/warn-on-use.h
- $(AM_V_GEN)rm -f $@-t $@ && \
- sed -n -e '/^.ifndef/,$$p' \
- < $(top_srcdir)/build-aux/warn-on-use.h \
- > $@-t && \
- mv $@-t $@
-MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t
-
-WARN_ON_USE_H=warn-on-use.h
-
-EXTRA_DIST += $(top_srcdir)/build-aux/warn-on-use.h
-
-## end gnulib module warn-on-use
-
## begin gnulib module wchar-c++-tests
if ANSICXX
@@ -1368,12 +1793,29 @@ EXTRA_DIST += test-wctype-h.c macros.h
## end gnulib module wctype-h-tests
+## begin gnulib module write
+
+
+EXTRA_DIST += write.c
+
+EXTRA_libtests_a_SOURCES += write.c
+
+## end gnulib module write
+
+## begin gnulib module write-tests
+
+TESTS += test-write
+check_PROGRAMS += test-write
+EXTRA_DIST += test-write.c signature.h macros.h
+
+## end gnulib module write-tests
+
## begin gnulib module xalloc-die-tests
TESTS += test-xalloc-die.sh
check_PROGRAMS += test-xalloc-die
test_xalloc_die_LDADD = $(LDADD) @LIBINTL@
-EXTRA_DIST += test-xalloc-die.c test-xalloc-die.sh init.sh
+EXTRA_DIST += test-xalloc-die.c test-xalloc-die.sh
## end gnulib module xalloc-die-tests
diff --git a/tests/infinity.h b/tests/infinity.h
new file mode 100644
index 0000000..9111289
--- /dev/null
+++ b/tests/infinity.h
@@ -0,0 +1,60 @@
+/* Macros for infinity.
+ 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 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+
+/* Infinityf () returns a 'float' +Infinity. */
+
+/* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */
+#if defined _MSC_VER
+static float
+Infinityf ()
+{
+ static float zero = 0.0f;
+ return 1.0f / zero;
+}
+#else
+# define Infinityf() (1.0f / 0.0f)
+#endif
+
+
+/* Infinityd () returns a 'double' +Infinity. */
+
+/* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */
+#if defined _MSC_VER
+static double
+Infinityd ()
+{
+ static double zero = 0.0;
+ return 1.0 / zero;
+}
+#else
+# define Infinityd() (1.0 / 0.0)
+#endif
+
+
+/* Infinityl () returns a 'long double' +Infinity. */
+
+/* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */
+#if defined _MSC_VER
+static double
+Infinityl ()
+{
+ static long double zero = 0.0L;
+ return 1.0L / zero;
+}
+#else
+# define Infinityl() (1.0L / 0.0L)
+#endif
diff --git a/tests/init.sh b/tests/init.sh
index 71c6516..bd2048e 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -1,6 +1,6 @@
# source this file; set up for tests
-# Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -61,22 +61,36 @@ ME_=`expr "./$0" : '.*/\(.*\)$'`
# We use a trap below for cleanup. This requires us to go through
# hoops to get the right exit status transported through the handler.
-# So use `Exit STATUS' instead of `exit STATUS' inside of the tests.
+# So use 'Exit STATUS' instead of 'exit STATUS' inside of the tests.
# Turn off errexit here so that we don't trip the bug with OSF1/Tru64
# sh inside this function.
Exit () { set +e; (exit $1); exit $1; }
# Print warnings (e.g., about skipped and failed tests) to this file number.
# Override by defining to say, 9, in init.cfg, and putting say,
-# "export ...ENVVAR_SETTINGS...; exec 9>&2; $(SHELL)" in the definition
-# of TESTS_ENVIRONMENT in your tests/Makefile.am file.
+# export ...ENVVAR_SETTINGS...; $(SHELL) 9>&2
+# in the definition of TESTS_ENVIRONMENT in your tests/Makefile.am file.
# This is useful when using automake's parallel tests mode, to print
# the reason for skip/failure to console, rather than to the .log files.
: ${stderr_fileno_=2}
-warn_ () { echo "$@" 1>&$stderr_fileno_; }
+# Note that correct expansion of "$*" depends on IFS starting with ' '.
+# Always write the full diagnostic to stderr.
+# When stderr_fileno_ is not 2, also emit the first line of the
+# diagnostic to that file descriptor.
+warn_ ()
+{
+ # If IFS does not start with ' ', set it and emit the warning in a subshell.
+ case $IFS in
+ ' '*) printf '%s\n' "$*" >&2
+ test $stderr_fileno_ = 2 \
+ || { printf '%s\n' "$*" | sed 1q >&$stderr_fileno_ ; } ;;
+ *) (IFS=' '; warn_ "$@");;
+ esac
+}
fail_ () { warn_ "$ME_: failed test: $@"; Exit 1; }
skip_ () { warn_ "$ME_: skipped test: $@"; Exit 77; }
+fatal_ () { warn_ "$ME_: hard error: $@"; Exit 99; }
framework_failure_ () { warn_ "$ME_: set-up failure: $@"; Exit 99; }
# Sanitize this shell to POSIX mode, if possible.
@@ -158,7 +172,7 @@ else
if test "$re_shell_" = __current__; then
# 'eval'ing this code makes Solaris 10's /bin/sh exit with
# $? set to 2. It does not evaluate any of the code after the
- # "unexpected" first `('. Thus, we must run it in a subshell.
+ # "unexpected" first '('. Thus, we must run it in a subshell.
( eval "$gl_shell_test_script_" ) > /dev/null 2>&1
else
"$re_shell_" -c "$gl_shell_test_script_" 2>/dev/null
@@ -167,7 +181,10 @@ else
st_=$?
# $re_shell_ works just fine. Use it.
- test $st_ = 10 && break
+ if test $st_ = 10; then
+ gl_set_x_corrupts_stderr_=false
+ break
+ fi
# If this is our first marginally acceptable shell, remember it.
if test "$st_:$marginal_" = 9: ; then
@@ -190,6 +207,14 @@ else
fi
fi
+# If this is bash, turn off all aliases.
+test -n "$BASH_VERSION" && unalias -a
+
+# Note that when supporting $EXEEXT (transparently mapping from PROG_NAME to
+# PROG_NAME.exe), we want to support hyphen-containing names like test-acos.
+# That is part of the shell-selection test above. Why use aliases rather
+# than functions? Because support for hyphen-containing aliases is more
+# widespread than that for hyphen-containing function names.
test -n "$EXEEXT" && shopt -s expand_aliases
# Enable glibc's malloc-perturbing option.
@@ -204,14 +229,105 @@ export MALLOC_PERTURB_
# a partition, or to undo any other global state changes.
cleanup_ () { :; }
-if ( diff --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then
- compare () { diff -u "$@"; }
+# Emit a header similar to that from diff -u; Print the simulated "diff"
+# command so that the order of arguments is clear. Don't bother with @@ lines.
+emit_diff_u_header_ ()
+{
+ printf '%s\n' "diff -u $*" \
+ "--- $1 1970-01-01" \
+ "+++ $2 1970-01-01"
+}
+
+# Arrange not to let diff or cmp operate on /dev/null,
+# since on some systems (at least OSF/1 5.1), that doesn't work.
+# When there are not two arguments, or no argument is /dev/null, return 2.
+# When one argument is /dev/null and the other is not empty,
+# cat the nonempty file to stderr and return 1.
+# Otherwise, return 0.
+compare_dev_null_ ()
+{
+ test $# = 2 || return 2
+
+ if test "x$1" = x/dev/null; then
+ test -s "$2" || return 0
+ emit_diff_u_header_ "$@"; sed 's/^/+/' "$2"
+ return 1
+ fi
+
+ if test "x$2" = x/dev/null; then
+ test -s "$1" || return 0
+ emit_diff_u_header_ "$@"; sed 's/^/-/' "$1"
+ return 1
+ fi
+
+ return 2
+}
+
+if diff_out_=`exec 2>/dev/null; diff -u "$0" "$0" < /dev/null` \
+ && diff -u Makefile "$0" 2>/dev/null | grep '^[+]#!' >/dev/null; then
+ # diff accepts the -u option and does not (like AIX 7 'diff') produce an
+ # extra space on column 1 of every content line.
+ if test -z "$diff_out_"; then
+ compare_ () { diff -u "$@"; }
+ else
+ compare_ ()
+ {
+ if diff -u "$@" > diff.out; then
+ # No differences were found, but Solaris 'diff' produces output
+ # "No differences encountered". Hide this output.
+ rm -f diff.out
+ true
+ else
+ cat diff.out
+ rm -f diff.out
+ false
+ fi
+ }
+ fi
+elif diff_out_=`exec 2>/dev/null; diff -c "$0" "$0" < /dev/null`; then
+ if test -z "$diff_out_"; then
+ compare_ () { diff -c "$@"; }
+ else
+ compare_ ()
+ {
+ if diff -c "$@" > diff.out; then
+ # No differences were found, but AIX and HP-UX 'diff' produce output
+ # "No differences encountered" or "There are no differences between the
+ # files.". Hide this output.
+ rm -f diff.out
+ true
+ else
+ cat diff.out
+ rm -f diff.out
+ false
+ fi
+ }
+ fi
elif ( cmp --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then
- compare () { cmp -s "$@"; }
+ compare_ () { cmp -s "$@"; }
else
- compare () { cmp "$@"; }
+ compare_ () { cmp "$@"; }
fi
+# Usage: compare EXPECTED ACTUAL
+#
+# Given compare_dev_null_'s preprocessing, defer to compare_ if 2 or more.
+# Otherwise, propagate $? to caller: any diffs have already been printed.
+compare ()
+{
+ # This looks like it can be factored to use a simple "case $?"
+ # after unchecked compare_dev_null_ invocation, but that would
+ # fail in a "set -e" environment.
+ if compare_dev_null_ "$@"; then
+ return 0
+ else
+ case $? in
+ 1) return 1;;
+ *) compare_ "$@";;
+ esac
+ fi
+}
+
# An arbitrary prefix to help distinguish test directories.
testdir_prefix_ () { printf gt; }
@@ -295,8 +411,7 @@ path_prepend_ ()
case $path_dir_ in
'') fail_ "invalid path dir: '$1'";;
/*) abs_path_dir_=$path_dir_;;
- *) abs_path_dir_=`cd "$initial_cwd_/$path_dir_" && echo "$PWD"` \
- || fail_ "invalid path dir: $path_dir_";;
+ *) abs_path_dir_=$initial_cwd_/$path_dir_;;
esac
case $abs_path_dir_ in
*:*) fail_ "invalid path dir: '$abs_path_dir_'";;
@@ -332,7 +447,7 @@ setup_ ()
pfx_=`testdir_prefix_`
test_dir_=`mktempd_ "$initial_cwd_" "$pfx_-$ME_.XXXX"` \
|| fail_ "failed to create temporary directory in $initial_cwd_"
- cd "$test_dir_"
+ cd "$test_dir_" || fail_ "failed to cd to temporary directory"
# As autoconf-generated configure scripts do, ensure that IFS
# is defined initially, so that saving and restoring $IFS works.
@@ -400,7 +515,7 @@ mktempd_ ()
{
case $# in
2);;
- *) fail_ "Usage: $ME DIR TEMPLATE";;
+ *) fail_ "Usage: mktempd_ DIR TEMPLATE";;
esac
destdir_=$1
@@ -422,7 +537,7 @@ mktempd_ ()
esac
# First, try to use mktemp.
- d=`unset TMPDIR; mktemp -d -t -p "$destdir_" "$template_" 2>/dev/null` \
+ d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` \
|| fail=1
# The resulting name must be in the specified directory.
diff --git a/tests/inttypes.in.h b/tests/inttypes.in.h
new file mode 100644
index 0000000..1893f55
--- /dev/null
+++ b/tests/inttypes.in.h
@@ -0,0 +1,1130 @@
+/* Copyright (C) 2006-2013 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 <http://www.gnu.org/licenses/>. */
+
+/*
+ * ISO C 99 <inttypes.h> for platforms that lack it.
+ * <http://www.opengroup.org/susv3xbd/inttypes.h.html>
+ */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* Include the original <inttypes.h> 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 <stdint.h> 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 <stdint.h> or the gnulib replacement.
+ But avoid namespace pollution on glibc systems. */
+#ifndef __GLIBC__
+# include <stdint.h>
+#endif
+/* Get CHAR_BIT. */
+#include <limits.h>
+
+#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 <bug-gnulib@gnu.org>."
+#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/tests/link.c b/tests/link.c
index 60cf708..ce3cc44 100644
--- a/tests/link.c
+++ b/tests/link.c
@@ -1,6 +1,6 @@
/* Emulate link on platforms that lack it, namely native Windows platforms.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -13,8 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
@@ -155,9 +154,20 @@ link (const char *file1, const char *file2)
int
rpl_link (char const *file1, char const *file2)
{
+ size_t len1;
+ size_t len2;
+ struct stat st;
+
+ /* Don't allow IRIX to dereference dangling file2 symlink. */
+ if (!lstat (file2, &st))
+ {
+ errno = EEXIST;
+ return -1;
+ }
+
/* Reject trailing slashes on non-directories. */
- size_t len1 = strlen (file1);
- size_t len2 = strlen (file2);
+ len1 = strlen (file1);
+ len2 = strlen (file2);
if ((len1 && file1[len1 - 1] == '/')
|| (len2 && file2[len2 - 1] == '/'))
{
@@ -165,7 +175,6 @@ rpl_link (char const *file1, char const *file2)
If stat() fails, then link() should fail for the same reason
(although on Solaris 9, link("file/","oops") mistakenly
succeeds); if stat() succeeds, require a directory. */
- struct stat st;
if (stat (file1, &st))
return -1;
if (!S_ISDIR (st.st_mode))
@@ -178,7 +187,6 @@ rpl_link (char const *file1, char const *file2)
{
/* Fix Cygwin 1.5.x bug where link("a","b/.") creates file "b". */
char *dir = strdup (file2);
- struct stat st;
char *p;
if (!dir)
return -1;
diff --git a/tests/locale.in.h b/tests/locale.in.h
deleted file mode 100644
index 1f9bafd..0000000
--- a/tests/locale.in.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/* A POSIX <locale.h>.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-#ifndef _GL_LOCALE_H
-
-#if __GNUC__ >= 3
-@PRAGMA_SYSTEM_HEADER@
-#endif
-@PRAGMA_COLUMNS@
-
-/* The include_next requires a split double-inclusion guard. */
-#@INCLUDE_NEXT@ @NEXT_LOCALE_H@
-
-#ifndef _GL_LOCALE_H
-#define _GL_LOCALE_H
-
-/* NetBSD 5.0 mis-defines NULL. */
-#include <stddef.h>
-
-/* MacOS X 10.5 defines the locale_t type in <xlocale.h>. */
-#if @HAVE_XLOCALE_H@
-# include <xlocale.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. */
-
-/* The LC_MESSAGES locale category is specified in POSIX, but not in ISO C.
- On systems that don't define it, use the same value as GNU libintl. */
-#if !defined LC_MESSAGES
-# define LC_MESSAGES 1729
-#endif
-
-#if @GNULIB_SETLOCALE@
-# if @REPLACE_SETLOCALE@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef setlocale
-# define setlocale rpl_setlocale
-# define GNULIB_defined_setlocale 1
-# endif
-_GL_FUNCDECL_RPL (setlocale, char *, (int category, const char *locale));
-_GL_CXXALIAS_RPL (setlocale, char *, (int category, const char *locale));
-# else
-_GL_CXXALIAS_SYS (setlocale, char *, (int category, const char *locale));
-# endif
-_GL_CXXALIASWARN (setlocale);
-#elif defined GNULIB_POSIXCHECK
-# undef setlocale
-# if HAVE_RAW_DECL_SETLOCALE
-_GL_WARN_ON_USE (setlocale, "setlocale works differently on native Windows - "
- "use gnulib module setlocale for portability");
-# endif
-#endif
-
-#if @GNULIB_DUPLOCALE@
-# if @REPLACE_DUPLOCALE@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef duplocale
-# define duplocale rpl_duplocale
-# endif
-_GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale));
-# else
-# if @HAVE_DUPLOCALE@
-_GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale));
-# endif
-# endif
-# if @HAVE_DUPLOCALE@
-_GL_CXXALIASWARN (duplocale);
-# endif
-#elif defined GNULIB_POSIXCHECK
-# undef duplocale
-# if HAVE_RAW_DECL_DUPLOCALE
-_GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - "
- "use gnulib module duplocale for portability");
-# endif
-#endif
-
-#endif /* _GL_LOCALE_H */
-#endif /* _GL_LOCALE_H */
diff --git a/tests/localename.c b/tests/localename.c
index a5bfea7..47cb7ca 100644
--- a/tests/localename.c
+++ b/tests/localename.c
@@ -1,24 +1,22 @@
/* Determine name of the currently selected locale.
- Copyright (C) 1995-2011 Free Software Foundation, Inc.
+ Copyright (C) 1995-2013 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 3, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU General Public
- License along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* Written by Ulrich Drepper <drepper@gnu.org>, 1995. */
-/* Win32 code written by Tor Lillqvist <tml@iki.fi>. */
-/* MacOS X code written by Bruno Haible <bruno@clisp.org>. */
+/* Native Windows code written by Tor Lillqvist <tml@iki.fi>. */
+/* Mac OS X code written by Bruno Haible <bruno@clisp.org>. */
#include <config.h>
@@ -36,7 +34,7 @@
#include <string.h>
#if HAVE_USELOCALE
-/* MacOS X 10.5 defines the locale_t type in <xlocale.h>. */
+/* Mac OS X 10.5 defines the locale_t type in <xlocale.h>. */
# if defined __APPLE__ && defined __MACH__
# include <xlocale.h>
# endif
@@ -56,10 +54,10 @@
#endif
#if defined _WIN32 || defined __WIN32__
-# define WIN32_NATIVE
+# define WINDOWS_NATIVE
#endif
-#if defined WIN32_NATIVE || defined __CYGWIN__ /* WIN32 or Cygwin */
+#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
/* List of language codes, sorted by value:
@@ -1130,11 +1128,11 @@
#if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
-/* MacOS X 10.2 or newer */
+/* Mac OS X 10.2 or newer */
-/* Canonicalize a MacOS X locale name to a Unix locale name.
+/* Canonicalize a Mac OS X locale name to a Unix locale name.
NAME is a sufficiently large buffer.
- On input, it contains the MacOS X locale name.
+ On input, it contains the Mac OS X locale name.
On output, it contains the Unix locale name. */
# if !defined IN_LIBINTL
static
@@ -1147,9 +1145,9 @@ gl_locale_name_canonicalize (char *name)
http://lists.apple.com/archives/carbon-dev/2005/Mar/msg00293.html */
/* Convert legacy (NeXTstep inherited) English names to Unix (ISO 639 and
- ISO 3166) names. Prior to MacOS X 10.3, there is no API for doing this.
+ ISO 3166) names. Prior to Mac OS X 10.3, there is no API for doing this.
Therefore we do it ourselves, using a table based on the results of the
- MacOS X 10.3.8 function
+ Mac OS X 10.3.8 function
CFLocaleCreateCanonicalLocaleIdentifierFromString(). */
typedef struct { const char legacy[21+1]; const char unixy[5+1]; }
legacy_entry;
@@ -1292,26 +1290,26 @@ gl_locale_name_canonicalize (char *name)
typedef struct { const char langtag[7+1]; const char unixy[12+1]; }
langtag_entry;
static const langtag_entry langtag_table[] = {
- /* MacOS X has "az-Arab", "az-Cyrl", "az-Latn".
+ /* Mac OS X has "az-Arab", "az-Cyrl", "az-Latn".
The default script for az on Unix is Latin. */
{ "az-Latn", "az" },
- /* MacOS X has "ga-dots". Does not yet exist on Unix. */
+ /* Mac OS X has "ga-dots". Does not yet exist on Unix. */
{ "ga-dots", "ga" },
- /* MacOS X has "kk-Cyrl". Does not yet exist on Unix. */
- /* MacOS X has "mn-Cyrl", "mn-Mong".
+ /* Mac OS X has "kk-Cyrl". Does not yet exist on Unix. */
+ /* Mac OS X has "mn-Cyrl", "mn-Mong".
The default script for mn on Unix is Cyrillic. */
{ "mn-Cyrl", "mn" },
- /* MacOS X has "ms-Arab", "ms-Latn".
+ /* Mac OS X has "ms-Arab", "ms-Latn".
The default script for ms on Unix is Latin. */
{ "ms-Latn", "ms" },
- /* MacOS X has "tg-Cyrl".
+ /* Mac OS X has "tg-Cyrl".
The default script for tg on Unix is Cyrillic. */
{ "tg-Cyrl", "tg" },
- /* MacOS X has "tk-Cyrl". Does not yet exist on Unix. */
- /* MacOS X has "tt-Cyrl".
+ /* Mac OS X has "tk-Cyrl". Does not yet exist on Unix. */
+ /* Mac OS X has "tt-Cyrl".
The default script for tt on Unix is Cyrillic. */
{ "tt-Cyrl", "tt" },
- /* MacOS X has "zh-Hans", "zh-Hant".
+ /* Mac OS X has "zh-Hans", "zh-Hant".
Country codes are used to distinguish these on Unix. */
{ "zh-Hans", "zh_CN" },
{ "zh-Hant", "zh_TW" }
@@ -1407,11 +1405,11 @@ gl_locale_name_canonicalize (char *name)
#endif
-#if defined WIN32_NATIVE || defined __CYGWIN__ /* WIN32 or Cygwin */
+#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
-/* Canonicalize a Win32 native locale name to a Unix locale name.
+/* Canonicalize a Windows native locale name to a Unix locale name.
NAME is a sufficiently large buffer.
- On input, it contains the Win32 locale name.
+ On input, it contains the Windows locale name.
On output, it contains the Unix locale name. */
# if !defined IN_LIBINTL
static
@@ -1467,9 +1465,9 @@ gl_locale_name_from_win32_LANGID (LANGID langid)
}
/* Internet Explorer has an LCID to RFC3066 name mapping stored in
HKEY_CLASSES_ROOT\Mime\Database\Rfc1766. But we better don't use that
- since IE's i18n subsystem is known to be inconsistent with the Win32 base
- (e.g. they have different character conversion facilities that produce
- different results). */
+ since IE's i18n subsystem is known to be inconsistent with the native
+ Windows base (e.g. they have different character conversion facilities
+ that produce different results). */
/* Use our own table. */
{
int primary, sub;
@@ -2507,7 +2505,7 @@ gl_locale_name_from_win32_LCID (LCID lcid)
#endif
-#if HAVE_USELOCALE /* glibc or MacOS X */
+#if HAVE_USELOCALE /* glibc or Mac OS X */
/* Simple hash set of strings. We don't want to drag in lots of hash table
code here. */
@@ -2618,133 +2616,34 @@ gl_locale_name_thread_unsafe (int category, const char *categoryname)
nl_langinfo (_NL_LOCALE_NAME (category)). */
name = thread_locale->__names[category];
return name;
-# endif
-# if defined __APPLE__ && defined __MACH__ /* MacOS X */
- /* The locale name is found deep in an undocumented data structure.
- Since it's stored in a buffer of size 32 and newlocale() rejects
- locale names of length > 31, we can assume that it is NUL terminated
- in this buffer. But we need to make a copy of the locale name, of
- indefinite extent. */
- struct _xlocale_part1_v0 /* used in MacOS X 10.5 */
- {
- int32_t __refcount;
- void (*__free_extra)(void *);
- __darwin_mbstate_t __mbs[10];
- int64_t __magic;
- };
- struct _xlocale_part1_v1 /* used in MacOS X >= 10.6.0 */
- {
- int32_t __refcount;
- void (*__free_extra)(void *);
- __darwin_mbstate_t __mbs[10];
- /*pthread_lock_t*/ int __lock;
- int64_t __magic;
- };
- struct _xlocale_part2
- {
- int64_t __magic;
- unsigned char __collate_load_error;
- unsigned char __collate_substitute_nontrivial;
- unsigned char _messages_using_locale;
- unsigned char _monetary_using_locale;
- unsigned char _numeric_using_locale;
- unsigned char _time_using_locale;
- unsigned char __mlocale_changed;
- unsigned char __nlocale_changed;
- unsigned char __numeric_fp_cvt;
- struct __xlocale_st_collate *__lc_collate;
- struct __xlocale_st_runelocale *__lc_ctype;
- struct __xlocale_st_messages *__lc_messages;
- struct __xlocale_st_monetary *__lc_monetary;
- struct __xlocale_st_numeric *__lc_numeric;
- struct _xlocale *__lc_numeric_loc;
- struct __xlocale_st_time *__lc_time;
- /* more */
- };
- struct __xlocale_st_collate
- {
- int32_t __refcount;
- void (*__free_extra)(void *);
- char __encoding[32];
- /* more */
- };
- struct __xlocale_st_runelocale
- {
- int32_t __refcount;
- void (*__free_extra)(void *);
- char __ctype_encoding[32];
- /* more */
- };
- struct __xlocale_st_messages
- {
- int32_t __refcount;
- void (*__free_extra)(void *);
- char *_messages_locale_buf;
- /* more */
- };
- struct __xlocale_st_monetary
- {
- int32_t __refcount;
- void (*__free_extra)(void *);
- char *_monetary_locale_buf;
- /* more */
- };
- struct __xlocale_st_numeric {
- int32_t __refcount;
- void (*__free_extra)(void *);
- char *_numeric_locale_buf;
- /* more */
- };
- struct __xlocale_st_time {
- int32_t __refcount;
- void (*__free_extra)(void *);
- char *_time_locale_buf;
- /* more */
- };
- struct _xlocale_part2 *tlp;
- if (((struct _xlocale_part1_v0 *) thread_locale)->__magic
- == 0x786C6F63616C6530LL)
- /* MacOS X 10.5 */
- tlp =
- (struct _xlocale_part2 *)
- &((struct _xlocale_part1_v0 *) thread_locale)->__magic;
- else if (((struct _xlocale_part1_v1 *) thread_locale)->__magic
- == 0x786C6F63616C6530LL)
- /* MacOS X >= 10.6.0 */
- tlp =
- (struct _xlocale_part2 *)
- &((struct _xlocale_part1_v1 *) thread_locale)->__magic;
- else
- /* Unsupported version of MacOS X: The internals of 'struct _xlocale'
- have changed again. */
- return "";
+# elif defined __FreeBSD__ || (defined __APPLE__ && defined __MACH__)
+ /* FreeBSD, Mac OS X */
+ int mask;
+
switch (category)
{
case LC_CTYPE:
- return tlp->__lc_ctype->__ctype_encoding;
+ mask = LC_CTYPE_MASK;
+ break;
case LC_NUMERIC:
- return tlp->_numeric_using_locale
- ? tlp->__lc_numeric->_numeric_locale_buf
- : "C";
+ mask = LC_NUMERIC_MASK;
+ break;
case LC_TIME:
- return tlp->_time_using_locale
- ? tlp->__lc_time->_time_locale_buf
- : "C";
+ mask = LC_TIME_MASK;
+ break;
case LC_COLLATE:
- return !tlp->__collate_load_error
- ? tlp->__lc_collate->__encoding
- : "C";
+ mask = LC_COLLATE_MASK;
+ break;
case LC_MONETARY:
- return tlp->_monetary_using_locale
- ? tlp->__lc_monetary->_monetary_locale_buf
- : "C";
+ mask = LC_MONETARY_MASK;
+ break;
case LC_MESSAGES:
- return tlp->_messages_using_locale
- ? tlp->__lc_messages->_messages_locale_buf
- : "C";
+ mask = LC_MESSAGES_MASK;
+ break;
default: /* We shouldn't get here. */
return "";
}
+ return querylocale (mask, thread_locale);
# endif
}
}
@@ -2786,8 +2685,8 @@ gl_locale_name_posix (int category, const char *categoryname)
/* On other systems we ignore what setlocale reports and instead look at the
environment variables directly. This is necessary
1. on systems which have a facility for customizing the default locale
- (MacOS X, native Windows, Cygwin) and where the system's setlocale()
- function ignores this default locale (MacOS X, Cygwin), in two cases:
+ (Mac OS X, native Windows, Cygwin) and where the system's setlocale()
+ function ignores this default locale (Mac OS X, Cygwin), in two cases:
a. when the user missed to use the setlocale() override from libintl
(for example by not including <libintl.h>),
b. when setlocale supports only the "C" locale, such as on Cygwin
@@ -2822,7 +2721,7 @@ gl_locale_name_environ (int category, const char *categoryname)
if (retval != NULL && retval[0] != '\0')
{
#if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
- /* MacOS X 10.2 or newer.
+ /* Mac OS X 10.2 or newer.
Ignore invalid LANG value set by the Terminal application. */
if (strcmp (retval, "UTF-8") != 0)
#endif
@@ -2849,10 +2748,10 @@ gl_locale_name_default (void)
locale, customizing it for each location. POSIX:2001 does not require
such a facility.
- The systems with such a facility are MacOS X and Windows: They provide a
+ The systems with such a facility are Mac OS X and Windows: They provide a
GUI that allows the user to choose a locale.
- - On MacOS X, by default, none of LC_* or LANG are set. Starting with
- MacOS X 10.4 or 10.5, LANG is set for processes launched by the
+ - On Mac OS X, by default, none of LC_* or LANG are set. Starting with
+ Mac OS X 10.4 or 10.5, LANG is set for processes launched by the
'Terminal' application (but sometimes to an incorrect value "UTF-8").
When no environment variable is set, setlocale (LC_ALL, "") uses the
"C" locale.
@@ -2868,7 +2767,7 @@ gl_locale_name_default (void)
"C.UTF-8" locale, which operates in the same way as the "C" locale.
*/
-#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined WIN32_NATIVE || defined __CYGWIN__)
+#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined WINDOWS_NATIVE || defined __CYGWIN__)
/* The system does not have a way of setting the locale, other than the
POSIX specified environment variables. We use C as default locale. */
@@ -2882,7 +2781,7 @@ gl_locale_name_default (void)
codeset. */
# if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
- /* MacOS X 10.2 or newer */
+ /* Mac OS X 10.2 or newer */
{
/* Cache the locale name, since CoreFoundation calls are expensive. */
static const char *cached_localename;
@@ -2890,7 +2789,7 @@ gl_locale_name_default (void)
if (cached_localename == NULL)
{
char namebuf[256];
-# if HAVE_CFLOCALECOPYCURRENT /* MacOS X 10.3 or newer */
+# if HAVE_CFLOCALECOPYCURRENT /* Mac OS X 10.3 or newer */
CFLocaleRef locale = CFLocaleCopyCurrent ();
CFStringRef name = CFLocaleGetIdentifier (locale);
@@ -2901,7 +2800,7 @@ gl_locale_name_default (void)
cached_localename = strdup (namebuf);
}
CFRelease (locale);
-# elif HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.2 or newer */
+# elif HAVE_CFPREFERENCESCOPYAPPVALUE /* Mac OS X 10.2 or newer */
CFTypeRef value =
CFPreferencesCopyAppValue (CFSTR ("AppleLocale"),
kCFPreferencesCurrentApplication);
@@ -2923,11 +2822,11 @@ gl_locale_name_default (void)
# endif
-# if defined WIN32_NATIVE || defined __CYGWIN__ /* WIN32 or Cygwin */
+# if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
{
LCID lcid;
- /* Use native Win32 API locale ID. */
+ /* Use native Windows API locale ID. */
lcid = GetThreadLocale ();
return gl_locale_name_from_win32_LCID (lcid);
diff --git a/tests/localename.h b/tests/localename.h
index e754853..e70eee6 100644
--- a/tests/localename.h
+++ b/tests/localename.h
@@ -1,20 +1,18 @@
/* Determine name of the currently selected locale.
- Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 3, or (at your option)
- any later version.
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU General Public
- License along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef _GL_LOCALENAME_H
#define _GL_LOCALENAME_H
diff --git a/tests/macros.h b/tests/macros.h
index 8922675..60ba894 100644
--- a/tests/macros.h
+++ b/tests/macros.h
@@ -1,5 +1,5 @@
/* Common macros used by gnulib tests.
- Copyright (C) 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -62,3 +62,12 @@
*not* work for function parameters of array type, because they are actually
parameters of pointer type. */
#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
+
+/* STREQ (str1, str2)
+ Return true if two strings compare equal. */
+#define STREQ(a, b) (strcmp (a, b) == 0)
+
+/* Some numbers in the interval [0,1). */
+extern const float randomf[1000];
+extern const double randomd[1000];
+extern const long double randoml[1000];
diff --git a/tests/minus-zero.h b/tests/minus-zero.h
index 9429781..5882cbf 100644
--- a/tests/minus-zero.h
+++ b/tests/minus-zero.h
@@ -1,5 +1,5 @@
/* Macros for floating-point negative zero.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0f.
ICC 10.0 has a bug when optimizing the expression -zero.
The expression -FLT_MIN * FLT_MIN does not work when cross-compiling
- to PowerPC on MacOS X 10.5. */
+ to PowerPC on Mac OS X 10.5. */
#if defined __hpux || defined __sgi || defined __ICC
static float
compute_minus_zerof (void)
@@ -42,7 +42,7 @@ float minus_zerof = -0.0f;
/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
ICC 10.0 has a bug when optimizing the expression -zero.
The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
- to PowerPC on MacOS X 10.5. */
+ to PowerPC on Mac OS X 10.5. */
#if defined __hpux || defined __sgi || defined __ICC
static double
compute_minus_zerod (void)
@@ -61,7 +61,7 @@ double minus_zerod = -0.0;
IRIX cc can't put -0.0L into .data, but can compute at runtime.
ICC 10.0 has a bug when optimizing the expression -zero.
The expression -LDBL_MIN * LDBL_MIN does not work when cross-compiling
- to PowerPC on MacOS X 10.5. */
+ to PowerPC on Mac OS X 10.5. */
#if defined __hpux || defined __sgi || defined __ICC
static long double
compute_minus_zerol (void)
diff --git a/tests/nan.h b/tests/nan.h
index 5e1c0c3..e95ceb9 100644
--- a/tests/nan.h
+++ b/tests/nan.h
@@ -1,5 +1,5 @@
/* Macros for not-a-number.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,8 +17,9 @@
/* NaNf () returns a 'float' not-a-number. */
-/* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */
-#ifdef __DECC
+/* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler choke
+ on the expression 0.0 / 0.0. */
+#if defined __DECC || defined _MSC_VER
static float
NaNf ()
{
@@ -32,8 +33,9 @@ NaNf ()
/* NaNd () returns a 'double' not-a-number. */
-/* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */
-#ifdef __DECC
+/* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler choke
+ on the expression 0.0 / 0.0. */
+#if defined __DECC || defined _MSC_VER
static double
NaNd ()
{
@@ -48,13 +50,21 @@ NaNd ()
/* NaNl () returns a 'long double' not-a-number. */
/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
- runtime type conversion. */
+ runtime type conversion.
+ The Microsoft MSVC 9 compiler chokes on the expression 0.0L / 0.0L. */
#ifdef __sgi
static long double NaNl ()
{
double zero = 0.0;
return zero / zero;
}
+#elif defined _MSC_VER
+static long double
+NaNl ()
+{
+ static long double zero = 0.0L;
+ return zero / zero;
+}
#else
# define NaNl() (0.0L / 0.0L)
#endif
diff --git a/tests/opendir.c b/tests/opendir.c
new file mode 100644
index 0000000..de0ea5a
--- /dev/null
+++ b/tests/opendir.c
@@ -0,0 +1,148 @@
+/* Start reading the entries of a directory.
+ Copyright (C) 2006-2013 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <dirent.h>
+
+#include <errno.h>
+#include <stddef.h>
+
+#if HAVE_OPENDIR
+
+/* Override opendir(), to keep track of the open file descriptors.
+ Needed because there is a function dirfd(). */
+
+#else
+
+# include <stdlib.h>
+
+# include "dirent-private.h"
+# include "filename.h"
+
+#endif
+
+#if REPLACE_FCHDIR
+# include <unistd.h>
+#endif
+
+DIR *
+opendir (const char *dir_name)
+{
+#if HAVE_OPENDIR
+# undef opendir
+ DIR *dirp;
+
+ dirp = opendir (dir_name);
+ if (dirp == NULL)
+ return NULL;
+
+#else
+
+ char dir_name_mask[MAX_PATH + 1 + 1 + 1];
+ int status;
+ HANDLE current;
+ WIN32_FIND_DATA entry;
+ struct gl_directory *dirp;
+
+ if (dir_name[0] == '\0')
+ {
+ errno = ENOENT;
+ return NULL;
+ }
+
+ /* Make the dir_name absolute, so that we continue reading the same
+ directory if the current directory changed between this opendir()
+ call and a subsequent rewinddir() call. */
+ if (!GetFullPathName (dir_name, MAX_PATH, dir_name_mask, NULL))
+ {
+ errno = EINVAL;
+ return NULL;
+ }
+
+ /* Append the mask.
+ "*" and "*.*" appear to be equivalent. */
+ {
+ char *p;
+
+ p = dir_name_mask + strlen (dir_name_mask);
+ if (p > dir_name_mask && !ISSLASH (p[-1]))
+ *p++ = '\\';
+ *p++ = '*';
+ *p = '\0';
+ }
+
+ /* Start searching the directory. */
+ status = -1;
+ current = FindFirstFile (dir_name_mask, &entry);
+ if (current == INVALID_HANDLE_VALUE)
+ {
+ switch (GetLastError ())
+ {
+ case ERROR_FILE_NOT_FOUND:
+ status = -2;
+ break;
+ case ERROR_PATH_NOT_FOUND:
+ errno = ENOENT;
+ return NULL;
+ case ERROR_DIRECTORY:
+ errno = ENOTDIR;
+ return NULL;
+ case ERROR_ACCESS_DENIED:
+ errno = EACCES;
+ return NULL;
+ default:
+ errno = EIO;
+ return NULL;
+ }
+ }
+
+ /* Allocate the result. */
+ dirp =
+ (struct gl_directory *)
+ malloc (offsetof (struct gl_directory, dir_name_mask[0])
+ + strlen (dir_name_mask) + 1);
+ if (dirp == NULL)
+ {
+ if (current != INVALID_HANDLE_VALUE)
+ FindClose (current);
+ errno = ENOMEM;
+ return NULL;
+ }
+ dirp->status = status;
+ dirp->current = current;
+ if (status == -1)
+ memcpy (&dirp->entry, &entry, sizeof (WIN32_FIND_DATA));
+ strcpy (dirp->dir_name_mask, dir_name_mask);
+
+#endif
+
+#if REPLACE_FCHDIR
+ {
+ int fd = dirfd (dirp);
+ if (0 <= fd && _gl_register_fd (fd, dir_name) != fd)
+ {
+ int saved_errno = errno;
+ closedir (dirp);
+ errno = saved_errno;
+ return NULL;
+ }
+ }
+#endif
+
+ return dirp;
+}
diff --git a/tests/putenv.c b/tests/putenv.c
index 68e5fec..5461273 100644
--- a/tests/putenv.c
+++ b/tests/putenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2011 Free Software
+/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2013 Free Software
Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C
@@ -34,14 +34,21 @@
#include <string.h>
#include <unistd.h>
-#if HAVE_GNU_LD
-# define environ __environ
-#else
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+
+#if _LIBC
+# if HAVE_GNU_LD
+# define environ __environ
+# else
extern char **environ;
+# endif
#endif
#if _LIBC
-/* This lock protects against simultaneous modifications of `environ'. */
+/* This lock protects against simultaneous modifications of 'environ'. */
# include <bits/libc-lock.h>
__libc_lock_define_initialized (static, envlock)
# define LOCK __libc_lock_lock (envlock)
@@ -55,7 +62,9 @@ static int
_unsetenv (const char *name)
{
size_t len;
+#if !HAVE_DECL__PUTENV
char **ep;
+#endif
if (name == NULL || *name == '\0' || strchr (name, '=') != NULL)
{
@@ -65,6 +74,21 @@ _unsetenv (const char *name)
len = strlen (name);
+#if HAVE_DECL__PUTENV
+ {
+ int putenv_result, putenv_errno;
+ char *name_ = malloc (len + 2);
+ memcpy (name_, name, len);
+ name_[len] = '=';
+ name_[len + 1] = 0;
+ putenv_result = _putenv (name_);
+ putenv_errno = errno;
+ free (name_);
+ __set_errno (putenv_errno);
+ return putenv_result;
+ }
+#else
+
LOCK;
ep = environ;
@@ -85,17 +109,17 @@ _unsetenv (const char *name)
UNLOCK;
return 0;
+#endif
}
/* Put STRING, which is of the form "NAME=VALUE", in the environment.
- If STRING contains no `=', then remove STRING from the environment. */
+ If STRING contains no '=', then remove STRING from the environment. */
int
putenv (char *string)
{
- const char *const name_end = strchr (string, '=');
- register size_t size;
- register char **ep;
+ const char *name_end = strchr (string, '=');
+ char **ep;
if (name_end == NULL)
{
@@ -103,30 +127,68 @@ putenv (char *string)
return _unsetenv (string);
}
- size = 0;
- for (ep = environ; *ep != NULL; ++ep)
- if (!strncmp (*ep, string, name_end - string) &&
- (*ep)[name_end - string] == '=')
+#if HAVE_DECL__PUTENV
+ /* Rely on _putenv to allocate the new environment. If other
+ parts of the application use _putenv, the !HAVE_DECL__PUTENV code
+ would fight over who owns the environ vector, causing a crash. */
+ if (name_end[1])
+ return _putenv (string);
+ else
+ {
+ /* _putenv ("NAME=") unsets NAME, so invoke _putenv ("NAME= ")
+ to allocate the environ vector and then replace the new
+ entry with "NAME=". */
+ int putenv_result, putenv_errno;
+ char *name_x = malloc (name_end - string + sizeof "= ");
+ if (!name_x)
+ return -1;
+ memcpy (name_x, string, name_end - string + 1);
+ name_x[name_end - string + 1] = ' ';
+ name_x[name_end - string + 2] = 0;
+ putenv_result = _putenv (name_x);
+ putenv_errno = errno;
+ for (ep = environ; *ep; ep++)
+ if (strcmp (*ep, name_x) == 0)
+ {
+ *ep = string;
+ break;
+ }
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ if (putenv_result == 0)
+ {
+ /* _putenv propagated "NAME= " into the subprocess environment;
+ fix that by calling SetEnvironmentVariable directly. */
+ name_x[name_end - string] = 0;
+ putenv_result = SetEnvironmentVariable (name_x, "") ? 0 : -1;
+ putenv_errno = ENOMEM; /* ENOMEM is the only way to fail. */
+ }
+# endif
+ free (name_x);
+ __set_errno (putenv_errno);
+ return putenv_result;
+ }
+#else
+ for (ep = environ; *ep; ep++)
+ if (strncmp (*ep, string, name_end - string) == 0
+ && (*ep)[name_end - string] == '=')
break;
- else
- ++size;
- if (*ep == NULL)
+ if (*ep)
+ *ep = string;
+ else
{
static char **last_environ = NULL;
- char **new_environ = (char **) malloc ((size + 2) * sizeof (char *));
- if (new_environ == NULL)
+ size_t size = ep - environ;
+ char **new_environ = malloc ((size + 2) * sizeof *new_environ);
+ if (! new_environ)
return -1;
- (void) memcpy ((void *) new_environ, (void *) environ,
- size * sizeof (char *));
- new_environ[size] = (char *) string;
- new_environ[size + 1] = NULL;
+ new_environ[0] = string;
+ memcpy (new_environ + 1, environ, (size + 1) * sizeof *new_environ);
free (last_environ);
last_environ = new_environ;
environ = new_environ;
}
- else
- *ep = string;
return 0;
+#endif
}
diff --git a/tests/randomd.c b/tests/randomd.c
new file mode 100644
index 0000000..a3097ef
--- /dev/null
+++ b/tests/randomd.c
@@ -0,0 +1,1028 @@
+/* Some random 'double' numbers used by gnulib tests.
+ Copyright (C) 2012-2013 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "macros.h"
+
+/* Some numbers in the interval [0,1). */
+
+const double randomd[1000] =
+{
+ /* Some not so random numbers at the beginning. */
+ 0.0,
+ /* Then some numbers generated by GNU clisp. */
+ 0.89255299921822260894833866359,
+ 0.56160033401164667976788987953,
+ 0.51743003502243816003616725706,
+ 0.78419011286685927826225711525,
+ 0.64400370685467819470063888148,
+ 0.38151255107934048933308886009,
+ 0.279822118770531878839000163945,
+ 0.51983544681375980919751125922,
+ 0.314601557551148376372971500376,
+ 0.44551938964685651088492647794,
+ 0.44235192503793823441729544512,
+ 0.0040120762636767874958681841509,
+ 0.57608572759464216512285032474,
+ 0.69151953350396585566714564265,
+ 0.65634190642598148152780718322,
+ 0.68520459394253807590733184567,
+ 0.60728078832107635628786818115,
+ 0.376679934380311318950949959986,
+ 0.48893422455419005003224231708,
+ 0.59664228319132670346209747371,
+ 0.70162191594290728927555900075,
+ 0.70981089000005327192380201706,
+ 0.480574069305863387682360414433,
+ 0.369264627455974856929910550376,
+ 0.42224495444170593700839286742,
+ 0.96974027194201320964041066537,
+ 0.69950081092902694549973698004,
+ 0.366921803754944985368022837045,
+ 0.19460757354611588216534077527,
+ 0.046437559879825520495822908204,
+ 0.57694149138457596563075731094,
+ 0.49632733844850578203860859535,
+ 0.80735347459453553970910033766,
+ 0.210271595033975357161360058967,
+ 0.176539870249396534142059724214,
+ 0.75320267419158828905982021879,
+ 0.09535042912249636739069790414,
+ 0.41433965906065337672703334968,
+ 0.62189345390648146852641556292,
+ 0.322595610794052908153116342595,
+ 0.173860860827838938281708881865,
+ 0.55258425878412963601205794028,
+ 0.066559056629606284504735241978,
+ 0.0193835990781649263368095562556,
+ 0.127101629778251450428653553143,
+ 0.9603475517586241593077319367,
+ 0.68429794014738591042302507235,
+ 0.0139808909843634026741151214975,
+ 0.0036035679428138856395527711611,
+ 0.072656401341518399752950821809,
+ 0.229562863635014486626281702425,
+ 0.88337277579960676546469424767,
+ 0.88850212167800818244030104263,
+ 0.208063225990716089095767541316,
+ 0.268304917462565269805874454916,
+ 0.3195427196271617997151392088,
+ 0.59101407246003811289573881403,
+ 0.972093867752368095080492689,
+ 0.409246208960242309650511849637,
+ 0.84250639316418167849010246997,
+ 0.063842712141624332977179722113,
+ 0.96470327141354888687046060373,
+ 0.43109879978424216966175314888,
+ 0.14551248610248934836482236208,
+ 0.84819094513299136408788493212,
+ 0.41166757935215520377191731704,
+ 0.96020915727830366672170130175,
+ 0.55313106883839046701902022583,
+ 0.9796595451013758579218900134,
+ 0.74222694300533435700276764516,
+ 0.117294243075539310976051880564,
+ 0.32216824750097146958151447387,
+ 0.59090211400137031908131441,
+ 0.116841680533127258304897076543,
+ 0.83595865401141052310417569507,
+ 0.249488155772987988074361149176,
+ 0.67896015287499211280971531326,
+ 0.72256498621401843299673078876,
+ 0.327315362968271601258667297595,
+ 0.37438214921868498405279953481,
+ 0.76929694812658272272027330778,
+ 0.44282297788821568912463681727,
+ 0.59517407740270913902014268964,
+ 0.346217547960702024419571713567,
+ 0.68339868731911838904373225224,
+ 0.057507087039986776837238366719,
+ 0.1189343986186977384509521024,
+ 0.65646666532916174831489781194,
+ 0.80925124288745606089697795707,
+ 0.61302937875769552609444313984,
+ 0.64367434863387777107222872563,
+ 0.059228300879437554416166010005,
+ 0.76899237494115809397158171526,
+ 0.335797991302131791511629123206,
+ 0.72923178692628392090326699514,
+ 0.79300056654108221012876564405,
+ 0.58866760551158502690719665335,
+ 0.65249222174748700395779659047,
+ 0.79573528799715877963614353006,
+ 0.101363067664632247385474166088,
+ 0.392494669960902131436398643207,
+ 0.37323453200630776302168616197,
+ 0.29857554596542776498065634631,
+ 0.9796202149626312305197715787,
+ 0.58770219934833805722677794788,
+ 0.126574575737099431915356308504,
+ 0.51086682994362911961448609847,
+ 0.26221303911946316754295166201,
+ 0.87331402410090670707406246035,
+ 0.08604799064198292716037672196,
+ 0.77880380648915901962140523059,
+ 0.34131646312914811415381942246,
+ 0.422787222735822749759714960156,
+ 0.16550478231620269333824890372,
+ 0.84087065799129220871741135711,
+ 0.96561976597443996963329538915,
+ 0.059890627133354026356081805998,
+ 0.09359839900604706997291172522,
+ 0.61463026659668017286248279853,
+ 0.220582135665522265733252389516,
+ 0.30146695094150797543070759948,
+ 0.406591688270652513808216198946,
+ 0.206959751707199812083987569348,
+ 0.71382992952779021033600406503,
+ 0.98971690700151825984363090029,
+ 0.86339958328134745391858859595,
+ 0.70037828363249257457230217791,
+ 0.97380974339470107231135690474,
+ 0.9184635965630883290893011311,
+ 0.418605216026507942885819265225,
+ 0.61793227858714759711625818653,
+ 0.67394880797682685081908511723,
+ 0.98871101941805039780826467279,
+ 0.65973593853137069988371349845,
+ 0.93348525072186907424189028727,
+ 0.59164378220465485142298641014,
+ 0.95303768733773138214124075961,
+ 0.88667310242538944858141870801,
+ 0.83785319781204861623008709825,
+ 0.54026788227426708201242457367,
+ 0.74842599257855801522259951132,
+ 0.286624102305531463268442510375,
+ 0.41180484980938874161376712508,
+ 0.22754664620316922947541651384,
+ 0.62360609793949755240041318939,
+ 0.3311618194042077047850111557,
+ 0.315407885695867020730009836503,
+ 0.215221706711430951961780213436,
+ 0.168600630933631406101821024413,
+ 0.62661489373200405241464923618,
+ 0.95357070304277219756741072036,
+ 0.5186418766697788447635039428,
+ 0.70772930521061953327927296944,
+ 0.410376884797056150221504703145,
+ 0.39705302343406249619577860633,
+ 0.79215885822696034431481699125,
+ 0.157831717946112504384603002152,
+ 0.26892306298536012837855426922,
+ 0.15697088614321016223211167568,
+ 0.41395315712905823355235182393,
+ 0.043977876945327860015049914653,
+ 0.91453495544799358550673657283,
+ 0.46230093259088633973148827911,
+ 0.79479146768024434444120965094,
+ 0.1466704986407674407377422815,
+ 0.093614591443204076599999803382,
+ 0.66061870961706149406527099303,
+ 0.087462146328394574476138187113,
+ 0.79683664444310818297700615557,
+ 0.39732728185755441060070738751,
+ 0.141934473990413594291362391075,
+ 0.63111751995951919258061547632,
+ 0.78521985432793823024330967029,
+ 0.53307346282606806792796696141,
+ 0.61679109370763781010143645189,
+ 0.40696293619387120891515025426,
+ 0.68670343879278712242412028794,
+ 0.0115112936831136012901340526452,
+ 0.70866056737692430987650236649,
+ 0.75378980574358943122474800795,
+ 0.17133202766710894969283150847,
+ 0.36771201738922655520549864974,
+ 0.64614182581953931840374311331,
+ 0.354495602088990708111406368474,
+ 0.96418771817934443444348833491,
+ 0.51633426669933834634574104246,
+ 0.064671329812306055349433587193,
+ 0.084335079914541732137341401384,
+ 0.98578018340150609333535890283,
+ 0.32988119060114570391488875477,
+ 0.70568290443337103364762141207,
+ 0.7501960060851696034137148851,
+ 0.141312840936106004164373056114,
+ 0.60721022154106372815080238296,
+ 0.49179275887283771965744826261,
+ 0.85530668893284708999269819019,
+ 0.09730053915339358769067661488,
+ 0.48817911888023094845428570434,
+ 0.37116312252354470380676793579,
+ 0.61870369881699387959990992873,
+ 0.381874188039839457469043174076,
+ 0.68193837613090719561872304949,
+ 0.4773618313988618747215621251,
+ 0.152383599292709764750406667286,
+ 0.54317522808228983459963725598,
+ 0.363848788591302782268887022354,
+ 0.0105589810271147011378412305973,
+ 0.55582445068669939957392951111,
+ 0.99910376130213936748996659383,
+ 0.90286867348280161480903197439,
+ 0.48268382934936288156485037692,
+ 0.0976084557356802030533675394,
+ 0.29004949962481398455881920169,
+ 0.99169758897256717005011514856,
+ 0.20722895154834288274430061308,
+ 0.50294863638464584121275744208,
+ 0.71094033855350495714847377558,
+ 0.94078709219520224551350834268,
+ 0.48088262771516317628650315489,
+ 0.80538698628980761175811796611,
+ 0.83495029615293903361580945571,
+ 0.67996381940825251937974905761,
+ 0.57936805772275234468590364926,
+ 0.41778137764942046281708286844,
+ 0.161602687591454506771276482303,
+ 0.093910625156097743113739432334,
+ 0.45716763620641108625606409874,
+ 0.96455075374827233820027584808,
+ 0.5179966880512917274934448216,
+ 0.046797382046060065926143985952,
+ 0.83673567319931334127111064225,
+ 0.44224504444533247245974476514,
+ 0.73281179385894336737033582786,
+ 0.5642490153724193432309549673,
+ 0.83700200507325250303481208805,
+ 0.152714941779871552944298597052,
+ 0.38606607994977770238226473985,
+ 0.0155140917516105439042442246577,
+ 0.51621537013393688713546096688,
+ 0.311969390991657895966526156064,
+ 0.83890647777450698803932943984,
+ 0.54370750820133482930695388638,
+ 0.98636765788772465929756760473,
+ 0.77334255661128878905675504339,
+ 0.57070354296508751519811368688,
+ 0.8365252076669013372866223481,
+ 0.344601601940890721182485798794,
+ 0.92658930620470543221158939208,
+ 0.72724523363899270076210273102,
+ 0.413672082025645586061788451734,
+ 0.5132836422023222169840403333,
+ 0.82135610583961360173883281975,
+ 0.423835065039748889417547786563,
+ 0.87083598844595488941471761572,
+ 0.59009392451459866513886634656,
+ 0.206124826643305920436961792363,
+ 0.288685540685143988030522421633,
+ 0.7944357933456167153993184889,
+ 0.090945230657758780394996530608,
+ 0.52981750421369669363095418817,
+ 0.091368944984485824360107751981,
+ 0.81824925769562351657564377069,
+ 0.083315412912658535228751011063,
+ 0.59602276778799576464600065047,
+ 0.52258035262146456789454411102,
+ 0.394692074165738897132014378974,
+ 0.92031214264405188928824363967,
+ 0.32812665356161216265971156268,
+ 0.79754299890007289545033977389,
+ 0.3029021512227565310021437326,
+ 0.81425785760698537744367921928,
+ 0.85199399843570233736733560413,
+ 0.096629890212080240754541391968,
+ 0.60643798959967098211181910285,
+ 0.75368518979236587723780129098,
+ 0.451368813651510369666120626045,
+ 0.86189868235067352904955566961,
+ 0.239506411296874624231401913963,
+ 0.143392266376287906568670938457,
+ 0.035585084401323981008798496622,
+ 0.89407531932950775763701297226,
+ 0.56699767164913732414312190205,
+ 0.6107715946195223295493238966,
+ 0.980870588312723808697191463,
+ 0.37603666613089681502774907483,
+ 0.19565477083291620146833762404,
+ 0.70326913680165706368122461762,
+ 0.98247770640436619202690080984,
+ 0.54911931698472764719220618506,
+ 0.96749331150477343995263612791,
+ 0.9349501605275792139661332597,
+ 0.067704019779021886031495084945,
+ 0.52883185005352261786874768842,
+ 0.03879817199556086106868125058,
+ 0.011268895714104342862021635882,
+ 0.86781395233112768504418642287,
+ 0.73610697666830606371057497872,
+ 0.22595829849389174304359852447,
+ 0.95990840938724981323147621815,
+ 0.5938079875208820675776232526,
+ 0.78655922365792476391655372464,
+ 0.51099073264725007373467108776,
+ 0.66474884887866769539664215292,
+ 0.88640025828226102852258218854,
+ 0.39889893489572927635368967129,
+ 0.76340426725003756852384366924,
+ 0.485534753598641026618647825146,
+ 0.55957578573824837450384728978,
+ 0.50840543283094885180866842941,
+ 0.0102415845792896532313226969615,
+ 0.74666891036262398733922051708,
+ 0.49044748088989431070743849791,
+ 0.184017043174756439606592004597,
+ 0.0225210121470402648790231578307,
+ 0.096909683465740960387467976065,
+ 0.0521874432095560437920256545446,
+ 0.108114343037383115951564617563,
+ 0.77430486784405922952977031491,
+ 0.73286432949907824441702845144,
+ 0.083559249182272369453587951223,
+ 0.074541345541671560054508020717,
+ 0.55130541064331728019681677403,
+ 0.101450912226971008587146654246,
+ 0.74564503962660370005995595861,
+ 0.55903832180264925580029280922,
+ 0.86098138284846671753408133719,
+ 0.76146956314354797691373262733,
+ 0.5569854467166466965564479865,
+ 0.61138555623626762560168304163,
+ 0.93778268377974305185411499629,
+ 0.106728342608615813606903105742,
+ 0.51139895550624845300079248199,
+ 0.8826404150665399364200384063,
+ 0.79849755952621824621632991954,
+ 0.60058338183244813128378689372,
+ 0.57271235605091257806409062354,
+ 0.134476676178095582804914204515,
+ 0.62710051406343298533266304307,
+ 0.21517566131268423511744492316,
+ 0.87763268502269127056352092234,
+ 0.259516013975152388767641295316,
+ 0.54026961752737864438921779715,
+ 0.0321012344232942464157113655476,
+ 0.047765687217921465801489989111,
+ 0.17851281529041807770891682623,
+ 0.67864372391481596436180177405,
+ 0.27188630999531652193578141334,
+ 0.76570352378902765382129471855,
+ 0.55727605717645959087760838806,
+ 0.40035295538031700787360193533,
+ 0.65772683660586524086245866733,
+ 0.87515739410383285146563935658,
+ 0.51637173718066431535845791928,
+ 0.32843440805452173782945632394,
+ 0.46789250836790673252530282969,
+ 0.153916136058705475580104911632,
+ 0.38115724589238346986896925035,
+ 0.96911901452270741576104655076,
+ 0.327510878721849788805057952285,
+ 0.52921188196053063832762822112,
+ 0.357891066893689952162669812174,
+ 0.8109495999496825638917226258,
+ 0.87378695338223548954000159812,
+ 0.071735687760291841872657613394,
+ 0.22099818521305441851106524174,
+ 0.61319403424123059973018445501,
+ 0.49185069904977836269777464774,
+ 0.8465618819298531473261910176,
+ 0.88263955123256235889766657732,
+ 0.264605739218701311737446373095,
+ 0.157257748694727606809000832224,
+ 0.61172692557424578980817509135,
+ 0.89224381101792427145783648267,
+ 0.049436313890546252030141534714,
+ 0.78472068655126867546237630366,
+ 0.94890896727672958163705440614,
+ 0.61244719025309458330037069759,
+ 0.69652639673616920270100103049,
+ 0.82306805868313923466426022855,
+ 0.4619352653236511042512479492,
+ 0.248913888569715263431474781448,
+ 0.64972077945521993267494748532,
+ 0.058989138867897862567374093665,
+ 0.97969837050674699927934092348,
+ 0.112860503606029382332397067852,
+ 0.9148268966080465389473749031,
+ 0.80522292073416096202056634334,
+ 0.80810563925192214527344776336,
+ 0.082994810842601316055993203972,
+ 0.58154183958194788097113770541,
+ 0.91401321304178026032151961143,
+ 0.064162440925738934087179609749,
+ 0.15233762499249088696399602351,
+ 0.05051666992337641462246832006,
+ 0.138526581114846840617440323377,
+ 0.3330645447918149831766264793,
+ 0.217487368997014213919568641696,
+ 0.61893770768550649722673903221,
+ 0.48128956859001312165262121487,
+ 0.67074178502738313699688470847,
+ 0.74389636308055141796746779725,
+ 0.78623735396470085242463142878,
+ 0.74044466560335570728816983391,
+ 0.44977042205766449238521848558,
+ 0.04936658918716696558210777333,
+ 0.46898154881467544198433735515,
+ 0.86577421926732888331279455256,
+ 0.351697801257336354285066689416,
+ 0.44607679846684358775746123434,
+ 0.68542184287580537292736482205,
+ 0.044146424753083577398366558491,
+ 0.84496717026871403905274974765,
+ 0.20398318496314438897842101827,
+ 0.75107700174605698650069666924,
+ 0.178571061661964354577482608798,
+ 0.67178502534981979941629966218,
+ 0.90847842600882488644789391115,
+ 0.073076683947302775918335357377,
+ 0.33981323802799502107773228774,
+ 0.88205531070102240708858032672,
+ 0.52395959911163033140017417074,
+ 0.339537812421755656306362620887,
+ 0.54102447887624739438002987695,
+ 0.99615637434542139613844677579,
+ 0.91178029521112995461052949527,
+ 0.75825739605806537625994927603,
+ 0.20376049709427102495755901889,
+ 0.414724980644126108685694310425,
+ 0.33340705339227162790042902392,
+ 0.63442350111338002489027718102,
+ 0.79083735924049231993808201264,
+ 0.7022290803727963570326957922,
+ 0.073051026670174816217706335151,
+ 0.50842348505687696224462184336,
+ 0.32363091931107924009593033016,
+ 0.097074638787613630803324174721,
+ 0.79231345620836950165162896374,
+ 0.46134517653790366185204412042,
+ 0.87767180094474465071641454817,
+ 0.30504377737897498569142680272,
+ 0.96430402804903305707372788262,
+ 0.58722709934909516402891605024,
+ 0.36287829330987989626587492725,
+ 0.341369045118572012709880807167,
+ 0.18622546427505557603629823709,
+ 0.71794779555885705340742601105,
+ 0.098775720656078510422828040021,
+ 0.94170390436210924588938028149,
+ 0.6256516749208606216856038288,
+ 0.84990648194056707180867958453,
+ 0.24897158268824763099382644974,
+ 0.67126976686560821454618204853,
+ 0.18287142221906188751198231263,
+ 0.58301735289988287890086250316,
+ 0.39451451502323596545833498888,
+ 0.64778726863510310777659172018,
+ 0.344060647976610102257104623935,
+ 0.8543225374577925606075052273,
+ 0.41721025737118350088955048104,
+ 0.346301150923723212219486824146,
+ 0.430145349151890094004681136873,
+ 0.083653676599147505357408467754,
+ 0.89927285917733406113015320169,
+ 0.87717630249665962395834008139,
+ 0.114609060439245285884826496387,
+ 0.19079403943711412757743782207,
+ 0.095752662525740063245815699042,
+ 0.79249438764728213221559489213,
+ 0.36889557473162465630046043798,
+ 0.076691690566591062968137595944,
+ 0.82502767429905549906741868154,
+ 0.7665582347663079379259164121,
+ 0.40329445688627141530172819257,
+ 0.76025417855373928649612014969,
+ 0.67742016809536470259225177395,
+ 0.56458198627250149175789836481,
+ 0.78923506303765674533158921804,
+ 0.242546191857944356752822856477,
+ 0.5429792204847717222270173404,
+ 0.7269010821579782458839227112,
+ 0.68884017933657182784660476876,
+ 0.037868346502260087811459749823,
+ 0.5900507745679403546108564628,
+ 0.2867946536016681954708929644,
+ 0.47061390957475445523849010039,
+ 0.51289737877965767076806069599,
+ 0.422963220866519099525024712084,
+ 0.056516063514784913538055836342,
+ 0.77559606292381102490968685122,
+ 0.44812023547000818124896526252,
+ 0.8496368064876247362896528731,
+ 0.272242276648834925536741986616,
+ 0.21366791927514210787832263868,
+ 0.458126557153035507756298880855,
+ 0.59095285049337797286946531198,
+ 0.41387171106200290943847880691,
+ 0.040527832792286543640976926214,
+ 0.84749051864346812142321430329,
+ 0.6591922374100337646083630177,
+ 0.30504037894556796180304594549,
+ 0.69588062596190762407598122745,
+ 0.54615362946297678668402889519,
+ 0.27179536774730804380125320985,
+ 0.16312965572910266758089041195,
+ 0.60443803311418335000528681396,
+ 0.76221957063947757300487766314,
+ 0.0012561481228798307955579245318,
+ 0.38477311712200424042679172286,
+ 0.86336953839931184684851388121,
+ 0.85132017314817690655384788334,
+ 0.79741410166633177181313320738,
+ 0.81142674213295830272567127246,
+ 0.90095974521916505411272740187,
+ 0.461262866736651478343958282766,
+ 0.163149749038393754125992055513,
+ 0.079563568933303239293664877234,
+ 0.0076308467066608702534098522771,
+ 0.74020408989686798939059759005,
+ 0.68004244363120265645245845544,
+ 0.99423282025586676895879517721,
+ 0.256512790150101579655974619204,
+ 0.15841489307390214447222985222,
+ 0.53156533193583516285295078457,
+ 0.51195175518666885397864463638,
+ 0.2688502522458221215136352473,
+ 0.290743998007688539265414246556,
+ 0.375642431327791011131765421904,
+ 0.73366824563603699669790620984,
+ 0.89031055476039433366324605036,
+ 0.63269458446317741594059410575,
+ 0.79677646360837164675956632,
+ 0.91096051787867659208019728176,
+ 0.056411022047894420770349313174,
+ 0.7117937367428418076554349793,
+ 0.494496454398059649677550547185,
+ 0.9944698091905991687808626336,
+ 0.195654008095567563746040882677,
+ 0.33245249703376584453346565181,
+ 0.91671965905832444523554539619,
+ 0.104159073216349402499760928077,
+ 0.78250381705179599027513221262,
+ 0.82221952254403323129879405024,
+ 0.25404653774104883427079980313,
+ 0.89334850648967094099280368977,
+ 0.2721479244387740074938025269,
+ 0.58627710421889854554604323774,
+ 0.80740872172002770008164688167,
+ 0.295213737773499230779293451686,
+ 0.366266263469556210902410635735,
+ 0.72189449997560167388059780325,
+ 0.91339160960295327548014703572,
+ 0.27978723834100283634925494393,
+ 0.44312275285067091147157546317,
+ 0.88264479919648468925459438057,
+ 0.74860386620420068665117140949,
+ 0.97534502025842784289380076051,
+ 0.183653687608870314454061893335,
+ 0.14143760686328530307343938507,
+ 0.7794390875763962068165432699,
+ 0.79988123088296718350409621263,
+ 0.91344402454829897860268279997,
+ 0.3003753710559256572305330721,
+ 0.92236868180619898327118824659,
+ 0.85128995509445007265453349716,
+ 0.51226586850988855988005111668,
+ 0.59328586801467434659081264762,
+ 0.131543061349700789237108200816,
+ 0.97962864281984756641024957818,
+ 0.80003961712390827564285728721,
+ 0.07332191035039234849987853587,
+ 0.33710892945255754021249327366,
+ 0.237798240512212115424045579506,
+ 0.050628096786899757905464602857,
+ 0.36368141580193860149061967396,
+ 0.074547282281222729072803274018,
+ 0.32013351651022219595136046535,
+ 0.50087363542319392259892635316,
+ 0.95534128322832584718763016378,
+ 0.63089810554419660091974256912,
+ 0.45937043591639452731937380837,
+ 0.77794827072126710252068287081,
+ 0.5833967217973934570703322242,
+ 0.89948711130168823436943591707,
+ 0.88448792344727137087709578749,
+ 0.75774410588649351850782212564,
+ 0.51545850808454807305763364038,
+ 0.89535564141616759448334976604,
+ 0.433876155086630438489414332084,
+ 0.263145194001722566517185175524,
+ 0.094513715303174637696079970882,
+ 0.0067905149976316075236601623182,
+ 0.3746548325271489972742277758,
+ 0.81418012245523025207375976459,
+ 0.7382555515800124086679648947,
+ 0.71505454385778976492869269043,
+ 0.7698698840252614242858413632,
+ 0.53096667868591647121855295207,
+ 0.5913146508318579789498085478,
+ 0.82865413011200335887487636747,
+ 0.246477924915753655378269255135,
+ 0.7718625116939460952174295485,
+ 0.33088224685104582360581424038,
+ 0.077396220323469426942810035952,
+ 0.399851739373243384531661374094,
+ 0.74828949567652386217126904324,
+ 0.55533476993642340021791702209,
+ 0.475356366587838670689554086714,
+ 0.99199926249299355831492581518,
+ 0.60739053074816626181185925167,
+ 0.94570422855790142383862352906,
+ 0.67410117583869264525962136333,
+ 0.99340016295179621471645098914,
+ 0.30521664837678549625426072163,
+ 0.82786899862234431119578444516,
+ 0.0246054418785779831964997687095,
+ 0.33057040500642957115284791089,
+ 0.325865542252271051046671982904,
+ 0.116469964535698881624567000313,
+ 0.38792519202192930208550481713,
+ 0.147033252049062199325747990948,
+ 0.333360890210745561370686771174,
+ 0.267717098935309378552279527125,
+ 0.473606191830554736751491306975,
+ 0.69379726024488030302072707274,
+ 0.39866105325920152799379542147,
+ 0.075996151521605600512218326895,
+ 0.43692155239290098173990417979,
+ 0.63183509185797834489905365016,
+ 0.327726835190132824885685947736,
+ 0.82769389015654780671213364517,
+ 0.38036542617183448008870457384,
+ 0.06416363778906221378580326597,
+ 0.95989693996326393340364540321,
+ 0.77473792948077472252492320019,
+ 0.73353080354752465520384745159,
+ 0.79531316211939777703706647305,
+ 0.31887745411495362933791547194,
+ 0.5504233366621661345254817397,
+ 0.133841546560512334978343647306,
+ 0.93323316393590598213508657757,
+ 0.219534116905903225236593922786,
+ 0.352227557302752346568799070044,
+ 0.50699048681296139093781410327,
+ 0.56063256677949754339755086295,
+ 0.97859418495668224120337606178,
+ 0.43217748779939454097021337034,
+ 0.6118800794139137562939270606,
+ 0.8826339041571606455078384688,
+ 0.190654349423411314990846249777,
+ 0.0272323818569649486990095499454,
+ 0.13501820915175992368033644254,
+ 0.34430252524220055863712676536,
+ 0.135013324503164182485257894453,
+ 0.83301344777287732687815180326,
+ 0.71146270180847724757833953093,
+ 0.059584725284656364940760846576,
+ 0.124388342467555907606115942139,
+ 0.86760011350010388002288781466,
+ 0.43443235444248399222879725088,
+ 0.62257025564267773540408523682,
+ 0.42224480338939459869117553607,
+ 0.122203729563367693705179104655,
+ 0.86763329805228175173701751082,
+ 0.61852711996472568821866689006,
+ 0.9981036801779161471700405786,
+ 0.177126618334123901292041594724,
+ 0.37033568941002233661950847289,
+ 0.81720705981865203019383851894,
+ 0.194752883553301253160228353622,
+ 0.5399475493930702257701115294,
+ 0.21555050095259535717046390477,
+ 0.031480898918419061738395489394,
+ 0.0108626235742996694506893658131,
+ 0.29439861659506237876675916168,
+ 0.25969803792963051605662393213,
+ 0.64305111681301349941082616522,
+ 0.398301763391130971280749586885,
+ 0.82959279528518208376169366062,
+ 0.494452121232255582677051524076,
+ 0.032046850110252624668328949032,
+ 0.304808216164121089322038632124,
+ 0.43743086801077933536332835933,
+ 0.067635143022119684849606244687,
+ 0.062601171413915686472972559687,
+ 0.80704249768256597155262089974,
+ 0.049090587901867220876053770281,
+ 0.14290280489067737067786839775,
+ 0.85153414385190808252068833198,
+ 0.052035578866778404379096518691,
+ 0.84803461110488710482683367176,
+ 0.323391780352303842858779454674,
+ 0.52713499343541339922976296515,
+ 0.91034109375479019837692785976,
+ 0.106146556890642346491650008212,
+ 0.291532189474064930184344798145,
+ 0.330494959183718721493342551525,
+ 0.6236537208920888603043773443,
+ 0.89122121355780761549659392994,
+ 0.51799810738861013193016943087,
+ 0.249256177739037963581221438965,
+ 0.76322106809612787470242640888,
+ 0.97852511972383831461233976406,
+ 0.52255677693690499607690355455,
+ 0.4450034860583097087122794844,
+ 0.79114162250324775713725095404,
+ 0.94756217345536380876998110362,
+ 0.58677918818329126036021764787,
+ 0.84845252924877884299669190981,
+ 0.30081720041370757827674016113,
+ 0.27920525653128846538023076229,
+ 0.33471466998109052439193176801,
+ 0.77432114969973711331784009482,
+ 0.79975078898170550460312445454,
+ 0.90029380309155505829673878957,
+ 0.22735855793472972935624370264,
+ 0.83917898101167717908999667914,
+ 0.96001063929762371813642857618,
+ 0.80557845129235602137075744771,
+ 0.227828260252387705994553631692,
+ 0.45514459312672738783331856798,
+ 0.6996049090759249573037751274,
+ 0.76407211467383802388153449844,
+ 0.35750763601712374361686514082,
+ 0.090157662209549066428683554241,
+ 0.95043897530001474792481472865,
+ 0.97262166470012788338731033975,
+ 0.203045895422423613196589718133,
+ 0.217437635156560627036179586425,
+ 0.5222956932204809424910993278,
+ 0.52865060708104384493756729767,
+ 0.97715373213739469800445297208,
+ 0.5740174414400501666597490431,
+ 0.172348314420047937640907870932,
+ 0.57197038071649167881433868039,
+ 0.26289948915209002196358225729,
+ 0.177903112174726341611524884074,
+ 0.74917239660013094610681443816,
+ 0.59837085384984040836442442706,
+ 0.065070324689375259831989322427,
+ 0.44807493892928848916566949155,
+ 0.59027783360778386064107723777,
+ 0.122058971772529617939528531479,
+ 0.18965096763129552013799044806,
+ 0.179455202785822708296801760066,
+ 0.032170979041981235014758366854,
+ 0.297222966386620738492021519056,
+ 0.91323423393143490893801153646,
+ 0.75998869946268189685327906564,
+ 0.83934073246383862944110864099,
+ 0.17898779712956184324621175982,
+ 0.480986398855505957279379560397,
+ 0.60860751560721289727164165043,
+ 0.298927282590269088379100218673,
+ 0.77935020447343759584143119835,
+ 0.480545242963934573648858250607,
+ 0.85619790637736236353631524289,
+ 0.96488893882602300700764346564,
+ 0.36351865634843046736230405883,
+ 0.82895257550724293657223335349,
+ 0.79749691055514662573933190753,
+ 0.20106705267868388883102752272,
+ 0.33623918491977977623116871123,
+ 0.93256466340279772952587363977,
+ 0.88648669501682764515636262464,
+ 0.47662235152771500250187825963,
+ 0.52659238455883068245922982067,
+ 0.94111676559395948458425469814,
+ 0.323317713690175795284098362026,
+ 0.34796405933091263994264450729,
+ 0.52445433363119391822452105405,
+ 0.525140277317638922334264421,
+ 0.64469482443585357444532895759,
+ 0.33472685924872903603447879104,
+ 0.42400458791646499703641118014,
+ 0.8222662798441265944554029489,
+ 0.75524567154228028735673060411,
+ 0.90790601849806560799894333131,
+ 0.75164241313793249434488428193,
+ 0.38724602290468111557712203885,
+ 0.36352513950081020449187506395,
+ 0.078398790907179055722325452963,
+ 0.5003676822199407758422514133,
+ 0.86055044548361328714384972985,
+ 0.66748567445598821900669819042,
+ 0.95450644393912187127659765969,
+ 0.9536501355878008523425355652,
+ 0.56207573012593503802043957099,
+ 0.99057795680550440527031916411,
+ 0.056136908924222021770088579728,
+ 0.89322960593560085272815946927,
+ 0.19380351076299398770342941398,
+ 0.036881975481577328074706357897,
+ 0.38834900979665334617449710449,
+ 0.77196507761008668275581490587,
+ 0.87539115393397618421355963533,
+ 0.9131721846286054396553858461,
+ 0.62245648254908013430163665866,
+ 0.56021174819199355559539089633,
+ 0.86987294559046384230921358438,
+ 0.474584307464076041054198211805,
+ 0.37224942408757353492416873571,
+ 0.198307276357215222087716993615,
+ 0.81633548414328354008913860616,
+ 0.071192681637945014051745371309,
+ 0.227203421058334439883665388655,
+ 0.50527083273847576806586104904,
+ 0.25911353175247232791676189983,
+ 0.103567996992606824957067451526,
+ 0.98316826751311017109085781757,
+ 0.99206610065531611133123425907,
+ 0.63838444880264351660305680771,
+ 0.90013304139719692321619239255,
+ 0.541419881593941428911392944,
+ 0.434681681520065487913409442927,
+ 0.0277935905905462584654818408167,
+ 0.28736085880215502013374946299,
+ 0.204706679291990486471085620508,
+ 0.29639415300325412139805373353,
+ 0.316818074164048785111401123944,
+ 0.58068268044073033182148412246,
+ 0.137736206950094621238996907006,
+ 0.80907996549523150166492783923,
+ 0.73799561611209772635015717353,
+ 0.84013433924397440368969968592,
+ 0.46126521311414726401422152854,
+ 0.78013716447507497359555980298,
+ 0.83405708922951231042933175851,
+ 0.6366367969739079258896472192,
+ 0.77353748358406402598000037557,
+ 0.17489624725635947111471117775,
+ 0.80267952648428412026314875447,
+ 0.80437106861315296029137160672,
+ 0.62834462177566783487584779777,
+ 0.31539602345858033626133832055,
+ 0.50541890853061839219557074283,
+ 0.0195874476781850222509795360627,
+ 0.011676447193909007242643314705,
+ 0.85675479754070644130150816794,
+ 0.09391269154749661204040398199,
+ 0.369625667102334643216258483376,
+ 0.84311577046357953313746551837,
+ 0.66438426715728382263582851036,
+ 0.70530906415261448155650458603,
+ 0.446783684004800041373395690117,
+ 0.75627790284213576819810990131,
+ 0.57190285913753158265774292274,
+ 0.97785681370875218892539297465,
+ 0.0244503386494348881614690746194,
+ 0.48528430854909558202793141933,
+ 0.89436155397807056672243211894,
+ 0.40757489194485346255194449191,
+ 0.91772837786834838909335779229,
+ 0.28020326531649972709359017096,
+ 0.28847822326776188982020803144,
+ 0.93193769743225684077624356649,
+ 0.58336147304815741644785105161,
+ 0.4004241800179331174134885947,
+ 0.265790823692672203607418801725,
+ 0.4137092141145146388568879939,
+ 0.0255090449126572366852573357318,
+ 0.47601725598948555645487446626,
+ 0.69141516452580797436419291497,
+ 0.187709862166242786826507443003,
+ 0.31177816288567708916778389045,
+ 0.79635247302484103596788484137,
+ 0.14648403361265752358955335086,
+ 0.0088027047060531475573345163528,
+ 0.90053967411241805345616039474,
+ 0.373822238382428585287035417224,
+ 0.94303097002109978273901800507,
+ 0.037263906643698883423150604649,
+ 0.98416823398276433881119247311,
+ 0.257766562836474661728601317803,
+ 0.09336855716941364387765222813,
+ 0.057604551843195630210060755775,
+ 0.37732024813036636644231432449,
+ 0.437099108019093398068604946814,
+ 0.0298274889889844501626534131975,
+ 0.54161045457572229928359302347,
+ 0.354192069739745951755754451894,
+ 0.9952629304832433588789284291,
+ 0.61362350596285189174752077338,
+ 0.23176197923774029736185020682,
+ 0.259000332877923815426717028414,
+ 0.77171708810079063604185854121,
+ 0.87278431247491539306511051532,
+ 0.386310463821549823085972724515,
+ 0.19043920209178263945663905422,
+ 0.77200547833114724875436606573,
+ 0.2683024354984293205497398925,
+ 0.144270112550972640008446091075,
+ 0.36996280314557984925474224612,
+ 0.163548224543250866742712583905,
+ 0.54541238293503241055380526708,
+ 0.54270760938500008382580072956,
+ 0.7374073253240524865446763851,
+ 0.93470960326436177572863031654,
+ 0.71417607213823278615975270201,
+ 0.65837463356664939532769528292,
+ 0.433323451649582925271830911365,
+ 0.79664580661766246494864588315,
+ 0.392079017934601610514677836005,
+ 0.212454387416532999103471570235,
+ 0.198678082418012501322802116335,
+ 0.61525672800559338657275986197,
+ 0.99339589895181138684928419014,
+ 0.53563057949945927383392076793,
+ 0.68817192513245948798192690082,
+ 0.59671938169380086666866042956,
+ 0.5686075254645125832635026196,
+ 0.25860953535454698758704936914,
+ 0.60779864941995215785819783969,
+ 0.46515241662568547274625942204,
+ 0.8756966078479474164213834749,
+ 0.89153160343113076353740745469,
+ 0.57055911159151577684982200009,
+ 0.39366246576557783924065683256,
+ 0.53789676931469921495851209609,
+ 0.95842028586447684249630374944,
+ 0.25218284880717367924827402845,
+ 0.23718965807272971860203662735,
+ 0.334222632819004380754702693406,
+ 0.6370849366068287810411454729,
+ 0.722665796162802454203702773,
+ 0.50216248905279887048328225791,
+ 0.34529823309520970630714708672,
+ 0.45098892404492692601908443802,
+ 0.64640019115293913591196874603,
+ 0.137077316379736192931987264458,
+ 0.29368115076039970149731521521,
+ 0.20091822953913855557804069085,
+ 0.066267083813833718511605782276,
+ 0.88094596104423280074202839474,
+ 0.071730322265966936504743175424,
+ 0.69735904142296779896396736035,
+ 0.91352594564083795862432502567,
+ 0.13244220377041278512040316988,
+ 0.6283911312781029516331064494,
+ 0.34896540167805105781090114462,
+ 0.6795367801751911186206756471,
+ 0.74898526486791573083377925403,
+ 0.71700182398199203349731046015,
+ 0.121142833366516620257163901501,
+ 0.32678002036857151533698078636,
+ 0.327511655875027224450064555456,
+ 0.0079152053645354575349489795814,
+ 0.84748954479623021059675156738,
+ 0.75041561033954009809301550159,
+ 0.41101693712463238996746228193,
+ 0.90155864029338267639417046915,
+ 0.35464670537047753945618208157,
+ 0.68848712573944472430623590326,
+ 0.08893193373618063124738179594,
+ 0.58932830480784385636485098641,
+ 0.0501618828375381577588978271165,
+ 0.9451968329901169788400753848,
+ 0.074994725566097580721185016702,
+ 0.191860088196691871607965261685,
+ 0.67853841063536805868885844477,
+ 0.179445375284033906887325905976,
+ 0.84157620913886056000430779083,
+ 0.7377942162322144186341324232,
+ 0.231126715579023126062082806996,
+ 0.127662509645324778320005407937,
+ 0.63062414859560283674777403205,
+ 0.55283326072907470543330204975,
+ 0.81243486031688046850257374808,
+ 0.299095175225750536694802628506,
+ 0.34284433830834748530634854762,
+ 0.92098838107935607957057329632,
+ 0.6334432153537539286206936299,
+ 0.49203336326915182548719200464,
+ 0.70089872986754081776092540042,
+ 0.410346112246289262244008861334,
+ 0.689375704219352519232614571,
+ 0.53543492718830214408075484368,
+ 0.78985504761729292283075540625,
+ 0.66802245726332267870092702429,
+ 0.75600588548341120124374250114,
+ 0.83217485519464083512235296359,
+ 0.77758150309412736979136465746,
+ 0.067382141804836913185384124002,
+ 0.7289836962356747770023887674,
+ 0.453434776313686590560640460504,
+ 0.3160796148757468204057886796,
+ 0.0098933475787107681104048511314,
+ 0.3620064234142809735084479026,
+ 0.85993179373877360456391909506,
+ 0.90684883450763884954227285187,
+ 0.75959171037325548903969803948,
+ 0.91219881792279148536349496306,
+ 0.97175430264940118917041244436,
+ 0.292364544897748356834218017667,
+ 0.126096590956329503351026499397,
+ 0.058210669685805595156500555938,
+ 0.207143479048534791976348255132,
+ 0.202837039257860939456824357966,
+ 0.459137240079351948795601640776,
+ 0.65480905235794807223708347609
+};
diff --git a/tests/randoml.c b/tests/randoml.c
new file mode 100644
index 0000000..4e854dd
--- /dev/null
+++ b/tests/randoml.c
@@ -0,0 +1,1028 @@
+/* Some random 'long double' numbers used by gnulib tests.
+ Copyright (C) 2012-2013 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "macros.h"
+
+/* Some numbers in the interval [0,1). */
+
+const long double randoml[1000] =
+{
+ /* Some not so random numbers at the beginning. */
+ 0.0L,
+ /* Then some numbers generated by GNU clisp. */
+ 0.709874756135422554674614242046304686448L,
+ 0.486497838502717923110029188864352615388L,
+ 0.474019570990182753146861083750226106848L,
+ 0.998821069612940336401792152067298257397L,
+ 0.68230324395444341476284133813649237509L,
+ 0.0812383212795450007980350531141537177532L,
+ 0.43131112016001535977175708439191217567L,
+ 0.1596337172541222285215378906083607753005L,
+ 0.0447361192177328171952931546845870270203L,
+ 0.669148550486018286115665314826153614017L,
+ 0.398752708644620313955955676251505325896L,
+ 0.600019492390024166744893736290881101244L,
+ 0.78337397012688890834008412364808365851L,
+ 0.747414410152603863408503379239564644402L,
+ 0.550615721371501982864462175362996180322L,
+ 0.0073983673767251687422683917248311760491L,
+ 0.693846360902780799478892082407382699085L,
+ 0.751592057901191172906159475240427353057L,
+ 0.74000578784995401707243054106755282117L,
+ 0.847264623235961908747497547605068838836L,
+ 0.917431426585209425652777605148791919017L,
+ 0.267532476015101748449269162884835638528L,
+ 0.486834088208986505203048715784492259319L,
+ 0.4580154564181484580770749178538567666L,
+ 0.391521076582874764982597286237947922907L,
+ 0.69173131929214083677828129436922728366L,
+ 0.995268639187054867212755710743514657877L,
+ 0.553189251912843822062196619876802699895L,
+ 0.632300552505301947698796653386744186037L,
+ 0.445572801006840927064646197943103543344L,
+ 0.993634311396905276414701816228609517838L,
+ 0.611582274481091436495638926486363711255L,
+ 0.017611091105275929341544154464243038417L,
+ 0.598936378040443270534796418637146416803L,
+ 0.939730325871014729497001074244817030738L,
+ 0.385712528561693907444911228190200940125L,
+ 0.48796444333495738271693214259711532603L,
+ 0.508634972895891442259656591497940133962L,
+ 0.88453398179301716552318999435310293852L,
+ 0.509099535482633468613040057130206639612L,
+ 0.333677997666677081186230843198919594355L,
+ 0.82715349353996770180499230535973424237L,
+ 0.0372593663309767971914036990047894757662L,
+ 0.932828780275931267421133064996449298348L,
+ 0.486099261359133830842098860485004683725L,
+ 0.987156392631551825781809767746170502002L,
+ 0.824739790678073493124786291053674093535L,
+ 0.671869573118280976952523743592826377585L,
+ 0.48088844444394888967684860088619551899L,
+ 0.017233021606613044454327510797750273989L,
+ 0.988102711714879869326666071903065279145L,
+ 0.091615081537455465573860363408517029583L,
+ 0.0113278995312253231106729997476313183323L,
+ 0.294349528513080028346115860151112891433L,
+ 0.0097058790914280197566968241982258935964L,
+ 0.715113281550035710673074854712220192465L,
+ 0.739627170474553083453358265804562580162L,
+ 0.588476045636558489860462119645353521893L,
+ 0.91330346819098343970944232526748274664L,
+ 0.281457572112513183673653575304242456425L,
+ 0.784192391468991402261628322552430383283L,
+ 0.504857923842698553133786835061714061812L,
+ 0.230410937725986177704701374433825197397L,
+ 0.535805811877939822805608704986961969659L,
+ 0.0508287955596506952822240797812703550548L,
+ 0.179399756999629053194209501169297540332L,
+ 0.675837373242984020977236431747771655704L,
+ 0.981496523455084073391380532008173135055L,
+ 0.325845075647804753424852268729037997407L,
+ 0.832630951427200447589084239299500129776L,
+ 0.825354056334755646582091209610369762364L,
+ 0.574731012869980895104127749738122205757L,
+ 0.799028354294603017571131513193291020045L,
+ 0.537721586879667191016369071169775496218L,
+ 0.83846801885738807298552515294277869191L,
+ 0.0922901597877978587435698953162723703674L,
+ 0.434458505758559675954739433438496373717L,
+ 0.308017320632506922735963882703835222897L,
+ 0.0192693232310748837390370764187488626234L,
+ 0.65275462537999797862908920689650691667L,
+ 0.357130585286320841741290333260811815153L,
+ 0.359562085720204868627653630044659240449L,
+ 0.758320826841831017712067337815543048118L,
+ 0.62169722559489484088614873429559348682L,
+ 0.17335411409874538731529771306978631118L,
+ 0.154077331752487118534287271363344964006L,
+ 0.148559174998934930922746358844164455867L,
+ 0.881316225913391098839630896554038163768L,
+ 0.89289796752480477623907740261818685845L,
+ 0.57786655574695620371527391411424563834L,
+ 0.318175774295281868509200498351278930862L,
+ 0.194978302204782205514236430086515458283L,
+ 0.87084962252516402992532937666368998137L,
+ 0.362113882465068209502300826516448793743L,
+ 0.273446496762640462316848141032810658473L,
+ 0.1471399192242189033406154289397228481905L,
+ 0.937157507052090331728212622934524925056L,
+ 0.600045430164287985733450402316667890373L,
+ 0.794478865621258499047814379367829521507L,
+ 0.889115878933706260333129391997704491913L,
+ 0.631825206206982866021784416451887594472L,
+ 0.966422225095067311240936396545408962515L,
+ 0.676845470105427028205320649846678927664L,
+ 0.671163783319728784750606328490914935783L,
+ 0.213726274743505026386536996423761328083L,
+ 0.99483340496284948345969144891145513965L,
+ 0.362072360280863974302182899205431874295L,
+ 0.89135316959373017710710890812308229361L,
+ 0.861008403776277958081202417380537907424L,
+ 0.518258469677886348298849030872657409393L,
+ 0.74995117457421590827489329835282465567L,
+ 0.141688060236646135992059548400562463963L,
+ 0.231055693687838328234866575264314255906L,
+ 0.128367320195147852998795956530756587271L,
+ 0.735643745226188370911313880883935933086L,
+ 0.481951681233521227023903083881246017963L,
+ 0.29797778097740396719094352844253033076L,
+ 0.259026843185033526978277511857498182853L,
+ 0.76454793636766387350530239448634042225L,
+ 0.921742101320371872828332060575170679558L,
+ 0.135594574885855893452962438848740230435L,
+ 0.249482789438500604376469100084029356821L,
+ 0.447893460512394580798054060401740249162L,
+ 0.841167533365717681130523968098862274883L,
+ 0.063885342343669943206116658917625959392L,
+ 0.49268569222220133343083683720155184169L,
+ 0.0320364278163828327673837310979596079469L,
+ 0.83067006037141488187036282222404336846L,
+ 0.32687090604018629599351990634445890267L,
+ 0.524229581985562678867475657633756672726L,
+ 0.26442137331545990230136529620604338964L,
+ 0.1804465247704923307363156457827584866855L,
+ 0.219897692414720290686302976466475627349L,
+ 0.657372240957848561373923532613997515665L,
+ 0.94917951707325275578037456019158874452L,
+ 0.999935336870950506894538846120127792282L,
+ 0.334292387732229479489367107895450895382L,
+ 0.519605753222230586160238890634421180626L,
+ 0.2353320030331258205431171147281090084686L,
+ 0.697837952881171466097464830413620278996L,
+ 0.337355949172173312279209733133367570558L,
+ 0.59624609578396787690174902306338541087L,
+ 0.430566868363073838098964774826687118822L,
+ 0.303143768470597821848720008902412356097L,
+ 0.45566572082779255052299434804712613961L,
+ 0.63651052470632278377988990008643926753L,
+ 0.88355849548999550762491205909993278845L,
+ 0.857627182143034336666679544569747793963L,
+ 0.579654405386150422035981447661995358225L,
+ 0.527551502180559045145630115424486189773L,
+ 0.227798290812497436015108334865799792168L,
+ 0.860285575656798735433746383563482660567L,
+ 0.657434642899561800145850990323893418457L,
+ 0.991915916857419346367596676050775541352L,
+ 0.0299053482258395117883768309912517801074L,
+ 0.494186962160200346319995839440170254278L,
+ 0.795837941248740362154274095100822390282L,
+ 0.213898349709271555518444444268604992712L,
+ 0.635385838537788174234352352696939407706L,
+ 0.1161960540496013767418067989853615145483L,
+ 0.236636716576793997613161803474856412323L,
+ 0.250257128320679509772248555959408855321L,
+ 0.754809883956726591031066199439807350575L,
+ 0.240047496212680591313028855365466345707L,
+ 0.125918185384015376472834932789271923263L,
+ 0.830761928512260978768305988740912711273L,
+ 0.0833746595456954680423678981938324373477L,
+ 0.993235018876045312632920249583820095078L,
+ 0.74457886551486005017424251252790500917L,
+ 0.904041666312003998553971236017433817041L,
+ 0.99682247674917724207607173416904094376L,
+ 0.778185258630194559195184600522592063632L,
+ 0.617908428541966249479693433082678846704L,
+ 0.034201434638706652764862810175677292771L,
+ 0.1166825963578175046863759835887066398776L,
+ 0.618184997077951045734597662867931774914L,
+ 0.67223166229200793562043589747700629457L,
+ 0.50367723015643325152991864733820551338L,
+ 0.287805524504497224349445840278160308547L,
+ 0.418530565562949537953621246456529701546L,
+ 0.356577284504836083965140033686046682705L,
+ 0.727797226876543100474285620953868682292L,
+ 0.261158535215243995918166290296126543963L,
+ 0.1233681715943113445590872776925938156L,
+ 0.397342365090131218507373938120760734013L,
+ 0.33651833905580176460704582099080050591L,
+ 0.124851176251609572087737060478799388707L,
+ 0.49869389018540295598691678028277690211L,
+ 0.603921102513219725593707198424421456834L,
+ 0.0288068305492076274901316515486696644854L,
+ 0.27635950491121559708402485015430409745L,
+ 0.0219820746750707161670181537628175322048L,
+ 0.893266704905772978187424688068554761406L,
+ 0.055131714446612192984065196401480701447L,
+ 0.478917803887421452005543212818108274705L,
+ 0.1089109338581245135310441557812062287244L,
+ 0.451355129465699006367714322379179082201L,
+ 0.933539696310061306235683130737189659555L,
+ 0.295046527696521751967458467625754033345L,
+ 0.657654030109877699469191835246373699585L,
+ 0.699519422709288537538980841108763784234L,
+ 0.754780411476609088293217972311402262028L,
+ 0.940185229424181440596885768821586612845L,
+ 0.641206442188302531301220212171259413504L,
+ 0.483623421775598486212538785028426545698L,
+ 0.1819507033406890598006456890391145571876L,
+ 0.3493992184159313422014002142021878866L,
+ 0.2282143482135155999703670773974654680736L,
+ 0.65404355620292102948676570623901452325L,
+ 0.000126697620991797753719907018394969483701L,
+ 0.000128697615694221449450257101713351917085L,
+ 0.66277677565136622936757573048183355679L,
+ 0.954427508631091518542647272554320259L,
+ 0.821452416615550557725422642536361482673L,
+ 0.783949133156224682132225528942727293192L,
+ 0.883688268329322182794294084718215227776L,
+ 0.887198477924019626901140168907684736036L,
+ 0.301153686936585019868640358522761168745L,
+ 0.97031160152938862140377079439908121466L,
+ 0.613591225576913510391808189718881180802L,
+ 0.973773801885628446394837963774216539007L,
+ 0.969946092528631153860793542995840284225L,
+ 0.0552318705490405481104532089875456066346L,
+ 0.398506652226642658353465649824893657953L,
+ 0.577466681084525459648007205600389579233L,
+ 0.538305717497527581210294472297571817608L,
+ 0.0378969572225333661087665511893845011475L,
+ 0.82821208446292402852221418490682507414L,
+ 0.207039760611344134455359310666092356869L,
+ 0.278071434395492049592363658721835175976L,
+ 0.418157919791356829061560807874478279737L,
+ 0.917935426878916775097393966246600470752L,
+ 0.968879316988430839484738642933327229065L,
+ 0.836847484003257581736597938908686488306L,
+ 0.95787762740618523171012745852536482523L,
+ 0.381833463284092269744674988738521423563L,
+ 0.585758801118634412354899474049588357203L,
+ 0.590675098878457580254555486356030743515L,
+ 0.999102261786447498899644398829003134788L,
+ 0.278723779765613710807952395929736248799L,
+ 0.150160483677965826860533794972733497469L,
+ 0.39044191915595120943090707935299688844L,
+ 0.882025297705744570797306391637391855587L,
+ 0.26053886056730883704893455389142056588L,
+ 0.530123960707389279621444598593626923328L,
+ 0.307497951588709795568291546230129131789L,
+ 0.755712717002473210112772528495042985208L,
+ 0.403971099596680128749039001982260210321L,
+ 0.0955902605698226580325595772471302440213L,
+ 0.733946822526846681865131682504158670327L,
+ 0.824558199580936798107294631591949429405L,
+ 0.355777480091076251706346214380424670616L,
+ 0.183210308747040172107746729630689571628L,
+ 0.943081072447366944673610412439697363267L,
+ 0.823437046917209496498923793615721213912L,
+ 0.272212671889142468847791216625072718846L,
+ 0.467586497114075237282436742306271250655L,
+ 0.965430243779957305809196327799423550657L,
+ 0.264527585376739963287684763043832918263L,
+ 0.78305929918791974277407705060017330726L,
+ 0.1569161089271269079867408493909342109635L,
+ 0.385890512318945048667111881493883277209L,
+ 0.748768801714747310036929893375463390286L,
+ 0.9607241213632062657075501565333113635L,
+ 0.681005349771442926258254424282975745535L,
+ 0.417404611754855157969846623218352380733L,
+ 0.384922954690351156114438668003273806442L,
+ 0.0248688875333777009659560293287195312336L,
+ 0.289622732329138351547499030028075517487L,
+ 0.356660798938142089830284922931103513564L,
+ 0.1092119220339924538904809107210351902013L,
+ 0.263044604533896828574983495057823392153L,
+ 0.72916056882229781356884933113775509031L,
+ 0.277279616044198734111166028359400949283L,
+ 0.448496025651349045553194567962243478962L,
+ 0.397797975606664545700620422788810306397L,
+ 0.915573317477921170464219734057440942223L,
+ 0.565957191780698852582910000301549192135L,
+ 0.0199640867363067059474765492007910956547L,
+ 0.380718754942963039702539139065633248878L,
+ 0.271561535356661429325107452975658450244L,
+ 0.65703383768996023094650337496290243735L,
+ 0.810303462640169412310932301780031244584L,
+ 0.34389677270659068303923976829417662132L,
+ 0.1459701849396526086771469906702178205394L,
+ 0.0709566883230581731990192048699199874356L,
+ 0.0273188133279639766234319338307950998466L,
+ 0.189257375093862859152281617127963424911L,
+ 0.483370049027267515091110020077746913052L,
+ 0.6121051307445822901845022667347352688L,
+ 0.0669683489197768142011855877890933175548L,
+ 0.0462440353376468071116256899031962430102L,
+ 0.66179099750239749196171922709429044667L,
+ 0.331447780875915347204488922360787127231L,
+ 0.88878630766137716878808504113561041651L,
+ 0.57831688009568937419273238575083437733L,
+ 0.1665758643537997337473156606765968668944L,
+ 0.609499751553850514507525575752744468325L,
+ 0.842660412678850878529299409778020570114L,
+ 0.868735885617006579468607975714721515953L,
+ 0.518323673739076029376626898444587264186L,
+ 0.465048961779768578307935679739067346325L,
+ 0.739933063031511059934522150792493137138L,
+ 0.366097491036976922528977805725731033037L,
+ 0.622890978255856721366594654155975719428L,
+ 0.945120241233001881267096151974150875442L,
+ 0.711795000549305806399598132955701848342L,
+ 0.120093380051693652573317820347038096902L,
+ 0.461420048084338423641881546847056927696L,
+ 0.201645977777376722385295339631509175754L,
+ 0.1479402104137110360277226090924965371445L,
+ 0.287960179369955828242600303166176042591L,
+ 0.788362667534075941033937374958276358103L,
+ 0.610312055398887641020833805884097007991L,
+ 0.758450801974187424825814780682156814865L,
+ 0.64208882693968320907867911523798381855L,
+ 0.255468285690834138126389042932304445888L,
+ 0.0370478385689831649949675007793815537737L,
+ 0.551880617631056560992613768623601574096L,
+ 0.559262357532227558112085482526038868046L,
+ 0.129705275018847798920129782613409588523L,
+ 0.1076289463968801831500602693982998566697L,
+ 0.272506325706516323678193293634687081578L,
+ 0.721990855538151706841764025895777805643L,
+ 0.523084042169573467351077180119310086396L,
+ 0.0858615712848179826840482241961243288956L,
+ 0.589714739430299853251893655400362103563L,
+ 0.512412326166823937685402214713910254025L,
+ 0.802350747297003067442509635888112412853L,
+ 0.715817091619681167941132068164905209087L,
+ 0.0824951218034037355816988555328185436778L,
+ 0.829228234554153070848595829448989414728L,
+ 0.59652037694553054648270061009002150308L,
+ 0.133585725647906582691822880117773950377L,
+ 0.812005216254498654412124509257882599085L,
+ 0.808142463854396488512203093936737654517L,
+ 0.570217922503074432494487309472855783614L,
+ 0.704017977813333280013384719294741845102L,
+ 0.0251797587779118690185681150429720019843L,
+ 0.676272439608475367571481578590700290242L,
+ 0.880796414989798318500723261307937258554L,
+ 0.387922631107753361553377889431536170676L,
+ 0.282350224157064849683455744598629321323L,
+ 0.721001172978128539392551761867898599807L,
+ 0.98720056526474911920598612334425157851L,
+ 0.9951900286811655251775209231187451065L,
+ 0.051844546479017627818996668613208776283L,
+ 0.103738972117399718145836730690615155693L,
+ 0.228544758674525285763674099492074936604L,
+ 0.429309402103194762341587536897342160049L,
+ 0.564535575507982971760351294178163523416L,
+ 0.999063571593237112671743187500362701266L,
+ 0.340374156369508513494787137157934959152L,
+ 0.778748988242111504661479799747122556733L,
+ 0.471307010869691772647781526213794708743L,
+ 0.289707428078962269353959639691462373973L,
+ 0.826577651264033230456965284610788939828L,
+ 0.860667694131974131835140122175480202008L,
+ 0.596405567348984902495263677852931818947L,
+ 0.79786093770390728560184577433203234578L,
+ 0.85492142888696693237980696048371212203L,
+ 0.57242705004809831263405538576519171441L,
+ 0.829648119655355629047392239460860046016L,
+ 0.783260316181642610272420809845230036294L,
+ 0.0941718863377651336163202407301145871807L,
+ 0.156372209579300482444127671309443664823L,
+ 0.95045258077372510217507306087908380692L,
+ 0.1885289021059534081345247308001373861575L,
+ 0.660776653890123229320677431688026234587L,
+ 0.2333507388961794003755022400755269739225L,
+ 0.926661255852332295794894190183342387092L,
+ 0.862240624886232672002503279536846219655L,
+ 0.093072473040365648693897225471155002338L,
+ 0.210437952956145192084247103889970459783L,
+ 0.98112543168220233380555460117617724093L,
+ 0.740174391774267645790688716222038485627L,
+ 0.0209886798500615011013258311339617682421L,
+ 0.41833754096087514377582590206105535614L,
+ 0.469019942905167330505858885046130048223L,
+ 0.715228143253914303084091910768414947468L,
+ 0.949215045400946624794326433082702896278L,
+ 0.0839262379919984011512905346130401074556L,
+ 0.358856470231875479544116669678510859691L,
+ 0.676461324144301815445903930221360844898L,
+ 0.321802718137104975636543941512529575137L,
+ 0.993411285955596090334951526803325817472L,
+ 0.860164319140927797258503749506400508873L,
+ 0.94773452678939638468420772776729628408L,
+ 0.786167026315331965750413583155691260173L,
+ 0.45156944204188755542678210840170293585L,
+ 0.490807428869058127589400400723875752095L,
+ 0.1064150484458768919266881304357565451445L,
+ 0.324460881496927069927267886879512784128L,
+ 0.892536276084459403262968666925514247957L,
+ 0.626906362142556286375622503025155623158L,
+ 0.912617117728752553677432546319200457076L,
+ 0.670287539555608481364011494943625670644L,
+ 0.247614513279178220157281399165275150246L,
+ 0.328334024179281412037962820247065990969L,
+ 0.829445540957824174480776183273738605512L,
+ 0.1787214688659462728637669907628671276175L,
+ 0.925570168885833135397413435137754040344L,
+ 0.98275386432184844551191217367555375122L,
+ 0.364711512670624901280733420446798813805L,
+ 0.0676060703890593392691073615176801081634L,
+ 0.01088522590112897075539168583333589679446L,
+ 0.0611693052224598303672047526429160913973L,
+ 0.214589347780615411637055343786045569195L,
+ 0.698097005257153990899739747284349971478L,
+ 0.0354356066334430559162358810601367856981L,
+ 0.0279531560831790454930326667914520406377L,
+ 0.939682879995515407044885888120427639943L,
+ 0.312419879113847025637130107480365284706L,
+ 0.429063186024752762548549652686423948472L,
+ 0.198325752893057589388425455067795077316L,
+ 0.653970278037364931023007417819508007502L,
+ 0.396811027519564931158159336303275106925L,
+ 0.50451059823222344440248588902992099958L,
+ 0.0862505815838354201964323759027263746603L,
+ 0.957096030216378795442646824371057760147L,
+ 0.587610162738417619467784731999441435863L,
+ 0.582187586992416238476426545279573456436L,
+ 0.535716130421670802716666237861890374707L,
+ 0.090478847153957807764386571203708454605L,
+ 0.788473620511487574655894325144660477707L,
+ 0.610237648835883657058234607228408957708L,
+ 0.678372723016422015853594971922211368707L,
+ 0.0477042323920128297852928999674240977938L,
+ 0.916676966783686851658830754268116450562L,
+ 0.385373716764729378193009393283577714611L,
+ 0.51049308234047313597601380814795899816L,
+ 0.1196704708003806819299545192341910042065L,
+ 0.446475706132336496196697021305914636716L,
+ 0.22995164195921866005337396330755244987L,
+ 0.632225374693904589951305492826903497058L,
+ 0.1049567841702419598059377515889392050297L,
+ 0.66749284825574584532432314559877621928L,
+ 0.730750212627697291852996268443402535667L,
+ 0.44210748459007730373853303409845654876L,
+ 0.165882407048533464405922485111215401752L,
+ 0.326102079042974476137893383568312181916L,
+ 0.894926469777796621626659556932174565354L,
+ 0.829811268916354531033773068150153342864L,
+ 0.0607253283595596933368529290946492114805L,
+ 0.0677752868787034912813695724240479638585L,
+ 0.82861506635734784945473366382511846348L,
+ 0.160085543323090657960949278634908144601L,
+ 0.232569451519550129004668131405568301759L,
+ 0.848363194546104528297512566450812116666L,
+ 0.793640414525406609723674517332020118566L,
+ 0.0908665486135344605492576594616215607582L,
+ 0.98524892289773367881284955458176900047L,
+ 0.232277847265217861619371474795084074907L,
+ 0.2478103820537262599906715455471023544214L,
+ 0.518524645780409202282547691600231775584L,
+ 0.726858378884955244314303315523158335615L,
+ 0.245545705017836867827662773158398435754L,
+ 0.2242602776132220616213985660229694803996L,
+ 0.69321599409749039262414070240230983052L,
+ 0.0112978587458533729787299027903363211672L,
+ 0.201700091442640051051557572594860881596L,
+ 0.1553158804742445432796353137546288871905L,
+ 0.297307958467221836656545818754009116053L,
+ 0.858321137590160233755873079497950982112L,
+ 0.66848174756798322137180974713907803341L,
+ 0.996344263106353369755981871581860505522L,
+ 0.0298469963581545313060582891253178820216L,
+ 0.5825562269883888340326171333296281312L,
+ 0.493316240919863194534203651249074989694L,
+ 0.25506115557073666386519530923416434445L,
+ 0.990037777634583670683401168871182857585L,
+ 0.111966792328779238876716387539738843995L,
+ 0.555536981182848652400091282463345207445L,
+ 0.281763605895317871765768390877174374161L,
+ 0.902702281907817546029803311979267829958L,
+ 0.526223239446627547666226037912343453756L,
+ 0.663322588876953268851644820272004691035L,
+ 0.925956679854174995001911256195736125327L,
+ 0.978687628923344717267490649565202182013L,
+ 0.295452218109470204949110043833472171496L,
+ 0.763317372768444290934585368155544717374L,
+ 0.41484295515622153189510360412010755096L,
+ 0.95319138766107113957717501566306191772L,
+ 0.449833295238493367386837134824022661087L,
+ 0.380903660964162496124546078818966824203L,
+ 0.0591435603332779390763767398658188273838L,
+ 0.594973116752510574186847848340951992488L,
+ 0.66051154347057943107777082783767373976L,
+ 0.9590947364014878778361002605613544034L,
+ 0.141719503437180601174660143271258240733L,
+ 0.72942088503531365739564056985302156428L,
+ 0.96229479992042091317494337141213026865L,
+ 0.51401712994901482942061876482808737646L,
+ 0.09446204537625467018781365109090483186L,
+ 0.568441523568450417056301286402539600564L,
+ 0.598604342726174263070596195546293250945L,
+ 0.774951017988365558347613104226790833317L,
+ 0.81892086730816467017537310019875247387L,
+ 0.890143355483709851496792149649550808793L,
+ 0.2191477338352410954693547610221317715285L,
+ 0.726897475480314385643181203422499653L,
+ 0.756138778886812022822443490226271392144L,
+ 0.36128016023552084266898937740898271179L,
+ 0.410782581318000192446155911986931996913L,
+ 0.223641334296034708685419059866928946095L,
+ 0.0611617201563377229556630546893173872466L,
+ 0.0454251140845604672274274573289906520655L,
+ 0.292039969549662442463090760177927466818L,
+ 0.0892783972345646734854765244000589132126L,
+ 0.98769280749877429524697464655962686569L,
+ 0.889843464657722517503667653048728011052L,
+ 0.651776307404858375062718114948328477704L,
+ 0.87617575855504123004785690824244025026L,
+ 0.338359170956885135997817905734588127076L,
+ 0.734032684330295341291816774804886223887L,
+ 0.862422342223053851459695185679195132964L,
+ 0.197333977370262353727756586852240555633L,
+ 0.586060335783457129849055206578505427124L,
+ 0.132898852938756538479400358451026471607L,
+ 0.548298096092246267871555639877296879195L,
+ 0.301119859270324657077136364646995297056L,
+ 0.02186689635349189676964089313754648484195L,
+ 0.037538023766844046167768352700498359816L,
+ 0.739462465806194132819844936199304370748L,
+ 0.306338591475158278790432712666553704959L,
+ 0.0349382326130091592369352494672121905505L,
+ 0.12659131714329909411210854142389581492L,
+ 0.991566243159047696662802015340988687108L,
+ 0.265613985138476447081523915107505113653L,
+ 0.379928020809782559672193104868857287448L,
+ 0.3311424971073397473661763760151895103L,
+ 0.702177302636984264408758773725210449873L,
+ 0.975045571615360787500646118846671455125L,
+ 0.0373462862349996603561237755410350012631L,
+ 0.846126776062337124521510357150131165153L,
+ 0.604046707233534456382774833817964498043L,
+ 0.1981113045697699450375369418161865703455L,
+ 0.0223467484405979164693956414316536174577L,
+ 0.67121960182601511325776586363807504696L,
+ 0.165784481427263519151726479123968726022L,
+ 0.721784618575898210943875783221281669927L,
+ 0.247408211201465904622132596487935205602L,
+ 0.474174174442367430962454680799704832459L,
+ 0.38041380356189313505762491005159753494L,
+ 0.412834591083812886132307610186713638625L,
+ 0.294378742681402760124595985235966036022L,
+ 0.319576442623415298744966071520183847465L,
+ 0.17227236515412864866186439447886640924L,
+ 0.19227796294349462194111033545303573433L,
+ 0.701351402612222654905938605774127547107L,
+ 0.55598633289035034815584162421930015865L,
+ 0.402729648554369906881359212431684355721L,
+ 0.595951760748834493622338584190905994085L,
+ 0.119840257870361007206544525046135477756L,
+ 0.90443395581066590152525534589406902782L,
+ 0.205188871300477881549673944463237196075L,
+ 0.339175278174772519132232276502457660768L,
+ 0.447725444308107151040888910769680233742L,
+ 0.541239546708188153505885726785683096117L,
+ 0.12984235126732767588700711245028426254L,
+ 0.0534701599183773436559514525508752846737L,
+ 0.793436019832695131646422778046763975325L,
+ 0.718125883729211211336344362949260539072L,
+ 0.328649037343445105052694618356980072933L,
+ 0.113307342739499399477248133420602576291L,
+ 0.87683936228301044929749768481864525904L,
+ 0.212591937265603187751611886807532831791L,
+ 0.761002958456888912899646497131654914807L,
+ 0.220849601519164170820922984026707209176L,
+ 0.222305857213559738578093188054272365062L,
+ 0.651516500020930005107266726995614198887L,
+ 0.1505613416188572288472651067305496894266L,
+ 0.166658450989632252583252879193540688162L,
+ 0.249417632511505538283736333645627460544L,
+ 0.50096054904291170172998992288713266662L,
+ 0.173701146801321486346972068110605414347L,
+ 0.93433415280052265881674202089278791561L,
+ 0.1167900820460300938880016624066890278452L,
+ 0.265137084235229705213901240937609442947L,
+ 0.110072770364904306470596762714108445086L,
+ 0.0670575770615268870829070207384379655213L,
+ 0.92447493539224566948960065689964970346L,
+ 0.187517201307673207566548753071237315229L,
+ 0.935719666366703749433556454391358561756L,
+ 0.964002672100646458888742916175546552353L,
+ 0.6304136194377902875122727617639812134L,
+ 0.497041144725381002743104205240568050483L,
+ 0.589232636183711897405482721407549359295L,
+ 0.524588285641300028631908965527617181296L,
+ 0.786409662511483672510756944887012261427L,
+ 0.9924030873238807048291154748671174581L,
+ 0.891407534733792276848059682970952672076L,
+ 0.308538095910260975496982224956384014562L,
+ 0.949088891149549225900320967233005245566L,
+ 0.507378396004105004571665876613293881214L,
+ 0.348875146873077771786031143309488031474L,
+ 0.129717394366372388305812826098578876617L,
+ 0.371316171885006633822161450072014737125L,
+ 0.550162123072752251266003313454007126843L,
+ 0.822171979807031777641565545578299345138L,
+ 0.75171547658293988559512988487590040284L,
+ 0.329537443635543385256682239450819107475L,
+ 0.159687481361602477899361671181005148163L,
+ 0.788720723813465707294018605642035752394L,
+ 0.1031423865826241581828274573741444954832L,
+ 0.1925157943560383416361499973635531049876L,
+ 0.771893047929845637497166550933789470487L,
+ 0.681189132819106369246924892765206195007L,
+ 0.180608768713011918428603967211913698036L,
+ 0.0869303304414286810402604783458783443746L,
+ 0.63890744831302111307395023326393791462L,
+ 0.531696069328179766265158866360885671855L,
+ 0.557357572478102464274432325432400878297L,
+ 0.765306589402879669413870462450921612475L,
+ 0.0941202729911292570046371838018359372082L,
+ 0.902333472113108821746674873990738636997L,
+ 0.165516366160118370026922089795742876131L,
+ 0.0317472434880413278821576585103363607157L,
+ 0.706107972335163251316361316043030620453L,
+ 0.832472986392763388669796997227437520663L,
+ 0.769939001736494466971306881365718899207L,
+ 0.83093185023987157595917781461722256739L,
+ 0.1143834825195292986705373579359335590854L,
+ 0.283326017120251162360393258571085609729L,
+ 0.301605389836836671045912951769199753359L,
+ 0.855854391727628505548518803309296566532L,
+ 0.089938332734139699450960989316391404434L,
+ 0.310225946153425747793112265736973169299L,
+ 0.96854812596413627994714291059983626441L,
+ 0.279767360423571836833858253122290577619L,
+ 0.113545981876279916290815278422648489865L,
+ 0.943101270554056170747004305255027939268L,
+ 0.812274724978801470221644756549524210083L,
+ 0.9678011347395447510273023981530290554L,
+ 0.514795136336602722878788704708053145966L,
+ 0.50560840616487841567055789750974674943L,
+ 0.127654209842819812026603428361923670116L,
+ 0.273727399985085036497076514726791191553L,
+ 0.964821797874257789566527793136425594082L,
+ 0.853392912197074096341317268954834390727L,
+ 0.914236806849585335611299422695886165192L,
+ 0.277335361137281076359079507288838688219L,
+ 0.865708792613433194377422367016717680172L,
+ 0.761947879929658945814013586634774725302L,
+ 0.276975494384441865188273120642155257808L,
+ 0.0678895000408079241574268817560335475378L,
+ 0.929521528875748672899760603996998763144L,
+ 0.44453824299955605846877126958322272066L,
+ 0.444318159420536625223816052640621069982L,
+ 0.42913762214779045597457741573009821738L,
+ 0.98994873802399078252493194985812582986L,
+ 0.93065975343157446755652147574743540714L,
+ 0.821639107980128580428385838275355600123L,
+ 0.031337950421787684669360817154012683829L,
+ 0.839516942888416107002513723437531514126L,
+ 0.785501376812531727571251496474527490183L,
+ 0.247978681554054401906203846371863203863L,
+ 0.985774009303654108868853196421131421187L,
+ 0.635347409930173147315815281304257764708L,
+ 0.40087985483327734740658289294086718422L,
+ 0.374059729085540852289174052767716446502L,
+ 0.367226053686019780853702834825808619761L,
+ 0.166424328898161772576167906091392715805L,
+ 0.838115185925303343477055122060982270143L,
+ 0.829549684532006011608856001441012324216L,
+ 0.059867788238866724897690318151639504149L,
+ 0.0253429734563284738087263277549928280781L,
+ 0.953315773263436653713242828719775352192L,
+ 0.597536998796130884349662459732857817956L,
+ 0.0320571321493587106457025626624408278814L,
+ 0.477506594803204144826488443400695434979L,
+ 0.285541992141868221897101891229394096707L,
+ 0.764190678950226854486968785768647879005L,
+ 0.895489776830293129781335242249167913705L,
+ 0.570740793029533496018083006013191540077L,
+ 0.938316924714444954315906773563465846538L,
+ 0.56157168133328941481074926451373503549L,
+ 0.354184283860505415751320741296599995231L,
+ 0.778294119283540721552919906619543293274L,
+ 0.434953011661757598127924745629053141294L,
+ 0.37156491156117895854194599593687697796L,
+ 0.898767478977082606651667259049374990828L,
+ 0.21819365919403129548458400006737057993L,
+ 0.278163373548978939704874687746089548269L,
+ 0.1089005781457343817756962209721573336768L,
+ 0.85152888717082537570752846642305937149L,
+ 0.2419243481761527583754399630924438738944L,
+ 0.69442654829377168239365980152821108287L,
+ 0.1512336533453368944625038813397779875445L,
+ 0.617712962492924013140729661730350287525L,
+ 0.935400762900002313827620435729493050175L,
+ 0.79357339902161958573967958515254111256L,
+ 0.734250188990467683521536859220675412636L,
+ 0.748517858206364295837674601491185485078L,
+ 0.82520014781239194590337105462135253912L,
+ 0.1240649365160101108753438662971422995014L,
+ 0.479769236133748631678854875312914195598L,
+ 0.171269492636258554036912204801376697988L,
+ 0.833025419245729049117746814929956940986L,
+ 0.354429813451205200141830318428840891828L,
+ 0.474809123369344367691189422128776480146L,
+ 0.692239655770541262287308180705629028608L,
+ 0.271366901464125731413801963807240905363L,
+ 0.561330233800121182669429172066686942393L,
+ 0.0695868383638479426233449148171168522655L,
+ 0.627576910684655924911125045007979454546L,
+ 0.423331542652214907262628326674848471962L,
+ 0.354725031694671387579309719042578580595L,
+ 0.312419264533145363169359084710774849388L,
+ 0.167819037053563697473931127337972350099L,
+ 0.99960836112225007722014049168024866743L,
+ 0.820598666739967434549389339457492152643L,
+ 0.689495024741546551592649728378054973272L,
+ 0.831455766750164249604246627812180304754L,
+ 0.515538871956858025876039391193370146897L,
+ 0.011724889011994886395520178564059346913L,
+ 0.587485679650311054946861235938601293477L,
+ 0.113010564497810081892271654273794311467L,
+ 0.381261245177928587613552004600730320213L,
+ 0.466933821322235841488251157296771536952L,
+ 0.646965031311287534221872388017990968767L,
+ 0.1811101995014685369939482409137380098995L,
+ 0.247896943912780884738461558340983142645L,
+ 0.989351208835640462928338658234638846217L,
+ 0.924605283008839688813842975338096967047L,
+ 0.232010860908797395869871518793187418799L,
+ 0.90274859050487649728273938229764570199L,
+ 0.664078588165617572819884867627266650356L,
+ 0.532118803501055886836301096658125012493L,
+ 0.854049566634563277356849166147057535436L,
+ 0.756477818237029394317820041473365538516L,
+ 0.84578312219074068824832318394711642503L,
+ 0.169914247711153055959592721695068126213L,
+ 0.50848961455796310913779527189620088788L,
+ 0.715231849280217810525151667911662744854L,
+ 0.59666585539439202929452535210623694053L,
+ 0.72343578283497935670188130618697814035L,
+ 0.982228826906846431195861293729527133844L,
+ 0.98068755339273420823366752414155272462L,
+ 0.805277135157133623039231303778838094716L,
+ 0.840154168539481858495551656699708834713L,
+ 0.41783933695481411993780663692806809771L,
+ 0.070981740672048589027432942629842679319L,
+ 0.96664795205679820656636930925268162457L,
+ 0.155178444292580006807274171645675417735L,
+ 0.276407670358590477524508525465318694191L,
+ 0.1054964292635286397825421772930229411286L,
+ 0.354205947516472098240472076653525679013L,
+ 0.583456972150065135260312420865576513532L,
+ 0.338643867118430587299252775116788065723L,
+ 0.146467849593879827355466951871059968293L,
+ 0.0639448405747942007938896940026153617467L,
+ 0.846536583732599902600485371566229612512L,
+ 0.599728399399342923058515558777947417833L,
+ 0.140387922890235239162309673093379598453L,
+ 0.1613160217694973394489944660056369626715L,
+ 0.151848582163159668039725770584081620756L,
+ 0.663365628518336712743995463098831995163L,
+ 0.752166976367665534193146852225632451022L,
+ 0.911311062532571765386023433215793121138L,
+ 0.692490353635171096989434518397248623866L,
+ 0.990512559245857089458980255962574316578L,
+ 0.135026433195284768293027372762691869458L,
+ 0.82220389984592453325084678614092535756L,
+ 0.385471328555065081327630832374267955206L,
+ 0.108251633446048989722318564345306848022L,
+ 0.429090236713339412878596384043906547999L,
+ 0.983421429305507423332481562450757515935L,
+ 0.0163920521681887489391607174895946079877L,
+ 0.634276319224952361916496263299135133978L,
+ 0.53164375434562160610011793242431018808L,
+ 0.92801127390978303506935520414803575609L,
+ 0.708525110316144414918831897015500504675L,
+ 0.722458240987313977092360928226487539067L,
+ 0.432028911017122242491499522489684865593L,
+ 0.0001754664935299182587224394863719217640876L,
+ 0.384266658709383389800969077999970411222L,
+ 0.284964603427904715461598563563830112021L,
+ 0.1541443027599544245798778784933517572175L,
+ 0.958338802063400795313378181913830622686L,
+ 0.636927309395779701122460610729048286624L,
+ 0.0963946603295477475541191401069719222887L,
+ 0.0995190436935072136624400787867889652226L,
+ 0.294220607618706451139091631947946466958L,
+ 0.180831121994104393794487526888221966969L,
+ 0.635403971764105414766318934434540385347L,
+ 0.333929089029202997624323059191296321991L,
+ 0.498378678845335358166419186432789231466L,
+ 0.79769145046274241777533636404451138797L,
+ 0.269285209299779365433012558225847643041L,
+ 0.110524792990169183853219228066613162975L,
+ 0.252694136970632381193559370648931722998L,
+ 0.447232396115786457656991370803052298542L,
+ 0.136974250599080636030665381278567779455L,
+ 0.67243844394695156696032636816317618716L,
+ 0.280265952023932940327982570523639258968L,
+ 0.960024614746466668963206103951264089396L,
+ 0.83595031847062668345135859090890188348L,
+ 0.127840531352213174558502027846545305518L,
+ 0.333183884044346150282363573006579940787L,
+ 0.480504229384957927069515726093850498988L,
+ 0.768498913093287331615443023486434378468L,
+ 0.940413493411219283289136687423264928073L,
+ 0.548648592555019577089750862504091661273L,
+ 0.57814360039222917342516307696519676185L,
+ 0.752806287004316513987155718410926624384L,
+ 0.328211694133870995310455637563825433641L,
+ 0.153907665030571878436793446358668488233L,
+ 0.694742699178286984320321272531890059073L,
+ 0.25435421168640709608520313542078743933L,
+ 0.61387638208113240104328972389071498415L,
+ 0.250476311300881635346483832554226742174L,
+ 0.345809836897231980069633800588202859833L,
+ 0.343083789419841923142937785323119943136L,
+ 0.319174378869537109008405333721782689566L,
+ 0.158111477528301687597604325494967120237L,
+ 0.244000500810322900960285910812181460829L,
+ 0.23179705702278726416861948783067588642L,
+ 0.54682924846605062799436489677774333716L,
+ 0.549008127982055819651521103931442895238L,
+ 0.262583044663608129412956518168777449925L,
+ 0.00126513153702681878410946802239924274583L,
+ 0.942613696151881635585127791325641506562L,
+ 0.352686443706689559388572818776843215083L,
+ 0.90689998425792029984240460273113807702L,
+ 0.867511650419363872431681377574762734184L,
+ 0.280671949468087158951852027769013272607L,
+ 0.162038690615698843560500386213858514888L,
+ 0.71179364933082197276587611716632482938L,
+ 0.0967402545497599384082792036477527703823L,
+ 0.465040868275334873151726613879001199556L,
+ 0.621004503662486553272117361134036130264L,
+ 0.732964940483576253705474121238830973672L,
+ 0.423374863473223783721502627532544136435L,
+ 0.490338535425760290944218064913112069833L,
+ 0.0243433415988311460557576165617657963508L,
+ 0.0502339423891456566961808478207103394328L,
+ 0.57668149339841029115236469576085057193L,
+ 0.654589079253818313716855283653923913987L,
+ 0.1099728579252794893221972017964445810946L,
+ 0.95067113980240197864048876003001477344L,
+ 0.271440369581834169312179003284604198334L,
+ 0.067152474145377434478612939162576726923L,
+ 0.77434193893477314687843638736266814713L,
+ 0.2095679937785625400917773512669417520444L,
+ 0.7681370807102749183539277908648691358L,
+ 0.24472807400083103884984122018932641814L,
+ 0.191307162486577428460074174309309551616L,
+ 0.637215617752531571162184184570005111405L,
+ 0.858141525396878877938747690015117846998L,
+ 0.338400625200720062249435065450813258281L,
+ 0.564981422008979753676981861330327611986L,
+ 0.809460314261206431741632790718777271837L,
+ 0.879343403409393604462128113991125533726L,
+ 0.284697509116613252542034824007026845569L,
+ 0.497023470648395180497606069099534119801L,
+ 0.650004713241995983979792197286941523L,
+ 0.1177129995341492896184329340448111002318L,
+ 0.923625966014428778639333261268345799732L,
+ 0.698837131343914189577155394009532120604L,
+ 0.28242326745092132457477019796509942259L,
+ 0.70025600885251684699238650783454037429L,
+ 0.876659050276528114198964471020380705343L,
+ 0.52914892693002332233566353042454639365L,
+ 0.319860854431864688430502078275989809115L,
+ 0.83483115610648557287441551698147898778L,
+ 0.727639064249568383685922880431792837046L,
+ 0.58743287662861037184349933549802687836L,
+ 0.510383231616356949495559076196319035197L,
+ 0.00229935944348919214521608305418404052343L,
+ 0.799567224020488433652933994297769381902L,
+ 0.343651210821093611687224166251624444254L,
+ 0.405948097827175151257603419529941300798L,
+ 0.456473183882957921169800992232941517586L,
+ 0.570248304776860782392105323292264026118L,
+ 0.534779754769153667870756893044557559557L,
+ 0.472965511839676757434979299779809656808L,
+ 0.137335340499076127280155831169214403285L,
+ 0.51975901660926295231312276736119435645L,
+ 0.8085867293332018994761547260739912451L,
+ 0.812416413241484848007226874256949892893L,
+ 0.852994977709961112714176162016389410712L,
+ 0.95270886248643660114015239563660004248L,
+ 0.845133719240648570417568652136630304138L,
+ 0.4074980021816323645978397907609428101L,
+ 0.335850514497730546494305840184055599972L,
+ 0.0882622233237065445998153436898044995127L,
+ 0.936467561027640943446178111237050277205L,
+ 0.56676472173638044722431698799123577376L,
+ 0.528427769051008704179988533062745663408L,
+ 0.460890427579778855697205646060084318038L,
+ 0.754971897131798313468797543428083655928L,
+ 0.980733597969419782109470537306886067907L,
+ 0.204362127415649555111877580124343815074L,
+ 0.424822548090499017266619697426652494042L,
+ 0.790847149074521364262028407892114384257L,
+ 0.559922683392730473870877613727301497865L,
+ 0.779993507158626042106006393237738208875L,
+ 0.30516368089713691312418593599115685319L,
+ 0.68918765842229398168455844072311006826L,
+ 0.972291357858071465096079542885284602882L,
+ 0.92204286423973856982373873105566928589L,
+ 0.488649453783638471576482476648021023315L,
+ 0.467124744623849284659862825278549932824L,
+ 0.548051233865943557014854568009331816852L,
+ 0.306838990296265483205551142903402056051L,
+ 0.497005516835688988273805238236922199451L,
+ 0.341504433884138135798086132528045458722L,
+ 0.969816416247460790089503289400709886528L,
+ 0.63656435610220447227337751650167349487L,
+ 0.83588076122262875881859751942918794857L,
+ 0.647568600604975972308348018018445212894L,
+ 0.916061870307308870029862807808332479077L,
+ 0.767988745496844638880672392122527991445L,
+ 0.1623230195628039449666927123215281227666L,
+ 0.0791082835859634251558587844284289799848L,
+ 0.575858643610197202634665099752882990844L,
+ 0.559159434263749620344702466000799724913L,
+ 0.063765998380760211208741798736948488376L,
+ 0.230557913975359017084357477142151415967L,
+ 0.702854691657277602758421942319022953845L,
+ 0.789516660466782621905392733079230211954L,
+ 0.491496186820051632244513986127898500904L,
+ 0.171499215418269578563458417238340672634L,
+ 0.626470061831746666081979158043673024967L,
+ 0.258903137813870706268979320963343541457L,
+ 0.64156850108405218894694811301875120511L,
+ 0.534043520260340661507140771088018906496L,
+ 0.388275182018399247097875416106759899469L,
+ 0.920936363560998030495046998224168162945L,
+ 0.826139404694006088220407338888245165242L,
+ 0.343561253523163451528918423980552161597L,
+ 0.921521003270491194867019217479780072647L,
+ 0.656212467754097185125864111703195343744L,
+ 0.628186262290474398328350301885606581942L,
+ 0.573227336542237665153422986363073650388L,
+ 0.94178975003001342039795597242477049832L,
+ 0.0408103561362355768975182155847755354614L,
+ 0.382581672073273072487550945526454964287L,
+ 0.152851256046525520308098129538613498254L,
+ 0.966735024597183045592313880114075824298L,
+ 0.215564894798334550271993595018433286244L,
+ 0.776491530531523589201618375156272004616L,
+ 0.912460554179311241821569665648929177608L,
+ 0.632880016212040018958086886452474382272L,
+ 0.711577891112709305169603082360885583086L,
+ 0.1120655756066491784920471129299439607153L,
+ 0.691106483958832651050573402690448368687L,
+ 0.227442567846797646970770128970529357636L,
+ 0.837435613090485891584882062239924101455L,
+ 0.524389161590691896070067767400758142565L,
+ 0.591360583466508186135247682666313136762L,
+ 0.103155847462960450706124014839446958843L,
+ 0.98360160577671960281465138408293984545L,
+ 0.197665014114674630647437622579741018817L,
+ 0.1099709194312379594014239398842185159354L,
+ 0.394053373921474751303577685990936074485L,
+ 0.94945354787200894450508557094182436657L,
+ 0.372593716084661547440393809983835348274L,
+ 0.62514674616343692328572382301636412566L,
+ 0.2001871481416310130073795585638383984926L,
+ 0.148432902421401306477690922498335475507L,
+ 0.687921673269487018193347305425182239764L,
+ 0.470940334348984370262797433659013738143L,
+ 0.1592476430730276812200821020958787823795L,
+ 0.296776110696565927524970058176467314578L,
+ 0.1491253105142218631726813695413369166796L,
+ 0.579194717868638955003571989739802264354L,
+ 0.0730543936466744761440131951539370917776L,
+ 0.941296077873340797733875467209629660594L,
+ 0.76720024949523806992504865943580486187L,
+ 0.419526107681583337049761526455092560735L,
+ 0.00688594806937144144337797612615981618743L,
+ 0.931682704636487927763651991274577493318L,
+ 0.660524215847727125058815911433184924133L,
+ 0.71780972384903067744609138100002205676L,
+ 0.02961791918271995070621856302848439458175L,
+ 0.692791206212428997136050006631240567502L,
+ 0.162762426697948445642880183096693062538L,
+ 0.183637795551464341949019870428026949035L,
+ 0.51263789620316407488619761125039609046L,
+ 0.90238698122728366178818828411640824056L,
+ 0.229784208410123517024401367798925386038L,
+ 0.227218480059027721044118324890061381517L,
+ 0.6555059570778176955459672492237825867L,
+ 0.929815767583615624563413584598741896834L,
+ 0.188559597559312695774663933876436875041L,
+ 0.396184448063913762028147791554346199354L,
+ 0.656329540957568516760105602115555736073L,
+ 0.1410678455413176345310401990667063246115L,
+ 0.621004667838855651847651367745487628637L,
+ 0.01277988784767030635209958407461792778387L,
+ 0.69482142276844418673788732511112265014L,
+ 0.925705031133221932065307191539105635005L,
+ 0.925744341385232535963050430363763081603L,
+ 0.24189467813699258571134382505828701386L,
+ 0.646009544609703485845605410919901799L,
+ 0.051119212999532673562206731603906295406L,
+ 0.85076142804383409765024452942896578158L
+};
diff --git a/tests/readdir.c b/tests/readdir.c
new file mode 100644
index 0000000..3db0080
--- /dev/null
+++ b/tests/readdir.c
@@ -0,0 +1,98 @@
+/* Read the next entry of a directory.
+ 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 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <dirent.h>
+
+#include <errno.h>
+#include <stddef.h>
+
+#include "dirent-private.h"
+
+struct dirent *
+readdir (DIR *dirp)
+{
+ char type;
+ struct dirent *result;
+
+ /* There is no need to add code to produce entries for "." and "..".
+ According to the POSIX:2008 section "4.12 Pathname Resolution"
+ <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html>
+ "." and ".." are syntactic entities.
+ POSIX also says:
+ "If entries for dot or dot-dot exist, one entry shall be returned
+ for dot and one entry shall be returned for dot-dot; otherwise,
+ they shall not be returned." */
+
+ switch (dirp->status)
+ {
+ case -2:
+ /* End of directory already reached. */
+ return NULL;
+ case -1:
+ break;
+ case 0:
+ if (!FindNextFile (dirp->current, &dirp->entry))
+ {
+ switch (GetLastError ())
+ {
+ case ERROR_NO_MORE_FILES:
+ dirp->status = -2;
+ return NULL;
+ default:
+ errno = EIO;
+ return NULL;
+ }
+ }
+ break;
+ default:
+ errno = dirp->status;
+ return NULL;
+ }
+
+ dirp->status = 0;
+
+ if (dirp->entry.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
+ type = DT_DIR;
+ else if (dirp->entry.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
+ type = DT_LNK;
+ else if ((dirp->entry.dwFileAttributes
+ & ~(FILE_ATTRIBUTE_READONLY
+ | FILE_ATTRIBUTE_HIDDEN
+ | FILE_ATTRIBUTE_SYSTEM
+ | FILE_ATTRIBUTE_ARCHIVE
+ | FILE_ATTRIBUTE_NORMAL
+ | FILE_ATTRIBUTE_TEMPORARY
+ | FILE_ATTRIBUTE_SPARSE_FILE
+ | FILE_ATTRIBUTE_COMPRESSED
+ | FILE_ATTRIBUTE_NOT_CONTENT_INDEXED
+ | FILE_ATTRIBUTE_ENCRYPTED)) == 0)
+ /* Devices like COM1, LPT1, NUL would also have the attributes 0x20 but
+ they cannot occur here. */
+ type = DT_REG;
+ else
+ type = DT_UNKNOWN;
+
+ /* Reuse the memory of dirp->entry for the result. */
+ result =
+ (struct dirent *)
+ ((char *) dirp->entry.cFileName - offsetof (struct dirent, d_name[0]));
+ result->d_type = type;
+
+ return result;
+}
diff --git a/tests/setenv.c b/tests/setenv.c
index 7c06192..995a0f2 100644
--- a/tests/setenv.c
+++ b/tests/setenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995-2003, 2005-2011 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995-2003, 2005-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@@ -15,12 +15,13 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#if !_LIBC
-# include <config.h>
-#endif
-
/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
optimizes away the name == NULL test below. */
-#define _GL_ARG_NONNULL(params)
+# define _GL_ARG_NONNULL(params)
+
+# define _GL_USE_STDLIB_ALLOC 1
+# include <config.h>
+#endif
#include <alloca.h>
@@ -48,7 +49,7 @@
#endif
#if _LIBC
-/* This lock protects against simultaneous modifications of `environ'. */
+/* This lock protects against simultaneous modifications of 'environ'. */
# include <bits/libc-lock.h>
__libc_lock_define_initialized (static, envlock)
# define LOCK __libc_lock_lock (envlock)
@@ -64,10 +65,6 @@ __libc_lock_define_initialized (static, envlock)
# define clearenv __clearenv
# define tfind __tfind
# define tsearch __tsearch
-#else
-/* Use the system functions, not the gnulib overrides in this file. */
-# undef malloc
-# undef realloc
#endif
/* In the GNU C library implementation we try to be more clever and
@@ -106,11 +103,11 @@ static void *known_values;
static char **last_environ;
-/* This function is used by `setenv' and `putenv'. The difference between
+/* This function is used by 'setenv' and 'putenv'. The difference between
the two functions is that for the former must create a new string which
- is then placed in the environment, while the argument of `putenv'
+ is then placed in the environment, while the argument of 'putenv'
must be used directly. This is all complicated by the fact that we try
- to reuse values once generated for a `setenv' call since we can never
+ to reuse values once generated for a 'setenv' call since we can never
free the strings. */
int
__add_to_environ (const char *name, const char *value, const char *combined,
@@ -302,7 +299,7 @@ setenv (const char *name, const char *value, int replace)
return __add_to_environ (name, value, NULL, replace);
}
-/* The `clearenv' was planned to be added to POSIX.1 but probably
+/* The 'clearenv' was planned to be added to POSIX.1 but probably
never made it. Nevertheless the POSIX.9 standard (POSIX bindings
for Fortran 77) requires this function. */
int
@@ -353,6 +350,9 @@ weak_alias (__clearenv, clearenv)
#if HAVE_SETENV
# undef setenv
+# if !HAVE_DECL_SETENV
+extern int setenv (const char *, const char *, int);
+# endif
# define STREQ(a, b) (strcmp (a, b) == 0)
int
diff --git a/tests/setlocale.c b/tests/setlocale.c
index 0cef00f..c729fa6 100644
--- a/tests/setlocale.c
+++ b/tests/setlocale.c
@@ -1,5 +1,5 @@
/* Set the current locale.
- Copyright (C) 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2011-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -74,7 +74,7 @@ category_to_name (int category)
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* The native Win32 setlocale() function expects locale names of the form
+/* The native Windows setlocale() function expects locale names of the form
"German" or "German_Germany" or "DEU", but not "de" or "de_DE". We need
to convert the names from the form with ISO 639 language code and ISO 3166
country code to the form with English names or with three-letter identifier.
diff --git a/tests/signature.h b/tests/signature.h
index 8256989..45a8e02 100644
--- a/tests/signature.h
+++ b/tests/signature.h
@@ -1,5 +1,5 @@
/* Macro for checking that a function declaration is compliant.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/sleep.c b/tests/sleep.c
new file mode 100644
index 0000000..4c97d7d
--- /dev/null
+++ b/tests/sleep.c
@@ -0,0 +1,76 @@
+/* Pausing execution of the current thread.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2007.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <unistd.h>
+
+#include <limits.h>
+
+#include "verify.h"
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+# define WIN32_LEAN_AND_MEAN /* avoid including junk */
+# include <windows.h>
+
+unsigned int
+sleep (unsigned int seconds)
+{
+ unsigned int remaining;
+
+ /* Sleep for 1 second many times, because
+ 1. Sleep is not interruptible by Ctrl-C,
+ 2. we want to avoid arithmetic overflow while multiplying with 1000. */
+ for (remaining = seconds; remaining > 0; remaining--)
+ Sleep (1000);
+
+ return remaining;
+}
+
+#elif HAVE_SLEEP
+
+# undef sleep
+
+/* Guarantee unlimited sleep and a reasonable return value. Cygwin
+ 1.5.x rejects attempts to sleep more than 49.7 days (2**32
+ milliseconds), but uses uninitialized memory which results in a
+ garbage answer. Similarly, Linux 2.6.9 with glibc 2.3.4 has a too
+ small return value when asked to sleep more than 24.85 days. */
+unsigned int
+rpl_sleep (unsigned int seconds)
+{
+ /* This requires int larger than 16 bits. */
+ verify (UINT_MAX / 24 / 24 / 60 / 60);
+ const unsigned int limit = 24 * 24 * 60 * 60;
+ while (limit < seconds)
+ {
+ unsigned int result;
+ seconds -= limit;
+ result = sleep (limit);
+ if (result)
+ return seconds + result;
+ }
+ return sleep (seconds);
+}
+
+#else /* !HAVE_SLEEP */
+
+ #error "Please port gnulib sleep.c to your platform, possibly using usleep() or select(), then report this to bug-gnulib."
+
+#endif
diff --git a/tests/strdup.c b/tests/strdup.c
index ba7e76b..5826ab0 100644
--- a/tests/strdup.c
+++ b/tests/strdup.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2011 Free Software
+/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2013 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
@@ -14,8 +14,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ with this program; if not, see <http://www.gnu.org/licenses/>. */
#ifndef _LIBC
# include <config.h>
diff --git a/tests/symlink.c b/tests/symlink.c
index 2896cc9..d3c9f21 100644
--- a/tests/symlink.c
+++ b/tests/symlink.c
@@ -1,5 +1,5 @@
/* Stub for symlink().
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-alloca-opt.c b/tests/test-alloca-opt.c
index 5aa1645..d94e1d1 100644
--- a/tests/test-alloca-opt.c
+++ b/tests/test-alloca-opt.c
@@ -1,5 +1,5 @@
/* Test of optional automatic memory allocation.
- Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -44,7 +44,7 @@ main ()
{
/* Try various values.
n = 0 gave a crash on Alpha with gcc-2.5.8.
- Some versions of MacOS X have a stack size limit of 512 KB. */
+ Some versions of Mac OS X have a stack size limit of 512 KB. */
func (34);
func (134);
func (399);
diff --git a/tests/test-array_list.c b/tests/test-array_list.c
index 27f2ee0..99df06a 100644
--- a/tests/test-array_list.c
+++ b/tests/test-array_list.c
@@ -1,5 +1,5 @@
/* Test of sequential list data type implementation.
- Copyright (C) 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify
diff --git a/tests/test-array_oset.c b/tests/test-array_oset.c
index 2d069d6..1892032 100644
--- a/tests/test-array_oset.c
+++ b/tests/test-array_oset.c
@@ -1,5 +1,5 @@
/* Test of ordered set data type implementation.
- Copyright (C) 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify
diff --git a/tests/test-avltree_oset.c b/tests/test-avltree_oset.c
index 084b629..b591abc 100644
--- a/tests/test-avltree_oset.c
+++ b/tests/test-avltree_oset.c
@@ -1,5 +1,5 @@
/* Test of ordered set data type implementation.
- Copyright (C) 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
diff --git a/tests/test-binary-io.c b/tests/test-binary-io.c
index 8e5d193..b258d51 100644
--- a/tests/test-binary-io.c
+++ b/tests/test-binary-io.c
@@ -1,5 +1,5 @@
/* Test of binary mode I/O.
- Copyright (C) 2005, 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -30,35 +30,40 @@
#include "macros.h"
int
-main ()
+main (int argc, char *argv[])
{
/* Test the O_BINARY macro. */
{
int fd =
- open ("t-bin-out2.tmp", O_CREAT | O_TRUNC | O_RDWR | O_BINARY, 0600);
+ open ("t-bin-out0.tmp", O_CREAT | O_TRUNC | O_RDWR | O_BINARY, 0600);
if (write (fd, "Hello\n", 6) < 0)
exit (1);
close (fd);
}
{
struct stat statbuf;
- if (stat ("t-bin-out2.tmp", &statbuf) < 0)
+ if (stat ("t-bin-out0.tmp", &statbuf) < 0)
exit (1);
ASSERT (statbuf.st_size == 6);
}
- unlink ("t-bin-out2.tmp");
- /* Test the SET_BINARY macro. */
- SET_BINARY (1);
- fputs ("Hello\n", stdout);
- fclose (stdout);
- fclose (stderr);
- {
- struct stat statbuf;
- if (stat ("t-bin-out1.tmp", &statbuf) < 0)
- exit (1);
- ASSERT (statbuf.st_size == 6);
- }
+ switch (argv[1][0])
+ {
+ case '1':
+ /* Test the set_binary_mode() function. */
+ set_binary_mode (1, O_BINARY);
+ fputs ("Hello\n", stdout);
+ break;
+
+ case '2':
+ /* Test the SET_BINARY macro. */
+ SET_BINARY (1);
+ fputs ("Hello\n", stdout);
+ break;
+
+ default:
+ break;
+ }
return 0;
}
diff --git a/tests/test-binary-io.sh b/tests/test-binary-io.sh
index 33e128c..c4dd6e9 100755
--- a/tests/test-binary-io.sh
+++ b/tests/test-binary-io.sh
@@ -3,8 +3,11 @@
tmpfiles=""
trap 'rm -fr $tmpfiles' 1 2 3 15
-tmpfiles="$tmpfiles t-bin-out1.tmp t-bin-out2.tmp"
-./test-binary-io${EXEEXT} > t-bin-out1.tmp || exit 1
+tmpfiles="$tmpfiles t-bin-out0.tmp t-bin-out1.tmp t-bin-out2.tmp"
+./test-binary-io${EXEEXT} 1 > t-bin-out1.tmp || exit 1
+cmp t-bin-out0.tmp t-bin-out1.tmp > /dev/null || exit 1
+./test-binary-io${EXEEXT} 2 > t-bin-out2.tmp || exit 1
+cmp t-bin-out0.tmp t-bin-out2.tmp > /dev/null || exit 1
rm -fr $tmpfiles
diff --git a/tests/test-btowc.c b/tests/test-btowc.c
index 7907cbe..7779469 100644
--- a/tests/test-btowc.c
+++ b/tests/test-btowc.c
@@ -1,5 +1,5 @@
/* Test of conversion of unibyte character to wide character.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-c-ctype.c b/tests/test-c-ctype.c
index 9d748ff..c0aa662 100644
--- a/tests/test-c-ctype.c
+++ b/tests/test-c-ctype.c
@@ -1,5 +1,5 @@
/* Test of character handling in C locale.
- Copyright (C) 2005, 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-c-stack.c b/tests/test-c-stack.c
index cc27b43..24fccf3 100644
--- a/tests/test-c-stack.c
+++ b/tests/test-c-stack.c
@@ -1,5 +1,5 @@
/* Test of c-stack module.
- Copyright (C) 2002, 2004, 2006, 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2006, 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-c-stack2.sh b/tests/test-c-stack2.sh
index a80373d..0cd49c9 100755
--- a/tests/test-c-stack2.sh
+++ b/tests/test-c-stack2.sh
@@ -11,16 +11,16 @@ tmpfiles="t-c-stack2.tmp"
case $? in
77) if grep 'stack overflow' t-c-stack2.tmp >/dev/null ; then
- if test -z "$LIBSIGSEGV"; then
- echo 'cannot tell stack overflow from crash; consider installing libsigsegv' >&2
- exit 77
- else
- echo 'cannot tell stack overflow from crash, in spite of libsigsegv' >&2
- exit 1
- fi
+ if test -z "$LIBSIGSEGV"; then
+ echo 'cannot tell stack overflow from crash; consider installing libsigsegv' >&2
+ exit 77
+ else
+ echo 'cannot tell stack overflow from crash, in spite of libsigsegv' >&2
+ exit 1
+ fi
else
- cat t-c-stack2.tmp >&2
- exit 77
+ cat t-c-stack2.tmp >&2
+ exit 77
fi
;;
0) (exit 1); exit 1 ;;
diff --git a/tests/test-c-strcasecmp.c b/tests/test-c-strcasecmp.c
index faa3001..26d9ca4 100644
--- a/tests/test-c-strcasecmp.c
+++ b/tests/test-c-strcasecmp.c
@@ -1,5 +1,5 @@
/* Test of case-insensitive string comparison function.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-c-strncasecmp.c b/tests/test-c-strncasecmp.c
index 6a225c7..075f15e 100644
--- a/tests/test-c-strncasecmp.c
+++ b/tests/test-c-strncasecmp.c
@@ -1,5 +1,5 @@
/* Test of case-insensitive string comparison function.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-canonicalize-lgpl.c b/tests/test-canonicalize-lgpl.c
index 17cdff0..84b6d98 100644
--- a/tests/test-canonicalize-lgpl.c
+++ b/tests/test-canonicalize-lgpl.c
@@ -1,5 +1,5 @@
/* Test of execution of program termination handlers.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-chdir.c b/tests/test-chdir.c
new file mode 100644
index 0000000..40fd31f
--- /dev/null
+++ b/tests/test-chdir.c
@@ -0,0 +1,33 @@
+/* Test changing to a directory.
+ 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 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (chdir, int, (const char *));
+
+#include "macros.h"
+
+int
+main (void)
+{
+ ASSERT (chdir ("/") == 0);
+
+ return 0;
+}
diff --git a/tests/test-cloexec.c b/tests/test-cloexec.c
index 374de30..fe2ca3a 100644
--- a/tests/test-cloexec.c
+++ b/tests/test-cloexec.c
@@ -1,5 +1,5 @@
/* Test duplicating non-inheritable file descriptors.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -25,9 +25,11 @@
#include <unistd.h>
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* Get declarations of the Win32 API functions. */
+/* Get declarations of the native Windows API functions. */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
+/* Get _get_osfhandle. */
+# include "msvc-nothrow.h"
#endif
#include "binary-io.h"
@@ -38,7 +40,7 @@ static int
is_inheritable (int fd)
{
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
- /* On Win32, the initial state of unassigned standard file
+ /* On native Windows, the initial state of unassigned standard file
descriptors is that they are open but point to an
INVALID_HANDLE_VALUE, and there is no fcntl. */
HANDLE h = (HANDLE) _get_osfhandle (fd);
@@ -76,6 +78,7 @@ main (void)
const char *file = "test-cloexec.tmp";
int fd = creat (file, 0600);
int fd2;
+ int bad_fd = getdtablesize ();
/* Assume std descriptors were provided by invoker. */
ASSERT (STDERR_FILENO < fd);
@@ -118,7 +121,7 @@ main (void)
ASSERT (set_cloexec_flag (-1, false) == -1);
ASSERT (errno == EBADF);
errno = 0;
- ASSERT (set_cloexec_flag (10000000, false) == -1);
+ ASSERT (set_cloexec_flag (bad_fd, false) == -1);
ASSERT (errno == EBADF);
errno = 0;
ASSERT (set_cloexec_flag (fd2, false) == -1);
@@ -127,7 +130,7 @@ main (void)
ASSERT (dup_cloexec (-1) == -1);
ASSERT (errno == EBADF);
errno = 0;
- ASSERT (dup_cloexec (10000000) == -1);
+ ASSERT (dup_cloexec (bad_fd) == -1);
ASSERT (errno == EBADF);
errno = 0;
ASSERT (dup_cloexec (fd2) == -1);
diff --git a/tests/test-close.c b/tests/test-close.c
new file mode 100644
index 0000000..974ed1b
--- /dev/null
+++ b/tests/test-close.c
@@ -0,0 +1,45 @@
+/* Test closing a file or socket.
+ 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 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (close, int, (int));
+
+#include <errno.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+ /* Test behaviour for invalid file descriptors. */
+ {
+ errno = 0;
+ ASSERT (close (-1) == -1);
+ ASSERT (errno == EBADF);
+ }
+ {
+ close (99);
+ errno = 0;
+ ASSERT (close (99) == -1);
+ ASSERT (errno == EBADF);
+ }
+
+ return 0;
+}
diff --git a/tests/test-closein.c b/tests/test-closein.c
index 0c29a6b..5f9d8ef 100644
--- a/tests/test-closein.c
+++ b/tests/test-closein.c
@@ -1,5 +1,5 @@
/* Test of closein module.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
/* Written by Eric Blake. */
diff --git a/tests/test-closein.sh b/tests/test-closein.sh
index a75929a..9c5e851 100755
--- a/tests/test-closein.sh
+++ b/tests/test-closein.sh
@@ -1,38 +1,32 @@
#!/bin/sh
+: ${srcdir=.}
+. "$srcdir/init.sh"; path_prepend_ .
-tmpfiles=
-trap 'rm -fr $tmpfiles' 1 2 3 15
+echo Hello world > in.tmp
+echo world > xout.tmp
-p=t-closein-
-tmpfiles="${p}in.tmp ${p}xout.tmp ${p}out1.tmp ${p}out2.tmp"
+fail=0
+# Test with seekable stdin; follow-on process must see remaining data
+(test-closein; cat) < in.tmp > out1.tmp || fail=1
+cmp out1.tmp in.tmp || fail=1
-echo Hello world > ${p}in.tmp
-echo world > ${p}xout.tmp
-
-# Test with seekable stdin; followon process must see remaining data
-(./test-closein${EXEEXT}; cat) < ${p}in.tmp > ${p}out1.tmp || exit 1
-cmp ${p}out1.tmp ${p}in.tmp || exit 1
-
-(./test-closein${EXEEXT} consume; cat) < ${p}in.tmp > ${p}out2.tmp || exit 1
-cmp ${p}out2.tmp ${p}xout.tmp || exit 1
+(test-closein consume; cat) < in.tmp > out2.tmp || fail=1
+cmp out2.tmp xout.tmp || fail=1
# Test for lack of error on pipe. Ignore any EPIPE failures from cat.
-cat ${p}in.tmp 2>/dev/null | ./test-closein${EXEEXT} || exit 1
+cat in.tmp 2>/dev/null | test-closein || fail=1
-cat ${p}in.tmp 2>/dev/null | ./test-closein${EXEEXT} consume || exit 1
+cat in.tmp 2>/dev/null | test-closein consume || fail=1
# Test for lack of error when nothing is read
-./test-closein${EXEEXT} </dev/null || exit 1
+test-closein </dev/null || fail=1
-./test-closein${EXEEXT} <&- || exit 1
+test-closein <&- || fail=1
# Test for no error when EOF is read early
-./test-closein${EXEEXT} consume </dev/null || exit 1
+test-closein consume </dev/null || fail=1
# Test for error when read fails because no file available
-./test-closein${EXEEXT} consume close <&- 2>/dev/null && exit 1
-
-# Cleanup
-rm -fr $tmpfiles
+test-closein consume close <&- 2>/dev/null && fail=1
-exit 0
+Exit $fail
diff --git a/tests/test-dirent-c++.cc b/tests/test-dirent-c++.cc
new file mode 100644
index 0000000..e70c26d
--- /dev/null
+++ b/tests/test-dirent-c++.cc
@@ -0,0 +1,51 @@
+/* Test of <dirent.h> substitute in C++ mode.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2010. */
+
+#define GNULIB_NAMESPACE gnulib
+#include <config.h>
+
+#include <dirent.h>
+
+#include "signature.h"
+
+
+SIGNATURE_CHECK (GNULIB_NAMESPACE::closedir, int, (DIR *));
+
+#if GNULIB_TEST_FDOPENDIR
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fdopendir, DIR *, (int));
+#endif
+
+SIGNATURE_CHECK (GNULIB_NAMESPACE::opendir, DIR *, (const char *));
+
+#if GNULIB_TEST_SCANDIR
+SIGNATURE_CHECK (GNULIB_NAMESPACE::scandir, int,
+ (const char *, struct dirent ***,
+ int (*) (const struct dirent *),
+ int (*) (const struct dirent **, const struct dirent **)));
+#endif
+
+#if GNULIB_TEST_ALPHASORT
+SIGNATURE_CHECK (GNULIB_NAMESPACE::alphasort, int,
+ (const struct dirent **, const struct dirent **));
+#endif
+
+
+int
+main ()
+{
+}
diff --git a/tests/test-dirent.c b/tests/test-dirent.c
new file mode 100644
index 0000000..34ef5d9
--- /dev/null
+++ b/tests/test-dirent.c
@@ -0,0 +1,32 @@
+/* Test of <dirent.h> substitute.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <dirent.h>
+
+/* Check for existence of required types. */
+static DIR *dir _GL_UNUSED;
+static struct dirent d;
+static ino_t i;
+
+int
+main (void)
+{
+ return d.d_name[0] + i;
+}
diff --git a/tests/test-dirname.c b/tests/test-dirname.c
index 1ddf229..a017bce 100644
--- a/tests/test-dirname.c
+++ b/tests/test-dirname.c
@@ -1,5 +1,5 @@
/* Test the gnulib dirname module.
- Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -149,14 +149,15 @@ main (void)
|| (dirlen + 1 == strlen (dir) && dir[dirlen] == '.'))))
{
ok = false;
- printf ("dir_name `%s': got `%s' len %d, expected `%s' len %ld\n",
+ printf ("dir_name '%s': got '%s' len %d,"
+ " expected '%s' len %ld\n",
t->name, dir, dirlen,
t->dir, (unsigned long) strlen (t->dir));
}
if (strcmp (last, t->last))
{
ok = false;
- printf ("last_component `%s': got `%s', expected `%s'\n",
+ printf ("last_component '%s': got '%s', expected '%s'\n",
t->name, last, t->last);
}
if (! (strcmp (base, t->base) == 0
@@ -165,21 +166,22 @@ main (void)
&& ISSLASH (base[baselen])))))
{
ok = false;
- printf ("base_name `%s': got `%s' len %d, expected `%s' len %ld\n",
+ printf ("base_name '%s': got '%s' len %d,"
+ " expected '%s' len %ld\n",
t->name, base, baselen,
t->base, (unsigned long) strlen (t->base));
}
if (strcmp (stripped, t->stripped) || modified != t->modified)
{
ok = false;
- printf ("strip_trailing_slashes `%s': got %s %s, expected %s %s\n",
+ printf ("strip_trailing_slashes '%s': got %s %s, expected %s %s\n",
t->name, stripped, modified ? "changed" : "unchanged",
t->stripped, t->modified ? "changed" : "unchanged");
}
if (t->absolute != absolute)
{
ok = false;
- printf ("`%s': got %s, expected %s\n", t->name,
+ printf ("'%s': got %s, expected %s\n", t->name,
absolute ? "absolute" : "relative",
t->absolute ? "absolute" : "relative");
}
diff --git a/tests/test-dup-safer.c b/tests/test-dup-safer.c
index 14cfaff..4dcd752 100644
--- a/tests/test-dup-safer.c
+++ b/tests/test-dup-safer.c
@@ -1,5 +1,5 @@
/* Test that dup_safer leaves standard fds alone.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -24,14 +24,17 @@
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
+#include <unistd.h>
#include "binary-io.h"
#include "cloexec.h"
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* Get declarations of the Win32 API functions. */
+/* Get declarations of the native Windows API functions. */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
+/* Get _get_osfhandle. */
+# include "msvc-nothrow.h"
#endif
#if !O_BINARY
@@ -54,7 +57,7 @@ static bool
is_open (int fd)
{
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
- /* On Win32, the initial state of unassigned standard file
+ /* On native Windows, the initial state of unassigned standard file
descriptors is that they are open but point to an
INVALID_HANDLE_VALUE, and there is no fcntl. */
return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE;
@@ -71,7 +74,7 @@ static bool
is_inheritable (int fd)
{
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
- /* On Win32, the initial state of unassigned standard file
+ /* On native Windows, the initial state of unassigned standard file
descriptors is that they are open but point to an
INVALID_HANDLE_VALUE, and there is no fcntl. */
HANDLE h = (HANDLE) _get_osfhandle (fd);
@@ -105,6 +108,7 @@ main (void)
{
int i;
int fd;
+ int bad_fd = getdtablesize ();
/* We close fd 2 later, so save it in fd 10. */
if (dup2 (STDERR_FILENO, BACKUP_STDERR_FILENO) != BACKUP_STDERR_FILENO
@@ -127,7 +131,7 @@ main (void)
ASSERT (dup (-1) == -1);
ASSERT (errno == EBADF);
errno = 0;
- ASSERT (dup (10000000) == -1);
+ ASSERT (dup (bad_fd) == -1);
ASSERT (errno == EBADF);
close (fd + 1);
errno = 0;
diff --git a/tests/test-dup.c b/tests/test-dup.c
new file mode 100644
index 0000000..b2cf935
--- /dev/null
+++ b/tests/test-dup.c
@@ -0,0 +1,45 @@
+/* Test duplicating a file descriptor.
+ 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 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (dup, int, (int));
+
+#include <errno.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+ /* Test behaviour for invalid file descriptors. */
+ {
+ errno = 0;
+ ASSERT (dup (-1) == -1);
+ ASSERT (errno == EBADF);
+ }
+ {
+ close (99);
+ errno = 0;
+ ASSERT (dup (99) == -1);
+ ASSERT (errno == EBADF);
+ }
+
+ return 0;
+}
diff --git a/tests/test-dup2.c b/tests/test-dup2.c
index e2ad88b..ecb2692 100644
--- a/tests/test-dup2.c
+++ b/tests/test-dup2.c
@@ -1,5 +1,5 @@
/* Test duplicating file descriptors.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -26,6 +26,10 @@ SIGNATURE_CHECK (dup2, int, (int, int));
#include <errno.h>
#include <fcntl.h>
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
#include "binary-io.h"
#if GNULIB_TEST_CLOEXEC
@@ -33,9 +37,11 @@ SIGNATURE_CHECK (dup2, int, (int, int));
#endif
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* Get declarations of the Win32 API functions. */
+/* Get declarations of the native Windows API functions. */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
+/* Get _get_osfhandle. */
+# include "msvc-nothrow.h"
#endif
#include "macros.h"
@@ -45,7 +51,7 @@ static int
is_open (int fd)
{
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
- /* On Win32, the initial state of unassigned standard file
+ /* On native Windows, the initial state of unassigned standard file
descriptors is that they are open but point to an
INVALID_HANDLE_VALUE, and there is no fcntl. */
return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE;
@@ -63,7 +69,7 @@ static int
is_inheritable (int fd)
{
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
- /* On Win32, the initial state of unassigned standard file
+ /* On native Windows, the initial state of unassigned standard file
descriptors is that they are open but point to an
INVALID_HANDLE_VALUE, and there is no fcntl. */
HANDLE h = (HANDLE) _get_osfhandle (fd);
@@ -101,6 +107,7 @@ main (void)
{
const char *file = "test-dup2.tmp";
char buffer[1];
+ int bad_fd = getdtablesize ();
int fd = open (file, O_CREAT | O_TRUNC | O_RDWR, 0600);
/* Assume std descriptors were provided by invoker. */
@@ -120,6 +127,10 @@ main (void)
errno = 0;
ASSERT (dup2 (-1, fd) == -1);
ASSERT (errno == EBADF);
+ close (99);
+ errno = 0;
+ ASSERT (dup2 (99, fd) == -1);
+ ASSERT (errno == EBADF);
errno = 0;
ASSERT (dup2 (AT_FDCWD, fd) == -1);
ASSERT (errno == EBADF);
@@ -140,7 +151,7 @@ main (void)
ASSERT (dup2 (fd, -2) == -1);
ASSERT (errno == EBADF);
errno = 0;
- ASSERT (dup2 (fd, 10000000) == -1);
+ ASSERT (dup2 (fd, bad_fd) == -1);
ASSERT (errno == EBADF);
/* Using dup2 can skip fds. */
diff --git a/tests/test-environ.c b/tests/test-environ.c
index 11df789..cb3d9f6 100644
--- a/tests/test-environ.c
+++ b/tests/test-environ.c
@@ -1,5 +1,5 @@
/* Test of environ variable.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-errno.c b/tests/test-errno.c
index 7851c22..29eb510 100644
--- a/tests/test-errno.c
+++ b/tests/test-errno.c
@@ -1,5 +1,5 @@
/* Test of <errno.h> substitute.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -98,6 +98,8 @@ int e115 = EINPROGRESS;
int e116 = ESTALE;
int e122 = EDQUOT;
int e125 = ECANCELED;
+int e130 = EOWNERDEAD;
+int e131 = ENOTRECOVERABLE;
/* Don't verify that these errno values are all different, except for possibly
EWOULDBLOCK == EAGAIN. Even Linux/x86 does not pass this check: it has
diff --git a/tests/test-fclose.c b/tests/test-fclose.c
new file mode 100644
index 0000000..3fbecf1
--- /dev/null
+++ b/tests/test-fclose.c
@@ -0,0 +1,114 @@
+/* Test of fclose module.
+ 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 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 <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fclose, int, (FILE *));
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+#define BASE "test-fclose.t"
+
+int
+main (int argc, char **argv)
+{
+ const char buf[] = "hello world";
+ int fd;
+ int fd2;
+ FILE *f;
+
+ /* Prepare a seekable file. */
+ fd = open (BASE, O_RDWR | O_CREAT | O_TRUNC, 0600);
+ ASSERT (0 <= fd);
+ ASSERT (write (fd, buf, sizeof buf) == sizeof buf);
+ ASSERT (lseek (fd, 1, SEEK_SET) == 1);
+
+ /* Create an output stream visiting the file; when it is closed, all
+ other file descriptors visiting the file must see the new file
+ position. */
+ fd2 = dup (fd);
+ ASSERT (0 <= fd2);
+ f = fdopen (fd2, "w");
+ ASSERT (f);
+ ASSERT (fputc (buf[1], f) == buf[1]);
+ ASSERT (fclose (f) == 0);
+ errno = 0;
+ ASSERT (lseek (fd2, 0, SEEK_CUR) == -1);
+ ASSERT (errno == EBADF);
+ ASSERT (lseek (fd, 0, SEEK_CUR) == 2);
+
+ /* Likewise for an input stream. */
+ fd2 = dup (fd);
+ ASSERT (0 <= fd2);
+ f = fdopen (fd2, "r");
+ ASSERT (f);
+ ASSERT (fgetc (f) == buf[2]);
+ ASSERT (fclose (f) == 0);
+ errno = 0;
+ ASSERT (lseek (fd2, 0, SEEK_CUR) == -1);
+ ASSERT (errno == EBADF);
+ ASSERT (lseek (fd, 0, SEEK_CUR) == 3);
+
+ /* Test that fclose() sets errno if someone else closes the stream
+ fd behind the back of stdio. */
+ {
+ FILE *fp = fdopen (fd, "w+");
+ ASSERT (fp != NULL);
+ ASSERT (close (fd) == 0);
+ errno = 0;
+ ASSERT (fclose (fp) == EOF);
+ ASSERT (errno == EBADF);
+ }
+
+ /* Test that fclose() sets errno if the stream was constructed with
+ an invalid file descriptor. */
+ {
+ FILE *fp = fdopen (-1, "r");
+ if (fp != NULL)
+ {
+ errno = 0;
+ ASSERT (fclose (fp) == EOF);
+ ASSERT (errno == EBADF);
+ }
+ }
+ {
+ FILE *fp;
+ close (99);
+ fp = fdopen (99, "r");
+ if (fp != NULL)
+ {
+ errno = 0;
+ ASSERT (fclose (fp) == EOF);
+ ASSERT (errno == EBADF);
+ }
+ }
+
+ /* Clean up. */
+ ASSERT (remove (BASE) == 0);
+
+ return 0;
+}
diff --git a/tests/test-fcntl-h-c++.cc b/tests/test-fcntl-h-c++.cc
index 4de411c..8616d56 100644
--- a/tests/test-fcntl-h-c++.cc
+++ b/tests/test-fcntl-h-c++.cc
@@ -1,5 +1,5 @@
/* Test of <fcntl.h> substitute in C++ mode.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-fcntl-h.c b/tests/test-fcntl-h.c
index dd20fbb..e30ff19 100644
--- a/tests/test-fcntl-h.c
+++ b/tests/test-fcntl-h.c
@@ -1,5 +1,5 @@
/* Test of <fcntl.h> substitute.
- Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -21,18 +21,110 @@
#include <fcntl.h>
/* Check that the various O_* macros are defined. */
-int o = O_DIRECT | O_DIRECTORY | O_DSYNC | O_NDELAY | O_NOATIME | O_NONBLOCK
- | O_NOCTTY | O_NOFOLLOW | O_NOLINKS | O_RSYNC | O_SYNC | O_TTY_INIT
- | O_BINARY | O_TEXT;
+int o = (O_DIRECT | O_DIRECTORY | O_DSYNC | O_IGNORE_CTTY | O_NDELAY | O_NOATIME
+ | O_NONBLOCK | O_NOCTTY | O_NOFOLLOW | O_NOLINK | O_NOLINKS | O_NOTRANS
+ | O_RSYNC | O_SYNC | O_TTY_INIT | O_BINARY | O_TEXT);
/* Check that the various SEEK_* macros are defined. */
int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET };
/* Check that the FD_* macros are defined. */
-int fd = FD_CLOEXEC;
+int i = FD_CLOEXEC;
+
+/* Check that the types are all defined. */
+pid_t t1;
+off_t t2;
+mode_t t3;
int
main (void)
{
- return 0;
+ /* Ensure no overlap in SEEK_*. */
+ switch (0)
+ {
+ case SEEK_CUR:
+ case SEEK_END:
+ case SEEK_SET:
+ ;
+ }
+
+ /* Ensure no dangerous overlap in non-zero gnulib-defined replacements. */
+ switch (O_RDONLY)
+ {
+ /* Access modes */
+ case O_RDONLY:
+ case O_WRONLY:
+ case O_RDWR:
+#if O_EXEC && O_EXEC != O_RDONLY
+ case O_EXEC:
+#endif
+#if O_SEARCH && O_EXEC != O_SEARCH && O_SEARCH != O_RDONLY
+ case O_SEARCH:
+#endif
+ i = ! (~O_ACCMODE & (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH));
+ break;
+
+ /* Everyone should have these */
+ case O_CREAT:
+ case O_EXCL:
+ case O_TRUNC:
+ case O_APPEND:
+ break;
+
+ /* These might be 0 or O_RDONLY, only test non-zero versions. */
+#if O_CLOEXEC
+ case O_CLOEXEC:
+#endif
+#if O_DIRECT
+ case O_DIRECT:
+#endif
+#if O_DIRECTORY
+ case O_DIRECTORY:
+#endif
+#if O_DSYNC
+ case O_DSYNC:
+#endif
+#if O_IGNORE_CTTY
+ case O_IGNORE_CTTY:
+#endif
+#if O_NOATIME
+ case O_NOATIME:
+#endif
+#if O_NONBLOCK
+ case O_NONBLOCK:
+#endif
+#if O_NOCTTY
+ case O_NOCTTY:
+#endif
+#if O_NOFOLLOW
+ case O_NOFOLLOW:
+#endif
+#if O_NOLINK
+ case O_NOLINK:
+#endif
+#if O_NOLINKS
+ case O_NOLINKS:
+#endif
+#if O_NOTRANS
+ case O_NOTRANS:
+#endif
+#if O_RSYNC && O_RSYNC != O_DSYNC
+ case O_RSYNC:
+#endif
+#if O_SYNC && O_SYNC != O_RSYNC
+ case O_SYNC:
+#endif
+#if O_TTY_INIT
+ case O_TTY_INIT:
+#endif
+#if O_BINARY
+ case O_BINARY:
+#endif
+#if O_TEXT
+ case O_TEXT:
+#endif
+ ;
+ }
+
+ return !i;
}
diff --git a/tests/test-fcntl.c b/tests/test-fcntl.c
index 23a0dba..058f30e 100644
--- a/tests/test-fcntl.c
+++ b/tests/test-fcntl.c
@@ -1,5 +1,5 @@
/* Test of fcntl(2).
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -31,9 +31,11 @@ SIGNATURE_CHECK (fcntl, int, (int, int, ...));
#include <unistd.h>
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* Get declarations of the Win32 API functions. */
+/* Get declarations of the native Windows API functions. */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
+/* Get _get_osfhandle. */
+# include "msvc-nothrow.h"
#endif
#include "binary-io.h"
@@ -49,7 +51,7 @@ static bool
is_open (int fd)
{
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
- /* On Win32, the initial state of unassigned standard file
+ /* On native Windows, the initial state of unassigned standard file
descriptors is that they are open but point to an
INVALID_HANDLE_VALUE, and there is no fcntl. */
return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE;
@@ -66,7 +68,7 @@ static bool
is_inheritable (int fd)
{
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
- /* On Win32, the initial state of unassigned standard file
+ /* On native Windows, the initial state of unassigned standard file
descriptors is that they are open but point to an
INVALID_HANDLE_VALUE, and there is no fcntl. */
HANDLE h = (HANDLE) _get_osfhandle (fd);
@@ -209,6 +211,7 @@ main (void)
{
const char *file = "test-fcntl.tmp";
int fd;
+ int bad_fd = getdtablesize ();
/* Sanity check that rpl_fcntl is likely to work. */
ASSERT (func2 (1, 2) == 2);
@@ -235,7 +238,7 @@ main (void)
ASSERT (fcntl (fd + 1, F_DUPFD, 0) == -1);
ASSERT (errno == EBADF);
errno = 0;
- ASSERT (fcntl (10000000, F_DUPFD, 0) == -1);
+ ASSERT (fcntl (bad_fd, F_DUPFD, 0) == -1);
ASSERT (errno == EBADF);
errno = 0;
ASSERT (fcntl (-1, F_DUPFD_CLOEXEC, 0) == -1);
@@ -244,23 +247,21 @@ main (void)
ASSERT (fcntl (fd + 1, F_DUPFD_CLOEXEC, 0) == -1);
ASSERT (errno == EBADF);
errno = 0;
- ASSERT (fcntl (10000000, F_DUPFD_CLOEXEC, 0) == -1);
+ ASSERT (fcntl (bad_fd, F_DUPFD_CLOEXEC, 0) == -1);
ASSERT (errno == EBADF);
/* For F_DUPFD*, the destination must be valid. */
- ASSERT (getdtablesize () < 10000000);
errno = 0;
ASSERT (fcntl (fd, F_DUPFD, -1) == -1);
ASSERT (errno == EINVAL);
errno = 0;
- ASSERT (fcntl (fd, F_DUPFD, 10000000) == -1);
+ ASSERT (fcntl (fd, F_DUPFD, bad_fd) == -1);
ASSERT (errno == EINVAL);
- ASSERT (getdtablesize () < 10000000);
errno = 0;
ASSERT (fcntl (fd, F_DUPFD_CLOEXEC, -1) == -1);
ASSERT (errno == EINVAL);
errno = 0;
- ASSERT (fcntl (fd, F_DUPFD_CLOEXEC, 10000000) == -1);
+ ASSERT (fcntl (fd, F_DUPFD_CLOEXEC, bad_fd) == -1);
ASSERT (errno == EINVAL);
/* For F_DUPFD*, check for correct inheritance, as well as
@@ -312,7 +313,7 @@ main (void)
ASSERT (is_mode (fd + 2, O_TEXT));
ASSERT (close (fd + 2) == 0);
- /* Test F_GETFD. */
+ /* Test F_GETFD on invalid file descriptors. */
errno = 0;
ASSERT (fcntl (-1, F_GETFD) == -1);
ASSERT (errno == EBADF);
@@ -320,8 +321,10 @@ main (void)
ASSERT (fcntl (fd + 1, F_GETFD) == -1);
ASSERT (errno == EBADF);
errno = 0;
- ASSERT (fcntl (10000000, F_GETFD) == -1);
+ ASSERT (fcntl (bad_fd, F_GETFD) == -1);
ASSERT (errno == EBADF);
+
+ /* Test F_GETFD, the FD_CLOEXEC bit. */
{
int result = fcntl (fd, F_GETFD);
ASSERT (0 <= result);
@@ -333,6 +336,71 @@ main (void)
ASSERT (close (fd + 1) == 0);
}
+#ifdef F_SETFD
+ /* Test F_SETFD on invalid file descriptors. */
+ errno = 0;
+ ASSERT (fcntl (-1, F_SETFD, 0) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (fd + 1, F_SETFD, 0) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (bad_fd, F_SETFD, 0) == -1);
+ ASSERT (errno == EBADF);
+#endif
+
+#ifdef F_GETFL
+ /* Test F_GETFL on invalid file descriptors. */
+ errno = 0;
+ ASSERT (fcntl (-1, F_GETFL) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (fd + 1, F_GETFL) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (bad_fd, F_GETFL) == -1);
+ ASSERT (errno == EBADF);
+#endif
+
+#ifdef F_SETFL
+ /* Test F_SETFL on invalid file descriptors. */
+ errno = 0;
+ ASSERT (fcntl (-1, F_SETFL, 0) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (fd + 1, F_SETFL, 0) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (bad_fd, F_SETFL, 0) == -1);
+ ASSERT (errno == EBADF);
+#endif
+
+#ifdef F_GETOWN
+ /* Test F_GETOWN on invalid file descriptors. */
+ errno = 0;
+ ASSERT (fcntl (-1, F_GETOWN) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (fd + 1, F_GETOWN) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (bad_fd, F_GETOWN) == -1);
+ ASSERT (errno == EBADF);
+#endif
+
+#ifdef F_SETOWN
+ /* Test F_SETFL on invalid file descriptors. */
+ errno = 0;
+ ASSERT (fcntl (-1, F_SETOWN, 0) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (fd + 1, F_SETOWN, 0) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (bad_fd, F_SETOWN, 0) == -1);
+ ASSERT (errno == EBADF);
+#endif
+
/* Cleanup. */
ASSERT (close (fd) == 0);
ASSERT (unlink (file) == 0);
diff --git a/tests/test-fdopen.c b/tests/test-fdopen.c
new file mode 100644
index 0000000..671c5e3
--- /dev/null
+++ b/tests/test-fdopen.c
@@ -0,0 +1,56 @@
+/* Test opening a stream with a file descriptor.
+ 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 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fdopen, FILE *, (int, const char *));
+
+#include <errno.h>
+#include <unistd.h>
+
+#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;
+
+ close (99);
+ errno = 0;
+ fp = fdopen (99, "r");
+ if (fp == NULL)
+ ASSERT (errno == EBADF);
+ else
+ fclose (fp);
+ }
+
+ return 0;
+}
diff --git a/tests/test-fflush.c b/tests/test-fflush.c
index 3c36ed9..1c61140 100644
--- a/tests/test-fflush.c
+++ b/tests/test-fflush.c
@@ -1,5 +1,5 @@
/* Test of POSIX compatible fflush() function.
- Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -26,8 +26,11 @@
#include "signature.h"
SIGNATURE_CHECK (fflush, int, (FILE *));
+#include <errno.h>
#include <unistd.h>
+#include "macros.h"
+
int
main (void)
{
@@ -46,11 +49,13 @@ main (void)
/* Test fflush. */
f = fopen ("test-fflush.txt", "r");
+ ASSERT (f != NULL);
fd = fileno (f);
if (!f || 0 > fd || fread (buffer, 1, 5, f) != 5)
{
fputs ("Failed initial read of sample file.\n", stderr);
- fclose (f);
+ if (f)
+ fclose (f);
unlink ("test-fflush.txt");
return 1;
}
@@ -140,6 +145,47 @@ main (void)
return 1;
}
fclose (f);
+
+ /* Test that fflush() sets errno if someone else closes the stream
+ fd behind the back of stdio. */
+ {
+ FILE *fp = fopen ("test-fflush.txt", "w");
+ ASSERT (fp != NULL);
+ fputc ('x', fp);
+ ASSERT (close (fileno (fp)) == 0);
+ errno = 0;
+ ASSERT (fflush (fp) == EOF);
+ ASSERT (errno == EBADF);
+ fclose (fp);
+ }
+
+ /* Test that fflush() sets errno if the stream was constructed with
+ an invalid file descriptor. */
+ {
+ FILE *fp = fdopen (-1, "w");
+ if (fp != NULL)
+ {
+ fputc ('x', fp);
+ errno = 0;
+ ASSERT (fflush (fp) == EOF);
+ ASSERT (errno == EBADF);
+ }
+ }
+ {
+ FILE *fp;
+ close (99);
+ fp = fdopen (99, "w");
+ if (fp != NULL)
+ {
+ fputc ('x', fp);
+ errno = 0;
+ ASSERT (fflush (fp) == EOF);
+ ASSERT (errno == EBADF);
+ }
+ }
+
+ /* Clean up. */
unlink ("test-fflush.txt");
+
return 0;
}
diff --git a/tests/test-fflush2.c b/tests/test-fflush2.c
index ac2217d..90684b2 100644
--- a/tests/test-fflush2.c
+++ b/tests/test-fflush2.c
@@ -1,5 +1,5 @@
/* Test of POSIX compatible fflush() function.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-fgetc.c b/tests/test-fgetc.c
new file mode 100644
index 0000000..b4a617a
--- /dev/null
+++ b/tests/test-fgetc.c
@@ -0,0 +1,97 @@
+/* Test of fgetc() function.
+ 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 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 <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fgetc, int, (FILE *));
+
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "msvc-inval.h"
+
+#include "macros.h"
+
+int
+main (int argc, char **argv)
+{
+ const char *filename = "test-fgetc.txt";
+
+ /* We don't have an fgetc() function that installs an invalid parameter
+ handler so far. So install that handler here, explicitly. */
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER \
+ && MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING
+ gl_msvc_inval_ensure_handler ();
+#endif
+
+ /* Prepare a file. */
+ {
+ const char text[] = "hello world";
+ int fd = open (filename, O_RDWR | O_CREAT | O_TRUNC, 0600);
+ ASSERT (fd >= 0);
+ ASSERT (write (fd, text, sizeof (text)) == sizeof (text));
+ ASSERT (close (fd) == 0);
+ }
+
+ /* Test that fgetc() sets errno if someone else closes the stream
+ fd behind the back of stdio. */
+ {
+ FILE *fp = fopen (filename, "r");
+ ASSERT (fp != NULL);
+ ASSERT (close (fileno (fp)) == 0);
+ errno = 0;
+ ASSERT (fgetc (fp) == EOF);
+ ASSERT (errno == EBADF);
+ ASSERT (ferror (fp));
+ fclose (fp);
+ }
+
+ /* Test that fgetc() sets errno if the stream was constructed with
+ an invalid file descriptor. */
+ {
+ FILE *fp = fdopen (-1, "r");
+ if (fp != NULL)
+ {
+ errno = 0;
+ ASSERT (fgetc (fp) == EOF);
+ ASSERT (errno == EBADF);
+ ASSERT (ferror (fp));
+ fclose (fp);
+ }
+ }
+ {
+ FILE *fp;
+ close (99);
+ fp = fdopen (99, "r");
+ if (fp != NULL)
+ {
+ errno = 0;
+ ASSERT (fgetc (fp) == EOF);
+ ASSERT (errno == EBADF);
+ ASSERT (ferror (fp));
+ fclose (fp);
+ }
+ }
+
+ /* Clean up. */
+ unlink (filename);
+
+ return 0;
+}
diff --git a/tests/test-filenamecat.c b/tests/test-filenamecat.c
index 795b6df..2d29cd4 100644
--- a/tests/test-filenamecat.c
+++ b/tests/test-filenamecat.c
@@ -1,6 +1,6 @@
/* Test of concatenation of two arbitrary file names.
- Copyright (C) 1996-2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 1996-2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-float.c b/tests/test-float.c
new file mode 100644
index 0000000..7d3142f
--- /dev/null
+++ b/tests/test-float.c
@@ -0,0 +1,384 @@
+/* Test of <float.h> substitute.
+ 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 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2011. */
+
+#include <config.h>
+
+#include <float.h>
+
+#include "fpucw.h"
+#include "macros.h"
+
+/* Check that FLT_RADIX is a constant expression. */
+int a[] = { FLT_RADIX };
+
+#if FLT_RADIX == 2
+
+/* Return 2^n. */
+static float
+pow2f (int n)
+{
+ int k = n;
+ volatile float x = 1;
+ volatile float y = 2;
+ /* Invariant: 2^n == x * y^k. */
+ if (k < 0)
+ {
+ y = 0.5f;
+ k = - k;
+ }
+ while (k > 0)
+ {
+ if (k != 2 * (k / 2))
+ {
+ x = x * y;
+ k = k - 1;
+ }
+ if (k == 0)
+ break;
+ y = y * y;
+ k = k / 2;
+ }
+ /* Now k == 0, hence x == 2^n. */
+ return x;
+}
+
+/* Return 2^n. */
+static double
+pow2d (int n)
+{
+ int k = n;
+ volatile double x = 1;
+ volatile double y = 2;
+ /* Invariant: 2^n == x * y^k. */
+ if (k < 0)
+ {
+ y = 0.5;
+ k = - k;
+ }
+ while (k > 0)
+ {
+ if (k != 2 * (k / 2))
+ {
+ x = x * y;
+ k = k - 1;
+ }
+ if (k == 0)
+ break;
+ y = y * y;
+ k = k / 2;
+ }
+ /* Now k == 0, hence x == 2^n. */
+ return x;
+}
+
+/* Return 2^n. */
+static long double
+pow2l (int n)
+{
+ int k = n;
+ volatile long double x = 1;
+ volatile long double y = 2;
+ /* Invariant: 2^n == x * y^k. */
+ if (k < 0)
+ {
+ y = 0.5L;
+ k = - k;
+ }
+ while (k > 0)
+ {
+ if (k != 2 * (k / 2))
+ {
+ x = x * y;
+ k = k - 1;
+ }
+ if (k == 0)
+ break;
+ y = y * y;
+ k = k / 2;
+ }
+ /* Now k == 0, hence x == 2^n. */
+ return x;
+}
+
+/* ----------------------- Check macros for 'float' ----------------------- */
+
+/* Check that the FLT_* macros expand to constant expressions. */
+int fb[] =
+ {
+ FLT_MANT_DIG, FLT_MIN_EXP, FLT_MAX_EXP,
+ FLT_DIG, FLT_MIN_10_EXP, FLT_MAX_10_EXP
+ };
+float fc[] = { FLT_EPSILON, FLT_MIN, FLT_MAX };
+
+static void
+test_float (void)
+{
+ /* Check that the value of FLT_MIN_EXP is well parenthesized. */
+ ASSERT ((FLT_MIN_EXP % 101111) == (FLT_MIN_EXP) % 101111);
+
+ /* Check that the value of DBL_MIN_10_EXP is well parenthesized. */
+ ASSERT ((FLT_MIN_10_EXP % 101111) == (FLT_MIN_10_EXP) % 101111);
+
+ /* Check that 'float' is as specified in IEEE 754. */
+ ASSERT (FLT_MANT_DIG == 24);
+ ASSERT (FLT_MIN_EXP == -125);
+ ASSERT (FLT_MAX_EXP == 128);
+
+ /* Check the value of FLT_MIN_10_EXP. */
+ ASSERT (FLT_MIN_10_EXP == - (int) (- (FLT_MIN_EXP - 1) * 0.30103));
+
+ /* Check the value of FLT_DIG. */
+ ASSERT (FLT_DIG == (int) ((FLT_MANT_DIG - 1) * 0.30103));
+
+ /* Check the value of FLT_MIN_10_EXP. */
+ ASSERT (FLT_MIN_10_EXP == - (int) (- (FLT_MIN_EXP - 1) * 0.30103));
+
+ /* Check the value of FLT_MAX_10_EXP. */
+ ASSERT (FLT_MAX_10_EXP == (int) (FLT_MAX_EXP * 0.30103));
+
+ /* Check the value of FLT_MAX. */
+ {
+ volatile float m = FLT_MAX;
+ int n;
+
+ ASSERT (m + m > m);
+ for (n = 0; n <= 2 * FLT_MANT_DIG; n++)
+ {
+ volatile float pow2_n = pow2f (n); /* 2^n */
+ volatile float x = m + (m / pow2_n);
+ if (x > m)
+ ASSERT (x + x == x);
+ else
+ ASSERT (!(x + x == x));
+ }
+ }
+
+ /* Check the value of FLT_MIN. */
+ {
+ volatile float m = FLT_MIN;
+ volatile float x = pow2f (FLT_MIN_EXP - 1);
+ ASSERT (m == x);
+ }
+
+ /* Check the value of FLT_EPSILON. */
+ {
+ volatile float e = FLT_EPSILON;
+ volatile float me;
+ int n;
+
+ me = 1.0f + e;
+ ASSERT (me > 1.0f);
+ ASSERT (me - 1.0f == e);
+ for (n = 0; n <= 2 * FLT_MANT_DIG; n++)
+ {
+ volatile float half_n = pow2f (- n); /* 2^-n */
+ volatile float x = me - half_n;
+ if (x < me)
+ ASSERT (x <= 1.0f);
+ }
+ }
+}
+
+/* ----------------------- Check macros for 'double' ----------------------- */
+
+/* Check that the DBL_* macros expand to constant expressions. */
+int db[] =
+ {
+ DBL_MANT_DIG, DBL_MIN_EXP, DBL_MAX_EXP,
+ DBL_DIG, DBL_MIN_10_EXP, DBL_MAX_10_EXP
+ };
+double dc[] = { DBL_EPSILON, DBL_MIN, DBL_MAX };
+
+static void
+test_double (void)
+{
+ /* Check that the value of DBL_MIN_EXP is well parenthesized. */
+ ASSERT ((DBL_MIN_EXP % 101111) == (DBL_MIN_EXP) % 101111);
+
+ /* Check that the value of DBL_MIN_10_EXP is well parenthesized. */
+ ASSERT ((DBL_MIN_10_EXP % 101111) == (DBL_MIN_10_EXP) % 101111);
+
+ /* Check that 'double' is as specified in IEEE 754. */
+ ASSERT (DBL_MANT_DIG == 53);
+ ASSERT (DBL_MIN_EXP == -1021);
+ ASSERT (DBL_MAX_EXP == 1024);
+
+ /* Check the value of DBL_MIN_10_EXP. */
+ ASSERT (DBL_MIN_10_EXP == - (int) (- (DBL_MIN_EXP - 1) * 0.30103));
+
+ /* Check the value of DBL_DIG. */
+ ASSERT (DBL_DIG == (int) ((DBL_MANT_DIG - 1) * 0.30103));
+
+ /* Check the value of DBL_MIN_10_EXP. */
+ ASSERT (DBL_MIN_10_EXP == - (int) (- (DBL_MIN_EXP - 1) * 0.30103));
+
+ /* Check the value of DBL_MAX_10_EXP. */
+ ASSERT (DBL_MAX_10_EXP == (int) (DBL_MAX_EXP * 0.30103));
+
+ /* Check the value of DBL_MAX. */
+ {
+ volatile double m = DBL_MAX;
+ int n;
+
+ ASSERT (m + m > m);
+ for (n = 0; n <= 2 * DBL_MANT_DIG; n++)
+ {
+ volatile double pow2_n = pow2d (n); /* 2^n */
+ volatile double x = m + (m / pow2_n);
+ if (x > m)
+ ASSERT (x + x == x);
+ else
+ ASSERT (!(x + x == x));
+ }
+ }
+
+ /* Check the value of DBL_MIN. */
+ {
+ volatile double m = DBL_MIN;
+ volatile double x = pow2d (DBL_MIN_EXP - 1);
+ ASSERT (m == x);
+ }
+
+ /* Check the value of DBL_EPSILON. */
+ {
+ volatile double e = DBL_EPSILON;
+ volatile double me;
+ int n;
+
+ me = 1.0 + e;
+ ASSERT (me > 1.0);
+ ASSERT (me - 1.0 == e);
+ for (n = 0; n <= 2 * DBL_MANT_DIG; n++)
+ {
+ volatile double half_n = pow2d (- n); /* 2^-n */
+ volatile double x = me - half_n;
+ if (x < me)
+ ASSERT (x <= 1.0);
+ }
+ }
+}
+
+/* -------------------- Check macros for 'long double' -------------------- */
+
+/* Check that the LDBL_* macros expand to constant expressions. */
+int lb[] =
+ {
+ LDBL_MANT_DIG, LDBL_MIN_EXP, LDBL_MAX_EXP,
+ LDBL_DIG, LDBL_MIN_10_EXP, LDBL_MAX_10_EXP
+ };
+long double lc1 = LDBL_EPSILON;
+long double lc2 = LDBL_MIN;
+#if 0 /* LDBL_MAX is not a constant expression on some platforms. */
+long double lc3 = LDBL_MAX;
+#endif
+
+static void
+test_long_double (void)
+{
+ /* Check that the value of LDBL_MIN_EXP is well parenthesized. */
+ ASSERT ((LDBL_MIN_EXP % 101111) == (LDBL_MIN_EXP) % 101111);
+
+ /* Check that the value of LDBL_MIN_10_EXP is well parenthesized. */
+ ASSERT ((LDBL_MIN_10_EXP % 101111) == (LDBL_MIN_10_EXP) % 101111);
+
+ /* Check that 'long double' is at least as wide as 'double'. */
+ ASSERT (LDBL_MANT_DIG >= DBL_MANT_DIG);
+ ASSERT (LDBL_MIN_EXP - LDBL_MANT_DIG <= DBL_MIN_EXP - DBL_MANT_DIG);
+ ASSERT (LDBL_MAX_EXP >= DBL_MAX_EXP);
+
+ /* Check the value of LDBL_DIG. */
+ ASSERT (LDBL_DIG == (int)((LDBL_MANT_DIG - 1) * 0.30103));
+
+ /* Check the value of LDBL_MIN_10_EXP. */
+ ASSERT (LDBL_MIN_10_EXP == - (int) (- (LDBL_MIN_EXP - 1) * 0.30103));
+
+ /* Check the value of LDBL_MAX_10_EXP. */
+ ASSERT (LDBL_MAX_10_EXP == (int) (LDBL_MAX_EXP * 0.30103));
+
+ /* Check the value of LDBL_MAX. */
+ {
+ volatile long double m = LDBL_MAX;
+ int n;
+
+ ASSERT (m + m > m);
+ for (n = 0; n <= 2 * LDBL_MANT_DIG; n++)
+ {
+ volatile long double pow2_n = pow2l (n); /* 2^n */
+ volatile long double x = m + (m / pow2_n);
+ if (x > m)
+ ASSERT (x + x == x);
+ else
+ ASSERT (!(x + x == x));
+ }
+ }
+
+ /* Check the value of LDBL_MIN. */
+ {
+ volatile long double m = LDBL_MIN;
+ volatile long double x = pow2l (LDBL_MIN_EXP - 1);
+ ASSERT (m == x);
+ }
+
+ /* Check the value of LDBL_EPSILON. */
+ {
+ volatile long double e = LDBL_EPSILON;
+ volatile long double me;
+ int n;
+
+ me = 1.0L + e;
+ ASSERT (me > 1.0L);
+ ASSERT (me - 1.0L == e);
+ for (n = 0; n <= 2 * LDBL_MANT_DIG; n++)
+ {
+ volatile long double half_n = pow2l (- n); /* 2^-n */
+ volatile long double x = me - half_n;
+ if (x < me)
+ ASSERT (x <= 1.0L);
+ }
+ }
+}
+
+int
+main ()
+{
+ test_float ();
+ test_double ();
+
+ {
+ DECL_LONG_DOUBLE_ROUNDING
+
+ BEGIN_LONG_DOUBLE_ROUNDING ();
+
+ test_long_double ();
+
+ END_LONG_DOUBLE_ROUNDING ();
+ }
+
+ return 0;
+}
+
+#else
+
+int
+main ()
+{
+ fprintf (stderr, "Skipping test: FLT_RADIX is not 2.\n");
+ return 77;
+}
+
+#endif
diff --git a/tests/test-fopen-safer.c b/tests/test-fopen-safer.c
index 20a0c13..4174ed0 100644
--- a/tests/test-fopen-safer.c
+++ b/tests/test-fopen-safer.c
@@ -1,5 +1,5 @@
/* Test of opening a file stream.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-fopen.c b/tests/test-fopen.c
index c36006a..6488e85 100644
--- a/tests/test-fopen.c
+++ b/tests/test-fopen.c
@@ -1,5 +1,5 @@
/* Test of opening a file stream.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-fopen.h b/tests/test-fopen.h
index 49cbac1..e1e7e17 100644
--- a/tests/test-fopen.h
+++ b/tests/test-fopen.h
@@ -1,5 +1,5 @@
/* Test of opening a file stream.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-fpending.c b/tests/test-fpending.c
index edf1aa2..ca835d2 100644
--- a/tests/test-fpending.c
+++ b/tests/test-fpending.c
@@ -1,6 +1,6 @@
/* Ensure that __fpending works.
- Copyright (C) 2004, 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-fpurge.c b/tests/test-fpurge.c
index 0f36221..da8ddf0 100644
--- a/tests/test-fpurge.c
+++ b/tests/test-fpurge.c
@@ -1,5 +1,5 @@
/* Test of fpurge() function.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-fputc.c b/tests/test-fputc.c
new file mode 100644
index 0000000..e05f641
--- /dev/null
+++ b/tests/test-fputc.c
@@ -0,0 +1,91 @@
+/* Test of fputc() function.
+ 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 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 <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fputc, int, (int, FILE *));
+
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "msvc-inval.h"
+
+#include "macros.h"
+
+int
+main (int argc, char **argv)
+{
+ const char *filename = "test-fputc.txt";
+
+ /* We don't have an fputc() function that installs an invalid parameter
+ handler so far. So install that handler here, explicitly. */
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER \
+ && MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING
+ gl_msvc_inval_ensure_handler ();
+#endif
+
+ /* Test that fputc() on an unbuffered stream sets errno if someone else
+ closes the stream fd behind the back of stdio. */
+ {
+ FILE *fp = fopen (filename, "w");
+ ASSERT (fp != NULL);
+ setvbuf (fp, NULL, _IONBF, 0);
+ ASSERT (close (fileno (fp)) == 0);
+ errno = 0;
+ ASSERT (fputc ('x', fp) == EOF);
+ ASSERT (errno == EBADF);
+ ASSERT (ferror (fp));
+ fclose (fp);
+ }
+
+ /* Test that fputc() on an unbuffered stream sets errno if the stream
+ was constructed with an invalid file descriptor. */
+ {
+ FILE *fp = fdopen (-1, "w");
+ if (fp != NULL)
+ {
+ setvbuf (fp, NULL, _IONBF, 0);
+ errno = 0;
+ ASSERT (fputc ('x', fp) == EOF);
+ ASSERT (errno == EBADF);
+ ASSERT (ferror (fp));
+ fclose (fp);
+ }
+ }
+ {
+ FILE *fp;
+ close (99);
+ fp = fdopen (99, "w");
+ if (fp != NULL)
+ {
+ setvbuf (fp, NULL, _IONBF, 0);
+ errno = 0;
+ ASSERT (fputc ('x', fp) == EOF);
+ ASSERT (errno == EBADF);
+ ASSERT (ferror (fp));
+ fclose (fp);
+ }
+ }
+
+ /* Clean up. */
+ unlink (filename);
+
+ return 0;
+}
diff --git a/tests/test-fread.c b/tests/test-fread.c
new file mode 100644
index 0000000..a807e0a
--- /dev/null
+++ b/tests/test-fread.c
@@ -0,0 +1,100 @@
+/* Test of fread() function.
+ 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 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 <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fread, size_t, (void *, size_t, size_t, FILE *));
+
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "msvc-inval.h"
+
+#include "macros.h"
+
+int
+main (int argc, char **argv)
+{
+ const char *filename = "test-fread.txt";
+
+ /* We don't have an fread() function that installs an invalid parameter
+ handler so far. So install that handler here, explicitly. */
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER \
+ && MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING
+ gl_msvc_inval_ensure_handler ();
+#endif
+
+ /* Prepare a file. */
+ {
+ const char text[] = "hello world";
+ int fd = open (filename, O_RDWR | O_CREAT | O_TRUNC, 0600);
+ ASSERT (fd >= 0);
+ ASSERT (write (fd, text, sizeof (text)) == sizeof (text));
+ ASSERT (close (fd) == 0);
+ }
+
+ /* Test that fread() sets errno if someone else closes the stream
+ fd behind the back of stdio. */
+ {
+ FILE *fp = fopen (filename, "r");
+ char buf[5];
+ ASSERT (fp != NULL);
+ ASSERT (close (fileno (fp)) == 0);
+ errno = 0;
+ ASSERT (fread (buf, 1, sizeof (buf), fp) == 0);
+ ASSERT (errno == EBADF);
+ ASSERT (ferror (fp));
+ fclose (fp);
+ }
+
+ /* Test that fread() sets errno if the stream was constructed with
+ an invalid file descriptor. */
+ {
+ FILE *fp = fdopen (-1, "r");
+ if (fp != NULL)
+ {
+ char buf[1];
+ errno = 0;
+ ASSERT (fread (buf, 1, 1, fp) == 0);
+ ASSERT (errno == EBADF);
+ ASSERT (ferror (fp));
+ fclose (fp);
+ }
+ }
+ {
+ FILE *fp;
+ close (99);
+ fp = fdopen (99, "r");
+ if (fp != NULL)
+ {
+ char buf[1];
+ errno = 0;
+ ASSERT (fread (buf, 1, 1, fp) == 0);
+ ASSERT (errno == EBADF);
+ ASSERT (ferror (fp));
+ fclose (fp);
+ }
+ }
+
+ /* Clean up. */
+ unlink (filename);
+
+ return 0;
+}
diff --git a/tests/test-freadahead.c b/tests/test-freadahead.c
index 23dd21c..121990d 100644
--- a/tests/test-freadahead.c
+++ b/tests/test-freadahead.c
@@ -1,5 +1,5 @@
/* Test of freadahead() function.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-freading.c b/tests/test-freading.c
index 723de4d..ee1556c 100644
--- a/tests/test-freading.c
+++ b/tests/test-freading.c
@@ -1,5 +1,5 @@
/* Test of freading() function.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-frexp.c b/tests/test-frexp.c
index 4ed24d2..6e3e000 100644
--- a/tests/test-frexp.c
+++ b/tests/test-frexp.c
@@ -1,5 +1,5 @@
/* Test of splitting a double into fraction and mantissa.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -27,6 +27,7 @@ SIGNATURE_CHECK (frexp, double, (double, int *));
#include "isnand-nolibm.h"
#include "minus-zero.h"
+#include "infinity.h"
#include "nan.h"
#include "macros.h"
@@ -35,162 +36,32 @@ SIGNATURE_CHECK (frexp, double, (double, int *));
#undef exp
#define exp exponent
-static double
-my_ldexp (double x, int d)
-{
- for (; d > 0; d--)
- x *= 2.0;
- for (; d < 0; d++)
- x *= 0.5;
- return x;
-}
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE double
+/* The use of 'volatile' guarantees that excess precision bits are dropped
+ when dealing with denormalized numbers. It is necessary on x86 systems
+ where double-floats are not IEEE compliant by default, to avoid that the
+ results become platform and compiler option dependent. 'volatile' is a
+ portable alternative to gcc's -ffloat-store option. */
+#define VOLATILE volatile
+#define ISNAN isnand
+#define INFINITY Infinityd ()
+#define NAN NaNd ()
+#define L_(literal) literal
+#define MINUS_ZERO minus_zerod
+#define MAX_EXP DBL_MAX_EXP
+#define MIN_EXP DBL_MIN_EXP
+#define MIN_NORMAL_EXP DBL_MIN_EXP
+#define FREXP frexp
+#define RANDOM randomd
+#include "test-frexp.h"
int
main ()
{
- int i;
- /* The use of 'volatile' guarantees that excess precision bits are dropped
- when dealing with denormalized numbers. It is necessary on x86 systems
- where double-floats are not IEEE compliant by default, to avoid that the
- results become platform and compiler option dependent. 'volatile' is a
- portable alternative to gcc's -ffloat-store option. */
- volatile double x;
-
- { /* NaN. */
- int exp = -9999;
- double mantissa;
- x = NaNd ();
- mantissa = frexp (x, &exp);
- ASSERT (isnand (mantissa));
- }
-
- { /* Positive infinity. */
- int exp = -9999;
- double mantissa;
- x = 1.0 / 0.0;
- mantissa = frexp (x, &exp);
- ASSERT (mantissa == x);
- }
-
- { /* Negative infinity. */
- int exp = -9999;
- double mantissa;
- x = -1.0 / 0.0;
- mantissa = frexp (x, &exp);
- ASSERT (mantissa == x);
- }
-
- { /* Positive zero. */
- int exp = -9999;
- double mantissa;
- x = 0.0;
- mantissa = frexp (x, &exp);
- ASSERT (exp == 0);
- ASSERT (mantissa == x);
- ASSERT (!signbit (mantissa));
- }
-
- { /* Negative zero. */
- int exp = -9999;
- double mantissa;
- x = minus_zerod;
- mantissa = frexp (x, &exp);
- ASSERT (exp == 0);
- ASSERT (mantissa == x);
- ASSERT (signbit (mantissa));
- }
-
- for (i = 1, x = 1.0; i <= DBL_MAX_EXP; i++, x *= 2.0)
- {
- int exp = -9999;
- double mantissa = frexp (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == 0.5);
- }
- for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
- {
- int exp = -9999;
- double mantissa = frexp (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == 0.5);
- }
- for (; i >= DBL_MIN_EXP - 100 && x > 0.0; i--, x *= 0.5)
- {
- int exp = -9999;
- double mantissa = frexp (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == 0.5);
- }
-
- for (i = 1, x = -1.0; i <= DBL_MAX_EXP; i++, x *= 2.0)
- {
- int exp = -9999;
- double mantissa = frexp (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == -0.5);
- }
- for (i = 1, x = -1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
- {
- int exp = -9999;
- double mantissa = frexp (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == -0.5);
- }
- for (; i >= DBL_MIN_EXP - 100 && x < 0.0; i--, x *= 0.5)
- {
- int exp = -9999;
- double mantissa = frexp (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == -0.5);
- }
-
- for (i = 1, x = 1.01; i <= DBL_MAX_EXP; i++, x *= 2.0)
- {
- int exp = -9999;
- double mantissa = frexp (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == 0.505);
- }
- for (i = 1, x = 1.01; i >= DBL_MIN_EXP; i--, x *= 0.5)
- {
- int exp = -9999;
- double mantissa = frexp (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == 0.505);
- }
- for (; i >= DBL_MIN_EXP - 100 && x > 0.0; i--, x *= 0.5)
- {
- int exp = -9999;
- double mantissa = frexp (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa >= 0.5);
- ASSERT (mantissa < 1.0);
- ASSERT (mantissa == my_ldexp (x, - exp));
- }
-
- for (i = 1, x = 1.73205; i <= DBL_MAX_EXP; i++, x *= 2.0)
- {
- int exp = -9999;
- double mantissa = frexp (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == 0.866025);
- }
- for (i = 1, x = 1.73205; i >= DBL_MIN_EXP; i--, x *= 0.5)
- {
- int exp = -9999;
- double mantissa = frexp (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == 0.866025);
- }
- for (; i >= DBL_MIN_EXP - 100 && x > 0.0; i--, x *= 0.5)
- {
- int exp = -9999;
- double mantissa = frexp (x, &exp);
- ASSERT (exp == i || exp == i + 1);
- ASSERT (mantissa >= 0.5);
- ASSERT (mantissa < 1.0);
- ASSERT (mantissa == my_ldexp (x, - exp));
- }
+ test_function ();
return 0;
}
diff --git a/tests/test-frexp.h b/tests/test-frexp.h
new file mode 100644
index 0000000..e50be14
--- /dev/null
+++ b/tests/test-frexp.h
@@ -0,0 +1,179 @@
+/* Test of splitting a double into fraction and mantissa.
+ Copyright (C) 2012-2013 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+static DOUBLE
+my_ldexp (DOUBLE x, int d)
+{
+ for (; d > 0; d--)
+ x *= L_(2.0);
+ for (; d < 0; d++)
+ x *= L_(0.5);
+ return x;
+}
+
+static void
+test_function (void)
+{
+ int i;
+ VOLATILE DOUBLE x;
+
+ { /* NaN. */
+ int exp = -9999;
+ DOUBLE mantissa;
+ x = NAN;
+ mantissa = FREXP (x, &exp);
+ ASSERT (ISNAN (mantissa));
+ }
+
+ { /* Positive infinity. */
+ int exp = -9999;
+ DOUBLE mantissa;
+ x = INFINITY;
+ mantissa = FREXP (x, &exp);
+ ASSERT (mantissa == x);
+ }
+
+ { /* Negative infinity. */
+ int exp = -9999;
+ DOUBLE mantissa;
+ x = - INFINITY;
+ mantissa = FREXP (x, &exp);
+ ASSERT (mantissa == x);
+ }
+
+ { /* Positive zero. */
+ int exp = -9999;
+ DOUBLE mantissa;
+ x = L_(0.0);
+ mantissa = FREXP (x, &exp);
+ ASSERT (exp == 0);
+ ASSERT (mantissa == x);
+ ASSERT (!signbit (mantissa));
+ }
+
+ { /* Negative zero. */
+ int exp = -9999;
+ DOUBLE mantissa;
+ x = MINUS_ZERO;
+ mantissa = FREXP (x, &exp);
+ ASSERT (exp == 0);
+ ASSERT (mantissa == x);
+ ASSERT (signbit (mantissa));
+ }
+
+ for (i = 1, x = L_(1.0); i <= MAX_EXP; i++, x *= L_(2.0))
+ {
+ int exp = -9999;
+ DOUBLE mantissa = FREXP (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == L_(0.5));
+ }
+ for (i = 1, x = L_(1.0); i >= MIN_NORMAL_EXP; i--, x *= L_(0.5))
+ {
+ int exp = -9999;
+ DOUBLE mantissa = FREXP (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == L_(0.5));
+ }
+ for (; i >= MIN_EXP - 100 && x > L_(0.0); i--, x *= L_(0.5))
+ {
+ int exp = -9999;
+ DOUBLE mantissa = FREXP (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == L_(0.5));
+ }
+
+ for (i = 1, x = - L_(1.0); i <= MAX_EXP; i++, x *= L_(2.0))
+ {
+ int exp = -9999;
+ DOUBLE mantissa = FREXP (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == - L_(0.5));
+ }
+ for (i = 1, x = - L_(1.0); i >= MIN_NORMAL_EXP; i--, x *= L_(0.5))
+ {
+ int exp = -9999;
+ DOUBLE mantissa = FREXP (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == - L_(0.5));
+ }
+ for (; i >= MIN_EXP - 100 && x < L_(0.0); i--, x *= L_(0.5))
+ {
+ int exp = -9999;
+ DOUBLE mantissa = FREXP (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == - L_(0.5));
+ }
+
+ for (i = 1, x = L_(1.01); i <= MAX_EXP; i++, x *= L_(2.0))
+ {
+ int exp = -9999;
+ DOUBLE mantissa = FREXP (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == L_(0.505));
+ }
+ for (i = 1, x = L_(1.01); i >= MIN_NORMAL_EXP; i--, x *= L_(0.5))
+ {
+ int exp = -9999;
+ DOUBLE mantissa = FREXP (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == L_(0.505));
+ }
+ for (; i >= MIN_EXP - 100 && x > L_(0.0); i--, x *= L_(0.5))
+ {
+ int exp = -9999;
+ DOUBLE mantissa = FREXP (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa >= L_(0.5));
+ ASSERT (mantissa < L_(1.0));
+ ASSERT (mantissa == my_ldexp (x, - exp));
+ }
+
+ for (i = 1, x = L_(1.73205); i <= MAX_EXP; i++, x *= L_(2.0))
+ {
+ int exp = -9999;
+ DOUBLE mantissa = FREXP (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == L_(0.866025));
+ }
+ for (i = 1, x = L_(1.73205); i >= MIN_NORMAL_EXP; i--, x *= L_(0.5))
+ {
+ int exp = -9999;
+ DOUBLE mantissa = FREXP (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == L_(0.866025));
+ }
+ for (; i >= MIN_EXP - 100 && x > L_(0.0); i--, x *= L_(0.5))
+ {
+ int exp = -9999;
+ DOUBLE mantissa = FREXP (x, &exp);
+ ASSERT (exp == i || exp == i + 1);
+ ASSERT (mantissa >= L_(0.5));
+ ASSERT (mantissa < L_(1.0));
+ ASSERT (mantissa == my_ldexp (x, - exp));
+ }
+
+ /* Randomized tests. */
+ for (i = 0; i < SIZEOF (RANDOM); i++)
+ {
+ x = L_(20.0) * RANDOM[i] - L_(10.0); /* -10.0 <= x <= 10.0 */
+ {
+ int exp = -9999;
+ DOUBLE mantissa = FREXP (x, &exp);
+ ASSERT (x == my_ldexp (mantissa, exp));
+ }
+ }
+}
diff --git a/tests/test-frexpl.c b/tests/test-frexpl.c
index ccb547b..5a5eae5 100644
--- a/tests/test-frexpl.c
+++ b/tests/test-frexpl.c
@@ -1,5 +1,5 @@
/* Test of splitting a 'long double' into fraction and mantissa.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -28,6 +28,7 @@ SIGNATURE_CHECK (frexpl, long double, (long double, int *));
#include "fpucw.h"
#include "isnanl-nolibm.h"
#include "minus-zero.h"
+#include "infinity.h"
#include "nan.h"
#include "macros.h"
@@ -36,6 +37,18 @@ SIGNATURE_CHECK (frexpl, long double, (long double, int *));
#undef exp
#define exp exponent
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE long double
+#define VOLATILE
+#define ISNAN isnanl
+#define INFINITY Infinityl ()
+#define NAN NaNl ()
+#define L_(literal) literal##L
+#define MINUS_ZERO minus_zerol
+#define MAX_EXP LDBL_MAX_EXP
+#define MIN_EXP LDBL_MIN_EXP
/* On MIPS IRIX machines, LDBL_MIN_EXP is -1021, but the smallest reliable
exponent for 'long double' is -964. Similarly, on PowerPC machines,
LDBL_MIN_EXP is -1021, but the smallest reliable exponent for 'long double'
@@ -48,161 +61,18 @@ SIGNATURE_CHECK (frexpl, long double, (long double, int *));
#else
# define MIN_NORMAL_EXP LDBL_MIN_EXP
#endif
-
-static long double
-my_ldexp (long double x, int d)
-{
- for (; d > 0; d--)
- x *= 2.0L;
- for (; d < 0; d++)
- x *= 0.5L;
- return x;
-}
+#define FREXP frexpl
+#define RANDOM randoml
+#include "test-frexp.h"
int
main ()
{
- int i;
- long double x;
DECL_LONG_DOUBLE_ROUNDING
BEGIN_LONG_DOUBLE_ROUNDING ();
- { /* NaN. */
- int exp = -9999;
- long double mantissa;
- x = NaNl ();
- mantissa = frexpl (x, &exp);
- ASSERT (isnanl (mantissa));
- }
-
- { /* Positive infinity. */
- int exp = -9999;
- long double mantissa;
- x = 1.0L / 0.0L;
- mantissa = frexpl (x, &exp);
- ASSERT (mantissa == x);
- }
-
- { /* Negative infinity. */
- int exp = -9999;
- long double mantissa;
- x = -1.0L / 0.0L;
- mantissa = frexpl (x, &exp);
- ASSERT (mantissa == x);
- }
-
- { /* Positive zero. */
- int exp = -9999;
- long double mantissa;
- x = 0.0L;
- mantissa = frexpl (x, &exp);
- ASSERT (exp == 0);
- ASSERT (mantissa == x);
- ASSERT (!signbit (mantissa));
- }
-
- { /* Negative zero. */
- int exp = -9999;
- long double mantissa;
- x = minus_zerol;
- mantissa = frexpl (x, &exp);
- ASSERT (exp == 0);
- ASSERT (mantissa == x);
- ASSERT (signbit (mantissa));
- }
-
- for (i = 1, x = 1.0L; i <= LDBL_MAX_EXP; i++, x *= 2.0L)
- {
- int exp = -9999;
- long double mantissa = frexpl (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == 0.5L);
- }
- for (i = 1, x = 1.0L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L)
- {
- int exp = -9999;
- long double mantissa = frexpl (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == 0.5L);
- }
- for (; i >= LDBL_MIN_EXP - 100 && x > 0.0L; i--, x *= 0.5L)
- {
- int exp = -9999;
- long double mantissa = frexpl (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == 0.5L);
- }
-
- for (i = 1, x = -1.0L; i <= LDBL_MAX_EXP; i++, x *= 2.0L)
- {
- int exp = -9999;
- long double mantissa = frexpl (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == -0.5L);
- }
- for (i = 1, x = -1.0L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L)
- {
- int exp = -9999;
- long double mantissa = frexpl (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == -0.5L);
- }
- for (; i >= LDBL_MIN_EXP - 100 && x < 0.0L; i--, x *= 0.5L)
- {
- int exp = -9999;
- long double mantissa = frexpl (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == -0.5L);
- }
-
- for (i = 1, x = 1.01L; i <= LDBL_MAX_EXP; i++, x *= 2.0L)
- {
- int exp = -9999;
- long double mantissa = frexpl (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == 0.505L);
- }
- for (i = 1, x = 1.01L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L)
- {
- int exp = -9999;
- long double mantissa = frexpl (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == 0.505L);
- }
- for (; i >= LDBL_MIN_EXP - 100 && x > 0.0L; i--, x *= 0.5L)
- {
- int exp = -9999;
- long double mantissa = frexpl (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa >= 0.5L);
- ASSERT (mantissa < 1.0L);
- ASSERT (mantissa == my_ldexp (x, - exp));
- }
-
- for (i = 1, x = 1.73205L; i <= LDBL_MAX_EXP; i++, x *= 2.0L)
- {
- int exp = -9999;
- long double mantissa = frexpl (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == 0.866025L);
- }
- for (i = 1, x = 1.73205L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L)
- {
- int exp = -9999;
- long double mantissa = frexpl (x, &exp);
- ASSERT (exp == i);
- ASSERT (mantissa == 0.866025L);
- }
- for (; i >= LDBL_MIN_EXP - 100 && x > 0.0L; i--, x *= 0.5L)
- {
- int exp = -9999;
- long double mantissa = frexpl (x, &exp);
- ASSERT (exp == i || exp == i + 1);
- ASSERT (mantissa >= 0.5L);
- ASSERT (mantissa < 1.0L);
- ASSERT (mantissa == my_ldexp (x, - exp));
- }
+ test_function ();
return 0;
}
diff --git a/tests/test-fseek.c b/tests/test-fseek.c
new file mode 100644
index 0000000..1b47a8f
--- /dev/null
+++ b/tests/test-fseek.c
@@ -0,0 +1,70 @@
+/* Test of fseek() function.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+ fseek link warning if the user requested GNULIB_POSIXCHECK. */
+#define _GL_NO_LARGE_FILES
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fseek, int, (FILE *, long, int));
+
+#include "macros.h"
+
+#ifndef FUNC_UNGETC_BROKEN
+# define FUNC_UNGETC_BROKEN 0
+#endif
+
+int
+main (int argc, char **argv)
+{
+ /* Assume stdin is non-empty, seekable, and starts with '#!/bin/sh'
+ iff argc > 1. */
+ int expected = argc > 1 ? 0 : -1;
+ ASSERT (fseek (stdin, 0, SEEK_CUR) == expected);
+ if (argc > 1)
+ {
+ /* Test that fseek discards previously read ungetc data. */
+ int ch = fgetc (stdin);
+ ASSERT (ch == '#');
+ ASSERT (ungetc (ch, stdin) == ch);
+ ASSERT (fseek (stdin, 2, SEEK_SET) == 0);
+ ch = fgetc (stdin);
+ ASSERT (ch == '/');
+ if (2 < argc)
+ {
+ if (FUNC_UNGETC_BROKEN)
+ {
+ fputs ("Skipping test: ungetc cannot handle arbitrary bytes\n",
+ stderr);
+ return 77;
+ }
+ /* Test that fseek discards random ungetc data. */
+ ASSERT (ungetc (ch ^ 0xff, stdin) == (ch ^ 0xff));
+ }
+ ASSERT (fseek (stdin, 0, SEEK_END) == 0);
+ ASSERT (fgetc (stdin) == EOF);
+ /* Test that fseek resets end-of-file marker. */
+ ASSERT (feof (stdin));
+ ASSERT (fseek (stdin, 0, SEEK_END) == 0);
+ ASSERT (!feof (stdin));
+ }
+ return 0;
+}
diff --git a/tests/test-fseek.sh b/tests/test-fseek.sh
new file mode 100755
index 0000000..bad6c08
--- /dev/null
+++ b/tests/test-fseek.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+./test-fseek${EXEEXT} 1 < "$srcdir/test-fseek.sh" || exit 1
+echo hi | ./test-fseek${EXEEXT} || exit 1
+exit 0
diff --git a/tests/test-fseek2.sh b/tests/test-fseek2.sh
new file mode 100755
index 0000000..a4c9cb7
--- /dev/null
+++ b/tests/test-fseek2.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec ./test-fseek${EXEEXT} 1 2 < "$srcdir/test-fseek2.sh"
diff --git a/tests/test-fseeko.c b/tests/test-fseeko.c
index ad5eec8..cadbc65 100644
--- a/tests/test-fseeko.c
+++ b/tests/test-fseeko.c
@@ -1,5 +1,5 @@
/* Test of fseeko() function.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-fseeko3.c b/tests/test-fseeko3.c
new file mode 100644
index 0000000..bd0b13a
--- /dev/null
+++ b/tests/test-fseeko3.c
@@ -0,0 +1,51 @@
+/* Test of fseeko() function.
+ 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 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <eblake@redhat.com>, 2011. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include <stdlib.h>
+
+#include "macros.h"
+
+int
+main (int argc, char **argv)
+{
+ int do_initial_ftell = atoi (argv[1]);
+ const char *filename = argv[2];
+ FILE *fp = fopen (filename, "r");
+ ASSERT (fp != NULL);
+
+ if (do_initial_ftell)
+ {
+ off_t pos = ftell (fp);
+ ASSERT (pos == 0);
+ }
+
+ ASSERT (fseeko (fp, 0, SEEK_END) == 0);
+
+ {
+ off_t pos = ftell (fp);
+ ASSERT (pos > 0);
+ }
+
+ ASSERT (fclose (fp) == 0);
+
+ return 0;
+}
diff --git a/tests/test-fseeko3.sh b/tests/test-fseeko3.sh
new file mode 100755
index 0000000..c50b4a2
--- /dev/null
+++ b/tests/test-fseeko3.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+./test-fseeko3${EXEEXT} 0 "$srcdir/test-fseeko3.sh" || exit 1
+
+./test-fseeko3${EXEEXT} 1 "$srcdir/test-fseeko3.sh" || exit 1
+
+exit 0
diff --git a/tests/test-fseeko4.c b/tests/test-fseeko4.c
new file mode 100644
index 0000000..8d6d58a
--- /dev/null
+++ b/tests/test-fseeko4.c
@@ -0,0 +1,73 @@
+/* Test of fseeko() function.
+ 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 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include <errno.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+int
+main (int argc, char **argv)
+{
+ const char *filename = argv[1];
+
+ /* Test that fseeko() sets errno if someone else closes the stream
+ fd behind the back of stdio. */
+ {
+ FILE *fp = fopen (filename, "r");
+ ASSERT (fp != NULL);
+ setvbuf (fp, NULL, _IONBF, 0);
+ ASSERT (ftell (fp) == 0);
+ ASSERT (fseeko (fp, 0, SEEK_END) == 0);
+ ASSERT (ftell (fp) > 0);
+ ASSERT (close (fileno (fp)) == 0);
+ errno = 0;
+ ASSERT (fseeko (fp, 0, SEEK_SET) == -1);
+ ASSERT (errno == EBADF);
+ fclose (fp);
+ }
+
+ /* Test that fseeko() sets errno if the stream was constructed with
+ an invalid file descriptor. */
+ {
+ FILE *fp = fdopen (-1, "w");
+ if (fp != NULL)
+ {
+ errno = 0;
+ ASSERT (fseeko (fp, 0, SEEK_END) == -1);
+ ASSERT (errno == EBADF);
+ fclose (fp);
+ }
+ }
+ {
+ FILE *fp;
+ close (99);
+ fp = fdopen (99, "w");
+ if (fp != NULL)
+ {
+ errno = 0;
+ ASSERT (fseeko (fp, 0, SEEK_END) == -1);
+ ASSERT (errno == EBADF);
+ fclose (fp);
+ }
+ }
+
+ return 0;
+}
diff --git a/tests/test-fseeko4.sh b/tests/test-fseeko4.sh
new file mode 100755
index 0000000..e6464ae
--- /dev/null
+++ b/tests/test-fseeko4.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+./test-fseeko4${EXEEXT} "$srcdir/test-fseeko4.sh" || exit 1
+
+exit 0
diff --git a/tests/test-fstat.c b/tests/test-fstat.c
new file mode 100644
index 0000000..8ce1527
--- /dev/null
+++ b/tests/test-fstat.c
@@ -0,0 +1,50 @@
+/* Tests of fstat() function.
+ 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 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <sys/stat.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fstat, int, (int, struct stat *));
+
+#include <errno.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+ /* Test behaviour for invalid file descriptors. */
+ {
+ struct stat statbuf;
+
+ errno = 0;
+ ASSERT (fstat (-1, &statbuf) == -1);
+ ASSERT (errno == EBADF);
+ }
+ {
+ struct stat statbuf;
+
+ close (99);
+ errno = 0;
+ ASSERT (fstat (99, &statbuf) == -1);
+ ASSERT (errno == EBADF);
+ }
+
+ return 0;
+}
diff --git a/tests/test-ftell.c b/tests/test-ftell.c
index 54ede05..d30c492 100644
--- a/tests/test-ftell.c
+++ b/tests/test-ftell.c
@@ -1,5 +1,5 @@
/* Test of ftell() function.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-ftell3.c b/tests/test-ftell3.c
index a5167ef..17968e3 100644
--- a/tests/test-ftell3.c
+++ b/tests/test-ftell3.c
@@ -1,5 +1,5 @@
/* Test of ftell() function.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-ftello.c b/tests/test-ftello.c
index 636da81..e5a2b25 100644
--- a/tests/test-ftello.c
+++ b/tests/test-ftello.c
@@ -1,5 +1,5 @@
/* Test of ftello() function.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-ftello3.c b/tests/test-ftello3.c
index 50d4b88..a771430 100644
--- a/tests/test-ftello3.c
+++ b/tests/test-ftello3.c
@@ -1,5 +1,5 @@
/* Test of ftello() function.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-ftello4.c b/tests/test-ftello4.c
new file mode 100644
index 0000000..b8cd679
--- /dev/null
+++ b/tests/test-ftello4.c
@@ -0,0 +1,70 @@
+/* Test of ftello() function.
+ 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 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include <errno.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+int
+main (int argc, char **argv)
+{
+ const char *filename = argv[1];
+
+ /* Test that ftello() sets errno if someone else closes the stream
+ fd behind the back of stdio. */
+ {
+ FILE *fp = fopen (filename, "r");
+ ASSERT (fp != NULL);
+ setvbuf (fp, NULL, _IONBF, 0);
+ ASSERT (close (fileno (fp)) == 0);
+ errno = 0;
+ ASSERT (ftello (fp) == (off_t)-1);
+ ASSERT (errno == EBADF);
+ fclose (fp);
+ }
+
+ /* Test that ftello() sets errno if the stream was constructed with
+ an invalid file descriptor. */
+ {
+ FILE *fp = fdopen (-1, "w");
+ if (fp != NULL)
+ {
+ errno = 0;
+ ASSERT (ftello (fp) == (off_t)-1);
+ ASSERT (errno == EBADF);
+ fclose (fp);
+ }
+ }
+ {
+ FILE *fp;
+ close (99);
+ fp = fdopen (99, "w");
+ if (fp != NULL)
+ {
+ errno = 0;
+ ASSERT (ftello (fp) == (off_t)-1);
+ ASSERT (errno == EBADF);
+ fclose (fp);
+ }
+ }
+
+ return 0;
+}
diff --git a/tests/test-ftello4.sh b/tests/test-ftello4.sh
new file mode 100755
index 0000000..e3702bb
--- /dev/null
+++ b/tests/test-ftello4.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+./test-ftello4${EXEEXT} "$srcdir/test-ftello4.sh" || exit 1
+
+exit 0
diff --git a/tests/test-fwrite.c b/tests/test-fwrite.c
new file mode 100644
index 0000000..ef72338
--- /dev/null
+++ b/tests/test-fwrite.c
@@ -0,0 +1,94 @@
+/* Test of fwrite() function.
+ 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 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 <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fwrite, size_t, (const void *, size_t, size_t, FILE *));
+
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "msvc-inval.h"
+
+#include "macros.h"
+
+int
+main (int argc, char **argv)
+{
+ const char *filename = "test-fwrite.txt";
+
+ /* We don't have an fwrite() function that installs an invalid parameter
+ handler so far. So install that handler here, explicitly. */
+#if HAVE_MSVC_INVALID_PARAMETER_HANDLER \
+ && MSVC_INVALID_PARAMETER_HANDLING == DEFAULT_HANDLING
+ gl_msvc_inval_ensure_handler ();
+#endif
+
+ /* Test that fwrite() on an unbuffered stream sets errno if someone else
+ closes the stream fd behind the back of stdio. */
+ {
+ FILE *fp = fopen (filename, "w");
+ char buf[5] = "world";
+ ASSERT (fp != NULL);
+ setvbuf (fp, NULL, _IONBF, 0);
+ ASSERT (close (fileno (fp)) == 0);
+ errno = 0;
+ ASSERT (fwrite (buf, 1, sizeof (buf), fp) == 0);
+ ASSERT (errno == EBADF);
+ ASSERT (ferror (fp));
+ fclose (fp);
+ }
+
+ /* Test that fwrite() on an unbuffered stream sets errno if the stream
+ was constructed with an invalid file descriptor. */
+ {
+ FILE *fp = fdopen (-1, "w");
+ if (fp != NULL)
+ {
+ char buf[5] = "world";
+ setvbuf (fp, NULL, _IONBF, 0);
+ errno = 0;
+ ASSERT (fwrite (buf, 1, sizeof (buf), fp) == 0);
+ ASSERT (errno == EBADF);
+ ASSERT (ferror (fp));
+ fclose (fp);
+ }
+ }
+ {
+ FILE *fp;
+ close (99);
+ fp = fdopen (99, "w");
+ if (fp != NULL)
+ {
+ char buf[5] = "world";
+ setvbuf (fp, NULL, _IONBF, 0);
+ errno = 0;
+ ASSERT (fwrite (buf, 1, sizeof (buf), fp) == 0);
+ ASSERT (errno == EBADF);
+ ASSERT (ferror (fp));
+ fclose (fp);
+ }
+ }
+
+ /* Clean up. */
+ unlink (filename);
+
+ return 0;
+}
diff --git a/tests/test-getcwd-lgpl.c b/tests/test-getcwd-lgpl.c
new file mode 100644
index 0000000..e3e7b7a
--- /dev/null
+++ b/tests/test-getcwd-lgpl.c
@@ -0,0 +1,102 @@
+/* Test of getcwd() function.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (getcwd, char *, (char *, size_t));
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main (int argc, char **argv)
+{
+ char *pwd1;
+ char *pwd2;
+ /* If the user provides an argument, attempt to chdir there first. */
+ if (1 < argc)
+ {
+ if (chdir (argv[1]) == 0)
+ printf ("changed to directory %s\n", argv[1]);
+ }
+
+ pwd1 = getcwd (NULL, 0);
+ ASSERT (pwd1 && *pwd1);
+ if (1 < argc)
+ printf ("cwd=%s\n", pwd1);
+
+ /* Make sure the result is usable. */
+ ASSERT (chdir (pwd1) == 0);
+ ASSERT (chdir (".//./.") == 0);
+
+ /* Make sure that result is normalized. */
+ pwd2 = getcwd (NULL, 0);
+ ASSERT (pwd2);
+ ASSERT (strcmp (pwd1, pwd2) == 0);
+ free (pwd2);
+ {
+ size_t len = strlen (pwd1);
+ ssize_t i = len - 10;
+ if (i < 1)
+ i = 1;
+ pwd2 = getcwd (NULL, len + 1);
+ ASSERT (pwd2);
+ free (pwd2);
+ pwd2 = malloc (len + 2);
+ for ( ; i <= len; i++)
+ {
+ char *tmp;
+ errno = 0;
+ ASSERT (getcwd (pwd2, i) == NULL);
+ ASSERT (errno == ERANGE);
+ /* Allow either glibc or BSD behavior, since POSIX allows both. */
+ errno = 0;
+ tmp = getcwd (NULL, i);
+ if (tmp)
+ {
+ ASSERT (strcmp (pwd1, tmp) == 0);
+ free (tmp);
+ }
+ else
+ {
+ ASSERT (errno == ERANGE);
+ }
+ }
+ ASSERT (getcwd (pwd2, len + 1) == pwd2);
+ pwd2[len] = '/';
+ pwd2[len + 1] = '\0';
+ }
+ ASSERT (strstr (pwd2, "/./") == NULL);
+ ASSERT (strstr (pwd2, "/../") == NULL);
+ ASSERT (strstr (pwd2 + 1 + (pwd2[1] == '/'), "//") == NULL);
+
+ /* Validate a POSIX requirement on size. */
+ errno = 0;
+ ASSERT (getcwd(pwd2, 0) == NULL);
+ ASSERT (errno == EINVAL);
+
+ free (pwd1);
+ free (pwd2);
+
+ return 0;
+}
diff --git a/tests/test-getdtablesize.c b/tests/test-getdtablesize.c
index ae969a1..7046481 100644
--- a/tests/test-getdtablesize.c
+++ b/tests/test-getdtablesize.c
@@ -1,5 +1,5 @@
/* Test of getdtablesize() function.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-getopt.c b/tests/test-getopt.c
index 69f2cfa..7caf027 100644
--- a/tests/test-getopt.c
+++ b/tests/test-getopt.c
@@ -1,5 +1,5 @@
/* Test of command line argument processing.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-getopt.h b/tests/test-getopt.h
index 9c877b3..450cf0d 100644
--- a/tests/test-getopt.h
+++ b/tests/test-getopt.h
@@ -1,5 +1,5 @@
/* Test of command line argument processing.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -1365,5 +1365,27 @@ test_getopt (void)
ASSERT (optind == 3);
ASSERT (!output);
}
+
+ /* Check that 'W' does not dump core:
+ http://sourceware.org/bugzilla/show_bug.cgi?id=12922
+ Technically, POSIX says the presence of ';' in the opt-string
+ gives unspecified behavior, so we only test this when GNU compliance
+ is desired. */
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int argc = 0;
+ const char *argv[10];
+ int pos = ftell (stderr);
+
+ argv[argc++] = "program";
+ argv[argc++] = "-W";
+ argv[argc++] = "dummy";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ ASSERT (getopt (argc, (char **) argv, "W;") == 'W');
+ ASSERT (ftell (stderr) == pos);
+ ASSERT (optind == 2);
+ }
#endif /* GNULIB_TEST_GETOPT_GNU */
}
diff --git a/tests/test-getopt_long.h b/tests/test-getopt_long.h
index 7a74867..345a796 100644
--- a/tests/test-getopt_long.h
+++ b/tests/test-getopt_long.h
@@ -1,5 +1,5 @@
/* Test of command line argument processing.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -314,6 +314,25 @@ test_getopt_long (void)
}
}
+ /* Test that 'W' does not dump core:
+ http://sourceware.org/bugzilla/show_bug.cgi?id=12922 */
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-W";
+ argv[argc++] = "dummy";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long (argc, argv, "W;", NULL, &option_index);
+ ASSERT (c == 'W');
+ ASSERT (optind == 2);
+ }
+
/* Test processing of boolean short options. */
for (start = 0; start <= 1; start++)
{
diff --git a/tests/test-gettimeofday.c b/tests/test-gettimeofday.c
index 7d09fc3..2c60876 100644
--- a/tests/test-gettimeofday.c
+++ b/tests/test-gettimeofday.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc.
+ * Copyright (C) 2005, 2007, 2009-2013 Free Software Foundation, Inc.
* Written by Jim Meyering.
*
* This program is free software: you can redistribute it and/or modify
diff --git a/tests/test-ignore-value.c b/tests/test-ignore-value.c
index 501f79c..cb4cf14 100644
--- a/tests/test-ignore-value.c
+++ b/tests/test-ignore-value.c
@@ -1,6 +1,6 @@
/* Test the "ignore-value" module.
- Copyright (C) 2011 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
#include <stdio.h>
#ifndef _GL_ATTRIBUTE_RETURN_CHECK
-# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 1)
+# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4)
# define _GL_ATTRIBUTE_RETURN_CHECK
# else
# define _GL_ATTRIBUTE_RETURN_CHECK __attribute__((__warn_unused_result__))
diff --git a/tests/test-init.sh b/tests/test-init.sh
new file mode 100755
index 0000000..6eb6b43
--- /dev/null
+++ b/tests/test-init.sh
@@ -0,0 +1,73 @@
+#!/bin/sh
+# Unit tests for init.sh
+# Copyright (C) 2011-2013 Free Software Foundation, Inc.
+# This file is part of the GNUlib Library.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+: ${srcdir=.}
+. "$srcdir/init.sh"; path_prepend_ .
+
+fail=0
+
+test_compare()
+{
+ touch empty || fail=1
+ echo xyz > in || fail=1
+
+ compare /dev/null /dev/null >out 2>err || fail=1
+ test -s out && fail_ "out not empty: $(cat out)"
+ # "err" should be empty, too, but has "set -x" output when VERBOSE=yes
+ case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac
+
+ compare /dev/null empty >out 2>err || fail=1
+ test -s out && fail_ "out not empty: $(cat out)"
+ case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac
+
+ compare in in >out 2>err || fail=1
+ test -s out && fail_ "out not empty: $(cat out)"
+ case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac
+
+ compare /dev/null in >out 2>err && fail=1
+ cat <<\EOF > exp
+diff -u /dev/null in
+--- /dev/null 1970-01-01
++++ in 1970-01-01
++xyz
+EOF
+ compare exp out || fail=1
+ case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac
+
+ compare empty in >out 2>err && fail=1
+ # Compare against expected output only if compare is using diff -u.
+ if grep @ out >/dev/null; then
+ # Remove the TAB-date suffix on each --- and +++ line,
+ # for both the expected and the actual output files.
+ # Also remove the @@ line, since Solaris 5.10 and GNU diff formats differ:
+ # -@@ -0,0 +1 @@
+ # +@@ -1,0 +1,1 @@
+ sed 's/ .*//;/^@@/d' out > k && mv k out
+ cat <<\EOF > exp
+--- empty
++++ in
++xyz
+EOF
+ compare exp out || fail=1
+ fi
+ case $- in *x*) ;; *) test -s err && fail_ "err not empty: $(cat err)";; esac
+}
+
+test_compare
+
+Exit $fail
diff --git a/tests/test-intprops.c b/tests/test-intprops.c
new file mode 100644
index 0000000..8b91a79
--- /dev/null
+++ b/tests/test-intprops.c
@@ -0,0 +1,275 @@
+/* Test intprops.h.
+ 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 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by 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 <config.h>
+
+#include "intprops.h"
+#include "verify.h"
+
+#include <stdbool.h>
+#include <inttypes.h>
+
+#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
+ <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00401.html>. */
+#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_<op>_RANGE_OVERFLOW tests are equally valid as
+ INT_<op>_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_<op>_RANGE_OVERFLOW, INT_<op>_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_<op>_OVERFLOW with mixed types. */
+ #define CHECK_SUM(a, b, overflow) \
+ VERIFY (INT_ADD_OVERFLOW (a, b) == (overflow)); \
+ VERIFY (INT_ADD_OVERFLOW (b, a) == (overflow))
+ CHECK_SUM (-1, LONG_MIN, true);
+ CHECK_SUM (-1, UINT_MAX, false);
+ CHECK_SUM (-1L, INT_MIN, INT_MIN == LONG_MIN);
+ CHECK_SUM (0u, -1, true);
+ CHECK_SUM (0u, 0, false);
+ CHECK_SUM (0u, 1, false);
+ CHECK_SUM (1, LONG_MAX, true);
+ CHECK_SUM (1, UINT_MAX, true);
+ CHECK_SUM (1L, INT_MAX, INT_MAX == LONG_MAX);
+ CHECK_SUM (1u, INT_MAX, INT_MAX == UINT_MAX);
+ CHECK_SUM (1u, INT_MIN, true);
+
+ VERIFY (! INT_SUBTRACT_OVERFLOW (INT_MAX, 1u));
+ VERIFY (! INT_SUBTRACT_OVERFLOW (UINT_MAX, 1));
+ VERIFY (! INT_SUBTRACT_OVERFLOW (0u, -1));
+ VERIFY (INT_SUBTRACT_OVERFLOW (UINT_MAX, -1));
+ VERIFY (INT_SUBTRACT_OVERFLOW (INT_MIN, 1u));
+ VERIFY (INT_SUBTRACT_OVERFLOW (-1, 0u));
+
+ #define CHECK_PRODUCT(a, b, overflow) \
+ VERIFY (INT_MULTIPLY_OVERFLOW (a, b) == (overflow)); \
+ VERIFY (INT_MULTIPLY_OVERFLOW (b, a) == (overflow))
+
+ CHECK_PRODUCT (-1, 1u, true);
+ CHECK_PRODUCT (-1, INT_MIN, INT_NEGATE_OVERFLOW (INT_MIN));
+ CHECK_PRODUCT (-1, UINT_MAX, true);
+ CHECK_PRODUCT (-12345, LONG_MAX / -12345 - 1, true);
+ CHECK_PRODUCT (-12345, LONG_MAX / -12345, false);
+ CHECK_PRODUCT (0, -1, false);
+ CHECK_PRODUCT (0, 0, false);
+ CHECK_PRODUCT (0, 0u, false);
+ CHECK_PRODUCT (0, 1, false);
+ CHECK_PRODUCT (0, INT_MAX, false);
+ CHECK_PRODUCT (0, INT_MIN, false);
+ CHECK_PRODUCT (0, UINT_MAX, false);
+ CHECK_PRODUCT (0u, -1, false);
+ CHECK_PRODUCT (0u, 0, false);
+ CHECK_PRODUCT (0u, 0u, false);
+ CHECK_PRODUCT (0u, 1, false);
+ CHECK_PRODUCT (0u, INT_MAX, false);
+ CHECK_PRODUCT (0u, INT_MIN, false);
+ CHECK_PRODUCT (0u, UINT_MAX, false);
+ CHECK_PRODUCT (1, INT_MAX, false);
+ CHECK_PRODUCT (1, INT_MIN, false);
+ CHECK_PRODUCT (1, UINT_MAX, false);
+ CHECK_PRODUCT (1u, INT_MIN, true);
+ CHECK_PRODUCT (1u, INT_MAX, UINT_MAX < INT_MAX);
+ CHECK_PRODUCT (INT_MAX, UINT_MAX, true);
+ CHECK_PRODUCT (INT_MAX, ULONG_MAX, true);
+ CHECK_PRODUCT (INT_MIN, LONG_MAX / INT_MIN - 1, true);
+ CHECK_PRODUCT (INT_MIN, LONG_MAX / INT_MIN, false);
+ CHECK_PRODUCT (INT_MIN, UINT_MAX, true);
+ CHECK_PRODUCT (INT_MIN, ULONG_MAX, true);
+
+ VERIFY (INT_DIVIDE_OVERFLOW (INT_MIN, -1L)
+ == (TYPE_TWOS_COMPLEMENT (long int) && INT_MIN == LONG_MIN));
+ VERIFY (! INT_DIVIDE_OVERFLOW (INT_MIN, UINT_MAX));
+ VERIFY (! INT_DIVIDE_OVERFLOW (INTMAX_MIN, UINTMAX_MAX));
+ VERIFY (! INT_DIVIDE_OVERFLOW (INTMAX_MIN, UINT_MAX));
+ VERIFY (INT_DIVIDE_OVERFLOW (-11, 10u));
+ VERIFY (INT_DIVIDE_OVERFLOW (-10, 10u));
+ VERIFY (! INT_DIVIDE_OVERFLOW (-9, 10u));
+ VERIFY (INT_DIVIDE_OVERFLOW (11u, -10));
+ VERIFY (INT_DIVIDE_OVERFLOW (10u, -10));
+ VERIFY (! INT_DIVIDE_OVERFLOW (9u, -10));
+
+ VERIFY (INT_REMAINDER_OVERFLOW (INT_MIN, -1L)
+ == (TYPE_TWOS_COMPLEMENT (long int) && INT_MIN == LONG_MIN));
+ VERIFY (INT_REMAINDER_OVERFLOW (-1, UINT_MAX));
+ VERIFY (INT_REMAINDER_OVERFLOW ((intmax_t) -1, UINTMAX_MAX));
+ VERIFY (INT_REMAINDER_OVERFLOW (INTMAX_MIN, UINT_MAX)
+ == (INTMAX_MAX < UINT_MAX
+ && - (unsigned int) INTMAX_MIN % UINT_MAX != 0));
+ VERIFY (INT_REMAINDER_OVERFLOW (INT_MIN, ULONG_MAX)
+ == (INT_MIN % ULONG_MAX != 1));
+ VERIFY (! INT_REMAINDER_OVERFLOW (1u, -1));
+ VERIFY (! INT_REMAINDER_OVERFLOW (37*39u, -39));
+ VERIFY (INT_REMAINDER_OVERFLOW (37*39u + 1, -39));
+ VERIFY (INT_REMAINDER_OVERFLOW (37*39u - 1, -39));
+ VERIFY (! INT_REMAINDER_OVERFLOW (LONG_MAX, -INT_MAX));
+
+ return 0;
+}
diff --git a/tests/test-inttypes.c b/tests/test-inttypes.c
new file mode 100644
index 0000000..db1a97e
--- /dev/null
+++ b/tests/test-inttypes.c
@@ -0,0 +1,118 @@
+/* Test of <inttypes.h> substitute.
+ Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <inttypes.h>
+
+#include <stddef.h>
+
+/* 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/tests/test-isnand-nolibm.c b/tests/test-isnand-nolibm.c
index d120459..2d57d07 100644
--- a/tests/test-isnand-nolibm.c
+++ b/tests/test-isnand-nolibm.c
@@ -1,5 +1,5 @@
/* Test of isnand() substitute.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,4 +19,3 @@
#include "isnand-nolibm.h"
#include "test-isnand.h"
-
diff --git a/tests/test-isnand.h b/tests/test-isnand.h
index de69331..7ea72e9 100644
--- a/tests/test-isnand.h
+++ b/tests/test-isnand.h
@@ -1,5 +1,5 @@
/* Test of isnand() substitute.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,6 +19,7 @@
#include <limits.h>
#include "minus-zero.h"
+#include "infinity.h"
#include "nan.h"
#include "macros.h"
@@ -35,8 +36,8 @@ main ()
ASSERT (!isnand (0.0));
ASSERT (!isnand (minus_zerod));
/* Infinite values. */
- ASSERT (!isnand (1.0 / 0.0));
- ASSERT (!isnand (-1.0 / 0.0));
+ ASSERT (!isnand (Infinityd ()));
+ ASSERT (!isnand (- Infinityd ()));
/* Quiet NaN. */
ASSERT (isnand (NaNd ()));
#if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT
diff --git a/tests/test-isnanf-nolibm.c b/tests/test-isnanf-nolibm.c
index 6d720be..924dccb 100644
--- a/tests/test-isnanf-nolibm.c
+++ b/tests/test-isnanf-nolibm.c
@@ -1,5 +1,5 @@
/* Test of isnanf() substitute.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-isnanf.h b/tests/test-isnanf.h
index f4b0e86..60499b5 100644
--- a/tests/test-isnanf.h
+++ b/tests/test-isnanf.h
@@ -1,5 +1,5 @@
/* Test of isnanf() substitute.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,6 +19,7 @@
#include <limits.h>
#include "minus-zero.h"
+#include "infinity.h"
#include "nan.h"
#include "macros.h"
@@ -35,8 +36,8 @@ main ()
ASSERT (!isnanf (0.0f));
ASSERT (!isnanf (minus_zerof));
/* Infinite values. */
- ASSERT (!isnanf (1.0f / 0.0f));
- ASSERT (!isnanf (-1.0f / 0.0f));
+ ASSERT (!isnanf (Infinityf ()));
+ ASSERT (!isnanf (- Infinityf ()));
/* Quiet NaN. */
ASSERT (isnanf (NaNf ()));
#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
diff --git a/tests/test-isnanl-nolibm.c b/tests/test-isnanl-nolibm.c
index 5322087..8f44de2 100644
--- a/tests/test-isnanl-nolibm.c
+++ b/tests/test-isnanl-nolibm.c
@@ -1,5 +1,5 @@
/* Test of isnanl() substitute.
- Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-isnanl.h b/tests/test-isnanl.h
index c07f3a9..06e6a7c 100644
--- a/tests/test-isnanl.h
+++ b/tests/test-isnanl.h
@@ -1,5 +1,5 @@
/* Test of isnanl() substitute.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -20,6 +20,7 @@
#include <limits.h>
#include "minus-zero.h"
+#include "infinity.h"
#include "nan.h"
#include "macros.h"
@@ -41,8 +42,8 @@ main ()
ASSERT (!isnanl (0.0L));
ASSERT (!isnanl (minus_zerol));
/* Infinite values. */
- ASSERT (!isnanl (1.0L / 0.0L));
- ASSERT (!isnanl (-1.0L / 0.0L));
+ ASSERT (!isnanl (Infinityl ()));
+ ASSERT (!isnanl (- Infinityl ()));
/* Quiet NaN. */
ASSERT (isnanl (NaNl ()));
@@ -64,7 +65,7 @@ main ()
}
#endif
-#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
/* Representation of an 80-bit 'long double' as an initializer for a sequence
of 'unsigned int' words. */
# ifdef WORDS_BIGENDIAN
diff --git a/tests/test-langinfo-c++.cc b/tests/test-langinfo-c++.cc
index 8d0af71..acd1823 100644
--- a/tests/test-langinfo-c++.cc
+++ b/tests/test-langinfo-c++.cc
@@ -1,5 +1,5 @@
/* Test of <langinfo.h> substitute in C++ mode.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-langinfo.c b/tests/test-langinfo.c
index ade807c..44e931e 100644
--- a/tests/test-langinfo.c
+++ b/tests/test-langinfo.c
@@ -1,5 +1,5 @@
/* Test of <langinfo.h> substitute.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-link.c b/tests/test-link.c
index cbb4e0b..934dddb 100644
--- a/tests/test-link.c
+++ b/tests/test-link.c
@@ -1,5 +1,5 @@
/* Test of link() function.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-link.h b/tests/test-link.h
index 5898285..d546d56 100644
--- a/tests/test-link.h
+++ b/tests/test-link.h
@@ -1,5 +1,5 @@
/* Test of link() function.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -115,10 +115,10 @@ test_link (int (*func) (char const *, char const *), bool print)
ASSERT (errno == ENOENT);
errno = 0;
ASSERT (func (BASE "a/", BASE "c") == -1);
- ASSERT (errno == ENOTDIR);
+ ASSERT (errno == ENOTDIR || errno == EINVAL);
errno = 0;
ASSERT (func (BASE "a", BASE "c/") == -1);
- ASSERT (errno == ENOTDIR || errno == ENOENT);
+ ASSERT (errno == ENOTDIR || errno == ENOENT || errno == EINVAL);
/* Most platforms reject hard links to directories, and even on
those that do permit it, most users can't create them. We assume
@@ -136,13 +136,15 @@ test_link (int (*func) (char const *, char const *), bool print)
else
{
/* Most everyone else. */
- ASSERT (errno == EPERM || errno == EACCES);
+ ASSERT (errno == EPERM || errno == EACCES || errno == EISDIR);
errno = 0;
ASSERT (func (BASE "d/.", BASE "c") == -1);
- ASSERT (errno == EPERM || errno == EACCES || errno == EINVAL);
+ ASSERT (errno == EPERM || errno == EACCES || errno == EISDIR
+ || errno == EINVAL);
errno = 0;
ASSERT (func (BASE "d/.//", BASE "c") == -1);
- ASSERT (errno == EPERM || errno == EACCES || errno == EINVAL);
+ ASSERT (errno == EPERM || errno == EACCES || errno == EISDIR
+ || errno == EINVAL);
}
}
ASSERT (unlink (BASE "a") == 0);
@@ -162,11 +164,15 @@ test_link (int (*func) (char const *, char const *), bool print)
}
errno = 0;
ASSERT (func (BASE "b", BASE "link/") == -1);
- ASSERT (errno == ENOTDIR || errno == ENOENT || errno == EEXIST);
+ ASSERT (errno == ENOTDIR || errno == ENOENT || errno == EEXIST
+ || errno == EINVAL);
+ errno = 0;
+ ASSERT (func (BASE "b", BASE "link") == -1);
+ ASSERT (errno == EEXIST);
ASSERT (rename (BASE "b", BASE "a") == 0);
errno = 0;
ASSERT (func (BASE "link/", BASE "b") == -1);
- ASSERT (errno == ENOTDIR || errno == EEXIST);
+ ASSERT (errno == ENOTDIR || errno == EEXIST || errno == EINVAL);
/* Clean up. */
ASSERT (unlink (BASE "a") == 0);
diff --git a/tests/test-linkedhash_list.c b/tests/test-linkedhash_list.c
index b462ca6..81fde4b 100644
--- a/tests/test-linkedhash_list.c
+++ b/tests/test-linkedhash_list.c
@@ -1,5 +1,5 @@
/* Test of sequential list data type implementation.
- Copyright (C) 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
diff --git a/tests/test-locale-c++.cc b/tests/test-locale-c++.cc
index 06b9a32..7d9c995 100644
--- a/tests/test-locale-c++.cc
+++ b/tests/test-locale-c++.cc
@@ -1,5 +1,5 @@
/* Test of <locale.h> substitute in C++ mode.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-locale-c++2.cc b/tests/test-locale-c++2.cc
index cdc31e8..8f254cb 100644
--- a/tests/test-locale-c++2.cc
+++ b/tests/test-locale-c++2.cc
@@ -1,5 +1,5 @@
/* Test of <locale.h> substitute in C++ mode.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-locale.c b/tests/test-locale.c
index 9b55e37..3fb7b85 100644
--- a/tests/test-locale.c
+++ b/tests/test-locale.c
@@ -1,5 +1,5 @@
/* Test of <locale.h> substitute.
- Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -38,6 +38,10 @@ int a[] =
locale_t b = LC_GLOBAL_LOCALE;
#endif
+/* Check that the 'struct lconv' type is defined. */
+struct lconv l;
+int ls;
+
/* Check that NULL can be passed through varargs as a pointer type,
per POSIX 2008. */
verify (sizeof NULL == sizeof (void *));
@@ -45,5 +49,31 @@ verify (sizeof NULL == sizeof (void *));
int
main ()
{
+ /* Check that 'struct lconv' has the ISO C and POSIX specified members. */
+ ls += sizeof (*l.decimal_point);
+ ls += sizeof (*l.thousands_sep);
+ ls += sizeof (*l.grouping);
+ ls += sizeof (*l.mon_decimal_point);
+ ls += sizeof (*l.mon_thousands_sep);
+ ls += sizeof (*l.mon_grouping);
+ ls += sizeof (*l.positive_sign);
+ ls += sizeof (*l.negative_sign);
+ ls += sizeof (*l.currency_symbol);
+ ls += sizeof (l.frac_digits);
+ ls += sizeof (l.p_cs_precedes);
+ ls += sizeof (l.p_sign_posn);
+ ls += sizeof (l.p_sep_by_space);
+ ls += sizeof (l.n_cs_precedes);
+ ls += sizeof (l.n_sign_posn);
+ ls += sizeof (l.n_sep_by_space);
+ ls += sizeof (*l.int_curr_symbol);
+ ls += sizeof (l.int_frac_digits);
+ ls += sizeof (l.int_p_cs_precedes);
+ ls += sizeof (l.int_p_sign_posn);
+ ls += sizeof (l.int_p_sep_by_space);
+ ls += sizeof (l.int_n_cs_precedes);
+ ls += sizeof (l.int_n_sign_posn);
+ ls += sizeof (l.int_n_sep_by_space);
+
return 0;
}
diff --git a/tests/test-localeconv.c b/tests/test-localeconv.c
new file mode 100644
index 0000000..da3344f
--- /dev/null
+++ b/tests/test-localeconv.c
@@ -0,0 +1,72 @@
+/* Test of localeconv() function.
+ Copyright (C) 2012-2013 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2012. */
+
+#include <config.h>
+
+#include <locale.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (localeconv, struct lconv *, (void));
+
+#include <limits.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main ()
+{
+ /* Test localeconv() result in the "C" locale. */
+ {
+ struct lconv *l = localeconv ();
+
+ ASSERT (STREQ (l->decimal_point, "."));
+ ASSERT (STREQ (l->thousands_sep, ""));
+#if !(defined __FreeBSD__ || defined __sun)
+ ASSERT (STREQ (l->grouping, ""));
+#endif
+
+ ASSERT (STREQ (l->mon_decimal_point, ""));
+ ASSERT (STREQ (l->mon_thousands_sep, ""));
+#if !(defined __FreeBSD__ || defined __sun)
+ ASSERT (STREQ (l->mon_grouping, ""));
+#endif
+ ASSERT (STREQ (l->positive_sign, ""));
+ ASSERT (STREQ (l->negative_sign, ""));
+
+ ASSERT (STREQ (l->currency_symbol, ""));
+ ASSERT (l->frac_digits == CHAR_MAX);
+ ASSERT (l->p_cs_precedes == CHAR_MAX);
+ ASSERT (l->p_sign_posn == CHAR_MAX);
+ ASSERT (l->p_sep_by_space == CHAR_MAX);
+ ASSERT (l->n_cs_precedes == CHAR_MAX);
+ ASSERT (l->n_sign_posn == CHAR_MAX);
+ ASSERT (l->n_sep_by_space == CHAR_MAX);
+
+ ASSERT (STREQ (l->int_curr_symbol, ""));
+ ASSERT (l->int_frac_digits == CHAR_MAX);
+ ASSERT (l->int_p_cs_precedes == CHAR_MAX);
+ ASSERT (l->int_p_sign_posn == CHAR_MAX);
+ ASSERT (l->int_p_sep_by_space == CHAR_MAX);
+ ASSERT (l->int_n_cs_precedes == CHAR_MAX);
+ ASSERT (l->int_n_sign_posn == CHAR_MAX);
+ ASSERT (l->int_n_sep_by_space == CHAR_MAX);
+ }
+
+ return 0;
+}
diff --git a/tests/test-localename.c b/tests/test-localename.c
index 09f002c..deb59b1 100644
--- a/tests/test-localename.c
+++ b/tests/test-localename.c
@@ -1,5 +1,5 @@
/* Test of gl_locale_name function and its variants.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -715,7 +715,7 @@ test_locale_name_default (void)
ASSERT (name != NULL);
- /* Only MacOS X and Windows have a facility for the user to set the default
+ /* Only Mac OS X and Windows have a facility for the user to set the default
locale. */
#if !((defined __APPLE__ && defined __MACH__) || (defined _WIN32 || defined __WIN32__ || defined __CYGWIN__))
ASSERT (strcmp (name, "C") == 0);
diff --git a/tests/test-lseek.c b/tests/test-lseek.c
index ce2263c..67d3341 100644
--- a/tests/test-lseek.c
+++ b/tests/test-lseek.c
@@ -1,5 +1,5 @@
/* Test of lseek() function.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -81,12 +81,25 @@ main (int argc, char **argv)
invoking shell are not enough on HP-UX. */
close (0);
close (1);
+
errno = 0;
ASSERT (lseek (0, (off_t)0, SEEK_CUR) == -1);
ASSERT (errno == EBADF);
+
errno = 0;
ASSERT (lseek (1, (off_t)0, SEEK_CUR) == -1);
ASSERT (errno == EBADF);
+
+ /* Test behaviour for invalid file descriptors. */
+ errno = 0;
+ ASSERT (lseek (-1, (off_t)0, SEEK_CUR) == -1);
+ ASSERT (errno == EBADF);
+
+ close (99);
+ errno = 0;
+ ASSERT (lseek (99, (off_t)0, SEEK_CUR) == -1);
+ ASSERT (errno == EBADF);
+
break;
default:
diff --git a/tests/test-lstat.c b/tests/test-lstat.c
index 372e056..d520193 100644
--- a/tests/test-lstat.c
+++ b/tests/test-lstat.c
@@ -1,5 +1,5 @@
/* Test of lstat() function.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-lstat.h b/tests/test-lstat.h
index 883c4e8..b8f1767 100644
--- a/tests/test-lstat.h
+++ b/tests/test-lstat.h
@@ -1,5 +1,5 @@
/* Test of lstat() function.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-malloc-gnu.c b/tests/test-malloc-gnu.c
index c2a3d6b..ca0eafa 100644
--- a/tests/test-malloc-gnu.c
+++ b/tests/test-malloc-gnu.c
@@ -1,5 +1,5 @@
/* Test of malloc function.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-malloca.c b/tests/test-malloca.c
index 92c86f2..7d5e62e 100644
--- a/tests/test-malloca.c
+++ b/tests/test-malloca.c
@@ -1,5 +1,5 @@
/* Test of safe automatic memory allocation.
- Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -45,7 +45,7 @@ main ()
{
/* Try various values.
n = 0 gave a crash on Alpha with gcc-2.5.8.
- Some versions of MacOS X have a stack size limit of 512 KB. */
+ Some versions of Mac OS X have a stack size limit of 512 KB. */
func (34);
func (134);
func (399);
diff --git a/tests/test-math-c++.cc b/tests/test-math-c++.cc
index 2a3acff..7653d62 100644
--- a/tests/test-math-c++.cc
+++ b/tests/test-math-c++.cc
@@ -1,5 +1,5 @@
/* Test of <math.h> substitute in C++ mode.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -23,139 +23,381 @@
#include "signature.h"
+/* Signature check for a function that takes a real-floating argument.
+ Check that each overloaded function with the specified signature exists. */
+#define REAL_FLOATING_CHECK(func,\
+ rettype1, parameters1,\
+ rettype2, parameters2,\
+ rettype3, parameters3) \
+ OVERLOADED_CHECK (func, rettype1, parameters1, _1); \
+ OVERLOADED_CHECK (func, rettype2, parameters2, _2); \
+ OVERLOADED_CHECK (func, rettype3, parameters3, _3)
+#define OVERLOADED_CHECK(func, rettype, parameters, suffix) \
+ static rettype (* _GL_UNUSED signature_check_ ## func ## suffix) parameters \
+ = static_cast<rettype(*)parameters>(func)
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::acos, double, (double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::asin, double, (double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::atan, double, (double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::atan2, double, (double, double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::cbrt, double, (double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::copysign, double, (double, double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::cos, double, (double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::cosh, double, (double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::erf, double, (double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::erfc, double, (double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::exp, double, (double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::fabs, double, (double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::fmod, double, (double, double));
-#if GNULIB_TEST_FREXP
-SIGNATURE_CHECK (GNULIB_NAMESPACE::frexp, double, (double, int *));
-#endif
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::hypot, double, (double, double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::j0, double, (double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::j1, double, (double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::jn, double, (int, double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::ldexp, double, (double, int));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::lgamma, double, (double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::log10, double, (double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::log1p, double, (double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::logb, double, (double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::log, double, (double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::modf, double, (double, double *));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::nextafter, double, (double, double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::pow, double, (double, double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::remainder, double, (double, double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::rint, double, (double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::sin, double, (double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::sinh, double, (double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::sqrt, double, (double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::tan, double, (double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::tanh, double, (double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::y0, double, (double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::y1, double, (double));
-//SIGNATURE_CHECK (GNULIB_NAMESPACE::yn, double, (int, double));
+/* Keep these checks in the same order as math.in.h! */
+
+#if GNULIB_TEST_ACOSF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::acosf, float, (float));
+#endif
+//SIGNATURE_CHECK (GNULIB_NAMESPACE::acos, double, (double));
#if GNULIB_TEST_ACOSL
SIGNATURE_CHECK (GNULIB_NAMESPACE::acosl, long double, (long double));
#endif
+#if GNULIB_TEST_ASINF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::asinf, float, (float));
+#endif
+//SIGNATURE_CHECK (GNULIB_NAMESPACE::asin, double, (double));
#if GNULIB_TEST_ASINL
SIGNATURE_CHECK (GNULIB_NAMESPACE::asinl, long double, (long double));
#endif
+#if GNULIB_TEST_ATANF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::atanf, float, (float));
+#endif
+//SIGNATURE_CHECK (GNULIB_NAMESPACE::atan, double, (double));
#if GNULIB_TEST_ATANL
SIGNATURE_CHECK (GNULIB_NAMESPACE::atanl, long double, (long double));
#endif
+#if GNULIB_TEST_ATAN2F
+SIGNATURE_CHECK (GNULIB_NAMESPACE::atan2f, float, (float, float));
+#endif
+//SIGNATURE_CHECK (GNULIB_NAMESPACE::atan2, double, (double, double));
+
+#if GNULIB_TEST_CBRTF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::cbrtf, float, (float));
+#endif
+#if GNULIB_TEST_CBRT
+SIGNATURE_CHECK (GNULIB_NAMESPACE::cbrt, double, (double));
+#endif
+#if GNULIB_TEST_CBRTL
+SIGNATURE_CHECK (GNULIB_NAMESPACE::cbrtl, long double, (long double));
+#endif
+
#if GNULIB_TEST_CEILF
SIGNATURE_CHECK (GNULIB_NAMESPACE::ceilf, float, (float));
#endif
-
#if GNULIB_TEST_CEIL
SIGNATURE_CHECK (GNULIB_NAMESPACE::ceil, double, (double));
#endif
-
#if GNULIB_TEST_CEILL
SIGNATURE_CHECK (GNULIB_NAMESPACE::ceill, long double, (long double));
#endif
+#if GNULIB_TEST_COPYSIGNF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::copysignf, float, (float, float));
+#endif
+#if GNULIB_TEST_COPYSIGN
+SIGNATURE_CHECK (GNULIB_NAMESPACE::copysign, double, (double, double));
+#endif
+#if GNULIB_TEST_COPYSIGNL
+SIGNATURE_CHECK (GNULIB_NAMESPACE::copysignl, long double,
+ (long double, long double));
+#endif
+
+#if GNULIB_TEST_COSF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::cosf, float, (float));
+#endif
+//SIGNATURE_CHECK (GNULIB_NAMESPACE::cos, double, (double));
#if GNULIB_TEST_COSL
SIGNATURE_CHECK (GNULIB_NAMESPACE::cosl, long double, (long double));
#endif
+#if GNULIB_TEST_COSHF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::coshf, float, (float));
+#endif
+//SIGNATURE_CHECK (GNULIB_NAMESPACE::cosh, double, (double));
+
+//SIGNATURE_CHECK (GNULIB_NAMESPACE::erf, double, (double));
+
+//SIGNATURE_CHECK (GNULIB_NAMESPACE::erfc, double, (double));
+
+#if GNULIB_TEST_EXPF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::expf, float, (float));
+#endif
+//SIGNATURE_CHECK (GNULIB_NAMESPACE::exp, double, (double));
#if GNULIB_TEST_EXPL
SIGNATURE_CHECK (GNULIB_NAMESPACE::expl, long double, (long double));
#endif
+#if GNULIB_TEST_EXP2F
+SIGNATURE_CHECK (GNULIB_NAMESPACE::exp2f, float, (float));
+#endif
+#if GNULIB_TEST_EXP2
+SIGNATURE_CHECK (GNULIB_NAMESPACE::exp2, double, (double));
+#endif
+#if GNULIB_TEST_EXP2L
+SIGNATURE_CHECK (GNULIB_NAMESPACE::exp2l, long double, (long double));
+#endif
+
+#if GNULIB_TEST_EXPM1F
+SIGNATURE_CHECK (GNULIB_NAMESPACE::expm1f, float, (float));
+#endif
+#if GNULIB_TEST_EXPM1
+SIGNATURE_CHECK (GNULIB_NAMESPACE::expm1, double, (double));
+#endif
+#if GNULIB_TEST_EXPM1L
+SIGNATURE_CHECK (GNULIB_NAMESPACE::expm1l, long double, (long double));
+#endif
+
+#if GNULIB_TEST_FABSF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fabsf, float, (float));
+#endif
+//SIGNATURE_CHECK (GNULIB_NAMESPACE::fabs, double, (double));
+#if GNULIB_TEST_FABSL
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fabsl, long double, (long double));
+#endif
+
#if GNULIB_TEST_FLOORF
SIGNATURE_CHECK (GNULIB_NAMESPACE::floorf, float, (float));
#endif
-
#if GNULIB_TEST_FLOOR
SIGNATURE_CHECK (GNULIB_NAMESPACE::floor, double, (double));
#endif
-
#if GNULIB_TEST_FLOORL
SIGNATURE_CHECK (GNULIB_NAMESPACE::floorl, long double, (long double));
#endif
+#if GNULIB_TEST_FMODF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fmodf, float, (float, float));
+#endif
+#if GNULIB_TEST_FMOD
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fmod, double, (double, double));
+#endif
+#if GNULIB_TEST_FMODL
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fmodl, long double,
+ (long double, long double));
+#endif
+
+#if GNULIB_TEST_FREXPF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::frexpf, float, (float, int *));
+#endif
+#if GNULIB_TEST_FREXP
+SIGNATURE_CHECK (GNULIB_NAMESPACE::frexp, double, (double, int *));
+#endif
#if GNULIB_TEST_FREXPL
SIGNATURE_CHECK (GNULIB_NAMESPACE::frexpl, long double, (long double, int *));
#endif
+#if GNULIB_TEST_HYPOTF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::hypotf, float, (float, float));
+#endif
+#if GNULIB_TEST_HYPOT
+SIGNATURE_CHECK (GNULIB_NAMESPACE::hypot, double, (double, double));
+#endif
+#if GNULIB_TEST_HYPOTL
+SIGNATURE_CHECK (GNULIB_NAMESPACE::hypotl, long double,
+ (long double, long double));
+#endif
+
+#if GNULIB_TEST_ILOGBF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::ilogbf, int, (float));
+#endif
+#if GNULIB_TEST_ILOGB
+SIGNATURE_CHECK (GNULIB_NAMESPACE::ilogb, int, (double));
+#endif
+#if GNULIB_TEST_ILOGBL
+SIGNATURE_CHECK (GNULIB_NAMESPACE::ilogbl, int, (long double));
+#endif
+
+//SIGNATURE_CHECK (GNULIB_NAMESPACE::j0, double, (double));
+
+//SIGNATURE_CHECK (GNULIB_NAMESPACE::j1, double, (double));
+
+//SIGNATURE_CHECK (GNULIB_NAMESPACE::jn, double, (int, double));
+
+#if GNULIB_TEST_LDEXPF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::ldexpf, float, (float, int));
+#endif
+//SIGNATURE_CHECK (GNULIB_NAMESPACE::ldexp, double, (double, int));
#if GNULIB_TEST_LDEXPL
SIGNATURE_CHECK (GNULIB_NAMESPACE::ldexpl, long double, (long double, int));
#endif
+//SIGNATURE_CHECK (GNULIB_NAMESPACE::lgamma, double, (double));
+
+#if GNULIB_TEST_LOG10
+SIGNATURE_CHECK (GNULIB_NAMESPACE::log10, double, (double));
+#endif
+#if GNULIB_TEST_LOG10L
+SIGNATURE_CHECK (GNULIB_NAMESPACE::log10l, long double, (long double));
+#endif
+
+#if GNULIB_TEST_LOG1PF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::log1pf, float, (float));
+#endif
+#if GNULIB_TEST_LOG1P
+SIGNATURE_CHECK (GNULIB_NAMESPACE::log1p, double, (double));
+#endif
+#if GNULIB_TEST_LOG1PL
+SIGNATURE_CHECK (GNULIB_NAMESPACE::log1pl, long double, (long double));
+#endif
+
+#if GNULIB_TEST_LOGF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::logf, float, (float));
+#endif
+#if GNULIB_TEST_LOG
+SIGNATURE_CHECK (GNULIB_NAMESPACE::log, double, (double));
+#endif
#if GNULIB_TEST_LOGL
SIGNATURE_CHECK (GNULIB_NAMESPACE::logl, long double, (long double));
#endif
+#if GNULIB_TEST_LOG10F
+SIGNATURE_CHECK (GNULIB_NAMESPACE::log10f, float, (float));
+#endif
+
+#if GNULIB_TEST_LOG2F
+SIGNATURE_CHECK (GNULIB_NAMESPACE::log2f, float, (float));
+#endif
+#if GNULIB_TEST_LOG2
+SIGNATURE_CHECK (GNULIB_NAMESPACE::log2, double, (double));
+#endif
+#if GNULIB_TEST_LOG2L
+SIGNATURE_CHECK (GNULIB_NAMESPACE::log2l, long double, (long double));
+#endif
+
+#if GNULIB_TEST_LOGBF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::logbf, float, (float));
+#endif
+#if GNULIB_TEST_LOGB
+SIGNATURE_CHECK (GNULIB_NAMESPACE::logb, double, (double));
+#endif
+#if GNULIB_TEST_LOGBL
+SIGNATURE_CHECK (GNULIB_NAMESPACE::logbl, long double, (long double));
+#endif
+
+#if GNULIB_TEST_MODFF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::modff, float, (float, float *));
+#endif
+#if GNULIB_TEST_MODF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::modf, double, (double, double *));
+#endif
+#if GNULIB_TEST_MODFL
+SIGNATURE_CHECK (GNULIB_NAMESPACE::modfl, long double,
+ (long double, long double *));
+#endif
+
+//SIGNATURE_CHECK (GNULIB_NAMESPACE::nextafter, double, (double, double));
+
+#if GNULIB_TEST_POWF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::powf, float, (float, float));
+#endif
+//SIGNATURE_CHECK (GNULIB_NAMESPACE::pow, double, (double, double));
+
+#if GNULIB_TEST_REMAINDERF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::remainderf, float, (float, float));
+#endif
+#if GNULIB_TEST_REMAINDER
+SIGNATURE_CHECK (GNULIB_NAMESPACE::remainder, double, (double, double));
+#endif
+#if GNULIB_TEST_REMAINDERL
+SIGNATURE_CHECK (GNULIB_NAMESPACE::remainderl, long double,
+ (long double, long double));
+#endif
+
+#if GNULIB_TEST_RINTF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::rintf, float, (float));
+#endif
+#if GNULIB_TEST_RINT
+SIGNATURE_CHECK (GNULIB_NAMESPACE::rint, double, (double));
+#endif
+#if GNULIB_TEST_RINTL
+SIGNATURE_CHECK (GNULIB_NAMESPACE::rintl, long double, (long double));
+#endif
+
#if GNULIB_TEST_ROUNDF
SIGNATURE_CHECK (GNULIB_NAMESPACE::roundf, float, (float));
#endif
-
#if GNULIB_TEST_ROUND
SIGNATURE_CHECK (GNULIB_NAMESPACE::round, double, (double));
#endif
-
#if GNULIB_TEST_ROUNDL
SIGNATURE_CHECK (GNULIB_NAMESPACE::roundl, long double, (long double));
#endif
+#if GNULIB_TEST_SINF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::sinf, float, (float));
+#endif
+//SIGNATURE_CHECK (GNULIB_NAMESPACE::sin, double, (double));
#if GNULIB_TEST_SINL
SIGNATURE_CHECK (GNULIB_NAMESPACE::sinl, long double, (long double));
#endif
+#if GNULIB_TEST_SINHF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::sinhf, float, (float));
+#endif
+//SIGNATURE_CHECK (GNULIB_NAMESPACE::sinh, double, (double));
+
+#if GNULIB_TEST_SQRTF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::sqrtf, float, (float));
+#endif
+//SIGNATURE_CHECK (GNULIB_NAMESPACE::sqrt, double, (double));
#if GNULIB_TEST_SQRTL
SIGNATURE_CHECK (GNULIB_NAMESPACE::sqrtl, long double, (long double));
#endif
+#if GNULIB_TEST_TANF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::tanf, float, (float));
+#endif
+//SIGNATURE_CHECK (GNULIB_NAMESPACE::tan, double, (double));
#if GNULIB_TEST_TANL
SIGNATURE_CHECK (GNULIB_NAMESPACE::tanl, long double, (long double));
#endif
+#if GNULIB_TEST_TANHF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::tanhf, float, (float));
+#endif
+//SIGNATURE_CHECK (GNULIB_NAMESPACE::tanh, double, (double));
+
#if GNULIB_TEST_TRUNCF
SIGNATURE_CHECK (GNULIB_NAMESPACE::truncf, float, (float));
#endif
-
#if GNULIB_TEST_TRUNC
SIGNATURE_CHECK (GNULIB_NAMESPACE::trunc, double, (double));
#endif
-
#if GNULIB_TEST_TRUNCL
SIGNATURE_CHECK (GNULIB_NAMESPACE::truncl, long double, (long double));
#endif
+//SIGNATURE_CHECK (GNULIB_NAMESPACE::y0, double, (double));
+
+//SIGNATURE_CHECK (GNULIB_NAMESPACE::y1, double, (double));
+
+//SIGNATURE_CHECK (GNULIB_NAMESPACE::yn, double, (int, double));
+
+#if GNULIB_TEST_ISFINITE
+# ifdef isfinite
+# error "isfinite should not be a macro in C++"
+# endif
+REAL_FLOATING_CHECK (isfinite, int, (float), int, (double), int, (long double));
+#endif
+
+#if GNULIB_TEST_ISINF
+# ifdef isinf
+# error "isinf should not be a macro in C++"
+# endif
+REAL_FLOATING_CHECK (isinf, int, (float), int, (double), int, (long double));
+#endif
+
+#if GNULIB_TEST_ISNAN
+# ifdef isnan
+# error "isnan should not be a macro in C++"
+# endif
+REAL_FLOATING_CHECK (isnan, int, (float), int, (double), int, (long double));
+#endif
+
+#if GNULIB_TEST_SIGNBIT
+# ifdef signbit
+# error "signbit should not be a macro in C++"
+# endif
+REAL_FLOATING_CHECK (signbit, int, (float), int, (double), int, (long double));
+#endif
+
int
main ()
diff --git a/tests/test-math-c++2.cc b/tests/test-math-c++2.cc
index 1ab022f..0bf4fdb 100644
--- a/tests/test-math-c++2.cc
+++ b/tests/test-math-c++2.cc
@@ -1,5 +1,5 @@
/* Test of <math.h> substitute in C++ mode.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-math.c b/tests/test-math.c
index 8565925..f7d944c 100644
--- a/tests/test-math.c
+++ b/tests/test-math.c
@@ -1,5 +1,5 @@
/* Test of <math.h> substitute.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -25,6 +25,35 @@
choke me
#endif
+#ifndef HUGE_VALF
+# error HUGE_VALF should be defined
+choke me
+#endif
+
+#ifndef HUGE_VAL
+# error HUGE_VAL should be defined
+choke me
+#endif
+
+#ifndef HUGE_VALL
+# error HUGE_VALL should be defined
+choke me
+#endif
+
+#ifndef FP_ILOGB0
+# error FP_ILOGB0 should be defined
+choke me
+#endif
+
+#ifndef FP_ILOGBNAN
+# error FP_ILOGBNAN should be defined
+choke me
+#endif
+
+#include <limits.h>
+
+#include "macros.h"
+
#if 0
/* Check that NAN expands into a constant expression. */
static float n = NAN;
@@ -34,7 +63,17 @@ static float n = NAN;
This is a separate function because IRIX 6.5 "cc -O" miscompiles an
'x == x' test. */
static int
-numeric_equal (double x, double y)
+numeric_equalf (float x, float y)
+{
+ return x == y;
+}
+static int
+numeric_equald (double x, double y)
+{
+ return x == y;
+}
+static int
+numeric_equall (long double x, long double y)
{
return x == y;
}
@@ -44,10 +83,22 @@ main (void)
{
double d = NAN;
double zero = 0.0;
- if (numeric_equal (d, d))
- return 1;
+ ASSERT (!numeric_equald (d, d));
+
d = HUGE_VAL;
- if (!numeric_equal (d, 1.0 / zero))
- return 1;
+ ASSERT (numeric_equald (d, 1.0 / zero));
+
+ ASSERT (numeric_equalf (HUGE_VALF, HUGE_VALF + HUGE_VALF));
+
+ ASSERT (numeric_equald (HUGE_VAL, HUGE_VAL + HUGE_VAL));
+
+ ASSERT (numeric_equall (HUGE_VALL, HUGE_VALL + HUGE_VALL));
+
+ /* Check the value of FP_ILOGB0. */
+ ASSERT (FP_ILOGB0 == INT_MIN || FP_ILOGB0 == - INT_MAX);
+
+ /* Check the value of FP_ILOGBNAN. */
+ ASSERT (FP_ILOGBNAN == INT_MIN || FP_ILOGBNAN == INT_MAX);
+
return 0;
}
diff --git a/tests/test-mbrtowc-w32.c b/tests/test-mbrtowc-w32.c
index ee8caf9..2125bdf 100644
--- a/tests/test-mbrtowc-w32.c
+++ b/tests/test-mbrtowc-w32.c
@@ -1,5 +1,5 @@
/* Test of conversion of multibyte character to wide character.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-mbrtowc.c b/tests/test-mbrtowc.c
index 727016a..4d2d5cb 100644
--- a/tests/test-mbrtowc.c
+++ b/tests/test-mbrtowc.c
@@ -1,5 +1,5 @@
/* Test of conversion of multibyte character to wide character.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-mbsinit.c b/tests/test-mbsinit.c
index 2cc2924..931f059 100644
--- a/tests/test-mbsinit.c
+++ b/tests/test-mbsinit.c
@@ -1,5 +1,5 @@
/* Test of test for initial conversion state.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-memchr.c b/tests/test-memchr.c
index a11f6cd..0ca4589 100644
--- a/tests/test-memchr.c
+++ b/tests/test-memchr.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2013 Free Software Foundation, Inc.
* Written by Eric Blake and Bruno Haible
*
* This program is free software: you can redistribute it and/or modify
diff --git a/tests/test-memchr2.c b/tests/test-memchr2.c
index c94352f..d0f8125 100644
--- a/tests/test-memchr2.c
+++ b/tests/test-memchr2.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2013 Free Software Foundation, Inc.
* Written by Eric Blake
*
* This program is free software: you can redistribute it and/or modify
diff --git a/tests/test-nl_langinfo.c b/tests/test-nl_langinfo.c
index 964ea8d..d31e54f 100644
--- a/tests/test-nl_langinfo.c
+++ b/tests/test-nl_langinfo.c
@@ -1,5 +1,5 @@
/* Test of nl_langinfo replacement.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-open.c b/tests/test-open.c
index 3c5b2ab..f04144f 100644
--- a/tests/test-open.c
+++ b/tests/test-open.c
@@ -1,5 +1,5 @@
/* Test of opening a file descriptor.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-open.h b/tests/test-open.h
index 3e5c5e1..babb239 100644
--- a/tests/test-open.h
+++ b/tests/test-open.h
@@ -1,5 +1,5 @@
/* Test of opening a file descriptor.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -63,6 +63,12 @@ test_open (int (*func) (char const *, int, ...), bool print)
ASSERT (write (fd, "c", 1) == 1);
ASSERT (close (fd) == 0);
+ /* Although O_NONBLOCK on regular files can be ignored, it must not
+ cause a failure. */
+ fd = func (BASE "file", O_NONBLOCK | O_RDONLY);
+ ASSERT (0 <= fd);
+ ASSERT (close (fd) == 0);
+
/* Symlink handling, where supported. */
if (symlink (BASE "file", BASE "link") != 0)
{
diff --git a/tests/test-pathmax.c b/tests/test-pathmax.c
new file mode 100644
index 0000000..81a0350
--- /dev/null
+++ b/tests/test-pathmax.c
@@ -0,0 +1,32 @@
+/* Test of "pathmax.h".
+ 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 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2011. */
+
+#include <config.h>
+
+#include "pathmax.h"
+
+/* Check that PATH_MAX is a constant if it is defined. */
+#ifdef PATH_MAX
+int a = PATH_MAX;
+#endif
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/tests/test-pipe2.c b/tests/test-pipe2.c
index ddfb819..fd164c6 100644
--- a/tests/test-pipe2.c
+++ b/tests/test-pipe2.c
@@ -1,5 +1,5 @@
/* Test of pipe2.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
@@ -26,20 +25,25 @@ SIGNATURE_CHECK (pipe2, int, (int[2], int));
#include <stdbool.h>
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* Get declarations of the Win32 API functions. */
+/* Get declarations of the native Windows API functions. */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
+/* Get _get_osfhandle. */
+# include "msvc-nothrow.h"
#endif
#include "binary-io.h"
#include "macros.h"
+#if GNULIB_NONBLOCKING
+# include "nonblocking.h"
+#endif
/* Return true if FD is open. */
static bool
is_open (int fd)
{
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
- /* On Win32, the initial state of unassigned standard file
+ /* On native Windows, the initial state of unassigned standard file
descriptors is that they are open but point to an
INVALID_HANDLE_VALUE, and there is no fcntl. */
return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE;
@@ -67,19 +71,22 @@ is_cloexec (int fd)
#endif
}
-/* Return true if FD is in non-blocking mode. */
-static bool
-is_nonblocking (int fd)
+#if ! GNULIB_NONBLOCKING
+static int
+get_nonblocking_flag (int fd)
{
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
- /* We don't use the non-blocking mode for sockets here. */
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
return 0;
-#else
+# else
+# ifndef F_GETFL
+# error Please port fcntl to your platform
+# endif
int flags;
ASSERT ((flags = fcntl (fd, F_GETFL)) >= 0);
return (flags & O_NONBLOCK) != 0;
-#endif
+# endif
}
+#endif
int
main ()
@@ -87,29 +94,17 @@ main ()
int use_nonblocking;
int use_cloexec;
-#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
- for (use_nonblocking = 0; use_nonblocking <= 1; use_nonblocking++)
-#else
- use_nonblocking = 0;
-#endif
-#if O_CLOEXEC
- for (use_cloexec = 0; use_cloexec <= 1; use_cloexec++)
-#else
- use_cloexec = 0;
-#endif
+ for (use_nonblocking = 0; use_nonblocking <= !!O_NONBLOCK; use_nonblocking++)
+ for (use_cloexec = 0; use_cloexec <= !!O_CLOEXEC; use_cloexec++)
{
int o_flags;
int fd[2];
o_flags = 0;
-#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
if (use_nonblocking)
o_flags |= O_NONBLOCK;
-#endif
-#if O_CLOEXEC
if (use_cloexec)
o_flags |= O_CLOEXEC;
-#endif
fd[0] = -1;
fd[1] = -1;
@@ -131,14 +126,17 @@ main ()
}
if (use_nonblocking)
{
- ASSERT (is_nonblocking (fd[0]));
- ASSERT (is_nonblocking (fd[1]));
+ ASSERT (get_nonblocking_flag (fd[0]) == 1);
+ ASSERT (get_nonblocking_flag (fd[1]) == 1);
}
else
{
- ASSERT (!is_nonblocking (fd[0]));
- ASSERT (!is_nonblocking (fd[1]));
+ ASSERT (get_nonblocking_flag (fd[0]) == 0);
+ ASSERT (get_nonblocking_flag (fd[1]) == 0);
}
+
+ ASSERT (close (fd[0]) == 0);
+ ASSERT (close (fd[1]) == 0);
}
return 0;
diff --git a/tests/test-posix_spawn1.c b/tests/test-posix_spawn1.c
index f0ba3bd..b944e14 100644
--- a/tests/test-posix_spawn1.c
+++ b/tests/test-posix_spawn1.c
@@ -1,5 +1,5 @@
/* Test of posix_spawn() function.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -75,7 +75,7 @@ fd_safer (int fd)
int
main ()
{
- char *argv[3] = { "/bin/sh", CHILD_PROGRAM_FILENAME, NULL };
+ char *argv[3] = { (char *) "/bin/sh", (char *) CHILD_PROGRAM_FILENAME, NULL };
int ifd[2];
sigset_t blocked_signals;
sigset_t fatal_signal_set;
diff --git a/tests/test-posix_spawn2.c b/tests/test-posix_spawn2.c
index 92f5d4a..ce61c1c 100644
--- a/tests/test-posix_spawn2.c
+++ b/tests/test-posix_spawn2.c
@@ -1,5 +1,5 @@
/* Test of posix_spawn() function.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -53,7 +53,7 @@ fd_safer (int fd)
int
main ()
{
- char *argv[3] = { "/bin/sh", CHILD_PROGRAM_FILENAME, NULL };
+ char *argv[3] = { (char *) "/bin/sh", (char *) CHILD_PROGRAM_FILENAME, NULL };
int ofd[2];
sigset_t blocked_signals;
sigset_t fatal_signal_set;
diff --git a/tests/test-posix_spawn_file_actions_addclose.c b/tests/test-posix_spawn_file_actions_addclose.c
new file mode 100644
index 0000000..296f101
--- /dev/null
+++ b/tests/test-posix_spawn_file_actions_addclose.c
@@ -0,0 +1,64 @@
+/* Test posix_spawn_file_actions_addclose() function.
+ 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 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <spawn.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (posix_spawn_file_actions_addclose, int,
+ (posix_spawn_file_actions_t *, int));
+
+#include <errno.h>
+#include <limits.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+/* Return a file descriptor that is too big to use.
+ Prefer the smallest such fd, except use OPEN_MAX if it is defined
+ and is greater than getdtablesize (), as that's how OS X works. */
+static int
+big_fd (void)
+{
+ int fd = getdtablesize ();
+#ifdef OPEN_MAX
+ if (fd < OPEN_MAX)
+ fd = OPEN_MAX;
+#endif
+ return fd;
+}
+
+int
+main (void)
+{
+ posix_spawn_file_actions_t actions;
+
+ ASSERT (posix_spawn_file_actions_init (&actions) == 0);
+
+ /* Test behaviour for invalid file descriptors. */
+ {
+ errno = 0;
+ ASSERT (posix_spawn_file_actions_addclose (&actions, -1) == EBADF);
+ }
+ {
+ int bad_fd = big_fd ();
+ errno = 0;
+ ASSERT (posix_spawn_file_actions_addclose (&actions, bad_fd) == EBADF);
+ }
+
+ return 0;
+}
diff --git a/tests/test-posix_spawn_file_actions_adddup2.c b/tests/test-posix_spawn_file_actions_adddup2.c
new file mode 100644
index 0000000..fe33c02
--- /dev/null
+++ b/tests/test-posix_spawn_file_actions_adddup2.c
@@ -0,0 +1,72 @@
+/* Test posix_spawn_file_actions_adddup2() function.
+ 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 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <spawn.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (posix_spawn_file_actions_adddup2, int,
+ (posix_spawn_file_actions_t *, int, int));
+
+#include <errno.h>
+#include <limits.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+/* Return a file descriptor that is too big to use.
+ Prefer the smallest such fd, except use OPEN_MAX if it is defined
+ and is greater than getdtablesize (), as that's how OS X works. */
+static int
+big_fd (void)
+{
+ int fd = getdtablesize ();
+#ifdef OPEN_MAX
+ if (fd < OPEN_MAX)
+ fd = OPEN_MAX;
+#endif
+ return fd;
+}
+
+int
+main (void)
+{
+ int bad_fd = big_fd ();
+ posix_spawn_file_actions_t actions;
+
+ ASSERT (posix_spawn_file_actions_init (&actions) == 0);
+
+ /* Test behaviour for invalid file descriptors. */
+ {
+ errno = 0;
+ ASSERT (posix_spawn_file_actions_adddup2 (&actions, -1, 2) == EBADF);
+ }
+ {
+ errno = 0;
+ ASSERT (posix_spawn_file_actions_adddup2 (&actions, bad_fd, 2) == EBADF);
+ }
+ {
+ errno = 0;
+ ASSERT (posix_spawn_file_actions_adddup2 (&actions, 2, -1) == EBADF);
+ }
+ {
+ errno = 0;
+ ASSERT (posix_spawn_file_actions_adddup2 (&actions, 2, bad_fd) == EBADF);
+ }
+
+ return 0;
+}
diff --git a/tests/test-posix_spawn_file_actions_addopen.c b/tests/test-posix_spawn_file_actions_addopen.c
new file mode 100644
index 0000000..a4865ca
--- /dev/null
+++ b/tests/test-posix_spawn_file_actions_addopen.c
@@ -0,0 +1,70 @@
+/* Test posix_spawn_file_actions_addopen() function.
+ 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 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <spawn.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (posix_spawn_file_actions_addopen, int,
+ (posix_spawn_file_actions_t *, int,
+ const char *, int, mode_t));
+
+#include <errno.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+/* Return a file descriptor that is too big to use.
+ Prefer the smallest such fd, except use OPEN_MAX if it is defined
+ and is greater than getdtablesize (), as that's how OS X works. */
+static int
+big_fd (void)
+{
+ int fd = getdtablesize ();
+#ifdef OPEN_MAX
+ if (fd < OPEN_MAX)
+ fd = OPEN_MAX;
+#endif
+ return fd;
+}
+
+int
+main (void)
+{
+ posix_spawn_file_actions_t actions;
+
+ ASSERT (posix_spawn_file_actions_init (&actions) == 0);
+
+ /* Test behaviour for invalid file descriptors. */
+ {
+ errno = 0;
+ ASSERT (posix_spawn_file_actions_addopen (&actions, -1,
+ "foo", 0, O_RDONLY)
+ == EBADF);
+ }
+ {
+ int bad_fd = big_fd ();
+ errno = 0;
+ ASSERT (posix_spawn_file_actions_addopen (&actions, bad_fd,
+ "foo", 0, O_RDONLY)
+ == EBADF);
+ }
+
+ return 0;
+}
diff --git a/tests/test-printf-frexp.c b/tests/test-printf-frexp.c
index d1b0d84..5ecf198 100644
--- a/tests/test-printf-frexp.c
+++ b/tests/test-printf-frexp.c
@@ -1,5 +1,5 @@
/* Test of splitting a double into fraction and mantissa.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-printf-frexpl.c b/tests/test-printf-frexpl.c
index 4e9704f..0aa3d18 100644
--- a/tests/test-printf-frexpl.c
+++ b/tests/test-printf-frexpl.c
@@ -1,5 +1,5 @@
/* Test of splitting a 'long double' into fraction and mantissa.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-quotearg-simple.c b/tests/test-quotearg-simple.c
index 4d9c87c..fe860ed 100644
--- a/tests/test-quotearg-simple.c
+++ b/tests/test-quotearg-simple.c
@@ -1,5 +1,5 @@
/* Test of quotearg family of functions.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
/* Written by Eric Blake <ebb9@byu.net>, 2008. */
@@ -27,8 +26,10 @@
#include <stdlib.h>
#include <string.h>
+#include "localcharset.h"
#include "progname.h"
#include "macros.h"
+#include "zerosize-ptr.h"
#include "test-quotearg.h"
@@ -85,12 +86,12 @@ static struct result_groups results_g[] = {
"a\\\\b", LQ_ENC RQ_ENC, LQ RQ } },
/* locale_quoting_style */
- { { "`'", "`\\0001\\0'", 9, "`simple'", "` \\t\\n\\'\"\\033?""?/\\\\'",
- "`a:b'", "`a\\\\b'", "`" LQ_ENC RQ_ENC "'", "`" LQ RQ "'" },
- { "`'", "`\\0001\\0'", 9, "`simple'", "` \\t\\n\\'\"\\033?""?/\\\\'",
- "`a:b'", "`a\\\\b'", "`" LQ_ENC RQ_ENC "'", "`" LQ RQ "'" },
- { "`'", "`\\0001\\0'", 9, "`simple'", "` \\t\\n\\'\"\\033?""?/\\\\'",
- "`a\\:b'", "`a\\\\b'", "`" LQ_ENC RQ_ENC "'", "`" LQ RQ "'" } },
+ { { "''", "'\\0001\\0'", 9, "'simple'", "' \\t\\n\\'\"\\033?""?/\\\\'",
+ "'a:b'", "'a\\\\b'", "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
+ { "''", "'\\0001\\0'", 9, "'simple'", "' \\t\\n\\'\"\\033?""?/\\\\'",
+ "'a:b'", "'a\\\\b'", "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
+ { "''", "'\\0001\\0'", 9, "'simple'", "' \\t\\n\\'\"\\033?""?/\\\\'",
+ "'a\\:b'", "'a\\\\b'", "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" } },
/* clocale_quoting_style */
{ { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
@@ -245,12 +246,20 @@ main (int argc _GL_UNUSED, char *argv[])
for (i = literal_quoting_style; i <= clocale_quoting_style; i++)
{
set_quoting_style (NULL, (enum quoting_style) i);
- compare_strings (use_quotearg_buffer, &results_g[i].group1, ascii_only);
- compare_strings (use_quotearg, &results_g[i].group2, ascii_only);
- if (i == c_quoting_style)
- compare_strings (use_quote_double_quotes, &results_g[i].group2,
- ascii_only);
- compare_strings (use_quotearg_colon, &results_g[i].group3, ascii_only);
+ if (!(i == locale_quoting_style || i == clocale_quoting_style)
+ || (strcmp (locale_charset (), "ASCII") == 0
+ || strcmp (locale_charset (), "ANSI_X3.4-1968") == 0))
+ {
+ compare_strings (use_quotearg_buffer, &results_g[i].group1,
+ ascii_only);
+ compare_strings (use_quotearg, &results_g[i].group2,
+ ascii_only);
+ if (i == c_quoting_style)
+ compare_strings (use_quote_double_quotes, &results_g[i].group2,
+ ascii_only);
+ compare_strings (use_quotearg_colon, &results_g[i].group3,
+ ascii_only);
+ }
}
set_quoting_style (NULL, literal_quoting_style);
@@ -289,6 +298,40 @@ main (int argc _GL_UNUSED, char *argv[])
ascii_only);
}
+ {
+ /* Trigger the bug whereby quotearg_buffer would read beyond the NUL
+ that defines the end of the string being quoted. Use an input
+ string whose NUL is the last byte before an unreadable page. */
+ char *z = zerosize_ptr ();
+
+ if (z)
+ {
+ size_t q_len = 1024;
+ char *q = malloc (q_len + 1);
+ char buf[10];
+ memset (q, 'Q', q_len);
+ q[q_len] = 0;
+
+ /* Z points to the boundary between a readable/writable page
+ and one that is neither readable nor writable. Position
+ our string so its NUL is at the end of the writable one. */
+ char const *str = "____";
+ size_t s_len = strlen (str);
+ z -= s_len + 1;
+ memcpy (z, str, s_len + 1);
+
+ set_custom_quoting (NULL, q, q);
+ /* Whether this actually triggers a SEGV depends on the
+ implementation of memcmp: whether it compares only byte-at-
+ a-time, and from left to right (no SEGV) or some other way. */
+ size_t n = quotearg_buffer (buf, sizeof buf, z, SIZE_MAX, NULL);
+ ASSERT (n == s_len + 2 * q_len);
+ ASSERT (memcmp (buf, q, sizeof buf) == 0);
+ free (q);
+ }
+ }
+
quotearg_free ();
+
return 0;
}
diff --git a/tests/test-quotearg.h b/tests/test-quotearg.h
index f2e9558..02e0c13 100644
--- a/tests/test-quotearg.h
+++ b/tests/test-quotearg.h
@@ -1,5 +1,5 @@
/* Test of quotearg family of functions.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
/* Written by Eric Blake <ebb9@byu.net>, 2008. */
diff --git a/tests/test-raise.c b/tests/test-raise.c
new file mode 100644
index 0000000..3c58b6b
--- /dev/null
+++ b/tests/test-raise.c
@@ -0,0 +1,50 @@
+/* Test raising a signal.
+ 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 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <signal.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (raise, int, (int));
+
+#include <stdlib.h>
+
+#include "macros.h"
+
+/* It is safe to use _Noreturn here: exit() never returns, and GCC knows that
+ exit() is a non-returning function, even on platforms where its declaration
+ in <stdlib.h> does not have the 'noreturn' attribute. */
+static _Noreturn void
+handler (int sig)
+{
+ exit (0);
+}
+
+int
+main (void)
+{
+ /* Test behaviour for invalid argument. */
+ ASSERT (raise (-1) != 0);
+
+ /* Test behaviour for SIGINT. */
+ ASSERT (signal (SIGINT, handler) != SIG_ERR);
+
+ raise (SIGINT);
+
+ /* We should not get here, because the handler takes away the control. */
+ exit (1);
+}
diff --git a/tests/test-rawmemchr.c b/tests/test-rawmemchr.c
index be8feac..e31104a 100644
--- a/tests/test-rawmemchr.c
+++ b/tests/test-rawmemchr.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2013 Free Software Foundation, Inc.
* Written by Eric Blake and Bruno Haible
*
* This program is free software: you can redistribute it and/or modify
diff --git a/tests/test-readlink.c b/tests/test-readlink.c
index 3da5fbf..e59ebe4 100644
--- a/tests/test-readlink.c
+++ b/tests/test-readlink.c
@@ -1,5 +1,5 @@
/* Tests of readlink.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-readlink.h b/tests/test-readlink.h
index 08d5662..d19f9b3 100644
--- a/tests/test-readlink.h
+++ b/tests/test-readlink.h
@@ -1,5 +1,5 @@
/* Tests of readlink.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -38,7 +38,7 @@ test_readlink (ssize_t (*func) (char const *, char *, size_t), bool print)
ASSERT (errno == ENOENT);
errno = 0;
ASSERT (func ("", buf, sizeof buf) == -1);
- ASSERT (errno == ENOENT);
+ ASSERT (errno == ENOENT || errno == EINVAL);
errno = 0;
ASSERT (func (".", buf, sizeof buf) == -1);
ASSERT (errno == EINVAL);
diff --git a/tests/test-regex.c b/tests/test-regex.c
new file mode 100644
index 0000000..15542f4
--- /dev/null
+++ b/tests/test-regex.c
@@ -0,0 +1,203 @@
+/* Test regular expressions
+ Copyright 1996-2001, 2003-2013 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "regex.h"
+
+#include <locale.h>
+#include <limits.h>
+#include <string.h>
+#if HAVE_DECL_ALARM
+# include <unistd.h>
+# include <signal.h>
+#endif
+
+#include "localcharset.h"
+
+int
+main (void)
+{
+ int result = 0;
+ static struct re_pattern_buffer regex;
+ unsigned char folded_chars[UCHAR_MAX + 1];
+ int i;
+ const char *s;
+ struct re_registers regs;
+
+#if HAVE_DECL_ALARM
+ /* Some builds of glibc go into an infinite loop on this test. */
+ int alarm_value = 2;
+ signal (SIGALRM, SIG_DFL);
+ alarm (alarm_value);
+#endif
+ if (setlocale (LC_ALL, "en_US.UTF-8"))
+ {
+ {
+ /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
+ This test needs valgrind to catch the bug on Debian
+ GNU/Linux 3.1 x86, but it might catch the bug better
+ on other platforms and it shouldn't hurt to try the
+ test here. */
+ static char const pat[] = "insert into";
+ static char const data[] =
+ "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
+ re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
+ | RE_ICASE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern (pat, sizeof pat - 1, &regex);
+ if (s)
+ result |= 1;
+ else if (re_search (&regex, data, sizeof data - 1,
+ 0, sizeof data - 1, &regs)
+ != -1)
+ result |= 1;
+ }
+
+ /* Check whether it's really a UTF-8 locale.
+ On mingw, the setlocale call succeeds but returns
+ "English_United States.1252", with locale_charset() returning
+ "CP1252". */
+ if (strcmp (locale_charset (), "UTF-8") == 0)
+ {
+ /* This test is from glibc bug 15078.
+ The test case is from Andreas Schwab in
+ <http://www.sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
+ */
+ static char const pat[] = "[^x]x";
+ static char const data[] =
+ /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
+ "\xe1\x80\x80"
+ "\xe1\x80\xbb"
+ "\xe1\x80\xbd"
+ "\xe1\x80\x94"
+ "\xe1\x80\xba"
+ "\xe1\x80\xaf"
+ "\xe1\x80\x95"
+ "\xe1\x80\xba"
+ "x";
+ re_set_syntax (0);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern (pat, sizeof pat - 1, &regex);
+ if (s)
+ result |= 1;
+ else
+ {
+ i = re_search (&regex, data, sizeof data - 1,
+ 0, sizeof data - 1, 0);
+ if (i != 0 && i != 21)
+ result |= 1;
+ }
+ }
+
+ if (! setlocale (LC_ALL, "C"))
+ return 1;
+ }
+
+ /* This test is from glibc bug 3957, reported by Andrew Mackey. */
+ re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("a[^x]b", 6, &regex);
+ if (s)
+ result |= 2;
+ /* This should fail, but succeeds for glibc-2.5. */
+ else if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -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 (&regex, 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, &regex);
+ /* 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 (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("a[b-a]", 6, &regex);
+ if (s == 0)
+ result |= 8;
+
+ /* This should succeed, but does not for glibc-2.1.3. */
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("{1", 2, &regex);
+ if (s)
+ result |= 8;
+
+ /* The following example is derived from a problem report
+ against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("[an\371]*n", 7, &regex);
+ if (s)
+ result |= 8;
+ /* This should match, but does not for glibc-2.2.1. */
+ else if (re_match (&regex, "an", 2, 0, &regs) != 2)
+ result |= 8;
+
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("x", 1, &regex);
+ if (s)
+ result |= 8;
+ /* glibc-2.2.93 does not work with a negative RANGE argument. */
+ else if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 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 (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("x", 1, &regex);
+ if (s)
+ result |= 16;
+ else if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 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 (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
+ if (s)
+ result |= 32;
+
+ /* REG_STARTEND was added to glibc on 2004-01-15.
+ Reject older versions. */
+ if (! REG_STARTEND)
+ result |= 64;
+
+#if 0
+ /* It would be nice to reject hosts whose regoff_t values are too
+ narrow (including glibc on hosts with 64-bit ptrdiff_t and
+ 32-bit int), but we should wait until glibc implements this
+ feature. Otherwise, support for equivalence classes and
+ multibyte collation symbols would always be broken except
+ when compiling --without-included-regex. */
+ if (sizeof (regoff_t) < sizeof (ptrdiff_t)
+ || sizeof (regoff_t) < sizeof (ssize_t))
+ result |= 64;
+#endif
+
+ return result;
+}
diff --git a/tests/test-rename.c b/tests/test-rename.c
index 5ac83ca..132c788 100644
--- a/tests/test-rename.c
+++ b/tests/test-rename.c
@@ -1,5 +1,5 @@
/* Test of rename() function.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-rename.h b/tests/test-rename.h
index 64bab09..7e024e0 100644
--- a/tests/test-rename.h
+++ b/tests/test-rename.h
@@ -1,5 +1,5 @@
/* Test of rename() function.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -339,7 +339,7 @@ test_rename (int (*func) (char const *, char const *), bool print)
errno = 0;
ASSERT (func (BASE "dir2", BASE "dir/.") == -1);
ASSERT (errno == EINVAL || errno == EBUSY || errno == EISDIR
- || errno == ENOTEMPTY);
+ || errno == ENOTEMPTY || errno == EEXIST);
}
{
errno = 0;
@@ -366,7 +366,7 @@ test_rename (int (*func) (char const *, char const *), bool print)
errno = 0;
ASSERT (func (BASE "dir2", BASE "dir/.//") == -1);
ASSERT (errno == EINVAL || errno == EBUSY || errno == EISDIR
- || errno == ENOTEMPTY);
+ || errno == ENOTEMPTY || errno == EEXIST);
}
{
errno = 0;
diff --git a/tests/test-rmdir.c b/tests/test-rmdir.c
index 6957efe..8a24a68 100644
--- a/tests/test-rmdir.c
+++ b/tests/test-rmdir.c
@@ -1,5 +1,5 @@
/* Tests of rmdir.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-rmdir.h b/tests/test-rmdir.h
index 757d030..f298780 100644
--- a/tests/test-rmdir.h
+++ b/tests/test-rmdir.h
@@ -1,5 +1,5 @@
/* Tests of rmdir.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -66,7 +66,8 @@ test_rmdir_func (int (*func) (char const *name), bool print)
ASSERT (unlink (BASE "dir/file") == 0);
errno = 0;
ASSERT (func (BASE "dir/.//") == -1);
- ASSERT (errno == EINVAL || errno == EBUSY || errno == EEXIST);
+ ASSERT (errno == EINVAL || errno == EBUSY || errno == EEXIST
+ || errno == ENOTEMPTY);
ASSERT (func (BASE "dir") == 0);
/* Test symlink behavior. Specifying trailing slash should remove
diff --git a/tests/test-sched.c b/tests/test-sched.c
index 8d0c8cd..5a64120 100644
--- a/tests/test-sched.c
+++ b/tests/test-sched.c
@@ -1,5 +1,5 @@
/* Test of <sched.h> substitute.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -26,6 +26,9 @@ static struct sched_param a;
/* Check that the SCHED_* macros are defined and compile-time constants. */
int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER };
+/* Check that the types are all defined. */
+pid_t t1;
+
static int f1;
int
diff --git a/tests/test-setenv.c b/tests/test-setenv.c
index 50eb71b..0a53ac4 100644
--- a/tests/test-setenv.c
+++ b/tests/test-setenv.c
@@ -1,5 +1,5 @@
/* Tests of setenv.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-setlocale1.c b/tests/test-setlocale1.c
index ea7945c..b20c037 100644
--- a/tests/test-setlocale1.c
+++ b/tests/test-setlocale1.c
@@ -1,5 +1,5 @@
/* Test of setting the current locale.
- Copyright (C) 2011 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-setlocale2.c b/tests/test-setlocale2.c
index 7bfc42a..cad9e2f 100644
--- a/tests/test-setlocale2.c
+++ b/tests/test-setlocale2.c
@@ -1,5 +1,5 @@
/* Test of setting the current locale.
- Copyright (C) 2011 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-setlocale2.sh b/tests/test-setlocale2.sh
index 723e74e..904e147 100755
--- a/tests/test-setlocale2.sh
+++ b/tests/test-setlocale2.sh
@@ -2,14 +2,16 @@
# Test locale names with likely unsupported encoding in Unix syntax.
for name in ar_SA.ISO-8859-1 fr_FR.CP1251 zh_TW.GB18030 zh_CN.BIG5; do
- LC_ALL=$name ./test-setlocale2${EXEEXT} 1 || exit 1
+ env LC_ALL=$name ./test-setlocale2${EXEEXT} 1 || exit 1
done
# Test locale names with likely unsupported encoding in native Windows syntax.
for name in "Arabic_Saudi Arabia.1252" "Arabic_Saudi Arabia.65001" \
French_France.65001 Japanese_Japan.65001 Turkish_Turkey.65001 \
Chinese_Taiwan.65001 Chinese_China.54936 Chinese_China.65001; do
- LC_ALL=$name ./test-setlocale2${EXEEXT} 1 || exit 1
+ # Here we use 'env' to set the LC_ALL environment variable, because on
+ # Solaris 11 2011-11, the /bin/sh refuses to do it for Turkish_Turkey.65001.
+ env LC_ALL="$name" ./test-setlocale2${EXEEXT} 1 || exit 1
done
exit 0
diff --git a/tests/test-sigaction.c b/tests/test-sigaction.c
index f83b87b..2b5ba53 100644
--- a/tests/test-sigaction.c
+++ b/tests/test-sigaction.c
@@ -1,5 +1,5 @@
/* Test of sigaction() function.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-signal-c++.cc b/tests/test-signal-h-c++.cc
index a38d2b5..dfe3955 100644
--- a/tests/test-signal-c++.cc
+++ b/tests/test-signal-h-c++.cc
@@ -1,5 +1,5 @@
/* Test of <signal.h> substitute in C++ mode.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -24,6 +24,15 @@
#include "signature.h"
+#if GNULIB_TEST_PTHREAD_SIGMASK
+SIGNATURE_CHECK (GNULIB_NAMESPACE::pthread_sigmask, int,
+ (int, const sigset_t *, sigset_t *));
+#endif
+
+#if GNULIB_TEST_RAISE
+SIGNATURE_CHECK (GNULIB_NAMESPACE::raise, int, (int));
+#endif
+
#if GNULIB_TEST_SIGPROCMASK
SIGNATURE_CHECK (GNULIB_NAMESPACE::sigismember, int, (const sigset_t *, int));
SIGNATURE_CHECK (GNULIB_NAMESPACE::sigemptyset, int, (sigset_t *));
diff --git a/tests/test-signal-c++2.cc b/tests/test-signal-h-c++2.cc
index 744e9a4..6e2026e 100644
--- a/tests/test-signal-c++2.cc
+++ b/tests/test-signal-h-c++2.cc
@@ -1,5 +1,5 @@
/* Test of <signal.h> substitute in C++ mode.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-signal.c b/tests/test-signal-h.c
index 7103e1f..93c0b71 100644
--- a/tests/test-signal.c
+++ b/tests/test-signal-h.c
@@ -1,5 +1,5 @@
/* Test of <signal.h> substitute.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-signbit.c b/tests/test-signbit.c
index c898149..e8ea097 100644
--- a/tests/test-signbit.c
+++ b/tests/test-signbit.c
@@ -1,5 +1,5 @@
/* Test of signbit() substitute.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -29,6 +29,7 @@
#include <limits.h>
#include "minus-zero.h"
+#include "infinity.h"
#include "macros.h"
float zerof = 0.0f;
@@ -52,8 +53,8 @@ test_signbitf ()
else
ASSERT (!signbit (minus_zerof));
/* Infinite values. */
- ASSERT (!signbit (1.0f / 0.0f));
- ASSERT (signbit (-1.0f / 0.0f));
+ ASSERT (!signbit (Infinityf ()));
+ ASSERT (signbit (- Infinityf ()));
/* Quiet NaN. */
(void) signbit (zerof / zerof);
#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
@@ -97,8 +98,8 @@ test_signbitd ()
else
ASSERT (!signbit (minus_zerod));
/* Infinite values. */
- ASSERT (!signbit (1.0 / 0.0));
- ASSERT (signbit (-1.0 / 0.0));
+ ASSERT (!signbit (Infinityd ()));
+ ASSERT (signbit (- Infinityd ()));
/* Quiet NaN. */
(void) signbit (zerod / zerod);
#if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT
@@ -140,8 +141,8 @@ test_signbitl ()
else
ASSERT (!signbit (minus_zerol));
/* Infinite values. */
- ASSERT (!signbit (1.0L / 0.0L));
- ASSERT (signbit (-1.0L / 0.0L));
+ ASSERT (!signbit (Infinityl ()));
+ ASSERT (signbit (- Infinityl ()));
/* Quiet NaN. */
(void) signbit (zerol / zerol);
#if defined LDBL_EXPBIT0_WORD && defined LDBL_EXPBIT0_BIT
diff --git a/tests/test-sigpipe.c b/tests/test-sigpipe.c
new file mode 100644
index 0000000..e09294a
--- /dev/null
+++ b/tests/test-sigpipe.c
@@ -0,0 +1,68 @@
+/* Test of SIGPIPE handling.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ 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 <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <signal.h>
+
+/* Check that SIGPIPE is defined. */
+int s = SIGPIPE;
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+static void
+handler (int sig)
+{
+ exit (0);
+}
+
+int
+main (int argc, char **argv)
+{
+ char mode = argv[1][0];
+
+ switch (mode)
+ {
+ case 'A': signal (SIGPIPE, SIG_DFL); break;
+ case 'B': signal (SIGPIPE, SIG_IGN); break;
+ case 'C': signal (SIGPIPE, handler); break;
+ }
+
+ /* Produce infinite output. Since it is piped into "head -1", the writes
+ must ultimately fail. */
+ for (;;)
+ {
+ char c[2] = { 'y', '\n' };
+ int ret = write (1, c, sizeof (c));
+ if (ret <= 0)
+ {
+ switch (mode)
+ {
+ case 'B': /* The write() call should have failed with EPIPE. */
+ if (ret < 0 && errno == EPIPE)
+ exit (0);
+ /*FALLTHROUGH*/
+ case 'A': /* The process should silently die. */
+ case 'C': /* The handler should have been called. */
+ fprintf (stderr, "write() returned %d with error %d.\n", ret, errno);
+ exit (1);
+ }
+ }
+ }
+}
diff --git a/tests/test-sigpipe.sh b/tests/test-sigpipe.sh
new file mode 100755
index 0000000..bc2baf2
--- /dev/null
+++ b/tests/test-sigpipe.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+# Test signal's default behaviour.
+tmpfiles="$tmpfiles t-sigpipeA.tmp"
+./test-sigpipe${EXEEXT} A 2> t-sigpipeA.tmp | head -1 > /dev/null
+if test -s t-sigpipeA.tmp; then
+ LC_ALL=C tr -d '\r' < t-sigpipeA.tmp
+ rm -fr $tmpfiles; exit 1
+fi
+
+# Test signal's ignored behaviour.
+tmpfiles="$tmpfiles t-sigpipeB.tmp"
+./test-sigpipe${EXEEXT} B 2> t-sigpipeB.tmp | head -1 > /dev/null
+if test -s t-sigpipeB.tmp; then
+ LC_ALL=C tr -d '\r' < t-sigpipeB.tmp
+ rm -fr $tmpfiles; exit 1
+fi
+
+# Test signal's behaviour when a handler is installed.
+tmpfiles="$tmpfiles t-sigpipeC.tmp"
+./test-sigpipe${EXEEXT} B 2> t-sigpipeC.tmp | head -1 > /dev/null
+if test -s t-sigpipeC.tmp; then
+ LC_ALL=C tr -d '\r' < t-sigpipeC.tmp
+ rm -fr $tmpfiles; exit 1
+fi
+
+rm -fr $tmpfiles
+exit 0
diff --git a/tests/test-sigprocmask.c b/tests/test-sigprocmask.c
new file mode 100644
index 0000000..6aaf74d
--- /dev/null
+++ b/tests/test-sigprocmask.c
@@ -0,0 +1,102 @@
+/* Test of sigprocmask.
+ 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 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2011. */
+
+#include <config.h>
+
+#include <signal.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (sigprocmask, int, (int, const sigset_t *, sigset_t *));
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__)
+
+static volatile int sigint_occurred;
+
+static void
+sigint_handler (int sig)
+{
+ sigint_occurred++;
+}
+
+int
+main (int argc, char *argv[])
+{
+ sigset_t set;
+ pid_t pid = getpid ();
+ char command[80];
+
+ if (sizeof (int) < sizeof pid && 0x7fffffff < pid)
+ {
+ fputs ("Skipping test: pid too large\n", stderr);
+ return 77;
+ }
+
+ signal (SIGINT, sigint_handler);
+
+ sigemptyset (&set);
+ sigaddset (&set, SIGINT);
+
+ /* Check error handling. */
+ ASSERT (sigprocmask (1729, &set, NULL) == -1);
+ ASSERT (errno == EINVAL);
+
+ /* Block SIGINT. */
+ ASSERT (sigprocmask (SIG_BLOCK, &set, NULL) == 0);
+
+ /* Request a SIGINT signal from outside. */
+ sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, (int) pid);
+ ASSERT (system (command) == 0);
+
+ /* Wait. */
+ sleep (2);
+
+ /* The signal should not have arrived yet, because it is blocked. */
+ ASSERT (sigint_occurred == 0);
+
+ /* Unblock SIGINT. */
+ ASSERT (sigprocmask (SIG_UNBLOCK, &set, NULL) == 0);
+
+ /* The signal should have arrived now, because POSIX says
+ "If there are any pending unblocked signals after the call to
+ sigprocmask(), at least one of those signals shall be delivered
+ before the call to sigprocmask() returns." */
+ ASSERT (sigint_occurred == 1);
+
+ return 0;
+}
+
+#else
+
+/* On native Windows, getpid() values and the arguments that are passed to
+ the (Cygwin?) 'kill' program are not necessarily related. */
+
+int
+main ()
+{
+ fputs ("Skipping test: native Windows platform\n", stderr);
+ return 77;
+}
+
+#endif
diff --git a/tests/test-sleep.c b/tests/test-sleep.c
new file mode 100644
index 0000000..d232cd0
--- /dev/null
+++ b/tests/test-sleep.c
@@ -0,0 +1,58 @@
+/* Test of sleep() function.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (sleep, unsigned int, (unsigned int));
+
+#include <signal.h>
+
+#include "macros.h"
+
+#if HAVE_DECL_ALARM
+static void
+handle_alarm (int sig)
+{
+ if (sig != SIGALRM)
+ _exit (1);
+}
+#endif
+
+int
+main (void)
+{
+ ASSERT (sleep (1) <= 1);
+
+ ASSERT (sleep (0) == 0);
+
+#if HAVE_DECL_ALARM
+ {
+ const unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */
+ unsigned int remaining;
+ signal (SIGALRM, handle_alarm);
+ alarm (1);
+ remaining = sleep (pentecost);
+ ASSERT (pentecost - 10 < remaining && remaining <= pentecost);
+ }
+#endif
+
+ return 0;
+}
diff --git a/tests/test-snprintf.c b/tests/test-snprintf.c
index 95a352d..108346e 100644
--- a/tests/test-snprintf.c
+++ b/tests/test-snprintf.c
@@ -1,5 +1,5 @@
/* Test of snprintf() function.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -52,7 +52,7 @@ main (int argc, char *argv[])
#if !CHECK_SNPRINTF_POSIX
if (size > 0)
#endif
- ASSERT (memcmp (buf + size, "DEADBEEF" + size, 8 - size) == 0);
+ ASSERT (memcmp (buf + size, &"DEADBEEF"[size], 8 - size) == 0);
}
else
{
@@ -60,5 +60,13 @@ main (int argc, char *argv[])
}
}
+ /* Test the support of the POSIX/XSI format strings with positions. */
+ {
+ char result[100];
+ retval = snprintf (result, sizeof (result), "%2$d %1$d", 33, 55);
+ ASSERT (strcmp (result, "55 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
return 0;
}
diff --git a/tests/test-spawn-c++.cc b/tests/test-spawn-c++.cc
index fb54c2e..1a1f4af 100644
--- a/tests/test-spawn-c++.cc
+++ b/tests/test-spawn-c++.cc
@@ -1,5 +1,5 @@
/* Test of <spawn.h> substitute in C++ mode.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-spawn-pipe-child.c b/tests/test-spawn-pipe-child.c
new file mode 100644
index 0000000..2531459
--- /dev/null
+++ b/tests/test-spawn-pipe-child.c
@@ -0,0 +1,119 @@
+/* Child program invoked by test-spawn-pipe-main.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ 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 <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Get declarations of the native Windows API functions. */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+
+/* Depending on arguments, this test intentionally closes stderr or
+ starts life with stderr closed. 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;
+
+/* In this file, we use only system functions, no overrides from gnulib. */
+#undef atoi
+#undef close
+#undef fcntl
+#undef fdopen
+#undef fflush
+#undef fprintf
+#undef read
+#undef write
+
+/* 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
+}
+
+int
+main (int argc, char *argv[])
+{
+ char buffer[2] = { 's', 't' };
+ int fd;
+
+ /* fd 2 might be closed, but fd BACKUP_STDERR_FILENO is the original
+ stderr. */
+ myerr = fdopen (BACKUP_STDERR_FILENO, "w");
+ if (!myerr)
+ return 2;
+
+ ASSERT (argc == 2);
+
+ /* Read one byte from fd 0, and write its value plus one to fd 1.
+ fd 2 should be closed iff the argument is 1. Check that no other file
+ descriptors leaked. */
+
+ ASSERT (read (STDIN_FILENO, buffer, 2) == 1);
+
+ buffer[0]++;
+ ASSERT (write (STDOUT_FILENO, buffer, 1) == 1);
+
+ switch (atoi (argv[1]))
+ {
+ case 0:
+ /* Expect fd 2 is open. */
+ ASSERT (is_open (STDERR_FILENO));
+ break;
+ case 1:
+ /* Expect fd 2 is closed.
+ But on HP-UX 11, fd 2 gets automatically re-opened to /dev/null if it
+ was closed. Future POSIX will allow this, see
+ <http://austingroupbugs.net/view.php?id=173>. */
+#if !defined __hpux
+ ASSERT (! is_open (STDERR_FILENO));
+#endif
+ break;
+ default:
+ ASSERT (0);
+ }
+
+ for (fd = 3; fd < 7; fd++)
+ {
+ errno = 0;
+ ASSERT (close (fd) == -1);
+ ASSERT (errno == EBADF);
+ }
+
+ return 0;
+}
diff --git a/tests/test-spawn-pipe.c b/tests/test-spawn-pipe-main.c
index 5653150..c07c3d2 100644
--- a/tests/test-spawn-pipe.c
+++ b/tests/test-spawn-pipe-main.c
@@ -1,5 +1,5 @@
/* Test of create_pipe_bidi/wait_subprocess.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,15 +12,14 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#include "spawn-pipe.h"
#include "wait-process.h"
+#include "progname.h"
-#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
@@ -38,70 +37,23 @@
static FILE *myerr;
-/* Code executed by the child process. argv[1] = "child". */
-static int
-child_main (int argc, char *argv[])
-{
- char buffer[2] = { 's', 't' };
- int fd;
- int ret;
-
- ASSERT (argc == 3);
-
- /* Read one byte from fd 0, and write its value plus one to fd 1.
- fd 2 should be closed iff the argument is 1. Check that no other file
- descriptors leaked. */
-
- ASSERT (read (STDIN_FILENO, buffer, 2) == 1);
-
- buffer[0]++;
- ASSERT (write (STDOUT_FILENO, buffer, 1) == 1);
-
- errno = 0;
- ret = dup2 (STDERR_FILENO, STDERR_FILENO);
- switch (atoi (argv[2]))
- {
- case 0:
- /* Expect fd 2 is open. */
- ASSERT (ret == STDERR_FILENO);
- break;
- case 1:
- /* Expect fd 2 is closed. */
- ASSERT (ret == -1);
- ASSERT (errno == EBADF);
- break;
- default:
- ASSERT (false);
- }
-
- for (fd = 3; fd < 7; fd++)
- {
- errno = 0;
- ASSERT (close (fd) == -1);
- ASSERT (errno == EBADF);
- }
-
- return 0;
-}
-
/* Create a bi-directional pipe to a test child, and validate that the
- child program returns the expected output. The child is the same
- program as the parent ARGV0, but with different arguments.
+ child program returns the expected output.
+ PROG is the program to run in the child process.
STDERR_CLOSED is true if we have already closed fd 2. */
static void
-test_pipe (const char *argv0, bool stderr_closed)
+test_pipe (const char *prog, bool stderr_closed)
{
int fd[2];
- char *argv[4];
+ char *argv[3];
pid_t pid;
char buffer[2] = { 'a', 't' };
/* Set up child. */
- argv[0] = (char *) argv0;
- argv[1] = (char *) "child";
- argv[2] = (char *) (stderr_closed ? "1" : "0");
- argv[3] = NULL;
- pid = create_pipe_bidi (argv0, argv0, argv, false, true, true, fd);
+ argv[0] = (char *) prog;
+ argv[1] = (char *) (stderr_closed ? "1" : "0");
+ argv[2] = NULL;
+ pid = create_pipe_bidi (prog, prog, argv, false, true, true, fd);
ASSERT (0 <= pid);
ASSERT (STDERR_FILENO < fd[0]);
ASSERT (STDERR_FILENO < fd[1]);
@@ -114,7 +66,7 @@ test_pipe (const char *argv0, bool stderr_closed)
ASSERT (read (fd[0], buffer, 2) == 1);
/* Wait for child. */
- ASSERT (wait_subprocess (pid, argv0, true, false, true, true, NULL) == 0);
+ ASSERT (wait_subprocess (pid, prog, true, false, true, true, NULL) == 0);
ASSERT (close (fd[0]) == 0);
/* Check the result. */
@@ -122,18 +74,27 @@ test_pipe (const char *argv0, bool stderr_closed)
ASSERT (buffer[1] == 't');
}
-/* Code executed by the parent process. */
-static int
-parent_main (int argc, char *argv[])
+int
+main (int argc, char *argv[])
{
int test;
int fd;
- ASSERT (argc == 2);
+ set_program_name (argv[0]);
+
+ if (argc != 3)
+ {
+ fprintf (stderr, "%s: need 2 arguments\n", argv[0]);
+ return 2;
+ }
+ /* We might close fd 2 later, so save it in fd 10. */
+ if (dup2 (STDERR_FILENO, BACKUP_STDERR_FILENO) != BACKUP_STDERR_FILENO
+ || (myerr = fdopen (BACKUP_STDERR_FILENO, "w")) == NULL)
+ return 2;
/* Selectively close various standard fds, to verify the child process is
not impacted by this. */
- test = atoi (argv[1]);
+ test = atoi (argv[2]);
switch (test)
{
case 0:
@@ -174,31 +135,7 @@ parent_main (int argc, char *argv[])
for (fd = 3; fd < 7; fd++)
close (fd);
- test_pipe (argv[0], test >= 4);
+ test_pipe (argv[1], test >= 4);
return 0;
}
-
-int
-main (int argc, char *argv[])
-{
- if (argc < 2)
- {
- fprintf (stderr, "%s: need arguments\n", argv[0]);
- return 2;
- }
- if (strcmp (argv[1], "child") == 0)
- {
- /* fd 2 might be closed, but fd BACKUP_STDERR_FILENO is the original
- stderr. */
- myerr = fdopen (BACKUP_STDERR_FILENO, "w");
- if (!myerr)
- return 2;
- return child_main (argc, argv);
- }
- /* We might close fd 2 later, so save it in fd 10. */
- if (dup2 (STDERR_FILENO, BACKUP_STDERR_FILENO) != BACKUP_STDERR_FILENO
- || (myerr = fdopen (BACKUP_STDERR_FILENO, "w")) == NULL)
- return 2;
- return parent_main (argc, argv);
-}
diff --git a/tests/test-spawn-pipe.sh b/tests/test-spawn-pipe.sh
index 2e4ea12..676026c 100755
--- a/tests/test-spawn-pipe.sh
+++ b/tests/test-spawn-pipe.sh
@@ -2,7 +2,7 @@
st=0
for i in 0 1 2 3 4 5 6 7 ; do
- ./test-spawn-pipe${EXEEXT} $i \
+ ./test-spawn-pipe-main${EXEEXT} ./test-spawn-pipe-child${EXEEXT} $i \
|| { echo test-spawn-pipe.sh: iteration $i failed >&2; st=1; }
done
exit $st
diff --git a/tests/test-spawn.c b/tests/test-spawn.c
index 01d4503..5b68171 100644
--- a/tests/test-spawn.c
+++ b/tests/test-spawn.c
@@ -1,5 +1,5 @@
/* Test of <spawn.h> substitute.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -40,7 +40,7 @@ extern void f (struct sched_param *g);
int
main (void)
{
- switch (0)
+ switch (POSIX_SPAWN_RESETIDS)
{
case POSIX_SPAWN_RESETIDS:
case POSIX_SPAWN_SETPGROUP:
diff --git a/tests/test-stat.c b/tests/test-stat.c
index 4cda089..b59dbf4 100644
--- a/tests/test-stat.c
+++ b/tests/test-stat.c
@@ -1,5 +1,5 @@
/* Tests of stat.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -33,7 +33,6 @@ SIGNATURE_CHECK (stat, int, (char const *, struct stat *));
#include <stdio.h>
#include <unistd.h>
-#include "pathmax.h"
#include "same-inode.h"
#include "macros.h"
diff --git a/tests/test-stat.h b/tests/test-stat.h
index 22552dc..5409e05 100644
--- a/tests/test-stat.h
+++ b/tests/test-stat.h
@@ -1,5 +1,5 @@
/* Tests of stat.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -27,9 +27,9 @@ test_stat_func (int (*func) (char const *, struct stat *), bool print)
{
struct stat st1;
struct stat st2;
- char cwd[PATH_MAX];
+ char *cwd = getcwd (NULL, 0);
- ASSERT (getcwd (cwd, PATH_MAX) == cwd);
+ ASSERT (cwd);
ASSERT (func (".", &st1) == 0);
ASSERT (func ("./", &st2) == 0);
ASSERT (SAME_INODE (st1, st2));
diff --git a/tests/test-stdbool.c b/tests/test-stdbool.c
index e115ba2..3c13ca2 100644
--- a/tests/test-stdbool.c
+++ b/tests/test-stdbool.c
@@ -1,5 +1,5 @@
/* Test of <stdbool.h> substitute.
- Copyright (C) 2002-2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2002-2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-stddef.c b/tests/test-stddef.c
index c929af8..f42b4e0 100644
--- a/tests/test-stddef.c
+++ b/tests/test-stddef.c
@@ -1,5 +1,5 @@
/* Test of <stddef.h> substitute.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-stdint.c b/tests/test-stdint.c
index f606cc3..1c559b0 100644
--- a/tests/test-stdint.c
+++ b/tests/test-stdint.c
@@ -1,5 +1,5 @@
/* Test of <stdint.h> substitute.
- Copyright (C) 2006-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -21,8 +21,6 @@
/* Whether to enable pedantic checks. */
#define DO_PEDANTIC 0
-#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
-#define __STDC_CONSTANT_MACROS 1 /* likewise */
#include <stdint.h>
#include "verify.h"
diff --git a/tests/test-stdio-c++.cc b/tests/test-stdio-c++.cc
index a9d00a3..ae1177b 100644
--- a/tests/test-stdio-c++.cc
+++ b/tests/test-stdio-c++.cc
@@ -1,5 +1,5 @@
/* Test of <stdio.h> substitute in C++ mode.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -32,10 +32,22 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::dprintf, int, (int, const char *, ...));
SIGNATURE_CHECK (GNULIB_NAMESPACE::fclose, int, (FILE *));
#endif
+#if GNULIB_TEST_FDOPEN
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fdopen, FILE *, (int, const char *));
+#endif
+
#if GNULIB_TEST_FFLUSH
SIGNATURE_CHECK (GNULIB_NAMESPACE::fflush, int, (FILE *));
#endif
+#if GNULIB_TEST_FGETC
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fgetc, int, (FILE *));
+#endif
+
+#if GNULIB_TEST_FGETS
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fgets, char *, (char *, int, FILE *));
+#endif
+
#if GNULIB_TEST_FOPEN
SIGNATURE_CHECK (GNULIB_NAMESPACE::fopen, FILE *,
(const char *, const char *));
@@ -57,11 +69,20 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::fputc, int, (int, FILE *));
SIGNATURE_CHECK (GNULIB_NAMESPACE::fputs, int, (const char *, FILE *));
#endif
+#if GNULIB_TEST_FREAD
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fread, size_t,
+ (void *, size_t, size_t, FILE *));
+#endif
+
#if GNULIB_TEST_FREOPEN
SIGNATURE_CHECK (GNULIB_NAMESPACE::freopen, FILE *,
(const char *, const char *, FILE *));
#endif
+#if GNULIB_TEST_FSCANF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fscanf, int, (FILE *, const char *, ...));
+#endif
+
#if GNULIB_TEST_FSEEK
SIGNATURE_CHECK (GNULIB_NAMESPACE::fseek, int, (FILE *, long, int));
#endif
@@ -83,6 +104,14 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::fwrite, size_t,
(const void *, size_t, size_t, FILE *));
#endif
+#if GNULIB_TEST_GETC
+SIGNATURE_CHECK (GNULIB_NAMESPACE::getc, int, (FILE *));
+#endif
+
+#if GNULIB_TEST_GETCHAR
+SIGNATURE_CHECK (GNULIB_NAMESPACE::getchar, int, (void));
+#endif
+
#if GNULIB_TEST_GETDELIM
SIGNATURE_CHECK (GNULIB_NAMESPACE::getdelim, ssize_t,
(char **, size_t *, int, FILE *));
@@ -93,6 +122,8 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::getline, ssize_t,
(char **, size_t *, FILE *));
#endif
+/* Don't bother testing gets; it should never be used. */
+
#if GNULIB_TEST_OBSTACK_PRINTF || GNULIB_TEST_OBSTACK_PRINTF_POSIX
SIGNATURE_CHECK (GNULIB_NAMESPACE::obstack_printf, int,
(struct obstack *, const char *, ...));
@@ -140,6 +171,10 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::renameat, int,
(int, char const *, int, char const *));
#endif
+#if GNULIB_TEST_SCANF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::scanf, int, (const char *, ...));
+#endif
+
#if GNULIB_TEST_SNPRINTF
SIGNATURE_CHECK (GNULIB_NAMESPACE::snprintf, int,
(char *, size_t, const char *, ...));
@@ -170,10 +205,19 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::vfprintf, int,
(FILE *, const char *, va_list));
#endif
+#if GNULIB_TEST_VFSCANF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::vfscanf, int,
+ (FILE *, const char *, va_list));
+#endif
+
#if GNULIB_TEST_VPRINTF_POSIX || GNULIB_TEST_VPRINTF
SIGNATURE_CHECK (GNULIB_NAMESPACE::vprintf, int, (const char *, va_list));
#endif
+#if GNULIB_TEST_VSCANF
+SIGNATURE_CHECK (GNULIB_NAMESPACE::vscanf, int, (const char *, va_list));
+#endif
+
#if GNULIB_TEST_VSNPRINTF
SIGNATURE_CHECK (GNULIB_NAMESPACE::vsnprintf, int,
(char *, size_t, const char *, va_list));
diff --git a/tests/test-stdio-c++2.cc b/tests/test-stdio-c++2.cc
index 4e41627..a646210 100644
--- a/tests/test-stdio-c++2.cc
+++ b/tests/test-stdio-c++2.cc
@@ -1,5 +1,5 @@
/* Test of <stdio.h> substitute in C++ mode.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-stdio.c b/tests/test-stdio.c
index 7e7a206..89c6548 100644
--- a/tests/test-stdio.c
+++ b/tests/test-stdio.c
@@ -1,5 +1,5 @@
/* Test of <stdio.h> substitute.
- Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-stdlib-c++.cc b/tests/test-stdlib-c++.cc
index 9010c1c..68e96f2 100644
--- a/tests/test-stdlib-c++.cc
+++ b/tests/test-stdlib-c++.cc
@@ -1,5 +1,5 @@
/* Test of <stdlib.h> substitute in C++ mode.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-stdlib-c++2.cc b/tests/test-stdlib-c++2.cc
index f9b8e96..45304d5 100644
--- a/tests/test-stdlib-c++2.cc
+++ b/tests/test-stdlib-c++2.cc
@@ -1,5 +1,5 @@
/* Test of <stdlib.h> substitute in C++ mode.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-stdlib.c b/tests/test-stdlib.c
index 210aab4..6d38156 100644
--- a/tests/test-stdlib.c
+++ b/tests/test-stdlib.c
@@ -1,5 +1,5 @@
/* Test of <stdlib.h> substitute.
- Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-strchrnul.c b/tests/test-strchrnul.c
index 6ea8adc..ac3b3dd 100644
--- a/tests/test-strchrnul.c
+++ b/tests/test-strchrnul.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2013 Free Software Foundation, Inc.
* Written by Eric Blake and Bruno Haible
*
* This program is free software: you can redistribute it and/or modify
diff --git a/tests/test-strerror.c b/tests/test-strerror.c
index 66dbe82..6d5db0f 100644
--- a/tests/test-strerror.c
+++ b/tests/test-strerror.c
@@ -1,5 +1,5 @@
/* Test of strerror() function.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
/* Written by Eric Blake <ebb9@byu.net>, 2007. */
@@ -33,25 +32,44 @@ main (void)
{
char *str;
+ errno = 0;
str = strerror (EACCES);
ASSERT (str);
ASSERT (*str);
+ ASSERT (errno == 0);
+ errno = 0;
str = strerror (ETIMEDOUT);
ASSERT (str);
ASSERT (*str);
+ ASSERT (errno == 0);
+ errno = 0;
str = strerror (EOVERFLOW);
ASSERT (str);
ASSERT (*str);
+ ASSERT (errno == 0);
+ /* POSIX requires strerror (0) to succeed. Reject use of "Unknown
+ error", but allow "Success", "No error", or even Solaris' "Error
+ 0" which are distinct patterns from true out-of-range strings.
+ http://austingroupbugs.net/view.php?id=382 */
+ errno = 0;
str = strerror (0);
ASSERT (str);
ASSERT (*str);
-
+ ASSERT (errno == 0);
+ ASSERT (strstr (str, "nknown") == NULL);
+ ASSERT (strstr (str, "ndefined") == NULL);
+
+ /* POSIX requires strerror to produce a non-NULL result for all
+ inputs; as an extension, we also guarantee a non-empty result.
+ Reporting EINVAL is optional. */
+ errno = 0;
str = strerror (-3);
ASSERT (str);
ASSERT (*str);
+ ASSERT (errno == 0 || errno == EINVAL);
return 0;
}
diff --git a/tests/test-string-c++.cc b/tests/test-string-c++.cc
index df21393..c2fd6a0 100644
--- a/tests/test-string-c++.cc
+++ b/tests/test-string-c++.cc
@@ -1,5 +1,5 @@
/* Test of <string.h> substitute in C++ mode.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-string-c++2.cc b/tests/test-string-c++2.cc
index 43103c9..de90885 100644
--- a/tests/test-string-c++2.cc
+++ b/tests/test-string-c++2.cc
@@ -1,5 +1,5 @@
/* Test of <string.h> substitute in C++ mode.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-string.c b/tests/test-string.c
index 54c49a9..76922d1 100644
--- a/tests/test-string.c
+++ b/tests/test-string.c
@@ -1,5 +1,5 @@
/* Test of <string.h> substitute.
- Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-strnlen.c b/tests/test-strnlen.c
index 18d6fcd..33de935 100644
--- a/tests/test-strnlen.c
+++ b/tests/test-strnlen.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ * Copyright (C) 2010-2013 Free Software Foundation, Inc.
* Written by Eric Blake
*
* This program is free software: you can redistribute it and/or modify
diff --git a/tests/test-strsignal.c b/tests/test-strsignal.c
index 6b90cef..8d68228 100644
--- a/tests/test-strsignal.c
+++ b/tests/test-strsignal.c
@@ -1,5 +1,5 @@
/* Test of strsignal() function.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,8 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
/* Written by Colin Watson <cjwatson@debian.org>, 2008. */
diff --git a/tests/test-strstr.c b/tests/test-strstr.c
index d6d6639..80e8093 100644
--- a/tests/test-strstr.c
+++ b/tests/test-strstr.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2007-2011 Free Software Foundation, Inc.
+ * Copyright (C) 2004, 2007-2013 Free Software Foundation, Inc.
* Written by Bruno Haible and Eric Blake
*
* This program is free software: you can redistribute it and/or modify
@@ -37,8 +37,9 @@ main (int argc, char *argv[])
caused by SIGALRM. All known platforms that lack alarm also have
a quadratic strstr, and the replacement strstr is known to not
take too long. */
+ int alarm_value = 50;
signal (SIGALRM, SIG_DFL);
- alarm (50);
+ alarm (alarm_value);
#endif
{
diff --git a/tests/test-strtod.c b/tests/test-strtod.c
index 327da4f..f23bf6b 100644
--- a/tests/test-strtod.c
+++ b/tests/test-strtod.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2013 Free Software Foundation, Inc.
* Written by Eric Blake
*
* This program is free software: you can redistribute it and/or modify
@@ -383,7 +383,7 @@ main (void)
result = strtod (input, &ptr);
ASSERT (result == 0.0);
ASSERT (!signbit (result));
- ASSERT (ptr == input + 1); /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2, AIX 7.1 */
+ ASSERT (ptr == input + 1); /* glibc-2.3.6, Mac OS X 10.3, FreeBSD 6.2, AIX 7.1 */
ASSERT (errno == 0);
}
{
@@ -404,8 +404,8 @@ main (void)
errno = 0;
result = strtod (input, &ptr);
ASSERT (result == 0.0);
- ASSERT (!!signbit (result) == !!signbit (minus_zerod)); /* MacOS X 10.3, FreeBSD 6.2, IRIX 6.5, OSF/1 4.0 */
- ASSERT (ptr == input + 2); /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2, AIX 7.1 */
+ ASSERT (!!signbit (result) == !!signbit (minus_zerod)); /* Mac OS X 10.3, FreeBSD 6.2, IRIX 6.5, OSF/1 4.0 */
+ ASSERT (ptr == input + 2); /* glibc-2.3.6, Mac OS X 10.3, FreeBSD 6.2, AIX 7.1 */
ASSERT (errno == 0);
}
{
@@ -416,7 +416,7 @@ main (void)
result = strtod (input, &ptr);
ASSERT (result == 0.0);
ASSERT (!signbit (result));
- ASSERT (ptr == input + 1); /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2, AIX 7.1 */
+ ASSERT (ptr == input + 1); /* glibc-2.3.6, Mac OS X 10.3, FreeBSD 6.2, AIX 7.1 */
ASSERT (errno == 0);
}
{
@@ -427,7 +427,7 @@ main (void)
result = strtod (input, &ptr);
ASSERT (result == 0.0);
ASSERT (!signbit (result));
- ASSERT (ptr == input + 1); /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2, AIX 7.1 */
+ ASSERT (ptr == input + 1); /* glibc-2.3.6, Mac OS X 10.3, FreeBSD 6.2, AIX 7.1 */
ASSERT (errno == 0);
}
{
@@ -438,7 +438,7 @@ main (void)
result = strtod (input, &ptr);
ASSERT (result == 0.0);
ASSERT (!signbit (result));
- ASSERT (ptr == input + 1); /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2, AIX 7.1 */
+ ASSERT (ptr == input + 1); /* glibc-2.3.6, Mac OS X 10.3, FreeBSD 6.2, AIX 7.1 */
ASSERT (errno == 0);
}
{
@@ -449,7 +449,7 @@ main (void)
result = strtod (input, &ptr);
ASSERT (result == 0.0);
ASSERT (!signbit (result));
- ASSERT (ptr == input + 1); /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2, AIX 7.1 */
+ ASSERT (ptr == input + 1); /* glibc-2.3.6, Mac OS X 10.3, FreeBSD 6.2, AIX 7.1 */
ASSERT (errno == 0);
}
{
@@ -460,7 +460,7 @@ main (void)
result = strtod (input, &ptr);
ASSERT (result == 0.0);
ASSERT (!signbit (result));
- ASSERT (ptr == input + 1); /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2, AIX 7.1 */
+ ASSERT (ptr == input + 1); /* glibc-2.3.6, Mac OS X 10.3, FreeBSD 6.2, AIX 7.1 */
ASSERT (errno == 0);
}
{
@@ -471,7 +471,7 @@ main (void)
result = strtod (input, &ptr);
ASSERT (result == 0.0);
ASSERT (!signbit (result));
- ASSERT (ptr == input + 1); /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2, AIX 7.1 */
+ ASSERT (ptr == input + 1); /* glibc-2.3.6, Mac OS X 10.3, FreeBSD 6.2, AIX 7.1 */
ASSERT (errno == 0);
}
{
@@ -482,7 +482,7 @@ main (void)
result = strtod (input, &ptr);
ASSERT (result == 0.0);
ASSERT (!signbit (result));
- ASSERT (ptr == input + 1); /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2, AIX 7.1 */
+ ASSERT (ptr == input + 1); /* glibc-2.3.6, Mac OS X 10.3, FreeBSD 6.2, AIX 7.1 */
ASSERT (errno == 0);
}
{
@@ -703,8 +703,8 @@ main (void)
worrying about. */
ASSERT (!!signbit (result1) != !!signbit (result2)); /* glibc-2.3.6, IRIX 6.5, OSF/1 5.1, mingw */
# endif
- ASSERT (ptr1 == input + 6); /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2, OpenBSD 4.0, AIX 7.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
- ASSERT (ptr2 == input + 6); /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2, OpenBSD 4.0, AIX 7.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
+ ASSERT (ptr1 == input + 6); /* glibc-2.3.6, Mac OS X 10.3, FreeBSD 6.2, OpenBSD 4.0, AIX 7.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
+ ASSERT (ptr2 == input + 6); /* glibc-2.3.6, Mac OS X 10.3, FreeBSD 6.2, OpenBSD 4.0, AIX 7.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
ASSERT (errno == 0);
#else
ASSERT (result1 == 0.0);
@@ -724,7 +724,7 @@ main (void)
result = strtod (input, &ptr);
#if 1 /* All known CPUs support NaNs. */
ASSERT (isnand (result)); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
- ASSERT (ptr == input + 6); /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2, OpenBSD 4.0, AIX 7.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
+ ASSERT (ptr == input + 6); /* glibc-2.3.6, Mac OS X 10.3, FreeBSD 6.2, OpenBSD 4.0, AIX 7.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
ASSERT (errno == 0);
#else
ASSERT (result == 0.0);
@@ -920,9 +920,9 @@ main (void)
input[m] = '\0';
errno = 0;
result = strtod (input, &ptr);
- ASSERT (result == 1.0); /* MacOS X 10.3, FreeBSD 6.2, NetBSD 3.0, OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */
+ ASSERT (result == 1.0); /* Mac OS X 10.3, FreeBSD 6.2, NetBSD 3.0, OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */
ASSERT (ptr == input + m); /* OSF/1 5.1 */
- ASSERT (errno == 0); /* MacOS X 10.3, FreeBSD 6.2, NetBSD 3.0, OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */
+ ASSERT (errno == 0); /* Mac OS X 10.3, FreeBSD 6.2, NetBSD 3.0, OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */
}
free (input);
}
@@ -946,9 +946,9 @@ main (void)
input[m] = '\0';
errno = 0;
result = strtod (input, &ptr);
- ASSERT (result == 1.0); /* MacOS X 10.3, FreeBSD 6.2, NetBSD 3.0, OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */
+ ASSERT (result == 1.0); /* Mac OS X 10.3, FreeBSD 6.2, NetBSD 3.0, OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */
ASSERT (ptr == input + m);
- ASSERT (errno == 0); /* MacOS X 10.3, FreeBSD 6.2, NetBSD 3.0, OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */
+ ASSERT (errno == 0); /* Mac OS X 10.3, FreeBSD 6.2, NetBSD 3.0, OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */
}
free (input);
}
diff --git a/tests/test-symlink.c b/tests/test-symlink.c
index 367e045..9966516 100644
--- a/tests/test-symlink.c
+++ b/tests/test-symlink.c
@@ -1,5 +1,5 @@
/* Tests of symlink.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-symlink.h b/tests/test-symlink.h
index 4d93929..56cdc84 100644
--- a/tests/test-symlink.h
+++ b/tests/test-symlink.h
@@ -1,5 +1,5 @@
/* Tests of symlink.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-sys_stat-c++.cc b/tests/test-sys_stat-c++.cc
index 2efa9b7..9bac660 100644
--- a/tests/test-sys_stat-c++.cc
+++ b/tests/test-sys_stat-c++.cc
@@ -1,5 +1,5 @@
/* Test of <sys/stat.h> substitute in C++ mode.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -29,7 +29,9 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::fchmodat, int,
(int, char const *, mode_t, int));
#endif
+#if GNULIB_TEST_FSTAT
SIGNATURE_CHECK (GNULIB_NAMESPACE::fstat, int, (int, struct stat *));
+#endif
#if GNULIB_TEST_FSTATAT
SIGNATURE_CHECK (GNULIB_NAMESPACE::fstatat, int,
diff --git a/tests/test-sys_stat.c b/tests/test-sys_stat.c
index cd07d86..1ce3581 100644
--- a/tests/test-sys_stat.c
+++ b/tests/test-sys_stat.c
@@ -1,5 +1,5 @@
/* Test of <sys/stat.h> substitute.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -26,11 +26,14 @@
int a[] =
{
S_IFMT,
- S_IFBLK, S_IFCHR, S_IFDIR, S_IFIFO, S_IFREG,
-#ifdef S_IFLNK /* missing on mingw and djgpp */
+#ifdef S_IFBLK /* missing on MSVC */
+ S_IFBLK,
+#endif
+ S_IFCHR, S_IFDIR, S_IFIFO, S_IFREG,
+#ifdef S_IFLNK /* missing on native Windows and DJGPP */
S_IFLNK,
#endif
-#ifdef S_IFSOCK /* missing on mingw and djgpp */
+#ifdef S_IFSOCK /* missing on native Windows and DJGPP */
S_IFSOCK,
#endif
S_IRWXU, S_IRUSR, S_IWUSR, S_IXUSR,
@@ -46,6 +49,7 @@ int a[] =
S_ISSOCK (S_IFREG),
S_ISDOOR (S_IFREG),
S_ISMPB (S_IFREG),
+ S_ISMPX (S_IFREG),
S_ISNAM (S_IFREG),
S_ISNWK (S_IFREG),
S_ISPORT (S_IFREG),
@@ -61,7 +65,9 @@ verify (S_IRWXU == (S_IRUSR | S_IWUSR | S_IXUSR));
verify (S_IRWXG == (S_IRGRP | S_IWGRP | S_IXGRP));
verify (S_IRWXO == (S_IROTH | S_IWOTH | S_IXOTH));
+#ifdef S_IFBLK
verify (S_ISBLK (S_IFBLK));
+#endif
verify (!S_ISBLK (S_IFCHR));
verify (!S_ISBLK (S_IFDIR));
verify (!S_ISBLK (S_IFIFO));
@@ -73,7 +79,9 @@ verify (!S_ISBLK (S_IFLNK));
verify (!S_ISBLK (S_IFSOCK));
#endif
+#ifdef S_IFBLK
verify (!S_ISCHR (S_IFBLK));
+#endif
verify (S_ISCHR (S_IFCHR));
verify (!S_ISCHR (S_IFDIR));
verify (!S_ISCHR (S_IFIFO));
@@ -85,7 +93,9 @@ verify (!S_ISCHR (S_IFLNK));
verify (!S_ISCHR (S_IFSOCK));
#endif
+#ifdef S_IFBLK
verify (!S_ISDIR (S_IFBLK));
+#endif
verify (!S_ISDIR (S_IFCHR));
verify (S_ISDIR (S_IFDIR));
verify (!S_ISDIR (S_IFIFO));
@@ -97,7 +107,9 @@ verify (!S_ISDIR (S_IFLNK));
verify (!S_ISDIR (S_IFSOCK));
#endif
+#ifdef S_IFBLK
verify (!S_ISFIFO (S_IFBLK));
+#endif
verify (!S_ISFIFO (S_IFCHR));
verify (!S_ISFIFO (S_IFDIR));
verify (S_ISFIFO (S_IFIFO));
@@ -109,7 +121,9 @@ verify (!S_ISFIFO (S_IFLNK));
verify (!S_ISFIFO (S_IFSOCK));
#endif
+#ifdef S_IFBLK
verify (!S_ISREG (S_IFBLK));
+#endif
verify (!S_ISREG (S_IFCHR));
verify (!S_ISREG (S_IFDIR));
verify (!S_ISREG (S_IFIFO));
@@ -121,7 +135,9 @@ verify (!S_ISREG (S_IFLNK));
verify (!S_ISREG (S_IFSOCK));
#endif
+#ifdef S_IFBLK
verify (!S_ISLNK (S_IFBLK));
+#endif
verify (!S_ISLNK (S_IFCHR));
verify (!S_ISLNK (S_IFDIR));
verify (!S_ISLNK (S_IFIFO));
@@ -133,7 +149,9 @@ verify (S_ISLNK (S_IFLNK));
verify (!S_ISLNK (S_IFSOCK));
#endif
+#ifdef S_IFBLK
verify (!S_ISSOCK (S_IFBLK));
+#endif
verify (!S_ISSOCK (S_IFCHR));
verify (!S_ISSOCK (S_IFDIR));
verify (!S_ISSOCK (S_IFIFO));
@@ -145,7 +163,9 @@ verify (!S_ISSOCK (S_IFLNK));
verify (S_ISSOCK (S_IFSOCK));
#endif
+#ifdef S_IFBLK
verify (!S_ISDOOR (S_IFBLK));
+#endif
verify (!S_ISDOOR (S_IFCHR));
verify (!S_ISDOOR (S_IFDIR));
verify (!S_ISDOOR (S_IFIFO));
@@ -157,7 +177,9 @@ verify (!S_ISDOOR (S_IFLNK));
verify (!S_ISDOOR (S_IFSOCK));
#endif
+#ifdef S_IFBLK
verify (!S_ISMPB (S_IFBLK));
+#endif
verify (!S_ISMPB (S_IFCHR));
verify (!S_ISMPB (S_IFDIR));
verify (!S_ISMPB (S_IFIFO));
@@ -169,7 +191,23 @@ verify (!S_ISMPB (S_IFLNK));
verify (!S_ISMPB (S_IFSOCK));
#endif
+#ifdef S_IFBLK
+verify (!S_ISMPX (S_IFBLK));
+#endif
+verify (!S_ISMPX (S_IFCHR));
+verify (!S_ISMPX (S_IFDIR));
+verify (!S_ISMPX (S_IFIFO));
+verify (!S_ISMPX (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISMPX (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISMPX (S_IFSOCK));
+#endif
+
+#ifdef S_IFBLK
verify (!S_ISNAM (S_IFBLK));
+#endif
verify (!S_ISNAM (S_IFCHR));
verify (!S_ISNAM (S_IFDIR));
verify (!S_ISNAM (S_IFIFO));
@@ -181,7 +219,9 @@ verify (!S_ISNAM (S_IFLNK));
verify (!S_ISNAM (S_IFSOCK));
#endif
+#ifdef S_IFBLK
verify (!S_ISNWK (S_IFBLK));
+#endif
verify (!S_ISNWK (S_IFCHR));
verify (!S_ISNWK (S_IFDIR));
verify (!S_ISNWK (S_IFIFO));
@@ -193,7 +233,9 @@ verify (!S_ISNWK (S_IFLNK));
verify (!S_ISNWK (S_IFSOCK));
#endif
+#ifdef S_IFBLK
verify (!S_ISPORT (S_IFBLK));
+#endif
verify (!S_ISPORT (S_IFCHR));
verify (!S_ISPORT (S_IFDIR));
verify (!S_ISPORT (S_IFIFO));
@@ -205,7 +247,9 @@ verify (!S_ISPORT (S_IFLNK));
verify (!S_ISPORT (S_IFSOCK));
#endif
+#ifdef S_IFBLK
verify (!S_ISCTG (S_IFBLK));
+#endif
verify (!S_ISCTG (S_IFCHR));
verify (!S_ISCTG (S_IFDIR));
verify (!S_ISCTG (S_IFIFO));
@@ -217,7 +261,9 @@ verify (!S_ISCTG (S_IFLNK));
verify (!S_ISCTG (S_IFSOCK));
#endif
+#ifdef S_IFBLK
verify (!S_ISOFD (S_IFBLK));
+#endif
verify (!S_ISOFD (S_IFCHR));
verify (!S_ISOFD (S_IFDIR));
verify (!S_ISOFD (S_IFIFO));
@@ -229,7 +275,9 @@ verify (!S_ISOFD (S_IFLNK));
verify (!S_ISOFD (S_IFSOCK));
#endif
+#ifdef S_IFBLK
verify (!S_ISOFL (S_IFBLK));
+#endif
verify (!S_ISOFL (S_IFCHR));
verify (!S_ISOFL (S_IFDIR));
verify (!S_ISOFL (S_IFIFO));
@@ -241,7 +289,9 @@ verify (!S_ISOFL (S_IFLNK));
verify (!S_ISOFL (S_IFSOCK));
#endif
+#ifdef S_IFBLK
verify (!S_ISWHT (S_IFBLK));
+#endif
verify (!S_ISWHT (S_IFCHR));
verify (!S_ISWHT (S_IFDIR));
verify (!S_ISWHT (S_IFIFO));
@@ -278,8 +328,10 @@ invalid UTIME macros
/* Check the existence of some types. */
nlink_t t1;
+off_t t2;
+mode_t t3;
-struct timespec t2;
+struct timespec st;
int
main (void)
diff --git a/tests/test-sys_time-c++.cc b/tests/test-sys_time-c++.cc
index 6c937fd..209015c 100644
--- a/tests/test-sys_time-c++.cc
+++ b/tests/test-sys_time-c++.cc
@@ -1,5 +1,5 @@
/* Test of <sys/time.h> substitute in C++ mode.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-sys_time.c b/tests/test-sys_time.c
index da64b85..8062842 100644
--- a/tests/test-sys_time.c
+++ b/tests/test-sys_time.c
@@ -1,5 +1,5 @@
/* Test of <sys/time.h> substitute.
- Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -20,8 +20,13 @@
#include <sys/time.h>
+/* Check that the 'struct timeval' type is defined. */
struct timeval a;
+/* Check that a.tv_sec is wide enough to hold a time_t, ignoring
+ signedness issues. */
+typedef int verify_tv_sec_type[sizeof (time_t) <= sizeof (a.tv_sec) ? 1 : -1];
+
int
main (void)
{
diff --git a/tests/test-sys_types-c++.cc b/tests/test-sys_types-c++.cc
new file mode 100644
index 0000000..04a85d8
--- /dev/null
+++ b/tests/test-sys_types-c++.cc
@@ -0,0 +1,28 @@
+/* Test of <sys/types.h> substitute in C++ mode.
+ 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 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2011. */
+
+#define GNULIB_NAMESPACE gnulib
+#include <config.h>
+
+#include <sys/types.h>
+
+
+int
+main ()
+{
+}
diff --git a/tests/test-sys_types.c b/tests/test-sys_types.c
new file mode 100644
index 0000000..1045de7
--- /dev/null
+++ b/tests/test-sys_types.c
@@ -0,0 +1,34 @@
+/* Test of <sys/types.h> substitute.
+ 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 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2011. */
+
+#include <config.h>
+
+#include <sys/types.h>
+
+/* Check that the types are all defined. */
+pid_t t1;
+size_t t2;
+ssize_t t3;
+off_t t4;
+mode_t t5;
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/tests/test-sys_wait-c++.cc b/tests/test-sys_wait-c++.cc
index 2f6b6ce..91465c9 100644
--- a/tests/test-sys_wait-c++.cc
+++ b/tests/test-sys_wait-c++.cc
@@ -1,5 +1,5 @@
/* Test of <sys/wait.h> substitute in C++ mode.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-sys_wait.c b/tests/test-sys_wait.c
index dce89c6..7753da3 100644
--- a/tests/test-sys_wait.c
+++ b/tests/test-sys_wait.c
@@ -1,5 +1,5 @@
/* Test of <sys/wait.h> substitute.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -31,17 +31,17 @@ main (void)
if (test_sys_wait_macros ())
return 1;
- switch (0)
- {
#if 0
+ switch (WCONTINUED)
+ {
/* Gnulib doesn't guarantee these, yet. */
case WCONTINUED:
case WEXITED:
case WNOWAIT:
case WSTOPPED:
-#endif
break;
}
+#endif
return a ? 1 : 0;
}
diff --git a/tests/test-sys_wait.h b/tests/test-sys_wait.h
index 3c9b322..d78b19e 100644
--- a/tests/test-sys_wait.h
+++ b/tests/test-sys_wait.h
@@ -1,5 +1,5 @@
/* Test of macros shared between <sys/wait.h> and <stdlib.h>.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-time-c++.cc b/tests/test-time-c++.cc
index b4ed33b..05cb4ed 100644
--- a/tests/test-time-c++.cc
+++ b/tests/test-time-c++.cc
@@ -1,5 +1,5 @@
/* Test of <time.h> substitute in C++ mode.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-time-c++2.cc b/tests/test-time-c++2.cc
index 8c1f53d..41c2040 100644
--- a/tests/test-time-c++2.cc
+++ b/tests/test-time-c++2.cc
@@ -1,5 +1,5 @@
/* Test of <time.h> substitute in C++ mode.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-time.c b/tests/test-time.c
index 0c78f36..c060136 100644
--- a/tests/test-time.c
+++ b/tests/test-time.c
@@ -1,5 +1,5 @@
/* Test of <time.h> substitute.
- Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -22,7 +22,13 @@
#include "verify.h"
-struct timespec a;
+/* Check that the types are all defined. */
+struct timespec t1;
+#if 0
+/* POSIX:2008 does not require pid_t in <time.h> unconditionally, and indeed
+ it's missing on Mac OS X 10.5, FreeBSD 6.4, OpenBSD 4.9, mingw. */
+pid_t t2;
+#endif
/* Check that NULL can be passed through varargs as a pointer type,
per POSIX 2008. */
diff --git a/tests/test-unistd-c++.cc b/tests/test-unistd-c++.cc
index c63cf3d..76d87d1 100644
--- a/tests/test-unistd-c++.cc
+++ b/tests/test-unistd-c++.cc
@@ -1,5 +1,5 @@
/* Test of <unistd.h> substitute in C++ mode.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -24,6 +24,10 @@
#include "signature.h"
+#if GNULIB_TEST_CHDIR
+SIGNATURE_CHECK (GNULIB_NAMESPACE::chdir, int, (const char *));
+#endif
+
#if GNULIB_TEST_CHOWN
SIGNATURE_CHECK (GNULIB_NAMESPACE::chown, int, (const char *, uid_t, gid_t));
#endif
@@ -32,7 +36,9 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::chown, int, (const char *, uid_t, gid_t));
SIGNATURE_CHECK (GNULIB_NAMESPACE::close, int, (int));
#endif
+#if GNULIB_TEST_DUP
SIGNATURE_CHECK (GNULIB_NAMESPACE::dup, int, (int));
+#endif
#if GNULIB_TEST_DUP2
SIGNATURE_CHECK (GNULIB_NAMESPACE::dup2, int, (int, int));
@@ -60,6 +66,10 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::fchownat, int,
(int, char const *, uid_t, gid_t, int));
#endif
+#if GNULIB_TEST_FDATASYNC
+SIGNATURE_CHECK (GNULIB_NAMESPACE::fdatasync, int, (int));
+#endif
+
#if GNULIB_TEST_FSYNC
SIGNATURE_CHECK (GNULIB_NAMESPACE::fsync, int, (int));
#endif
@@ -112,6 +122,10 @@ SIGNATURE_CHECK (GNULIB_NAMESPACE::setusershell, void, (void));
SIGNATURE_CHECK (GNULIB_NAMESPACE::endusershell, void, (void));
#endif
+#if GNULIB_TEST_GROUP_MEMBER
+SIGNATURE_CHECK (GNULIB_NAMESPACE::group_member, int, (gid_t));
+#endif
+
#if GNULIB_TEST_LCHOWN
SIGNATURE_CHECK (GNULIB_NAMESPACE::lchown, int, (char const *, uid_t, gid_t));
#endif
diff --git a/tests/test-unistd.c b/tests/test-unistd.c
index be1ae06..5470985 100644
--- a/tests/test-unistd.c
+++ b/tests/test-unistd.c
@@ -1,5 +1,5 @@
/* Test of <unistd.h> substitute.
- Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-unsetenv.c b/tests/test-unsetenv.c
index 9c9443b..c369e2a 100644
--- a/tests/test-unsetenv.c
+++ b/tests/test-unsetenv.c
@@ -1,5 +1,5 @@
/* Tests of unsetenv.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-update-copyright.sh b/tests/test-update-copyright.sh
index 83275ad..60cb372 100755
--- a/tests/test-update-copyright.sh
+++ b/tests/test-update-copyright.sh
@@ -1,6 +1,6 @@
#!/bin/sh
# Test suite for update-copyright.
-# Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
@@ -102,9 +102,8 @@ Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
# Foundation, Inc.
EOF
-rm -f $TMP.*.bak
UPDATE_COPYRIGHT_YEAR=2009 \
- update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr
+ update-copyright $TMP.? 1> $TMP-stdout 2> $TMP-stderr
compare /dev/null $TMP-stdout || exit 1
compare - $TMP-stderr <<EOF || exit 1
$TMP.4: warning: copyright statement not found
@@ -145,9 +144,8 @@ Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
# Foundation, Inc.
EOF
-rm -f $TMP.*.bak
UPDATE_COPYRIGHT_YEAR=2010 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
- update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr
+ update-copyright $TMP.? 1> $TMP-stdout 2> $TMP-stderr
compare /dev/null $TMP-stdout || exit 1
compare - $TMP-stderr <<EOF || exit 1
$TMP.4: warning: copyright statement not found
@@ -184,9 +182,8 @@ Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
# Copyright (C) 1990-2005, 2007-2010 Free Software Foundation, Inc.
EOF
-rm -f $TMP.*.bak
UPDATE_COPYRIGHT_YEAR=2010 UPDATE_COPYRIGHT_FORCE=1 \
- update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr
+ update-copyright $TMP.? 1> $TMP-stdout 2> $TMP-stderr
compare /dev/null $TMP-stdout || exit 1
compare - $TMP-stderr <<EOF || exit 1
$TMP.4: warning: copyright statement not found
@@ -427,6 +424,13 @@ compare - $TMP <<EOF || exit 1
# Copyright (C) 1987-1988, 1991-2011 Free Software
# Foundation, Inc.
EOF
+UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=2 \
+ UPDATE_COPYRIGHT_FORCE=1 update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+ # Copyright (C) 1987-2011 Free Software Foundation, Inc.
+EOF
rm $TMP*
## --------- ##
@@ -501,6 +505,9 @@ cat > $TMP.extra-text-space <<EOF
/* Copyright 1987, 1988, 1991, 1992 Free Software Foundation, Inc. ***
* End of comments. */
EOF
+cat > $TMP.two-digit-final-is-substr-of-first <<EOF
+ /* Copyright 1991, 99 Free Software Foundation, Inc. */
+EOF
UPDATE_COPYRIGHT_YEAR=2010 \
update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr
compare /dev/null $TMP-stdout || exit 1
@@ -532,6 +539,9 @@ compare - $TMP.extra-text-space <<EOF || exit 1
Inc. ***
* End of comments. */
EOF
+compare - $TMP.two-digit-final-is-substr-of-first <<EOF || exit 1
+ /* Copyright 1991, 1999, 2010 Free Software Foundation, Inc. */
+EOF
rm $TMP*
exit 0
diff --git a/tests/test-vasnprintf.c b/tests/test-vasnprintf.c
index 6b2a0ff..4cce0a9 100644
--- a/tests/test-vasnprintf.c
+++ b/tests/test-vasnprintf.c
@@ -1,5 +1,5 @@
/* Test of vasnprintf() and asnprintf() functions.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -55,7 +55,7 @@ test_function (char * (*my_asnprintf) (char *, size_t *, const char *, ...))
ASSERT (length == 5);
if (size < 6)
ASSERT (result != buf);
- ASSERT (memcmp (buf + size, "DEADBEEF" + size, 8 - size) == 0);
+ ASSERT (memcmp (buf + size, &"DEADBEEF"[size], 8 - size) == 0);
if (result != buf)
free (result);
}
diff --git a/tests/test-vasprintf-posix.c b/tests/test-vasprintf-posix.c
index b819b5b..c730948 100644
--- a/tests/test-vasprintf-posix.c
+++ b/tests/test-vasprintf-posix.c
@@ -1,5 +1,5 @@
/* Test of POSIX compatible vasprintf() and asprintf() functions.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -29,6 +29,7 @@
#include "macros.h"
#include "minus-zero.h"
+#include "infinity.h"
#include "nan.h"
/* The SGI MIPS floating-point format does not distinguish 0.0 and -0.0. */
@@ -197,7 +198,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* Positive infinity. */
char *result;
int retval =
- my_asprintf (&result, "%a %d", 1.0 / 0.0, 33, 44, 55);
+ my_asprintf (&result, "%a %d", Infinityd (), 33, 44, 55);
ASSERT (result != NULL);
ASSERT (strcmp (result, "inf 33") == 0);
ASSERT (retval == strlen (result));
@@ -207,7 +208,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* Negative infinity. */
char *result;
int retval =
- my_asprintf (&result, "%a %d", -1.0 / 0.0, 33, 44, 55);
+ my_asprintf (&result, "%a %d", - Infinityd (), 33, 44, 55);
ASSERT (result != NULL);
ASSERT (strcmp (result, "-inf 33") == 0);
ASSERT (retval == strlen (result));
@@ -231,7 +232,8 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
int retval =
my_asprintf (&result, "%.0a %d", 1.5, 33, 44, 55);
ASSERT (result != NULL);
- ASSERT (strcmp (result, "0x2p+0 33") == 0
+ ASSERT (strcmp (result, "0x1p+0 33") == 0
+ || strcmp (result, "0x2p+0 33") == 0
|| strcmp (result, "0x3p-1 33") == 0
|| strcmp (result, "0x6p-2 33") == 0
|| strcmp (result, "0xcp-3 33") == 0);
@@ -244,7 +246,8 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
int retval =
my_asprintf (&result, "%.0a %d", 1.51, 33, 44, 55);
ASSERT (result != NULL);
- ASSERT (strcmp (result, "0x2p+0 33") == 0
+ ASSERT (strcmp (result, "0x1p+0 33") == 0
+ || strcmp (result, "0x2p+0 33") == 0
|| strcmp (result, "0x3p-1 33") == 0
|| strcmp (result, "0x6p-2 33") == 0
|| strcmp (result, "0xcp-3 33") == 0);
@@ -305,7 +308,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
}
{ /* Rounding can turn a ...FFF into a ...000.
- This shows a MacOS X 10.3.9 (Darwin 7.9) bug. */
+ This shows a Mac OS X 10.3.9 (Darwin 7.9) bug. */
char *result;
int retval =
my_asprintf (&result, "%.1a %d", 1.999, 33, 44, 55);
@@ -438,7 +441,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* FLAG_ZERO with infinite number. */
char *result;
int retval =
- my_asprintf (&result, "%010a %d", 1.0 / 0.0, 33, 44, 55);
+ my_asprintf (&result, "%010a %d", Infinityd (), 33, 44, 55);
ASSERT (result != NULL);
/* "0000000inf 33" is not a valid result; see
<http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
@@ -511,7 +514,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* Positive infinity. */
char *result;
int retval =
- my_asprintf (&result, "%La %d", 1.0L / 0.0L, 33, 44, 55);
+ my_asprintf (&result, "%La %d", Infinityl (), 33, 44, 55);
ASSERT (result != NULL);
ASSERT (strcmp (result, "inf 33") == 0);
ASSERT (retval == strlen (result));
@@ -521,7 +524,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* Negative infinity. */
char *result;
int retval =
- my_asprintf (&result, "%La %d", -1.0L / 0.0L, 33, 44, 55);
+ my_asprintf (&result, "%La %d", - Infinityl (), 33, 44, 55);
ASSERT (result != NULL);
ASSERT (strcmp (result, "-inf 33") == 0);
ASSERT (retval == strlen (result));
@@ -539,7 +542,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
ASSERT (retval == strlen (result));
free (result);
}
-#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
{ /* Quiet NaN. */
static union { unsigned int word[4]; long double value; } x =
{ LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
@@ -720,7 +723,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
}
{ /* Rounding can turn a ...FFF into a ...000.
- This shows a MacOS X 10.3.9 (Darwin 7.9) bug and a
+ This shows a Mac OS X 10.3.9 (Darwin 7.9) bug and a
glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
char *result;
int retval =
@@ -854,7 +857,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* FLAG_ZERO with infinite number. */
char *result;
int retval =
- my_asprintf (&result, "%010La %d", 1.0L / 0.0L, 33, 44, 55);
+ my_asprintf (&result, "%010La %d", Infinityl (), 33, 44, 55);
ASSERT (result != NULL);
/* "0000000inf 33" is not a valid result; see
<http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
@@ -1024,7 +1027,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* Positive infinity. */
char *result;
int retval =
- my_asprintf (&result, "%f %d", 1.0 / 0.0, 33, 44, 55);
+ my_asprintf (&result, "%f %d", Infinityd (), 33, 44, 55);
ASSERT (result != NULL);
ASSERT (strcmp (result, "inf 33") == 0
|| strcmp (result, "infinity 33") == 0);
@@ -1035,7 +1038,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* Negative infinity. */
char *result;
int retval =
- my_asprintf (&result, "%f %d", -1.0 / 0.0, 33, 44, 55);
+ my_asprintf (&result, "%f %d", - Infinityd (), 33, 44, 55);
ASSERT (result != NULL);
ASSERT (strcmp (result, "-inf 33") == 0
|| strcmp (result, "-infinity 33") == 0);
@@ -1128,7 +1131,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* FLAG_ZERO with infinite number. */
char *result;
int retval =
- my_asprintf (&result, "%015f %d", -1.0 / 0.0, 33, 44, 55);
+ my_asprintf (&result, "%015f %d", - Infinityd (), 33, 44, 55);
ASSERT (result != NULL);
ASSERT (strcmp (result, " -inf 33") == 0
|| strcmp (result, " -infinity 33") == 0);
@@ -1323,7 +1326,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* Positive infinity. */
char *result;
int retval =
- my_asprintf (&result, "%Lf %d", 1.0L / 0.0L, 33, 44, 55);
+ my_asprintf (&result, "%Lf %d", Infinityl (), 33, 44, 55);
ASSERT (result != NULL);
ASSERT (strcmp (result, "inf 33") == 0
|| strcmp (result, "infinity 33") == 0);
@@ -1334,7 +1337,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* Negative infinity. */
char *result;
int retval =
- my_asprintf (&result, "%Lf %d", -1.0L / 0.0L, 33, 44, 55);
+ my_asprintf (&result, "%Lf %d", - Infinityl (), 33, 44, 55);
ASSERT (result != NULL);
ASSERT (strcmp (result, "-inf 33") == 0
|| strcmp (result, "-infinity 33") == 0);
@@ -1353,7 +1356,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
ASSERT (retval == strlen (result));
free (result);
}
-#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
{ /* Quiet NaN. */
static union { unsigned int word[4]; long double value; } x =
{ LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
@@ -1528,7 +1531,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* FLAG_ZERO with infinite number. */
char *result;
int retval =
- my_asprintf (&result, "%015Lf %d", -1.0L / 0.0L, 33, 44, 55);
+ my_asprintf (&result, "%015Lf %d", - Infinityl (), 33, 44, 55);
ASSERT (result != NULL);
ASSERT (strcmp (result, " -inf 33") == 0
|| strcmp (result, " -infinity 33") == 0);
@@ -1634,7 +1637,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* Positive infinity. */
char *result;
int retval =
- my_asprintf (&result, "%F %d", 1.0 / 0.0, 33, 44, 55);
+ my_asprintf (&result, "%F %d", Infinityd (), 33, 44, 55);
ASSERT (result != NULL);
ASSERT (strcmp (result, "INF 33") == 0
|| strcmp (result, "INFINITY 33") == 0);
@@ -1645,7 +1648,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* Negative infinity. */
char *result;
int retval =
- my_asprintf (&result, "%F %d", -1.0 / 0.0, 33, 44, 55);
+ my_asprintf (&result, "%F %d", - Infinityd (), 33, 44, 55);
ASSERT (result != NULL);
ASSERT (strcmp (result, "-INF 33") == 0
|| strcmp (result, "-INFINITY 33") == 0);
@@ -1678,7 +1681,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* FLAG_ZERO with infinite number. */
char *result;
int retval =
- my_asprintf (&result, "%015F %d", -1.0 / 0.0, 33, 44, 55);
+ my_asprintf (&result, "%015F %d", - Infinityd (), 33, 44, 55);
ASSERT (result != NULL);
ASSERT (strcmp (result, " -INF 33") == 0
|| strcmp (result, " -INFINITY 33") == 0);
@@ -1770,7 +1773,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* Positive infinity. */
char *result;
int retval =
- my_asprintf (&result, "%LF %d", 1.0L / 0.0L, 33, 44, 55);
+ my_asprintf (&result, "%LF %d", Infinityl (), 33, 44, 55);
ASSERT (result != NULL);
ASSERT (strcmp (result, "INF 33") == 0
|| strcmp (result, "INFINITY 33") == 0);
@@ -1781,7 +1784,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* Negative infinity. */
char *result;
int retval =
- my_asprintf (&result, "%LF %d", -1.0L / 0.0L, 33, 44, 55);
+ my_asprintf (&result, "%LF %d", - Infinityl (), 33, 44, 55);
ASSERT (result != NULL);
ASSERT (strcmp (result, "-INF 33") == 0
|| strcmp (result, "-INFINITY 33") == 0);
@@ -1814,7 +1817,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* FLAG_ZERO with infinite number. */
char *result;
int retval =
- my_asprintf (&result, "%015LF %d", -1.0L / 0.0L, 33, 44, 55);
+ my_asprintf (&result, "%015LF %d", - Infinityl (), 33, 44, 55);
ASSERT (result != NULL);
ASSERT (strcmp (result, " -INF 33") == 0
|| strcmp (result, " -INFINITY 33") == 0);
@@ -2012,7 +2015,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* Positive infinity. */
char *result;
int retval =
- my_asprintf (&result, "%e %d", 1.0 / 0.0, 33, 44, 55);
+ my_asprintf (&result, "%e %d", Infinityd (), 33, 44, 55);
ASSERT (result != NULL);
ASSERT (strcmp (result, "inf 33") == 0
|| strcmp (result, "infinity 33") == 0);
@@ -2023,7 +2026,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* Negative infinity. */
char *result;
int retval =
- my_asprintf (&result, "%e %d", -1.0 / 0.0, 33, 44, 55);
+ my_asprintf (&result, "%e %d", - Infinityd (), 33, 44, 55);
ASSERT (result != NULL);
ASSERT (strcmp (result, "-inf 33") == 0
|| strcmp (result, "-infinity 33") == 0);
@@ -2134,7 +2137,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* FLAG_ZERO with infinite number. */
char *result;
int retval =
- my_asprintf (&result, "%015e %d", -1.0 / 0.0, 33, 44, 55);
+ my_asprintf (&result, "%015e %d", - Infinityd (), 33, 44, 55);
ASSERT (result != NULL);
ASSERT (strcmp (result, " -inf 33") == 0
|| strcmp (result, " -infinity 33") == 0);
@@ -2345,7 +2348,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* Positive infinity. */
char *result;
int retval =
- my_asprintf (&result, "%Le %d", 1.0L / 0.0L, 33, 44, 55);
+ my_asprintf (&result, "%Le %d", Infinityl (), 33, 44, 55);
ASSERT (result != NULL);
ASSERT (strcmp (result, "inf 33") == 0
|| strcmp (result, "infinity 33") == 0);
@@ -2356,7 +2359,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* Negative infinity. */
char *result;
int retval =
- my_asprintf (&result, "%Le %d", -1.0L / 0.0L, 33, 44, 55);
+ my_asprintf (&result, "%Le %d", - Infinityl (), 33, 44, 55);
ASSERT (result != NULL);
ASSERT (strcmp (result, "-inf 33") == 0
|| strcmp (result, "-infinity 33") == 0);
@@ -2375,7 +2378,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
ASSERT (retval == strlen (result));
free (result);
}
-#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
{ /* Quiet NaN. */
static union { unsigned int word[4]; long double value; } x =
{ LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
@@ -2568,7 +2571,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* FLAG_ZERO with infinite number. */
char *result;
int retval =
- my_asprintf (&result, "%015Le %d", -1.0L / 0.0L, 33, 44, 55);
+ my_asprintf (&result, "%015Le %d", - Infinityl (), 33, 44, 55);
ASSERT (result != NULL);
ASSERT (strcmp (result, " -inf 33") == 0
|| strcmp (result, " -infinity 33") == 0);
@@ -2778,7 +2781,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* Positive infinity. */
char *result;
int retval =
- my_asprintf (&result, "%g %d", 1.0 / 0.0, 33, 44, 55);
+ my_asprintf (&result, "%g %d", Infinityd (), 33, 44, 55);
ASSERT (result != NULL);
ASSERT (strcmp (result, "inf 33") == 0
|| strcmp (result, "infinity 33") == 0);
@@ -2789,7 +2792,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* Negative infinity. */
char *result;
int retval =
- my_asprintf (&result, "%g %d", -1.0 / 0.0, 33, 44, 55);
+ my_asprintf (&result, "%g %d", - Infinityd (), 33, 44, 55);
ASSERT (result != NULL);
ASSERT (strcmp (result, "-inf 33") == 0
|| strcmp (result, "-infinity 33") == 0);
@@ -2893,7 +2896,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* FLAG_ZERO with infinite number. */
char *result;
int retval =
- my_asprintf (&result, "%015g %d", -1.0 / 0.0, 33, 44, 55);
+ my_asprintf (&result, "%015g %d", - Infinityd (), 33, 44, 55);
ASSERT (result != NULL);
ASSERT (strcmp (result, " -inf 33") == 0
|| strcmp (result, " -infinity 33") == 0);
@@ -3099,7 +3102,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* Positive infinity. */
char *result;
int retval =
- my_asprintf (&result, "%Lg %d", 1.0L / 0.0L, 33, 44, 55);
+ my_asprintf (&result, "%Lg %d", Infinityl (), 33, 44, 55);
ASSERT (result != NULL);
ASSERT (strcmp (result, "inf 33") == 0
|| strcmp (result, "infinity 33") == 0);
@@ -3110,7 +3113,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* Negative infinity. */
char *result;
int retval =
- my_asprintf (&result, "%Lg %d", -1.0L / 0.0L, 33, 44, 55);
+ my_asprintf (&result, "%Lg %d", - Infinityl (), 33, 44, 55);
ASSERT (result != NULL);
ASSERT (strcmp (result, "-inf 33") == 0
|| strcmp (result, "-infinity 33") == 0);
@@ -3129,7 +3132,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
ASSERT (retval == strlen (result));
free (result);
}
-#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
{ /* Quiet NaN. */
static union { unsigned int word[4]; long double value; } x =
{ LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
@@ -3315,7 +3318,7 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
{ /* FLAG_ZERO with infinite number. */
char *result;
int retval =
- my_asprintf (&result, "%015Lg %d", -1.0L / 0.0L, 33, 44, 55);
+ my_asprintf (&result, "%015Lg %d", - Infinityl (), 33, 44, 55);
ASSERT (result != NULL);
ASSERT (strcmp (result, " -inf 33") == 0
|| strcmp (result, " -infinity 33") == 0);
diff --git a/tests/test-vasprintf.c b/tests/test-vasprintf.c
index 6882d18..459b92d 100644
--- a/tests/test-vasprintf.c
+++ b/tests/test-vasprintf.c
@@ -1,5 +1,5 @@
/* Test of vasprintf() and asprintf() functions.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-vc-list-files-cvs.sh b/tests/test-vc-list-files-cvs.sh
index 531b269..1dbc532 100755
--- a/tests/test-vc-list-files-cvs.sh
+++ b/tests/test-vc-list-files-cvs.sh
@@ -1,6 +1,6 @@
#!/bin/sh
# Unit tests for vc-list-files
-# Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# Copyright (C) 2008-2013 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
@@ -36,7 +36,6 @@ for i in with-cvsu without; do
ok=0
mkdir $tmpdir && cd $tmpdir &&
# without cvs, skip the test
- # The double use of 'exit' is needed for the reference to $? inside the trap.
{ ( cvs -Q -d "$repo" init ) > /dev/null 2>&1 \
|| skip_ "cvs not found in PATH"; } &&
mkdir w && cd w &&
diff --git a/tests/test-vc-list-files-git.sh b/tests/test-vc-list-files-git.sh
index 523b2a9..8cbd00b 100755
--- a/tests/test-vc-list-files-git.sh
+++ b/tests/test-vc-list-files-git.sh
@@ -1,6 +1,6 @@
#!/bin/sh
# Unit tests for vc-list-files
-# Copyright (C) 2008-2011 Free Software Foundation, Inc.
+# Copyright (C) 2008-2013 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
diff --git a/tests/test-verify.c b/tests/test-verify.c
index 512c021..1056b4e 100644
--- a/tests/test-verify.c
+++ b/tests/test-verify.c
@@ -1,6 +1,6 @@
/* Test the "verify" module.
- Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -55,9 +55,9 @@ function (int n)
verify (1 == 1); verify (1 == 1); /* should be ok */
if (n)
- return ((void) verify_true (1 == 1), verify_true (1 == 1) + 7); /* should be ok */
+ return ((void) verify_expr (1 == 1, 1), verify_expr (1 == 1, 8)); /* should be ok */
#if EXP_FAIL == 5
- return (verify_true (1 == 2), 5); /* should give ERROR */
+ return verify_expr (1 == 2, 5); /* should give ERROR */
#endif
return 0;
}
diff --git a/tests/test-version-etc.c b/tests/test-version-etc.c
index 00a5d7c..66027f3 100644
--- a/tests/test-version-etc.c
+++ b/tests/test-version-etc.c
@@ -1,5 +1,5 @@
/* Test suite for version-etc.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This file is part of the GNUlib Library.
This program is free software: you can redistribute it and/or modify
diff --git a/tests/test-version-etc.sh b/tests/test-version-etc.sh
index c1ed827..466c959 100755
--- a/tests/test-version-etc.sh
+++ b/tests/test-version-etc.sh
@@ -1,6 +1,6 @@
#! /bin/sh
# Test suite for version-etc.
-# Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
diff --git a/tests/test-wchar-c++.cc b/tests/test-wchar-c++.cc
index 9b28e31..8ce0dea 100644
--- a/tests/test-wchar-c++.cc
+++ b/tests/test-wchar-c++.cc
@@ -1,5 +1,5 @@
/* Test of <wchar.h> substitute in C++ mode.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-wchar.c b/tests/test-wchar.c
index 2d3bad7..92ae8f2 100644
--- a/tests/test-wchar.c
+++ b/tests/test-wchar.c
@@ -1,5 +1,5 @@
/* Test of <wchar.h> substitute.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-wcrtomb-w32.c b/tests/test-wcrtomb-w32.c
index 0b09498..494bbd1 100644
--- a/tests/test-wcrtomb-w32.c
+++ b/tests/test-wcrtomb-w32.c
@@ -1,5 +1,5 @@
/* Test of conversion of wide character to multibyte character.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-wcrtomb.c b/tests/test-wcrtomb.c
index a50817f..c076973 100644
--- a/tests/test-wcrtomb.c
+++ b/tests/test-wcrtomb.c
@@ -1,5 +1,5 @@
/* Test of conversion of wide character to multibyte character.
- Copyright (C) 2008-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-wctype-h-c++.cc b/tests/test-wctype-h-c++.cc
index 7208382..cd34afc 100644
--- a/tests/test-wctype-h-c++.cc
+++ b/tests/test-wctype-h-c++.cc
@@ -1,5 +1,5 @@
/* Test of <wctype.h> substitute in C++ mode.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2010-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-wctype-h.c b/tests/test-wctype-h.c
index aed3b77..5ab5d0c 100644
--- a/tests/test-wctype-h.c
+++ b/tests/test-wctype-h.c
@@ -1,5 +1,5 @@
/* Test of <wctype.h> substitute.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-write.c b/tests/test-write.c
new file mode 100644
index 0000000..90e9a22
--- /dev/null
+++ b/tests/test-write.c
@@ -0,0 +1,79 @@
+/* Test the write() function.
+ 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 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (write, ssize_t, (int, const void *, size_t));
+
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+ const char *filename = "test-write.tmp";
+ int fd;
+
+ /* Create a file with a simple contents. */
+ fd = open (filename, O_CREAT | O_WRONLY, 0600);
+ ASSERT (fd >= 0);
+ ASSERT (write (fd, "Hello World", 11) == 11);
+ ASSERT (close (fd) == 0);
+
+ /* Write into the middle of the file. */
+ fd = open (filename, O_WRONLY);
+ ASSERT (fd >= 0);
+ ASSERT (lseek (fd, 6, SEEK_SET) == 6);
+ ASSERT (write (fd, "fascination", 11) == 11);
+
+ /* Verify the contents of the file. */
+ {
+ char buf[64];
+ int rfd = open (filename, O_RDONLY);
+ ASSERT (rfd >= 0);
+ ASSERT (read (rfd, buf, sizeof (buf)) == 17);
+ ASSERT (close (rfd) == 0);
+ ASSERT (memcmp (buf, "Hello fascination", 17) == 0);
+ }
+
+ ASSERT (close (fd) == 0);
+
+ /* Test behaviour for invalid file descriptors. */
+ {
+ char byte = 'x';
+ errno = 0;
+ ASSERT (write (-1, &byte, 1) == -1);
+ ASSERT (errno == EBADF);
+ }
+ {
+ char byte = 'x';
+ close (99);
+ errno = 0;
+ ASSERT (write (99, &byte, 1) == -1);
+ ASSERT (errno == EBADF);
+ }
+
+ /* Clean up. */
+ unlink (filename);
+
+ return 0;
+}
diff --git a/tests/test-xalloc-die.c b/tests/test-xalloc-die.c
index d33e671..e6376f8 100644
--- a/tests/test-xalloc-die.c
+++ b/tests/test-xalloc-die.c
@@ -1,5 +1,5 @@
/* Test of xalloc_die() function.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/tests/test-xalloc-die.sh b/tests/test-xalloc-die.sh
index 399d249..920d222 100755
--- a/tests/test-xalloc-die.sh
+++ b/tests/test-xalloc-die.sh
@@ -1,6 +1,6 @@
#!/bin/sh
# Test suite for xalloc_die.
-# Copyright (C) 2009-2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
diff --git a/tests/test-xvasprintf.c b/tests/test-xvasprintf.c
index aeeb3e5..453ca58 100644
--- a/tests/test-xvasprintf.c
+++ b/tests/test-xvasprintf.c
@@ -1,5 +1,5 @@
/* Test of xvasprintf() and xasprintf() functions.
- Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -93,9 +93,11 @@ test_xasprintf (void)
}
{
- /* Silence gcc warning about zero-length format string. */
+ /* Silence gcc warning about zero-length format string,
+ and about "format not a string literal and no format"
+ (whatever that means) . */
const char *empty = "";
- result = xasprintf (empty);
+ result = xasprintf (empty, empty);
ASSERT (result != NULL);
ASSERT (strcmp (result, "") == 0);
free (result);
diff --git a/tests/unsetenv.c b/tests/unsetenv.c
index 215bba0..c58c82f 100644
--- a/tests/unsetenv.c
+++ b/tests/unsetenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995-2002, 2005-2011 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995-2002, 2005-2013 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@@ -14,12 +14,12 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include <config.h>
-
/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
optimizes away the name == NULL test below. */
#define _GL_ARG_NONNULL(params)
+#include <config.h>
+
/* Specification. */
#include <stdlib.h>
@@ -36,7 +36,7 @@
#endif
#if _LIBC
-/* This lock protects against simultaneous modifications of `environ'. */
+/* This lock protects against simultaneous modifications of 'environ'. */
# include <bits/libc-lock.h>
__libc_lock_define_initialized (static, envlock)
# define LOCK __libc_lock_lock (envlock)
@@ -97,6 +97,13 @@ weak_alias (__unsetenv, unsetenv)
#else /* HAVE_UNSETENV */
# undef unsetenv
+# if !HAVE_DECL_UNSETENV
+# if VOID_UNSETENV
+extern void unsetenv (const char *);
+# else
+extern int unsetenv (const char *);
+# endif
+# endif
/* Call the underlying unsetenv, in case there is hidden bookkeeping
that needs updating beyond just modifying environ. */
diff --git a/tests/wctob.c b/tests/wctob.c
index cc26afc..508f896 100644
--- a/tests/wctob.c
+++ b/tests/wctob.c
@@ -1,5 +1,5 @@
/* Convert wide character to unibyte character.
- Copyright (C) 2008, 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2010-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
diff --git a/tests/wctomb-impl.h b/tests/wctomb-impl.h
index 4e95de6..60dc3b9 100644
--- a/tests/wctomb-impl.h
+++ b/tests/wctomb-impl.h
@@ -1,5 +1,5 @@
/* Convert wide character to multibyte character.
- Copyright (C) 2011 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
diff --git a/tests/wctomb.c b/tests/wctomb.c
index 889a3c6..3761108 100644
--- a/tests/wctomb.c
+++ b/tests/wctomb.c
@@ -1,5 +1,5 @@
/* Convert wide character to multibyte character.
- Copyright (C) 2011 Free Software Foundation, Inc.
+ Copyright (C) 2011-2013 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
diff --git a/tests/write.c b/tests/write.c
new file mode 100644
index 0000000..2d20421
--- /dev/null
+++ b/tests/write.c
@@ -0,0 +1,145 @@
+/* POSIX compatible write() function.
+ Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 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 <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <unistd.h>
+
+/* On native Windows platforms, SIGPIPE does not exist. When write() is
+ called on a pipe with no readers, WriteFile() fails with error
+ GetLastError() = ERROR_NO_DATA, and write() in consequence fails with
+ error EINVAL. */
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+# include <errno.h>
+# include <signal.h>
+# include <io.h>
+
+# define WIN32_LEAN_AND_MEAN /* avoid including junk */
+# include <windows.h>
+
+# include "msvc-inval.h"
+# include "msvc-nothrow.h"
+
+# undef write
+
+# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+static ssize_t
+write_nothrow (int fd, const void *buf, size_t count)
+{
+ ssize_t result;
+
+ TRY_MSVC_INVAL
+ {
+ result = write (fd, buf, count);
+ }
+ CATCH_MSVC_INVAL
+ {
+ result = -1;
+ errno = EBADF;
+ }
+ DONE_MSVC_INVAL;
+
+ return result;
+}
+# else
+# define write_nothrow write
+# endif
+
+ssize_t
+rpl_write (int fd, const void *buf, size_t count)
+{
+ for (;;)
+ {
+ ssize_t ret = write_nothrow (fd, buf, count);
+
+ if (ret < 0)
+ {
+# if GNULIB_NONBLOCKING
+ if (errno == ENOSPC)
+ {
+ HANDLE h = (HANDLE) _get_osfhandle (fd);
+ if (GetFileType (h) == FILE_TYPE_PIPE)
+ {
+ /* h is a pipe or socket. */
+ DWORD state;
+ if (GetNamedPipeHandleState (h, &state, NULL, NULL, NULL,
+ NULL, 0)
+ && (state & PIPE_NOWAIT) != 0)
+ {
+ /* h is a pipe in non-blocking mode.
+ We can get here in four situations:
+ 1. When the pipe buffer is full.
+ 2. When count <= pipe_buf_size and the number of
+ free bytes in the pipe buffer is < count.
+ 3. When count > pipe_buf_size and the number of free
+ bytes in the pipe buffer is > 0, < pipe_buf_size.
+ 4. When count > pipe_buf_size and the pipe buffer is
+ entirely empty.
+ The cases 1 and 2 are POSIX compliant. In cases 3 and
+ 4 POSIX specifies that write() must split the request
+ and succeed with a partial write. We fix case 4.
+ We don't fix case 3 because it is not essential for
+ programs. */
+ DWORD out_size; /* size of the buffer for outgoing data */
+ DWORD in_size; /* size of the buffer for incoming data */
+ if (GetNamedPipeInfo (h, NULL, &out_size, &in_size, NULL))
+ {
+ size_t reduced_count = count;
+ /* In theory we need only one of out_size, in_size.
+ But I don't know which of the two. The description
+ is ambiguous. */
+ if (out_size != 0 && out_size < reduced_count)
+ reduced_count = out_size;
+ if (in_size != 0 && in_size < reduced_count)
+ reduced_count = in_size;
+ if (reduced_count < count)
+ {
+ /* Attempt to write only the first part. */
+ count = reduced_count;
+ continue;
+ }
+ }
+ /* Change errno from ENOSPC to EAGAIN. */
+ errno = EAGAIN;
+ }
+ }
+ }
+ else
+# endif
+ {
+# if GNULIB_SIGPIPE
+ if (GetLastError () == ERROR_NO_DATA
+ && GetFileType ((HANDLE) _get_osfhandle (fd))
+ == FILE_TYPE_PIPE)
+ {
+ /* Try to raise signal SIGPIPE. */
+ raise (SIGPIPE);
+ /* If it is currently blocked or ignored, change errno from
+ EINVAL to EPIPE. */
+ errno = EPIPE;
+ }
+# endif
+ }
+ }
+ return ret;
+ }
+}
+
+#endif
diff --git a/tests/zerosize-ptr.h b/tests/zerosize-ptr.h
index beeb3da..f0e6155 100644
--- a/tests/zerosize-ptr.h
+++ b/tests/zerosize-ptr.h
@@ -1,5 +1,5 @@
/* Return a pointer to a zero-size object in memory.
- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by