========================================================================
-Copyright (C) 2000, 2006-2007, 2009-2013 Free Software Foundation, Inc.
+Copyright (C) 2000, 2006-2007, 2009-2014, 2016 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
2. 05 Sep 94 <djm@va.pubnix.com> slowness
3. 04 Oct 94 <pinard> Autoconf, m4, and dnl's.
-Copyright (C) 2000, 2006, 2009-2013 Free Software Foundation, Inc.
+Copyright (C) 2000, 2006, 2009-2014, 2016 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
-2013-09-15 Gary V. Vaughan <gary@gnu.org>
+2016-12-31 Eric Blake <eblake@redhat.com>
- 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.
+ version 1.4.18
+ * NEWS: Record release date.
- bootstrap: require newer texinfo release.
- * bootstrap.conf (buildreq): Bump required makeinfo binary
- release number to 4.13 to support --bulid-dir option.
+ doc: abbreviate and update release history
+ * doc/m4.texi (History): Shorten, and call out today's release.
- 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.
+2016-12-31 Eric Blake <eblake@redhat.com>
- 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>
+ maint: automate creation of release tag
+ The gnulib makefile was already set up to automate things with
+ 'make release ...', but we were still doing things by hand, and
+ thereby risking missing some steps.
- 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.
+ * m4/gnulib-cache.m4 (gl_MODULES): Import do-release-commit-and-tag.
+ * gnulib: Update, for latest version of the script.
+ * HACKING: Mention its use.
-2013-03-12 Eric Blake <eblake@redhat.com>
+2016-12-31 Eric Blake <eblake@redhat.com>
- maint: update to latest gnulib
- * gnulib: Update to latest, for mingw compile fixes.
+ maint: generate ChangeLog from git commits
+ Follow the practice set in numerous other GNU projects, where
+ the ChangeLog (since 2015) is generated from git commit messages.
+ This avoids duplication or subtle differences between the two,
+ as well as making it easier to merge patches across branches
+ (as good as Bruno Haible's 'git-merge-changelog' helper program
+ is, it still doesn't handle cross-branch cherry-picks very well).
-2013-03-11 Eric Blake <eblake@redhat.com>
+ * ChangeLog: Move...
+ * ChangeLog-2014: ...to this.
+ * Makefile.am (EXTRA_DIST): Ship renamed file.
+ (gen-ChangeLog): New rule, copied mostly from coreutils.
+ (dist-hook): Generate the ChangeLog.
+ * m4/gnulib-cache.m4 (gl_MODULES): Import gitlog-to-changelog.
+ * .gitignore: Ignore ChangeLog.
+ * .gitattributes: Likewise.
+ * HACKING: Reword to match new procedure, and simplify by
+ referring to an external description of ChangeLog style.
- build: fix large diversions on mingw
- * gl/lib/clean-temp.c.diff: New file.
- * NEWS: Mention the fix.
+2016-12-31 Eric Blake <eblake@redhat.com>
-2013-03-08 Gary V. Vaughan <gary@gnu.org>
+ maint: summarize highlights of pending release
+ * NEWS: Add some blurbs.
- 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.
+2016-12-31 Eric Blake <eblake@redhat.com>
- maint: automake 1.11.5 and earlier generate insecure dist
- rules.
- * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.5 or newer.
+ maint: make silent builds the default
+ The user still has full control over verbosity levels, both setting
+ their per-project defaults at configure time (or even in a config.site
+ file), as well as a per-run override. But these days, most projects
+ are defaulting to silent rules without user intervention.
-2010-09-17 Gary V. Vaughan <gary@gnu.org>
+ * configure.ac (AM_SILENT_RULES): Add, to match what most projects
+ are doing these days.
- 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.
+2016-12-31 Eric Blake <eblake@redhat.com>
-2013-01-02 Eric Blake <eblake@redhat.com>
+ maint: release no longer creates a diff file
+ Ever since commit f1cf390 (1.4.14 release), we no longer create
+ diff files as part of the release process. These days, it is
+ assumed that it is easier to download a fresh tarball rather
+ than to try and use a diff file to patch an older tarball.
- 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.
+2016-12-30 Eric Blake <eblake@redhat.com>
-2013-01-01 Eric Blake <eblake@redhat.com>
-
- maint: bump copyright year
- * all files: Version control now has a commit in 2013.
+ doc: drop obsolete @setcontentsaftertitlepage
+ texinfo 6.1 complains (during 'make dvi'):
- maint: update to latest gnulib
- * gnulib: Update to latest, for rational range regex, build fixes,
- copyright update.
- * NEWS: Document this.
+ /home/eblake/m4-1.4/doc/./m4.texi:9: @setcontentsaftertitlepage has been remove
+ d as a Texinfo command; move your @contents command if you want the contents af
+ ter the title page..
-2012-12-22 Eric Blake <eblake@redhat.com>
+ It turns out that eliminating the command has no effect - modern
+ tools correctly emit the contents in-place, right after the title
+ page, so it was leftover cruft from an older time.
- 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.
+ * doc/m4.texi: Satisfy newer texinfo.
- 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.
+2016-12-29 Eric Blake <eblake@redhat.com>
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.
- * gnulib: Update to latest.
- * NEWS: Mention the release.
- * src/builtin.c (m4_defn): Silence spurious -Wstrict-overflow
- warnings from gcc 4.5.1 at -O2.
-
-2011-02-28 Eric Blake <eblake@redhat.com>
-
- index: fix typo in previous commit
- * doc/m4.texinfo (Index macro): Actually expose the bug.
-
-2011-02-26 Eric Blake <eblake@redhat.com>
-
- index: fix another regression from faulty strstr
- * gnulib: Update to latest, for strstr fix.
- * doc/m4.texinfo (Index macro): Test for the bug.
- * NEWS: Document the fix.
- * THANKS: Update.
- Reported by Mike Stump, with additional analysis from Ralf
- Wildenhues and Jim Meyering.
-
-2011-02-07 Eric Blake <eblake@redhat.com>
-
- maint: speed up configure, using latest gnulib
- * gnulib: Update to latest.
- * m4/gnulib-cache.m4: Import fclose and rename modules.
- * configure.ac (gl_ASSERT_NO_GNULIB_POSIXCHECK): Speed up normal
- configure runs (and document how to rerun GNULIB_POSIXCHECK).
- * HACKING: Document GNULIB_POSIXCHECK.
-
- maint: update http git cloning instructions
- * HACKING: Git http doesn't like the redirect at git.sv.gnu.org.
- * THANKS: Update.
- Reported by Mike Dupont.
-
-2011-02-01 Eric Blake <eblake@redhat.com>
-
- maint: update to latest gnulib
- * gnulib: Update to latest.
- * m4/gnulib-cache.m4: Regenerate.
- * src/builtin.c (m4_ifelse): Use STREQ.
-
-2011-01-25 Eric Blake <eblake@redhat.com>
-
- maint: reflect recent copyright assignments
- * AUTHORS: Update.
-
-2011-01-03 Eric Blake <eblake@redhat.com>
-
- maint: update copyright year
- * gnulib: Update to latest.
- * m4/gnulib-cache.m4: Regenerate.
- * all other files: Run 'make update-copyright'.
-
- maint: document use of copyright ranges
- * README: Copy coreutils wording for allowing copyright year
- ranges. Also mention libsigsegv 2.9.
- * cfg.mk (UPDATE_COPYRIGHT_USE_INTERVALS): Now that GNU Coding
- Standards permit it, prefer shorthand copyright.
- * HACKING: Update libsigsegv preference.
- * NEWS: 1.4.16 will be in 2011.
- * doc/m4.texinfo (History): Likewise.
-
-2010-12-31 Eric Blake <eblake@redhat.com>
-
- main: avoid leaking string on Haiku
- * src/m4.c (main): Avoid leak when SIGBUS == SIGSEGV.
- * THANKS: Update.
- Reported by Scott McCreary.
-
-2010-12-24 Eric Blake <eblake@redhat.com>
-
- build: pull in various gnulib fixes
- * gnulib: Update to latest.
- * m4/gnulib-cache.m4: Reflect spawn-pipe module name change.
- * src/builtin.c (includes): Likewise.
- (define_user_macro): Alter comment to appease syntax-check.
- * src/input.c (pop_wrapup): Likewise.
- * src/output.c (undivert_all): Likewise.
- * cfg.mk (local-checks-to-skip): Skip new rule.
-
- maint: reflect recent copyright assignment
- * AUTHORS: Add Raphael Poss.
-
-2010-10-21 Eric Blake <eblake@redhat.com>
-
- build: work around glibc and libsigsegv bugs
- * gnulib: Update to latest.
- * m4/gnulib-cache.m4: Regenerate.
- * docs/m4.texinfo (Index macro): Expose strstr bug.
- * NEWS: Mention fixes.
-
- docs: mention more history
- * doc/m4.texinfo (History): Add upcoming 1.4.16 release.
-
-2010-08-31 Eric Blake <eblake@redhat.com>
-
- Release Version 1.4.15.
- * gnulib: Update to latest.
- * NEWS: Mention the release.
-
-2010-08-30 Eric Blake <eblake@redhat.com>
-
- Clean up compiler warnings.
- * src/builtin.c (m4_patsubst): Drop dead store.
- * src/eval.c (unary_term): Likewise.
- * src/input.c (match_input): Likewise. Also drop useless casts to
- void.
- * src/symtab.c (symtab_debug): Drop useless casts.
-
- Test previous commit.
- * doc/m4.texinfo (Format): Add a test.
- * NEWS: Document the fix.
- * THANKS: Update.
-
-2010-08-30 Carlo Teubner <carlo.teubner@gmail.com> (tiny change)
-
- Avoid a crash with bad format string.
- * src/format.c (expand_format): Fix off-by-one error.
-
-2010-08-30 Eric Blake <eblake@redhat.com>
-
- Document recent bug fixes.
- * NEWS: Add some entries.
- * gnulib: Update to latest, for more AIX fixes.
-
-2010-07-30 Eric Blake <eblake@redhat.com>
-
- Update to newer gnulib.
- * gnulib: Update to latest, for strtod fix.
- * src/Makefile.am (m4_LDADD): Update link libraries accordingly.
- * cfg.mk (local-checks-to-skip): Skip broken check.
- * doc/m4.texinfo: Drop all use of @acronym{}.
- * THANKS: Update.
- Reported by Rainer Tammer.
-
-2010-06-04 Eric Blake <eblake@redhat.com>
+ I hit a weird failure during 'make check', and traced it to a recent
+ gnulib regression in parallel test safety. Pick up the gnulib fix.
- Reflect recent copyright assignment.
- * AUTHORS: Add David Warme.
+ * gnulib: Update to latest, to fix failure in getopt tests.
- Update to newer gnulib.
- * gnulib: Update to latest, and include C++ tests.
- * configure.ac (gl_CXX_CHOICE_DEFAULT_NO): Make default for C++
- tests be disabled...
- * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): ...but run them when
- building package.
- * m4/gnulib-cache.m4: Regenerate.
- * build-aux/.cvsignore: Likewise.
- * build-aux/.gitignore: Likewise.
-
- Fix build on newer glibc.
- * src/m4.h (includes): Add <sys/stat.h>.
- * THANKS: Update.
- Reported by Todd Rinaldo.
-
-2010-03-02 Giuseppe Scrivano <gscrivano@gnu.org> (tiny change)
-
- Support bootstrap --gnulib-srcdir=DIR.
- * bootstrap: Add --gnulib-srcdir option, which overrides
- GNULIB_SRCDIR, for consistency with gnulib bootstrap.
-
-2010-02-24 Eric Blake <eblake@redhat.com>
-
- Release Version 1.4.14.
- * gnulib: Update to latest.
- * README: Increase libsigsegv recommendation.
- * HACKING: Likewise. Tweak release instructions.
- * NEWS: Mention the release.
-
- Improve parsing example.
- * doc/m4.texinfo (Input processing): Double-quote argument to
- translit, for robustness.
- * THANKS: Update.
- Reported by Chris Penev.
+2016-12-29 Eric Blake <eblake@redhat.com>
-2010-01-29 Eric Blake <ebb9@byu.net>
+ maint: regenerate bootstrap
+ Missed during the copyright update.
- Document upcoming release.
- * gnulib: Update to latest.
- * doc/m4.texinfo (History): Mention 1.4.14.
-
-2010-01-06 Eric Blake <ebb9@byu.net>
+ * bootstrap: Regenerate.
- Use correct license on auxiliary documentation.
- * gnulib: Update to latest.
- * AUTHORS: Use GFDL 1.3, not 1.2.
- * BACKLOG: Likewise.
- * README: Likewise.
- * THANKS: Likewise.
- * TODO: Likewise.
- * NEWS: Place under GFDL.
- * cfg.mk (old_NEWS_hash): Update.
+2016-12-29 Eric Blake <eblake@redhat.com>
-2010-01-05 Eric Blake <ebb9@byu.net>
+ maint: bump copyright year
+ Sadly, there's no commit in 2015, which means we don't get to benefit
+ from using a copyright range.
- Remove more TAB characters.
- * THANKS: Use space for alignment.
- * bootstrap: Likewise.
- * checks/stackovf.test: Likewise.
- * configure.ac: Likewise.
- * src/builtin.c: Likewise. Also update some stale comments.
- * src/debug.c: Likewise.
- * src/eval.c: Likewise.
- * src/format.c: Likewise.
- * src/freeze.c: Likewise.
- * src/input.c: Likewise.
- * src/m4.c: Likewise.
- * src/m4.h: Likewise.
- * src/macro.c: Likewise.
- * src/output.c: Likewise.
- * src/path.c: Likewise.
- * src/symtab.c: Likewise.
+ Done with 'make update-copyright'.
- Clarify minimum bootstrap requirements.
- * bootstrap: Avoid out-of-date duplicated data.
+ * all files: Version control now has a commit in 2016.
- Security fix by requiring newer automake features.
- * configure.ac (AM_INIT_AUTOMAKE): Add dist-xz, color-tests,
- parallel-tests, and silent-rules.
- (AC_PREREQ): Bump autoconf requirement to 2.62, per automake.
- * HACKING: Update minimum requirements.
- * NEWS: Document the fix.
+2016-12-29 Eric Blake <eblake@redhat.com>
- Drop hard-coding of GPG id.
+ gnulib: Update to latest
* gnulib: Update to latest.
* m4/gnulib-cache.m4: Regenerate.
- * cfg.mk (gpg_key_ID): Delete, now that maint.mk provides a
- sensible default.
- (update-copyright-env): Don't let environment interfere with wrap
- column.
-
-2010-01-01 Eric Blake <ebb9@byu.net>
-
- Update copyright year.
- All files impacted, via 'make update-copyright'. Additionally:
- * .gitignore: Ignore backup files.
-
-2009-12-29 Eric Blake <ebb9@byu.net>
-
- Document new indentation policy.
- * HACKING: Document indentation policy.
- * .x-sc_prohibit_tab_based_indentation: New file.
- * cfg.mk (sc_prohibit_tab_based_indentation): New rule.
- * Makefile.am (syntax_check_exceptions): New macro.
- (EXTRA_DIST): Distribute exception files, and .prev-version.
-
- Switch to indentation by space, not tab.
- * .gitmodules: Convert leading tabs to spaces.
- * TODO: Likewise.
- * bootstrap: Likewise.
- * c-boxes.el: Likewise.
- * checks/check-them: Likewise.
- * checks/get-them: Likewise.
- * checks/stackovf.test: Likewise.
- * configure.ac: Likewise.
- * src/builtin.c: Likewise.
- * src/debug.c: Likewise.
- * src/eval.c: Likewise.
- * src/format.c: Likewise.
- * src/freeze.c: Likewise.
- * src/input.c: Likewise.
- * src/m4.c: Likewise.
- * src/m4.h: Likewise.
- * src/macro.c: Likewise.
- * src/output.c: Likewise.
- * src/path.c: Likewise.
- * src/symtab.c: Likewise.
-
- Update to latest gnulib.
- * gnulib: Update.
- * m4/gnulib-cache.m4: Import xoset.
- * src/output.c (includes): Ensure that gnulib oset usage will
- call xalloc_die on memory failure.
- * build-aux/.cvsignore: Regenerate.
- * build-aux/.gitignore: Likewise.
-
-2009-11-28 Eric Blake <ebb9@byu.net>
-
- Work around BSD getopt bug.
- * gnulib: Update.
- * doc/m4.texinfo (Command line files): Add test.
-
- Use fastmap for better regex performance.
- * src/input.c (word_start): Delete.
- (pop_wrapup): Free memory on exit.
- (set_word_regexp): Compile a fastmap instead.
- (peek_token, next_token): Use the fastmap.
-
-2009-11-26 Eric Blake <ebb9@byu.net>
-
- Ignore write failures before stack overflow exit.
- * m4/gnulib-cache.m4: Import ignore-value module.
- * src/m4.c (fault_handler): Use it to avoid compiler warning.
-
-2009-11-25 Eric Blake <ebb9@byu.net>
-
- Allow use of compiler warnings.
- * m4/gnulib-cache.m4: Import manywarnings module.
- * configure.ac (WERROR_CFLAGS, WARN_CFLAGS): New variables.
- * src/Makefile.am (AM_CFLAGS): Use them.
- * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Turn on warnings during
- distcheck.
- * src/m4.h (M4_GNUC_NORETURN): New macro.
- (trace_post): Delete unused parameter.
- * src/m4.c (usage): Mark as noreturn.
- (main): Remove unused parameter.
- * src/debug.c (trace_post): Likewise.
- (trace_pre): Cover all enum values.
- * src/symtab.c (lookup_symbol): Likewise.
- * src/builtin.c (define_macro, m4_dumpdef): Likewise.
- (m4_define, m4_undefine, m4_pushdef, m4_popdef, m4_sysval)
- (m4_divert, m4_undivert, m4_dnl, m4_changequote, m4_changecom)
- (m4_changeword, m4_syscmd, m4_include, m4_sinclude, m4_m4exit)
- (m4_debugmode, m4_debugfile, m4_placeholder): Mark unused
- parameters.
- (mkstemp_helper): Use parameter.
- (substitute): Avoid signed vs. unsigned comparison.
- * src/format.c (arg_int, arg_long, arg_double): Likewise.
- * src/input.c (next_token): Likewise.
- * src/output.c (freeze_diversions): Likewise.
- (m4_tmpname): Allow C++ compilation.
- * src/freeze.c (produce_frozen_state, GET_NUMBER): Use correct
- type.
- * src/macro.c (call_macro): Cover all enum values.
- (expand_macro): Update caller.
- * src/path.c (m4_fopen): Remove unused parameter.
- (m4_path_search): Update caller.
-
- Silence syntax-check warnings.
- * src/m4.h (STREQ): New macro.
- * src/builtin.c (find_builtin_by_name): Use it.
- * src/input.c (set_word_regexp): Likewise.
- * src/m4.c (process_file): Likewise.
- (main): Consistently spell warning, and mark output strings.
- Avoid unsafe parsing functions.
- (process_file): Mark output strings.
- * src/output.c (make_diversion): Likewise.
- * src/format.c (arg_int, arg_long, arg_double): New helpers.
- (ARG_INT, ARG_LONG, ARG_DOUBLE): Use them to detect parse errors.
- * BACKLOG: Avoid whitespace problems.
- * TODO: Likewise.
- * HACKING: Likewise.
- * examples/esyscmd.m4: Likewise.
- * examples/file.m4: Likewise.
- * examples/fstab.m4: Likewise.
- * examples/patsubst.m4: Likewise.
-
- Use gnulib maintainer-makefile module.
- * m4/gnulib-cache.m4: Import maintainer-makefile module.
- * cfg.mk (local-checks-to-skip): Drop changelog-check; add
- sc_cast_of_x_alloc_return_value.
- (gnulib_dir, gnu_rel_host, url_dir_list): Delete; provided by
- maint.mk.
- (config_h_header, old_NEWS_hash): New macros.
- * .prev-version: New file.
- * maint.mk: Remove from version control; use gnulib instead.
- * .gitignore: Update.
- * HACKING: Update.
-
- Update from gnulib.
- * gnulib: Update.
- * m4/gnulib-cache.m4: Use --makefile-name.
- * lib/Makefile.am: Wrap the gnulib-generated file.
- * tests/Makefile.am: Likewise.
- * .gitignore: Track our wrappers.
- * doc/m4.texinfo (Improved capitalize): Fix typo.
-
-2009-10-05 Eric Blake <ebb9@byu.net>
-
- Update from gnulib.
- * gnulib: Update.
- * m4/gnulib-cache.m4: Import gnu-web-doc-update module.
- * build-aux/.gitignore: Ignore new file.
- * build-aux/.cvsignore: Likewise.
-
-2009-08-20 Eric Blake <ebb9@byu.net>
-
- Update from gnulib.
- * gnulib: Update.
- * AUTHORS: Mention recent copyright assignment.
-
-2009-08-17 Eric Blake <ebb9@byu.net>
-
- Enhance test with closed descriptors.
- * doc/m4.texinfo (Command line files): Enhance test from
- 2009-07-20 to actually test the bug being fixed.
-
- Update copyright year.
- * AUTHORS: Run UPDATE_COPYRIGHT_FORCE=1 make update-copyright.
- * BACKLOG: Likewise.
- * Makefile.am: Likewise.
- * TODO: Likewise.
- * acinclude.m4: Likewise.
- * c-boxes.el: Likewise.
- * cfg.mk: Likewise.
- * checks/Makefile.in: Likewise.
- * checks/check-them: Likewise.
- * checks/stackovf.test: Likewise.
- * doc/Makefile.am: Likewise.
- * examples/Makefile.am: Likewise.
- * src/Makefile.am: Likewise.
- * src/debug.c: Likewise.
- * src/eval.c: Likewise.
- * src/freeze.c: Likewise.
- * src/m4.h: Likewise.
- * src/macro.c: Likewise.
- * src/path.c: Likewise.
- * src/symtab.c: Likewise.
-
- Prepare to bulk update copyright year.
- * gnulib: Update.
- * m4/gnulib-cache.m4: Import update-copyright and vc-list-files
- modules.
- * maint.mk: Fix copyright.
- (build_aux, VC_LIST, VC_LIST_EXCEPT, update-copyright): New macros
- and rules borrowed from gnulib.
- * cfg.mk (update-copyright-env): Enforce longhand behavior.
- * .cvsignore: Reflect these changes.
- * .gitignore: Likewise.
- * .x-update-copyright: New file.
-
-2009-08-14 Eric Blake <ebb9@byu.net>
-
- Explicitly request GNU getopt extensions.
- * gnulib: Update.
- * m4/gnulib-cache.m4: Use getopt-gnu, not obsolete getopt module.
-
-2009-07-22 Eric Blake <ebb9@byu.net>
-
- Fix testsuite on Solaris.
- * doc/m4.texinfo (Command line files): Tolerate different spelling
- of EBADF.
- * src/builtin.c (m4_esyscmd): Clear errno before reaping.
-
-2009-07-21 Eric Blake <ebb9@byu.net>
-
- Fix testsuite on mingw.
- * gnulib: Update.
-
-2009-07-20 Eric Blake <ebb9@byu.net>
-
- Pick up gnulib fixes for sub-process execution.
- * gnulib: Update.
- * doc/m4.texinfo (Command line files): Add test; regression
- introduced 2009-03-05.
- * NEWS: Document the change.
-
- Avoid cygwin 1.7 crash with closed stdout.
- * gnulib: Update.
- * doc/m4.texinfo (Command line files): Add test; regression
- introduced 2008-07-17.
- * NEWS: Document the change.
-
- A status of 127 does not always imply esyscmd failure.
- * src/builtin.c (m4_esyscmd): Silence gnulib message; regression
- introduced 2009-03-05.
- * doc/m4.texinfo (Sysval): Test this.
- * NEWS: Document the change.
-
-2009-06-25 Eric Blake <ebb9@byu.net>
-
- Fix description of limits on diversions.
- * doc/m4.texinfo (Diversions): Fix grammar. Be less pessimistic
- about limitations.
- * THANKS: Update.
- Reported by Elias Benali.
-
-2009-06-17 Eric Blake <ebb9@byu.net>
-
- Update to latest gnulib.
- * gnulib: Import fixes for Interix compilation.
- * THANKS: Update.
- Reported by Jay Krell.
-
-2009-05-22 Eric Blake <ebb9@byu.net>
-
- Update to latest gnulib.
- * gnulib: Import fixes for AIX compilation.
- * THANKS: Update.
- Reported by Jens Rehsack.
-
-2009-04-13 Eric Blake <ebb9@byu.net>
-
- Fix GFDL usage.
- * doc/m4.texinfo (copying): Complete transition to GFDL 1.3,
- started 2008-12-12.
- Reported by Santiago Vila.
-
-2009-04-01 Eric Blake <ebb9@byu.net>
-
- Release Version 1.4.13.
- * NEWS: Mention the release.
-
-2009-03-31 Eric Blake <ebb9@byu.net>
-
- Tweak submodule instructions.
- * HACKING: Improve directions.
- * gnulib: Update to latest version.
-
-2009-03-23 Eric Blake <ebb9@byu.net>
-
- Don't force file overwrites during bootstrap.
- * bootstrap: Ensure that rerunning bootstrap doesn't alter tree.
-
- Drop dist-lzma, now that xz replaces lzma.
- * configure.ac (AM_INIT_AUTOMAKE): Drop dist-lzma. Until a stable
- automake release includes dist-xz, the release process will just
- manually create a .xz tarball.
- * gnulib: Update to latest gnulib.
-
-2009-03-19 Eric Blake <ebb9@byu.net>
-
- Exploit git submodule by adding appropriate symlinks.
- * bootstrap: No longer copy files from gnulib.
- * COPYING: Change to symlink pointing into gnulib.
- * INSTALL: Likewise.
- * build-aux/compile: Likewise.
- * build-aux/config.guess: Likewise.
- * build-aux/config.sub: Likewise.
- * build-aux/depcomp: Likewise.
- * build-aux/install-sh: Likewise.
- * build-aux/mdate-sh: Likewise.
- * build-aux/missing: Likewise.
- * build-aux/texinfo.tex: Likewise.
- * .cvsignore: Reflect these changes.
- * .gitignore: Likewise.
- * build-aux/.cvsignore: New file.
- * build-aux/.gitignore: Likewise.
-
-2009-03-18 Eric Blake <ebb9@byu.net>
-
- Make gnulib a git submodule.
- * .gitmodules: New file.
- * gnulib: Record which version of gnulib has been tested.
- * bootstrap: Aid in submodule usage.
- * cfg.mk (gnulib_dir): Alter default location of gnulib.
- * HACKING: Mention how to use submodule.
-
- Use latest compile script, even with stable automake.
- * bootstrap: Also sync build-aux/compile.
-
-2009-03-12 Eric Blake <ebb9@byu.net>
-
- Fix awk script portability.
- * checks/get-them: In gsub, properly escape {. Close all files
- before exiting.
- Reported by Gary V. Vaughan.
-
-2009-03-05 Eric Blake <ebb9@byu.net>
-
- Allow configuration choice in syscmd shell.
- * configure.ac (SYSCMD_SHELL): New test.
- * src/builtin.c (m4_syscmd, m4_esyscmd): Use it to avoid
- hard-coding the shell location.
- * doc/m4.texinfo (Syscmd, Esyscmd): Document this.
- * README: Document new configure option.
- * NEWS: Likewise.
-
- Remove cruft now that gnulib modules do the work.
- * configure.ac (M4_cv_func_system_consistent): Delete.
- * src/builtin.c (M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS):
- Delete.
-
- Use gnulib pipe module instead of popen(3).
- * m4/gnulib-cache.m4: Import pipe and wait-process modules.
- * src/builtin.c (m4_esyscmd): Rewrite with pipe module.
- Resolves a failure on AIX, reported by Gary V. Vaughan.
-
- Use gnulib execute module instead of system(3).
- * m4/gnulib-cache.m4: Import execute module.
- * src/builtin.c (m4_sysval): Move computation...
- (m4_esyscmd): ...into caller.
- (m4_syscmd): Rewrite with execute module.
- Resolves a failure on AIX, reported by Gary V. Vaughan.
-
-2009-03-03 Eric Blake <ebb9@byu.net>
-
- Try to tolerate spaces in directory names in testsuite.
- * doc/m4.texinfo (Diversions, Using frozen files): Provide shell
- quoting, in case __program__ contains spaces.
-
- Improve web-manual maintainer rule.
- * maint.mk (web-manual): Work with VPATH builds. Factor
- package-specific detail...
- * cfg.mk (manual_title): ...to new variable.
-
-2009-02-26 Eric Blake <ebb9@byu.net>
-
- Make bootstrap easier on Solaris.
- * bootstrap: Add GNULIB_SRCDIR. Useful when a wrapper script
- gnulib-tool exists earlier on the path to work around /bin/sh
- failure in parsing $GNULIB_SRCDIR/gnulib-tool.
-
-2009-02-19 Eric Blake <ebb9@byu.net>
-
- Fix regression in translit.
- * src/builtin.c (m4_translit): Use correct comparison.
- * doc/m4.texinfo (Translit): Enhance test.
-
- Speed up input engine, by searching for quotes by buffer.
- * src/input.c (struct input_block): Add end pointer to string.
- (push_string_finish, push_wrapup): Populate it.
- (next_token): For quotes, attempt a buffer search.
- * NEWS: Document this.
-
-2009-02-18 Eric Blake <ebb9@byu.net>
-
- Speed up translit when from argument is short.
- * m4/gnulib-cache.m4: Import memchr2 module.
- * src/builtin.c (m4_translit): Use memchr2 when possible.
- * doc/m4.texinfo (Translit): Add tests.
- * NEWS: Document this.
-
- Update copyright year.
- * THANKS: Mention 2009 in copyright year.
-
- Prefer buffer over byte operations.
- * src/format.c (expand_format): Use strchr for speed.
- * src/builtin.c (substitute, expand_user_macro): Likewise.
-
- Speed up esyscmd with buffer reads.
- * src/builtin.c (m4_esyscmd): Read blocks directly into obstack,
- rather than repeatedly reading bytes. Detect read errors.
-
- Avoid risk of stack overflow.
- * src/output.c (insert_file): Avoid stack allocation of large
- buffer.
- (freeze_diversions): Avoid spurious semicolon.
-
-2009-02-16 Eric Blake <ebb9@byu.net>
-
- Avoid test failure due to different errno.
- * doc/m4.texinfo (Using frozen files): Ignore stdout, since
- hardened systems can prevent attempts to read /.
- * THANKS: Update.
- Reported by Ronny Peine, in Gentoo bug 259184.
-
- Avoid tests that make no sense, because m4 is single-threaded.
- * m4/gnulib-cache.m4: Avoid lock-tests and tls-tests.
-
-2009-02-12 Eric Blake <ebb9@byu.net>
-
- Avoid quadratic code when walking definition stack.
- * examples/stack_sep.m4: Use linear, not quadratic
- implementation.
- * doc/m4.texinfo (Improved copy): Fix documentation and add test,
- based on recent autoconf bug fix.
-
-2009-01-24 Eric Blake <ebb9@byu.net>
-
- Add URLs to --help output.
- * src/m4.c (usage): Use enhanced version-etc features.
-
-2009-01-02 Eric Blake <ebb9@byu.net>
-
- Use nicer email address in web manual.
- * maint.mk (web-manual): Use new option in gendocs.sh.
-
- Nuke xdelta diffs at release time; no one reported using them.
- * maint.mk (got-xdelta, delta-xdelta): Delete.
- * HACKING: Likewise.
-
-2009-01-01 Eric Blake <ebb9@byu.net>
-
- Update copyright year.
- * NEWS: M4 1.4.13 will occur in 2009.
- * doc/m4.texinfo (History): Likewise.
-
-2008-12-24 Eric Blake <ebb9@byu.net>
-
- Prepare for eventual release.
- * doc/m4.texinfo (History): Mention 1.4.13.
-
-2008-12-22 Eric Blake <ebb9@byu.net>
-
- Make --debugfile argument optional.
- * src/builtin.c (m4_debugfile): Make error message consistent.
- * src/m4.c (long_options): Make the argument optional, to allow
- setting debug file back to stderr.
- (main): Make --debugfile order-dependent.
- (usage): Document this.
- * doc/m4.texinfo (Debugging options): Likewise.
- * NEWS: Likewise.
-
- Use @var correctly.
- * doc/m4.texinfo (Operation modes, Preprocessor features)
- (Limits control, Frozen state, Debugging options): Use lower case
- names in @var.
- (Improved copy): Use @code, not @var, as appropriate.
-
-2008-12-18 Eric Blake <ebb9@byu.net>
-
- Document optimized forloop.
- * doc/m4.texinfo (Improved forloop): Mention alternate style that
- avoids define overhead.
- * examples/forloop3.m4: New file.
- * examples/Makefile.am (EXTRA_DIST): Distribute it.
-
- Deal with M4 1.4.x limitation on builtin tokens.
- * doc/m4.texinfo (Composition): Mention limitation on curry.
- (Improved copy): New node.
- * examples/stack_sep.m4: New file.
- * examples/Makefile.am (EXTRA_DIST): Distribute it.
-
- Document copy composite using stack_foreach and curry.
- * doc/m4.texinfo (Stacks): New node, to document pushdef stack
- manipulation.
- (Ifelse): Move define_blind...
- (Composition): ...to this new node. Document currying, then use
- it to implement copy and rename.
- * examples/curry.m4: New file.
- * examples/stack.m4: Likewise.
- * examples/Makefile.am (EXTRA_DIST): Distribute them.
-
-2008-12-17 Eric Blake <ebb9@byu.net>
-
- Don't override signal handlers installed by c-stack.
- * src/m4.c (main): Reorder installation of signal handlers, so we
- don't trash a SIGBUS handler installed by c-stack. Also provide a
- SIGSEGV fallback, for platforms where c-stack combined with
- libsigsegv uses something lower level than SIGSEGV.
-
-2008-12-12 Eric Blake <ebb9@byu.net>
-
- Double size of temp file cache.
- * src/output.c (tmp_file, tmp_file_owner): Split...
- (tmp_file1, tmp_file2, tmp_file1_owner, tmp_file2_owner): ...into
- two variables.
- (tmp_file2_recent): New variable.
- (m4_tmpopen, m4_tmpclose, m4_tmpremove, m4_tmprename)
- (output_exit): Adjust callers.
-
- Use fewer seeks on cached files.
- * src/output.c (m4_tmpfile): Use write, not append mode.
- (m4_tmpopen): Add parameter to decide when to skip seeks.
- (m4_tmprename, make_diversion, insert_diversion_helper)
- (freeze_diversions): Adjust callers.
-
- Cache most recently spilled diversion.
- * src/output.c (tmp_file, tmp_file_owner): New variables, for
- 1-deep cache of spilled diversions.
- (m4_tmpfile): Open in append mode, since we might revisit
- diversion without closing it now.
- (m4_tmpopen): Check cache first.
- (m4_tmpclose): Update cache, rather than closing. Add parameter.
- (m4_tmpremove): Close cache before removing.
- (m4_tmprename): Deal with open files when renaming.
- (output_exit): Close cache before exiting.
- (make_room_for, make_diversion, insert_diversion_helper): Adjust
- callers.
- * configure.ac (RENAME_OPEN_FILE_WORKS): New configure test.
-
- Correctly track size of in-memory diversions.
- * src/output.c (insert_diversion_helper): Correctly track total
- in-memory diversion size after undivert.
-
- Avoid quadratic behavior for some cases of divert/undivert.
- * src/output.c (struct m4_diversion): Improve comments.
- (m4_tmpname, make_diversion): Strengthen preconditions.
- (m4_tmprename): New function.
- (output_init, output_exit): Move after internal functions.
- (make_room_for): Don't bother copying uninitialized bytes.
- (insert_diversion_helper): Transfer metadata, rather than copying
- contents, when undiverting into a previously unused diversion.
- * src/m4.h (includes): Add assert.h.
- * doc/m4.texinfo (Diversions): Add test.
- (Undivert): Enhance test.
- * NEWS: Document the speedup.
-
-2008-12-12 Eric Blake <ebb9@byu.net>
-
- Upgrade to FDL 1.3, keep COPYING in repository.
- * Makefile.am (MAINTAINERCLEANFILES): Don't remove COPYING.
- * .cvsignore: Don't ignore it.
- * .gitignore: Likewise.
- * COPYING: Store in repository, per automake 1.10.2
- recommendation.
- * m4/gnulib-cache.m4: Replace fdl module with fdl-1.3.
- * doc/m4.texinfo (GNU Free Documentation License): Upgrade
- license.
- * doc/Makefile.am (m4_TEXINFOS): Likewise.
- * NEWS: Mention the documentation license change.
-
-2008-10-10 Eric Blake <ebb9@byu.net>
-
- Release Version 1.4.12.
- * NEWS: Mention the release.
-
-2008-10-06 Eric Blake <ebb9@byu.net>
-
- Work around Solaris' sed inability to process NUL.
- * checks/check-them (SED): Allow user to override.
-
-2008-09-25 Eric Blake <ebb9@byu.net>
-
- Tweak error message on command line failure.
- * src/m4.c (process_file): Match wording of include builtin.
- * src/freeze.c (produce_frozen_state): Likewise.
- * m4/gnulib-cache.m4: Regenerate.
- * doc/m4.texinfo (Command line files, Using frozen files): Update
- tests accordingly.
-
-2008-09-24 Eric Blake <ebb9@byu.net>
-
- Unify error handling for reading directories.
- * src/path.c (m4_path_search): Factor open attempts...
- (m4_fopen): ...into new function, to reject directories.
- * doc/m4.texinfo (Include): Document that directories cannot be
- input files.
-
- Avoid bugs on platforms that mishandle trailing /.
- * m4/gnulib-cache.m4: Import fopen module.
- * doc/m4.texinfo (Command line files, Include): Add tests.
- (Using frozen files): This test now works on mingw.
- * checks/check-them (examples): Expand xerr to allow ignoring
- error output because of differences in platform errno values.
-
-2008-09-22 Eric Blake <ebb9@byu.net>
-
- Support alternate path separator.
- * m4/gnulib-cache.m4: Import dirname and filenamecat modules.
- * src/m4.h (includes): Add headers.
- * src/path.c (m4_path_search): Avoid literal use of '/' as path
- separator and when detecting absolute paths.
-
-2008-09-16 Eric Blake <ebb9@byu.net>
-
- Fix bootstrap for Solaris /bin/sh.
- * bootstrap: Avoid shell quoting pitfall.
-
-2008-09-01 Eric Blake <ebb9@byu.net>
-
- Fix building with -DDEBUG=1.
- * src/input.c (lex_debug) [DEBUG_INPUT]: Fix compilation failure.
- * src/symtab.c (symtab_debug) [DEBUG_SYM]: Likewise.
- * src/m4.c (includes) [DEBUG_STKOVF]: Likewise.
- Reported by Tom G. Christensen.
-
-2008-09-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
-
- Typos in source code comments.
- * src/builtin.c: Fix typos in comments.
- * src/input.c: Likewise.
-
-2008-08-29 Eric Blake <ebb9@byu.net>
-
- Fix manual date information.
- * doc/m4.texinfo: UPDATED refers to the day the manual was built,
- not the release date of M4.
- Based on a bison patch by Akim Demaille.
-
-2008-08-27 Eric Blake <ebb9@byu.net>
-
- Fix typo.
- * doc/m4.texinfo (Invoking m4): 'm4 -d+f' is not supported in this
- branch.
-
-2008-08-25 Eric Blake <ebb9@byu.net>
-
- Update recommendation now that libsigsegv 2.6 is released.
- * NEWS: Recommend libsigsegv 2.6+.
- * README: Likewise.
-
-2008-08-21 Eric Blake <ebb9@byu.net>
-
- Fix crash with traced defn(undef), regression from 2007-08-09.
- * src/builtin.c (m4_defn): Handle traced but undefined macros.
- * doc/m4.texinfo (Trace): Test it.
- * NEWS: Document it.
-
-2008-08-18 Eric Blake <ebb9@byu.net>
-
- Fix crash with 'm4 -N9', regression from 2006-09-14.
- * src/m4.c (main): Add missing break.
- * NEWS: Document it.
-
-2008-08-15 Eric Blake <ebb9@byu.net>
-
- Documentation updates.
- * doc/m4.texinfo (History): Mention 1.4.12.
- (Builtin): Enhance regression tests.
- (Debug Levels): Mention effect of -l. Enhance regression tests.
- (Incompatibilities): Fix typo, and mention trace output.
- (Improved capitalize): Simplify example.
-
- Avoid compiler warning.
- * src/builtin.c (m4_ifelse): Avoid unused variable.
- * THANKS: Update.
- Reported by Tom G. Christensen.
-
- Improve 'git diff' of manual source.
- * .gitattributes (*.texi*): Add diff attribute.
- * bootstrap: Tell git how to use it.
- Inspired by Jim Meyering's similar patch for coreutils.
-
-2008-08-11 Eric Blake <ebb9@byu.net>
-
- Avoid triggering OS/2 bug in testsuite.
- * doc/m4.texinfo (Mkstemp): Don't assume test(1) status is 1.
- Reported by Elbert Pol.
-
-2008-08-03 Eric Blake <ebb9@byu.net>
-
- Increase ulimit stack value to be larger than SIGSTKSZ.
- * checks/stackovf.test (tmpfile): Use 300K rather than 50K, since
- at least OpenBSD's sh died early from an undersized stack limit.
-
-2008-07-17 Eric Blake <ebb9@byu.net>
-
- Remove redundant examples/stackovf.sh.
- * examples/stackovf.sh: Delete, now that checks has better
- version.
- * examples/Makefile.am (EXTRA_DIST): Don't distribute it.
-
-2008-07-17 Eric Blake <ebb9@byu.net>
-
- Adjust to c-stack changes in gnulib.
- * src/Makefile.am (m4_LDADD): Use libsigsegv when available and
- necessary, via LIBCSTACK.
- * src/m4.c (main) [DEBUG_STACKOVF]: Make it easier to test fault
- handlers.
- * checks/stackovf.test: New file.
- * checks/Makefile.in (CHECKS): Add stackovf.test, and factor...
- (DOC_CHECKS): ...generated documentation tests into new macro.
- (DISTFILES): Distribute stackovf.test.
- * checks/check-them: Special-case stackovf.test.
- * NEWS: Enhance the NEWS item for -L improvements.
- * README: Mention the optional dependency.
- * HACKING: Mention maintenance burden added by libsigsegv.
-
-2008-06-21 Eric Blake <ebb9@byu.net>
-
- Use new sigaction module.
- * m4/gnulib-cache.m4: Import sigaction module.
- * src/m4.c (main): Drop signal() calls.
-
-2008-06-18 Eric Blake <ebb9@byu.net>
-
- Also trap SIGILL, SIGFPE, SIGBUS.
- * m4/gnulib-cache.m4: Import strsignal module.
- * src/m4.c (main): Register more handlers, and prefer sigaction
- when available.
- (SIGBUS, NSIG): Provide fallback when lacking.
- (signal_message): New variable, to keep async-safety.
- (fault_handler): Display faulting signal description.
- * configure.ac (gl_DISABLE_THREADS): Request gnulib modules to
- optimize for single-threaded operation.
-
-2008-06-06 Eric Blake <ebb9@byu.net>
-
- Inform users what to do in case of programmer error.
- * src/m4.h (EXIT_INTERNAL_ERROR): New macro.
- * configure.ac (AC_TYPE_SIGNAL): Delete, now that we assume C89.
- * src/m4.c (fault_handler): New method.
- (program_error_message): New variable, for async-safety.
- (main): Print bug reporting address rather than dump core on any
- failed assertions or detected non-stack-overflow faults.
-
-2008-06-06 Eric Blake <ebb9@byu.net>
-
- Replace stackovf with gnulib c-stack.
- * m4/gnulib.cache.m4: Import c-stack module.
- * configure.ac (AC_CHECK_HEADERS_ONCE): Remove check for
- siginfo.h, sys/wait.h.
- (AC_CHECK_TYPES): Likewise for siginfo_t.
- (AC_CHECK_MEMBERS): Likewise for sa_sigaction, ss_sp.
- (AC_CHECK_FUNCS_ONCE): Likewise for sigaction, sigaltstack,
- sigstack, sigvec, strerror.
- (M4_cv_use_stackovf): Likewise for stack overflow detection.
- * src/Makefile.am (m4_SOURCES): Don't build stackovf.c.
- * src/stackovf.c: Delete.
- * src/m4.h (setup_stackovf_trap): Delete.
- * src/m4.c (stackovf_handler): Delete.
- (main): Use c_stack_action instead of setup_stackovf_trap. If
- stack overflow is detectable, don't limit -L artificially.
- (usage): Document unlimited default on supported systems.
- * doc/m4.texinfo (Limits control): Document new default nesting
- limit.
- * NEWS: Document this change.
-
-2008-07-30 Eric Blake <ebb9@byu.net>
-
- Avoid regressions in trace and comment output.
- * doc/m4.texinfo (Trace): Add test.
- (Comments): Likewise.
-
-2008-07-28 Eric Blake <ebb9@byu.net>
-
- Optimize iteration examples.
- * examples/forloop2.m4: Avoid excess indir, by passing current
- counter value as parameter.
- * examples/foreachq3.m4: Avoid unneeded ifelse, by injecting an
- ignored argument.
- * doc/m4.texinfo (Improved forloop, Improved foreach): Update the
- documentation to match.
-
-2008-07-26 Eric Blake <ebb9@byu.net>
-
- Give example for O(n) foreach on m4 1.4.x.
- * examples/foreachq4.m4: New file.
- * examples/Makefile.am (EXTRA_DIST): Distribute it.
- * doc/m4.texinfo (Improved foreach): Document linear foreach with
- m4 1.4.5 and greater.
-
-2008-07-17 Eric Blake <ebb9@byu.net>
-
- Fix missing copyright notices.
- * acinclude.m4: Add copyright license details.
- * c-boxes.el: Likewise.
- * checks/get-them: Likewise.
- * checks/check-them: Likewise.
-
-2008-07-13 Eric Blake <ebb9@byu.net>
-
- Add -g/--gnu command line argument.
- * src/m4.c (usage): Mention the new option.
- (long_options, OPTSTRING): Add new option.
- (main): Use it.
- * NEWS: Document this addition.
- * doc/m4.texinfo (Limits control): Likewise.
- (Incompatibilities): Mention future use of POSIXLY_CORRECT.
- * THANKS: Update.
- Reported by Joel E. Denny.
-
-2008-07-11 Eric Blake <ebb9@byu.net>
-
- Avoid bogus whitespace in @ovar, @dvar.
- * doc/m4.texinfo (ovar, dvar): Add @c.
- Based on patch by Ralf Wildenhues to Autoconf manual.
-
-2008-06-16 Eric Blake <ebb9@byu.net>
-
- Add missing const qualifications.
- * src/builtin.c (builtin_tab): Declare array elements as const.
-
-2008-06-03 Eric Blake <ebb9@byu.net>
-
- Use progname module rather than rolling our own program_name.
- * m4/gnulib-cache.m4: Import progname module.
- * src/m4.c (program_name): Replace...
- (main): ...with a call to set_program_name.
-
-2008-06-02 Eric Blake <ebb9@byu.net>
-
- Allow autobuild usage.
- * m4/gnulib.cache: Import autobuild module.
-
-2008-05-23 Eric Blake <ebb9@byu.net>
-
- Make closing files be consistent.
- * src/freeze.c (reload_frozen_state): Use close_stream.
- Reported by Jean-Charles Longuet.
-
-2008-05-22 Eric Blake <ebb9@byu.net>
-
- Don't allow failure to freeze give exit status of 0.
- * src/freeze.c (produce_frozen_state): Guarantee non-zero exit on
- fopen failure.
- * doc/m4.texinfo (Using frozen files): Test the fix.
- * THANKS: Update.
- Reported by Jean-Charles Longuet.
-
-2008-05-09 Eric Blake <ebb9@byu.net>
-
- Improve error message when frozen file is invalid.
- * src/freeze.c (reload_frozen_state): Track current line.
- [GET_STRING]: New helper macro.
-
-2008-05-09 Eric Blake <ebb9@byu.net>
-
- Detect integer overflow when loading frozen file.
- * src/m4.h (includes): Add limits.h.
- (_): Define as a no-op placeholder for now.
- * src/freeze.c (reload_frozen_state) [GET_NUMBER]: Rewrite to fail
- immediately on overflow.
- Reported by Jim Meyering.
-
-2008-05-07 Eric Blake <ebb9@byu.net>
-
- Fix traceon regression introduced 2006-06-06.
- * src/builtin.m4 (traceon): Only perform insertion if lookup
- fails.
- * doc/m4.texinfo (Trace): Test for the bug.
- * NEWS: Document it.
-
-2008-05-03 Eric Blake <ebb9@byu.net>
-
- Document define_blind.
- * doc/m4.texinfo (Ifelse): Add a new composite macro.
- * THANKS: Update.
- Suggested by Mike R.
-
-2008-04-24 Eric Blake <ebb9@byu.net>
-
- Add debugmode test.
- * doc/m4.texinfo (Debug Levels): Test -di behavior.
- (Changeword, Location): Correct examples.
- * checks/check-them (examples): Update to account for recommended
- location for running tests.
- * doc/m4.texinfo (Debug Levels): Test this behavior.
-
-2008-04-21 Eric Blake <ebb9@byu.net>
-
- Fix spelling of attribution to Christopher Strachey.
- * doc/m4.texinfo (History, Inhibiting Invocation): Fix typo.
- * THANKS: Update.
- Reported by Fernando Carrijo.
-
-2008-04-17 Eric Blake <ebb9@byu.net>
-
- Fix buildbot failure.
- * doc/m4.texinfo (Diversions): Consume all of m4's output, in case
- SIGPIPE is ignored.
- * THANKS: Update.
- Detected by Bob Proulx's buildbot.
-
-2008-04-17 Eric Blake <ebb9@byu.net>
-
- Avoid gcc shadowing warnings.
- * src/builtin.c (m4_format): s/format/expand_format, so local
- variables can be named format.
- * src/format.c (format): Rename...
- (expand_format): ...to this, and avoid the name index.
- * src/input.c (push_file): Avoid the name close.
- * src/m4.h (expand_format): Adjust prototype.
- * src/output.c (threshold_diversion_CB): Avoid the name div.
-
-2008-04-15 Eric Blake <ebb9@byu.net>
-
- Another 'make installcheck' fix.
- * doc/m4.texinfo (Diversions): s/m4/__program__/ in case
- --program-prefix was active.
-
-2008-04-11 Eric Blake <ebb9@byu.net>
-
- Ensure --program-prefix doesn't regress.
- * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Enforce change from
- 2008-03-10 by testing it at 'make distcheck' time.
-
-2008-04-11 Eric Blake <ebb9@byu.net>
-
- Improve OS/2+emx build.
- * src/m4.h [__EMX__]: OS/2 does not have a Unix-compatible
- system(3), no matter what other macros it pre-defined.
- * doc/m4.texinfo (Mkstemp): Rework test to avoid globbing failure
- on OS/2.
- * src/builtin.c (predefined_tab): Ensure all possible system
- identifiers are defined, not just the first; the testsuite will
- catch if multiple identifiers mistakenly made it through.
- * THANKS: Update.
- Reported by Elbert Pol.
-
-2008-04-09 Eric Blake <ebb9@byu.net>
-
- Remove redundant configure macros.
- * configure.ac (AC_CANONICAL_BUILD, AC_CANONICAL_HOST)
- (AC_SYS_LARGEFILE, AC_TYPE_SIZE_T): Delete, since gnulib does
- this.
- (AC_CHECK_HEADERS_ONCE): Remove limits.h.
-
-2008-08-07 Bruno Haible <bruno@clisp.org> (tiny change)
-
- Run m4 tests prior to gnulib unit tests.
- * Makefile.am (SUBDIRS): Swap order of directories.
-
-2008-04-02 Eric Blake <ebb9@byu.net>
-
- Release Version 1.4.11.
- * NEWS: Mention the release.
-
- Prepare for release.
- * maint.mk (alpha): Check for PREV_VERSION setting sooner, and
- remove tag operation.
- (version-check): Enhance this check.
- (prev-tarball): Depend on version-check.
- (this-vc-tag): Delete, and mention need to run tag...
- * HACKING: ...here, prior to make maintainer-distcheck.
- Update the instructions to match this particular release process.
- * Makefile.am (.version, announcement): Allow for VPATH build.
- * cfg.mk (gnulib_dir): Likewise.
- * doc/Makefile.am ($(srcdir)/m4.1): Include release number in man
- page.
-
-2008-04-01 Eric Blake <ebb9@byu.net>
-
- Speed up index builtin.
- * m4/gnulib-cache: Import strstr module.
- * NEWS: Mention the speedup.
-
-2008-03-29 Eric Blake <ebb9@byu.net>
-
- Fix testsuite on mingw, OpenBSD.
- * src/format.c (ARG_DOUBLE): Use strtod, not atof.
- * src/Makefile.am (m4_LDADD): Use POW_LIB when needed.
- * doc/m4.texinfo (Format): Add hex-float support.
- * NEWS: Document this.
-
-2008-03-27 Eric Blake <ebb9@byu.net>
-
- Pull other useful doc fixes from branch-1.6.
- * doc/m4.texinfo (Arguments): Enable test of
- --warn-macro-sequence.
- (Defn): Test length of builtin token.
- (Builtin, Ifelse, Changequote): Add more regression tests.
-
-2008-03-27 Eric Blake <ebb9@byu.net>
-
- Add test for divert bug on 2007-05-28, patched 2007-07-21.
- * doc/m4.texinfo (Diversions): Add test.
-
-2008-03-24 Eric Blake <ebb9@byu.net>
-
- Pull GNUmakefile from gnulib.
- * m4/gnulib-cache.m4: Import gnumakefile module.
- * GNUmakefile: Remove from version control; supplied by gnulib
- instead.
- * configure.ac (AC_INIT): Track intra-release version with
- git-version-gen.
- (AC_CONFIG_LINKS): Let gnulib do this now.
- * Makefile.am (distclean-local): Likewise.
- (EXTRA_DIST): Likewise. Also handle renamed files.
- * (.version, dist-hook): Improve version handling.
- * Makefile.cfg: Rename...
- * cfg.mk: ...to this.
- * Makefile.maint: Rename...
- * maint.mk: ...to this.
- (ME, makefile-check, m4-check): Use new macro instead of
- hard-coded name.
- * HACKING: Mention that maintainer rules should now work in VPATH
- builds.
-
-2008-03-15 Eric Blake <ebb9@byu.net>
-
- Document join, in order to fix bug in m4wrap example.
- * doc/m4.texinfo (Improved m4wrap): New node.
- (Defn, Location): Enhance tests.
- (Shift): Document the composite macro join.
- (Incompatibilities): Move documentation of LIFO vs. FIFO...
- (M4wrap): ...here, to match improved example.
-
-2008-03-10 Eric Blake <ebb9@byu.net>
-
- Allow 'make installcheck' with './configure --program-prefix'.
- * checks/Makefile.in (program_transform_name): New macro.
- (installcheck): Use it to transform name of m4 before testing.
- * checks/check-them (m4): Add -m option, to allow testing m4 by a
- different name.
- * checks/get-them: Allow xout and xerr notation.
-
-2008-02-25 Eric Blake <ebb9@byu.net>
-
- Improve release process.
- * configure.ac (AM_INIT_AUTOMAKE): Increase requirement, and add
- dist-lzma.
- * HACKING: Update for git release procedures.
- * Makefile.cfg: New file.
- * GNUmakefile: Use it.
- * Makefile.maint (gzip_rsyncable, GZIP_ENV, GIT, VC, VC-tag)
- (VERSION_REGEXP, this-vc-tag, my_distdir, null_AM_MAKEFLAGS)
- (TMPDIR, gnulib-version): New macros, borrowed from coreutils.
- (makefile-check, news-date-check, changelog-check, m4-check)
- (vc-diff-check, maintainer-distcheck, vc-dist, my-distcheck)
- (announcement, alpha, beta, major): New rules, borrowed from
- coreutils.
- (TEXI2HTML, cvs-release, update-timestamps, cvs-news, cvs-commit)
- (cvs-dist): Delete.
- * Makefile.am (EXTRA_DIST): Distribute new file.
-
-2008-02-19 Eric Blake <ebb9@byu.net>
-
- Clean up foreach example.
- * doc/m4.texinfo (Foreach, Improved foreach): Document another
- shortcoming in foreach.m4.
-
-2008-02-16 Eric Blake <ebb9@byu.net>
-
- Add regression test for multi-character quote recursion.
- * examples/foreach2.m4: Use $0 rather than spelling out name.
- * examples/foreachq2.m4: Likewise.
- * examples/forloop2.m4: Likewise.
- * examples/hanoi.m4: Likewise.
- * examples/trace.m4: Likewise.
- * doc/m4.texinfo (Improved forloop): Document advantage of $0.
- (Improved foreach): Adjust dump from file.
-
-2008-02-13 Eric Blake <ebb9@byu.net>
-
- Fix texinfo grammar.
- * doc/m4.texinfo (Incompatibilities): Use @. after capital.
- (History): Use @: after abbreviations.
- (M4exit): Use correct Latin abbreviation.
-
-2008-02-11 Eric Blake <ebb9@byu.net>
-
- Document behavior of __gnu__().
- * doc/m4.texinfo (Platform macros): Enhance test.
- (Macro expansion): New test.
-
-2008-01-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
-
- * checks/Makefile.in: Use @SET_MAKE@, and use @SHELL@ rather
- than hard-coding /bin/sh.
- * THANKS: Update.
- Reported by Lawson Chan.
-
-2007-12-13 Paolo Bonzini <bonzini@gnu.org> (tiny change)
-
- * doc/m4.texinfo (Inhibiting Invocation): Fix quoting of a quoting
- example.
- * THANKS: Update.
- Reported by Giovanni Toffetti.
-
-2007-12-07 Eric Blake <ebb9@byu.net>
-
- Minor security fix: Quote output of mkstemp.
- * src/builtin.c (mkstemp_helper): Produce quoted output.
- * doc/m4.texinfo (Mkstemp): Update the documentation and tests.
- * NEWS: Document this change.
-
-2007-12-04 Eric Blake <ebb9@byu.net>
-
- Fix builds with OpenBSD make.
- * doc/Makefile.am (HELP2MAN): New macro.
- (man_MANS, m4.1): Fix rules for building m4.1 into srcdir.
- * README: Update copyright.
- * HACKING: Mention help2man and makeinfo dependencies.
-
-2007-11-22 Eric Blake <ebb9@byu.net>
-
- Security fix: avoid arbitrary code execution with 'm4 -F'.
- * src/freeze.c (produce_frozen_state): Never pass raw file name as
- printf format.
- * NEWS: Document this fix.
-
-2007-11-07 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo (Pseudo Arguments): Test more corner cases.
-
-2007-11-05 Eric Blake <ebb9@byu.net>
-
- Use build-aux directory.
- * configure.ac (PACKAGE, VERSION): Delete, since Automake does
- this now.
- (AC_CONFIG_AUX_DIR): Add, with auxiliary files in build-aux
- instead of the top level.
- (AC_INIT_AUTOMAKE): Increase requirement, and add dist-lzma.
- * Makefile.am (EXTRA_DIST): Gnulib now manages gendocs.sh.
- * bootstrap: Adjust accordingly.
- * m4/gnulib-cache.m4: Add --aux-dir option.
- * doc/Makefile.am (m4.1): Rewrite rule to use build-aux/missing.
-
-2007-10-31 Eric Blake <ebb9@byu.net>
-
- Test more corner cases.
- * doc/m4.texinfo (Changecom, Pseudo Arguments): Beef up tests.
- (Improved foreach): Document alternate foreachq style.
-
-2007-10-28 Eric Blake <ebb9@byu.net>
-
- More test coverage for autoconf usage patterns.
- * doc/m4.texinfo (Inhibiting Invocation, Pseudo Arguments)
- (Builtin): Add new undocumented tests.
- (Shift): Document cond macro, and add new test.
-
-2007-10-27 Eric Blake <ebb9@byu.net>
-
- Document one use of changequote(`(',`)').
- * doc/m4.texinfo (Changequote): Add new test, based on recent
- autoconf addition of m4_expand.
-
-2007-10-22 Eric Blake <ebb9@byu.net>
-
- Never let printf failures go undetected.
- * m4/gnulib-cache.m4: Import announce-gen, git-version-gen,
- intprops, strtod, and xprintf modules. Remove deprecated free
- module. Replace vasprintf-posix and xvasprintf with
- xvasprintf-posix.
- * src/m4.h: Include xprintf.h.
- * src/builtin.c (ntoa): Export.
- (m4_errprint): Adjust all *printf callers.
- * src/debug.c (debug_message_prefix, trace_format): Likewise.
- * src/freeze.c (produce_frozen_state): Likewise.
- * src/input.c [DEBUG_INPUT]: Likewise.
- * src/m4.c (usage): Likewise.
- * src/m4.h (DEBUG_PRINT1, DEBUG_PRINT3, DEBUG_MESSAGE)
- (DEBUG_MESSAGE1, DEBUG_MESSAGE2): Likewise.
- * src/output.c (shipout_text, freeze_diversione): Likewise.
- * src/path.c [DEBUG_INCL]: Likewise.
- * src/stackovf.c (process_sigsegv) [DEBUG_STKOVF]: Likewise.
- * src/symtab.c [DEBUG_SYM]: Likewise.
-
-2007-10-17 Eric Blake <ebb9@byu.net>
-
- Fix 'm4 -F file -t undefined'.
- * src/freeze.c (produce_frozen_state): Avoid core dump.
- * doc/m4.texinfo (Using frozen files): Test for the bug.
- * NEWS: Mention the fix.
-
-2007-10-09 Eric Blake <ebb9@byu.net>
-
- Avoid regexp regression.
- * doc/m4.texinfo (Regexp, Patsubst): Test \ expansion.
-
-2007-10-02 Eric Blake <ebb9@byu.net>
-
- Add more examples and tests.
- * doc/m4.texinfo (Patsubst): Use the examples directory. Also
- document shortfall.
- (Improved capitalize): New node.
- (Index macro, Regexp): Test more code paths.
- * examples/capitalize.m4: Update to match manual.
- * examples/capitalize2.m4: New file.
- * examples/foreachq3.m4: Likewise.
- * examples/join.m4: Likewise.
- * examples/loop.m4: Likewise.
- * examples/wraplifo.m4: Likewise.
- * examples/wraplifo2.m4: Likewise.
- * examples/Makefile.am (EXTRA_DIST): Distribute new files.
-
-2007-09-24 Eric Blake <ebb9@byu.net>
-
- Create .gitignore alongside .cvsignore.
- * bootstrap (LC_ALL): Set up front.
- (version control) Borrow idea from head, to avoid churn in
- m4/.*ignore files modified by gnulib-tool.
-
-2007-09-13 Eric Blake <ebb9@byu.net>
-
- * AUTHORS: Fix typo.
-
-2007-09-07 Eric Blake <ebb9@byu.net>
-
- * AUTHORS: Simplify, to match libtool and autoconf layout.
- * THANKS: Sync with head.
-
-2007-08-10 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo (Compatibility): Sync with head.
-
-2007-08-10 Konrad Schwarz <konrad.schwarz@siemens.com> (tiny change)
- and Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo (Defn): Update wording.
-
-2007-08-09 Eric Blake <ebb9@byu.net>
-
- POSIX requires defn(`a',`b') to concatenate definitions.
- * src/builtin.c (m4_defn): Allow multiple arguments, but warn if
- trying to mix a builtin with anything else.
- * doc/m4.texinfo (Defn): Document a use for this POSIX
- requirement.
- (Incompatibilities): Update to match current status.
- * NEWS: Document this change.
- * THANKS: Update.
- Reported by Konrad Schwarz.
-
-2007-08-04 Eric Blake <ebb9@byu.net>
-
- Normalize all GPL license notices.
- * GNUmakefile: Update license wording.
- * Makefile.am: Likewise.
- * Makefile.maint: Likewise.
- * bootstrap: Likewise.
- * commit: Likewise.
- * configure.ac: Likewise.
- * checks/Makefile.in: Likewise.
- * doc/Makefile.am: Likewise.
- * examples/Makefile.am: Likewise.
- * src/Makefile.am: Likewise.
- * src/builtin.c: Likewise.
- * src/debug.c: Likewise.
- * src/eval.c: Likewise.
- * src/format.c: Likewise.
- * src/freeze.c: Likewise.
- * src/input.c: Likewise.
- * src/m4.c: Likewise.
- * src/m4.h: Likewise.
- * src/macro.c: Likewise.
- * src/output.c: Likewise.
- * src/path.c: Likewise.
- * src/stackovf.c: Likewise.
- * src/symtab.c: Likewise.
-
-2007-07-21 Eric Blake <ebb9@byu.net>
-
- Fix regression on NetBSD from 2007-05-28.
- * src/output.c (m4_tmpopen): Explicitly reset append-mode stream
- position to byte 0.
- * NEWS: Document this fix.
- * THANKS: Update.
- Reported by Thomas Klausner.
-
-2007-07-20 Eric Blake <ebb9@byu.net>
-
- Fix 'make distcheck' issues.
- * Makefile.am (EXTRA_DIST): No need to distribute
- gpl-3.0.texi.diff anymore.
- * m4/gnulib-cache.m4: Update to latest gnulib.
-
-2007-07-14 Eric Blake <ebb9@byu.net>
-
- Reflect upstream license .texi changes.
- * doc/m4.texinfo (Copying): Rename node...
- (GNU General Public License): ...to this.
- (GNU Free Documentation License): Adjust node location.
- * local/doc/gpl-3.0.texi.diff: Remove file.
-
-2007-07-10 Eric Blake <ebb9@byu.net>
-
- Start 1.4.10a.
- * configure.ac (AC_INIT): Bump version number.
- * NEWS: Start changes since 1.4.10.
- * doc/m4.texinfo (History): Mention 1.4.11.
- (Copying This Package, Copying This Manual): Add index entries.
- * local/lib/version-etc.c.diff: Delete, now that gnulib has been
- updated.
- * Makefile.am (EXTRA_DIST): Remove dead file.
-
-2007-07-09 Eric Blake <ebb9@byu.net>
-
- Release Version 1.4.10.
- * doc/Makefile.am (m4_TEXINFOS): Distribute gpl-3.0.texi.
- * Makefile.am (EXTRA_DIST): Distribute gnulib diffs.
- * configure.ac (AC_INIT): Bump version number.
- * NEWS: Describe changes since 1.4.9.
-
- * src/format.c: Missed a GPLv3 conversion.
-
- Avoid undefined behavior of %.*c in printf.
- * src/format.c (format): Special case %c.
- * TODO: Document that more remains to be done.
- * NEWS: Document the fix.
-
-2007-07-05 Eric Blake <ebb9@byu.net>
-
- Fix up gnulib-tool usage.
- * m4/gnulib-cache.m4: Change local-dir to local, not `.'.
- * version-etc.c.diff: Move to...
- * local/lib/version-etc.c.diff: ...here.
- * gpl-3.0.texi.diff: Move to...
- * local/doc/gpl-3.0.texi.diff: ...here.
-
-2007-07-04 Eric Blake <ebb9@byu.net>
-
- Upgrade to GPL version 3 or later.
- * bootstrap: Pick up GPLv3.
- * m4/gnulib-cache.m4: Augment with 'gnulib-tool
- --local-dir=. --import gpl-3.0'.
- * doc/m4.texinfo (Copying This Package): New appendix.
- * NEWS: Mention this change.
- * README: Mention why some files still claim to be version 2.
- * version-etc.c.diff: New file, to make sure --version claims
- correct GPL version. Temporary until gnulib makes move.
- * gpl-3.0.texi.diff: New file, to allow inclusion of GPLv3 as
- appendix, rather than section, of the manual.
- * GNUmakefile: Update to new license.
- * Makefile.am: Likewise.
- * Makefile.maint: Likewise.
- * commit: Likewise.
- * configure.ac: Likewise.
- * checks/Makefile.in: Likewise.
- * doc/Makefile.am: Likewise.
- * examples/Makefile.am: Likewise.
- * src/Makefile.am: Likewise.
- * src/builtin.c: Likewise.
- * src/debug.c: Likewise.
- * src/eval.c: Likewise.
- * src/freeze.c: Likewise.
- * src/input.c: Likewise.
- * src/m4.c: Likewise.
- * src/m4.h: Likewise.
- * src/macro.c: Likewise.
- * src/output.c: Likewise.
- * src/path.c: Likewise.
- * src/stackovf.c: Likewise.
- * src/symtab.c: Likewise.
-
-2007-06-26 Eric Blake <ebb9@byu.net>
-
- * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import assert'.
-
-2007-06-26 Karl Berry <karl@freefriends.org> (tiny change)
-
- Match Free Software Directory categories.
- * doc/m4.texinfo (dircategory): Update.
-
-2007-05-31 Eric Blake <ebb9@byu.net>
-
- * src/output.c (output_text): Fix regression from 2007-05-28.
- * doc/m4.texinfo (History): Mention 1.4.10.
- (Format): Make testsuite output easier to debug.
-
-2007-05-29 Eric Blake <ebb9@byu.net>
-
- Start 1.4.9c.
- * configure.ac (AC_INIT): Bump version number.
- * NEWS: Start changes since 1.4.9b, and fix typo.
-
- Beta Release Version 1.4.9b.
- * configure.ac (AC_INIT): Bump version number.
- * NEWS: Describe changes since 1.4.9.
-
- Improve format support.
- * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
- vasprintf-posix'.
- * src/format.c (format): Parse %'hhd, %a, %A. Avoid calling
- printf with too few arguments, as in format(%*.*d,-1,-1,1).
- * doc/m4.texinfo (Format): Expand tests, and improve
- documentation.
- * NEWS: Document this change.
-
-2007-05-28 Eric Blake <ebb9@byu.net>
-
- Fix large diversion corner cases, including 1.4.8 regression.
- * src/output.c (m4_tmpfile, m4_tmpopen): Simplify use of errno.
- (make_room_for): Use NULL, not 0, for pointers.
- (insert_diversion_helper): Avoid using rewind.
- (freeze_diversions): Allow freezing large diversions.
- * NEWS: Document this fix.
-
- Also run gnulib unit tests during make check.
- * m4/gnulib-cache.m4: Augment with 'gnulib-tool
- --tests-base=tests --with-tests'.
- * configure.ac (AC_CONFIG_FILES): Build gnulib testdir.
- * Makefile.am (SUBDIRS): Run gnulib tests before ours.
-
-2007-05-25 Eric Blake <ebb9@byu.net>
-
- Backport prompts in examples from head.
- * src/macro.c (expand_macro): Shorten message.
- * doc/m4.texinfo (Manual, Command line files, Comments)
- (Inhibiting Invocation, Macro Arguments, Macro expansion, Indir)
- (Builtin, Shift, Forloop, Foreach, Dumpdef, Trace, Debug Levels)
- (Debug Output, Include, Format, Syscmd, Mkstemp, Location)
- (Using frozen files, Improved forloop, Improved foreach): Add
- prompts to examples.
- * checks/get-them: Ignore prompts in examples.
-
- Fix sync line interaction with multiline comments.
- * doc/m4.texinfo (Other Incompatibilities): Add example, and
- document bug in --syncline/divert interaction.
- (Preprocessor features): Augment test.
- * src/m4.h (output_text): Export.
- (shipout_text, next_token): Add parameter.
- * src/freeze.c (reload_frozen_state): Don't interfere with
- synclines when reloading state.
- * src/output.c (output_text): Export.
- (shipout_text): Take new parameter for start line of token.
- Output at most one syncline per token.
- * src/input.c (next_token): Report line where multiline tokens
- start.
- * src/macro.c (expand_input, expand_token, expand_argument):
- Adjust callers so that line is passed from input to output.
- * NEWS: Document this fix.
- Reported by Sergey Poznyakoff.
-
- Test -s in testsuite.
- * doc/m4.texinfo (Preprocessor features): Add a test.
- * checks/get-them: Support extra options in testsuite.
- * checks/check-them (examples): Use extra options.
- * THANKS: Update.
- Reported by Sergey Poznyakoff.
-
-2007-05-24 Eric Blake <ebb9@byu.net>
-
- Support POSIX flush semantics on all platforms.
- * m4/gnulib-cache.m4: Remove closeout, and augment with
- 'gnulib-tool --import closein fflush'.
- * src/m4.h (includes): Use closein, not closeout.
- * src/m4.c (main): Ensure stdin is flushed when not all input is
- consumed.
- (process_file): No return needed.
- * src/debug.c (debug_flush_files): Rely on gnulib module, rather
- than excluding mingw.
- * NEWS: Document this change.
-
- Work around cygwin and mingw fseeko bugs.
- * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import fseeko'.
- * src/debug.c (debug_flush_files): Prefer fseeko over fseek.
-
-2007-04-25 Eric Blake <ebb9@byu.net>
-
- Fix negative division within eval, regression of 2007-01-06.
- * doc/m4.texinfo (Eval): Catch this bug.
- * src/eval.c (mult_term): Fix it.
- * NEWS: Document this.
- * THANKS: Update.
- Reported by Cesar Strauss.
-
-2007-04-23 Eric Blake <ebb9@byu.net>
-
- Start 1.4.9a.
- * configure.ac (AC_INIT): Bump version number.
- * NEWS: Start changes since 1.4.9.
-
-2007-03-23 Eric Blake <ebb9@byu.net>
-
- Release 1.4.9:
- * configure.ac (AC_INIT): Bump version number.
- * NEWS: Describe changes since 1.4.8b.
-
-2007-03-16 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo (Mkstemp): Tweak wording.
- * src/output.c (output_init): Adjust to latest gnulib.
-
-2007-03-15 Eric Blake <ebb9@byu.net>
-
- Avoid Tandem/NSK's broken long long (without a symmetric unsigned
- long long, it confuses gnulib).
- * configure.ac (AC_TYPE_LONG_LONG_INT): Declare long long broken
- if unsigned long long doesn't work.
- * THANKS: Update.
- Reported by Matthew Woehlke.
-
-2007-03-07 Eric Blake <ebb9@byu.net>
-
- * AUTHORS: Update.
- * doc/m4.texinfo: Minor tweaks, avoid makeinfo warning.
-
-2007-03-01 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo: Pick up more index entries from head. Follow
- more texinfo recommendations.
- (Sysval): Improve tests.
-
- Avoid overfull \vbox warning from texinfo, due to indices that
- weren't quite big enough to split across page boundaries.
- * doc/m4.texinfo: Add lots of concept index entries.
- (Concept Index): Move to be last, as recommended by texinfo
- manual.
- (Define, Arguments, Pseudo Arguments): Add more function entries.
-
-2007-02-28 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo (Eval): Clean up wording to reflext POSIX XCU ERN
- 137.
- (Pseudo Arguments): Add useful example.
-
- * doc/m4.texinfo (Pushdef, Incompatibilities): Clean up wording to
- reflect POSIX XCU ERN 118.
-
- * src/m4.h (DEFAULT_MACRO_SEQUENCE): Factor out from...
- * src/m4.c (usage): ...here,...
- * src/builtin.c (set_macro_sequence): ...and here.
- (define_user_macro): Fix typo.
- * doc/m4.texinfo (Preprocessor features, Arguments): Fix minor
- inaccuracies.
- (Shift): Document composite macro argn for portably getting at
- positional parameters beyond 9.
- * configure.ac (AC_INIT): Bump version number.
- * NEWS: Start changes of 1.4.8c.
-
-2007-02-24 Eric Blake <ebb9@byu.net>
-
- Beta Release 1.4.8b:
- * configure.ac (AC_INIT): Bump version number.
- * NEWS: Describe changes since 1.4.8.
-
- Reserve all uses of raw ${} in macro definitions, not just
- ${<digit>}.
- * src/builtin.c (set_macro_sequence): Change default macro
- sequence.
- * doc/m4.texinfo (Operation modes): Update to match.
- * src/m4.c (usage): Likewise.
- * NEWS: Likewise.
-
-2007-02-23 Eric Blake <ebb9@byu.net>
-
- * src/m4.h (includes): Update to latest gnulib.
-
-2007-02-08 Eric Blake <ebb9@byu.net>
-
- Rename --warn-syntax to --warn-macro-sequence[=regex], to make it
- more flexible, and so that autoconf can use it.
- * src/m4.h (set_macro_sequence, free_macro_sequence): New
- prototypes.
- * src/builtin.c (macro_sequence_buf, macro_sequence_regs)
- (macro_sequence_inuse, set_macro_sequence, free_macro_sequence):
- New variables and functions.
- (define_user_macro): Allow flexibility in regular expression used
- to trigger warning.
- * src/m4.c (warn_syntax): Delete.
- (usage, WARN_MACRO_SEQUENCE_OPTION, main): Implement changed
- spelling of option, along with optional argument.
- * doc/m4.texinfo (Operation modes, Arguments): Document this
- change.
- * NEWS: Document this change.
-
-2007-02-05 Eric Blake <ebb9@byu.net>
-
- * m4/gnulib-cache.m4: Module strstr no longer exists.
-
- Avoid bool bitfields, as they don't work on AIX.
- * src/m4.h (bool_bitfield): New typedef.
- (struct symbol, struct builtin): Use it.
- * src/input.c (struct input_block): Likewise.
- Reported by Albert Chin.
-
- * doc/m4.texinfo (Sysval): Avoid SIGPIPE in test as unreliable.
- Reported by Albert Chin.
- * THANKS: Update.
-
-2006-06-18 Bruno Haible <bruno@clisp.org> (tiny change)
-
- * doc/m4.texinfo (Input processing): Further clarifications.
-
-2007-02-03 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo (Input processing, Quoting Arguments): Beef up
- the examples.
- Reported by Bruno Haible.
-
-2007-02-01 Eric Blake <ebb9@byu.net>
-
- * src/m4.c (fatal_warnings): New variable.
- (usage): Document new -E behavior.
- (main): Make -E an additive option.
- (m4_error, m4_error_at_line): Change exit status when required.
- * NEWS: Document this change.
- * doc/m4.texinfo (Operation modes): Likewise.
- Reported by Ralf Wildenhues.
-
-2007-01-27 Eric Blake <ebb9@byu.net>
-
- * src/m4.h (warn_syntax): Declare.
- (init_pattern_buffer): Export.
- * src/m4.c (warn_syntax, usage, WARN_SYNTAX_OPTIONS)
- (long_options, main): Implement new option.
- * src/builtin.c (init_pattern_buffer): Allow NULL regs argument.
- (define_user_macro): Warn on $11 and ${1} if requested.
- * src/input.c (init_pattern_buffer): Delete duplicate method.
- * doc/m4.texinfo (Operation modes): Document it.
- (Arguments): Document future direction of ${11} vs. $11.
- (Incompatibilities): Fix wording on POSIX limitations.
- * checks/get-them: Parse @{ and @} correctly.
- * NEWS: Document this change.
-
-2007-01-26 Eric Blake <ebb9@byu.net>
-
- * src/builtin.c (includes): Adjust to gnulib changes.
-
-2007-01-15 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo: Pull in various improvements from head.
- * src/builtin.c (include): Alter exit status on failure.
- * NEWS: Document this fix.
-
-2007-01-13 Eric Blake <ebb9@byu.net>
-
- * configure.ac (AC_CHECK_MEMBERS): Check for stack_t.ss_sp, and
- assume the fallback of ss_base for BSDI 4.0.1.
- * src/stackovf.c (setup_stackovf_trap) [HAVE_SIGALTSTACK &&
- ! HAVE_STACK_T_SS_SP]: Use this check.
- Reported by Chris McGuire.
- * THANKS: Update.
- * NEWS: Document the improvement.
-
-2007-01-09 Eric Blake <ebb9@byu.net>
-
- * src/eval.c (ASSIGN): New enumerator.
- (eval_lex): Recognize '='.
- (equality_term): Treat '=' like '==', but warn that it is
- deprecated.
- * doc/m4.texinfo (Eval): Document and test this.
- (Incompatibilities): Document the POSIX incompatibility.
- * NEWS: Document this change.
-
-2007-01-06 Eric Blake <ebb9@byu.net>
-
- * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import stdint'.
- * checks/check-them: Record expected exit status.
- * checks/get-them: Check exit status.
- * src/m4.h (eval_t, unsigned_eval_t): Delete, use POSIX int32_t
- instead.
- * src/builtin.c: All users changed.
- * src/eval.c: Likewise. Also document where we are triggering
- undefined or implementation-defined behavior.
- (BADOP, NEGATIVE_EXPONENT, INVALID_OPERATOR, eval_lex, evaluate)
- (logical_or_term, logical_and_term, logical_not_term, not_term)
- (equality_term, unary_term): Port from head to follow POSIX
- semantics.
- (exp_term): Reject 0**0 as undefined.
- * doc/m4.texinfo (History): Mention 1.4.9.
- (Format, Incompatibilities): Update to document POSIX compliance.
- * NEWS: Document this change.
-
-2007-01-04 Eric Blake <ebb9@byu.net>
-
- * NEWS: Document previous fix.
- * THANKS: Update.
-
-2007-01-04 Sami Liedes <sliedes@cc.hut.fi> (tiny change)
-
- Fix Debian bug 405594, introduced 2006-11-01 from a bad
- copy-n-paste from head.
- * src/m4.c (main): Use correct file name after --.
-
-2007-01-04 Eric Blake <ebb9@byu.net>
-
- Fix regression from 1.4.7 in large file handling on some
- platforms, introduced on 2006-10-13.
- * configure.ac (AC_LARGE_SYSFILE): Guarantee that large files
- will be handled.
- * NEWS: Document this fix.
-
-2007-01-03 Eric Blake <ebb9@byu.net>
-
- * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
- version-etc-fsf'.
- * src/m4.c (AUTHORS, main): Use FSF wording for --version (plus
- it bumps the copyright year).
-
-2006-12-27 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo (Patsubst): Fix typo.
-
-2006-12-16 Eric Blake <ebb9@byu.net>
-
- * src/m4.c (main): Check for errors when closing stdin.
-
-2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
-
- * doc/m4.texinfo: Fix some typos.
-
-2006-12-09 Eric Blake <ebb9@byu.net>
-
- * configure.ac (AC_INIT): Bump version number.
- * NEWS: Start changes of 1.4.8a.
-
-2006-11-20 Eric Blake <ebb9@byu.net>
-
- Release 1.4.8:
- * configure.ac (AC_INIT): Bump version number.
- * NEWS: Describe changes since 1.4.7.
-
-2006-11-16 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo (Include, Search Path, Diversions, Divert):
- Minor tweaks noticed while porting to head.
-
-2006-11-14 Eric Blake <ebb9@byu.net>
-
- * src/output.c (cleanup_tmpfile, freeze_diversions): Clean up
- spent iterators.
- (m4_tmpname): Avoid memory leak.
-
-2006-11-13 Eric Blake <ebb9@byu.net>
-
- * src/output.c (cleanup_tmpfile): Avoid double error message when
- umask is prohibitive.
- (m4_tmpname, m4_tmpopen, m4_tmpclose, m4_tmpremove): New
- functions.
- (m4_tmpfile): Add parameter, move cloexec action here.
- (make_room_for): Adjust caller. Don't keep too many files open.
- (insert_diversion_helper): Unlink emptied temp files.
- (make_diversion): Don't keep too many files open.
- * doc/m4.texinfo (Diversions): Tweak wording, now that open file
- descriptors are no longer a limiting factor.
- * NEWS: Document this change.
-
- Backport sparse diversion handling from head.
- * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
- avltree-oset'.
- * src/output.c (struct m4_diversion): Rename from struct
- diversion, and update members. All users changed.
- (diversion_table): Change to an ordered set, instead of an array.
- (div0): New storage for diversion 0.
- (diversions): No longer needed.
- (free_list): New list to allow recycling diversion storage.
- (diversion_storage): New storage to reduce malloc overhead.
- (cmp_diversion_CB, threshold_diversion_CB): New callbacks.
- (output_init, output_exit, cleanup_tmpfile, make_room_for)
- (make_diversion): Handle new diversion storage scheme.
- (insert_diversion_helper): New function.
- (insert_diversion, undivert_all, freeze_diversions): Use it.
- * doc/m4.texinfo (Divert, Diversions): Move hidden test of memory
- exhaustion to visible test of large diversion numbers.
- * NEWS: Document this fix.
-
-2006-11-11 Eric Blake <ebb9@byu.net>
-
- * src/builtin.c (m4_translit): Slight optimization.
-
- * src/m4.h (to_uchar): Depend on HAVE_INLINE.
-
- * src/builtin.c: Remove unnecessary casts.
- (expand_ranges): Make 8-bit clean.
- * doc/m4.texinfo (Translit): Add tests and wording.
- * NEWS: Document this fix.
-
-2006-11-07 Eric Blake <ebb9@byu.net>
-
- * src/m4.h (output_exit): New prototype.
- * src/m4.c (main): Use it.
- * src/output.c (cleanup_tmpfile): Close files before removing
- directory.
- (insert_diversion): Check for failure.
- (output_exit): Avoid memory leak.
- * doc/m4.texinfo (Diversions): Test this bug.
-
- * doc/m4.texinfo (Esyscmd, Errprint): Minor touchups.
-
-2006-11-01 Eric Blake <ebb9@byu.net>
-
- Allow C++ compilation on Linux, as a safety measure in type
- checking.
- * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
- stdbool'.
- * src/m4.h (hack_symbol, hack_all_symbols): Use full prototype.
- (boolean): Kill this, and use stdbool.h instead.
- * src/debug.c, src/eval.c, src/input.c, src/macro.c, src/m4.c:
- * src/output.c, src/symtab.c: All users changed.
- * src/symtab.c (hack_all_symbols): Update prototype.
- * src/builtin.c (dump_symbol, set_trace): Update signature.
- (m4_dumpdef, m4_traceon, m4_traceoff): Update callers.
- (mkstemp_helper, m4_m4wrap, expand_ranges, m4_translit): Allow
- C++ compilation.
- * src/debug.c (trace_flush): Likewise.
- * src/freeze.c (reload_frozen_state): Likewise.
- * src/input.c (push_file, push_string_finish, push_wrapup):
- (token_bottom, next_token): Likewise.
- * src/m4.c (main): Likewise.
-
- * doc/m4.texinfo (Invoking m4): Update according to POSIX 200x
- draft wording.
- * src/m4.h (m4_path_search): Tweak signature.
- * src/path.c (m4_path_search): Likewise.
- * src/builtin.c (include): Update caller.
- * src/m4.c (main): Allow -D, -U, -t, and -s to be interspersed
- with file names. Don't write to **argv.
- (process_file): New helper method.
- * NEWS: Document this fix.
-
-2006-10-31 Eric Blake <ebb9@byu.net>
-
- * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import strstr'.
- * doc/m4.texinfo (Translit): Improve the documentation.
- * src/builtin.c (m4_translit): Optimize to O(n) instead of O(n^2)
- algorithm.
- (m4_index): Simplify, and speed up slightly.
- * NEWS: Document this fix.
-
-2006-10-28 Eric Blake <ebb9@byu.net>
-
- * src/input.c (set_quotes): Don't allow empty end-quote with
- non-empty start-quote.
- (set_comment): Likewise for end-comment.
- * src/builtin.c (m4_changecom): Adjust caller.
- * doc/m4.texinfo (Changequote, Changecom): Update documentation to
- match behavior.
- (Incompatibilities): Document another POSIX bug.
- * NEWS: Mention this change.
-
-2006-10-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
-
- * examples/Makefile.am (EXTRA_DIST): Distribute recently-added
- files.
-
-2006-10-26 Eric Blake <ebb9@byu.net>
-
- Silence -Wwrite-strings -Wpointer-arith warnings.
- * src/builtin.c (define_user_macro): Allow NULL argument.
- (m4_builtin, m4_indir): Cast away const of "".
- * src/format.c (format): Likewise.
- * src/macro.c (collect_arguments): Likewise.
- (expand_macro): Avoid math on void*.
- * src/m4.c (main): Adjust caller.
- * src/output.c (freeze_diversions): Detect off_t overflow.
-
- * src/input.c (pop_input): Remove unnecessary code.
-
-2006-10-25 Eric Blake <ebb9@byu.net>
-
- * src/symtab.c (symtab_init): Avoid size_t overflow.
- * src/output.c (make_diversion): Avoid size_t overflow.
- * doc/m4.texinfo (Diversions): Test this fix.
- * src/input.c (input_block): Remove unused member. Reduce size
- of struct.
- (push_file, pop_input): Avoid useless assignment.
- * NEWS: Document the bug fix.
-
- Redo location tracking. Instead of having just files track the
- line to return to when popping input, now all input blocks track
- their current line.
- * src/input.c (INPUT_STRING_WRAP, INPUT_FILE_INIT): No longer
- needed.
- (input_block): Have line and file storage for all input types, and
- rename some members.
- (input_change): New global flag.
- (push_file, push_macro, push_string_init, push_wrapup): Store
- location.
- (push_string_finish, pop_input, pop_wrapup): Notice changes in
- input blocks.
- (peek_input): Adjust to new member names.
- (next_char, next_char1): Adjust location if needed.
- (skip_line): Simplify restoring location.
- * doc/m4.texinfo (Location): Augment the test to catch line
- location of expansion of multi-line arguments.
- Reported by Stepan Kasal.
-
-2006-10-23 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo (Macro Arguments): Document that leading space
- in argument collection stops at macro expansion.
- (Incompatibilities): Document POSIX whitespace wording issue.
-
-2006-10-20 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo: Trailing '@comment' doesn't format nicely in
- TeX, so recognize '@w{ }' instead. Likewise, @code{_name} at the
- end of a TeX line splits incorrectly.
- (Foreach, Improved foreach): Write these sections, borrowing ideas
- from CVS head and from m4sugar.
- * checks/get-them: Accomodate new way to show trailing space in
- examples.
- * examples/foreach.m4: Make usable in documentation.
- * examples/foreachq.m4: New file.
- * examples/foreachq2.m4: New file.
- * examples/foreach2.m4: New file.
- * NEWS: Document the documentation updates.
-
-2006-10-19 Eric Blake <ebb9@byu.net>
-
- * src/builtin.c (mkstemp_helper, m4_mkstemp): New functions.
- (m4_maketemp): Provide traditional behavior.
- * doc/m4.texinfo (Mkstemp): Rename from Maketemp. Document the
- new `mkstemp' macro and the flaws of the old `maketemp'.
- (Incompatibilities): Move maketemp discussion to...
- (Extensions): ...here, since -G now supresses the GNU extension.
- * NEWS: Document this.
-
- * examples/forloop.m4: Simplify.
- * examples/forloop2.m4: New file.
- * examples/quote.m4: New file.
- * doc/m4.texinfo (Loops): Rename to...
- (Shift): ...this node.
- (Forloop, Foreach, Improved forloop, Improved foreach): New
- nodes.
-
-2006-10-17 Eric Blake <ebb9@byu.net>
-
- * m4/gnulib-cache.m4: Update with 'gnulib-tool --import
- config-h'.
- * configure.ac (AC_CONFIG_HEADERS): Create config.h alongside
- gnulib headers, rather than in top directory.
- * src/Makefile.am (AUTOMAKE_OPTIONS): Add nostdinc, to reduce make
- output clutter.
-
-2006-10-16 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo: Backport some minor cleanups from head.
- (Cleardivert): Rename from cleardiv.
-
- * doc/m4.texinfo (Invoking m4): Promote to a chapter, instead of
- a section of Preliminaries.
- (Operation modes, Preprocessor features, Limits control)
- (Frozen state, Debugging options, Command line files): Subdivide
- into new sections.
- (Input processing, Quoting Arguments, Define, Arguments)
- (Cleardiv, Format, M4exit): Fix grammar of references.
- (Inhibiting Invocation, Macro Arguments, Builtin, Trace)
- (Debug Levels, Debug Output, Include, Search Path, Divert)
- (Platform macros, Syscmd, Location, Extensions): Point to new
- sections.
- (Top, Loops, Include, Undivert, Location, Incompatibilities):
- Improve file references.
-
-2006-10-14 Eric Blake <ebb9@byu.net>
-
- * m4/input.c (file_clean): Don't close stdin twice, POSIX says it
- is not portable.
- Reported by Ralf Wildenhues.
-
- * src/builtin.c (m4_undivert): Check for read error.
-
-2006-10-13 Eric Blake <ebb9@byu.net>
-
- * src/m4.h (UNIX, W32_NATIVE, OS2): Move platform checks after
- header files are included, since <unistd.h> can affect the tests.
- * THANKS: Updated.
- Reported by Martin Koeppe.
-
- Backport head's usage of clean-temp module, as it is cleaner than
- using tmpfile-safer.
- * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
- clean-temp closeout', and remove tmpfile-safer.
- * src/m4.h (includes): Adjust.
- (m4_path_search): Rename from path_search, to avoid collision
- with gnulib.
- * src/m4.c (main): Install closeout handler. Adjust caller.
- (usage): Now done by closeout module.
- * src/builtin.c (m4_m4exit): Likewise.
- (m4_undivert, include): Adjust callers.
- * src/freeze.c (reload_frozen_state): Likewise.
- * src/path.c (m4_path_search): Rename from path_search.
- * src/output.c (output_temp_dir): New variable.
- (cleanup_tmpfile, m4_tmpfile): New functions, from head.
- (insert_diversion, make_room_for): Use them.
- * doc/m4.texinfo (Diversions): Document this, and add a test.
- (Improved fatal_error): Fix typo.
- (Maketemp): Port test to mingw, and no longer hide from
- documentation.
- * NEWS: Document the change in TMPDIR behavior.
-
- * configure.ac (m4_pattern_forbid): Narrow the range of forbidden
- macros, to work with recent gnulib-tool update.
-
- * src/builtin.c (m4_builtin, m4_indir): Allow transparent
- handling of defn results.
- * doc/m4.texinfo (Builtin, Indir): Add test cases.
- * NEWS: Document this.
-
-2006-10-12 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo (Location): Fix typo in previous commit.
- (Changeword): Catch one more case.
- * src/input.c (skip_line): Fix case when outer file used macro to
- supply the \n.
-
-2006-10-11 Eric Blake <ebb9@byu.net>
-
- * src/input.c (enum input_type): Add additional types, to shave
- time off the common case.
- (push_wrapup): Wrapped strings remember location.
- (push_string_finish): Normal strings carry no location.
- (push_file): Start new files uninitialized.
- (peek_input, next_char_1): Optimize common cases by updating
- location only on new input types.
- (pop_input): Update to honor new input types.
- (skip_line, push_string_finish): Fix regression in previous patch
- when dnl is not followed by newline in included file.
- (push_string_init): Initialize all fields of INPUT_STRING sooner.
- (peek_token): Simplify.
- (peek_input): Don't pop input files on peek, so that __file__ and
- __line__ as last token of include file work correctly.
- * doc/m4.texinfo (History): Mention 1.4.8.
- (Answers): Split into sections, one per answer.
- (Improved exch, Improved cleardivert, Improved fatal_error): New
- nodes.
- (Dnl, M4wrap, Location, M4exit, Improved fatal_error): Update to
- new m4wrap location semantics.
- (Changeword): Add test that caught the regression.
- * NEWS: Document this.
-
- * src/macro.c (expand_macro): In macro expansion errors, report
- line number at open parenthesis.
- * src/input.c (next_token): Fix off-by-one bug in reporting end
- of file in unterminated comment and string.
- (file_names): New obstack, necessary since expand_macro now hangs
- on to file names longer than the files remain open.
- (input_init): Initialize new obstack.
- (push_file): Use new obstack. Delay updates to current_file
- until after expand_macro has restored state.
- (peek_input, next_char_1): Update current_file if necessary.
- (pop_wrapup): Release memory.
- * doc/m4.texinfo (Macro Arguments, Changequote, Changecom): Catch
- the off-by-one bug.
- (Dnl): Update to the new location reporting rules.
- * NEWS: Document these changes.
-
-2006-10-10 Eric Blake <ebb9@byu.net>
-
- * src/macro.c (argc_stack, argv_stack): New variables for sharing
- obstacks across multiple macro calls.
- (expand_input): Initialize and tear down stack once per input
- file, instead of once per macro.
- (expand_macro): Reuse existing stacks when possible.
- (collect_arguments): Simplify slightly.
-
- * src/path.c (include_env_init): Fix botched patch application.
- Reported by Ralf Wildenhues.
-
-2006-10-09 Eric Blake <ebb9@byu.net>
-
- * src/m4.c (usage, main): Detect write failures to stderr.
- * src/builtin.c (m4_m4exit): Likewise.
- * NEWS: Document this.
-
- * src/macro.c (expand_macro): Allow --nesting-limit=0 to remove
- the limit.
- * NEWS: Document this.
- * doc/m4.texinfo (Invoking m4): Likewise.
-
-2006-10-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
-
- * src/path.c (include_env_init): Copy the string returned
- by getenv before overwriting it; POSIX disallows this.
-
-2006-10-09 Eric Blake <ebb9@byu.net>
-
- * src/m4.c (main): Defer debugfile until after --help.
- * configure.ac (AC_INIT): Bump version number.
- * NEWS: Start changes of 1.4.7a.
-
-2006-09-25 Eric Blake <ebb9@byu.net>
-
- Release 1.4.7:
- * configure.ac (AC_INIT): Bump version number.
- * NEWS: Describe changes since 1.4.6.
-
-2006-09-21 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo (Invoking m4): Add clarification on option
- processing behavior.
- * THANKS: Update.
- Reported by Mikhail Teterin.
-
- * bootstrap: Add --force option, based on idea from coreutils.
- * README: Document that ./bootstrap and autoreconf are for
- developers, and not lightly done in tarballs.
-
-2006-09-20 Eric Blake <ebb9@byu.net>
-
- * src/m4.c (usage, OPTSTRING, main): Rename -e to -i, and give
- deprecation warning on -e.
- * doc/m4.texinfo (Invoking m4, Extensions): Document this.
- * NEWS: Document this.
-
-2006-09-19 Eric Blake <ebb9@byu.net>
-
- * src/m4.c (usage, long_options, main, DEBUGFILE_OPTION): Rename
- -o/--error-output to --debugfile, and deprecate the former. This
- will allow a future release to be more consistent with other GNU
- tools, with -o/--output affecting stdout, not debug.
- * doc/m4.texinfo (Invoking m4, Debug Output): Document this.
- * NEWS: Document this.
-
-2006-09-14 Eric Blake <ebb9@byu.net>
-
- * src/m4.c (main): Warn on deprecated options -B, -S, -T, -N,
- --diversions. `m4 --help --version' now displays help, not
- version.
- (interactive, frozen_file_to_read, frozen_file_to_write): Move to
- smaller scope.
- (show_help, show_version): No longer needed.
- (long_options, DIVERSIONS_OPTION): Backport patch from head to
- distinguish between -N and --diversions in warning.
- * doc/m4.texinfo (Invoking m4): Document this.
- * NEWS: Likewise.
-
-2006-09-11 Eric Blake <ebb9@byu.net>
-
- * src/Makefile.am (m4_LDADD): Add any gnulib dependent libraries.
- * src/debug.c (debug_flush_files) [UNIX]: Flush stdin if it is
- seekable.
- (debug_set_file): Use STDOUT_FILENO.
- * src/builtin.c (m4_m4exit): Flush stdin before exiting, to comply
- with POSIX in regards to unread input.
- * NEWS: Document this fix.
- * doc/m4.texinfo (Syscmd, Esyscmd, M4exit): Likewise.
-
-2006-09-07 Eric Blake <ebb9@byu.net>
-
- * m4/gnulib-cache.m4: Update to newer gnulib-tool.
- * src/m4.h (push_file): Change prototype.
- * src/input.c (push_file, peek_input, next_char_1): Only call getc
- once at EOF, to avoid double ^D on terminal stdin; regression from
- 2006-09-04.
- (push_file, pop_file): Allow reading stdin twice.
- * src/m4.c (main): Likewise.
- * src/builtin.c (include): Update caller.
- * NEWS: Document this change.
- * doc/m4.texinfo (Invoking m4, Incompatibilities): Likewise.
- (Syscmd): Add a test that failed before this patch.
-
-2006-09-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
-
- * checks/check-them: Quote $pwd.
-
-2006-09-05 Eric Blake <ebb9@byu.net>
-
- * src/builtin.c (define_macro): Warn on invalid macro name.
- * NEWS: Document this change.
- * doc/m4.texinfo: Fix typos.
- (Invoking m4, Macro Arguments, Pseudo Arguments, Defn, Indir)
- (Ifelse): Backport some improvements from head.
-
-2006-09-04 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo (Changeword): Skip test on mingw, where the
- native echo is braindead.
- * checks/check-them (strip_needed): Ignore \r in output. Now the
- testsuite will pass when cross-compiling from cygwin to mingw.
-
- * src/input.c (peek_input): Fix regression in handling macro
- without arguments as last token in file; debian bug 385720.
- (next_token): Always consume an input character.
- Reported by Andreas Schultz.
- * configure.ac (AC_INIT): Bump version number.
- * NEWS: Document this fix.
- * doc/m4.texinfo (History): Mention next version.
- (Changeword): Add example that exposes this bug.
- * THANKS: Update.
-
-2006-08-25 Eric Blake <ebb9@byu.net>
-
- Release 1.4.6:
- * configure.ac (AC_INIT): Bump version number.
- * NEWS: Describe changes since 1.4.5.
-
- * Makefile.maint (web-manual): Give up on VPATH build during
- distribution. But distributions are made so infrequently that
- this is not too much of a hardship.
- * Makefile.am (MAINTAINERCLEANFILES): Avoid error if lib/CVS/
- exists.
-
-2006-08-24 Eric Blake <ebb9@byu.net>
-
- * src/builtin.c (m4_index, m4_substr, m4_translit): Similar to
- Solaris, produce output on just one argument.
- (m4_regexp, m4_patsubst): For consistency, do likewise.
- (m4_patsubst): Allow zero-length match at end of string.
- * doc/m4.texinfo (Sysval): Fix overfull hbox.
- (Bugs, Macro Arguments): Minor fixes.
- (Other tokens): Rearrange node order.
- (Index macro, Substr, Translit, Regexp, Patsubst): Add tests.
- * NEWS: Document these fixes.
-
-2006-08-22 Eric Blake <ebb9@byu.net>
-
- * src/input.c (pop_input): Avoid empty filename with -di option.
- * src/debug.c (debug_message_prefix): Put space before message.
-
- * m4/gnulib-cache.m4: We don't explicitly use alloca module.
-
- * m4/gnulib-cache.m4: Augment with gnulib-tool --import gnupload.
- * Makefile.maint (fetch): Simplify, now that we can use gnupload.
-
- * checks/check-them: State why a test is skipped.
- * doc/m4.texinfo (Changeword, Sysval, Maketemp): Likewise.
-
- * ChangeLog: Add copyright.
- * AUTHORS: Likewise.
- * BACKLOG: Likewise.
- * README: Likewise.
- * THANKS: Likewise.
- * TODO: Likewise.
- * examples/COPYING: New file, add copyright for all the examples.
- * checks/get-them: Put copyright on testsuite files.
-
-2006-08-18 Eric Blake <ebb9@byu.net>
-
- Don't let unrelated child processes see too many files.
- * m4/gnulib-cache.m4: Augment with gnulib-tool --import cloexec.
- * src/builtin.c (m4_esyscmd, m4_regexp, m4_patsubst): Fix
- spelling in error message.
- * src/debug.c [!__STDC__]: Assume C89, and nuke old varargs.h.
- (debug_set_output): Close debug file on exec.
- * src/m4.h (includes): Add cloexec.h.
- * src/output.c (make_room_for): Close diversions on exec.
- * src/path.c (path_search): Close include files on exec.
- * NEWS: Document this.
-
- Regular expressions were leaking memory.
- * src/builtin.c (init_pattern_buffer, free_pattern_buffer): New
- helper methods.
- (m4_regexp, m4_patsubst): Avoid memory leak.
- * src/input.c (init_pattern_buffer) [ENABLE_CHANGEWORD]: Make
- static.
- (set_word_regexp) [ENABLE_CHANGEWORD]: Avoid memory leak. Change
- from O(n^2) to O(n) for calculating word_start.
- (next_token, peek_token) [ENABLE_CHANGEWORD]: Treat word_start as
- O(1) bitmap, not O(n) search string.
- * NEWS: Document this fix.
-
-2006-08-17 Eric Blake <ebb9@byu.net>
-
- * NEWS: Document previous checkin.
-
- * src/builtin.c (substitute): Avoid core dump when accessing
- beyond bound of regular expression.
- Reported by Karl Nelson.
- * doc/m4.texinfo (Regexp): Add example that causes core dump on
- some architectures prior to this patch.
- * THANKS: Updated.
-
-2006-08-16 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo (Invoking m4, Debug Output): Fix wording to be
- clear that dumpdef does not always go to stderr.
-
- * src/builtin.c (m4_errprint): Flush buffers before printing to
- stderr.
- * THANKS: Updated.
-
-2006-08-15 Eric Blake <ebb9@byu.net>
-
- * src/builtin.c (m4_m4wrap, m4_errprint, m4_shift): Make blind,
- per debian bug 96075.
- * doc/m4.texinfo (Loops, M4wrap, Errprint): Document this change.
- (Changeword): Don't use shift as an example of a swallowed word.
- (Divert): Discuss fact that divert is an English word.
- Reported by Richard A Nelson.
-
-2006-08-14 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo (Invoking m4): Minor fixes.
-
-2006-08-12 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo (Arguments): Hint at better exch macro.
- (Answers): Provide a better definition.
-
-2006-08-09 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo (Incompatibilities): Document that m4 does not
- yet understand locales.
- * NEWS: Fix wording of a few items.
-
-2006-08-08 Eric Blake <ebb9@byu.net>
-
- Avoid printing `NONE:0:' in error messages.
- * src/m4.h (m4_error_at_line): New function.
- * src/m4.c (m4_error_at_line): Implement.
- * src/input.c (skip_line, input_init, next_token): Use "", not
- "NONE", for no file, since NONE can be a real file name.
- * src/macro.c (expand_argument): Likewise.
- * src/debug.c (debug_message_prefix, trace_header): Check for
- current file.
- * doc/m4.texinfo (Dnl, M4wrap): Adjust accordingly.
- (Location): Document that synclines and internal message format
- are not impacted by redefining these macros.
- (M4exit): Hint at bug in fatal_error.
- (Answers): Provide workaround to match m4 output.
-
- * m4/gnulib-cache.m4: Augment with gnulib-tool --import verror.
- * src/m4.h (m4_error): New function.
- (M4ERROR, M4ERROR_AT_LINE): Reimplement without hacking around
- error module deficiencies.
- (reference_error, suppress_line): No longer needed.
- * src/m4.c (m4_error): Implement.
- (main): No longer need to install error callback.
-
-2006-08-04 Eric Blake <ebb9@byu.net>
-
- * src/m4.h (program_name): Declare.
- (suppress_line): New variable.
- (M4ERROR_AT_LINE): New macro.
- * src/m4.c (reference_error, main): Follow GNU Coding Standards
- for error message format.
- * src/input.c (skip_line, next_token): Use M4ERROR_AT_LINE.
- * src/macro.c (expand_argument): Likewise.
- * checks/check-them (examples): Adjust to new message format.
- * src/builtin.c (m4___program__): New builtin.
- * doc/m4.texinfo (Location): Split from Errprint into new node,
- and document __program__.
- (Builtin, Ifdef, Ifelse, Dumpdef, Trace, Debug Output, Dnl)
- (Include, Regexp, Patsubst, Incr, Eval): Adjust error message
- format.
- (Extensions): Document __program__.
- * NEWS: Document this change.
-
-2006-08-03 Eric Blake <ebb9@byu.net>
-
- Don't confuse leading `(' in comment or quote with start of
- argument collection.
- * src/m4.h (enum token_type): Add TOKEN_OPEN, TOKEN_COMMA,
- TOKEN_CLOSE.
- (peek_input): Make private to input.c.
- (peek_token): New prototype.
- * src/input.c (default_word_regexp): Reduce ifdefs.
- (peek_input): Make static.
- (next_token): Return new token types.
- (match_input, MATCH): Add argument consume, which controls
- whether match should be pushed back.
- (peek_token): New function.
- (token_type_string) [DEBUG_INPUT]: New function.
- * src/macro.c (expand_token, expand_argument, collect_arguments):
- Handle new token types.
- * doc/m4.texinfo (Changequote, Changecom): Document this.
- * NEWS: Document this.
-
- * src/stackovf.c (setup_stackovf_trap): Free memory on failure.
-
- * src/stackovf.c (setup_stackovf_trap): Gracefully avoid stack
- overflow detection when sigstack exists but is not implemented.
- Fixes debian bug 154053.
- * THANKS: Updated.
- Reported by David Perlin.
-
-2006-08-02 Eric Blake <ebb9@byu.net>
-
- * src/input.c (MATCH): Fix EOF detection on multi-byte comment
- close.
-
-2006-08-01 Eric Blake <ebb9@byu.net>
-
- * src/input.c (skip_line, next_token): Remember current file in
- case input file ends abruptly. Addresses debian bug 175365.
- (pop_input): Defer freeing storage that holds previous file
- name...
- (pop_wrapup): to here, after error message is issued.
- * src/macro.c (expand_argument): Remember current file in case
- input file ends abruptly.
- * doc/m4.texinfo (Macro Arguments, Dnl, Changequote, Changecom)
- (M4wrap): Adjust testsuite accordingly.
- (Errprint): Document line number limitation of m4wrap.
- * NEWS: Document this fix.
- * THANKS: Update.
-
-2006-07-31 Eric Blake <ebb9@byu.net>
-
- * src/input.c (peek_input, next_char, match_input): Be eight-bit
- clean; fixes debian bug 311378.
- * doc/m4.texinfo (Syntax): Describe eight-bit handling.
- (Changequote, Changecom): Add examples to test this.
- * NEWS: Document this fix.
- * THANKS: Update.
- Reported by Steven Augart.
-
- * doc/m4.texinfo: Whitespace fix.
- * checks/get-them: Avoid exceeding 14-char file name limit.
- * THANKS: Update.
-
-2006-07-30 Eric Blake <ebb9@byu.net>
-
- * src/path.c (path_search): Detect allocation failure.
-
- Use native free when it is good enough.
- * m4/gnulib-cache.m4: Augment with gnulib-tool --import free.
- * src/builtin.c (define_user_macro, m4_regexp, m4_patsubst):
- Adjust calls.
- * src/symtab.c (free_symbol): Likewise.
- * src/m4.c (xfree, main): Likewise.
- * src/m4.h (obstack_chunk_free): Likewise.
- * src/path.c (path_search): Likewise.
- * src/input.c (pop_wrapup, set_quotes, set_comment): Likewise.
-
- * doc/m4.texinfo (Errprint): Add example for last patch.
- * checks/check-them: Account for VPATH in latest example.
-
-2006-07-29 Eric Blake <ebb9@byu.net>
-
- * src/path.c (path_search): Add result parameter, so that
- -I can be accounted for. Debian bug 53685.
- * src/m4.h (path_search): Update prototype.
- * src/m4.c (main): Adjust callers.
- * src/freeze.c (reload_frozen_state): Likewise.
- * src/builtin.c (include, m4_undivert): Likewise.
- * NEWS: Document this change.
- Reported by Nicolas Lichtmaier.
-
-2006-07-28 Eric Blake <ebb9@byu.net>
-
- * Makefile.am (MAINTAINERCLEANFILES): Fix typo that tripped up
- several non-GNU makes.
- * src/stackovf.c (setup_stackovf_trap): Missed _ from yesterday.
- * src/m4.h: Likewise.
- * src/input.c (push_wrapup): Avoid compiler warning with Solaris
- /usr/ccs/bin/ucbcc.
-
-2006-07-27 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo: Use @acronym{GNU} throughout.
- (History): Update for 1.4.6.
-
- * src/m4.h (_): Remove K&R cruft.
- * src/builtin.c: Likewise.
- * src/debug.c: Likewise.
- * src/eval.c: Likewise.
- * src/macro.c: Likewise.
- * src/stackovf.c: Likewise.
-
- * doc/Makefile.am (m4.1): Improve man page.
- * src/m4.c (usage): Improve --help output, including adding the
- bug reporting address.
- (main): Follow GNU Coding Standards for --version output.
-
-2006-07-26 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo: Use begin-quote, end-quote, begin-comment, and
- end-comment consistently, to match POSIX.
-
- * doc/m4.texinfo (Macro Arguments, Changequote, Changecom)
- (Dnl, M4wrap, Include): Document EOF issues, and add examples.
- (Incompatibilities): Document incompatibility of changecom
- vs. macro names, and of EOF in include.
- * src/input.c (next_token): Reject unterminated comments at EOF.
- (skip_line): Warn on unterminated dnl at EOF.
- * NEWS: Document these changes.
-
-2006-07-25 Eric Blake <ebb9@byu.net>
-
- * m4/gnulib-cache.m4: Update to reflect gnulib's split of
- stdio-safer into fopen-safer and tmpfile-safer.
- * src/m4.c: Remove redundant include.
-
-2006-07-24 Eric Blake <ebb9@byu.net>
-
- Fix bugs related to stream handling.
- * m4/gnulib-cache.m4: Augment with gnulib-tool --import
- unlocked-io stdio-safer stdlib-safer close-stream.
- * configure.ac (AC_CHECK_FUNCS_ONCE): Assume tmpfile; it can be
- provided by gnulib if needed.
- * src/output.c [! HAVE_TMPFILE]: Likewise.
- * src/m4.h (includes): Replace unistd, stdio, and stdlib with
- their safer counterparts.
- (retcode): New global variable.
- * src/input.c (pop_input): Check for read failure.
- * src/freeze.c (reload_frozen_state): Likewise.
- (produce_frozen_state): Check for write failure.
- * src/debug.c (debug_set_file): Likewise.
- * src/m4.c (usage, main): Likewise.
- (retcode): Make global.
- * src/builtin.c (m4_m4exit): Likewise. Ensure that the exit
- status is non-zero except when everything succeeds.
- * doc/m4.texinfo (M4exit): Document these changes.
- (Incompatibilities): Remove documentation of bug now fixed.
- * NEWS: Document these fixes.
-
-2006-07-22 Eric Blake <ebb9@byu.net>
-
- * src/format.c (format): Avoid compiler warning that str may be
- used uninitialized.
-
-2006-07-21 Eric Blake <ebb9@byu.net>
-
- * src/m4.h [UNIX]: Add more platforms that are close enough to
- categorize as UNIX, but which don't predefine __unix__.
- Reported by Nelson H. F. Beebe.
-
-2006-07-20 Eric Blake <ebb9@byu.net>
-
- * m4/gnulib-cache.m4: gnulib-tool has changed again. Regenerate
- to explicitly ask for --assume-autoconf=2.60.
-
-2006-07-19 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo (Sysval): Avoid kill -1, since ksh traps SIGHUP
- and exits normally with 129.
- Reported by Nelson H. F. Beebe.
- * THANKS: Update.
-
- * src/m4.h (EXIT_MISMATCH): Define.
- * src/freeze.c (reload_frozen_state): Detect version mismatch, by
- exiting with status 63.
- * src/m4.c (usage): Document this.
- * doc/m4.texinfo (Invoking m4, Using frozen files): Likewise.
- * NEWS: Likewise.
-
- * doc/m4.texinfo (copying): Relax restriction on front-cover and
- back-cover texts.
-
-2006-07-17 Eric Blake <ebb9@byu.net>
-
- * src/format.c (format): Support F, g, and G specifiers.
- * doc/m4.texinfo (Format): Document this.
- * NEWS: Document this addition.
-
- * doc/m4.texinfo (Builtin): Delete redundant text.
-
- * configure.ac (AC_INIT): Bump version number.
- * src/builtin.c (substitute): Bah. Fix buffer overrun.
- * NEWS: Document this fix.
-
-2006-07-15 Eric Blake <ebb9@byu.net>
-
- Release 1.4.5:
- * configure.ac (AC_INIT): Bump version number.
- * NEWS: Describe changes since 1.4.4.
-
- * src/m4.c (usage): Document exit status.
- * doc/m4.texinfo: Use `exit status', not `exit code'.
- (Invoking m4): Document exit status.
-
- * bootstrap: Backport --help, --version from head.
- (func_update): New function, for easily grabbing up-to-date files
- from gnulib.
- * Makefile.maint (web-manual): Fix for VPATH builds.
-
-2006-07-14 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo: Global cleanup. Avoid @code{...}'d, as it
- looks bad in info. Use @deffn rather than @example for
- describing prototypes. Fix awkward wording and grammar.
-
- * src/builtin.c (substitute): Warn on bad escape sequences.
- Ignore trailing backslash.
- * doc/m4.texinfo (Regexp): Add documentation for this.
- * NEWS: Document this change.
-
- * src/builtin.c (m4_format, m4_indir): Warn on too few arguments.
- * doc/m4.texinfo (Defn, Builtin, Debug Levels, Debug Output): Add
- more examples.
- (Dnl): Update example to show side effects.
- * checks/get-them: Generate three digit test names.
- * checks/Makefile.in (CHECKS): Accomodate 100+ tests.
-
-2006-07-13 Eric Blake <ebb9@byu.net>
-
- * src/input.c (input_init): Simplify.
- (set_word_regexp): Treat empty string as default, since empty
- regexp would disable word parsing.
- * src/m4.c (user_word_regexp): Default to empty string.
- * src/builtin.c (builtin_tab): Make changeword blind.
- * doc/m4.texinfo (Changeword): Document this.
- * NEWS: Document this.
- * TODO: Knock off completed items.
-
- * src/builtin.c (m4_undefine, m4_popdef): Visit all arguments, not
- just the first.
- * doc/m4.texinfo (Undefine, Pushdef): Test this.
- * NEWS: Document this change.
-
- * src/builtin.c (numeric_arg): Treat empty string as 0, with a
- warning. Detect quoted leading space and overflow as warnings.
- (m4_eval): Treat empty radix as 10, and allow output in radix 1.
- Treat width as minimum number of digits, as required by POSIX.
- (m4_ifdef, m4_divert, m4_m4exit, m4_translit): Ignore extra
- arguments.
- (m4_substr): Likewise. Silently treat empty start as 0.
- (m4_undivert): Treat ` 1a' as file, not diversion 1.
- * src/eval.c (eval_lex): Parse radix 1 numbers.
- * doc/m4.texinfo (Invoking m4): Fix wording; there is more than
- one type of warning.
- (Manual): Document behavior of numeric parsing of empty string.
- (Divert, Incr): Document error handling.
- (Eval): Document radices better.
- (Incompatibilities): Document translit incompatibility.
- * NEWS: Document these changes.
-
- * Makefile.maint (fetch): Get gendocs from gnulib, not texinfo.
- (web-manual): Simplify.
- * m4/gnulib-cache.m4: Augment with gnulib-tool --import gendocs.
- * Makefile.am (EXTRA_DIST): Distribute gendocs.sh.
- (MAINTAINERCLEANFILES): Clean it as well.
- * doc/Makefile.am (EXTRA_DIST): Distribute gendocs_template.
- (MAINTAINERCLEANFILES): Clean it as well.
-
-2006-07-12 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo (Extensions): Document how to overcome
- implementation difference in > 9 positional parameters.
-
- * src/m4.c (usage): Sort within sections.
- (nesting_limit): Raise default from 250 to 1024.
- * doc/m4.texinfo: Use file name, not filename, per GNU coding
- standard. Use @option where appropriate.
- (Invoking m4): Sort to match --help output.
- (Debug Levels): Sort.
- (Frozen files): Sort and break into two nodes.
-
- * src/m4.c (nesting_limit): Raise default from 250 to 1024.
- * NEWS: Document raised -L limit.
-
-2006-07-11 Eric Blake <ebb9@byu.net>
-
- * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New macro, to
- stress-test changeword before a release.
- * doc/m4.texinfo: More doc cleanups.
- (Copying This Manual): New node; actually include the FDL in the
- documentation.
- * doc/Makefile.am (m4_TEXINFOS): Mention dependence on fdl.texi.
- * m4/gnulib-cache.m4: Augment with gnulib-tool --import fdl.
- * NEWS: Mention documentation improvements.
-
- * src/m4.h (OS2): New platform macro.
- * src/builtin.c (predefined_tab) [OS2]: Use it to give OS/2 a
- platform macro.
- * doc/m4.texinfo (Platform macros): Document it.
- (Sysval): Remove non-portable test of system("").
- * NEWS: Document this change.
- Reported by Andreas Buening.
-
-2006-07-09 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo (Undivert): Fix typo in last commit.
- * src/m4.c (usage): Document M4PATH.
- * src/path.c (path_search): Reject empty string.
- * src/output.c (insert_diversion): Ignore diversion 0.
- * src/builtin.c (m4_undivert): Ignore empty string.
- * NEWS: Document this fix.
-
-2006-07-08 Eric Blake <ebb9@byu.net>
-
- * checks/get-them: Make filtering easier.
- * checks/check-them: Filter non-input lines, so line counts are
- more realistic in the documentation, and so changeword tests work
- even when dnl is disabled.
- * doc/m4.texinfo: Adjust example line numbers. Clean up
- front-matter, following autoconf's example.
- (Changeword): Enable tests, skipping if changeword not supported.
- (Define, Defn, Ifelse): Backport more examples from head.
- (Input processing, Answers): New nodes, backported from head.
- (Include): Expand test to cover empty filename.
- (Undivert): Add test of undivert(0).
-
-2006-07-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
-
- * doc/m4.texinfo: Fix spelling errors.
-
-2006-07-07 Eric Blake <ebb9@byu.net>
-
- * THANKS: Update.
-
- * doc/Makefile.am (m4.1): No need to go through a temporary file;
- this also ensures timestamps are updated.
- * src/m4.h (includes): Require config.h. Assume string.h,
- stdlib.h, errno. Include error.h, exit.h, and xalloc.h rather
- than prototyping ourselves.
- (builtin_func): Add parameter type-checking.
- (voidstar): Delete, now that we assume C89.
- * src/builtin.c, src/m4.c, src/macro.c, src/symtab.c: All users of
- voidstar changed.
- * src/m4.c (xfree) [WITH_DMALLOC]: Avoid clash with dmalloc's
- xfree.
-
-2006-07-06 Eric Blake <ebb9@byu.net>
-
- * m4/gnulib-cache.m4: Augment with gnulib-tool --import
- binary-io.
- * src/m4.h (includes): Add binary-io.h for O_BINARY.
- * src/freeze.c (produce_frozen_state): Use O_BINARY to remove
- #ifdef. Fixes patch from 2005-02-03 for cygwin.
- * NEWS: Mention this fix.
-
- * configure.ac (FUNC_SYSTEM_BROKEN): New check for OS/2 bug.
- * src/builtin.c (m4_syscmd): Work around OS/2 bug.
-
- * Makefile.am (SUBDIRS): Build . before src, so that autoheader
- runs first when needed.
- * doc/Makefile.am (m4.1): Backport rule from CVS head: build m4.1
- once in srcdir rather than multiple times in VPATH builds.
-
-2006-07-03 Eric Blake <ebb9@byu.net>
-
- * checks/check-them: Use portable = in test.
- * src/Makefile.am (AM_CPPFLAGS): Omit space between -I and
- directory, as required by Solaris cc. Include built headers, as
- required by Solaris make in VPATH build.
- * checks/Makefile.in: Use $(srcdir) where needed.
- (CHECKS): Factor $(srcdir) into macro.
- (DISTFILES): Likewise. Automake takes care of distributing
- Makefile.in.
- (dist): Simplify.
- (Makefile): Use modern syntax of config.status.
- * doc/m4.texinfo (Loops, Include, Undivert, Incompatibilities):
- Avoid overfull and underfull hboxes in dvi.
-
- Fix 'make check' in VPATH build. All files included by testsuite
- now live in a single directory. Use forloop.m4 in testsuite.
- * checks/incl.m4, checks/foo, checks/wrapfifo.m4: Move from
- here...
- * examples/incl.m4, examples/foo, examples/wrapfifo.m4: ...to
- here.
- * checks/Makefile.in (DISTFILES): Don't distribute moved files.
- * examples/Makefile.am (EXTRA_DIST): Distribute new files.
- * checks/check-them: Avoid s/// when filename is in pattern.
- * examples/forloop.m4: Fix to match documentation.
- * doc/m4.texinfo (Include, Undivert, Incompatibilities): Reflect
- new locations.
- (Loops, Format): Actually use forloop.m4 in tests.
-
-2006-07-02 Eric Blake <ebb9@byu.net>
-
- * checks/Makefile.in (exec_prefix, prefix): New macros, so that
- $(bindir) works in installcheck.
- (check, installcheck): No longer change directory, so that
- distcheck works with a read-only builddir.
- * checks/check-them: Work when pwd is no longer builddir.
-
-2006-07-01 Eric Blake <ebb9@byu.net>
-
- * GNUmakefile: New file, borrowed from coreutils.
- * Makefile.am (EXTRA_DIST): Distribute GNUmakefile.
- * Makefile.maint (Makefile): Delete this rule, now that
- GNUmakefile includes Makefile.
-
-2006-06-30 Eric Blake <ebb9@byu.net>
-
- For compatibility with other m4 implementations, sysval returns
- signal<<8 rather than 0 if syscmd is terminated by a signal.
- * configure.ac (AC_CHECK_HEADERS_ONCE): Check for sys/wait.h.
- * src/builtin.c (include): Include sys/wait.h when stdlib.h does
- not provide wait macros.
- (WTERMSIG, WIFSIGNALED, WIFEXITED): More fallback macros.
- (M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS): New helper macros.
- (m4_esyscmd): Set sysval to -1 on failure.
- (m4_sysval): Print 127 on failure, and accomodate signals if they
- are detectable.
- * NEWS: Document this change.
- * doc/m4.texinfo (Platform macros, Esyscmd, Sysval): Fix typos in
- last commit.
- * checks/check-them: Likewise.
- * src/debug.c (debug_set_file): Work around mingw fstat bug.
-
- * src/m4.h (UNIX, W32_NATIVE): Improve platform detection macros.
- * src/freeze.c (produce_frozen_state): Use new spelling of
- platform macro.
- * src/builtin.c (predefined_tab): Add __windows__ on non-unix
- platforms.
- (m4_syscmd, m4_esyscmd): The empty command is successful.
- * doc/m4.texinfo (Shell commands): Rename from UNIX commands.
- Document platform-dependence of system().
- (Syscmd): Add example.
- (Esyscmd): Make example more robust, and actually demonstrate
- rescanning.
- (Sysval): Expand test to cover esyscmd code path, and to check
- that empty command is successful. Add conditional check for
- signal behavior.
- (Other Incompatibilities): Move platform macros from here...
- (Platform macros): ...to this new node. Add windows macro.
- Check that exactly one platform macro is provided.
- * checks/check-them: Improve trap cleanup. Tolerate dirname and
- .exe in error messages. Allow for skipping checks.
- * configure.ac (HAVE_EFGCVT): Kill dead configure check.
- * NEWS: Document platform macros.
-
-2006-06-29 Eric Blake <ebb9@byu.net>
-
- Fix buffer overrun bug.
- * m4/gnulib-cache.m4: Augment with gnulib-tool --import
- xvasprintf.
- * src/format.c [HAVE_EFGCVT]: Delete this code, and use *printf
- variant instead, since [efg]cvt are obsolete and our use of them
- was buggy (savannah sr #104303).
- (format): Fix buffer overflow by using xasprintf.
- * doc/m4.texinfo (Format): Expand format test to catch both bugs.
- * NEWS: Document this fix.
-
- * configure.ac (AC_CANONICAL_HOST, AC_CANONICAL_BUILD): Allow
- cross-compilation.
- (AC_CACHE_CHECK): Cache search for ecvt.
-
-2006-06-27 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo (Eval): Document 32-bit signed limitations
- required by POSIX, and add example that exposed core dump on x86
- architectures.
- (Incompatibilities): Document incompatibility in eval precedence.
- * src/eval.c (shift_term): Explicitly mask, to avoid undefined
- behavior.
- (mult_term): Explicitly check for -1, to avoid SIGFPE on x86.
- * NEWS: Document this change.
-
- * doc/m4.texinfo: Use @noindent consistently.
- (Quoting Arguments): Document that unquoted parentheses group
- arguments.
- (Pseudo Arguments): Expand tests to show this.
- (Incompatibilities): Contrast traditional behavior of
- changequote.
-
-2006-06-24 Eric Blake <ebb9@byu.net>
-
- * configure.ac (AC_PREREQ): Autoconf 2.60 is now released.
- (AC_CHECK_HEADERS_ONCE): Use this new feature.
- (AC_CHECK_FUNCS_ONCE): Likewise.
-
-2006-06-23 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo: Quoting cleanup throughout - follow
- autoconf-recommended style of one level of quote per parenthesis
- in the normal case. Adjust error messages to match GNU coding
- standards (and to allow 'make check' to pass again).
- (Quoted strings, Inhibiting Invocation): Turn more examples into
- tests.
- (Comments): Resolve FIXME by adding example.
- (Define): Add example about underquoting.
- (Defn): Add example about use of $0.
- (Indir, Format): Resolve FIXME done in last commit.
- (Ifelse): Add example about creating blind macro.
- (Debugging): Fix grammar.
- (Dnl): Add example about dnl with arguments.
- (M4wrap): Be explicit that LIFO order is non compliant, and will
- change in m4 2.0.
- (Undivert): Resolve FIXME by adding example.
- (Frozen files): Document that m4wrap and sysval will not work
- consistently until m4 2.0.
- (Incompatibilities): Document another POSIX compliance bug, this
- time with changequote. Document a traditional incompatibility
- with partial input spanning file boundaries.
-
- Make error messages more consistent with GNU coding standards -
- start with lower case, and don't end sentence with punctuation.
- * src/debug.c (trace_pre): Update message wording.
- * src/eval.c (evaluate, cmp_term, shift_term, mult_term):
- Likewise.
- * src/freeze.c (produce_frozen_state, issue_expect_message),
- (reload_frozen_state): Likewise.
- * src/input.c (push_string_init, pop_init, init_macro_token),
- (peek_input, next_char_1, set_word_regexp, next_token): Likewise.
- * src/m4.c (stackovf_handler, main): Likewise.
- * src/macro.c (expand_token, expand_argument, call_macro),
- (expand_macro): Likewise.
- * src/output.c (make_room_for, output_text, insert_file),
- (freeze_diversions): Likewise.
- * src/symtab.c (symtab_init, lookup_symbol): Likewise.
-
- * src/builtin.c (builtin_tab): Make format and indir blind.
- (substitute): Prefer "Warning:" vs. "ERROR:" in messages.
- * NEWS: Mention the change to builtins.
-
-2006-06-22 Eric Blake <ebb9@byu.net>
-
- Robustify frozen file format.
- * src/freeze.c (reload_frozen_state): Add GET_DIRECTIVE helper
- macro. Require V first, and only accept it once. For F, use
- placeholder if builtin is not found, rather than warning.
- * src/m4.h (m4_placeholder): New prototype.
- * src/builtin.c: Unify error message style.
- (m4_placeholder): New function, warn if invoked.
- (builtin_tab): Add m4_placeholder.
- (m4_defn): Warn if placeholder is encountered.
- (find_builtin_by_addr): Handle placeholder.
- (find_builtin_by_name): Return placeholder on failure.
- (m4_builtin): Treat placeholder as undefined.
- * doc/m4.texinfo (Frozen files): Document changes in V and F.
- * NEWS: Document this change.
- Reported by Bruno Haible.
-
- * doc/m4.texinfo: Whitespace cleanup. TABs are evil in texinfo.
- (tabchar): New macro, so that 'make check' still works.
- (Invoking m4): Document that ignored compatibility options -B, -S,
- and -T each consume an argument.
- * checks/get-them: Honor @tabchar{}.
-
- Avoid compiler warnings during -DDEBUG.
- * src/m4.h (M4_GNUC_ATTRIBUTE, M4_GNUC_UNUSED): New macros.
- [DEBUG]: Also imply DEBUG_OUTPUT and DEBUG_STKOVF.
- * src/input.c (print_token) [DEBUG_INPUT]: Use correct format.
- (lex_debug) [DEBUG_INPUT]: Fix to compile. Mark unused.
- (next_token) [DEBUG_INPUT]: Print before returning.
- * src/path.c (include_dump) [DEBUG_INCL]: Mark unused.
- * src/symtab.c (symtab_debug) [DEBUG_SYM]: Mark unused.
-
- Avoid mkstemp bugs on various platforms.
- * m4/gnulib-cache.c: Augment with gnulib-tool --import mkstemp.
- * src/output.c [! HAVE_MKSTEMP]: Delete.
- * configure.ac (AC_CHECK_FUNCS): Don't check for mkstemp.
- * src/m4.h (mkstemp) [! HAVE_MKSTEMP]: Prototype, if needed.
- * NEWS: Document this.
-
- * Makefile.am (EXTRA_DIST): Distribute gnulib-cache.m4.
- Reported by Bruno Haible.
-
-2006-06-21 Eric Blake <ebb9@byu.net>
-
- Avoid obsolete sigstack when POSIX sigaltstack is available.
- * src/m4.c: Blindly assume signal.h, since stackovf.c and gnulib
- do likewise.
- * configure.ac (AC_CHECK_HEADERS): Likewise.
- (AC_CHECK_TYPES): New check for siginfo_t, since siginfo.h is
- obsolete and most hosts now have it in signal.h.
- (AC_CHECK_MEMBERS): New check for sigaction.sa_sigaction.
- (AC_CACHE_CHECK): Cache decision to use stackovf.
- (AC_EGREP_HEADER): Switch to AC_CHECK_TYPES.
- * src/stackovf.c (DEBUG_STACKOVF): Remove unused define.
- (SA_RESETHAND, SA_SIGINFO): Provide fallback definitions, to
- simplify later code.
- (PARAM_STACKOVF, PARAM_NOSTACKOVF): Move further away from NULL,
- in case of dereferencing a member of a NULL pointer.
- (sigsegv_handler) [HAVE_STRUCT_SIGACTION_SA_SIGACTION]: Define a
- POSIX handler.
- (setup_stackovf_trap): Use NULL instead of 0 for pointers, use
- EXIT_FAILURE in error, indent preprocessor directives.
- [HAVE_SIGALTSTACK && HAVE_SIGINFO_T]: Depend on siginfo_t, not
- siginfo.h.
- [HAVE_SIGACTION && defined SA_ONSTACK]: Prefer POSIX handler.
- Reported by Santiago Vila.
-
-2006-06-19 Eric Blake <ebb9@byu.net>
-
- * THANKS: Update.
-
-2006-06-18 Andreas Buening <andreas.buening@nexgo.de> (tiny change)
-
- * checks/Makefile.in (PATH_SEPARATOR): New macro.
- (check, installcheck): Use it, for OS/2.
-
-2006-06-18 Eric Blake <ebb9@byu.net>
-
- Consistently use "GNU M4" as package name, "m4" as executable
- name.
- * NEWS: Document previous fix.
- * THANKS: Update.
- * README: Fix grammar. Document that --enable-changeword is on
- its last leg.
- * doc/m4.texinfo (Top, Changeword): Likewise.
- (Sysval): Enhance this test.
- (History): Backport this section from CVS head, and update.
-
-2006-06-18 Bruno Haible <bruno@clisp.org> (tiny change)
- Eric Blake <ebb9@byu.net>
-
- * src/builtin.c (WEXITSTATUS): Provide fallback definition.
- (m4_esyscmd): Set sysval to 0xffff, to accomodate both
- big-endian and little-endian wait status definitions.
- (m4_sysval): Use WEXITSTATUS.
- Reported by Andreas Buening.
-
-2006-06-18 Eric Blake <ebb9@byu.net>
-
- * configure.ac (AC_INIT): Bump version number.
- * NEWS: Describe changes in 1.4.4c.
-
-2006-06-17 Eric Blake <ebb9@byu.net>
-
- Beta Release 1.4.4b:
- * configure.ac (AC_INIT): Bump version number.
- * NEWS: Describe changes since 1.4.4.
- * Makefile.maint (cvs-news): Accomodate copyright line wrapping.
-
- * Makefile.am (MAINTAINERCLEANFILES): Clean files added by
- bootstrap.
- * checks/Makefile.in (maintainer-clean): Add missing target.
- * COPYING: Remove generated file from CVS.
-
-2006-06-16 Eric Blake <ebb9@byu.net>
-
- * checks/Makefile.in (DISTFILES): Distribute wrapfifo.m4.
-
-2006-06-15 Eric Blake <ebb9@byu.net>
-
- * checks/wrapfifo.m4: New file. Use it...
- * doc/m4.texinfo (Incompatibilities): here, in a new test case to
- demonstrate how to get POSIX behavior of m4wrap prior to m4 2.0.
-
- * src/m4.h (to_uchar): New function.
- * src/eval.c (eval_lex): Use it to avoid passing signed char to
- isdigit, isalpha, isupper, islower, isspace, isalnum.
- * src/builtin.c (expand_user_macro): Likewise.
- * src/format.c (format): Likewise.
- * src/macro.c (expand_argument): Likewise.
- * NEWS: Document this security fix.
-
- Message cleanup.
- * src/symtab.c (lookup_symbol): Use invalid, not illegal.
- * src/freeze.c (reload_frozen_state): Fix typo in message.
- (produce_frozen_state): Standardize on builtin, not built-in.
- * src/builtin.c (numeric_arg, bad_argc): Likewise.
-
- * configure.ac (M4_EARLY, M4_INIT): Use gnulib.
- (AC_PROG_RANLIB, AC_AIX, AC_MINIX, AC_CHECK_HEADERS),
- (AC_FUNC_ALLOCA, AC_REPLACE_FUNCS): Avoid checks now done by
- gnulib.
- * Makefile.am (ACLOCAL_AMFLAGS): New entry, for gnulib.
- * m4/gnulib-cache.m4: New file, from gnulib.
- * bootstrap: Invoke gnulib-tool --update.
- * src/m4.c (main): Cast away const.
- * NEWS: Document that regex is updated.
- * THANKS: Update.
-
-2006-06-08 Eric Blake <ebb9@byu.net>
-
- * configure.ac (changeword): Work even when changeword is not a
- macro.
- (AC_PROG_AWK, AC_PROG_INSTALL, AC_PROG_MAKE_SET, AC_HEADER_STDC):
- Delete; now done by automake.
- (AC_ISC_POSIX, AC_C_CONST): Delete; now obsolete.
-
-2006-06-07 Eric Blake <ebb9@byu.net>
-
- * lib/regex.c (bcmp_translate): Canonicalize type name.
- * doc/Makefile.am (MAINTAINERCLEANFILES): Fix typo.
- * configure.ac (changeword): Disable changeword for the creation
- of configure, in case of bootstrapping with an m4 configured with
- --enable-changeword.
-
- Distribute a rudimentary man page.
- * Makefile.am (SUBDIRS): Move doc after src so that 'm4 --help'
- can feed help2man.
- * doc/Makefile.am (man_MANS, EXTRA_DIST, MAINTAINERDISTCLEAN),
- (SUFFIXES, m4.1): New macros and rules to build m4.1.
-
-2006-06-06 Eric Blake <ebb9@byu.net>
-
- * lib/regex.c (re_match_2_internal, bcmp_translate): Avoid
- compiler warnings at -O2.
- * lib/getopt.c (_getopt_internal): Likewise.
-
- Cleanup of previous patches.
- * src/input.c (struct input_block): Remove traced member.
- (push_macro, init_macro_token): Don't pass trace status around.
- * src/m4.h (struct token_data): Remove traced member.
- (struct symbol, struct builtin): Reduce unused space.
- (TOKEN_DATA_FUNC): Simplify.
- (TOKEN_DATA_FUNC_TRACED): Remove unused macro.
- (push_macro, define_builtin): Remove unused parameter.
- * src/builtin.c (define_builtin, builtin_init, define_macro),
- (m4_defn): Don't pass trace status around.
- * src/macro.c (expand_argument): Likewise.
- * src/freeze.c (reload_frozen_state): Likewise.
- * src/symtab.c: Whitespace cleanup.
- * NEWS: Clean up wording.
- * doc/m4.texinfo (Undefine, Dumpdef, Trace): Cleanup wording;
- ensure tests actually expose bugs prior to today's patches.
-
- Trace status of builtins is no longer inherited across
- define(...,defn(...)). Fixes bug that autom4te had been working
- around.
- * src/builtin.c (define_builtin): Don't override trace status.
- * doc/m4.texinfo (Trace): Add test for this.
- * NEWS: Document this.
-
- When changing macro definitions inside the arguments to the macro,
- consistently preserve the old definition that was in effect before
- argument collection, similar to the C pre-processor.
- Reported by John Brzustowski.
- * NEWS: Document this change.
- * doc/m4.texinfo (Macro Arguments, Undefine, Dumpdef): Document
- this policy, and add tests that expose core dumps prior to this
- patch.
- * src/m4.h (struct symbol): New members to track when a symbol is
- still in use after removal from the symbol table.
- (SYMBOL_PENDING_EXPANSIONS, SYMBOL_DELETED): Define.
- (free_symbol): Prototype.
- * src/macro.c (expand_macro): Track pending expansions of a
- symbol. On completion, if a symbol is deleted and no longer
- pending, free its memory.
- * src/symtab.c (free_symbol): Export. Don't free memory if symbol
- is still in use.
- (lookup_symbol) <SYMBOL_INSERT>: Create new entry when old entry
- is still in use.
- (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>: Mark entries still
- in use as deleted and remove from the table without freeing
- memory.
- (symtab_print_list) [DEBUG_SYM]: More debug output.
-
- * src/symtab.c (hack_all_symbols): Allow certain modifications of
- the symbol table during traversal.
- * src/builtin.c (set_trace): Replace SYMBOL_DELETE with
- SYMBOL_POPDEF, since only the latter is safe with
- hack_all_symbols.
-
- Solve crash when passing "indir(`foo')" to "m4 -tfoo".
- * src/symtab.c (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>:
- Preserve placeholder when macro is being traced.
- * src/builtin.c (m4_ifdef, m4_indir): A traced but undefined
- symbol is not defined.
- (set_trace): Remove placeholder when no longer traced.
- (m4_traceon): On named traces, always reserve a slot in the
- symbol table.
- (m4_traceoff): Don't warn about untracing a nonexistent symbol.
- * NEWS: Document new trace behavior.
- * doc/m4.texinfo (Trace): Tracing by name now consistently works
- no matter whether that macro is currently defined.
- (Incompatibilities): Document differences between traditional and
- GNU trace.
-
-2006-06-04 Paul Eggert <eggert@cs.ucla.edu> (tiny change)
- Eric Blake <ebb9@byu.net>
-
- * src/m4.h (hash_table_size): Now size_t instead of int.
- * src/m4.c (hash_table_size): Likewise.
- (main): Adjust to this; use atol rather than atoi.
- * src/symtab.c: Include <limits.h>, for CHAR_BIT.
- (symtab_init, lookup_symbol, hack_all_symbols):
- Use size_t for sizes and indexes, not int.
- (symtab_print_list) [DEBUG_SYM]: Likewise.
- (hash): Likewise. Don't case-fold in the hash function.
- Shift by 7, not 3, for consistency with gnulib/lib/hash.c.
- Don't assume hash word is 32 bits.
- * NEWS: Document this change.
-
-2006-06-04 Eric Blake <ebb9@byu.net>
-
- * src/symtab.c (symtab_debug, symtab_print_list) [DEBUG_SYM]: Fix
- to allow compilation, for use in debugger.
- (profiles, current_mode) [DEBUG_SYM]: New variables.
- (show_profile, profile_strcmp) [DEBUG_SYM]: New methods for
- determining hash table performance.
-
-2006-05-31 Eric Blake <ebb9@byu.net>
- John Brzustowski <jbrzusto@fastmail.fm>
-
- * src/input.c (input_stack): Delete; use current_input instead.
- (wrapup_stack): Dynamically allocate, so that recursion is handled
- properly.
- (push_wrapup): Use current wrapup stack.
- (pop_wrapup): Rotate wrapup stack to current, and create new
- wrapup stack.
- (input_init): Dynamically allocate stacks.
- * NEWS: Update, now that recursive m4wrap can no longer cause
- core dump.
-
-2006-05-31 Eric Blake <ebb9@byu.net>
-
- * lib/getopt.c: Fix copyright year.
- * lib/obstack.c: Ditto.
- * src/builtin.c: Ditto.
-
-2006-05-30 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo (M4wrap): Add test to expose m4wrap bug.
- Reported by John Brzustowski.
- (Incompatibilities): Document known POSIX incompatibilities.
- * THANKS: Update.
-
-2006-05-29 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo (Maketemp): Work even when running 'make check'
- in read-only dir.
-
- Use automake.
- * Makefile.am: New file.
- * doc/Makefile.am: Ditto.
- * examples/Makefile.am: Ditto.
- * lib/Makefile.am: Ditto.
- * src/Makefile.am: Ditto.
- * acinclude.m4: New file, renamed from aclocal.m4.
- * configure.ac (AM_INIT_AUTOMAKE): Invoke new macro.
- (AC_ARG_PROGRAM): Now redundant.
- (STACKOVF): Turn into automake conditional.
- (AC_CONFIG_COMMANDS): stamp-h is a command, not a file.
- * checks/Makefile.in: Converting this dir to automake was not
- trivial; for now, just add missing targets demanded by top-level.
- * INSTALL: Remove files that are now generated from CVS.
- * Makefile.in: Ditto.
- * aclocal.m4: Ditto.
- * install-sh: Ditto.
- * mkinstalldirs: Ditto.
- * doc/Makefile.in: Ditto.
- * doc/texinfo.tex: Ditto.
- * examples/Makefile.in: Ditto.
- * lib/Makefile.in: Ditto.
- * src/Makefile.in: Ditto.
-
- * AUTHORS: Backport from CVS head, and update.
- * doc/m4.texinfo (Changeword): Fix examples to match behavior.
-
-2006-05-27 Eric Blake <ebb9@byu.net>
-
- * lib/regex.c (regex_compile): Kill compiler warnings.
- * lib/getopt.c: Likewise.
- * lib/obstack.c: Likewise.
- * src/builtin.c (builtin_init): Likewise.
- * src/path.c (path_search): Likewise.
-
- * doc/m4.texinfo: Fix usage of a vs. an.
- (Loops, Include, Cleardiv, Patsubst, Format, M4exit): Kill
- overfull hbox warnings.
- (Inhibiting Invocation, Divert, Maketemp, M4exit): Add new tests.
-
- * configure.ac: Update to autoconf 2.59. Forbid ^M4_. Fix
- quoting.
- * aclocal.m4 (fp_PROG_CC_STDC): Delete; now covered by autoconf.
- (fp_C_PROTOTYPES): Delete, GNU Coding Standards state we can now
- assume C89.
- (M4_WITH_DMALLOC): Rename from fp_WITH_DMALLOC. Fix quoting.
- * src/m4.h (_): PROTOTYPES is no longer provided, assume C89.
- * src/Makefile.in: Delete remains of ansi2knr.
- * src/ansi2knr.1: Delete.
- * src/ansi2knr.c: Delete.
-
-2006-05-25 Eric Blake <ebb9@byu.net>
-
- * doc/m4.texinfo: Fix spelling errors. Use `invalid' instead of
- `illegal'.
-
- * doc/m4.texinfo (Francois): No longer needed as a tex variable.
- Reported by Karl Berry.
-
-2006-05-24 Eric Blake <ebb9@byu.net>
-
- * Makefile.in (html): New target.
- * doc/Makefile.in (html, m4.html): Likewise.
- (MAKEINFOHTML): New macro.
- * doc/m4.texinfo (Francois) [ifnottex]: Use newer texinfo
- rendering.
- (Regexp) [ifhtml]: Make cross-reference to emacs manual an
- absolute URL.
- Reported by Bob Badour.
-
- * THANKS: Update. Move reporter's email addresses here, instead
- of in ChangeLog.
-
-2006-05-11 Eric Blake <ebb9@byu.net>
-
- * THANKS: Update.
- * doc/m4.texinfo (Changequote): Give testsuite exposure to bug
- patched on 2005-12-04.
- Reported by Ilya N. Golubev.
-
- * bootstrap: New file, so that generated files need not be stored
- in CVS.
- * Makefile.in (DISTFILES): Add bootstrap.
-
- Make testsuite less sensitive to doc changes.
- * doc/m4.texinfo: Use m4.input instead of filename.
- * checks/check-them (xerr): Turn m4.input into filename.
- * checks/Makefile.in (dist): Depend on stamp-checks.
-
- Portability updates for OS/2.
- * src/Makefile.in (EXEEXT, OBJEXT): Define.
- (LINK): Use CFLAGS.
- (.c.obj): Define.
- * lib/Makefile.in (OBJEXT): Define.
- (.c.obj): Define.
- * doc/Makefile.in (install, uninstall): Install info files into
- the dir listing.
- Reported by Andreas Buening.
-
-2006-05-09 Eric Blake <ebb9@byu.net>
-
- * install-sh: Update to newer upstream version.
- * mkinstalldirs: Likewise.
- Reported by Andreas Buening.
-
- * src/m4.c (main): Bump copyright year.
- * Makefile.in (datarootdir): Define, for autoconf 2.59c.
- * doc/Makefile.in (datarootdir): Likewise.
-
-2006-05-08 Eric Blake <ebb9@byu.net>
-
- * THANKS: Update.
- * doc/m4.texinfo (Bugs): Backport bug email address from head.
- Reported by Stepan Kasal.
-
-2005-12-04 Ilya N. Golubev <gin@mo.msk.ru> (tiny change)
-
- * input.c (match_input): Do not pass expression with side effect
- to `obstack_grow'. Fix <INTERNAL ERROR: Recursive push_string!>.
- * NEWS: Updated.
-
-2005-12-04 Gary V. Vaughan <gary@gnu.org> (tiny change)
-
- * doc/m4.texinfo (How to debug macros and input): s/woould/would/
- Reported by Damian Menscher.
-
-2005-10-19 Gary V. Vaughan <gary@gnu.org> (tiny change)
-
- * configure.ac (AC_INIT): Bump to 1.4.4a.
-
-2005-10-19 Gary V. Vaughan <gary@gnu.org> (tiny change)
-
- Release 1.4.4:
- * configure.ac (AC_INIT): Bump to 1.4.4.
- * NEWS: Describe 1.4.4's changes.
- * INSTALL, install-sh, doc/texinfo.tex: Updated from upstream.
-
-2005-10-17 John Gatewood Ham <zappaman@buraphalinux.org> (tiny change)
-
- * src/m4.c: fix return code when non-existent files are processed
-
-2005-10-17 John Gatewood Ham <zappaman@buraphalinux.org> (tiny change)
-
- * README: update email address for bug reports.
-
-2005-10-17 Gary V. Vaughan <gary@gnu.org>
-
- * doc/m4.info: Generated files are not kept in the repository.
-
-2005-05-01 Gary V. Vaughan <gary@gnu.org>
-
- The FSF are moving offices today. Changed their contact address
- in all files from `59 Temple Place, Suite 330, MA 02111-1307' to
- `51 Franklin Street, Fifth Floor, MA 02110-1301'.
-
- Also, some of the files here were never updated from the previous
- '675 Mass Ave, Cambridge, MA 02139', so changed those to the
- '51 Franklin Street, Fifth Floor, MA 02110-1301' address too.
-
-2005-03-31 Mike Frysinger <vapier@gentoo.org>
-
- * Makefile.in (bindir, infodir): Substitute from configure rather
- than hardcode.
- * doc/Makefile.in (infodir): Ditto.
- * src/Makefile.in (bindir): Ditto.
- * NEWS: Updated.
-
-2005-03-31 Gary V. Vaughan <gary@gnu.org>
-
- Changes needed to automate the release process for 1.4.3:
-
- * Makefile.in (dist): Make .tar.bz2 tarball too.
- * Makefile.maint (TSDEPS_DIST): Remove m4/libtool.m4.
- (cvs-news): Look 1 line further down for NEWS release number.
- (cvs-dist): We don't use automake, so make dist is fine.
- Remove double . before suffixes.
- (cvs-release): Don't mention manual.html.
- (fetch): Get latest gendocs files.
- (web-manual): Rewritten to use gendoc for multiformat manuals.
- * doc/gendocs.sh: Don't save an old version in m4 CVS!
- * doc/m4.texinfo (Index): HFS+ (the file system on my Mac) is case
- preserving, but case insensitive, so generating html docs per node
- clashes between Index.html, the node file, and index.html, the
- top-level of the document tree...
- (Index macro): ...so renamed to this. Changed all references.
-
-2005-03-31 Gary V. Vaughan <gary@gnu.org> (tiny change)
-
- * configure.ac (AC_INIT): Bump to 1.4.3a.
-
-2005-03-31 Gary V. Vaughan <gary@gnu.org> (tiny change)
-
- Release 1.4.3:
- * configure.in (AC_INIT): Bump to 1.4.3.
- * NEWS: Describe 1.4.3's changes.
-
-2005-03-31 Gary V. Vaughan <gary@gnu.org>
-
- * Makefile.maint: New file with release rules, from CVS libtool.
- * Makefile.in (DISTFILES): Add Makefile.maint.
- * INSTALL, install-sh, doc/texinfo.tex: Updated to latest
- canonical versions.
-
-2005-03-31 Eric Blake <ebb9@byu.net> (tiny change)
-
- * doc/m4.texinfo (Patsubst): Re-add trailing space required by
- checks/47.patsubst, with a redundant @comment to prevent emacs
- from removing it accidentally again.
- * checks/get-them: Allow for trailing spaces tucked behind
- @comment marks.
-
-2005-03-31 Eric Blake <ebb9@byu.net> (tiny change)
-
- * doc/Makefile.in (install, uninstall): Accomodate DESTDIR.
- * src/Makefile.in (install, uninstall): Likewise.
-
-2005-02-07 Gary V. Vaughan <gary@gnu.org>
-
- * lib/regex.c, lib/regex.h: Reverted gnulib update, which broke
- on Cygwin.
- Reported by Eric Blake.
-
-2005-02-04 Gary V. Vaughan <gary@gnu.org>
-
- * lib/regex.c, lib/regex.h: Updated from gnulib.
- * src/input.c (set_word_regexp): Don't change the word_regexp
- unless it compiles correctly.
- * NEWS: Updated.
- Reported by Frank Schwidom.
-
- * Makefile.in (stamp-h): Regenerate config.h properly.
-
-2005-02-03 Gary V. Vaughan <gary@gnu.org>
-
- * configure.ac (AC_DEFINE): Fix overquoting of description
- argument.
-
- * src/m4.h (__CYGWIN__, WIN32): Canonicalise Windows and Cygwin
- recognition macros.
- * src/freeze.c (produce_frozen_state): Use \n line-endings even
- on Windows, so that the frozen file reader will work.
- Reported by Josef T. Burger.
-
- * src/m4.c (main): Modernise the --version output.
-
-2005-02-03 Gary V. Vaughan <gary@gnu.org>
-
- Modernise the configury a little to prevent spurious errors from
- Autoconf-2.59's autoreconf:
-
- * config.h.in: Renamed to...
- * config-h.in: ...this to better support DOS 8.3 file systems.
- * acconfig.h: Removed.
- * configure.in: Renamed to...
- * configure.ac: ...this, and AC_DEFINE used to declare config.h
- entry comments. Slight reorganisation and reformatting.
- * aclocal.m4: Use third argument to AC_DEFINE to declare config.h
- entry comments.
- (AC_INIT): Use a modern 3 argument call.
- * Makefile.in, checks/Makefile.in, doc/Makefile.in,
- examples/Makefile.in, lib/Makefile.in, src/Makefile.in:
- s/PRODUCT/PACKAGE/g.
- * Makefile.in (DISTFILES): Removed acconfig.h, configure.in,
- config.h.in. Added configure.ac, config-h.in.
- (stamp-h.in): Removed acconfig.h from dependencies.
- (configure): Depends on configure.ac, not configure.in.
- * doc/Makefile.in (stamp-vti): Ditto.
- * src/freeze.c (produce_frozen_state), src/m4.c (main): Adjust for
- difference between PRODUCT="m4" and PACKAGE="GNU M4".
- * configure: Regenerated.
-
-2005-02-03 Noah Misch <noah@cs.caltech.edu>
-
- * src/output.c (mkstemp): Make non-static, and build regardless of
- HAVE_TMPFILE; src/builtin.c also needs this replacement.
- * NEWS: Update.
-
-2004-09-09 Vincent Lonngren <Vincent.lonngren.759@student.lu.se>
-
- * configure.in (AC_CHECK_HEADERS): Commit works best when you save
- changes from your editor buffer first.
-
- * configure.in (AC_CHECK_HEADERS): Add signal.h, sys/signal.h.
- * src/m4.c: And include them as appropriate.
- * NEWS: Updated.
-
-2004-09-09 Andreas Schwab <schwab@suse.de>
-
- Refactoring of the string read case in next_char provides about a
- 20% speedup of M4 as typically used by autoconf:
-
- * src/input.c (next_char_1): Renamed from next_char.
- (next_char): New macro.
- * NEWS: Updated.
-
-2004-08-21 Gary V. Vaughan <gary@gnu.org>
-
- * configure.in (VERSION): Bump to 1.4.2a.
-
-2004-08-19 Paul Eggert <eggert@twinsun.com>
-
- Release 1.4.2.
- * configure.in (VERSION): Bump to 1.4.2.
- * News: Describe 1.4.2's changes.
-
- * src/m4.c (reference_error): Preserve errno, since M4ERROR
- relies on this.
- * src/builtin.c (m4_esyscmd): Clear errno before calling popen.
- (m4_maketemp): Clear errno before calling mkstemp.
- * src/path.c (path_search): Don't let "free" trash errno when
- returning NULL.
- * src/output.c (insert_file): Don't assume errno has a valid
- value simply because fread returns zero. This fixes a
- portability bug reported by Marion Hakanson in
- <http://lists.gnu.org/archive/html/bug-m4/2004-07/msg00029.html>.
-
-2004-06-09 Gary V. Vaughan <gary@gnu.org>
-
- * configure.in (VERSION): Bump to 1.4.1a.
- * NEWS: Place holder for next stable release.
-
-2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
-
- Release 1.4.1.
- * configure.in (VERSION): Bump to 1.4.1.
- * NEWS: Describe 1.4.1's changes.
-
- * aclocal.m4 (fp_PROG_CC_STDC): Use AC_DEFUN, not define, to
- pacify Autoconf 2.59.
-
- * doc/m4.texinfo: Insert commas after @xref's that lack them,
- to pacify Texinfo 4.7.
- * doc/Makefile.in (info): Remove info-1, info-2, info-3.
-
- * src/m4.h, src/debug.c: Use #ifdef __STDC__, not #if __STDC__, to
- pacify Sun C compilers.
-
-2003-09-28 Akim Demaille <akim@epita.fr>
-
- * src/symtab.c (lookup_symbol): Fix an uninitialized-variable
- botch.
-
-2003-09-03 Santiago Vila <sanvila@debian.org>
-
- * examples/stackovf.sh: Use tempfile if available.
-
-2001-04-02 Robert Bihlmeyer <robbe@orcus.priv.at>
-
- http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92629
- * src/output.c (m4_insert_file): Do not mix buffered and
- unbuffered I/O, as this breaks on the Hurd. (trivial change)
-
-2001-02-01 Santiago Vila <sanvila@debian.org>
-
- http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84451
- * src/m4.c (main): Fix format vulnerabilities. (trivial change)
-
-2001-02-01 Matt Kraai <kraai@debian.org>
-
- http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84416
- * doc/m4.texinfo (Maketemp): Change maketemp to refer to a new,
- empty file rather than to a nonexistent file. This closes a common
- security hole.
- * src/builtin.c (m4_maketemp): Implement the above, by using
- mkstemp rather than mktemp. (trivial change)
-
-2000-01-09 Akim Demaille <demaille@inf.enst.fr>
-
- * src/builtin.c (expand_ranges): Added break after trailing dash.
- This caused misbehaviors on some systems.
-
-Sat Nov 5 15:52:47 1994 Francois Pinard (pinard@icule)
-
- Release 1.4.
- * doc/Makefile.in (realclean): Also remove stamp-vti.
- Reported by Eric Backus.
-
-Wed Nov 2 00:47:53 1994 Francois Pinard (pinard@icule)
-
- * src/freeze.c (produce_frozen_state): If the frozen file cannot
- be opened, return immediately after producing the error message.
- Reported by Andreas Schwab.
-
- * configure.in: Check for const only after having found possible
- ANSIfying compiler flags, this is of no use to check it before.
- Reported by Alexander Lehmann.
-
-Tue Nov 1 22:02:37 1994 Francois Pinard (pinard@icule)
-
- * src/macro.c (collect_arguments): Cast obstack arguments to
- (voidstar), so avoiding compiler warnings.
- Reported by Joseph E. Sacco.
-
- * src/freeze.c (produce_frozen_state): Cast printed lengths to
- (int) so they correspond to %d format items.
- Reported by Joseph E. Sacco.
-
- * src/m4.c (main): Cast the argument to xfree to (voidstar).
- * src/symtab.c (free_symbol): Idem.
- Reported by Karl Vogel.
-
-Mon Oct 31 02:11:19 1994 Francois Pinard (pinard@icule)
-
- * Makefile.in (DISTFILES): Distribute BACKLOG.
-
- * configure.in: Define PRODUCT and VERSION.
- * acconfig.h: Document PRODUCT and VERSION.
- * src/m4.c, src/freeze.c: Use PRODUCT and VERSION instead of the
- constant string m4 and variable or parameter named version.
-
-Sun Oct 30 08:13:03 1994 Francois Pinard (pinard@icule)
-
- * src/m4.h, src/debug.c: Replace all #ifdef __STDC__ by #if
- __STDC__. Alliant FX/2800 Concentrix 2.2 (i860-BSD4.3) compiler
- defines __STDC__ to 0, for indicating it is *not* ANSI!
- Reported by Kaveh R. Ghazi.
-
- * configure.in: Added obsolescent tests for AIX and Minix.
-
- * doc/Makefile.in (mostlyclean): Remove texclean in dependencies,
- which texclean does not exist anymore.
- Reported by Eric Backus, Jim Meyering, John David Anglin and
- Joseph E. Sacco.
-
-Sat Oct 29 05:10:03 1994 Francois Pinard (pinard@icule)
-
- * aclocal.m4 (fp_C_PROTOTYPES): Force -D_HPUX_SOURCE with -Aa.
- Reported by John David Anglin.
-
- * src/ansi2knr.c: New version, sent by Peter Deutsch.
- * aclocal.m4 (fp_C_PROTOTYPES): Substitute empty or ansi2knr for
- ANSI2KNR, depending on the fact the compiler is ANSI or not.
- * src/Makefile.in: Use -Ovarargs=convert on ansi2knr calls.
- Remove the sed filter after ansi2knr for debug.c. Use $O instead
- of $U, put underline in extensions rather than in basenames. Use
- implicit rules, now that regularity makes this possible.
- Have $(OBJECTS) depend on $(ANSI2KNR), so to trigger compilation
- of ansi2knr whenever it is needed.
- * configure.in: Adjusted for correct STACKOVF substitution.
- * src/debug.c (trace_format): When not __STDC__, use (...) as a
- parameter list, so ansi2knr will convert it to (va_alist) va_dcl.
- Reported by David MacKenzie.
-
- * Makefile.in: Remove binprefix. Use transform_name instead.
- Reported by David MacKenzie.
-
- * doc/Makefile.in: Create version.texi, use it, clean it.
- Reported by Jim Meyering.
-
-Fri Oct 28 20:33:55 1994 Francois Pinard (pinard@icule)
-
- * Makefile.in (all, install, uninstall): Depend on Makefile.
-
- * Makefile.in: For actions invoking $(MAKE) from within compound
- sh statements, exit non-zero if the sub-make fails. Otherwise,
- the top-level make may exit successfully when it should fail.
- Reported by Jim Kingdon.
-
- * {,/*}Makefile.in: Use && after all cd, in case they fail.
-
- * {,*/}Makefile.in: Declare PRODUCT and VERSION macros.
- (dist): Use PRODUCT and VERSION instead of tricks on .fname.
- * configure.in: Substitute PRODUCT and VERSION.
-
- * {,*/}Makefile.in (dist): Always try a hard link before a copy.
-
-Thu Oct 27 22:32:58 1994 Francois Pinard (pinard@icule)
-
- * Makefile.in (mostlyclean-local): Do not remove *~.
- * */Makefile.in (mostlyclean): Idem.
- Reported by Robert E. Brown and Richard Stallman.
-
-Sun Oct 9 08:30:13 1994 Francois Pinard (pinard@icule)
-
- * src/m4.h: Get rid of CONFIG_BROKETS.
-
-Sun Oct 2 16:48:10 1994 Francois Pinard (pinard@icule)
-
- * configure.in: Use AC_ARG_PROGRAM.
- * aclocal.m4 (fp_C_PROTOTYPES): Substitute @kr@ by kr or empty.
- Reported by David MacKenzie.
-
-Sat Oct 1 11:22:42 1994 Francois Pinard (pinard@icule)
-
- * configure.in: Do not add -O to CFLAGS for GNU C, now that
- configure does it automatically.
- Reported by Jim Meyering.
-
-Fri Sep 23 08:16:58 1994 Francois Pinard (pinard@icule)
-
- * src/stackovf.c: Declare the handler_t typedef earlier in the
- code, use it for stackovf_handler.
- (setup_stackovf_trap): Use RETSIGTYPE instead of void while
- casting sigsegv_handler.
- Reported by Robert Bernstein.
-
- * src/m4.c (main): Initialize program_name to argv[0] without
- basename'ing it.
- Reported by Karl Berry.
-
-Sun Sep 18 11:42:50 1994 Francois Pinard (pinard@icule)
-
- * src/Makefile.in (TAGS): Include a ../lib/TAGS reference.
- Reported by Karl Berry.
-
-Wed Sep 14 10:00:22 1994 Francois Pinard (pinard@icule)
-
- * lib/Makefile.in (mostlyclean): Added.
- (TAGS): Make in $(srcdir).
-
- * configure.in: Use `choke me' in test, like everywhere!
-
- * {doc,examples,lib,src}/Makefile.in (check): Deleted, as
- unreacheable and useless.
-
- * doc/Makefile.in (texclean): Deleted, merged in mostlyclean.
-
- * lib/Makefile.in (DISTFILES): Distribute TAGS.
- (distclean): Do not remove TAGS.
- (realclean): Remove it.
- * Makefile.in: Make TAGS in lib also, not just in src.
- Reported by Karl Berry.
-
- * Makefile.in (distclean, realclean): Instead of recursively
- calling $(MAKE) for the -local part, allow parallel execution of
- -recursive and -local, only delay the removal of config.status,
- which is repeated in both goals.
-\f
-Tue Sep 13 19:21:05 1994 Francois Pinard (pinard@icule)
-
- Release 1.3.
- * Makefile.in: Group all *clean-recursive goals in one, using sed
- to remove `-recursive' while calling make recursively. Also, use
- a subshell for each recursive $(MAKE).
- Reported by Jim Meyering.
-
- * src/m4.h (memcpy): Define with bcopy for BSD systems.
- Reported by Kaveh R. Ghazi.
-
- * src/Makefile.in (ansi2knr): Use $(LIBS) while linking, for SunOS
- 4.1.3 requires -ldl to link even ansik2nr, and we need a way to
- specify it.
-
- * configure.in: Use date instead of touch for stamp-h.
- * Makefile.in (stamp-h.in): Idem.
-
- * Makefile.in (distclean, realclean): Force serial execution of
- both goals, in case parallel makes are being used.
- Reported by Jim Meyering.
-
- * src/Makefile.in (DISTFILES): Distribute TAGS.
- (distclean): Do not remove TAGS.
- (realclean): Remove it.
- Reported by Karl Berry.
-
-Sat Sep 10 12:34:04 1994 Francois Pinard (pinard@icule)
-
- * configure.in: Use fp_ to match aclocal.m4. Revert _OS_ macros
- to old names, for following Autoconf.
-
-Thu Sep 8 15:07:27 1994 Francois Pinard (pinard@icule)
-
- * Makefile.in (MDEFINES): Remove INSTALL substitutions, for
- ./install.sh will not be correctly referred to in sub-Makefiles.
- Reported by John David Anglin.
-
- * doc/Makefile.in (texclean): Remove *.cps and *.fns too.
- Reported by Eric Backus.
-
- * Makefile.in, checks/Makefile.in, doc/Makefile.in,
- examples/Makefile.in, lib/Makefile.in, src/Makefile.in: Limit
- config.status into remaking this directory's Makefile only.
- * Makefile.in (stamp-h): Do not check nor touch stamp-h.
- * configure.in (AC_OUTPUT): Touch stamp-h if CONFIG_HEADERS.
- Reported by Jim Meyering.
-
-Tue Sep 6 12:07:33 1994 Francois Pinard (pinard@icule)
-
- * configure.in: Correct stack overflow detection logic, taking
- care of systems having only incomplete implementations (like for
- Pyramid 9820 OSx 5.0d).
- Reported by Kaveh R. Ghazi.
-
- * src/Makefile.in (TAGS): Remote -t from etags call.
-
-Fri Sep 2 10:37:10 1994 Francois Pinard (pinard@icule)
-
- * lib/Makefile.in (install): Depend on all.
-
-Wed Aug 31 11:17:21 1994 Francois Pinard (pinard@icule)
-
- * examples/Makefile.in (mostlyclean): Do not depend on texclean.
- Reported by Jim Meyering and John David Anglin.
-
- * Makefile.in (distclean-local): Delete config.log.
- Reported by Jim Meyering.
-
- Solidify frozen files with respect to -P:
- * src/m4.c: Have -P set prefix_all_buitins variable instead of
- calling a function by that name. Declare the variable.
- * src/m4.h: Adjust declaration for prefix_all_buitins.
- * src/builtin.c (builtin_init): Merge in functionality from
- previous prefix_all_buitins function, while making entries in the
- symbol table, but not modifying the builtin description itself.
-
- * src/freeze.c (reload_frozen_state): Add a useless `break;',
- because *many* compilers do not accept an empty `default:'.
- Reported by Akiko Matsushita, Eric Backus, John David Anglin,
- Joseph E. Sacco, Kaveh R. Ghazi, Tom McConnell and Ulrich Drepper.
-
- * configure.in: Use AC_TYPE_SIGNAL.
- * src/stackovf.c (setup_stackovf_trap): Use RETSIGTYPE.
- Reported by Robert Bernstein.
-
- * checks/Makefile.in (check): Modify PATH so check-them will find
- m4 in the src directory.
- * Makefile.in (check): Don't.
- Reported by Akiko Matsushita and Jim Meyering.
-
- * src/output.c (make_room_for, output_character_helper): New
- functions, for implementing a global MAXIMUM_TOTAL_SIZE instead of
- a per buffer MAXIMUM_BUFFER_SIZE.
-
- * src/output.c (output_text): New function, for optimizing the
- output of strings of characters. Use it.
-
-Tue Aug 30 01:44:29 1994 Francois Pinard (pinard@icule)
-
- * doc, src: New directories reorganizing the distribution.
- * doc/Makefile.in, src/Makefile.in, examples/Makefile.in: New
- files.
- * Makefile.in: Adjusted.
- * configure.in: Configure new Makefiles.
-
- * m4.h: Declare STRING typedef. Use it for comment and quote
- strings, adjusting all references. (This is the rudiments of a
- beginning for the eventual withdrawal of NUL terminated strings.)
- * output.c (shipout_text): Accept a length parameter, and use it.
- All callers adjusted.
-
-Mon Aug 29 12:27:19 1994 Francois Pinard (pinard@icule)
-
- * m4.h: Include <unistd.h> if it exists.
- * stackovf.c: Don't.
-
- Clean up for current_diversion variable:
- * output.c: Move current_diversion from builtin.c.
- * m4.h: Declare current_diversion so builtin.c can access it.
- * output.c (output_init, make_diversion): Initialize or update
- current_diversion.
- * builtin.c (builtin_init, m4_divert): Leave current_diversion
- alone.
-
- Remove limit on number of diversions:
- * output.c: Replace ndiversion by diversions, declare it.
- (output_init): Allocate only diversion 0.
- (make_diversion): Allocate new diversions as needed.
- * m4.h, m4.c: Remove NDIVERSIONS and ndiversion related stuff.
- * m4.c: Still accept -N, but do nothing with it.
- Reported by David MacKenzie.
-
- Freeze diversions:
- * output.c (freeze_diversions): New function.
- * m4.h: Declare freeze_diversions.
- * freeze.c: Document frozen file format, revise it, call
- freeze_diversions to add diversions to frozen format, and code to
- reload them properly.
- * m4.c: Do not undivert automatically at end when status being
- frozen. Do not call builtin_init when reloading frozen state.
-
- Speed up diversion processing:
- * output.c: Add INITIAL_BUFFER_SIZE, MAXIMUM_BUFFER_SIZE,
- COPY_BUFFER_SIZE, in-memory diversion buffers, struct diversion
- structure and variables, cached variables out of output_diversion,
- reallocate_diversion_for and OUTPUT_CHARACTER.
- (shipout_text, make_diversion, insert_diversion): Adapted to new
- structures.
- (insert_file): Use better buffering.
- Reported by David MacKenzie.
-
-Sun Aug 28 05:20:02 1994 Francois Pinard (pinard@icule)
-
- * Makefile.in, lib/Makefile.in, checks/Makefile.in: Arrange so
- dist works from another build directory.
-
-Sat Aug 27 14:32:45 1994 Francois Pinard (pinard@icule)
-
- * symtab.c (hack_all_symbols): Use hash_table_size instead of
- constant HASHMAX, for -H option to work better.
-
- * builtin.c (DECLARE): Simplify by using _ ().
-
- * freeze.c: New file.
- * Makefile.in: Compile it, distribute it.
- * m4.c: Recognize, document and process --freeze-state (-F) and
- --reload-state (-R) options. Pass a true flag to builtin_init
- only if no reloading some state.
- * builtin.c (define_builtin): Remove static specifier.
- (find_builtin_by_name): Remove static specifier.
- (builtin_init): Accept and obey a flag argument.
- * m4.h: Add declarations for freeze.c, changes for builtin.c.
-
-Wed Aug 24 16:14:19 1994 Francois Pinard (pinard@icule)
-
- * builtin.c (dumpdef_cmp): Rewrite so the cast protect the const
- specifier.
-
- * configure.in: Implement --with-dmalloc.
- * acconfig.h: Document WITH_DMALLOC.
- * m4.h: Add code for when WITH_DMALLOC.
-
-Mon Aug 15 12:38:05 1994 Francois Pinard (pinard@icule)
-
- * m4.c (long_options): Use "error-output", the dash was missing.
- Reported by Akiko Matsushita.
-
-Fri Aug 12 16:38:01 1994 Francois Pinard (pinard@icule)
-
- * m4.h: Include <sys/types.h>.
- * builtin.c, debug.c, m4.c, output.c, stackovf.c: Don't.
- * m4.h: Declare len_lquote and len_rquote as size_t, not int.
- int.
- * input.c: Declare len_lquote, len_rquote, len_bcomm and len_ecomm
- as size_t, not int.
- * builtin.c (dump_args): Declare len as size_t, not int.
-
- * debug.c: Prototype the forward declaration of debug_set_file.
-
- * builtin.c (m4_undivert): Replace div by file, for avoiding the
- shadowing of this variable.
- * output.c (insert_diversion): Idem.
-
- * input.c: Delete def_rquote, def_lquote, def_bcomm and def_ecomm.
- (input_init): Duplicate default quote and comment strings.
- (set_quotes): Free previous quote strings in all cases. Duplicate
- even default quote strings.
- (set_comment): Free previous comment strings in all cases.
- Duplicate even default comment strings.
-
- * configure.in: Updated for Autoconf 2.0.
- * Makefile.in (distclean-local): Also delete config.cache.
-
- * m4.c (usage): Reorganize the --help output by topic. Include a
- description for debugging flags.
-
-Fri Jul 29 10:15:52 1994 Francois Pinard (pinard@icule)
-
- * configure.in: If sigaction is available and SA_ONSTACK defined,
- use sigaction. Otherwise, if sigvec is available and SV_ONSTACK
- defined, use sigvec. Else don't compile stackovf.c.
- * stackovf.c (setup_stackovf_trap): Idem.
- Reported by Jim Avera, Karl Berry, Kaveh R. Ghazi, Matthias Rabe
- and Simon Leinen.
-
-Thu Jul 21 22:43:17 1994 Francois Pinard (pinard@icule)
-
- * m4.c (usage): Replace printf par fputs.
-\f
-Mon Jul 18 23:48:23 1994 Francois Pinard (pinard@icule)
-
- * Release 1.2
-
-Sun Jul 17 08:08:25 1994 Francois Pinard (pinard@icule)
-
- * configure.in: Check for sigaction and sigvec. Add a new delayed
- check for RLIMIT_STACK, combine in the checking for getrlimit.
- All those things are not universally available.
- * stackovf.c: Split setting up the trap handler and catching
- signals, for better taking care of various configure outcomes.
- * examples/stackovf.sh: Correct a typo.
- Reported by Eric Backus, Jim Avera and Jim Meyering.
-
-Sat Jul 16 20:36:19 1994 Francois Pinard (pinard@icule)
-
- * ansi2knr.c: New version sent by its author, Peter Deutsch.
-
-Fri Jul 15 14:36:21 1994 Francois Pinard (pinard@icule)
-
- * Makefile.in: Modify so parallel make will not try making
- lib/libm4.a twice simultaneously.
- Reported by Jim Meyering.
-
-Thu Jul 14 17:23:17 1994 Francois Pinard (pinard@icule)
-
- * stackovf.c (setup_stackovf_trap): Replace "Don't" by "Do not" in
- error message, for when no code possibility exists. Even if this
- line is completely #ifdef'ed out, it brings a syntax error.
- Reported by Andreas Schwab, Jim Meyering and Joseph E. Sacco.
-
- * Makefile.in (install): Have install depend on all too, for lib
- to be remade as needed.
-
- * examples/stackovf.sh: Try ksh, bsh and bash for shells
- providing ulimit, instead of using only ksh.
- Reported by Jim Avera and Joseph E. Sacco.
-
-Tue Jul 12 06:54:31 1994 Francois Pinard (pinard@icule)
-
- * Makefile.in (check): Have it depend on all instead of m4. In
- this way, a change in lib will be detected and processed.
-
- * builtin.c (numeric_arg): Use strtol and verify the conversion,
- instead of using sscanf which stops as soon as there is a
- non-digit in the input. Previously, incr(1xyzzy), eval(1,2xyzzy)
- and divert(1xyzzy) were all accepted without any warning or error
- messages.
- * m4.h: Declare strtol as long if not including stdlib.h.
- * configure.in: Check for limits.h, and replace strtol if missing.
- * lib/Makefile.in: Substitute LIBOBJS. Distribute strtol.c.
- * lib/strtol.c: New file, from elsewhere.
- Reported by Andreas Schwab.
-
-Thu Jul 7 22:38:10 1994 Francois Pinard (pinard@icule)
-
- * macro.c (expand_macro): Cast value to (boolean) prior to
- assigning it to traced.
- Reported by Tom McConnell.
-
- * Makefile.in (m4): Always make all in lib first.
- Reported by Jim Meyering.
-
-Wed Jul 6 13:16:31 1994 Jim Avera (jima@netcom.com)
-
- * stackovf.c: Isolated OS-dependent sections; Improved portability,
- adding support for SunOS/BSD (sigvec, sigstack, and 4-parameter signal
- handlers), and a default error message if the fault address is not
- available (when neither siginfo.h nor BSD sigcontext are supported).
- * configure.in: Changes for stackovf.h: Check for sigcontext,
- sigaction, sigstack, and define rlim_t as int if necessary.
- * acconfig.h: Added HAVE_SIGCONTEXT and rlim_t.
- * examples/stackovf.sh: Run m4 -L99999999 to allow stack overflow.
- * ansi2knr.c: Fix for func-ptr args; convert "..." to varargs syntax.
-
-Tue Jul 5 19:13:54 1994 Francois Pinard (pinard@icule)
-
- * configure.in: Use AC_SET_MAKE.
- * Makefile.in: Use @SET_MAKE@.
- Reported by Jim Meyering.
-
- * checks/check-them: Do not trap on SIGQUIT or SIGALRM.
- Reported by Ian Taylor.
-
-Sat Jul 2 00:58:47 1994 Francois Pinard (pinard@icule)
-
- * configure.in: Remove dependency of USE_STACKOVF on STDC_HEADERS,
- because siginfo.h is unrelated to standard headers, and siginfo.h
- is already checked for.
- Reported by Joseph E. Sacco.
-
- * acconfig.h, aclocal.m4, m4.h: Replace HAVE_PROTOTYPES by
- PROTOTYPES.
- * aclocal.m4, configure.in: Replace AC_HAVE_PROTOTYPES by
- AC_PROTOTYPES.
-
-Wed Jun 29 22:41:53 1994 Francois Pinard (pinard@icule)
-
- * builtin.c (substitute): Use \& to represent this part of the
- string which was matched by the whole regexp, instead of
- representing the whole string. Any usage of \0 issues a warning
- and acts like \&, it will disappear in some subsequent release.
-
-Mon Jun 27 14:24:23 1994 Francois Pinard (pinard@icule)
-
- * m4.c: Complete prototype for forwarded declaration of usage.
-
- * input.c (init_macro_token): Correct own reference in error
- message. Previous name get_macro_func was referred to instead.
- (next_char): Correct own reference in error message. Previous
- name advance_input was referred to instead.
-
- * m4.h: Declare eval_t and unsigned_eval_t typedefs to 32 bits.
- * eval.c (logical_or_term, logical_and_term, or_term, xor_term,
- and_term, not_term, logical_not_term, cmp_term, shift_term,
- add_term, mult_term, exp_term, unary_term, simple_term): Add
- prototype to forwarded declarations. Declare parameter v1 as
- eval_t * instead of int *. Same for local variable v2 in dyadic
- functions. Same for result in exp_term.
- * builtin.c (m4_eval): Declare value as eval_t instead of int.
- (ntoa): Declare value as eval_t instead of int. Declare uvalue as
- unsigned_eval_t instead of unsigned int. Change casts accordingly.
- (shipout_int): Cast first argument of ntoa to eval_t.
- Reported by Thorsten Ohl.
-
- * macro.c: Complete the prototypes of forwarded expand_macro and
- expand_token.
- Reported by Thorsten Ohl.
-
- * m4.h: Define voidstar as void * or char * depending on __STDC__.
- The Ultrix 3.1 compiler cannot do much with void pointers.
-
- * builtin.c (dumpdef_cmp): Replace void * by voidstar.
- * m4.c (xfree): Replace void * by voidstar.
- Reported by Tom McConnell.
-
- * ansi2knr.1: New, from elsewhere.
- * Makefile.in (DISTFILES): Distribute ansi2knr.1
-
- * Makefile.in (stamp-h.in): Avoid running ./config.status if
- stamp-h does not exist yet. This avoids running it a second time
- just after the initial ./configure.
- Reported by David MacKenzie and Tom McConnell.
-
- * m4.h: Replace the enum debug_info declaration with a series of
- #define's. The Ultrix 3.1 compiler would otherwise need casting
- (int) to most references, when used in expressions.
- Reported by Tom McConnell.
-
-Sat Jun 25 00:10:05 1994 Francois Pinard (pinard@icule)
-
- * aclocal.m4: Replace FP_PROTOTYPES by AC_HAVE_PROTOTYPES,
- following an idea from Brook G. Milligan. AC_HAVE_PROTOTYPES
- calls the compiler. Previously, FP_PROTOTYPES was only calling
- the preprocessor; by not being subject to CFLAGS, this was
- discouraging those flags asking for ANSI compilation.
- * acconfig.h: Document HAVE_PROTOTYPES.
- * configure.in: Use AC_HAVE_PROTOTYPES instead of FP_PROTOTYPES.
- * m4.h: Define _() according to HAVE_PROTOTYPES, not __STDC__.
- Reported by Eric Backus.
-
- * configure.in: Substitute CFLAGS and LDFLAGS, taking their value
- from the environment. Default CFLAGS to -g if not set.
- * Makefile.in: Have CFLAGS and LDFLAGS substituted from configure.
- * lib/Makefile.in: Have CFLAGS substituted from configure.
- Reported by Eric Backus and Tom McConnell.
-
- * configure.in: m4_undefine changeword before using AC_ENABLE.
-
- * m4.h: Declare prototypes for error (for ANSI compilers only),
- prefix_all_builtins and reference_error.
- Reported by Tom McConnell.
-
- * input.c (set_word_regexp): Do not try to initialize the array
- test from a string, this does not work with non-ANSI compilers.
- Reported by Eric Backus.
-
- * Makefile.in (dist): Clean examples/ before saving it.
- (distclean-local): Also remove stamp-h.
- Reported by Eric Backus.
-
- * Makefile.in (_stackovf.c): Goal for compiling stacokovf.c with
- non ANSI compilers.
- Reported by Tom McConnell.
-
- * checks/Makefile.in (clean): Depends on mostlyclean.
- (mostlyclean): New goal.
-
-Fri Jun 24 23:30:31 1994 Francois Pinard (pinard@icule)
-
- * Makefile.in (DISTFILES): Distribute install.sh.
- * install.sh: New file, copied from elsewhere.
- Reported by Assar Westerlund and Kaveh R. Ghazi.
-
-Thu Jun 23 00:00:30 1994 Francois Pinard (pinard@icule)
-
- * configure.in: Define ENABLE_CHANGEWORD if --enable-changeword.
- * acconfig.h: Explain ENABLE_CHANGEWORD.
-
- [These modifs all depend upon ENABLE_CHANGEWORD and are adapted
- from code provided by Pete Chown]
- * m4.h: Add original_text field to u_t variant of union u.
- Declare TOKEN_DATA_FUNC macro.
- * builtin.c: Declare changeword.
- (m4_changeword): New function.
- * input.c: Include "regex.h", define variables with word regexps.
- (input_init): Initialize the word regexp.
- (set_word_regexp): New.
- (next_token): Declare local variables, use the previous code if
- default_word_regexp is true. Else, match using a new code. Save
- the original text.
- * macro.c (expand_token): Ship out original text if not a macro
- name.
- Reported by Krste Asanovic and Pete Chown.
-
- [These modifs all depend upon ENABLE_CHANGEWORD]
- * m4.h: Declare external user_word_regexp.
- * m4.c: Declare user_word_regexp, and initialize it from
- --word-regexp or -W, or NULL if not specified.
- * input.c: Use user_word_regexp if specified, instead of
- DEFAULT_WORD_REGEXP.
-
- * Makefile.in (m4): Revert Jan 3 1994 change. I'm unable to
- agree with it.
-
- * Makefile.in, lib/Makefile.in: Limit suffixes to .c and .o.
- * checks/Makefile.in: Empty the suffix list.
- Reported by Geoff Russell, Joel Sherrill and Roland McGrath.
-
- * m4.c: Declare nesting_limit and initialize it to 250.
- Implement -LNUMBER or --nesting-limit=NUMBER to change its
- value.
- * m4.h: Declare nesting_limit as external.
- * macro.c (expand_macro): Stop execution whenever nesting limit
- is exceeded.
- Reported by Bengt Mertensson.
-
- * eval.c (evaluate): Diagnose excess characters in eval input.
- Things like `eval(08)' used to return 0 with no diagnostic.
-
- * m4.h: Capitalize first letter of all macro arguments in
- definitions.
-
- * m4.c: Declare warning_status, initialize it to 0. Add new
- option -E, or --fatal-warnings, which sets warning_status to
- EXIT_FAILURE instead.
- * m4.h: Declare external warning_status. Define EXIT_SUCCESS and
- EXIT_FAILURE if not otherwise done by header files.
- * m4.c: Delete declarations for EXIT_SUCCESS and EXIT_FAILURE.
- * m4.c, input.c, output.c, symtab.c, builtin.c, macro.c, debug.c,
- eval.c: Replace 0 by warning_status and 1 by EXIT_FAILURE in first
- argument of all M4ERROR calls.
- Reported by Noah Friedman.
-
- * examples/incl-test.m4: Renamed from incl_test.m4.
- * examples/include.m4: Include incl-test.m4 instead of
- incl_test.m4.
- * examples/multiquotes.m4: Renamed from multi-quotes.m.
-
-Wed Jun 22 21:58:54 1994 Francois Pinard (pinard@icule)
-
- * configure.in: Avoid USE_STACKOVF if <siginfo.h> not found. Note
- that Jim developped stackovf.c on a 486 running SVR4.0 (ESIX), and
- also tested it on a Sun Sparc workstation running SunOS 4.x.
-
- * format.c (format): When not HAVE_EFGCVT, m4 was failing the
- 49.format check, abusing a `union values' argument with sprintf
- without selecting the proper field. Now, save the formatting type
- first, delaying the fetch of the corresponding argument.
- Reported by Joseph E. Sacco and Tom Quinn.
-
- * format.c (format): Remove const from char *fmt declaration when
- not HAVE_EFGCVT, because a NUL may be forced into it.
-
- * m4.h: Declare atof() when not STDC_HEADERS.
- Reported by Joseph E. Sacco.
-
- * Regenerate configure using Autoconf 1.11, this corrects a
- problem about an incorrect cpp seting on NeXT 3.1.
- Reported by Alexander Lehmann.
-
-Sun Jun 5 16:25:19 1994 Francois Pinard (pinard@icule)
-
- * m4.h (_): Change argument from `x' to `Args'.
-
-Wed May 4 23:59:39 1994 Francois Pinard (pinard@icule)
-
- * Makefile.in: Remove all occurrences of $(MFLAGS), which were
- bringing more evil than good on a few systems.
- Reported by Greg A. Woods.
-
-Fri Apr 22 15:59:35 1994 Francois Pinard (pinard@icule)
-
- * m4.h: Rename Args() to _().
- * m4.h: Remove extern specifier from all function declarations.
-
-Fri Apr 22 15:51:21 1994 Jim Avera (jima@netcom.com)
-
- * stackovf.c: New file implementing stack-overflow detection.
- * configure.in: Check for getrlimit, sigaction. If all of
- standard headers, getrlimit and sigaction, define USE_STACKOVF and
- substitute ${U}stackovf.o for STACKOVF.
- * acconfig.h: Declare USE_STACKOVF.
- * Makefile.in: Distribute stackovf.c, link with $(STACKOVF).
- * m4.h: Declare setup_stackovf_trap().
- * m4.c: Call setup_stackovf_trap().
- * tests/stackovf_test.sh: New file.
-
-Wed Apr 13 14:10:30 1994 Francois Pinard (pinard@icule)
-
- * checks/Makefile.in: Rename .all-stamp to stamp-checks.
-
- * Makefile.in (Makefile, etc.): Adapt for Autoconf 1.8.
-
-Sun Jan 30 14:24:19 1994 (pinard at icule)
-
- * m4.h: Remove definition of volatile, not used anymore.
- Reported by Jim Meyering and Joseph E. Sacco.
-
- * m4.h: Consistently use `do { ... } while (0)' in macros, instead
- of `if ... else /* nothing */' for if macros.
- Reported by Jim Meyering.
-
- * builtin.c (m4_regexp): Reorganize the code for avoiding a
- warning from gcc about `repl' possibly used before defined.
- Reported by Jim Meyering.
-
- * m4.h: Avoid a pre-ANSI <memory.h> together with <string.h>.
- Reported by Jim Meyering.
-
-Tue Jan 25 18:39:37 1994 Francois Pinard (pinard at icule)
-
- * m4.h: Move the conditional definition of volatile after the
- inclusion of system files, because they may define it first.
-
-Tue Jan 4 19:46:50 1994 Francois Pinard (pinard@icule)
-
- * checks/Makefile.in (CHECKS): Add a useless `*' before `[', to
- get around a problem with Alpha make seeing a syntax error, there.
- Reported by Vern Paxson.
-
-Mon Jan 3 00:21:45 1994 Francois Pinard (pinard@icule)
-
- * Makefile.in: Do not define LDFLAGS, use CFLAGS on link calls.
- Reported by Richard Stallman.
-
-Sat Dec 25 08:06:05 1993 Francois Pinard (pinard@icule)
-
- * configure.in: Correct test for strerror, AC_FUNC_CHECK was used
- instead of AC_HAVE_FUNCS.
- Reported by Noah Friedman.
-
-Wed Dec 1 09:37:53 1993 Francois Pinard (pinard@icule)
-
- * m4.c: Initialize show_help and show_version to zero.
-
- * m4.c: Ensure EXIT_SUCCESS and EXIT_FAILURE are defined.
- Use them in exit() and usage() calls.
-
-Sat Nov 27 10:43:24 1993 Francois Pinard (pinard@icule)
-
- * m4.h: Delete extern sys_nerr, sys_errlist declarations, and
- syserr() macro. Delete errref, add reference_error and M4ERROR.
- * m4.c: Replace errref, which was returning an input reference
- string, with reference_error, which prints it on standard error.
- * builtin.c, output.c: Use errno as second parameter to error,
- instead of using syserr() with %s.
- * *.c: Use M4ERROR instead of error: no more errref() with %s.
- Doing so, the program name appears after the input reference
- instead of before, which eases M-x next-error processing.
-
-Wed Nov 24 22:16:15 1993 Francois Pinard (pinard@icule)
-
- * checks/get-them: Escape braces with backslashes in patterns,
- because HPUX-9.01 awk needs this.
- Reported by Jim Meyering.
-
-Mon Nov 22 10:55:52 1993 Francois Pinard (pinard@icule)
-
- * builtin.c: Declare "FILE *popen ();".
-
- * m4.h: Remove MESSAGE{,1,2}, WARNING1, FATAL{,1}, INTERNAL_ERROR
- macros, replace error_message_prefix() declaration by errref()'s.
- Declare xrealloc, for use in errref().
- * m4.c: Delete error_message_prefix() function, add errref().
- * *.c: Use error() systematically in place of all error macros,
- now that error() flushes stdout first. Make needed adjustments.
-
- * m4.h: Remove const in sys_errlist[] declaration, it creates
- conflicts on SGI and Alpha.
- Reported by Kaveh R. Ghazi.
-
-Sat Nov 20 08:26:15 1993 Francois Pinard (pinard@icule)
-
- * m4.c: Include <getopt.h> instead of "getopt.h".
-
- * configure.in: Output to config.h. Use HAVE_FUNCS preferably.
- * acconfig.h: New, for documenting HAVE_EFGCVT.
- * Makefile.in: Distribute acconfig.h, .stamp-h.in and config.h.in,
- use them wherever appropriate. Also use -I. for compilations.
- * lib/Makefile.in: Use -I.. for compilations.
- * *.c: Include <config.h> or "config.h".
-
- * m4.h: Test for HAVE_MEMORY_H instead of NEED_MEMORY_H.
- * configure.in: Use AC_HAVE_HEADERS(memory.h), delete AC_MEMORY_H.
-
-Wed Nov 17 09:34:55 1993 Francois Pinard (pinard@icule)
-
- * builtin.c (m4_eval): Cast strlen to (int) before comparing.
-
- * input.c (input_init): Initialize quote and comment strings
- explicitely instead of calling set_quotes and set_comment: by
- doing so, we ensure we do not free uninitialized variables.
-
- * checks/check-them: Reverse arguments to both diff, so the
- expected is on the left and the obtained on the right.
-
- * m4.h: Add MESSAGE{,1,2}, WARNING1, FATAL{,1} and INTERNAL_ERROR
- macros. Delete declarations for m4error, warning, fatal and
- internal_error, add declaration for error_message_prefix.
- * m4.c: Delete m4error, warning, fatal and internal_error
- routines, add error_message_prefix routine.
- * *.c: Replace m4error routine calls with MESSAGE* macro calls,
- warning with WARNING*, fatal with FATAL* and internal_error with
- INTERNAL_ERROR*.
- * Makefile.in (_m4.c): Do not adjust ansi2knr output for va_alist,
- this is not needed anymore.
-
- * m4.h: Declare extern FILE *debug. Add DEBUG_PRINT{1,3} and
- DEBUG_MESSAGE{,1,2} macros. Delete declarations for debug_print
- and debug_message, add declaration for debug_message_prefix.
- * debug.c: Remove static specifier for FILE *debug declaration.
- Delete debug_print and debug_message routines, add
- debug_message_prefix routine.
- * builtin.c, debug.c: Replace debug_print routine calls with
- DEBUG_PRINT* macro calls.
- * input.c, path.c: Replace debug_message routine calls with
- DEBUG_MESSAGE* macro calls.
-
- * m4.h: Remove inclusion of <varargs.h>.
- * debug.c: Include <stdarg.h> or <varargs.h>.
- (trace_format): Use stdarg instead of varargs if __STDC__.
-
- * configure.in: Remove checks for vfprintf and _doprnt. These
- implementations use varargs tricks which are not portable enough.
- * lib/vfprintf.c: Deleted.
- * lib/_doprnt.c: Deleted.
- * lib/Makefile.in: Adjusted accordingly. Remove LIBOBJS.
- Reported by Joel Sherrill.
-
- * path.c (add_include_directory): Use xstrdup.
-
- * builtin.c (find_builtin_by_name): Declare static.
-
- * *.[ch]: Add const to a few "char *" declarations.
-
- * configure.in: Remove commented tests for fileno() and fstat().
- * debug.c: Remove comments about HAVE_FILENO and HAVE_FSTAT.
-
- * debug.c (debug_flush_files): New.
- * m4.h: Declares it.
- * builtin.c (m4_syscmd, m4_esyscmd): Use it.
- Reported by Nicolas Pioch.
-
-Fri Nov 12 10:02:26 1993 Francois Pinard (pinard@icule)
-
- * Makefile.in (m4.dvi): Use m4.texinfo instead of m4.texi.
- Reported by Joel Sherrill.
-
- * builtin.c (prefix_all_builtins): Instead of the table size, use
- the null entry at end for stopping the loop. It was overwritten.
- Reported by Andreas Schwab and Jim Meyering.
-
- * builtin.c (prefix_all_builtins): Cast xmalloc to (char *).
- Reported by Kaveh R. Ghazi.
-
- * macro.c (call_macro): Add * in (*SYMBOL_FUNC (sym)) (...).
- Reported by Karl Vogel.
-
-Tue Nov 9 09:31:47 1993 Francois Pinard (pinard@icule)
-
- * m4.h: Do not define volatile if already defined.
- Reported by Rene' Seindal.
-
- * lib/Makefile.in: Add a forgotten ALLOCA=@ALLOCA@. Grrr!
-
- Reported by Bernhard Daeubler, Eric Backus, Hal Peterson, Hoang
- Uong, Ian Taylor, Kaveh R. Ghazi, Tom McConnell and Walter Wong.
-
-Mon Nov 8 21:11:44 1993 Francois Pinard (pinard@icule)
-
- * m4.h: Define strchr and strrchr in terms of index and rindex,
- instead of the other way around.
- * builtin.c, m4.c, path.c: Use strchr instead of index.
-
- * input.c (next_char): Remove a "break;" after a "return ...;".
- Reported by Tom McConnell.
-\f
-Mon Nov 8 12:45:34 1993 Francois Pinard (pinard@icule)
-
- * Release 1.1
-
- * configure.in: Do not copy check files in the build hierarchy.
- * checks/check-them: Identify the m4 version being checked. For
- finding m4, look in $PATH instead of in the parent directory.
- * Makefile.in (check): Prepend `pwd` to $PATH before checking.
- * checks/Makefile.in (.all-stamp): Always create check files in
- the source hierarchy, not anymore in the build hierarchy.
- (check): cd to the source hierarchy before performing checks.
- Do not copy nor clean COPYING anymore, take it from `..'.
- Reported by Tom McConnell.
-
- * Makefile.in (Makefile): Use $(SHELL).
- (config.status): Use $(SHELL). Use "config.status --recheck"
- instead of "configure --no-create", which is obsolete.
- Reported by Tom McConnell.
-
-Fri Nov 5 09:49:30 1993 Francois Pinard (pinard@compy.IRO.UMontreal.CA)
-
- * m4.c (usage): Use "%s" instead of "m4" in format string.
- Reported by Jim Meyering.
-
- * Makefile.in: Distribute mkinstalldirs.
- Reported by Pierre Gaumond.
- Reported by Jim Meyering.
- Reported by Tom McConnell.
- Reported by Andreas Gustafsson.
-
- * checks/check-them: Renamed from checks/check_them.
- * checks/get-them: Renamed from checks/get_them.
- * checks/.all-stamp: Renamed from checks/.all_stamp.
- * checks/Makefile.in: Changed accordingly.
- Reported by Jim Meyering.
-
-Thu Nov 4 13:50:52 1993 Francois Pinard (pinard@lagrande.IRO.UMontreal.CA)
-
- * lib/Makefile.in (dist): Correct permissions on files.
-
- * output.c: Declare tmpfile, some systems don't.
-
-Wed Nov 3 09:09:16 1993 Francois Pinard (pinard@icule)
-
- * checks/Makefile.in (dist): Correct permissions on files.
-
- * Makefile.in (dist): Ensure recursive linking for subdirectory
- `examples', also set read/write permissions on all its files.
-
- * mkinstalldirs: New, from elsewhere.
- * Makefile.in: Use it.
-
- * debug.c: Synchronize debug messages and regular output when
- the debug file and stdout are redirected to the same file.
- * configure.in: Add (commented) checks for fileno and fstat.
- Reported by Jim Avera.
-
- * builtin.c (m4_ifelse): Diagnose excess arguments if 5, 8, 11,
- etc., arguments, then ignore the superfluous one. m4 used to
- diagnose missing arguments and return the empty string.
- Reported by Nick S. Kanakakorn.
-
-Tue Nov 2 00:55:41 1993 Francois Pinard (pinard@icule)
-
- * m4.c (main): At end of all input, ensure all undiverted text
- goes to the main output stream.
- Reported by Andreas Gustafsson.
-
- * m4.c (main): exit (0), instead of return 0.
-
- * m4.c: Implement -P and --prefix-builtins.
- * builtin.c: Delete const specifier on builtin_tab.
- (prefix_all_builtins): New.
- Reported by Noah Friedman.
- Reported by Scott Bartram.
-
- * c-boxes.el: New, from elsewhere.
- * Makefile.in: Distribute it.
-
- * m4.h: Do not define bcopy if <string.h> defines it.
- Reported by Stephen Perkins.
-
- * builtin.c (define_macro): Allow a missing second argument, in
- which case it is implied empty. Affects define and pushdef.
- Reported by Eric Allman.
-
-Mon Nov 1 07:45:24 1993 Francois Pinard (pinard@icule)
-
- * m4.h: Add blind_if_no_args in struct builtin, blind_no_args in
- struct symbol adn SYMBOL_BLIND_NO_ARGS macro.
- * builtin.c: Initialize all the blindness fields in builtin_tab.
- (define_builtin): Copy the blindness of a builtin into its symbol.
- * macro.c (expand_token): Avoid processing a blind builtin if the
- next character is not an opening parenthesis.
- Reported by David MacKenzie.
- Reported by Noah Friedman.
-
- * configure.in: Ensure an exit status of 0 on completion.
- Reported by Vivek P. Singhal.
-
- * eval.c (eval_lex): Admit both lower and upper case letters for
- bases greater than 10. Only lower case letters were accepted.
-
- * eval.c (eval_lex): Recognize 0bDIGITS and 0rRADIX:DIGITS syntax.
- Reported by Krste Asanovic.
-
- * eval.c: Rename NOT to LNOT. Add XOR, NOT, LSHIFT and RSHIFT.
- * eval.c (logical_not_term): New name for not_term.
- * eval.c (xor_term): New, between or_term and and_term.
- * eval.c (not_term): New, between and_term and logical_not_term.
- * eval.c (shift_term): New, between cmp_term and add_term.
- Reported by Krste Asanovic: ~, ^, <<, >>.
- Reported by Ben A. Mesander: ** vs ^.
-
- * m4.c: Delete xmalloc.c, xrealloc.c, xstrdup.c.
- * m4.h: Delete xrealloc.c.
- * lib/xmalloc.c: New, from elsewhere.
- * lib/xstrdup.c: New, from elsewhere.
- * lib/Makefile.in: Distribute and compile them.
-
- * m4.c: Change progname to program_name.
- * builtin.c, eval.c, m4.c, m4.h: Rename error to m4error.
- * lib/error.c: New, from elsewhere.
- * lib/Makefile.in: Distribute and compile error.c.
- * configure.in: Check AC_VPRINTF and for strerror.
- * m4.c: Delete cmd_error. Use error instead.
- * m4.c: Change label capitalisation to "ERROR", "Warning", etc.
-
- * m4.h: Delete #define const, let Autoconf takes care of this.
-
- * m4.c: Remove all code conditionalized by IMPLEMENT_M4OPTS.
- Merge parse_args into main. Declare argv to be `char *const *',
- then remove superfluous casts.
-
- * m4.c: Rename --no-gnu-extensions to --traditional.
- Reported by Ben A. Mesander.
-
- * m4.c (usage): Add a status parameter. Supply one in various
- calls. Add --help processing. Remove -V for --version.
-
- * lib/Makefile.in: Put $(CFLAGS) last in .c.o rule.
-
- * lib/Makefile.in: Have an AR=ar declaration.
- Reported by Eric Backus.
- Reported by Bjorn R. Bjornsson.
- Reported by Tom Tromey.
- Reported by Kristine Lund.
- Reported by Marion Hakanson.
-
-Sat Oct 30 12:51:47 1993 Francois Pinard (pinard@icule)
-
- * Makefile.in (m4.info): Use -I$(srcdir) on $(MAKEINFO).
- Reported by Noah Friedman.
-
-Mon Oct 25 14:58:48 1993 Francois Pinard (pinard@icule)
-
- * Makefile.in: Remove MDEFINES and cleanup.
-
-Wed Jun 9 14:59:46 1993 Francois Pinard (pinard@icule)
-
- * Makefile.in (dist): Replace "echo `pwd`" by a mere "pwd".
- Create a gzip file.
-
-Sat Feb 6 14:59:22 1993 Francois Pinard (pinard@icule)
-
- * Makefile.in, lib/Makefile.in, check/Makefile.in: In dist goals,
- ensure 777 mode for directories, so older tar's will restore file
- modes properly.
-
-Sun Jan 17 15:38:05 1993 Francois Pinard (pinard@icule)
-
- * Makefile.in, lib/Makefile.in: Put $(CFLAGS) after $(CPPFLAGS),
- so the installer can override automatically configured choices.
- Reported by Karl Berry.
-
-Fri Jan 15 16:07:00 1993 Francois Pinard (pinard@icule)
-
- * lib/vfprintf.c: Stolen from Oleo distribution and adapted. The
- previous version was not working properly on m68k-hp-bsd4.3.
- Reported by Roland McGrath.
-
- * lib/_doprnt.c: Stolen from Oleo distribution.
- * configure.in: Check for _doprnt.c if vfprintf.c selected.
- * lib/Makefile.in: Distribute _doprnt.c.
- Do not distribute regex.[ch].old anymore.
-
-Fri Jan 1 19:42:23 1993 Francois Pinard (pinard at icule)
-
- * Makefile.in, lib/Makefile.in: Reinstate $(CPPFLAGS), use it.
- Richard wants it there.
-
-Sun Dec 27 07:01:54 1992 Francois Pinard (pinard at icule)
-
- * Makefile.in: Add DEFS to MDEFINES.
- * lib/Makefile.in (.c.o): Remove $(CPPFLAGS).
- (libm4.a): Remove the library before creating it.
- (distclean): Remove tags and TAGS too.
-
-Wed Dec 23 12:46:55 1992 Francois Pinard (pinard at icule)
-
- * Makefile.in (dvi, m4.dvi): New goals.
-
- * builtin.c, eval.c, format.c, input.c, m4.[ch], m4.texinfo,
- macro.c, output.c, path.c, symtab.c: Change Copyright from
- 1989-1992 to the explicit enumeration 1989, 1990, 1991, 1992.
-
- * examples/divert.m4: Deleted, this bug has been corrected.
-
- * Makefile.in (texclean, mostlyclean): New goals.
-
- * Makefile.in (clean): Remove clutter from ansi2knr.
- Reported by Pierre Gaumond.
- Reported by Greg A. Woods.
-
-Sun Dec 20 10:40:20 1992 Francois Pinard (pinard at icule)
-
- * Makefile.in: Remove $(CPPFLAGS) from the .c.o rule. The user
- might well use CFLAGS is s/he needs it.
-
- * Makefile.in: Allow installation of info files from a separate
- build directory.
- Reported by Jason Merrill.
- Reported by David MacKenzie.
- Reported by Skip Montanaro.
- Reported by Erez Zadok.
- Reported by Assar Westerlund.
-\f
-Sat Dec 19 08:21:34 1992 Francois Pinard (pinard at icule)
-
- * Release 1.0.3
- This is still a beta release for the future GNU m4 version 1.1.
-
- * lib/alloca.c: New, from elsewhere.
- * lib/Makefile.in: Distribute it. Define and use $(ALLOCA).
-
- * m4.h: Do not define index/rindex if already defined. If
- FALSE/TRUE are already defined, do not redefine them, but merely
- define boolean typedef to int.
-
- * Makefile.in: Use $(DEFS) while compiling ansi2knr.
- * ansi2knr.c: Rewrite #ifdef HAVE_STRING_H || STDC_HEADERS,
- because some C compilers do not like connectives with #ifdef.
- * m4.h: Define `volatile' only if __GNUC__, instead of once for
- __GNUC__ and once for __STDC__.
- * lib/regex.h: Leave const alone, AC_CONST will take care of it.
-
- * checks/Makefile.in: Use .all_stamp instead of $(CHECKS) for
- Makefile dependencies. Without it, make keeps destroying and
- remaking $(CHECKS) in a loop (why?). Distribute .all_stamp.
-
- * m4.h, m4.c, builtin.c, output.c: Change all divertion/DIVERTION
- to diversion/DIVERSION, this was a spelling error.
-
- * m4.c: Declare version[], remove #include "version.h".
- * version.h: Deleted.
- * Makefile.in: Remove references to version.h.
-
- * output.c (shipout_text): Centralize all `#line NUM ["FILE"]'
- production, by using a simpler and more robust algorithm. This
- solves the problem of synclines sometimes written in the middle of
- an output line. Delete sync_line() and output_lines variable.
- * m4.h: Remove sync_line prototype and output_lines declaration.
- * input.c (next_char), output.c (shipout_text): Remove references
- to output_lines.
- * input.c (push_file, pop_file): Merely put the value -1 in
- output_current_line instead of calling sync_line, for delaying a
- single `#line NUM FILE' before next output line. Do not test
- for sync_output, because this is unnecessary clutter.
- * output.c (make_divertion, insert_divertion): Idem.
- * input.c: Rename must_advance_line to start_of_input_line, for
- consistency.
-
- * debug.c (trace_header): Select a new debug line format, which
- better complies with GNU standards for formatting error messages.
- With option `-dfl', M-x next-error might be used on the output.
- * m4.c (vmesg): Adjust format of error output to GNU standards.
- * m4.texinfo: Adjust examples for `make check' to work.
-
- * m4.h, builtin.c, debug.c, input.c, macro.c, path.c: Use upper
- case for enum debug_info constants, which were all lower case.
-
- * builtin.c (m4_regexp, m4_patsubst): Use re_search instead of
- re_search_2.
- * lib/regex.[ch]: Use new version from textutils 1.3.6, with some
- collected patches. I tried a few times using newer regex.[ch], it
- mysteriously stopped aborting with this one. Insecure feeling...
- * lib/Makefile.in: Distribute regex.[ch].old, just in case!
-
-Fri Dec 18 11:08:03 1992 Francois Pinard (pinard at icule)
-
- * m4.c: Change `--no-warnings' to `--silent'.
- Reported by David MacKenzie.
-
- * m4.c: Put all M4OPTS code upon IMPLEMENT_M4OPTS control, and
- leave it off for now. See comment in m4.c for justification.
- Reported by David MacKenzie.
-
- * configure.in: Replace AC_USG by AC_HAVE_HEADERS(string.h).
- * m4.h, ansi2knr.c, lib/regex.h: Replace USG by HAVE_STRING_H.
-
- * Makefile.in: Add a new `info' goal. Use macro MAKEINFO.
-
- * Makefile.in: Ensure recursive cleaning is done before local
- cleaning for all clean goals.
-
- * builtin.c (ntoa): Ensure the value is always interpreted as a
- signed quantity, whatever the radix is.
-
-Wed Nov 18 07:57:19 1992 Jim Meyering (meyering@idefix)
-
- * builtin.c, format.c, input.c: Split long lines.
- * m4.c: Use typedef macro_definition instead of struct
- macro_definition.
- * symtab.c: Use typedef symbol instead of struct symbol.
-
-Tue Nov 17 01:58:40 1992 Francois Pinard (pinard at icule)
-
- * *.[ch]: Remove all trailing whitespace, in code and comments.
-
- * configure.in: Find some awk.
- * Makefile.in: Add $(AWK) to MDEFINES.
- * checks/Makefile.in: Transmit $(AWK) to get_them.
- * checks/get_them: Use $AWK instead of gawk. Add a close in the
- awk script when switching files, because without this, mawk runs
- out of file descriptors.
-
-Mon Nov 16 20:42:56 1992 Francois Pinard (pinard at icule)
-
- * Makefile.in (realclean): Delete m4.info*.
- Reported by Jim Meyering.
-
- * Makefile.in: Adjust and link with checks/Makefile.
- * checks/Makefile.in: New.
- * configure.in: Output checks/Makefile.
-
- * checks/get_them: Have the dnl header of each test more
- recognizable by next-error, also use a better message.
-
-Mon Nov 16 07:48:52 1992 Jim Meyering (meyering@idefix)
-
- * m4.h [__GNUC__]: Use __volatile__ instead of `volatile.'
- And use that only if __GNUC__ since we're using it's GCC-specific
- semantics that tell the compiler the associated function doesn't
- return.
-
- * builtin.c (substitute): Don't use character as an array index.
- (dumpdef_cmp): Make formal arguments `const void *' to avoid
- warnings with gcc -W -Wall on systems with qsort prototype.
- (m4_errprint): Cast obstack_finish to `char *' to avoid warnings
- from gcc -W -Wall.
-
- * eval.c (most functions): Add parentheses to assignments used
- as truth values go avoid warnings from gcc -Wall.
-
- * input.c, m4.c, output.c, path.c, symtab.c: Declare static
- any functions that don't need external scope.
-
- * builtin.c, debug.c, format.c, m4.c, m4.h, macro.c, symtab.c
- (many functions and arrays): Declare `const'.
-
-Sun Nov 15 09:42:09 1992 Francois Pinard (pinard at icule)
-
- * *.[ch]: Rename nil to NULL, using the declaration from <stdio.h>,
- removing the declaration from m4.h. Also rename false to FALSE
- and true to TRUE.
-
- * lib/Makefile.in (Makefile): New goal.
-
- * Makefile.in, lib/Makefile.in: Add a .c.o rule, so CFLAGS is not
- so heavily loaded. It gets more easily overridable, calling make.
- Reported by Jim Meyering.
-
- * Makefile.in (dist): Get .fname from the current directory name,
- instead of from version.h. I need updating many files manually,
- when the version changes, version.h is just one of them.
-
-Sat Nov 14 11:01:20 1992 Francois Pinard (pinard at icule)
-
- * m4.h: Remove the tag `boolean' on the enum introducing typedef
- `boolean'. This tag conflicts with <sys/types.h> on SVR4.
- Reported by Tom McConnell.
-
-Fri Nov 13 00:12:50 1992 Francois Pinard (pinard at icule)
-
- * m4.texinfo: Correct the examples for 33.divert, 38.divnum,
- 39.cleardiv, which were describing missing or spurious newlines.
- Modify examples 52.eval, 53.esyscmd and 54.sysval so the results
- do not depend on machine word size, `/bin/false' implementation,
- or `wc' output format. `make check' is more dependable, now.
-
- * checks/check_them: Summarize the failed tests by listing their
- name, at end. If none, issue `All checks successful'. Output
- `Checking' instead of `Input file:'.
-
- * checks/get_them, checks/check_them: Reindented.
-
- * Makefile.in (dist): chmod a+r before making the tar file.
-
-Thu Nov 12 14:42:57 1992 Francois Pinard (pinard at icule)
-
- * builtin.c (m4_dnl): Diagnose any parameter to `dnl'.
-
- * input.c (next_token): Reinitialize token_buttom just after using
- it as a watermark with obstack_free. Or else, a future token, big
- enough for triggering reallocation of the obstack chunk, could
- void the initialized value of token_buttom, later causing panic in
- obstack_free. Rename token_buttom to token_bottom everywhere.
-
- * m4.h: Before declaring errno, first include <errno.h> and
- ensure that it does not define errno.
- Reported by Richard Stallman.
-
-Wed Nov 11 17:40:35 1992 Francois Pinard (pinard at icule)
-
- * builtin.c: Define and use DECLARE macro for builtins.
-
- * builtin.c (m4_ifelse): Avoid any diagnostic when exactly one
- argument, this is a common idiom for introducing long comments.
-
- * builtin.c (m4_ifelse): If 3n + 2 arguments, diagnose missing
- arguments. The last argument was silently ignored.
-
- * m4.c (cmd_error): Add a missing semicolon before va_end().
-
-Tue Nov 10 08:57:05 1992 Francois Pinard (pinard at icule)
-
- * Makefile.in: Now handle protoized sources. Define and use U.
- Compile and use ansi2knr with old compilers. Update DISTFILES.
- Add `aclocal.m4' to `configure' dependencies.
- * ansi2knr.c: New, from Ghostscript distribution.
- * configure.in: Define U through FP_PROTOTYPES for old compilers.
- Add AC_ISC_POSIX, AC_CONST, AC_SIZE_T.
- * aclocal.m4: New, provide FP_PROTOTYPES.
- * m4.h: Conditionnaly protoized through Args, save for varags.
- * builtin.c: Protoized. Then:
- Include <sys/types.h> if size_t is not defined, before "regex.h".
- (m4_ifelse): Fetch built-in name properly for diagnostic.
- (m4_dumpdef): Remove wrong (char *) cast calling dump_symbol.
- (m4_regexp): Add const to `msg' declaration.
- (m4_patsubst): Add const to `msg' declaration.
- * debug.c: Protoized, save for varargs.
- * eval.c: Protoized.
- * format.c: Protoized.
- * input.c: Protoized.
- * m4.c: Protoized, save for varargs. Then:
- (xfree): Accept void * instead of char *.
- (xmalloc): Return void * instead of char *.
- (xrealloc): Accept and return void * instead of char *.
- * macro.c: Protoized.
- * output.c: Protoized.
- * path.c: Protoized. Then cast some (char *) over xmalloc's.
- * symtab.c: Protoized.
-
-Fri Nov 6 02:05:21 1992 Francois Pinard (pinard at icule)
-
- * m4.texinfo: Remove directory from diagnostics in 30.include,
- 51.eval, 56.errprint and 57.m4exit tests.
-
- * m4.h: Remove declarations for int or void system functions, they
- cause more conflicting trouble than they make good.
-
- * configure.in: Avoid configuration header file. Add some tests.
- * m4.h: Remove #include "config.h".
- * Makefile.in, lib/Makefile.in: Implement Autoconf interface.
- Then, rewritten for better compliance with GNU standards.
-
-Thu Nov 5 12:37:13 1992 Francois Pinard (pinard at icule)
-
- * format.c (format): Avoid syntax error if not HAVE_EFGCVT,
- because of a misplaced #endif.
-
- * Many *.[hc] files: Correct intra-line spacing here and there,
- according to GNU indent 1.6 advice.
-
- * configure.in: New, using Autoconf 1.2.
- * m4.h: Reverse NO_MEMORY_H to NEED_MEMORY_H.
- * Delete old configure.in, configure, etc/configure.in,
- etc/configure, lib/configure.in, lib/configure and config/*.
- Reported by Jason Merrill.
-
- * symtab.c (hash): Change (char) NULL to '\0'.
- Reported by Jason Merrill.
-
- * Delete .vers, etc/newdist.sh, etc/newvers.sh and
- etc/nextvers.sh. Release numbers will be edited `by hand'.
- * version.h: De-automatize, force value in.
-
- * m4.c: Changes in order to use a newer getopt.h.
- Reported by David MacKenzie.
-
- * checks/: New name for examples/.
- * checks/get_them: New location for etc/get_examples.
- * checks/check_them: New location for etc/check_examples.
- * Makefile.in, checks/get_them, checks/check_them: Adjust.
- * lib/vfprintf.c: New location for etc/vfprintf.c.
- * Delete empty etc/.
- * examples/: New name for test/.
-
-Tue Mar 10 00:29:46 1992 Francois Pinard (pinard at icule)
-
- * Makefile.in (check): Add m4 as dependency.
-
- * m4.c: Accept --no-warnings instead of --no_warnings, and
- --no-gnu-extensions instead of --no_gnu_extensions. Make the
- usage message more informative.
- Reported by David MacKenzie.
-
-Mon Mar 9 14:53:40 1992 Francois Pinard (pinard at icule)
-
- * etc/check_examples: New name for check_examples.sh.
- * etc/get_examples: New name for get_examples.sh.
- * Makefile.in, etc/Makefile.in: Use new names.
-
- * Makefile.in: Transmit $(CC) while making in lib.
-
- * Many *.[hc] files: GNU indent'ed, with further fine tuning of
- code disposition by hand.
-
-Sun Mar 8 11:01:55 1992 Francois Pinard (pinard at icule)
-
- * m4.h: Delete definitions for abort() and exit().
- Reported by Richard Stallman.
-
- * config/hmake-unicos, config/s-unicos.h: New files.
- Reported by Hal Peterson.
-
- * eval.c (exp_term): Have N^0 return 1.
- Reported by Michael Fetterman.
-
- * eval.c, input.c, m4.h: Remove last comma in enums.
- Reported by Mike Lijewski.
-
- * Transfer of maintenance duties from Rene' to Franc,ois.
-\f
-Thu Oct 24 15:18:46 1991 Rene' Seindal (seindal at diku.dk)
-
- * Release 1.0. Many thanks to those, who provided me with bug
- reports and feedback.
-
- * Uses GNU configure, taken from the gdb distribution.
-
- * Uses GNU getopt(), with long option names.
-
- * The -Q/+quiet option is added, which suppresses warnings about
- missing or superflous arguments to built-in macros.
-
- * Added default options via the M4OPTS environment variable.
-
- * The built-in format can now be configured to use sprintf as
- the formatting engine, for systems without [efg]cvt(3).
-
- * GNU library code is moved to the ./lib subdirectory; other
- utility files are now in ./etc.
-
- * Several minor bugs have been fixed.
-\f
-Fri Jul 26 15:28:42 1991 Rene' Seindal (seindal at diku.dk)
-
- * Fixed various bugs. Release 0.99, manual 0.09. Many thanks to
- Francois Pinard and Roland H. Pesch for providing me with reports.
-
- * The builtins incr and decr are now implemented without use of
- eval.
-
- * The builtin indir is added, to allow for indirect macro calls
- (allows use of "illegal" macro names).
-
- * The debugging and tracing facilities has been enhanced
- considerably. See the manual for details.
-
- * The -tMACRO option is added, marks MACRO for tracing as soon
- as it is defined.
-
- * Builtins are traced after renaming iff they were before.
-
- * Named files can now be undiverted.
-
- * The -Nnum option can be used to increase the number of
- divertions available.
-
- * Calling changecom without arguments now disables all comment
- handling.
-
- * The function m4_patsubst() is now consistently declared
- static.
-
- * A bug in dnl is fixed.
-
- * A bug in the multi-character quoting code is fixed.
-
- * Several typos in the manual has been corrected. More probably
- persist.
-
- * The m4.info file is now installed along with the program.
-\f
-Thu Nov 15 21:51:06 1990 Rene' Seindal (seindal at diku.dk)
-
- * Updated and enhanced version. Release 0.75, manual 0.07.
-
- * Implemented search path for include files (-I option and
- M4PATH envronment variable).
-
- * Implemented builtin "format" for printf-like formatting.
-
- * Implemented builtin "regexp" for searching for regular
- expressions.
-
- * Implemented builtin "patsubst" for substitution with regular
- expressions.
-
- * Implemented builtin "esyscmd", which expands to a shell
- commands output.
-
- * Implemented "__file__" and "__line__" for use in error
- messages.
-
- * Implemented character ranges in "translit".
-
- * Implemented control over debugging output.
-
- * Implemented multi-character quotes.
-
- * Implemented multi-character comment delimiters.
-
- * Changed predefined macro "gnu" to "__gnu__".
-
- * Changed predefined macro "unix" to "__unix__", when the -G
- option is not used. With -G, "unix" is still defined.
-
- * Changed "shift", "$@" and "$*" to not insert spaces afters
- commas.
-
- * Added program name to error messages.
-
- * Fixed two missing null bytes bugs.
-\f
-Mon Jan 22 21:08:52 1990 Rene' Seindal (seindal at diku.dk)
-
- * Initial beta release. Release 0.50, manual 0.05.
-
- -----
-
- Local Variables:
- coding: utf-8
- End:
-
- 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
- and this notice are preserved.
+ * src/macro.c (expand_macro): Deal with obstack API change.
+ * src/builtin.c (mkstemp_helper): Likewise.
--- /dev/null
+2014-05-13 Eric Blake <eblake@redhat.com>
+
+ doc: fix line-wrapped macro definitions
+ * doc/m4.texi: Drop bogus @c.
+ Reported by Marijn Schouten, fix by Patrice Dumas copied from
+ autoconf code base.
+
+2014-02-05 Vitezslav Crhonek <vcrhonek@redhat.com> (tiny change)
+
+ main: diagnose unsupported --word-regexp
+ * src/m4.c (long_options): Don't allow long option if short option
+ is rejected.
+
+2014-01-01 Eric Blake <eblake@redhat.com>
+
+ maint: bump copyright year
+ * all files: Version control now has a commit in 2014.
+ * gnulib: Update to latest.
+
+2013-11-08 Eric Blake <eblake@redhat.com>
+
+ build: fix regression for DragonFly BSD
+ * gnulib: Update to latest gnulib, for fpending fix.
+
+2013-09-24 Eric Blake <eblake@redhat.com>
+
+ build: improve default build for non-gcc
+ * gnulib: Update to latest gnulib.
+ * configure.ac (gl_WARN_ADD): Drop flags now guaranteed by gnulib.
+ (--enable-gcc-warnings): Set default based on a tarball-only file,
+ rather than whether .git exists.
+ * THANKS: Update.
+
+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.
+ * gnulib: Update to latest.
+ * NEWS: Mention the release.
+ * src/builtin.c (m4_defn): Silence spurious -Wstrict-overflow
+ warnings from gcc 4.5.1 at -O2.
+
+2011-02-28 Eric Blake <eblake@redhat.com>
+
+ index: fix typo in previous commit
+ * doc/m4.texinfo (Index macro): Actually expose the bug.
+
+2011-02-26 Eric Blake <eblake@redhat.com>
+
+ index: fix another regression from faulty strstr
+ * gnulib: Update to latest, for strstr fix.
+ * doc/m4.texinfo (Index macro): Test for the bug.
+ * NEWS: Document the fix.
+ * THANKS: Update.
+ Reported by Mike Stump, with additional analysis from Ralf
+ Wildenhues and Jim Meyering.
+
+2011-02-07 Eric Blake <eblake@redhat.com>
+
+ maint: speed up configure, using latest gnulib
+ * gnulib: Update to latest.
+ * m4/gnulib-cache.m4: Import fclose and rename modules.
+ * configure.ac (gl_ASSERT_NO_GNULIB_POSIXCHECK): Speed up normal
+ configure runs (and document how to rerun GNULIB_POSIXCHECK).
+ * HACKING: Document GNULIB_POSIXCHECK.
+
+ maint: update http git cloning instructions
+ * HACKING: Git http doesn't like the redirect at git.sv.gnu.org.
+ * THANKS: Update.
+ Reported by Mike Dupont.
+
+2011-02-01 Eric Blake <eblake@redhat.com>
+
+ maint: update to latest gnulib
+ * gnulib: Update to latest.
+ * m4/gnulib-cache.m4: Regenerate.
+ * src/builtin.c (m4_ifelse): Use STREQ.
+
+2011-01-25 Eric Blake <eblake@redhat.com>
+
+ maint: reflect recent copyright assignments
+ * AUTHORS: Update.
+
+2011-01-03 Eric Blake <eblake@redhat.com>
+
+ maint: update copyright year
+ * gnulib: Update to latest.
+ * m4/gnulib-cache.m4: Regenerate.
+ * all other files: Run 'make update-copyright'.
+
+ maint: document use of copyright ranges
+ * README: Copy coreutils wording for allowing copyright year
+ ranges. Also mention libsigsegv 2.9.
+ * cfg.mk (UPDATE_COPYRIGHT_USE_INTERVALS): Now that GNU Coding
+ Standards permit it, prefer shorthand copyright.
+ * HACKING: Update libsigsegv preference.
+ * NEWS: 1.4.16 will be in 2011.
+ * doc/m4.texinfo (History): Likewise.
+
+2010-12-31 Eric Blake <eblake@redhat.com>
+
+ main: avoid leaking string on Haiku
+ * src/m4.c (main): Avoid leak when SIGBUS == SIGSEGV.
+ * THANKS: Update.
+ Reported by Scott McCreary.
+
+2010-12-24 Eric Blake <eblake@redhat.com>
+
+ build: pull in various gnulib fixes
+ * gnulib: Update to latest.
+ * m4/gnulib-cache.m4: Reflect spawn-pipe module name change.
+ * src/builtin.c (includes): Likewise.
+ (define_user_macro): Alter comment to appease syntax-check.
+ * src/input.c (pop_wrapup): Likewise.
+ * src/output.c (undivert_all): Likewise.
+ * cfg.mk (local-checks-to-skip): Skip new rule.
+
+ maint: reflect recent copyright assignment
+ * AUTHORS: Add Raphael Poss.
+
+2010-10-21 Eric Blake <eblake@redhat.com>
+
+ build: work around glibc and libsigsegv bugs
+ * gnulib: Update to latest.
+ * m4/gnulib-cache.m4: Regenerate.
+ * docs/m4.texinfo (Index macro): Expose strstr bug.
+ * NEWS: Mention fixes.
+
+ docs: mention more history
+ * doc/m4.texinfo (History): Add upcoming 1.4.16 release.
+
+2010-08-31 Eric Blake <eblake@redhat.com>
+
+ Release Version 1.4.15.
+ * gnulib: Update to latest.
+ * NEWS: Mention the release.
+
+2010-08-30 Eric Blake <eblake@redhat.com>
+
+ Clean up compiler warnings.
+ * src/builtin.c (m4_patsubst): Drop dead store.
+ * src/eval.c (unary_term): Likewise.
+ * src/input.c (match_input): Likewise. Also drop useless casts to
+ void.
+ * src/symtab.c (symtab_debug): Drop useless casts.
+
+ Test previous commit.
+ * doc/m4.texinfo (Format): Add a test.
+ * NEWS: Document the fix.
+ * THANKS: Update.
+
+2010-08-30 Carlo Teubner <carlo.teubner@gmail.com> (tiny change)
+
+ Avoid a crash with bad format string.
+ * src/format.c (expand_format): Fix off-by-one error.
+
+2010-08-30 Eric Blake <eblake@redhat.com>
+
+ Document recent bug fixes.
+ * NEWS: Add some entries.
+ * gnulib: Update to latest, for more AIX fixes.
+
+2010-07-30 Eric Blake <eblake@redhat.com>
+
+ Update to newer gnulib.
+ * gnulib: Update to latest, for strtod fix.
+ * src/Makefile.am (m4_LDADD): Update link libraries accordingly.
+ * cfg.mk (local-checks-to-skip): Skip broken check.
+ * doc/m4.texinfo: Drop all use of @acronym{}.
+ * THANKS: Update.
+ Reported by Rainer Tammer.
+
+2010-06-04 Eric Blake <eblake@redhat.com>
+
+ Reflect recent copyright assignment.
+ * AUTHORS: Add David Warme.
+
+ Update to newer gnulib.
+ * gnulib: Update to latest, and include C++ tests.
+ * configure.ac (gl_CXX_CHOICE_DEFAULT_NO): Make default for C++
+ tests be disabled...
+ * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): ...but run them when
+ building package.
+ * m4/gnulib-cache.m4: Regenerate.
+ * build-aux/.cvsignore: Likewise.
+ * build-aux/.gitignore: Likewise.
+
+ Fix build on newer glibc.
+ * src/m4.h (includes): Add <sys/stat.h>.
+ * THANKS: Update.
+ Reported by Todd Rinaldo.
+
+2010-03-02 Giuseppe Scrivano <gscrivano@gnu.org> (tiny change)
+
+ Support bootstrap --gnulib-srcdir=DIR.
+ * bootstrap: Add --gnulib-srcdir option, which overrides
+ GNULIB_SRCDIR, for consistency with gnulib bootstrap.
+
+2010-02-24 Eric Blake <eblake@redhat.com>
+
+ Release Version 1.4.14.
+ * gnulib: Update to latest.
+ * README: Increase libsigsegv recommendation.
+ * HACKING: Likewise. Tweak release instructions.
+ * NEWS: Mention the release.
+
+ Improve parsing example.
+ * doc/m4.texinfo (Input processing): Double-quote argument to
+ translit, for robustness.
+ * THANKS: Update.
+ Reported by Chris Penev.
+
+2010-01-29 Eric Blake <ebb9@byu.net>
+
+ Document upcoming release.
+ * gnulib: Update to latest.
+ * doc/m4.texinfo (History): Mention 1.4.14.
+
+2010-01-06 Eric Blake <ebb9@byu.net>
+
+ Use correct license on auxiliary documentation.
+ * gnulib: Update to latest.
+ * AUTHORS: Use GFDL 1.3, not 1.2.
+ * BACKLOG: Likewise.
+ * README: Likewise.
+ * THANKS: Likewise.
+ * TODO: Likewise.
+ * NEWS: Place under GFDL.
+ * cfg.mk (old_NEWS_hash): Update.
+
+2010-01-05 Eric Blake <ebb9@byu.net>
+
+ Remove more TAB characters.
+ * THANKS: Use space for alignment.
+ * bootstrap: Likewise.
+ * checks/stackovf.test: Likewise.
+ * configure.ac: Likewise.
+ * src/builtin.c: Likewise. Also update some stale comments.
+ * src/debug.c: Likewise.
+ * src/eval.c: Likewise.
+ * src/format.c: Likewise.
+ * src/freeze.c: Likewise.
+ * src/input.c: Likewise.
+ * src/m4.c: Likewise.
+ * src/m4.h: Likewise.
+ * src/macro.c: Likewise.
+ * src/output.c: Likewise.
+ * src/path.c: Likewise.
+ * src/symtab.c: Likewise.
+
+ Clarify minimum bootstrap requirements.
+ * bootstrap: Avoid out-of-date duplicated data.
+
+ Security fix by requiring newer automake features.
+ * configure.ac (AM_INIT_AUTOMAKE): Add dist-xz, color-tests,
+ parallel-tests, and silent-rules.
+ (AC_PREREQ): Bump autoconf requirement to 2.62, per automake.
+ * HACKING: Update minimum requirements.
+ * NEWS: Document the fix.
+
+ Drop hard-coding of GPG id.
+ * gnulib: Update to latest.
+ * m4/gnulib-cache.m4: Regenerate.
+ * cfg.mk (gpg_key_ID): Delete, now that maint.mk provides a
+ sensible default.
+ (update-copyright-env): Don't let environment interfere with wrap
+ column.
+
+2010-01-01 Eric Blake <ebb9@byu.net>
+
+ Update copyright year.
+ All files impacted, via 'make update-copyright'. Additionally:
+ * .gitignore: Ignore backup files.
+
+2009-12-29 Eric Blake <ebb9@byu.net>
+
+ Document new indentation policy.
+ * HACKING: Document indentation policy.
+ * .x-sc_prohibit_tab_based_indentation: New file.
+ * cfg.mk (sc_prohibit_tab_based_indentation): New rule.
+ * Makefile.am (syntax_check_exceptions): New macro.
+ (EXTRA_DIST): Distribute exception files, and .prev-version.
+
+ Switch to indentation by space, not tab.
+ * .gitmodules: Convert leading tabs to spaces.
+ * TODO: Likewise.
+ * bootstrap: Likewise.
+ * c-boxes.el: Likewise.
+ * checks/check-them: Likewise.
+ * checks/get-them: Likewise.
+ * checks/stackovf.test: Likewise.
+ * configure.ac: Likewise.
+ * src/builtin.c: Likewise.
+ * src/debug.c: Likewise.
+ * src/eval.c: Likewise.
+ * src/format.c: Likewise.
+ * src/freeze.c: Likewise.
+ * src/input.c: Likewise.
+ * src/m4.c: Likewise.
+ * src/m4.h: Likewise.
+ * src/macro.c: Likewise.
+ * src/output.c: Likewise.
+ * src/path.c: Likewise.
+ * src/symtab.c: Likewise.
+
+ Update to latest gnulib.
+ * gnulib: Update.
+ * m4/gnulib-cache.m4: Import xoset.
+ * src/output.c (includes): Ensure that gnulib oset usage will
+ call xalloc_die on memory failure.
+ * build-aux/.cvsignore: Regenerate.
+ * build-aux/.gitignore: Likewise.
+
+2009-11-28 Eric Blake <ebb9@byu.net>
+
+ Work around BSD getopt bug.
+ * gnulib: Update.
+ * doc/m4.texinfo (Command line files): Add test.
+
+ Use fastmap for better regex performance.
+ * src/input.c (word_start): Delete.
+ (pop_wrapup): Free memory on exit.
+ (set_word_regexp): Compile a fastmap instead.
+ (peek_token, next_token): Use the fastmap.
+
+2009-11-26 Eric Blake <ebb9@byu.net>
+
+ Ignore write failures before stack overflow exit.
+ * m4/gnulib-cache.m4: Import ignore-value module.
+ * src/m4.c (fault_handler): Use it to avoid compiler warning.
+
+2009-11-25 Eric Blake <ebb9@byu.net>
+
+ Allow use of compiler warnings.
+ * m4/gnulib-cache.m4: Import manywarnings module.
+ * configure.ac (WERROR_CFLAGS, WARN_CFLAGS): New variables.
+ * src/Makefile.am (AM_CFLAGS): Use them.
+ * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Turn on warnings during
+ distcheck.
+ * src/m4.h (M4_GNUC_NORETURN): New macro.
+ (trace_post): Delete unused parameter.
+ * src/m4.c (usage): Mark as noreturn.
+ (main): Remove unused parameter.
+ * src/debug.c (trace_post): Likewise.
+ (trace_pre): Cover all enum values.
+ * src/symtab.c (lookup_symbol): Likewise.
+ * src/builtin.c (define_macro, m4_dumpdef): Likewise.
+ (m4_define, m4_undefine, m4_pushdef, m4_popdef, m4_sysval)
+ (m4_divert, m4_undivert, m4_dnl, m4_changequote, m4_changecom)
+ (m4_changeword, m4_syscmd, m4_include, m4_sinclude, m4_m4exit)
+ (m4_debugmode, m4_debugfile, m4_placeholder): Mark unused
+ parameters.
+ (mkstemp_helper): Use parameter.
+ (substitute): Avoid signed vs. unsigned comparison.
+ * src/format.c (arg_int, arg_long, arg_double): Likewise.
+ * src/input.c (next_token): Likewise.
+ * src/output.c (freeze_diversions): Likewise.
+ (m4_tmpname): Allow C++ compilation.
+ * src/freeze.c (produce_frozen_state, GET_NUMBER): Use correct
+ type.
+ * src/macro.c (call_macro): Cover all enum values.
+ (expand_macro): Update caller.
+ * src/path.c (m4_fopen): Remove unused parameter.
+ (m4_path_search): Update caller.
+
+ Silence syntax-check warnings.
+ * src/m4.h (STREQ): New macro.
+ * src/builtin.c (find_builtin_by_name): Use it.
+ * src/input.c (set_word_regexp): Likewise.
+ * src/m4.c (process_file): Likewise.
+ (main): Consistently spell warning, and mark output strings.
+ Avoid unsafe parsing functions.
+ (process_file): Mark output strings.
+ * src/output.c (make_diversion): Likewise.
+ * src/format.c (arg_int, arg_long, arg_double): New helpers.
+ (ARG_INT, ARG_LONG, ARG_DOUBLE): Use them to detect parse errors.
+ * BACKLOG: Avoid whitespace problems.
+ * TODO: Likewise.
+ * HACKING: Likewise.
+ * examples/esyscmd.m4: Likewise.
+ * examples/file.m4: Likewise.
+ * examples/fstab.m4: Likewise.
+ * examples/patsubst.m4: Likewise.
+
+ Use gnulib maintainer-makefile module.
+ * m4/gnulib-cache.m4: Import maintainer-makefile module.
+ * cfg.mk (local-checks-to-skip): Drop changelog-check; add
+ sc_cast_of_x_alloc_return_value.
+ (gnulib_dir, gnu_rel_host, url_dir_list): Delete; provided by
+ maint.mk.
+ (config_h_header, old_NEWS_hash): New macros.
+ * .prev-version: New file.
+ * maint.mk: Remove from version control; use gnulib instead.
+ * .gitignore: Update.
+ * HACKING: Update.
+
+ Update from gnulib.
+ * gnulib: Update.
+ * m4/gnulib-cache.m4: Use --makefile-name.
+ * lib/Makefile.am: Wrap the gnulib-generated file.
+ * tests/Makefile.am: Likewise.
+ * .gitignore: Track our wrappers.
+ * doc/m4.texinfo (Improved capitalize): Fix typo.
+
+2009-10-05 Eric Blake <ebb9@byu.net>
+
+ Update from gnulib.
+ * gnulib: Update.
+ * m4/gnulib-cache.m4: Import gnu-web-doc-update module.
+ * build-aux/.gitignore: Ignore new file.
+ * build-aux/.cvsignore: Likewise.
+
+2009-08-20 Eric Blake <ebb9@byu.net>
+
+ Update from gnulib.
+ * gnulib: Update.
+ * AUTHORS: Mention recent copyright assignment.
+
+2009-08-17 Eric Blake <ebb9@byu.net>
+
+ Enhance test with closed descriptors.
+ * doc/m4.texinfo (Command line files): Enhance test from
+ 2009-07-20 to actually test the bug being fixed.
+
+ Update copyright year.
+ * AUTHORS: Run UPDATE_COPYRIGHT_FORCE=1 make update-copyright.
+ * BACKLOG: Likewise.
+ * Makefile.am: Likewise.
+ * TODO: Likewise.
+ * acinclude.m4: Likewise.
+ * c-boxes.el: Likewise.
+ * cfg.mk: Likewise.
+ * checks/Makefile.in: Likewise.
+ * checks/check-them: Likewise.
+ * checks/stackovf.test: Likewise.
+ * doc/Makefile.am: Likewise.
+ * examples/Makefile.am: Likewise.
+ * src/Makefile.am: Likewise.
+ * src/debug.c: Likewise.
+ * src/eval.c: Likewise.
+ * src/freeze.c: Likewise.
+ * src/m4.h: Likewise.
+ * src/macro.c: Likewise.
+ * src/path.c: Likewise.
+ * src/symtab.c: Likewise.
+
+ Prepare to bulk update copyright year.
+ * gnulib: Update.
+ * m4/gnulib-cache.m4: Import update-copyright and vc-list-files
+ modules.
+ * maint.mk: Fix copyright.
+ (build_aux, VC_LIST, VC_LIST_EXCEPT, update-copyright): New macros
+ and rules borrowed from gnulib.
+ * cfg.mk (update-copyright-env): Enforce longhand behavior.
+ * .cvsignore: Reflect these changes.
+ * .gitignore: Likewise.
+ * .x-update-copyright: New file.
+
+2009-08-14 Eric Blake <ebb9@byu.net>
+
+ Explicitly request GNU getopt extensions.
+ * gnulib: Update.
+ * m4/gnulib-cache.m4: Use getopt-gnu, not obsolete getopt module.
+
+2009-07-22 Eric Blake <ebb9@byu.net>
+
+ Fix testsuite on Solaris.
+ * doc/m4.texinfo (Command line files): Tolerate different spelling
+ of EBADF.
+ * src/builtin.c (m4_esyscmd): Clear errno before reaping.
+
+2009-07-21 Eric Blake <ebb9@byu.net>
+
+ Fix testsuite on mingw.
+ * gnulib: Update.
+
+2009-07-20 Eric Blake <ebb9@byu.net>
+
+ Pick up gnulib fixes for sub-process execution.
+ * gnulib: Update.
+ * doc/m4.texinfo (Command line files): Add test; regression
+ introduced 2009-03-05.
+ * NEWS: Document the change.
+
+ Avoid cygwin 1.7 crash with closed stdout.
+ * gnulib: Update.
+ * doc/m4.texinfo (Command line files): Add test; regression
+ introduced 2008-07-17.
+ * NEWS: Document the change.
+
+ A status of 127 does not always imply esyscmd failure.
+ * src/builtin.c (m4_esyscmd): Silence gnulib message; regression
+ introduced 2009-03-05.
+ * doc/m4.texinfo (Sysval): Test this.
+ * NEWS: Document the change.
+
+2009-06-25 Eric Blake <ebb9@byu.net>
+
+ Fix description of limits on diversions.
+ * doc/m4.texinfo (Diversions): Fix grammar. Be less pessimistic
+ about limitations.
+ * THANKS: Update.
+ Reported by Elias Benali.
+
+2009-06-17 Eric Blake <ebb9@byu.net>
+
+ Update to latest gnulib.
+ * gnulib: Import fixes for Interix compilation.
+ * THANKS: Update.
+ Reported by Jay Krell.
+
+2009-05-22 Eric Blake <ebb9@byu.net>
+
+ Update to latest gnulib.
+ * gnulib: Import fixes for AIX compilation.
+ * THANKS: Update.
+ Reported by Jens Rehsack.
+
+2009-04-13 Eric Blake <ebb9@byu.net>
+
+ Fix GFDL usage.
+ * doc/m4.texinfo (copying): Complete transition to GFDL 1.3,
+ started 2008-12-12.
+ Reported by Santiago Vila.
+
+2009-04-01 Eric Blake <ebb9@byu.net>
+
+ Release Version 1.4.13.
+ * NEWS: Mention the release.
+
+2009-03-31 Eric Blake <ebb9@byu.net>
+
+ Tweak submodule instructions.
+ * HACKING: Improve directions.
+ * gnulib: Update to latest version.
+
+2009-03-23 Eric Blake <ebb9@byu.net>
+
+ Don't force file overwrites during bootstrap.
+ * bootstrap: Ensure that rerunning bootstrap doesn't alter tree.
+
+ Drop dist-lzma, now that xz replaces lzma.
+ * configure.ac (AM_INIT_AUTOMAKE): Drop dist-lzma. Until a stable
+ automake release includes dist-xz, the release process will just
+ manually create a .xz tarball.
+ * gnulib: Update to latest gnulib.
+
+2009-03-19 Eric Blake <ebb9@byu.net>
+
+ Exploit git submodule by adding appropriate symlinks.
+ * bootstrap: No longer copy files from gnulib.
+ * COPYING: Change to symlink pointing into gnulib.
+ * INSTALL: Likewise.
+ * build-aux/compile: Likewise.
+ * build-aux/config.guess: Likewise.
+ * build-aux/config.sub: Likewise.
+ * build-aux/depcomp: Likewise.
+ * build-aux/install-sh: Likewise.
+ * build-aux/mdate-sh: Likewise.
+ * build-aux/missing: Likewise.
+ * build-aux/texinfo.tex: Likewise.
+ * .cvsignore: Reflect these changes.
+ * .gitignore: Likewise.
+ * build-aux/.cvsignore: New file.
+ * build-aux/.gitignore: Likewise.
+
+2009-03-18 Eric Blake <ebb9@byu.net>
+
+ Make gnulib a git submodule.
+ * .gitmodules: New file.
+ * gnulib: Record which version of gnulib has been tested.
+ * bootstrap: Aid in submodule usage.
+ * cfg.mk (gnulib_dir): Alter default location of gnulib.
+ * HACKING: Mention how to use submodule.
+
+ Use latest compile script, even with stable automake.
+ * bootstrap: Also sync build-aux/compile.
+
+2009-03-12 Eric Blake <ebb9@byu.net>
+
+ Fix awk script portability.
+ * checks/get-them: In gsub, properly escape {. Close all files
+ before exiting.
+ Reported by Gary V. Vaughan.
+
+2009-03-05 Eric Blake <ebb9@byu.net>
+
+ Allow configuration choice in syscmd shell.
+ * configure.ac (SYSCMD_SHELL): New test.
+ * src/builtin.c (m4_syscmd, m4_esyscmd): Use it to avoid
+ hard-coding the shell location.
+ * doc/m4.texinfo (Syscmd, Esyscmd): Document this.
+ * README: Document new configure option.
+ * NEWS: Likewise.
+
+ Remove cruft now that gnulib modules do the work.
+ * configure.ac (M4_cv_func_system_consistent): Delete.
+ * src/builtin.c (M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS):
+ Delete.
+
+ Use gnulib pipe module instead of popen(3).
+ * m4/gnulib-cache.m4: Import pipe and wait-process modules.
+ * src/builtin.c (m4_esyscmd): Rewrite with pipe module.
+ Resolves a failure on AIX, reported by Gary V. Vaughan.
+
+ Use gnulib execute module instead of system(3).
+ * m4/gnulib-cache.m4: Import execute module.
+ * src/builtin.c (m4_sysval): Move computation...
+ (m4_esyscmd): ...into caller.
+ (m4_syscmd): Rewrite with execute module.
+ Resolves a failure on AIX, reported by Gary V. Vaughan.
+
+2009-03-03 Eric Blake <ebb9@byu.net>
+
+ Try to tolerate spaces in directory names in testsuite.
+ * doc/m4.texinfo (Diversions, Using frozen files): Provide shell
+ quoting, in case __program__ contains spaces.
+
+ Improve web-manual maintainer rule.
+ * maint.mk (web-manual): Work with VPATH builds. Factor
+ package-specific detail...
+ * cfg.mk (manual_title): ...to new variable.
+
+2009-02-26 Eric Blake <ebb9@byu.net>
+
+ Make bootstrap easier on Solaris.
+ * bootstrap: Add GNULIB_SRCDIR. Useful when a wrapper script
+ gnulib-tool exists earlier on the path to work around /bin/sh
+ failure in parsing $GNULIB_SRCDIR/gnulib-tool.
+
+2009-02-19 Eric Blake <ebb9@byu.net>
+
+ Fix regression in translit.
+ * src/builtin.c (m4_translit): Use correct comparison.
+ * doc/m4.texinfo (Translit): Enhance test.
+
+ Speed up input engine, by searching for quotes by buffer.
+ * src/input.c (struct input_block): Add end pointer to string.
+ (push_string_finish, push_wrapup): Populate it.
+ (next_token): For quotes, attempt a buffer search.
+ * NEWS: Document this.
+
+2009-02-18 Eric Blake <ebb9@byu.net>
+
+ Speed up translit when from argument is short.
+ * m4/gnulib-cache.m4: Import memchr2 module.
+ * src/builtin.c (m4_translit): Use memchr2 when possible.
+ * doc/m4.texinfo (Translit): Add tests.
+ * NEWS: Document this.
+
+ Update copyright year.
+ * THANKS: Mention 2009 in copyright year.
+
+ Prefer buffer over byte operations.
+ * src/format.c (expand_format): Use strchr for speed.
+ * src/builtin.c (substitute, expand_user_macro): Likewise.
+
+ Speed up esyscmd with buffer reads.
+ * src/builtin.c (m4_esyscmd): Read blocks directly into obstack,
+ rather than repeatedly reading bytes. Detect read errors.
+
+ Avoid risk of stack overflow.
+ * src/output.c (insert_file): Avoid stack allocation of large
+ buffer.
+ (freeze_diversions): Avoid spurious semicolon.
+
+2009-02-16 Eric Blake <ebb9@byu.net>
+
+ Avoid test failure due to different errno.
+ * doc/m4.texinfo (Using frozen files): Ignore stdout, since
+ hardened systems can prevent attempts to read /.
+ * THANKS: Update.
+ Reported by Ronny Peine, in Gentoo bug 259184.
+
+ Avoid tests that make no sense, because m4 is single-threaded.
+ * m4/gnulib-cache.m4: Avoid lock-tests and tls-tests.
+
+2009-02-12 Eric Blake <ebb9@byu.net>
+
+ Avoid quadratic code when walking definition stack.
+ * examples/stack_sep.m4: Use linear, not quadratic
+ implementation.
+ * doc/m4.texinfo (Improved copy): Fix documentation and add test,
+ based on recent autoconf bug fix.
+
+2009-01-24 Eric Blake <ebb9@byu.net>
+
+ Add URLs to --help output.
+ * src/m4.c (usage): Use enhanced version-etc features.
+
+2009-01-02 Eric Blake <ebb9@byu.net>
+
+ Use nicer email address in web manual.
+ * maint.mk (web-manual): Use new option in gendocs.sh.
+
+ Nuke xdelta diffs at release time; no one reported using them.
+ * maint.mk (got-xdelta, delta-xdelta): Delete.
+ * HACKING: Likewise.
+
+2009-01-01 Eric Blake <ebb9@byu.net>
+
+ Update copyright year.
+ * NEWS: M4 1.4.13 will occur in 2009.
+ * doc/m4.texinfo (History): Likewise.
+
+2008-12-24 Eric Blake <ebb9@byu.net>
+
+ Prepare for eventual release.
+ * doc/m4.texinfo (History): Mention 1.4.13.
+
+2008-12-22 Eric Blake <ebb9@byu.net>
+
+ Make --debugfile argument optional.
+ * src/builtin.c (m4_debugfile): Make error message consistent.
+ * src/m4.c (long_options): Make the argument optional, to allow
+ setting debug file back to stderr.
+ (main): Make --debugfile order-dependent.
+ (usage): Document this.
+ * doc/m4.texinfo (Debugging options): Likewise.
+ * NEWS: Likewise.
+
+ Use @var correctly.
+ * doc/m4.texinfo (Operation modes, Preprocessor features)
+ (Limits control, Frozen state, Debugging options): Use lower case
+ names in @var.
+ (Improved copy): Use @code, not @var, as appropriate.
+
+2008-12-18 Eric Blake <ebb9@byu.net>
+
+ Document optimized forloop.
+ * doc/m4.texinfo (Improved forloop): Mention alternate style that
+ avoids define overhead.
+ * examples/forloop3.m4: New file.
+ * examples/Makefile.am (EXTRA_DIST): Distribute it.
+
+ Deal with M4 1.4.x limitation on builtin tokens.
+ * doc/m4.texinfo (Composition): Mention limitation on curry.
+ (Improved copy): New node.
+ * examples/stack_sep.m4: New file.
+ * examples/Makefile.am (EXTRA_DIST): Distribute it.
+
+ Document copy composite using stack_foreach and curry.
+ * doc/m4.texinfo (Stacks): New node, to document pushdef stack
+ manipulation.
+ (Ifelse): Move define_blind...
+ (Composition): ...to this new node. Document currying, then use
+ it to implement copy and rename.
+ * examples/curry.m4: New file.
+ * examples/stack.m4: Likewise.
+ * examples/Makefile.am (EXTRA_DIST): Distribute them.
+
+2008-12-17 Eric Blake <ebb9@byu.net>
+
+ Don't override signal handlers installed by c-stack.
+ * src/m4.c (main): Reorder installation of signal handlers, so we
+ don't trash a SIGBUS handler installed by c-stack. Also provide a
+ SIGSEGV fallback, for platforms where c-stack combined with
+ libsigsegv uses something lower level than SIGSEGV.
+
+2008-12-12 Eric Blake <ebb9@byu.net>
+
+ Double size of temp file cache.
+ * src/output.c (tmp_file, tmp_file_owner): Split...
+ (tmp_file1, tmp_file2, tmp_file1_owner, tmp_file2_owner): ...into
+ two variables.
+ (tmp_file2_recent): New variable.
+ (m4_tmpopen, m4_tmpclose, m4_tmpremove, m4_tmprename)
+ (output_exit): Adjust callers.
+
+ Use fewer seeks on cached files.
+ * src/output.c (m4_tmpfile): Use write, not append mode.
+ (m4_tmpopen): Add parameter to decide when to skip seeks.
+ (m4_tmprename, make_diversion, insert_diversion_helper)
+ (freeze_diversions): Adjust callers.
+
+ Cache most recently spilled diversion.
+ * src/output.c (tmp_file, tmp_file_owner): New variables, for
+ 1-deep cache of spilled diversions.
+ (m4_tmpfile): Open in append mode, since we might revisit
+ diversion without closing it now.
+ (m4_tmpopen): Check cache first.
+ (m4_tmpclose): Update cache, rather than closing. Add parameter.
+ (m4_tmpremove): Close cache before removing.
+ (m4_tmprename): Deal with open files when renaming.
+ (output_exit): Close cache before exiting.
+ (make_room_for, make_diversion, insert_diversion_helper): Adjust
+ callers.
+ * configure.ac (RENAME_OPEN_FILE_WORKS): New configure test.
+
+ Correctly track size of in-memory diversions.
+ * src/output.c (insert_diversion_helper): Correctly track total
+ in-memory diversion size after undivert.
+
+ Avoid quadratic behavior for some cases of divert/undivert.
+ * src/output.c (struct m4_diversion): Improve comments.
+ (m4_tmpname, make_diversion): Strengthen preconditions.
+ (m4_tmprename): New function.
+ (output_init, output_exit): Move after internal functions.
+ (make_room_for): Don't bother copying uninitialized bytes.
+ (insert_diversion_helper): Transfer metadata, rather than copying
+ contents, when undiverting into a previously unused diversion.
+ * src/m4.h (includes): Add assert.h.
+ * doc/m4.texinfo (Diversions): Add test.
+ (Undivert): Enhance test.
+ * NEWS: Document the speedup.
+
+2008-12-12 Eric Blake <ebb9@byu.net>
+
+ Upgrade to FDL 1.3, keep COPYING in repository.
+ * Makefile.am (MAINTAINERCLEANFILES): Don't remove COPYING.
+ * .cvsignore: Don't ignore it.
+ * .gitignore: Likewise.
+ * COPYING: Store in repository, per automake 1.10.2
+ recommendation.
+ * m4/gnulib-cache.m4: Replace fdl module with fdl-1.3.
+ * doc/m4.texinfo (GNU Free Documentation License): Upgrade
+ license.
+ * doc/Makefile.am (m4_TEXINFOS): Likewise.
+ * NEWS: Mention the documentation license change.
+
+2008-10-10 Eric Blake <ebb9@byu.net>
+
+ Release Version 1.4.12.
+ * NEWS: Mention the release.
+
+2008-10-06 Eric Blake <ebb9@byu.net>
+
+ Work around Solaris' sed inability to process NUL.
+ * checks/check-them (SED): Allow user to override.
+
+2008-09-25 Eric Blake <ebb9@byu.net>
+
+ Tweak error message on command line failure.
+ * src/m4.c (process_file): Match wording of include builtin.
+ * src/freeze.c (produce_frozen_state): Likewise.
+ * m4/gnulib-cache.m4: Regenerate.
+ * doc/m4.texinfo (Command line files, Using frozen files): Update
+ tests accordingly.
+
+2008-09-24 Eric Blake <ebb9@byu.net>
+
+ Unify error handling for reading directories.
+ * src/path.c (m4_path_search): Factor open attempts...
+ (m4_fopen): ...into new function, to reject directories.
+ * doc/m4.texinfo (Include): Document that directories cannot be
+ input files.
+
+ Avoid bugs on platforms that mishandle trailing /.
+ * m4/gnulib-cache.m4: Import fopen module.
+ * doc/m4.texinfo (Command line files, Include): Add tests.
+ (Using frozen files): This test now works on mingw.
+ * checks/check-them (examples): Expand xerr to allow ignoring
+ error output because of differences in platform errno values.
+
+2008-09-22 Eric Blake <ebb9@byu.net>
+
+ Support alternate path separator.
+ * m4/gnulib-cache.m4: Import dirname and filenamecat modules.
+ * src/m4.h (includes): Add headers.
+ * src/path.c (m4_path_search): Avoid literal use of '/' as path
+ separator and when detecting absolute paths.
+
+2008-09-16 Eric Blake <ebb9@byu.net>
+
+ Fix bootstrap for Solaris /bin/sh.
+ * bootstrap: Avoid shell quoting pitfall.
+
+2008-09-01 Eric Blake <ebb9@byu.net>
+
+ Fix building with -DDEBUG=1.
+ * src/input.c (lex_debug) [DEBUG_INPUT]: Fix compilation failure.
+ * src/symtab.c (symtab_debug) [DEBUG_SYM]: Likewise.
+ * src/m4.c (includes) [DEBUG_STKOVF]: Likewise.
+ Reported by Tom G. Christensen.
+
+2008-09-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Typos in source code comments.
+ * src/builtin.c: Fix typos in comments.
+ * src/input.c: Likewise.
+
+2008-08-29 Eric Blake <ebb9@byu.net>
+
+ Fix manual date information.
+ * doc/m4.texinfo: UPDATED refers to the day the manual was built,
+ not the release date of M4.
+ Based on a bison patch by Akim Demaille.
+
+2008-08-27 Eric Blake <ebb9@byu.net>
+
+ Fix typo.
+ * doc/m4.texinfo (Invoking m4): 'm4 -d+f' is not supported in this
+ branch.
+
+2008-08-25 Eric Blake <ebb9@byu.net>
+
+ Update recommendation now that libsigsegv 2.6 is released.
+ * NEWS: Recommend libsigsegv 2.6+.
+ * README: Likewise.
+
+2008-08-21 Eric Blake <ebb9@byu.net>
+
+ Fix crash with traced defn(undef), regression from 2007-08-09.
+ * src/builtin.c (m4_defn): Handle traced but undefined macros.
+ * doc/m4.texinfo (Trace): Test it.
+ * NEWS: Document it.
+
+2008-08-18 Eric Blake <ebb9@byu.net>
+
+ Fix crash with 'm4 -N9', regression from 2006-09-14.
+ * src/m4.c (main): Add missing break.
+ * NEWS: Document it.
+
+2008-08-15 Eric Blake <ebb9@byu.net>
+
+ Documentation updates.
+ * doc/m4.texinfo (History): Mention 1.4.12.
+ (Builtin): Enhance regression tests.
+ (Debug Levels): Mention effect of -l. Enhance regression tests.
+ (Incompatibilities): Fix typo, and mention trace output.
+ (Improved capitalize): Simplify example.
+
+ Avoid compiler warning.
+ * src/builtin.c (m4_ifelse): Avoid unused variable.
+ * THANKS: Update.
+ Reported by Tom G. Christensen.
+
+ Improve 'git diff' of manual source.
+ * .gitattributes (*.texi*): Add diff attribute.
+ * bootstrap: Tell git how to use it.
+ Inspired by Jim Meyering's similar patch for coreutils.
+
+2008-08-11 Eric Blake <ebb9@byu.net>
+
+ Avoid triggering OS/2 bug in testsuite.
+ * doc/m4.texinfo (Mkstemp): Don't assume test(1) status is 1.
+ Reported by Elbert Pol.
+
+2008-08-03 Eric Blake <ebb9@byu.net>
+
+ Increase ulimit stack value to be larger than SIGSTKSZ.
+ * checks/stackovf.test (tmpfile): Use 300K rather than 50K, since
+ at least OpenBSD's sh died early from an undersized stack limit.
+
+2008-07-17 Eric Blake <ebb9@byu.net>
+
+ Remove redundant examples/stackovf.sh.
+ * examples/stackovf.sh: Delete, now that checks has better
+ version.
+ * examples/Makefile.am (EXTRA_DIST): Don't distribute it.
+
+2008-07-17 Eric Blake <ebb9@byu.net>
+
+ Adjust to c-stack changes in gnulib.
+ * src/Makefile.am (m4_LDADD): Use libsigsegv when available and
+ necessary, via LIBCSTACK.
+ * src/m4.c (main) [DEBUG_STACKOVF]: Make it easier to test fault
+ handlers.
+ * checks/stackovf.test: New file.
+ * checks/Makefile.in (CHECKS): Add stackovf.test, and factor...
+ (DOC_CHECKS): ...generated documentation tests into new macro.
+ (DISTFILES): Distribute stackovf.test.
+ * checks/check-them: Special-case stackovf.test.
+ * NEWS: Enhance the NEWS item for -L improvements.
+ * README: Mention the optional dependency.
+ * HACKING: Mention maintenance burden added by libsigsegv.
+
+2008-06-21 Eric Blake <ebb9@byu.net>
+
+ Use new sigaction module.
+ * m4/gnulib-cache.m4: Import sigaction module.
+ * src/m4.c (main): Drop signal() calls.
+
+2008-06-18 Eric Blake <ebb9@byu.net>
+
+ Also trap SIGILL, SIGFPE, SIGBUS.
+ * m4/gnulib-cache.m4: Import strsignal module.
+ * src/m4.c (main): Register more handlers, and prefer sigaction
+ when available.
+ (SIGBUS, NSIG): Provide fallback when lacking.
+ (signal_message): New variable, to keep async-safety.
+ (fault_handler): Display faulting signal description.
+ * configure.ac (gl_DISABLE_THREADS): Request gnulib modules to
+ optimize for single-threaded operation.
+
+2008-06-06 Eric Blake <ebb9@byu.net>
+
+ Inform users what to do in case of programmer error.
+ * src/m4.h (EXIT_INTERNAL_ERROR): New macro.
+ * configure.ac (AC_TYPE_SIGNAL): Delete, now that we assume C89.
+ * src/m4.c (fault_handler): New method.
+ (program_error_message): New variable, for async-safety.
+ (main): Print bug reporting address rather than dump core on any
+ failed assertions or detected non-stack-overflow faults.
+
+2008-06-06 Eric Blake <ebb9@byu.net>
+
+ Replace stackovf with gnulib c-stack.
+ * m4/gnulib.cache.m4: Import c-stack module.
+ * configure.ac (AC_CHECK_HEADERS_ONCE): Remove check for
+ siginfo.h, sys/wait.h.
+ (AC_CHECK_TYPES): Likewise for siginfo_t.
+ (AC_CHECK_MEMBERS): Likewise for sa_sigaction, ss_sp.
+ (AC_CHECK_FUNCS_ONCE): Likewise for sigaction, sigaltstack,
+ sigstack, sigvec, strerror.
+ (M4_cv_use_stackovf): Likewise for stack overflow detection.
+ * src/Makefile.am (m4_SOURCES): Don't build stackovf.c.
+ * src/stackovf.c: Delete.
+ * src/m4.h (setup_stackovf_trap): Delete.
+ * src/m4.c (stackovf_handler): Delete.
+ (main): Use c_stack_action instead of setup_stackovf_trap. If
+ stack overflow is detectable, don't limit -L artificially.
+ (usage): Document unlimited default on supported systems.
+ * doc/m4.texinfo (Limits control): Document new default nesting
+ limit.
+ * NEWS: Document this change.
+
+2008-07-30 Eric Blake <ebb9@byu.net>
+
+ Avoid regressions in trace and comment output.
+ * doc/m4.texinfo (Trace): Add test.
+ (Comments): Likewise.
+
+2008-07-28 Eric Blake <ebb9@byu.net>
+
+ Optimize iteration examples.
+ * examples/forloop2.m4: Avoid excess indir, by passing current
+ counter value as parameter.
+ * examples/foreachq3.m4: Avoid unneeded ifelse, by injecting an
+ ignored argument.
+ * doc/m4.texinfo (Improved forloop, Improved foreach): Update the
+ documentation to match.
+
+2008-07-26 Eric Blake <ebb9@byu.net>
+
+ Give example for O(n) foreach on m4 1.4.x.
+ * examples/foreachq4.m4: New file.
+ * examples/Makefile.am (EXTRA_DIST): Distribute it.
+ * doc/m4.texinfo (Improved foreach): Document linear foreach with
+ m4 1.4.5 and greater.
+
+2008-07-17 Eric Blake <ebb9@byu.net>
+
+ Fix missing copyright notices.
+ * acinclude.m4: Add copyright license details.
+ * c-boxes.el: Likewise.
+ * checks/get-them: Likewise.
+ * checks/check-them: Likewise.
+
+2008-07-13 Eric Blake <ebb9@byu.net>
+
+ Add -g/--gnu command line argument.
+ * src/m4.c (usage): Mention the new option.
+ (long_options, OPTSTRING): Add new option.
+ (main): Use it.
+ * NEWS: Document this addition.
+ * doc/m4.texinfo (Limits control): Likewise.
+ (Incompatibilities): Mention future use of POSIXLY_CORRECT.
+ * THANKS: Update.
+ Reported by Joel E. Denny.
+
+2008-07-11 Eric Blake <ebb9@byu.net>
+
+ Avoid bogus whitespace in @ovar, @dvar.
+ * doc/m4.texinfo (ovar, dvar): Add @c.
+ Based on patch by Ralf Wildenhues to Autoconf manual.
+
+2008-06-16 Eric Blake <ebb9@byu.net>
+
+ Add missing const qualifications.
+ * src/builtin.c (builtin_tab): Declare array elements as const.
+
+2008-06-03 Eric Blake <ebb9@byu.net>
+
+ Use progname module rather than rolling our own program_name.
+ * m4/gnulib-cache.m4: Import progname module.
+ * src/m4.c (program_name): Replace...
+ (main): ...with a call to set_program_name.
+
+2008-06-02 Eric Blake <ebb9@byu.net>
+
+ Allow autobuild usage.
+ * m4/gnulib.cache: Import autobuild module.
+
+2008-05-23 Eric Blake <ebb9@byu.net>
+
+ Make closing files be consistent.
+ * src/freeze.c (reload_frozen_state): Use close_stream.
+ Reported by Jean-Charles Longuet.
+
+2008-05-22 Eric Blake <ebb9@byu.net>
+
+ Don't allow failure to freeze give exit status of 0.
+ * src/freeze.c (produce_frozen_state): Guarantee non-zero exit on
+ fopen failure.
+ * doc/m4.texinfo (Using frozen files): Test the fix.
+ * THANKS: Update.
+ Reported by Jean-Charles Longuet.
+
+2008-05-09 Eric Blake <ebb9@byu.net>
+
+ Improve error message when frozen file is invalid.
+ * src/freeze.c (reload_frozen_state): Track current line.
+ [GET_STRING]: New helper macro.
+
+2008-05-09 Eric Blake <ebb9@byu.net>
+
+ Detect integer overflow when loading frozen file.
+ * src/m4.h (includes): Add limits.h.
+ (_): Define as a no-op placeholder for now.
+ * src/freeze.c (reload_frozen_state) [GET_NUMBER]: Rewrite to fail
+ immediately on overflow.
+ Reported by Jim Meyering.
+
+2008-05-07 Eric Blake <ebb9@byu.net>
+
+ Fix traceon regression introduced 2006-06-06.
+ * src/builtin.m4 (traceon): Only perform insertion if lookup
+ fails.
+ * doc/m4.texinfo (Trace): Test for the bug.
+ * NEWS: Document it.
+
+2008-05-03 Eric Blake <ebb9@byu.net>
+
+ Document define_blind.
+ * doc/m4.texinfo (Ifelse): Add a new composite macro.
+ * THANKS: Update.
+ Suggested by Mike R.
+
+2008-04-24 Eric Blake <ebb9@byu.net>
+
+ Add debugmode test.
+ * doc/m4.texinfo (Debug Levels): Test -di behavior.
+ (Changeword, Location): Correct examples.
+ * checks/check-them (examples): Update to account for recommended
+ location for running tests.
+ * doc/m4.texinfo (Debug Levels): Test this behavior.
+
+2008-04-21 Eric Blake <ebb9@byu.net>
+
+ Fix spelling of attribution to Christopher Strachey.
+ * doc/m4.texinfo (History, Inhibiting Invocation): Fix typo.
+ * THANKS: Update.
+ Reported by Fernando Carrijo.
+
+2008-04-17 Eric Blake <ebb9@byu.net>
+
+ Fix buildbot failure.
+ * doc/m4.texinfo (Diversions): Consume all of m4's output, in case
+ SIGPIPE is ignored.
+ * THANKS: Update.
+ Detected by Bob Proulx's buildbot.
+
+2008-04-17 Eric Blake <ebb9@byu.net>
+
+ Avoid gcc shadowing warnings.
+ * src/builtin.c (m4_format): s/format/expand_format, so local
+ variables can be named format.
+ * src/format.c (format): Rename...
+ (expand_format): ...to this, and avoid the name index.
+ * src/input.c (push_file): Avoid the name close.
+ * src/m4.h (expand_format): Adjust prototype.
+ * src/output.c (threshold_diversion_CB): Avoid the name div.
+
+2008-04-15 Eric Blake <ebb9@byu.net>
+
+ Another 'make installcheck' fix.
+ * doc/m4.texinfo (Diversions): s/m4/__program__/ in case
+ --program-prefix was active.
+
+2008-04-11 Eric Blake <ebb9@byu.net>
+
+ Ensure --program-prefix doesn't regress.
+ * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Enforce change from
+ 2008-03-10 by testing it at 'make distcheck' time.
+
+2008-04-11 Eric Blake <ebb9@byu.net>
+
+ Improve OS/2+emx build.
+ * src/m4.h [__EMX__]: OS/2 does not have a Unix-compatible
+ system(3), no matter what other macros it pre-defined.
+ * doc/m4.texinfo (Mkstemp): Rework test to avoid globbing failure
+ on OS/2.
+ * src/builtin.c (predefined_tab): Ensure all possible system
+ identifiers are defined, not just the first; the testsuite will
+ catch if multiple identifiers mistakenly made it through.
+ * THANKS: Update.
+ Reported by Elbert Pol.
+
+2008-04-09 Eric Blake <ebb9@byu.net>
+
+ Remove redundant configure macros.
+ * configure.ac (AC_CANONICAL_BUILD, AC_CANONICAL_HOST)
+ (AC_SYS_LARGEFILE, AC_TYPE_SIZE_T): Delete, since gnulib does
+ this.
+ (AC_CHECK_HEADERS_ONCE): Remove limits.h.
+
+2008-08-07 Bruno Haible <bruno@clisp.org> (tiny change)
+
+ Run m4 tests prior to gnulib unit tests.
+ * Makefile.am (SUBDIRS): Swap order of directories.
+
+2008-04-02 Eric Blake <ebb9@byu.net>
+
+ Release Version 1.4.11.
+ * NEWS: Mention the release.
+
+ Prepare for release.
+ * maint.mk (alpha): Check for PREV_VERSION setting sooner, and
+ remove tag operation.
+ (version-check): Enhance this check.
+ (prev-tarball): Depend on version-check.
+ (this-vc-tag): Delete, and mention need to run tag...
+ * HACKING: ...here, prior to make maintainer-distcheck.
+ Update the instructions to match this particular release process.
+ * Makefile.am (.version, announcement): Allow for VPATH build.
+ * cfg.mk (gnulib_dir): Likewise.
+ * doc/Makefile.am ($(srcdir)/m4.1): Include release number in man
+ page.
+
+2008-04-01 Eric Blake <ebb9@byu.net>
+
+ Speed up index builtin.
+ * m4/gnulib-cache: Import strstr module.
+ * NEWS: Mention the speedup.
+
+2008-03-29 Eric Blake <ebb9@byu.net>
+
+ Fix testsuite on mingw, OpenBSD.
+ * src/format.c (ARG_DOUBLE): Use strtod, not atof.
+ * src/Makefile.am (m4_LDADD): Use POW_LIB when needed.
+ * doc/m4.texinfo (Format): Add hex-float support.
+ * NEWS: Document this.
+
+2008-03-27 Eric Blake <ebb9@byu.net>
+
+ Pull other useful doc fixes from branch-1.6.
+ * doc/m4.texinfo (Arguments): Enable test of
+ --warn-macro-sequence.
+ (Defn): Test length of builtin token.
+ (Builtin, Ifelse, Changequote): Add more regression tests.
+
+2008-03-27 Eric Blake <ebb9@byu.net>
+
+ Add test for divert bug on 2007-05-28, patched 2007-07-21.
+ * doc/m4.texinfo (Diversions): Add test.
+
+2008-03-24 Eric Blake <ebb9@byu.net>
+
+ Pull GNUmakefile from gnulib.
+ * m4/gnulib-cache.m4: Import gnumakefile module.
+ * GNUmakefile: Remove from version control; supplied by gnulib
+ instead.
+ * configure.ac (AC_INIT): Track intra-release version with
+ git-version-gen.
+ (AC_CONFIG_LINKS): Let gnulib do this now.
+ * Makefile.am (distclean-local): Likewise.
+ (EXTRA_DIST): Likewise. Also handle renamed files.
+ * (.version, dist-hook): Improve version handling.
+ * Makefile.cfg: Rename...
+ * cfg.mk: ...to this.
+ * Makefile.maint: Rename...
+ * maint.mk: ...to this.
+ (ME, makefile-check, m4-check): Use new macro instead of
+ hard-coded name.
+ * HACKING: Mention that maintainer rules should now work in VPATH
+ builds.
+
+2008-03-15 Eric Blake <ebb9@byu.net>
+
+ Document join, in order to fix bug in m4wrap example.
+ * doc/m4.texinfo (Improved m4wrap): New node.
+ (Defn, Location): Enhance tests.
+ (Shift): Document the composite macro join.
+ (Incompatibilities): Move documentation of LIFO vs. FIFO...
+ (M4wrap): ...here, to match improved example.
+
+2008-03-10 Eric Blake <ebb9@byu.net>
+
+ Allow 'make installcheck' with './configure --program-prefix'.
+ * checks/Makefile.in (program_transform_name): New macro.
+ (installcheck): Use it to transform name of m4 before testing.
+ * checks/check-them (m4): Add -m option, to allow testing m4 by a
+ different name.
+ * checks/get-them: Allow xout and xerr notation.
+
+2008-02-25 Eric Blake <ebb9@byu.net>
+
+ Improve release process.
+ * configure.ac (AM_INIT_AUTOMAKE): Increase requirement, and add
+ dist-lzma.
+ * HACKING: Update for git release procedures.
+ * Makefile.cfg: New file.
+ * GNUmakefile: Use it.
+ * Makefile.maint (gzip_rsyncable, GZIP_ENV, GIT, VC, VC-tag)
+ (VERSION_REGEXP, this-vc-tag, my_distdir, null_AM_MAKEFLAGS)
+ (TMPDIR, gnulib-version): New macros, borrowed from coreutils.
+ (makefile-check, news-date-check, changelog-check, m4-check)
+ (vc-diff-check, maintainer-distcheck, vc-dist, my-distcheck)
+ (announcement, alpha, beta, major): New rules, borrowed from
+ coreutils.
+ (TEXI2HTML, cvs-release, update-timestamps, cvs-news, cvs-commit)
+ (cvs-dist): Delete.
+ * Makefile.am (EXTRA_DIST): Distribute new file.
+
+2008-02-19 Eric Blake <ebb9@byu.net>
+
+ Clean up foreach example.
+ * doc/m4.texinfo (Foreach, Improved foreach): Document another
+ shortcoming in foreach.m4.
+
+2008-02-16 Eric Blake <ebb9@byu.net>
+
+ Add regression test for multi-character quote recursion.
+ * examples/foreach2.m4: Use $0 rather than spelling out name.
+ * examples/foreachq2.m4: Likewise.
+ * examples/forloop2.m4: Likewise.
+ * examples/hanoi.m4: Likewise.
+ * examples/trace.m4: Likewise.
+ * doc/m4.texinfo (Improved forloop): Document advantage of $0.
+ (Improved foreach): Adjust dump from file.
+
+2008-02-13 Eric Blake <ebb9@byu.net>
+
+ Fix texinfo grammar.
+ * doc/m4.texinfo (Incompatibilities): Use @. after capital.
+ (History): Use @: after abbreviations.
+ (M4exit): Use correct Latin abbreviation.
+
+2008-02-11 Eric Blake <ebb9@byu.net>
+
+ Document behavior of __gnu__().
+ * doc/m4.texinfo (Platform macros): Enhance test.
+ (Macro expansion): New test.
+
+2008-01-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * checks/Makefile.in: Use @SET_MAKE@, and use @SHELL@ rather
+ than hard-coding /bin/sh.
+ * THANKS: Update.
+ Reported by Lawson Chan.
+
+2007-12-13 Paolo Bonzini <bonzini@gnu.org> (tiny change)
+
+ * doc/m4.texinfo (Inhibiting Invocation): Fix quoting of a quoting
+ example.
+ * THANKS: Update.
+ Reported by Giovanni Toffetti.
+
+2007-12-07 Eric Blake <ebb9@byu.net>
+
+ Minor security fix: Quote output of mkstemp.
+ * src/builtin.c (mkstemp_helper): Produce quoted output.
+ * doc/m4.texinfo (Mkstemp): Update the documentation and tests.
+ * NEWS: Document this change.
+
+2007-12-04 Eric Blake <ebb9@byu.net>
+
+ Fix builds with OpenBSD make.
+ * doc/Makefile.am (HELP2MAN): New macro.
+ (man_MANS, m4.1): Fix rules for building m4.1 into srcdir.
+ * README: Update copyright.
+ * HACKING: Mention help2man and makeinfo dependencies.
+
+2007-11-22 Eric Blake <ebb9@byu.net>
+
+ Security fix: avoid arbitrary code execution with 'm4 -F'.
+ * src/freeze.c (produce_frozen_state): Never pass raw file name as
+ printf format.
+ * NEWS: Document this fix.
+
+2007-11-07 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo (Pseudo Arguments): Test more corner cases.
+
+2007-11-05 Eric Blake <ebb9@byu.net>
+
+ Use build-aux directory.
+ * configure.ac (PACKAGE, VERSION): Delete, since Automake does
+ this now.
+ (AC_CONFIG_AUX_DIR): Add, with auxiliary files in build-aux
+ instead of the top level.
+ (AC_INIT_AUTOMAKE): Increase requirement, and add dist-lzma.
+ * Makefile.am (EXTRA_DIST): Gnulib now manages gendocs.sh.
+ * bootstrap: Adjust accordingly.
+ * m4/gnulib-cache.m4: Add --aux-dir option.
+ * doc/Makefile.am (m4.1): Rewrite rule to use build-aux/missing.
+
+2007-10-31 Eric Blake <ebb9@byu.net>
+
+ Test more corner cases.
+ * doc/m4.texinfo (Changecom, Pseudo Arguments): Beef up tests.
+ (Improved foreach): Document alternate foreachq style.
+
+2007-10-28 Eric Blake <ebb9@byu.net>
+
+ More test coverage for autoconf usage patterns.
+ * doc/m4.texinfo (Inhibiting Invocation, Pseudo Arguments)
+ (Builtin): Add new undocumented tests.
+ (Shift): Document cond macro, and add new test.
+
+2007-10-27 Eric Blake <ebb9@byu.net>
+
+ Document one use of changequote(`(',`)').
+ * doc/m4.texinfo (Changequote): Add new test, based on recent
+ autoconf addition of m4_expand.
+
+2007-10-22 Eric Blake <ebb9@byu.net>
+
+ Never let printf failures go undetected.
+ * m4/gnulib-cache.m4: Import announce-gen, git-version-gen,
+ intprops, strtod, and xprintf modules. Remove deprecated free
+ module. Replace vasprintf-posix and xvasprintf with
+ xvasprintf-posix.
+ * src/m4.h: Include xprintf.h.
+ * src/builtin.c (ntoa): Export.
+ (m4_errprint): Adjust all *printf callers.
+ * src/debug.c (debug_message_prefix, trace_format): Likewise.
+ * src/freeze.c (produce_frozen_state): Likewise.
+ * src/input.c [DEBUG_INPUT]: Likewise.
+ * src/m4.c (usage): Likewise.
+ * src/m4.h (DEBUG_PRINT1, DEBUG_PRINT3, DEBUG_MESSAGE)
+ (DEBUG_MESSAGE1, DEBUG_MESSAGE2): Likewise.
+ * src/output.c (shipout_text, freeze_diversione): Likewise.
+ * src/path.c [DEBUG_INCL]: Likewise.
+ * src/stackovf.c (process_sigsegv) [DEBUG_STKOVF]: Likewise.
+ * src/symtab.c [DEBUG_SYM]: Likewise.
+
+2007-10-17 Eric Blake <ebb9@byu.net>
+
+ Fix 'm4 -F file -t undefined'.
+ * src/freeze.c (produce_frozen_state): Avoid core dump.
+ * doc/m4.texinfo (Using frozen files): Test for the bug.
+ * NEWS: Mention the fix.
+
+2007-10-09 Eric Blake <ebb9@byu.net>
+
+ Avoid regexp regression.
+ * doc/m4.texinfo (Regexp, Patsubst): Test \ expansion.
+
+2007-10-02 Eric Blake <ebb9@byu.net>
+
+ Add more examples and tests.
+ * doc/m4.texinfo (Patsubst): Use the examples directory. Also
+ document shortfall.
+ (Improved capitalize): New node.
+ (Index macro, Regexp): Test more code paths.
+ * examples/capitalize.m4: Update to match manual.
+ * examples/capitalize2.m4: New file.
+ * examples/foreachq3.m4: Likewise.
+ * examples/join.m4: Likewise.
+ * examples/loop.m4: Likewise.
+ * examples/wraplifo.m4: Likewise.
+ * examples/wraplifo2.m4: Likewise.
+ * examples/Makefile.am (EXTRA_DIST): Distribute new files.
+
+2007-09-24 Eric Blake <ebb9@byu.net>
+
+ Create .gitignore alongside .cvsignore.
+ * bootstrap (LC_ALL): Set up front.
+ (version control) Borrow idea from head, to avoid churn in
+ m4/.*ignore files modified by gnulib-tool.
+
+2007-09-13 Eric Blake <ebb9@byu.net>
+
+ * AUTHORS: Fix typo.
+
+2007-09-07 Eric Blake <ebb9@byu.net>
+
+ * AUTHORS: Simplify, to match libtool and autoconf layout.
+ * THANKS: Sync with head.
+
+2007-08-10 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo (Compatibility): Sync with head.
+
+2007-08-10 Konrad Schwarz <konrad.schwarz@siemens.com> (tiny change)
+ and Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo (Defn): Update wording.
+
+2007-08-09 Eric Blake <ebb9@byu.net>
+
+ POSIX requires defn(`a',`b') to concatenate definitions.
+ * src/builtin.c (m4_defn): Allow multiple arguments, but warn if
+ trying to mix a builtin with anything else.
+ * doc/m4.texinfo (Defn): Document a use for this POSIX
+ requirement.
+ (Incompatibilities): Update to match current status.
+ * NEWS: Document this change.
+ * THANKS: Update.
+ Reported by Konrad Schwarz.
+
+2007-08-04 Eric Blake <ebb9@byu.net>
+
+ Normalize all GPL license notices.
+ * GNUmakefile: Update license wording.
+ * Makefile.am: Likewise.
+ * Makefile.maint: Likewise.
+ * bootstrap: Likewise.
+ * commit: Likewise.
+ * configure.ac: Likewise.
+ * checks/Makefile.in: Likewise.
+ * doc/Makefile.am: Likewise.
+ * examples/Makefile.am: Likewise.
+ * src/Makefile.am: Likewise.
+ * src/builtin.c: Likewise.
+ * src/debug.c: Likewise.
+ * src/eval.c: Likewise.
+ * src/format.c: Likewise.
+ * src/freeze.c: Likewise.
+ * src/input.c: Likewise.
+ * src/m4.c: Likewise.
+ * src/m4.h: Likewise.
+ * src/macro.c: Likewise.
+ * src/output.c: Likewise.
+ * src/path.c: Likewise.
+ * src/stackovf.c: Likewise.
+ * src/symtab.c: Likewise.
+
+2007-07-21 Eric Blake <ebb9@byu.net>
+
+ Fix regression on NetBSD from 2007-05-28.
+ * src/output.c (m4_tmpopen): Explicitly reset append-mode stream
+ position to byte 0.
+ * NEWS: Document this fix.
+ * THANKS: Update.
+ Reported by Thomas Klausner.
+
+2007-07-20 Eric Blake <ebb9@byu.net>
+
+ Fix 'make distcheck' issues.
+ * Makefile.am (EXTRA_DIST): No need to distribute
+ gpl-3.0.texi.diff anymore.
+ * m4/gnulib-cache.m4: Update to latest gnulib.
+
+2007-07-14 Eric Blake <ebb9@byu.net>
+
+ Reflect upstream license .texi changes.
+ * doc/m4.texinfo (Copying): Rename node...
+ (GNU General Public License): ...to this.
+ (GNU Free Documentation License): Adjust node location.
+ * local/doc/gpl-3.0.texi.diff: Remove file.
+
+2007-07-10 Eric Blake <ebb9@byu.net>
+
+ Start 1.4.10a.
+ * configure.ac (AC_INIT): Bump version number.
+ * NEWS: Start changes since 1.4.10.
+ * doc/m4.texinfo (History): Mention 1.4.11.
+ (Copying This Package, Copying This Manual): Add index entries.
+ * local/lib/version-etc.c.diff: Delete, now that gnulib has been
+ updated.
+ * Makefile.am (EXTRA_DIST): Remove dead file.
+
+2007-07-09 Eric Blake <ebb9@byu.net>
+
+ Release Version 1.4.10.
+ * doc/Makefile.am (m4_TEXINFOS): Distribute gpl-3.0.texi.
+ * Makefile.am (EXTRA_DIST): Distribute gnulib diffs.
+ * configure.ac (AC_INIT): Bump version number.
+ * NEWS: Describe changes since 1.4.9.
+
+ * src/format.c: Missed a GPLv3 conversion.
+
+ Avoid undefined behavior of %.*c in printf.
+ * src/format.c (format): Special case %c.
+ * TODO: Document that more remains to be done.
+ * NEWS: Document the fix.
+
+2007-07-05 Eric Blake <ebb9@byu.net>
+
+ Fix up gnulib-tool usage.
+ * m4/gnulib-cache.m4: Change local-dir to local, not `.'.
+ * version-etc.c.diff: Move to...
+ * local/lib/version-etc.c.diff: ...here.
+ * gpl-3.0.texi.diff: Move to...
+ * local/doc/gpl-3.0.texi.diff: ...here.
+
+2007-07-04 Eric Blake <ebb9@byu.net>
+
+ Upgrade to GPL version 3 or later.
+ * bootstrap: Pick up GPLv3.
+ * m4/gnulib-cache.m4: Augment with 'gnulib-tool
+ --local-dir=. --import gpl-3.0'.
+ * doc/m4.texinfo (Copying This Package): New appendix.
+ * NEWS: Mention this change.
+ * README: Mention why some files still claim to be version 2.
+ * version-etc.c.diff: New file, to make sure --version claims
+ correct GPL version. Temporary until gnulib makes move.
+ * gpl-3.0.texi.diff: New file, to allow inclusion of GPLv3 as
+ appendix, rather than section, of the manual.
+ * GNUmakefile: Update to new license.
+ * Makefile.am: Likewise.
+ * Makefile.maint: Likewise.
+ * commit: Likewise.
+ * configure.ac: Likewise.
+ * checks/Makefile.in: Likewise.
+ * doc/Makefile.am: Likewise.
+ * examples/Makefile.am: Likewise.
+ * src/Makefile.am: Likewise.
+ * src/builtin.c: Likewise.
+ * src/debug.c: Likewise.
+ * src/eval.c: Likewise.
+ * src/freeze.c: Likewise.
+ * src/input.c: Likewise.
+ * src/m4.c: Likewise.
+ * src/m4.h: Likewise.
+ * src/macro.c: Likewise.
+ * src/output.c: Likewise.
+ * src/path.c: Likewise.
+ * src/stackovf.c: Likewise.
+ * src/symtab.c: Likewise.
+
+2007-06-26 Eric Blake <ebb9@byu.net>
+
+ * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import assert'.
+
+2007-06-26 Karl Berry <karl@freefriends.org> (tiny change)
+
+ Match Free Software Directory categories.
+ * doc/m4.texinfo (dircategory): Update.
+
+2007-05-31 Eric Blake <ebb9@byu.net>
+
+ * src/output.c (output_text): Fix regression from 2007-05-28.
+ * doc/m4.texinfo (History): Mention 1.4.10.
+ (Format): Make testsuite output easier to debug.
+
+2007-05-29 Eric Blake <ebb9@byu.net>
+
+ Start 1.4.9c.
+ * configure.ac (AC_INIT): Bump version number.
+ * NEWS: Start changes since 1.4.9b, and fix typo.
+
+ Beta Release Version 1.4.9b.
+ * configure.ac (AC_INIT): Bump version number.
+ * NEWS: Describe changes since 1.4.9.
+
+ Improve format support.
+ * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
+ vasprintf-posix'.
+ * src/format.c (format): Parse %'hhd, %a, %A. Avoid calling
+ printf with too few arguments, as in format(%*.*d,-1,-1,1).
+ * doc/m4.texinfo (Format): Expand tests, and improve
+ documentation.
+ * NEWS: Document this change.
+
+2007-05-28 Eric Blake <ebb9@byu.net>
+
+ Fix large diversion corner cases, including 1.4.8 regression.
+ * src/output.c (m4_tmpfile, m4_tmpopen): Simplify use of errno.
+ (make_room_for): Use NULL, not 0, for pointers.
+ (insert_diversion_helper): Avoid using rewind.
+ (freeze_diversions): Allow freezing large diversions.
+ * NEWS: Document this fix.
+
+ Also run gnulib unit tests during make check.
+ * m4/gnulib-cache.m4: Augment with 'gnulib-tool
+ --tests-base=tests --with-tests'.
+ * configure.ac (AC_CONFIG_FILES): Build gnulib testdir.
+ * Makefile.am (SUBDIRS): Run gnulib tests before ours.
+
+2007-05-25 Eric Blake <ebb9@byu.net>
+
+ Backport prompts in examples from head.
+ * src/macro.c (expand_macro): Shorten message.
+ * doc/m4.texinfo (Manual, Command line files, Comments)
+ (Inhibiting Invocation, Macro Arguments, Macro expansion, Indir)
+ (Builtin, Shift, Forloop, Foreach, Dumpdef, Trace, Debug Levels)
+ (Debug Output, Include, Format, Syscmd, Mkstemp, Location)
+ (Using frozen files, Improved forloop, Improved foreach): Add
+ prompts to examples.
+ * checks/get-them: Ignore prompts in examples.
+
+ Fix sync line interaction with multiline comments.
+ * doc/m4.texinfo (Other Incompatibilities): Add example, and
+ document bug in --syncline/divert interaction.
+ (Preprocessor features): Augment test.
+ * src/m4.h (output_text): Export.
+ (shipout_text, next_token): Add parameter.
+ * src/freeze.c (reload_frozen_state): Don't interfere with
+ synclines when reloading state.
+ * src/output.c (output_text): Export.
+ (shipout_text): Take new parameter for start line of token.
+ Output at most one syncline per token.
+ * src/input.c (next_token): Report line where multiline tokens
+ start.
+ * src/macro.c (expand_input, expand_token, expand_argument):
+ Adjust callers so that line is passed from input to output.
+ * NEWS: Document this fix.
+ Reported by Sergey Poznyakoff.
+
+ Test -s in testsuite.
+ * doc/m4.texinfo (Preprocessor features): Add a test.
+ * checks/get-them: Support extra options in testsuite.
+ * checks/check-them (examples): Use extra options.
+ * THANKS: Update.
+ Reported by Sergey Poznyakoff.
+
+2007-05-24 Eric Blake <ebb9@byu.net>
+
+ Support POSIX flush semantics on all platforms.
+ * m4/gnulib-cache.m4: Remove closeout, and augment with
+ 'gnulib-tool --import closein fflush'.
+ * src/m4.h (includes): Use closein, not closeout.
+ * src/m4.c (main): Ensure stdin is flushed when not all input is
+ consumed.
+ (process_file): No return needed.
+ * src/debug.c (debug_flush_files): Rely on gnulib module, rather
+ than excluding mingw.
+ * NEWS: Document this change.
+
+ Work around cygwin and mingw fseeko bugs.
+ * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import fseeko'.
+ * src/debug.c (debug_flush_files): Prefer fseeko over fseek.
+
+2007-04-25 Eric Blake <ebb9@byu.net>
+
+ Fix negative division within eval, regression of 2007-01-06.
+ * doc/m4.texinfo (Eval): Catch this bug.
+ * src/eval.c (mult_term): Fix it.
+ * NEWS: Document this.
+ * THANKS: Update.
+ Reported by Cesar Strauss.
+
+2007-04-23 Eric Blake <ebb9@byu.net>
+
+ Start 1.4.9a.
+ * configure.ac (AC_INIT): Bump version number.
+ * NEWS: Start changes since 1.4.9.
+
+2007-03-23 Eric Blake <ebb9@byu.net>
+
+ Release 1.4.9:
+ * configure.ac (AC_INIT): Bump version number.
+ * NEWS: Describe changes since 1.4.8b.
+
+2007-03-16 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo (Mkstemp): Tweak wording.
+ * src/output.c (output_init): Adjust to latest gnulib.
+
+2007-03-15 Eric Blake <ebb9@byu.net>
+
+ Avoid Tandem/NSK's broken long long (without a symmetric unsigned
+ long long, it confuses gnulib).
+ * configure.ac (AC_TYPE_LONG_LONG_INT): Declare long long broken
+ if unsigned long long doesn't work.
+ * THANKS: Update.
+ Reported by Matthew Woehlke.
+
+2007-03-07 Eric Blake <ebb9@byu.net>
+
+ * AUTHORS: Update.
+ * doc/m4.texinfo: Minor tweaks, avoid makeinfo warning.
+
+2007-03-01 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo: Pick up more index entries from head. Follow
+ more texinfo recommendations.
+ (Sysval): Improve tests.
+
+ Avoid overfull \vbox warning from texinfo, due to indices that
+ weren't quite big enough to split across page boundaries.
+ * doc/m4.texinfo: Add lots of concept index entries.
+ (Concept Index): Move to be last, as recommended by texinfo
+ manual.
+ (Define, Arguments, Pseudo Arguments): Add more function entries.
+
+2007-02-28 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo (Eval): Clean up wording to reflext POSIX XCU ERN
+ 137.
+ (Pseudo Arguments): Add useful example.
+
+ * doc/m4.texinfo (Pushdef, Incompatibilities): Clean up wording to
+ reflect POSIX XCU ERN 118.
+
+ * src/m4.h (DEFAULT_MACRO_SEQUENCE): Factor out from...
+ * src/m4.c (usage): ...here,...
+ * src/builtin.c (set_macro_sequence): ...and here.
+ (define_user_macro): Fix typo.
+ * doc/m4.texinfo (Preprocessor features, Arguments): Fix minor
+ inaccuracies.
+ (Shift): Document composite macro argn for portably getting at
+ positional parameters beyond 9.
+ * configure.ac (AC_INIT): Bump version number.
+ * NEWS: Start changes of 1.4.8c.
+
+2007-02-24 Eric Blake <ebb9@byu.net>
+
+ Beta Release 1.4.8b:
+ * configure.ac (AC_INIT): Bump version number.
+ * NEWS: Describe changes since 1.4.8.
+
+ Reserve all uses of raw ${} in macro definitions, not just
+ ${<digit>}.
+ * src/builtin.c (set_macro_sequence): Change default macro
+ sequence.
+ * doc/m4.texinfo (Operation modes): Update to match.
+ * src/m4.c (usage): Likewise.
+ * NEWS: Likewise.
+
+2007-02-23 Eric Blake <ebb9@byu.net>
+
+ * src/m4.h (includes): Update to latest gnulib.
+
+2007-02-08 Eric Blake <ebb9@byu.net>
+
+ Rename --warn-syntax to --warn-macro-sequence[=regex], to make it
+ more flexible, and so that autoconf can use it.
+ * src/m4.h (set_macro_sequence, free_macro_sequence): New
+ prototypes.
+ * src/builtin.c (macro_sequence_buf, macro_sequence_regs)
+ (macro_sequence_inuse, set_macro_sequence, free_macro_sequence):
+ New variables and functions.
+ (define_user_macro): Allow flexibility in regular expression used
+ to trigger warning.
+ * src/m4.c (warn_syntax): Delete.
+ (usage, WARN_MACRO_SEQUENCE_OPTION, main): Implement changed
+ spelling of option, along with optional argument.
+ * doc/m4.texinfo (Operation modes, Arguments): Document this
+ change.
+ * NEWS: Document this change.
+
+2007-02-05 Eric Blake <ebb9@byu.net>
+
+ * m4/gnulib-cache.m4: Module strstr no longer exists.
+
+ Avoid bool bitfields, as they don't work on AIX.
+ * src/m4.h (bool_bitfield): New typedef.
+ (struct symbol, struct builtin): Use it.
+ * src/input.c (struct input_block): Likewise.
+ Reported by Albert Chin.
+
+ * doc/m4.texinfo (Sysval): Avoid SIGPIPE in test as unreliable.
+ Reported by Albert Chin.
+ * THANKS: Update.
+
+2006-06-18 Bruno Haible <bruno@clisp.org> (tiny change)
+
+ * doc/m4.texinfo (Input processing): Further clarifications.
+
+2007-02-03 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo (Input processing, Quoting Arguments): Beef up
+ the examples.
+ Reported by Bruno Haible.
+
+2007-02-01 Eric Blake <ebb9@byu.net>
+
+ * src/m4.c (fatal_warnings): New variable.
+ (usage): Document new -E behavior.
+ (main): Make -E an additive option.
+ (m4_error, m4_error_at_line): Change exit status when required.
+ * NEWS: Document this change.
+ * doc/m4.texinfo (Operation modes): Likewise.
+ Reported by Ralf Wildenhues.
+
+2007-01-27 Eric Blake <ebb9@byu.net>
+
+ * src/m4.h (warn_syntax): Declare.
+ (init_pattern_buffer): Export.
+ * src/m4.c (warn_syntax, usage, WARN_SYNTAX_OPTIONS)
+ (long_options, main): Implement new option.
+ * src/builtin.c (init_pattern_buffer): Allow NULL regs argument.
+ (define_user_macro): Warn on $11 and ${1} if requested.
+ * src/input.c (init_pattern_buffer): Delete duplicate method.
+ * doc/m4.texinfo (Operation modes): Document it.
+ (Arguments): Document future direction of ${11} vs. $11.
+ (Incompatibilities): Fix wording on POSIX limitations.
+ * checks/get-them: Parse @{ and @} correctly.
+ * NEWS: Document this change.
+
+2007-01-26 Eric Blake <ebb9@byu.net>
+
+ * src/builtin.c (includes): Adjust to gnulib changes.
+
+2007-01-15 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo: Pull in various improvements from head.
+ * src/builtin.c (include): Alter exit status on failure.
+ * NEWS: Document this fix.
+
+2007-01-13 Eric Blake <ebb9@byu.net>
+
+ * configure.ac (AC_CHECK_MEMBERS): Check for stack_t.ss_sp, and
+ assume the fallback of ss_base for BSDI 4.0.1.
+ * src/stackovf.c (setup_stackovf_trap) [HAVE_SIGALTSTACK &&
+ ! HAVE_STACK_T_SS_SP]: Use this check.
+ Reported by Chris McGuire.
+ * THANKS: Update.
+ * NEWS: Document the improvement.
+
+2007-01-09 Eric Blake <ebb9@byu.net>
+
+ * src/eval.c (ASSIGN): New enumerator.
+ (eval_lex): Recognize '='.
+ (equality_term): Treat '=' like '==', but warn that it is
+ deprecated.
+ * doc/m4.texinfo (Eval): Document and test this.
+ (Incompatibilities): Document the POSIX incompatibility.
+ * NEWS: Document this change.
+
+2007-01-06 Eric Blake <ebb9@byu.net>
+
+ * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import stdint'.
+ * checks/check-them: Record expected exit status.
+ * checks/get-them: Check exit status.
+ * src/m4.h (eval_t, unsigned_eval_t): Delete, use POSIX int32_t
+ instead.
+ * src/builtin.c: All users changed.
+ * src/eval.c: Likewise. Also document where we are triggering
+ undefined or implementation-defined behavior.
+ (BADOP, NEGATIVE_EXPONENT, INVALID_OPERATOR, eval_lex, evaluate)
+ (logical_or_term, logical_and_term, logical_not_term, not_term)
+ (equality_term, unary_term): Port from head to follow POSIX
+ semantics.
+ (exp_term): Reject 0**0 as undefined.
+ * doc/m4.texinfo (History): Mention 1.4.9.
+ (Format, Incompatibilities): Update to document POSIX compliance.
+ * NEWS: Document this change.
+
+2007-01-04 Eric Blake <ebb9@byu.net>
+
+ * NEWS: Document previous fix.
+ * THANKS: Update.
+
+2007-01-04 Sami Liedes <sliedes@cc.hut.fi> (tiny change)
+
+ Fix Debian bug 405594, introduced 2006-11-01 from a bad
+ copy-n-paste from head.
+ * src/m4.c (main): Use correct file name after --.
+
+2007-01-04 Eric Blake <ebb9@byu.net>
+
+ Fix regression from 1.4.7 in large file handling on some
+ platforms, introduced on 2006-10-13.
+ * configure.ac (AC_LARGE_SYSFILE): Guarantee that large files
+ will be handled.
+ * NEWS: Document this fix.
+
+2007-01-03 Eric Blake <ebb9@byu.net>
+
+ * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
+ version-etc-fsf'.
+ * src/m4.c (AUTHORS, main): Use FSF wording for --version (plus
+ it bumps the copyright year).
+
+2006-12-27 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo (Patsubst): Fix typo.
+
+2006-12-16 Eric Blake <ebb9@byu.net>
+
+ * src/m4.c (main): Check for errors when closing stdin.
+
+2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * doc/m4.texinfo: Fix some typos.
+
+2006-12-09 Eric Blake <ebb9@byu.net>
+
+ * configure.ac (AC_INIT): Bump version number.
+ * NEWS: Start changes of 1.4.8a.
+
+2006-11-20 Eric Blake <ebb9@byu.net>
+
+ Release 1.4.8:
+ * configure.ac (AC_INIT): Bump version number.
+ * NEWS: Describe changes since 1.4.7.
+
+2006-11-16 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo (Include, Search Path, Diversions, Divert):
+ Minor tweaks noticed while porting to head.
+
+2006-11-14 Eric Blake <ebb9@byu.net>
+
+ * src/output.c (cleanup_tmpfile, freeze_diversions): Clean up
+ spent iterators.
+ (m4_tmpname): Avoid memory leak.
+
+2006-11-13 Eric Blake <ebb9@byu.net>
+
+ * src/output.c (cleanup_tmpfile): Avoid double error message when
+ umask is prohibitive.
+ (m4_tmpname, m4_tmpopen, m4_tmpclose, m4_tmpremove): New
+ functions.
+ (m4_tmpfile): Add parameter, move cloexec action here.
+ (make_room_for): Adjust caller. Don't keep too many files open.
+ (insert_diversion_helper): Unlink emptied temp files.
+ (make_diversion): Don't keep too many files open.
+ * doc/m4.texinfo (Diversions): Tweak wording, now that open file
+ descriptors are no longer a limiting factor.
+ * NEWS: Document this change.
+
+ Backport sparse diversion handling from head.
+ * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
+ avltree-oset'.
+ * src/output.c (struct m4_diversion): Rename from struct
+ diversion, and update members. All users changed.
+ (diversion_table): Change to an ordered set, instead of an array.
+ (div0): New storage for diversion 0.
+ (diversions): No longer needed.
+ (free_list): New list to allow recycling diversion storage.
+ (diversion_storage): New storage to reduce malloc overhead.
+ (cmp_diversion_CB, threshold_diversion_CB): New callbacks.
+ (output_init, output_exit, cleanup_tmpfile, make_room_for)
+ (make_diversion): Handle new diversion storage scheme.
+ (insert_diversion_helper): New function.
+ (insert_diversion, undivert_all, freeze_diversions): Use it.
+ * doc/m4.texinfo (Divert, Diversions): Move hidden test of memory
+ exhaustion to visible test of large diversion numbers.
+ * NEWS: Document this fix.
+
+2006-11-11 Eric Blake <ebb9@byu.net>
+
+ * src/builtin.c (m4_translit): Slight optimization.
+
+ * src/m4.h (to_uchar): Depend on HAVE_INLINE.
+
+ * src/builtin.c: Remove unnecessary casts.
+ (expand_ranges): Make 8-bit clean.
+ * doc/m4.texinfo (Translit): Add tests and wording.
+ * NEWS: Document this fix.
+
+2006-11-07 Eric Blake <ebb9@byu.net>
+
+ * src/m4.h (output_exit): New prototype.
+ * src/m4.c (main): Use it.
+ * src/output.c (cleanup_tmpfile): Close files before removing
+ directory.
+ (insert_diversion): Check for failure.
+ (output_exit): Avoid memory leak.
+ * doc/m4.texinfo (Diversions): Test this bug.
+
+ * doc/m4.texinfo (Esyscmd, Errprint): Minor touchups.
+
+2006-11-01 Eric Blake <ebb9@byu.net>
+
+ Allow C++ compilation on Linux, as a safety measure in type
+ checking.
+ * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
+ stdbool'.
+ * src/m4.h (hack_symbol, hack_all_symbols): Use full prototype.
+ (boolean): Kill this, and use stdbool.h instead.
+ * src/debug.c, src/eval.c, src/input.c, src/macro.c, src/m4.c:
+ * src/output.c, src/symtab.c: All users changed.
+ * src/symtab.c (hack_all_symbols): Update prototype.
+ * src/builtin.c (dump_symbol, set_trace): Update signature.
+ (m4_dumpdef, m4_traceon, m4_traceoff): Update callers.
+ (mkstemp_helper, m4_m4wrap, expand_ranges, m4_translit): Allow
+ C++ compilation.
+ * src/debug.c (trace_flush): Likewise.
+ * src/freeze.c (reload_frozen_state): Likewise.
+ * src/input.c (push_file, push_string_finish, push_wrapup):
+ (token_bottom, next_token): Likewise.
+ * src/m4.c (main): Likewise.
+
+ * doc/m4.texinfo (Invoking m4): Update according to POSIX 200x
+ draft wording.
+ * src/m4.h (m4_path_search): Tweak signature.
+ * src/path.c (m4_path_search): Likewise.
+ * src/builtin.c (include): Update caller.
+ * src/m4.c (main): Allow -D, -U, -t, and -s to be interspersed
+ with file names. Don't write to **argv.
+ (process_file): New helper method.
+ * NEWS: Document this fix.
+
+2006-10-31 Eric Blake <ebb9@byu.net>
+
+ * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import strstr'.
+ * doc/m4.texinfo (Translit): Improve the documentation.
+ * src/builtin.c (m4_translit): Optimize to O(n) instead of O(n^2)
+ algorithm.
+ (m4_index): Simplify, and speed up slightly.
+ * NEWS: Document this fix.
+
+2006-10-28 Eric Blake <ebb9@byu.net>
+
+ * src/input.c (set_quotes): Don't allow empty end-quote with
+ non-empty start-quote.
+ (set_comment): Likewise for end-comment.
+ * src/builtin.c (m4_changecom): Adjust caller.
+ * doc/m4.texinfo (Changequote, Changecom): Update documentation to
+ match behavior.
+ (Incompatibilities): Document another POSIX bug.
+ * NEWS: Mention this change.
+
+2006-10-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * examples/Makefile.am (EXTRA_DIST): Distribute recently-added
+ files.
+
+2006-10-26 Eric Blake <ebb9@byu.net>
+
+ Silence -Wwrite-strings -Wpointer-arith warnings.
+ * src/builtin.c (define_user_macro): Allow NULL argument.
+ (m4_builtin, m4_indir): Cast away const of "".
+ * src/format.c (format): Likewise.
+ * src/macro.c (collect_arguments): Likewise.
+ (expand_macro): Avoid math on void*.
+ * src/m4.c (main): Adjust caller.
+ * src/output.c (freeze_diversions): Detect off_t overflow.
+
+ * src/input.c (pop_input): Remove unnecessary code.
+
+2006-10-25 Eric Blake <ebb9@byu.net>
+
+ * src/symtab.c (symtab_init): Avoid size_t overflow.
+ * src/output.c (make_diversion): Avoid size_t overflow.
+ * doc/m4.texinfo (Diversions): Test this fix.
+ * src/input.c (input_block): Remove unused member. Reduce size
+ of struct.
+ (push_file, pop_input): Avoid useless assignment.
+ * NEWS: Document the bug fix.
+
+ Redo location tracking. Instead of having just files track the
+ line to return to when popping input, now all input blocks track
+ their current line.
+ * src/input.c (INPUT_STRING_WRAP, INPUT_FILE_INIT): No longer
+ needed.
+ (input_block): Have line and file storage for all input types, and
+ rename some members.
+ (input_change): New global flag.
+ (push_file, push_macro, push_string_init, push_wrapup): Store
+ location.
+ (push_string_finish, pop_input, pop_wrapup): Notice changes in
+ input blocks.
+ (peek_input): Adjust to new member names.
+ (next_char, next_char1): Adjust location if needed.
+ (skip_line): Simplify restoring location.
+ * doc/m4.texinfo (Location): Augment the test to catch line
+ location of expansion of multi-line arguments.
+ Reported by Stepan Kasal.
+
+2006-10-23 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo (Macro Arguments): Document that leading space
+ in argument collection stops at macro expansion.
+ (Incompatibilities): Document POSIX whitespace wording issue.
+
+2006-10-20 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo: Trailing '@comment' doesn't format nicely in
+ TeX, so recognize '@w{ }' instead. Likewise, @code{_name} at the
+ end of a TeX line splits incorrectly.
+ (Foreach, Improved foreach): Write these sections, borrowing ideas
+ from CVS head and from m4sugar.
+ * checks/get-them: Accomodate new way to show trailing space in
+ examples.
+ * examples/foreach.m4: Make usable in documentation.
+ * examples/foreachq.m4: New file.
+ * examples/foreachq2.m4: New file.
+ * examples/foreach2.m4: New file.
+ * NEWS: Document the documentation updates.
+
+2006-10-19 Eric Blake <ebb9@byu.net>
+
+ * src/builtin.c (mkstemp_helper, m4_mkstemp): New functions.
+ (m4_maketemp): Provide traditional behavior.
+ * doc/m4.texinfo (Mkstemp): Rename from Maketemp. Document the
+ new `mkstemp' macro and the flaws of the old `maketemp'.
+ (Incompatibilities): Move maketemp discussion to...
+ (Extensions): ...here, since -G now supresses the GNU extension.
+ * NEWS: Document this.
+
+ * examples/forloop.m4: Simplify.
+ * examples/forloop2.m4: New file.
+ * examples/quote.m4: New file.
+ * doc/m4.texinfo (Loops): Rename to...
+ (Shift): ...this node.
+ (Forloop, Foreach, Improved forloop, Improved foreach): New
+ nodes.
+
+2006-10-17 Eric Blake <ebb9@byu.net>
+
+ * m4/gnulib-cache.m4: Update with 'gnulib-tool --import
+ config-h'.
+ * configure.ac (AC_CONFIG_HEADERS): Create config.h alongside
+ gnulib headers, rather than in top directory.
+ * src/Makefile.am (AUTOMAKE_OPTIONS): Add nostdinc, to reduce make
+ output clutter.
+
+2006-10-16 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo: Backport some minor cleanups from head.
+ (Cleardivert): Rename from cleardiv.
+
+ * doc/m4.texinfo (Invoking m4): Promote to a chapter, instead of
+ a section of Preliminaries.
+ (Operation modes, Preprocessor features, Limits control)
+ (Frozen state, Debugging options, Command line files): Subdivide
+ into new sections.
+ (Input processing, Quoting Arguments, Define, Arguments)
+ (Cleardiv, Format, M4exit): Fix grammar of references.
+ (Inhibiting Invocation, Macro Arguments, Builtin, Trace)
+ (Debug Levels, Debug Output, Include, Search Path, Divert)
+ (Platform macros, Syscmd, Location, Extensions): Point to new
+ sections.
+ (Top, Loops, Include, Undivert, Location, Incompatibilities):
+ Improve file references.
+
+2006-10-14 Eric Blake <ebb9@byu.net>
+
+ * m4/input.c (file_clean): Don't close stdin twice, POSIX says it
+ is not portable.
+ Reported by Ralf Wildenhues.
+
+ * src/builtin.c (m4_undivert): Check for read error.
+
+2006-10-13 Eric Blake <ebb9@byu.net>
+
+ * src/m4.h (UNIX, W32_NATIVE, OS2): Move platform checks after
+ header files are included, since <unistd.h> can affect the tests.
+ * THANKS: Updated.
+ Reported by Martin Koeppe.
+
+ Backport head's usage of clean-temp module, as it is cleaner than
+ using tmpfile-safer.
+ * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import
+ clean-temp closeout', and remove tmpfile-safer.
+ * src/m4.h (includes): Adjust.
+ (m4_path_search): Rename from path_search, to avoid collision
+ with gnulib.
+ * src/m4.c (main): Install closeout handler. Adjust caller.
+ (usage): Now done by closeout module.
+ * src/builtin.c (m4_m4exit): Likewise.
+ (m4_undivert, include): Adjust callers.
+ * src/freeze.c (reload_frozen_state): Likewise.
+ * src/path.c (m4_path_search): Rename from path_search.
+ * src/output.c (output_temp_dir): New variable.
+ (cleanup_tmpfile, m4_tmpfile): New functions, from head.
+ (insert_diversion, make_room_for): Use them.
+ * doc/m4.texinfo (Diversions): Document this, and add a test.
+ (Improved fatal_error): Fix typo.
+ (Maketemp): Port test to mingw, and no longer hide from
+ documentation.
+ * NEWS: Document the change in TMPDIR behavior.
+
+ * configure.ac (m4_pattern_forbid): Narrow the range of forbidden
+ macros, to work with recent gnulib-tool update.
+
+ * src/builtin.c (m4_builtin, m4_indir): Allow transparent
+ handling of defn results.
+ * doc/m4.texinfo (Builtin, Indir): Add test cases.
+ * NEWS: Document this.
+
+2006-10-12 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo (Location): Fix typo in previous commit.
+ (Changeword): Catch one more case.
+ * src/input.c (skip_line): Fix case when outer file used macro to
+ supply the \n.
+
+2006-10-11 Eric Blake <ebb9@byu.net>
+
+ * src/input.c (enum input_type): Add additional types, to shave
+ time off the common case.
+ (push_wrapup): Wrapped strings remember location.
+ (push_string_finish): Normal strings carry no location.
+ (push_file): Start new files uninitialized.
+ (peek_input, next_char_1): Optimize common cases by updating
+ location only on new input types.
+ (pop_input): Update to honor new input types.
+ (skip_line, push_string_finish): Fix regression in previous patch
+ when dnl is not followed by newline in included file.
+ (push_string_init): Initialize all fields of INPUT_STRING sooner.
+ (peek_token): Simplify.
+ (peek_input): Don't pop input files on peek, so that __file__ and
+ __line__ as last token of include file work correctly.
+ * doc/m4.texinfo (History): Mention 1.4.8.
+ (Answers): Split into sections, one per answer.
+ (Improved exch, Improved cleardivert, Improved fatal_error): New
+ nodes.
+ (Dnl, M4wrap, Location, M4exit, Improved fatal_error): Update to
+ new m4wrap location semantics.
+ (Changeword): Add test that caught the regression.
+ * NEWS: Document this.
+
+ * src/macro.c (expand_macro): In macro expansion errors, report
+ line number at open parenthesis.
+ * src/input.c (next_token): Fix off-by-one bug in reporting end
+ of file in unterminated comment and string.
+ (file_names): New obstack, necessary since expand_macro now hangs
+ on to file names longer than the files remain open.
+ (input_init): Initialize new obstack.
+ (push_file): Use new obstack. Delay updates to current_file
+ until after expand_macro has restored state.
+ (peek_input, next_char_1): Update current_file if necessary.
+ (pop_wrapup): Release memory.
+ * doc/m4.texinfo (Macro Arguments, Changequote, Changecom): Catch
+ the off-by-one bug.
+ (Dnl): Update to the new location reporting rules.
+ * NEWS: Document these changes.
+
+2006-10-10 Eric Blake <ebb9@byu.net>
+
+ * src/macro.c (argc_stack, argv_stack): New variables for sharing
+ obstacks across multiple macro calls.
+ (expand_input): Initialize and tear down stack once per input
+ file, instead of once per macro.
+ (expand_macro): Reuse existing stacks when possible.
+ (collect_arguments): Simplify slightly.
+
+ * src/path.c (include_env_init): Fix botched patch application.
+ Reported by Ralf Wildenhues.
+
+2006-10-09 Eric Blake <ebb9@byu.net>
+
+ * src/m4.c (usage, main): Detect write failures to stderr.
+ * src/builtin.c (m4_m4exit): Likewise.
+ * NEWS: Document this.
+
+ * src/macro.c (expand_macro): Allow --nesting-limit=0 to remove
+ the limit.
+ * NEWS: Document this.
+ * doc/m4.texinfo (Invoking m4): Likewise.
+
+2006-10-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * src/path.c (include_env_init): Copy the string returned
+ by getenv before overwriting it; POSIX disallows this.
+
+2006-10-09 Eric Blake <ebb9@byu.net>
+
+ * src/m4.c (main): Defer debugfile until after --help.
+ * configure.ac (AC_INIT): Bump version number.
+ * NEWS: Start changes of 1.4.7a.
+
+2006-09-25 Eric Blake <ebb9@byu.net>
+
+ Release 1.4.7:
+ * configure.ac (AC_INIT): Bump version number.
+ * NEWS: Describe changes since 1.4.6.
+
+2006-09-21 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo (Invoking m4): Add clarification on option
+ processing behavior.
+ * THANKS: Update.
+ Reported by Mikhail Teterin.
+
+ * bootstrap: Add --force option, based on idea from coreutils.
+ * README: Document that ./bootstrap and autoreconf are for
+ developers, and not lightly done in tarballs.
+
+2006-09-20 Eric Blake <ebb9@byu.net>
+
+ * src/m4.c (usage, OPTSTRING, main): Rename -e to -i, and give
+ deprecation warning on -e.
+ * doc/m4.texinfo (Invoking m4, Extensions): Document this.
+ * NEWS: Document this.
+
+2006-09-19 Eric Blake <ebb9@byu.net>
+
+ * src/m4.c (usage, long_options, main, DEBUGFILE_OPTION): Rename
+ -o/--error-output to --debugfile, and deprecate the former. This
+ will allow a future release to be more consistent with other GNU
+ tools, with -o/--output affecting stdout, not debug.
+ * doc/m4.texinfo (Invoking m4, Debug Output): Document this.
+ * NEWS: Document this.
+
+2006-09-14 Eric Blake <ebb9@byu.net>
+
+ * src/m4.c (main): Warn on deprecated options -B, -S, -T, -N,
+ --diversions. `m4 --help --version' now displays help, not
+ version.
+ (interactive, frozen_file_to_read, frozen_file_to_write): Move to
+ smaller scope.
+ (show_help, show_version): No longer needed.
+ (long_options, DIVERSIONS_OPTION): Backport patch from head to
+ distinguish between -N and --diversions in warning.
+ * doc/m4.texinfo (Invoking m4): Document this.
+ * NEWS: Likewise.
+
+2006-09-11 Eric Blake <ebb9@byu.net>
+
+ * src/Makefile.am (m4_LDADD): Add any gnulib dependent libraries.
+ * src/debug.c (debug_flush_files) [UNIX]: Flush stdin if it is
+ seekable.
+ (debug_set_file): Use STDOUT_FILENO.
+ * src/builtin.c (m4_m4exit): Flush stdin before exiting, to comply
+ with POSIX in regards to unread input.
+ * NEWS: Document this fix.
+ * doc/m4.texinfo (Syscmd, Esyscmd, M4exit): Likewise.
+
+2006-09-07 Eric Blake <ebb9@byu.net>
+
+ * m4/gnulib-cache.m4: Update to newer gnulib-tool.
+ * src/m4.h (push_file): Change prototype.
+ * src/input.c (push_file, peek_input, next_char_1): Only call getc
+ once at EOF, to avoid double ^D on terminal stdin; regression from
+ 2006-09-04.
+ (push_file, pop_file): Allow reading stdin twice.
+ * src/m4.c (main): Likewise.
+ * src/builtin.c (include): Update caller.
+ * NEWS: Document this change.
+ * doc/m4.texinfo (Invoking m4, Incompatibilities): Likewise.
+ (Syscmd): Add a test that failed before this patch.
+
+2006-09-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * checks/check-them: Quote $pwd.
+
+2006-09-05 Eric Blake <ebb9@byu.net>
+
+ * src/builtin.c (define_macro): Warn on invalid macro name.
+ * NEWS: Document this change.
+ * doc/m4.texinfo: Fix typos.
+ (Invoking m4, Macro Arguments, Pseudo Arguments, Defn, Indir)
+ (Ifelse): Backport some improvements from head.
+
+2006-09-04 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo (Changeword): Skip test on mingw, where the
+ native echo is braindead.
+ * checks/check-them (strip_needed): Ignore \r in output. Now the
+ testsuite will pass when cross-compiling from cygwin to mingw.
+
+ * src/input.c (peek_input): Fix regression in handling macro
+ without arguments as last token in file; debian bug 385720.
+ (next_token): Always consume an input character.
+ Reported by Andreas Schultz.
+ * configure.ac (AC_INIT): Bump version number.
+ * NEWS: Document this fix.
+ * doc/m4.texinfo (History): Mention next version.
+ (Changeword): Add example that exposes this bug.
+ * THANKS: Update.
+
+2006-08-25 Eric Blake <ebb9@byu.net>
+
+ Release 1.4.6:
+ * configure.ac (AC_INIT): Bump version number.
+ * NEWS: Describe changes since 1.4.5.
+
+ * Makefile.maint (web-manual): Give up on VPATH build during
+ distribution. But distributions are made so infrequently that
+ this is not too much of a hardship.
+ * Makefile.am (MAINTAINERCLEANFILES): Avoid error if lib/CVS/
+ exists.
+
+2006-08-24 Eric Blake <ebb9@byu.net>
+
+ * src/builtin.c (m4_index, m4_substr, m4_translit): Similar to
+ Solaris, produce output on just one argument.
+ (m4_regexp, m4_patsubst): For consistency, do likewise.
+ (m4_patsubst): Allow zero-length match at end of string.
+ * doc/m4.texinfo (Sysval): Fix overfull hbox.
+ (Bugs, Macro Arguments): Minor fixes.
+ (Other tokens): Rearrange node order.
+ (Index macro, Substr, Translit, Regexp, Patsubst): Add tests.
+ * NEWS: Document these fixes.
+
+2006-08-22 Eric Blake <ebb9@byu.net>
+
+ * src/input.c (pop_input): Avoid empty filename with -di option.
+ * src/debug.c (debug_message_prefix): Put space before message.
+
+ * m4/gnulib-cache.m4: We don't explicitly use alloca module.
+
+ * m4/gnulib-cache.m4: Augment with gnulib-tool --import gnupload.
+ * Makefile.maint (fetch): Simplify, now that we can use gnupload.
+
+ * checks/check-them: State why a test is skipped.
+ * doc/m4.texinfo (Changeword, Sysval, Maketemp): Likewise.
+
+ * ChangeLog: Add copyright.
+ * AUTHORS: Likewise.
+ * BACKLOG: Likewise.
+ * README: Likewise.
+ * THANKS: Likewise.
+ * TODO: Likewise.
+ * examples/COPYING: New file, add copyright for all the examples.
+ * checks/get-them: Put copyright on testsuite files.
+
+2006-08-18 Eric Blake <ebb9@byu.net>
+
+ Don't let unrelated child processes see too many files.
+ * m4/gnulib-cache.m4: Augment with gnulib-tool --import cloexec.
+ * src/builtin.c (m4_esyscmd, m4_regexp, m4_patsubst): Fix
+ spelling in error message.
+ * src/debug.c [!__STDC__]: Assume C89, and nuke old varargs.h.
+ (debug_set_output): Close debug file on exec.
+ * src/m4.h (includes): Add cloexec.h.
+ * src/output.c (make_room_for): Close diversions on exec.
+ * src/path.c (path_search): Close include files on exec.
+ * NEWS: Document this.
+
+ Regular expressions were leaking memory.
+ * src/builtin.c (init_pattern_buffer, free_pattern_buffer): New
+ helper methods.
+ (m4_regexp, m4_patsubst): Avoid memory leak.
+ * src/input.c (init_pattern_buffer) [ENABLE_CHANGEWORD]: Make
+ static.
+ (set_word_regexp) [ENABLE_CHANGEWORD]: Avoid memory leak. Change
+ from O(n^2) to O(n) for calculating word_start.
+ (next_token, peek_token) [ENABLE_CHANGEWORD]: Treat word_start as
+ O(1) bitmap, not O(n) search string.
+ * NEWS: Document this fix.
+
+2006-08-17 Eric Blake <ebb9@byu.net>
+
+ * NEWS: Document previous checkin.
+
+ * src/builtin.c (substitute): Avoid core dump when accessing
+ beyond bound of regular expression.
+ Reported by Karl Nelson.
+ * doc/m4.texinfo (Regexp): Add example that causes core dump on
+ some architectures prior to this patch.
+ * THANKS: Updated.
+
+2006-08-16 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo (Invoking m4, Debug Output): Fix wording to be
+ clear that dumpdef does not always go to stderr.
+
+ * src/builtin.c (m4_errprint): Flush buffers before printing to
+ stderr.
+ * THANKS: Updated.
+
+2006-08-15 Eric Blake <ebb9@byu.net>
+
+ * src/builtin.c (m4_m4wrap, m4_errprint, m4_shift): Make blind,
+ per debian bug 96075.
+ * doc/m4.texinfo (Loops, M4wrap, Errprint): Document this change.
+ (Changeword): Don't use shift as an example of a swallowed word.
+ (Divert): Discuss fact that divert is an English word.
+ Reported by Richard A Nelson.
+
+2006-08-14 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo (Invoking m4): Minor fixes.
+
+2006-08-12 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo (Arguments): Hint at better exch macro.
+ (Answers): Provide a better definition.
+
+2006-08-09 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo (Incompatibilities): Document that m4 does not
+ yet understand locales.
+ * NEWS: Fix wording of a few items.
+
+2006-08-08 Eric Blake <ebb9@byu.net>
+
+ Avoid printing `NONE:0:' in error messages.
+ * src/m4.h (m4_error_at_line): New function.
+ * src/m4.c (m4_error_at_line): Implement.
+ * src/input.c (skip_line, input_init, next_token): Use "", not
+ "NONE", for no file, since NONE can be a real file name.
+ * src/macro.c (expand_argument): Likewise.
+ * src/debug.c (debug_message_prefix, trace_header): Check for
+ current file.
+ * doc/m4.texinfo (Dnl, M4wrap): Adjust accordingly.
+ (Location): Document that synclines and internal message format
+ are not impacted by redefining these macros.
+ (M4exit): Hint at bug in fatal_error.
+ (Answers): Provide workaround to match m4 output.
+
+ * m4/gnulib-cache.m4: Augment with gnulib-tool --import verror.
+ * src/m4.h (m4_error): New function.
+ (M4ERROR, M4ERROR_AT_LINE): Reimplement without hacking around
+ error module deficiencies.
+ (reference_error, suppress_line): No longer needed.
+ * src/m4.c (m4_error): Implement.
+ (main): No longer need to install error callback.
+
+2006-08-04 Eric Blake <ebb9@byu.net>
+
+ * src/m4.h (program_name): Declare.
+ (suppress_line): New variable.
+ (M4ERROR_AT_LINE): New macro.
+ * src/m4.c (reference_error, main): Follow GNU Coding Standards
+ for error message format.
+ * src/input.c (skip_line, next_token): Use M4ERROR_AT_LINE.
+ * src/macro.c (expand_argument): Likewise.
+ * checks/check-them (examples): Adjust to new message format.
+ * src/builtin.c (m4___program__): New builtin.
+ * doc/m4.texinfo (Location): Split from Errprint into new node,
+ and document __program__.
+ (Builtin, Ifdef, Ifelse, Dumpdef, Trace, Debug Output, Dnl)
+ (Include, Regexp, Patsubst, Incr, Eval): Adjust error message
+ format.
+ (Extensions): Document __program__.
+ * NEWS: Document this change.
+
+2006-08-03 Eric Blake <ebb9@byu.net>
+
+ Don't confuse leading `(' in comment or quote with start of
+ argument collection.
+ * src/m4.h (enum token_type): Add TOKEN_OPEN, TOKEN_COMMA,
+ TOKEN_CLOSE.
+ (peek_input): Make private to input.c.
+ (peek_token): New prototype.
+ * src/input.c (default_word_regexp): Reduce ifdefs.
+ (peek_input): Make static.
+ (next_token): Return new token types.
+ (match_input, MATCH): Add argument consume, which controls
+ whether match should be pushed back.
+ (peek_token): New function.
+ (token_type_string) [DEBUG_INPUT]: New function.
+ * src/macro.c (expand_token, expand_argument, collect_arguments):
+ Handle new token types.
+ * doc/m4.texinfo (Changequote, Changecom): Document this.
+ * NEWS: Document this.
+
+ * src/stackovf.c (setup_stackovf_trap): Free memory on failure.
+
+ * src/stackovf.c (setup_stackovf_trap): Gracefully avoid stack
+ overflow detection when sigstack exists but is not implemented.
+ Fixes debian bug 154053.
+ * THANKS: Updated.
+ Reported by David Perlin.
+
+2006-08-02 Eric Blake <ebb9@byu.net>
+
+ * src/input.c (MATCH): Fix EOF detection on multi-byte comment
+ close.
+
+2006-08-01 Eric Blake <ebb9@byu.net>
+
+ * src/input.c (skip_line, next_token): Remember current file in
+ case input file ends abruptly. Addresses debian bug 175365.
+ (pop_input): Defer freeing storage that holds previous file
+ name...
+ (pop_wrapup): to here, after error message is issued.
+ * src/macro.c (expand_argument): Remember current file in case
+ input file ends abruptly.
+ * doc/m4.texinfo (Macro Arguments, Dnl, Changequote, Changecom)
+ (M4wrap): Adjust testsuite accordingly.
+ (Errprint): Document line number limitation of m4wrap.
+ * NEWS: Document this fix.
+ * THANKS: Update.
+
+2006-07-31 Eric Blake <ebb9@byu.net>
+
+ * src/input.c (peek_input, next_char, match_input): Be eight-bit
+ clean; fixes debian bug 311378.
+ * doc/m4.texinfo (Syntax): Describe eight-bit handling.
+ (Changequote, Changecom): Add examples to test this.
+ * NEWS: Document this fix.
+ * THANKS: Update.
+ Reported by Steven Augart.
+
+ * doc/m4.texinfo: Whitespace fix.
+ * checks/get-them: Avoid exceeding 14-char file name limit.
+ * THANKS: Update.
+
+2006-07-30 Eric Blake <ebb9@byu.net>
+
+ * src/path.c (path_search): Detect allocation failure.
+
+ Use native free when it is good enough.
+ * m4/gnulib-cache.m4: Augment with gnulib-tool --import free.
+ * src/builtin.c (define_user_macro, m4_regexp, m4_patsubst):
+ Adjust calls.
+ * src/symtab.c (free_symbol): Likewise.
+ * src/m4.c (xfree, main): Likewise.
+ * src/m4.h (obstack_chunk_free): Likewise.
+ * src/path.c (path_search): Likewise.
+ * src/input.c (pop_wrapup, set_quotes, set_comment): Likewise.
+
+ * doc/m4.texinfo (Errprint): Add example for last patch.
+ * checks/check-them: Account for VPATH in latest example.
+
+2006-07-29 Eric Blake <ebb9@byu.net>
+
+ * src/path.c (path_search): Add result parameter, so that
+ -I can be accounted for. Debian bug 53685.
+ * src/m4.h (path_search): Update prototype.
+ * src/m4.c (main): Adjust callers.
+ * src/freeze.c (reload_frozen_state): Likewise.
+ * src/builtin.c (include, m4_undivert): Likewise.
+ * NEWS: Document this change.
+ Reported by Nicolas Lichtmaier.
+
+2006-07-28 Eric Blake <ebb9@byu.net>
+
+ * Makefile.am (MAINTAINERCLEANFILES): Fix typo that tripped up
+ several non-GNU makes.
+ * src/stackovf.c (setup_stackovf_trap): Missed _ from yesterday.
+ * src/m4.h: Likewise.
+ * src/input.c (push_wrapup): Avoid compiler warning with Solaris
+ /usr/ccs/bin/ucbcc.
+
+2006-07-27 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo: Use @acronym{GNU} throughout.
+ (History): Update for 1.4.6.
+
+ * src/m4.h (_): Remove K&R cruft.
+ * src/builtin.c: Likewise.
+ * src/debug.c: Likewise.
+ * src/eval.c: Likewise.
+ * src/macro.c: Likewise.
+ * src/stackovf.c: Likewise.
+
+ * doc/Makefile.am (m4.1): Improve man page.
+ * src/m4.c (usage): Improve --help output, including adding the
+ bug reporting address.
+ (main): Follow GNU Coding Standards for --version output.
+
+2006-07-26 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo: Use begin-quote, end-quote, begin-comment, and
+ end-comment consistently, to match POSIX.
+
+ * doc/m4.texinfo (Macro Arguments, Changequote, Changecom)
+ (Dnl, M4wrap, Include): Document EOF issues, and add examples.
+ (Incompatibilities): Document incompatibility of changecom
+ vs. macro names, and of EOF in include.
+ * src/input.c (next_token): Reject unterminated comments at EOF.
+ (skip_line): Warn on unterminated dnl at EOF.
+ * NEWS: Document these changes.
+
+2006-07-25 Eric Blake <ebb9@byu.net>
+
+ * m4/gnulib-cache.m4: Update to reflect gnulib's split of
+ stdio-safer into fopen-safer and tmpfile-safer.
+ * src/m4.c: Remove redundant include.
+
+2006-07-24 Eric Blake <ebb9@byu.net>
+
+ Fix bugs related to stream handling.
+ * m4/gnulib-cache.m4: Augment with gnulib-tool --import
+ unlocked-io stdio-safer stdlib-safer close-stream.
+ * configure.ac (AC_CHECK_FUNCS_ONCE): Assume tmpfile; it can be
+ provided by gnulib if needed.
+ * src/output.c [! HAVE_TMPFILE]: Likewise.
+ * src/m4.h (includes): Replace unistd, stdio, and stdlib with
+ their safer counterparts.
+ (retcode): New global variable.
+ * src/input.c (pop_input): Check for read failure.
+ * src/freeze.c (reload_frozen_state): Likewise.
+ (produce_frozen_state): Check for write failure.
+ * src/debug.c (debug_set_file): Likewise.
+ * src/m4.c (usage, main): Likewise.
+ (retcode): Make global.
+ * src/builtin.c (m4_m4exit): Likewise. Ensure that the exit
+ status is non-zero except when everything succeeds.
+ * doc/m4.texinfo (M4exit): Document these changes.
+ (Incompatibilities): Remove documentation of bug now fixed.
+ * NEWS: Document these fixes.
+
+2006-07-22 Eric Blake <ebb9@byu.net>
+
+ * src/format.c (format): Avoid compiler warning that str may be
+ used uninitialized.
+
+2006-07-21 Eric Blake <ebb9@byu.net>
+
+ * src/m4.h [UNIX]: Add more platforms that are close enough to
+ categorize as UNIX, but which don't predefine __unix__.
+ Reported by Nelson H. F. Beebe.
+
+2006-07-20 Eric Blake <ebb9@byu.net>
+
+ * m4/gnulib-cache.m4: gnulib-tool has changed again. Regenerate
+ to explicitly ask for --assume-autoconf=2.60.
+
+2006-07-19 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo (Sysval): Avoid kill -1, since ksh traps SIGHUP
+ and exits normally with 129.
+ Reported by Nelson H. F. Beebe.
+ * THANKS: Update.
+
+ * src/m4.h (EXIT_MISMATCH): Define.
+ * src/freeze.c (reload_frozen_state): Detect version mismatch, by
+ exiting with status 63.
+ * src/m4.c (usage): Document this.
+ * doc/m4.texinfo (Invoking m4, Using frozen files): Likewise.
+ * NEWS: Likewise.
+
+ * doc/m4.texinfo (copying): Relax restriction on front-cover and
+ back-cover texts.
+
+2006-07-17 Eric Blake <ebb9@byu.net>
+
+ * src/format.c (format): Support F, g, and G specifiers.
+ * doc/m4.texinfo (Format): Document this.
+ * NEWS: Document this addition.
+
+ * doc/m4.texinfo (Builtin): Delete redundant text.
+
+ * configure.ac (AC_INIT): Bump version number.
+ * src/builtin.c (substitute): Bah. Fix buffer overrun.
+ * NEWS: Document this fix.
+
+2006-07-15 Eric Blake <ebb9@byu.net>
+
+ Release 1.4.5:
+ * configure.ac (AC_INIT): Bump version number.
+ * NEWS: Describe changes since 1.4.4.
+
+ * src/m4.c (usage): Document exit status.
+ * doc/m4.texinfo: Use `exit status', not `exit code'.
+ (Invoking m4): Document exit status.
+
+ * bootstrap: Backport --help, --version from head.
+ (func_update): New function, for easily grabbing up-to-date files
+ from gnulib.
+ * Makefile.maint (web-manual): Fix for VPATH builds.
+
+2006-07-14 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo: Global cleanup. Avoid @code{...}'d, as it
+ looks bad in info. Use @deffn rather than @example for
+ describing prototypes. Fix awkward wording and grammar.
+
+ * src/builtin.c (substitute): Warn on bad escape sequences.
+ Ignore trailing backslash.
+ * doc/m4.texinfo (Regexp): Add documentation for this.
+ * NEWS: Document this change.
+
+ * src/builtin.c (m4_format, m4_indir): Warn on too few arguments.
+ * doc/m4.texinfo (Defn, Builtin, Debug Levels, Debug Output): Add
+ more examples.
+ (Dnl): Update example to show side effects.
+ * checks/get-them: Generate three digit test names.
+ * checks/Makefile.in (CHECKS): Accomodate 100+ tests.
+
+2006-07-13 Eric Blake <ebb9@byu.net>
+
+ * src/input.c (input_init): Simplify.
+ (set_word_regexp): Treat empty string as default, since empty
+ regexp would disable word parsing.
+ * src/m4.c (user_word_regexp): Default to empty string.
+ * src/builtin.c (builtin_tab): Make changeword blind.
+ * doc/m4.texinfo (Changeword): Document this.
+ * NEWS: Document this.
+ * TODO: Knock off completed items.
+
+ * src/builtin.c (m4_undefine, m4_popdef): Visit all arguments, not
+ just the first.
+ * doc/m4.texinfo (Undefine, Pushdef): Test this.
+ * NEWS: Document this change.
+
+ * src/builtin.c (numeric_arg): Treat empty string as 0, with a
+ warning. Detect quoted leading space and overflow as warnings.
+ (m4_eval): Treat empty radix as 10, and allow output in radix 1.
+ Treat width as minimum number of digits, as required by POSIX.
+ (m4_ifdef, m4_divert, m4_m4exit, m4_translit): Ignore extra
+ arguments.
+ (m4_substr): Likewise. Silently treat empty start as 0.
+ (m4_undivert): Treat ` 1a' as file, not diversion 1.
+ * src/eval.c (eval_lex): Parse radix 1 numbers.
+ * doc/m4.texinfo (Invoking m4): Fix wording; there is more than
+ one type of warning.
+ (Manual): Document behavior of numeric parsing of empty string.
+ (Divert, Incr): Document error handling.
+ (Eval): Document radices better.
+ (Incompatibilities): Document translit incompatibility.
+ * NEWS: Document these changes.
+
+ * Makefile.maint (fetch): Get gendocs from gnulib, not texinfo.
+ (web-manual): Simplify.
+ * m4/gnulib-cache.m4: Augment with gnulib-tool --import gendocs.
+ * Makefile.am (EXTRA_DIST): Distribute gendocs.sh.
+ (MAINTAINERCLEANFILES): Clean it as well.
+ * doc/Makefile.am (EXTRA_DIST): Distribute gendocs_template.
+ (MAINTAINERCLEANFILES): Clean it as well.
+
+2006-07-12 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo (Extensions): Document how to overcome
+ implementation difference in > 9 positional parameters.
+
+ * src/m4.c (usage): Sort within sections.
+ (nesting_limit): Raise default from 250 to 1024.
+ * doc/m4.texinfo: Use file name, not filename, per GNU coding
+ standard. Use @option where appropriate.
+ (Invoking m4): Sort to match --help output.
+ (Debug Levels): Sort.
+ (Frozen files): Sort and break into two nodes.
+
+ * src/m4.c (nesting_limit): Raise default from 250 to 1024.
+ * NEWS: Document raised -L limit.
+
+2006-07-11 Eric Blake <ebb9@byu.net>
+
+ * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New macro, to
+ stress-test changeword before a release.
+ * doc/m4.texinfo: More doc cleanups.
+ (Copying This Manual): New node; actually include the FDL in the
+ documentation.
+ * doc/Makefile.am (m4_TEXINFOS): Mention dependence on fdl.texi.
+ * m4/gnulib-cache.m4: Augment with gnulib-tool --import fdl.
+ * NEWS: Mention documentation improvements.
+
+ * src/m4.h (OS2): New platform macro.
+ * src/builtin.c (predefined_tab) [OS2]: Use it to give OS/2 a
+ platform macro.
+ * doc/m4.texinfo (Platform macros): Document it.
+ (Sysval): Remove non-portable test of system("").
+ * NEWS: Document this change.
+ Reported by Andreas Buening.
+
+2006-07-09 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo (Undivert): Fix typo in last commit.
+ * src/m4.c (usage): Document M4PATH.
+ * src/path.c (path_search): Reject empty string.
+ * src/output.c (insert_diversion): Ignore diversion 0.
+ * src/builtin.c (m4_undivert): Ignore empty string.
+ * NEWS: Document this fix.
+
+2006-07-08 Eric Blake <ebb9@byu.net>
+
+ * checks/get-them: Make filtering easier.
+ * checks/check-them: Filter non-input lines, so line counts are
+ more realistic in the documentation, and so changeword tests work
+ even when dnl is disabled.
+ * doc/m4.texinfo: Adjust example line numbers. Clean up
+ front-matter, following autoconf's example.
+ (Changeword): Enable tests, skipping if changeword not supported.
+ (Define, Defn, Ifelse): Backport more examples from head.
+ (Input processing, Answers): New nodes, backported from head.
+ (Include): Expand test to cover empty filename.
+ (Undivert): Add test of undivert(0).
+
+2006-07-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * doc/m4.texinfo: Fix spelling errors.
+
+2006-07-07 Eric Blake <ebb9@byu.net>
+
+ * THANKS: Update.
+
+ * doc/Makefile.am (m4.1): No need to go through a temporary file;
+ this also ensures timestamps are updated.
+ * src/m4.h (includes): Require config.h. Assume string.h,
+ stdlib.h, errno. Include error.h, exit.h, and xalloc.h rather
+ than prototyping ourselves.
+ (builtin_func): Add parameter type-checking.
+ (voidstar): Delete, now that we assume C89.
+ * src/builtin.c, src/m4.c, src/macro.c, src/symtab.c: All users of
+ voidstar changed.
+ * src/m4.c (xfree) [WITH_DMALLOC]: Avoid clash with dmalloc's
+ xfree.
+
+2006-07-06 Eric Blake <ebb9@byu.net>
+
+ * m4/gnulib-cache.m4: Augment with gnulib-tool --import
+ binary-io.
+ * src/m4.h (includes): Add binary-io.h for O_BINARY.
+ * src/freeze.c (produce_frozen_state): Use O_BINARY to remove
+ #ifdef. Fixes patch from 2005-02-03 for cygwin.
+ * NEWS: Mention this fix.
+
+ * configure.ac (FUNC_SYSTEM_BROKEN): New check for OS/2 bug.
+ * src/builtin.c (m4_syscmd): Work around OS/2 bug.
+
+ * Makefile.am (SUBDIRS): Build . before src, so that autoheader
+ runs first when needed.
+ * doc/Makefile.am (m4.1): Backport rule from CVS head: build m4.1
+ once in srcdir rather than multiple times in VPATH builds.
+
+2006-07-03 Eric Blake <ebb9@byu.net>
+
+ * checks/check-them: Use portable = in test.
+ * src/Makefile.am (AM_CPPFLAGS): Omit space between -I and
+ directory, as required by Solaris cc. Include built headers, as
+ required by Solaris make in VPATH build.
+ * checks/Makefile.in: Use $(srcdir) where needed.
+ (CHECKS): Factor $(srcdir) into macro.
+ (DISTFILES): Likewise. Automake takes care of distributing
+ Makefile.in.
+ (dist): Simplify.
+ (Makefile): Use modern syntax of config.status.
+ * doc/m4.texinfo (Loops, Include, Undivert, Incompatibilities):
+ Avoid overfull and underfull hboxes in dvi.
+
+ Fix 'make check' in VPATH build. All files included by testsuite
+ now live in a single directory. Use forloop.m4 in testsuite.
+ * checks/incl.m4, checks/foo, checks/wrapfifo.m4: Move from
+ here...
+ * examples/incl.m4, examples/foo, examples/wrapfifo.m4: ...to
+ here.
+ * checks/Makefile.in (DISTFILES): Don't distribute moved files.
+ * examples/Makefile.am (EXTRA_DIST): Distribute new files.
+ * checks/check-them: Avoid s/// when filename is in pattern.
+ * examples/forloop.m4: Fix to match documentation.
+ * doc/m4.texinfo (Include, Undivert, Incompatibilities): Reflect
+ new locations.
+ (Loops, Format): Actually use forloop.m4 in tests.
+
+2006-07-02 Eric Blake <ebb9@byu.net>
+
+ * checks/Makefile.in (exec_prefix, prefix): New macros, so that
+ $(bindir) works in installcheck.
+ (check, installcheck): No longer change directory, so that
+ distcheck works with a read-only builddir.
+ * checks/check-them: Work when pwd is no longer builddir.
+
+2006-07-01 Eric Blake <ebb9@byu.net>
+
+ * GNUmakefile: New file, borrowed from coreutils.
+ * Makefile.am (EXTRA_DIST): Distribute GNUmakefile.
+ * Makefile.maint (Makefile): Delete this rule, now that
+ GNUmakefile includes Makefile.
+
+2006-06-30 Eric Blake <ebb9@byu.net>
+
+ For compatibility with other m4 implementations, sysval returns
+ signal<<8 rather than 0 if syscmd is terminated by a signal.
+ * configure.ac (AC_CHECK_HEADERS_ONCE): Check for sys/wait.h.
+ * src/builtin.c (include): Include sys/wait.h when stdlib.h does
+ not provide wait macros.
+ (WTERMSIG, WIFSIGNALED, WIFEXITED): More fallback macros.
+ (M4SYSVAL_EXITBITS, M4SYSVAL_TERMSIGBITS): New helper macros.
+ (m4_esyscmd): Set sysval to -1 on failure.
+ (m4_sysval): Print 127 on failure, and accomodate signals if they
+ are detectable.
+ * NEWS: Document this change.
+ * doc/m4.texinfo (Platform macros, Esyscmd, Sysval): Fix typos in
+ last commit.
+ * checks/check-them: Likewise.
+ * src/debug.c (debug_set_file): Work around mingw fstat bug.
+
+ * src/m4.h (UNIX, W32_NATIVE): Improve platform detection macros.
+ * src/freeze.c (produce_frozen_state): Use new spelling of
+ platform macro.
+ * src/builtin.c (predefined_tab): Add __windows__ on non-unix
+ platforms.
+ (m4_syscmd, m4_esyscmd): The empty command is successful.
+ * doc/m4.texinfo (Shell commands): Rename from UNIX commands.
+ Document platform-dependence of system().
+ (Syscmd): Add example.
+ (Esyscmd): Make example more robust, and actually demonstrate
+ rescanning.
+ (Sysval): Expand test to cover esyscmd code path, and to check
+ that empty command is successful. Add conditional check for
+ signal behavior.
+ (Other Incompatibilities): Move platform macros from here...
+ (Platform macros): ...to this new node. Add windows macro.
+ Check that exactly one platform macro is provided.
+ * checks/check-them: Improve trap cleanup. Tolerate dirname and
+ .exe in error messages. Allow for skipping checks.
+ * configure.ac (HAVE_EFGCVT): Kill dead configure check.
+ * NEWS: Document platform macros.
+
+2006-06-29 Eric Blake <ebb9@byu.net>
+
+ Fix buffer overrun bug.
+ * m4/gnulib-cache.m4: Augment with gnulib-tool --import
+ xvasprintf.
+ * src/format.c [HAVE_EFGCVT]: Delete this code, and use *printf
+ variant instead, since [efg]cvt are obsolete and our use of them
+ was buggy (savannah sr #104303).
+ (format): Fix buffer overflow by using xasprintf.
+ * doc/m4.texinfo (Format): Expand format test to catch both bugs.
+ * NEWS: Document this fix.
+
+ * configure.ac (AC_CANONICAL_HOST, AC_CANONICAL_BUILD): Allow
+ cross-compilation.
+ (AC_CACHE_CHECK): Cache search for ecvt.
+
+2006-06-27 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo (Eval): Document 32-bit signed limitations
+ required by POSIX, and add example that exposed core dump on x86
+ architectures.
+ (Incompatibilities): Document incompatibility in eval precedence.
+ * src/eval.c (shift_term): Explicitly mask, to avoid undefined
+ behavior.
+ (mult_term): Explicitly check for -1, to avoid SIGFPE on x86.
+ * NEWS: Document this change.
+
+ * doc/m4.texinfo: Use @noindent consistently.
+ (Quoting Arguments): Document that unquoted parentheses group
+ arguments.
+ (Pseudo Arguments): Expand tests to show this.
+ (Incompatibilities): Contrast traditional behavior of
+ changequote.
+
+2006-06-24 Eric Blake <ebb9@byu.net>
+
+ * configure.ac (AC_PREREQ): Autoconf 2.60 is now released.
+ (AC_CHECK_HEADERS_ONCE): Use this new feature.
+ (AC_CHECK_FUNCS_ONCE): Likewise.
+
+2006-06-23 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo: Quoting cleanup throughout - follow
+ autoconf-recommended style of one level of quote per parenthesis
+ in the normal case. Adjust error messages to match GNU coding
+ standards (and to allow 'make check' to pass again).
+ (Quoted strings, Inhibiting Invocation): Turn more examples into
+ tests.
+ (Comments): Resolve FIXME by adding example.
+ (Define): Add example about underquoting.
+ (Defn): Add example about use of $0.
+ (Indir, Format): Resolve FIXME done in last commit.
+ (Ifelse): Add example about creating blind macro.
+ (Debugging): Fix grammar.
+ (Dnl): Add example about dnl with arguments.
+ (M4wrap): Be explicit that LIFO order is non compliant, and will
+ change in m4 2.0.
+ (Undivert): Resolve FIXME by adding example.
+ (Frozen files): Document that m4wrap and sysval will not work
+ consistently until m4 2.0.
+ (Incompatibilities): Document another POSIX compliance bug, this
+ time with changequote. Document a traditional incompatibility
+ with partial input spanning file boundaries.
+
+ Make error messages more consistent with GNU coding standards -
+ start with lower case, and don't end sentence with punctuation.
+ * src/debug.c (trace_pre): Update message wording.
+ * src/eval.c (evaluate, cmp_term, shift_term, mult_term):
+ Likewise.
+ * src/freeze.c (produce_frozen_state, issue_expect_message),
+ (reload_frozen_state): Likewise.
+ * src/input.c (push_string_init, pop_init, init_macro_token),
+ (peek_input, next_char_1, set_word_regexp, next_token): Likewise.
+ * src/m4.c (stackovf_handler, main): Likewise.
+ * src/macro.c (expand_token, expand_argument, call_macro),
+ (expand_macro): Likewise.
+ * src/output.c (make_room_for, output_text, insert_file),
+ (freeze_diversions): Likewise.
+ * src/symtab.c (symtab_init, lookup_symbol): Likewise.
+
+ * src/builtin.c (builtin_tab): Make format and indir blind.
+ (substitute): Prefer "Warning:" vs. "ERROR:" in messages.
+ * NEWS: Mention the change to builtins.
+
+2006-06-22 Eric Blake <ebb9@byu.net>
+
+ Robustify frozen file format.
+ * src/freeze.c (reload_frozen_state): Add GET_DIRECTIVE helper
+ macro. Require V first, and only accept it once. For F, use
+ placeholder if builtin is not found, rather than warning.
+ * src/m4.h (m4_placeholder): New prototype.
+ * src/builtin.c: Unify error message style.
+ (m4_placeholder): New function, warn if invoked.
+ (builtin_tab): Add m4_placeholder.
+ (m4_defn): Warn if placeholder is encountered.
+ (find_builtin_by_addr): Handle placeholder.
+ (find_builtin_by_name): Return placeholder on failure.
+ (m4_builtin): Treat placeholder as undefined.
+ * doc/m4.texinfo (Frozen files): Document changes in V and F.
+ * NEWS: Document this change.
+ Reported by Bruno Haible.
+
+ * doc/m4.texinfo: Whitespace cleanup. TABs are evil in texinfo.
+ (tabchar): New macro, so that 'make check' still works.
+ (Invoking m4): Document that ignored compatibility options -B, -S,
+ and -T each consume an argument.
+ * checks/get-them: Honor @tabchar{}.
+
+ Avoid compiler warnings during -DDEBUG.
+ * src/m4.h (M4_GNUC_ATTRIBUTE, M4_GNUC_UNUSED): New macros.
+ [DEBUG]: Also imply DEBUG_OUTPUT and DEBUG_STKOVF.
+ * src/input.c (print_token) [DEBUG_INPUT]: Use correct format.
+ (lex_debug) [DEBUG_INPUT]: Fix to compile. Mark unused.
+ (next_token) [DEBUG_INPUT]: Print before returning.
+ * src/path.c (include_dump) [DEBUG_INCL]: Mark unused.
+ * src/symtab.c (symtab_debug) [DEBUG_SYM]: Mark unused.
+
+ Avoid mkstemp bugs on various platforms.
+ * m4/gnulib-cache.c: Augment with gnulib-tool --import mkstemp.
+ * src/output.c [! HAVE_MKSTEMP]: Delete.
+ * configure.ac (AC_CHECK_FUNCS): Don't check for mkstemp.
+ * src/m4.h (mkstemp) [! HAVE_MKSTEMP]: Prototype, if needed.
+ * NEWS: Document this.
+
+ * Makefile.am (EXTRA_DIST): Distribute gnulib-cache.m4.
+ Reported by Bruno Haible.
+
+2006-06-21 Eric Blake <ebb9@byu.net>
+
+ Avoid obsolete sigstack when POSIX sigaltstack is available.
+ * src/m4.c: Blindly assume signal.h, since stackovf.c and gnulib
+ do likewise.
+ * configure.ac (AC_CHECK_HEADERS): Likewise.
+ (AC_CHECK_TYPES): New check for siginfo_t, since siginfo.h is
+ obsolete and most hosts now have it in signal.h.
+ (AC_CHECK_MEMBERS): New check for sigaction.sa_sigaction.
+ (AC_CACHE_CHECK): Cache decision to use stackovf.
+ (AC_EGREP_HEADER): Switch to AC_CHECK_TYPES.
+ * src/stackovf.c (DEBUG_STACKOVF): Remove unused define.
+ (SA_RESETHAND, SA_SIGINFO): Provide fallback definitions, to
+ simplify later code.
+ (PARAM_STACKOVF, PARAM_NOSTACKOVF): Move further away from NULL,
+ in case of dereferencing a member of a NULL pointer.
+ (sigsegv_handler) [HAVE_STRUCT_SIGACTION_SA_SIGACTION]: Define a
+ POSIX handler.
+ (setup_stackovf_trap): Use NULL instead of 0 for pointers, use
+ EXIT_FAILURE in error, indent preprocessor directives.
+ [HAVE_SIGALTSTACK && HAVE_SIGINFO_T]: Depend on siginfo_t, not
+ siginfo.h.
+ [HAVE_SIGACTION && defined SA_ONSTACK]: Prefer POSIX handler.
+ Reported by Santiago Vila.
+
+2006-06-19 Eric Blake <ebb9@byu.net>
+
+ * THANKS: Update.
+
+2006-06-18 Andreas Buening <andreas.buening@nexgo.de> (tiny change)
+
+ * checks/Makefile.in (PATH_SEPARATOR): New macro.
+ (check, installcheck): Use it, for OS/2.
+
+2006-06-18 Eric Blake <ebb9@byu.net>
+
+ Consistently use "GNU M4" as package name, "m4" as executable
+ name.
+ * NEWS: Document previous fix.
+ * THANKS: Update.
+ * README: Fix grammar. Document that --enable-changeword is on
+ its last leg.
+ * doc/m4.texinfo (Top, Changeword): Likewise.
+ (Sysval): Enhance this test.
+ (History): Backport this section from CVS head, and update.
+
+2006-06-18 Bruno Haible <bruno@clisp.org> (tiny change)
+ Eric Blake <ebb9@byu.net>
+
+ * src/builtin.c (WEXITSTATUS): Provide fallback definition.
+ (m4_esyscmd): Set sysval to 0xffff, to accomodate both
+ big-endian and little-endian wait status definitions.
+ (m4_sysval): Use WEXITSTATUS.
+ Reported by Andreas Buening.
+
+2006-06-18 Eric Blake <ebb9@byu.net>
+
+ * configure.ac (AC_INIT): Bump version number.
+ * NEWS: Describe changes in 1.4.4c.
+
+2006-06-17 Eric Blake <ebb9@byu.net>
+
+ Beta Release 1.4.4b:
+ * configure.ac (AC_INIT): Bump version number.
+ * NEWS: Describe changes since 1.4.4.
+ * Makefile.maint (cvs-news): Accomodate copyright line wrapping.
+
+ * Makefile.am (MAINTAINERCLEANFILES): Clean files added by
+ bootstrap.
+ * checks/Makefile.in (maintainer-clean): Add missing target.
+ * COPYING: Remove generated file from CVS.
+
+2006-06-16 Eric Blake <ebb9@byu.net>
+
+ * checks/Makefile.in (DISTFILES): Distribute wrapfifo.m4.
+
+2006-06-15 Eric Blake <ebb9@byu.net>
+
+ * checks/wrapfifo.m4: New file. Use it...
+ * doc/m4.texinfo (Incompatibilities): here, in a new test case to
+ demonstrate how to get POSIX behavior of m4wrap prior to m4 2.0.
+
+ * src/m4.h (to_uchar): New function.
+ * src/eval.c (eval_lex): Use it to avoid passing signed char to
+ isdigit, isalpha, isupper, islower, isspace, isalnum.
+ * src/builtin.c (expand_user_macro): Likewise.
+ * src/format.c (format): Likewise.
+ * src/macro.c (expand_argument): Likewise.
+ * NEWS: Document this security fix.
+
+ Message cleanup.
+ * src/symtab.c (lookup_symbol): Use invalid, not illegal.
+ * src/freeze.c (reload_frozen_state): Fix typo in message.
+ (produce_frozen_state): Standardize on builtin, not built-in.
+ * src/builtin.c (numeric_arg, bad_argc): Likewise.
+
+ * configure.ac (M4_EARLY, M4_INIT): Use gnulib.
+ (AC_PROG_RANLIB, AC_AIX, AC_MINIX, AC_CHECK_HEADERS),
+ (AC_FUNC_ALLOCA, AC_REPLACE_FUNCS): Avoid checks now done by
+ gnulib.
+ * Makefile.am (ACLOCAL_AMFLAGS): New entry, for gnulib.
+ * m4/gnulib-cache.m4: New file, from gnulib.
+ * bootstrap: Invoke gnulib-tool --update.
+ * src/m4.c (main): Cast away const.
+ * NEWS: Document that regex is updated.
+ * THANKS: Update.
+
+2006-06-08 Eric Blake <ebb9@byu.net>
+
+ * configure.ac (changeword): Work even when changeword is not a
+ macro.
+ (AC_PROG_AWK, AC_PROG_INSTALL, AC_PROG_MAKE_SET, AC_HEADER_STDC):
+ Delete; now done by automake.
+ (AC_ISC_POSIX, AC_C_CONST): Delete; now obsolete.
+
+2006-06-07 Eric Blake <ebb9@byu.net>
+
+ * lib/regex.c (bcmp_translate): Canonicalize type name.
+ * doc/Makefile.am (MAINTAINERCLEANFILES): Fix typo.
+ * configure.ac (changeword): Disable changeword for the creation
+ of configure, in case of bootstrapping with an m4 configured with
+ --enable-changeword.
+
+ Distribute a rudimentary man page.
+ * Makefile.am (SUBDIRS): Move doc after src so that 'm4 --help'
+ can feed help2man.
+ * doc/Makefile.am (man_MANS, EXTRA_DIST, MAINTAINERDISTCLEAN),
+ (SUFFIXES, m4.1): New macros and rules to build m4.1.
+
+2006-06-06 Eric Blake <ebb9@byu.net>
+
+ * lib/regex.c (re_match_2_internal, bcmp_translate): Avoid
+ compiler warnings at -O2.
+ * lib/getopt.c (_getopt_internal): Likewise.
+
+ Cleanup of previous patches.
+ * src/input.c (struct input_block): Remove traced member.
+ (push_macro, init_macro_token): Don't pass trace status around.
+ * src/m4.h (struct token_data): Remove traced member.
+ (struct symbol, struct builtin): Reduce unused space.
+ (TOKEN_DATA_FUNC): Simplify.
+ (TOKEN_DATA_FUNC_TRACED): Remove unused macro.
+ (push_macro, define_builtin): Remove unused parameter.
+ * src/builtin.c (define_builtin, builtin_init, define_macro),
+ (m4_defn): Don't pass trace status around.
+ * src/macro.c (expand_argument): Likewise.
+ * src/freeze.c (reload_frozen_state): Likewise.
+ * src/symtab.c: Whitespace cleanup.
+ * NEWS: Clean up wording.
+ * doc/m4.texinfo (Undefine, Dumpdef, Trace): Cleanup wording;
+ ensure tests actually expose bugs prior to today's patches.
+
+ Trace status of builtins is no longer inherited across
+ define(...,defn(...)). Fixes bug that autom4te had been working
+ around.
+ * src/builtin.c (define_builtin): Don't override trace status.
+ * doc/m4.texinfo (Trace): Add test for this.
+ * NEWS: Document this.
+
+ When changing macro definitions inside the arguments to the macro,
+ consistently preserve the old definition that was in effect before
+ argument collection, similar to the C pre-processor.
+ Reported by John Brzustowski.
+ * NEWS: Document this change.
+ * doc/m4.texinfo (Macro Arguments, Undefine, Dumpdef): Document
+ this policy, and add tests that expose core dumps prior to this
+ patch.
+ * src/m4.h (struct symbol): New members to track when a symbol is
+ still in use after removal from the symbol table.
+ (SYMBOL_PENDING_EXPANSIONS, SYMBOL_DELETED): Define.
+ (free_symbol): Prototype.
+ * src/macro.c (expand_macro): Track pending expansions of a
+ symbol. On completion, if a symbol is deleted and no longer
+ pending, free its memory.
+ * src/symtab.c (free_symbol): Export. Don't free memory if symbol
+ is still in use.
+ (lookup_symbol) <SYMBOL_INSERT>: Create new entry when old entry
+ is still in use.
+ (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>: Mark entries still
+ in use as deleted and remove from the table without freeing
+ memory.
+ (symtab_print_list) [DEBUG_SYM]: More debug output.
+
+ * src/symtab.c (hack_all_symbols): Allow certain modifications of
+ the symbol table during traversal.
+ * src/builtin.c (set_trace): Replace SYMBOL_DELETE with
+ SYMBOL_POPDEF, since only the latter is safe with
+ hack_all_symbols.
+
+ Solve crash when passing "indir(`foo')" to "m4 -tfoo".
+ * src/symtab.c (lookup_symbol) <SYMBOL_DELETE, SYMBOL_POPDEF>:
+ Preserve placeholder when macro is being traced.
+ * src/builtin.c (m4_ifdef, m4_indir): A traced but undefined
+ symbol is not defined.
+ (set_trace): Remove placeholder when no longer traced.
+ (m4_traceon): On named traces, always reserve a slot in the
+ symbol table.
+ (m4_traceoff): Don't warn about untracing a nonexistent symbol.
+ * NEWS: Document new trace behavior.
+ * doc/m4.texinfo (Trace): Tracing by name now consistently works
+ no matter whether that macro is currently defined.
+ (Incompatibilities): Document differences between traditional and
+ GNU trace.
+
+2006-06-04 Paul Eggert <eggert@cs.ucla.edu> (tiny change)
+ Eric Blake <ebb9@byu.net>
+
+ * src/m4.h (hash_table_size): Now size_t instead of int.
+ * src/m4.c (hash_table_size): Likewise.
+ (main): Adjust to this; use atol rather than atoi.
+ * src/symtab.c: Include <limits.h>, for CHAR_BIT.
+ (symtab_init, lookup_symbol, hack_all_symbols):
+ Use size_t for sizes and indexes, not int.
+ (symtab_print_list) [DEBUG_SYM]: Likewise.
+ (hash): Likewise. Don't case-fold in the hash function.
+ Shift by 7, not 3, for consistency with gnulib/lib/hash.c.
+ Don't assume hash word is 32 bits.
+ * NEWS: Document this change.
+
+2006-06-04 Eric Blake <ebb9@byu.net>
+
+ * src/symtab.c (symtab_debug, symtab_print_list) [DEBUG_SYM]: Fix
+ to allow compilation, for use in debugger.
+ (profiles, current_mode) [DEBUG_SYM]: New variables.
+ (show_profile, profile_strcmp) [DEBUG_SYM]: New methods for
+ determining hash table performance.
+
+2006-05-31 Eric Blake <ebb9@byu.net>
+ John Brzustowski <jbrzusto@fastmail.fm>
+
+ * src/input.c (input_stack): Delete; use current_input instead.
+ (wrapup_stack): Dynamically allocate, so that recursion is handled
+ properly.
+ (push_wrapup): Use current wrapup stack.
+ (pop_wrapup): Rotate wrapup stack to current, and create new
+ wrapup stack.
+ (input_init): Dynamically allocate stacks.
+ * NEWS: Update, now that recursive m4wrap can no longer cause
+ core dump.
+
+2006-05-31 Eric Blake <ebb9@byu.net>
+
+ * lib/getopt.c: Fix copyright year.
+ * lib/obstack.c: Ditto.
+ * src/builtin.c: Ditto.
+
+2006-05-30 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo (M4wrap): Add test to expose m4wrap bug.
+ Reported by John Brzustowski.
+ (Incompatibilities): Document known POSIX incompatibilities.
+ * THANKS: Update.
+
+2006-05-29 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo (Maketemp): Work even when running 'make check'
+ in read-only dir.
+
+ Use automake.
+ * Makefile.am: New file.
+ * doc/Makefile.am: Ditto.
+ * examples/Makefile.am: Ditto.
+ * lib/Makefile.am: Ditto.
+ * src/Makefile.am: Ditto.
+ * acinclude.m4: New file, renamed from aclocal.m4.
+ * configure.ac (AM_INIT_AUTOMAKE): Invoke new macro.
+ (AC_ARG_PROGRAM): Now redundant.
+ (STACKOVF): Turn into automake conditional.
+ (AC_CONFIG_COMMANDS): stamp-h is a command, not a file.
+ * checks/Makefile.in: Converting this dir to automake was not
+ trivial; for now, just add missing targets demanded by top-level.
+ * INSTALL: Remove files that are now generated from CVS.
+ * Makefile.in: Ditto.
+ * aclocal.m4: Ditto.
+ * install-sh: Ditto.
+ * mkinstalldirs: Ditto.
+ * doc/Makefile.in: Ditto.
+ * doc/texinfo.tex: Ditto.
+ * examples/Makefile.in: Ditto.
+ * lib/Makefile.in: Ditto.
+ * src/Makefile.in: Ditto.
+
+ * AUTHORS: Backport from CVS head, and update.
+ * doc/m4.texinfo (Changeword): Fix examples to match behavior.
+
+2006-05-27 Eric Blake <ebb9@byu.net>
+
+ * lib/regex.c (regex_compile): Kill compiler warnings.
+ * lib/getopt.c: Likewise.
+ * lib/obstack.c: Likewise.
+ * src/builtin.c (builtin_init): Likewise.
+ * src/path.c (path_search): Likewise.
+
+ * doc/m4.texinfo: Fix usage of a vs. an.
+ (Loops, Include, Cleardiv, Patsubst, Format, M4exit): Kill
+ overfull hbox warnings.
+ (Inhibiting Invocation, Divert, Maketemp, M4exit): Add new tests.
+
+ * configure.ac: Update to autoconf 2.59. Forbid ^M4_. Fix
+ quoting.
+ * aclocal.m4 (fp_PROG_CC_STDC): Delete; now covered by autoconf.
+ (fp_C_PROTOTYPES): Delete, GNU Coding Standards state we can now
+ assume C89.
+ (M4_WITH_DMALLOC): Rename from fp_WITH_DMALLOC. Fix quoting.
+ * src/m4.h (_): PROTOTYPES is no longer provided, assume C89.
+ * src/Makefile.in: Delete remains of ansi2knr.
+ * src/ansi2knr.1: Delete.
+ * src/ansi2knr.c: Delete.
+
+2006-05-25 Eric Blake <ebb9@byu.net>
+
+ * doc/m4.texinfo: Fix spelling errors. Use `invalid' instead of
+ `illegal'.
+
+ * doc/m4.texinfo (Francois): No longer needed as a tex variable.
+ Reported by Karl Berry.
+
+2006-05-24 Eric Blake <ebb9@byu.net>
+
+ * Makefile.in (html): New target.
+ * doc/Makefile.in (html, m4.html): Likewise.
+ (MAKEINFOHTML): New macro.
+ * doc/m4.texinfo (Francois) [ifnottex]: Use newer texinfo
+ rendering.
+ (Regexp) [ifhtml]: Make cross-reference to emacs manual an
+ absolute URL.
+ Reported by Bob Badour.
+
+ * THANKS: Update. Move reporter's email addresses here, instead
+ of in ChangeLog.
+
+2006-05-11 Eric Blake <ebb9@byu.net>
+
+ * THANKS: Update.
+ * doc/m4.texinfo (Changequote): Give testsuite exposure to bug
+ patched on 2005-12-04.
+ Reported by Ilya N. Golubev.
+
+ * bootstrap: New file, so that generated files need not be stored
+ in CVS.
+ * Makefile.in (DISTFILES): Add bootstrap.
+
+ Make testsuite less sensitive to doc changes.
+ * doc/m4.texinfo: Use m4.input instead of filename.
+ * checks/check-them (xerr): Turn m4.input into filename.
+ * checks/Makefile.in (dist): Depend on stamp-checks.
+
+ Portability updates for OS/2.
+ * src/Makefile.in (EXEEXT, OBJEXT): Define.
+ (LINK): Use CFLAGS.
+ (.c.obj): Define.
+ * lib/Makefile.in (OBJEXT): Define.
+ (.c.obj): Define.
+ * doc/Makefile.in (install, uninstall): Install info files into
+ the dir listing.
+ Reported by Andreas Buening.
+
+2006-05-09 Eric Blake <ebb9@byu.net>
+
+ * install-sh: Update to newer upstream version.
+ * mkinstalldirs: Likewise.
+ Reported by Andreas Buening.
+
+ * src/m4.c (main): Bump copyright year.
+ * Makefile.in (datarootdir): Define, for autoconf 2.59c.
+ * doc/Makefile.in (datarootdir): Likewise.
+
+2006-05-08 Eric Blake <ebb9@byu.net>
+
+ * THANKS: Update.
+ * doc/m4.texinfo (Bugs): Backport bug email address from head.
+ Reported by Stepan Kasal.
+
+2005-12-04 Ilya N. Golubev <gin@mo.msk.ru> (tiny change)
+
+ * input.c (match_input): Do not pass expression with side effect
+ to `obstack_grow'. Fix <INTERNAL ERROR: Recursive push_string!>.
+ * NEWS: Updated.
+
+2005-12-04 Gary V. Vaughan <gary@gnu.org> (tiny change)
+
+ * doc/m4.texinfo (How to debug macros and input): s/woould/would/
+ Reported by Damian Menscher.
+
+2005-10-19 Gary V. Vaughan <gary@gnu.org> (tiny change)
+
+ * configure.ac (AC_INIT): Bump to 1.4.4a.
+
+2005-10-19 Gary V. Vaughan <gary@gnu.org> (tiny change)
+
+ Release 1.4.4:
+ * configure.ac (AC_INIT): Bump to 1.4.4.
+ * NEWS: Describe 1.4.4's changes.
+ * INSTALL, install-sh, doc/texinfo.tex: Updated from upstream.
+
+2005-10-17 John Gatewood Ham <zappaman@buraphalinux.org> (tiny change)
+
+ * src/m4.c: fix return code when non-existent files are processed
+
+2005-10-17 John Gatewood Ham <zappaman@buraphalinux.org> (tiny change)
+
+ * README: update email address for bug reports.
+
+2005-10-17 Gary V. Vaughan <gary@gnu.org>
+
+ * doc/m4.info: Generated files are not kept in the repository.
+
+2005-05-01 Gary V. Vaughan <gary@gnu.org>
+
+ The FSF are moving offices today. Changed their contact address
+ in all files from `59 Temple Place, Suite 330, MA 02111-1307' to
+ `51 Franklin Street, Fifth Floor, MA 02110-1301'.
+
+ Also, some of the files here were never updated from the previous
+ '675 Mass Ave, Cambridge, MA 02139', so changed those to the
+ '51 Franklin Street, Fifth Floor, MA 02110-1301' address too.
+
+2005-03-31 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (bindir, infodir): Substitute from configure rather
+ than hardcode.
+ * doc/Makefile.in (infodir): Ditto.
+ * src/Makefile.in (bindir): Ditto.
+ * NEWS: Updated.
+
+2005-03-31 Gary V. Vaughan <gary@gnu.org>
+
+ Changes needed to automate the release process for 1.4.3:
+
+ * Makefile.in (dist): Make .tar.bz2 tarball too.
+ * Makefile.maint (TSDEPS_DIST): Remove m4/libtool.m4.
+ (cvs-news): Look 1 line further down for NEWS release number.
+ (cvs-dist): We don't use automake, so make dist is fine.
+ Remove double . before suffixes.
+ (cvs-release): Don't mention manual.html.
+ (fetch): Get latest gendocs files.
+ (web-manual): Rewritten to use gendoc for multiformat manuals.
+ * doc/gendocs.sh: Don't save an old version in m4 CVS!
+ * doc/m4.texinfo (Index): HFS+ (the file system on my Mac) is case
+ preserving, but case insensitive, so generating html docs per node
+ clashes between Index.html, the node file, and index.html, the
+ top-level of the document tree...
+ (Index macro): ...so renamed to this. Changed all references.
+
+2005-03-31 Gary V. Vaughan <gary@gnu.org> (tiny change)
+
+ * configure.ac (AC_INIT): Bump to 1.4.3a.
+
+2005-03-31 Gary V. Vaughan <gary@gnu.org> (tiny change)
+
+ Release 1.4.3:
+ * configure.in (AC_INIT): Bump to 1.4.3.
+ * NEWS: Describe 1.4.3's changes.
+
+2005-03-31 Gary V. Vaughan <gary@gnu.org>
+
+ * Makefile.maint: New file with release rules, from CVS libtool.
+ * Makefile.in (DISTFILES): Add Makefile.maint.
+ * INSTALL, install-sh, doc/texinfo.tex: Updated to latest
+ canonical versions.
+
+2005-03-31 Eric Blake <ebb9@byu.net> (tiny change)
+
+ * doc/m4.texinfo (Patsubst): Re-add trailing space required by
+ checks/47.patsubst, with a redundant @comment to prevent emacs
+ from removing it accidentally again.
+ * checks/get-them: Allow for trailing spaces tucked behind
+ @comment marks.
+
+2005-03-31 Eric Blake <ebb9@byu.net> (tiny change)
+
+ * doc/Makefile.in (install, uninstall): Accomodate DESTDIR.
+ * src/Makefile.in (install, uninstall): Likewise.
+
+2005-02-07 Gary V. Vaughan <gary@gnu.org>
+
+ * lib/regex.c, lib/regex.h: Reverted gnulib update, which broke
+ on Cygwin.
+ Reported by Eric Blake.
+
+2005-02-04 Gary V. Vaughan <gary@gnu.org>
+
+ * lib/regex.c, lib/regex.h: Updated from gnulib.
+ * src/input.c (set_word_regexp): Don't change the word_regexp
+ unless it compiles correctly.
+ * NEWS: Updated.
+ Reported by Frank Schwidom.
+
+ * Makefile.in (stamp-h): Regenerate config.h properly.
+
+2005-02-03 Gary V. Vaughan <gary@gnu.org>
+
+ * configure.ac (AC_DEFINE): Fix overquoting of description
+ argument.
+
+ * src/m4.h (__CYGWIN__, WIN32): Canonicalise Windows and Cygwin
+ recognition macros.
+ * src/freeze.c (produce_frozen_state): Use \n line-endings even
+ on Windows, so that the frozen file reader will work.
+ Reported by Josef T. Burger.
+
+ * src/m4.c (main): Modernise the --version output.
+
+2005-02-03 Gary V. Vaughan <gary@gnu.org>
+
+ Modernise the configury a little to prevent spurious errors from
+ Autoconf-2.59's autoreconf:
+
+ * config.h.in: Renamed to...
+ * config-h.in: ...this to better support DOS 8.3 file systems.
+ * acconfig.h: Removed.
+ * configure.in: Renamed to...
+ * configure.ac: ...this, and AC_DEFINE used to declare config.h
+ entry comments. Slight reorganisation and reformatting.
+ * aclocal.m4: Use third argument to AC_DEFINE to declare config.h
+ entry comments.
+ (AC_INIT): Use a modern 3 argument call.
+ * Makefile.in, checks/Makefile.in, doc/Makefile.in,
+ examples/Makefile.in, lib/Makefile.in, src/Makefile.in:
+ s/PRODUCT/PACKAGE/g.
+ * Makefile.in (DISTFILES): Removed acconfig.h, configure.in,
+ config.h.in. Added configure.ac, config-h.in.
+ (stamp-h.in): Removed acconfig.h from dependencies.
+ (configure): Depends on configure.ac, not configure.in.
+ * doc/Makefile.in (stamp-vti): Ditto.
+ * src/freeze.c (produce_frozen_state), src/m4.c (main): Adjust for
+ difference between PRODUCT="m4" and PACKAGE="GNU M4".
+ * configure: Regenerated.
+
+2005-02-03 Noah Misch <noah@cs.caltech.edu>
+
+ * src/output.c (mkstemp): Make non-static, and build regardless of
+ HAVE_TMPFILE; src/builtin.c also needs this replacement.
+ * NEWS: Update.
+
+2004-09-09 Vincent Lonngren <Vincent.lonngren.759@student.lu.se>
+
+ * configure.in (AC_CHECK_HEADERS): Commit works best when you save
+ changes from your editor buffer first.
+
+ * configure.in (AC_CHECK_HEADERS): Add signal.h, sys/signal.h.
+ * src/m4.c: And include them as appropriate.
+ * NEWS: Updated.
+
+2004-09-09 Andreas Schwab <schwab@suse.de>
+
+ Refactoring of the string read case in next_char provides about a
+ 20% speedup of M4 as typically used by autoconf:
+
+ * src/input.c (next_char_1): Renamed from next_char.
+ (next_char): New macro.
+ * NEWS: Updated.
+
+2004-08-21 Gary V. Vaughan <gary@gnu.org>
+
+ * configure.in (VERSION): Bump to 1.4.2a.
+
+2004-08-19 Paul Eggert <eggert@twinsun.com>
+
+ Release 1.4.2.
+ * configure.in (VERSION): Bump to 1.4.2.
+ * News: Describe 1.4.2's changes.
+
+ * src/m4.c (reference_error): Preserve errno, since M4ERROR
+ relies on this.
+ * src/builtin.c (m4_esyscmd): Clear errno before calling popen.
+ (m4_maketemp): Clear errno before calling mkstemp.
+ * src/path.c (path_search): Don't let "free" trash errno when
+ returning NULL.
+ * src/output.c (insert_file): Don't assume errno has a valid
+ value simply because fread returns zero. This fixes a
+ portability bug reported by Marion Hakanson in
+ <http://lists.gnu.org/archive/html/bug-m4/2004-07/msg00029.html>.
+
+2004-06-09 Gary V. Vaughan <gary@gnu.org>
+
+ * configure.in (VERSION): Bump to 1.4.1a.
+ * NEWS: Place holder for next stable release.
+
+2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ Release 1.4.1.
+ * configure.in (VERSION): Bump to 1.4.1.
+ * NEWS: Describe 1.4.1's changes.
+
+ * aclocal.m4 (fp_PROG_CC_STDC): Use AC_DEFUN, not define, to
+ pacify Autoconf 2.59.
+
+ * doc/m4.texinfo: Insert commas after @xref's that lack them,
+ to pacify Texinfo 4.7.
+ * doc/Makefile.in (info): Remove info-1, info-2, info-3.
+
+ * src/m4.h, src/debug.c: Use #ifdef __STDC__, not #if __STDC__, to
+ pacify Sun C compilers.
+
+2003-09-28 Akim Demaille <akim@epita.fr>
+
+ * src/symtab.c (lookup_symbol): Fix an uninitialized-variable
+ botch.
+
+2003-09-03 Santiago Vila <sanvila@debian.org>
+
+ * examples/stackovf.sh: Use tempfile if available.
+
+2001-04-02 Robert Bihlmeyer <robbe@orcus.priv.at>
+
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=92629
+ * src/output.c (m4_insert_file): Do not mix buffered and
+ unbuffered I/O, as this breaks on the Hurd. (trivial change)
+
+2001-02-01 Santiago Vila <sanvila@debian.org>
+
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84451
+ * src/m4.c (main): Fix format vulnerabilities. (trivial change)
+
+2001-02-01 Matt Kraai <kraai@debian.org>
+
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84416
+ * doc/m4.texinfo (Maketemp): Change maketemp to refer to a new,
+ empty file rather than to a nonexistent file. This closes a common
+ security hole.
+ * src/builtin.c (m4_maketemp): Implement the above, by using
+ mkstemp rather than mktemp. (trivial change)
+
+2000-01-09 Akim Demaille <demaille@inf.enst.fr>
+
+ * src/builtin.c (expand_ranges): Added break after trailing dash.
+ This caused misbehaviors on some systems.
+
+Sat Nov 5 15:52:47 1994 Francois Pinard (pinard@icule)
+
+ Release 1.4.
+ * doc/Makefile.in (realclean): Also remove stamp-vti.
+ Reported by Eric Backus.
+
+Wed Nov 2 00:47:53 1994 Francois Pinard (pinard@icule)
+
+ * src/freeze.c (produce_frozen_state): If the frozen file cannot
+ be opened, return immediately after producing the error message.
+ Reported by Andreas Schwab.
+
+ * configure.in: Check for const only after having found possible
+ ANSIfying compiler flags, this is of no use to check it before.
+ Reported by Alexander Lehmann.
+
+Tue Nov 1 22:02:37 1994 Francois Pinard (pinard@icule)
+
+ * src/macro.c (collect_arguments): Cast obstack arguments to
+ (voidstar), so avoiding compiler warnings.
+ Reported by Joseph E. Sacco.
+
+ * src/freeze.c (produce_frozen_state): Cast printed lengths to
+ (int) so they correspond to %d format items.
+ Reported by Joseph E. Sacco.
+
+ * src/m4.c (main): Cast the argument to xfree to (voidstar).
+ * src/symtab.c (free_symbol): Idem.
+ Reported by Karl Vogel.
+
+Mon Oct 31 02:11:19 1994 Francois Pinard (pinard@icule)
+
+ * Makefile.in (DISTFILES): Distribute BACKLOG.
+
+ * configure.in: Define PRODUCT and VERSION.
+ * acconfig.h: Document PRODUCT and VERSION.
+ * src/m4.c, src/freeze.c: Use PRODUCT and VERSION instead of the
+ constant string m4 and variable or parameter named version.
+
+Sun Oct 30 08:13:03 1994 Francois Pinard (pinard@icule)
+
+ * src/m4.h, src/debug.c: Replace all #ifdef __STDC__ by #if
+ __STDC__. Alliant FX/2800 Concentrix 2.2 (i860-BSD4.3) compiler
+ defines __STDC__ to 0, for indicating it is *not* ANSI!
+ Reported by Kaveh R. Ghazi.
+
+ * configure.in: Added obsolescent tests for AIX and Minix.
+
+ * doc/Makefile.in (mostlyclean): Remove texclean in dependencies,
+ which texclean does not exist anymore.
+ Reported by Eric Backus, Jim Meyering, John David Anglin and
+ Joseph E. Sacco.
+
+Sat Oct 29 05:10:03 1994 Francois Pinard (pinard@icule)
+
+ * aclocal.m4 (fp_C_PROTOTYPES): Force -D_HPUX_SOURCE with -Aa.
+ Reported by John David Anglin.
+
+ * src/ansi2knr.c: New version, sent by Peter Deutsch.
+ * aclocal.m4 (fp_C_PROTOTYPES): Substitute empty or ansi2knr for
+ ANSI2KNR, depending on the fact the compiler is ANSI or not.
+ * src/Makefile.in: Use -Ovarargs=convert on ansi2knr calls.
+ Remove the sed filter after ansi2knr for debug.c. Use $O instead
+ of $U, put underline in extensions rather than in basenames. Use
+ implicit rules, now that regularity makes this possible.
+ Have $(OBJECTS) depend on $(ANSI2KNR), so to trigger compilation
+ of ansi2knr whenever it is needed.
+ * configure.in: Adjusted for correct STACKOVF substitution.
+ * src/debug.c (trace_format): When not __STDC__, use (...) as a
+ parameter list, so ansi2knr will convert it to (va_alist) va_dcl.
+ Reported by David MacKenzie.
+
+ * Makefile.in: Remove binprefix. Use transform_name instead.
+ Reported by David MacKenzie.
+
+ * doc/Makefile.in: Create version.texi, use it, clean it.
+ Reported by Jim Meyering.
+
+Fri Oct 28 20:33:55 1994 Francois Pinard (pinard@icule)
+
+ * Makefile.in (all, install, uninstall): Depend on Makefile.
+
+ * Makefile.in: For actions invoking $(MAKE) from within compound
+ sh statements, exit non-zero if the sub-make fails. Otherwise,
+ the top-level make may exit successfully when it should fail.
+ Reported by Jim Kingdon.
+
+ * {,/*}Makefile.in: Use && after all cd, in case they fail.
+
+ * {,*/}Makefile.in: Declare PRODUCT and VERSION macros.
+ (dist): Use PRODUCT and VERSION instead of tricks on .fname.
+ * configure.in: Substitute PRODUCT and VERSION.
+
+ * {,*/}Makefile.in (dist): Always try a hard link before a copy.
+
+Thu Oct 27 22:32:58 1994 Francois Pinard (pinard@icule)
+
+ * Makefile.in (mostlyclean-local): Do not remove *~.
+ * */Makefile.in (mostlyclean): Idem.
+ Reported by Robert E. Brown and Richard Stallman.
+
+Sun Oct 9 08:30:13 1994 Francois Pinard (pinard@icule)
+
+ * src/m4.h: Get rid of CONFIG_BROKETS.
+
+Sun Oct 2 16:48:10 1994 Francois Pinard (pinard@icule)
+
+ * configure.in: Use AC_ARG_PROGRAM.
+ * aclocal.m4 (fp_C_PROTOTYPES): Substitute @kr@ by kr or empty.
+ Reported by David MacKenzie.
+
+Sat Oct 1 11:22:42 1994 Francois Pinard (pinard@icule)
+
+ * configure.in: Do not add -O to CFLAGS for GNU C, now that
+ configure does it automatically.
+ Reported by Jim Meyering.
+
+Fri Sep 23 08:16:58 1994 Francois Pinard (pinard@icule)
+
+ * src/stackovf.c: Declare the handler_t typedef earlier in the
+ code, use it for stackovf_handler.
+ (setup_stackovf_trap): Use RETSIGTYPE instead of void while
+ casting sigsegv_handler.
+ Reported by Robert Bernstein.
+
+ * src/m4.c (main): Initialize program_name to argv[0] without
+ basename'ing it.
+ Reported by Karl Berry.
+
+Sun Sep 18 11:42:50 1994 Francois Pinard (pinard@icule)
+
+ * src/Makefile.in (TAGS): Include a ../lib/TAGS reference.
+ Reported by Karl Berry.
+
+Wed Sep 14 10:00:22 1994 Francois Pinard (pinard@icule)
+
+ * lib/Makefile.in (mostlyclean): Added.
+ (TAGS): Make in $(srcdir).
+
+ * configure.in: Use `choke me' in test, like everywhere!
+
+ * {doc,examples,lib,src}/Makefile.in (check): Deleted, as
+ unreacheable and useless.
+
+ * doc/Makefile.in (texclean): Deleted, merged in mostlyclean.
+
+ * lib/Makefile.in (DISTFILES): Distribute TAGS.
+ (distclean): Do not remove TAGS.
+ (realclean): Remove it.
+ * Makefile.in: Make TAGS in lib also, not just in src.
+ Reported by Karl Berry.
+
+ * Makefile.in (distclean, realclean): Instead of recursively
+ calling $(MAKE) for the -local part, allow parallel execution of
+ -recursive and -local, only delay the removal of config.status,
+ which is repeated in both goals.
+\f
+Tue Sep 13 19:21:05 1994 Francois Pinard (pinard@icule)
+
+ Release 1.3.
+ * Makefile.in: Group all *clean-recursive goals in one, using sed
+ to remove `-recursive' while calling make recursively. Also, use
+ a subshell for each recursive $(MAKE).
+ Reported by Jim Meyering.
+
+ * src/m4.h (memcpy): Define with bcopy for BSD systems.
+ Reported by Kaveh R. Ghazi.
+
+ * src/Makefile.in (ansi2knr): Use $(LIBS) while linking, for SunOS
+ 4.1.3 requires -ldl to link even ansik2nr, and we need a way to
+ specify it.
+
+ * configure.in: Use date instead of touch for stamp-h.
+ * Makefile.in (stamp-h.in): Idem.
+
+ * Makefile.in (distclean, realclean): Force serial execution of
+ both goals, in case parallel makes are being used.
+ Reported by Jim Meyering.
+
+ * src/Makefile.in (DISTFILES): Distribute TAGS.
+ (distclean): Do not remove TAGS.
+ (realclean): Remove it.
+ Reported by Karl Berry.
+
+Sat Sep 10 12:34:04 1994 Francois Pinard (pinard@icule)
+
+ * configure.in: Use fp_ to match aclocal.m4. Revert _OS_ macros
+ to old names, for following Autoconf.
+
+Thu Sep 8 15:07:27 1994 Francois Pinard (pinard@icule)
+
+ * Makefile.in (MDEFINES): Remove INSTALL substitutions, for
+ ./install.sh will not be correctly referred to in sub-Makefiles.
+ Reported by John David Anglin.
+
+ * doc/Makefile.in (texclean): Remove *.cps and *.fns too.
+ Reported by Eric Backus.
+
+ * Makefile.in, checks/Makefile.in, doc/Makefile.in,
+ examples/Makefile.in, lib/Makefile.in, src/Makefile.in: Limit
+ config.status into remaking this directory's Makefile only.
+ * Makefile.in (stamp-h): Do not check nor touch stamp-h.
+ * configure.in (AC_OUTPUT): Touch stamp-h if CONFIG_HEADERS.
+ Reported by Jim Meyering.
+
+Tue Sep 6 12:07:33 1994 Francois Pinard (pinard@icule)
+
+ * configure.in: Correct stack overflow detection logic, taking
+ care of systems having only incomplete implementations (like for
+ Pyramid 9820 OSx 5.0d).
+ Reported by Kaveh R. Ghazi.
+
+ * src/Makefile.in (TAGS): Remote -t from etags call.
+
+Fri Sep 2 10:37:10 1994 Francois Pinard (pinard@icule)
+
+ * lib/Makefile.in (install): Depend on all.
+
+Wed Aug 31 11:17:21 1994 Francois Pinard (pinard@icule)
+
+ * examples/Makefile.in (mostlyclean): Do not depend on texclean.
+ Reported by Jim Meyering and John David Anglin.
+
+ * Makefile.in (distclean-local): Delete config.log.
+ Reported by Jim Meyering.
+
+ Solidify frozen files with respect to -P:
+ * src/m4.c: Have -P set prefix_all_buitins variable instead of
+ calling a function by that name. Declare the variable.
+ * src/m4.h: Adjust declaration for prefix_all_buitins.
+ * src/builtin.c (builtin_init): Merge in functionality from
+ previous prefix_all_buitins function, while making entries in the
+ symbol table, but not modifying the builtin description itself.
+
+ * src/freeze.c (reload_frozen_state): Add a useless `break;',
+ because *many* compilers do not accept an empty `default:'.
+ Reported by Akiko Matsushita, Eric Backus, John David Anglin,
+ Joseph E. Sacco, Kaveh R. Ghazi, Tom McConnell and Ulrich Drepper.
+
+ * configure.in: Use AC_TYPE_SIGNAL.
+ * src/stackovf.c (setup_stackovf_trap): Use RETSIGTYPE.
+ Reported by Robert Bernstein.
+
+ * checks/Makefile.in (check): Modify PATH so check-them will find
+ m4 in the src directory.
+ * Makefile.in (check): Don't.
+ Reported by Akiko Matsushita and Jim Meyering.
+
+ * src/output.c (make_room_for, output_character_helper): New
+ functions, for implementing a global MAXIMUM_TOTAL_SIZE instead of
+ a per buffer MAXIMUM_BUFFER_SIZE.
+
+ * src/output.c (output_text): New function, for optimizing the
+ output of strings of characters. Use it.
+
+Tue Aug 30 01:44:29 1994 Francois Pinard (pinard@icule)
+
+ * doc, src: New directories reorganizing the distribution.
+ * doc/Makefile.in, src/Makefile.in, examples/Makefile.in: New
+ files.
+ * Makefile.in: Adjusted.
+ * configure.in: Configure new Makefiles.
+
+ * m4.h: Declare STRING typedef. Use it for comment and quote
+ strings, adjusting all references. (This is the rudiments of a
+ beginning for the eventual withdrawal of NUL terminated strings.)
+ * output.c (shipout_text): Accept a length parameter, and use it.
+ All callers adjusted.
+
+Mon Aug 29 12:27:19 1994 Francois Pinard (pinard@icule)
+
+ * m4.h: Include <unistd.h> if it exists.
+ * stackovf.c: Don't.
+
+ Clean up for current_diversion variable:
+ * output.c: Move current_diversion from builtin.c.
+ * m4.h: Declare current_diversion so builtin.c can access it.
+ * output.c (output_init, make_diversion): Initialize or update
+ current_diversion.
+ * builtin.c (builtin_init, m4_divert): Leave current_diversion
+ alone.
+
+ Remove limit on number of diversions:
+ * output.c: Replace ndiversion by diversions, declare it.
+ (output_init): Allocate only diversion 0.
+ (make_diversion): Allocate new diversions as needed.
+ * m4.h, m4.c: Remove NDIVERSIONS and ndiversion related stuff.
+ * m4.c: Still accept -N, but do nothing with it.
+ Reported by David MacKenzie.
+
+ Freeze diversions:
+ * output.c (freeze_diversions): New function.
+ * m4.h: Declare freeze_diversions.
+ * freeze.c: Document frozen file format, revise it, call
+ freeze_diversions to add diversions to frozen format, and code to
+ reload them properly.
+ * m4.c: Do not undivert automatically at end when status being
+ frozen. Do not call builtin_init when reloading frozen state.
+
+ Speed up diversion processing:
+ * output.c: Add INITIAL_BUFFER_SIZE, MAXIMUM_BUFFER_SIZE,
+ COPY_BUFFER_SIZE, in-memory diversion buffers, struct diversion
+ structure and variables, cached variables out of output_diversion,
+ reallocate_diversion_for and OUTPUT_CHARACTER.
+ (shipout_text, make_diversion, insert_diversion): Adapted to new
+ structures.
+ (insert_file): Use better buffering.
+ Reported by David MacKenzie.
+
+Sun Aug 28 05:20:02 1994 Francois Pinard (pinard@icule)
+
+ * Makefile.in, lib/Makefile.in, checks/Makefile.in: Arrange so
+ dist works from another build directory.
+
+Sat Aug 27 14:32:45 1994 Francois Pinard (pinard@icule)
+
+ * symtab.c (hack_all_symbols): Use hash_table_size instead of
+ constant HASHMAX, for -H option to work better.
+
+ * builtin.c (DECLARE): Simplify by using _ ().
+
+ * freeze.c: New file.
+ * Makefile.in: Compile it, distribute it.
+ * m4.c: Recognize, document and process --freeze-state (-F) and
+ --reload-state (-R) options. Pass a true flag to builtin_init
+ only if no reloading some state.
+ * builtin.c (define_builtin): Remove static specifier.
+ (find_builtin_by_name): Remove static specifier.
+ (builtin_init): Accept and obey a flag argument.
+ * m4.h: Add declarations for freeze.c, changes for builtin.c.
+
+Wed Aug 24 16:14:19 1994 Francois Pinard (pinard@icule)
+
+ * builtin.c (dumpdef_cmp): Rewrite so the cast protect the const
+ specifier.
+
+ * configure.in: Implement --with-dmalloc.
+ * acconfig.h: Document WITH_DMALLOC.
+ * m4.h: Add code for when WITH_DMALLOC.
+
+Mon Aug 15 12:38:05 1994 Francois Pinard (pinard@icule)
+
+ * m4.c (long_options): Use "error-output", the dash was missing.
+ Reported by Akiko Matsushita.
+
+Fri Aug 12 16:38:01 1994 Francois Pinard (pinard@icule)
+
+ * m4.h: Include <sys/types.h>.
+ * builtin.c, debug.c, m4.c, output.c, stackovf.c: Don't.
+ * m4.h: Declare len_lquote and len_rquote as size_t, not int.
+ int.
+ * input.c: Declare len_lquote, len_rquote, len_bcomm and len_ecomm
+ as size_t, not int.
+ * builtin.c (dump_args): Declare len as size_t, not int.
+
+ * debug.c: Prototype the forward declaration of debug_set_file.
+
+ * builtin.c (m4_undivert): Replace div by file, for avoiding the
+ shadowing of this variable.
+ * output.c (insert_diversion): Idem.
+
+ * input.c: Delete def_rquote, def_lquote, def_bcomm and def_ecomm.
+ (input_init): Duplicate default quote and comment strings.
+ (set_quotes): Free previous quote strings in all cases. Duplicate
+ even default quote strings.
+ (set_comment): Free previous comment strings in all cases.
+ Duplicate even default comment strings.
+
+ * configure.in: Updated for Autoconf 2.0.
+ * Makefile.in (distclean-local): Also delete config.cache.
+
+ * m4.c (usage): Reorganize the --help output by topic. Include a
+ description for debugging flags.
+
+Fri Jul 29 10:15:52 1994 Francois Pinard (pinard@icule)
+
+ * configure.in: If sigaction is available and SA_ONSTACK defined,
+ use sigaction. Otherwise, if sigvec is available and SV_ONSTACK
+ defined, use sigvec. Else don't compile stackovf.c.
+ * stackovf.c (setup_stackovf_trap): Idem.
+ Reported by Jim Avera, Karl Berry, Kaveh R. Ghazi, Matthias Rabe
+ and Simon Leinen.
+
+Thu Jul 21 22:43:17 1994 Francois Pinard (pinard@icule)
+
+ * m4.c (usage): Replace printf par fputs.
+\f
+Mon Jul 18 23:48:23 1994 Francois Pinard (pinard@icule)
+
+ * Release 1.2
+
+Sun Jul 17 08:08:25 1994 Francois Pinard (pinard@icule)
+
+ * configure.in: Check for sigaction and sigvec. Add a new delayed
+ check for RLIMIT_STACK, combine in the checking for getrlimit.
+ All those things are not universally available.
+ * stackovf.c: Split setting up the trap handler and catching
+ signals, for better taking care of various configure outcomes.
+ * examples/stackovf.sh: Correct a typo.
+ Reported by Eric Backus, Jim Avera and Jim Meyering.
+
+Sat Jul 16 20:36:19 1994 Francois Pinard (pinard@icule)
+
+ * ansi2knr.c: New version sent by its author, Peter Deutsch.
+
+Fri Jul 15 14:36:21 1994 Francois Pinard (pinard@icule)
+
+ * Makefile.in: Modify so parallel make will not try making
+ lib/libm4.a twice simultaneously.
+ Reported by Jim Meyering.
+
+Thu Jul 14 17:23:17 1994 Francois Pinard (pinard@icule)
+
+ * stackovf.c (setup_stackovf_trap): Replace "Don't" by "Do not" in
+ error message, for when no code possibility exists. Even if this
+ line is completely #ifdef'ed out, it brings a syntax error.
+ Reported by Andreas Schwab, Jim Meyering and Joseph E. Sacco.
+
+ * Makefile.in (install): Have install depend on all too, for lib
+ to be remade as needed.
+
+ * examples/stackovf.sh: Try ksh, bsh and bash for shells
+ providing ulimit, instead of using only ksh.
+ Reported by Jim Avera and Joseph E. Sacco.
+
+Tue Jul 12 06:54:31 1994 Francois Pinard (pinard@icule)
+
+ * Makefile.in (check): Have it depend on all instead of m4. In
+ this way, a change in lib will be detected and processed.
+
+ * builtin.c (numeric_arg): Use strtol and verify the conversion,
+ instead of using sscanf which stops as soon as there is a
+ non-digit in the input. Previously, incr(1xyzzy), eval(1,2xyzzy)
+ and divert(1xyzzy) were all accepted without any warning or error
+ messages.
+ * m4.h: Declare strtol as long if not including stdlib.h.
+ * configure.in: Check for limits.h, and replace strtol if missing.
+ * lib/Makefile.in: Substitute LIBOBJS. Distribute strtol.c.
+ * lib/strtol.c: New file, from elsewhere.
+ Reported by Andreas Schwab.
+
+Thu Jul 7 22:38:10 1994 Francois Pinard (pinard@icule)
+
+ * macro.c (expand_macro): Cast value to (boolean) prior to
+ assigning it to traced.
+ Reported by Tom McConnell.
+
+ * Makefile.in (m4): Always make all in lib first.
+ Reported by Jim Meyering.
+
+Wed Jul 6 13:16:31 1994 Jim Avera (jima@netcom.com)
+
+ * stackovf.c: Isolated OS-dependent sections; Improved portability,
+ adding support for SunOS/BSD (sigvec, sigstack, and 4-parameter signal
+ handlers), and a default error message if the fault address is not
+ available (when neither siginfo.h nor BSD sigcontext are supported).
+ * configure.in: Changes for stackovf.h: Check for sigcontext,
+ sigaction, sigstack, and define rlim_t as int if necessary.
+ * acconfig.h: Added HAVE_SIGCONTEXT and rlim_t.
+ * examples/stackovf.sh: Run m4 -L99999999 to allow stack overflow.
+ * ansi2knr.c: Fix for func-ptr args; convert "..." to varargs syntax.
+
+Tue Jul 5 19:13:54 1994 Francois Pinard (pinard@icule)
+
+ * configure.in: Use AC_SET_MAKE.
+ * Makefile.in: Use @SET_MAKE@.
+ Reported by Jim Meyering.
+
+ * checks/check-them: Do not trap on SIGQUIT or SIGALRM.
+ Reported by Ian Taylor.
+
+Sat Jul 2 00:58:47 1994 Francois Pinard (pinard@icule)
+
+ * configure.in: Remove dependency of USE_STACKOVF on STDC_HEADERS,
+ because siginfo.h is unrelated to standard headers, and siginfo.h
+ is already checked for.
+ Reported by Joseph E. Sacco.
+
+ * acconfig.h, aclocal.m4, m4.h: Replace HAVE_PROTOTYPES by
+ PROTOTYPES.
+ * aclocal.m4, configure.in: Replace AC_HAVE_PROTOTYPES by
+ AC_PROTOTYPES.
+
+Wed Jun 29 22:41:53 1994 Francois Pinard (pinard@icule)
+
+ * builtin.c (substitute): Use \& to represent this part of the
+ string which was matched by the whole regexp, instead of
+ representing the whole string. Any usage of \0 issues a warning
+ and acts like \&, it will disappear in some subsequent release.
+
+Mon Jun 27 14:24:23 1994 Francois Pinard (pinard@icule)
+
+ * m4.c: Complete prototype for forwarded declaration of usage.
+
+ * input.c (init_macro_token): Correct own reference in error
+ message. Previous name get_macro_func was referred to instead.
+ (next_char): Correct own reference in error message. Previous
+ name advance_input was referred to instead.
+
+ * m4.h: Declare eval_t and unsigned_eval_t typedefs to 32 bits.
+ * eval.c (logical_or_term, logical_and_term, or_term, xor_term,
+ and_term, not_term, logical_not_term, cmp_term, shift_term,
+ add_term, mult_term, exp_term, unary_term, simple_term): Add
+ prototype to forwarded declarations. Declare parameter v1 as
+ eval_t * instead of int *. Same for local variable v2 in dyadic
+ functions. Same for result in exp_term.
+ * builtin.c (m4_eval): Declare value as eval_t instead of int.
+ (ntoa): Declare value as eval_t instead of int. Declare uvalue as
+ unsigned_eval_t instead of unsigned int. Change casts accordingly.
+ (shipout_int): Cast first argument of ntoa to eval_t.
+ Reported by Thorsten Ohl.
+
+ * macro.c: Complete the prototypes of forwarded expand_macro and
+ expand_token.
+ Reported by Thorsten Ohl.
+
+ * m4.h: Define voidstar as void * or char * depending on __STDC__.
+ The Ultrix 3.1 compiler cannot do much with void pointers.
+
+ * builtin.c (dumpdef_cmp): Replace void * by voidstar.
+ * m4.c (xfree): Replace void * by voidstar.
+ Reported by Tom McConnell.
+
+ * ansi2knr.1: New, from elsewhere.
+ * Makefile.in (DISTFILES): Distribute ansi2knr.1
+
+ * Makefile.in (stamp-h.in): Avoid running ./config.status if
+ stamp-h does not exist yet. This avoids running it a second time
+ just after the initial ./configure.
+ Reported by David MacKenzie and Tom McConnell.
+
+ * m4.h: Replace the enum debug_info declaration with a series of
+ #define's. The Ultrix 3.1 compiler would otherwise need casting
+ (int) to most references, when used in expressions.
+ Reported by Tom McConnell.
+
+Sat Jun 25 00:10:05 1994 Francois Pinard (pinard@icule)
+
+ * aclocal.m4: Replace FP_PROTOTYPES by AC_HAVE_PROTOTYPES,
+ following an idea from Brook G. Milligan. AC_HAVE_PROTOTYPES
+ calls the compiler. Previously, FP_PROTOTYPES was only calling
+ the preprocessor; by not being subject to CFLAGS, this was
+ discouraging those flags asking for ANSI compilation.
+ * acconfig.h: Document HAVE_PROTOTYPES.
+ * configure.in: Use AC_HAVE_PROTOTYPES instead of FP_PROTOTYPES.
+ * m4.h: Define _() according to HAVE_PROTOTYPES, not __STDC__.
+ Reported by Eric Backus.
+
+ * configure.in: Substitute CFLAGS and LDFLAGS, taking their value
+ from the environment. Default CFLAGS to -g if not set.
+ * Makefile.in: Have CFLAGS and LDFLAGS substituted from configure.
+ * lib/Makefile.in: Have CFLAGS substituted from configure.
+ Reported by Eric Backus and Tom McConnell.
+
+ * configure.in: m4_undefine changeword before using AC_ENABLE.
+
+ * m4.h: Declare prototypes for error (for ANSI compilers only),
+ prefix_all_builtins and reference_error.
+ Reported by Tom McConnell.
+
+ * input.c (set_word_regexp): Do not try to initialize the array
+ test from a string, this does not work with non-ANSI compilers.
+ Reported by Eric Backus.
+
+ * Makefile.in (dist): Clean examples/ before saving it.
+ (distclean-local): Also remove stamp-h.
+ Reported by Eric Backus.
+
+ * Makefile.in (_stackovf.c): Goal for compiling stacokovf.c with
+ non ANSI compilers.
+ Reported by Tom McConnell.
+
+ * checks/Makefile.in (clean): Depends on mostlyclean.
+ (mostlyclean): New goal.
+
+Fri Jun 24 23:30:31 1994 Francois Pinard (pinard@icule)
+
+ * Makefile.in (DISTFILES): Distribute install.sh.
+ * install.sh: New file, copied from elsewhere.
+ Reported by Assar Westerlund and Kaveh R. Ghazi.
+
+Thu Jun 23 00:00:30 1994 Francois Pinard (pinard@icule)
+
+ * configure.in: Define ENABLE_CHANGEWORD if --enable-changeword.
+ * acconfig.h: Explain ENABLE_CHANGEWORD.
+
+ [These modifs all depend upon ENABLE_CHANGEWORD and are adapted
+ from code provided by Pete Chown]
+ * m4.h: Add original_text field to u_t variant of union u.
+ Declare TOKEN_DATA_FUNC macro.
+ * builtin.c: Declare changeword.
+ (m4_changeword): New function.
+ * input.c: Include "regex.h", define variables with word regexps.
+ (input_init): Initialize the word regexp.
+ (set_word_regexp): New.
+ (next_token): Declare local variables, use the previous code if
+ default_word_regexp is true. Else, match using a new code. Save
+ the original text.
+ * macro.c (expand_token): Ship out original text if not a macro
+ name.
+ Reported by Krste Asanovic and Pete Chown.
+
+ [These modifs all depend upon ENABLE_CHANGEWORD]
+ * m4.h: Declare external user_word_regexp.
+ * m4.c: Declare user_word_regexp, and initialize it from
+ --word-regexp or -W, or NULL if not specified.
+ * input.c: Use user_word_regexp if specified, instead of
+ DEFAULT_WORD_REGEXP.
+
+ * Makefile.in (m4): Revert Jan 3 1994 change. I'm unable to
+ agree with it.
+
+ * Makefile.in, lib/Makefile.in: Limit suffixes to .c and .o.
+ * checks/Makefile.in: Empty the suffix list.
+ Reported by Geoff Russell, Joel Sherrill and Roland McGrath.
+
+ * m4.c: Declare nesting_limit and initialize it to 250.
+ Implement -LNUMBER or --nesting-limit=NUMBER to change its
+ value.
+ * m4.h: Declare nesting_limit as external.
+ * macro.c (expand_macro): Stop execution whenever nesting limit
+ is exceeded.
+ Reported by Bengt Mertensson.
+
+ * eval.c (evaluate): Diagnose excess characters in eval input.
+ Things like `eval(08)' used to return 0 with no diagnostic.
+
+ * m4.h: Capitalize first letter of all macro arguments in
+ definitions.
+
+ * m4.c: Declare warning_status, initialize it to 0. Add new
+ option -E, or --fatal-warnings, which sets warning_status to
+ EXIT_FAILURE instead.
+ * m4.h: Declare external warning_status. Define EXIT_SUCCESS and
+ EXIT_FAILURE if not otherwise done by header files.
+ * m4.c: Delete declarations for EXIT_SUCCESS and EXIT_FAILURE.
+ * m4.c, input.c, output.c, symtab.c, builtin.c, macro.c, debug.c,
+ eval.c: Replace 0 by warning_status and 1 by EXIT_FAILURE in first
+ argument of all M4ERROR calls.
+ Reported by Noah Friedman.
+
+ * examples/incl-test.m4: Renamed from incl_test.m4.
+ * examples/include.m4: Include incl-test.m4 instead of
+ incl_test.m4.
+ * examples/multiquotes.m4: Renamed from multi-quotes.m.
+
+Wed Jun 22 21:58:54 1994 Francois Pinard (pinard@icule)
+
+ * configure.in: Avoid USE_STACKOVF if <siginfo.h> not found. Note
+ that Jim developped stackovf.c on a 486 running SVR4.0 (ESIX), and
+ also tested it on a Sun Sparc workstation running SunOS 4.x.
+
+ * format.c (format): When not HAVE_EFGCVT, m4 was failing the
+ 49.format check, abusing a `union values' argument with sprintf
+ without selecting the proper field. Now, save the formatting type
+ first, delaying the fetch of the corresponding argument.
+ Reported by Joseph E. Sacco and Tom Quinn.
+
+ * format.c (format): Remove const from char *fmt declaration when
+ not HAVE_EFGCVT, because a NUL may be forced into it.
+
+ * m4.h: Declare atof() when not STDC_HEADERS.
+ Reported by Joseph E. Sacco.
+
+ * Regenerate configure using Autoconf 1.11, this corrects a
+ problem about an incorrect cpp seting on NeXT 3.1.
+ Reported by Alexander Lehmann.
+
+Sun Jun 5 16:25:19 1994 Francois Pinard (pinard@icule)
+
+ * m4.h (_): Change argument from `x' to `Args'.
+
+Wed May 4 23:59:39 1994 Francois Pinard (pinard@icule)
+
+ * Makefile.in: Remove all occurrences of $(MFLAGS), which were
+ bringing more evil than good on a few systems.
+ Reported by Greg A. Woods.
+
+Fri Apr 22 15:59:35 1994 Francois Pinard (pinard@icule)
+
+ * m4.h: Rename Args() to _().
+ * m4.h: Remove extern specifier from all function declarations.
+
+Fri Apr 22 15:51:21 1994 Jim Avera (jima@netcom.com)
+
+ * stackovf.c: New file implementing stack-overflow detection.
+ * configure.in: Check for getrlimit, sigaction. If all of
+ standard headers, getrlimit and sigaction, define USE_STACKOVF and
+ substitute ${U}stackovf.o for STACKOVF.
+ * acconfig.h: Declare USE_STACKOVF.
+ * Makefile.in: Distribute stackovf.c, link with $(STACKOVF).
+ * m4.h: Declare setup_stackovf_trap().
+ * m4.c: Call setup_stackovf_trap().
+ * tests/stackovf_test.sh: New file.
+
+Wed Apr 13 14:10:30 1994 Francois Pinard (pinard@icule)
+
+ * checks/Makefile.in: Rename .all-stamp to stamp-checks.
+
+ * Makefile.in (Makefile, etc.): Adapt for Autoconf 1.8.
+
+Sun Jan 30 14:24:19 1994 (pinard at icule)
+
+ * m4.h: Remove definition of volatile, not used anymore.
+ Reported by Jim Meyering and Joseph E. Sacco.
+
+ * m4.h: Consistently use `do { ... } while (0)' in macros, instead
+ of `if ... else /* nothing */' for if macros.
+ Reported by Jim Meyering.
+
+ * builtin.c (m4_regexp): Reorganize the code for avoiding a
+ warning from gcc about `repl' possibly used before defined.
+ Reported by Jim Meyering.
+
+ * m4.h: Avoid a pre-ANSI <memory.h> together with <string.h>.
+ Reported by Jim Meyering.
+
+Tue Jan 25 18:39:37 1994 Francois Pinard (pinard at icule)
+
+ * m4.h: Move the conditional definition of volatile after the
+ inclusion of system files, because they may define it first.
+
+Tue Jan 4 19:46:50 1994 Francois Pinard (pinard@icule)
+
+ * checks/Makefile.in (CHECKS): Add a useless `*' before `[', to
+ get around a problem with Alpha make seeing a syntax error, there.
+ Reported by Vern Paxson.
+
+Mon Jan 3 00:21:45 1994 Francois Pinard (pinard@icule)
+
+ * Makefile.in: Do not define LDFLAGS, use CFLAGS on link calls.
+ Reported by Richard Stallman.
+
+Sat Dec 25 08:06:05 1993 Francois Pinard (pinard@icule)
+
+ * configure.in: Correct test for strerror, AC_FUNC_CHECK was used
+ instead of AC_HAVE_FUNCS.
+ Reported by Noah Friedman.
+
+Wed Dec 1 09:37:53 1993 Francois Pinard (pinard@icule)
+
+ * m4.c: Initialize show_help and show_version to zero.
+
+ * m4.c: Ensure EXIT_SUCCESS and EXIT_FAILURE are defined.
+ Use them in exit() and usage() calls.
+
+Sat Nov 27 10:43:24 1993 Francois Pinard (pinard@icule)
+
+ * m4.h: Delete extern sys_nerr, sys_errlist declarations, and
+ syserr() macro. Delete errref, add reference_error and M4ERROR.
+ * m4.c: Replace errref, which was returning an input reference
+ string, with reference_error, which prints it on standard error.
+ * builtin.c, output.c: Use errno as second parameter to error,
+ instead of using syserr() with %s.
+ * *.c: Use M4ERROR instead of error: no more errref() with %s.
+ Doing so, the program name appears after the input reference
+ instead of before, which eases M-x next-error processing.
+
+Wed Nov 24 22:16:15 1993 Francois Pinard (pinard@icule)
+
+ * checks/get-them: Escape braces with backslashes in patterns,
+ because HPUX-9.01 awk needs this.
+ Reported by Jim Meyering.
+
+Mon Nov 22 10:55:52 1993 Francois Pinard (pinard@icule)
+
+ * builtin.c: Declare "FILE *popen ();".
+
+ * m4.h: Remove MESSAGE{,1,2}, WARNING1, FATAL{,1}, INTERNAL_ERROR
+ macros, replace error_message_prefix() declaration by errref()'s.
+ Declare xrealloc, for use in errref().
+ * m4.c: Delete error_message_prefix() function, add errref().
+ * *.c: Use error() systematically in place of all error macros,
+ now that error() flushes stdout first. Make needed adjustments.
+
+ * m4.h: Remove const in sys_errlist[] declaration, it creates
+ conflicts on SGI and Alpha.
+ Reported by Kaveh R. Ghazi.
+
+Sat Nov 20 08:26:15 1993 Francois Pinard (pinard@icule)
+
+ * m4.c: Include <getopt.h> instead of "getopt.h".
+
+ * configure.in: Output to config.h. Use HAVE_FUNCS preferably.
+ * acconfig.h: New, for documenting HAVE_EFGCVT.
+ * Makefile.in: Distribute acconfig.h, .stamp-h.in and config.h.in,
+ use them wherever appropriate. Also use -I. for compilations.
+ * lib/Makefile.in: Use -I.. for compilations.
+ * *.c: Include <config.h> or "config.h".
+
+ * m4.h: Test for HAVE_MEMORY_H instead of NEED_MEMORY_H.
+ * configure.in: Use AC_HAVE_HEADERS(memory.h), delete AC_MEMORY_H.
+
+Wed Nov 17 09:34:55 1993 Francois Pinard (pinard@icule)
+
+ * builtin.c (m4_eval): Cast strlen to (int) before comparing.
+
+ * input.c (input_init): Initialize quote and comment strings
+ explicitely instead of calling set_quotes and set_comment: by
+ doing so, we ensure we do not free uninitialized variables.
+
+ * checks/check-them: Reverse arguments to both diff, so the
+ expected is on the left and the obtained on the right.
+
+ * m4.h: Add MESSAGE{,1,2}, WARNING1, FATAL{,1} and INTERNAL_ERROR
+ macros. Delete declarations for m4error, warning, fatal and
+ internal_error, add declaration for error_message_prefix.
+ * m4.c: Delete m4error, warning, fatal and internal_error
+ routines, add error_message_prefix routine.
+ * *.c: Replace m4error routine calls with MESSAGE* macro calls,
+ warning with WARNING*, fatal with FATAL* and internal_error with
+ INTERNAL_ERROR*.
+ * Makefile.in (_m4.c): Do not adjust ansi2knr output for va_alist,
+ this is not needed anymore.
+
+ * m4.h: Declare extern FILE *debug. Add DEBUG_PRINT{1,3} and
+ DEBUG_MESSAGE{,1,2} macros. Delete declarations for debug_print
+ and debug_message, add declaration for debug_message_prefix.
+ * debug.c: Remove static specifier for FILE *debug declaration.
+ Delete debug_print and debug_message routines, add
+ debug_message_prefix routine.
+ * builtin.c, debug.c: Replace debug_print routine calls with
+ DEBUG_PRINT* macro calls.
+ * input.c, path.c: Replace debug_message routine calls with
+ DEBUG_MESSAGE* macro calls.
+
+ * m4.h: Remove inclusion of <varargs.h>.
+ * debug.c: Include <stdarg.h> or <varargs.h>.
+ (trace_format): Use stdarg instead of varargs if __STDC__.
+
+ * configure.in: Remove checks for vfprintf and _doprnt. These
+ implementations use varargs tricks which are not portable enough.
+ * lib/vfprintf.c: Deleted.
+ * lib/_doprnt.c: Deleted.
+ * lib/Makefile.in: Adjusted accordingly. Remove LIBOBJS.
+ Reported by Joel Sherrill.
+
+ * path.c (add_include_directory): Use xstrdup.
+
+ * builtin.c (find_builtin_by_name): Declare static.
+
+ * *.[ch]: Add const to a few "char *" declarations.
+
+ * configure.in: Remove commented tests for fileno() and fstat().
+ * debug.c: Remove comments about HAVE_FILENO and HAVE_FSTAT.
+
+ * debug.c (debug_flush_files): New.
+ * m4.h: Declares it.
+ * builtin.c (m4_syscmd, m4_esyscmd): Use it.
+ Reported by Nicolas Pioch.
+
+Fri Nov 12 10:02:26 1993 Francois Pinard (pinard@icule)
+
+ * Makefile.in (m4.dvi): Use m4.texinfo instead of m4.texi.
+ Reported by Joel Sherrill.
+
+ * builtin.c (prefix_all_builtins): Instead of the table size, use
+ the null entry at end for stopping the loop. It was overwritten.
+ Reported by Andreas Schwab and Jim Meyering.
+
+ * builtin.c (prefix_all_builtins): Cast xmalloc to (char *).
+ Reported by Kaveh R. Ghazi.
+
+ * macro.c (call_macro): Add * in (*SYMBOL_FUNC (sym)) (...).
+ Reported by Karl Vogel.
+
+Tue Nov 9 09:31:47 1993 Francois Pinard (pinard@icule)
+
+ * m4.h: Do not define volatile if already defined.
+ Reported by Rene' Seindal.
+
+ * lib/Makefile.in: Add a forgotten ALLOCA=@ALLOCA@. Grrr!
+
+ Reported by Bernhard Daeubler, Eric Backus, Hal Peterson, Hoang
+ Uong, Ian Taylor, Kaveh R. Ghazi, Tom McConnell and Walter Wong.
+
+Mon Nov 8 21:11:44 1993 Francois Pinard (pinard@icule)
+
+ * m4.h: Define strchr and strrchr in terms of index and rindex,
+ instead of the other way around.
+ * builtin.c, m4.c, path.c: Use strchr instead of index.
+
+ * input.c (next_char): Remove a "break;" after a "return ...;".
+ Reported by Tom McConnell.
+\f
+Mon Nov 8 12:45:34 1993 Francois Pinard (pinard@icule)
+
+ * Release 1.1
+
+ * configure.in: Do not copy check files in the build hierarchy.
+ * checks/check-them: Identify the m4 version being checked. For
+ finding m4, look in $PATH instead of in the parent directory.
+ * Makefile.in (check): Prepend `pwd` to $PATH before checking.
+ * checks/Makefile.in (.all-stamp): Always create check files in
+ the source hierarchy, not anymore in the build hierarchy.
+ (check): cd to the source hierarchy before performing checks.
+ Do not copy nor clean COPYING anymore, take it from `..'.
+ Reported by Tom McConnell.
+
+ * Makefile.in (Makefile): Use $(SHELL).
+ (config.status): Use $(SHELL). Use "config.status --recheck"
+ instead of "configure --no-create", which is obsolete.
+ Reported by Tom McConnell.
+
+Fri Nov 5 09:49:30 1993 Francois Pinard (pinard@compy.IRO.UMontreal.CA)
+
+ * m4.c (usage): Use "%s" instead of "m4" in format string.
+ Reported by Jim Meyering.
+
+ * Makefile.in: Distribute mkinstalldirs.
+ Reported by Pierre Gaumond.
+ Reported by Jim Meyering.
+ Reported by Tom McConnell.
+ Reported by Andreas Gustafsson.
+
+ * checks/check-them: Renamed from checks/check_them.
+ * checks/get-them: Renamed from checks/get_them.
+ * checks/.all-stamp: Renamed from checks/.all_stamp.
+ * checks/Makefile.in: Changed accordingly.
+ Reported by Jim Meyering.
+
+Thu Nov 4 13:50:52 1993 Francois Pinard (pinard@lagrande.IRO.UMontreal.CA)
+
+ * lib/Makefile.in (dist): Correct permissions on files.
+
+ * output.c: Declare tmpfile, some systems don't.
+
+Wed Nov 3 09:09:16 1993 Francois Pinard (pinard@icule)
+
+ * checks/Makefile.in (dist): Correct permissions on files.
+
+ * Makefile.in (dist): Ensure recursive linking for subdirectory
+ `examples', also set read/write permissions on all its files.
+
+ * mkinstalldirs: New, from elsewhere.
+ * Makefile.in: Use it.
+
+ * debug.c: Synchronize debug messages and regular output when
+ the debug file and stdout are redirected to the same file.
+ * configure.in: Add (commented) checks for fileno and fstat.
+ Reported by Jim Avera.
+
+ * builtin.c (m4_ifelse): Diagnose excess arguments if 5, 8, 11,
+ etc., arguments, then ignore the superfluous one. m4 used to
+ diagnose missing arguments and return the empty string.
+ Reported by Nick S. Kanakakorn.
+
+Tue Nov 2 00:55:41 1993 Francois Pinard (pinard@icule)
+
+ * m4.c (main): At end of all input, ensure all undiverted text
+ goes to the main output stream.
+ Reported by Andreas Gustafsson.
+
+ * m4.c (main): exit (0), instead of return 0.
+
+ * m4.c: Implement -P and --prefix-builtins.
+ * builtin.c: Delete const specifier on builtin_tab.
+ (prefix_all_builtins): New.
+ Reported by Noah Friedman.
+ Reported by Scott Bartram.
+
+ * c-boxes.el: New, from elsewhere.
+ * Makefile.in: Distribute it.
+
+ * m4.h: Do not define bcopy if <string.h> defines it.
+ Reported by Stephen Perkins.
+
+ * builtin.c (define_macro): Allow a missing second argument, in
+ which case it is implied empty. Affects define and pushdef.
+ Reported by Eric Allman.
+
+Mon Nov 1 07:45:24 1993 Francois Pinard (pinard@icule)
+
+ * m4.h: Add blind_if_no_args in struct builtin, blind_no_args in
+ struct symbol adn SYMBOL_BLIND_NO_ARGS macro.
+ * builtin.c: Initialize all the blindness fields in builtin_tab.
+ (define_builtin): Copy the blindness of a builtin into its symbol.
+ * macro.c (expand_token): Avoid processing a blind builtin if the
+ next character is not an opening parenthesis.
+ Reported by David MacKenzie.
+ Reported by Noah Friedman.
+
+ * configure.in: Ensure an exit status of 0 on completion.
+ Reported by Vivek P. Singhal.
+
+ * eval.c (eval_lex): Admit both lower and upper case letters for
+ bases greater than 10. Only lower case letters were accepted.
+
+ * eval.c (eval_lex): Recognize 0bDIGITS and 0rRADIX:DIGITS syntax.
+ Reported by Krste Asanovic.
+
+ * eval.c: Rename NOT to LNOT. Add XOR, NOT, LSHIFT and RSHIFT.
+ * eval.c (logical_not_term): New name for not_term.
+ * eval.c (xor_term): New, between or_term and and_term.
+ * eval.c (not_term): New, between and_term and logical_not_term.
+ * eval.c (shift_term): New, between cmp_term and add_term.
+ Reported by Krste Asanovic: ~, ^, <<, >>.
+ Reported by Ben A. Mesander: ** vs ^.
+
+ * m4.c: Delete xmalloc.c, xrealloc.c, xstrdup.c.
+ * m4.h: Delete xrealloc.c.
+ * lib/xmalloc.c: New, from elsewhere.
+ * lib/xstrdup.c: New, from elsewhere.
+ * lib/Makefile.in: Distribute and compile them.
+
+ * m4.c: Change progname to program_name.
+ * builtin.c, eval.c, m4.c, m4.h: Rename error to m4error.
+ * lib/error.c: New, from elsewhere.
+ * lib/Makefile.in: Distribute and compile error.c.
+ * configure.in: Check AC_VPRINTF and for strerror.
+ * m4.c: Delete cmd_error. Use error instead.
+ * m4.c: Change label capitalisation to "ERROR", "Warning", etc.
+
+ * m4.h: Delete #define const, let Autoconf takes care of this.
+
+ * m4.c: Remove all code conditionalized by IMPLEMENT_M4OPTS.
+ Merge parse_args into main. Declare argv to be `char *const *',
+ then remove superfluous casts.
+
+ * m4.c: Rename --no-gnu-extensions to --traditional.
+ Reported by Ben A. Mesander.
+
+ * m4.c (usage): Add a status parameter. Supply one in various
+ calls. Add --help processing. Remove -V for --version.
+
+ * lib/Makefile.in: Put $(CFLAGS) last in .c.o rule.
+
+ * lib/Makefile.in: Have an AR=ar declaration.
+ Reported by Eric Backus.
+ Reported by Bjorn R. Bjornsson.
+ Reported by Tom Tromey.
+ Reported by Kristine Lund.
+ Reported by Marion Hakanson.
+
+Sat Oct 30 12:51:47 1993 Francois Pinard (pinard@icule)
+
+ * Makefile.in (m4.info): Use -I$(srcdir) on $(MAKEINFO).
+ Reported by Noah Friedman.
+
+Mon Oct 25 14:58:48 1993 Francois Pinard (pinard@icule)
+
+ * Makefile.in: Remove MDEFINES and cleanup.
+
+Wed Jun 9 14:59:46 1993 Francois Pinard (pinard@icule)
+
+ * Makefile.in (dist): Replace "echo `pwd`" by a mere "pwd".
+ Create a gzip file.
+
+Sat Feb 6 14:59:22 1993 Francois Pinard (pinard@icule)
+
+ * Makefile.in, lib/Makefile.in, check/Makefile.in: In dist goals,
+ ensure 777 mode for directories, so older tar's will restore file
+ modes properly.
+
+Sun Jan 17 15:38:05 1993 Francois Pinard (pinard@icule)
+
+ * Makefile.in, lib/Makefile.in: Put $(CFLAGS) after $(CPPFLAGS),
+ so the installer can override automatically configured choices.
+ Reported by Karl Berry.
+
+Fri Jan 15 16:07:00 1993 Francois Pinard (pinard@icule)
+
+ * lib/vfprintf.c: Stolen from Oleo distribution and adapted. The
+ previous version was not working properly on m68k-hp-bsd4.3.
+ Reported by Roland McGrath.
+
+ * lib/_doprnt.c: Stolen from Oleo distribution.
+ * configure.in: Check for _doprnt.c if vfprintf.c selected.
+ * lib/Makefile.in: Distribute _doprnt.c.
+ Do not distribute regex.[ch].old anymore.
+
+Fri Jan 1 19:42:23 1993 Francois Pinard (pinard at icule)
+
+ * Makefile.in, lib/Makefile.in: Reinstate $(CPPFLAGS), use it.
+ Richard wants it there.
+
+Sun Dec 27 07:01:54 1992 Francois Pinard (pinard at icule)
+
+ * Makefile.in: Add DEFS to MDEFINES.
+ * lib/Makefile.in (.c.o): Remove $(CPPFLAGS).
+ (libm4.a): Remove the library before creating it.
+ (distclean): Remove tags and TAGS too.
+
+Wed Dec 23 12:46:55 1992 Francois Pinard (pinard at icule)
+
+ * Makefile.in (dvi, m4.dvi): New goals.
+
+ * builtin.c, eval.c, format.c, input.c, m4.[ch], m4.texinfo,
+ macro.c, output.c, path.c, symtab.c: Change Copyright from
+ 1989-1992 to the explicit enumeration 1989, 1990, 1991, 1992.
+
+ * examples/divert.m4: Deleted, this bug has been corrected.
+
+ * Makefile.in (texclean, mostlyclean): New goals.
+
+ * Makefile.in (clean): Remove clutter from ansi2knr.
+ Reported by Pierre Gaumond.
+ Reported by Greg A. Woods.
+
+Sun Dec 20 10:40:20 1992 Francois Pinard (pinard at icule)
+
+ * Makefile.in: Remove $(CPPFLAGS) from the .c.o rule. The user
+ might well use CFLAGS is s/he needs it.
+
+ * Makefile.in: Allow installation of info files from a separate
+ build directory.
+ Reported by Jason Merrill.
+ Reported by David MacKenzie.
+ Reported by Skip Montanaro.
+ Reported by Erez Zadok.
+ Reported by Assar Westerlund.
+\f
+Sat Dec 19 08:21:34 1992 Francois Pinard (pinard at icule)
+
+ * Release 1.0.3
+ This is still a beta release for the future GNU m4 version 1.1.
+
+ * lib/alloca.c: New, from elsewhere.
+ * lib/Makefile.in: Distribute it. Define and use $(ALLOCA).
+
+ * m4.h: Do not define index/rindex if already defined. If
+ FALSE/TRUE are already defined, do not redefine them, but merely
+ define boolean typedef to int.
+
+ * Makefile.in: Use $(DEFS) while compiling ansi2knr.
+ * ansi2knr.c: Rewrite #ifdef HAVE_STRING_H || STDC_HEADERS,
+ because some C compilers do not like connectives with #ifdef.
+ * m4.h: Define `volatile' only if __GNUC__, instead of once for
+ __GNUC__ and once for __STDC__.
+ * lib/regex.h: Leave const alone, AC_CONST will take care of it.
+
+ * checks/Makefile.in: Use .all_stamp instead of $(CHECKS) for
+ Makefile dependencies. Without it, make keeps destroying and
+ remaking $(CHECKS) in a loop (why?). Distribute .all_stamp.
+
+ * m4.h, m4.c, builtin.c, output.c: Change all divertion/DIVERTION
+ to diversion/DIVERSION, this was a spelling error.
+
+ * m4.c: Declare version[], remove #include "version.h".
+ * version.h: Deleted.
+ * Makefile.in: Remove references to version.h.
+
+ * output.c (shipout_text): Centralize all `#line NUM ["FILE"]'
+ production, by using a simpler and more robust algorithm. This
+ solves the problem of synclines sometimes written in the middle of
+ an output line. Delete sync_line() and output_lines variable.
+ * m4.h: Remove sync_line prototype and output_lines declaration.
+ * input.c (next_char), output.c (shipout_text): Remove references
+ to output_lines.
+ * input.c (push_file, pop_file): Merely put the value -1 in
+ output_current_line instead of calling sync_line, for delaying a
+ single `#line NUM FILE' before next output line. Do not test
+ for sync_output, because this is unnecessary clutter.
+ * output.c (make_divertion, insert_divertion): Idem.
+ * input.c: Rename must_advance_line to start_of_input_line, for
+ consistency.
+
+ * debug.c (trace_header): Select a new debug line format, which
+ better complies with GNU standards for formatting error messages.
+ With option `-dfl', M-x next-error might be used on the output.
+ * m4.c (vmesg): Adjust format of error output to GNU standards.
+ * m4.texinfo: Adjust examples for `make check' to work.
+
+ * m4.h, builtin.c, debug.c, input.c, macro.c, path.c: Use upper
+ case for enum debug_info constants, which were all lower case.
+
+ * builtin.c (m4_regexp, m4_patsubst): Use re_search instead of
+ re_search_2.
+ * lib/regex.[ch]: Use new version from textutils 1.3.6, with some
+ collected patches. I tried a few times using newer regex.[ch], it
+ mysteriously stopped aborting with this one. Insecure feeling...
+ * lib/Makefile.in: Distribute regex.[ch].old, just in case!
+
+Fri Dec 18 11:08:03 1992 Francois Pinard (pinard at icule)
+
+ * m4.c: Change `--no-warnings' to `--silent'.
+ Reported by David MacKenzie.
+
+ * m4.c: Put all M4OPTS code upon IMPLEMENT_M4OPTS control, and
+ leave it off for now. See comment in m4.c for justification.
+ Reported by David MacKenzie.
+
+ * configure.in: Replace AC_USG by AC_HAVE_HEADERS(string.h).
+ * m4.h, ansi2knr.c, lib/regex.h: Replace USG by HAVE_STRING_H.
+
+ * Makefile.in: Add a new `info' goal. Use macro MAKEINFO.
+
+ * Makefile.in: Ensure recursive cleaning is done before local
+ cleaning for all clean goals.
+
+ * builtin.c (ntoa): Ensure the value is always interpreted as a
+ signed quantity, whatever the radix is.
+
+Wed Nov 18 07:57:19 1992 Jim Meyering (meyering@idefix)
+
+ * builtin.c, format.c, input.c: Split long lines.
+ * m4.c: Use typedef macro_definition instead of struct
+ macro_definition.
+ * symtab.c: Use typedef symbol instead of struct symbol.
+
+Tue Nov 17 01:58:40 1992 Francois Pinard (pinard at icule)
+
+ * *.[ch]: Remove all trailing whitespace, in code and comments.
+
+ * configure.in: Find some awk.
+ * Makefile.in: Add $(AWK) to MDEFINES.
+ * checks/Makefile.in: Transmit $(AWK) to get_them.
+ * checks/get_them: Use $AWK instead of gawk. Add a close in the
+ awk script when switching files, because without this, mawk runs
+ out of file descriptors.
+
+Mon Nov 16 20:42:56 1992 Francois Pinard (pinard at icule)
+
+ * Makefile.in (realclean): Delete m4.info*.
+ Reported by Jim Meyering.
+
+ * Makefile.in: Adjust and link with checks/Makefile.
+ * checks/Makefile.in: New.
+ * configure.in: Output checks/Makefile.
+
+ * checks/get_them: Have the dnl header of each test more
+ recognizable by next-error, also use a better message.
+
+Mon Nov 16 07:48:52 1992 Jim Meyering (meyering@idefix)
+
+ * m4.h [__GNUC__]: Use __volatile__ instead of `volatile.'
+ And use that only if __GNUC__ since we're using it's GCC-specific
+ semantics that tell the compiler the associated function doesn't
+ return.
+
+ * builtin.c (substitute): Don't use character as an array index.
+ (dumpdef_cmp): Make formal arguments `const void *' to avoid
+ warnings with gcc -W -Wall on systems with qsort prototype.
+ (m4_errprint): Cast obstack_finish to `char *' to avoid warnings
+ from gcc -W -Wall.
+
+ * eval.c (most functions): Add parentheses to assignments used
+ as truth values go avoid warnings from gcc -Wall.
+
+ * input.c, m4.c, output.c, path.c, symtab.c: Declare static
+ any functions that don't need external scope.
+
+ * builtin.c, debug.c, format.c, m4.c, m4.h, macro.c, symtab.c
+ (many functions and arrays): Declare `const'.
+
+Sun Nov 15 09:42:09 1992 Francois Pinard (pinard at icule)
+
+ * *.[ch]: Rename nil to NULL, using the declaration from <stdio.h>,
+ removing the declaration from m4.h. Also rename false to FALSE
+ and true to TRUE.
+
+ * lib/Makefile.in (Makefile): New goal.
+
+ * Makefile.in, lib/Makefile.in: Add a .c.o rule, so CFLAGS is not
+ so heavily loaded. It gets more easily overridable, calling make.
+ Reported by Jim Meyering.
+
+ * Makefile.in (dist): Get .fname from the current directory name,
+ instead of from version.h. I need updating many files manually,
+ when the version changes, version.h is just one of them.
+
+Sat Nov 14 11:01:20 1992 Francois Pinard (pinard at icule)
+
+ * m4.h: Remove the tag `boolean' on the enum introducing typedef
+ `boolean'. This tag conflicts with <sys/types.h> on SVR4.
+ Reported by Tom McConnell.
+
+Fri Nov 13 00:12:50 1992 Francois Pinard (pinard at icule)
+
+ * m4.texinfo: Correct the examples for 33.divert, 38.divnum,
+ 39.cleardiv, which were describing missing or spurious newlines.
+ Modify examples 52.eval, 53.esyscmd and 54.sysval so the results
+ do not depend on machine word size, `/bin/false' implementation,
+ or `wc' output format. `make check' is more dependable, now.
+
+ * checks/check_them: Summarize the failed tests by listing their
+ name, at end. If none, issue `All checks successful'. Output
+ `Checking' instead of `Input file:'.
+
+ * checks/get_them, checks/check_them: Reindented.
+
+ * Makefile.in (dist): chmod a+r before making the tar file.
+
+Thu Nov 12 14:42:57 1992 Francois Pinard (pinard at icule)
+
+ * builtin.c (m4_dnl): Diagnose any parameter to `dnl'.
+
+ * input.c (next_token): Reinitialize token_buttom just after using
+ it as a watermark with obstack_free. Or else, a future token, big
+ enough for triggering reallocation of the obstack chunk, could
+ void the initialized value of token_buttom, later causing panic in
+ obstack_free. Rename token_buttom to token_bottom everywhere.
+
+ * m4.h: Before declaring errno, first include <errno.h> and
+ ensure that it does not define errno.
+ Reported by Richard Stallman.
+
+Wed Nov 11 17:40:35 1992 Francois Pinard (pinard at icule)
+
+ * builtin.c: Define and use DECLARE macro for builtins.
+
+ * builtin.c (m4_ifelse): Avoid any diagnostic when exactly one
+ argument, this is a common idiom for introducing long comments.
+
+ * builtin.c (m4_ifelse): If 3n + 2 arguments, diagnose missing
+ arguments. The last argument was silently ignored.
+
+ * m4.c (cmd_error): Add a missing semicolon before va_end().
+
+Tue Nov 10 08:57:05 1992 Francois Pinard (pinard at icule)
+
+ * Makefile.in: Now handle protoized sources. Define and use U.
+ Compile and use ansi2knr with old compilers. Update DISTFILES.
+ Add `aclocal.m4' to `configure' dependencies.
+ * ansi2knr.c: New, from Ghostscript distribution.
+ * configure.in: Define U through FP_PROTOTYPES for old compilers.
+ Add AC_ISC_POSIX, AC_CONST, AC_SIZE_T.
+ * aclocal.m4: New, provide FP_PROTOTYPES.
+ * m4.h: Conditionnaly protoized through Args, save for varags.
+ * builtin.c: Protoized. Then:
+ Include <sys/types.h> if size_t is not defined, before "regex.h".
+ (m4_ifelse): Fetch built-in name properly for diagnostic.
+ (m4_dumpdef): Remove wrong (char *) cast calling dump_symbol.
+ (m4_regexp): Add const to `msg' declaration.
+ (m4_patsubst): Add const to `msg' declaration.
+ * debug.c: Protoized, save for varargs.
+ * eval.c: Protoized.
+ * format.c: Protoized.
+ * input.c: Protoized.
+ * m4.c: Protoized, save for varargs. Then:
+ (xfree): Accept void * instead of char *.
+ (xmalloc): Return void * instead of char *.
+ (xrealloc): Accept and return void * instead of char *.
+ * macro.c: Protoized.
+ * output.c: Protoized.
+ * path.c: Protoized. Then cast some (char *) over xmalloc's.
+ * symtab.c: Protoized.
+
+Fri Nov 6 02:05:21 1992 Francois Pinard (pinard at icule)
+
+ * m4.texinfo: Remove directory from diagnostics in 30.include,
+ 51.eval, 56.errprint and 57.m4exit tests.
+
+ * m4.h: Remove declarations for int or void system functions, they
+ cause more conflicting trouble than they make good.
+
+ * configure.in: Avoid configuration header file. Add some tests.
+ * m4.h: Remove #include "config.h".
+ * Makefile.in, lib/Makefile.in: Implement Autoconf interface.
+ Then, rewritten for better compliance with GNU standards.
+
+Thu Nov 5 12:37:13 1992 Francois Pinard (pinard at icule)
+
+ * format.c (format): Avoid syntax error if not HAVE_EFGCVT,
+ because of a misplaced #endif.
+
+ * Many *.[hc] files: Correct intra-line spacing here and there,
+ according to GNU indent 1.6 advice.
+
+ * configure.in: New, using Autoconf 1.2.
+ * m4.h: Reverse NO_MEMORY_H to NEED_MEMORY_H.
+ * Delete old configure.in, configure, etc/configure.in,
+ etc/configure, lib/configure.in, lib/configure and config/*.
+ Reported by Jason Merrill.
+
+ * symtab.c (hash): Change (char) NULL to '\0'.
+ Reported by Jason Merrill.
+
+ * Delete .vers, etc/newdist.sh, etc/newvers.sh and
+ etc/nextvers.sh. Release numbers will be edited `by hand'.
+ * version.h: De-automatize, force value in.
+
+ * m4.c: Changes in order to use a newer getopt.h.
+ Reported by David MacKenzie.
+
+ * checks/: New name for examples/.
+ * checks/get_them: New location for etc/get_examples.
+ * checks/check_them: New location for etc/check_examples.
+ * Makefile.in, checks/get_them, checks/check_them: Adjust.
+ * lib/vfprintf.c: New location for etc/vfprintf.c.
+ * Delete empty etc/.
+ * examples/: New name for test/.
+
+Tue Mar 10 00:29:46 1992 Francois Pinard (pinard at icule)
+
+ * Makefile.in (check): Add m4 as dependency.
+
+ * m4.c: Accept --no-warnings instead of --no_warnings, and
+ --no-gnu-extensions instead of --no_gnu_extensions. Make the
+ usage message more informative.
+ Reported by David MacKenzie.
+
+Mon Mar 9 14:53:40 1992 Francois Pinard (pinard at icule)
+
+ * etc/check_examples: New name for check_examples.sh.
+ * etc/get_examples: New name for get_examples.sh.
+ * Makefile.in, etc/Makefile.in: Use new names.
+
+ * Makefile.in: Transmit $(CC) while making in lib.
+
+ * Many *.[hc] files: GNU indent'ed, with further fine tuning of
+ code disposition by hand.
+
+Sun Mar 8 11:01:55 1992 Francois Pinard (pinard at icule)
+
+ * m4.h: Delete definitions for abort() and exit().
+ Reported by Richard Stallman.
+
+ * config/hmake-unicos, config/s-unicos.h: New files.
+ Reported by Hal Peterson.
+
+ * eval.c (exp_term): Have N^0 return 1.
+ Reported by Michael Fetterman.
+
+ * eval.c, input.c, m4.h: Remove last comma in enums.
+ Reported by Mike Lijewski.
+
+ * Transfer of maintenance duties from Rene' to Franc,ois.
+\f
+Thu Oct 24 15:18:46 1991 Rene' Seindal (seindal at diku.dk)
+
+ * Release 1.0. Many thanks to those, who provided me with bug
+ reports and feedback.
+
+ * Uses GNU configure, taken from the gdb distribution.
+
+ * Uses GNU getopt(), with long option names.
+
+ * The -Q/+quiet option is added, which suppresses warnings about
+ missing or superflous arguments to built-in macros.
+
+ * Added default options via the M4OPTS environment variable.
+
+ * The built-in format can now be configured to use sprintf as
+ the formatting engine, for systems without [efg]cvt(3).
+
+ * GNU library code is moved to the ./lib subdirectory; other
+ utility files are now in ./etc.
+
+ * Several minor bugs have been fixed.
+\f
+Fri Jul 26 15:28:42 1991 Rene' Seindal (seindal at diku.dk)
+
+ * Fixed various bugs. Release 0.99, manual 0.09. Many thanks to
+ Francois Pinard and Roland H. Pesch for providing me with reports.
+
+ * The builtins incr and decr are now implemented without use of
+ eval.
+
+ * The builtin indir is added, to allow for indirect macro calls
+ (allows use of "illegal" macro names).
+
+ * The debugging and tracing facilities has been enhanced
+ considerably. See the manual for details.
+
+ * The -tMACRO option is added, marks MACRO for tracing as soon
+ as it is defined.
+
+ * Builtins are traced after renaming iff they were before.
+
+ * Named files can now be undiverted.
+
+ * The -Nnum option can be used to increase the number of
+ divertions available.
+
+ * Calling changecom without arguments now disables all comment
+ handling.
+
+ * The function m4_patsubst() is now consistently declared
+ static.
+
+ * A bug in dnl is fixed.
+
+ * A bug in the multi-character quoting code is fixed.
+
+ * Several typos in the manual has been corrected. More probably
+ persist.
+
+ * The m4.info file is now installed along with the program.
+\f
+Thu Nov 15 21:51:06 1990 Rene' Seindal (seindal at diku.dk)
+
+ * Updated and enhanced version. Release 0.75, manual 0.07.
+
+ * Implemented search path for include files (-I option and
+ M4PATH envronment variable).
+
+ * Implemented builtin "format" for printf-like formatting.
+
+ * Implemented builtin "regexp" for searching for regular
+ expressions.
+
+ * Implemented builtin "patsubst" for substitution with regular
+ expressions.
+
+ * Implemented builtin "esyscmd", which expands to a shell
+ commands output.
+
+ * Implemented "__file__" and "__line__" for use in error
+ messages.
+
+ * Implemented character ranges in "translit".
+
+ * Implemented control over debugging output.
+
+ * Implemented multi-character quotes.
+
+ * Implemented multi-character comment delimiters.
+
+ * Changed predefined macro "gnu" to "__gnu__".
+
+ * Changed predefined macro "unix" to "__unix__", when the -G
+ option is not used. With -G, "unix" is still defined.
+
+ * Changed "shift", "$@" and "$*" to not insert spaces afters
+ commas.
+
+ * Added program name to error messages.
+
+ * Fixed two missing null bytes bugs.
+\f
+Mon Jan 22 21:08:52 1990 Rene' Seindal (seindal at diku.dk)
+
+ * Initial beta release. Release 0.50, manual 0.05.
+
+ -----
+
+ Local Variables:
+ coding: utf-8
+ End:
+
+ Copyright (C) 1990-1994, 2000-2001, 2003, 2005-2014, 2016 Free
+ Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without
+ modification, are permitted provided the copyright notice
+ and this notice are preserved.
# It is necessary if you want to build targets usually of interest
# only to the maintainer.
-# Copyright (C) 2001, 2003, 2006-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2006-2016 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Installation Instructions
*************************
-Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
-Inc.
+ Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software
+Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
Basic Installation
==================
- Briefly, the shell command `./configure && make && make install'
+ 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
+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
+'INSTALL' file but do not implement all of the features documented
below. The lack of an optional feature in a given package is not
necessarily a bug. More recommendations for GNU packages can be found
in *note Makefile Conventions: (standards)Makefile Conventions.
- The `configure' shell script attempts to guess correct values for
+ The 'configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions. Finally, it creates a shell script `config.status' that
+those values to create a 'Makefile' in each directory of the package.
+It may also create one or more '.h' files containing system-dependent
+definitions. Finally, it creates a shell script 'config.status' that
you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
+file 'config.log' containing compiler output (useful mainly for
+debugging 'configure').
- It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring. Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.
+ It can also use an optional file (typically called 'config.cache' and
+enabled with '--cache-file=config.cache' or simply '-C') that saves the
+results of its tests to speed up reconfiguring. Caching is disabled by
+default to prevent problems with accidental use of stale cache files.
If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
+to figure out how 'configure' could check whether to do them, and mail
+diffs or instructions to the address given in the 'README' so they can
be considered for the next release. If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
+some point 'config.cache' contains results you don't want to keep, you
may remove or edit it.
- The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'. You need `configure.ac' if
-you want to change it or regenerate `configure' using a newer version
-of `autoconf'.
+ The file 'configure.ac' (or 'configure.in') is used to create
+'configure' by a program called 'autoconf'. You need 'configure.ac' if
+you want to change it or regenerate 'configure' using a newer version of
+'autoconf'.
The simplest way to compile this package is:
- 1. `cd' to the directory containing the package's source code and type
- `./configure' to configure the package for your system.
+ 1. 'cd' to the directory containing the package's source code and type
+ './configure' to configure the package for your system.
- Running `configure' might take a while. While running, it prints
+ Running 'configure' might take a while. While running, it prints
some messages telling which features it is checking for.
- 2. Type `make' to compile the package.
+ 2. Type 'make' to compile the package.
- 3. Optionally, type `make check' to run any self-tests that come with
+ 3. Optionally, type 'make check' to run any self-tests that come with
the package, generally using the just-built uninstalled binaries.
- 4. Type `make install' to install the programs and any data files and
+ 4. Type 'make install' to install the programs and any data files and
documentation. When installing into a prefix owned by root, it is
recommended that the package be configured and built as a regular
- user, and only the `make install' phase executed with root
+ user, and only the 'make install' phase executed with root
privileges.
- 5. Optionally, type `make installcheck' to repeat any self-tests, but
+ 5. Optionally, type 'make installcheck' to repeat any self-tests, but
this time using the binaries in their final installed location.
This target does not install anything. Running this target as a
- regular user, particularly if the prior `make install' required
+ regular user, particularly if the prior 'make install' required
root privileges, verifies that the installation completed
correctly.
6. You can remove the program binaries and object files from the
- source code directory by typing `make clean'. To also remove the
- files that `configure' created (so you can compile the package for
- a different kind of computer), type `make distclean'. There is
- also a `make maintainer-clean' target, but that is intended mainly
+ source code directory by typing 'make clean'. To also remove the
+ files that 'configure' created (so you can compile the package for
+ a different kind of computer), type 'make distclean'. There is
+ also a 'make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
- 7. Often, you can also type `make uninstall' to remove the installed
+ 7. Often, you can also type 'make uninstall' to remove the installed
files again. In practice, not all packages have tested that
uninstallation works correctly, even though it is required by the
GNU Coding Standards.
- 8. Some packages, particularly those that use Automake, provide `make
+ 8. Some packages, particularly those that use Automake, provide 'make
distcheck', which can by used by developers to test that all other
- targets like `make install' and `make uninstall' work correctly.
+ targets like 'make install' and 'make uninstall' work correctly.
This target is generally not run by end users.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
-the `configure' script does not know about. Run `./configure --help'
+the 'configure' script does not know about. Run './configure --help'
for details on some of the pertinent environment variables.
- You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment. Here
-is an example:
+ You can give 'configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here is
+an example:
./configure CC=c99 CFLAGS=-g LIBS=-lposix
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
-own directory. To do this, you can use GNU `make'. `cd' to the
+own directory. To do this, you can use GNU 'make'. 'cd' to the
directory where you want the object files and executables to go and run
-the `configure' script. `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'. This
-is known as a "VPATH" build.
+the 'configure' script. 'configure' automatically checks for the source
+code in the directory that 'configure' is in and in '..'. This is known
+as a "VPATH" build.
- With a non-GNU `make', it is safer to compile the package for one
+ With a non-GNU 'make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have
-installed the package for one architecture, use `make distclean' before
+installed the package for one architecture, use 'make distclean' before
reconfiguring for another architecture.
On MacOS X 10.5 and later systems, you 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
+"universal" binaries--by specifying multiple '-arch' options to the
+compiler but only a single '-arch' option to the preprocessor. Like
this:
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
This is not guaranteed to produce working output in all cases, you
may have to build one architecture at a time and combine the results
-using the `lipo' tool if you have problems.
+using the 'lipo' tool if you have problems.
Installation Names
==================
- By default, `make install' installs the package's commands under
-`/usr/local/bin', include files under `/usr/local/include', etc. You
-can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX', where PREFIX must be an
+ By default, 'make install' installs the package's commands under
+'/usr/local/bin', include files under '/usr/local/include', etc. You
+can specify an installation prefix other than '/usr/local' by giving
+'configure' the option '--prefix=PREFIX', where PREFIX must be an
absolute file name.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
-pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+pass the option '--exec-prefix=PREFIX' to 'configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
-options like `--bindir=DIR' to specify different values for particular
-kinds of files. Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them. In general, the
-default for these options is expressed in terms of `${prefix}', so that
-specifying just `--prefix' will affect all of the other directory
+options like '--bindir=DIR' to specify different values for particular
+kinds of files. Run 'configure --help' for a list of the directories
+you can set and what kinds of files go in them. In general, the default
+for these options is expressed in terms of '${prefix}', so that
+specifying just '--prefix' will affect all of the other directory
specifications that were not explicitly provided.
The most portable way to affect installation locations is to pass the
-correct locations to `configure'; however, many packages provide one or
+correct locations to 'configure'; however, many packages provide one or
both of the following shortcuts of passing variable assignments to the
-`make install' command line to change installation locations without
+'make install' command line to change installation locations without
having to reconfigure or recompile.
The first method involves providing an override variable for each
-affected directory. For example, `make install
+affected directory. For example, 'make install
prefix=/alternate/directory' will choose an alternate location for all
directory configuration variables that were expressed in terms of
-`${prefix}'. Any directories that were specified during `configure',
-but not in terms of `${prefix}', must each be overridden at install
-time for the entire installation to be relocated. The approach of
-makefile variable overrides for each directory variable is required by
-the GNU Coding Standards, and ideally causes no recompilation.
-However, some platforms have known limitations with the semantics of
-shared libraries that end up requiring recompilation when using this
-method, particularly noticeable in packages that use GNU Libtool.
-
- The second method involves providing the `DESTDIR' variable. For
-example, `make install DESTDIR=/alternate/directory' will prepend
-`/alternate/directory' before all installation names. The approach of
-`DESTDIR' overrides is not required by the GNU Coding Standards, and
+'${prefix}'. Any directories that were specified during 'configure',
+but not in terms of '${prefix}', must each be overridden at install time
+for the entire installation to be relocated. The approach of makefile
+variable overrides for each directory variable is required by the GNU
+Coding Standards, and ideally causes no recompilation. However, some
+platforms have known limitations with the semantics of shared libraries
+that end up requiring recompilation when using this method, particularly
+noticeable in packages that use GNU Libtool.
+
+ The second method involves providing the 'DESTDIR' variable. For
+example, 'make install DESTDIR=/alternate/directory' will prepend
+'/alternate/directory' before all installation names. The approach of
+'DESTDIR' overrides is not required by the GNU Coding Standards, and
does not work on platforms that have drive letters. On the other hand,
it does better at avoiding recompilation issues, and works well even
-when some directory options were not specified in terms of `${prefix}'
-at `configure' time.
+when some directory options were not specified in terms of '${prefix}'
+at 'configure' time.
Optional Features
=================
If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
- Some packages pay attention to `--enable-FEATURE' options to
-`configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to `--with-PACKAGE' options, where PACKAGE
-is something like `gnu-as' or `x' (for the X Window System). The
-`README' should mention any `--enable-' and `--with-' options that the
+with an extra prefix or suffix on their names by giving 'configure' the
+option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'.
+
+ Some packages pay attention to '--enable-FEATURE' options to
+'configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to '--with-PACKAGE' options, where PACKAGE
+is something like 'gnu-as' or 'x' (for the X Window System). The
+'README' should mention any '--enable-' and '--with-' options that the
package recognizes.
- For packages that use the X Window System, `configure' can usually
+ For packages that use the X Window System, 'configure' can usually
find the X include and library files automatically, but if it doesn't,
-you can use the `configure' options `--x-includes=DIR' and
-`--x-libraries=DIR' to specify their locations.
+you can use the 'configure' options '--x-includes=DIR' and
+'--x-libraries=DIR' to specify their locations.
Some packages offer the ability to configure how verbose the
-execution of `make' will be. For these packages, running `./configure
+execution of 'make' will be. For these packages, running './configure
--enable-silent-rules' sets the default to minimal output, which can be
-overridden with `make V=1'; while running `./configure
+overridden with 'make V=1'; while running './configure
--disable-silent-rules' sets the default to verbose, which can be
-overridden with `make V=0'.
+overridden with 'make V=0'.
Particular systems
==================
- On HP-UX, the default C compiler is not ANSI C compatible. If GNU
-CC is not installed, it is recommended to use the following options in
+ On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC
+is not installed, it is recommended to use the following options in
order to use an ANSI C compiler:
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
- HP-UX `make' updates targets which have the same time stamps as
-their prerequisites, which makes it generally unusable when shipped
-generated files such as `configure' are involved. Use GNU `make'
-instead.
+ HP-UX 'make' updates targets which have the same time stamps as their
+prerequisites, which makes it generally unusable when shipped generated
+files such as 'configure' are involved. Use GNU 'make' instead.
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
-parse its `<wchar.h>' header file. The option `-nodtk' can be used as
-a workaround. If GNU CC is not installed, it is therefore recommended
-to try
+parse its '<wchar.h>' header file. The option '-nodtk' can be used as a
+workaround. If GNU CC is not installed, it is therefore recommended to
+try
./configure CC="cc"
./configure CC="cc -nodtk"
- On Solaris, don't put `/usr/ucb' early in your `PATH'. This
+ On Solaris, don't put '/usr/ucb' early in your 'PATH'. This
directory contains several dysfunctional programs; working variants of
-these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
-in your `PATH', put it _after_ `/usr/bin'.
+these programs are available in '/usr/bin'. So, if you need '/usr/ucb'
+in your 'PATH', put it _after_ '/usr/bin'.
- On Haiku, software installed for all users goes in `/boot/common',
-not `/usr/local'. It is recommended to use the following options:
+ On Haiku, software installed for all users goes in '/boot/common',
+not '/usr/local'. It is recommended to use the following options:
./configure --prefix=/boot/common
Specifying the System Type
==========================
- There may be some features `configure' cannot figure out
+ There may be some features 'configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
-_same_ architectures, `configure' can figure that out, but if it prints
+_same_ architectures, 'configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
-`--build=TYPE' option. TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name which has the form:
+'--build=TYPE' option. TYPE can either be a short name for the system
+type, such as 'sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
OS
KERNEL-OS
- See the file `config.sub' for the possible values of each field. If
-`config.sub' isn't included in this package, then this package doesn't
+ See the file 'config.sub' for the possible values of each field. If
+'config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
-use the option `--target=TYPE' to select the type of system they will
+use the option '--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
-eventually be run) with `--host=TYPE'.
+eventually be run) with '--host=TYPE'.
Sharing Defaults
================
- If you want to set default values for `configure' scripts to share,
-you can create a site shell script called `config.site' that gives
-default values for variables like `CC', `cache_file', and `prefix'.
-`configure' looks for `PREFIX/share/config.site' if it exists, then
-`PREFIX/etc/config.site' if it exists. Or, you can set the
-`CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all `configure' scripts look for a site script.
+ If you want to set default values for 'configure' scripts to share,
+you can create a site shell script called 'config.site' that gives
+default values for variables like 'CC', 'cache_file', and 'prefix'.
+'configure' looks for 'PREFIX/share/config.site' if it exists, then
+'PREFIX/etc/config.site' if it exists. Or, you can set the
+'CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all 'configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
-environment passed to `configure'. However, some packages may run
+environment passed to 'configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
-them in the `configure' command line, using `VAR=value'. For example:
+them in the 'configure' command line, using 'VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
-causes the specified `gcc' to be used as the C compiler (unless it is
+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 limitation. Until the limitation is lifted, you can use
-this workaround:
+Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an
+Autoconf limitation. Until the limitation is lifted, you can use this
+workaround:
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
-`configure' Invocation
+'configure' Invocation
======================
- `configure' recognizes the following options to control how it
+ 'configure' recognizes the following options to control how it
operates.
-`--help'
-`-h'
- Print a summary of all of the options to `configure', and exit.
+'--help'
+'-h'
+ Print a summary of all of the options to 'configure', and exit.
-`--help=short'
-`--help=recursive'
+'--help=short'
+'--help=recursive'
Print a summary of the options unique to this package's
- `configure', and exit. The `short' variant lists options used
- only in the top level, while the `recursive' variant lists options
- also present in any nested packages.
+ 'configure', and exit. The 'short' variant lists options used only
+ in the top level, while the 'recursive' variant lists options also
+ present in any nested packages.
-`--version'
-`-V'
- Print the version of Autoconf used to generate the `configure'
+'--version'
+'-V'
+ Print the version of Autoconf used to generate the 'configure'
script, and exit.
-`--cache-file=FILE'
+'--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
- traditionally `config.cache'. FILE defaults to `/dev/null' to
+ traditionally 'config.cache'. FILE defaults to '/dev/null' to
disable caching.
-`--config-cache'
-`-C'
- Alias for `--cache-file=config.cache'.
+'--config-cache'
+'-C'
+ Alias for '--cache-file=config.cache'.
-`--quiet'
-`--silent'
-`-q'
+'--quiet'
+'--silent'
+'-q'
Do not print messages saying which checks are being made. To
- suppress all normal output, redirect it to `/dev/null' (any error
+ suppress all normal output, redirect it to '/dev/null' (any error
messages will still be shown).
-`--srcdir=DIR'
+'--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
- `configure' can determine that directory automatically.
+ 'configure' can determine that directory automatically.
-`--prefix=DIR'
- Use DIR as the installation prefix. *note Installation Names::
- for more details, including other options available for fine-tuning
- the installation locations.
+'--prefix=DIR'
+ Use DIR as the installation prefix. *note Installation Names:: for
+ more details, including other options available for fine-tuning the
+ installation locations.
-`--no-create'
-`-n'
+'--no-create'
+'-n'
Run the configure checks, but stop before creating any output
files.
-`configure' also accepts some other, not widely useful, options. Run
-`configure --help' for more details.
+'configure' also accepts some other, not widely useful, options. Run
+'configure --help' for more details.
## Makefile.am - template for generating Makefile via Automake
##
-## Copyright (C) 2000-2001, 2003-2013 Free Software Foundation, Inc.
+## Copyright (C) 2000-2001, 2003-2014, 2016 Free Software Foundation,
+## Inc.
##
## This file is part of GNU M4.
##
SUBDIRS = . examples lib src doc checks tests
EXTRA_DIST = bootstrap c-boxes.el cfg.mk maint.mk \
- .prev-version .version m4/gnulib-cache.m4
+ .prev-version .version m4/gnulib-cache.m4 ChangeLog-2014
DISTCLEANFILES = stamp-h
## maintainer-clean should remove as much as possible that ./bootstrap can
## recreate. In the m4 directory, keep only gnulib-cache.m4.
DISTCHECK_CONFIGURE_FLAGS = --enable-changeword --program-prefix=g \
--enable-gcc-warnings --enable-silent-rules --enable-cxx
+# Generate the ChangeLog from git history.
+gen_start_date = 2015-01-01
+.PHONY: gen-ChangeLog
+gen-ChangeLog:
+ $(AM_V_GEN)if test -d $(top_srcdir)/.git; then \
+ log_fix="$(srcdir)/build-aux/git-log-fix"; \
+ test -e "$$log_fix" \
+ && amend_git_log="--amend=$$log_fix" \
+ || amend_git_log=; \
+ $(top_srcdir)/build-aux/gitlog-to-changelog $$amend_git_log \
+ --since='$(gen_start_date)' > $(distdir)/cl-t \
+ && rm -f $(distdir)/ChangeLog \
+ && mv $(distdir)/cl-t $(distdir)/ChangeLog; \
+ fi
+
+# Dummy rule, to pacify automake "gnu" strictness and allow a clean
+# bootstrap. Creates a dummy ChangeLog (unless one is already present,
+# as might be the case for users of vc-dwim) that will be overridden
+# with a proper one at distribution time.
+$(srcdir)/ChangeLog:
+ @echo dummy > $@
+
BUILT_SOURCES = $(top_srcdir)/.version
$(top_srcdir)/.version:
echo $(VERSION) > $@-t && mv $@-t $@
# Arrange so that .tarball-version appears only in the distribution
# tarball, and never in a checked-out repository.
-dist-hook:
- echo $(VERSION) > $(distdir)/.tarball-version
+dist-hook: gen-ChangeLog
+ $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
-# Makefile.in generated by automake 1.14 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
build_triplet = @build@
host_triplet = @host@
subdir = .
-DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
- $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(top_srcdir)/configure $(am__configure_deps) 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/absolute-header.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/builtin-expect.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/ctype.m4 $(top_srcdir)/m4/dirent_h.m4 \
+ $(top_srcdir)/m4/dirfd.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/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/flexmember.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/getprogname.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/hard-locale.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/inttypes_h.m4 $(top_srcdir)/m4/isblank.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/limits-h.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/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/memchr.m4 $(top_srcdir)/m4/minmax.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/obstack.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/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/stdalign.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)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+ $(am__configure_deps) $(am__DIST_COMMON)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CTAGS = ctags
CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/build-aux/ar-lib \
+ $(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 AUTHORS BACKLOG COPYING \
+ ChangeLog INSTALL NEWS README THANKS TODO build-aux/ar-lib \
+ 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
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
GNULIB_IMAXABS = @GNULIB_IMAXABS@
GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
GNULIB_ISATTY = @GNULIB_ISATTY@
+GNULIB_ISBLANK = @GNULIB_ISBLANK@
GNULIB_ISFINITE = @GNULIB_ISFINITE@
GNULIB_ISINF = @GNULIB_ISINF@
GNULIB_ISNAN = @GNULIB_ISNAN@
GNULIB_OPEN = @GNULIB_OPEN@
GNULIB_OPENAT = @GNULIB_OPENAT@
GNULIB_OPENDIR = @GNULIB_OPENDIR@
+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@
GNULIB_PCLOSE = @GNULIB_PCLOSE@
GNULIB_PERROR = @GNULIB_PERROR@
GNULIB_PIPE = @GNULIB_PIPE@
GNULIB_PUTENV = @GNULIB_PUTENV@
GNULIB_PUTS = @GNULIB_PUTS@
GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_QSORT_R = @GNULIB_QSORT_R@
GNULIB_RAISE = @GNULIB_RAISE@
GNULIB_RANDOM = @GNULIB_RANDOM@
GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
GNULIB_TANL = @GNULIB_TANL@
GNULIB_TIMEGM = @GNULIB_TIMEGM@
GNULIB_TIME_R = @GNULIB_TIME_R@
+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@
GNULIB_TMPFILE = @GNULIB_TMPFILE@
GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
GNULIB_TRUNC = @GNULIB_TRUNC@
HAVE_ATANL = @HAVE_ATANL@
HAVE_ATOLL = @HAVE_ATOLL@
HAVE_BTOWC = @HAVE_BTOWC@
+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@
HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
HAVE_CBRT = @HAVE_CBRT@
HAVE_CBRTF = @HAVE_CBRTF@
HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
HAVE_ILOGBF = @HAVE_ILOGBF@
HAVE_ILOGBL = @HAVE_ILOGBL@
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_ISBLANK = @HAVE_ISBLANK@
HAVE_ISNAND = @HAVE_ISNAND@
HAVE_ISNANF = @HAVE_ISNANF@
HAVE_ISNANL = @HAVE_ISNANL@
HAVE_LOGL = @HAVE_LOGL@
HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
HAVE_LSTAT = @HAVE_LSTAT@
+HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
HAVE_MBRLEN = @HAVE_MBRLEN@
HAVE_MBRTOWC = @HAVE_MBRTOWC@
HAVE_MBSINIT = @HAVE_MBSINIT@
HAVE_PTSNAME = @HAVE_PTSNAME@
HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_QSORT_R = @HAVE_QSORT_R@
HAVE_RAISE = @HAVE_RAISE@
HAVE_RANDOM = @HAVE_RANDOM@
HAVE_RANDOM_H = @HAVE_RANDOM_H@
HAVE_SYMLINK = @HAVE_SYMLINK@
HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_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_TANHF = @HAVE_TANHF@
HAVE_TANL = @HAVE_TANL@
HAVE_TIMEGM = @HAVE_TIMEGM@
+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
HAVE_UNISTD_H = @HAVE_UNISTD_H@
HAVE_UNLINKAT = @HAVE_UNLINKAT@
LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@
LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@
LIBTHREAD = @LIBTHREAD@
+LIB_POSIX_SPAWN = @LIB_POSIX_SPAWN@
+LIMITS_H = @LIMITS_H@
LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
LOCALE_FR = @LOCALE_FR@
LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
M4tests_WITNESS = @M4tests_WITNESS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@
NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
NEXT_AS_FIRST_DIRECTIVE_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_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_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_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
+NEXT_CTYPE_H = @NEXT_CTYPE_H@
NEXT_DIRENT_H = @NEXT_DIRENT_H@
NEXT_ERRNO_H = @NEXT_ERRNO_H@
NEXT_FCNTL_H = @NEXT_FCNTL_H@
NEXT_GETOPT_H = @NEXT_GETOPT_H@
NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
+NEXT_LIMITS_H = @NEXT_LIMITS_H@
NEXT_LOCALE_H = @NEXT_LOCALE_H@
NEXT_MATH_H = @NEXT_MATH_H@
NEXT_SCHED_H = @NEXT_SCHED_H@
NEXT_WCHAR_H = @NEXT_WCHAR_H@
NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
OBJEXT = @OBJEXT@
+OS2_LDFLAGS = @OS2_LDFLAGS@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
+REPLACE_ACOSF = @REPLACE_ACOSF@
+REPLACE_ASINF = @REPLACE_ASINF@
+REPLACE_ATAN2F = @REPLACE_ATAN2F@
+REPLACE_ATANF = @REPLACE_ATANF@
REPLACE_BTOWC = @REPLACE_BTOWC@
REPLACE_CALLOC = @REPLACE_CALLOC@
REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
REPLACE_CHOWN = @REPLACE_CHOWN@
REPLACE_CLOSE = @REPLACE_CLOSE@
REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@
+REPLACE_COSF = @REPLACE_COSF@
+REPLACE_COSHF = @REPLACE_COSHF@
REPLACE_DIRFD = @REPLACE_DIRFD@
REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
REPLACE_EXP2 = @REPLACE_EXP2@
REPLACE_EXP2L = @REPLACE_EXP2L@
+REPLACE_EXPF = @REPLACE_EXPF@
REPLACE_EXPM1 = @REPLACE_EXPM1@
REPLACE_EXPM1F = @REPLACE_EXPM1F@
REPLACE_FABSL = @REPLACE_FABSL@
REPLACE_GETCWD = @REPLACE_GETCWD@
REPLACE_GETDELIM = @REPLACE_GETDELIM@
REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
+REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@
REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
REPLACE_GETLINE = @REPLACE_GETLINE@
REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_GMTIME = @REPLACE_GMTIME@
REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
REPLACE_HYPOT = @REPLACE_HYPOT@
REPLACE_HYPOTF = @REPLACE_HYPOTF@
REPLACE_LINK = @REPLACE_LINK@
REPLACE_LINKAT = @REPLACE_LINKAT@
REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
+REPLACE_LOCALTIME = @REPLACE_LOCALTIME@
REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
REPLACE_LOG = @REPLACE_LOG@
REPLACE_LOG10 = @REPLACE_LOG10@
REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
REPLACE_PUTENV = @REPLACE_PUTENV@
REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_QSORT_R = @REPLACE_QSORT_R@
REPLACE_RAISE = @REPLACE_RAISE@
REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
REPLACE_READ = @REPLACE_READ@
REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_READLINKAT = @REPLACE_READLINKAT@
REPLACE_REALLOC = @REPLACE_REALLOC@
REPLACE_REALPATH = @REPLACE_REALPATH@
REPLACE_REMAINDER = @REPLACE_REMAINDER@
REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
REPLACE_SIGNBIT = @REPLACE_SIGNBIT@
REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
+REPLACE_SINF = @REPLACE_SINF@
+REPLACE_SINHF = @REPLACE_SINHF@
REPLACE_SLEEP = @REPLACE_SLEEP@
REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_SQRTF = @REPLACE_SQRTF@
REPLACE_SQRTL = @REPLACE_SQRTL@
REPLACE_STAT = @REPLACE_STAT@
REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
REPLACE_STRTOD = @REPLACE_STRTOD@
REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@
REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
+REPLACE_TANF = @REPLACE_TANF@
+REPLACE_TANHF = @REPLACE_TANHF@
REPLACE_TIMEGM = @REPLACE_TIMEGM@
REPLACE_TMPFILE = @REPLACE_TMPFILE@
REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
REPLACE_WRITE = @REPLACE_WRITE@
SCHED_H = @SCHED_H@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
+STDALIGN_H = @STDALIGN_H@
STDARG_H = @STDARG_H@
STDBOOL_H = @STDBOOL_H@
STDDEF_H = @STDDEF_H@
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_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@
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@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
am__include = @am__include@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
SUBDIRS = . examples lib src doc checks tests
EXTRA_DIST = bootstrap c-boxes.el cfg.mk maint.mk \
- .prev-version .version m4/gnulib-cache.m4
+ .prev-version .version m4/gnulib-cache.m4 ChangeLog-2014
DISTCLEANFILES = stamp-h
MAINTAINERCLEANFILES = INSTALL Makefile.in aclocal.m4 \
DISTCHECK_CONFIGURE_FLAGS = --enable-changeword --program-prefix=g \
--enable-gcc-warnings --enable-silent-rules --enable-cxx
+
+# Generate the ChangeLog from git history.
+gen_start_date = 2015-01-01
BUILT_SOURCES = $(top_srcdir)/.version
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-recursive
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
$(am__post_remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
$(am__post_remove_distdir)
dist-tarZ: distdir
- @echo WARNING: "Support for shar distribution archives is" \
- "deprecated." >&2
+ @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
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__post_remove_distdir)
dist-shar: distdir
- @echo WARNING: "Support for distribution archives compressed with" \
- "legacy program 'compress' is deprecated." >&2
+ @echo WARNING: "Support for shar distribution archives 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
+ shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
$(am__post_remove_distdir)
dist-zip: distdir
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
- GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
- GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir)
chmod u+w $(distdir)
- mkdir $(distdir)/_build $(distdir)/_inst
+ mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
- && $(am__cd) $(distdir)/_build \
- && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ && $(am__cd) $(distdir)/_build/sub \
+ && ../../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
+ --srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
pdf-am ps ps-am tags tags-am uninstall uninstall-am
+.PRECIOUS: Makefile
+
+.PHONY: gen-ChangeLog
+gen-ChangeLog:
+ $(AM_V_GEN)if test -d $(top_srcdir)/.git; then \
+ log_fix="$(srcdir)/build-aux/git-log-fix"; \
+ test -e "$$log_fix" \
+ && amend_git_log="--amend=$$log_fix" \
+ || amend_git_log=; \
+ $(top_srcdir)/build-aux/gitlog-to-changelog $$amend_git_log \
+ --since='$(gen_start_date)' > $(distdir)/cl-t \
+ && rm -f $(distdir)/ChangeLog \
+ && mv $(distdir)/cl-t $(distdir)/ChangeLog; \
+ fi
+
+# Dummy rule, to pacify automake "gnu" strictness and allow a clean
+# bootstrap. Creates a dummy ChangeLog (unless one is already present,
+# as might be the case for users of vc-dwim) that will be overridden
+# with a proper one at distribution time.
+$(srcdir)/ChangeLog:
+ @echo dummy > $@
$(top_srcdir)/.version:
echo $(VERSION) > $@-t && mv $@-t $@
# Arrange so that .tarball-version appears only in the distribution
# tarball, and never in a checked-out repository.
-dist-hook:
- echo $(VERSION) > $(distdir)/.tarball-version
+dist-hook: gen-ChangeLog
+ $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
GNU M4 NEWS - User visible changes.
+* Noteworthy changes in release 1.4.18 (2016-12-31) [stable]
+
+** Diagnose --word-regexp as unsupported if it was not configured.
+
+** Preliminary support for OS/2.
+
+** A number of portability improvements inherited from gnulib.
+
+
* Noteworthy changes in release 1.4.17 (2013-09-22) [stable]
** Fix compilation with newer glibc headers.
fill-column: 75
End:
-Copyright (C) 1992-1994, 2004-2013 Free Software Foundation, Inc.
+Copyright (C) 1992-1994, 2004-2014, 2016 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
========================================================================
-Copyright (C) 2000, 2005-2013 Free Software Foundation, Inc.
+Copyright (C) 2000, 2005-2014, 2016 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
Cesar Strauss cestrauss@gmail.com
Chris McGuire chris@wso.net
Chris Penev xpenev@gmail.com
+Dagobert Michelsen dagobert@familie-michelsen.de
Damian Menscher menscher@uiuc.edu
Dan Jacobson jidanni@jidanni.org
David J. MacKenzie djm@uunet.uu.net
Karl Nelson nelson85@llnl.gov
Karl Vogel vogelke@c-17igp.wpafb.af.mil
Kaveh R. Ghazi ghazi@noc.rutgers.edu
+KO Myung-Hun komh@chollian.net
Konrad Schwarz konrad.schwarz@siemens.com
Kristine Lund lund@lpnaxp.in2p3.fr
Krste Asanovic krste@icsi.berkeley.edu
Ulrich Drepper drepper@gnu.org
Vern Paxson vern@ee.lbl.gov
Vincent Lonngren Vincent.lonngren.759@student.lu.se
+Vitezslav Crhonek vcrhonek@redhat.com
Vivek P. Singhal singhal@cs.utexas.edu
Walter Wong wcw+@cmu.edu
coding: utf-8
End:
-Copyright (C) 2000, 2006-2013 Free Software Foundation, Inc.
+Copyright (C) 2000, 2006-2014, 2016 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
outline-regexp: " *[-+*.] \\|\f"
End:
-Copyright (C) 2000, 2006-2007, 2009-2013 Free Software Foundation, Inc.
+Copyright (C) 2000, 2006-2007, 2009-2014, 2016 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
# Local additions to Autoconf macros.
-# Copyright (C) 1992, 1994, 2004, 2006, 2008-2013 Free Software
+# Copyright (C) 1992, 1994, 2004, 2006, 2008-2014, 2016 Free Software
# Foundation, Inc.
# Francois Pinard <pinard@iro.umontreal.ca>, 1992.
#
-# generated automatically by aclocal 1.14 -*- Autoconf -*-
+# generated automatically by aclocal 1.15 -*- Autoconf -*-
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
-# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+# po.m4 serial 24 (gettext-0.19)
+dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free 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 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 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.60])
+
+dnl Checks for all prerequisites of the po subdirectory.
+AC_DEFUN([AM_PO_SUBDIRS],
+[
+ AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+ AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+ AC_REQUIRE([AC_PROG_SED])dnl
+ AC_REQUIRE([AM_NLS])dnl
+
+ dnl Release version of the gettext macros. This is used to ensure that
+ dnl the gettext macros and po/Makefile.in.in are in sync.
+ AC_SUBST([GETTEXT_MACRO_VERSION], [0.19])
+
+ dnl Perform the following tests also if --disable-nls has been given,
+ dnl because they are needed for "make dist" to work.
+
+ dnl Search for GNU msgfmt in the PATH.
+ dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
+ dnl The second test excludes FreeBSD msgfmt.
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
+
+ dnl Test whether it is GNU msgfmt >= 0.15.
+changequote(,)dnl
+ case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
+ *) MSGFMT_015=$MSGFMT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([MSGFMT_015])
+changequote(,)dnl
+ case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+ *) GMSGFMT_015=$GMSGFMT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([GMSGFMT_015])
+
+ dnl Search for GNU xgettext 0.12 or newer in the PATH.
+ dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
+ dnl The second test excludes FreeBSD xgettext.
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ dnl Remove leftover from FreeBSD xgettext call.
+ rm -f messages.po
+
+ dnl Test whether it is GNU xgettext >= 0.15.
+changequote(,)dnl
+ case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+ *) XGETTEXT_015=$XGETTEXT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([XGETTEXT_015])
+
+ dnl Search for GNU msgmerge 0.11 or newer in the PATH.
+ AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
+ [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
+
+ dnl Installation directories.
+ dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
+ dnl have to define it here, so that it can be used in po/Makefile.
+ test -n "$localedir" || localedir='${datadir}/locale'
+ AC_SUBST([localedir])
+
+ dnl Support for AM_XGETTEXT_OPTION.
+ test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
+ AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
+
+ AC_CONFIG_COMMANDS([po-directories], [[
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+ # Treat a directory as a PO directory if and only if it has a
+ # POTFILES.in file. This allows packages to have multiple PO
+ # directories under different names or in different locations.
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ gt_tab=`printf '\t'`
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ POMAKEFILEDEPS="POTFILES.in"
+ # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+ # parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ # Hide the ALL_LINGUAS assignment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # The set of available languages was given in configure.in.
+ # Hide the ALL_LINGUAS assignment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+ fi
+ # Compute POFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+ # Compute UPDATEPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+ # Compute DUMMYPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+ # Compute GMOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ GMOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+ if test -f "$f"; then
+ case "$f" in
+ *.orig | *.bak | *~) ;;
+ *) cat "$f" >> "$ac_dir/Makefile" ;;
+ esac
+ fi
+ done
+ fi
+ ;;
+ esac
+ done]],
+ [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
+ # from automake < 1.5.
+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="${LINGUAS-%UNSET%}"
+ ])
+])
+
+dnl Postprocesses a Makefile in a directory containing PO files.
+AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
+[
+ # When this code is run, in config.status, two variables have already been
+ # set:
+ # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
+ # - LINGUAS is the value of the environment variable LINGUAS at configure
+ # time.
+
+changequote(,)dnl
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+ # Find a way to echo strings without interpreting backslash.
+ if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
+ gt_echo='echo'
+ else
+ if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
+ gt_echo='printf %s\n'
+ else
+ echo_func () {
+ cat <<EOT
+$*
+EOT
+ }
+ gt_echo='echo_func'
+ fi
+ fi
+
+ # A sed script that extracts the value of VARIABLE from a Makefile.
+ tab=`printf '\t'`
+ 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.
+/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
+ # Seen the first line of the variable definition.
+ s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
+ 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 assignment 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"
+ tab=`printf '\t'`
+ if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
+ # Add dependencies that cannot be formulated as a simple suffix rule.
+ for lang in $ALL_LINGUAS; do
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ cat >> "$ac_file.tmp" <<EOF
+$frobbedlang.msg: $lang.po
+${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
+${tab}\$(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
+${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
+${tab}\$(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"
+])
+
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# 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.14'
+[am__api_version='1.15'
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.14], [],
+m4_if([$1], [1.15], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
# 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.14])dnl
+[AM_AUTOMAKE_VERSION([1.15])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+# Copyright (C) 2011-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_AR([ACT-IF-FAIL])
+# -------------------------
+# Try to determine the archiver interface, and trigger the ar-lib wrapper
+# if it is needed. If the detection of archiver interface fails, run
+# ACT-IF-FAIL (default is to abort configure with a proper error message).
+AC_DEFUN([AM_PROG_AR],
+[AC_BEFORE([$0], [LT_INIT])dnl
+AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([ar-lib])dnl
+AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
+: ${AR=ar}
+
+AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
+ [AC_LANG_PUSH([C])
+ am_cv_ar_interface=ar
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
+ [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
+ AC_TRY_EVAL([am_ar_try])
+ if test "$ac_status" -eq 0; then
+ am_cv_ar_interface=ar
+ else
+ am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
+ AC_TRY_EVAL([am_ar_try])
+ if test "$ac_status" -eq 0; then
+ am_cv_ar_interface=lib
+ else
+ am_cv_ar_interface=unknown
+ fi
+ fi
+ rm -f conftest.lib libconftest.a
+ ])
+ AC_LANG_POP([C])])
+
+case $am_cv_ar_interface in
+ar)
+ ;;
+lib)
+ # Microsoft lib, so override with the ar-lib wrapper script.
+ # FIXME: It is wrong to rewrite AR.
+ # 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__AR in this case,
+ # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
+ # similar.
+ AR="$am_aux_dir/ar-lib $AR"
+ ;;
+unknown)
+ m4_default([$1],
+ [AC_MSG_ERROR([could not determine $AR interface])])
+ ;;
+esac
+AC_SUBST([AR])dnl
+])
+
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# configured tree to be moved without reconfiguration.
AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
])
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# <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.
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
END
AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
fi
-fi])
+fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
+])
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
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
fi
AC_SUBST([install_sh])])
-# Copyright (C) 2003-2013 Free Software Foundation, Inc.
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
rm -f conftest.file
])
-# Copyright (C) 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006-2013 Free Software Foundation, Inc.
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004-2013 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
]) # _AM_PROG_TAR
m4_include([m4/00gnulib.m4])
+m4_include([m4/absolute-header.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/builtin-expect.m4])
m4_include([m4/c-stack.m4])
m4_include([m4/canonicalize.m4])
m4_include([m4/close-stream.m4])
m4_include([m4/codeset.m4])
m4_include([m4/config-h.m4])
m4_include([m4/configmake.m4])
+m4_include([m4/ctype.m4])
m4_include([m4/dirent_h.m4])
+m4_include([m4/dirfd.m4])
m4_include([m4/dirname.m4])
m4_include([m4/double-slash-root.m4])
m4_include([m4/dup.m4])
m4_include([m4/fdopen.m4])
m4_include([m4/fflush.m4])
m4_include([m4/filenamecat.m4])
+m4_include([m4/flexmember.m4])
m4_include([m4/float_h.m4])
m4_include([m4/fopen.m4])
m4_include([m4/fpending.m4])
m4_include([m4/getdtablesize.m4])
m4_include([m4/getopt.m4])
m4_include([m4/getpagesize.m4])
+m4_include([m4/getprogname.m4])
m4_include([m4/gettimeofday.m4])
m4_include([m4/glibc21.m4])
m4_include([m4/gnulib-common.m4])
m4_include([m4/gnulib-comp.m4])
+m4_include([m4/hard-locale.m4])
m4_include([m4/include_next.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/isblank.m4])
m4_include([m4/isnand.m4])
m4_include([m4/isnanf.m4])
m4_include([m4/isnanl.m4])
m4_include([m4/lib-link.m4])
m4_include([m4/lib-prefix.m4])
m4_include([m4/libsigsegv.m4])
+m4_include([m4/limits-h.m4])
m4_include([m4/link.m4])
m4_include([m4/localcharset.m4])
m4_include([m4/locale-fr.m4])
m4_include([m4/mbstate_t.m4])
m4_include([m4/mbtowc.m4])
m4_include([m4/memchr.m4])
+m4_include([m4/minmax.m4])
m4_include([m4/mkdtemp.m4])
m4_include([m4/mkstemp.m4])
m4_include([m4/mmap-anon.m4])
m4_include([m4/multiarch.m4])
m4_include([m4/nl_langinfo.m4])
m4_include([m4/nocrash.m4])
+m4_include([m4/obstack.m4])
m4_include([m4/off_t.m4])
m4_include([m4/open.m4])
m4_include([m4/opendir.m4])
m4_include([m4/spawn_h.m4])
m4_include([m4/ssize_t.m4])
m4_include([m4/stat.m4])
+m4_include([m4/stdalign.m4])
m4_include([m4/stdarg.m4])
m4_include([m4/stdbool.m4])
m4_include([m4/stddef_h.m4])
#! /bin/sh
+## DO NOT EDIT - This file generated from build-aux/bootstrap.in
+## by inline-source v2014-01-03.01
# Bootstrap an Autotooled package from checked-out sources.
# Written by Gary V. Vaughan, 2010
-# Copyright (C) 2010-2013 Free Software Foundation, Inc.
+# Copyright (C) 2010-2014, 2016 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/>.
+
+# 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"}
+: ${GIT="git"}
+: ${LN_S="ln -s"}
+: ${RM="rm"}
+
+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=
+
+
+## ------------------- ##
+## External Libraries. ##
+## ------------------- ##
+
# Source required external libraries:
# Set a version string for this script.
-scriptversion=2013-08-23.20; # UTC
+scriptversion=2014-01-03.01; # UTC
# General shell script boiler plate, and helper functions.
# Written by Gary V. Vaughan, 2004
-# Copyright (C) 2004-2013 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014, 2016 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.
'
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'
+# There are apparently some retarded systems that use ';' as a PATH separator!
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
fi
+
+## ------------------------- ##
+## Locate command utilities. ##
+## ------------------------- ##
+
+
+# func_executable_p FILE
+# ----------------------
+# Check that FILE is an executable regular file.
+func_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+}
+
+
+# func_path_progs PROGS_LIST CHECK_FUNC [PATH]
+# --------------------------------------------
+# Search for either a program that responds to --version with output
+# containing "GNU", or else returned by CHECK_FUNC otherwise, by
+# trying all the directories in PATH with each of the elements of
+# PROGS_LIST.
+#
+# CHECK_FUNC should accept the path to a candidate program, and
+# set $func_check_prog_result if it truncates its output less than
+# $_G_path_prog_max characters.
+func_path_progs ()
+{
+ _G_progs_list=$1
+ _G_check_func=$2
+ _G_PATH=${3-"$PATH"}
+
+ _G_path_prog_max=0
+ _G_path_prog_found=false
+ _G_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for _G_dir in $_G_PATH; do
+ IFS=$_G_save_IFS
+ test -z "$_G_dir" && _G_dir=.
+ for _G_prog_name in $_G_progs_list; do
+ for _exeext in '' .EXE; do
+ _G_path_prog=$_G_dir/$_G_prog_name$_exeext
+ func_executable_p "$_G_path_prog" || continue
+ case `"$_G_path_prog" --version 2>&1` in
+ *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;;
+ *) $_G_check_func $_G_path_prog
+ func_path_progs_result=$func_check_prog_result
+ ;;
+ esac
+ $_G_path_prog_found && break 3
+ done
+ done
+ done
+ IFS=$_G_save_IFS
+ test -z "$func_path_progs_result" && {
+ echo "no acceptable sed could be found in \$PATH" >&2
+ exit 1
+ }
+}
+
+
+# We want to be able to use the functions in this file before configure
+# has figured out where the best binaries are kept, which means we have
+# to search for them ourselves - except when the results are already set
+# where we skip the searches.
+
+# Unless the user overrides by setting SED, search the path for either GNU
+# sed, or the sed that truncates its output the least.
+test -z "$SED" && {
+ _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for _G_i in 1 2 3 4 5 6 7; do
+ _G_sed_script=$_G_sed_script$nl$_G_sed_script
+ done
+ echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed
+ _G_sed_script=
+
+ func_check_prog_sed ()
+ {
+ _G_path_prog=$1
+
+ _G_count=0
+ printf 0123456789 >conftest.in
+ while :
+ do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo '' >> conftest.nl
+ "$_G_path_prog" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
+ diff conftest.out conftest.nl >/dev/null 2>&1 || break
+ _G_count=`expr $_G_count + 1`
+ if test "$_G_count" -gt "$_G_path_prog_max"; then
+ # Best one so far, save it but keep looking for a better one
+ func_check_prog_result=$_G_path_prog
+ _G_path_prog_max=$_G_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test 10 -lt "$_G_count" && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out
+ }
+
+ func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
+ rm -f conftest.sed
+ SED=$func_path_progs_result
+}
+
+
+# Unless the user overrides by setting GREP, search the path for either GNU
+# grep, or the grep that truncates its output the least.
+test -z "$GREP" && {
+ func_check_prog_grep ()
+ {
+ _G_path_prog=$1
+
+ _G_count=0
+ _G_path_prog_max=0
+ printf 0123456789 >conftest.in
+ while :
+ do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo 'GREP' >> conftest.nl
+ "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' <conftest.nl >conftest.out 2>/dev/null || break
+ diff conftest.out conftest.nl >/dev/null 2>&1 || break
+ _G_count=`expr $_G_count + 1`
+ if test "$_G_count" -gt "$_G_path_prog_max"; then
+ # Best one so far, save it but keep looking for a better one
+ func_check_prog_result=$_G_path_prog
+ _G_path_prog_max=$_G_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test 10 -lt "$_G_count" && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out
+ }
+
+ func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
+ GREP=$func_path_progs_result
+}
+
+
## ------------------------------- ##
## User overridable command paths. ##
## ------------------------------- ##
# in the command search PATH.
: ${CP="cp -f"}
-: ${ECHO="$bs_echo"}
-: ${EGREP="grep -E"}
-: ${FGREP="grep -F"}
-: ${GREP="grep"}
+: ${ECHO="printf %s\n"}
+: ${EGREP="$GREP -E"}
+: ${FGREP="$GREP -F"}
: ${LN_S="ln -s"}
: ${MAKE="make"}
: ${MKDIR="mkdir"}
: ${MV="mv -f"}
: ${RM="rm -f"}
-: ${SED="sed"}
: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
progpath=$0
# The name of this program.
-progname=`$bs_echo "$progpath" |$SED "$sed_basename"`
+progname=`$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=`$ECHO "$progpath" |$SED "$sed_dirname"`
progdir=`cd "$progdir" && pwd`
progpath=$progdir/$progname
;;
{
$debug_cmd
- eval _G_current_value='`$bs_echo $'$1'`'
+ eval _G_current_value='`$ECHO $'$1'`'
_G_delim=`expr "$2" : '\(.\)'`
case $_G_delim$_G_current_value$_G_delim in
IFS=$nl
for _G_line in $_G_message; do
IFS=$func_echo_IFS
- $bs_echo "$progname: $_G_line"
+ $ECHO "$progname: $_G_line"
done
IFS=$func_echo_IFS
}
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"`
+ _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"`
+ _G_indent=`$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
+ _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
+ $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2
_G_prefix=$_G_indent
done
IFS=$func_echo_infix_1_IFS
}
+# 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
+
+ printf '%s\n%s\n' "$1" "$2" \
+ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n
+}
+
+# func_lt_ver PREV CURR
+# ---------------------
+# Return true if PREV and CURR are in the correct order according to
+# func_sort_ver, otherwise false. Use it like this:
+#
+# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..."
+func_lt_ver ()
+{
+ $debug_cmd
+
+ test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q`
+}
+
+
# Local variables:
# mode: shell-script
# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook '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
+scriptversion=2014-01-07.03; # UTC
# A portable, pluggable option parser for Bourne shell.
# Written by Gary V. Vaughan, 2010
-# Copyright (C) 2010-2013 Free Software Foundation, Inc.
+# Copyright (C) 2010-2014, 2016 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.
{
$debug_cmd
- eval ${1}_hooks='`$bs_echo "\$'$1'_hooks" |$SED "s| '$2'||"`'
+ eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`'
}
-## ------------------##
+## ----------------- ##
## Helper functions. ##
-## ------------------##
+## ----------------- ##
# This section contains the helper functions used by the rest of the
# hookable option parser framework in ascii-betical order.
{
$debug_cmd
- eval \$bs_echo \""Usage: $usage"\"
- eval \$bs_echo \""$fatal_help"\"
+ eval \$ECHO \""Usage: $usage"\"
+ eval \$ECHO \""$fatal_help"\"
func_error ${1+"$@"}
exit $EXIT_FAILURE
}
$debug_cmd
func_usage_message
- $bs_echo "$long_help_message"
+ $ECHO "$long_help_message"
exit 0
}
$debug_cmd
func_usage_message
- $bs_echo "Run '$progname --help |${PAGER-more}' for full usage"
+ $ECHO "Run '$progname --help |${PAGER-more}' for full usage"
exit 0
}
{
$debug_cmd
- eval \$bs_echo \""Usage: $usage"\"
+ eval \$ECHO \""Usage: $usage"\"
echo
$SED -n 's|^# ||
/^Written by/{
h
/^Written by/q' < "$progpath"
echo
- eval \$bs_echo \""$usage_message"\"
+ eval \$ECHO \""$usage_message"\"
}
$debug_cmd
printf '%s\n' "$progname $scriptversion"
- $SED -n '/^##/q
+ $SED -n '
/(C)/!b go
:more
/\./!{
# Local variables:
# mode: shell-script
# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
# time-stamp-time-zone: "UTC"
# End:
# Extract macro arguments from autotools input with GNU M4.
# Written by Gary V. Vaughan, 2010
#
-# Copyright (C) 2010-2013 Free Software Foundation, Inc.
+# Copyright (C) 2010-2014, 2016 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.
test extract-trace = "$progname" && . `echo "$0" |${SED-sed} 's|[^/]*$||'`/options-parser
# Set a version string.
-scriptversion=2013-08-22.10; # UTC
+scriptversion=2014-01-04.01; # 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
-## ------------------##
+## ----------------- ##
## Helper functions. ##
-## ------------------##
+## ----------------- ##
# This section contains the helper functions used by the rest of
# 'extract-trace'.
# 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`
+ && _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"
$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_m4_traces=`$ECHO "--trace=$1" |$SED 's%,% --trace=%g'`
+ _G_re_macros=`$ECHO "($1)" |$SED 's%,%|%g'`
_G_macros="$1"; shift
test $# -gt 0 || {
set dummy $configure_ac
# 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
+ # 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=`$ECHO "$_G_mini" \
+ |$M4 -daq --prefix $_G_m4_traces - "$@" 2>&1 1>/dev/null \
+ |$SED -n -e "$_G_transform"`
+}
-## -------------- ##
-## 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=
+# 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
-# Name of a file containing instructions on installing missing packages
-# required in 'buildreq'.
-buildreq_readme=README-hacking
+ func_extract_trace ${1+"$@"}
+ func_extract_trace_first_result=`$ECHO "$func_extract_trace_result" \
+ |$SED -e 's|:.*$||g' -e 1q`
+}
-# 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=
+# func_main [ARG]...
+# ------------------
+func_main ()
+{
+ $debug_cmd
-# 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=
+ # Configuration.
+ usage='$progname MACRO_NAME FILE [...]'
-# 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
-"
+ 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.
-# 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=
+The arguments are returned separated by colons, with each traced call
+on a separate line.'
-# Additional gnulib-tool options to use.
-gnulib_tool_options="
- --no-changelog
-"
+ # Option processing.
+ func_options "$@"
+ eval set dummy "$func_options_result"; shift
-# 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
-"
+ # Validate remaining non-option arguments.
+ test $# -gt 1 \
+ || func_fatal_help "not enough arguments"
-# When truncating long commands for display, always allow at least this
-# many characters before truncating.
-min_cmd_len=160
+ # Pass non-option arguments to extraction function.
+ func_extract_trace "$@"
-# 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'"
+ # Display results.
+ test -n "$func_extract_trace_result" \
+ && $ECHO "$func_extract_trace_result"
-# Other locale categories that need message catalogs.
-extra_locale_categories=
+ # The End.
+ exit $EXIT_SUCCESS
+}
-# 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=
+## --------------------------- ##
+## Actually perform the trace. ##
+## --------------------------- ##
-# File that should exist in the top directory of a checked out hierarchy,
-# but not in a distribution tarball.
-checkout_only_file=
+# Only call 'func_main' if this script was called directly.
+test extract-trace = "$progname" && func_main "$@"
-# Whether to use copies instead of symlinks by default (if set to true,
-# the --copy option has no effect).
-copy=false
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-pattern: "20/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
-# 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=
+# Set a version string for *this* script.
+scriptversion=2014-11-04.13; # UTC
## ------------------- ##
# Post-option preparation.
func_prep
- # Ensure ChangeLog presence.
- func_ifcontains "$gnulib_modules" gitlog-to-changelog \
- func_ensure_changelog
-
# Reconfigure the package.
func_reconfigure
$require_gnulib_merge_changelog
+ # Report the results of SED and GREP searches from funclib.sh.
+ func_verbose "GREP='$GREP'"
+ func_verbose "SED='$SED'"
+
# fetch update files from the translation project
func_update_translations
{
$debug_cmd
+ $require_automake_options
+
+ # Automake (without 'foreign' option) requires that README exists.
+ case " $automake_options " in
+ " foreign ") ;;
+ *) func_ensure_README ;;
+ esac
+
+ # Ensure ChangeLog presence.
+ if test -n "$gnulib_modules"; then
+ func_ifcontains "$gnulib_modules" gitlog-to-changelog \
+ func_ensure_changelog
+ else
+ $require_gnulib_cache
+ if $SED -n '/^gl_MODULES(\[/,/^])$/p' $gnulib_cache 2>/dev/null |
+ func_grep_q gitlog-to-changelog
+ then
+ func_ensure_changelog
+ fi
+ fi
+
# Released 'autopoint' has the tendency to install macros that have
- # been obsoleted in current 'gnulib., so run this before 'gnulib-tool'.
+ # been obsoleted in current 'gnulib', so run this before 'gnulib-tool'.
func_autopoint
# Autoreconf runs 'aclocal' before 'libtoolize', which causes spurious
}
-# func_autoreconf
-# ---------------
+# func_ensure_README
+# ------------------
+# Without AM_INIT_AUTOMAKE([foreign]), automake will not run to
+# completion with no README file, even though README.md or README.txt
+# is often preferable.
+func_ensure_README ()
+{
+ $debug_cmd
+
+ test -f README || {
+ _G_README=
+ for _G_readme in README.txt README.md README.rst; do
+ test -f "$_G_readme" && break
+ done
+
+ test -f "$_G_readme" && $LN_S $_G_readme README
+ func_verbose "$LN_S $_G_readme README"
+ }
+
+ return 0
+}
+
+
+# func_autoreconf [SUBDIR]
+# ------------------------
# 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.
+#
+# Projects with multiple trees to reconfigure can hook another call to
+# this function onto func_reconfigure:
+#
+# my_autoreconf_foo ()
+# {
+# func_autoreconf foo
+# }
+# func_add_hook func_reconfigure my_autoreconf_foo
func_autoreconf ()
{
$debug_cmd
$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 $?'
+ func_show_eval "$AUTORECONF$_G_autoreconf_options --install${1+ $1}" 'exit $?'
AUTOPOINT=$save_AUTOPOINT
LIBTOOLIZE=$save_LIBTOOLIZE
# 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
+ 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 \
}
+# require_automake_options
+# ------------------------
+# Extract options from AM_AUTOMAKE_INIT.
+require_automake_options=func_require_automake_options
+func_require_automake_options ()
+{
+ $debug_cmd
+
+ func_extract_trace AM_INIT_AUTOMAKE
+ automake_options=$func_extract_trace_result
+
+ require_automake_options=:
+}
+
+
# require_autopoint
# -----------------
# Skip autopoint if it's not needed.
'bootstrap.conf', so that I can tell you when there are
updates available."
else
+ rm -f bootstrap.new
$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
+ chmod 555 bootstrap.new
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
+ mv -f bootstrap.new $progname
./$progname
Or you can disable this check permanently by adding the
'$tool' $_G_version http://www.gnu.org/s/'$b'
"
func_verbose \
- "auto-adding '\'$tool'-'$_G_version\'' to build requirements"
+ "auto-adding '\'$tool'-$_G_version'\'' to build requirements"
}
}
# ...and AM_INIT_AUTOMAKE is declared...
test -n "$func_extract_trace_result" && {
- automake_version=`$bs_echo "$func_extract_trace_result" \
+ automake_version=`$ECHO "$func_extract_trace_result" \
|$SED -e 's|[^0-9]*||' -e 's| .*$||'`
test -n "$automake_version" || automake_version=-
# 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 :
+ || find "$local_gl_dir" -name "*.diff" -exec false {} \; ; then :
else
func_append buildreq 'patch - http://www.gnu.org/s/patch
'
$opt_skip_git && GIT=true
test true = "$GIT" || {
- if test -f .gitignore && ($GIT --version) >/dev/null 2>&1; then :; else
- GIT=true
+ if test -d .git/.; then
+ ($GIT --version) >/dev/null 2>&1 || GIT=true
fi
}
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_show_eval "$GIT submodule init -- $gnulib_path" \
+ && func_show_eval "$GIT submodule update -- $gnulib_path" \
|| func_fatal_error "Unable to update gnulib submodule."
fi
func_find_tool LIBTOOLIZE libtoolize glibtoolize
}
+ test -n "$LIBTOOLIZE" || func_fatal_error "\
+Please install GNU Libtool, or 'export LIBTOOLIZE=/path/to/libtoolize'."
+
func_verbose "export LIBTOOLIZE='$LIBTOOLIZE'"
# Make sure the search result is visible to subshells
# 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 ()
{
func_find_tool PATCH gpatch patch
}
+ test -n "$PATCH" || func_fatal_error "\
+Please install GNU Patch, or 'export PATCH=/path/to/gnu/patch'."
+
func_verbose "export PATCH='$PATCH'"
# Make sure the search result is visible to subshells
}
-## ------------------##
+## ----------------- ##
## Helper functions. ##
-## ------------------##
+## ----------------- ##
# This section contains the helper functions used by the rest of 'bootstrap'.
# 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.
+# otherwise if NO-CMD was given, execute that.
func_ifcontains ()
{
$debug_cmd
- # The embedded echo is to squash whitespace before globbing.
- _G_wslist=`$bs_echo " "$1" "`
+ _G_wslist=$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
+ _G_found=false
+ for _G_item in $_G_wslist; do
+ test "x$_G_item" = "x$_G_member" && {
+ _G_found=:
+ break
+ }
+ done
+ if $_G_found; then
+ eval "$_G_yes_cmd"
+ _G_status=$?
+ else
+ eval "$_G_no_cmd"
+ _G_status=$?
+ fi
test 0 -eq "$_G_status" || exit $_G_status
}
$debug_cmd
_G_width=`expr "$2" - 1`
- func_strpad_result=`$bs_echo "$1" |$SED '
+ func_strpad_result=`$ECHO "$1" |$SED '
:a
s|^.\{0,'"$_G_width"'\}$|&'"$3"'|
ta
$debug_cmd
_G_width=`expr "$2" - 1`
- func_strrpad_result=`$bs_echo "$1" |$SED '
+ func_strrpad_result=`$ECHO "$1" |$SED '
:a
s|^.\{0,'"$_G_width"'\}$|'"$3"'&|
ta
# Strip off the indent, and make a divider with '-' chars, then
# reindent.
- _G_divider=`$bs_echo "$func_strrow_result" \
+ _G_divider=`$ECHO "$func_strrow_result" \
|$SED 's|[^ ]|-|g
:a
s|- |--|g
{
$debug_cmd
- sed -e '/^#/d' -e '/^$/d' "$@"
+ $SED -e '/^#/d' -e '/^$/d' "$@"
}
|| func_verbose "inserting '$str' into '$file'"
linesold=`func_gitignore_entries "$file" |wc -l`
- linesnew=`{ $bs_echo "$str"; cat "$file"; } \
+ linesnew=`{ $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"; } \
+ || { $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
# 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
+ sed_get_version=`$ECHO '# extract version within line
s|.*[v ]\{1,\}\([0-9]\{1,\}\.[.a-z0-9-]*\).*|\1|
t done
;;
*)
save_IFS=$IFS
- IFS=:
+ IFS=${PATH_SEPARATOR-:}
for _G_check_tool_path in $PATH; do
IFS=$save_IFS
if test -x "$_G_check_tool_path/$1"; then
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
# 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 "\
+ func_verbose "found '$_G_app' version $_G_instver."
+
+ case $_G_reqver in
+ =*)
+ # If $buildreq version starts with '=', version must
+ # match the installed program exactly.
+ test "x$_G_reqver" = "x=$_G_instver" || {
+ func_error "\
+ '$_G_app' version == $_G_instver is too old
+ 'exactly $_G_app-$_G_reqver is required"
+ func_check_versions_result=false
+ }
+ ;;
+ *)
+ # Otherwise, anything that is not older is a match.
+ func_lt_ver "$_G_reqver" "$_G_instver" || {
+ func_error "\
'$_G_app' version == $_G_instver is too old
'$_G_app' version >= $_G_reqver is required"
func_check_versions_result=false
- }
+ }
+ ;;
+ esac
fi
fi
done
# Find sha1sum, named gsha1sum on MacPorts, and shasum on MacOS 10.6+.
func_find_tool SHA1SUM sha1sum gsha1sum shasum sha1
+ test -n "$SHA1SUM" || func_fatal_error "\
+Please install GNU Coreutils, or 'export SHA1SUM=/path/to/sha1sum'."
+
_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
# Local variables:
# mode: shell-script
# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-pattern: "20/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-pattern: "500/scriptversion=%:y-%02m-%02d.%02H; # UTC"
# time-stamp-time-zone: "UTC"
# End:
-eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}'
+eval '(exit $?0)' && eval 'exec perl -wS "$0" "$@"'
& eval 'exec perl -wS "$0" $argv:q'
if 0;
# Generate a release announcement message.
-my $VERSION = '2012-06-08 06:53'; # UTC
+my $VERSION = '2016-01-12 23:09'; # UTC
# The definition above must lie within the first 8 lines in order
# for the Emacs time-stamp write hook (at end) to update it.
# If you change this file with Emacs, please let the write hook
# do its job. Otherwise, update this string manually.
-# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+# Copyright (C) 2002-2016 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
use strict;
use Getopt::Long;
-use Digest::MD5;
-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 %digest_classes =
+ (
+ 'md5' => (eval { require Digest::MD5; } and 'Digest::MD5'),
+ 'sha1' => ((eval { require Digest::SHA; } and 'Digest::SHA')
+ or (eval { require Digest::SHA1; } and 'Digest::SHA1'))
+ );
my $srcdir = '.';
sub usage ($)
foreach my $meth (qw (md5 sha1))
{
+ my $class = $digest_classes{$meth} or next;
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);
+ my $dig = $class->new->addfile(*IN)->hexdigest;
close IN;
print "$dig $f\n";
}
@url_dir_list
or (warn "URL directory name(s) not specified\n"), $fail = 1;
- my @tool_list = split ',', $bootstrap_tools;
+ my @tool_list = split ',', $bootstrap_tools
+ if $bootstrap_tools;
grep (/^gnulib$/, @tool_list) ^ defined $gnulib_version
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}
+ !$release_type || exists $valid_release_types{$release_type}
or (warn "'$release_type': invalid release type\n"), $fail = 1;
@ARGV
## eval: (add-hook 'write-file-hooks 'time-stamp)
## time-stamp-start: "my $VERSION = '"
## time-stamp-format: "%:y-%02m-%02d %02H:%02M"
-## time-stamp-time-zone: "UTC"
+## time-stamp-time-zone: "UTC0"
## time-stamp-end: "'; # UTC"
## End:
--- /dev/null
+#! /bin/sh
+# Wrapper for Microsoft lib.exe
+
+me=ar-lib
+scriptversion=2012-03-01.08; # UTC
+
+# Copyright (C) 2010-2014 Free Software Foundation, Inc.
+# Written by Peter Rosin <peda@lysator.liu.se>.
+#
+# This program is free software; you can 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>.
+
+
+# func_error message
+func_error ()
+{
+ echo "$me: $1" 1>&2
+ exit 1
+}
+
+file_conv=
+
+# func_file_conv build_file
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts.
+func_file_conv ()
+{
+ file=$1
+ case $file in
+ / | /[!/]*) # absolute file, and not a UNC file
+ if test -z "$file_conv"; then
+ # lazily determine how to convert abs files
+ case `uname -s` in
+ MINGW*)
+ file_conv=mingw
+ ;;
+ CYGWIN*)
+ file_conv=cygwin
+ ;;
+ *)
+ file_conv=wine
+ ;;
+ esac
+ fi
+ case $file_conv in
+ mingw)
+ file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+ ;;
+ cygwin)
+ file=`cygpath -m "$file" || echo "$file"`
+ ;;
+ wine)
+ file=`winepath -w "$file" || echo "$file"`
+ ;;
+ esac
+ ;;
+ esac
+}
+
+# func_at_file at_file operation archive
+# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
+# for each of them.
+# When interpreting the content of the @FILE, do NOT use func_file_conv,
+# since the user would need to supply preconverted file names to
+# binutils ar, at least for MinGW.
+func_at_file ()
+{
+ operation=$2
+ archive=$3
+ at_file_contents=`cat "$1"`
+ eval set x "$at_file_contents"
+ shift
+
+ for member
+ do
+ $AR -NOLOGO $operation:"$member" "$archive" || exit $?
+ done
+}
+
+case $1 in
+ '')
+ func_error "no command. Try '$0 --help' for more information."
+ ;;
+ -h | --h*)
+ cat <<EOF
+Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
+
+Members may be specified in a file named with @FILE.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "$me, version $scriptversion"
+ exit $?
+ ;;
+esac
+
+if test $# -lt 3; then
+ func_error "you must specify a program, an action and an archive"
+fi
+
+AR=$1
+shift
+while :
+do
+ if test $# -lt 2; then
+ func_error "you must specify a program, an action and an archive"
+ fi
+ case $1 in
+ -lib | -LIB \
+ | -ltcg | -LTCG \
+ | -machine* | -MACHINE* \
+ | -subsystem* | -SUBSYSTEM* \
+ | -verbose | -VERBOSE \
+ | -wx* | -WX* )
+ AR="$AR $1"
+ shift
+ ;;
+ *)
+ action=$1
+ shift
+ break
+ ;;
+ esac
+done
+orig_archive=$1
+shift
+func_file_conv "$orig_archive"
+archive=$file
+
+# strip leading dash in $action
+action=${action#-}
+
+delete=
+extract=
+list=
+quick=
+replace=
+index=
+create=
+
+while test -n "$action"
+do
+ case $action in
+ d*) delete=yes ;;
+ x*) extract=yes ;;
+ t*) list=yes ;;
+ q*) quick=yes ;;
+ r*) replace=yes ;;
+ s*) index=yes ;;
+ S*) ;; # the index is always updated implicitly
+ c*) create=yes ;;
+ u*) ;; # TODO: don't ignore the update modifier
+ v*) ;; # TODO: don't ignore the verbose modifier
+ *)
+ func_error "unknown action specified"
+ ;;
+ esac
+ action=${action#?}
+done
+
+case $delete$extract$list$quick$replace,$index in
+ yes,* | ,yes)
+ ;;
+ yesyes*)
+ func_error "more than one action specified"
+ ;;
+ *)
+ func_error "no action specified"
+ ;;
+esac
+
+if test -n "$delete"; then
+ if test ! -f "$orig_archive"; then
+ func_error "archive not found"
+ fi
+ for member
+ do
+ case $1 in
+ @*)
+ func_at_file "${1#@}" -REMOVE "$archive"
+ ;;
+ *)
+ func_file_conv "$1"
+ $AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
+ ;;
+ esac
+ done
+
+elif test -n "$extract"; then
+ if test ! -f "$orig_archive"; then
+ func_error "archive not found"
+ fi
+ if test $# -gt 0; then
+ for member
+ do
+ case $1 in
+ @*)
+ func_at_file "${1#@}" -EXTRACT "$archive"
+ ;;
+ *)
+ func_file_conv "$1"
+ $AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
+ ;;
+ esac
+ done
+ else
+ $AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
+ do
+ $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
+ done
+ fi
+
+elif test -n "$quick$replace"; then
+ if test ! -f "$orig_archive"; then
+ if test -z "$create"; then
+ echo "$me: creating $orig_archive"
+ fi
+ orig_archive=
+ else
+ orig_archive=$archive
+ fi
+
+ for member
+ do
+ case $1 in
+ @*)
+ func_file_conv "${1#@}"
+ set x "$@" "@$file"
+ ;;
+ *)
+ func_file_conv "$1"
+ set x "$@" "$file"
+ ;;
+ esac
+ shift
+ shift
+ done
+
+ if test -n "$orig_archive"; then
+ $AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
+ else
+ $AR -NOLOGO -OUT:"$archive" "$@" || exit $?
+ fi
+
+elif test -n "$list"; then
+ if test ! -f "$orig_archive"; then
+ func_error "archive not found"
+ fi
+ $AR -NOLOGO -LIST "$archive" || exit $?
+fi
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
-scriptversion=2012-10-14.11; # UTC
+scriptversion=2016-01-11.22; # UTC
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2015 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
echo "compile $scriptversion"
exit $?
;;
- cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
+ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
# 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-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright 1992-2013 Free Software Foundation, Inc.
+# Copyright 1992-2016 Free Software Foundation, Inc.
-timestamp='2013-06-10'
+timestamp='2016-10-02'
# 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
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
#
-# Originally written by Per Bothner.
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# 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
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
#
-# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+# Please send patches to <config-patches@gnu.org>.
me=`echo "$0" | sed -e 's,.*/,,'`
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright 1992-2013 Free Software Foundation, Inc.
+Copyright 1992-2016 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."
LIBC=gnu
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
;;
esac
# Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+ /sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || \
+ echo unknown)`
case "${UNAME_MACHINE_ARCH}" in
armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
+ earmv*)
+ arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+ endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
+ machine=${arch}${endian}-unknown
+ ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
+ # to ELF recently (or will in the future) and ABI.
case "${UNAME_MACHINE_ARCH}" in
+ earm*)
+ os=netbsdelf
+ ;;
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
os=netbsd
;;
esac
+ # Determine ABI tags.
+ case "${UNAME_MACHINE_ARCH}" in
+ earm*)
+ expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+ abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
+ ;;
+ esac
# The OS release
# Debian GNU/NetBSD machines have a different userland, and
# thus, need a distinct triplet. However, they do not need
release='-gnu'
;;
*)
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}"
+ echo "${machine}-${os}${release}${abi}"
exit ;;
*:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
exit ;;
+ *:LibertyBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
+ exit ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
exit ;;
+ *:Sortix:*:*)
+ echo ${UNAME_MACHINE}-unknown-sortix
+ exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
case "$ALPHA_CPU_TYPE" in
"EV4 (21064)")
- UNAME_MACHINE="alpha" ;;
+ UNAME_MACHINE=alpha ;;
"EV4.5 (21064)")
- UNAME_MACHINE="alpha" ;;
+ UNAME_MACHINE=alpha ;;
"LCA4 (21066/21068)")
- UNAME_MACHINE="alpha" ;;
+ UNAME_MACHINE=alpha ;;
"EV5 (21164)")
- UNAME_MACHINE="alphaev5" ;;
+ UNAME_MACHINE=alphaev5 ;;
"EV5.6 (21164A)")
- UNAME_MACHINE="alphaev56" ;;
+ UNAME_MACHINE=alphaev56 ;;
"EV5.6 (21164PC)")
- UNAME_MACHINE="alphapca56" ;;
+ UNAME_MACHINE=alphapca56 ;;
"EV5.7 (21164PC)")
- UNAME_MACHINE="alphapca57" ;;
+ UNAME_MACHINE=alphapca57 ;;
"EV6 (21264)")
- UNAME_MACHINE="alphaev6" ;;
+ UNAME_MACHINE=alphaev6 ;;
"EV6.7 (21264A)")
- UNAME_MACHINE="alphaev67" ;;
+ UNAME_MACHINE=alphaev67 ;;
"EV6.8CB (21264C)")
- UNAME_MACHINE="alphaev68" ;;
+ UNAME_MACHINE=alphaev68 ;;
"EV6.8AL (21264B)")
- UNAME_MACHINE="alphaev68" ;;
+ UNAME_MACHINE=alphaev68 ;;
"EV6.8CX (21264D)")
- UNAME_MACHINE="alphaev68" ;;
+ UNAME_MACHINE=alphaev68 ;;
"EV6.9A (21264/EV69A)")
- UNAME_MACHINE="alphaev69" ;;
+ UNAME_MACHINE=alphaev69 ;;
"EV7 (21364)")
- UNAME_MACHINE="alphaev7" ;;
+ UNAME_MACHINE=alphaev7 ;;
"EV7.9 (21364A)")
- UNAME_MACHINE="alphaev79" ;;
+ UNAME_MACHINE=alphaev79 ;;
esac
# A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
exitcode=$?
trap '' 0
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
eval $set_cc_for_build
- SUN_ARCH="i386"
+ SUN_ARCH=i386
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
# This test works for both compilers.
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
- SUN_ARCH="x86_64"
+ SUN_ARCH=x86_64
fi
fi
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
echo m68k-sun-sunos${UNAME_RELEASE}
else
IBM_ARCH=powerpc
fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
+ if [ -x /usr/bin/lslpp ] ; then
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
else
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0
case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ 32) HP_ARCH=hppa2.0n ;;
+ 64) HP_ARCH=hppa2.0w ;;
+ '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
esac ;;
esac
fi
exit (0);
}
EOF
- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
- if [ ${HP_ARCH} = "hppa2.0w" ]
+ if [ ${HP_ARCH} = hppa2.0w ]
then
eval $set_cc_for_build
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
# => hppa64-hp-hpux11.23
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
grep -q __LP64__
then
- HP_ARCH="hppa2.0w"
+ HP_ARCH=hppa2.0w
else
- HP_ARCH="hppa64"
+ HP_ARCH=hppa64
fi
fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
- i*:MSYS*:*)
+ *:MSYS*:*)
echo ${UNAME_MACHINE}-pc-msys
exit ;;
i*:windows32*:*)
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arc:Linux:*:* | arceb:Linux:*:*)
crisv32:Linux:*:*)
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
+ e2k:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
frv:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
+ k1om:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
- or1k:Linux:*:*)
+ mips64el:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
- or32:Linux:*:*)
+ openrisc*:Linux:*:*)
+ echo or1k-unknown-linux-${LIBC}
+ exit ;;
+ or32:Linux:*:* | or1k*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
padre:Linux:*:*)
ppcle:Linux:*:*)
echo powerpcle-unknown-linux-${LIBC}
exit ;;
+ riscv32:Linux:*:* | riscv64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
- # prints for the "djgpp" host, or else GDB configury will decide that
+ # prints for the "djgpp" host, or else GDB configure will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
exit ;;
SX-8R:SUPER-UX:*:*)
echo sx8r-nec-superux${UNAME_RELEASE}
exit ;;
+ SX-ACE:SUPER-UX:*:*)
+ echo sxace-nec-superux${UNAME_RELEASE}
+ exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
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
+ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
fi
+ elif test "$UNAME_PROCESSOR" = i386 ; then
+ # Avoid executing cc on OS X 10.9, as it ships with a stub
+ # that puts up a graphical alert prompting to install
+ # developer tools. Any system running Mac OS X 10.7 or
+ # later (Darwin 11 and later) is required to have a 64-bit
+ # processor. This is not true of the ARM version of Darwin
+ # that Apple uses in portable devices.
+ UNAME_PROCESSOR=x86_64
fi
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = "x86"; then
+ if test "$UNAME_PROCESSOR" = x86; then
UNAME_PROCESSOR=i386
UNAME_MACHINE=pc
fi
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
# operating systems.
- if test "$cputype" = "386"; then
+ if test "$cputype" = 386; then
UNAME_MACHINE=i386
else
UNAME_MACHINE="$cputype"
echo i386-pc-xenix
exit ;;
i*86:skyos:*:*)
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
exit ;;
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
x86_64:VMkernel:*:*)
echo ${UNAME_MACHINE}-unknown-esx
exit ;;
-esac
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
- I don't know.... */
- printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
- printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
- "4"
-#else
- ""
-#endif
- ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
- printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
- int version;
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- if (version < 4)
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
- else
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
- exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
- printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
- printf ("ns32k-encore-mach\n"); exit (0);
-#else
- printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
- printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
- printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
- printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
- struct utsname un;
-
- uname(&un);
-
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
- printf ("i386-sequent-ptx1\n"); exit (0);
- }
- printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-# include <sys/param.h>
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
- printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
- exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
- case `getsysinfo -f cpu_type` in
- c1*)
- echo c1-convex-bsd
- exit ;;
- c2*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- c34*)
- echo c34-convex-bsd
- exit ;;
- c38*)
- echo c38-convex-bsd
- exit ;;
- c4*)
- echo c4-convex-bsd
+ amd64:Isilon\ OneFS:*:*)
+ echo x86_64-unknown-onefs
exit ;;
- esac
-fi
+esac
cat >&2 <<EOF
$0: unable to guess system type
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite
+config.guess and config.sub with the latest versions from:
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
and
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
config.guess timestamp = $timestamp
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable.
#
-# Copyright 1996-2013 Free Software Foundation, Inc.
+# Copyright 1996-2016 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
dgux*)
hardcode_libdir_flag_spec='-L$libdir'
;;
- freebsd2.2*)
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- ;;
- freebsd2*)
+ freebsd2.[01]*)
hardcode_direct=yes
hardcode_minus_L=yes
;;
dgux*)
library_names_spec='$libname$shrext'
;;
+ freebsd[23].*)
+ library_names_spec='$libname$shrext$versuffix'
+ ;;
freebsd* | dragonfly*)
- case "$host_os" in
- freebsd[123]*)
- library_names_spec='$libname$shrext$versuffix' ;;
- *)
- library_names_spec='$libname$shrext' ;;
- esac
+ library_names_spec='$libname$shrext'
;;
gnu*)
library_names_spec='$libname$shrext'
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright 1992-2013 Free Software Foundation, Inc.
+# Copyright 1992-2016 Free Software Foundation, Inc.
-timestamp='2013-09-05'
+timestamp='2016-12-24'
# 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
# of the GNU General Public License, version 3 ("GPLv3").
-# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+# Please send patches to <config-patches@gnu.org>.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
- $0 [OPTION] ALIAS
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
Canonicalize a configuration name.
version="\
GNU config.sub ($timestamp)
-Copyright 1992-2013 Free Software Foundation, Inc.
+Copyright 1992-2016 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."
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
- knetbsd*-gnu* | netbsd*-gnu* | \
- kopensolaris*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
+ kopensolaris*-gnu* | cloudabi*-eabi* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
| arc | arceb \
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
| avr | avr32 \
+ | ba \
| be32 | be64 \
| bfin \
| c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
- | epiphany \
- | fido | fr30 | frv \
+ | e2k | epiphany \
+ | fido | fr30 | frv | ft32 \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
+ | k1om \
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r6 | mipsisa32r6el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r6 | mipsisa64r6el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipsr5900 | mipsr5900el \
| nds32 | nds32le | nds32be \
| nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
- | open8 \
- | or1k | or32 \
+ | open8 | or1k | or1knd | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pru \
| pyramid \
+ | riscv32 | riscv64 \
| 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 \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | visium \
| we32k \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
c6x)
basic_machine=tic6x-unknown
;;
+ leon|leon[3-9])
+ basic_machine=sparc-$basic_machine
+ ;;
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
os=-none
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
+ | ba-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
| c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
- | elxsi-* \
+ | e2k-* | elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
+ | k1om-* \
| le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa32r6-* | mipsisa32r6el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64r6-* | mipsisa64r6el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipsr5900-* | mipsr5900el-* \
| nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
+ | or1k*-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pru-* \
| pyramid-* \
+ | riscv32-* | riscv64-* \
| rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
| tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile*-* \
| ubicom32-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
+ | visium-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
basic_machine=i386-pc
os=-aros
;;
+ asmjs)
+ basic_machine=asmjs-unknown
+ ;;
aux)
basic_machine=m68k-apple
os=-aux
basic_machine=m68k-bull
os=-sysv3
;;
+ e500v[12])
+ basic_machine=powerpc-unknown
+ os=$os"spe"
+ ;;
+ e500v[12]-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=$os"spe"
+ ;;
ebmon29k)
basic_machine=a29k-amd
os=-ebmon
basic_machine=m68k-isi
os=-sysv
;;
+ leon-*|leon[3-9]-*)
+ basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
+ ;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
basic_machine=powerpc-unknown
os=-morphos
;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ os=-moxiebox
+ ;;
msdos)
basic_machine=i386-pc
os=-msdos
ppc-* | ppcbe-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- ppcle | powerpclittle | ppc-le | powerpc-little)
+ ppcle | powerpclittle)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ ppc64le | powerpc64little)
basic_machine=powerpc64le-unknown
;;
ppc64le-* | powerpc64little-*)
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
+ | -aos* | -aros* | -cloudabi* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -bitrig* | -openbsd* | -solidbsd* \
+ | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
| -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* \
+ | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
+ | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
;;
-nacl*)
;;
+ -ios)
+ ;;
-none)
;;
*)
mips*-*)
os=-elf
;;
- or1k-*)
- os=-elf
- ;;
or32-*)
os=-coff
;;
sparc-* | *-sun)
os=-sunos4.1.1
;;
+ pru-*)
+ os=-elf
+ ;;
*-be)
os=-beos
;;
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-scriptversion=2013-05-30.07; # UTC
+scriptversion=2016-01-11.22; # UTC
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2015 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# 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-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
--- /dev/null
+#!/bin/sh
+# In a git/autoconf/automake-enabled project with a NEWS file and a version-
+# controlled .prev-version file, automate the procedure by which we record
+# the date, release-type and version string in the NEWS file. That commit
+# will serve to identify the release, so apply a signed tag to it as well.
+VERSION=2016-12-31.14 # UTC
+
+# Note: this is a bash script (could be zsh or dash)
+
+# Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General 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
+
+ME=$(basename "$0")
+warn() { printf '%s: %s\n' "$ME" "$*" >&2; }
+die() { warn "$*"; exit 1; }
+
+help()
+{
+ cat <<EOF
+Usage: $ME [OPTION...] VERSION RELEASE_TYPE
+
+Run this script from top_srcdir to perform the final pre-release NEWS
+update in which the date, release-type and version string are
+recorded. Commit that result with a log entry marking the release,
+and apply a signed tag. Run it from your project's top-level
+directory.
+
+Requirements:
+- you use git for version-control
+- a version-controlled .prev-version file
+- a NEWS file, with line 3 identical to this:
+$noteworthy_stub
+
+Options:
+ --branch=BRANCH set release branch (default: $branch)
+ -C, --builddir=DIR location of (configured) Makefile (default: $builddir)
+ --help print this help, then exit
+ --version print version number, then exit
+
+EXAMPLE:
+To update NEWS and tag the beta 8.1 release of coreutils, I would run this:
+
+ $ME 8.1 beta
+
+Report bugs and patches to <bug-gnulib@gnu.org>.
+EOF
+ exit
+}
+
+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
+}
+
+## ------ ##
+## Main. ##
+## ------ ##
+
+# Constants.
+noteworthy='* Noteworthy changes in release'
+noteworthy_stub="$noteworthy ?.? (????-??-??) [?]"
+
+# Variables.
+branch=$(git branch | sed -ne '/^\* /{s///;p;q;}')
+builddir=.
+
+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" "$@"; shift
+ ;;
+ esac
+
+ case $1 in
+ --help|--version) ${1#--};;
+ --branch) shift; branch=$1; shift ;;
+ -C|--builddir) shift; builddir=$1; shift ;;
+ --*) die "unrecognized option: $1";;
+ *) break;;
+ esac
+done
+
+test $# = 2 \
+ || die "Usage: $ME [OPTION...] VERSION TYPE"
+
+ver=$1
+type=$2
+
+
+## ---------------------- ##
+## First, sanity checks. ##
+## ---------------------- ##
+
+# Verify that $ver looks like a version number, and...
+echo "$ver"|grep -E '^[0-9][0-9.]*[0-9]$' > /dev/null \
+ || die "invalid version: $ver"
+prev_ver=$(cat .prev-version) \
+ || die 'failed to determine previous version number from .prev-version'
+
+# Verify that $ver is sensible (> .prev-version).
+case $(printf "$prev_ver\n$ver\n"|sort -V -u|tr '\n' ':') in
+ "$prev_ver:$ver:") ;;
+ *) die "invalid version: $ver (<= $prev_ver)";;
+esac
+
+case $type in
+ alpha|beta|stable) ;;
+ *) die "invalid release type: $type";;
+esac
+
+# No local modifications allowed.
+case $(git diff-index --name-only HEAD) in
+ '') ;;
+ *) die 'this tree is dirty; commit your changes first';;
+esac
+
+# Ensure the current branch name is correct:
+curr_br=$(git rev-parse --symbolic-full-name HEAD)
+test "$curr_br" = "refs/heads/$branch" || die not on branch $branch
+
+# Extract package name from Makefile.
+Makefile=$builddir/Makefile
+pkg=$(sed -n 's/^PACKAGE = \(.*\)/\1/p' "$Makefile") \
+ || die "failed to determine package name from $Makefile"
+
+# Check that line 3 of NEWS is the stub line about to be replaced.
+test "$(sed -n 3p NEWS)" = "$noteworthy_stub" \
+ || die "line 3 of NEWS must be exactly '$noteworthy_stub'"
+
+## --------------- ##
+## Then, changes. ##
+## --------------- ##
+
+# Update NEWS to have today's date, plus desired version number and $type.
+perl -MPOSIX -ni -e 'my $today = strftime "%F", localtime time;' \
+ -e 'my ($type, $ver) = qw('"$type $ver"');' \
+ -e 'my $pfx = "'"$noteworthy"'";' \
+ -e 'print $.==3 ? "$pfx $ver ($today) [$type]\n" : $_' \
+ NEWS || die 'failed to update NEWS'
+
+printf "version $ver\n\n* NEWS: Record release date.\n" \
+ | git commit -F - -a || die 'git commit failed'
+git tag -s -m "$pkg $ver" v$ver HEAD || die 'git tag failed'
+
+# Local variables:
+# indent-tabs-mode: nil
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "VERSION="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: " # UTC"
+# End:
# 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=2013-03-08.15
+scriptversion=2016-05-20.09
-# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
-# Free Software Foundation, Inc.
+# Copyright 2003-2016 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Original author: Mohit Agarwal.
-# Send bug reports and any other correspondence to bug-texinfo@gnu.org.
+# Send bug reports and any other correspondence to bug-gnulib@gnu.org.
#
# The latest version of this script, and the companion template, is
-# available from Texinfo CVS:
-# http://savannah.gnu.org/cgi-bin/viewcvs/texinfo/texinfo/util/gendocs.sh
-# http://savannah.gnu.org/cgi-bin/viewcvs/texinfo/texinfo/util/gendocs_template
+# available from the Gnulib repository:
#
-# An up-to-date copy is also maintained in Gnulib (gnu.org/software/gnulib).
+# http://git.savannah.gnu.org/cgit/gnulib.git/tree/build-aux/gendocs.sh
+# http://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/gendocs_template
# TODO:
-# - image importation was only implemented for HTML generated by
+# - image importing 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`
-scripturl="http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/util/gendocs.sh"
-templateurl="http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/util/gendocs_template"
+scripturl="http://git.savannah.gnu.org/cgit/gnulib.git/plain/build-aux/gendocs.sh"
+templateurl="http://git.savannah.gnu.org/cgit/gnulib.git/plain/doc/gendocs_template"
: ${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="}
: ${MAKEINFO="makeinfo"}
-: ${TEXI2DVI="texi2dvi -t @finalout"}
+: ${TEXI2DVI="texi2dvi"}
: ${DOCBOOK2HTML="docbook2html"}
: ${DOCBOOK2PDF="docbook2pdf"}
: ${DOCBOOK2TXT="docbook2txt"}
unset CDPATH
unset use_texi2html
+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 directories.
+htmlarg="--css-ref=/software/gnulib/manual.css -c TOP_NODE_UP_URL=/manual"
+infoarg=--no-split
+generate_ascii=true
+generate_html=true
+generate_info=true
+generate_tex=true
+outdir=manual
+source_extra=
+split=node
+srcfile=
+texarg="-t @finalout"
+
version="gendocs.sh $scriptversion
-Copyright 2013 Free Software Foundation, Inc.
+Copyright 2016 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."
-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.
+ --html ARG pass ARG to makeinfo or texi2html for HTML targets,
+ instead of '$htmlarg'.
--info ARG pass ARG to makeinfo for Info, instead of --no-split.
--no-ascii skip generating the plain text output.
+ --no-html skip generating the html output.
+ --no-info skip generating the info output.
+ --no-tex skip generating the dvi and pdf output.
--source ARG include ARG in tar archive of sources.
--split HOW make split HTML by node, section, chapter; default node.
+ --tex ARG pass ARG to texi2dvi for DVI and PDF, instead of -t @finalout.
--texi2html use texi2html to make HTML target, with all split versions.
--docbook convert through DocBook too (xml, txt, html, pdf).
happen to have a non-English manual and non-English web site, see the
SETLANG setting in the source.
-Email bug reports or enhancement requests to bug-texinfo@gnu.org.
+Email bug reports or enhancement requests to bug-gnulib@gnu.org.
"
-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
-s) shift; srcfile=$1;;
--html) shift; htmlarg=$1;;
--info) shift; infoarg=$1;;
--no-ascii) generate_ascii=false;;
+ --no-html) generate_ascii=false;;
+ --no-info) generate_info=false;;
+ --no-tex) generate_tex=false;;
--source) shift; source_extra=$1;;
--split) shift; split=$1;;
+ --tex) shift; texarg=$1;;
--texi2html) use_texi2html=1;;
--help) echo "$usage"; exit 0;;
# copy_images OUTDIR HTML-FILE...
# -------------------------------
-# Copy all the images needed by the HTML-FILEs into OUTDIR. Look
-# for them in the -I directories.
+# Copy all the images needed by the HTML-FILEs into OUTDIR.
+# Look for them in . and the -I directories; this is simpler than what
+# makeinfo supports with -I, but hopefully it will suffice.
copy_images()
{
local odir
BEGIN {
\$me = '$prog';
\$odir = '$odir';
- @dirs = qw($dirs);
+ @dirs = qw(. $dirs);
}
" -e '
/<img src="(.*?)"/g && ++$need{$1};
echo " in `pwd`"
mkdir -p "$outdir/"
-cmd="$SETLANG $MAKEINFO -o $PACKAGE.info $commonarg $infoarg \"$srcfile\""
-echo "Generating info... ($cmd)"
-eval "$cmd"
-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 $dirargs \"$srcfile\""
-printf "\nGenerating dvi... ($cmd)\n"
-eval "$cmd"
-# 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 $dirargs \"$srcfile\""
-printf "\nGenerating pdf... ($cmd)\n"
-eval "$cmd"
-pdf_size=`calcsize $PACKAGE.pdf`
-mv $PACKAGE.pdf "$outdir/"
-ls -l "$outdir/$PACKAGE.pdf"
+# \f
+if $generate_info; then
+ cmd="$SETLANG $MAKEINFO -o $PACKAGE.info $commonarg $infoarg \"$srcfile\""
+ echo "Generating info... ($cmd)"
+ rm -f $PACKAGE.info* # get rid of any strays
+ eval "$cmd"
+ 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.
+fi # end info
+
+# \f
+if $generate_tex; then
+ cmd="$SETLANG $TEXI2DVI $dirargs $texarg \"$srcfile\""
+ printf "\nGenerating dvi... ($cmd)\n"
+ eval "$cmd"
+ # 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 $dirargs $texarg \"$srcfile\""
+ printf "\nGenerating pdf... ($cmd)\n"
+ eval "$cmd"
+ pdf_size=`calcsize $PACKAGE.pdf`
+ mv $PACKAGE.pdf "$outdir/"
+ ls -l "$outdir/$PACKAGE.pdf"
+fi # end tex (dvi + pdf)
+# \f
if $generate_ascii; then
opt="-o $PACKAGE.txt --no-split --no-headers $commonarg"
cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
ls -l "$outdir/$PACKAGE.txt" "$outdir/$PACKAGE.txt.gz"
fi
+# \f
+
+if $generate_html; then
# Split HTML at level $1. Used for texi2html.
html_split()
{
html_split chapter
html_split section
fi
+fi # end html
+# \f
printf "\nMaking .tar.gz for sources...\n"
d=`dirname $srcfile`
(
)
texi_tgz_size=`calcsize "$outdir/$PACKAGE.texi.tar.gz"`
+# \f
+# Do everything again through docbook.
if test -n "$docbook"; then
opt="-o - --docbook $commonarg"
cmd="$SETLANG $MAKEINFO $opt \"$srcfile\" >${srcdir}/$PACKAGE-db.xml"
mv $PACKAGE-db.pdf "$outdir/"
fi
-printf "\nMaking index file...\n"
+# \f
+printf "\nMaking index.html for $PACKAGE...\n"
if test -z "$use_texi2html"; then
CONDS="/%%IF *HTML_SECTION%%/,/%%ENDIF *HTML_SECTION%%/d;\
/%%IF *HTML_CHAPTER%%/,/%%ENDIF *HTML_CHAPTER%%/d"
#!/bin/sh
# Print a version string.
-scriptversion=2012-12-31.23; # UTC
+scriptversion=2016-05-08.18; # UTC
-# Copyright (C) 2007-2013 Free Software Foundation, Inc.
+# Copyright (C) 2007-2016 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Options:
- --prefix prefix of git tags (default 'v')
- --fallback fallback version to use if \"git --version\" fails
+ --prefix PREFIX prefix of git tags (default 'v')
+ --fallback VERSION
+ fallback version to use if \"git --version\" fails
--help display this help and exit
--version output version information and exit
case $1 in
--help) echo "$usage"; exit 0;;
--version) echo "$version"; exit 0;;
- --prefix) shift; prefix="$1";;
- --fallback) shift; fallback="$1";;
+ --prefix) shift; prefix=${1?};;
+ --fallback) shift; fallback=${1?};;
-*)
echo "$0: Unknown option '$1'." >&2
echo "$0: Try '--help' for more information." >&2
fi
# Omit the trailing newline, so that m4_esyscmd can use the result directly.
-echo "$v" | tr -d "$nl"
+printf %s "$v"
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
--- /dev/null
+eval '(exit $?0)' && eval 'exec perl -wS "$0" "$@"'
+ & eval 'exec perl -wS "$0" $argv:q'
+ if 0;
+# Convert git log output to ChangeLog format.
+
+my $VERSION = '2016-03-22 21:49'; # 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-2016 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General 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
+
+use strict;
+use warnings;
+use Getopt::Long;
+use POSIX qw(strftime);
+
+(my $ME = $0) =~ s|.*/||;
+
+# use File::Coda; # http://meyering.net/code/Coda/
+END {
+ defined fileno STDOUT or return;
+ close STDOUT and return;
+ warn "$ME: failed to close standard output: $!\n";
+ $? ||= 1;
+}
+
+sub usage ($)
+{
+ my ($exit_code) = @_;
+ my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR);
+ if ($exit_code != 0)
+ {
+ print $STREAM "Try '$ME --help' for more information.\n";
+ }
+ else
+ {
+ print $STREAM <<EOF;
+Usage: $ME [OPTIONS] [ARGS]
+
+Convert git log output to ChangeLog format. If present, any ARGS
+are passed to "git log". To avoid ARGS being parsed as options to
+$ME, they may be preceded by '--'.
+
+OPTIONS:
+
+ --amend=FILE FILE maps from an SHA1 to perl code (i.e., s/old/new/) that
+ makes a change to SHA1's commit log text or metadata.
+ --append-dot append a dot to the first line of each commit message if
+ there is no other punctuation or blank at the end.
+ --no-cluster never cluster commit messages under the same date/author
+ header; the default is to cluster adjacent commit messages
+ if their headers are the same and neither commit message
+ contains multiple paragraphs.
+ --srcdir=DIR the root of the source tree, from which the .git/
+ directory can be derived.
+ --since=DATE convert only the logs since DATE;
+ the default is to convert all log entries.
+ --until=DATE convert only the logs older than DATE.
+ --ignore-matching=PAT ignore commit messages whose first lines match PAT.
+ --ignore-line=PAT ignore lines of commit messages that match PAT.
+ --format=FMT set format string for commit subject and body;
+ see 'man git-log' for the list of format metacharacters;
+ the default is '%s%n%b%n'
+ --strip-tab remove one additional leading TAB from commit message lines.
+ --strip-cherry-pick remove data inserted by "git cherry-pick";
+ this includes the "cherry picked from commit ..." line,
+ and the possible final "Conflicts:" paragraph.
+ --help display this help and exit
+ --version output version information and exit
+
+EXAMPLE:
+
+ $ME --since=2008-01-01 > ChangeLog
+ $ME -- -n 5 foo > last-5-commits-to-branch-foo
+
+SPECIAL SYNTAX:
+
+The following types of strings are interpreted specially when they appear
+at the beginning of a log message line. They are not copied to the output.
+
+ Copyright-paperwork-exempt: Yes
+ Append the "(tiny change)" notation to the usual "date name email"
+ ChangeLog header to mark a change that does not require a copyright
+ assignment.
+ Co-authored-by: Joe User <user\@example.com>
+ List the specified name and email address on a second
+ ChangeLog header, denoting a co-author.
+ Signed-off-by: Joe User <user\@example.com>
+ These lines are simply elided.
+
+In a FILE specified via --amend, comment lines (starting with "#") are ignored.
+FILE must consist of <SHA,CODE+> pairs where SHA is a 40-byte SHA1 (alone on
+a line) referring to a commit in the current project, and CODE refers to one
+or more consecutive lines of Perl code. Pairs must be separated by one or
+more blank line.
+
+Here is sample input for use with --amend=FILE, from coreutils:
+
+3a169f4c5d9159283548178668d2fae6fced3030
+# fix typo in title:
+s/all tile types/all file types/
+
+1379ed974f1fa39b12e2ffab18b3f7a607082202
+# Due to a bug in vc-dwim, I mis-attributed a patch by Paul to myself.
+# Change the author to be Paul. Note the escaped "@":
+s,Jim .*>,Paul Eggert <eggert\\\@cs.ucla.edu>,
+
+EOF
+ }
+ exit $exit_code;
+}
+
+# If the string $S is a well-behaved file name, simply return it.
+# If it contains white space, quotes, etc., quote it, and return the new string.
+sub shell_quote($)
+{
+ my ($s) = @_;
+ if ($s =~ m![^\w+/.,-]!)
+ {
+ # Convert each single quote to '\''
+ $s =~ s/\'/\'\\\'\'/g;
+ # Then single quote the string.
+ $s = "'$s'";
+ }
+ return $s;
+}
+
+sub quoted_cmd(@)
+{
+ return join (' ', map {shell_quote $_} @_);
+}
+
+# Parse file F.
+# Comment lines (starting with "#") are ignored.
+# F must consist of <SHA,CODE+> pairs where SHA is a 40-byte SHA1
+# (alone on a line) referring to a commit in the current project, and
+# CODE refers to one or more consecutive lines of Perl code.
+# Pairs must be separated by one or more blank line.
+sub parse_amend_file($)
+{
+ my ($f) = @_;
+
+ open F, '<', $f
+ or die "$ME: $f: failed to open for reading: $!\n";
+
+ my $fail;
+ my $h = {};
+ my $in_code = 0;
+ my $sha;
+ while (defined (my $line = <F>))
+ {
+ $line =~ /^\#/
+ and next;
+ chomp $line;
+ $line eq ''
+ and $in_code = 0, next;
+
+ if (!$in_code)
+ {
+ $line =~ /^([0-9a-fA-F]{40})$/
+ or (warn "$ME: $f:$.: invalid line; expected an SHA1\n"),
+ $fail = 1, next;
+ $sha = lc $1;
+ $in_code = 1;
+ exists $h->{$sha}
+ and (warn "$ME: $f:$.: duplicate SHA1\n"),
+ $fail = 1, next;
+ }
+ else
+ {
+ $h->{$sha} ||= '';
+ $h->{$sha} .= "$line\n";
+ }
+ }
+ close F;
+
+ $fail
+ and exit 1;
+
+ return $h;
+}
+
+# git_dir_option $SRCDIR
+#
+# From $SRCDIR, the --git-dir option to pass to git (none if $SRCDIR
+# is undef). Return as a list (0 or 1 element).
+sub git_dir_option($)
+{
+ my ($srcdir) = @_;
+ my @res = ();
+ if (defined $srcdir)
+ {
+ my $qdir = shell_quote $srcdir;
+ my $cmd = "cd $qdir && git rev-parse --show-toplevel";
+ my $qcmd = shell_quote $cmd;
+ my $git_dir = qx($cmd);
+ defined $git_dir
+ or die "$ME: cannot run $qcmd: $!\n";
+ $? == 0
+ or die "$ME: $qcmd had unexpected exit code or signal ($?)\n";
+ chomp $git_dir;
+ push @res, "--git-dir=$git_dir/.git";
+ }
+ @res;
+}
+
+{
+ my $since_date;
+ my $until_date;
+ my $format_string = '%s%n%b%n';
+ my $amend_file;
+ my $append_dot = 0;
+ my $cluster = 1;
+ my $ignore_matching;
+ my $ignore_line;
+ my $strip_tab = 0;
+ my $strip_cherry_pick = 0;
+ my $srcdir;
+ GetOptions
+ (
+ help => sub { usage 0 },
+ version => sub { print "$ME version $VERSION\n"; exit },
+ 'since=s' => \$since_date,
+ 'until=s' => \$until_date,
+ 'format=s' => \$format_string,
+ 'amend=s' => \$amend_file,
+ 'append-dot' => \$append_dot,
+ 'cluster!' => \$cluster,
+ 'ignore-matching=s' => \$ignore_matching,
+ 'ignore-line=s' => \$ignore_line,
+ 'strip-tab' => \$strip_tab,
+ 'strip-cherry-pick' => \$strip_cherry_pick,
+ 'srcdir=s' => \$srcdir,
+ ) or usage 1;
+
+ defined $since_date
+ and unshift @ARGV, "--since=$since_date";
+ defined $until_date
+ and unshift @ARGV, "--until=$until_date";
+
+ # This is a hash that maps an SHA1 to perl code (i.e., s/old/new/)
+ # that makes a correction in the log or attribution of that commit.
+ my $amend_code = defined $amend_file ? parse_amend_file $amend_file : {};
+
+ my @cmd = ('git',
+ git_dir_option $srcdir,
+ qw(log --log-size),
+ '--pretty=format:%H:%ct %an <%ae>%n%n'.$format_string, @ARGV);
+ open PIPE, '-|', @cmd
+ or die ("$ME: failed to run '". quoted_cmd (@cmd) ."': $!\n"
+ . "(Is your Git too old? Version 1.5.1 or later is required.)\n");
+
+ my $prev_multi_paragraph;
+ my $prev_date_line = '';
+ my @prev_coauthors = ();
+ my @skipshas = ();
+ while (1)
+ {
+ defined (my $in = <PIPE>)
+ or last;
+ $in =~ /^log size (\d+)$/
+ or die "$ME:$.: Invalid line (expected log size):\n$in";
+ my $log_nbytes = $1;
+
+ my $log;
+ my $n_read = read PIPE, $log, $log_nbytes;
+ $n_read == $log_nbytes
+ or die "$ME:$.: unexpected EOF\n";
+
+ # Extract leading hash.
+ my ($sha, $rest) = split ':', $log, 2;
+ defined $sha
+ or die "$ME:$.: malformed log entry\n";
+ $sha =~ /^[0-9a-fA-F]{40}$/
+ or die "$ME:$.: invalid SHA1: $sha\n";
+
+ my $skipflag = 0;
+ if (@skipshas)
+ {
+ foreach(@skipshas)
+ {
+ if ($sha =~ /^$_/)
+ {
+ $skipflag = $_;
+ last;
+ }
+ }
+ }
+
+ # If this commit's log requires any transformation, do it now.
+ my $code = $amend_code->{$sha};
+ if (defined $code)
+ {
+ eval 'use Safe';
+ my $s = new Safe;
+ # Put the unpreprocessed entry into "$_".
+ $_ = $rest;
+
+ # Let $code operate on it, safely.
+ my $r = $s->reval("$code")
+ or die "$ME:$.:$sha: failed to eval \"$code\":\n$@\n";
+
+ # Note that we've used this entry.
+ delete $amend_code->{$sha};
+
+ # Update $rest upon success.
+ $rest = $_;
+ }
+
+ # Remove lines inserted by "git cherry-pick".
+ if ($strip_cherry_pick)
+ {
+ $rest =~ s/^\s*Conflicts:\n.*//sm;
+ $rest =~ s/^\s*\(cherry picked from commit [\da-f]+\)\n//m;
+ }
+
+ my @line = split /[ \t]*\n/, $rest;
+ my $author_line = shift @line;
+ defined $author_line
+ or die "$ME:$.: unexpected EOF\n";
+ $author_line =~ /^(\d+) (.*>)$/
+ or die "$ME:$.: Invalid line "
+ . "(expected date/author/email):\n$author_line\n";
+
+ # Format 'Copyright-paperwork-exempt: Yes' as a standard ChangeLog
+ # `(tiny change)' annotation.
+ my $tiny = (grep (/^(?:Copyright-paperwork-exempt|Tiny-change):\s+[Yy]es$/, @line)
+ ? ' (tiny change)' : '');
+
+ my $date_line = sprintf "%s %s$tiny\n",
+ strftime ("%Y-%m-%d", localtime ($1)), $2;
+
+ my @coauthors = grep /^Co-authored-by:.*$/, @line;
+ # Omit meta-data lines we've already interpreted.
+ @line = grep !/^(?:Signed-off-by:[ ].*>$
+ |Co-authored-by:[ ]
+ |Copyright-paperwork-exempt:[ ]
+ |Tiny-change:[ ]
+ )/x, @line;
+
+ # Remove leading and trailing blank lines.
+ if (@line)
+ {
+ while ($line[0] =~ /^\s*$/) { shift @line; }
+ while ($line[$#line] =~ /^\s*$/) { pop @line; }
+ }
+
+ # Handle Emacs gitmerge.el "skipped" commits.
+ # Yes, this should be controlled by an option. So sue me.
+ if ( grep /^(; )?Merge from /, @line )
+ {
+ my $found = 0;
+ foreach (@line)
+ {
+ if (grep /^The following commit.*skipped:$/, $_)
+ {
+ $found = 1;
+ ## Reset at each merge to reduce chance of false matches.
+ @skipshas = ();
+ next;
+ }
+ if ($found && $_ =~ /^([0-9a-fA-F]{7,}) [^ ]/)
+ {
+ push ( @skipshas, $1 );
+ }
+ }
+ }
+
+ # Ignore commits that match the --ignore-matching pattern, if specified.
+ if (defined $ignore_matching && @line && $line[0] =~ /$ignore_matching/)
+ {
+ $skipflag = 1;
+ }
+ elsif ($skipflag)
+ {
+ ## Perhaps only warn if a pattern matches more than once?
+ warn "$ME: warning: skipping $sha due to $skipflag\n";
+ }
+
+ if (! $skipflag)
+ {
+ if (defined $ignore_line && @line)
+ {
+ @line = grep ! /$ignore_line/, @line;
+ while ($line[$#line] =~ /^\s*$/) { pop @line; }
+ }
+
+ # Record whether there are two or more paragraphs.
+ my $multi_paragraph = grep /^\s*$/, @line;
+
+ # Format 'Co-authored-by: A U Thor <email@example.com>' lines in
+ # standard multi-author ChangeLog format.
+ for (@coauthors)
+ {
+ s/^Co-authored-by:\s*/\t /;
+ s/\s*</ </;
+
+ /<.*?@.*\..*>/
+ or warn "$ME: warning: missing email address for "
+ . substr ($_, 5) . "\n";
+ }
+
+ # If clustering of commit messages has been disabled, if this header
+ # would be different from the previous date/name/etc. header,
+ # or if this or the previous entry consists of two or more paragraphs,
+ # then print the header.
+ if ( ! $cluster
+ || $date_line ne $prev_date_line
+ || "@coauthors" ne "@prev_coauthors"
+ || $multi_paragraph
+ || $prev_multi_paragraph)
+ {
+ $prev_date_line eq ''
+ or print "\n";
+ print $date_line;
+ @coauthors
+ and print join ("\n", @coauthors), "\n";
+ }
+ $prev_date_line = $date_line;
+ @prev_coauthors = @coauthors;
+ $prev_multi_paragraph = $multi_paragraph;
+
+ # If there were any lines
+ if (@line == 0)
+ {
+ warn "$ME: warning: empty commit message:\n $date_line\n";
+ }
+ else
+ {
+ if ($append_dot)
+ {
+ # If the first line of the message has enough room, then
+ if (length $line[0] < 72)
+ {
+ # append a dot if there is no other punctuation or blank
+ # at the end.
+ $line[0] =~ /[[:punct:]\s]$/
+ or $line[0] .= '.';
+ }
+ }
+
+ # Remove one additional leading TAB from each line.
+ $strip_tab
+ and map { s/^\t// } @line;
+
+ # Prefix each non-empty line with a TAB.
+ @line = map { length $_ ? "\t$_" : '' } @line;
+
+ print "\n", join ("\n", @line), "\n";
+ }
+ }
+
+ defined ($in = <PIPE>)
+ or last;
+ $in ne "\n"
+ and die "$ME:$.: unexpected line:\n$in";
+ }
+
+ close PIPE
+ or die "$ME: error closing pipe from " . quoted_cmd (@cmd) . "\n";
+ # FIXME-someday: include $PROCESS_STATUS in the diagnostic
+
+ # Complain about any unused entry in the --amend=F specified file.
+ my $fail = 0;
+ foreach my $sha (keys %$amend_code)
+ {
+ warn "$ME:$amend_file: unused entry: $sha\n";
+ $fail = 1;
+ }
+
+ exit $fail;
+}
+
+# Local Variables:
+# mode: perl
+# indent-tabs-mode: nil
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "my $VERSION = '"
+# time-stamp-format: "%:y-%02m-%02d %02H:%02M"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "'; # UTC"
+# End:
# Run this after each non-alpha release, to update the web documentation at
# http://www.gnu.org/software/$pkg/manual/
-VERSION=2012-12-16.14; # UTC
+VERSION=2016-01-12.23; # UTC
-# Copyright (C) 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2009-2016 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Options:
-C, --builddir=DIR location of (configured) Makefile (default: .)
-n, --dry-run don't actually commit anything
+ -m, --mirror remove out of date files from document server
--help print this help, then exit
--version print version number, then exit
builddir=.
dryrun=
+rm_stale='echo'
while test $# != 0
do
# Handle --option=value by splitting apart and putting back on argv.
opt=$(echo "$1" | sed -e 's/=.*//')
val=$(echo "$1" | sed -e 's/[^=]*=//')
shift
- set dummy "$opt" "$val" ${1+"$@"}; shift
+ set dummy "$opt" "$val" "$@"; shift
;;
esac
--help|--version) ${1#--};;
-C|--builddir) shift; builddir=$1; shift ;;
-n|--dry-run) dryrun=echo; shift;;
+ -m|--mirror) rm_stale=''; shift;;
--*) die "unrecognized option: $1";;
*) break;;
esac
./bootstrap
srcdir=$(pwd)
cd "$builddir"
+builddir=$(pwd)
./config.status --recheck
./config.status
make
cd $tmp/$pkg/manual
# 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 \
+ # new ones because of new directories
+ # First add non empty dirs individually
+ find . -name CVS -prune -o -type d \! -empty -print \
+ | $XARGS -n1 --no-run-if-empty -- $dryrun $CVS add -ko
+ # Now add all files
+ find . -name CVS -prune -o -type f -print \
| $XARGS --no-run-if-empty -- $dryrun $CVS add -ko
+ # Report/Remove stale files
+ # excluding doc server specific files like CVS/* and .symlinks
+ if test -n "$rm_stale"; then
+ echo 'Consider the --mirror option if all of the manual is generated,' >&2
+ echo 'which will run `cvs remove` to remove stale files.' >&2
+ fi
+ { find . \( -name CVS -o -type f -name '.*' \) -prune -o -type f -print
+ (cd "$builddir"/doc/manual/ && find . -type f -print | sed p)
+ } | sort | uniq -u \
+ | $XARGS --no-run-if-empty -- ${rm_stale:-$dryrun} $CVS remove -f
+
$dryrun $CVS ci -m $version
)
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "VERSION="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
#!/bin/sh
# Sign files and upload them.
-scriptversion=2013-03-19.17; # UTC
+scriptversion=2016-01-11.22; # UTC
-# Copyright (C) 2004-2013 Free Software Foundation, Inc.
+# Copyright (C) 2004-2016 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# 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-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2011-11-20.07; # UTC
+scriptversion=2016-01-11.22; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# This script is compatible with the BSD install script, but was written
# from scratch.
+tab=' '
nl='
'
-IFS=" "" $nl"
+IFS=" $tab$nl"
-# set DOITPROG to echo to test this script
+# Set DOITPROG to "echo" to test this script.
-# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
-if test -z "$doit"; then
- doit_exec=exec
-else
- doit_exec=$doit
-fi
+doit_exec=${doit:-exec}
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
-posix_glob='?'
-initialize_posix_glob='
- test "$posix_glob" != "?" || {
- if (set -f) 2>/dev/null; then
- posix_glob=
- else
- posix_glob=:
- fi
- }
-'
-
posix_mkdir=
# Desired mode of installed file.
dst_arg=
copy_on_change=false
-no_target_directory=
+is_target_a_directory=possibly
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
- shift;;
+ shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
- case $mode in
- *' '* | *' '* | *'
-'* | *'*'* | *'?'* | *'['*)
- echo "$0: invalid mode: $mode" >&2
- exit 1;;
- esac
- shift;;
+ case $mode in
+ *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
-o) chowncmd="$chownprog $2"
- shift;;
+ shift;;
-s) stripcmd=$stripprog;;
- -t) dst_arg=$2
- # Protect names problematic for 'test' and other utilities.
- case $dst_arg in
- -* | [=\(\)!]) dst_arg=./$dst_arg;;
- esac
- shift;;
+ -t)
+ is_target_a_directory=always
+ dst_arg=$2
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ shift;;
- -T) no_target_directory=true;;
+ -T) is_target_a_directory=never;;
--version) echo "$0 $scriptversion"; exit $?;;
- --) shift
- break;;
+ --) shift
+ break;;
- -*) echo "$0: invalid option: $1" >&2
- exit 1;;
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
*) break;;
esac
shift
done
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
+
+if test -n "$dir_arg"; then
+ if test -n "$dst_arg"; then
+ echo "$0: target directory not allowed when installing a directory." >&2
+ exit 1
+ fi
+fi
+
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
fi
if test -z "$dir_arg"; then
+ if test $# -gt 1 || test "$is_target_a_directory" = always; then
+ if test ! -d "$dst_arg"; then
+ echo "$0: $dst_arg: Is not a directory." >&2
+ exit 1
+ fi
+ fi
+fi
+
+if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
*[0-7])
if test -z "$stripcmd"; then
- u_plus_rw=
+ u_plus_rw=
else
- u_plus_rw='% 200'
+ u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
- u_plus_rw=
+ u_plus_rw=
else
- u_plus_rw=,u+rw
+ u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
- if test -n "$no_target_directory"; then
- echo "$0: $dst_arg: Is a directory" >&2
- exit 1
+ if test "$is_target_a_directory" = never; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
- # Prefer dirname, but fall back on a substitute if dirname fails.
- dstdir=`
- (dirname "$dst") 2>/dev/null ||
- expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$dst" : 'X\(//\)[^/]' \| \
- X"$dst" : 'X\(//\)$' \| \
- X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
- echo X"$dst" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'
- `
-
+ dstdir=`dirname "$dst"`
test -d "$dstdir"
dstdir_status=$?
fi
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
- # Create intermediate dirs using mode 755 as modified by the umask.
- # This is like FreeBSD 'install' as of 1997-10-28.
- umask=`umask`
- case $stripcmd.$umask in
- # Optimize common cases.
- *[2367][2367]) mkdir_umask=$umask;;
- .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
- *[0-7])
- mkdir_umask=`expr $umask + 22 \
- - $umask % 100 % 40 + $umask % 20 \
- - $umask % 10 % 4 + $umask % 2
- `;;
- *) mkdir_umask=$umask,go-w;;
- esac
-
- # With -d, create the new directory with the user-specified mode.
- # Otherwise, rely on $mkdir_umask.
- if test -n "$dir_arg"; then
- mkdir_mode=-m$mode
- else
- mkdir_mode=
- fi
-
- posix_mkdir=false
- case $umask in
- *[123567][0-7][0-7])
- # POSIX mkdir -p sets u+wx bits regardless of umask, which
- # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
- ;;
- *)
- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
- if (umask $mkdir_umask &&
- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
- then
- if test -z "$dir_arg" || {
- # Check for POSIX incompatibilities with -m.
- # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
- # other-writable bit of parent directory when it shouldn't.
- # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
- ls_ld_tmpdir=`ls -ld "$tmpdir"`
- case $ls_ld_tmpdir in
- d????-?r-*) different_mode=700;;
- d????-?--*) different_mode=755;;
- *) false;;
- esac &&
- $mkdirprog -m$different_mode -p -- "$tmpdir" && {
- ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
- }
- }
- then posix_mkdir=:
- fi
- rmdir "$tmpdir/d" "$tmpdir"
- else
- # Remove any dirs left behind by ancient mkdir implementations.
- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
- fi
- trap '' 0;;
- esac;;
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
esac
if
$posix_mkdir && (
- umask $mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
- /*) prefix='/';;
- [-=\(\)!]*) prefix='./';;
- *) prefix='';;
+ /*) prefix='/';;
+ [-=\(\)!]*) prefix='./';;
+ *) prefix='';;
esac
- eval "$initialize_posix_glob"
-
oIFS=$IFS
IFS=/
- $posix_glob set -f
+ set -f
set fnord $dstdir
shift
- $posix_glob set +f
+ set +f
IFS=$oIFS
prefixes=
for d
do
- test X"$d" = X && continue
-
- prefix=$prefix$d
- if test -d "$prefix"; then
- prefixes=
- else
- if $posix_mkdir; then
- (umask=$mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
- # Don't fail if two instances are running concurrently.
- test -d "$prefix" || exit 1
- else
- case $prefix in
- *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
- *) qprefix=$prefix;;
- esac
- prefixes="$prefixes '$qprefix'"
- fi
- fi
- prefix=$prefix/
+ test X"$d" = X && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
done
if test -n "$prefixes"; then
- # Don't fail if two instances are running concurrently.
- (umask $mkdir_umask &&
- eval "\$doit_exec \$mkdirprog $prefixes") ||
- test -d "$dstdir" || exit 1
- obsolete_mkdir_used=true
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
fi
fi
fi
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
- old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
- new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
-
- eval "$initialize_posix_glob" &&
- $posix_glob set -f &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+ set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
- $posix_glob set +f &&
-
+ set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
- # Now remove or move aside any old file at destination location.
- # We try this two ways since rm can't unlink itself on some
- # systems and the destination file might be busy for other
- # reasons. In this case, the final cleanup might fail but the new
- # file should still install successfully.
- {
- test ! -f "$dst" ||
- $doit $rmcmd -f "$dst" 2>/dev/null ||
- { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
- { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
- } ||
- { echo "$0: cannot unlink or rename $dst" >&2
- (exit 1); exit 1
- }
- } &&
-
- # Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dst"
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
# 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-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
#!/bin/sh
# Get modification time of a file or directory and pretty-print it.
-scriptversion=2010-08-21.06; # UTC
+scriptversion=2016-01-11.22; # UTC
-# Copyright (C) 1995-2013 Free Software Foundation, Inc.
+# Copyright (C) 1995-2015 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
# 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-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
#! /bin/sh
# Common wrapper for a few potentially missing GNU programs.
-scriptversion=2012-06-26.16; # UTC
+scriptversion=2013-10-28.13; # UTC
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 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
;;
autom4te*)
echo "You might have modified some maintainer files that require"
- echo "the 'automa4te' program to be rebuilt."
+ echo "the 'autom4te' program to be rebuilt."
program_details 'autom4te'
;;
bison*|yacc*)
/* A C macro for declaring that specific arguments must not be NULL.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
/* C++ compatible function declaration macros.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
#ifndef _GL_CXXDEFS_H
#define _GL_CXXDEFS_H
+/* Begin/end the GNULIB_NAMESPACE namespace. */
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE {
+# define _GL_END_NAMESPACE }
+#else
+# define _GL_BEGIN_NAMESPACE
+# define _GL_END_NAMESPACE
+#endif
+
/* The three most frequent use cases of these macros are:
* For providing a substitute for a function that is missing on some
that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
Example:
_GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
- */
+
+ Wrapping rpl_func in an object with an inline conversion operator
+ avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is
+ actually used in the program. */
#define _GL_CXXALIAS_RPL(func,rettype,parameters) \
_GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
#if defined __cplusplus && defined GNULIB_NAMESPACE
# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
namespace GNULIB_NAMESPACE \
{ \
- rettype (*const func) parameters = ::rpl_func; \
+ static const struct _gl_ ## func ## _wrapper \
+ { \
+ typedef rettype (*type) parameters; \
+ \
+ inline operator type () const \
+ { \
+ return ::rpl_func; \
+ } \
+ } func = {}; \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
#else
# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
namespace GNULIB_NAMESPACE \
{ \
- rettype (*const func) parameters = \
- reinterpret_cast<rettype(*)parameters>(::rpl_func); \
+ static const struct _gl_ ## func ## _wrapper \
+ { \
+ typedef rettype (*type) parameters; \
+ \
+ inline operator type () const \
+ { \
+ return reinterpret_cast<type>(::rpl_func); \
+ } \
+ } func = {}; \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
#else
is defined.
Example:
_GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
- */
+
+ Wrapping func in an object with an inline conversion operator
+ avoids a reference to func unless GNULIB_NAMESPACE::func is
+ actually used in the program. */
#if defined __cplusplus && defined GNULIB_NAMESPACE
- /* If we were to write
- rettype (*const func) parameters = ::func;
- like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls
- better (remove an indirection through a 'static' pointer variable),
- but then the _GL_CXXALIASWARN macro below would cause a warning not only
- for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */
-# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
- namespace GNULIB_NAMESPACE \
- { \
- static rettype (*func) parameters = ::func; \
- } \
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
+ namespace GNULIB_NAMESPACE \
+ { \
+ static const struct _gl_ ## func ## _wrapper \
+ { \
+ typedef rettype (*type) parameters; \
+ \
+ inline operator type () const \
+ { \
+ return ::func; \
+ } \
+ } func = {}; \
+ } \
_GL_EXTERN_C int _gl_cxxalias_dummy
#else
# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
namespace GNULIB_NAMESPACE \
{ \
- static rettype (*func) parameters = \
- reinterpret_cast<rettype(*)parameters>(::func); \
+ static const struct _gl_ ## func ## _wrapper \
+ { \
+ typedef rettype (*type) parameters; \
+ \
+ inline operator type () const \
+ { \
+ return reinterpret_cast<type>(::func); \
+ } \
+ } func = {}; \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
#else
# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
namespace GNULIB_NAMESPACE \
{ \
- static rettype (*func) parameters = \
- reinterpret_cast<rettype(*)parameters>( \
- (rettype2(*)parameters2)(::func)); \
+ static const struct _gl_ ## func ## _wrapper \
+ { \
+ typedef rettype (*type) parameters; \
+ \
+ inline operator type () const \
+ { \
+ return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \
+ } \
+ } func = {}; \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
#else
/* A C macro for declaring that specific function parameters are not used.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
/* A C macro for emitting warnings if a function is used.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
#! /bin/sh
# test-driver - basic testsuite driver script.
-scriptversion=2012-06-27.10; # UTC
+scriptversion=2013-07-13.22; # UTC
-# Copyright (C) 2011-2013 Free Software Foundation, Inc.
+# Copyright (C) 2011-2014 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
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
+ [--enable-hard-errors={yes|no}] [--]
+ TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
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.
--enable-hard-errors) enable_hard_errors=$2; shift;;
--) shift; break;;
-*) usage_error "invalid option: '$1'";;
+ *) break;;
esac
shift
done
+missing_opts=
+test x"$test_name" = x && missing_opts="$missing_opts --test-name"
+test x"$log_file" = x && missing_opts="$missing_opts --log-file"
+test x"$trs_file" = x && missing_opts="$missing_opts --trs-file"
+if test x"$missing_opts" != x; then
+ usage_error "the following mandatory options are missing:$missing_opts"
+fi
+
+if test $# -eq 0; then
+ usage_error "missing argument"
+fi
+
if test $color_tests = yes; then
# Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
red='\e[0;31m' # Red.
# Test script is run here.
"$@" >$log_file 2>&1
estatus=$?
+
if test $enable_hard_errors = no && test $estatus -eq 99; then
- estatus=1
+ tweaked_estatus=1
+else
+ tweaked_estatus=$estatus
fi
-case $estatus:$expect_failure in
+case $tweaked_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;;
*:*) col=$red res=FAIL recheck=yes gcopy=yes;;
esac
+# Report the test outcome and exit status in the logs, so that one can
+# know whether the test passed or failed simply by looking at the '.log'
+# file, without the need of also peaking into the corresponding '.trs'
+# file (automake bug#11814).
+echo "$res $test_name (exit status: $estatus)" >>$log_file
+
# Report outcome to console.
echo "${col}${res}${std}: $test_name"
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2013-09-11.11}
+\def\texinfoversion{2016-09-18.18}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-% 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
+% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
+% 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
\everyjob{\message{[Texinfo version \texinfoversion]}%
\catcode`+=\active \catcode`\_=\active}
+% LaTeX's \typeout. This ensures that the messages it is used for
+% are identical in format to the corresponding ones from latex/pdflatex.
+\def\typeout{\immediate\write17}%
+
\chardef\other=12
% We never want plain's \outer definition of \+ in Texinfo.
\let\ptexraggedright=\raggedright
\let\ptexrbrace=\}
\let\ptexslash=\/
+\let\ptexsp=\sp
\let\ptexstar=\*
+\let\ptexsup=\sup
\let\ptext=\t
\let\ptextop=\top
{\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode
\ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi
\ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi
-% Since the category of space is not known, we have to be careful.
-\chardef\spacecat = 10
-\def\spaceisspace{\catcode`\ =\spacecat}
+% Give the space character the catcode for a space.
+\def\spaceisspace{\catcode`\ =10\relax}
-% sometimes characters are active, so we need control sequences.
-\chardef\ampChar = `\&
-\chardef\colonChar = `\:
-\chardef\commaChar = `\,
\chardef\dashChar = `\-
-\chardef\dotChar = `\.
-\chardef\exclamChar= `\!
-\chardef\hashChar = `\#
-\chardef\lquoteChar= `\`
-\chardef\questChar = `\?
-\chardef\rquoteChar= `\'
-\chardef\semiChar = `\;
\chardef\slashChar = `\/
\chardef\underChar = `\_
wide-spread wrap-around
}
-% Margin to add to right of even pages, to left of odd pages.
-\newdimen\bindingoffset
-\newdimen\normaloffset
-\newdimen\pagewidth \newdimen\pageheight
-
-% For a final copy, take out the rectangles
-% that mark overfull boxes (in case you have decided
-% that the text looks ok even though it passes the margin).
-%
-\def\finalout{\overfullrule=0pt }
-
% Sometimes it is convenient to have everything in the transcript file
% and nothing on the terminal. We don't just call \tracingall here,
% since that produces some useless output on the terminal. We also make
\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
\removelastskip\penalty-200\bigskip\fi\fi}
+%\f Output routine
+%
+
+% For a final copy, take out the rectangles
+% that mark overfull boxes (in case you have decided
+% that the text looks ok even though it passes the margin).
+%
+\def\finalout{\overfullrule=0pt }
+
% Do @cropmarks to get crop marks.
%
\newif\ifcropmarks
%
% Another complication is to let the user choose whether \thischapter
% (\thissection) refers to the chapter (section) in effect at the top
-% of a page, or that at the bottom of a page. The solution is
-% described on page 260 of The TeXbook. It involves outputting two
-% marks for the sectioning macros, one before the section break, and
-% one after. I won't pretend I can describe this better than DEK...
+% of a page, or that at the bottom of a page.
+
+% \domark is called twice inside \chapmacro, to add one
+% mark before the section break, and one after.
+% In the second call \prevchapterdefs is the same as \lastchapterdefs,
+% and \prevsectiondefs is the same as \lastsectiondefs.
+% Then if the page is not broken at the mark, some of the previous
+% section appears on the page, and we can get the name of this section
+% from \firstmark for @everyheadingmarks top.
+% @everyheadingmarks bottom uses \botmark.
+%
+% See page 260 of The TeXbook.
\def\domark{%
\toks0=\expandafter{\lastchapterdefs}%
\toks2=\expandafter{\lastsectiondefs}%
\toks6=\expandafter{\prevsectiondefs}%
\toks8=\expandafter{\lastcolordefs}%
\mark{%
- \the\toks0 \the\toks2 % 0: top marks (\last...)
- \noexpand\or \the\toks4 \the\toks6 % 1: bottom marks (default, \prev...)
+ \the\toks0 \the\toks2 % 0: marks for @everyheadingmarks top
+ \noexpand\or \the\toks4 \the\toks6 % 1: for @everyheadingmarks bottom
\noexpand\else \the\toks8 % 2: color marks
}%
}
+
+% \gettopheadingmarks, \getbottomheadingmarks,
+% \getcolormarks - extract needed part of mark.
+%
% \topmark doesn't work for the very first chapter (after the title
% page or the contents), so we use \firstmark there -- this gets us
% the mark with the chapter defs, unless the user sneaks in, e.g.,
% Avoid "undefined control sequence" errors.
\def\lastchapterdefs{}
\def\lastsectiondefs{}
+\def\lastsection{}
\def\prevchapterdefs{}
\def\prevsectiondefs{}
\def\lastcolordefs{}
+% Margin to add to right of even pages, to left of odd pages.
+\newdimen\bindingoffset
+\newdimen\normaloffset
+\newdimen\txipagewidth \newdimen\txipageheight
+
% Main output routine.
+%
\chardef\PAGE = 255
\output = {\onepageout{\pagecontents\PAGE}}
\newbox\headlinebox
\newbox\footlinebox
-% \onepageout takes a vbox as an argument. Note that \pagecontents
-% does insertions, but you have to call it yourself.
+% \onepageout takes a vbox as an argument.
+% \shipout a vbox for a single page, adding an optional header, footer,
+% cropmarks, and footnote. This also causes index entries for this page
+% to be written to the auxiliary files.
+%
\def\onepageout#1{%
\ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi
%
\ifodd\pageno \advance\hoffset by \bindingoffset
\else \advance\hoffset by -\bindingoffset\fi
%
+ % Common context changes for both heading and footing.
% 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}
+ \def\commmonheadfootline{\let\hsize=\txipagewidth \texinfochars}
%
- \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
- \global\setbox\headlinebox = \vbox{\commmonheadfootline \makeheadline}%
+ % Retrieve the information for the headings from the marks in the page,
+ % and call Plain TeX's \makeheadline and \makefootline, which use the
+ % values in \headline and \footline.
+ %
+ % This is used to check if we are on the first page of a chapter.
+ \ifcase1\topmark\fi
+ \let\prevchaptername\thischaptername
+ \ifcase0\firstmark\fi
+ \let\curchaptername\thischaptername
%
+ \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
\ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
+ %
+ \ifx\curchaptername\prevchaptername
+ \let\thischapterheading\thischapter
+ \else
+ % \thischapterheading is the same as \thischapter except it is blank
+ % for the first page of a chapter. This is to prevent the chapter name
+ % being shown twice.
+ \def\thischapterheading{}%
+ \fi
+ %
+ \global\setbox\headlinebox = \vbox{\commmonheadfootline \makeheadline}%
\global\setbox\footlinebox = \vbox{\commmonheadfootline \makefootline}%
%
{%
+ % Set context for writing to auxiliary files like index files.
% Have to do this stuff outside the \shipout because we want it to
% take effect in \write's, yet the group defined by the \vbox ends
% before the \shipout runs.
\normalturnoffactive % \ in index entries must not stay \, e.g., if
% the page break happens to be in the middle of an example.
% We don't want .vr (or whatever) entries like this:
- % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}}
+ % \entry{{\indexbackslash }acronym}{32}{\code {\acronym}}
% "\acronym" won't work when it's read back in;
% it needs to be
- % {\code {{\tt \backslashcurfont }acronym}
+ % {\code {{\backslashcurfont }acronym}
\shipout\vbox{%
% Do this early so pdf references go to the beginning of the page.
\ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
\newinsert\margin \dimen\margin=\maxdimen
-\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
+% Main part of page, including any footnotes
+\def\pagebody#1{\vbox to\txipageheight{\boxmaxdepth=\maxdepth #1}}
{\catcode`\@ =11
\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
% marginal hacks, juha@viisa.uucp (Juha Takala)
\def\nsbot{\vbox
{\hrule height\cornerlong depth\cornerthick width\cornerthick}}
+
+% Argument parsing
+
% Parse an argument, then pass it to #1. The argument is the rest of
% the input line (except we remove a trailing comment). #1 should be a
% macro which expects an ordinary undelimited TeX argument.
+% For example, \def\foo{\parsearg\fooxxx}.
%
\def\parsearg{\parseargusing{}}
\def\parseargusing#1#2{%
}%
}
-% First remove any @comment, then any @c comment.
+% First remove any @comment, then any @c comment. Also remove a @texinfoc
+% comment (see \scanmacro for details). Pass the result on to \argcheckspaces.
\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
-\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
+\def\argremovec#1\c#2\ArgTerm{\argremovetexinfoc #1\texinfoc\ArgTerm}
+\def\argremovetexinfoc#1\texinfoc#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
% Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space.
%
%
\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}}
+
+% \parseargdef - define a command taking an argument on the line
+%
% \parseargdef\foo{...}
% is roughly equivalent to
% \def\foo{\parsearg\Xfoo}
% \def\Xfoo#1{...}
-%
-% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my
-% favourite TeX trick. --kasal, 16nov03
-
\def\parseargdef#1{%
\expandafter \doparseargdef \csname\string#1\endcsname #1%
}
\endgraf % Not \par, as it may have been set to \lisppar.
\global\dimen1 = \prevdepth
\egroup % End the \vtop.
+ \addgroupbox
+ \prevdepth = \dimen1
+ \checkinserts
+}
+
+\def\addgroupbox{
% \dimen0 is the vertical size of the group's box.
\dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox
% \dimen2 is how much space is left on the page (more or less).
- \dimen2 = \pageheight \advance\dimen2 by -\pagetotal
+ \dimen2 = \txipageheight \advance\dimen2 by -\pagetotal
% if the group doesn't fit on the current page, and it's a big big
% group, force a page break.
\ifdim \dimen0 > \dimen2
- \ifdim \pagetotal < \vfilllimit\pageheight
+ \ifdim \pagetotal < \vfilllimit\txipageheight
\page
\fi
\fi
\box\groupbox
- \prevdepth = \dimen1
- \checkinserts
}
+
%
% TeX puts in an \escapechar (i.e., `@') at the beginning of the help
% message, so this ends up printing `@group can only ...'.
\temp
}
-% @| inserts a changebar to the left of the current line. It should
-% surround any changed text. This approach does *not* work if the
-% change spans more than two lines of output. To handle that, we would
-% have adopt a much more difficult approach (putting marks into the main
-% vertical list for the beginning and end of each change). This command
-% is not documented, not supported, and doesn't work.
-%
-\def\|{%
- % \vadjust can only be used in horizontal mode.
- \leavevmode
- %
- % Append this vertical mode material after the current line in the output.
- \vadjust{%
- % We want to insert a rule with the height and depth of the current
- % leading; that is exactly what \strutbox is supposed to record.
- \vskip-\baselineskip
- %
- % \vadjust-items are inserted at the left edge of the type. So
- % the \llap here moves out into the left-hand margin.
- \llap{%
- %
- % For a thicker or thinner bar, change the `1pt'.
- \vrule height\baselineskip width1pt
- %
- % This is the space between the bar and the text.
- \hskip 12pt
- }%
- }%
-}
-
% @include FILE -- \input text of FILE.
%
\def\include{\parseargusing\filenamecatcodes\includezzz}
% @c is the same as @comment
% @ignore ... @end ignore is another way to write a comment
%
-\def\comment{\begingroup \catcode`\^^M=\other%
+\def\comment{\begingroup \catcode`\^^M=\active%
+\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other\commentxxx}%
+
+{\catcode`\^^M=\active%
+\gdef\commentxxx#1^^M{\endgroup%
+\futurelet\nexttoken\commentxxxx}%
+\gdef\commentxxxx{\ifx\nexttoken\aftermacro\expandafter\comment\fi}%
+}
+
+\def\c{\begingroup \catcode`\^^M=\active%
\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
-\commentxxx}
-{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}}
-%
-\let\c=\comment
+\cxxx}
+{\catcode`\^^M=\active \gdef\cxxx#1^^M{\endgroup}}
+% See comment in \scanmacro about why the definitions of @c and @comment differ
% @paragraphindent NCHARS
% We'll use ems for NCHARS, close enough.
% paragraph.
%
\gdef\dosuppressfirstparagraphindent{%
- \gdef\indent{%
- \restorefirstparagraphindent
- \indent
- }%
- \gdef\noindent{%
- \restorefirstparagraphindent
- \noindent
- }%
- \global\everypar = {%
- \kern -\parindent
- \restorefirstparagraphindent
- }%
+ \gdef\indent {\restorefirstparagraphindent \indent}%
+ \gdef\noindent{\restorefirstparagraphindent \noindent}%
+ \global\everypar = {\kern -\parindent \restorefirstparagraphindent}%
}
-
+%
\gdef\restorefirstparagraphindent{%
- \global \let \indent = \ptexindent
- \global \let \noindent = \ptexnoindent
- \global \everypar = {}%
+ \global\let\indent = \ptexindent
+ \global\let\noindent = \ptexnoindent
+ \global\everypar = {}%
}
% @refill is a no-op.
\let\refill=\relax
-% If working on a large document in chapters, it is convenient to
-% be able to disable indexing, cross-referencing, and contents, for test runs.
-% This is done with @novalidate (before @setfilename).
-%
-\newif\iflinks \linkstrue % by default we want the aux files.
-\let\novalidate = \linksfalse
-
-% @setfilename is done at the beginning of every texinfo file.
-% So open here the files we need to have open while reading the input.
-% This makes it possible to make a .fmt file for texinfo.
-\def\setfilename{%
- \fixbackslash % Turn off hack to swallow `\input texinfo'.
- \iflinks
- \tryauxfile
- % Open the new aux file. TeX will close it automatically at exit.
- \immediate\openout\auxfile=\jobname.aux
- \fi % \openindices needs to do some work in any case.
- \openindices
- \let\setfilename=\comment % Ignore extra @setfilename cmds.
- %
- % If texinfo.cnf is present on the system, read it.
- % Useful for site-wide @afourpaper, etc.
- \openin 1 texinfo.cnf
- \ifeof 1 \else \input texinfo.cnf \fi
- \closein 1
- %
- \comment % Ignore the actual filename.
-}
-
-% Called from \setfilename.
-%
-\def\openindices{%
- \newindex{cp}%
- \newcodeindex{fn}%
- \newcodeindex{vr}%
- \newcodeindex{tp}%
- \newcodeindex{ky}%
- \newcodeindex{pg}%
-}
+% @setfilename INFO-FILENAME - ignored
+\let\setfilename=\comment
% @bye.
\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
\newtoks\toksC
\newtoks\toksD
\newbox\boxA
+\newbox\boxB
\newcount\countA
\newif\ifpdf
\newif\ifpdfmakepagedest
+%
+% For LuaTeX
+%
+
+\newif\iftxiuseunicodedestname
+\txiuseunicodedestnamefalse % For pdfTeX etc.
+
+\ifx\luatexversion\thisisundefined
+\else
+ % Use Unicode destination names
+ \txiuseunicodedestnametrue
+ % Escape PDF strings with converting UTF-16 from UTF-8
+ \begingroup
+ \catcode`\%=12
+ \directlua{
+ function UTF16oct(str)
+ tex.sprint(string.char(0x5c) .. '376' .. string.char(0x5c) .. '377')
+ for c in string.utfvalues(str) do
+ if c < 0x10000 then
+ tex.sprint(
+ string.format(string.char(0x5c) .. string.char(0x25) .. '03o' ..
+ string.char(0x5c) .. string.char(0x25) .. '03o',
+ (c / 256), (c % 256)))
+ else
+ c = c - 0x10000
+ local c_hi = c / 1024 + 0xd800
+ local c_lo = c % 1024 + 0xdc00
+ tex.sprint(
+ string.format(string.char(0x5c) .. string.char(0x25) .. '03o' ..
+ string.char(0x5c) .. string.char(0x25) .. '03o' ..
+ string.char(0x5c) .. string.char(0x25) .. '03o' ..
+ string.char(0x5c) .. string.char(0x25) .. '03o',
+ (c_hi / 256), (c_hi % 256),
+ (c_lo / 256), (c_lo % 256)))
+ end
+ end
+ end
+ }
+ \endgroup
+ \def\pdfescapestrutfsixteen#1{\directlua{UTF16oct('\luaescapestring{#1}')}}
+ % Escape PDF strings without converting
+ \begingroup
+ \directlua{
+ function PDFescstr(str)
+ for c in string.bytes(str) do
+ if c <= 0x20 or c >= 0x80 or c == 0x28 or c == 0x29 or c == 0x5c then
+ tex.sprint(
+ string.format(string.char(0x5c) .. string.char(0x25) .. '03o',
+ c))
+ else
+ tex.sprint(string.char(c))
+ end
+ end
+ end
+ }
+ \endgroup
+ \def\pdfescapestring#1{\directlua{PDFescstr('\luaescapestring{#1}')}}
+ \ifnum\luatexversion>84
+ % For LuaTeX >= 0.85
+ \def\pdfdest{\pdfextension dest}
+ \let\pdfoutput\outputmode
+ \def\pdfliteral{\pdfextension literal}
+ \def\pdfcatalog{\pdfextension catalog}
+ \def\pdftexversion{\numexpr\pdffeedback version\relax}
+ \let\pdfximage\saveimageresource
+ \let\pdfrefximage\useimageresource
+ \let\pdflastximage\lastsavedimageresourceindex
+ \def\pdfendlink{\pdfextension endlink\relax}
+ \def\pdfoutline{\pdfextension outline}
+ \def\pdfstartlink{\pdfextension startlink}
+ \def\pdffontattr{\pdfextension fontattr}
+ \def\pdfobj{\pdfextension obj}
+ \def\pdflastobj{\numexpr\pdffeedback lastobj\relax}
+ \let\pdfpagewidth\pagewidth
+ \let\pdfpageheight\pageheight
+ \edef\pdfhorigin{\pdfvariable horigin}
+ \edef\pdfvorigin{\pdfvariable vorigin}
+ \fi
+\fi
+
% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
% can be set). So we test for \relax and 0 as well as being undefined.
\ifx\pdfoutput\thisisundefined
\ifx\pdfescapestring\thisisundefined
% No primitive available; should we give a warning or log?
% Many times it won't matter.
+ \xdef#1{#1}%
\else
% The expandable \pdfescapestring primitive escapes parentheses,
% backslashes, and other special chars.
\xdef#1{\pdfescapestring{#1}}%
\fi
}
+\def\txiescapepdfutfsixteen#1{%
+ \ifx\pdfescapestrutfsixteen\thisisundefined
+ % No UTF-16 converting macro available.
+ \txiescapepdf{#1}%
+ \else
+ \xdef#1{\pdfescapestrutfsixteen{#1}}%
+ \fi
+}
\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images
with PDF output, and none of those formats could be found. (.eps cannot
\ifpdf
%
- % Color manipulation macros based on pdfcolor.tex,
+ % Color manipulation macros using ideas from pdfcolor.tex,
% except using rgb instead of cmyk; the latter is said to render as a
% very dark gray on-screen and a very dark halftone in print, instead
- % of actual black.
+ % of actual black. The dark red here is dark enough to print on paper as
+ % nearly black, but still distinguishable for online viewing. We use
+ % black by default, though.
\def\rgbDarkRed{0.50 0.09 0.12}
\def\rgbBlack{0 0 0}
%
- % k sets the color for filling (usual text, etc.);
- % K sets the color for stroking (thin rules, e.g., normal _'s).
+ % rg sets the color for filling (usual text, etc.);
+ % RG sets the color for stroking (thin rules, e.g., normal _'s).
\def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}}
%
% Set color, and create a mark which defines \thiscolor accordingly,
\pdfrefximage \pdflastximage
\fi}
%
- \def\pdfmkdest#1{{%
+ \def\setpdfdestname#1{{%
% We have to set dummies so commands such as @code, and characters
% such as \, aren't expanded when present in a section title.
\indexnofonts
- \turnoffactive
\makevalueexpandable
+ \turnoffactive
+ \iftxiuseunicodedestname
+ \ifx \declaredencoding \latone
+ % Pass through Latin-1 characters.
+ % LuaTeX with byte wise I/O converts Latin-1 characters to Unicode.
+ \else
+ \ifx \declaredencoding \utfeight
+ % Pass through Unicode characters.
+ \else
+ % Use ASCII approximations in destination names.
+ \passthroughcharsfalse
+ \fi
+ \fi
+ \else
+ % Use ASCII approximations in destination names.
+ \passthroughcharsfalse
+ \fi
\def\pdfdestname{#1}%
\txiescapepdf\pdfdestname
- \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
}}
%
+ \def\setpdfoutlinetext#1{{%
+ \indexnofonts
+ \makevalueexpandable
+ \turnoffactive
+ \ifx \declaredencoding \latone
+ % The PDF format can use an extended form of Latin-1 in bookmark
+ % strings. See Appendix D of the PDF Reference, Sixth Edition, for
+ % the "PDFDocEncoding".
+ \passthroughcharstrue
+ % Pass through Latin-1 characters.
+ % LuaTeX: Convert to Unicode
+ % pdfTeX: Use Latin-1 as PDFDocEncoding
+ \def\pdfoutlinetext{#1}%
+ \else
+ \ifx \declaredencoding \utfeight
+ \ifx\luatexversion\thisisundefined
+ % For pdfTeX with UTF-8.
+ % TODO: the PDF format can use UTF-16 in bookmark strings,
+ % but the code for this isn't done yet.
+ % Use ASCII approximations.
+ \passthroughcharsfalse
+ \def\pdfoutlinetext{#1}%
+ \else
+ % For LuaTeX with UTF-8.
+ % Pass through Unicode characters for title texts.
+ \passthroughcharstrue
+ \def\pdfoutlinetext{#1}%
+ \fi
+ \else
+ % For non-Latin-1 or non-UTF-8 encodings.
+ % Use ASCII approximations.
+ \passthroughcharsfalse
+ \def\pdfoutlinetext{#1}%
+ \fi
+ \fi
+ % LuaTeX: Convert to UTF-16
+ % pdfTeX: Use Latin-1 as PDFDocEncoding
+ \txiescapepdfutfsixteen\pdfoutlinetext
+ }}
+ %
+ \def\pdfmkdest#1{%
+ \setpdfdestname{#1}%
+ \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
+ }
+ %
% used to mark target names; must be expandable.
\def\pdfmkpgn#1{#1}
%
- % by default, use a color that is dark enough to print on paper as
- % nearly black, but still distinguishable for online viewing.
- \def\urlcolor{\rgbDarkRed}
- \def\linkcolor{\rgbDarkRed}
+ % by default, use black for everything.
+ \def\urlcolor{\rgbBlack}
+ \def\linkcolor{\rgbBlack}
\def\endlink{\setcolor{\maincolor}\pdfendlink}
%
% Adding outlines to PDF; macros for calculating structure of outlines
% page number. We could generate a destination for the section
% text in the case where a section has no node, but it doesn't
% seem worth the trouble, since most documents are normally structured.
- \edef\pdfoutlinedest{#3}%
- \ifx\pdfoutlinedest\empty
- \def\pdfoutlinedest{#4}%
- \else
- \txiescapepdf\pdfoutlinedest
+ \setpdfoutlinetext{#1}
+ \setpdfdestname{#3}
+ \ifx\pdfdestname\empty
+ \def\pdfdestname{#4}%
\fi
%
- % Also escape PDF chars in the display string.
- \edef\pdfoutlinetext{#1}%
- \txiescapepdf\pdfoutlinetext
- %
- \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}%
+ \pdfoutline goto name{\pdfmkpgn{\pdfdestname}}#2{\pdfoutlinetext}%
}
%
\def\pdfmakeoutlines{%
\let\pdfmakeoutlines = \relax
\fi % \ifx\pdfoutput
-
-\message{fonts,}
-
-% Change the current font style to #1, remembering it in \curfontstyle.
-% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in
-% italics, not bold italics.
%
-\def\setfontstyle#1{%
- \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd.
- \csname ten#1\endcsname % change the current font
-}
-
-% Select #1 fonts with the current style.
+% For XeTeX
%
-\def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname}
-
-\def\rm{\fam=0 \setfontstyle{rm}}
-\def\it{\fam=\itfam \setfontstyle{it}}
-\def\sl{\fam=\slfam \setfontstyle{sl}}
-\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
-\def\tt{\fam=\ttfam \setfontstyle{tt}}
-
-% Unfortunately, we have to override this for titles and the like, since
-% in those cases "rm" is bold. Sigh.
-\def\rmisbold{\rm\def\curfontstyle{bf}}
+\ifx\XeTeXrevision\thisisundefined
+\else
+ %
+ % XeTeX version check
+ %
+ \ifnum\strcmp{\the\XeTeXversion\XeTeXrevision}{0.99996}>-1
+ % TeX Live 2016 contains XeTeX 0.99996 and xdvipdfmx 20160307.
+ % It can use the `dvipdfmx:config' special (from TeX Live SVN r40941).
+ % For avoiding PDF destination name replacement, we use this special
+ % instead of xdvipdfmx's command line option `-C 0x0010'.
+ \special{dvipdfmx:config C 0x0010}
+ % XeTeX 0.99995+ comes with xdvipdfmx 20160307+.
+ % It can handle Unicode destination names for PDF.
+ \txiuseunicodedestnametrue
+ \else
+ % XeTeX < 0.99996 (TeX Live < 2016) cannot use the
+ % `dvipdfmx:config' special.
+ % So for avoiding PDF destination name replacement,
+ % xdvipdfmx's command line option `-C 0x0010' is necessary.
+ %
+ % XeTeX < 0.99995 can not handle Unicode destination names for PDF
+ % because xdvipdfmx 20150315 has a UTF-16 conversion issue.
+ % It is fixed by xdvipdfmx 20160106 (TeX Live SVN r39753).
+ \txiuseunicodedestnamefalse
+ \fi
+ %
+ % Color support
+ %
+ \def\rgbDarkRed{0.50 0.09 0.12}
+ \def\rgbBlack{0 0 0}
+ %
+ \def\pdfsetcolor#1{\special{pdf:scolor [#1]}}
+ %
+ % Set color, and create a mark which defines \thiscolor accordingly,
+ % so that \makeheadline knows which color to restore.
+ \def\setcolor#1{%
+ \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}%
+ \domark
+ \pdfsetcolor{#1}%
+ }
+ %
+ \def\maincolor{\rgbBlack}
+ \pdfsetcolor{\maincolor}
+ \edef\thiscolor{\maincolor}
+ \def\lastcolordefs{}
+ %
+ \def\makefootline{%
+ \baselineskip24pt
+ \line{\pdfsetcolor{\maincolor}\the\footline}%
+ }
+ %
+ \def\makeheadline{%
+ \vbox to 0pt{%
+ \vskip-22.5pt
+ \line{%
+ \vbox to8.5pt{}%
+ % Extract \thiscolor definition from the marks.
+ \getcolormarks
+ % Typeset the headline with \maincolor, then restore the color.
+ \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
+ }%
+ \vss
+ }%
+ \nointerlineskip
+ }
+ %
+ % PDF outline support
+ %
+ % Emulate pdfTeX primitive
+ \def\pdfdest name#1 xyz{%
+ \special{pdf:dest (#1) [@thispage /XYZ @xpos @ypos null]}%
+ }
+ %
+ \def\setpdfdestname#1{{%
+ % We have to set dummies so commands such as @code, and characters
+ % such as \, aren't expanded when present in a section title.
+ \indexnofonts
+ \makevalueexpandable
+ \turnoffactive
+ \iftxiuseunicodedestname
+ % Pass through Unicode characters.
+ \else
+ % Use ASCII approximations in destination names.
+ \passthroughcharsfalse
+ \fi
+ \def\pdfdestname{#1}%
+ \txiescapepdf\pdfdestname
+ }}
+ %
+ \def\setpdfoutlinetext#1{{%
+ \turnoffactive
+ % Always use Unicode characters in title texts.
+ \def\pdfoutlinetext{#1}%
+ % For XeTeX, xdvipdfmx converts to UTF-16.
+ % So we do not convert.
+ \txiescapepdf\pdfoutlinetext
+ }}
+ %
+ \def\pdfmkdest#1{%
+ \setpdfdestname{#1}%
+ \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
+ }
+ %
+ % by default, use black for everything.
+ \def\urlcolor{\rgbBlack}
+ \def\linkcolor{\rgbBlack}
+ \def\endlink{\setcolor{\maincolor}\pdfendlink}
+ %
+ \def\dopdfoutline#1#2#3#4{%
+ \setpdfoutlinetext{#1}
+ \setpdfdestname{#3}
+ \ifx\pdfdestname\empty
+ \def\pdfdestname{#4}%
+ \fi
+ %
+ \special{pdf:out [-] #2 << /Title (\pdfoutlinetext) /A
+ << /S /GoTo /D (\pdfdestname) >> >> }%
+ }
+ %
+ \def\pdfmakeoutlines{%
+ \begingroup
+ %
+ % For XeTeX, counts of subentries are not necessary.
+ % Therefore, we read toc only once.
+ %
+ % We use node names as destinations.
+ \def\partentry##1##2##3##4{}% ignore parts in the outlines
+ \def\numchapentry##1##2##3##4{%
+ \dopdfoutline{##1}{1}{##3}{##4}}%
+ \def\numsecentry##1##2##3##4{%
+ \dopdfoutline{##1}{2}{##3}{##4}}%
+ \def\numsubsecentry##1##2##3##4{%
+ \dopdfoutline{##1}{3}{##3}{##4}}%
+ \def\numsubsubsecentry##1##2##3##4{%
+ \dopdfoutline{##1}{4}{##3}{##4}}%
+ %
+ \let\appentry\numchapentry%
+ \let\appsecentry\numsecentry%
+ \let\appsubsecentry\numsubsecentry%
+ \let\appsubsubsecentry\numsubsubsecentry%
+ \let\unnchapentry\numchapentry%
+ \let\unnsecentry\numsecentry%
+ \let\unnsubsecentry\numsubsecentry%
+ \let\unnsubsubsecentry\numsubsubsecentry%
+ %
+ % For XeTeX, xdvipdfmx converts strings to UTF-16.
+ % Therefore, the encoding and the language may not be considered.
+ %
+ \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[}]%
+ ]
-% Texinfo sort of supports the sans serif font style, which plain TeX does not.
-% So we set up a \sf.
-\newfam\sffam
-\def\sf{\fam=\sffam \setfontstyle{sf}}
-\let\li = \sf % Sometimes we call it \li, not \sf.
+ \special{pdf:docview << /PageMode /UseOutlines >> }
+ % ``\special{pdf:tounicode ...}'' is not necessary
+ % because xdvipdfmx converts strings from UTF-8 to UTF-16 without it.
+ % However, due to a UTF-16 conversion issue of xdvipdfmx 20150315,
+ % ``\special{pdf:dest ...}'' cannot handle non-ASCII strings.
+ % It is fixed by xdvipdfmx 20160106 (TeX Live SVN r39753).
+%
+ \def\skipspaces#1{\def\PP{#1}\def\D{|}%
+ \ifx\PP\D\let\nextsp\relax
+ \else\let\nextsp\skipspaces
+ \addtokens{\filename}{\PP}%
+ \advance\filenamelength by 1
+ \fi
+ \nextsp}
+ \def\getfilename#1{%
+ \filenamelength=0
+ % If we don't expand the argument now, \skipspaces will get
+ % snagged on things like "@value{foo}".
+ \edef\temp{#1}%
+ \expandafter\skipspaces\temp|\relax
+ }
+ % make a live url in pdf output.
+ \def\pdfurl#1{%
+ \begingroup
+ % it seems we really need yet another set of dummies; have not
+ % tried to figure out what each command should do in the context
+ % of @url. for now, just make @/ a no-op, that's the only one
+ % people have actually reported a problem with.
+ %
+ \normalturnoffactive
+ \def\@{@}%
+ \let\/=\empty
+ \makevalueexpandable
+ % do we want to go so far as to use \indexnofonts instead of just
+ % special-casing \var here?
+ \def\var##1{##1}%
+ %
+ \leavevmode\setcolor{\urlcolor}%
+ \special{pdf:bann << /Border [0 0 0]
+ /Subtype /Link /A << /S /URI /URI (#1) >> >>}%
+ \endgroup}
+ \def\endlink{\setcolor{\maincolor}\special{pdf:eann}}
+ \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
+ \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
+ \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
+ \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
+ \def\maketoks{%
+ \expandafter\poptoks\the\toksA|ENDTOKS|\relax
+ \ifx\first0\adn0
+ \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
+ \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
+ \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
+ \else
+ \ifnum0=\countA\else\makelink\fi
+ \ifx\first.\let\next=\done\else
+ \let\next=\maketoks
+ \addtokens{\toksB}{\the\toksD}
+ \ifx\first,\addtokens{\toksB}{\space}\fi
+ \fi
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \next}
+ \def\makelink{\addtokens{\toksB}%
+ {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
+ \def\pdflink#1{%
+ \special{pdf:bann << /Border [0 0 0]
+ /Type /Annot /Subtype /Link /A << /S /GoTo /D (#1) >> >>}%
+ \setcolor{\linkcolor}#1\endlink}
+ \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
+%
+ %
+ % @image support
+ %
+ % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
+ \def\doxeteximage#1#2#3{%
+ \def\xeteximagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
+ \def\xeteximageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
+ %
+ % XeTeX (and the PDF format) supports .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\xeteximgext=\empty
+ \begingroup
+ \openin 1 #1.pdf \ifeof 1
+ \openin 1 #1.PDF \ifeof 1
+ \openin 1 #1.png \ifeof 1
+ \openin 1 #1.jpg \ifeof 1
+ \openin 1 #1.jpeg \ifeof 1
+ \openin 1 #1.JPG \ifeof 1
+ \errmessage{Could not find image file #1 for XeTeX}%
+ \else \gdef\xeteximgext{JPG}%
+ \fi
+ \else \gdef\xeteximgext{jpeg}%
+ \fi
+ \else \gdef\xeteximgext{jpg}%
+ \fi
+ \else \gdef\xeteximgext{png}%
+ \fi
+ \else \gdef\xeteximgext{PDF}%
+ \fi
+ \else \gdef\xeteximgext{pdf}%
+ \fi
+ \closein 1
+ \endgroup
+ %
+ \def\xetexpdfext{pdf}%
+ \ifx\xeteximgext\xetexpdfext
+ \XeTeXpdffile "#1".\xeteximgext ""
+ \else
+ \def\xetexpdfext{PDF}%
+ \ifx\xeteximgext\xetexpdfext
+ \XeTeXpdffile "#1".\xeteximgext ""
+ \else
+ \XeTeXpicfile "#1".\xeteximgext ""
+ \fi
+ \fi
+ \ifdim \wd0 >0pt width \xeteximagewidth \fi
+ \ifdim \wd2 >0pt height \xeteximageheight \fi \relax
+ }
+\fi
-% We don't need math for this font style.
-\def\ttsl{\setfontstyle{ttsl}}
+%
+\message{fonts,}
% Set the baselineskip to #1, and the lineskip and strut size
% correspondingly. There is no deep meaning behind these magic numbers
% A few fonts for @defun names and args.
\setfont\defbf\bfshape{10}{\magstep1}{OT1}
\setfont\deftt\ttshape{10}{\magstep1}{OT1TT}
+\setfont\defsl\slshape{10}{\magstep1}{OT1TT}
\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT}
-\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
+\def\df{\let\ttfont=\deftt \let\bffont = \defbf
+\let\ttslfont=\defttsl \let\slfont=\defsl \bf}
% Fonts for indices, footnotes, small examples (9pt).
\def\smallnominalsize{9pt}
% Section fonts (14.4pt).
\def\secnominalsize{14pt}
\setfont\secrm\rmbshape{12}{\magstep1}{OT1}
+\setfont\secrmnotbold\rmshape{12}{\magstep1}{OT1}
\setfont\secit\itbshape{10}{\magstep2}{OT1IT}
\setfont\secsl\slbshape{10}{\magstep2}{OT1}
\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT}
\font\ssecsy=cmsy10 scaled 1315
\def\ssececsize{1200}
-% Reduced fonts for @acro in text (10pt).
+% Reduced fonts for @acronym in text (10pt).
\def\reducednominalsize{10pt}
\setfont\reducedrm\rmshape{10}{1000}{OT1}
\setfont\reducedtt\ttshape{10}{1000}{OT1TT}
% A few fonts for @defun names and args.
\setfont\defbf\bfshape{10}{\magstephalf}{OT1}
\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT}
+\setfont\defsl\slshape{10}{\magstephalf}{OT1TT}
\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT}
-\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
+\def\df{\let\ttfont=\deftt \let\bffont = \defbf
+\let\slfont=\defsl \let\ttslfont=\defttsl \bf}
% Fonts for indices, footnotes, small examples (9pt).
\def\smallnominalsize{9pt}
\font\ssecsy=cmsy10
\def\ssececsize{1000}
-% Reduced fonts for @acro in text (9pt).
+% Reduced fonts for @acronym in text (9pt).
\def\reducednominalsize{9pt}
\setfont\reducedrm\rmshape{9}{1000}{OT1}
\setfont\reducedtt\ttshape{9}{1000}{OT1TT}
\rm
} % end of 10pt text font size definitions, \definetextfontsizex
+% Fonts for short table of contents.
+\setfont\shortcontrm\rmshape{12}{1000}{OT1}
+\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12
+\setfont\shortcontsl\slshape{12}{1000}{OT1}
+\setfont\shortconttt\ttshape{12}{1000}{OT1TT}
+
% We provide the user-level command
% @fonttextsize 10
\endgroup
}
+%
+% Change the current font style to #1, remembering it in \curfontstyle.
+% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in
+% italics, not bold italics.
+%
+\def\setfontstyle#1{%
+ \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd.
+ \csname #1font\endcsname % change the current font
+}
+
+\def\rm{\fam=0 \setfontstyle{rm}}
+\def\it{\fam=\itfam \setfontstyle{it}}
+\def\sl{\fam=\slfam \setfontstyle{sl}}
+\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
+\def\tt{\fam=\ttfam \setfontstyle{tt}}
+
+% Texinfo sort of supports the sans serif font style, which plain TeX does not.
+% So we set up a \sf.
+\newfam\sffam
+\def\sf{\fam=\sffam \setfontstyle{sf}}
+
+% We don't need math for this font style.
+\def\ttsl{\setfontstyle{ttsl}}
+
% In order for the font changes to affect most math symbols and letters,
-% we have to define the \textfont of the standard families. Since
-% texinfo doesn't allow for producing subscripts and superscripts except
-% in the main text, we don't bother to reset \scriptfont and
-% \scriptscriptfont (which would also require loading a lot more fonts).
+% we have to define the \textfont of the standard families. We don't
+% bother to reset \scriptfont and \scriptscriptfont; awaiting user need.
%
\def\resetmathfonts{%
- \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy
- \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf
- \textfont\ttfam=\tentt \textfont\sffam=\tensf
+ \textfont0=\rmfont \textfont1=\ifont \textfont2=\syfont
+ \textfont\itfam=\itfont \textfont\slfam=\slfont \textfont\bffam=\bffont
+ \textfont\ttfam=\ttfont \textfont\sffam=\sffont
}
-% The font-changing commands redefine the meanings of \tenSTYLE, instead
-% of just \STYLE. We do this because \STYLE needs to also set the
-% current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire
-% \tenSTYLE to set the current font.
+%
+
+% The font-changing commands (all called \...fonts) redefine the meanings
+% of \STYLEfont, instead of just \STYLE. We do this because \STYLE needs
+% to also set the current \fam for math mode. Our \STYLE (e.g., \rm)
+% commands hardwire \STYLEfont to set the current font.
%
% Each font-changing command also sets the names \lsize (one size lower)
-% and \lllsize (three sizes lower). These relative commands are used in
-% the LaTeX logo and acronyms.
+% and \lllsize (three sizes lower). These relative commands are used
+% in, e.g., the LaTeX logo and acronyms.
%
% This all needs generalizing, badly.
%
-\def\textfonts{%
- \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
- \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
- \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy
- \let\tenttsl=\textttsl
- \def\curfontsize{text}%
- \def\lsize{reduced}\def\lllsize{smaller}%
- \resetmathfonts \setleading{\textleading}}
-\def\titlefonts{%
- \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl
- \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
- \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy
- \let\tenttsl=\titlettsl
- \def\curfontsize{title}%
- \def\lsize{chap}\def\lllsize{subsec}%
- \resetmathfonts \setleading{27pt}}
-\def\titlefont#1{{\titlefonts\rmisbold #1}}
-\def\chapfonts{%
- \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
- \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
- \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy
- \let\tenttsl=\chapttsl
- \def\curfontsize{chap}%
- \def\lsize{sec}\def\lllsize{text}%
- \resetmathfonts \setleading{19pt}}
-\def\secfonts{%
- \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl
- \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc
- \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy
- \let\tenttsl=\secttsl
- \def\curfontsize{sec}%
- \def\lsize{subsec}\def\lllsize{reduced}%
- \resetmathfonts \setleading{16pt}}
-\def\subsecfonts{%
- \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl
- \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc
- \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy
- \let\tenttsl=\ssecttsl
- \def\curfontsize{ssec}%
- \def\lsize{text}\def\lllsize{small}%
- \resetmathfonts \setleading{15pt}}
-\let\subsubsecfonts = \subsecfonts
-\def\reducedfonts{%
- \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl
- \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc
- \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy
- \let\tenttsl=\reducedttsl
- \def\curfontsize{reduced}%
- \def\lsize{small}\def\lllsize{smaller}%
- \resetmathfonts \setleading{10.5pt}}
-\def\smallfonts{%
- \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl
- \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc
- \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy
- \let\tenttsl=\smallttsl
- \def\curfontsize{small}%
- \def\lsize{smaller}\def\lllsize{smaller}%
- \resetmathfonts \setleading{10.5pt}}
-\def\smallerfonts{%
- \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl
- \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc
- \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy
- \let\tenttsl=\smallerttsl
- \def\curfontsize{smaller}%
- \def\lsize{smaller}\def\lllsize{smaller}%
- \resetmathfonts \setleading{9.5pt}}
-% Fonts for short table of contents.
-\setfont\shortcontrm\rmshape{12}{1000}{OT1}
-\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12
-\setfont\shortcontsl\slshape{12}{1000}{OT1}
-\setfont\shortconttt\ttshape{12}{1000}{OT1TT}
+\def\assignfonts#1{%
+ \expandafter\let\expandafter\rmfont\csname #1rm\endcsname
+ \expandafter\let\expandafter\itfont\csname #1it\endcsname
+ \expandafter\let\expandafter\slfont\csname #1sl\endcsname
+ \expandafter\let\expandafter\bffont\csname #1bf\endcsname
+ \expandafter\let\expandafter\ttfont\csname #1tt\endcsname
+ \expandafter\let\expandafter\smallcaps\csname #1sc\endcsname
+ \expandafter\let\expandafter\sffont \csname #1sf\endcsname
+ \expandafter\let\expandafter\ifont \csname #1i\endcsname
+ \expandafter\let\expandafter\syfont \csname #1sy\endcsname
+ \expandafter\let\expandafter\ttslfont\csname #1ttsl\endcsname
+}
+
+\newif\ifrmisbold
+
+% Select smaller font size with the current style. Used to change font size
+% in, e.g., the LaTeX logo and acronyms. If we are using bold fonts for
+% normal roman text, also use bold fonts for roman text in the smaller size.
+\def\switchtolllsize{%
+ \expandafter\assignfonts\expandafter{\lllsize}%
+ \ifrmisbold
+ \let\rmfont\bffont
+ \fi
+ \csname\curfontstyle\endcsname
+}%
+
+\def\switchtolsize{%
+ \expandafter\assignfonts\expandafter{\lsize}%
+ \ifrmisbold
+ \let\rmfont\bffont
+ \fi
+ \csname\curfontstyle\endcsname
+}%
+
+\def\definefontsetatsize#1#2#3#4#5{%
+\expandafter\def\csname #1fonts\endcsname{%
+ \def\curfontsize{#1}%
+ \def\lsize{#2}\def\lllsize{#3}%
+ \csname rmisbold#5\endcsname
+ \assignfonts{#1}%
+ \resetmathfonts
+ \setleading{#4}%
+}}
+
+\definefontsetatsize{text} {reduced}{smaller}{\textleading}{false}
+\definefontsetatsize{title} {chap} {subsec} {27pt} {true}
+\definefontsetatsize{chap} {sec} {text} {19pt} {true}
+\definefontsetatsize{sec} {subsec} {reduced}{17pt} {true}
+\definefontsetatsize{ssec} {text} {small} {15pt} {true}
+\definefontsetatsize{reduced}{small} {smaller}{10.5pt}{false}
+\definefontsetatsize{small} {smaller}{smaller}{10.5pt}{false}
+\definefontsetatsize{smaller}{smaller}{smaller}{9.5pt} {false}
+
+\def\titlefont#1{{\titlefonts\rm #1}}
+\let\subsecfonts = \ssecfonts
+\let\subsubsecfonts = \ssecfonts
% Define these just so they can be easily changed for other fonts.
\def\angleleft{$\langle$}
%
\catcode`@=11
\def\plainfrenchspacing{%
- \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m
- \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m
+ \sfcode`\.=\@m \sfcode`\?=\@m \sfcode`\!=\@m
+ \sfcode`\:=\@m \sfcode`\;=\@m \sfcode`\,=\@m
\def\endofsentencespacefactor{1000}% for @. and friends
}
\def\plainnonfrenchspacing{%
\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
-% itself. First (mandatory) arg is the url.
-% (This \urefnobreak definition isn't used now, leaving it for a while
-% for comparison.)
-\def\urefnobreak#1{\dourefnobreak #1,,,\finish}
-\def\dourefnobreak#1,#2,#3,#4\finish{\begingroup
- \unsepspaces
- \pdfurl{#1}%
- \setbox0 = \hbox{\ignorespaces #3}%
- \ifdim\wd0 > 0pt
- \unhbox0 % third arg given, show only that
- \else
- \setbox0 = \hbox{\ignorespaces #2}%
- \ifdim\wd0 > 0pt
- \ifpdf
- \unhbox0 % PDF: 2nd arg given, show only it
- \else
- \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
- \fi
- \else
- \code{#1}% only url given, so show it
- \fi
- \fi
- \endlink
-\endgroup}
+% @uref (abbreviation for `urlref') aka @url takes an optional
+% (comma-separated) second argument specifying the text to display and
+% an optional third arg as text to display instead of (rather than in
+% addition to) the url itself. First (mandatory) arg is the url.
-% This \urefbreak definition is the active one.
+% TeX-only option to allow changing PDF output to show only the second
+% arg (if given), and not the url (which is then just the link target).
+\newif\ifurefurlonlylink
+
+% The main macro is \urefbreak, which allows breaking at expected
+% places within the url. (There used to be another version, which
+% didn't support automatic breaking.)
\def\urefbreak{\begingroup \urefcatcodes \dourefbreak}
\let\uref=\urefbreak
+%
\def\dourefbreak#1{\urefbreakfinish #1,,,\finish}
\def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example
\unsepspaces
\ifdim\wd0 > 0pt
\unhbox0 % third arg given, show only that
\else
- \setbox0 = \hbox{\ignorespaces #2}%
+ \setbox0 = \hbox{\ignorespaces #2}% look for second arg
\ifdim\wd0 > 0pt
\ifpdf
- \unhbox0 % PDF: 2nd arg given, show only it
+ % For pdfTeX and LuaTeX
+ \ifurefurlonlylink
+ % PDF plus option to not display url, show just arg
+ \unhbox0
+ \else
+ % PDF, normally display both arg and url for consistency,
+ % visibility, if the pdf is eventually used to print, etc.
+ \unhbox0\ (\urefcode{#1})%
+ \fi
\else
- \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url
+ \ifx\XeTeXrevision\thisisundefined
+ \unhbox0\ (\urefcode{#1})% DVI, always show arg and url
+ \else
+ % For XeTeX
+ \ifurefurlonlylink
+ % PDF plus option to not display url, show just arg
+ \unhbox0
+ \else
+ % PDF, normally display both arg and url for consistency,
+ % visibility, if the pdf is eventually used to print, etc.
+ \unhbox0\ (\urefcode{#1})%
+ \fi
+ \fi
\fi
\else
\urefcode{#1}% only url given, so show it
% Allow line breaks around only a few characters (only).
\def\urefcatcodes{%
- \catcode\ampChar=\active \catcode\dotChar=\active
- \catcode\hashChar=\active \catcode\questChar=\active
- \catcode\slashChar=\active
+ \catcode`\&=\active \catcode`\.=\active
+ \catcode`\#=\active \catcode`\?=\active
+ \catcode`\/=\active
}
{
\urefcatcodes
% we put a little stretch before and after the breakable chars, to help
% line breaking of long url's. The unequal skips make look better in
% cmtt at least, especially for dots.
-\def\urefprestretch{\urefprebreak \hskip0pt plus.13em }
-\def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em }
+\def\urefprestretchamount{.13em}
+\def\urefpoststretchamount{.1em}
+\def\urefprestretch{\urefprebreak \hskip0pt plus\urefprestretchamount\relax}
+\def\urefpoststretch{\urefpostbreak \hskip0pt plus\urefprestretchamount\relax}
%
\def\urefcodeamp{\urefprestretch \&\urefpoststretch}
\def\urefcodedot{\urefprestretch .\urefpoststretch}
\endlink
\endgroup}
\else
- \let\email=\uref
+ \ifx\XeTeXrevision\thisisundefined
+ \let\email=\uref
+ \else
+ \def\email#1{\doemail#1,,\finish}
+ \def\doemail#1,#2,#3\finish{\begingroup
+ \unsepspaces
+ \pdfurl{mailto:#1}%
+ \setbox0 = \hbox{\ignorespaces #2}%
+ \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
+ \endlink
+ \endgroup}
+ \fi
\fi
% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
%
\def\dmn#1{\thinspace #1}
-% @l was never documented to mean ``switch to the Lisp font'',
-% and it is not used as such in any manual I can find. We need it for
-% Polish suppressed-l. --karl, 22sep96.
-%\def\l#1{{\li #1}\null}
-
% @acronym for "FBI", "NATO", and the like.
% We print this one point size smaller, since it's intended for
% all-uppercase.
%
\def\acronym#1{\doacronym #1,,\finish}
\def\doacronym#1,#2,#3\finish{%
- {\selectfonts\lsize #1}%
+ {\switchtolsize #1}%
\def\temp{#2}%
\ifx\temp\empty \else
\space ({\unsepspaces \ignorespaces \temp \unskip})%
\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
%
\def\math{%
- \tex
- \mathunderscore
- \let\\ = \mathbackslash
- \mathactive
- % make the texinfo accent commands work in math mode
- \let\"=\ddot
- \let\'=\acute
- \let\==\bar
- \let\^=\hat
- \let\`=\grave
- \let\u=\breve
- \let\v=\check
- \let\~=\tilde
- \let\dotaccent=\dot
- $\finishmath
+ \ifmmode\else % only go into math if not in math mode already
+ \tex
+ \mathunderscore
+ \let\\ = \mathbackslash
+ \mathactive
+ % make the texinfo accent commands work in math mode
+ \let\"=\ddot
+ \let\'=\acute
+ \let\==\bar
+ \let\^=\hat
+ \let\`=\grave
+ \let\u=\breve
+ \let\v=\check
+ \let\~=\tilde
+ \let\dotaccent=\dot
+ % have to provide another name for sup operator
+ \let\mathopsup=\sup
+ $\expandafter\finishmath\fi
}
\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex.
}
}
-% ctrl is no longer a Texinfo command, but leave this definition for fun.
-\def\ctrl #1{{\tt \rawbackslash \hat}#1}
+% for @sub and @sup, if in math mode, just do a normal sub/superscript.
+% If in text, use math to place as sub/superscript, but switch
+% into text mode, with smaller fonts. This is a different font than the
+% one used for real math sub/superscripts (8pt vs. 7pt), but let's not
+% fix it (significant additions to font machinery) until someone notices.
+%
+\def\sub{\ifmmode \expandafter\sb \else \expandafter\finishsub\fi}
+\def\finishsub#1{$\sb{\hbox{\switchtolllsize #1}}$}%
+%
+\def\sup{\ifmmode \expandafter\ptexsp \else \expandafter\finishsup\fi}
+\def\finishsup#1{$\ptexsp{\hbox{\switchtolllsize #1}}$}%
% @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}.
% Ignore unless FMTNAME == tex; then it is like @iftex and @tex,
\let\atchar=\@
% @{ @} @lbracechar{} @rbracechar{} all generate brace characters.
-% Unless we're in typewriter, use \ecfont because the CM text fonts do
-% not have braces, and we don't want to switch into math.
-\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}}
-\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}}
-\let\{=\mylbrace \let\lbracechar=\{
-\let\}=\myrbrace \let\rbracechar=\}
-\begingroup
- % Definitions to produce \{ and \} commands for indices,
- % and @{ and @} for the aux/toc files.
- \catcode`\{ = \other \catcode`\} = \other
- \catcode`\[ = 1 \catcode`\] = 2
- \catcode`\! = 0 \catcode`\\ = \other
- !gdef!lbracecmd[\{]%
- !gdef!rbracecmd[\}]%
- !gdef!lbraceatcmd[@{]%
- !gdef!rbraceatcmd[@}]%
-!endgroup
+\def\lbracechar{{\ifmonospace\char123\else\ensuremath\lbrace\fi}}
+\def\rbracechar{{\ifmonospace\char125\else\ensuremath\rbrace\fi}}
+\let\{=\lbracechar
+\let\}=\rbracechar
% @comma{} to avoid , parsing problems.
\let\comma = ,
% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
\def\questiondown{?`}
\def\exclamdown{!`}
-\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}}
-\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}}
+\def\ordf{\leavevmode\raise1ex\hbox{\switchtolllsize \underbar{a}}}
+\def\ordm{\leavevmode\raise1ex\hbox{\switchtolllsize \underbar{o}}}
% Dotless i and dotless j, used for accents.
\def\imacro{i}
{\setbox0=\hbox{T}%
\vbox to \ht0{\hbox{%
\ifx\textnominalsize\xwordpt
- % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX.
+ % for 10pt running text, lllsize (8pt) is too small for the A in LaTeX.
% Revert to plain's \scriptsize, which is 7pt.
\count255=\the\fam $\fam\count255 \scriptstyle A$%
\else
% For 11pt, we can use our lllsize.
- \selectfonts\lllsize A%
+ \switchtolllsize A%
\fi
}%
\vss
\TeX
}
-% Some math mode symbols.
-\def\bullet{$\ptexbullet$}
-\def\geq{\ifmmode \ge\else $\ge$\fi}
-\def\leq{\ifmmode \le\else $\le$\fi}
-\def\minus{\ifmmode -\else $-$\fi}
+% Some math mode symbols. Define \ensuremath to switch into math mode
+% unless we are already there. Expansion tricks may not be needed here,
+% but safer, and can't hurt.
+\def\ensuremath{\ifmmode \expandafter\asis \else\expandafter\ensuredmath \fi}
+\def\ensuredmath#1{$\relax#1$}
+%
+\def\bullet{\ensuremath\ptexbullet}
+\def\geq{\ensuremath\ge}
+\def\leq{\ensuremath\le}
+\def\minus{\ensuremath-}
% @dots{} outputs an ellipsis using the current font.
% We do .5em per period so that it has the same spacing in the cm
%
\newbox\errorbox
%
-{\tentt \global\dimen0 = 3em}% Width of the box.
+{\ttfont \global\dimen0 = 3em}% Width of the box.
\dimen2 = .55pt % Thickness of rules
% The text. (`r' is open on the right, `e' somewhat less so on the left.)
\setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt}
\def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E}
\def\eogonek{{\ecfont \char"A6}}\def\macrochare{e}
%
-% Use the ec* fonts (cm-super in outline format) for non-CM glyphs.
-\def\ecfont{%
+% Use the European Computer Modern fonts (cm-super in outline format)
+% for non-CM glyphs. That is ec* for regular text and tc* for the text
+% companion symbols (LaTeX TS1 encoding). Both are part of the ec
+% package and follow the same conventions.
+%
+\def\ecfont{\etcfont{e}}
+\def\tcfont{\etcfont{t}}
+%
+\def\etcfont#1{%
% We can't distinguish serif/sans and italic/slanted, but this
% is used for crude hacks anyway (like adding French and German
% quotes to documents typeset with CM, where we lose kerning), so
\edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
\ifmonospace
% typewriter:
- \font\thisecfont = ectt\ecsize \space at \nominalsize
+ \font\thisecfont = #1ctt\ecsize \space at \nominalsize
\else
\ifx\curfontstyle\bfstylename
% bold:
- \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize
+ \font\thisecfont = #1cb\ifusingit{i}{x}\ecsize \space at \nominalsize
\else
% regular:
- \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+ \font\thisecfont = #1c\ifusingit{ti}{rm}\ecsize \space at \nominalsize
\fi
\fi
\thisecfont
% Adapted from the plain.tex definition of \copyright.
%
\def\registeredsymbol{%
- $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}%
+ $^{{\ooalign{\hfil\raise.07ex\hbox{\switchtolllsize R}%
\hfil\crcr\Orb}}%
}$%
}
\newif\ifseenauthor
\newif\iffinishedtitlepage
-% Do an implicit @contents or @shortcontents after @end titlepage if the
-% user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage.
-%
-\newif\ifsetcontentsaftertitlepage
- \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue
-\newif\ifsetshortcontentsaftertitlepage
- \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue
+% @setcontentsaftertitlepage used to do an implicit @contents or
+% @shortcontents after @end titlepage, but it is now obsolete.
+\def\setcontentsaftertitlepage{%
+ \errmessage{@setcontentsaftertitlepage has been removed as a Texinfo
+ command; move your @contents command if you want the contents
+ after the title page.}}%
+\def\setshortcontentsaftertitlepage{%
+ \errmessage{@setshortcontentsaftertitlepage has been removed as a Texinfo
+ command; move your @shortcontents and @contents commands if you
+ want the contents after the title page.}}%
\parseargdef\shorttitlepage{%
\begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}%
% Need this before the \...aftertitlepage checks so that if they are
% in effect the toc pages will come out with page numbers.
\HEADINGSon
- %
- % If they want short, they certainly want long too.
- \ifsetshortcontentsaftertitlepage
- \shortcontents
- \contents
- \global\let\shortcontents = \relax
- \global\let\contents = \relax
- \fi
- %
- \ifsetcontentsaftertitlepage
- \contents
- \global\let\contents = \relax
- \global\let\shortcontents = \relax
- \fi
}
\def\finishtitlepage{%
% 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.
+% inside a \vbox, and fonts need to be set appropriately first. \par should
+% be specified before the end of the \vbox, since a vbox is a group.
%
\def\raggedtitlesettings{%
- \rmisbold
+ \rm
\hyphenpenalty=10000
\parindent=0pt
\tolerance=5000
% Macros to be used within @titlepage:
-\let\subtitlerm=\tenrm
+\let\subtitlerm=\rmfont
\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
\parseargdef\title{%
\else
\checkenv\titlepage
\ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
- {\secfonts\rmisbold \leftline{#1}}%
+ {\secfonts\rm \leftline{#1}}%
\fi
}
\newtoks\evenfootline % footline on even pages
\newtoks\oddfootline % footline on odd pages
-% Now make TeX use those variables
+% Now make \makeheadline and \makefootline in Plain TeX use those variables
\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline
\else \the\evenheadline \fi}}
\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline
%
% Leave some space for the footline. Hopefully ok to assume
% @evenfooting will not be used by itself.
- \global\advance\pageheight by -12pt
+ \global\advance\txipageheight by -12pt
\global\advance\vsize by -12pt
}
% @everyheadingmarks
% @everyfootingmarks
+% These define \getoddheadingmarks, \getevenheadingmarks,
+% \getoddfootingmarks, and \getevenfootingmarks, each to one of
+% \gettopheadingmarks, \getbottomheadingmarks.
+%
\def\evenheadingmarks{\headingmarks{even}{heading}}
\def\oddheadingmarks{\headingmarks{odd}{heading}}
\def\evenfootingmarks{\headingmarks{even}{footing}}
\def\oddfootingmarks{\headingmarks{odd}{footing}}
-\def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1}
+\parseargdef\everyheadingmarks{\headingmarks{even}{heading}{#1}
\headingmarks{odd}{heading}{#1} }
-\def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1}
+\parseargdef\everyfootingmarks{\headingmarks{even}{footing}{#1}
\headingmarks{odd}{footing}{#1} }
% #1 = even/odd, #2 = heading/footing, #3 = top/bottom.
\def\headingmarks#1#2#3 {%
% By default, they are off at the start of a document,
% and turned `on' after @end titlepage.
-\def\headings #1 {\csname HEADINGS#1\endcsname}
+\parseargdef\headings{\csname HEADINGS#1\endcsname}
\def\headingsoff{% non-global headings elimination
\evenheadline={\hfil}\evenfootline={\hfil}%
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\folio\hfil\thistitle}}
-\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\oddheadline={\line{\thischapterheading\hfil\folio}}
\global\let\contentsalignmacro = \chapoddpage
}
\let\contentsalignmacro = \chappager
\global\pageno=1
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
-\global\evenheadline={\line{\thischapter\hfil\folio}}
-\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\evenheadline={\line{\thischapterheading\hfil\folio}}
+\global\oddheadline={\line{\thischapterheading\hfil\folio}}
\global\let\contentsalignmacro = \chappager
}
\def\HEADINGSon{\HEADINGSdouble}
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\folio\hfil\thistitle}}
-\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\oddheadline={\line{\thischapterheading\hfil\folio}}
\global\let\contentsalignmacro = \chapoddpage
}
\def\HEADINGSsinglex{%
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
-\global\evenheadline={\line{\thischapter\hfil\folio}}
-\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\evenheadline={\line{\thischapterheading\hfil\folio}}
+\global\oddheadline={\line{\thischapterheading\hfil\folio}}
\global\let\contentsalignmacro = \chappager
}
\parskip=\smallskipamount
\ifdim\parskip=0pt \parskip=2pt \fi
%
- % Try typesetting the item mark that if the document erroneously says
+ % Try typesetting the item mark so that if the document erroneously says
% something like @itemize @samp (intending @table), there's an error
% right away at the @itemize. It's not the best error message in the
% world, but it's better than leaving it to the @item. This means if
\noindent
\hbox to 0pt{\hss \itemcontents \kern\itemmargin}%
%
- \vadjust{\penalty 1200}}% not good to break after first line of item.
+ \ifinner\else
+ \vadjust{\penalty 1200}% not good to break after first line of item.
+ \fi
+ % We can be in inner vertical mode in a footnote, although an
+ % @itemize looks awful there.
+ }%
\flushcr
}
}
% multitable-only commands.
-%
-% @headitem starts a heading row, which we typeset in bold.
-% Assignments have to be global since we are inside the implicit group
-% of an alignment entry. \everycr resets \everytab so we don't have to
+%
+% @headitem starts a heading row, which we typeset in bold. Assignments
+% have to be global since we are inside the implicit group of an
+% alignment entry. \everycr below resets \everytab so we don't have to
% undo it ourselves.
\def\headitemfont{\b}% for people to use in the template row; not changeable
\def\headitem{%
\checkenv\multitable
\crcr
+ \gdef\headitemcrhook{\nobreak}% attempt to avoid page break after headings
\global\everytab={\bf}% can't use \headitemfont since the parsing differs
\the\everytab % for the first item
}%
%
+% default for tables with no headings.
+\let\headitemcrhook=\relax
+%
% A \tab used to include \hskip1sp. But then the space in a template
% line is not enough. That is bad. So let's go back to just `&' until
% we again encounter the problem the 1sp was intended to solve.
%
\everycr = {%
\noalign{%
- \global\everytab={}%
+ \global\everytab={}% Reset from possible headitem.
\global\colcount=0 % Reset the column counter.
- % Check for saved footnotes, etc.
+ %
+ % Check for saved footnotes, etc.:
\checkinserts
- % Keeps underfull box messages off when table breaks over pages.
- %\filbreak
- % Maybe so, but it also creates really weird page breaks when the
- % table breaks over pages. Wouldn't \vfil be better? Wait until the
- % problem manifests itself, so it can be fixed for real --karl.
+ %
+ % Perhaps a \nobreak, then reset:
+ \headitemcrhook
+ \global\let\headitemcrhook=\relax
}%
}%
%
\fi
}
+% Like \expandablevalue, but completely expandable (the \message in the
+% definition above operates at the execution level of TeX). Used when
+% writing to auxiliary files, due to the expansion that \write does.
+% If flag is undefined, pass through an unexpanded @value command: maybe it
+% will be set by the time it is read back in.
+%
+% NB flag names containing - or _ may not work here.
+\def\dummyvalue#1{%
+ \expandafter\ifx\csname SET#1\endcsname\relax
+ \noexpand\value{#1}%
+ \else
+ \csname SET#1\endcsname
+ \fi
+}
+
+% Used for @value's in index entries to form the sort key: expand the @value
+% if possible, otherwise sort late.
+\def\indexnofontsvalue#1{%
+ \expandafter\ifx\csname SET#1\endcsname\relax
+ ZZZZZZZ
+ \else
+ \csname SET#1\endcsname
+ \fi
+}
+
% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
% with @set.
%
% except not \outer, so it can be used within macros and \if's.
\edef\newwrite{\makecsname{ptexnewwrite}}
-% \newindex {foo} defines an index named foo.
-% It automatically defines \fooindex such that
-% \fooindex ...rest of line... puts an entry in the index foo.
-% It also defines \fooindfile to be the number of the output channel for
-% the file that accumulates this index. The file's extension is foo.
+% \newindex {foo} defines an index named IX.
+% It automatically defines \IXindex such that
+% \IXindex ...rest of line... puts an entry in the index IX.
+% It also defines \IXindfile to be the number of the output channel for
+% the file that accumulates this index. The file's extension is IX.
% The name of an index should be no more than 2 characters long
% for the sake of vms.
%
\def\newindex#1{%
- \iflinks
- \expandafter\newwrite \csname#1indfile\endcsname
- \openout \csname#1indfile\endcsname \jobname.#1 % Open the file
- \fi
+ \expandafter\chardef\csname#1indfile\endcsname=0
\expandafter\xdef\csname#1index\endcsname{% % Define @#1index
\noexpand\doindex{#1}}
}
\def\defcodeindex{\parsearg\newcodeindex}
%
\def\newcodeindex#1{%
- \iflinks
- \expandafter\newwrite \csname#1indfile\endcsname
- \openout \csname#1indfile\endcsname \jobname.#1
- \fi
+ \expandafter\chardef\csname#1indfile\endcsname=0
\expandafter\xdef\csname#1index\endcsname{%
\noexpand\docodeindex{#1}}%
}
+% The default indices:
+\newindex{cp}% concepts,
+\newcodeindex{fn}% functions,
+\newcodeindex{vr}% variables,
+\newcodeindex{tp}% types,
+\newcodeindex{ky}% keys
+\newcodeindex{pg}% and programs.
+
% @synindex foo bar makes index foo feed into index bar.
% Do this instead of @defindex foo if you don't want it as a separate index.
% #1 is \doindex or \docodeindex, #2 the index getting redefined (foo),
% #3 the target index (bar).
\def\dosynindex#1#2#3{%
- % Only do \closeout if we haven't already done it, else we'll end up
- % closing the target index.
- \expandafter \ifx\csname donesynindex#2\endcsname \relax
- % The \closeout helps reduce unnecessary open files; the limit on the
- % Acorn RISC OS is a mere 16 files.
- \expandafter\closeout\csname#2indfile\endcsname
- \expandafter\let\csname donesynindex#2\endcsname = 1
- \fi
+ \requireopenindexfile{#3}%
% redefine \fooindfile:
\expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname
\expandafter\let\csname#2indfile\endcsname=\temp
\expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}%
}
-% Define \doindex, the driver for all \fooindex macros.
+% Define \doindex, the driver for all index macros.
% Argument #1 is generated by the calling \fooindex macro,
-% and it is "foo", the name of the index.
-
-% \doindex just uses \parsearg; it calls \doind for the actual work.
-% This is because \doind is more useful to call from other macros.
-
-% There is also \dosubind {index}{topic}{subtopic}
-% which makes an entry in a two-level index such as the operation index.
+% and it is the two-letter name of the index.
-\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer}
-\def\singleindexer #1{\doind{\indexname}{#1}}
+\def\doindex#1{\edef\indexname{#1}\parsearg\doindexxxx}
+\def\doindexxxx #1{\doind{\indexname}{#1}}
% like the previous two, but they put @code around the argument.
-\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
-\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
+\def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx}
+\def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}}
-% Take care of Texinfo commands that can appear in an index entry.
-% Since there are some commands we want to expand, and others we don't,
-% we have to laboriously prevent expansion for those that we don't.
+\f
+% Used when writing an index entry out to an index file to prevent
+% expansion of Texinfo commands that can appear in an index entry.
%
\def\indexdummies{%
\escapechar = `\\ % use backslash in output files.
- \def\@{@}% change to @@ when we switch to @ as escape char in index files.
- \def\ {\realbackslash\space }%
- %
- % Need these unexpandable (because we define \tt as a dummy)
- % definitions when @{ or @} appear in index entry text. Also, more
- % complicated, when \tex is in effect and \{ is a \delimiter again.
- % We can't use \lbracecmd and \rbracecmd because texindex assumes
- % braces and backslashes are used only as delimiters. Perhaps we
- % should define @lbrace and @rbrace commands a la @comma.
- \def\{{{\tt\char123}}%
- \def\}{{\tt\char125}}%
- %
- % I don't entirely understand this, but when an index entry is
- % generated from a macro call, the \endinput which \scanmacro inserts
- % causes processing to be prematurely terminated. This is,
- % apparently, because \indexsorttmp is fully expanded, and \endinput
- % is an expandable command. The redefinition below makes \endinput
- % disappear altogether for that purpose -- although logging shows that
- % processing continues to some further point. On the other hand, it
- % seems \endinput does not hurt in the printed index arg, since that
- % is still getting written without apparent harm.
- %
- % Sample source (mac-idx3.tex, reported by Graham Percival to
- % help-texinfo, 22may06):
- % @macro funindex {WORD}
- % @findex xyz
- % @end macro
- % ...
- % @funindex commtest
- %
- % The above is not enough to reproduce the bug, but it gives the flavor.
- %
- % Sample whatsit resulting:
- % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}}
- %
- % So:
- \let\endinput = \empty
+ \definedummyletter\@%
+ \definedummyletter\ %
+ %
+ % For texindex which always views { and } as separators.
+ \def\{{\lbracechar{}}%
+ \def\}{\rbracechar{}}%
%
% Do the redefinitions.
- \commondummies
+ \definedummies
}
-% For the aux and toc files, @ is the escape character. So we want to
-% redefine everything using @ as the escape character (instead of
-% \realbackslash, still used for index files). When everything uses @,
-% this will be simpler.
+% Used for the aux and toc files, where @ is the escape character.
%
\def\atdummies{%
- \def\@{@@}%
- \def\ {@ }%
- \let\{ = \lbraceatcmd
- \let\} = \rbraceatcmd
+ \definedummyletter\@%
+ \definedummyletter\ %
+ \definedummyletter\{%
+ \definedummyletter\}%
%
% Do the redefinitions.
- \commondummies
+ \definedummies
\otherbackslash
}
-% Called from \indexdummies and \atdummies.
+% \definedummyword defines \#1 as \string\#1\space, thus effectively
+% preventing its expansion. This is used only for control words,
+% not control letters, because the \space would be incorrect for
+% control characters, but is needed to separate the control word
+% from whatever follows.
%
-\def\commondummies{%
- %
- % \definedummyword defines \#1 as \string\#1\space, thus effectively
- % preventing its expansion. This is used only for control words,
- % not control letters, because the \space would be incorrect for
- % control characters, but is needed to separate the control word
- % from whatever follows.
- %
- % For control letters, we have \definedummyletter, which omits the
- % space.
- %
- % These can be used both for control words that take an argument and
- % those that do not. If it is followed by {arg} in the input, then
- % that will dutifully get written to the index (or wherever).
- %
- \def\definedummyword ##1{\def##1{\string##1\space}}%
- \def\definedummyletter##1{\def##1{\string##1}}%
- \let\definedummyaccent\definedummyletter
+% These can be used both for control words that take an argument and
+% those that do not. If it is followed by {arg} in the input, then
+% that will dutifully get written to the index (or wherever).
+%
+% For control letters, we have \definedummyletter, which omits the
+% space.
+%
+\def\definedummyword #1{\def#1{\string#1\space}}%
+\def\definedummyletter#1{\def#1{\string#1}}%
+\let\definedummyaccent\definedummyletter
+
+% Called from \indexdummies and \atdummies, to effectively prevent
+% the expansion of commands.
+%
+\def\definedummies{%
%
+ \let\commondummyword\definedummyword
+ \let\commondummyletter\definedummyletter
+ \let\commondummyaccent\definedummyaccent
\commondummiesnofonts
%
\definedummyletter\_%
\definedummyword\TeX
%
% Assorted special characters.
+ \definedummyword\atchar
\definedummyword\arrow
\definedummyword\bullet
\definedummyword\comma
\definedummyword\guilsinglright
\definedummyword\lbracechar
\definedummyword\leq
+ \definedummyword\mathopsup
\definedummyword\minus
\definedummyword\ogonek
\definedummyword\pounds
\definedummyword\quotesinglbase
\definedummyword\rbracechar
\definedummyword\result
+ \definedummyword\sub
+ \definedummyword\sup
\definedummyword\textdegree
%
% We want to disable all macros so that they are not expanded by \write.
\macrolist
+ \let\value\dummyvalue
%
\normalturnoffactive
- %
- % Handle some cases of @value -- where it does not contain any
- % (non-fully-expandable) commands.
- \makevalueexpandable
}
-% \commondummiesnofonts: common to \commondummies and \indexnofonts.
+% \commondummiesnofonts: common to \definedummies and \indexnofonts.
+% Define \commondummyletter, \commondummyaccent and \commondummyword before
+% using. Used for accents, font commands, and various control letters.
%
\def\commondummiesnofonts{%
% Control letters and accents.
- \definedummyletter\!%
- \definedummyaccent\"%
- \definedummyaccent\'%
- \definedummyletter\*%
- \definedummyaccent\,%
- \definedummyletter\.%
- \definedummyletter\/%
- \definedummyletter\:%
- \definedummyaccent\=%
- \definedummyletter\?%
- \definedummyaccent\^%
- \definedummyaccent\`%
- \definedummyaccent\~%
- \definedummyword\u
- \definedummyword\v
- \definedummyword\H
- \definedummyword\dotaccent
- \definedummyword\ogonek
- \definedummyword\ringaccent
- \definedummyword\tieaccent
- \definedummyword\ubaraccent
- \definedummyword\udotaccent
- \definedummyword\dotless
+ \commondummyletter\!%
+ \commondummyaccent\"%
+ \commondummyaccent\'%
+ \commondummyletter\*%
+ \commondummyaccent\,%
+ \commondummyletter\.%
+ \commondummyletter\/%
+ \commondummyletter\:%
+ \commondummyaccent\=%
+ \commondummyletter\?%
+ \commondummyaccent\^%
+ \commondummyaccent\`%
+ \commondummyaccent\~%
+ \commondummyword\u
+ \commondummyword\v
+ \commondummyword\H
+ \commondummyword\dotaccent
+ \commondummyword\ogonek
+ \commondummyword\ringaccent
+ \commondummyword\tieaccent
+ \commondummyword\ubaraccent
+ \commondummyword\udotaccent
+ \commondummyword\dotless
%
% Texinfo font commands.
- \definedummyword\b
- \definedummyword\i
- \definedummyword\r
- \definedummyword\sansserif
- \definedummyword\sc
- \definedummyword\slanted
- \definedummyword\t
+ \commondummyword\b
+ \commondummyword\i
+ \commondummyword\r
+ \commondummyword\sansserif
+ \commondummyword\sc
+ \commondummyword\slanted
+ \commondummyword\t
%
% Commands that take arguments.
- \definedummyword\abbr
- \definedummyword\acronym
- \definedummyword\anchor
- \definedummyword\cite
- \definedummyword\code
- \definedummyword\command
- \definedummyword\dfn
- \definedummyword\dmn
- \definedummyword\email
- \definedummyword\emph
- \definedummyword\env
- \definedummyword\file
- \definedummyword\image
- \definedummyword\indicateurl
- \definedummyword\inforef
- \definedummyword\kbd
- \definedummyword\key
- \definedummyword\math
- \definedummyword\option
- \definedummyword\pxref
- \definedummyword\ref
- \definedummyword\samp
- \definedummyword\strong
- \definedummyword\tie
- \definedummyword\uref
- \definedummyword\url
- \definedummyword\var
- \definedummyword\verb
- \definedummyword\w
- \definedummyword\xref
+ \commondummyword\abbr
+ \commondummyword\acronym
+ \commondummyword\anchor
+ \commondummyword\cite
+ \commondummyword\code
+ \commondummyword\command
+ \commondummyword\dfn
+ \commondummyword\dmn
+ \commondummyword\email
+ \commondummyword\emph
+ \commondummyword\env
+ \commondummyword\file
+ \commondummyword\image
+ \commondummyword\indicateurl
+ \commondummyword\inforef
+ \commondummyword\kbd
+ \commondummyword\key
+ \commondummyword\math
+ \commondummyword\option
+ \commondummyword\pxref
+ \commondummyword\ref
+ \commondummyword\samp
+ \commondummyword\strong
+ \commondummyword\tie
+ \commondummyword\U
+ \commondummyword\uref
+ \commondummyword\url
+ \commondummyword\var
+ \commondummyword\verb
+ \commondummyword\w
+ \commondummyword\xref
+}
+
+% For testing: output @{ and @} in index sort strings as \{ and \}.
+\newif\ifusebracesinindexes
+
+\let\indexlbrace\relax
+\let\indexrbrace\relax
+
+{\catcode`\@=0
+\catcode`\\=13
+ @gdef@backslashdisappear{@def\{}}
+}
+
+{
+\catcode`\<=13
+\catcode`\-=13
+\catcode`\`=13
+ \gdef\indexnonalnumdisappear{%
+ \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax\else
+ % @set txiindexlquoteignore makes us ignore left quotes in the sort term.
+ % (Introduced for FSFS 2nd ed.)
+ \let`=\empty
+ \fi
+ %
+ \expandafter\ifx\csname SETtxiindexbackslashignore\endcsname\relax\else
+ \backslashdisappear
+ \fi
+ %
+ \expandafter\ifx\csname SETtxiindexhyphenignore\endcsname\relax\else
+ \def-{}%
+ \fi
+ \expandafter\ifx\csname SETtxiindexlessthanignore\endcsname\relax\else
+ \def<{}%
+ \fi
+ \expandafter\ifx\csname SETtxiindexatsignignore\endcsname\relax\else
+ \def\@{}%
+ \fi
+ }
+
+ \gdef\indexnonalnumreappear{%
+ \useindexbackslash
+ \let-\normaldash
+ \let<\normalless
+ \def\@{@}%
+ }
}
+
% \indexnofonts is used when outputting the strings to sort the index
% by, and when constructing control sequence names. It eliminates all
% control sequences and just writes whatever the best ASCII sort string
%
\def\indexnofonts{%
% Accent commands should become @asis.
- \def\definedummyaccent##1{\let##1\asis}%
+ \def\commondummyaccent##1{\let##1\asis}%
% We can just ignore other control letters.
- \def\definedummyletter##1{\let##1\empty}%
+ \def\commondummyletter##1{\let##1\empty}%
% All control words become @asis by default; overrides below.
- \let\definedummyword\definedummyaccent
- %
+ \let\commondummyword\commondummyaccent
\commondummiesnofonts
%
% Don't no-op \tt, since it isn't a user-level command
\def\_{\normalunderscore}%
\def\-{}% @- shouldn't affect sorting
%
- % Unfortunately, texindex is not prepared to handle braces in the
- % content at all. So for index sorting, we map @{ and @} to strings
- % starting with |, since that ASCII character is between ASCII { and }.
- \def\{{|a}%
- \def\lbracechar{|a}%
- %
- \def\}{|b}%
- \def\rbracechar{|b}%
+ \uccode`\1=`\{ \uppercase{\def\{{1}}%
+ \uccode`\1=`\} \uppercase{\def\}{1}}%
+ \let\lbracechar\{%
+ \let\rbracechar\}%
%
% Non-English letters.
\def\AA{AA}%
\def\L{L}%
\def\OE{OE}%
\def\O{O}%
- \def\TH{ZZZ}%
+ \def\TH{TH}%
\def\aa{aa}%
\def\ae{ae}%
\def\dh{dzz}%
\def\o{o}%
\def\questiondown{?}%
\def\ss{ss}%
- \def\th{zzz}%
+ \def\th{th}%
%
\def\LaTeX{LaTeX}%
\def\TeX{TeX}%
%
- % Assorted special characters.
- % (The following {} will end up in the sort string, but that's ok.)
- \def\arrow{->}%
- \def\bullet{bullet}%
- \def\comma{,}%
- \def\copyright{copyright}%
- \def\dots{...}%
- \def\enddots{...}%
- \def\equiv{==}%
- \def\error{error}%
- \def\euro{euro}%
- \def\expansion{==>}%
- \def\geq{>=}%
- \def\guillemetleft{<<}%
- \def\guillemetright{>>}%
- \def\guilsinglleft{<}%
- \def\guilsinglright{>}%
- \def\leq{<=}%
- \def\minus{-}%
- \def\point{.}%
- \def\pounds{pounds}%
- \def\print{-|}%
- \def\quotedblbase{"}%
- \def\quotedblleft{"}%
- \def\quotedblright{"}%
- \def\quoteleft{`}%
- \def\quoteright{'}%
- \def\quotesinglbase{,}%
- \def\registeredsymbol{R}%
- \def\result{=>}%
- \def\textdegree{o}%
- %
- \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax
- \else \indexlquoteignore \fi
+ % Assorted special characters. \defglyph gives the control sequence a
+ % definition that removes the {} that follows its use.
+ \defglyph\atchar{@}%
+ \defglyph\arrow{->}%
+ \defglyph\bullet{bullet}%
+ \defglyph\comma{,}%
+ \defglyph\copyright{copyright}%
+ \defglyph\dots{...}%
+ \defglyph\enddots{...}%
+ \defglyph\equiv{==}%
+ \defglyph\error{error}%
+ \defglyph\euro{euro}%
+ \defglyph\expansion{==>}%
+ \defglyph\geq{>=}%
+ \defglyph\guillemetleft{<<}%
+ \defglyph\guillemetright{>>}%
+ \defglyph\guilsinglleft{<}%
+ \defglyph\guilsinglright{>}%
+ \defglyph\leq{<=}%
+ \defglyph\lbracechar{\{}%
+ \defglyph\minus{-}%
+ \defglyph\point{.}%
+ \defglyph\pounds{pounds}%
+ \defglyph\print{-|}%
+ \defglyph\quotedblbase{"}%
+ \defglyph\quotedblleft{"}%
+ \defglyph\quotedblright{"}%
+ \defglyph\quoteleft{`}%
+ \defglyph\quoteright{'}%
+ \defglyph\quotesinglbase{,}%
+ \defglyph\rbracechar{\}}%
+ \defglyph\registeredsymbol{R}%
+ \defglyph\result{=>}%
+ \defglyph\textdegree{o}%
%
% We need to get rid of all macros, leaving only the arguments (if present).
% Of course this is not nearly correct, but it is the best we can do for now.
% goes to end-of-line is not handled.
%
\macrolist
+ \let\value\indexnofontsvalue
}
+\def\defglyph#1#2{\def#1##1{#2}} % see above
+
+\f
-% Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us
-% ignore left quotes in the sort term.
-{\catcode`\`=\active
- \gdef\indexlquoteignore{\let`=\empty}}
-\let\indexbackslash=0 %overridden during \printindex.
\let\SETmarginindex=\relax % put index entries in margin (undocumented)?
% Most index entries go through here, but \dosubind is the general case.
% #1 is the index name, #2 is the entry text.
\def\doind#1#2{\dosubind{#1}{#2}{}}
-% Workhorse for all \fooindexes.
+% There is also \dosubind {index}{topic}{subtopic}
+% which makes an entry in a two-level index such as the operation index.
+% TODO: Two-level index? Operation index?
+
+% Workhorse for all indexes.
% #1 is name of index, #2 is stuff to put there, #3 is subentry --
% empty if called from \doind, as we usually are (the main exception
% is with most defuns, which call us directly).
\def\dosubind#1#2#3{%
\iflinks
{%
+ \requireopenindexfile{#1}%
% Store the main index entry text (including the third arg).
\toks0 = {#2}%
% If third arg is present, precede it with a space.
\fi
}
-% Write the entry in \toks0 to the index file:
+% Check if an index file has been opened, and if not, open it.
+\def\requireopenindexfile#1{%
+\ifnum\csname #1indfile\endcsname=0
+ \expandafter\newwrite \csname#1indfile\endcsname
+ \edef\suffix{#1}%
+ % A .fls suffix would conflict with the file extension for the output
+ % of -recorder, so use .f1s instead.
+ \ifx\suffix\indexisfl\def\suffix{f1}\fi
+ % Open the file
+ \immediate\openout\csname#1indfile\endcsname \jobname.\suffix
+ % Using \immediate above here prevents an object entering into the current
+ % box, which could confound checks such as those in \safewhatsit for
+ % preceding skips.
+ \typeout{Writing index file \jobname.\suffix}%
+\fi}
+\def\indexisfl{fl}
+
+% Output \ as {\indexbackslash}, because \ is an escape character in
+% the index files.
+\let\indexbackslash=\relax
+{\catcode`\@=0 \catcode`\\=\active
+ @gdef@useindexbackslash{@def\{{@indexbackslash}}}
+}
+
+% Definition for writing index entry text.
+\def\sortas#1{\ignorespaces}%
+
+% Definition for writing index entry sort key. Should occur at the at
+% the beginning of the index entry, like
+% @cindex @sortas{september} \september
+% The \ignorespaces takes care of following space, but there's no way
+% to remove space before it.
+{
+\catcode`\-=13
+\gdef\indexwritesortas{%
+ \begingroup
+ \indexnonalnumreappear
+ \indexwritesortasxxx}
+\gdef\indexwritesortasxxx#1{%
+ \xdef\indexsortkey{#1}\endgroup}
+}
+
+
+% Write the entry in \toks0 to the index file.
%
\def\dosubindwrite{%
% Put the index entry in the margin if desired.
%
% Remember, we are within a group.
\indexdummies % Must do this here, since \bf, etc expand at this stage
- \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now
- % so it will be output as is; and it will print as backslash.
+ \useindexbackslash % \indexbackslash isn't defined now so it will be output
+ % as is; and it will print as backslash.
+ % The braces around \indexbrace are recognized by texindex.
%
- % Process the index entry with all font commands turned off, to
- % get the string to sort by.
+ % Get the string to sort by, by processing the index entry with all
+ % font commands turned off.
{\indexnofonts
- \edef\temp{\the\toks0}% need full expansion
- \xdef\indexsorttmp{\temp}%
+ \def\lbracechar{{\indexlbrace}}%
+ \def\rbracechar{{\indexrbrace}}%
+ \let\{=\lbracechar
+ \let\}=\rbracechar
+ \indexnonalnumdisappear
+ \xdef\indexsortkey{}%
+ \let\sortas=\indexwritesortas
+ \edef\temp{\the\toks0}%
+ \setbox\dummybox = \hbox{\temp}% Make sure to execute any \sortas
+ \ifx\indexsortkey\empty
+ \xdef\indexsortkey{\temp}%
+ \ifx\indexsortkey\empty\xdef\indexsortkey{ }\fi
+ \fi
}%
%
% Set up the complete index entry, with both the sort key and
% sorted result.
\edef\temp{%
\write\writeto{%
- \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}%
+ \string\entry{\indexsortkey}{\noexpand\folio}{\the\toks0}}%
}%
\temp
}
+\newbox\dummybox % used above
% Take care of unwanted page breaks/skips around a whatsit:
%
% \initial {@}
% as its first line, TeX doesn't complain about mismatched braces
% (because it thinks @} is a control sequence).
- \catcode`\@ = 11
- \openin 1 \jobname.#1s
+ \catcode`\@ = 12
+ % See comment in \requireopenindexfile.
+ \def\indexname{#1}\ifx\indexname\indexisfl\def\indexname{f1}\fi
+ \openin 1 \jobname.\indexname s
\ifeof 1
% \enddoublecolumns gets confused if there is no text in the index,
% and it loses the chapter title and the aux file entries for the
% index. The easiest way to prevent this problem is to make sure
% there is some text.
\putwordIndexNonexistent
+ \typeout{No file \jobname.\indexname s.}%
\else
+ \catcode`\\ = 0
%
% If the index file exists but is empty, then \openin leaves \ifeof
% false. We have to make TeX try to read something from the file, so
% it can discover if there is anything in it.
- \read 1 to \temp
+ \read 1 to \thisline
\ifeof 1
\putwordIndexIsEmpty
\else
% Index files are almost Texinfo source, but we use \ as the escape
% character. It would be better to use @, but that's too big a change
% to make right now.
- \def\indexbackslash{\backslashcurfont}%
- \catcode`\\ = 0
- \escapechar = `\\
+ \def\indexbackslash{\ttbackslash}%
+ \let\indexlbrace\{ % Likewise, set these sequences for braces
+ \let\indexrbrace\} % used in the sort key.
\begindoublecolumns
- \input \jobname.#1s
+ \let\entrywidowpenalty=\indexwidowpenalty
+ %
+ % Read input from the index file line by line.
+ \loopdo
+ \ifeof1
+ \let\firsttoken\relax
+ \else
+ \read 1 to \nextline
+ \edef\act{\gdef\noexpand\firsttoken{\getfirsttoken\nextline}}%
+ \act
+ \fi
+ \thisline
+ %
+ \ifeof1\else
+ \let\thisline\nextline
+ \repeat
+ %%
\enddoublecolumns
\fi
\fi
\closein 1
\endgroup}
+\def\getfirsttoken#1{\expandafter\getfirsttokenx#1\endfirsttoken}
+\long\def\getfirsttokenx#1#2\endfirsttoken{\noexpand#1}
+
+\def\loopdo#1\repeat{\def\body{#1}\loopdoxxx}
+\def\loopdoxxx{\let\next=\relax\body\let\next=\loopdoxxx\fi\next}
+
% These macros are used by the sorted index file itself.
% Change them to control the appearance of the index.
-\def\initial#1{{%
- % Some minor font changes for the special characters.
- \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt
- %
+{\catcode`\/=13 \catcode`\-=13 \catcode`\^=13 \catcode`\~=13 \catcode`\_=13
+\catcode`\|=13 \catcode`\<=13 \catcode`\>=13 \catcode`\+=13 \catcode`\"=13
+\catcode`\$=3
+\gdef\initialglyphs{%
+ % Some changes for non-alphabetic characters. Using the glyphs from the
+ % math fonts looks more consistent than the typewriter font used elsewhere
+ % for these characters.
+ \def\indexbackslash{\math{\backslash}}%
+ \let\\=\indexbackslash
+ %
+ % Can't get bold backslash so don't use bold forward slash
+ \catcode`\/=13
+ \def/{{\secrmnotbold \normalslash}}%
+ \def-{{\normaldash\normaldash}}% en dash `--'
+ \def^{{\chapbf \normalcaret}}%
+ \def~{{\chapbf \normaltilde}}%
+ \def\_{%
+ \leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }%
+ \def|{$\vert$}%
+ \def<{$\less$}%
+ \def>{$\gtr$}%
+ \def+{$\normalplus$}%
+}}
+
+\def\initial{%
+ \bgroup
+ \initialglyphs
+ \initialx
+}
+
+\def\initialx#1{%
% Remove any glue we may have, we'll be inserting our own.
\removelastskip
%
% We like breaks before the index initials, so insert a bonus.
+ % The glue before the bonus allows a little bit of space at the
+ % bottom of a column to reduce an increase in inter-line spacing.
\nobreak
- \vskip 0pt plus 3\baselineskip
- \penalty 0
- \vskip 0pt plus -3\baselineskip
+ \vskip 0pt plus 5\baselineskip
+ \penalty -300
+ \vskip 0pt plus -5\baselineskip
%
% Typeset the initial. Making this add up to a whole number of
% baselineskips increases the chance of the dots lining up from column
% we need before each entry, but it's better.
%
% No shrink because it confuses \balancecolumns.
- \vskip 1.67\baselineskip plus .5\baselineskip
- \leftline{\secbf #1}%
+ \vskip 1.67\baselineskip plus 1\baselineskip
+ \leftline{\secfonts \kern-0.05em \secbf #1}%
+ % \secfonts is inside the argument of \leftline so that the change of
+ % \baselineskip will not affect any glue inserted before the vbox that
+ % \leftline creates.
% Do our best not to break after the initial.
\nobreak
\vskip .33\baselineskip plus .1\baselineskip
-}}
+ \egroup % \initialglyphs
+}
+
+\newdimen\entryrightmargin
+\entryrightmargin=0pt
% \entry typesets a paragraph consisting of the text (#1), dot leaders, and
% then page number (#2) flushed to the right margin. It is used for index
% and table of contents entries. The paragraph is indented by \leftskip.
%
-% A straightforward implementation would start like this:
-% \def\entry#1#2{...
-% But this freezes the catcodes in the argument, and can cause problems to
-% @code, which sets - active. This problem was fixed by a kludge---
-% ``-'' was active throughout whole index, but this isn't really right.
-% The right solution is to prevent \entry from swallowing the whole text.
-% --kasal, 21nov03
\def\entry{%
\begingroup
%
+ % For pdfTeX and XeTeX.
+ % The redefinition of \domark stops marks being added in \pdflink to
+ % preserve coloured links across page boundaries. Otherwise the marks
+ % would get in the way of \lastbox in \insertindexentrybox.
+ \let\domark\relax
+ %
% Start a new paragraph if necessary, so our assignments below can't
% affect previous text.
\par
%
- % Do not fill out the last line with white space.
- \parfillskip = 0in
- %
% No extra space above this paragraph.
\parskip = 0in
%
- % Do not prefer a separate line ending with a hyphen to fewer lines.
- \finalhyphendemerits = 0
- %
- % \hangindent is only relevant when the entry text and page number
- % don't both fit on one line. In that case, bob suggests starting the
- % dots pretty far over on the line. Unfortunately, a large
- % indentation looks wrong when the entry text itself is broken across
- % lines. So we use a small indentation and put up with long leaders.
- %
- % \hangafter is reset to 1 (which is the value we want) at the start
- % of each paragraph, so we need not do anything with that.
- \hangindent = 2em
- %
- % When the entry text needs to be broken, just fill out the first line
- % with blank space.
- \rightskip = 0pt plus1fil
- %
- % A bit of stretch before each entry for the benefit of balancing
- % columns.
- \vskip 0pt plus1pt
- %
% When reading the text of entry, convert explicit line breaks
% from @* into spaces. The user might give these in long section
% titles, for instance.
\def\*{\unskip\space\ignorespaces}%
- \def\entrybreak{\hfil\break}%
+ \def\entrybreak{\hfil\break}% An undocumented command
%
% Swallow the left brace of the text (first parameter):
\afterassignment\doentry
}
\def\entrybreak{\unskip\space\ignorespaces}%
\def\doentry{%
+ % Save the text of the entry
+ \global\setbox\boxA=\hbox\bgroup
\bgroup % Instead of the swallowed brace.
\noindent
\aftergroup\finishentry
% And now comes the text of the entry.
+ % Not absorbing as a macro argument reduces the chance of problems
+ % with catcodes occurring.
}
-\def\finishentry#1{%
+{\catcode`\@=11
+\gdef\finishentry#1{%
+ \egroup % end box A
+ \dimen@ = \wd\boxA % Length of text of entry
+ \global\setbox\boxA=\hbox\bgroup\unhbox\boxA
% #1 is the page number.
%
- % The following is kludged to not output a line of dots in the index if
- % there are no page numbers. The next person who breaks this will be
- % cursed by a Unix daemon.
- \setbox\boxA = \hbox{#1}%
- \ifdim\wd\boxA = 0pt
- \ %
+ % Get the width of the page numbers, and only use
+ % leaders if they are present.
+ \global\setbox\boxB = \hbox{#1}%
+ \ifdim\wd\boxB = 0pt
+ \null\nobreak\hfill\ %
\else
%
- % If we must, put the page number on a line of its own, and fill out
- % this line with blank space. (The \hfil is overwhelmed with the
- % fill leaders glue in \indexdotfill if the page number does fit.)
- \hfil\penalty50
\null\nobreak\indexdotfill % Have leaders before the page number.
%
- % The `\ ' here is removed by the implicit \unskip that TeX does as
- % part of (the primitive) \par. Without it, a spurious underfull
- % \hbox ensues.
\ifpdf
- \pdfgettoks#1.%
- \ \the\toksA
+ \pdfgettoks#1.%
+ \hskip\skip\thinshrinkable\the\toksA
\else
- \ #1%
+ \ifx\XeTeXrevision\thisisundefined
+ \hskip\skip\thinshrinkable #1%
+ \else
+ \pdfgettoks#1.%
+ \hskip\skip\thinshrinkable\the\toksA
+ \fi
\fi
\fi
- \par
+ \egroup % end \boxA
+ \ifdim\wd\boxB = 0pt
+ \global\setbox\entryindexbox=\vbox{\unhbox\boxA}%
+ \else
+ \global\setbox\entryindexbox=\vbox\bgroup
+ % We want the text of the entries to be aligned to the left, and the
+ % page numbers to be aligned to the right.
+ %
+ \parindent = 0pt
+ \advance\leftskip by 0pt plus 1fil
+ \advance\leftskip by 0pt plus -1fill
+ \rightskip = 0pt plus -1fil
+ \advance\rightskip by 0pt plus 1fill
+ % Cause last line, which could consist of page numbers on their own
+ % if the list of page numbers is long, to be aligned to the right.
+ \parfillskip=0pt plus -1fill
+ %
+ \advance\rightskip by \entryrightmargin
+ % Determine how far we can stretch into the margin.
+ % This allows, e.g., "Appendix H GNU Free Documentation License" to
+ % fit on one line in @letterpaper format.
+ \ifdim\entryrightmargin>2.1em
+ \dimen@i=2.1em
+ \else
+ \dimen@i=0em
+ \fi
+ \advance \parfillskip by 0pt minus 1\dimen@i
+ %
+ \dimen@ii = \hsize
+ \advance\dimen@ii by -1\leftskip
+ \advance\dimen@ii by -1\entryrightmargin
+ \advance\dimen@ii by 1\dimen@i
+ \ifdim\wd\boxA > \dimen@ii % If the entry doesn't fit in one line
+ \ifdim\dimen@ > 0.8\dimen@ii % due to long index text
+ \dimen@ = 0.7\dimen@ % Try to split the text roughly evenly
+ \dimen@ii = \hsize
+ \ifnum\dimen@>\dimen@ii
+ % If the entry is too long, use the whole line
+ \dimen@ = \dimen@ii
+ \fi
+ \advance\leftskip by 0pt plus 1fill % ragged right
+ \advance \dimen@ by 1\rightskip
+ \parshape = 2 0pt \dimen@ 0em \dimen@ii
+ % Ideally we'd add a finite glue at the end of the first line only,
+ % instead of using \parshape with explicit line lengths, but TeX
+ % doesn't seem to provide a way to do such a thing.
+ %
+ \leftskip = 1em
+ \parindent = -1em
+ \fi\fi
+ \indent % start paragraph
+ \unhbox\boxA
+ %
+ % Do not prefer a separate line ending with a hyphen to fewer lines.
+ \finalhyphendemerits = 0
+ %
+ % Word spacing - no stretch
+ \spaceskip=\fontdimen2\font minus \fontdimen4\font
+ %
+ \linepenalty=1000 % Discourage line breaks.
+ \hyphenpenalty=5000 % Discourage hyphenation.
+ %
+ \par % format the paragraph
+ \egroup % The \vbox
+ \fi
\endgroup
+ % delay text of entry until after penalty
+ \bgroup\aftergroup\insertindexentrybox
+ \entrywidowpenalty
+}}
+
+\newskip\thinshrinkable
+\skip\thinshrinkable=.15em minus .15em
+
+\newbox\entryindexbox
+\def\insertindexentrybox{%
+ \ourunvbox\entryindexbox
+}
+
+% Use \lastbox to take apart vbox box by box, and add each sub-box
+% to the current vertical list.
+\def\ourunvbox#1{%
+\bgroup % for local binding of \delayedbox
+ % Remove the last box from box #1
+ \global\setbox#1=\vbox{%
+ \unvbox#1%
+ \unskip % remove any glue
+ \unpenalty
+ \global\setbox\interbox=\lastbox
+ }%
+ \setbox\delayedbox=\box\interbox
+ \ifdim\ht#1=0pt\else
+ \ourunvbox#1 % Repeat on what's left of the box
+ \nobreak
+ \fi
+ \box\delayedbox
+\egroup
+}
+\newbox\delayedbox
+\newbox\interbox
+
+% Default is no penalty
+\let\entrywidowpenalty\egroup
+
+% Used from \printindex. \firsttoken should be the first token
+% after the \entry. If it's not another \entry, we are at the last
+% line of a group of index entries, so insert a penalty to discourage
+% widowed index entries.
+\long\def\indexwidowpenalty{%
+ \def\isentry{\entry}%
+ \ifx\firsttoken\isentry
+ \else
+ \penalty 9000
+ \fi
+ \egroup % now comes the box added with \aftergroup
}
% Like plain.tex's \dotfill, except uses up at least 1 em.
+% The filll stretch here overpowers both the fil and fill stretch to push
+% the page number to the right.
\def\indexdotfill{\cleaders
- \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill}
+ \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1filll}
+
\def\primary #1{\line{#1\hfil}}
\ifpdf
\pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
\else
- #2
+ \ifx\XeTeXrevision\thisisundefined
+ #2
+ \else
+ \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
+ \fi
\fi
\par
}}
% Define two-column mode, which we use to typeset indexes.
% Adapted from the TeXbook, page 416, which is to say,
% the manmac.tex format used to print the TeXbook itself.
-\catcode`\@=11
+\catcode`\@=11 % private names
\newbox\partialpage
\newdimen\doublecolumnhsize
+% Use inside an output routine to save \topmark and \firstmark
+\def\savemarks{%
+ \global\savedtopmark=\expandafter{\topmark }%
+ \global\savedfirstmark=\expandafter{\firstmark }%
+}
+\newtoks\savedtopmark
+\newtoks\savedfirstmark
+
+% Set \topmark and \firstmark for next time \output runs.
+% Can't be run from withinside \output (because any material
+% added while an output routine is active, including
+% penalties, is saved for after it finishes). The page so far
+% should be empty, otherwise what's on it will be thrown away.
+\def\restoremarks{%
+ \mark{\the\savedtopmark}%
+ \bgroup\output = {%
+ \setbox\dummybox=\box\PAGE
+ }abc\eject\egroup
+ % "abc" because output routine doesn't fire for a completely empty page.
+ \mark{\the\savedfirstmark}%
+}
+
\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
+ % If not much space left on page, start a new page.
+ \ifdim\pagetotal>0.8\vsize\vfill\eject\fi
+ %
% Grab any single-column material above us.
\output = {%
%
\unvbox\PAGE
\kern-\topskip \kern\baselineskip
}%
+ \savemarks
}%
\eject % run that output routine to set \partialpage
+ \restoremarks
+ %
+ % We recover the two marks that the last output routine saved in order
+ % to propagate the information in marks added around a chapter heading,
+ % which could be otherwise be lost by the time the final page is output.
+ %
%
% Use the double-column output routine for subsequent pages.
\output = {\doublecolumnout}%
% Double the \vsize as well. (We don't need a separate register here,
% since nobody clobbers \vsize.)
\vsize = 2\vsize
+ %
+ % For the benefit of balancing columns
+ \advance\baselineskip by 0pt plus 0.5pt
}
% The double-column output routine for all double-column pages except
-% the last.
+% the last, which is done by \balancecolumns.
%
\def\doublecolumnout{%
+ %
\splittopskip=\topskip \splitmaxdepth=\maxdepth
% Get the available space for the double columns -- the normal
% (undoubled) page height minus any material left over from the
%
\hsize = \doublecolumnhsize
\wd0=\hsize \wd2=\hsize
- \hbox to\pagewidth{\box0\hfil\box2}%
+ \hbox to\txipagewidth{\box0\hfil\box2}%
}
-%
-% All done with double columns.
+
+
+% Finished with with double columns.
\def\enddoublecolumns{%
% The following penalty ensures that the page builder is exercised
% _before_ we change the output routine. This is necessary in the
% goal. When TeX sees \eject from below which follows the final
% section, it invokes the new output routine that we've set after
% \balancecolumns below; \onepageout will try to fit the two columns
- % and the final section into the vbox of \pageheight (see
+ % and the final section into the vbox of \txipageheight (see
% \pagebody), causing an overfull box.
%
% Note that glue won't work here, because glue does not exercise the
\penalty0
%
\output = {%
- % Split the last of the double-column material. Leave it on the
- % current page, no automatic page break.
+ % Split the last of the double-column material.
+ \savemarks
\balancecolumns
%
- % If we end up splitting too much material for the current page,
- % though, there will be another page break right after this \output
- % invocation ends. Having called \balancecolumns once, we do not
+ % Having called \balancecolumns once, we do not
% want to call it again. Therefore, reset \output to its normal
- % definition right away. (We hope \balancecolumns will never be
- % called on to balance too much material, but if it is, this makes
- % the output somewhat more palatable.)
+ % definition right away.
\global\output = {\onepageout{\pagecontents\PAGE}}%
}%
\eject
\endgroup % started in \begindoublecolumns
+ \restoremarks
+ % Leave the double-column material on the current page, no automatic
+ % page break.
+ \box\balancedcolumns
%
% \pagegoal was set to the doubled \vsize above, since we restarted
% the current page. We're now back to normal single-column
% \endgroup where \vsize got restored).
\pagegoal = \vsize
}
+\newbox\balancedcolumns
+\setbox\balancedcolumns=\vbox{shouldnt see this}%
%
-% Called at the end of the double column material.
+% Only called for the last of the double column material. \doublecolumnout
+% does the others.
\def\balancecolumns{%
\setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120.
\dimen@ = \ht0
\advance\dimen@ by \topskip
\advance\dimen@ by-\baselineskip
- \divide\dimen@ by 2 % target to split to
- %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}%
- \splittopskip = \topskip
- % Loop until we get a decent breakpoint.
- {%
- \vbadness = 10000
- \loop
- \global\setbox3 = \copy0
- \global\setbox1 = \vsplit3 to \dimen@
- \ifdim\ht3>\dimen@
- \global\advance\dimen@ by 1pt
- \repeat
- }%
- %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}%
- \setbox0=\vbox to\dimen@{\unvbox1}%
- \setbox2=\vbox to\dimen@{\unvbox3}%
+ \ifdim\dimen@<5\baselineskip
+ % Don't split a short final column in two.
+ \setbox2=\vbox{}%
+ \else
+ \divide\dimen@ by 2 % target to split to
+ \dimen@ii = \dimen@
+ \splittopskip = \topskip
+ % Loop until left column is at least as high as the right column.
+ {%
+ \vbadness = 10000
+ \loop
+ \global\setbox3 = \copy0
+ \global\setbox1 = \vsplit3 to \dimen@
+ \ifdim\ht1<\ht3
+ \global\advance\dimen@ by 1pt
+ \repeat
+ }%
+ % Now the left column is in box 1, and the right column in box 3.
+ % Check whether the left column has come out higher than the page itself.
+ % (Note that we have doubled \vsize for the double columns, so
+ % the actual height of the page is 0.5\vsize).
+ \ifdim2\ht1>\vsize
+ % Just split the last of the double column material roughly in half.
+ \setbox2=\box0
+ \setbox0 = \vsplit2 to \dimen@ii
+ \setbox0=\vbox to \dimen@ii {\unvbox0\vfill}%
+ \setbox2=\vbox to \dimen@ii {\unvbox2\vfill}%
+ \else
+ % Compare the heights of the two columns.
+ \ifdim4\ht1>5\ht3
+ % Column heights are too different, so don't make their bottoms
+ % flush with each other.
+ \setbox2=\vbox to \ht1 {\unvbox3\vfill}%
+ \setbox0=\vbox to \ht1 {\unvbox1\vfill}%
+ \else
+ % Make column bottoms flush with each other.
+ \setbox2=\vbox to\ht1{\unvbox3\unskip}%
+ \setbox0=\vbox to\ht1{\unvbox1\unskip}%
+ \fi
+ \fi
+ \fi
%
- \pagesofar
+ \global\setbox\balancedcolumns=\vbox{\pagesofar}%
}
\catcode`\@ = \other
\null
\vskip.3\vsize % move it down on the page a bit
\begingroup
- \noindent \titlefonts\rmisbold #1\par % the text
+ \noindent \titlefonts\rm #1\par % the text
\let\lastnode=\empty % no node to associate with
\writetocentry{part}{#1}{}% but put it in the toc
\headingsoff % no headline or footline on the part page
+ % This outputs a mark at the end of the page that clears \thischapter
+ % and \thissection, as is done in \startcontents.
+ \let\pchapsepmacro\relax
+ \chapmacro{}{Yomitfromtoc}{}%
\chapoddpage
\endgroup
}
% @centerchap is like @unnumbered, but the heading is centered.
\outer\parseargdef\centerchap{%
- % Well, we could do the following in a group, but that would break
- % an assumption that \chapmacro is called at the outermost level.
- % Thus we are safer this way: --kasal, 24feb04
\let\centerparametersmaybe = \centerparameters
\unnmhead0{#1}%
\let\centerparametersmaybe = \relax
% Define plain chapter starts, and page on/off switching for it.
\def\chapbreak{\dobreak \chapheadingskip {-4000}}
+
+% Start a new page
\def\chappager{\par\vfill\supereject}
+
+% \chapoddpage - start on an odd page for a new chapter
% Because \domark is called before \chapoddpage, the filler page will
% get the headings for the next chapter, which is wrong. But we don't
% care -- we just disable all headings on the filler page.
\fi
}
-\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}
+\parseargdef\setchapternewpage{\csname CHAPPAG#1\endcsname}
\def\CHAPPAGoff{%
\global\let\contentsalignmacro = \chappager
\CHAPPAGon
-% Chapter opening.
+% \chapmacro - Chapter opening.
%
% #1 is the text, #2 is the section type (Ynumbered, Ynothing,
% Yappendix, Yomitfromtoc), #3 the chapter number.
+% Not used for @heading series.
%
% To test against our argument.
\def\Ynothingkeyword{Ynothing}
-\def\Yomitfromtockeyword{Yomitfromtoc}
\def\Yappendixkeyword{Yappendix}
+\def\Yomitfromtockeyword{Yomitfromtoc}
%
\def\chapmacro#1#2#3{%
+ \expandafter\ifx\thisenv\titlepage\else
+ \checkenv{}% chapters, etc., should not start inside an environment.
+ \fi
+ % FIXME: \chapmacro is currently called from inside \titlepage when
+ % \setcontentsaftertitlepage to print the "Table of Contents" heading, but
+ % this should probably be done by \sectionheading with an option to print
+ % in chapter size.
+ %
% Insert the first mark before the heading break (see notes for \domark).
\let\prevchapterdefs=\lastchapterdefs
\let\prevsectiondefs=\lastsectiondefs
\domark
%
{%
- \chapfonts \rmisbold
+ \chapfonts \rm
+ \let\footnote=\errfootnoteheading % give better error message
%
% Have to define \lastsection before calling \donoderef, because the
% xref code eventually uses it. On the other hand, it has to be called
}
-% I don't think this chapter style is supported any more, so I'm not
-% updating it with the new noderef stuff. We'll see. --karl, 11aug03.
-%
-\def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
-%
-\def\unnchfopen #1{%
- \chapoddpage
- \vbox{\chapfonts \raggedtitlesettings #1\par}%
- \nobreak\bigskip\nobreak
-}
-\def\chfopen #1#2{\chapoddpage {\chapfonts
-\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
-\par\penalty 5000 %
-}
-\def\centerchfopen #1{%
- \chapoddpage
- \vbox{\chapfonts \raggedtitlesettings \hfill #1\hfill}%
- \nobreak\bigskip \nobreak
-}
-\def\CHAPFopen{%
- \global\let\chapmacro=\chfopen
- \global\let\centerchapmacro=\centerchfopen}
-
-
% Section titles. These macros combine the section number parts and
% call the generic \sectionheading to do the printing.
%
% Print any size, any type, section title.
%
-% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is
-% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the
-% section number.
+% #1 is the text of the title,
+% #2 is the section level (sec/subsec/subsubsec),
+% #3 is the section type (Ynumbered, Ynothing, Yappendix, Yomitfromtoc),
+% #4 is the section number.
%
\def\seckeyword{sec}
%
\def\sectionheading#1#2#3#4{%
{%
- \checkenv{}% should not be in an environment.
- %
- % Switch to the right set of fonts.
- \csname #2fonts\endcsname \rmisbold
- %
\def\sectionlevel{#2}%
\def\temptype{#3}%
%
+ % It is ok for the @heading series commands to appear inside an
+ % environment (it's been historically allowed, though the logic is
+ % dubious), but not the others.
+ \ifx\temptype\Yomitfromtockeyword\else
+ \checkenv{}% non-@*heading should not be in an environment.
+ \fi
+ \let\footnote=\errfootnoteheading
+ %
+ % Switch to the right set of fonts.
+ \csname #2fonts\endcsname \rm
+ %
% Insert first mark before the heading break (see notes for \domark).
\let\prevsectiondefs=\lastsectiondefs
\ifx\temptype\Ynothingkeyword
% 1 and 2 (the page numbers aren't printed), and so are the first
% two pages of the document. Thus, we'd have two destinations named
% `1', and two named `2'.
- \ifpdf \global\pdfmakepagedesttrue \fi
+ \ifpdf
+ \global\pdfmakepagedesttrue
+ \else
+ \ifx\XeTeXrevision\thisisundefined
+ \else
+ \global\pdfmakepagedesttrue
+ \fi
+ \fi
}
\savepageno = \pageno
\begingroup % Set up to handle contents files properly.
\raggedbottom % Worry more about breakpoints than the bottom.
- \advance\hsize by -\contentsrightmargin % Don't use the full line length.
+ \entryrightmargin=\contentsrightmargin % Don't use the full line length.
%
% Roman numerals for page numbers.
\ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi
% Chapters, in the main contents.
\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}}
-%
+
% Chapters, in the short toc.
% See comments in \dochapentry re vbox and related settings.
\def\shortchapentry#1#2#3#4{%
\setbox0 = \hbox{\putwordAppendix{} M}%
\hbox to \wd0{\putwordAppendix{} #1\hss}}
%
-\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}}
+\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\hskip.7em#1}{#4}}
% Unnumbered chapters.
\def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}}
\def\dochapentry#1#2{%
\penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
\begingroup
+ % Move the page numbers slightly to the right
+ \advance\entryrightmargin by -0.05em
\chapentryfonts
\tocentry{#1}{\dopageno\bgroup#2\egroup}%
\endgroup
\catcode `\>=\other
\catcode `\`=\other
\catcode `\'=\other
- \escapechar=`\\
%
% ' is active in math mode (mathcode"8000). So reset it, and all our
% other math active characters (just in case), to plain's definitions.
\mathactive
%
+ % Inverse of the list at the beginning of the file.
\let\b=\ptexb
\let\bullet=\ptexbullet
\let\c=\ptexc
\let\+=\tabalign
\let\}=\ptexrbrace
\let\/=\ptexslash
+ \let\sp=\ptexsp
\let\*=\ptexstar
+ %\let\sup=\ptexsup % do not redefine, we want @sup to work in math mode
\let\t=\ptext
\expandafter \let\csname top\endcsname=\ptextop % we've made it outer
\let\frenchspacing=\plainfrenchspacing
\endgraf
\ifdim\lastskip<\envskipamount
\removelastskip
+ \ifnum\lastpenalty<10000
+ % Penalize breaking before the environment, because preceding text
+ % often leads into it.
+ \penalty100
+ \fi
+ \vskip\envskipamount
+ \fi
+ \fi
+}}
+
+\def\afterenvbreak{{%
+ % =10000 instead of <10000 because of a special case in \itemzzz and
+ % \sectionheading, q.v.
+ \ifnum \lastpenalty=10000 \else
+ \advance\envskipamount by \parskip
+ \endgraf
+ \ifdim\lastskip<\envskipamount
+ \removelastskip
% it's not a good place to break if the last penalty was \nobreak
% or better ...
\ifnum\lastpenalty<10000 \penalty-50 \fi
\fi
}}
-\let\afterenvbreak = \aboveenvbreak
-
% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will
% also clear it, so that its embedded environments do the narrowing again.
\let\nonarrowing=\relax
% side, and for 6pt waste from
% each corner char, and rule thickness
\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
+ \setbox\groupbox=\vbox\bgroup
\baselineskip=0pt\parskip=0pt\lineskip=0pt
\carttop
\hbox\bgroup
\egroup
\cartbot
\egroup
+ \addgroupbox
\checkinserts
}
% @raggedright does more-or-less normal line breaking but no right
-% justification. From plain.tex.
+% justification. From plain.tex. Don't stretch around special
+% characters in urls in this environment, since the stretch at the right
+% should be enough.
\envdef\raggedright{%
- \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax
+ \rightskip0pt plus2.4em \spaceskip.3333em \xspaceskip.5em\relax
+ \def\urefprestretchamount{0pt}%
+ \def\urefpoststretchamount{0pt}%
}
\let\Eraggedright\par
% typesetting commands (@smallbook, font changes, etc.) have to be done
% beforehand -- and a) we want @copying to be done first in the source
% file; b) letting users define the frontmatter in as flexible order as
-% possible is very desirable.
+% possible is desirable.
%
\def\copying{\checkenv{}\begingroup\scanargctxt\docopying}
\def\docopying#1@end copying{\endgroup\def\copyingtext{#1}}
\temp
}
-% \domakedefun \deffn \deffnx \deffnheader
+% \domakedefun \deffn \deffnx \deffnheader { (defn. of \deffnheader) }
%
% Define \deffn and \deffnx, without parameters.
% \deffnheader has to be defined explicitly.
\fi % no return type
#3% output function name
}%
- {\rm\enskip}% hskip 0.5 em of \tenrm
+ {\rm\enskip}% hskip 0.5 em of \rmfont
%
\boldbrax
% arguments will be output next, if any.
}
\fi
-\def\scanmacro#1{\begingroup
+\let\aftermacroxxx\relax
+\def\aftermacro{\aftermacroxxx}
+
+% alias because \c means cedilla in @tex or @math
+\let\texinfoc=\c
+
+\newcount\savedcatcodeone
+\newcount\savedcatcodetwo
+
+% Used at the time of macro expansion.
+% Argument is macro body with arguments substituted
+\def\scanmacro#1{%
\newlinechar`\^^M
- \let\xeatspaces\eatspaces
+ \def\xeatspaces{\eatspaces}%
+ %
+ % Temporarily undo catcode changes of \printindex. Set catcode of @ to
+ % 0 so that @-commands in macro expansions aren't printed literally when
+ % formatting an index file, where \ is used as the escape character.
+ \savedcatcodeone=\catcode`\@
+ \savedcatcodetwo=\catcode`\\
+ \catcode`\@=0
+ \catcode`\\=\active
%
- % Undo catcode changes of \startcontents and \doprintindex
- % When called from @insertcopying or (short)caption, we need active
- % backslash to get it printed correctly. Previously, we had
- % \catcode`\\=\other instead. We'll see whether a problem appears
- % with macro expansion. --kasal, 19aug04
- \catcode`\@=0 \catcode`\\=\active \escapechar=`\@
+ % Process the macro body under the current catcode regime.
+ \scantokens{#1@texinfoc}\aftermacro%
%
- % ... and for \example:
- \spaceisspace
+ \catcode`\@=\savedcatcodeone
+ \catcode`\\=\savedcatcodetwo
%
- % 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}
+ % The \texinfoc is to remove the \newlinechar added by \scantokens, and
+ % can be noticed by \parsearg.
+ % The \aftermacro allows a \comment at the end of the macro definition
+ % to duplicate itself past the final \newlinechar added by \scantokens:
+ % this is used in the definition of \group to comment out a newline. We
+ % don't do the same for \c to support Texinfo files with macros that ended
+ % with a @c, which should no longer be necessary.
+ % We avoid surrounding the call to \scantokens with \bgroup and \egroup
+ % to allow macros to open or close groups themselves.
+}
+% Used for copying and captions
\def\scanexp#1{%
- \edef\temp{\noexpand\scanmacro{#1}}%
- \temp
+ \expandafter\scanmacro\expandafter{#1}%
}
\newcount\paramno % Count of parameters
\newif\ifrecursive % Is it recursive?
% List of all defined macros in the form
-% \definedummyword\macro1\definedummyword\macro2...
+% \commondummyword\macro1\commondummyword\macro2...
% Currently is also contains all @aliases; the list can be split
% if there is a need.
\def\macrolist{}
% Add the macro to \macrolist
\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname}
\def\addtomacrolistxxx#1{%
- \toks0 = \expandafter{\macrolist\definedummyword#1}%
+ \toks0 = \expandafter{\macrolist\commondummyword#1}%
\xdef\macrolist{\the\toks0}%
}
\catcode`\+=\other
\catcode`\<=\other
\catcode`\>=\other
- \catcode`\@=\other
\catcode`\^=\other
\catcode`\_=\other
\catcode`\|=\other
\catcode`\~=\other
- \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi
+ \passthroughcharstrue
}
\def\scanargctxt{% used for copying and captions, not macros.
\scanctxt
+ \catcode`\@=\other
\catcode`\\=\other
\catcode`\^^M=\other
}
\def\macrobodyctxt{% used for @macro definitions
\scanctxt
+ \catcode`\ =\other
+ \catcode`\@=\other
\catcode`\{=\other
\catcode`\}=\other
\catcode`\^^M=\other
\usembodybackslash
}
-\def\macroargctxt{% used when scanning invocations
+% Used when scanning braced macro arguments. Note, however, that catcode
+% changes here are ineffectual if the macro invocation was nested inside
+% an argument to another Texinfo command.
+\def\macroargctxt{%
\scanctxt
- \catcode`\\=0
+ \catcode`\ =\active
+ \catcode`\^^M=\other
+ \catcode`\\=\active
}
-% why catcode 0 for \ in the above? To recognize \\ \{ \} as "escapes"
-% for the single characters \ { }. Thus, we end up with the "commands"
-% that would be written @\ @{ @} in a Texinfo document.
-%
-% We already have @{ and @}. For @\, we define it here, and only for
-% this purpose, to produce a typewriter backslash (so, the @\ that we
-% define for @math can't be used with @macro calls):
-%
-\def\\{\normalbackslash}%
-%
-% We would like to do this for \, too, since that is what makeinfo does.
-% But it is not possible, because Texinfo already has a command @, for a
-% cedilla accent. Documents must use @comma{} instead.
-%
-% \anythingelse will almost certainly be an error of some kind.
+\def\macrolineargctxt{% used for whole-line arguments without braces
+ \scanctxt
+ \catcode`\{=\other
+ \catcode`\}=\other
+}
% \mbodybackslash is the definition of \ in @macro bodies.
% It maps \foo\ => \csname macarg.foo\endcsname => #N
% Remove the macro name from \macrolist:
\begingroup
\expandafter\let\csname#1\endcsname \relax
- \let\definedummyword\unmacrodo
+ \let\commondummyword\unmacrodo
\xdef\macrolist{\macrolist}%
\endgroup
\else
\ifx #1\relax
% remove this
\else
- \noexpand\definedummyword \noexpand#1%
+ \noexpand\commondummyword \noexpand#1%
\fi
}
-% This makes use of the obscure feature that if the last token of a
-% <parameter list> is #, then the preceding argument is delimited by
-% an opening brace, and that opening brace is not consumed.
+% \getargs -- Parse the arguments to a @macro line. Set \macname to
+% the name of the macro, and \argl to the braced argument list.
\def\getargs#1{\getargsxxx#1{}}
\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
\def\getmacname#1 #2\relax{\macname={#1}}
\def\getmacargs#1{\def\argl{#1}}
+% This made use of the feature that if the last token of a
+% <parameter list> is #, then the preceding argument is delimited by
+% an opening brace, and that opening brace is not consumed.
-% For macro processing make @ a letter so that we can make Texinfo private macro names.
-\edef\texiatcatcode{\the\catcode`\@}
-\catcode `@=11\relax
-
-% Parse the optional {params} list. Set up \paramno and \paramlist
-% so \defmacro knows what to do. Define \macarg.BLAH for each BLAH
-% in the params list to some hook where the argument si to be expanded. If
-% there are less than 10 arguments that hook is to be replaced by ##N where N
+% Parse the optional {params} list to @macro or @rmacro.
+% Set \paramno to the number of arguments,
+% and \paramlist to a parameter text for the macro (e.g. #1,#2,#3 for a
+% three-param macro.) Define \macarg.BLAH for each BLAH in the params
+% list to some hook where the argument is to be expanded. If there are
+% less than 10 arguments that hook is to be replaced by ##N where N
% is the position in that list, that is to say the macro arguments are to be
% defined `a la TeX in the macro body.
%
% That gets used by \mbodybackslash (above).
%
-% We need to get `macro parameter char #' into several definitions.
-% The technique used is stolen from LaTeX: let \hash be something
-% unexpandable, insert that wherever you need a #, and then redefine
-% it to # just before using the token list produced.
-%
-% The same technique is used to protect \eatspaces till just before
-% the macro is used.
-%
-% If there are 10 or more arguments, a different technique is used, where the
-% hook remains in the body, and when macro is to be expanded the body is
-% processed again to replace the arguments.
-%
-% In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the
-% argument N value and then \edef the body (nothing else will expand because of
-% the catcode regime underwhich the body was input).
+% If there are 10 or more arguments, a different technique is used: see
+% \parsemmanyargdef.
%
-% 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
+ % \hash is redefined to `#' later to get it into definitions
\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
\edef\paramlist{\paramlist\hash\the\paramno,}%
\fi\next}
+% \parsemacbody, \parsermacbody
+%
+% Read recursive and nonrecursive macro bodies. (They're different since
+% rec and nonrec macros end differently.)
+%
+% We are in \macrobodyctxt, and the \xdef causes backslashshes in the macro
+% body to be transformed.
+% Set \macrobody to the body of the macro, and call \defmacro.
+%
+{\catcode`\ =\other\long\gdef\parsemacbody#1@end macro{%
+\xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}%
+{\catcode`\ =\other\long\gdef\parsermacbody#1@end rmacro{%
+\xdef\macrobody{\eatcr{#1}}\endgroup\defmacro}}%
+
+% Make @ a letter, so that we can make private-to-Texinfo macro names.
+\edef\texiatcatcode{\the\catcode`\@}
+\catcode `@=11\relax
+
+%%%%%%%%%%%%%% Code for > 10 arguments only %%%%%%%%%%%%%%%%%%
+
+% 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 under which the body was input).
+%
+% If you compile with TeX (not eTeX), and you have macros with 10 or more
+% arguments, no macro can have more than 256 arguments (else error).
+%
+% 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.
\def\parsemmanyargdef@@#1,{%
\if#1;\let\next=\relax
\else
\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
\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
+% definition. It gets all the arguments' values and assigns them to macros
% macarg.ARGNAME
%
% #1 is the macro name
\getargvals@@
\fi
}
-
-%
\def\getargvals@@{%
\ifx\paramlist\nilm@
% Some sanity check needed here that \argvaluelist is also empty.
}
% Replace arguments by their values in the macro body, and place the result
-% in macro \@tempa
+% 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
\expandafter\def\expandafter\@tempa\expandafter{\@tempc}%
}
+% Define the named-macro outside of this group and then close this group.
+%
\def\macargexpandinbody@{%
- %% Define the named-macro outside of this group and then close this group.
\expandafter
\endgroup
\macargdeflist@
\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
+% Trailing missing arguments are set to empty.
+%
\def\setemptyargvalues@{%
\ifx\paramlist\nilm@
\let\next\macargexpandinbody@
\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.
+
+%%%%%%%%%%%%%% End of code for > 10 arguments %%%%%%%%%%%%%%%%%%
+
+
+% This defines a Texinfo @macro or @rmacro, called by \parsemacbody.
+% \macrobody has the body of the macro in it, with placeholders for
+% its parameters, looking like "\xeatspaces{\hash 1}".
+% \paramno is the number of parameters
+% \paramlist is a TeX parameter text, e.g. "#1,#2,#3,"
+% There are four cases: macros of zero, one, up to nine, and many arguments.
% \xdef is used so that macro definitions will survive the file
-% they're defined in; @include reads the file inside a group.
+% they're defined in: @include reads the file inside a group.
%
\def\defmacro{%
\let\hash=##% convert placeholders to macro parameter chars
- \ifrecursive
- \ifcase\paramno
- % 0
- \expandafter\xdef\csname\the\macname\endcsname{%
- \noexpand\scanmacro{\temp}}%
- \or % 1
- \expandafter\xdef\csname\the\macname\endcsname{%
- \bgroup\noexpand\macroargctxt
- \noexpand\braceorline
- \expandafter\noexpand\csname\the\macname xxx\endcsname}%
- \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
- \egroup\noexpand\scanmacro{\temp}}%
- \else
- \ifnum\paramno<10\relax % at most 9
- \expandafter\xdef\csname\the\macname\endcsname{%
- \bgroup\noexpand\macroargctxt
- \noexpand\csname\the\macname xx\endcsname}%
- \expandafter\xdef\csname\the\macname xx\endcsname##1{%
- \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
- \expandafter\expandafter
- \expandafter\xdef
- \expandafter\expandafter
- \csname\the\macname xxx\endcsname
- \paramlist{\egroup\noexpand\scanmacro{\temp}}%
- \else % 10 or more
- \expandafter\xdef\csname\the\macname\endcsname{%
- \noexpand\getargvals@{\the\macname}{\argl}%
- }%
- \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp
- \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble
- \fi
- \fi
+ \ifnum\paramno=1
+ \def\xeatspaces##1{##1}%
+ % This removes the pair of braces around the argument. We don't
+ % use \eatspaces, because this can cause ends of lines to be lost
+ % when the argument to \eatspaces is read, leading to line-based
+ % commands like "@itemize" not being read correctly.
\else
- \ifcase\paramno
- % 0
+ \let\xeatspaces\relax % suppress expansion
+ \fi
+ \ifcase\paramno
+ % 0
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \noexpand\scanmacro{\macrobody}}%
+ \or % 1
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \bgroup
+ \noexpand\braceorline
+ \expandafter\noexpand\csname\the\macname @@@\endcsname}%
+ \expandafter\xdef\csname\the\macname @@@\endcsname##1{%
+ \egroup
+ \noexpand\scanmacro{\macrobody}%
+ }%
+ \else % at most 9
+ \ifnum\paramno<10\relax
+ % @MACNAME sets the context for reading the macro argument
+ % @MACNAME@@ gets the argument, processes backslashes and appends a
+ % comma.
+ % @MACNAME@@@ removes braces surrounding the argument list.
+ % @MACNAME@@@@ scans the macro body with arguments substituted.
\expandafter\xdef\csname\the\macname\endcsname{%
- \noexpand\norecurse{\the\macname}%
- \noexpand\scanmacro{\temp}\egroup}%
- \or % 1
+ \bgroup
+ \noexpand\expandafter % This \expandafter skip any spaces after the
+ \noexpand\macroargctxt % macro before we change the catcode of space.
+ \noexpand\expandafter
+ \expandafter\noexpand\csname\the\macname @@\endcsname}%
+ \expandafter\xdef\csname\the\macname @@\endcsname##1{%
+ \noexpand\passargtomacro
+ \expandafter\noexpand\csname\the\macname @@@\endcsname{##1,}}%
+ \expandafter\xdef\csname\the\macname @@@\endcsname##1{%
+ \expandafter\noexpand\csname\the\macname @@@@\endcsname ##1}%
+ \expandafter\expandafter
+ \expandafter\xdef
+ \expandafter\expandafter
+ \csname\the\macname @@@@\endcsname\paramlist{%
+ \egroup\noexpand\scanmacro{\macrobody}}%
+ \else % 10 or more:
\expandafter\xdef\csname\the\macname\endcsname{%
- \bgroup\noexpand\macroargctxt
- \noexpand\braceorline
- \expandafter\noexpand\csname\the\macname xxx\endcsname}%
- \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
- \egroup
- \noexpand\norecurse{\the\macname}%
- \noexpand\scanmacro{\temp}\egroup}%
- \else % at most 9
- \ifnum\paramno<10\relax
- \expandafter\xdef\csname\the\macname\endcsname{%
- \bgroup\noexpand\macroargctxt
- \expandafter\noexpand\csname\the\macname xx\endcsname}%
- \expandafter\xdef\csname\the\macname xx\endcsname##1{%
- \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
- \expandafter\expandafter
- \expandafter\xdef
- \expandafter\expandafter
- \csname\the\macname xxx\endcsname
- \paramlist{%
- \egroup
- \noexpand\norecurse{\the\macname}%
- \noexpand\scanmacro{\temp}\egroup}%
- \else % 10 or more:
- \expandafter\xdef\csname\the\macname\endcsname{%
- \noexpand\getargvals@{\the\macname}{\argl}%
- }%
- \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp
- \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse
- \fi
+ \noexpand\getargvals@{\the\macname}{\argl}%
+ }%
+ \global\expandafter\let\csname mac.\the\macname .body\endcsname\macrobody
+ \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble
\fi
\fi}
-\catcode `\@\texiatcatcode\relax
+\catcode `\@\texiatcatcode\relax % end private-to-Texinfo catcodes
\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
-% \braceorline decides whether the next nonwhitespace character is a
-% {. If so it reads up to the closing }, if not, it reads the whole
-% line. Whatever was read is then fed to the next control sequence
-% as an argument (by \parsebrace or \parsearg).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+{\catcode`\@=0 \catcode`\\=13 % We need to manipulate \ so use @ as escape
+@catcode`@_=11 % private names
+@catcode`@!=11 % used as argument separator
+
+% \passargtomacro#1#2 -
+% Call #1 with a list of tokens #2, with any doubled backslashes in #2
+% compressed to one.
+%
+% This implementation works by expansion, and not execution (so we cannot use
+% \def or similar). This reduces the risk of this failing in contexts where
+% complete expansion is done with no execution (for example, in writing out to
+% an auxiliary file for an index entry).
+%
+% State is kept in the input stream: the argument passed to
+% @look_ahead, @gobble_and_check_finish and @add_segment is
+%
+% THE_MACRO ARG_RESULT ! {PENDING_BS} NEXT_TOKEN (... rest of input)
+%
+% where:
+% THE_MACRO - name of the macro we want to call
+% ARG_RESULT - argument list we build to pass to that macro
+% PENDING_BS - either a backslash or nothing
+% NEXT_TOKEN - used to look ahead in the input stream to see what's coming next
+
+@gdef@passargtomacro#1#2{%
+ @add_segment #1!{}@relax#2\@_finish\%
+}
+@gdef@_finish{@_finishx} @global@let@_finishx@relax
+
+% #1 - THE_MACRO ARG_RESULT
+% #2 - PENDING_BS
+% #3 - NEXT_TOKEN
+% #4 used to look ahead
+%
+% If the next token is not a backslash, process the rest of the argument;
+% otherwise, remove the next token.
+@gdef@look_ahead#1!#2#3#4{%
+ @ifx#4\%
+ @expandafter@gobble_and_check_finish
+ @else
+ @expandafter@add_segment
+ @fi#1!{#2}#4#4%
+}
+
+% #1 - THE_MACRO ARG_RESULT
+% #2 - PENDING_BS
+% #3 - NEXT_TOKEN
+% #4 should be a backslash, which is gobbled.
+% #5 looks ahead
+%
+% Double backslash found. Add a single backslash, and look ahead.
+@gdef@gobble_and_check_finish#1!#2#3#4#5{%
+ @add_segment#1\!{}#5#5%
+}
+
+@gdef@is_fi{@fi}
+
+% #1 - THE_MACRO ARG_RESULT
+% #2 - PENDING_BS
+% #3 - NEXT_TOKEN
+% #4 is input stream until next backslash
+%
+% Input stream is either at the start of the argument, or just after a
+% backslash sequence, either a lone backslash, or a doubled backslash.
+% NEXT_TOKEN contains the first token in the input stream: if it is \finish,
+% finish; otherwise, append to ARG_RESULT the segment of the argument up until
+% the next backslash. PENDING_BACKSLASH contains a backslash to represent
+% a backslash just before the start of the input stream that has not been
+% added to ARG_RESULT.
+@gdef@add_segment#1!#2#3#4\{%
+@ifx#3@_finish
+ @call_the_macro#1!%
+@else
+ % append the pending backslash to the result, followed by the next segment
+ @expandafter@is_fi@look_ahead#1#2#4!{\}@fi
+ % this @fi is discarded by @look_ahead.
+ % we can't get rid of it with \expandafter because we don't know how
+ % long #4 is.
+}
+
+% #1 - THE_MACRO
+% #2 - ARG_RESULT
+% #3 discards the res of the conditional in @add_segment, and @is_fi ends the
+% conditional.
+@gdef@call_the_macro#1#2!#3@fi{@is_fi #1{#2}}
+
+}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% \braceorline MAC is used for a one-argument macro MAC. It checks
+% whether the next non-whitespace character is a {. It sets the context
+% for reading the argument (slightly different in the two cases). Then,
+% to read the argument, in the whole-line case, it then calls the regular
+% \parsearg MAC; in the lbrace case, it calls \passargtomacro MAC.
%
\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
\def\braceorlinexxx{%
- \ifx\nchar\bgroup\else
- \expandafter\parsearg
+ \ifx\nchar\bgroup
+ \macroargctxt
+ \expandafter\passargtomacro
+ \else
+ \macrolineargctxt\expandafter\parsearg
\fi \macnamexxx}
\pdfmkdest{#1}%
\iflinks
{%
+ \requireauxfile
\atdummies % preserve commands, but don't expand them
+ % match definition in \xrdef, \refx, \xrefX.
+ \def\value##1{##1}%
\edef\writexrdef##1##2{%
\write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
##1}{##2}}% these are parameters of \writexrdef
% node name, #4 the name of the Info file, #5 the name of the printed
% manual. All but the node name can be omitted.
%
-\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}
-\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
-\def\ref#1{\xrefX[#1,,,,,,,]}
+\def\pxref{\putwordsee{} \xrefXX}
+\def\xref{\putwordSee{} \xrefXX}
+\def\ref{\xrefXX}
+
+\def\xrefXX#1{\def\xrefXXarg{#1}\futurelet\tokenafterxref\xrefXXX}
+\def\xrefXXX{\expandafter\xrefX\expandafter[\xrefXXarg,,,,,,,]}
%
\newbox\toprefbox
\newbox\printedrefnamebox
%
% Make link in pdf output.
\ifpdf
+ % For pdfTeX and LuaTeX
{\indexnofonts
- \turnoffactive
\makevalueexpandable
+ \turnoffactive
% This expands tokens, so do it after making catcode changes, so _
% etc. don't get their TeX definitions. This ignores all spaces in
% #4, including (wrongly) those in the middle of the filename.
%
% 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
+ \setpdfdestname{#1}%
+ %
+ \ifx\pdfdestname\empty
+ \def\pdfdestname{Top}% no empty targets
\fi
%
\leavevmode
\startlink attr{/Border [0 0 0]}%
\ifnum\filenamelength>0
- goto file{\the\filename.pdf} name{\pdfxrefdest}%
+ goto file{\the\filename.pdf} name{\pdfdestname}%
\else
- goto name{\pdfmkpgn{\pdfxrefdest}}%
+ goto name{\pdfmkpgn{\pdfdestname}}%
\fi
}%
\setcolor{\linkcolor}%
+ \else
+ \ifx\XeTeXrevision\thisisundefined
+ \else
+ % For XeTeX
+ {\indexnofonts
+ \makevalueexpandable
+ \turnoffactive
+ % This expands tokens, so do it after making catcode changes, so _
+ % etc. don't get their TeX definitions. This ignores all spaces in
+ % #4, including (wrongly) those in the middle of the filename.
+ \getfilename{#4}%
+ %
+ % This (wrongly) does not take account of leading or trailing
+ % spaces in #1, which should be ignored.
+ \setpdfdestname{#1}%
+ %
+ \ifx\pdfdestname\empty
+ \def\pdfdestname{Top}% no empty targets
+ \fi
+ %
+ \leavevmode
+ \ifnum\filenamelength>0
+ % With default settings,
+ % XeTeX (xdvipdfmx) replaces link destination names with integers.
+ % In this case, the replaced destination names of
+ % remote PDFs are no longer known. In order to avoid a replacement,
+ % you can use xdvipdfmx's command line option `-C 0x0010'.
+ % If you use XeTeX 0.99996+ (TeX Live 2016+),
+ % this command line option is no longer necessary
+ % because we can use the `dvipdfmx:config' special.
+ \special{pdf:bann << /Border [0 0 0] /Type /Annot /Subtype /Link /A
+ << /S /GoToR /F (\the\filename.pdf) /D (\pdfdestname) >> >>}%
+ \else
+ \special{pdf:bann << /Border [0 0 0] /Type /Annot /Subtype /Link /A
+ << /S /GoTo /D (\pdfdestname) >> >>}%
+ \fi
+ }%
+ \setcolor{\linkcolor}%
+ \fi
\fi
- %
- % Float references are printed completely differently: "Figure 1.2"
- % instead of "[somenode], p.3". We distinguish them by the
- % LABEL-title being set to a magic string.
{%
% Have to otherify everything special to allow the \csname to
% include an _ in the xref name, etc.
\indexnofonts
\turnoffactive
+ \def\value##1{##1}%
\expandafter\global\expandafter\let\expandafter\Xthisreftitle
\csname XR#1-title\endcsname
}%
+ %
+ % Float references are printed completely differently: "Figure 1.2"
+ % instead of "[somenode], p.3". \iffloat distinguishes them by
+ % \Xthisreftitle being set to a magic string.
\iffloat\Xthisreftitle
% If the user specified the print name (third arg) to the ref,
% print it instead of our usual "Figure 1.2".
%
% output the `page 3'.
\turnoffactive \putwordpage\tie\refx{#1-pg}{}%
+ % Add a , if xref followed by a space
+ \if\space\noexpand\tokenafterxref ,%
+ \else\ifx\ \tokenafterxref ,% @TAB
+ \else\ifx\*\tokenafterxref ,% @*
+ \else\ifx\ \tokenafterxref ,% @SPACE
+ \else\ifx\
+ \tokenafterxref ,% @NL
+ \else\ifx\tie\tokenafterxref ,% @tie
+ \fi\fi\fi\fi\fi\fi
\fi\fi
\fi
\endlink
\fi\fi\fi
}
-% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
-% If its value is nonempty, SUFFIX is output afterward.
-%
+% \refx{NAME}{SUFFIX} - reference a cross-reference string named NAME. SUFFIX
+% is output afterwards if non-empty.
\def\refx#1#2{%
+ \requireauxfile
{%
\indexnofonts
\otherbackslash
+ \def\value##1{##1}%
\expandafter\global\expandafter\let\expandafter\thisrefX
\csname XR#1\endcsname
}%
#2% Output the suffix in any case.
}
-% This is the macro invoked by entries in the aux file. Usually it's
-% just a \def (we prepend XR to the control sequence name to avoid
-% collisions). But if this is a float type, we have more work to do.
+% This is the macro invoked by entries in the aux file. Define a control
+% sequence for a cross-reference target (we prepend XR to the control sequence
+% name to avoid collisions). The value is the page number. If this is a float
+% type, we have more work to do.
%
\def\xrdef#1#2{%
- {% The node name might contain 8-bit characters, which in our current
- % implementation are changed to commands like @'e. Don't let these
- % mess up the control sequence name.
+ {% Expand the node or anchor name to remove control sequences.
+ % \turnoffactive stops 8-bit characters being changed to commands
+ % like @'e. \refx does the same to retrieve the value in the definition.
\indexnofonts
\turnoffactive
+ \def\value##1{##1}%
\xdef\safexrefname{#1}%
}%
%
\fi
}
+% If working on a large document in chapters, it is convenient to
+% be able to disable indexing, cross-referencing, and contents, for test runs.
+% This is done with @novalidate at the beginning of the file.
+%
+\newif\iflinks \linkstrue % by default we want the aux files.
+\let\novalidate = \linksfalse
+
+% Used when writing to the aux file, or when using data from it.
+\def\requireauxfile{%
+ \iflinks
+ \tryauxfile
+ % Open the new aux file. TeX will close it automatically at exit.
+ \immediate\openout\auxfile=\jobname.aux
+ \fi
+ \global\let\requireauxfile=\relax % Only do this once.
+}
+
% Read the last existing aux file, if any. No error if none exists.
%
\def\tryauxfile{%
% now. --karl, 15jan04.
\catcode`\\=\other
%
- % Make the characters 128-255 be printing characters.
- {%
- \count1=128
- \def\loop{%
- \catcode\count1=\other
- \advance\count1 by 1
- \ifnum \count1<256 \loop \fi
- }%
- }%
- %
% @ is our escape character in .aux files, and we need braces.
\catcode`\{=1
\catcode`\}=2
%
% Auto-number footnotes. Otherwise like plain.
\gdef\footnote{%
- \let\indent=\ptexindent
- \let\noindent=\ptexnoindent
\global\advance\footnoteno by \@ne
\edef\thisfootno{$^{\the\footnoteno}$}%
%
%
\gdef\dofootnote{%
\insert\footins\bgroup
+ %
+ % Nested footnotes are not supported in TeX, that would take a lot
+ % more work. (\startsavinginserts does not suffice.)
+ \let\footnote=\errfootnotenest
+ %
% We want to typeset this text as a normal paragraph, even if the
% footnote reference occurs in (for example) a display environment.
% So reset some parameters.
- \hsize=\pagewidth
+ \hsize=\txipagewidth
\interlinepenalty\interfootnotelinepenalty
\splittopskip\ht\strutbox % top baseline for broken footnotes
\splitmaxdepth\dp\strutbox
}
}%end \catcode `\@=11
+\def\errfootnotenest{%
+ \errhelp=\EMsimple
+ \errmessage{Nested footnotes not supported in texinfo.tex,
+ even though they work in makeinfo; sorry}
+}
+
+\def\errfootnoteheading{%
+ \errhelp=\EMsimple
+ \errmessage{Footnotes in chapters, sections, etc., are not supported}
+}
+
% In case a @footnote appears in a vbox, save the footnote text and create
% the real \insert just after the vbox finished. Otherwise, the insertion
% would be lost.
% Similarly, if a @footnote appears inside an alignment, save the footnote
% text to a box and make the \insert when a row of the table is finished.
% And the same can be done for other insert classes. --kasal, 16nov03.
-
+%
% Replace the \insert primitive by a cheating macro.
% Deeper inside, just make sure that the saved insertions are not spilled
% out prematurely.
\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
\catcode`\^^M = 5 % in case we're inside an example
\normalturnoffactive % allow _ et al. in names
+ \def\xprocessmacroarg{\eatspaces}% in case we are being used via a macro
% If the image is by itself, center it.
\ifvmode
\imagevmodetrue
%
% Output the image.
\ifpdf
+ % For pdfTeX and LuaTeX <= 0.80
\dopdfimage{#1}{#2}{#3}%
\else
- % \epsfbox itself resets \epsf?size at each figure.
- \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
- \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
- \epsfbox{#1.eps}%
+ \ifx\XeTeXrevision\thisisundefined
+ % For epsf.tex
+ % \epsfbox itself resets \epsf?size at each figure.
+ \setbox0 = \hbox{\ignorespaces #2}%
+ \ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
+ \setbox0 = \hbox{\ignorespaces #3}%
+ \ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
+ \epsfbox{#1.eps}%
+ \else
+ % For XeTeX
+ \doxeteximage{#1}{#2}{#3}%
+ \fi
\fi
%
\ifimagevmode
%
\ifx\thiscaption\empty \else
\ifx\floatident\empty \else
- \appendtomacro\captionline{: }% had ident, so need a colon between
+ \appendtomacro\captionline{: }% had ident, so need a colon between
\fi
%
% caption text.
% \floatlabel-lof. Besides \floatident, we include the short
% caption if specified, else the full caption if specified, else nothing.
{%
+ \requireauxfile
\atdummies
%
- % since we read the caption text in the macro world, where ^^M
- % is turned into a normal character, we have to scan it back, so
- % we don't write the literal three characters "^^M" into the aux file.
- \scanexp{%
- \xdef\noexpand\gtemp{%
- \ifx\thisshortcaption\empty
- \thiscaption
- \else
- \thisshortcaption
- \fi
- }%
- }%
+ \ifx\thisshortcaption\empty
+ \def\gtemp{\thiscaption}%
+ \else
+ \def\gtemp{\thisshortcaption}%
+ \fi
\immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident
- \ifx\gtemp\empty \else : \gtemp \fi}}%
+ \ifx\gtemp\empty \else : \gtemp \fi}}%
}%
\fi
\egroup % end of \vtop
%
- % place the captured inserts
- %
- % BEWARE: when the floats start floating, we have to issue warning
- % whenever an insert appears inside a float which could possibly
- % float. --kasal, 26may04
- %
\checkinserts
}
{
\catcode`\_ = \active
\globaldefs=1
-\parseargdef\documentlanguage{\begingroup
- \let_=\normalunderscore % normal _ character for filenames
+\parseargdef\documentlanguage{%
\tex % read txi-??.tex file in plain TeX.
% Read the file by the name they passed if it exists.
+ \let_ = \normalunderscore % normal _ character for filename test
\openin 1 txi-#1.tex
\ifeof 1
- \documentlanguagetrywithoutunderscore{#1_\finish}%
+ \documentlanguagetrywithoutunderscore #1_\finish
\else
\globaldefs = 1 % everything in the txi-LL files needs to persist
\input txi-#1.tex
\fi
\closein 1
\endgroup % end raw TeX
-\endgroup}
+}
%
% If they passed de_DE, and txi-de_DE.tex doesn't exist,
% try txi-de.tex.
\global\righthyphenmin = #3\relax
}
+% XeTeX and LuaTeX can handle Unicode natively.
+% Their default I/O uses UTF-8 sequences instead of a byte-wise operation.
+% Other TeX engines' I/O (pdfTeX, etc.) is byte-wise.
+%
+\newif\iftxinativeunicodecapable
+\newif\iftxiusebytewiseio
+
+\ifx\XeTeXrevision\thisisundefined
+ \ifx\luatexversion\thisisundefined
+ \txinativeunicodecapablefalse
+ \txiusebytewiseiotrue
+ \else
+ \txinativeunicodecapabletrue
+ \txiusebytewiseiofalse
+ \fi
+\else
+ \txinativeunicodecapabletrue
+ \txiusebytewiseiofalse
+\fi
+
+% Set I/O by bytes instead of UTF-8 sequence for XeTeX and LuaTex
+% for non-UTF-8 (byte-wise) encodings.
+%
+\def\setbytewiseio{%
+ \ifx\XeTeXrevision\thisisundefined
+ \else
+ \XeTeXdefaultencoding "bytes" % For subsequent files to be read
+ \XeTeXinputencoding "bytes" % For document root file
+ % Unfortunately, there seems to be no corresponding XeTeX command for
+ % output encoding. This is a problem for auxiliary index and TOC files.
+ % The only solution would be perhaps to write out @U{...} sequences in
+ % place of non-ASCII characters.
+ \fi
+
+ \ifx\luatexversion\thisisundefined
+ \else
+ \directlua{
+ local utf8_char, byte, gsub = unicode.utf8.char, string.byte, string.gsub
+ local function convert_char (char)
+ return utf8_char(byte(char))
+ end
+
+ local function convert_line (line)
+ return gsub(line, ".", convert_char)
+ end
+
+ callback.register("process_input_buffer", convert_line)
+
+ local function convert_line_out (line)
+ local line_out = ""
+ for c in string.utfvalues(line) do
+ line_out = line_out .. string.char(c)
+ end
+ return line_out
+ end
+
+ callback.register("process_output_buffer", convert_line_out)
+ }
+ \fi
+
+ \txiusebytewiseiotrue
+}
+
+
% Helpers for encodings.
% Set the catcode of characters 128 through 255 to the specified number.
%
% @documentencoding sets the definition of non-ASCII characters
% according to the specified encoding.
%
-\parseargdef\documentencoding{%
+\def\documentencoding{\parseargusing\filenamecatcodes\documentencodingzzz}
+\def\documentencodingzzz#1{%
+ %
% Encoding being declared for the document.
\def\declaredencoding{\csname #1.enc\endcsname}%
%
\asciichardefs
%
\else \ifx \declaredencoding \lattwo
+ \iftxinativeunicodecapable
+ \setbytewiseio
+ \fi
\setnonasciicharscatcode\active
\lattwochardefs
%
\else \ifx \declaredencoding \latone
+ \iftxinativeunicodecapable
+ \setbytewiseio
+ \fi
\setnonasciicharscatcode\active
\latonechardefs
%
\else \ifx \declaredencoding \latnine
+ \iftxinativeunicodecapable
+ \setbytewiseio
+ \fi
\setnonasciicharscatcode\active
\latninechardefs
%
\else \ifx \declaredencoding \utfeight
- \setnonasciicharscatcode\active
- \utfeightchardefs
+ \iftxinativeunicodecapable
+ % For native Unicode handling (XeTeX and LuaTeX)
+ \nativeunicodechardefs
+ \else
+ % For treating UTF-8 as byte sequences (TeX, eTeX and pdfTeX)
+ \setnonasciicharscatcode\active
+ % since we already invoked \utfeightchardefs at the top level
+ % (below), do not re-invoke it, otherwise our check for duplicated
+ % definitions gets triggered. Making non-ascii chars active is
+ % sufficient.
+ \fi
%
\else
- \message{Unknown document encoding #1, ignoring.}%
+ \message{Ignoring unknown document encoding: #1.}%
%
\fi % utfeight
\fi % latnine
\fi % latone
\fi % lattwo
\fi % ascii
+ %
+ \ifx\XeTeXrevision\thisisundefined
+ \else
+ \ifx \declaredencoding \utfeight
+ \else
+ \ifx \declaredencoding \ascii
+ \else
+ \message{Warning: XeTeX with non-UTF-8 encodings cannot handle %
+ non-ASCII characters in auxiliary files.}%
+ \fi
+ \fi
+ \fi
}
+% emacs-page
% A message to be logged when using a character that isn't available
% the default font encoding (OT1).
%
-\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}}
+\def\missingcharmsg#1{\message{Character missing, sorry: #1.}}
% Take account of \c (plain) vs. \, (Texinfo) difference.
\def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi}
% macros containing the character definitions.
\setnonasciicharscatcode\active
%
+
+\def\gdefchar#1#2{%
+\gdef#1{%
+ \ifpassthroughchars
+ \string#1%
+ \else
+ #2%
+ \fi
+}}
+
% Latin1 (ISO-8859-1) character definitions.
\def\latonechardefs{%
- \gdef^^a0{\tie}
- \gdef^^a1{\exclamdown}
- \gdef^^a2{\missingcharmsg{CENT SIGN}}
- \gdef^^a3{{\pounds}}
- \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
- \gdef^^a5{\missingcharmsg{YEN SIGN}}
- \gdef^^a6{\missingcharmsg{BROKEN BAR}}
- \gdef^^a7{\S}
- \gdef^^a8{\"{}}
- \gdef^^a9{\copyright}
- \gdef^^aa{\ordf}
- \gdef^^ab{\guillemetleft}
- \gdef^^ac{$\lnot$}
- \gdef^^ad{\-}
- \gdef^^ae{\registeredsymbol}
- \gdef^^af{\={}}
- %
- \gdef^^b0{\textdegree}
- \gdef^^b1{$\pm$}
- \gdef^^b2{$^2$}
- \gdef^^b3{$^3$}
- \gdef^^b4{\'{}}
- \gdef^^b5{$\mu$}
- \gdef^^b6{\P}
- %
- \gdef^^b7{$^.$}
- \gdef^^b8{\cedilla\ }
- \gdef^^b9{$^1$}
- \gdef^^ba{\ordm}
- %
- \gdef^^bb{\guillemetright}
- \gdef^^bc{$1\over4$}
- \gdef^^bd{$1\over2$}
- \gdef^^be{$3\over4$}
- \gdef^^bf{\questiondown}
- %
- \gdef^^c0{\`A}
- \gdef^^c1{\'A}
- \gdef^^c2{\^A}
- \gdef^^c3{\~A}
- \gdef^^c4{\"A}
- \gdef^^c5{\ringaccent A}
- \gdef^^c6{\AE}
- \gdef^^c7{\cedilla C}
- \gdef^^c8{\`E}
- \gdef^^c9{\'E}
- \gdef^^ca{\^E}
- \gdef^^cb{\"E}
- \gdef^^cc{\`I}
- \gdef^^cd{\'I}
- \gdef^^ce{\^I}
- \gdef^^cf{\"I}
- %
- \gdef^^d0{\DH}
- \gdef^^d1{\~N}
- \gdef^^d2{\`O}
- \gdef^^d3{\'O}
- \gdef^^d4{\^O}
- \gdef^^d5{\~O}
- \gdef^^d6{\"O}
- \gdef^^d7{$\times$}
- \gdef^^d8{\O}
- \gdef^^d9{\`U}
- \gdef^^da{\'U}
- \gdef^^db{\^U}
- \gdef^^dc{\"U}
- \gdef^^dd{\'Y}
- \gdef^^de{\TH}
- \gdef^^df{\ss}
- %
- \gdef^^e0{\`a}
- \gdef^^e1{\'a}
- \gdef^^e2{\^a}
- \gdef^^e3{\~a}
- \gdef^^e4{\"a}
- \gdef^^e5{\ringaccent a}
- \gdef^^e6{\ae}
- \gdef^^e7{\cedilla c}
- \gdef^^e8{\`e}
- \gdef^^e9{\'e}
- \gdef^^ea{\^e}
- \gdef^^eb{\"e}
- \gdef^^ec{\`{\dotless i}}
- \gdef^^ed{\'{\dotless i}}
- \gdef^^ee{\^{\dotless i}}
- \gdef^^ef{\"{\dotless i}}
- %
- \gdef^^f0{\dh}
- \gdef^^f1{\~n}
- \gdef^^f2{\`o}
- \gdef^^f3{\'o}
- \gdef^^f4{\^o}
- \gdef^^f5{\~o}
- \gdef^^f6{\"o}
- \gdef^^f7{$\div$}
- \gdef^^f8{\o}
- \gdef^^f9{\`u}
- \gdef^^fa{\'u}
- \gdef^^fb{\^u}
- \gdef^^fc{\"u}
- \gdef^^fd{\'y}
- \gdef^^fe{\th}
- \gdef^^ff{\"y}
+ \gdefchar^^a0{\tie}
+ \gdefchar^^a1{\exclamdown}
+ \gdefchar^^a2{{\tcfont \char162}} % cent
+ \gdefchar^^a3{\pounds{}}
+ \gdefchar^^a4{{\tcfont \char164}} % currency
+ \gdefchar^^a5{{\tcfont \char165}} % yen
+ \gdefchar^^a6{{\tcfont \char166}} % broken bar
+ \gdefchar^^a7{\S}
+ \gdefchar^^a8{\"{}}
+ \gdefchar^^a9{\copyright{}}
+ \gdefchar^^aa{\ordf}
+ \gdefchar^^ab{\guillemetleft{}}
+ \gdefchar^^ac{\ensuremath\lnot}
+ \gdefchar^^ad{\-}
+ \gdefchar^^ae{\registeredsymbol{}}
+ \gdefchar^^af{\={}}
+ %
+ \gdefchar^^b0{\textdegree}
+ \gdefchar^^b1{$\pm$}
+ \gdefchar^^b2{$^2$}
+ \gdefchar^^b3{$^3$}
+ \gdefchar^^b4{\'{}}
+ \gdefchar^^b5{$\mu$}
+ \gdefchar^^b6{\P}
+ \gdefchar^^b7{\ensuremath\cdot}
+ \gdefchar^^b8{\cedilla\ }
+ \gdefchar^^b9{$^1$}
+ \gdefchar^^ba{\ordm}
+ \gdefchar^^bb{\guillemetright{}}
+ \gdefchar^^bc{$1\over4$}
+ \gdefchar^^bd{$1\over2$}
+ \gdefchar^^be{$3\over4$}
+ \gdefchar^^bf{\questiondown}
+ %
+ \gdefchar^^c0{\`A}
+ \gdefchar^^c1{\'A}
+ \gdefchar^^c2{\^A}
+ \gdefchar^^c3{\~A}
+ \gdefchar^^c4{\"A}
+ \gdefchar^^c5{\ringaccent A}
+ \gdefchar^^c6{\AE}
+ \gdefchar^^c7{\cedilla C}
+ \gdefchar^^c8{\`E}
+ \gdefchar^^c9{\'E}
+ \gdefchar^^ca{\^E}
+ \gdefchar^^cb{\"E}
+ \gdefchar^^cc{\`I}
+ \gdefchar^^cd{\'I}
+ \gdefchar^^ce{\^I}
+ \gdefchar^^cf{\"I}
+ %
+ \gdefchar^^d0{\DH}
+ \gdefchar^^d1{\~N}
+ \gdefchar^^d2{\`O}
+ \gdefchar^^d3{\'O}
+ \gdefchar^^d4{\^O}
+ \gdefchar^^d5{\~O}
+ \gdefchar^^d6{\"O}
+ \gdefchar^^d7{$\times$}
+ \gdefchar^^d8{\O}
+ \gdefchar^^d9{\`U}
+ \gdefchar^^da{\'U}
+ \gdefchar^^db{\^U}
+ \gdefchar^^dc{\"U}
+ \gdefchar^^dd{\'Y}
+ \gdefchar^^de{\TH}
+ \gdefchar^^df{\ss}
+ %
+ \gdefchar^^e0{\`a}
+ \gdefchar^^e1{\'a}
+ \gdefchar^^e2{\^a}
+ \gdefchar^^e3{\~a}
+ \gdefchar^^e4{\"a}
+ \gdefchar^^e5{\ringaccent a}
+ \gdefchar^^e6{\ae}
+ \gdefchar^^e7{\cedilla c}
+ \gdefchar^^e8{\`e}
+ \gdefchar^^e9{\'e}
+ \gdefchar^^ea{\^e}
+ \gdefchar^^eb{\"e}
+ \gdefchar^^ec{\`{\dotless i}}
+ \gdefchar^^ed{\'{\dotless i}}
+ \gdefchar^^ee{\^{\dotless i}}
+ \gdefchar^^ef{\"{\dotless i}}
+ %
+ \gdefchar^^f0{\dh}
+ \gdefchar^^f1{\~n}
+ \gdefchar^^f2{\`o}
+ \gdefchar^^f3{\'o}
+ \gdefchar^^f4{\^o}
+ \gdefchar^^f5{\~o}
+ \gdefchar^^f6{\"o}
+ \gdefchar^^f7{$\div$}
+ \gdefchar^^f8{\o}
+ \gdefchar^^f9{\`u}
+ \gdefchar^^fa{\'u}
+ \gdefchar^^fb{\^u}
+ \gdefchar^^fc{\"u}
+ \gdefchar^^fd{\'y}
+ \gdefchar^^fe{\th}
+ \gdefchar^^ff{\"y}
}
% Latin9 (ISO-8859-15) encoding character definitions.
% Encoding is almost identical to Latin1.
\latonechardefs
%
- \gdef^^a4{\euro}
- \gdef^^a6{\v S}
- \gdef^^a8{\v s}
- \gdef^^b4{\v Z}
- \gdef^^b8{\v z}
- \gdef^^bc{\OE}
- \gdef^^bd{\oe}
- \gdef^^be{\"Y}
+ \gdefchar^^a4{\euro{}}
+ \gdefchar^^a6{\v S}
+ \gdefchar^^a8{\v s}
+ \gdefchar^^b4{\v Z}
+ \gdefchar^^b8{\v z}
+ \gdefchar^^bc{\OE}
+ \gdefchar^^bd{\oe}
+ \gdefchar^^be{\"Y}
}
% Latin2 (ISO-8859-2) character definitions.
\def\lattwochardefs{%
- \gdef^^a0{\tie}
- \gdef^^a1{\ogonek{A}}
- \gdef^^a2{\u{}}
- \gdef^^a3{\L}
- \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
- \gdef^^a5{\v L}
- \gdef^^a6{\'S}
- \gdef^^a7{\S}
- \gdef^^a8{\"{}}
- \gdef^^a9{\v S}
- \gdef^^aa{\cedilla S}
- \gdef^^ab{\v T}
- \gdef^^ac{\'Z}
- \gdef^^ad{\-}
- \gdef^^ae{\v Z}
- \gdef^^af{\dotaccent Z}
- %
- \gdef^^b0{\textdegree}
- \gdef^^b1{\ogonek{a}}
- \gdef^^b2{\ogonek{ }}
- \gdef^^b3{\l}
- \gdef^^b4{\'{}}
- \gdef^^b5{\v l}
- \gdef^^b6{\'s}
- \gdef^^b7{\v{}}
- \gdef^^b8{\cedilla\ }
- \gdef^^b9{\v s}
- \gdef^^ba{\cedilla s}
- \gdef^^bb{\v t}
- \gdef^^bc{\'z}
- \gdef^^bd{\H{}}
- \gdef^^be{\v z}
- \gdef^^bf{\dotaccent z}
- %
- \gdef^^c0{\'R}
- \gdef^^c1{\'A}
- \gdef^^c2{\^A}
- \gdef^^c3{\u A}
- \gdef^^c4{\"A}
- \gdef^^c5{\'L}
- \gdef^^c6{\'C}
- \gdef^^c7{\cedilla C}
- \gdef^^c8{\v C}
- \gdef^^c9{\'E}
- \gdef^^ca{\ogonek{E}}
- \gdef^^cb{\"E}
- \gdef^^cc{\v E}
- \gdef^^cd{\'I}
- \gdef^^ce{\^I}
- \gdef^^cf{\v D}
- %
- \gdef^^d0{\DH}
- \gdef^^d1{\'N}
- \gdef^^d2{\v N}
- \gdef^^d3{\'O}
- \gdef^^d4{\^O}
- \gdef^^d5{\H O}
- \gdef^^d6{\"O}
- \gdef^^d7{$\times$}
- \gdef^^d8{\v R}
- \gdef^^d9{\ringaccent U}
- \gdef^^da{\'U}
- \gdef^^db{\H U}
- \gdef^^dc{\"U}
- \gdef^^dd{\'Y}
- \gdef^^de{\cedilla T}
- \gdef^^df{\ss}
- %
- \gdef^^e0{\'r}
- \gdef^^e1{\'a}
- \gdef^^e2{\^a}
- \gdef^^e3{\u a}
- \gdef^^e4{\"a}
- \gdef^^e5{\'l}
- \gdef^^e6{\'c}
- \gdef^^e7{\cedilla c}
- \gdef^^e8{\v c}
- \gdef^^e9{\'e}
- \gdef^^ea{\ogonek{e}}
- \gdef^^eb{\"e}
- \gdef^^ec{\v e}
- \gdef^^ed{\'{\dotless{i}}}
- \gdef^^ee{\^{\dotless{i}}}
- \gdef^^ef{\v d}
- %
- \gdef^^f0{\dh}
- \gdef^^f1{\'n}
- \gdef^^f2{\v n}
- \gdef^^f3{\'o}
- \gdef^^f4{\^o}
- \gdef^^f5{\H o}
- \gdef^^f6{\"o}
- \gdef^^f7{$\div$}
- \gdef^^f8{\v r}
- \gdef^^f9{\ringaccent u}
- \gdef^^fa{\'u}
- \gdef^^fb{\H u}
- \gdef^^fc{\"u}
- \gdef^^fd{\'y}
- \gdef^^fe{\cedilla t}
- \gdef^^ff{\dotaccent{}}
+ \gdefchar^^a0{\tie}
+ \gdefchar^^a1{\ogonek{A}}
+ \gdefchar^^a2{\u{}}
+ \gdefchar^^a3{\L}
+ \gdefchar^^a4{\missingcharmsg{CURRENCY SIGN}}
+ \gdefchar^^a5{\v L}
+ \gdefchar^^a6{\'S}
+ \gdefchar^^a7{\S}
+ \gdefchar^^a8{\"{}}
+ \gdefchar^^a9{\v S}
+ \gdefchar^^aa{\cedilla S}
+ \gdefchar^^ab{\v T}
+ \gdefchar^^ac{\'Z}
+ \gdefchar^^ad{\-}
+ \gdefchar^^ae{\v Z}
+ \gdefchar^^af{\dotaccent Z}
+ %
+ \gdefchar^^b0{\textdegree{}}
+ \gdefchar^^b1{\ogonek{a}}
+ \gdefchar^^b2{\ogonek{ }}
+ \gdefchar^^b3{\l}
+ \gdefchar^^b4{\'{}}
+ \gdefchar^^b5{\v l}
+ \gdefchar^^b6{\'s}
+ \gdefchar^^b7{\v{}}
+ \gdefchar^^b8{\cedilla\ }
+ \gdefchar^^b9{\v s}
+ \gdefchar^^ba{\cedilla s}
+ \gdefchar^^bb{\v t}
+ \gdefchar^^bc{\'z}
+ \gdefchar^^bd{\H{}}
+ \gdefchar^^be{\v z}
+ \gdefchar^^bf{\dotaccent z}
+ %
+ \gdefchar^^c0{\'R}
+ \gdefchar^^c1{\'A}
+ \gdefchar^^c2{\^A}
+ \gdefchar^^c3{\u A}
+ \gdefchar^^c4{\"A}
+ \gdefchar^^c5{\'L}
+ \gdefchar^^c6{\'C}
+ \gdefchar^^c7{\cedilla C}
+ \gdefchar^^c8{\v C}
+ \gdefchar^^c9{\'E}
+ \gdefchar^^ca{\ogonek{E}}
+ \gdefchar^^cb{\"E}
+ \gdefchar^^cc{\v E}
+ \gdefchar^^cd{\'I}
+ \gdefchar^^ce{\^I}
+ \gdefchar^^cf{\v D}
+ %
+ \gdefchar^^d0{\DH}
+ \gdefchar^^d1{\'N}
+ \gdefchar^^d2{\v N}
+ \gdefchar^^d3{\'O}
+ \gdefchar^^d4{\^O}
+ \gdefchar^^d5{\H O}
+ \gdefchar^^d6{\"O}
+ \gdefchar^^d7{$\times$}
+ \gdefchar^^d8{\v R}
+ \gdefchar^^d9{\ringaccent U}
+ \gdefchar^^da{\'U}
+ \gdefchar^^db{\H U}
+ \gdefchar^^dc{\"U}
+ \gdefchar^^dd{\'Y}
+ \gdefchar^^de{\cedilla T}
+ \gdefchar^^df{\ss}
+ %
+ \gdefchar^^e0{\'r}
+ \gdefchar^^e1{\'a}
+ \gdefchar^^e2{\^a}
+ \gdefchar^^e3{\u a}
+ \gdefchar^^e4{\"a}
+ \gdefchar^^e5{\'l}
+ \gdefchar^^e6{\'c}
+ \gdefchar^^e7{\cedilla c}
+ \gdefchar^^e8{\v c}
+ \gdefchar^^e9{\'e}
+ \gdefchar^^ea{\ogonek{e}}
+ \gdefchar^^eb{\"e}
+ \gdefchar^^ec{\v e}
+ \gdefchar^^ed{\'{\dotless{i}}}
+ \gdefchar^^ee{\^{\dotless{i}}}
+ \gdefchar^^ef{\v d}
+ %
+ \gdefchar^^f0{\dh}
+ \gdefchar^^f1{\'n}
+ \gdefchar^^f2{\v n}
+ \gdefchar^^f3{\'o}
+ \gdefchar^^f4{\^o}
+ \gdefchar^^f5{\H o}
+ \gdefchar^^f6{\"o}
+ \gdefchar^^f7{$\div$}
+ \gdefchar^^f8{\v r}
+ \gdefchar^^f9{\ringaccent u}
+ \gdefchar^^fa{\'u}
+ \gdefchar^^fb{\H u}
+ \gdefchar^^fc{\"u}
+ \gdefchar^^fd{\'y}
+ \gdefchar^^fe{\cedilla t}
+ \gdefchar^^ff{\dotaccent{}}
}
% UTF-8 character definitions.
\fi
}
+% Give non-ASCII bytes the active definitions for processing UTF-8 sequences
\begingroup
\catcode`\~13
+ \catcode`\$12
\catcode`\"12
+ % Loop from \countUTFx to \countUTFy, performing \UTFviiiTmp
+ % substituting ~ and $ with a character token of that value.
\def\UTFviiiLoop{%
\global\catcode\countUTFx\active
\uccode`\~\countUTFx
+ \uccode`\$\countUTFx
\uppercase\expandafter{\UTFviiiTmp}%
\advance\countUTFx by 1
\ifnum\countUTFx < \countUTFy
\expandafter\UTFviiiLoop
\fi}
+ % For bytes other than the first in a UTF-8 sequence. Not expected to
+ % be expanded except when writing to auxiliary files.
+ \countUTFx = "80
+ \countUTFy = "C2
+ \def\UTFviiiTmp{%
+ \gdef~{%
+ \ifpassthroughchars $\fi}}%
+ \UTFviiiLoop
+
\countUTFx = "C2
\countUTFy = "E0
\def\UTFviiiTmp{%
- \xdef~{\noexpand\UTFviiiTwoOctets\string~}}
+ \gdef~{%
+ \ifpassthroughchars $%
+ \else\expandafter\UTFviiiTwoOctets\expandafter$\fi}}%
\UTFviiiLoop
\countUTFx = "E0
\countUTFy = "F0
\def\UTFviiiTmp{%
- \xdef~{\noexpand\UTFviiiThreeOctets\string~}}
+ \gdef~{%
+ \ifpassthroughchars $%
+ \else\expandafter\UTFviiiThreeOctets\expandafter$\fi}}%
\UTFviiiLoop
\countUTFx = "F0
\countUTFy = "F4
\def\UTFviiiTmp{%
- \xdef~{\noexpand\UTFviiiFourOctets\string~}}
+ \gdef~{%
+ \ifpassthroughchars $%
+ \else\expandafter\UTFviiiFourOctets\expandafter$\fi
+ }}%
\UTFviiiLoop
\endgroup
+\def\globallet{\global\let} % save some \expandafter's below
+
+% @U{xxxx} to produce U+xxxx, if we support it.
+\def\U#1{%
+ \expandafter\ifx\csname uni:#1\endcsname \relax
+ \iftxinativeunicodecapable
+ % All Unicode characters can be used if native Unicode handling is
+ % active. However, if the font does not have the glyph,
+ % letters are missing.
+ \begingroup
+ \uccode`\.="#1\relax
+ \uppercase{.}
+ \endgroup
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unicode character U+#1 not supported, sorry}%
+ \fi
+ \else
+ \csname uni:#1\endcsname
+ \fi
+}
+
+% These macros are used here to construct the name of a control
+% sequence to be defined.
+\def\UTFviiiTwoOctetsName#1#2{%
+ \csname u8:#1\string #2\endcsname}%
+\def\UTFviiiThreeOctetsName#1#2#3{%
+ \csname u8:#1\string #2\string #3\endcsname}%
+\def\UTFviiiFourOctetsName#1#2#3#4{%
+ \csname u8:#1\string #2\string #3\string #4\endcsname}%
+
+% For UTF-8 byte sequences (TeX, e-TeX and pdfTeX),
+% provide a definition macro to replace a Unicode character;
+% this gets used by the @U command
+%
\begingroup
\catcode`\"=12
\catcode`\<=12
\catcode`\;=12
\catcode`\!=12
\catcode`\~=13
-
- \gdef\DeclareUnicodeCharacter#1#2{%
+ \gdef\DeclareUnicodeCharacterUTFviii#1#2{%
\countUTFz = "#1\relax
- %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}%
\begingroup
\parseXMLCharref
- \def\UTFviiiTwoOctets##1##2{%
- \csname u8:##1\string ##2\endcsname}%
- \def\UTFviiiThreeOctets##1##2##3{%
- \csname u8:##1\string ##2\string ##3\endcsname}%
- \def\UTFviiiFourOctets##1##2##3##4{%
- \csname u8:##1\string ##2\string ##3\string ##4\endcsname}%
- \expandafter\expandafter\expandafter\expandafter
- \expandafter\expandafter\expandafter
- \gdef\UTFviiiTmp{#2}%
+
+ % Give \u8:... its definition. The sequence of seven \expandafter's
+ % expands after the \gdef three times, e.g.
+ %
+ % 1. \UTFviiTwoOctetsName B1 B2
+ % 2. \csname u8:B1 \string B2 \endcsname
+ % 3. \u8: B1 B2 (a single control sequence token)
+ %
+ \expandafter\expandafter
+ \expandafter\expandafter
+ \expandafter\expandafter
+ \expandafter\gdef \UTFviiiTmp{#2}%
+ %
+ \expandafter\ifx\csname uni:#1\endcsname \relax \else
+ \message{Internal error, already defined: #1}%
+ \fi
+ %
+ % define an additional control sequence for this code point.
+ \expandafter\globallet\csname uni:#1\endcsname \UTFviiiTmp
\endgroup}
-
+ %
+ % Given the value in \countUTFz as a Unicode code point, set \UTFviiiTmp
+ % to the corresponding UTF-8 sequence.
\gdef\parseXMLCharref{%
\ifnum\countUTFz < "A0\relax
\errhelp = \EMsimple
\errmessage{Cannot define Unicode char value < 00A0}%
\else\ifnum\countUTFz < "800\relax
\parseUTFviiiA,%
- \parseUTFviiiB C\UTFviiiTwoOctets.,%
+ \parseUTFviiiB C\UTFviiiTwoOctetsName.,%
\else\ifnum\countUTFz < "10000\relax
\parseUTFviiiA;%
\parseUTFviiiA,%
- \parseUTFviiiB E\UTFviiiThreeOctets.{,;}%
+ \parseUTFviiiB E\UTFviiiThreeOctetsName.{,;}%
\else
\parseUTFviiiA;%
\parseUTFviiiA,%
\parseUTFviiiA!%
- \parseUTFviiiB F\UTFviiiFourOctets.{!,;}%
+ \parseUTFviiiB F\UTFviiiFourOctetsName.{!,;}%
\fi\fi\fi
}
+ % Extract a byte from the end of the UTF-8 representation of \countUTFx.
+ % It must be a non-initial byte in the sequence.
+ % Change \uccode of #1 for it to be used in \parseUTFviiiB as one
+ % of the bytes.
\gdef\parseUTFviiiA#1{%
\countUTFx = \countUTFz
\divide\countUTFz by 64
- \countUTFy = \countUTFz
+ \countUTFy = \countUTFz % Save to be the future value of \countUTFz.
\multiply\countUTFz by 64
+
+ % \countUTFz is now \countUTFx with the last 5 bits cleared. Subtract
+ % in order to get the last five bits.
\advance\countUTFx by -\countUTFz
+
+ % Convert this to the byte in the UTF-8 sequence.
\advance\countUTFx by 128
\uccode `#1\countUTFx
\countUTFz = \countUTFy}
+ % Used to put a UTF-8 byte sequence into \UTFviiiTmp
+ % #1 is the increment for \countUTFz to yield a the first byte of the UTF-8
+ % sequence.
+ % #2 is one of the \UTFviii*OctetsName macros.
+ % #3 is always a full stop (.)
+ % #4 is a template for the other bytes in the sequence. The values for these
+ % bytes is substituted in here with \uppercase using the \uccode's.
\gdef\parseUTFviiiB#1#2#3#4{%
\advance\countUTFz by "#10\relax
\uccode `#3\countUTFz
\uppercase{\gdef\UTFviiiTmp{#2#3#4}}}
\endgroup
+% For native Unicode handling (XeTeX and LuaTeX),
+% provide a definition macro that sets a catcode to `other' non-globally
+%
+\def\DeclareUnicodeCharacterNativeOther#1#2{%
+ \catcode"#1=\other
+}
+
+% https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_M
+% U+0000..U+007F = https://en.wikipedia.org/wiki/Basic_Latin_(Unicode_block)
+% U+0080..U+00FF = https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)
+% U+0100..U+017F = https://en.wikipedia.org/wiki/Latin_Extended-A
+% U+0180..U+024F = https://en.wikipedia.org/wiki/Latin_Extended-B
+%
+% Many of our renditions are less than wonderful, and all the missing
+% characters are available somewhere. Loading the necessary fonts
+% awaits user request. We can't truly support Unicode without
+% reimplementing everything that's been done in LaTeX for many years,
+% plus probably using luatex or xetex, and who knows what else.
+% We won't be doing that here in this simple file. But we can try to at
+% least make most of the characters not bomb out.
+%
+\def\unicodechardefs{%
+ \DeclareUnicodeCharacter{00A0}{\tie}%
+ \DeclareUnicodeCharacter{00A1}{\exclamdown}%
+ \DeclareUnicodeCharacter{00A2}{{\tcfont \char162}}% 0242=cent
+ \DeclareUnicodeCharacter{00A3}{\pounds{}}%
+ \DeclareUnicodeCharacter{00A4}{{\tcfont \char164}}% 0244=currency
+ \DeclareUnicodeCharacter{00A5}{{\tcfont \char165}}% 0245=yen
+ \DeclareUnicodeCharacter{00A6}{{\tcfont \char166}}% 0246=brokenbar
+ \DeclareUnicodeCharacter{00A7}{\S}%
+ \DeclareUnicodeCharacter{00A8}{\"{ }}%
+ \DeclareUnicodeCharacter{00A9}{\copyright{}}%
+ \DeclareUnicodeCharacter{00AA}{\ordf}%
+ \DeclareUnicodeCharacter{00AB}{\guillemetleft{}}%
+ \DeclareUnicodeCharacter{00AC}{\ensuremath\lnot}%
+ \DeclareUnicodeCharacter{00AD}{\-}%
+ \DeclareUnicodeCharacter{00AE}{\registeredsymbol{}}%
+ \DeclareUnicodeCharacter{00AF}{\={ }}%
+ %
+ \DeclareUnicodeCharacter{00B0}{\ringaccent{ }}%
+ \DeclareUnicodeCharacter{00B1}{\ensuremath\pm}%
+ \DeclareUnicodeCharacter{00B2}{$^2$}%
+ \DeclareUnicodeCharacter{00B3}{$^3$}%
+ \DeclareUnicodeCharacter{00B4}{\'{ }}%
+ \DeclareUnicodeCharacter{00B5}{$\mu$}%
+ \DeclareUnicodeCharacter{00B6}{\P}%
+ \DeclareUnicodeCharacter{00B7}{\ensuremath\cdot}%
+ \DeclareUnicodeCharacter{00B8}{\cedilla{ }}%
+ \DeclareUnicodeCharacter{00B9}{$^1$}%
+ \DeclareUnicodeCharacter{00BA}{\ordm}%
+ \DeclareUnicodeCharacter{00BB}{\guillemetright{}}%
+ \DeclareUnicodeCharacter{00BC}{$1\over4$}%
+ \DeclareUnicodeCharacter{00BD}{$1\over2$}%
+ \DeclareUnicodeCharacter{00BE}{$3\over4$}%
+ \DeclareUnicodeCharacter{00BF}{\questiondown}%
+ %
+ \DeclareUnicodeCharacter{00C0}{\`A}%
+ \DeclareUnicodeCharacter{00C1}{\'A}%
+ \DeclareUnicodeCharacter{00C2}{\^A}%
+ \DeclareUnicodeCharacter{00C3}{\~A}%
+ \DeclareUnicodeCharacter{00C4}{\"A}%
+ \DeclareUnicodeCharacter{00C5}{\AA}%
+ \DeclareUnicodeCharacter{00C6}{\AE}%
+ \DeclareUnicodeCharacter{00C7}{\cedilla{C}}%
+ \DeclareUnicodeCharacter{00C8}{\`E}%
+ \DeclareUnicodeCharacter{00C9}{\'E}%
+ \DeclareUnicodeCharacter{00CA}{\^E}%
+ \DeclareUnicodeCharacter{00CB}{\"E}%
+ \DeclareUnicodeCharacter{00CC}{\`I}%
+ \DeclareUnicodeCharacter{00CD}{\'I}%
+ \DeclareUnicodeCharacter{00CE}{\^I}%
+ \DeclareUnicodeCharacter{00CF}{\"I}%
+ %
+ \DeclareUnicodeCharacter{00D0}{\DH}%
+ \DeclareUnicodeCharacter{00D1}{\~N}%
+ \DeclareUnicodeCharacter{00D2}{\`O}%
+ \DeclareUnicodeCharacter{00D3}{\'O}%
+ \DeclareUnicodeCharacter{00D4}{\^O}%
+ \DeclareUnicodeCharacter{00D5}{\~O}%
+ \DeclareUnicodeCharacter{00D6}{\"O}%
+ \DeclareUnicodeCharacter{00D7}{\ensuremath\times}%
+ \DeclareUnicodeCharacter{00D8}{\O}%
+ \DeclareUnicodeCharacter{00D9}{\`U}%
+ \DeclareUnicodeCharacter{00DA}{\'U}%
+ \DeclareUnicodeCharacter{00DB}{\^U}%
+ \DeclareUnicodeCharacter{00DC}{\"U}%
+ \DeclareUnicodeCharacter{00DD}{\'Y}%
+ \DeclareUnicodeCharacter{00DE}{\TH}%
+ \DeclareUnicodeCharacter{00DF}{\ss}%
+ %
+ \DeclareUnicodeCharacter{00E0}{\`a}%
+ \DeclareUnicodeCharacter{00E1}{\'a}%
+ \DeclareUnicodeCharacter{00E2}{\^a}%
+ \DeclareUnicodeCharacter{00E3}{\~a}%
+ \DeclareUnicodeCharacter{00E4}{\"a}%
+ \DeclareUnicodeCharacter{00E5}{\aa}%
+ \DeclareUnicodeCharacter{00E6}{\ae}%
+ \DeclareUnicodeCharacter{00E7}{\cedilla{c}}%
+ \DeclareUnicodeCharacter{00E8}{\`e}%
+ \DeclareUnicodeCharacter{00E9}{\'e}%
+ \DeclareUnicodeCharacter{00EA}{\^e}%
+ \DeclareUnicodeCharacter{00EB}{\"e}%
+ \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}}%
+ \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}}%
+ \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}}%
+ \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}}%
+ %
+ \DeclareUnicodeCharacter{00F0}{\dh}%
+ \DeclareUnicodeCharacter{00F1}{\~n}%
+ \DeclareUnicodeCharacter{00F2}{\`o}%
+ \DeclareUnicodeCharacter{00F3}{\'o}%
+ \DeclareUnicodeCharacter{00F4}{\^o}%
+ \DeclareUnicodeCharacter{00F5}{\~o}%
+ \DeclareUnicodeCharacter{00F6}{\"o}%
+ \DeclareUnicodeCharacter{00F7}{\ensuremath\div}%
+ \DeclareUnicodeCharacter{00F8}{\o}%
+ \DeclareUnicodeCharacter{00F9}{\`u}%
+ \DeclareUnicodeCharacter{00FA}{\'u}%
+ \DeclareUnicodeCharacter{00FB}{\^u}%
+ \DeclareUnicodeCharacter{00FC}{\"u}%
+ \DeclareUnicodeCharacter{00FD}{\'y}%
+ \DeclareUnicodeCharacter{00FE}{\th}%
+ \DeclareUnicodeCharacter{00FF}{\"y}%
+ %
+ \DeclareUnicodeCharacter{0100}{\=A}%
+ \DeclareUnicodeCharacter{0101}{\=a}%
+ \DeclareUnicodeCharacter{0102}{\u{A}}%
+ \DeclareUnicodeCharacter{0103}{\u{a}}%
+ \DeclareUnicodeCharacter{0104}{\ogonek{A}}%
+ \DeclareUnicodeCharacter{0105}{\ogonek{a}}%
+ \DeclareUnicodeCharacter{0106}{\'C}%
+ \DeclareUnicodeCharacter{0107}{\'c}%
+ \DeclareUnicodeCharacter{0108}{\^C}%
+ \DeclareUnicodeCharacter{0109}{\^c}%
+ \DeclareUnicodeCharacter{010A}{\dotaccent{C}}%
+ \DeclareUnicodeCharacter{010B}{\dotaccent{c}}%
+ \DeclareUnicodeCharacter{010C}{\v{C}}%
+ \DeclareUnicodeCharacter{010D}{\v{c}}%
+ \DeclareUnicodeCharacter{010E}{\v{D}}%
+ \DeclareUnicodeCharacter{010F}{d'}%
+ %
+ \DeclareUnicodeCharacter{0110}{\DH}%
+ \DeclareUnicodeCharacter{0111}{\dh}%
+ \DeclareUnicodeCharacter{0112}{\=E}%
+ \DeclareUnicodeCharacter{0113}{\=e}%
+ \DeclareUnicodeCharacter{0114}{\u{E}}%
+ \DeclareUnicodeCharacter{0115}{\u{e}}%
+ \DeclareUnicodeCharacter{0116}{\dotaccent{E}}%
+ \DeclareUnicodeCharacter{0117}{\dotaccent{e}}%
+ \DeclareUnicodeCharacter{0118}{\ogonek{E}}%
+ \DeclareUnicodeCharacter{0119}{\ogonek{e}}%
+ \DeclareUnicodeCharacter{011A}{\v{E}}%
+ \DeclareUnicodeCharacter{011B}{\v{e}}%
+ \DeclareUnicodeCharacter{011C}{\^G}%
+ \DeclareUnicodeCharacter{011D}{\^g}%
+ \DeclareUnicodeCharacter{011E}{\u{G}}%
+ \DeclareUnicodeCharacter{011F}{\u{g}}%
+ %
+ \DeclareUnicodeCharacter{0120}{\dotaccent{G}}%
+ \DeclareUnicodeCharacter{0121}{\dotaccent{g}}%
+ \DeclareUnicodeCharacter{0122}{\cedilla{G}}%
+ \DeclareUnicodeCharacter{0123}{\cedilla{g}}%
+ \DeclareUnicodeCharacter{0124}{\^H}%
+ \DeclareUnicodeCharacter{0125}{\^h}%
+ \DeclareUnicodeCharacter{0126}{\missingcharmsg{H WITH STROKE}}%
+ \DeclareUnicodeCharacter{0127}{\missingcharmsg{h WITH STROKE}}%
+ \DeclareUnicodeCharacter{0128}{\~I}%
+ \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}}%
+ \DeclareUnicodeCharacter{012A}{\=I}%
+ \DeclareUnicodeCharacter{012B}{\={\dotless{i}}}%
+ \DeclareUnicodeCharacter{012C}{\u{I}}%
+ \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}}%
+ \DeclareUnicodeCharacter{012E}{\ogonek{I}}%
+ \DeclareUnicodeCharacter{012F}{\ogonek{i}}%
+ %
+ \DeclareUnicodeCharacter{0130}{\dotaccent{I}}%
+ \DeclareUnicodeCharacter{0131}{\dotless{i}}%
+ \DeclareUnicodeCharacter{0132}{IJ}%
+ \DeclareUnicodeCharacter{0133}{ij}%
+ \DeclareUnicodeCharacter{0134}{\^J}%
+ \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}}%
+ \DeclareUnicodeCharacter{0136}{\cedilla{K}}%
+ \DeclareUnicodeCharacter{0137}{\cedilla{k}}%
+ \DeclareUnicodeCharacter{0138}{\ensuremath\kappa}%
+ \DeclareUnicodeCharacter{0139}{\'L}%
+ \DeclareUnicodeCharacter{013A}{\'l}%
+ \DeclareUnicodeCharacter{013B}{\cedilla{L}}%
+ \DeclareUnicodeCharacter{013C}{\cedilla{l}}%
+ \DeclareUnicodeCharacter{013D}{L'}% should kern
+ \DeclareUnicodeCharacter{013E}{l'}% should kern
+ \DeclareUnicodeCharacter{013F}{L\U{00B7}}%
+ %
+ \DeclareUnicodeCharacter{0140}{l\U{00B7}}%
+ \DeclareUnicodeCharacter{0141}{\L}%
+ \DeclareUnicodeCharacter{0142}{\l}%
+ \DeclareUnicodeCharacter{0143}{\'N}%
+ \DeclareUnicodeCharacter{0144}{\'n}%
+ \DeclareUnicodeCharacter{0145}{\cedilla{N}}%
+ \DeclareUnicodeCharacter{0146}{\cedilla{n}}%
+ \DeclareUnicodeCharacter{0147}{\v{N}}%
+ \DeclareUnicodeCharacter{0148}{\v{n}}%
+ \DeclareUnicodeCharacter{0149}{'n}%
+ \DeclareUnicodeCharacter{014A}{\missingcharmsg{ENG}}%
+ \DeclareUnicodeCharacter{014B}{\missingcharmsg{eng}}%
+ \DeclareUnicodeCharacter{014C}{\=O}%
+ \DeclareUnicodeCharacter{014D}{\=o}%
+ \DeclareUnicodeCharacter{014E}{\u{O}}%
+ \DeclareUnicodeCharacter{014F}{\u{o}}%
+ %
+ \DeclareUnicodeCharacter{0150}{\H{O}}%
+ \DeclareUnicodeCharacter{0151}{\H{o}}%
+ \DeclareUnicodeCharacter{0152}{\OE}%
+ \DeclareUnicodeCharacter{0153}{\oe}%
+ \DeclareUnicodeCharacter{0154}{\'R}%
+ \DeclareUnicodeCharacter{0155}{\'r}%
+ \DeclareUnicodeCharacter{0156}{\cedilla{R}}%
+ \DeclareUnicodeCharacter{0157}{\cedilla{r}}%
+ \DeclareUnicodeCharacter{0158}{\v{R}}%
+ \DeclareUnicodeCharacter{0159}{\v{r}}%
+ \DeclareUnicodeCharacter{015A}{\'S}%
+ \DeclareUnicodeCharacter{015B}{\'s}%
+ \DeclareUnicodeCharacter{015C}{\^S}%
+ \DeclareUnicodeCharacter{015D}{\^s}%
+ \DeclareUnicodeCharacter{015E}{\cedilla{S}}%
+ \DeclareUnicodeCharacter{015F}{\cedilla{s}}%
+ %
+ \DeclareUnicodeCharacter{0160}{\v{S}}%
+ \DeclareUnicodeCharacter{0161}{\v{s}}%
+ \DeclareUnicodeCharacter{0162}{\cedilla{T}}%
+ \DeclareUnicodeCharacter{0163}{\cedilla{t}}%
+ \DeclareUnicodeCharacter{0164}{\v{T}}%
+ \DeclareUnicodeCharacter{0165}{\v{t}}%
+ \DeclareUnicodeCharacter{0166}{\missingcharmsg{H WITH STROKE}}%
+ \DeclareUnicodeCharacter{0167}{\missingcharmsg{h WITH STROKE}}%
+ \DeclareUnicodeCharacter{0168}{\~U}%
+ \DeclareUnicodeCharacter{0169}{\~u}%
+ \DeclareUnicodeCharacter{016A}{\=U}%
+ \DeclareUnicodeCharacter{016B}{\=u}%
+ \DeclareUnicodeCharacter{016C}{\u{U}}%
+ \DeclareUnicodeCharacter{016D}{\u{u}}%
+ \DeclareUnicodeCharacter{016E}{\ringaccent{U}}%
+ \DeclareUnicodeCharacter{016F}{\ringaccent{u}}%
+ %
+ \DeclareUnicodeCharacter{0170}{\H{U}}%
+ \DeclareUnicodeCharacter{0171}{\H{u}}%
+ \DeclareUnicodeCharacter{0172}{\ogonek{U}}%
+ \DeclareUnicodeCharacter{0173}{\ogonek{u}}%
+ \DeclareUnicodeCharacter{0174}{\^W}%
+ \DeclareUnicodeCharacter{0175}{\^w}%
+ \DeclareUnicodeCharacter{0176}{\^Y}%
+ \DeclareUnicodeCharacter{0177}{\^y}%
+ \DeclareUnicodeCharacter{0178}{\"Y}%
+ \DeclareUnicodeCharacter{0179}{\'Z}%
+ \DeclareUnicodeCharacter{017A}{\'z}%
+ \DeclareUnicodeCharacter{017B}{\dotaccent{Z}}%
+ \DeclareUnicodeCharacter{017C}{\dotaccent{z}}%
+ \DeclareUnicodeCharacter{017D}{\v{Z}}%
+ \DeclareUnicodeCharacter{017E}{\v{z}}%
+ \DeclareUnicodeCharacter{017F}{\missingcharmsg{LONG S}}%
+ %
+ \DeclareUnicodeCharacter{01C4}{D\v{Z}}%
+ \DeclareUnicodeCharacter{01C5}{D\v{z}}%
+ \DeclareUnicodeCharacter{01C6}{d\v{z}}%
+ \DeclareUnicodeCharacter{01C7}{LJ}%
+ \DeclareUnicodeCharacter{01C8}{Lj}%
+ \DeclareUnicodeCharacter{01C9}{lj}%
+ \DeclareUnicodeCharacter{01CA}{NJ}%
+ \DeclareUnicodeCharacter{01CB}{Nj}%
+ \DeclareUnicodeCharacter{01CC}{nj}%
+ \DeclareUnicodeCharacter{01CD}{\v{A}}%
+ \DeclareUnicodeCharacter{01CE}{\v{a}}%
+ \DeclareUnicodeCharacter{01CF}{\v{I}}%
+ %
+ \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}}%
+ \DeclareUnicodeCharacter{01D1}{\v{O}}%
+ \DeclareUnicodeCharacter{01D2}{\v{o}}%
+ \DeclareUnicodeCharacter{01D3}{\v{U}}%
+ \DeclareUnicodeCharacter{01D4}{\v{u}}%
+ %
+ \DeclareUnicodeCharacter{01E2}{\={\AE}}%
+ \DeclareUnicodeCharacter{01E3}{\={\ae}}%
+ \DeclareUnicodeCharacter{01E6}{\v{G}}%
+ \DeclareUnicodeCharacter{01E7}{\v{g}}%
+ \DeclareUnicodeCharacter{01E8}{\v{K}}%
+ \DeclareUnicodeCharacter{01E9}{\v{k}}%
+ %
+ \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}}%
+ \DeclareUnicodeCharacter{01F1}{DZ}%
+ \DeclareUnicodeCharacter{01F2}{Dz}%
+ \DeclareUnicodeCharacter{01F3}{dz}%
+ \DeclareUnicodeCharacter{01F4}{\'G}%
+ \DeclareUnicodeCharacter{01F5}{\'g}%
+ \DeclareUnicodeCharacter{01F8}{\`N}%
+ \DeclareUnicodeCharacter{01F9}{\`n}%
+ \DeclareUnicodeCharacter{01FC}{\'{\AE}}%
+ \DeclareUnicodeCharacter{01FD}{\'{\ae}}%
+ \DeclareUnicodeCharacter{01FE}{\'{\O}}%
+ \DeclareUnicodeCharacter{01FF}{\'{\o}}%
+ %
+ \DeclareUnicodeCharacter{021E}{\v{H}}%
+ \DeclareUnicodeCharacter{021F}{\v{h}}%
+ %
+ \DeclareUnicodeCharacter{0226}{\dotaccent{A}}%
+ \DeclareUnicodeCharacter{0227}{\dotaccent{a}}%
+ \DeclareUnicodeCharacter{0228}{\cedilla{E}}%
+ \DeclareUnicodeCharacter{0229}{\cedilla{e}}%
+ \DeclareUnicodeCharacter{022E}{\dotaccent{O}}%
+ \DeclareUnicodeCharacter{022F}{\dotaccent{o}}%
+ %
+ \DeclareUnicodeCharacter{0232}{\=Y}%
+ \DeclareUnicodeCharacter{0233}{\=y}%
+ \DeclareUnicodeCharacter{0237}{\dotless{j}}%
+ %
+ \DeclareUnicodeCharacter{02DB}{\ogonek{ }}%
+ %
+ % Greek letters upper case
+ \DeclareUnicodeCharacter{0391}{{\it A}}%
+ \DeclareUnicodeCharacter{0392}{{\it B}}%
+ \DeclareUnicodeCharacter{0393}{\ensuremath{\mit\Gamma}}%
+ \DeclareUnicodeCharacter{0394}{\ensuremath{\mit\Delta}}%
+ \DeclareUnicodeCharacter{0395}{{\it E}}%
+ \DeclareUnicodeCharacter{0396}{{\it Z}}%
+ \DeclareUnicodeCharacter{0397}{{\it H}}%
+ \DeclareUnicodeCharacter{0398}{\ensuremath{\mit\Theta}}%
+ \DeclareUnicodeCharacter{0399}{{\it I}}%
+ \DeclareUnicodeCharacter{039A}{{\it K}}%
+ \DeclareUnicodeCharacter{039B}{\ensuremath{\mit\Lambda}}%
+ \DeclareUnicodeCharacter{039C}{{\it M}}%
+ \DeclareUnicodeCharacter{039D}{{\it N}}%
+ \DeclareUnicodeCharacter{039E}{\ensuremath{\mit\Xi}}%
+ \DeclareUnicodeCharacter{039F}{{\it O}}%
+ \DeclareUnicodeCharacter{03A0}{\ensuremath{\mit\Pi}}%
+ \DeclareUnicodeCharacter{03A1}{{\it P}}%
+ %\DeclareUnicodeCharacter{03A2}{} % none - corresponds to final sigma
+ \DeclareUnicodeCharacter{03A3}{\ensuremath{\mit\Sigma}}%
+ \DeclareUnicodeCharacter{03A4}{{\it T}}%
+ \DeclareUnicodeCharacter{03A5}{\ensuremath{\mit\Upsilon}}%
+ \DeclareUnicodeCharacter{03A6}{\ensuremath{\mit\Phi}}%
+ \DeclareUnicodeCharacter{03A7}{{\it X}}%
+ \DeclareUnicodeCharacter{03A8}{\ensuremath{\mit\Psi}}%
+ \DeclareUnicodeCharacter{03A9}{\ensuremath{\mit\Omega}}%
+ %
+ % Vowels with accents
+ \DeclareUnicodeCharacter{0390}{\ensuremath{\ddot{\acute\iota}}}%
+ \DeclareUnicodeCharacter{03AC}{\ensuremath{\acute\alpha}}%
+ \DeclareUnicodeCharacter{03AD}{\ensuremath{\acute\epsilon}}%
+ \DeclareUnicodeCharacter{03AE}{\ensuremath{\acute\eta}}%
+ \DeclareUnicodeCharacter{03AF}{\ensuremath{\acute\iota}}%
+ \DeclareUnicodeCharacter{03B0}{\ensuremath{\acute{\ddot\upsilon}}}%
+ %
+ % Standalone accent
+ \DeclareUnicodeCharacter{0384}{\ensuremath{\acute{\ }}}%
+ %
+ % Greek letters lower case
+ \DeclareUnicodeCharacter{03B1}{\ensuremath\alpha}%
+ \DeclareUnicodeCharacter{03B2}{\ensuremath\beta}%
+ \DeclareUnicodeCharacter{03B3}{\ensuremath\gamma}%
+ \DeclareUnicodeCharacter{03B4}{\ensuremath\delta}%
+ \DeclareUnicodeCharacter{03B5}{\ensuremath\epsilon}%
+ \DeclareUnicodeCharacter{03B6}{\ensuremath\zeta}%
+ \DeclareUnicodeCharacter{03B7}{\ensuremath\eta}%
+ \DeclareUnicodeCharacter{03B8}{\ensuremath\theta}%
+ \DeclareUnicodeCharacter{03B9}{\ensuremath\iota}%
+ \DeclareUnicodeCharacter{03BA}{\ensuremath\kappa}%
+ \DeclareUnicodeCharacter{03BB}{\ensuremath\lambda}%
+ \DeclareUnicodeCharacter{03BC}{\ensuremath\mu}%
+ \DeclareUnicodeCharacter{03BD}{\ensuremath\nu}%
+ \DeclareUnicodeCharacter{03BE}{\ensuremath\xi}%
+ \DeclareUnicodeCharacter{03BF}{{\it o}}% omicron
+ \DeclareUnicodeCharacter{03C0}{\ensuremath\pi}%
+ \DeclareUnicodeCharacter{03C1}{\ensuremath\rho}%
+ \DeclareUnicodeCharacter{03C2}{\ensuremath\varsigma}%
+ \DeclareUnicodeCharacter{03C3}{\ensuremath\sigma}%
+ \DeclareUnicodeCharacter{03C4}{\ensuremath\tau}%
+ \DeclareUnicodeCharacter{03C5}{\ensuremath\upsilon}%
+ \DeclareUnicodeCharacter{03C6}{\ensuremath\phi}%
+ \DeclareUnicodeCharacter{03C7}{\ensuremath\chi}%
+ \DeclareUnicodeCharacter{03C8}{\ensuremath\psi}%
+ \DeclareUnicodeCharacter{03C9}{\ensuremath\omega}%
+ %
+ % More Greek vowels with accents
+ \DeclareUnicodeCharacter{03CA}{\ensuremath{\ddot\iota}}%
+ \DeclareUnicodeCharacter{03CB}{\ensuremath{\ddot\upsilon}}%
+ \DeclareUnicodeCharacter{03CC}{\ensuremath{\acute o}}%
+ \DeclareUnicodeCharacter{03CD}{\ensuremath{\acute\upsilon}}%
+ \DeclareUnicodeCharacter{03CE}{\ensuremath{\acute\omega}}%
+ %
+ % Variant Greek letters
+ \DeclareUnicodeCharacter{03D1}{\ensuremath\vartheta}%
+ \DeclareUnicodeCharacter{03D6}{\ensuremath\varpi}%
+ \DeclareUnicodeCharacter{03F1}{\ensuremath\varrho}%
+ %
+ \DeclareUnicodeCharacter{1E02}{\dotaccent{B}}%
+ \DeclareUnicodeCharacter{1E03}{\dotaccent{b}}%
+ \DeclareUnicodeCharacter{1E04}{\udotaccent{B}}%
+ \DeclareUnicodeCharacter{1E05}{\udotaccent{b}}%
+ \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}}%
+ \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}}%
+ \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}}%
+ \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}}%
+ \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}}%
+ \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}}%
+ \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}}%
+ \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}}%
+ %
+ \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}}%
+ \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}}%
+ %
+ \DeclareUnicodeCharacter{1E20}{\=G}%
+ \DeclareUnicodeCharacter{1E21}{\=g}%
+ \DeclareUnicodeCharacter{1E22}{\dotaccent{H}}%
+ \DeclareUnicodeCharacter{1E23}{\dotaccent{h}}%
+ \DeclareUnicodeCharacter{1E24}{\udotaccent{H}}%
+ \DeclareUnicodeCharacter{1E25}{\udotaccent{h}}%
+ \DeclareUnicodeCharacter{1E26}{\"H}%
+ \DeclareUnicodeCharacter{1E27}{\"h}%
+ %
+ \DeclareUnicodeCharacter{1E30}{\'K}%
+ \DeclareUnicodeCharacter{1E31}{\'k}%
+ \DeclareUnicodeCharacter{1E32}{\udotaccent{K}}%
+ \DeclareUnicodeCharacter{1E33}{\udotaccent{k}}%
+ \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}}%
+ \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}}%
+ \DeclareUnicodeCharacter{1E36}{\udotaccent{L}}%
+ \DeclareUnicodeCharacter{1E37}{\udotaccent{l}}%
+ \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}}%
+ \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}}%
+ \DeclareUnicodeCharacter{1E3E}{\'M}%
+ \DeclareUnicodeCharacter{1E3F}{\'m}%
+ %
+ \DeclareUnicodeCharacter{1E40}{\dotaccent{M}}%
+ \DeclareUnicodeCharacter{1E41}{\dotaccent{m}}%
+ \DeclareUnicodeCharacter{1E42}{\udotaccent{M}}%
+ \DeclareUnicodeCharacter{1E43}{\udotaccent{m}}%
+ \DeclareUnicodeCharacter{1E44}{\dotaccent{N}}%
+ \DeclareUnicodeCharacter{1E45}{\dotaccent{n}}%
+ \DeclareUnicodeCharacter{1E46}{\udotaccent{N}}%
+ \DeclareUnicodeCharacter{1E47}{\udotaccent{n}}%
+ \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}}%
+ \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}}%
+ %
+ \DeclareUnicodeCharacter{1E54}{\'P}%
+ \DeclareUnicodeCharacter{1E55}{\'p}%
+ \DeclareUnicodeCharacter{1E56}{\dotaccent{P}}%
+ \DeclareUnicodeCharacter{1E57}{\dotaccent{p}}%
+ \DeclareUnicodeCharacter{1E58}{\dotaccent{R}}%
+ \DeclareUnicodeCharacter{1E59}{\dotaccent{r}}%
+ \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}}%
+ \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}}%
+ \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}}%
+ \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}}%
+ %
+ \DeclareUnicodeCharacter{1E60}{\dotaccent{S}}%
+ \DeclareUnicodeCharacter{1E61}{\dotaccent{s}}%
+ \DeclareUnicodeCharacter{1E62}{\udotaccent{S}}%
+ \DeclareUnicodeCharacter{1E63}{\udotaccent{s}}%
+ \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}}%
+ \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}}%
+ \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}}%
+ \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}}%
+ \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}}%
+ \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}}%
+ %
+ \DeclareUnicodeCharacter{1E7C}{\~V}%
+ \DeclareUnicodeCharacter{1E7D}{\~v}%
+ \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}}%
+ \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}}%
+ %
+ \DeclareUnicodeCharacter{1E80}{\`W}%
+ \DeclareUnicodeCharacter{1E81}{\`w}%
+ \DeclareUnicodeCharacter{1E82}{\'W}%
+ \DeclareUnicodeCharacter{1E83}{\'w}%
+ \DeclareUnicodeCharacter{1E84}{\"W}%
+ \DeclareUnicodeCharacter{1E85}{\"w}%
+ \DeclareUnicodeCharacter{1E86}{\dotaccent{W}}%
+ \DeclareUnicodeCharacter{1E87}{\dotaccent{w}}%
+ \DeclareUnicodeCharacter{1E88}{\udotaccent{W}}%
+ \DeclareUnicodeCharacter{1E89}{\udotaccent{w}}%
+ \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}}%
+ \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}}%
+ \DeclareUnicodeCharacter{1E8C}{\"X}%
+ \DeclareUnicodeCharacter{1E8D}{\"x}%
+ \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}}%
+ \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}}%
+ %
+ \DeclareUnicodeCharacter{1E90}{\^Z}%
+ \DeclareUnicodeCharacter{1E91}{\^z}%
+ \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}}%
+ \DeclareUnicodeCharacter{1E93}{\udotaccent{z}}%
+ \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}}%
+ \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}}%
+ \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}}%
+ \DeclareUnicodeCharacter{1E97}{\"t}%
+ \DeclareUnicodeCharacter{1E98}{\ringaccent{w}}%
+ \DeclareUnicodeCharacter{1E99}{\ringaccent{y}}%
+ %
+ \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}}%
+ \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}}%
+ %
+ \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}}%
+ \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}}%
+ \DeclareUnicodeCharacter{1EBC}{\~E}%
+ \DeclareUnicodeCharacter{1EBD}{\~e}%
+ %
+ \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}}%
+ \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}}%
+ \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}}%
+ \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}}%
+ %
+ \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}}%
+ \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}}%
+ %
+ \DeclareUnicodeCharacter{1EF2}{\`Y}%
+ \DeclareUnicodeCharacter{1EF3}{\`y}%
+ \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}}%
+ %
+ \DeclareUnicodeCharacter{1EF8}{\~Y}%
+ \DeclareUnicodeCharacter{1EF9}{\~y}%
+ %
+ % Punctuation
+ \DeclareUnicodeCharacter{2013}{--}%
+ \DeclareUnicodeCharacter{2014}{---}%
+ \DeclareUnicodeCharacter{2018}{\quoteleft{}}%
+ \DeclareUnicodeCharacter{2019}{\quoteright{}}%
+ \DeclareUnicodeCharacter{201A}{\quotesinglbase{}}%
+ \DeclareUnicodeCharacter{201C}{\quotedblleft{}}%
+ \DeclareUnicodeCharacter{201D}{\quotedblright{}}%
+ \DeclareUnicodeCharacter{201E}{\quotedblbase{}}%
+ \DeclareUnicodeCharacter{2020}{\ensuremath\dagger}%
+ \DeclareUnicodeCharacter{2021}{\ensuremath\ddagger}%
+ \DeclareUnicodeCharacter{2022}{\bullet{}}%
+ \DeclareUnicodeCharacter{202F}{\thinspace}%
+ \DeclareUnicodeCharacter{2026}{\dots{}}%
+ \DeclareUnicodeCharacter{2039}{\guilsinglleft{}}%
+ \DeclareUnicodeCharacter{203A}{\guilsinglright{}}%
+ %
+ \DeclareUnicodeCharacter{20AC}{\euro{}}%
+ %
+ \DeclareUnicodeCharacter{2192}{\expansion{}}%
+ \DeclareUnicodeCharacter{21D2}{\result{}}%
+ %
+ % Mathematical symbols
+ \DeclareUnicodeCharacter{2200}{\ensuremath\forall}%
+ \DeclareUnicodeCharacter{2203}{\ensuremath\exists}%
+ \DeclareUnicodeCharacter{2208}{\ensuremath\in}%
+ \DeclareUnicodeCharacter{2212}{\minus{}}%
+ \DeclareUnicodeCharacter{2217}{\ast}%
+ \DeclareUnicodeCharacter{221E}{\ensuremath\infty}%
+ \DeclareUnicodeCharacter{2225}{\ensuremath\parallel}%
+ \DeclareUnicodeCharacter{2227}{\ensuremath\wedge}%
+ \DeclareUnicodeCharacter{2229}{\ensuremath\cap}%
+ \DeclareUnicodeCharacter{2261}{\equiv{}}%
+ \DeclareUnicodeCharacter{2264}{\ensuremath\leq}%
+ \DeclareUnicodeCharacter{2265}{\ensuremath\geq}%
+ \DeclareUnicodeCharacter{2282}{\ensuremath\subset}%
+ \DeclareUnicodeCharacter{2287}{\ensuremath\supseteq}%
+ %
+ \DeclareUnicodeCharacter{2016}{\ensuremath\Vert}%
+ \DeclareUnicodeCharacter{2032}{\ensuremath\prime}%
+ \DeclareUnicodeCharacter{210F}{\ensuremath\hbar}%
+ \DeclareUnicodeCharacter{2111}{\ensuremath\Im}%
+ \DeclareUnicodeCharacter{2113}{\ensuremath\ell}%
+ \DeclareUnicodeCharacter{2118}{\ensuremath\wp}%
+ \DeclareUnicodeCharacter{211C}{\ensuremath\Re}%
+ \DeclareUnicodeCharacter{2127}{\ensuremath\mho}%
+ \DeclareUnicodeCharacter{2135}{\ensuremath\aleph}%
+ \DeclareUnicodeCharacter{2190}{\ensuremath\leftarrow}%
+ \DeclareUnicodeCharacter{2191}{\ensuremath\uparrow}%
+ \DeclareUnicodeCharacter{2193}{\ensuremath\downarrow}%
+ \DeclareUnicodeCharacter{2194}{\ensuremath\leftrightarrow}%
+ \DeclareUnicodeCharacter{2195}{\ensuremath\updownarrow}%
+ \DeclareUnicodeCharacter{2196}{\ensuremath\nwarrow}%
+ \DeclareUnicodeCharacter{2197}{\ensuremath\nearrow}%
+ \DeclareUnicodeCharacter{2198}{\ensuremath\searrow}%
+ \DeclareUnicodeCharacter{2199}{\ensuremath\swarrow}%
+ \DeclareUnicodeCharacter{21A6}{\ensuremath\mapsto}%
+ \DeclareUnicodeCharacter{21A9}{\ensuremath\hookleftarrow}%
+ \DeclareUnicodeCharacter{21AA}{\ensuremath\hookrightarrow}%
+ \DeclareUnicodeCharacter{21BC}{\ensuremath\leftharpoonup}%
+ \DeclareUnicodeCharacter{21BD}{\ensuremath\leftharpoondown}%
+ \DeclareUnicodeCharacter{21BE}{\ensuremath\upharpoonright}%
+ \DeclareUnicodeCharacter{21C0}{\ensuremath\rightharpoonup}%
+ \DeclareUnicodeCharacter{21C1}{\ensuremath\rightharpoondown}%
+ \DeclareUnicodeCharacter{21CC}{\ensuremath\rightleftharpoons}%
+ \DeclareUnicodeCharacter{21D0}{\ensuremath\Leftarrow}%
+ \DeclareUnicodeCharacter{21D1}{\ensuremath\Uparrow}%
+ \DeclareUnicodeCharacter{21D3}{\ensuremath\Downarrow}%
+ \DeclareUnicodeCharacter{21D4}{\ensuremath\Leftrightarrow}%
+ \DeclareUnicodeCharacter{21D5}{\ensuremath\Updownarrow}%
+ \DeclareUnicodeCharacter{21DD}{\ensuremath\leadsto}%
+ \DeclareUnicodeCharacter{2201}{\ensuremath\complement}%
+ \DeclareUnicodeCharacter{2202}{\ensuremath\partial}%
+ \DeclareUnicodeCharacter{2205}{\ensuremath\emptyset}%
+ \DeclareUnicodeCharacter{2207}{\ensuremath\nabla}%
+ \DeclareUnicodeCharacter{2209}{\ensuremath\notin}%
+ \DeclareUnicodeCharacter{220B}{\ensuremath\owns}%
+ \DeclareUnicodeCharacter{220F}{\ensuremath\prod}%
+ \DeclareUnicodeCharacter{2210}{\ensuremath\coprod}%
+ \DeclareUnicodeCharacter{2211}{\ensuremath\sum}%
+ \DeclareUnicodeCharacter{2213}{\ensuremath\mp}%
+ \DeclareUnicodeCharacter{2218}{\ensuremath\circ}%
+ \DeclareUnicodeCharacter{221A}{\ensuremath\surd}%
+ \DeclareUnicodeCharacter{221D}{\ensuremath\propto}%
+ \DeclareUnicodeCharacter{2220}{\ensuremath\angle}%
+ \DeclareUnicodeCharacter{2223}{\ensuremath\mid}%
+ \DeclareUnicodeCharacter{2228}{\ensuremath\vee}%
+ \DeclareUnicodeCharacter{222A}{\ensuremath\cup}%
+ \DeclareUnicodeCharacter{222B}{\ensuremath\smallint}%
+ \DeclareUnicodeCharacter{222E}{\ensuremath\oint}%
+ \DeclareUnicodeCharacter{223C}{\ensuremath\sim}%
+ \DeclareUnicodeCharacter{2240}{\ensuremath\wr}%
+ \DeclareUnicodeCharacter{2243}{\ensuremath\simeq}%
+ \DeclareUnicodeCharacter{2245}{\ensuremath\cong}%
+ \DeclareUnicodeCharacter{2248}{\ensuremath\approx}%
+ \DeclareUnicodeCharacter{224D}{\ensuremath\asymp}%
+ \DeclareUnicodeCharacter{2250}{\ensuremath\doteq}%
+ \DeclareUnicodeCharacter{2260}{\ensuremath\neq}%
+ \DeclareUnicodeCharacter{226A}{\ensuremath\ll}%
+ \DeclareUnicodeCharacter{226B}{\ensuremath\gg}%
+ \DeclareUnicodeCharacter{227A}{\ensuremath\prec}%
+ \DeclareUnicodeCharacter{227B}{\ensuremath\succ}%
+ \DeclareUnicodeCharacter{2283}{\ensuremath\supset}%
+ \DeclareUnicodeCharacter{2286}{\ensuremath\subseteq}%
+ \DeclareUnicodeCharacter{228E}{\ensuremath\uplus}%
+ \DeclareUnicodeCharacter{228F}{\ensuremath\sqsubset}%
+ \DeclareUnicodeCharacter{2290}{\ensuremath\sqsupset}%
+ \DeclareUnicodeCharacter{2291}{\ensuremath\sqsubseteq}%
+ \DeclareUnicodeCharacter{2292}{\ensuremath\sqsupseteq}%
+ \DeclareUnicodeCharacter{2293}{\ensuremath\sqcap}%
+ \DeclareUnicodeCharacter{2294}{\ensuremath\sqcup}%
+ \DeclareUnicodeCharacter{2295}{\ensuremath\oplus}%
+ \DeclareUnicodeCharacter{2296}{\ensuremath\ominus}%
+ \DeclareUnicodeCharacter{2297}{\ensuremath\otimes}%
+ \DeclareUnicodeCharacter{2298}{\ensuremath\oslash}%
+ \DeclareUnicodeCharacter{2299}{\ensuremath\odot}%
+ \DeclareUnicodeCharacter{22A2}{\ensuremath\vdash}%
+ \DeclareUnicodeCharacter{22A3}{\ensuremath\dashv}%
+ \DeclareUnicodeCharacter{22A4}{\ensuremath\ptextop}%
+ \DeclareUnicodeCharacter{22A5}{\ensuremath\bot}%
+ \DeclareUnicodeCharacter{22A8}{\ensuremath\models}%
+ \DeclareUnicodeCharacter{22B4}{\ensuremath\unlhd}%
+ \DeclareUnicodeCharacter{22B5}{\ensuremath\unrhd}%
+ \DeclareUnicodeCharacter{22C0}{\ensuremath\bigwedge}%
+ \DeclareUnicodeCharacter{22C1}{\ensuremath\bigvee}%
+ \DeclareUnicodeCharacter{22C2}{\ensuremath\bigcap}%
+ \DeclareUnicodeCharacter{22C3}{\ensuremath\bigcup}%
+ \DeclareUnicodeCharacter{22C4}{\ensuremath\diamond}%
+ \DeclareUnicodeCharacter{22C5}{\ensuremath\cdot}%
+ \DeclareUnicodeCharacter{22C6}{\ensuremath\star}%
+ \DeclareUnicodeCharacter{22C8}{\ensuremath\bowtie}%
+ \DeclareUnicodeCharacter{2308}{\ensuremath\lceil}%
+ \DeclareUnicodeCharacter{2309}{\ensuremath\rceil}%
+ \DeclareUnicodeCharacter{230A}{\ensuremath\lfloor}%
+ \DeclareUnicodeCharacter{230B}{\ensuremath\rfloor}%
+ \DeclareUnicodeCharacter{2322}{\ensuremath\frown}%
+ \DeclareUnicodeCharacter{2323}{\ensuremath\smile}%
+ %
+ \DeclareUnicodeCharacter{25A1}{\ensuremath\Box}%
+ \DeclareUnicodeCharacter{25B3}{\ensuremath\triangle}%
+ \DeclareUnicodeCharacter{25B7}{\ensuremath\triangleright}%
+ \DeclareUnicodeCharacter{25BD}{\ensuremath\bigtriangledown}%
+ \DeclareUnicodeCharacter{25C1}{\ensuremath\triangleleft}%
+ \DeclareUnicodeCharacter{25C7}{\ensuremath\Diamond}%
+ \DeclareUnicodeCharacter{2660}{\ensuremath\spadesuit}%
+ \DeclareUnicodeCharacter{2661}{\ensuremath\heartsuit}%
+ \DeclareUnicodeCharacter{2662}{\ensuremath\diamondsuit}%
+ \DeclareUnicodeCharacter{2663}{\ensuremath\clubsuit}%
+ \DeclareUnicodeCharacter{266D}{\ensuremath\flat}%
+ \DeclareUnicodeCharacter{266E}{\ensuremath\natural}%
+ \DeclareUnicodeCharacter{266F}{\ensuremath\sharp}%
+ \DeclareUnicodeCharacter{26AA}{\ensuremath\bigcirc}%
+ \DeclareUnicodeCharacter{27B9}{\ensuremath\rangle}%
+ \DeclareUnicodeCharacter{27C2}{\ensuremath\perp}%
+ \DeclareUnicodeCharacter{27E8}{\ensuremath\langle}%
+ \DeclareUnicodeCharacter{27F5}{\ensuremath\longleftarrow}%
+ \DeclareUnicodeCharacter{27F6}{\ensuremath\longrightarrow}%
+ \DeclareUnicodeCharacter{27F7}{\ensuremath\longleftrightarrow}%
+ \DeclareUnicodeCharacter{27FC}{\ensuremath\longmapsto}%
+ \DeclareUnicodeCharacter{29F5}{\ensuremath\setminus}%
+ \DeclareUnicodeCharacter{2A00}{\ensuremath\bigodot}%
+ \DeclareUnicodeCharacter{2A01}{\ensuremath\bigoplus}%
+ \DeclareUnicodeCharacter{2A02}{\ensuremath\bigotimes}%
+ \DeclareUnicodeCharacter{2A04}{\ensuremath\biguplus}%
+ \DeclareUnicodeCharacter{2A06}{\ensuremath\bigsqcup}%
+ \DeclareUnicodeCharacter{2A1D}{\ensuremath\Join}%
+ \DeclareUnicodeCharacter{2A3F}{\ensuremath\amalg}%
+ \DeclareUnicodeCharacter{2AAF}{\ensuremath\preceq}%
+ \DeclareUnicodeCharacter{2AB0}{\ensuremath\succeq}%
+ %
+ \global\mathchardef\checkmark="1370% actually the square root sign
+ \DeclareUnicodeCharacter{2713}{\ensuremath\checkmark}%
+}% end of \unicodechardefs
+
+% UTF-8 byte sequence (pdfTeX) definitions (replacing and @U command)
+% It makes the setting that replace UTF-8 byte sequence.
\def\utfeightchardefs{%
- \DeclareUnicodeCharacter{00A0}{\tie}
- \DeclareUnicodeCharacter{00A1}{\exclamdown}
- \DeclareUnicodeCharacter{00A3}{\pounds}
- \DeclareUnicodeCharacter{00A8}{\"{ }}
- \DeclareUnicodeCharacter{00A9}{\copyright}
- \DeclareUnicodeCharacter{00AA}{\ordf}
- \DeclareUnicodeCharacter{00AB}{\guillemetleft}
- \DeclareUnicodeCharacter{00AD}{\-}
- \DeclareUnicodeCharacter{00AE}{\registeredsymbol}
- \DeclareUnicodeCharacter{00AF}{\={ }}
-
- \DeclareUnicodeCharacter{00B0}{\ringaccent{ }}
- \DeclareUnicodeCharacter{00B4}{\'{ }}
- \DeclareUnicodeCharacter{00B8}{\cedilla{ }}
- \DeclareUnicodeCharacter{00BA}{\ordm}
- \DeclareUnicodeCharacter{00BB}{\guillemetright}
- \DeclareUnicodeCharacter{00BF}{\questiondown}
-
- \DeclareUnicodeCharacter{00C0}{\`A}
- \DeclareUnicodeCharacter{00C1}{\'A}
- \DeclareUnicodeCharacter{00C2}{\^A}
- \DeclareUnicodeCharacter{00C3}{\~A}
- \DeclareUnicodeCharacter{00C4}{\"A}
- \DeclareUnicodeCharacter{00C5}{\AA}
- \DeclareUnicodeCharacter{00C6}{\AE}
- \DeclareUnicodeCharacter{00C7}{\cedilla{C}}
- \DeclareUnicodeCharacter{00C8}{\`E}
- \DeclareUnicodeCharacter{00C9}{\'E}
- \DeclareUnicodeCharacter{00CA}{\^E}
- \DeclareUnicodeCharacter{00CB}{\"E}
- \DeclareUnicodeCharacter{00CC}{\`I}
- \DeclareUnicodeCharacter{00CD}{\'I}
- \DeclareUnicodeCharacter{00CE}{\^I}
- \DeclareUnicodeCharacter{00CF}{\"I}
-
- \DeclareUnicodeCharacter{00D0}{\DH}
- \DeclareUnicodeCharacter{00D1}{\~N}
- \DeclareUnicodeCharacter{00D2}{\`O}
- \DeclareUnicodeCharacter{00D3}{\'O}
- \DeclareUnicodeCharacter{00D4}{\^O}
- \DeclareUnicodeCharacter{00D5}{\~O}
- \DeclareUnicodeCharacter{00D6}{\"O}
- \DeclareUnicodeCharacter{00D8}{\O}
- \DeclareUnicodeCharacter{00D9}{\`U}
- \DeclareUnicodeCharacter{00DA}{\'U}
- \DeclareUnicodeCharacter{00DB}{\^U}
- \DeclareUnicodeCharacter{00DC}{\"U}
- \DeclareUnicodeCharacter{00DD}{\'Y}
- \DeclareUnicodeCharacter{00DE}{\TH}
- \DeclareUnicodeCharacter{00DF}{\ss}
-
- \DeclareUnicodeCharacter{00E0}{\`a}
- \DeclareUnicodeCharacter{00E1}{\'a}
- \DeclareUnicodeCharacter{00E2}{\^a}
- \DeclareUnicodeCharacter{00E3}{\~a}
- \DeclareUnicodeCharacter{00E4}{\"a}
- \DeclareUnicodeCharacter{00E5}{\aa}
- \DeclareUnicodeCharacter{00E6}{\ae}
- \DeclareUnicodeCharacter{00E7}{\cedilla{c}}
- \DeclareUnicodeCharacter{00E8}{\`e}
- \DeclareUnicodeCharacter{00E9}{\'e}
- \DeclareUnicodeCharacter{00EA}{\^e}
- \DeclareUnicodeCharacter{00EB}{\"e}
- \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}}
- \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}}
- \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}}
- \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}}
-
- \DeclareUnicodeCharacter{00F0}{\dh}
- \DeclareUnicodeCharacter{00F1}{\~n}
- \DeclareUnicodeCharacter{00F2}{\`o}
- \DeclareUnicodeCharacter{00F3}{\'o}
- \DeclareUnicodeCharacter{00F4}{\^o}
- \DeclareUnicodeCharacter{00F5}{\~o}
- \DeclareUnicodeCharacter{00F6}{\"o}
- \DeclareUnicodeCharacter{00F8}{\o}
- \DeclareUnicodeCharacter{00F9}{\`u}
- \DeclareUnicodeCharacter{00FA}{\'u}
- \DeclareUnicodeCharacter{00FB}{\^u}
- \DeclareUnicodeCharacter{00FC}{\"u}
- \DeclareUnicodeCharacter{00FD}{\'y}
- \DeclareUnicodeCharacter{00FE}{\th}
- \DeclareUnicodeCharacter{00FF}{\"y}
-
- \DeclareUnicodeCharacter{0100}{\=A}
- \DeclareUnicodeCharacter{0101}{\=a}
- \DeclareUnicodeCharacter{0102}{\u{A}}
- \DeclareUnicodeCharacter{0103}{\u{a}}
- \DeclareUnicodeCharacter{0104}{\ogonek{A}}
- \DeclareUnicodeCharacter{0105}{\ogonek{a}}
- \DeclareUnicodeCharacter{0106}{\'C}
- \DeclareUnicodeCharacter{0107}{\'c}
- \DeclareUnicodeCharacter{0108}{\^C}
- \DeclareUnicodeCharacter{0109}{\^c}
- \DeclareUnicodeCharacter{0118}{\ogonek{E}}
- \DeclareUnicodeCharacter{0119}{\ogonek{e}}
- \DeclareUnicodeCharacter{010A}{\dotaccent{C}}
- \DeclareUnicodeCharacter{010B}{\dotaccent{c}}
- \DeclareUnicodeCharacter{010C}{\v{C}}
- \DeclareUnicodeCharacter{010D}{\v{c}}
- \DeclareUnicodeCharacter{010E}{\v{D}}
-
- \DeclareUnicodeCharacter{0112}{\=E}
- \DeclareUnicodeCharacter{0113}{\=e}
- \DeclareUnicodeCharacter{0114}{\u{E}}
- \DeclareUnicodeCharacter{0115}{\u{e}}
- \DeclareUnicodeCharacter{0116}{\dotaccent{E}}
- \DeclareUnicodeCharacter{0117}{\dotaccent{e}}
- \DeclareUnicodeCharacter{011A}{\v{E}}
- \DeclareUnicodeCharacter{011B}{\v{e}}
- \DeclareUnicodeCharacter{011C}{\^G}
- \DeclareUnicodeCharacter{011D}{\^g}
- \DeclareUnicodeCharacter{011E}{\u{G}}
- \DeclareUnicodeCharacter{011F}{\u{g}}
-
- \DeclareUnicodeCharacter{0120}{\dotaccent{G}}
- \DeclareUnicodeCharacter{0121}{\dotaccent{g}}
- \DeclareUnicodeCharacter{0124}{\^H}
- \DeclareUnicodeCharacter{0125}{\^h}
- \DeclareUnicodeCharacter{0128}{\~I}
- \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}}
- \DeclareUnicodeCharacter{012A}{\=I}
- \DeclareUnicodeCharacter{012B}{\={\dotless{i}}}
- \DeclareUnicodeCharacter{012C}{\u{I}}
- \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}}
-
- \DeclareUnicodeCharacter{0130}{\dotaccent{I}}
- \DeclareUnicodeCharacter{0131}{\dotless{i}}
- \DeclareUnicodeCharacter{0132}{IJ}
- \DeclareUnicodeCharacter{0133}{ij}
- \DeclareUnicodeCharacter{0134}{\^J}
- \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}}
- \DeclareUnicodeCharacter{0139}{\'L}
- \DeclareUnicodeCharacter{013A}{\'l}
-
- \DeclareUnicodeCharacter{0141}{\L}
- \DeclareUnicodeCharacter{0142}{\l}
- \DeclareUnicodeCharacter{0143}{\'N}
- \DeclareUnicodeCharacter{0144}{\'n}
- \DeclareUnicodeCharacter{0147}{\v{N}}
- \DeclareUnicodeCharacter{0148}{\v{n}}
- \DeclareUnicodeCharacter{014C}{\=O}
- \DeclareUnicodeCharacter{014D}{\=o}
- \DeclareUnicodeCharacter{014E}{\u{O}}
- \DeclareUnicodeCharacter{014F}{\u{o}}
-
- \DeclareUnicodeCharacter{0150}{\H{O}}
- \DeclareUnicodeCharacter{0151}{\H{o}}
- \DeclareUnicodeCharacter{0152}{\OE}
- \DeclareUnicodeCharacter{0153}{\oe}
- \DeclareUnicodeCharacter{0154}{\'R}
- \DeclareUnicodeCharacter{0155}{\'r}
- \DeclareUnicodeCharacter{0158}{\v{R}}
- \DeclareUnicodeCharacter{0159}{\v{r}}
- \DeclareUnicodeCharacter{015A}{\'S}
- \DeclareUnicodeCharacter{015B}{\'s}
- \DeclareUnicodeCharacter{015C}{\^S}
- \DeclareUnicodeCharacter{015D}{\^s}
- \DeclareUnicodeCharacter{015E}{\cedilla{S}}
- \DeclareUnicodeCharacter{015F}{\cedilla{s}}
-
- \DeclareUnicodeCharacter{0160}{\v{S}}
- \DeclareUnicodeCharacter{0161}{\v{s}}
- \DeclareUnicodeCharacter{0162}{\cedilla{t}}
- \DeclareUnicodeCharacter{0163}{\cedilla{T}}
- \DeclareUnicodeCharacter{0164}{\v{T}}
-
- \DeclareUnicodeCharacter{0168}{\~U}
- \DeclareUnicodeCharacter{0169}{\~u}
- \DeclareUnicodeCharacter{016A}{\=U}
- \DeclareUnicodeCharacter{016B}{\=u}
- \DeclareUnicodeCharacter{016C}{\u{U}}
- \DeclareUnicodeCharacter{016D}{\u{u}}
- \DeclareUnicodeCharacter{016E}{\ringaccent{U}}
- \DeclareUnicodeCharacter{016F}{\ringaccent{u}}
-
- \DeclareUnicodeCharacter{0170}{\H{U}}
- \DeclareUnicodeCharacter{0171}{\H{u}}
- \DeclareUnicodeCharacter{0174}{\^W}
- \DeclareUnicodeCharacter{0175}{\^w}
- \DeclareUnicodeCharacter{0176}{\^Y}
- \DeclareUnicodeCharacter{0177}{\^y}
- \DeclareUnicodeCharacter{0178}{\"Y}
- \DeclareUnicodeCharacter{0179}{\'Z}
- \DeclareUnicodeCharacter{017A}{\'z}
- \DeclareUnicodeCharacter{017B}{\dotaccent{Z}}
- \DeclareUnicodeCharacter{017C}{\dotaccent{z}}
- \DeclareUnicodeCharacter{017D}{\v{Z}}
- \DeclareUnicodeCharacter{017E}{\v{z}}
-
- \DeclareUnicodeCharacter{01C4}{D\v{Z}}
- \DeclareUnicodeCharacter{01C5}{D\v{z}}
- \DeclareUnicodeCharacter{01C6}{d\v{z}}
- \DeclareUnicodeCharacter{01C7}{LJ}
- \DeclareUnicodeCharacter{01C8}{Lj}
- \DeclareUnicodeCharacter{01C9}{lj}
- \DeclareUnicodeCharacter{01CA}{NJ}
- \DeclareUnicodeCharacter{01CB}{Nj}
- \DeclareUnicodeCharacter{01CC}{nj}
- \DeclareUnicodeCharacter{01CD}{\v{A}}
- \DeclareUnicodeCharacter{01CE}{\v{a}}
- \DeclareUnicodeCharacter{01CF}{\v{I}}
-
- \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}}
- \DeclareUnicodeCharacter{01D1}{\v{O}}
- \DeclareUnicodeCharacter{01D2}{\v{o}}
- \DeclareUnicodeCharacter{01D3}{\v{U}}
- \DeclareUnicodeCharacter{01D4}{\v{u}}
-
- \DeclareUnicodeCharacter{01E2}{\={\AE}}
- \DeclareUnicodeCharacter{01E3}{\={\ae}}
- \DeclareUnicodeCharacter{01E6}{\v{G}}
- \DeclareUnicodeCharacter{01E7}{\v{g}}
- \DeclareUnicodeCharacter{01E8}{\v{K}}
- \DeclareUnicodeCharacter{01E9}{\v{k}}
-
- \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}}
- \DeclareUnicodeCharacter{01F1}{DZ}
- \DeclareUnicodeCharacter{01F2}{Dz}
- \DeclareUnicodeCharacter{01F3}{dz}
- \DeclareUnicodeCharacter{01F4}{\'G}
- \DeclareUnicodeCharacter{01F5}{\'g}
- \DeclareUnicodeCharacter{01F8}{\`N}
- \DeclareUnicodeCharacter{01F9}{\`n}
- \DeclareUnicodeCharacter{01FC}{\'{\AE}}
- \DeclareUnicodeCharacter{01FD}{\'{\ae}}
- \DeclareUnicodeCharacter{01FE}{\'{\O}}
- \DeclareUnicodeCharacter{01FF}{\'{\o}}
-
- \DeclareUnicodeCharacter{021E}{\v{H}}
- \DeclareUnicodeCharacter{021F}{\v{h}}
-
- \DeclareUnicodeCharacter{0226}{\dotaccent{A}}
- \DeclareUnicodeCharacter{0227}{\dotaccent{a}}
- \DeclareUnicodeCharacter{0228}{\cedilla{E}}
- \DeclareUnicodeCharacter{0229}{\cedilla{e}}
- \DeclareUnicodeCharacter{022E}{\dotaccent{O}}
- \DeclareUnicodeCharacter{022F}{\dotaccent{o}}
-
- \DeclareUnicodeCharacter{0232}{\=Y}
- \DeclareUnicodeCharacter{0233}{\=y}
- \DeclareUnicodeCharacter{0237}{\dotless{j}}
-
- \DeclareUnicodeCharacter{02DB}{\ogonek{ }}
-
- \DeclareUnicodeCharacter{1E02}{\dotaccent{B}}
- \DeclareUnicodeCharacter{1E03}{\dotaccent{b}}
- \DeclareUnicodeCharacter{1E04}{\udotaccent{B}}
- \DeclareUnicodeCharacter{1E05}{\udotaccent{b}}
- \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}}
- \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}}
- \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}}
- \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}}
- \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}}
- \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}}
- \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}}
- \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}}
-
- \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}}
- \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}}
-
- \DeclareUnicodeCharacter{1E20}{\=G}
- \DeclareUnicodeCharacter{1E21}{\=g}
- \DeclareUnicodeCharacter{1E22}{\dotaccent{H}}
- \DeclareUnicodeCharacter{1E23}{\dotaccent{h}}
- \DeclareUnicodeCharacter{1E24}{\udotaccent{H}}
- \DeclareUnicodeCharacter{1E25}{\udotaccent{h}}
- \DeclareUnicodeCharacter{1E26}{\"H}
- \DeclareUnicodeCharacter{1E27}{\"h}
-
- \DeclareUnicodeCharacter{1E30}{\'K}
- \DeclareUnicodeCharacter{1E31}{\'k}
- \DeclareUnicodeCharacter{1E32}{\udotaccent{K}}
- \DeclareUnicodeCharacter{1E33}{\udotaccent{k}}
- \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}}
- \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}}
- \DeclareUnicodeCharacter{1E36}{\udotaccent{L}}
- \DeclareUnicodeCharacter{1E37}{\udotaccent{l}}
- \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}}
- \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}}
- \DeclareUnicodeCharacter{1E3E}{\'M}
- \DeclareUnicodeCharacter{1E3F}{\'m}
-
- \DeclareUnicodeCharacter{1E40}{\dotaccent{M}}
- \DeclareUnicodeCharacter{1E41}{\dotaccent{m}}
- \DeclareUnicodeCharacter{1E42}{\udotaccent{M}}
- \DeclareUnicodeCharacter{1E43}{\udotaccent{m}}
- \DeclareUnicodeCharacter{1E44}{\dotaccent{N}}
- \DeclareUnicodeCharacter{1E45}{\dotaccent{n}}
- \DeclareUnicodeCharacter{1E46}{\udotaccent{N}}
- \DeclareUnicodeCharacter{1E47}{\udotaccent{n}}
- \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}}
- \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}}
-
- \DeclareUnicodeCharacter{1E54}{\'P}
- \DeclareUnicodeCharacter{1E55}{\'p}
- \DeclareUnicodeCharacter{1E56}{\dotaccent{P}}
- \DeclareUnicodeCharacter{1E57}{\dotaccent{p}}
- \DeclareUnicodeCharacter{1E58}{\dotaccent{R}}
- \DeclareUnicodeCharacter{1E59}{\dotaccent{r}}
- \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}}
- \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}}
- \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}}
- \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}}
-
- \DeclareUnicodeCharacter{1E60}{\dotaccent{S}}
- \DeclareUnicodeCharacter{1E61}{\dotaccent{s}}
- \DeclareUnicodeCharacter{1E62}{\udotaccent{S}}
- \DeclareUnicodeCharacter{1E63}{\udotaccent{s}}
- \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}}
- \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}}
- \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}}
- \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}}
- \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}}
- \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}}
-
- \DeclareUnicodeCharacter{1E7C}{\~V}
- \DeclareUnicodeCharacter{1E7D}{\~v}
- \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}}
- \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}}
-
- \DeclareUnicodeCharacter{1E80}{\`W}
- \DeclareUnicodeCharacter{1E81}{\`w}
- \DeclareUnicodeCharacter{1E82}{\'W}
- \DeclareUnicodeCharacter{1E83}{\'w}
- \DeclareUnicodeCharacter{1E84}{\"W}
- \DeclareUnicodeCharacter{1E85}{\"w}
- \DeclareUnicodeCharacter{1E86}{\dotaccent{W}}
- \DeclareUnicodeCharacter{1E87}{\dotaccent{w}}
- \DeclareUnicodeCharacter{1E88}{\udotaccent{W}}
- \DeclareUnicodeCharacter{1E89}{\udotaccent{w}}
- \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}}
- \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}}
- \DeclareUnicodeCharacter{1E8C}{\"X}
- \DeclareUnicodeCharacter{1E8D}{\"x}
- \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}}
- \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}}
-
- \DeclareUnicodeCharacter{1E90}{\^Z}
- \DeclareUnicodeCharacter{1E91}{\^z}
- \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}}
- \DeclareUnicodeCharacter{1E93}{\udotaccent{z}}
- \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}}
- \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}}
- \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}}
- \DeclareUnicodeCharacter{1E97}{\"t}
- \DeclareUnicodeCharacter{1E98}{\ringaccent{w}}
- \DeclareUnicodeCharacter{1E99}{\ringaccent{y}}
-
- \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}}
- \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}}
-
- \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}}
- \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}}
- \DeclareUnicodeCharacter{1EBC}{\~E}
- \DeclareUnicodeCharacter{1EBD}{\~e}
-
- \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}}
- \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}}
- \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}}
- \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}}
-
- \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}}
- \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}}
-
- \DeclareUnicodeCharacter{1EF2}{\`Y}
- \DeclareUnicodeCharacter{1EF3}{\`y}
- \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}}
-
- \DeclareUnicodeCharacter{1EF8}{\~Y}
- \DeclareUnicodeCharacter{1EF9}{\~y}
-
- \DeclareUnicodeCharacter{2013}{--}
- \DeclareUnicodeCharacter{2014}{---}
- \DeclareUnicodeCharacter{2018}{\quoteleft}
- \DeclareUnicodeCharacter{2019}{\quoteright}
- \DeclareUnicodeCharacter{201A}{\quotesinglbase}
- \DeclareUnicodeCharacter{201C}{\quotedblleft}
- \DeclareUnicodeCharacter{201D}{\quotedblright}
- \DeclareUnicodeCharacter{201E}{\quotedblbase}
- \DeclareUnicodeCharacter{2022}{\bullet}
- \DeclareUnicodeCharacter{2026}{\dots}
- \DeclareUnicodeCharacter{2039}{\guilsinglleft}
- \DeclareUnicodeCharacter{203A}{\guilsinglright}
- \DeclareUnicodeCharacter{20AC}{\euro}
-
- \DeclareUnicodeCharacter{2192}{\expansion}
- \DeclareUnicodeCharacter{21D2}{\result}
-
- \DeclareUnicodeCharacter{2212}{\minus}
- \DeclareUnicodeCharacter{2217}{\point}
- \DeclareUnicodeCharacter{2261}{\equiv}
-}% end of \utfeightchardefs
+ \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterUTFviii
+ \unicodechardefs
+}
+
+% Whether the active definitions of non-ASCII characters expand to
+% non-active tokens with the same character code. This is used to
+% write characters literally, instead of using active definitions for
+% printing the correct glyphs.
+\newif\ifpassthroughchars
+\passthroughcharsfalse
+
+% For native Unicode handling (XeTeX and LuaTeX),
+% provide a definition macro to replace/pass-through a Unicode character
+%
+\def\DeclareUnicodeCharacterNative#1#2{%
+ \catcode"#1=\active
+ \def\dodeclareunicodecharacternative##1##2##3{%
+ \begingroup
+ \uccode`\~="##2\relax
+ \uppercase{\gdef~}{%
+ \ifpassthroughchars
+ ##1%
+ \else
+ ##3%
+ \fi
+ }
+ \endgroup
+ }
+ \begingroup
+ \uccode`\.="#1\relax
+ \uppercase{\def\UTFNativeTmp{.}}%
+ \expandafter\dodeclareunicodecharacternative\UTFNativeTmp{#1}{#2}%
+ \endgroup
+}
+
+% Native Unicode handling (XeTeX and LuaTeX) character replacing definition.
+% It activates the setting that replaces Unicode characters.
+\def\nativeunicodechardefs{%
+ \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterNative
+ \unicodechardefs
+}
+
+% For native Unicode handling (XeTeX and LuaTeX),
+% make the character token expand
+% to the sequences given in \unicodechardefs for printing.
+\def\DeclareUnicodeCharacterNativeAtU#1#2{%
+ \def\UTFAtUTmp{#2}
+ \expandafter\globallet\csname uni:#1\endcsname \UTFAtUTmp
+}
+% @U command definitions for native Unicode handling (XeTeX and LuaTeX).
+\def\nativeunicodechardefsatu{%
+ \let\DeclareUnicodeCharacter\DeclareUnicodeCharacterNativeAtU
+ \unicodechardefs
+}
% US-ASCII character definitions.
\def\asciichardefs{% nothing need be done
\relax
}
+% define all Unicode characters we know about, for the sake of @U.
+\iftxinativeunicodecapable
+ \nativeunicodechardefsatu
+\else
+ \utfeightchardefs
+\fi
+
+
% Make non-ASCII characters printable again for compatibility with
% existing Texinfo documents that may use them, even without declaring a
% document encoding.
\advance\vsize by \topskip
\outervsize = \vsize
\advance\outervsize by 2\topandbottommargin
- \pageheight = \vsize
+ \txipageheight = \vsize
%
\hsize = #2\relax
\outerhsize = \hsize
\advance\outerhsize by 0.5in
- \pagewidth = \hsize
+ \txipagewidth = \hsize
%
\normaloffset = #4\relax
\bindingoffset = #5\relax
% whatever layout pdftex was dumped with.
\pdfhorigin = 1 true in
\pdfvorigin = 1 true in
+ \else
+ \ifx\XeTeXrevision\thisisundefined
+ \else
+ \pdfpageheight #7\relax
+ \pdfpagewidth #8\relax
+ % XeTeX does not have \pdfhorigin and \pdfvorigin.
+ \fi
\fi
%
\setleading{\textleading}
% this is not a problem.
\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi}
-% Turn off all special characters except @
-% (and those which the user can use as if they were ordinary).
+% Set catcodes for Texinfo file
+
+% Active characters for printing the wanted glyph.
% Most of these we simply print from the \tt font, but for some, we can
% use math or other variants that look better in normal text.
-
+%
\catcode`\"=\active
\def\activedoublequote{{\tt\char34}}
\let"=\activedoublequote
\catcode`\~=\active \def\activetilde{{\tt\char126}} \let~ = \activetilde
-\chardef\hat=`\^
-\catcode`\^=\active \def\activehat{{\tt \hat}} \let^ = \activehat
+\chardef\hatchar=`\^
+\catcode`\^=\active \def\activehat{{\tt \hatchar}} \let^ = \activehat
\catcode`\_=\active
\def_{\ifusingtt\normalunderscore\_}
-\let\realunder=_
-% Subroutine for the previous macro.
\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }
+\let\realunder=_
-\catcode`\|=\active
-\def|{{\tt\char124}}
+\catcode`\|=\active \def|{{\tt\char124}}
\chardef \less=`\<
\catcode`\<=\active \def\activeless{{\tt \less}}\let< = \activeless
\catcode`\>=\active \def\activegtr{{\tt \gtr}}\let> = \activegtr
\catcode`\+=\active \def+{{\tt \char 43}}
\catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
+\catcode`\-=\active \let-=\normaldash
+
% used for headline/footline in the output routine, in case the page
% breaks in the middle of an @tex block.
% in principle, all other definitions in \tex have to be undone too.
}
-% If a .fmt file is being used, characters that might appear in a file
-% name cannot be active until we have parsed the command line.
-% So turn them off again, and have \everyjob (or @setfilename) turn them on.
-% \otherifyactive is called near the end of this file.
-\def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
-
% Used sometimes to turn off (effectively) the active characters even after
% parsing them.
\def\turnoffactive{%
% \doublebackslash is two of them (for the pdf outlines).
{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}}
-% In texinfo, backslash is an active character; it prints the backslash
+% In Texinfo, backslash is an active character; it prints the backslash
% in fixed width font.
\catcode`\\=\active % @ for escape char from now on.
-% The story here is that in math mode, the \char of \backslashcurfont
-% ends up printing the roman \ from the math symbol font (because \char
-% in math mode uses the \mathcode, and plain.tex sets
-% \mathcode`\\="026E). It seems better for @backslashchar{} to always
-% print a typewriter backslash, hence we use an explicit \mathchar,
+% Print a typewriter backslash. For math mode, we can't simply use
+% \backslashcurfont: 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). 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
+@def@ttbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}}
+@let@backslashchar = @ttbackslash % @backslashchar{} is for user documents.
+
% \rawbackslash defines an active \ to do \backslashcurfont.
% \otherbackslash defines an active \ to be a literal `\' character with
% catcode other. We switch back and forth between these.
@gdef@otherbackslash{@let\=@realbackslash}
% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
-% the literal character `\'. Also revert - to its normal character, in
-% case the active - from code has slipped in.
+% the literal character `\'.
%
{@catcode`- = @active
@gdef@normalturnoffactive{%
+ @passthroughcharstrue
@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
+ @let\=@ttbackslash
@markupsetuplqdefault
@markupsetuprqdefault
@unsepspaces
}
}
-% Make _ and + \other characters, temporarily.
-% This is canceled by @fixbackslash.
-@otherifyactive
+% If a .fmt file is being used, characters that might appear in a file
+% name cannot be active until we have parsed the command line.
+% So turn them off again, and have @fixbackslash turn them back on.
+@catcode`+=@other @catcode`@_=@other
+% \enablebackslashhack - allow file to begin `\input texinfo'
+%
% If a .fmt file is being used, we don't want the `\input texinfo' to show up.
% That is what \eatinput is for; after that, the `\' should revert to printing
% a backslash.
-%
-@gdef@eatinput input texinfo{@fixbackslash}
-@global@let\ = @eatinput
+% If the file did not have a `\input texinfo', then it is turned off after
+% the first line; otherwise the first `\' in the file would cause an error.
+% This is used on the very last line of this file, texinfo.tex.
+% We also use @c to call @fixbackslash, in case ends of lines are hidden.
+{
+@catcode`@^=7
+@catcode`@^^M=13@gdef@enablebackslashhack{%
+ @global@let\ = @eatinput%
+ @catcode`@^^M=13%
+ @def@c{@fixbackslash@c}%
+ % Definition for the newline at the end of this file.
+ @def ^^M{@let^^M@secondlinenl}%
+ % Definition for a newline in the main Texinfo file.
+ @gdef @secondlinenl{@fixbackslash}%
+}}
+
+{@catcode`@^=7 @catcode`@^^M=13%
+@gdef@eatinput input texinfo#1^^M{@fixbackslash}}
+
+% Emergency active definition of newline, in case an active newline token
+% appears by mistake.
+{@catcode`@^=7 @catcode13=13%
+@gdef@enableemergencynewline{%
+ @gdef^^M{%
+ @par%
+ %<warning: active newline>@par%
+}}}
+
-% On the other hand, perhaps the file did not have a `\input texinfo'. Then
-% the first `\' in the file would cause an error. This macro tries to fix
-% that, assuming it is called before the first `\' could plausibly occur.
-% Also turn back on active characters that might appear in the input
-% file name, in case not using a pre-dumped format.
-%
@gdef@fixbackslash{%
- @ifx\@eatinput @let\ = @normalbackslash @fi
+ @ifx\@eatinput @let\ = @ttbackslash @fi
+ @catcode13=5 % regular end of line
+ @enableemergencynewline
+ @let@c=@texinfoc
+ % Also turn back on active characters that might appear in the input
+ % file name, in case not using a pre-dumped format.
@catcode`+=@active
@catcode`@_=@active
+ %
+ % If texinfo.cnf is present on the system, read it.
+ % Useful for site-wide @afourpaper, etc. This macro, @fixbackslash, gets
+ % called at the beginning of every Texinfo file. Not opening texinfo.cnf
+ % directly in this file, texinfo.tex, makes it possible to make a format
+ % file for Texinfo.
+ %
+ @openin 1 texinfo.cnf
+ @ifeof 1 @else @input texinfo.cnf @fi
+ @closein 1
}
+
% Say @foo, not \foo, in error messages.
@escapechar = `@@
@c Local variables:
@c eval: (add-hook 'write-file-hooks 'time-stamp)
-@c page-delimiter: "^\\\\message"
+@c page-delimiter: "^\\\\message\\|emacs-page"
@c time-stamp-start: "def\\\\texinfoversion{"
@c time-stamp-format: "%:y-%02m-%02d.%02H"
@c time-stamp-end: "}"
@c vim:sw=2:
-@ignore
- arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115
-@end ignore
+@enablebackslashhack
-eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" ${1+"$@"}'
+eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" "$@"'
& eval 'exec perl -wS -0777 -pi "$0" $argv:q'
if 0;
# Update an FSF copyright year list to include the current year.
-my $VERSION = '2013-01-03.09:41'; # UTC
+my $VERSION = '2016-01-12.23:13'; # UTC
-# Copyright (C) 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2009-2016 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
use warnings;
my $copyright_re = 'Copyright';
-my $circle_c_re = '(?:\([cC]\)|@copyright{}|©)';
+my $circle_c_re = '(?:\([cC]\)|@copyright\{}|\\\\\(co|©)';
my $holder = $ENV{UPDATE_COPYRIGHT_HOLDER};
$holder ||= 'Free Software Foundation, Inc.';
my $prefix_max = 5;
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "my $VERSION = '"
# time-stamp-format: "%:y-%02m-%02d.%02H:%02M"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "'; # UTC"
# End:
-eval '(exit $?0)' && eval 'exec perl -wST "$0" ${1+"$@"}'
+eval '(exit $?0)' && eval 'exec perl -wST "$0" "$@"'
& eval 'exec perl -wST "$0" $argv:q'
if 0;
# Detect instances of "if (p) free (p);".
# Likewise "if (p != 0)", "if (0 != p)", or with NULL; and with braces.
-my $VERSION = '2012-01-06 07:23'; # UTC
+my $VERSION = '2016-08-01 17:47'; # 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-2013 Free Software Foundation, Inc.
+# Copyright (C) 2008-2016 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
$err = EXIT_ERROR, next;
while (defined (my $line = <FH>))
{
+ # Skip non-matching lines early to save time
+ $line =~ /\bif\b/
+ or next;
while ($line =~
/\b(if\s*\(\s*([^)]+?)(?:\s*!=\s*([^)]+?))?\s*\)
# 1 2 3
## eval: (add-hook 'write-file-hooks 'time-stamp)
## time-stamp-start: "my $VERSION = '"
## time-stamp-format: "%:y-%02m-%02d %02H:%02M"
-## time-stamp-time-zone: "UTC"
+## time-stamp-time-zone: "UTC0"
## time-stamp-end: "'; # UTC"
## End:
# List version-controlled file names.
# Print a version string.
-scriptversion=2011-05-16.22; # UTC
+scriptversion=2016-01-11.22; # UTC
-# Copyright (C) 2006-2013 Free Software Foundation, Inc.
+# Copyright (C) 2006-2016 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# 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-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
;;; Boxed comments for C mode.
-;;; Copyright (C) 1991-1994, 2008-2013 Free Software Foundation, Inc.
+;;; Copyright (C) 1991-1994, 2008-2014, 2016 Free Software Foundation,
+;;; Inc.
;;; Francois Pinard <pinard@iro.umontreal.ca>, April 1991.
;;;
;;; This file is part of GNU M4.
# Customize maint.mk. -*- makefile -*-
-# Copyright (C) 2003-2013 Free Software Foundation, Inc.
+# Copyright (C) 2003-2014, 2016 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
config_h_header = "m4\.h"
# Hash of NEWS contents, to ensure we don't add entries to wrong section.
-old_NEWS_hash = 345b93b3900db54f6bab85e3da153b38
+old_NEWS_hash = ef92e5b599b23d9dfe915db5ce4194c5
# Indent only with spaces.
sc_prohibit_tab_based_indentation:
-dnl @ ../doc/m4.texi:719: Origin of test
+dnl @ ../doc/m4.texi:713: Origin of test
dnl @ expected status: 0
dnl @ extra options: -s
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:902: Origin of test
+dnl @ ../doc/m4.texi:896: 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
-dnl @ ../doc/m4.texi:961: Origin of test
+dnl @ ../doc/m4.texi:955: 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
-dnl @ ../doc/m4.texi:984: Origin of test
+dnl @ ../doc/m4.texi:978: Origin of test
dnl @ expected status: 1
dnl @ extra options: Makefile/
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:992: Origin of test
+dnl @ ../doc/m4.texi:986: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1006: Origin of test
+dnl @ ../doc/m4.texi:1000: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1027: Origin of test
+dnl @ ../doc/m4.texi:1021: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1120: Origin of test
+dnl @ ../doc/m4.texi:1114: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1135: Origin of test
+dnl @ ../doc/m4.texi:1129: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1227: Origin of test
+dnl @ ../doc/m4.texi:1221: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1305: Origin of test
+dnl @ ../doc/m4.texi:1299: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1431: Origin of test
+dnl @ ../doc/m4.texi:1425: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1447: Origin of test
+dnl @ ../doc/m4.texi:1441: Origin of test
dnl @ expected status: 0
dnl @ extra options: -P
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1478: Origin of test
+dnl @ ../doc/m4.texi:1472: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1492: Origin of test
+dnl @ ../doc/m4.texi:1486: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1509: Origin of test
+dnl @ ../doc/m4.texi:1503: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1523: Origin of test
+dnl @ ../doc/m4.texi:1517: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1537: Origin of test
+dnl @ ../doc/m4.texi:1531: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1549: Origin of test
+dnl @ ../doc/m4.texi:1543: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1581: Origin of test
+dnl @ ../doc/m4.texi:1575: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1609: Origin of test
+dnl @ ../doc/m4.texi:1603: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1622: Origin of test
+dnl @ ../doc/m4.texi:1616: Origin of test
dnl @ expected status: 0
dnl @ extra options: -Q
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1652: Origin of test
+dnl @ ../doc/m4.texi:1646: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1664: Origin of test
+dnl @ ../doc/m4.texi:1658: Origin of test
dnl @ expected status: 1
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1723: Origin of test
+dnl @ ../doc/m4.texi:1717: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1751: Origin of test
+dnl @ ../doc/m4.texi:1745: Origin of test
dnl @ expected status: 0
dnl @ extra options: -Dbar=Hello -Dfoo=bar
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1766: Origin of test
+dnl @ ../doc/m4.texi:1760: Origin of test
dnl @ expected status: 0
dnl @ extra options: -Dfoo -Decho=$@
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1815: Origin of test
+dnl @ ../doc/m4.texi:1809: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1832: Origin of test
+dnl @ ../doc/m4.texi:1826: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1866: Origin of test
+dnl @ ../doc/m4.texi:1860: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1900: Origin of test
+dnl @ ../doc/m4.texi:1894: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1910: Origin of test
+dnl @ ../doc/m4.texi:1904: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1926: Origin of test
+dnl @ ../doc/m4.texi:1920: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1936: Origin of test
+dnl @ ../doc/m4.texi:1930: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1971: Origin of test
+dnl @ ../doc/m4.texi:1965: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:1993: Origin of test
+dnl @ ../doc/m4.texi:1987: Origin of test
dnl @ expected status: 0
dnl @ extra options: --warn-macro-sequence
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2019: Origin of test
+dnl @ ../doc/m4.texi:2013: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2041: Origin of test
+dnl @ ../doc/m4.texi:2035: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2054: Origin of test
+dnl @ ../doc/m4.texi:2048: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2065: Origin of test
+dnl @ ../doc/m4.texi:2059: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2075: Origin of test
+dnl @ ../doc/m4.texi:2069: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2097: Origin of test
+dnl @ ../doc/m4.texi:2091: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2119: Origin of test
+dnl @ ../doc/m4.texi:2113: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2147: Origin of test
+dnl @ ../doc/m4.texi:2141: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2163: Origin of test
+dnl @ ../doc/m4.texi:2157: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2202: Origin of test
+dnl @ ../doc/m4.texi:2196: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2222: Origin of test
+dnl @ ../doc/m4.texi:2216: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2265: Origin of test
+dnl @ ../doc/m4.texi:2259: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2282: Origin of test
+dnl @ ../doc/m4.texi:2276: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2294: Origin of test
+dnl @ ../doc/m4.texi:2288: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2313: Origin of test
+dnl @ ../doc/m4.texi:2307: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2337: Origin of test
+dnl @ ../doc/m4.texi:2331: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2356: Origin of test
+dnl @ ../doc/m4.texi:2350: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2373: Origin of test
+dnl @ ../doc/m4.texi:2367: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2425: Origin of test
+dnl @ ../doc/m4.texi:2419: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2462: Origin of test
+dnl @ ../doc/m4.texi:2456: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2511: Origin of test
+dnl @ ../doc/m4.texi:2505: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2531: Origin of test
+dnl @ ../doc/m4.texi:2525: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2549: Origin of test
+dnl @ ../doc/m4.texi:2543: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2587: Origin of test
+dnl @ ../doc/m4.texi:2581: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2620: Origin of test
+dnl @ ../doc/m4.texi:2614: Origin of test
dnl @ expected status: 0
dnl @ extra options: -P
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2638: Origin of test
+dnl @ ../doc/m4.texi:2632: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2665: Origin of test
+dnl @ ../doc/m4.texi:2659: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2672: Origin of test
+dnl @ ../doc/m4.texi:2666: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2723: Origin of test
+dnl @ ../doc/m4.texi:2717: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2771: Origin of test
+dnl @ ../doc/m4.texi:2765: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2781: Origin of test
+dnl @ ../doc/m4.texi:2775: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2801: Origin of test
+dnl @ ../doc/m4.texi:2795: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2825: Origin of test
+dnl @ ../doc/m4.texi:2819: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2843: Origin of test
+dnl @ ../doc/m4.texi:2837: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2924: Origin of test
+dnl @ ../doc/m4.texi:2918: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2943: Origin of test
+dnl @ ../doc/m4.texi:2937: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:2978: Origin of test
+dnl @ ../doc/m4.texi:2972: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:3033: Origin of test
+dnl @ ../doc/m4.texi:3027: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:3062: Origin of test
+dnl @ ../doc/m4.texi:3056: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:3140: Origin of test
+dnl @ ../doc/m4.texi:3134: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:3173: Origin of test
+dnl @ ../doc/m4.texi:3167: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:3206: Origin of test
+dnl @ ../doc/m4.texi:3200: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:3238: Origin of test
+dnl @ ../doc/m4.texi:3232: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:3249: Origin of test
+dnl @ ../doc/m4.texi:3243: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:3277: Origin of test
+dnl @ ../doc/m4.texi:3271: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:3324: Origin of test
+dnl @ ../doc/m4.texi:3318: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:3347: Origin of test
+dnl @ ../doc/m4.texi:3341: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:3377: Origin of test
+dnl @ ../doc/m4.texi:3371: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:3404: Origin of test
+dnl @ ../doc/m4.texi:3398: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:3429: Origin of test
+dnl @ ../doc/m4.texi:3423: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:3456: Origin of test
+dnl @ ../doc/m4.texi:3450: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:3497: Origin of test
+dnl @ ../doc/m4.texi:3491: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:3533: Origin of test
+dnl @ ../doc/m4.texi:3527: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:3596: Origin of test
+dnl @ ../doc/m4.texi:3590: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:3643: Origin of test
+dnl @ ../doc/m4.texi:3637: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:3668: Origin of test
+dnl @ ../doc/m4.texi:3662: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:3707: Origin of test
+dnl @ ../doc/m4.texi:3701: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:3765: Origin of test
+dnl @ ../doc/m4.texi:3759: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:3782: Origin of test
+dnl @ ../doc/m4.texi:3776: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:3825: Origin of test
+dnl @ ../doc/m4.texi:3819: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:3853: Origin of test
+dnl @ ../doc/m4.texi:3847: Origin of test
dnl @ expected status: 1
dnl @ extra options: -dp -L3 -tifelse
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:3871: Origin of test
+dnl @ ../doc/m4.texi:3865: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:3907: Origin of test
+dnl @ ../doc/m4.texi:3901: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:3941: Origin of test
+dnl @ ../doc/m4.texi:3935: Origin of test
dnl @ expected status: 0
dnl @ extra options: -de --trace ifelse
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4047: Origin of test
+dnl @ ../doc/m4.texi:4041: Origin of test
dnl @ expected status: 0
dnl @ extra options: -dp
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4076: Origin of test
+dnl @ ../doc/m4.texi:4070: Origin of test
dnl @ expected status: 0
dnl @ extra options: -l6
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4094: Origin of test
+dnl @ ../doc/m4.texi:4088: Origin of test
dnl @ expected status: 0
dnl @ extra options: -dip
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4129: Origin of test
+dnl @ ../doc/m4.texi:4123: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4182: Origin of test
+dnl @ ../doc/m4.texi:4176: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4200: Origin of test
+dnl @ ../doc/m4.texi:4194: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4211: Origin of test
+dnl @ ../doc/m4.texi:4205: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4242: Origin of test
+dnl @ ../doc/m4.texi:4236: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4257: Origin of test
+dnl @ ../doc/m4.texi:4251: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4272: Origin of test
+dnl @ ../doc/m4.texi:4266: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4294: Origin of test
+dnl @ ../doc/m4.texi:4288: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4327: Origin of test
+dnl @ ../doc/m4.texi:4321: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4360: Origin of test
+dnl @ ../doc/m4.texi:4354: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4399: Origin of test
+dnl @ ../doc/m4.texi:4393: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4420: Origin of test
+dnl @ ../doc/m4.texi:4414: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4443: Origin of test
+dnl @ ../doc/m4.texi:4437: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4456: Origin of test
+dnl @ ../doc/m4.texi:4450: Origin of test
dnl @ expected status: 1
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4465: Origin of test
+dnl @ ../doc/m4.texi:4459: Origin of test
dnl @ expected status: 1
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4490: Origin of test
+dnl @ ../doc/m4.texi:4484: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4517: Origin of test
+dnl @ ../doc/m4.texi:4511: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4536: Origin of test
+dnl @ ../doc/m4.texi:4530: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4559: Origin of test
+dnl @ ../doc/m4.texi:4553: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4582: Origin of test
+dnl @ ../doc/m4.texi:4576: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4614: Origin of test
+dnl @ ../doc/m4.texi:4608: Origin of test
dnl @ expected status: 1
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4668: Origin of test
+dnl @ ../doc/m4.texi:4662: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4681: Origin of test
+dnl @ ../doc/m4.texi:4675: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4700: Origin of test
+dnl @ ../doc/m4.texi:4694: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4742: Origin of test
+dnl @ ../doc/m4.texi:4736: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4780: Origin of test
+dnl @ ../doc/m4.texi:4774: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4817: Origin of test
+dnl @ ../doc/m4.texi:4811: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4870: Origin of test
+dnl @ ../doc/m4.texi:4864: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4902: Origin of test
+dnl @ ../doc/m4.texi:4896: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4932: Origin of test
+dnl @ ../doc/m4.texi:4926: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4957: Origin of test
+dnl @ ../doc/m4.texi:4951: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4971: Origin of test
+dnl @ ../doc/m4.texi:4965: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:4986: Origin of test
+dnl @ ../doc/m4.texi:4980: Origin of test
dnl @ expected status: 1
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5029: Origin of test
+dnl @ ../doc/m4.texi:5023: Origin of test
dnl @ expected status: 1
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5062: Origin of test
+dnl @ ../doc/m4.texi:5056: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5079: Origin of test
+dnl @ ../doc/m4.texi:5073: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5108: Origin of test
+dnl @ ../doc/m4.texi:5102: Origin of test
dnl @ expected status: 1
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5121: Origin of test
+dnl @ ../doc/m4.texi:5115: Origin of test
dnl @ expected status: 1
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5129: Origin of test
+dnl @ ../doc/m4.texi:5123: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5186: Origin of test
+dnl @ ../doc/m4.texi:5180: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5223: Origin of test
+dnl @ ../doc/m4.texi:5217: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5255: Origin of test
+dnl @ ../doc/m4.texi:5249: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5271: Origin of test
+dnl @ ../doc/m4.texi:5265: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5318: Origin of test
+dnl @ ../doc/m4.texi:5312: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5334: Origin of test
+dnl @ ../doc/m4.texi:5328: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5353: Origin of test
+dnl @ ../doc/m4.texi:5347: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5367: Origin of test
+dnl @ ../doc/m4.texi:5361: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5382: Origin of test
+dnl @ ../doc/m4.texi:5376: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5416: Origin of test
+dnl @ ../doc/m4.texi:5410: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5439: Origin of test
+dnl @ ../doc/m4.texi:5433: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5463: Origin of test
+dnl @ ../doc/m4.texi:5457: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5482: Origin of test
+dnl @ ../doc/m4.texi:5476: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5511: Origin of test
+dnl @ ../doc/m4.texi:5505: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5526: Origin of test
+dnl @ ../doc/m4.texi:5520: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5548: Origin of test
+dnl @ ../doc/m4.texi:5542: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5574: Origin of test
+dnl @ ../doc/m4.texi:5568: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5593: Origin of test
+dnl @ ../doc/m4.texi:5587: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5633: Origin of test
+dnl @ ../doc/m4.texi:5627: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5655: Origin of test
+dnl @ ../doc/m4.texi:5649: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5665: Origin of test
+dnl @ ../doc/m4.texi:5659: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5679: Origin of test
+dnl @ ../doc/m4.texi:5673: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5688: Origin of test
+dnl @ ../doc/m4.texi:5682: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5737: Origin of test
+dnl @ ../doc/m4.texi:5731: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5750: Origin of test
+dnl @ ../doc/m4.texi:5744: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5767: Origin of test
+dnl @ ../doc/m4.texi:5761: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5795: Origin of test
+dnl @ ../doc/m4.texi:5789: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5804: Origin of test
+dnl @ ../doc/m4.texi:5798: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5849: Origin of test
+dnl @ ../doc/m4.texi:5843: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5876: Origin of test
+dnl @ ../doc/m4.texi:5870: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5883: Origin of test
+dnl @ ../doc/m4.texi:5877: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5911: Origin of test
+dnl @ ../doc/m4.texi:5905: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5955: Origin of test
+dnl @ ../doc/m4.texi:5949: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:5988: Origin of test
+dnl @ ../doc/m4.texi:5982: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:6008: Origin of test
+dnl @ ../doc/m4.texi:6002: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:6029: Origin of test
+dnl @ ../doc/m4.texi:6023: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:6044: Origin of test
+dnl @ ../doc/m4.texi:6038: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:6075: Origin of test
+dnl @ ../doc/m4.texi:6069: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:6102: Origin of test
+dnl @ ../doc/m4.texi:6096: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:6143: Origin of test
+dnl @ ../doc/m4.texi:6137: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:6155: Origin of test
+dnl @ ../doc/m4.texi:6149: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:6193: Origin of test
+dnl @ ../doc/m4.texi:6187: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:6270: Origin of test
+dnl @ ../doc/m4.texi:6264: Origin of test
dnl @ expected status: 1
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:6303: Origin of test
+dnl @ ../doc/m4.texi:6297: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:6336: Origin of test
+dnl @ ../doc/m4.texi:6330: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:6372: Origin of test
+dnl @ ../doc/m4.texi:6366: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:6411: Origin of test
+dnl @ ../doc/m4.texi:6405: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:6444: Origin of test
+dnl @ ../doc/m4.texi:6438: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:6525: Origin of test
+dnl @ ../doc/m4.texi:6519: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:6536: Origin of test
+dnl @ ../doc/m4.texi:6530: Origin of test
dnl @ expected status: 0
dnl @ extra options: -G
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:6559: Origin of test
+dnl @ ../doc/m4.texi:6553: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:6601: Origin of test
+dnl @ ../doc/m4.texi:6595: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:6630: Origin of test
+dnl @ ../doc/m4.texi:6624: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:6678: Origin of test
+dnl @ ../doc/m4.texi:6672: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:6708: Origin of test
+dnl @ ../doc/m4.texi:6702: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:6758: Origin of test
+dnl @ ../doc/m4.texi:6752: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:6852: Origin of test
+dnl @ ../doc/m4.texi:6846: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:6883: Origin of test
+dnl @ ../doc/m4.texi:6877: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:6898: Origin of test
+dnl @ ../doc/m4.texi:6892: Origin of test
dnl @ expected status: 0
dnl @ extra options: -G
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:6944: Origin of test
+dnl @ ../doc/m4.texi:6938: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:6981: Origin of test
+dnl @ ../doc/m4.texi:6975: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:7001: Origin of test
+dnl @ ../doc/m4.texi:6995: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:7022: Origin of test
+dnl @ ../doc/m4.texi:7016: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:7079: Origin of test
+dnl @ ../doc/m4.texi:7073: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:7097: Origin of test
+dnl @ ../doc/m4.texi:7091: Origin of test
dnl @ expected status: 1
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:7233: Origin of test
+dnl @ ../doc/m4.texi:7227: Origin of test
dnl @ expected status: 0
dnl @ extra options: -F /dev/null
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:7239: Origin of test
+dnl @ ../doc/m4.texi:7233: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:7259: Origin of test
+dnl @ ../doc/m4.texi:7253: Origin of test
dnl @ expected status: 1
dnl @ extra options: -F /none/such
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:7395: Origin of test
+dnl @ ../doc/m4.texi:7389: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:7689: Origin of test
+dnl @ ../doc/m4.texi:7683: Origin of test
dnl @ expected status: 0
dnl @ extra options: -s
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:7714: Origin of test
+dnl @ ../doc/m4.texi:7708: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:7768: Origin of test
+dnl @ ../doc/m4.texi:7762: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:7790: Origin of test
+dnl @ ../doc/m4.texi:7784: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:7831: Origin of test
+dnl @ ../doc/m4.texi:7825: Origin of test
dnl @ expected status: 1
dnl @ extra options: -L9
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:7874: Origin of test
+dnl @ ../doc/m4.texi:7868: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:7925: Origin of test
+dnl @ ../doc/m4.texi:7919: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:7967: Origin of test
+dnl @ ../doc/m4.texi:7961: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:8020: Origin of test
+dnl @ ../doc/m4.texi:8014: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:8107: Origin of test
+dnl @ ../doc/m4.texi:8101: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:8143: Origin of test
+dnl @ ../doc/m4.texi:8137: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:8197: Origin of test
+dnl @ ../doc/m4.texi:8191: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:8278: Origin of test
+dnl @ ../doc/m4.texi:8272: Origin of test
dnl @ expected status: 0
dnl @ extra options: -Dlimit=10 -Dverbose
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:8288: Origin of test
+dnl @ ../doc/m4.texi:8282: Origin of test
dnl @ expected status: 0
dnl @ extra options: -Dlimit=10 -Dverbose -Dalt
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:8298: Origin of test
+dnl @ ../doc/m4.texi:8292: Origin of test
dnl @ expected status: 0
dnl @ extra options: -Dlimit=10 -Dverbose -Dalt=4
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:8306: Origin of test
+dnl @ ../doc/m4.texi:8300: Origin of test
dnl @ expected status: 0
dnl @ extra options: -Dlimit=2500 -Dalt=4
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:8313: Origin of test
+dnl @ ../doc/m4.texi:8307: Origin of test
dnl @ expected status: 0
dnl @ extra options: -Dlimit=10000 -Dalt=4
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:8376: Origin of test
+dnl @ ../doc/m4.texi:8370: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:8422: Origin of test
+dnl @ ../doc/m4.texi:8416: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:8445: Origin of test
+dnl @ ../doc/m4.texi:8439: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:8478: Origin of test
+dnl @ ../doc/m4.texi:8472: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:8514: Origin of test
+dnl @ ../doc/m4.texi:8508: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:8550: Origin of test
+dnl @ ../doc/m4.texi:8544: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:8627: Origin of test
+dnl @ ../doc/m4.texi:8621: Origin of test
dnl @ expected status: 0
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
-dnl @ ../doc/m4.texi:8671: Origin of test
+dnl @ ../doc/m4.texi:8665: Origin of test
dnl @ expected status: 1
dnl @ extra options:
dnl @ Copyright (C) 2006, 2007, 2008, 2009 Free Software
## Makefile.am - template for generating Makefile via Automake.
##
-## Copyright (C) 1992-1994, 2006-2013 Free Software Foundation, Inc.
+## Copyright (C) 1992-1994, 2006-2014, 2016 Free Software Foundation,
+## Inc.
##
## This file is part of GNU M4.
##
-# Makefile.in generated by automake 1.14 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
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/absolute-header.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/builtin-expect.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/ctype.m4 $(top_srcdir)/m4/dirent_h.m4 \
+ $(top_srcdir)/m4/dirfd.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/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/flexmember.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/getprogname.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/hard-locale.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/inttypes_h.m4 $(top_srcdir)/m4/isblank.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/limits-h.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/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/memchr.m4 $(top_srcdir)/m4/minmax.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/obstack.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/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/stdalign.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)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/lib/config.h
CONFIG_CLEAN_FILES =
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
pkglibexecdir = @pkglibexecdir@
ACLOCAL = @ACLOCAL@
GNULIB_IMAXABS = @GNULIB_IMAXABS@
GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
GNULIB_ISATTY = @GNULIB_ISATTY@
+GNULIB_ISBLANK = @GNULIB_ISBLANK@
GNULIB_ISFINITE = @GNULIB_ISFINITE@
GNULIB_ISINF = @GNULIB_ISINF@
GNULIB_ISNAN = @GNULIB_ISNAN@
GNULIB_OPEN = @GNULIB_OPEN@
GNULIB_OPENAT = @GNULIB_OPENAT@
GNULIB_OPENDIR = @GNULIB_OPENDIR@
+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@
GNULIB_PCLOSE = @GNULIB_PCLOSE@
GNULIB_PERROR = @GNULIB_PERROR@
GNULIB_PIPE = @GNULIB_PIPE@
GNULIB_PUTENV = @GNULIB_PUTENV@
GNULIB_PUTS = @GNULIB_PUTS@
GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_QSORT_R = @GNULIB_QSORT_R@
GNULIB_RAISE = @GNULIB_RAISE@
GNULIB_RANDOM = @GNULIB_RANDOM@
GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
GNULIB_TANL = @GNULIB_TANL@
GNULIB_TIMEGM = @GNULIB_TIMEGM@
GNULIB_TIME_R = @GNULIB_TIME_R@
+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@
GNULIB_TMPFILE = @GNULIB_TMPFILE@
GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
GNULIB_TRUNC = @GNULIB_TRUNC@
HAVE_ATANL = @HAVE_ATANL@
HAVE_ATOLL = @HAVE_ATOLL@
HAVE_BTOWC = @HAVE_BTOWC@
+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@
HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
HAVE_CBRT = @HAVE_CBRT@
HAVE_CBRTF = @HAVE_CBRTF@
HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
HAVE_ILOGBF = @HAVE_ILOGBF@
HAVE_ILOGBL = @HAVE_ILOGBL@
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_ISBLANK = @HAVE_ISBLANK@
HAVE_ISNAND = @HAVE_ISNAND@
HAVE_ISNANF = @HAVE_ISNANF@
HAVE_ISNANL = @HAVE_ISNANL@
HAVE_LOGL = @HAVE_LOGL@
HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
HAVE_LSTAT = @HAVE_LSTAT@
+HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
HAVE_MBRLEN = @HAVE_MBRLEN@
HAVE_MBRTOWC = @HAVE_MBRTOWC@
HAVE_MBSINIT = @HAVE_MBSINIT@
HAVE_PTSNAME = @HAVE_PTSNAME@
HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_QSORT_R = @HAVE_QSORT_R@
HAVE_RAISE = @HAVE_RAISE@
HAVE_RANDOM = @HAVE_RANDOM@
HAVE_RANDOM_H = @HAVE_RANDOM_H@
HAVE_SYMLINK = @HAVE_SYMLINK@
HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_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_TANHF = @HAVE_TANHF@
HAVE_TANL = @HAVE_TANL@
HAVE_TIMEGM = @HAVE_TIMEGM@
+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
HAVE_UNISTD_H = @HAVE_UNISTD_H@
HAVE_UNLINKAT = @HAVE_UNLINKAT@
LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@
LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@
LIBTHREAD = @LIBTHREAD@
+LIB_POSIX_SPAWN = @LIB_POSIX_SPAWN@
+LIMITS_H = @LIMITS_H@
LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
LOCALE_FR = @LOCALE_FR@
LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
M4tests_WITNESS = @M4tests_WITNESS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@
NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
NEXT_AS_FIRST_DIRECTIVE_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_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_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_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
+NEXT_CTYPE_H = @NEXT_CTYPE_H@
NEXT_DIRENT_H = @NEXT_DIRENT_H@
NEXT_ERRNO_H = @NEXT_ERRNO_H@
NEXT_FCNTL_H = @NEXT_FCNTL_H@
NEXT_GETOPT_H = @NEXT_GETOPT_H@
NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
+NEXT_LIMITS_H = @NEXT_LIMITS_H@
NEXT_LOCALE_H = @NEXT_LOCALE_H@
NEXT_MATH_H = @NEXT_MATH_H@
NEXT_SCHED_H = @NEXT_SCHED_H@
NEXT_WCHAR_H = @NEXT_WCHAR_H@
NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
OBJEXT = @OBJEXT@
+OS2_LDFLAGS = @OS2_LDFLAGS@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
+REPLACE_ACOSF = @REPLACE_ACOSF@
+REPLACE_ASINF = @REPLACE_ASINF@
+REPLACE_ATAN2F = @REPLACE_ATAN2F@
+REPLACE_ATANF = @REPLACE_ATANF@
REPLACE_BTOWC = @REPLACE_BTOWC@
REPLACE_CALLOC = @REPLACE_CALLOC@
REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
REPLACE_CHOWN = @REPLACE_CHOWN@
REPLACE_CLOSE = @REPLACE_CLOSE@
REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@
+REPLACE_COSF = @REPLACE_COSF@
+REPLACE_COSHF = @REPLACE_COSHF@
REPLACE_DIRFD = @REPLACE_DIRFD@
REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
REPLACE_EXP2 = @REPLACE_EXP2@
REPLACE_EXP2L = @REPLACE_EXP2L@
+REPLACE_EXPF = @REPLACE_EXPF@
REPLACE_EXPM1 = @REPLACE_EXPM1@
REPLACE_EXPM1F = @REPLACE_EXPM1F@
REPLACE_FABSL = @REPLACE_FABSL@
REPLACE_GETCWD = @REPLACE_GETCWD@
REPLACE_GETDELIM = @REPLACE_GETDELIM@
REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
+REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@
REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
REPLACE_GETLINE = @REPLACE_GETLINE@
REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_GMTIME = @REPLACE_GMTIME@
REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
REPLACE_HYPOT = @REPLACE_HYPOT@
REPLACE_HYPOTF = @REPLACE_HYPOTF@
REPLACE_LINK = @REPLACE_LINK@
REPLACE_LINKAT = @REPLACE_LINKAT@
REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
+REPLACE_LOCALTIME = @REPLACE_LOCALTIME@
REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
REPLACE_LOG = @REPLACE_LOG@
REPLACE_LOG10 = @REPLACE_LOG10@
REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
REPLACE_PUTENV = @REPLACE_PUTENV@
REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_QSORT_R = @REPLACE_QSORT_R@
REPLACE_RAISE = @REPLACE_RAISE@
REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
REPLACE_READ = @REPLACE_READ@
REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_READLINKAT = @REPLACE_READLINKAT@
REPLACE_REALLOC = @REPLACE_REALLOC@
REPLACE_REALPATH = @REPLACE_REALPATH@
REPLACE_REMAINDER = @REPLACE_REMAINDER@
REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
REPLACE_SIGNBIT = @REPLACE_SIGNBIT@
REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
+REPLACE_SINF = @REPLACE_SINF@
+REPLACE_SINHF = @REPLACE_SINHF@
REPLACE_SLEEP = @REPLACE_SLEEP@
REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_SQRTF = @REPLACE_SQRTF@
REPLACE_SQRTL = @REPLACE_SQRTL@
REPLACE_STAT = @REPLACE_STAT@
REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
REPLACE_STRTOD = @REPLACE_STRTOD@
REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@
REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
+REPLACE_TANF = @REPLACE_TANF@
+REPLACE_TANHF = @REPLACE_TANHF@
REPLACE_TIMEGM = @REPLACE_TIMEGM@
REPLACE_TMPFILE = @REPLACE_TMPFILE@
REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
REPLACE_WRITE = @REPLACE_WRITE@
SCHED_H = @SCHED_H@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
+STDALIGN_H = @STDALIGN_H@
STDARG_H = @STDARG_H@
STDBOOL_H = @STDBOOL_H@
STDDEF_H = @STDDEF_H@
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_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@
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@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
am__include = @am__include@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
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*) \
mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \
uninstall-am
+.PRECIOUS: Makefile
+
all-local: $(srcdir)/stamp-checks
#!/bin/sh
# Check GNU m4 against examples from the manual source.
-# Copyright (C) 1992, 2006-2013 Free Software Foundation, Inc.
+# Copyright (C) 1992, 2006-2014, 2016 Free Software Foundation, Inc.
#
# This file is part of GNU M4.
#
#!/bin/sh
# -*- AWK -*-
# Extract all examples from the manual source.
-# Copyright (C) 1992, 2005-2013 Free Software Foundation, Inc.
+# Copyright (C) 1992, 2005-2014, 2016 Free Software Foundation, Inc.
#
# This file is part of GNU M4.
#
#!/bin/sh
# This file is part of the GNU m4 testsuite
-# Copyright (C) 2000, 2003, 2007-2013 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2003, 2007-2014, 2016 Free Software Foundation,
+# Inc.
#
# This file is part of GNU M4.
#
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for GNU M4 1.4.17.
+# Generated by GNU Autoconf 2.69 for GNU M4 1.4.18.
#
# Report bugs to <bug-m4@gnu.org>.
#
# Identity of this package.
PACKAGE_NAME='GNU M4'
PACKAGE_TARNAME='m4'
-PACKAGE_VERSION='1.4.17'
-PACKAGE_STRING='GNU M4 1.4.17'
+PACKAGE_VERSION='1.4.18'
+PACKAGE_STRING='GNU M4 1.4.18'
PACKAGE_BUGREPORT='bug-m4@gnu.org'
PACKAGE_URL='http://www.gnu.org/software/m4/'
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
+OS2_LDFLAGS
LIBTESTS_LIBDEPS
LIBM4_LTLIBDEPS
LIBM4_LIBDEPS
abs_aux_dir
+GL_GENERATE_STDALIGN_H_FALSE
+GL_GENERATE_STDALIGN_H_TRUE
+STDALIGN_H
POSIX_SPAWN_PORTED_FALSE
POSIX_SPAWN_PORTED_TRUE
INTL_MACOSX_LIBS
PRI_MACROS_BROKEN
INT64_MAX_EQ_LONG_MAX
INT32_MAX_LT_INTMAX_MAX
+REPLACE_STRTOUMAX
REPLACE_STRTOIMAX
HAVE_DECL_STRTOUMAX
HAVE_DECL_STRTOIMAX
HAVE_DIRENT_H
NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
NEXT_DIRENT_H
+NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
+NEXT_CTYPE_H
+HAVE_ISBLANK
+GNULIB_ISBLANK
REPLACE_FDOPENDIR
REPLACE_DIRFD
REPLACE_CLOSEDIR
HAVE_UNISTD_H
NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
NEXT_UNISTD_H
+UNISTD_H_DEFINES_STRUCT_TIMESPEC
PTHREAD_H_DEFINES_STRUCT_TIMESPEC
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
TIME_H_DEFINES_STRUCT_TIMESPEC
NEXT_AS_FIRST_DIRECTIVE_TIME_H
NEXT_TIME_H
+REPLACE_LOCALTIME
+REPLACE_GMTIME
REPLACE_TIMEGM
REPLACE_NANOSLEEP
REPLACE_MKTIME
HAVE_STRPTIME
HAVE_NANOSLEEP
HAVE_DECL_LOCALTIME_R
+GNULIB_TIME_RZ
GNULIB_TIME_R
GNULIB_TIMEGM
GNULIB_STRPTIME
GL_GENERATE_STDINT_H_FALSE
GL_GENERATE_STDINT_H_TRUE
STDINT_H
+HAVE_SYS_INTTYPES_H
+HAVE_SYS_BITYPES_H
+HAVE_C99_STDINT_H
WINT_T_SUFFIX
WCHAR_T_SUFFIX
SIG_ATOMIC_T_SUFFIX
BITSIZEOF_SIG_ATOMIC_T
BITSIZEOF_SIZE_T
BITSIZEOF_PTRDIFF_T
-HAVE_SYS_BITYPES_H
-HAVE_SYS_INTTYPES_H
HAVE_STDINT_H
NEXT_AS_FIRST_DIRECTIVE_STDINT_H
NEXT_STDINT_H
HAVE_WCHAR_H
HAVE_UNSIGNED_LONG_LONG_INT
HAVE_LONG_LONG_INT
+GNULIB_OVERRIDES_WINT_T
HAVE__BOOL
GL_GENERATE_STDBOOL_H_FALSE
GL_GENERATE_STDBOOL_H_TRUE
GL_GENERATE_SCHED_H_FALSE
GL_GENERATE_SCHED_H_TRUE
SCHED_H
+HAVE_SYS_CDEFS_H
HAVE_STRUCT_SCHED_PARAM
HAVE_SCHED_H
NEXT_AS_FIRST_DIRECTIVE_SCHED_H
GNULIB_SIGNAL_H_SIGPIPE
GNULIB_RAISE
GNULIB_PTHREAD_SIGMASK
+LIB_POSIX_SPAWN
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
LOCALE_JA
NEXT_AS_FIRST_DIRECTIVE_MATH_H
NEXT_MATH_H
+SED
LTLIBMULTITHREAD
LIBMULTITHREAD
LTLIBTHREAD
GL_GENERATE_STDDEF_H_TRUE
STDDEF_H
HAVE_WCHAR_T
+HAVE_MAX_ALIGN_T
REPLACE_NULL
REPLACE_STRUCT_LCONV
REPLACE_DUPLOCALE
GNULIB_LOCALECONV
LOCALCHARSET_TESTS_ENVIRONMENT
GLIBC21
+GL_GENERATE_LIMITS_H_FALSE
+GL_GENERATE_LIMITS_H_TRUE
+LIMITS_H
+NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
+NEXT_LIMITS_H
HAVE_LANGINFO_YESEXPR
HAVE_LANGINFO_ERA
HAVE_LANGINFO_T_FMT_AMPM
NEXT_SYS_TIME_H
REPLACE_STRUCT_TIMEVAL
REPLACE_GETTIMEOFDAY
+HAVE_TIMEZONE_T
HAVE_SYS_TIME_H
HAVE_STRUCT_TIMEVAL
HAVE_GETTIMEOFDAY
REPLACE_TRUNCL
REPLACE_TRUNCF
REPLACE_TRUNC
+REPLACE_TANHF
+REPLACE_TANF
REPLACE_SQRTL
+REPLACE_SQRTF
+REPLACE_SINHF
+REPLACE_SINF
REPLACE_SIGNBIT_USING_GCC
REPLACE_SIGNBIT
REPLACE_ROUNDL
REPLACE_EXP2
REPLACE_EXPM1F
REPLACE_EXPM1
+REPLACE_EXPF
+REPLACE_COSHF
+REPLACE_COSF
REPLACE_CEILL
REPLACE_CEILF
REPLACE_CEIL
REPLACE_CBRTL
REPLACE_CBRTF
+REPLACE_ATAN2F
+REPLACE_ATANF
+REPLACE_ASINF
+REPLACE_ACOSF
HAVE_DECL_TRUNCL
HAVE_DECL_TRUNCF
HAVE_DECL_TRUNC
INCLUDE_NEXT_AS_FIRST_DIRECTIVE
INCLUDE_NEXT
pkglibexecdir
+runstatedir
lispdir
HAVE_WINSOCK2_H
HAVE_MSVC_INVALID_PARAMETER_HANDLER
REPLACE_UNLINKAT
REPLACE_UNLINK
REPLACE_TTYNAME_R
+REPLACE_SYMLINKAT
REPLACE_SYMLINK
REPLACE_SLEEP
REPLACE_RMDIR
+REPLACE_READLINKAT
REPLACE_READLINK
REPLACE_READ
REPLACE_PWRITE
REPLACE_GETPAGESIZE
REPLACE_GETGROUPS
REPLACE_GETLOGIN_R
+REPLACE_GETDTABLESIZE
REPLACE_GETDOMAINNAME
REPLACE_GETCWD
REPLACE_FTRUNCATE
HAVE_DECL_GETUSERSHELL
HAVE_DECL_GETPAGESIZE
HAVE_DECL_GETLOGIN_R
+HAVE_DECL_GETLOGIN
HAVE_DECL_GETDOMAINNAME
HAVE_DECL_FDATASYNC
HAVE_DECL_FCHDIR
REPLACE_REALPATH
REPLACE_REALLOC
REPLACE_RANDOM_R
+REPLACE_QSORT_R
REPLACE_PUTENV
REPLACE_PTSNAME_R
REPLACE_PTSNAME
HAVE_RANDOM_R
HAVE_RANDOM_H
HAVE_RANDOM
+HAVE_QSORT_R
HAVE_PTSNAME_R
HAVE_PTSNAME
HAVE_POSIX_OPENPT
GNULIB_REALLOC_POSIX
GNULIB_RANDOM_R
GNULIB_RANDOM
+GNULIB_QSORT_R
GNULIB_PUTENV
GNULIB_PTSNAME_R
GNULIB_PTSNAME
build
RANLIB
ARFLAGS
+ac_ct_AR
AR
EGREP
GREP
# 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.17 to adapt to many kinds of systems.
+\`configure' configures GNU M4 1.4.18 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of GNU M4 1.4.17:";;
+ short | recursive ) echo "Configuration of GNU M4 1.4.18:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-GNU M4 configure 1.4.17
+GNU M4 configure 1.4.18
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
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.17, which was
+It was created by GNU M4 $as_me 1.4.18, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
as_fn_append ac_func_list " getdtablesize"
gl_getopt_required=GNU
as_fn_append ac_header_list " getopt.h"
+as_fn_append ac_func_list " getprogname"
+as_fn_append ac_func_list " getexecname"
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 " limits.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 " mkstemp"
as_fn_append ac_func_list " nl_langinfo"
as_fn_append ac_func_list " pipe2"
-as_fn_append ac_func_list " posix_spawn"
gl_printf_safe=yes
+as_fn_append ac_header_list " malloc.h"
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_header_list " sys/cdefs.h"
as_fn_append ac_func_list " secure_getenv"
+as_fn_append ac_func_list " getuid"
+as_fn_append ac_func_list " geteuid"
+as_fn_append ac_func_list " getgid"
+as_fn_append ac_func_list " getegid"
as_fn_append ac_func_list " sigaction"
as_fn_append ac_func_list " siginterrupt"
as_fn_append ac_func_list " snprintf"
-am__api_version='1.14'
+am__api_version='1.15'
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
if test x"${MISSING+set}" != xset; then
case $am_aux_dir in
$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
fi
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
# Define the identity of the package.
PACKAGE='m4'
- VERSION='1.4.17'
+ VERSION='1.4.18'
cat >>confdefs.h <<_ACEOF
# <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.
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
# Always define AMTAR for backward compatibility. Yes, it's still used
# in the wild :-( We should find a proper way to deprecate it ...
AMTAR='$${TAR-tar}'
fi
fi
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=0;;
+esac
+am_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+ # make --enable-silent-rules the default.
+
EGREP="$ac_cv_path_EGREP"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+ ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
+if test "x$ac_cv_header_minix_config_h" = xyes; then :
+ MINIX=yes
+else
+ MINIX=
+fi
+
+
+ if test "$MINIX" = yes; then
+
+$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
+
+
+$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
+
+
+$as_echo "#define _MINIX 1" >>confdefs.h
+
+
+$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
+
+ 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 ${ac_cv_safe_to_define___extensions__+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# define __EXTENSIONS__ 1
+ $ac_includes_default
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_safe_to_define___extensions__=yes
+else
+ ac_cv_safe_to_define___extensions__=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
+$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
+ test $ac_cv_safe_to_define___extensions__ = yes &&
+ $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
+
+ $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
+
+ $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
+
+ $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
+
+ $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+ $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
+
+ $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
+
+ $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
+
+ $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
+
+ $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
+
+ $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
+
+ $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 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
+
+
+
+
+
+
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
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
+
+ if test $gl_cv_c_amsterdam_compiler = yes; then
+ if test -z "$AR"; then
AR='cc -c.a'
- if test -z "$ARFLAGS"; then
- ARFLAGS='-o'
+ fi
+ if test -z "$ARFLAGS"; then
+ ARFLAGS='-o'
+ fi
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in ar lib "link -lib"
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AR" && break
+ done
+fi
+if test -z "$AR"; then
+ ac_ct_AR=$AR
+ for ac_prog in ar lib "link -lib"
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_AR" && break
+done
+
+ if test "x$ac_ct_AR" = x; then
+ AR="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+fi
+
+: ${AR=ar}
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
+$as_echo_n "checking the archiver ($AR) interface... " >&6; }
+if ${am_cv_ar_interface+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ am_cv_ar_interface=ar
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int some_variable = 0;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
+ (eval $am_ar_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if test "$ac_status" -eq 0; then
+ am_cv_ar_interface=ar
+ else
+ am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
+ (eval $am_ar_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if test "$ac_status" -eq 0; then
+ am_cv_ar_interface=lib
+ else
+ am_cv_ar_interface=unknown
+ fi
fi
- else
- if test -n "$ac_tool_prefix"; then
+ rm -f conftest.lib libconftest.a
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
+$as_echo "$am_cv_ar_interface" >&6; }
+
+case $am_cv_ar_interface in
+ar)
+ ;;
+lib)
+ # Microsoft lib, so override with the ar-lib wrapper script.
+ # FIXME: It is wrong to rewrite AR.
+ # 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__AR in this case,
+ # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
+ # similar.
+ AR="$am_aux_dir/ar-lib $AR"
+ ;;
+unknown)
+ as_fn_error $? "could not determine $AR interface" "$LINENO" 5
+ ;;
+esac
+
+ fi
+
+ 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
AR="$ac_cv_prog_AR"
fi
- if test -z "$ARFLAGS"; then
- ARFLAGS='cru'
- fi
- fi
- else
- if test -z "$ARFLAGS"; then
- ARFLAGS='cru'
- fi
+ if test -z "$ARFLAGS"; then
+ ARFLAGS='cr'
fi
+
if test -z "$RANLIB"; then
if test $gl_cv_c_amsterdam_compiler = yes; then
RANLIB=':'
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 ${ac_cv_header_stdc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
-else
- ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then :
- :
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
- ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
-if test "x$ac_cv_header_minix_config_h" = xyes; then :
- MINIX=yes
-else
- MINIX=
-fi
-
-
- if test "$MINIX" = yes; then
-
-$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
-
-
-$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
-
-
-$as_echo "#define _MINIX 1" >>confdefs.h
-
-
-$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
-
- 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 ${ac_cv_safe_to_define___extensions__+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-# define __EXTENSIONS__ 1
- $ac_includes_default
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_safe_to_define___extensions__=yes
-else
- ac_cv_safe_to_define___extensions__=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
-$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
- test $ac_cv_safe_to_define___extensions__ = yes &&
- $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
-
- $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
-
- $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
-
- $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
-
- $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
-
- $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
-
- { $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
-
-
-
-
-
-
-
-
{ $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 ${ac_cv_sys_largefile_source+:} false; then :
+ # Pre-early section.
+
+
+
+ # Code from module absolute-header:
+ # Code from module alignof:
+ # Code from module alignof-tests:
# Code from module alloca-opt:
# Code from module alloca-opt-tests:
# Code from module announce-gen:
# Code from module binary-io-tests:
# Code from module btowc:
# Code from module btowc-tests:
+ # Code from module builtin-expect:
# Code from module c-ctype:
# Code from module c-ctype-tests:
# Code from module c-stack:
# Code from module closeout:
# Code from module config-h:
# Code from module configmake:
+ # Code from module ctype:
+ # Code from module ctype-tests:
# Code from module dirent:
# Code from module dirent-c++-tests:
# Code from module dirent-tests:
+ # Code from module dirfd:
# Code from module dirname:
# Code from module dirname-lgpl:
# Code from module dirname-tests:
+ # Code from module do-release-commit-and-tag:
# Code from module dosname:
# Code from module double-slash-root:
# Code from module dup:
# Code from module execute:
# 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 filenamecat:
# Code from module filenamecat-lgpl:
# Code from module filenamecat-tests:
+ # Code from module flexmember:
# Code from module float:
# Code from module float-tests:
# Code from module fopen:
# Code from module getdtablesize:
# Code from module getdtablesize-tests:
# Code from module getopt-gnu:
+ # Code from module getopt-gnu-tests:
# Code from module getopt-posix:
# Code from module getopt-posix-tests:
# Code from module getpagesize:
+ # Code from module getprogname:
+ # Code from module getprogname-tests:
# Code from module gettext-h:
# Code from module gettimeofday:
# Code from module gettimeofday-tests:
# Code from module git-version-gen:
+ # Code from module gitlog-to-changelog:
# Code from module gnu-web-doc-update:
# Code from module gnumakefile:
# Code from module gnupload:
# Code from module gpl-3.0:
+ # Code from module hard-locale:
# Code from module havelib:
# Code from module ignore-value:
# Code from module ignore-value-tests:
# Code from module inttypes:
# Code from module inttypes-incomplete:
# Code from module inttypes-tests:
+ # Code from module isblank:
+ # Code from module isblank-tests:
# Code from module isnand-nolibm:
# Code from module isnand-nolibm-tests:
# Code from module isnanf-nolibm:
# Code from module largefile:
# Code from module libsigsegv:
+ # Code from module limits-h:
+ # Code from module limits-h-tests:
# Code from module link:
# Code from module link-tests:
# Code from module linkedhash-list:
# Code from module lstat:
# Code from module lstat-tests:
# Code from module maintainer-makefile:
- # Code from module malloc-gnu:
- # Code from module malloc-gnu-tests:
# Code from module malloc-posix:
# Code from module malloca:
# Code from module malloca-tests:
# Code from module memchr-tests:
# Code from module memchr2:
# Code from module memchr2-tests:
+ # Code from module minmax:
# Code from module mkdtemp:
# Code from module mkstemp:
# Code from module msvc-inval:
# Code from module ssize_t:
# Code from module stat:
# Code from module stat-tests:
+ # Code from module stdalign:
+ # Code from module stdalign-tests:
# Code from module stdarg:
esac
gl_gcc_warnings=$enableval
else
- if test -d "$srcdir"/.git; then
- gl_gcc_warnings=yes
- else
+ if test -f "$srcdir"/.tarball-version; then
gl_gcc_warnings=no
+ else
+ gl_gcc_warnings=yes
fi
fi
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
gl_cv_warn_c__Werror__Wunknown_warning_option=yes
else
gl_cv_warn_c__Werror__Wunknown_warning_option=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
CFLAGS="$gl_save_compiler_FLAGS"
fi
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$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
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
CFLAGS="$gl_save_compiler_FLAGS"
fi
CFLAGS="$CFLAGS -W -Werror"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-void f (void)
+int f (void)
{
typedef struct { int a; int b; } s_t;
s_t s1 = { 0, };
+ return s1.b;
}
int
fi
# List all gcc warning categories.
+ # To compare this list to your installed GCC's, run this Bash command:
+ #
+ # comm -3 \
+ # <(sed -n 's/^ *\(-[^ ]*\) .*/\1/p' manywarnings.m4 | sort) \
+ # <(gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort |
+ # grep -v -x -f <(
+ # awk '/^[^#]/ {print ws}' ../build-aux/gcc-warning.spec))
+
gl_manywarn_set=
for gl_manywarn_item in \
+ -fno-common \
-W \
-Wabi \
-Waddress \
-Waggressive-loop-optimizations \
-Wall \
- -Warray-bounds \
-Wattributes \
-Wbad-function-cast \
+ -Wbool-compare \
-Wbuiltin-macro-redefined \
-Wcast-align \
-Wchar-subscripts \
+ -Wchkp \
-Wclobbered \
-Wcomment \
-Wcomments \
-Wcoverage-mismatch \
-Wcpp \
+ -Wdate-time \
-Wdeprecated \
-Wdeprecated-declarations \
+ -Wdesignated-init \
-Wdisabled-optimization \
+ -Wdiscarded-array-qualifiers \
+ -Wdiscarded-qualifiers \
-Wdiv-by-zero \
-Wdouble-promotion \
+ -Wduplicated-cond \
-Wempty-body \
-Wendif-labels \
-Wenum-compare \
-Wformat-extra-args \
-Wformat-nonliteral \
-Wformat-security \
+ -Wformat-signedness \
-Wformat-y2k \
-Wformat-zero-length \
+ -Wframe-address \
-Wfree-nonheap-object \
+ -Whsa \
+ -Wignored-attributes \
-Wignored-qualifiers \
-Wimplicit \
-Wimplicit-function-declaration \
-Wimplicit-int \
+ -Wincompatible-pointer-types \
-Winit-self \
-Winline \
+ -Wint-conversion \
-Wint-to-pointer-cast \
-Winvalid-memory-model \
-Winvalid-pch \
-Wjump-misses-init \
+ -Wlogical-not-parentheses \
-Wlogical-op \
-Wmain \
-Wmaybe-uninitialized \
+ -Wmemset-transposed-args \
+ -Wmisleading-indentation \
-Wmissing-braces \
-Wmissing-declarations \
-Wmissing-field-initializers \
-Wmissing-include-dirs \
-Wmissing-parameter-type \
-Wmissing-prototypes \
- -Wmudflap \
-Wmultichar \
-Wnarrowing \
-Wnested-externs \
-Wnonnull \
- -Wnormalized=nfc \
+ -Wnonnull-compare \
+ -Wnull-dereference \
+ -Wodr \
-Wold-style-declaration \
-Wold-style-definition \
+ -Wopenmp-simd \
-Woverflow \
-Woverlength-strings \
-Woverride-init \
-Wpragmas \
-Wreturn-local-addr \
-Wreturn-type \
+ -Wscalar-storage-order \
-Wsequence-point \
-Wshadow \
+ -Wshift-count-negative \
+ -Wshift-count-overflow \
+ -Wshift-negative-value \
+ -Wsizeof-array-argument \
-Wsizeof-pointer-memaccess \
-Wstack-protector \
-Wstrict-aliasing \
-Wsuggest-attribute=format \
-Wsuggest-attribute=noreturn \
-Wsuggest-attribute=pure \
+ -Wsuggest-final-methods \
+ -Wsuggest-final-types \
-Wswitch \
+ -Wswitch-bool \
-Wswitch-default \
-Wsync-nand \
-Wsystem-headers \
+ -Wtautological-compare \
-Wtrampolines \
-Wtrigraphs \
-Wtype-limits \
gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
done
+ # gcc --help=warnings outputs an unusual form for these options; list
+ # them here so that the above 'comm' command doesn't report a false match.
+ gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2"
+ gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc"
+ gl_manywarn_set="$gl_manywarn_set -Wshift-overflow=2"
+ gl_manywarn_set="$gl_manywarn_set -Wunused-const-variable=2"
+
+ # These are needed for older GCC versions.
+ if test -n "$GCC"; then
+ case `($CC --version) 2>/dev/null` in
+ 'gcc (GCC) '[0-3].* | \
+ 'gcc (GCC) '4.[0-7].*)
+ gl_manywarn_set="$gl_manywarn_set -fdiagnostics-show-option"
+ gl_manywarn_set="$gl_manywarn_set -funit-at-a-time"
+ ;;
+ esac
+ fi
+
# Disable specific options as needed.
if test "$gl_cv_cc_nomfi_needed" = yes; then
gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
eval "$as_gl_Warn=yes"
else
eval "$as_gl_Warn=no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
CFLAGS="$gl_save_compiler_FLAGS"
fi
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
gl_cv_warn_c__Wno_format_nonliteral=yes
else
gl_cv_warn_c__Wno_format_nonliteral=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
CFLAGS="$gl_save_compiler_FLAGS"
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 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
-
- 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. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- gl_cv_warn_c__funit_at_a_time=yes
-else
- gl_cv_warn_c__funit_at_a_time=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__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
-
-
-
-
fi
int main () { return zero(); }
_ACEOF
+ save_ac_compile="$ac_compile"
+ ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- mv conftest.$ac_objext conftest1.$ac_objext
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int zero (void) { return 0; }
_ACEOF
+ ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- mv conftest.$ac_objext conftest2.$ac_objext
if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
:
else
fi
fi
fi
+ ac_compile="$save_ac_compile"
rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
fi
GNULIB_PTSNAME=0;
GNULIB_PTSNAME_R=0;
GNULIB_PUTENV=0;
+ GNULIB_QSORT_R=0;
GNULIB_RANDOM=0;
GNULIB_RANDOM_R=0;
GNULIB_REALLOC_POSIX=0;
HAVE_POSIX_OPENPT=1;
HAVE_PTSNAME=1;
HAVE_PTSNAME_R=1;
+ HAVE_QSORT_R=1;
HAVE_RANDOM=1;
HAVE_RANDOM_H=1;
HAVE_RANDOM_R=1;
REPLACE_PTSNAME=0;
REPLACE_PTSNAME_R=0;
REPLACE_PUTENV=0;
+ REPLACE_QSORT_R=0;
REPLACE_RANDOM_R=0;
REPLACE_REALLOC=0;
REPLACE_REALPATH=0;
#else
/* Avoid a crash on POSIX systems. */
#include <signal.h>
+#include <unistd.h>
/* A POSIX signal handler. */
static void
exception_handler (int sig)
{
- exit (1);
+ _exit (1);
}
static void
nocrash_init (void)
char *name = realpath ("conftest.a", NULL);
if (!(name && *name == '/'))
result |= 1;
+ free (name);
}
{
char *name = realpath ("conftest.b/../conftest.a", NULL);
if (name != NULL)
result |= 2;
+ free (name);
}
{
char *name = realpath ("conftest.a/", NULL);
if (name != NULL)
result |= 4;
+ free (name);
}
{
char *name1 = realpath (".", NULL);
char *name2 = realpath ("conftest.d//./..", NULL);
- if (strcmp (name1, name2) != 0)
+ if (! name1 || ! name2 || strcmp (name1, name2))
result |= 8;
+ free (name1);
+ free (name2);
}
return result;
HAVE_DECL_FCHDIR=1;
HAVE_DECL_FDATASYNC=1;
HAVE_DECL_GETDOMAINNAME=1;
+ HAVE_DECL_GETLOGIN=1;
HAVE_DECL_GETLOGIN_R=1;
HAVE_DECL_GETPAGESIZE=1;
HAVE_DECL_GETUSERSHELL=1;
REPLACE_FTRUNCATE=0;
REPLACE_GETCWD=0;
REPLACE_GETDOMAINNAME=0;
+ REPLACE_GETDTABLESIZE=0;
REPLACE_GETLOGIN_R=0;
REPLACE_GETGROUPS=0;
REPLACE_GETPAGESIZE=0;
REPLACE_PWRITE=0;
REPLACE_READ=0;
REPLACE_READLINK=0;
+ REPLACE_READLINKAT=0;
REPLACE_RMDIR=0;
REPLACE_SLEEP=0;
REPLACE_SYMLINK=0;
+ REPLACE_SYMLINKAT=0;
REPLACE_TTYNAME_R=0;
REPLACE_UNLINK=0;
REPLACE_UNLINKAT=0;
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <errno.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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'
+ 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_header_literal_regex=`echo 'errno.h' \
- | sed -e "$gl_make_literal_regex_sed"`
- gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
- s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
- s|^/[^/]|//&|
- p
- q
- }'
- gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_errno_h
+ gl_cv_next_errno_h='"'$gl_header'"'
fi
fi
+
+ 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" = xyes; then :
HAVE_DECL_TRUNC=1;
HAVE_DECL_TRUNCF=1;
HAVE_DECL_TRUNCL=1;
+ REPLACE_ACOSF=0;
+ REPLACE_ASINF=0;
+ REPLACE_ATANF=0;
+ REPLACE_ATAN2F=0;
REPLACE_CBRTF=0;
REPLACE_CBRTL=0;
REPLACE_CEIL=0;
REPLACE_CEILF=0;
REPLACE_CEILL=0;
+ REPLACE_COSF=0;
+ REPLACE_COSHF=0;
+ REPLACE_EXPF=0;
REPLACE_EXPM1=0;
REPLACE_EXPM1F=0;
REPLACE_EXP2=0;
REPLACE_ROUNDL=0;
REPLACE_SIGNBIT=0;
REPLACE_SIGNBIT_USING_GCC=0;
+ REPLACE_SINF=0;
+ REPLACE_SINHF=0;
+ REPLACE_SQRTF=0;
REPLACE_SQRTL=0;
+ REPLACE_TANF=0;
+ REPLACE_TANHF=0;
REPLACE_TRUNC=0;
REPLACE_TRUNCF=0;
REPLACE_TRUNCL=0;
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ 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
+ 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'
+ 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_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
- 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"`'"'
+ gl_header=$gl_cv_absolute_sys_types_h
+ gl_cv_next_sys_types_h='"'$gl_header'"'
fi
if test $ac_cv_header_sys_stat_h = yes; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ 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
+ 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"`'"'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'sys/stat.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
+
+ gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_sys_stat_h
+ gl_cv_next_sys_stat_h='"'$gl_header'"'
else
gl_cv_next_sys_stat_h='<'sys/stat.h'>'
fi
+ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETDTABLESIZE $ac_have_decl
+_ACEOF
+
if test $ac_cv_header_getopt_h = yes; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <getopt.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
- case "$host_os" in
- mingw*)
- gl_dirsep_regex='[/\\]'
- ;;
- *)
- gl_dirsep_regex='\/'
- ;;
- esac
- gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-
- gl_header_literal_regex=`echo 'getopt.h' \
- | sed -e "$gl_make_literal_regex_sed"`
- gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
- s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
- s|^/[^/]|//&|
- p
- q
- }'
- gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'getopt.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
+
+ gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_getopt_h
+ gl_cv_next_getopt_h='"'$gl_header'"'
else
gl_cv_next_getopt_h='<'getopt.h'>'
fi
#else
/* Avoid a crash on POSIX systems. */
#include <signal.h>
+#include <unistd.h>
/* A POSIX signal handler. */
static void
exception_handler (int sig)
{
- exit (1);
+ _exit (1);
}
static void
nocrash_init (void)
#define HAVE_DECL_GETENV $ac_have_decl
_ACEOF
+
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
if ${ac_cv_c_restrict+:} false; then :
for ac_kw in __restrict __restrict__ _Restrict restrict; do
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-typedef int * int_ptr;
- int foo (int_ptr $ac_kw ip) {
- return ip[0];
- }
+typedef int *int_ptr;
+ int foo (int_ptr $ac_kw ip) { return ip[0]; }
+ int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
+ int bar (int ip[$ac_kw]) { return ip[0]; }
+
int
main ()
{
int s[1];
- int * $ac_kw t = s;
- t[0] = 0;
- return foo(t)
+ int *$ac_kw t = s;
+ t[0] = 0;
+ return foo (t) + bar (t);
+
;
return 0;
}
HAVE_GETTIMEOFDAY=1;
HAVE_STRUCT_TIMEVAL=1;
HAVE_SYS_TIME_H=1;
+ HAVE_TIMEZONE_T=0;
REPLACE_GETTIMEOFDAY=0;
REPLACE_STRUCT_TIMEVAL=0;
if test $ac_cv_header_sys_time_h = yes; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/time.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
- case "$host_os" in
- mingw*)
- gl_dirsep_regex='[/\\]'
- ;;
- *)
- gl_dirsep_regex='\/'
- ;;
- esac
- gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-
- gl_header_literal_regex=`echo 'sys/time.h' \
- | sed -e "$gl_make_literal_regex_sed"`
- gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
- s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
- s|^/[^/]|//&|
- p
- q
- }'
- gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'sys/time.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
+
+ gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_sys_time_h
+ gl_cv_next_sys_time_h='"'$gl_header'"'
else
gl_cv_next_sys_time_h='<'sys/time.h'>'
fi
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_limits_h='<'limits.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
+$as_echo_n "checking absolute name of <limits.h>... " >&6; }
+if ${gl_cv_next_limits_h+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_limits_h = yes; then
+
+
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.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 'limits.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
+
+ gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_limits_h
+ gl_cv_next_limits_h='"'$gl_header'"'
+ else
+ gl_cv_next_limits_h='<'limits.h'>'
+ fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
+$as_echo "$gl_cv_next_limits_h" >&6; }
+ fi
+ NEXT_LIMITS_H=$gl_cv_next_limits_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='<'limits.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_limits_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
+$as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
+if ${gl_cv_header_limits_width+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+ #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
+ #endif
+ #include <limits.h>
+ int ullw = ULLONG_WIDTH;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_limits_width=yes
+else
+ gl_cv_header_limits_width=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_limits_width" >&5
+$as_echo "$gl_cv_header_limits_width" >&6; }
+ if test "$gl_cv_header_limits_width" = yes; then
+ LIMITS_H=
+ else
+ LIMITS_H=limits.h
+ fi
+
+ if test -n "$LIMITS_H"; then
+ GL_GENERATE_LIMITS_H_TRUE=
+ GL_GENERATE_LIMITS_H_FALSE='#'
+else
+ GL_GENERATE_LIMITS_H_TRUE='#'
+ GL_GENERATE_LIMITS_H_FALSE=
+fi
+
+
ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
ac_have_decl=1
REPLACE_NULL=0;
+ HAVE_MAX_ALIGN_T=1;
HAVE_WCHAR_T=1;
STDDEF_H=
+ ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
+
+"
+if test "x$ac_cv_type_max_align_t" = xyes; then :
+
+else
+ HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
+fi
+
if test $gt_cv_c_wchar_t = no; then
HAVE_WCHAR_T=0
STDDEF_H=stddef.h
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ 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
+ 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'
+ 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_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"`'"'
+ gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_stddef_h
+ gl_cv_next_stddef_h='"'$gl_header'"'
fi
# Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
# in libc. IRIX 6.5 has the first one in both libc and libpthread, but
# the second one only in libpthread, and lock.c needs it.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ #
+ # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
+ # needs -pthread for some reason. See:
+ # http://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00023.html
+ save_LIBS=$LIBS
+ for gl_pthread in '' '-pthread'; do
+ LIBS="$LIBS $gl_pthread"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <pthread.h>
+ pthread_mutex_t m;
+ pthread_mutexattr_t ma;
+
int
main ()
{
-pthread_mutex_lock((pthread_mutex_t*)0);
- pthread_mutexattr_init((pthread_mutexattr_t*)0);
+pthread_mutex_lock (&m);
+ pthread_mutexattr_init (&ma);
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
gl_have_pthread=yes
+ LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread
+ LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+ LIBS=$save_LIBS
+ test -n "$gl_have_pthread" && break
+ done
+
# Test for libpthread by looking for pthread_kill. (Not pthread_self,
# since it is defined as a macro on OSF/1.)
- if test -n "$gl_have_pthread"; then
+ if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then
# The program links fine without libpthread. But it may actually
# need to link with libpthread in order to create multiple threads.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
# Therefore pthread_in_use() needs to actually try to create a
# thread: pthread_create from libc will fail, whereas
# pthread_create will actually create a thread.
+ # On Solaris 10 or newer, this test is no longer needed, because
+ # libc contains the fully functional pthread functions.
case "$host_os" in
- solaris* | hpux*)
+ solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
fi
- else
+ elif test -z "$gl_have_pthread"; then
# 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; }
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 :
+ if test "$cross_compiling" = yes; then :
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
- esac
+ *-gnu*)
+ # Guess yes on glibc systems.
+ 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
main ()
{
struct stat sbuf;
- /* Linux will dereference the symlink and fail, as required by
- POSIX. That is better in the sense that it means we will not
- have to compile and use the lstat wrapper. */
- return lstat ("conftest.sym/", &sbuf) == 0;
+ if (symlink ("conftest.file", "conftest.sym") != 0)
+ return 1;
+ /* Linux will dereference the symlink and fail, as required by
+ POSIX. That is better in the sense that it means we will not
+ have to compile and use the lstat wrapper. */
+ return lstat ("conftest.sym/", &sbuf) == 0;
;
return 0;
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
- else
- # If the 'ln -s' command failed, then we probably don't even
- # have an lstat function.
- gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
- fi
rm -f conftest.sym conftest.file
fi
;;
esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_SED" || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
{ $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; }
int
main ()
{
-return ! malloc (0);
+char *p = malloc (0);
+ int result = !p;
+ free (p);
+ return result;
;
return 0;
}
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
+$as_echo_n "checking whether <limits.h> defines MIN and MAX... " >&6; }
+if ${gl_cv_minmax_in_limits_h+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+ int x = MIN (42, 17);
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_minmax_in_limits_h=yes
+else
+ gl_cv_minmax_in_limits_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
+$as_echo "$gl_cv_minmax_in_limits_h" >&6; }
+ if test $gl_cv_minmax_in_limits_h = yes; then
+
+$as_echo "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
+$as_echo_n "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
+if ${gl_cv_minmax_in_sys_param_h+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/param.h>
+ int x = MIN (42, 17);
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_minmax_in_sys_param_h=yes
+else
+ gl_cv_minmax_in_sys_param_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
+$as_echo "$gl_cv_minmax_in_sys_param_h" >&6; }
+ if test $gl_cv_minmax_in_sys_param_h = yes; then
+
+$as_echo "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+
+
+
+
gl_cv_c_multiarch=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+ LIB_POSIX_SPAWN=
+
+ gl_saved_libs=$LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing posix_spawn" >&5
+$as_echo_n "checking for library containing posix_spawn... " >&6; }
+if ${ac_cv_search_posix_spawn+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char posix_spawn ();
+int
+main ()
+{
+return posix_spawn ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' rt; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_posix_spawn=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_posix_spawn+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_posix_spawn+:} false; then :
+
+else
+ ac_cv_search_posix_spawn=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_posix_spawn" >&5
+$as_echo "$ac_cv_search_posix_spawn" >&6; }
+ac_res=$ac_cv_search_posix_spawn
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ test "$ac_cv_search_posix_spawn" = "none required" ||
+ LIB_POSIX_SPAWN=$ac_cv_search_posix_spawn
+fi
+
+ for ac_func in posix_spawn
+do :
+ ac_fn_c_check_func "$LINENO" "posix_spawn" "ac_cv_func_posix_spawn"
+if test "x$ac_cv_func_posix_spawn" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_POSIX_SPAWN 1
+_ACEOF
+fi
+done
+ LIBS=$gl_saved_libs
if test $ac_cv_func_posix_spawn != yes; then
HAVE_POSIX_SPAWN=0
{ $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 "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
if ${ac_cv_type_uid_t+:} false; then :
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
+ if LC_ALL=C grep -E '(^|[^a-zA-Z0-9_])_foo([^a-zA-Z0-9_]|$)' conftest.$gl_asmext >/dev/null; then
gl_cv_prog_as_underscore=yes
else
gl_cv_prog_as_underscore=no
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
# Guess yes on FreeBSD >= 5.
- freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";;
+ freebsd[1-4].*) gl_cv_func_snprintf_retval_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
# Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
/* end confdefs.h. */
#include <stdbool.h>
- #ifndef bool
- "error: bool is not defined"
- #endif
- #ifndef false
- "error: false is not defined"
- #endif
- #if false
- "error: false is not 0"
- #endif
- #ifndef true
- "error: true is not defined"
- #endif
- #if true != 1
- "error: true is not 1"
+
+ #ifdef __cplusplus
+ typedef bool Bool;
+ #else
+ typedef _Bool Bool;
+ #ifndef bool
+ "error: bool is not defined"
+ #endif
+ #ifndef false
+ "error: false is not defined"
+ #endif
+ #if false
+ "error: false is not 0"
+ #endif
+ #ifndef true
+ "error: true is not defined"
+ #endif
+ #if true != 1
+ "error: true is not 1"
+ #endif
#endif
+
#ifndef __bool_true_false_are_defined
"error: __bool_true_false_are_defined is not defined"
#endif
- struct s { _Bool s: 1; _Bool t; } s;
+ struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
char a[true == 1 ? 1 : -1];
char b[false == 0 ? 1 : -1];
char c[__bool_true_false_are_defined == 1 ? 1 : -1];
char d[(bool) 0.5 == true ? 1 : -1];
/* See body of main program for 'e'. */
- char f[(_Bool) 0.0 == false ? 1 : -1];
+ char f[(Bool) 0.0 == false ? 1 : -1];
char g[true];
- char h[sizeof (_Bool)];
+ char h[sizeof (Bool)];
char i[sizeof s.t];
enum { j = false, k = true, l = false * true, m = true * 256 };
/* The following fails for
HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
- _Bool n[m];
+ Bool n[m];
char o[sizeof n == m * sizeof n[0] ? 1 : -1];
- char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+ char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
/* Catch a bug in an HP-UX C compiler. See
http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
*/
- _Bool q = true;
- _Bool *pq = &q;
+ Bool q = true;
+ Bool *pq = &q;
+ bool *qq = &q;
int
main ()
{
bool e = &s;
- *pq |= q;
- *pq |= ! q;
+ *pq |= q; *pq |= ! q;
+ *qq |= q; *qq |= ! q;
/* Refer to every declared value, to avoid compiler optimizations. */
return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
- + !m + !n + !o + !p + !q + !pq);
+ + !m + !n + !o + !p + !q + !pq + !qq);
;
return 0;
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
+$as_echo_n "checking for wint_t... " >&6; }
+if ${gt_cv_c_wint_t+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Tru64 with Desktop Toolkit C has a bug: <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';
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_c_wint_t=yes
+else
+ gt_cv_c_wint_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
+$as_echo "$gt_cv_c_wint_t" >&6; }
+ if test $gt_cv_c_wint_t = yes; then
+
+$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is too small" >&5
+$as_echo_n "checking whether wint_t is too small... " >&6; }
+if ${gl_cv_type_wint_t_too_small+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Tru64 with Desktop Toolkit C has a bug: <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>. */
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+#endif
+#include <wchar.h>
+ int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_type_wint_t_too_small=no
+else
+ gl_cv_type_wint_t_too_small=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_too_small" >&5
+$as_echo "$gl_cv_type_wint_t_too_small" >&6; }
+ if test $gl_cv_type_wint_t_too_small = yes; then
+ GNULIB_OVERRIDES_WINT_T=1
+ else
+ GNULIB_OVERRIDES_WINT_T=0
+ fi
+ else
+ GNULIB_OVERRIDES_WINT_T=0
+ fi
+
+
+
+
+
+
if test $ac_cv_header_stdint_h = yes; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdint.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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"`'"'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'stdint.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
+
+ gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_stdint_h
+ gl_cv_next_stdint_h='"'$gl_header'"'
else
gl_cv_next_stdint_h='<'stdint.h'>'
fi
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#define __STDC_CONSTANT_MACROS 1
+#define __STDC_LIMIT_MACROS 1
#include <stdint.h>
/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
#if !(defined WCHAR_MIN && defined WCHAR_MAX)
intmax_t i = INTMAX_MAX;
uintmax_t j = UINTMAX_MAX;
+/* Check that SIZE_MAX has the correct type, if possible. */
+#if 201112 <= __STDC_VERSION__
+int k = _Generic (SIZE_MAX, size_t: 0);
+#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
+ || (0x5110 <= __SUNPRO_C && !__STDC__))
+extern size_t k;
+extern __typeof__ (SIZE_MAX) k;
+#endif
+
#include <limits.h> /* for CHAR_BIT */
#define TYPE_MINIMUM(t) \
((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#define __STDC_CONSTANT_MACROS 1
+#define __STDC_LIMIT_MACROS 1
#include <stdint.h>
{ $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
+
+ HAVE_C99_STDINT_H=0
+ HAVE_SYS_BITYPES_H=0
+ HAVE_SYS_INTTYPES_H=0
+ STDINT_H=stdint.h
if test "$gl_cv_header_working_stdint_h" = yes; then
- STDINT_H=
+ HAVE_C99_STDINT_H=1
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
+$as_echo_n "checking whether stdint.h predates C++11... " >&6; }
+if ${gl_cv_header_stdint_predates_cxx11_h+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ gl_cv_header_stdint_predates_cxx11_h=yes
+ 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
+
+
+intmax_t im = INTMAX_MAX;
+int32_t i32 = INT32_C (0x7fffffff);
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_stdint_predates_cxx11_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
+$as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
+
+ if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
+
+$as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
+
+
+$as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
+$as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
+if ${gl_cv_header_stdint_width+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ gl_cv_header_stdint_width=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ /* Work if build is not clean. */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
+ #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+ #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
+ #endif
+ #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
+
+ int iw = UINTMAX_WIDTH;
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_stdint_width=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
+$as_echo "$gl_cv_header_stdint_width" >&6; }
+ if test "$gl_cv_header_stdint_width" = yes; then
+ STDINT_H=
+ fi
else
for ac_header in sys/inttypes.h sys/bitypes.h
do :
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
- if test $BITSIZEOF_WINT_T -lt 32; then
+ if test $GNULIB_OVERRIDES_WINT_T = 1; then
BITSIZEOF_WINT_T=32
fi
- STDINT_H=stdint.h
fi
+ LIMITS_H=limits.h
+ if test -n "$LIMITS_H"; then
+ GL_GENERATE_LIMITS_H_TRUE=
+ GL_GENERATE_LIMITS_H_FALSE='#'
+else
+ GL_GENERATE_LIMITS_H_TRUE='#'
+ GL_GENERATE_LIMITS_H_FALSE=
+fi
+
+
+
+
+
+
if test -n "$STDINT_H"; then
GL_GENERATE_STDINT_H_TRUE=
GL_GENERATE_STDINT_H_FALSE='#'
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <string.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'string.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
+
+ gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
- gl_header_literal_regex=`echo 'string.h' \
- | sed -e "$gl_make_literal_regex_sed"`
- gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
- s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
- s|^/[^/]|//&|
- p
- q
- }'
- gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ gl_header=$gl_cv_absolute_string_h
+ gl_cv_next_string_h='"'$gl_header'"'
fi
GNULIB_STRPTIME=0;
GNULIB_TIMEGM=0;
GNULIB_TIME_R=0;
+ GNULIB_TIME_RZ=0;
HAVE_DECL_LOCALTIME_R=1;
HAVE_NANOSLEEP=1;
HAVE_STRPTIME=1;
REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
REPLACE_TIMEGM=GNULIB_PORTCHECK;
+ : ${GNULIB_GETTIMEOFDAY=0};
+ REPLACE_GMTIME=0;
+ REPLACE_LOCALTIME=0;
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
TIME_H_DEFINES_STRUCT_TIMESPEC=0
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
+ UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
TIME_H_DEFINES_STRUCT_TIMESPEC=1
else
$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
+$as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
+if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+
+int
+main ()
+{
+static struct timespec x; x.tv_sec = x.tv_nsec;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_sys_struct_timespec_in_unistd_h=yes
+else
+ gl_cv_sys_struct_timespec_in_unistd_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
+$as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
+ if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
+ UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
+ fi
fi
fi
fi
+
if test $gl_cv_have_include_next = yes; then
gl_cv_next_time_h='<'time.h'>'
else
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <time.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'time.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
+
+ gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
- gl_header_literal_regex=`echo 'time.h' \
- | sed -e "$gl_make_literal_regex_sed"`
- gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
- s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
- s|^/[^/]|//&|
- p
- q
- }'
- gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ gl_header=$gl_cv_absolute_time_h
+ gl_cv_next_time_h='"'$gl_header'"'
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
-$as_echo_n "checking for wint_t... " >&6; }
-if ${gt_cv_c_wint_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Tru64 with Desktop Toolkit C has a bug: <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';
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- gt_cv_c_wint_t=yes
-else
- gt_cv_c_wint_t=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
-$as_echo "$gt_cv_c_wint_t" >&6; }
- if test $gt_cv_c_wint_t = yes; then
-
-$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
-
- fi
-
-
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";;
# Guess yes on FreeBSD >= 5.
- freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";;
+ freebsd[1-4].*) gl_cv_func_printf_sizes_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
# Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";;
if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
|| strcmp (buf, "12345671 33") != 0)
result |= 1;
+#else
+ result |= 1;
#endif
buf[0] = '\0';
if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_printf_infinite="guessing yes";;
# Guess yes on FreeBSD >= 6.
- freebsd[1-5]*) gl_cv_func_printf_infinite="guessing no";;
+ freebsd[1-5].*) gl_cv_func_printf_infinite="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
# Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";;
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";;
# Guess yes on FreeBSD >= 6.
- freebsd[1-5]*) gl_cv_func_printf_infinite_long_double="guessing no";;
+ freebsd[1-5].*) gl_cv_func_printf_infinite_long_double="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
# Guess yes on HP-UX >= 11.
hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
#else
/* Avoid a crash on POSIX systems. */
#include <signal.h>
+#include <unistd.h>
/* A POSIX signal handler. */
static void
exception_handler (int sig)
{
- exit (1);
+ _exit (1);
}
static void
nocrash_init (void)
# ifdef WORDS_BIGENDIAN
# define LDBL80_WORDS(exponent,manthi,mantlo) \
{ ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
- ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
+ ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
(unsigned int) (mantlo) << 16 \
}
# else
{ /* Pseudo-NaN. */
static union { unsigned int word[4]; long double value; } x =
{ LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
- if (sprintf (buf, "%Lf", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Lf", x.value) <= 0)
result |= 4;
- if (sprintf (buf, "%Le", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Le", x.value) <= 0)
result |= 4;
- if (sprintf (buf, "%Lg", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Lg", x.value) <= 0)
result |= 4;
}
{ /* Pseudo-Infinity. */
static union { unsigned int word[4]; long double value; } x =
{ LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
- if (sprintf (buf, "%Lf", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Lf", x.value) <= 0)
result |= 8;
- if (sprintf (buf, "%Le", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Le", x.value) <= 0)
result |= 8;
- if (sprintf (buf, "%Lg", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Lg", x.value) <= 0)
result |= 8;
}
{ /* Pseudo-Zero. */
static union { unsigned int word[4]; long double value; } x =
{ LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
- if (sprintf (buf, "%Lf", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Lf", x.value) <= 0)
result |= 16;
- if (sprintf (buf, "%Le", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Le", x.value) <= 0)
result |= 16;
- if (sprintf (buf, "%Lg", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Lg", x.value) <= 0)
result |= 16;
}
{ /* Unnormalized number. */
static union { unsigned int word[4]; long double value; } x =
{ LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
- if (sprintf (buf, "%Lf", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Lf", x.value) <= 0)
result |= 32;
- if (sprintf (buf, "%Le", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Le", x.value) <= 0)
result |= 32;
- if (sprintf (buf, "%Lg", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Lg", x.value) <= 0)
result |= 32;
}
{ /* Pseudo-Denormal. */
static union { unsigned int word[4]; long double value; } x =
{ LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
- if (sprintf (buf, "%Lf", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Lf", x.value) <= 0)
result |= 64;
- if (sprintf (buf, "%Le", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Le", x.value) <= 0)
result |= 64;
- if (sprintf (buf, "%Lg", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Lg", x.value) <= 0)
result |= 64;
}
#endif
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_printf_directive_f="guessing yes";;
# Guess yes on FreeBSD >= 6.
- freebsd[1-5]*) gl_cv_func_printf_directive_f="guessing no";;
+ freebsd[1-5].*) gl_cv_func_printf_directive_f="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
# Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";;
#else
/* Avoid a crash on POSIX systems. */
#include <signal.h>
+#include <unistd.h>
/* A POSIX signal handler. */
static void
exception_handler (int sig)
{
- exit (1);
+ _exit (1);
}
static void
nocrash_init (void)
REPLACE_FDOPENDIR=0;
+ GNULIB_ISBLANK=0;
+ HAVE_ISBLANK=1;
+
+
else
if test "$cross_compiling" = yes; then :
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_ungetc_works="guessing yes" ;;
+ # Guess yes on glibc and bionic systems.
+ *-gnu*|*-android*)
+ gl_cv_func_ungetc_works="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_ungetc_works="guessing no" ;;
esac
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+# include <stdlib.h>
# if HAVE_UNISTD_H
# include <unistd.h>
# else /* on Windows with MSVC */
return 3;
if (f[1] != '\0')
return 4;
+ free (f);
return 0;
}
#endif
HAVE_DECL_STRTOIMAX=1;
HAVE_DECL_STRTOUMAX=1;
REPLACE_STRTOIMAX=0;
+ REPLACE_STRTOUMAX=0;
INT32_MAX_LT_INTMAX_MAX=1;
INT64_MAX_EQ_LONG_MAX='defined _LP64';
PRI_MACROS_BROKEN=0;
if test $ac_cv_header_inttypes_h = yes; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ 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
+ 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"`'"'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'inttypes.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
+
+ gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_inttypes_h
+ gl_cv_next_inttypes_h='"'$gl_header'"'
else
gl_cv_next_inttypes_h='<'inttypes.h'>'
fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
+$as_echo_n "checking for __builtin_expect... " >&6; }
+if ${gl_cv___builtin_expect+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ int
+ main (int argc, char **argv)
+ {
+ argc = __builtin_expect (argc, 100);
+ return argv[argc != 100][0];
+ }
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv___builtin_expect=yes
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <builtins.h>
+ int
+ main (int argc, char **argv)
+ {
+ argc = __builtin_expect (argc, 100);
+ return argv[argc != 100][0];
+ }
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv___builtin_expect="in <builtins.h>"
+else
+ gl_cv___builtin_expect=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
+$as_echo "$gl_cv___builtin_expect" >&6; }
+ if test "$gl_cv___builtin_expect" = yes; then
+ $as_echo "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
+
+ elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
+ $as_echo "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
+
+ fi
+
+
+
localedir='${datarootdir}/locale'
fi
+ if test "x$runstatedir" = x; then
+ runstatedir='${localstatedir}/run'
+
+ fi
pkglibexecdir='${libexecdir}/${PACKAGE}'
gl_cv_func_dup2_works="guessing no" ;;
cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
gl_cv_func_dup2_works="guessing no" ;;
- linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
- # closed fd may yield -EBADF instead of -1 / errno=EBADF.
- gl_cv_func_dup2_works="guessing no" ;;
- freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
+ aix* | freebsd*)
+ # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
+ # not EBADF.
gl_cv_func_dup2_works="guessing no" ;;
haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
gl_cv_func_dup2_works="guessing no" ;;
+ *-android*) # implemented using dup3(), which fails if oldfd == newfd
+ gl_cv_func_dup2_works="guessing no" ;;
+ os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
+ gl_cv_func_dup2_works="guessing no" ;;
*) gl_cv_func_dup2_works="guessing yes" ;;
esac
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
- #include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <limits.h>
+ #include <sys/resource.h>
+ #include <unistd.h>
+ #ifndef RLIM_SAVED_CUR
+ # define RLIM_SAVED_CUR RLIM_INFINITY
+ #endif
+ #ifndef RLIM_SAVED_MAX
+ # define RLIM_SAVED_MAX RLIM_INFINITY
+ #endif
+
int
main ()
{
int result = 0;
-#ifdef FD_CLOEXEC
- if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
- result |= 1;
-#endif
- if (dup2 (1, 1) == 0)
- result |= 2;
-#ifdef FD_CLOEXEC
- if (fcntl (1, F_GETFD) != FD_CLOEXEC)
- result |= 4;
-#endif
- close (0);
- if (dup2 (0, 0) != -1)
- result |= 8;
- /* Many gnulib modules require POSIX conformance of EBADF. */
- if (dup2 (2, 1000000) == -1 && errno != EBADF)
- result |= 16;
- /* Flush out a cygwin core dump. */
- if (dup2 (2, -1) != -1 || errno != EBADF)
- result |= 32;
- return result;
+ int bad_fd = INT_MAX;
+ struct rlimit rlim;
+ if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
+ && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
+ && rlim.rlim_cur != RLIM_INFINITY
+ && rlim.rlim_cur != RLIM_SAVED_MAX
+ && rlim.rlim_cur != RLIM_SAVED_CUR)
+ bad_fd = rlim.rlim_cur;
+ #ifdef FD_CLOEXEC
+ if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
+ result |= 1;
+ #endif
+ if (dup2 (1, 1) != 1)
+ result |= 2;
+ #ifdef FD_CLOEXEC
+ if (fcntl (1, F_GETFD) != FD_CLOEXEC)
+ result |= 4;
+ #endif
+ close (0);
+ if (dup2 (0, 0) != -1)
+ result |= 8;
+ /* Many gnulib modules require POSIX conformance of EBADF. */
+ if (dup2 (2, bad_fd) == -1 && errno != EBADF)
+ result |= 16;
+ /* Flush out some cygwin core dumps. */
+ if (dup2 (2, -1) != -1 || errno != EBADF)
+ result |= 32;
+ dup2 (2, 255);
+ dup2 (2, 256);
+ /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
+ {
+ int fd = open (".", O_RDONLY);
+ if (fd == -1)
+ result |= 64;
+ else if (dup2 (fd, fd + 1) == -1)
+ result |= 128;
+ close (fd);
+ }
+ return result;
;
return 0;
}
*yes) ;;
*)
REPLACE_DUP2=1
+ for ac_func in setdtablesize
+do :
+ ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
+if test "x$ac_cv_func_setdtablesize" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SETDTABLESIZE 1
+_ACEOF
+
+fi
+done
+
;;
esac
fi
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"
+
+
+
{ $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 :
REPLACE_FCLOSE=1
fi
+ case "$host_os" in
+ openedition) REPLACE_FCLOSE=1 ;;
+ esac
+
if test $REPLACE_FCLOSE = 1; then
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
- # Guess that it works on glibc systems
- case $host_os in #((
- *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
- *) gl_cv_func_fcntl_f_dupfd_works="guessing no";;
+ case $host_os in
+ aix* | cygwin* | haiku*)
+ gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
+ *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
esac
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
-#include <fcntl.h>
#include <errno.h>
+ #include <fcntl.h>
+ #include <limits.h>
+ #include <sys/resource.h>
+ #include <unistd.h>
+ #ifndef RLIM_SAVED_CUR
+ # define RLIM_SAVED_CUR RLIM_INFINITY
+ #endif
+ #ifndef RLIM_SAVED_MAX
+ # define RLIM_SAVED_MAX RLIM_INFINITY
+ #endif
int
main ()
{
int result = 0;
- if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
- if (errno != EINVAL) result |= 2;
- return result;
-
+ int bad_fd = INT_MAX;
+ struct rlimit rlim;
+ if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
+ && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
+ && rlim.rlim_cur != RLIM_INFINITY
+ && rlim.rlim_cur != RLIM_SAVED_MAX
+ && rlim.rlim_cur != RLIM_SAVED_CUR)
+ bad_fd = rlim.rlim_cur;
+ if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
+ if (errno != EINVAL) result |= 2;
+ if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
+ if (errno != EINVAL) result |= 8;
+ /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
+ {
+ int fd;
+ fd = open (".", O_RDONLY);
+ if (fd == -1)
+ result |= 16;
+ else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
+ result |= 32;
+
+ close (fd);
+ }
+ return result;
;
return 0;
}
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <fcntl.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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'
+ 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_header_literal_regex=`echo 'fcntl.h' \
- | sed -e "$gl_make_literal_regex_sed"`
- gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
- s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
- s|^/[^/]|//&|
- p
- q
- }'
- gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_fcntl_h
+ gl_cv_next_fcntl_h='"'$gl_header'"'
fi
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <float.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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'
+ 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_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
- gl_header_literal_regex=`echo 'float.h' \
- | sed -e "$gl_make_literal_regex_sed"`
- gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
- s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
- s|^/[^/]|//&|
- p
- q
- }'
- gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ gl_header=$gl_cv_absolute_float_h
+ gl_cv_next_float_h='"'$gl_header'"'
fi
+ fp_headers='
+ #include <stdio.h>
+ #if HAVE_STDIO_EXT_H
+ # include <stdio_ext.h>
+ #endif
+ '
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpending" >&5
$as_echo_n "checking for __fpending... " >&6; }
if ${gl_cv_func___fpending+:} false; then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdio.h>
- #if HAVE_STDIO_EXT_H
- # include <stdio_ext.h>
- #endif
-
+$fp_headers
int
main ()
{
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 = yes; then
+ ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
+"
+if test "x$ac_cv_have_decl___fpending" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
- if test $gl_cv_func___fpending = no; then
-
-
-
-
-
-
-
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL___FPENDING $ac_have_decl
+_ACEOF
- M4_LIBOBJS="$M4_LIBOBJS fpending.$ac_objext"
+ fi
+ if test $gl_cv_func___fpending = no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
-$as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
-if ${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
-/* end confdefs.h. */
-#include <stdio.h>
-int
-main ()
-{
-FILE *fp = stdin; (void) ($ac_expr);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- fp_done=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- test "$fp_done" = yes && break
- done
- ac_cv_sys_pending_output_n_bytes=$ac_expr
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
-$as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
-_ACEOF
+ M4_LIBOBJS="$M4_LIBOBJS fpending.$ac_objext"
fi
- if test $ac_cv_func_getdtablesize != yes; then
+
+
+ if test $ac_cv_func_getdtablesize = yes &&
+ test $ac_cv_have_decl_getdtablesize = yes; then
+ # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
+ # up to an unchangeable hard limit; all other platforms correctly
+ # require setrlimit before getdtablesize() can report a larger value.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
+$as_echo_n "checking whether getdtablesize works... " >&6; }
+if ${gl_cv_func_getdtablesize_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
+ gl_cv_func_getdtablesize_works="guessing no" ;;
+ *) gl_cv_func_getdtablesize_works="guessing yes" ;;
+ esac
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <unistd.h>
+int
+main ()
+{
+int size = getdtablesize();
+ if (dup2 (0, getdtablesize()) != -1)
+ return 1;
+ if (size != getdtablesize())
+ return 2;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_getdtablesize_works=yes
+else
+ gl_cv_func_getdtablesize_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_getdtablesize_works" >&5
+$as_echo "$gl_cv_func_getdtablesize_works" >&6; }
+ case "$gl_cv_func_getdtablesize_works" in
+ *yes) ;;
+ *) REPLACE_GETDTABLESIZE=1 ;;
+ esac
+ else
HAVE_GETDTABLESIZE=0
fi
- if test $HAVE_GETDTABLESIZE = 0; then
+ if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
-$as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
-
-
-
-
+ ac_found=0
+ 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" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
+_ACEOF
+if test $ac_have_decl = 1; then :
+ ac_found=1
+fi
+
+ 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" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
+_ACEOF
+if test $ac_have_decl = 1; then :
+ ac_found=1
+fi
+
+ ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
+"
+if test "x$ac_cv_have_decl___argv" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL___ARGV $ac_have_decl
+_ACEOF
+if test $ac_have_decl = 1; then :
+ ac_found=1
+fi
+
+
+ # Incur the cost of this test only if none of the above worked.
+ if test $ac_found = 0; then
+ # On OpenBSD 5.1, using the global __progname variable appears to be
+ # the only way to implement getprogname.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
+$as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
+if ${gl_cv_var___progname+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ gl_cv_var___progname=
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+extern char *__progname;
+int
+main ()
+{
+return *__progname;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_var___progname=yes
+
+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_var___progname" >&5
+$as_echo "$gl_cv_var___progname" >&6; }
+ if test "$gl_cv_var___progname" = yes; then
+
+$as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
+
+ fi
+ fi
+
+
+
+
*yes)
REPLACE_GETTIMEOFDAY=1
-
-$as_echo "#define gmtime rpl_gmtime" >>confdefs.h
-
-
-$as_echo "#define localtime rpl_localtime" >>confdefs.h
-
+ REPLACE_GMTIME=1
+ REPLACE_LOCALTIME=1
$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
+ :
+
+
{ $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; }
else
if test "$cross_compiling" = yes; then :
- case "$host_cpu" in
- # Guess no on ia64, x86_64, i386.
- ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";;
- *)
- case "$host_os" in
- netbsd*) gl_cv_func_isnanl_works="guessing no";;
- *) gl_cv_func_isnanl_works="guessing yes";;
- esac
- ;;
- esac
-
+ gl_cv_func_isnanl_works="guessing yes"
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
# ifdef WORDS_BIGENDIAN
# define LDBL80_WORDS(exponent,manthi,mantlo) \
{ ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
- ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
+ ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
(unsigned int) (mantlo) << 16 \
}
# else
if (!isnanl (x.value))
result |= 2;
}
- /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
- Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
- Intel IA-64 Architecture Software Developer's Manual, Volume 1:
- Application Architecture.
- Table 5-2 "Floating-Point Register Encodings"
- Figure 5-6 "Memory to Floating-Point Register Data Translation"
- */
+ /* isnanl should return something even for noncanonical values. */
{ /* Pseudo-NaN. */
static memory_long_double x =
{ LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
- if (!isnanl (x.value))
+ if (isnanl (x.value) && !isnanl (x.value))
result |= 4;
}
{ /* Pseudo-Infinity. */
static memory_long_double x =
{ LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
- if (!isnanl (x.value))
+ if (isnanl (x.value) && !isnanl (x.value))
result |= 8;
}
{ /* Pseudo-Zero. */
static memory_long_double x =
{ LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
- if (!isnanl (x.value))
+ if (isnanl (x.value) && !isnanl (x.value))
result |= 16;
}
{ /* Unnormalized number. */
static memory_long_double x =
{ LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
- if (!isnanl (x.value))
+ if (isnanl (x.value) && !isnanl (x.value))
result |= 32;
}
{ /* Pseudo-Denormal. */
static memory_long_double x =
{ LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
- if (!isnanl (x.value))
+ if (isnanl (x.value) && !isnanl (x.value))
result |= 64;
}
#endif
if test $ac_cv_header_langinfo_h = yes; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <langinfo.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
- case "$host_os" in
- mingw*)
- gl_dirsep_regex='[/\\]'
- ;;
- *)
- gl_dirsep_regex='\/'
- ;;
- esac
- gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-
- gl_header_literal_regex=`echo 'langinfo.h' \
- | sed -e "$gl_make_literal_regex_sed"`
- gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
- s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
- s|^/[^/]|//&|
- p
- q
- }'
- gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'langinfo.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
+
+ gl_cv_absolute_langinfo_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_langinfo_h
+ gl_cv_next_langinfo_h='"'$gl_header'"'
else
gl_cv_next_langinfo_h='<'langinfo.h'>'
fi
+
LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ 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
+ 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'
+ 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_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"`'"'
+ gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_locale_h
+ gl_cv_next_locale_h='"'$gl_header'"'
fi
- for ac_header in stdlib.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdlib_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_STDLIB_H 1
-_ACEOF
-
-fi
-
-done
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
-$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
-if ${ac_cv_func_malloc_0_nonnull+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- case "$host_os" in
- # Guess yes on platforms where we know the result.
- *-gnu* | freebsd* | netbsd* | openbsd* \
- | hpux* | solaris* | cygwin* | mingw*)
- ac_cv_func_malloc_0_nonnull=yes ;;
- # If we don't know, assume the worst.
- *) ac_cv_func_malloc_0_nonnull=no ;;
- esac
-
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#if defined STDC_HEADERS || defined HAVE_STDLIB_H
- # include <stdlib.h>
- #else
- char *malloc ();
- #endif
-
-int
-main ()
-{
-return ! malloc (0);
- ;
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ac_cv_func_malloc_0_nonnull=yes
-else
- ac_cv_func_malloc_0_nonnull=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
-$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
- if test $ac_cv_func_malloc_0_nonnull = yes; then :
-
-$as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
-
-else
- $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
-
- REPLACE_MALLOC=1
-
-fi
-
-
- if test $REPLACE_MALLOC = 1; then
-
-
-
-
-
-
-
-
- M4_LIBOBJS="$M4_LIBOBJS malloc.$ac_objext"
-
- fi
-
-
-cat >>confdefs.h <<_ACEOF
-#define GNULIB_MALLOC_GNU 1
-_ACEOF
-
-
-
-
if test $gl_cv_func_malloc_posix = yes; then
if test $ac_cv_header_math_h = yes; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <math.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
- case "$host_os" in
- mingw*)
- gl_dirsep_regex='[/\\]'
- ;;
- *)
- gl_dirsep_regex='\/'
- ;;
- esac
- gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-
- gl_header_literal_regex=`echo 'math.h' \
- | sed -e "$gl_make_literal_regex_sed"`
- gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
- s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
- s|^/[^/]|//&|
- p
- q
- }'
- gl_cv_next_math_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'math.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
+
+ gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_math_h
+ gl_cv_next_math_h='"'$gl_header'"'
else
gl_cv_next_math_h='<'math.h'>'
fi
memset (&state, '\0', sizeof (mbstate_t));
if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
if (mbsinit (&state))
- return 1;
+ return 2;
}
return 0;
}
memset (&state, '\0', sizeof (mbstate_t));
if (mbrtowc (&wc, input + 3, 6, &state) != 4
&& mbtowc (&wc, input + 3, 6) == 4)
- return 1;
+ return 2;
}
return 0;
}
mbrtowc (&wc, NULL, 5, &state);
/* Check that wc was not modified. */
if (wc != (wchar_t) 0xBADFACE)
- return 1;
+ return 2;
}
return 0;
}
memset (&state, '\0', sizeof (mbstate_t));
if (mbrtowc (&wc, "", 1, &state) != 0)
- return 1;
+ return 2;
}
return 0;
}
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
+$as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
+if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on AIX and glibc systems.
+ aix* | *-gnu*)
+ gl_cv_func_mbrtowc_empty_input="guessing no" ;;
+ *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
+ esac
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <wchar.h>
+ static wchar_t wc;
+ static mbstate_t mbs;
+ int
+ main (void)
+ {
+ return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
+ }
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_mbrtowc_empty_input=yes
+else
+ gl_cv_func_mbrtowc_empty_input=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_mbrtowc_empty_input" >&5
+$as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
+$as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
+if ${gl_cv_C_locale_sans_EILSEQ+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ gl_cv_C_locale_sans_EILSEQ="guessing no"
+
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+ #include <locale.h>
+ #include <wchar.h>
+
+int
+main ()
+{
+
+ int i;
+ char *locale = setlocale (LC_ALL, "C");
+ if (! locale)
+ return 2;
+ for (i = CHAR_MIN; i <= CHAR_MAX; i++)
+ {
+ char c = i;
+ wchar_t wc;
+ mbstate_t mbs = { 0, };
+ size_t ss = mbrtowc (&wc, &c, 1, &mbs);
+ if (1 < ss)
+ return 3;
+ }
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_C_locale_sans_EILSEQ=yes
+else
+ gl_cv_C_locale_sans_EILSEQ=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_C_locale_sans_EILSEQ" >&5
+$as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; }
+
case "$gl_cv_func_mbrtowc_null_arg1" in
*yes) ;;
*)
REPLACE_MBRTOWC=1
;;
esac
+ case "$gl_cv_func_mbrtowc_empty_input" in
+ *yes) ;;
+ *)
+$as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
+
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ case $gl_cv_C_locale_sans_EILSEQ in
+ *yes) ;;
+ *)
+$as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
+
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
fi
fi
memset (&state, '\0', sizeof (mbstate_t));
if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
if (mbsinit (&state))
- return 1;
+ return 2;
}
return 0;
}
memset (&state, '\0', sizeof (mbstate_t));
if (mbrtowc (&wc, input + 3, 6, &state) != 4
&& mbtowc (&wc, input + 3, 6) == 4)
- return 1;
+ return 2;
}
return 0;
}
+
+
+
for ac_func in mkdtemp
do :
ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
-
- if test $ac_cv_func__set_invalid_parameter_handler = yes; then
- HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
-
-$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
-
- else
- HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
- fi
-
-
if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
fi
-
-
if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks" >&5
-$as_echo_n "checking for obstacks... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks that work with any size object" >&5
+$as_echo_n "checking for obstacks that work with any size object... " >&6; }
if ${ac_cv_func_obstack+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-$ac_includes_default
- #include "obstack.h"
+#include "obstack.h"
+ void *obstack_chunk_alloc (size_t n) { return 0; }
+ void obstack_chunk_free (void *p) { }
+ /* Check that an internal function returns size_t, not int. */
+ size_t _obstack_memory_used (struct obstack *);
+
int
main ()
{
struct obstack mem;
- #define obstack_chunk_alloc malloc
- #define obstack_chunk_free free
- obstack_init (&mem);
- obstack_free (&mem, 0);
+ obstack_init (&mem);
+ obstack_free (&mem, 0);
+
;
return 0;
}
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5
$as_echo "$ac_cv_func_obstack" >&6; }
-if test $ac_cv_func_obstack = yes; then
+ if test "$ac_cv_func_obstack" = yes; then
$as_echo "#define HAVE_OBSTACK 1" >>confdefs.h
-else
+ else
M4_LIBOBJS="$M4_LIBOBJS obstack.$ac_objext"
-fi
+ fi
# If cross compiling, assume the test would fail and use the included
# regex.c.
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
$as_echo_n "checking for working re_compile_pattern... " >&6; }
if ${gl_cv_func_re_compile_pattern_working+:} false; then :
#include <locale.h>
#include <limits.h>
#include <string.h>
- #if HAVE_DECL_ALARM
- # include <unistd.h>
+
+ #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
# include <signal.h>
+ # include <unistd.h>
+ #endif
+
+ #if HAVE_MALLOC_H
+ # include <malloc.h>
+ #endif
+
+ #ifdef M_CHECK_ACTION
+ /* Exit with distinguishable exit code. */
+ static void sigabrt_no_core (int sig) { raise (SIGTERM); }
#endif
int
const char *s;
struct re_registers regs;
+ /* Some builds of glibc go into an infinite loop on this
+ test. Use alarm to force death, and mallopt to avoid
+ malloc recursion in diagnosing the corrupted heap. */
#if HAVE_DECL_ALARM
- /* Some builds of glibc go into an infinite loop on this test. */
signal (SIGALRM, SIG_DFL);
alarm (2);
#endif
+#ifdef M_CHECK_ACTION
+ signal (SIGABRT, sigabrt_no_core);
+ mallopt (M_CHECK_ACTION, 2);
+#endif
+
if (setlocale (LC_ALL, "en_US.UTF-8"))
{
{
0, sizeof data - 1, ®s)
!= -1)
result |= 1;
+ regfree (®ex);
}
{
if (i != 0 && i != 21)
result |= 1;
}
+ regfree (®ex);
}
if (! setlocale (LC_ALL, "C"))
+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
SCHED_H=''
else
SCHED_H='sched.h'
+ for ac_header in sched.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "#if HAVE_SYS_CDEFS_H
+ #include <sys/cdefs.h>
+ #endif
+"
+if test "x$ac_cv_header_sched_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SCHED_H 1
+_ACEOF
+
+fi
+
+done
$as_echo_n "(cached) " >&6
else
- if test $ac_cv_header_sched_h = yes; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sched.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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 '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 "$gl_absolute_header_sed"`'"'
- else
- gl_cv_next_sched_h='<'sched.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 '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_absolute_sched_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_sched_h
+ gl_cv_next_sched_h='"'$gl_header'"'
fi
- if test $ac_cv_header_sched_h = yes; then
+ if test "$ac_cv_header_sched_h" = yes; then
HAVE_SCHED_H=1
else
HAVE_SCHED_H=0
fi
- ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <sched.h>
+ if test "$HAVE_SCHED_H" = 1; then
+ ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#if HAVE_SYS_CDEFS_H
+ #include <sys/cdefs.h>
+ #endif
+ #include <sched.h>
+
+"
+if test "x$ac_cv_type_struct_sched_param" = xyes; then :
+ HAVE_STRUCT_SCHED_PARAM=1
+else
+ HAVE_STRUCT_SCHED_PARAM=0
+fi
+
+ else
+ ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <spawn.h>
"
if test "x$ac_cv_type_struct_sched_param" = xyes; then :
HAVE_STRUCT_SCHED_PARAM=1
HAVE_STRUCT_SCHED_PARAM=0
fi
+ fi
+
+
+ if test "$ac_cv_header_sys_cdefs_h" = yes; then
+ HAVE_SYS_CDEFS_H=1
+ else
+ HAVE_SYS_CDEFS_H=0
+ fi
fi
+
fi
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <signal.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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'
+ 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_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 "$gl_absolute_header_sed"`'"'
+ gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_signal_h
+ gl_cv_next_signal_h='"'$gl_header'"'
fi
if test $ac_cv_func_snprintf = yes; then
REPLACE_SNPRINTF=1
+ else
+
+ if test $ac_cv_have_decl_snprintf = yes; then
+ REPLACE_SNPRINTF=1
+ fi
fi
:
if test $ac_cv_header_spawn_h = yes; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <spawn.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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 '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 "$gl_absolute_header_sed"`'"'
+ 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_absolute_spawn_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_spawn_h
+ gl_cv_next_spawn_h='"'$gl_header'"'
else
gl_cv_next_spawn_h='<'spawn.h'>'
fi
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'stdarg.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
+
+ gl_cv_absolute_stdarg_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
- gl_header_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 "$gl_absolute_header_sed"`'"'
+ gl_header=$gl_cv_absolute_stdarg_h
+ gl_cv_next_stdarg_h='"'$gl_header'"'
fi
STDDEF_H=
+ ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
+
+"
+if test "x$ac_cv_type_max_align_t" = xyes; then :
+
+else
+ HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
+fi
+
if test $gt_cv_c_wchar_t = no; then
HAVE_WCHAR_T=0
STDDEF_H=stddef.h
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ 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
+ 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'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'stddef.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
+
+ gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
- gl_header_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"`'"'
+ gl_header=$gl_cv_absolute_stddef_h
+ gl_cv_next_stddef_h='"'$gl_header'"'
fi
+ $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
+
+
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ 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
+ 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'
+ 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_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"`'"'
+ gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_stdio_h
+ gl_cv_next_stdio_h='"'$gl_header'"'
fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
+$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
+if ${gl_cv_func_printf_attribute_flavor+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #define __STDC_FORMAT_MACROS 1
+ #include <stdio.h>
+ #include <inttypes.h>
+ /* For non-mingw systems, compilation will trivially succeed.
+ For mingw, compilation will succeed for older mingw (system
+ printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
+ #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
+ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+ extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
+ #endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_func_printf_attribute_flavor=system
+else
+ gl_cv_func_printf_attribute_flavor=gnu
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
+$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
+ if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
+
+$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
+
+ fi
+
GNULIB_FSCANF=1
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdlib.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ 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'
+ 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_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"`'"'
+ gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_stdlib_h
+ gl_cv_next_stdlib_h='"'$gl_header'"'
fi
#endif
char *strndup (const char *, size_t);
#endif
+ int result;
char *s;
s = strndup ("some longer string", 15);
free (s);
s = strndup ("shorter string", 13);
- return s[13] != '\0';
+ result = s[13] != '\0';
+ free (s);
+ return result;
;
return 0;
}
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+#ifdef __MVS__
+/* z/OS does not deliver signals while strstr() is running (thanks to
+ restrictions on its LE runtime), which prevents us from limiting the
+ running time of this test. */
+# error "This test does not work properly on z/OS"
+#endif
#include <signal.h> /* for signal */
#include <string.h> /* for strstr */
#include <stdlib.h> /* for malloc */
#include <unistd.h> /* for alarm */
-static void quit (int sig) { exit (sig + 128); }
+static void quit (int sig) { _exit (sig + 128); }
int
main ()
if test $ac_cv_header_sys_stat_h = yes; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ 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
+ 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"`'"'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'sys/stat.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
+
+ gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_sys_stat_h
+ gl_cv_next_sys_stat_h='"'$gl_header'"'
else
gl_cv_next_sys_stat_h='<'sys/stat.h'>'
fi
if test $ac_cv_header_sys_wait_h = yes; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/wait.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
- case "$host_os" in
- mingw*)
- gl_dirsep_regex='[/\\]'
- ;;
- *)
- gl_dirsep_regex='\/'
- ;;
- esac
- gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-
- gl_header_literal_regex=`echo 'sys/wait.h' \
- | sed -e "$gl_make_literal_regex_sed"`
- gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
- s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
- s|^/[^/]|//&|
- p
- q
- }'
- gl_cv_next_sys_wait_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'sys/wait.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
+
+ gl_cv_absolute_sys_wait_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_sys_wait_h
+ gl_cv_next_sys_wait_h='"'$gl_header'"'
else
gl_cv_next_sys_wait_h='<'sys/wait.h'>'
fi
if test $ac_cv_header_unistd_h = yes; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <unistd.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
- case "$host_os" in
- mingw*)
- gl_dirsep_regex='[/\\]'
- ;;
- *)
- gl_dirsep_regex='\/'
- ;;
- esac
- gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-
- gl_header_literal_regex=`echo 'unistd.h' \
- | sed -e "$gl_make_literal_regex_sed"`
- gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
- s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
- s|^/[^/]|//&|
- p
- q
- }'
- gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'unistd.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
+
+ gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_unistd_h
+ gl_cv_next_unistd_h='"'$gl_header'"'
else
gl_cv_next_unistd_h='<'unistd.h'>'
fi
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format"
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format"
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=verror:3:c-format"
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=verror_at_line:5:c-format"
+
+
# Check whether --with-packager was given.
if test "${with_packager+set}" = set; then :
withval=$with_packager; case $withval in
if test $ac_cv_header_wchar_h = yes; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <wchar.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
- case "$host_os" in
- mingw*)
- gl_dirsep_regex='[/\\]'
- ;;
- *)
- gl_dirsep_regex='\/'
- ;;
- esac
- gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-
- gl_header_literal_regex=`echo 'wchar.h' \
- | sed -e "$gl_make_literal_regex_sed"`
- gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
- s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
- s|^/[^/]|//&|
- p
- q
- }'
- gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'wchar.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
+
+ gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_wchar_h
+ gl_cv_next_wchar_h='"'$gl_header'"'
else
gl_cv_next_wchar_h='<'wchar.h'>'
fi
memset (&state, '\0', sizeof (mbstate_t));
if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
if (mbsinit (&state))
- return 1;
+ return 2;
}
return 0;
}
memset (&state, '\0', sizeof (mbstate_t));
if (mbrtowc (&wc, input + 3, 6, &state) != 4
&& mbtowc (&wc, input + 3, 6) == 4)
- return 1;
+ return 2;
}
return 0;
}
if test $ac_cv_header_wctype_h = yes; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <wctype.h>
-
_ACEOF
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
- case "$host_os" in
- mingw*)
- gl_dirsep_regex='[/\\]'
- ;;
- *)
- gl_dirsep_regex='\/'
- ;;
- esac
- gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-
- gl_header_literal_regex=`echo 'wctype.h' \
- | sed -e "$gl_make_literal_regex_sed"`
- gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
- s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
- s|^/[^/]|//&|
- p
- q
- }'
- gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
- sed -n "$gl_absolute_header_sed"`'"'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'wctype.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
+
+ gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_wctype_h
+ gl_cv_next_wctype_h='"'$gl_header'"'
else
gl_cv_next_wctype_h='<'wctype.h'>'
fi
:
+ 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"
+
+
for ac_header in stdint.h
do :
:
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xasprintf:1:c-format"
+
# End of code from modules
HAVE_CLOSEDIR=0
fi
+ case $host_os,$HAVE_CLOSEDIR in
+ os2*,1)
+ REPLACE_CLOSEDIR=1;;
+ esac
if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_ctype_h='<'ctype.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
+$as_echo_n "checking absolute name of <ctype.h>... " >&6; }
+if ${gl_cv_next_ctype_h+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.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 'ctype.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
+
+ gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_ctype_h
+ gl_cv_next_ctype_h='"'$gl_header'"'
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
+$as_echo "$gl_cv_next_ctype_h" >&6; }
+ fi
+ NEXT_CTYPE_H=$gl_cv_next_ctype_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'ctype.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_ctype_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
if test $gl_cv_have_include_next = yes; then
gl_cv_next_dirent_h='<'dirent.h'>'
if test $ac_cv_header_dirent_h = yes; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ 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
+ 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"`'"'
+ case "$host_os" in
+ mingw*)
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo 'dirent.h' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
+
+ gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n "$gl_absolute_header_sed"`
+
+ gl_header=$gl_cv_absolute_dirent_h
+ gl_cv_next_dirent_h='"'$gl_header'"'
else
gl_cv_next_dirent_h='<'dirent.h'>'
fi
+
+
+ for ac_func in dirfd
+do :
+ ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
+if test "x$ac_cv_func_dirfd" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DIRFD 1
+_ACEOF
+
+fi
+done
+
+ ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
+ #include <dirent.h>
+"
+if test "x$ac_cv_have_decl_dirfd" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_DIRFD $ac_have_decl
+_ACEOF
+
+ if test $ac_cv_have_decl_dirfd = no; then
+ HAVE_DECL_DIRFD=0
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
+$as_echo_n "checking whether dirfd is a macro... " >&6; }
+if ${gl_cv_func_dirfd_macro+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <dirent.h>
+#ifdef dirfd
+ dirent_header_defines_dirfd
+#endif
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
+ gl_cv_func_dirfd_macro=yes
+else
+ gl_cv_func_dirfd_macro=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
+$as_echo "$gl_cv_func_dirfd_macro" >&6; }
+
+ # Use the replacement if we have no function or macro with that name,
+ # or if OS/2 kLIBC whose dirfd() does not work.
+ # Replace only if the system declares dirfd already.
+ case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
+ no,no,*,yes | *,*,os2*,yes)
+ REPLACE_DIRFD=1
+
+$as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
+;;
+ esac
+
+ if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
+ || test $REPLACE_DIRFD = 1; then
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS dirfd.$ac_objext"
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
+$as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
+if ${gl_cv_sys_dir_fd_member_name+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ dirfd_save_CFLAGS=$CFLAGS
+ for ac_expr in d_fd dd_fd; do
+
+ CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <sys/types.h>
+ #include <dirent.h>
+int
+main ()
+{
+DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ dir_fd_found=yes
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS=$dirfd_save_CFLAGS
+ test "$dir_fd_found" = yes && break
+ done
+ test "$dir_fd_found" = yes || ac_expr=no_such_member
+
+ gl_cv_sys_dir_fd_member_name=$ac_expr
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
+$as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
+ if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
+
+cat >>confdefs.h <<_ACEOF
+#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
+_ACEOF
+
+ fi
+
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_DIRFD" != 1; then
+ if test "$GNULIB_DIRFD" = 0; then
+ GNULIB_DIRFD=$gl_module_indicator_condition
+ else
+ GNULIB_DIRFD="($GNULIB_DIRFD || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
+$as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
+
+
+
+
+
+
if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
REPLACE_DUP=1
fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
+$as_echo_n "checking whether dup works... " >&6; }
+if ${gl_cv_func_dup_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_dup_works='guessing yes'
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+ #include <fcntl.h>
+ #include <errno.h>
+int
+main ()
+{
+/* On OS/2 kLIBC, dup does not work on a directory fd. */
+ int fd = open (".", O_RDONLY);
+ return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_dup_works=yes
+else
+ gl_cv_func_dup_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_dup_works" >&5
+$as_echo "$gl_cv_func_dup_works" >&6; }
+ case "$gl_cv_func_dup_works" in
+ *yes) ;;
+ *)
+ REPLACE_DUP=1
+ ;;
+ esac
if test $REPLACE_DUP = 1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
+$as_echo_n "checking for flexible array member... " >&6; }
+if ${ac_cv_c_flexmember+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+ #include <stdio.h>
+ #include <stddef.h>
+ struct s { int n; double d[]; };
+int
+main ()
+{
+int m = getchar ();
+ size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
+ nbytes += sizeof (struct s) - 1;
+ nbytes -= nbytes % sizeof (struct s);
+ struct s *p = malloc (nbytes);
+ p->d[0] = 0.0;
+ return p->d != (double *) NULL;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_flexmember=yes
+else
+ ac_cv_c_flexmember=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
+$as_echo "$ac_cv_c_flexmember" >&6; }
+ if test $ac_cv_c_flexmember = yes; then
+
+$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
+
+ else
+ $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+ if test $ac_cv_func_isblank = no; then
+ HAVE_ISBLANK=0
+ fi
+
+ if test $HAVE_ISBLANK = 0; then
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS isblank.$ac_objext"
+
+ fi
+
+
+
+
+
+ if test "$GNULIB_ISBLANK" != 1; then
+ if test "$GNULIB_ISBLANK" = 0; then
+ GNULIB_ISBLANK=$gl_module_indicator_condition
+ else
+ GNULIB_ISBLANK="($GNULIB_ISBLANK || $gl_module_indicator_condition)"
+ fi
+ fi
+
+
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
if ${gl_cv_cc_double_expbit0+:} false; then :
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <unistd.h>
+ #include <stdio.h>
int
main ()
fi
done
+ if test $ac_cv_func_uselocale = yes; then
+ for ac_func in getlocalename_l
+do :
+ ac_fn_c_check_func "$LINENO" "getlocalename_l" "ac_cv_func_getlocalename_l"
+if test "x$ac_cv_func_getlocalename_l" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_GETLOCALENAME_L 1
+_ACEOF
+
+fi
+done
+
+ fi
HAVE_OPENDIR=0
fi
+ case $host_os,$HAVE_OPENDIR in
+ os2*,1)
+ REPLACE_OPENDIR=1;;
+ esac
if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
+$as_echo_n "checking for working stdalign.h... " >&6; }
+if ${gl_cv_header_working_stdalign_h+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdalign.h>
+ #include <stddef.h>
+
+ /* Test that alignof yields a result consistent with offsetof.
+ This catches GCC bug 52023
+ <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
+ #ifdef __cplusplus
+ template <class t> struct alignof_helper { char a; t b; };
+ # define ao(type) offsetof (alignof_helper<type>, b)
+ #else
+ # define ao(type) offsetof (struct { char a; type b; }, b)
+ #endif
+ char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
+ char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
+ char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
+
+ /* Test _Alignas only on platforms where gnulib can help. */
+ #if \
+ ((defined __cplusplus && 201103 <= __cplusplus) \
+ || (defined __APPLE__ && defined __MACH__ \
+ ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
+ : __GNUC__) \
+ || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \
+ || __ICC || 0x5110 <= __SUNPRO_C \
+ || 1300 <= _MSC_VER)
+ struct alignas_test { char c; char alignas (8) alignas_8; };
+ char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
+ ? 1 : -1];
+ #endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_working_stdalign_h=yes
+else
+ gl_cv_header_working_stdalign_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
+$as_echo "$gl_cv_header_working_stdalign_h" >&6; }
+
+ if test $gl_cv_header_working_stdalign_h = yes; then
+ STDALIGN_H=''
+ else
+ STDALIGN_H='stdalign.h'
+ fi
+
+
+ if test -n "$STDALIGN_H"; then
+ GL_GENERATE_STDALIGN_H_TRUE=
+ GL_GENERATE_STDALIGN_H_FALSE='#'
+else
+ GL_GENERATE_STDALIGN_H_TRUE='#'
+ GL_GENERATE_STDALIGN_H_FALSE=
+fi
+
+
+
if test "$with_syscmd_shell" = no ; then
with_syscmd_shell=/bin/sh
if test "$cross_compiling" != yes ; then
- if as_fn_executable_p /bin/sh; then :
+ if as_fn_executable_p /bin/sh$EXEEXT; then :
else
if (cmd /c) 2>/dev/null; then with_syscmd_shell=cmd; fi
ac_config_commands="$ac_config_commands stamp-h"
+case $host in #(
+ *-*-os2*) :
+ OS2_LDFLAGS="-Zargs-resp" ;; #(
+ *) :
+ ;;
+esac
+
+
ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile src/Makefile tests/Makefile checks/Makefile examples/Makefile"
fi
+if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
+ as_fn_error $? "conditional \"GL_GENERATE_LIMITS_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
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_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
+ as_fn_error $? "conditional \"GL_GENERATE_LIMITS_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
as_fn_error $? "conditional \"POSIX_SPAWN_PORTED\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
+ as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
M4tests_libobjs=
M4tests_ltlibobjs=
# 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.17, which was
+This file was extended by GNU M4 $as_me 1.4.18, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
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.17
+GNU M4 config.status 1.4.18
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
# Configure template for GNU M4. -*-Autoconf-*-
-# Copyright (C) 1991, 1993-1994, 2004-2013 Free Software Foundation,
-# Inc.
+# Copyright (C) 1991, 1993-1994, 2004-2014, 2016 Free Software
+# Foundation, Inc.
#
# This file is part of GNU M4.
#
AM_INIT_AUTOMAKE([1.11.6 dist-bzip2 dist-xz color-tests parallel-tests
silent-rules subdir-objects gnu])
+AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.
m4_pattern_forbid([^M4_[A-Z]])
*) AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;;
esac
gl_gcc_warnings=$enableval],
- [if test -d "$srcdir"/.git; then
- gl_gcc_warnings=yes
- else
+ [if test -f "$srcdir"/.tarball-version; then
gl_gcc_warnings=no
+ else
+ gl_gcc_warnings=yes
fi]
)
gl_WARN_ADD([-Wno-format-nonliteral])
fi
- gl_WARN_ADD([-fdiagnostics-show-option])
- gl_WARN_ADD([-funit-at-a-time])
-
AC_SUBST([WARN_CFLAGS])
AH_VERBATIM([FORTIFY_SOURCE],
with_syscmd_shell=/bin/sh
if test "$cross_compiling" != yes ; then
dnl Give mingw a default that is more likely to be available.
- AS_IF([AS_EXECUTABLE_P([/bin/sh])], [],
+ AS_IF([AS_EXECUTABLE_P([/bin/sh$EXEEXT])], [],
[if (cmd /c) 2>/dev/null; then with_syscmd_shell=cmd; fi])
dnl Too bad _AS_PATH_WALK is not public.
M4_save_IFS=$IFS; IFS=$PATH_SEPARATOR
AC_CONFIG_COMMANDS([stamp-h], [[test -z "$CONFIG_HEADERS" || date > stamp-h]])
+AS_CASE([$host], [*-*-os2*], [OS2_LDFLAGS="-Zargs-resp"])
+AC_SUBST([OS2_LDFLAGS])
+
AC_CONFIG_FILES([Makefile
doc/Makefile
lib/Makefile
## Makefile.am - template for generating Makefile via Automake
##
-## Copyright (C) 2006-2013 Free Software Foundation, Inc.
+## Copyright (C) 2006-2014, 2016 Free Software Foundation, Inc.
##
## This file is part of GNU M4.
##
-# Makefile.in generated by automake 1.14 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
build_triplet = @build@
host_triplet = @host@
subdir = doc
-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/absolute-header.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/builtin-expect.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/ctype.m4 $(top_srcdir)/m4/dirent_h.m4 \
+ $(top_srcdir)/m4/dirfd.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/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/flexmember.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/getprogname.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/hard-locale.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/inttypes_h.m4 $(top_srcdir)/m4/isblank.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/limits-h.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/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/memchr.m4 $(top_srcdir)/m4/minmax.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/obstack.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/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/stdalign.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)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/version.texi \
+ $(srcdir)/stamp-vti $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/lib/config.h
CONFIG_CLEAN_FILES =
NROFF = nroff
MANS = $(man_MANS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(m4_TEXINFOS) $(srcdir)/Makefile.in \
+ $(top_srcdir)/build-aux/mdate-sh \
+ $(top_srcdir)/build-aux/texinfo.tex
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
pkglibexecdir = @pkglibexecdir@
ACLOCAL = @ACLOCAL@
GNULIB_IMAXABS = @GNULIB_IMAXABS@
GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
GNULIB_ISATTY = @GNULIB_ISATTY@
+GNULIB_ISBLANK = @GNULIB_ISBLANK@
GNULIB_ISFINITE = @GNULIB_ISFINITE@
GNULIB_ISINF = @GNULIB_ISINF@
GNULIB_ISNAN = @GNULIB_ISNAN@
GNULIB_OPEN = @GNULIB_OPEN@
GNULIB_OPENAT = @GNULIB_OPENAT@
GNULIB_OPENDIR = @GNULIB_OPENDIR@
+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@
GNULIB_PCLOSE = @GNULIB_PCLOSE@
GNULIB_PERROR = @GNULIB_PERROR@
GNULIB_PIPE = @GNULIB_PIPE@
GNULIB_PUTENV = @GNULIB_PUTENV@
GNULIB_PUTS = @GNULIB_PUTS@
GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_QSORT_R = @GNULIB_QSORT_R@
GNULIB_RAISE = @GNULIB_RAISE@
GNULIB_RANDOM = @GNULIB_RANDOM@
GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
GNULIB_TANL = @GNULIB_TANL@
GNULIB_TIMEGM = @GNULIB_TIMEGM@
GNULIB_TIME_R = @GNULIB_TIME_R@
+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@
GNULIB_TMPFILE = @GNULIB_TMPFILE@
GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
GNULIB_TRUNC = @GNULIB_TRUNC@
HAVE_ATANL = @HAVE_ATANL@
HAVE_ATOLL = @HAVE_ATOLL@
HAVE_BTOWC = @HAVE_BTOWC@
+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@
HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
HAVE_CBRT = @HAVE_CBRT@
HAVE_CBRTF = @HAVE_CBRTF@
HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
HAVE_ILOGBF = @HAVE_ILOGBF@
HAVE_ILOGBL = @HAVE_ILOGBL@
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_ISBLANK = @HAVE_ISBLANK@
HAVE_ISNAND = @HAVE_ISNAND@
HAVE_ISNANF = @HAVE_ISNANF@
HAVE_ISNANL = @HAVE_ISNANL@
HAVE_LOGL = @HAVE_LOGL@
HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
HAVE_LSTAT = @HAVE_LSTAT@
+HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
HAVE_MBRLEN = @HAVE_MBRLEN@
HAVE_MBRTOWC = @HAVE_MBRTOWC@
HAVE_MBSINIT = @HAVE_MBSINIT@
HAVE_PTSNAME = @HAVE_PTSNAME@
HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_QSORT_R = @HAVE_QSORT_R@
HAVE_RAISE = @HAVE_RAISE@
HAVE_RANDOM = @HAVE_RANDOM@
HAVE_RANDOM_H = @HAVE_RANDOM_H@
HAVE_SYMLINK = @HAVE_SYMLINK@
HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_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_TANHF = @HAVE_TANHF@
HAVE_TANL = @HAVE_TANL@
HAVE_TIMEGM = @HAVE_TIMEGM@
+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
HAVE_UNISTD_H = @HAVE_UNISTD_H@
HAVE_UNLINKAT = @HAVE_UNLINKAT@
LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@
LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@
LIBTHREAD = @LIBTHREAD@
+LIB_POSIX_SPAWN = @LIB_POSIX_SPAWN@
+LIMITS_H = @LIMITS_H@
LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
LOCALE_FR = @LOCALE_FR@
LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
M4tests_WITNESS = @M4tests_WITNESS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@
NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
NEXT_AS_FIRST_DIRECTIVE_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_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_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_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
+NEXT_CTYPE_H = @NEXT_CTYPE_H@
NEXT_DIRENT_H = @NEXT_DIRENT_H@
NEXT_ERRNO_H = @NEXT_ERRNO_H@
NEXT_FCNTL_H = @NEXT_FCNTL_H@
NEXT_GETOPT_H = @NEXT_GETOPT_H@
NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
+NEXT_LIMITS_H = @NEXT_LIMITS_H@
NEXT_LOCALE_H = @NEXT_LOCALE_H@
NEXT_MATH_H = @NEXT_MATH_H@
NEXT_SCHED_H = @NEXT_SCHED_H@
NEXT_WCHAR_H = @NEXT_WCHAR_H@
NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
OBJEXT = @OBJEXT@
+OS2_LDFLAGS = @OS2_LDFLAGS@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
+REPLACE_ACOSF = @REPLACE_ACOSF@
+REPLACE_ASINF = @REPLACE_ASINF@
+REPLACE_ATAN2F = @REPLACE_ATAN2F@
+REPLACE_ATANF = @REPLACE_ATANF@
REPLACE_BTOWC = @REPLACE_BTOWC@
REPLACE_CALLOC = @REPLACE_CALLOC@
REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
REPLACE_CHOWN = @REPLACE_CHOWN@
REPLACE_CLOSE = @REPLACE_CLOSE@
REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@
+REPLACE_COSF = @REPLACE_COSF@
+REPLACE_COSHF = @REPLACE_COSHF@
REPLACE_DIRFD = @REPLACE_DIRFD@
REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
REPLACE_EXP2 = @REPLACE_EXP2@
REPLACE_EXP2L = @REPLACE_EXP2L@
+REPLACE_EXPF = @REPLACE_EXPF@
REPLACE_EXPM1 = @REPLACE_EXPM1@
REPLACE_EXPM1F = @REPLACE_EXPM1F@
REPLACE_FABSL = @REPLACE_FABSL@
REPLACE_GETCWD = @REPLACE_GETCWD@
REPLACE_GETDELIM = @REPLACE_GETDELIM@
REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
+REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@
REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
REPLACE_GETLINE = @REPLACE_GETLINE@
REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_GMTIME = @REPLACE_GMTIME@
REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
REPLACE_HYPOT = @REPLACE_HYPOT@
REPLACE_HYPOTF = @REPLACE_HYPOTF@
REPLACE_LINK = @REPLACE_LINK@
REPLACE_LINKAT = @REPLACE_LINKAT@
REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
+REPLACE_LOCALTIME = @REPLACE_LOCALTIME@
REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
REPLACE_LOG = @REPLACE_LOG@
REPLACE_LOG10 = @REPLACE_LOG10@
REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
REPLACE_PUTENV = @REPLACE_PUTENV@
REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_QSORT_R = @REPLACE_QSORT_R@
REPLACE_RAISE = @REPLACE_RAISE@
REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
REPLACE_READ = @REPLACE_READ@
REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_READLINKAT = @REPLACE_READLINKAT@
REPLACE_REALLOC = @REPLACE_REALLOC@
REPLACE_REALPATH = @REPLACE_REALPATH@
REPLACE_REMAINDER = @REPLACE_REMAINDER@
REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
REPLACE_SIGNBIT = @REPLACE_SIGNBIT@
REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
+REPLACE_SINF = @REPLACE_SINF@
+REPLACE_SINHF = @REPLACE_SINHF@
REPLACE_SLEEP = @REPLACE_SLEEP@
REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_SQRTF = @REPLACE_SQRTF@
REPLACE_SQRTL = @REPLACE_SQRTL@
REPLACE_STAT = @REPLACE_STAT@
REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
REPLACE_STRTOD = @REPLACE_STRTOD@
REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@
REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
+REPLACE_TANF = @REPLACE_TANF@
+REPLACE_TANHF = @REPLACE_TANHF@
REPLACE_TIMEGM = @REPLACE_TIMEGM@
REPLACE_TMPFILE = @REPLACE_TMPFILE@
REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
REPLACE_WRITE = @REPLACE_WRITE@
SCHED_H = @SCHED_H@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
+STDALIGN_H = @STDALIGN_H@
STDARG_H = @STDARG_H@
STDBOOL_H = @STDBOOL_H@
STDDEF_H = @STDDEF_H@
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_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@
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@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
am__include = @am__include@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu doc/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo "@set UPDATED $$1 $$2 $$3"; \
echo "@set UPDATED-MONTH $$2 $$3"; \
echo "@set EDITION $(VERSION)"; \
- echo "@set VERSION $(VERSION)") > vti.tmp
- @cmp -s vti.tmp $(srcdir)/version.texi \
- || (echo "Updating $(srcdir)/version.texi"; \
- cp vti.tmp $(srcdir)/version.texi)
- -@rm -f vti.tmp
+ echo "@set VERSION $(VERSION)") > vti.tmp$$$$ && \
+ (cmp -s vti.tmp$$$$ $(srcdir)/version.texi \
+ || (echo "Updating $(srcdir)/version.texi" && \
+ cp vti.tmp$$$$ $(srcdir)/version.texi.tmp$$$$ && \
+ mv $(srcdir)/version.texi.tmp$$$$ $(srcdir)/version.texi)) && \
+ rm -f vti.tmp$$$$ $(srcdir)/version.texi.$$$$
@cp $(srcdir)/version.texi $@
mostlyclean-vti:
- -rm -f vti.tmp
+ -rm -f vti.tmp* $(srcdir)/version.texi.tmp*
maintainer-clean-vti:
-rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
uninstall-dvi-am uninstall-html-am uninstall-info-am \
uninstall-man uninstall-man1 uninstall-pdf-am uninstall-ps-am
+.PRECIOUS: Makefile
+
# Depend on ../.version for version, m4.c for usage text. Do not depend on
# built m4 executable, since not everyone has help2man or perl.
<!--#include virtual="/server/header.html" -->
-<title>%%TITLE%% - GNU Project - Free Software Foundation (FSF)</title>
+<!-- Parent-Version: 1.77 -->
+<title>%%TITLE%% - GNU Project - Free Software Foundation</title>
<!--#include virtual="/server/banner.html" -->
<h2>%%TITLE%%</h2>
</div><!-- for id="content", starts in the include above -->
<!--#include virtual="/server/footer.html" -->
<div id="footer">
+<div class="unprintable">
<p>Please send general FSF & GNU inquiries to
<a href="mailto:gnu@gnu.org"><gnu@gnu.org></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%%"><%%EMAIL%%></a>.</p>
+the FSF. Broken links and other corrections or suggestions can be sent
+to <a href="mailto:%%EMAIL%%"><%%EMAIL%%></a>.</p>
+</div>
+
+<p>Copyright © 2016 Free Software Foundation, Inc.</p>
-<p>Copyright © 2013 Free Software Foundation, Inc.</p>
+<p>This page is licensed under a <a rel="license"
+href="http://creativecommons.org/licenses/by-nd/3.0/us/">Creative
+Commons Attribution-NoDerivs 3.0 United States License</a>.</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>
+<!--#include virtual="/server/bottom-notes.html" -->
</div>
</div>
-.\" 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"
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4.
+.TH M4 "1" "December 2016" "GNU M4 1.4.18" "User Commands"
.SH NAME
m4 \- macro processor
.SH SYNOPSIS
.B m4
-[\fIOPTION\fR]... [\fIFILE\fR]...
+[\fI\,OPTION\/\fR]... [\fI\,FILE\/\fR]...
.SH DESCRIPTION
Process macros in FILEs. If no FILE or if FILE is `\-', standard input
is read.
\fB\-Q\fR, \fB\-\-quiet\fR, \fB\-\-silent\fR
suppress some warnings for builtins
.TP
-\fB\-\-warn\-macro\-sequence\fR[=\fIREGEXP\fR]
+\fB\-\-warn\-macro\-sequence\fR[=\fI\,REGEXP\/\fR]
warn if macro definition matches REGEXP,
.IP
default \e$\e({[^}]*}\e|[0\-9][0\-9]+\e)
+.TP
+\fB\-W\fR, \fB\-\-word\-regexp\fR=\fI\,REGEXP\/\fR
+use REGEXP for macro name syntax
.SS "Preprocessor features:"
.TP
-\fB\-D\fR, \fB\-\-define=NAME\fR[=\fIVALUE\fR]
+\fB\-D\fR, \fB\-\-define=NAME\fR[=\fI\,VALUE\/\fR]
define NAME as having VALUE, or empty
.TP
-\fB\-I\fR, \fB\-\-include\fR=\fIDIRECTORY\fR
+\fB\-I\fR, \fB\-\-include\fR=\fI\,DIRECTORY\/\fR
append DIRECTORY to include path
.TP
\fB\-s\fR, \fB\-\-synclines\fR
generate `#line NUM "FILE"' lines
.TP
-\fB\-U\fR, \fB\-\-undefine\fR=\fINAME\fR
+\fB\-U\fR, \fB\-\-undefine\fR=\fI\,NAME\/\fR
undefine NAME
.SS "Limits control:"
.TP
\fB\-G\fR, \fB\-\-traditional\fR
suppress all GNU extensions
.TP
-\fB\-H\fR, \fB\-\-hashsize\fR=\fIPRIME\fR
+\fB\-H\fR, \fB\-\-hashsize\fR=\fI\,PRIME\/\fR
set symbol lookup hash table size [509]
.TP
-\fB\-L\fR, \fB\-\-nesting\-limit\fR=\fINUMBER\fR
+\fB\-L\fR, \fB\-\-nesting\-limit\fR=\fI\,NUMBER\/\fR
change nesting limit, 0 for unlimited [0]
.SS "Frozen state files:"
.TP
-\fB\-F\fR, \fB\-\-freeze\-state\fR=\fIFILE\fR
+\fB\-F\fR, \fB\-\-freeze\-state\fR=\fI\,FILE\/\fR
produce a frozen state on FILE at end
.TP
-\fB\-R\fR, \fB\-\-reload\-state\fR=\fIFILE\fR
+\fB\-R\fR, \fB\-\-reload\-state\fR=\fI\,FILE\/\fR
reload a frozen state from FILE at start
.SS "Debugging:"
.TP
-\fB\-d\fR, \fB\-\-debug\fR[=\fIFLAGS\fR]
+\fB\-d\fR, \fB\-\-debug\fR[=\fI\,FLAGS\/\fR]
set debug level (no FLAGS implies `aeq')
.TP
-\fB\-\-debugfile\fR[=\fIFILE\fR]
+\fB\-\-debugfile\fR[=\fI\,FILE\/\fR]
redirect debug and trace output to FILE
(default stderr, discard if empty string)
.TP
-\fB\-l\fR, \fB\-\-arglength\fR=\fINUM\fR
+\fB\-l\fR, \fB\-\-arglength\fR=\fI\,NUM\/\fR
restrict macro tracing size
.TP
-\fB\-t\fR, \fB\-\-trace\fR=\fINAME\fR
+\fB\-t\fR, \fB\-\-trace\fR=\fI\,NAME\/\fR
trace NAME when it is defined
.SS "FLAGS is any of:"
.TP
.br
General help using GNU software: <http://www.gnu.org/gethelp/>
.SH COPYRIGHT
-Copyright \(co 2013 Free Software Foundation, Inc.
+Copyright \(co 2016 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.
-This is m4.info, produced by makeinfo version 5.1 from m4.texi.
+This is m4.info, produced by makeinfo version 6.1 from m4.texi.
-This manual (22 September 2013) is for GNU M4 (version 1.4.17), a
-package containing an implementation of the m4 macro language.
+This manual (31 December 2016) is for GNU M4 (version 1.4.18), a package
+containing an implementation of the m4 macro language.
- Copyright (C) 1989-1994, 2004-2013 Free Software Foundation, Inc.
+ Copyright (C) 1989-1994, 2004-2014, 2016 Free Software Foundation,
+Inc.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
\1f
Indirect:
-m4.info-1: 813
-m4.info-2: 301580
+m4.info-1: 818
+m4.info-2: 301584
\1f
Tag Table:
(Indirect)
-Node: Top\7f813
-Node: Preliminaries\7f9617
-Node: Intro\7f10303
-Node: History\7f11934
-Node: Bugs\7f16028
-Node: Manual\7f17279
-Node: Invoking m4\7f20671
-Node: Operation modes\7f22815
-Node: Preprocessor features\7f25782
-Node: Limits control\7f28878
-Node: Frozen state\7f32775
-Node: Debugging options\7f33574
-Node: Command line files\7f35554
-Node: Syntax\7f37127
-Node: Names\7f38246
-Node: Quoted strings\7f38708
-Node: Comments\7f39357
-Node: Other tokens\7f40234
-Node: Input processing\7f40812
-Ref: Input processing-Footnote-1\7f48738
-Node: Macros\7f48933
-Node: Invocation\7f49427
-Node: Inhibiting Invocation\7f50228
-Node: Macro Arguments\7f54364
-Node: Quoting Arguments\7f57423
-Node: Macro expansion\7f59546
-Node: Definitions\7f60247
-Node: Define\7f61032
-Node: Arguments\7f63468
-Node: Pseudo Arguments\7f67138
-Node: Undefine\7f70680
-Node: Defn\7f71810
-Node: Pushdef\7f76254
-Node: Indir\7f78879
-Node: Builtin\7f81002
-Node: Conditionals\7f83219
-Node: Ifdef\7f84161
-Node: Ifelse\7f85022
-Node: Shift\7f88335
-Node: Forloop\7f98803
-Node: Foreach\7f101440
-Node: Stacks\7f106928
-Node: Composition\7f109968
-Node: Debugging\7f115907
-Node: Dumpdef\7f116492
-Node: Trace\7f117845
-Node: Debug Levels\7f121402
-Node: Debug Output\7f126093
-Node: Input Control\7f127372
-Node: Dnl\7f127909
-Node: Changequote\7f129808
-Node: Changecom\7f135890
-Node: Changeword\7f139568
-Node: M4wrap\7f145009
-Node: File Inclusion\7f149005
-Node: Include\7f149322
-Node: Search Path\7f152030
-Node: Diversions\7f152947
-Node: Divert\7f154630
-Node: Undivert\7f157155
-Node: Divnum\7f160477
-Node: Cleardivert\7f160941
-Node: Text handling\7f162145
-Node: Len\7f162868
-Node: Index macro\7f163253
-Node: Regexp\7f164125
-Node: Substr\7f166656
-Node: Translit\7f167700
-Node: Patsubst\7f170420
-Node: Format\7f174943
-Node: Arithmetic\7f178134
-Node: Incr\7f178583
-Node: Eval\7f179356
-Node: Shell commands\7f187288
-Node: Platform macros\7f188210
-Node: Syscmd\7f190325
-Node: Esyscmd\7f192605
-Node: Sysval\7f194114
-Node: Mkstemp\7f195796
-Node: Miscellaneous\7f199746
-Node: Errprint\7f200179
-Node: Location\7f201396
-Node: M4exit\7f204167
-Node: Frozen files\7f206252
-Node: Using frozen files\7f207034
-Node: Frozen file format\7f210299
-Node: Compatibility\7f213365
-Node: Extensions\7f214430
-Node: Incompatibilities\7f218297
-Node: Other Incompatibilities\7f227211
-Node: Answers\7f229857
-Node: Improved exch\7f230639
-Node: Improved forloop\7f231177
-Node: Improved foreach\7f236507
-Node: Improved copy\7f249467
-Node: Improved m4wrap\7f253421
-Node: Improved cleardivert\7f255845
-Node: Improved capitalize\7f256826
-Node: Improved fatal_error\7f261686
-Node: Copying This Package\7f262746
-Node: GNU General Public License\7f263225
-Node: Copying This Manual\7f301580
-Node: GNU Free Documentation License\7f302100
-Node: Indices\7f327210
-Node: Macro index\7f327490
-Node: Concept index\7f333873
+Node: Top\7f818
+Node: Preliminaries\7f9627
+Node: Intro\7f10313
+Node: History\7f11944
+Node: Bugs\7f15881
+Node: Manual\7f17132
+Node: Invoking m4\7f20530
+Node: Operation modes\7f22674
+Node: Preprocessor features\7f25641
+Node: Limits control\7f28737
+Node: Frozen state\7f32634
+Node: Debugging options\7f33433
+Node: Command line files\7f35413
+Node: Syntax\7f36986
+Node: Names\7f38105
+Node: Quoted strings\7f38567
+Node: Comments\7f39216
+Node: Other tokens\7f40093
+Node: Input processing\7f40671
+Ref: Input processing-Footnote-1\7f48597
+Node: Macros\7f48792
+Node: Invocation\7f49286
+Node: Inhibiting Invocation\7f50087
+Node: Macro Arguments\7f54223
+Node: Quoting Arguments\7f57282
+Node: Macro expansion\7f59405
+Node: Definitions\7f60106
+Node: Define\7f60891
+Node: Arguments\7f63329
+Node: Pseudo Arguments\7f66999
+Node: Undefine\7f70541
+Node: Defn\7f71671
+Node: Pushdef\7f76115
+Node: Indir\7f78741
+Node: Builtin\7f80865
+Node: Conditionals\7f83083
+Node: Ifdef\7f84025
+Node: Ifelse\7f84887
+Node: Shift\7f88202
+Node: Forloop\7f98746
+Node: Foreach\7f101383
+Node: Stacks\7f106871
+Node: Composition\7f109911
+Node: Debugging\7f115851
+Node: Dumpdef\7f116436
+Node: Trace\7f117790
+Node: Debug Levels\7f121349
+Node: Debug Output\7f126041
+Node: Input Control\7f127321
+Node: Dnl\7f127858
+Node: Changequote\7f129757
+Node: Changecom\7f135853
+Node: Changeword\7f139548
+Node: M4wrap\7f144989
+Node: File Inclusion\7f148985
+Node: Include\7f149302
+Node: Search Path\7f152010
+Node: Diversions\7f152927
+Node: Divert\7f154610
+Node: Undivert\7f157136
+Node: Divnum\7f160459
+Node: Cleardivert\7f160923
+Node: Text handling\7f162128
+Node: Len\7f162851
+Node: Index macro\7f163236
+Node: Regexp\7f164108
+Node: Substr\7f166640
+Node: Translit\7f167685
+Node: Patsubst\7f170406
+Node: Format\7f174930
+Node: Arithmetic\7f178121
+Node: Incr\7f178570
+Node: Eval\7f179343
+Node: Shell commands\7f187285
+Node: Platform macros\7f188207
+Node: Syscmd\7f190322
+Node: Esyscmd\7f192602
+Node: Sysval\7f194111
+Node: Mkstemp\7f195793
+Node: Miscellaneous\7f199743
+Node: Errprint\7f200176
+Node: Location\7f201393
+Node: M4exit\7f204164
+Node: Frozen files\7f206250
+Node: Using frozen files\7f207032
+Node: Frozen file format\7f210297
+Node: Compatibility\7f213363
+Node: Extensions\7f214428
+Node: Incompatibilities\7f218295
+Node: Other Incompatibilities\7f227209
+Node: Answers\7f229855
+Node: Improved exch\7f230637
+Node: Improved forloop\7f231175
+Node: Improved foreach\7f236505
+Node: Improved copy\7f249465
+Node: Improved m4wrap\7f253419
+Node: Improved cleardivert\7f255843
+Node: Improved capitalize\7f256824
+Node: Improved fatal_error\7f261684
+Node: Copying This Package\7f262744
+Node: GNU General Public License\7f263223
+Node: Copying This Manual\7f301584
+Node: GNU Free Documentation License\7f302104
+Node: Indices\7f327215
+Node: Macro index\7f327495
+Node: Concept index\7f333878
\1f
End Tag Table
-This is m4.info, produced by makeinfo version 5.1 from m4.texi.
+This is m4.info, produced by makeinfo version 6.1 from m4.texi.
-This manual (22 September 2013) is for GNU M4 (version 1.4.17), a
-package containing an implementation of the m4 macro language.
+This manual (31 December 2016) is for GNU M4 (version 1.4.18), a package
+containing an implementation of the m4 macro language.
- Copyright (C) 1989-1994, 2004-2013 Free Software Foundation, Inc.
+ Copyright (C) 1989-1994, 2004-2014, 2016 Free Software Foundation,
+Inc.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
GNU M4
******
-This manual (22 September 2013) is for GNU M4 (version 1.4.17), a
-package containing an implementation of the m4 macro language.
+This manual (31 December 2016) is for GNU M4 (version 1.4.18), a package
+containing an implementation of the m4 macro language.
- Copyright (C) 1989-1994, 2004-2013 Free Software Foundation, Inc.
+ Copyright (C) 1989-1994, 2004-2014, 2016 Free Software Foundation,
+Inc.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
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.17/AUTHORS'
-and 'm4-1.4.17/THANKS' from the GNU M4 distribution.
+names and email addresses can be found in the files 'm4-1.4.18/AUTHORS'
+and 'm4-1.4.18/THANKS' from the GNU M4 distribution.
- This is release 1.4.17. It is now considered stable: future releases
+ This is release 1.4.18. 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...
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.
+of 1.4.5, with subsequent releases through intervening years, as recent
+as 1.4.18 in 2016.
Meanwhile, development has continued on new features for 'm4', such
as dynamic module loading and additional builtins. When complete, GNU
unpacked the installation, so if you plan on following along, you may
find it helpful to do this now:
- $ cd m4-1.4.17
+ $ cd m4-1.4.18
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
+ -- 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
The normal way to define or redefine macros is to use the builtin
'define':
- -- Builtin: define (NAME, [EXPANSION]
+ -- Builtin: define (NAME, [EXPANSION])
Defines NAME to expand to EXPANSION. If EXPANSION is not given, it
is taken to be empty.
macro names.
-- Composite: array (INDEX)
- -- Composite: array_set (INDEX, [VALUE]
+ -- 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.
previous definition at a later time. This is done with the builtins
'pushdef' and 'popdef':
- -- Builtin: pushdef (NAME, [EXPANSION]
+ -- Builtin: pushdef (NAME, [EXPANSION])
-- Builtin: popdef (NAME...)
Analogous to 'define' and 'undefine'.
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.
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.
There are two different builtin conditionals in 'm4'. The first is
'ifdef':
- -- Builtin: ifdef (NAME, STRING-1, [STRING-2]
+ -- 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).
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]
+ EQUAL-2, ..., [NOT-EQUAL])
Used with only one argument, the 'ifelse' simply discards it and
produces no output.
'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]
+ -- 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
two strings results in the third, otherwise the first three
arguments are discarded and the process repeats. The difference is
Another common task that requires iteration is joining a list of
arguments into a single string.
- -- Composite: join ([SEPARATOR]
- -- Composite: joinall ([SEPARATOR]
+ -- Composite: join ([SEPARATOR], [ARGS...])
+ -- Composite: joinall ([SEPARATOR], [ARGS...])
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.
Here are some examples of its usage, based on the implementation
-'m4-1.4.17/examples/join.m4' distributed in this package:
+'m4-1.4.18/examples/join.m4' distributed in this package:
$ m4 -I examples
include(`join.m4')
levels of quoting are added around each element.
An actual implementation of these three macros is distributed as
-'m4-1.4.17/examples/quote.m4' in this package. First, let's examine
+'m4-1.4.18/examples/quote.m4' in this package. First, let's examine
their usage:
$ m4 -I examples
*note Incr::), and recurses.
Here is an actual implementation of 'forloop', distributed as
-'m4-1.4.17/examples/forloop.m4' in this package:
+'m4-1.4.18/examples/forloop.m4' in this package:
$ m4 -I examples
undivert(`forloop.m4')dnl
As an example, this displays each word in a list inside of a
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-1.4.18/examples/foreach.m4', and 'foreachq' in
+'m4-1.4.18/examples/foreachq.m4'.
$ m4 -I examples
include(`foreach.m4')
parameter.
A sample implementation of these macros is distributed in the file
-'m4-1.4.17/examples/stack.m4'.
+'m4-1.4.18/examples/stack.m4'.
$ m4 -I examples
include(`stack.m4')
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
of a context that provides exactly one argument to a macro name. But
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.17/examples/curry.m4' included in the distribution.
+'m4-1.4.18/examples/curry.m4' included in the distribution.
$ m4 -I examples
include(`curry.m4')include(`stack.m4')
If you want to see what a name expands into, you can use the builtin
'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
It is possible to trace macro calls and expansions through the builtins
'traceon' and 'traceoff':
- -- Builtin: traceon ([NAMES...]
- -- Builtin: traceoff ([NAMES...]
+ -- 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.
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
'--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
The default quote delimiters can be changed with the builtin
'changequote':
- -- Builtin: changequote ([START = '`']
+ -- 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
The default comment delimiters can be changed with the builtin macro
'changecom':
- -- Builtin: changecom ([START]
+ -- Builtin: changecom ([START], [END = '<NL>'])
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
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.17/examples/wrapfifo.m4' from the
+GNU M4 by including the file 'm4-1.4.18/examples/wrapfifo.m4' from the
distribution:
$ m4 -I examples
It is likewise possible to emulate LIFO behavior without resorting to
the GNU M4 extension of 'builtin', by including the file
-'m4-1.4.17/examples/wraplifo.m4' from the distribution. (Unfortunately,
+'m4-1.4.18/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 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
+'m4-1.4.18/examples' directory shipped as part of the GNU 'm4' package.
+The file 'm4-1.4.18/examples/incl.m4' in the distribution contains the
lines:
$ cat examples/incl.m4
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.
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.
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',
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:
Substrings are extracted with 'substr':
- -- Builtin: substr (STRING, FROM, [LENGTH]
+ -- 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
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.
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::).
upper case and the remaining characters to lower case.
First, an example of their usage, using implementations distributed
-in 'm4-1.4.17/examples/capitalize.m4'.
+in 'm4-1.4.18/examples/capitalize.m4'.
$ m4 -I examples
include(`capitalize.m4')
Integer expressions are evaluated with 'eval':
- -- Builtin: eval (EXPRESSION, [RADIX = '10']
+ -- Builtin: eval (EXPRESSION, [RADIX = '10'], [WIDTH])
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.
If you need to exit from 'm4' before the entire input has been read, you
can use 'm4exit':
- -- Builtin: m4exit ([CODE = '0']
+ -- 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
the same name, and its order, along with 'F', is important.
'V NUMBER <NL>'
- Confirms the format of the file. 'm4' 1.4.17 only creates and
+ Confirms the format of the file. 'm4' 1.4.18 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.
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.17/examples/forloop2.m4'; this version also optimizes
+shipped as 'm4-1.4.18/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'.
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.17/examples/forloop3.m4' rearranges the arguments of the helper
+'m4-1.4.18/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
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-1.4.18/examples/foreachq2.m4':
$ m4 -I examples
include(`foreachq2.m4')
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.17/examples/foreach3.m4':
+approach is available as 'm4-1.4.18/examples/foreach3.m4':
$ m4 -I examples
include(`foreachq3.m4')
=>4
For yet another approach, the improved version of 'foreach',
-available in 'm4-1.4.17/examples/foreach2.m4', simply overquotes the
+available in 'm4-1.4.18/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:
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.17/examples/stack_sep.m4':
+available in 'm4-1.4.18/examples/stack_sep.m4':
$ m4 -I examples
include(`stack_sep.m4')
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.17/examples/wraplifo2.m4', and can easily be converted to a FIFO
+'m4-1.4.18/examples/wraplifo2.m4', and can easily be converted to a FIFO
solution by swapping the adjacent invocations of 'joinall' and 'defn'.
$ m4 -I examples
another round of 'changequote'.
In the fixed version below, (also shipped as
-'m4-1.4.17/examples/capitalize2.m4'), 'capitalize' uses the alternate
+'m4-1.4.18/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
-This is m4.info, produced by makeinfo version 5.1 from m4.texi.
+This is m4.info, produced by makeinfo version 6.1 from m4.texi.
-This manual (22 September 2013) is for GNU M4 (version 1.4.17), a
-package containing an implementation of the m4 macro language.
+This manual (31 December 2016) is for GNU M4 (version 1.4.18), a package
+containing an implementation of the m4 macro language.
- Copyright (C) 1989-1994, 2004-2013 Free Software Foundation, Inc.
+ Copyright (C) 1989-1994, 2004-2014, 2016 Free Software Foundation,
+Inc.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
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
+directory 'm4-1.4.18/examples/', where a more permissive license is in
effect when copying just the examples.
* Menu:
* __program__: Location. (line 11)
* __unix__: Platform macros. (line 14)
* __windows__: Platform macros. (line 16)
-* argn: Shift. (line 255)
+* argn: Shift. (line 256)
* array: Define. (line 55)
* array_set: Define. (line 56)
* builtin: Builtin. (line 8)
* divnum: Divnum. (line 8)
* dnl: Dnl. (line 8)
* downcase: Patsubst. (line 53)
-* dquote: Shift. (line 193)
-* dquote_elt: Shift. (line 194)
+* dquote: Shift. (line 194)
+* dquote_elt: Shift. (line 195)
* dumpdef: Dumpdef. (line 9)
* errprint: Errprint. (line 8)
* esyscmd: Esyscmd. (line 8)
* incr: Incr. (line 9)
* index: Index macro. (line 8)
* indir: Indir. (line 8)
-* join: Shift. (line 101)
-* joinall: Shift. (line 102)
+* join: Shift. (line 102)
+* joinall: Shift. (line 103)
* len: Len. (line 8)
* m4exit: M4exit. (line 9)
* m4wrap: M4wrap. (line 13)
* patsubst: Patsubst. (line 8)
* popdef: Pushdef. (line 11)
* pushdef: Pushdef. (line 10)
-* quote: Shift. (line 192)
+* quote: Shift. (line 193)
* regexp: Regexp. (line 8)
* rename: Composition. (line 120)
* reverse: Shift. (line 31)
* 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 98)
+* arguments, joining: Shift. (line 99)
* 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, more than nine <1>: Shift. (line 251)
+* arguments, more than nine <2>: Improved foreach. (line 157)
* arguments, quoted macro: Quoting Arguments. (line 6)
* arguments, reversing: Shift. (line 31)
* arithmetic: Arithmetic. (line 6)
* comparing strings: Ifelse. (line 6)
* compatibility: Compatibility. (line 6)
* composing macros: Composition. (line 6)
-* concatenating arguments: Shift. (line 98)
+* concatenating arguments: Shift. (line 99)
* conditional, short-circuiting: Shift. (line 51)
* conditionals: Ifdef. (line 6)
* controlling debugging output: Debug Levels. (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)
* 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: File Inclusion. (line 6)
* inclusion, of files <1>: Undivert. (line 13)
* 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 98)
+* joining arguments: Shift. (line 99)
* length of strings: Len. (line 6)
* lexical structure of words: Changeword. (line 6)
* License, code: Copying This Package.
* 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)
* macros, recursive: Shift. (line 6)
* macros, special arguments to: Pseudo Arguments. (line 6)
* macros, temporary redefinition of: Pushdef. (line 6)
-* manipulating quotes: Shift. (line 189)
+* manipulating quotes: Shift. (line 190)
* messages, printing error: Errprint. (line 6)
* more than nine arguments: Arguments. (line 54)
-* more than nine arguments <1>: Shift. (line 250)
-* more than nine arguments <2>: Improved foreach. (line 156)
+* more than nine arguments <1>: Shift. (line 251)
+* more than nine arguments <2>: Improved foreach. (line 157)
* multibranches: Ifelse. (line 69)
* names: Names. (line 6)
* nesting limit: Limits control. (line 43)
* nine arguments, more than: Arguments. (line 54)
-* nine arguments, more than <1>: Shift. (line 250)
-* nine arguments, more than <2>: Improved foreach. (line 156)
+* nine arguments, more than <1>: Shift. (line 251)
+* nine arguments, more than <2>: Improved foreach. (line 157)
* 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': Invoking m4. (line 10)
-* 'POSIXLY_CORRECT' <1>: Incompatibilities. (line 144)
+* 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)
* quadratic behavior, avoiding: Improved foreach. (line 38)
* quote delimiters, changing: Changequote. (line 6)
-* quote manipulation: Shift. (line 189)
+* quote manipulation: Shift. (line 190)
* quoted macro arguments: Quoting Arguments. (line 6)
* quoted string: Quoted strings. (line 6)
* quoting rule of thumb: Quoting Arguments. (line 22)
* 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)
* 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)
@include version.texi
@settitle GNU M4 @value{VERSION} macro processor
@setchapternewpage odd
-@ifnothtml
-@setcontentsaftertitlepage
-@end ifnothtml
@finalout
@c @tabchar{}
@c The ARG is an optional argument. To be used for macro arguments in
@c their documentation (@defmac).
@macro ovar{varname}
-@r{[}@var{\varname\}@r{]}@c
+@r{[}@var{\varname\}@r{]}
@end macro
@c @dvar{ARG, DEFAULT}
@c The ARG is an optional argument, defaulting to DEFAULT. To be used
@c for macro arguments in their documentation (@defmac).
@macro dvar{varname, default}
-@r{[}@var{\varname\} = @samp{\default\}@r{]}@c
+@r{[}@var{\varname\} = @samp{\default\}@r{]}
@end macro
@comment %**end of header
@value{VERSION}), a package containing an implementation of the m4 macro
language.
-Copyright @copyright{} 1989-1994, 2004-2013 Free Software Foundation,
-Inc.
+Copyright @copyright{} 1989-1994, 2004-2014, 2016 Free Software
+Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
2005, Gary V. Vaughan collected together the many patches to
GNU @code{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.
+prepared patches for the release of 1.4.5, with subsequent releases
+through intervening years, as recent as 1.4.18 in 2016.
Meanwhile, development has continued on new features for @code{m4}, such
as dynamic module loading and additional builtins. When complete,
-@set UPDATED 22 September 2013
-@set UPDATED-MONTH September 2013
-@set EDITION 1.4.17
-@set VERSION 1.4.17
+@set UPDATED 31 December 2016
+@set UPDATED-MONTH December 2016
+@set EDITION 1.4.18
+@set VERSION 1.4.18
-@set UPDATED 22 September 2013
-@set UPDATED-MONTH September 2013
-@set EDITION 1.4.17
-@set VERSION 1.4.17
+@set UPDATED 31 December 2016
+@set UPDATED-MONTH December 2016
+@set EDITION 1.4.18
+@set VERSION 1.4.18
## Makefile.am - template for generating Makefile via Automake
##
-## Copyright (C) 2006-2013 Free Software Foundation, Inc.
+## Copyright (C) 2006-2014, 2016 Free Software Foundation, Inc.
##
## This file is part of GNU M4.
##
-# Makefile.in generated by automake 1.14 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
build_triplet = @build@
host_triplet = @host@
subdir = examples
-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/absolute-header.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/builtin-expect.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/ctype.m4 $(top_srcdir)/m4/dirent_h.m4 \
+ $(top_srcdir)/m4/dirfd.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/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/flexmember.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/getprogname.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/hard-locale.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/inttypes_h.m4 $(top_srcdir)/m4/isblank.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/limits-h.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/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/memchr.m4 $(top_srcdir)/m4/minmax.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/obstack.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/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/stdalign.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)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/lib/config.h
CONFIG_CLEAN_FILES =
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in COPYING
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
pkglibexecdir = @pkglibexecdir@
ACLOCAL = @ACLOCAL@
GNULIB_IMAXABS = @GNULIB_IMAXABS@
GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
GNULIB_ISATTY = @GNULIB_ISATTY@
+GNULIB_ISBLANK = @GNULIB_ISBLANK@
GNULIB_ISFINITE = @GNULIB_ISFINITE@
GNULIB_ISINF = @GNULIB_ISINF@
GNULIB_ISNAN = @GNULIB_ISNAN@
GNULIB_OPEN = @GNULIB_OPEN@
GNULIB_OPENAT = @GNULIB_OPENAT@
GNULIB_OPENDIR = @GNULIB_OPENDIR@
+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@
GNULIB_PCLOSE = @GNULIB_PCLOSE@
GNULIB_PERROR = @GNULIB_PERROR@
GNULIB_PIPE = @GNULIB_PIPE@
GNULIB_PUTENV = @GNULIB_PUTENV@
GNULIB_PUTS = @GNULIB_PUTS@
GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_QSORT_R = @GNULIB_QSORT_R@
GNULIB_RAISE = @GNULIB_RAISE@
GNULIB_RANDOM = @GNULIB_RANDOM@
GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
GNULIB_TANL = @GNULIB_TANL@
GNULIB_TIMEGM = @GNULIB_TIMEGM@
GNULIB_TIME_R = @GNULIB_TIME_R@
+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@
GNULIB_TMPFILE = @GNULIB_TMPFILE@
GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
GNULIB_TRUNC = @GNULIB_TRUNC@
HAVE_ATANL = @HAVE_ATANL@
HAVE_ATOLL = @HAVE_ATOLL@
HAVE_BTOWC = @HAVE_BTOWC@
+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@
HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
HAVE_CBRT = @HAVE_CBRT@
HAVE_CBRTF = @HAVE_CBRTF@
HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
HAVE_ILOGBF = @HAVE_ILOGBF@
HAVE_ILOGBL = @HAVE_ILOGBL@
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_ISBLANK = @HAVE_ISBLANK@
HAVE_ISNAND = @HAVE_ISNAND@
HAVE_ISNANF = @HAVE_ISNANF@
HAVE_ISNANL = @HAVE_ISNANL@
HAVE_LOGL = @HAVE_LOGL@
HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
HAVE_LSTAT = @HAVE_LSTAT@
+HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
HAVE_MBRLEN = @HAVE_MBRLEN@
HAVE_MBRTOWC = @HAVE_MBRTOWC@
HAVE_MBSINIT = @HAVE_MBSINIT@
HAVE_PTSNAME = @HAVE_PTSNAME@
HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_QSORT_R = @HAVE_QSORT_R@
HAVE_RAISE = @HAVE_RAISE@
HAVE_RANDOM = @HAVE_RANDOM@
HAVE_RANDOM_H = @HAVE_RANDOM_H@
HAVE_SYMLINK = @HAVE_SYMLINK@
HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_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_TANHF = @HAVE_TANHF@
HAVE_TANL = @HAVE_TANL@
HAVE_TIMEGM = @HAVE_TIMEGM@
+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
HAVE_UNISTD_H = @HAVE_UNISTD_H@
HAVE_UNLINKAT = @HAVE_UNLINKAT@
LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@
LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@
LIBTHREAD = @LIBTHREAD@
+LIB_POSIX_SPAWN = @LIB_POSIX_SPAWN@
+LIMITS_H = @LIMITS_H@
LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
LOCALE_FR = @LOCALE_FR@
LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
M4tests_WITNESS = @M4tests_WITNESS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@
NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
NEXT_AS_FIRST_DIRECTIVE_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_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_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_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
+NEXT_CTYPE_H = @NEXT_CTYPE_H@
NEXT_DIRENT_H = @NEXT_DIRENT_H@
NEXT_ERRNO_H = @NEXT_ERRNO_H@
NEXT_FCNTL_H = @NEXT_FCNTL_H@
NEXT_GETOPT_H = @NEXT_GETOPT_H@
NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
+NEXT_LIMITS_H = @NEXT_LIMITS_H@
NEXT_LOCALE_H = @NEXT_LOCALE_H@
NEXT_MATH_H = @NEXT_MATH_H@
NEXT_SCHED_H = @NEXT_SCHED_H@
NEXT_WCHAR_H = @NEXT_WCHAR_H@
NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
OBJEXT = @OBJEXT@
+OS2_LDFLAGS = @OS2_LDFLAGS@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
+REPLACE_ACOSF = @REPLACE_ACOSF@
+REPLACE_ASINF = @REPLACE_ASINF@
+REPLACE_ATAN2F = @REPLACE_ATAN2F@
+REPLACE_ATANF = @REPLACE_ATANF@
REPLACE_BTOWC = @REPLACE_BTOWC@
REPLACE_CALLOC = @REPLACE_CALLOC@
REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
REPLACE_CHOWN = @REPLACE_CHOWN@
REPLACE_CLOSE = @REPLACE_CLOSE@
REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@
+REPLACE_COSF = @REPLACE_COSF@
+REPLACE_COSHF = @REPLACE_COSHF@
REPLACE_DIRFD = @REPLACE_DIRFD@
REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
REPLACE_EXP2 = @REPLACE_EXP2@
REPLACE_EXP2L = @REPLACE_EXP2L@
+REPLACE_EXPF = @REPLACE_EXPF@
REPLACE_EXPM1 = @REPLACE_EXPM1@
REPLACE_EXPM1F = @REPLACE_EXPM1F@
REPLACE_FABSL = @REPLACE_FABSL@
REPLACE_GETCWD = @REPLACE_GETCWD@
REPLACE_GETDELIM = @REPLACE_GETDELIM@
REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
+REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@
REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
REPLACE_GETLINE = @REPLACE_GETLINE@
REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_GMTIME = @REPLACE_GMTIME@
REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
REPLACE_HYPOT = @REPLACE_HYPOT@
REPLACE_HYPOTF = @REPLACE_HYPOTF@
REPLACE_LINK = @REPLACE_LINK@
REPLACE_LINKAT = @REPLACE_LINKAT@
REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
+REPLACE_LOCALTIME = @REPLACE_LOCALTIME@
REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
REPLACE_LOG = @REPLACE_LOG@
REPLACE_LOG10 = @REPLACE_LOG10@
REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
REPLACE_PUTENV = @REPLACE_PUTENV@
REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_QSORT_R = @REPLACE_QSORT_R@
REPLACE_RAISE = @REPLACE_RAISE@
REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
REPLACE_READ = @REPLACE_READ@
REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_READLINKAT = @REPLACE_READLINKAT@
REPLACE_REALLOC = @REPLACE_REALLOC@
REPLACE_REALPATH = @REPLACE_REALPATH@
REPLACE_REMAINDER = @REPLACE_REMAINDER@
REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
REPLACE_SIGNBIT = @REPLACE_SIGNBIT@
REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
+REPLACE_SINF = @REPLACE_SINF@
+REPLACE_SINHF = @REPLACE_SINHF@
REPLACE_SLEEP = @REPLACE_SLEEP@
REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_SQRTF = @REPLACE_SQRTF@
REPLACE_SQRTL = @REPLACE_SQRTL@
REPLACE_STAT = @REPLACE_STAT@
REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
REPLACE_STRTOD = @REPLACE_STRTOD@
REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@
REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
+REPLACE_TANF = @REPLACE_TANF@
+REPLACE_TANHF = @REPLACE_TANHF@
REPLACE_TIMEGM = @REPLACE_TIMEGM@
REPLACE_TMPFILE = @REPLACE_TMPFILE@
REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
REPLACE_WRITE = @REPLACE_WRITE@
SCHED_H = @SCHED_H@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
+STDALIGN_H = @STDALIGN_H@
STDARG_H = @STDARG_H@
STDBOOL_H = @STDBOOL_H@
STDDEF_H = @STDDEF_H@
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_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@
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@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
am__include = @am__include@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu examples/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
pdf-am ps ps-am tags-am uninstall uninstall-am
+.PRECIOUS: Makefile
+
# 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.
## Makefile.am - template for generating Makefile via Automake
##
-## Copyright (C) 2009-2013 Free Software Foundation, Inc.
+## Copyright (C) 2009-2014, 2016 Free Software Foundation, Inc.
##
## This file is part of GNU M4.
##
-# Makefile.in generated by automake 1.14 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
-# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+# Copyright (C) 2002-2016 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 same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
-# 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
+# Reproduce by: gnulib-tool --import --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 do-release-commit-and-tag error execute fclose fdl-1.3 fflush filenamecat fopen fopen-safer fseeko gendocs getopt-gnu git-version-gen gitlog-to-changelog 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__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-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/absolute-header.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/builtin-expect.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/ctype.m4 $(top_srcdir)/m4/dirent_h.m4 \
+ $(top_srcdir)/m4/dirfd.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/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/flexmember.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/getprogname.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/hard-locale.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/inttypes_h.m4 $(top_srcdir)/m4/isblank.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/limits-h.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/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/memchr.m4 $(top_srcdir)/m4/minmax.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/obstack.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/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/stdalign.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)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
exitfail.$(OBJEXT) fatal-signal.$(OBJEXT) fd-hook.$(OBJEXT) \
fd-safer-flag.$(OBJEXT) dup-safer-flag.$(OBJEXT) \
filenamecat.$(OBJEXT) filenamecat-lgpl.$(OBJEXT) \
- fopen-safer.$(OBJEXT) freading.$(OBJEXT) \
- gl_linkedhash_list.$(OBJEXT) gl_list.$(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) \
- 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)
+ fopen-safer.$(OBJEXT) freading.$(OBJEXT) getprogname.$(OBJEXT) \
+ hard-locale.$(OBJEXT) gl_linkedhash_list.$(OBJEXT) \
+ gl_list.$(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) 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@)
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.hin \
+ $(srcdir)/gnulib.mk $(top_srcdir)/build-aux/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
pkglibexecdir = @pkglibexecdir@
ACLOCAL = @ACLOCAL@
GNULIB_IMAXABS = @GNULIB_IMAXABS@
GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
GNULIB_ISATTY = @GNULIB_ISATTY@
+GNULIB_ISBLANK = @GNULIB_ISBLANK@
GNULIB_ISFINITE = @GNULIB_ISFINITE@
GNULIB_ISINF = @GNULIB_ISINF@
GNULIB_ISNAN = @GNULIB_ISNAN@
GNULIB_OPEN = @GNULIB_OPEN@
GNULIB_OPENAT = @GNULIB_OPENAT@
GNULIB_OPENDIR = @GNULIB_OPENDIR@
+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@
GNULIB_PCLOSE = @GNULIB_PCLOSE@
GNULIB_PERROR = @GNULIB_PERROR@
GNULIB_PIPE = @GNULIB_PIPE@
GNULIB_PUTENV = @GNULIB_PUTENV@
GNULIB_PUTS = @GNULIB_PUTS@
GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_QSORT_R = @GNULIB_QSORT_R@
GNULIB_RAISE = @GNULIB_RAISE@
GNULIB_RANDOM = @GNULIB_RANDOM@
GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
GNULIB_TANL = @GNULIB_TANL@
GNULIB_TIMEGM = @GNULIB_TIMEGM@
GNULIB_TIME_R = @GNULIB_TIME_R@
+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@
GNULIB_TMPFILE = @GNULIB_TMPFILE@
GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
GNULIB_TRUNC = @GNULIB_TRUNC@
HAVE_ATANL = @HAVE_ATANL@
HAVE_ATOLL = @HAVE_ATOLL@
HAVE_BTOWC = @HAVE_BTOWC@
+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@
HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
HAVE_CBRT = @HAVE_CBRT@
HAVE_CBRTF = @HAVE_CBRTF@
HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
HAVE_ILOGBF = @HAVE_ILOGBF@
HAVE_ILOGBL = @HAVE_ILOGBL@
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_ISBLANK = @HAVE_ISBLANK@
HAVE_ISNAND = @HAVE_ISNAND@
HAVE_ISNANF = @HAVE_ISNANF@
HAVE_ISNANL = @HAVE_ISNANL@
HAVE_LOGL = @HAVE_LOGL@
HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
HAVE_LSTAT = @HAVE_LSTAT@
+HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
HAVE_MBRLEN = @HAVE_MBRLEN@
HAVE_MBRTOWC = @HAVE_MBRTOWC@
HAVE_MBSINIT = @HAVE_MBSINIT@
HAVE_PTSNAME = @HAVE_PTSNAME@
HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_QSORT_R = @HAVE_QSORT_R@
HAVE_RAISE = @HAVE_RAISE@
HAVE_RANDOM = @HAVE_RANDOM@
HAVE_RANDOM_H = @HAVE_RANDOM_H@
HAVE_SYMLINK = @HAVE_SYMLINK@
HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_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_TANHF = @HAVE_TANHF@
HAVE_TANL = @HAVE_TANL@
HAVE_TIMEGM = @HAVE_TIMEGM@
+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
HAVE_UNISTD_H = @HAVE_UNISTD_H@
HAVE_UNLINKAT = @HAVE_UNLINKAT@
LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@
LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@
LIBTHREAD = @LIBTHREAD@
+LIB_POSIX_SPAWN = @LIB_POSIX_SPAWN@
+LIMITS_H = @LIMITS_H@
LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
LOCALE_FR = @LOCALE_FR@
LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
M4tests_WITNESS = @M4tests_WITNESS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@
NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
NEXT_AS_FIRST_DIRECTIVE_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_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_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_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
+NEXT_CTYPE_H = @NEXT_CTYPE_H@
NEXT_DIRENT_H = @NEXT_DIRENT_H@
NEXT_ERRNO_H = @NEXT_ERRNO_H@
NEXT_FCNTL_H = @NEXT_FCNTL_H@
NEXT_GETOPT_H = @NEXT_GETOPT_H@
NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
+NEXT_LIMITS_H = @NEXT_LIMITS_H@
NEXT_LOCALE_H = @NEXT_LOCALE_H@
NEXT_MATH_H = @NEXT_MATH_H@
NEXT_SCHED_H = @NEXT_SCHED_H@
NEXT_WCHAR_H = @NEXT_WCHAR_H@
NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
OBJEXT = @OBJEXT@
+OS2_LDFLAGS = @OS2_LDFLAGS@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
+REPLACE_ACOSF = @REPLACE_ACOSF@
+REPLACE_ASINF = @REPLACE_ASINF@
+REPLACE_ATAN2F = @REPLACE_ATAN2F@
+REPLACE_ATANF = @REPLACE_ATANF@
REPLACE_BTOWC = @REPLACE_BTOWC@
REPLACE_CALLOC = @REPLACE_CALLOC@
REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
REPLACE_CHOWN = @REPLACE_CHOWN@
REPLACE_CLOSE = @REPLACE_CLOSE@
REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@
+REPLACE_COSF = @REPLACE_COSF@
+REPLACE_COSHF = @REPLACE_COSHF@
REPLACE_DIRFD = @REPLACE_DIRFD@
REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
REPLACE_EXP2 = @REPLACE_EXP2@
REPLACE_EXP2L = @REPLACE_EXP2L@
+REPLACE_EXPF = @REPLACE_EXPF@
REPLACE_EXPM1 = @REPLACE_EXPM1@
REPLACE_EXPM1F = @REPLACE_EXPM1F@
REPLACE_FABSL = @REPLACE_FABSL@
REPLACE_GETCWD = @REPLACE_GETCWD@
REPLACE_GETDELIM = @REPLACE_GETDELIM@
REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
+REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@
REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
REPLACE_GETLINE = @REPLACE_GETLINE@
REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_GMTIME = @REPLACE_GMTIME@
REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
REPLACE_HYPOT = @REPLACE_HYPOT@
REPLACE_HYPOTF = @REPLACE_HYPOTF@
REPLACE_LINK = @REPLACE_LINK@
REPLACE_LINKAT = @REPLACE_LINKAT@
REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
+REPLACE_LOCALTIME = @REPLACE_LOCALTIME@
REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
REPLACE_LOG = @REPLACE_LOG@
REPLACE_LOG10 = @REPLACE_LOG10@
REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
REPLACE_PUTENV = @REPLACE_PUTENV@
REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_QSORT_R = @REPLACE_QSORT_R@
REPLACE_RAISE = @REPLACE_RAISE@
REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
REPLACE_READ = @REPLACE_READ@
REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_READLINKAT = @REPLACE_READLINKAT@
REPLACE_REALLOC = @REPLACE_REALLOC@
REPLACE_REALPATH = @REPLACE_REALPATH@
REPLACE_REMAINDER = @REPLACE_REMAINDER@
REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
REPLACE_SIGNBIT = @REPLACE_SIGNBIT@
REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
+REPLACE_SINF = @REPLACE_SINF@
+REPLACE_SINHF = @REPLACE_SINHF@
REPLACE_SLEEP = @REPLACE_SLEEP@
REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_SQRTF = @REPLACE_SQRTF@
REPLACE_SQRTL = @REPLACE_SQRTL@
REPLACE_STAT = @REPLACE_STAT@
REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
REPLACE_STRTOD = @REPLACE_STRTOD@
REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@
REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
+REPLACE_TANF = @REPLACE_TANF@
+REPLACE_TANHF = @REPLACE_TANHF@
REPLACE_TIMEGM = @REPLACE_TIMEGM@
REPLACE_TMPFILE = @REPLACE_TMPFILE@
REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
REPLACE_WRITE = @REPLACE_WRITE@
SCHED_H = @SCHED_H@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
+STDALIGN_H = @STDALIGN_H@
STDARG_H = @STDARG_H@
STDBOOL_H = @STDBOOL_H@
STDDEF_H = @STDDEF_H@
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_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@
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@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
am__include = @am__include@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
# 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
+ $(GETOPT_H) langinfo.h $(LIMITS_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 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 \
+EXTRA_DIST = alignof.h 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 \
+ $(top_srcdir)/build-aux/do-release-commit-and-tag 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 stdio-impl.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/gitlog-to-changelog \
$(top_srcdir)/build-aux/gnu-web-doc-update \
$(top_srcdir)/GNUmakefile $(top_srcdir)/build-aux/gnupload \
- $(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 \
- 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 \
+ hard-locale.h $(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 limits.in.h \
+ config.charset ref-add.sin ref-del.sin locale.in.h \
+ localeconv.c lseek.c lstat.c $(top_srcdir)/maint.mk malloc.c \
+ 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 \
MOSTLYCLEANDIRS = sys sys
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
+ getopt.h-t langinfo.h langinfo.h-t limits.h limits.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 \
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 math.c memchr2.h memchr2.c gl_oset.h gl_oset.c \
+ fopen-safer.c freading.c getprogname.h getprogname.c gettext.h \
+ hard-locale.c 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 \
+ math.c memchr2.h memchr2.c minmax.h 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 \
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 raise.c rawmemchr.c readlink.c regcomp.c \
- regex.c regex_internal.c regexec.c rename.c rmdir.c \
- 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
+ lseek.c lstat.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 raise.c \
+ rawmemchr.c readlink.c regcomp.c regex.c regex_internal.c \
+ regexec.c rename.c rmdir.c 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
+
+# Use this preprocessor expression to decide whether #include_next works.
+# Do not rely on a 'configure'-time test for this, since the expression
+# might appear in an installed header, which is used by some other compiler.
+HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER)
charset_alias = $(DESTDIR)$(libdir)/charset.alias
charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu lib/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*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:
+$(srcdir)/gnulib.mk $(am__empty):
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdtablesize.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getprogname.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettimeofday.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_avltree_oset.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_linkedhash_list.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_oset.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_xlist.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_xoset.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hard-locale.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnan.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnand.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnanf.Po@am__quote@
pdf-am ps ps-am tags tags-am uninstall uninstall-am \
uninstall-local
+.PRECIOUS: Makefile
+
# We need the following in order to create <alloca.h> when the system
# doesn't have one that works with the given compiler.
@GL_GENERATE_ALLOCA_H_FALSE@ rm -f $@
# Listed in the same order as the GNU makefile conventions, and
-# provided by autoconf 2.59c+.
+# provided by autoconf 2.59c+ or 2.70.
# The Automake-defined pkg* macros are appended, in the order
# listed in the Automake 1.10a+ documentation.
configmake.h: Makefile
echo '#define SYSCONFDIR "$(sysconfdir)"'; \
echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
+ echo '#define RUNSTATEDIR "$(runstatedir)"'; \
echo '#define INCLUDEDIR "$(includedir)"'; \
echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
echo '#define DOCDIR "$(docdir)"'; \
} > $@-t && \
mv $@-t $@
+# We need the following in order to create <limits.h> when the system
+# doesn't have one that is compatible with GNU.
+@GL_GENERATE_LIMITS_H_TRUE@limits.h: limits.in.h $(top_builddir)/config.status
+@GL_GENERATE_LIMITS_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
+@GL_GENERATE_LIMITS_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+@GL_GENERATE_LIMITS_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
+@GL_GENERATE_LIMITS_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+@GL_GENERATE_LIMITS_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+@GL_GENERATE_LIMITS_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+@GL_GENERATE_LIMITS_H_TRUE@ -e 's|@''NEXT_LIMITS_H''@|$(NEXT_LIMITS_H)|g' \
+@GL_GENERATE_LIMITS_H_TRUE@ < $(srcdir)/limits.in.h; \
+@GL_GENERATE_LIMITS_H_TRUE@ } > $@-t && \
+@GL_GENERATE_LIMITS_H_TRUE@ mv $@-t $@
+@GL_GENERATE_LIMITS_H_FALSE@limits.h: $(top_builddir)/config.status
+@GL_GENERATE_LIMITS_H_FALSE@ rm -f $@
+
# We need the following in order to install a simple file in $(libdir)
# which is shared with other installed packages. We use a list of referencing
# packages so that "make uninstall" will remove the file if and only if it
-e 's|@''HAVE_DECL_TRUNCF''@|$(HAVE_DECL_TRUNCF)|g' \
-e 's|@''HAVE_DECL_TRUNCL''@|$(HAVE_DECL_TRUNCL)|g' \
| \
- sed -e 's|@''REPLACE_CBRTF''@|$(REPLACE_CBRTF)|g' \
+ sed -e 's|@''REPLACE_ACOSF''@|$(REPLACE_ACOSF)|g' \
+ -e 's|@''REPLACE_ASINF''@|$(REPLACE_ASINF)|g' \
+ -e 's|@''REPLACE_ATANF''@|$(REPLACE_ATANF)|g' \
+ -e 's|@''REPLACE_ATAN2F''@|$(REPLACE_ATAN2F)|g' \
+ -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_COSF''@|$(REPLACE_COSF)|g' \
+ -e 's|@''REPLACE_COSHF''@|$(REPLACE_COSHF)|g' \
+ -e 's|@''REPLACE_EXPF''@|$(REPLACE_EXPF)|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_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_SINF''@|$(REPLACE_SINF)|g' \
+ -e 's|@''REPLACE_SINHF''@|$(REPLACE_SINHF)|g' \
+ -e 's|@''REPLACE_SQRTF''@|$(REPLACE_SQRTF)|g' \
-e 's|@''REPLACE_SQRTL''@|$(REPLACE_SQRTL)|g' \
+ -e 's|@''REPLACE_TANF''@|$(REPLACE_TANF)|g' \
+ -e 's|@''REPLACE_TANHF''@|$(REPLACE_TANHF)|g' \
-e 's|@''REPLACE_TRUNC''@|$(REPLACE_TRUNC)|g' \
-e 's|@''REPLACE_TRUNCF''@|$(REPLACE_TRUNCF)|g' \
-e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \
@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|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_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_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_MAX_ALIGN_T''@|$(HAVE_MAX_ALIGN_T)|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_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_C99_STDINT_H''@/$(HAVE_C99_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/@''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@ -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
@GL_GENERATE_STDINT_H_TRUE@ < $(srcdir)/stdint.in.h; \
@GL_GENERATE_STDINT_H_TRUE@ } > $@-t && \
@GL_GENERATE_STDINT_H_TRUE@ mv $@-t $@
-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_QSORT_R''@/$(GNULIB_QSORT_R)/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|@''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_QSORT_R''@|$(HAVE_QSORT_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|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
-e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
-e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
+ -e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|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|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
+ -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \
-e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \
-e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \
-e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \
-e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \
-e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \
+ -e 's/@''GNULIB_TIME_RZ''@/$(GNULIB_TIME_RZ)/g' \
-e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
-e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
-e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
-e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \
+ -e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \
+ -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \
+ -e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \
-e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \
-e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \
-e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
-e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \
-e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
-e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
+ -e 's|@''UNISTD_H_DEFINES_STRUCT_TIMESPEC''@|$(UNISTD_H_DEFINES_STRUCT_TIMESPEC)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
-e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
-e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
-e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
- -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \
-e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
-e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \
-e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
-e 's|@''HAVE_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''@|$(HAVE_DECL_GETLOGIN)|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|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
-e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
-e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
+ -e 's|@''REPLACE_GETDTABLESIZE''@|$(REPLACE_GETDTABLESIZE)|g' \
-e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
-e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
-e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
-e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \
-e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \
-e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
+ -e 's|@''REPLACE_READLINKAT''@|$(REPLACE_READLINKAT)|g' \
-e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
-e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
-e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
+ -e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \
-e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \
-e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \
-e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \
-e 's|@''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_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
-e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \
-e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \
-e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \
+ -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
-e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \
-e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \
-e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \
--- /dev/null
+/* Determine alignment of types.
+ Copyright (C) 2003-2004, 2006, 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute 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 _ALIGNOF_H
+#define _ALIGNOF_H
+
+#include <stddef.h>
+
+/* alignof_slot (TYPE)
+ Determine the alignment of a structure slot (field) of a given type,
+ at compile time. Note that the result depends on the ABI.
+ This is the same as alignof (TYPE) and _Alignof (TYPE), defined in
+ <stdalign.h> if __alignof_is_defined is 1.
+ Note: The result cannot be used as a value for an 'enum' constant,
+ due to bugs in HP-UX 10.20 cc and AIX 3.2.5 xlc. */
+#if defined __cplusplus
+ template <class type> struct alignof_helper { char __slot1; type __slot2; };
+# define alignof_slot(type) offsetof (alignof_helper<type>, __slot2)
+#else
+# define alignof_slot(type) offsetof (struct { char __slot1; type __slot2; }, __slot2)
+#endif
+
+/* alignof_type (TYPE)
+ Determine the good alignment of an object of the given type at compile time.
+ Note that this is not necessarily the same as alignof_slot(type).
+ For example, with GNU C on x86 platforms: alignof_type(double) = 8, but
+ - when -malign-double is not specified: alignof_slot(double) = 4,
+ - when -malign-double is specified: alignof_slot(double) = 8.
+ Note: The result cannot be used as a value for an 'enum' constant,
+ due to bugs in HP-UX 10.20 cc and AIX 3.2.5 xlc. */
+#if defined __GNUC__ || defined __IBM__ALIGNOF__
+# define alignof_type __alignof__
+#else
+# define alignof_type alignof_slot
+#endif
+
+#endif /* _ALIGNOF_H */
/* Memory allocation on the stack.
- Copyright (C) 1995, 1999, 2001-2004, 2006-2013 Free Software Foundation,
+ Copyright (C) 1995, 1999, 2001-2004, 2006-2016 Free Software Foundation,
Inc.
This program is free software; you can redistribute it and/or modify it
void *_alloca (unsigned short);
# pragma intrinsic (_alloca)
# define alloca _alloca
+# elif defined __MVS__
+# include <stdlib.h>
# else
# include <stddef.h>
# ifdef __cplusplus
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007, 2009-2013 Free Software Foundation,
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2016 Free Software Foundation,
Inc.
This program is free software; you can redistribute it and/or modify
/* basename.c -- return the last element in a file name
- Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2013 Free Software
+ Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2016 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
/* basename.c -- return the last element in a file name
- Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2013 Free Software
+ Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2016 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
#include <config.h>
#define BINARY_IO_INLINE _GL_EXTERN_INLINE
#include "binary-io.h"
+typedef int dummy;
/* Binary mode I/O.
- Copyright (C) 2001, 2003, 2005, 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2005, 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* SET_BINARY (fd);
changes the file descriptor fd to perform binary I/O. */
-#ifdef __DJGPP__
+#if defined __DJGPP__ || defined __EMX__
# 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
/* Convert unibyte character to wide character.
- Copyright (C) 2008, 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2010-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
-/* Character handling in C locale.
-
- 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
-the Free Software Foundation; either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General 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 NO_C_CTYPE_MACROS
+#define C_CTYPE_INLINE _GL_EXTERN_INLINE
#include "c-ctype.h"
-
-/* The function isascii is not locale dependent. Its use in EBCDIC is
- questionable. */
-bool
-c_isascii (int c)
-{
- return (c >= 0x00 && c <= 0x7f);
-}
-
-bool
-c_isalnum (int c)
-{
-#if C_CTYPE_CONSECUTIVE_DIGITS \
- && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
-#if C_CTYPE_ASCII
- return ((c >= '0' && c <= '9')
- || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z'));
-#else
- return ((c >= '0' && c <= '9')
- || (c >= 'A' && c <= 'Z')
- || (c >= 'a' && c <= 'z'));
-#endif
-#else
- switch (c)
- {
- case '0': case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '8': case '9':
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
- case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
- case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
- case 'Y': case 'Z':
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
- case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
- case 's': case 't': case 'u': case 'v': case 'w': case 'x':
- case 'y': case 'z':
- return 1;
- default:
- return 0;
- }
-#endif
-}
-
-bool
-c_isalpha (int c)
-{
-#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
-#if C_CTYPE_ASCII
- return ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z');
-#else
- return ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'));
-#endif
-#else
- switch (c)
- {
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
- case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
- case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
- case 'Y': case 'Z':
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
- case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
- case 's': case 't': case 'u': case 'v': case 'w': case 'x':
- case 'y': case 'z':
- return 1;
- default:
- return 0;
- }
-#endif
-}
-
-bool
-c_isblank (int c)
-{
- return (c == ' ' || c == '\t');
-}
-
-bool
-c_iscntrl (int c)
-{
-#if C_CTYPE_ASCII
- return ((c & ~0x1f) == 0 || c == 0x7f);
-#else
- switch (c)
- {
- case ' ': case '!': case '"': case '#': case '$': case '%':
- case '&': case '\'': case '(': case ')': case '*': case '+':
- case ',': case '-': case '.': case '/':
- case '0': case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '8': case '9':
- case ':': case ';': case '<': case '=': case '>': case '?':
- case '@':
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
- case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
- case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
- case 'Y': case 'Z':
- case '[': case '\\': case ']': case '^': case '_': case '`':
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
- case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
- case 's': case 't': case 'u': case 'v': case 'w': case 'x':
- case 'y': case 'z':
- case '{': case '|': case '}': case '~':
- return 0;
- default:
- return 1;
- }
-#endif
-}
-
-bool
-c_isdigit (int c)
-{
-#if C_CTYPE_CONSECUTIVE_DIGITS
- return (c >= '0' && c <= '9');
-#else
- switch (c)
- {
- case '0': case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '8': case '9':
- return 1;
- default:
- return 0;
- }
-#endif
-}
-
-bool
-c_islower (int c)
-{
-#if C_CTYPE_CONSECUTIVE_LOWERCASE
- return (c >= 'a' && c <= 'z');
-#else
- switch (c)
- {
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
- case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
- case 's': case 't': case 'u': case 'v': case 'w': case 'x':
- case 'y': case 'z':
- return 1;
- default:
- return 0;
- }
-#endif
-}
-
-bool
-c_isgraph (int c)
-{
-#if C_CTYPE_ASCII
- return (c >= '!' && c <= '~');
-#else
- switch (c)
- {
- case '!': case '"': case '#': case '$': case '%': case '&':
- case '\'': case '(': case ')': case '*': case '+': case ',':
- case '-': case '.': case '/':
- case '0': case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '8': case '9':
- case ':': case ';': case '<': case '=': case '>': case '?':
- case '@':
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
- case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
- case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
- case 'Y': case 'Z':
- case '[': case '\\': case ']': case '^': case '_': case '`':
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
- case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
- case 's': case 't': case 'u': case 'v': case 'w': case 'x':
- case 'y': case 'z':
- case '{': case '|': case '}': case '~':
- return 1;
- default:
- return 0;
- }
-#endif
-}
-
-bool
-c_isprint (int c)
-{
-#if C_CTYPE_ASCII
- return (c >= ' ' && c <= '~');
-#else
- switch (c)
- {
- case ' ': case '!': case '"': case '#': case '$': case '%':
- case '&': case '\'': case '(': case ')': case '*': case '+':
- case ',': case '-': case '.': case '/':
- case '0': case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '8': case '9':
- case ':': case ';': case '<': case '=': case '>': case '?':
- case '@':
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
- case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
- case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
- case 'Y': case 'Z':
- case '[': case '\\': case ']': case '^': case '_': case '`':
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
- case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
- case 's': case 't': case 'u': case 'v': case 'w': case 'x':
- case 'y': case 'z':
- case '{': case '|': case '}': case '~':
- return 1;
- default:
- return 0;
- }
-#endif
-}
-
-bool
-c_ispunct (int c)
-{
-#if C_CTYPE_ASCII
- return ((c >= '!' && c <= '~')
- && !((c >= '0' && c <= '9')
- || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z')));
-#else
- switch (c)
- {
- case '!': case '"': case '#': case '$': case '%': case '&':
- case '\'': case '(': case ')': case '*': case '+': case ',':
- case '-': case '.': case '/':
- case ':': case ';': case '<': case '=': case '>': case '?':
- case '@':
- case '[': case '\\': case ']': case '^': case '_': case '`':
- case '{': case '|': case '}': case '~':
- return 1;
- default:
- return 0;
- }
-#endif
-}
-
-bool
-c_isspace (int c)
-{
- return (c == ' ' || c == '\t'
- || c == '\n' || c == '\v' || c == '\f' || c == '\r');
-}
-
-bool
-c_isupper (int c)
-{
-#if C_CTYPE_CONSECUTIVE_UPPERCASE
- return (c >= 'A' && c <= 'Z');
-#else
- switch (c)
- {
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
- case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
- case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
- case 'Y': case 'Z':
- return 1;
- default:
- return 0;
- }
-#endif
-}
-
-bool
-c_isxdigit (int c)
-{
-#if C_CTYPE_CONSECUTIVE_DIGITS \
- && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
-#if C_CTYPE_ASCII
- return ((c >= '0' && c <= '9')
- || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'F'));
-#else
- return ((c >= '0' && c <= '9')
- || (c >= 'A' && c <= 'F')
- || (c >= 'a' && c <= 'f'));
-#endif
-#else
- switch (c)
- {
- case '0': case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '8': case '9':
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- return 1;
- default:
- return 0;
- }
-#endif
-}
-
-int
-c_tolower (int c)
-{
-#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
- return (c >= 'A' && c <= 'Z' ? c - 'A' + 'a' : c);
-#else
- switch (c)
- {
- case 'A': return 'a';
- case 'B': return 'b';
- case 'C': return 'c';
- case 'D': return 'd';
- case 'E': return 'e';
- case 'F': return 'f';
- case 'G': return 'g';
- case 'H': return 'h';
- case 'I': return 'i';
- case 'J': return 'j';
- case 'K': return 'k';
- case 'L': return 'l';
- case 'M': return 'm';
- case 'N': return 'n';
- case 'O': return 'o';
- case 'P': return 'p';
- case 'Q': return 'q';
- case 'R': return 'r';
- case 'S': return 's';
- case 'T': return 't';
- case 'U': return 'u';
- case 'V': return 'v';
- case 'W': return 'w';
- case 'X': return 'x';
- case 'Y': return 'y';
- case 'Z': return 'z';
- default: return c;
- }
-#endif
-}
-
-int
-c_toupper (int c)
-{
-#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
- return (c >= 'a' && c <= 'z' ? c - 'a' + 'A' : c);
-#else
- switch (c)
- {
- case 'a': return 'A';
- case 'b': return 'B';
- case 'c': return 'C';
- case 'd': return 'D';
- case 'e': return 'E';
- case 'f': return 'F';
- case 'g': return 'G';
- case 'h': return 'H';
- case 'i': return 'I';
- case 'j': return 'J';
- case 'k': return 'K';
- case 'l': return 'L';
- case 'm': return 'M';
- case 'n': return 'N';
- case 'o': return 'O';
- case 'p': return 'P';
- case 'q': return 'Q';
- case 'r': return 'R';
- case 's': return 'S';
- case 't': return 'T';
- case 'u': return 'U';
- case 'v': return 'V';
- case 'w': return 'W';
- case 'x': return 'X';
- case 'y': return 'Y';
- case 'z': return 'Z';
- default: return c;
- }
-#endif
-}
<ctype.h> functions' behaviour depends on the current locale set via
setlocale.
- Copyright (C) 2000-2003, 2006, 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2000-2003, 2006, 2008-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdbool.h>
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef C_CTYPE_INLINE
+# define C_CTYPE_INLINE _GL_INLINE
+#endif
#ifdef __cplusplus
extern "C" {
characters. */
-/* Check whether the ASCII optimizations apply. */
-
-/* ANSI C89 (and ISO C99 5.2.1.3 too) already guarantees that
- '0', '1', ..., '9' have consecutive integer values. */
-#define C_CTYPE_CONSECUTIVE_DIGITS 1
-
-#if ('A' <= 'Z') \
- && ('A' + 1 == 'B') && ('B' + 1 == 'C') && ('C' + 1 == 'D') \
- && ('D' + 1 == 'E') && ('E' + 1 == 'F') && ('F' + 1 == 'G') \
- && ('G' + 1 == 'H') && ('H' + 1 == 'I') && ('I' + 1 == 'J') \
- && ('J' + 1 == 'K') && ('K' + 1 == 'L') && ('L' + 1 == 'M') \
- && ('M' + 1 == 'N') && ('N' + 1 == 'O') && ('O' + 1 == 'P') \
- && ('P' + 1 == 'Q') && ('Q' + 1 == 'R') && ('R' + 1 == 'S') \
- && ('S' + 1 == 'T') && ('T' + 1 == 'U') && ('U' + 1 == 'V') \
- && ('V' + 1 == 'W') && ('W' + 1 == 'X') && ('X' + 1 == 'Y') \
- && ('Y' + 1 == 'Z')
-#define C_CTYPE_CONSECUTIVE_UPPERCASE 1
-#endif
-
-#if ('a' <= 'z') \
- && ('a' + 1 == 'b') && ('b' + 1 == 'c') && ('c' + 1 == 'd') \
- && ('d' + 1 == 'e') && ('e' + 1 == 'f') && ('f' + 1 == 'g') \
- && ('g' + 1 == 'h') && ('h' + 1 == 'i') && ('i' + 1 == 'j') \
- && ('j' + 1 == 'k') && ('k' + 1 == 'l') && ('l' + 1 == 'm') \
- && ('m' + 1 == 'n') && ('n' + 1 == 'o') && ('o' + 1 == 'p') \
- && ('p' + 1 == 'q') && ('q' + 1 == 'r') && ('r' + 1 == 's') \
- && ('s' + 1 == 't') && ('t' + 1 == 'u') && ('u' + 1 == 'v') \
- && ('v' + 1 == 'w') && ('w' + 1 == 'x') && ('x' + 1 == 'y') \
- && ('y' + 1 == 'z')
-#define C_CTYPE_CONSECUTIVE_LOWERCASE 1
-#endif
-
#if (' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
&& (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
&& ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)
/* The character set is ASCII or one of its variants or extensions, not EBCDIC.
Testing the value of '\n' and '\r' is not relevant. */
-#define C_CTYPE_ASCII 1
+# define C_CTYPE_ASCII 1
+#elif ! (' ' == '\x40' && '0' == '\xf0' \
+ && 'A' == '\xc1' && 'J' == '\xd1' && 'S' == '\xe2' \
+ && 'a' == '\x81' && 'j' == '\x91' && 's' == '\xa2')
+# error "Only ASCII and EBCDIC are supported"
#endif
+#if 'A' < 0
+# error "EBCDIC and char is signed -- not supported"
+#endif
+
+/* Cases for control characters. */
+
+#define _C_CTYPE_CNTRL \
+ case '\a': case '\b': case '\f': case '\n': \
+ case '\r': case '\t': case '\v': \
+ _C_CTYPE_OTHER_CNTRL
+
+/* ASCII control characters other than those with \-letter escapes. */
+
+#if C_CTYPE_ASCII
+# define _C_CTYPE_OTHER_CNTRL \
+ case '\x00': case '\x01': case '\x02': case '\x03': \
+ case '\x04': case '\x05': case '\x06': case '\x0e': \
+ case '\x0f': case '\x10': case '\x11': case '\x12': \
+ case '\x13': case '\x14': case '\x15': case '\x16': \
+ case '\x17': case '\x18': case '\x19': case '\x1a': \
+ case '\x1b': case '\x1c': case '\x1d': case '\x1e': \
+ case '\x1f': case '\x7f'
+#else
+ /* Use EBCDIC code page 1047's assignments for ASCII control chars;
+ assume all EBCDIC code pages agree about these assignments. */
+# define _C_CTYPE_OTHER_CNTRL \
+ case '\x00': case '\x01': case '\x02': case '\x03': \
+ case '\x07': case '\x0e': case '\x0f': case '\x10': \
+ case '\x11': case '\x12': case '\x13': case '\x18': \
+ case '\x19': case '\x1c': case '\x1d': case '\x1e': \
+ case '\x1f': case '\x26': case '\x27': case '\x2d': \
+ case '\x2e': case '\x32': case '\x37': case '\x3c': \
+ case '\x3d': case '\x3f'
+#endif
-/* Function declarations. */
+/* Cases for lowercase hex letters, and lowercase letters, all offset by N. */
+
+#define _C_CTYPE_LOWER_A_THRU_F_N(n) \
+ case 'a' + (n): case 'b' + (n): case 'c' + (n): case 'd' + (n): \
+ case 'e' + (n): case 'f' + (n)
+#define _C_CTYPE_LOWER_N(n) \
+ _C_CTYPE_LOWER_A_THRU_F_N(n): \
+ case 'g' + (n): case 'h' + (n): case 'i' + (n): case 'j' + (n): \
+ case 'k' + (n): case 'l' + (n): case 'm' + (n): case 'n' + (n): \
+ case 'o' + (n): case 'p' + (n): case 'q' + (n): case 'r' + (n): \
+ case 's' + (n): case 't' + (n): case 'u' + (n): case 'v' + (n): \
+ case 'w' + (n): case 'x' + (n): case 'y' + (n): case 'z' + (n)
+
+/* Cases for hex letters, digits, lower, punct, and upper. */
+
+#define _C_CTYPE_A_THRU_F \
+ _C_CTYPE_LOWER_A_THRU_F_N (0): \
+ _C_CTYPE_LOWER_A_THRU_F_N ('A' - 'a')
+#define _C_CTYPE_DIGIT \
+ case '0': case '1': case '2': case '3': \
+ case '4': case '5': case '6': case '7': \
+ case '8': case '9'
+#define _C_CTYPE_LOWER _C_CTYPE_LOWER_N (0)
+#define _C_CTYPE_PUNCT \
+ case '!': case '"': case '#': case '$': \
+ case '%': case '&': case '\'': case '(': \
+ case ')': case '*': case '+': case ',': \
+ case '-': case '.': case '/': case ':': \
+ case ';': case '<': case '=': case '>': \
+ case '?': case '@': case '[': case '\\': \
+ case ']': case '^': case '_': case '`': \
+ case '{': case '|': case '}': case '~'
+#define _C_CTYPE_UPPER _C_CTYPE_LOWER_N ('A' - 'a')
+
+
+/* Function definitions. */
/* Unlike the functions in <ctype.h>, which require an argument in the range
of the 'unsigned char' type, the functions here operate on values that are
if (c_isalpha (*s)) ...
*/
-extern bool c_isascii (int c) _GL_ATTRIBUTE_CONST; /* not locale dependent */
-
-extern bool c_isalnum (int c) _GL_ATTRIBUTE_CONST;
-extern bool c_isalpha (int c) _GL_ATTRIBUTE_CONST;
-extern bool c_isblank (int c) _GL_ATTRIBUTE_CONST;
-extern bool c_iscntrl (int c) _GL_ATTRIBUTE_CONST;
-extern bool c_isdigit (int c) _GL_ATTRIBUTE_CONST;
-extern bool c_islower (int c) _GL_ATTRIBUTE_CONST;
-extern bool c_isgraph (int c) _GL_ATTRIBUTE_CONST;
-extern bool c_isprint (int c) _GL_ATTRIBUTE_CONST;
-extern bool c_ispunct (int c) _GL_ATTRIBUTE_CONST;
-extern bool c_isspace (int c) _GL_ATTRIBUTE_CONST;
-extern bool c_isupper (int c) _GL_ATTRIBUTE_CONST;
-extern bool c_isxdigit (int c) _GL_ATTRIBUTE_CONST;
-
-extern int c_tolower (int c) _GL_ATTRIBUTE_CONST;
-extern int c_toupper (int c) _GL_ATTRIBUTE_CONST;
-
-
-#if (defined __GNUC__ && !defined __STRICT_ANSI__ && defined __OPTIMIZE__ \
- && !defined __OPTIMIZE_SIZE__ && !defined NO_C_CTYPE_MACROS)
-
-/* ASCII optimizations. */
-
-#undef c_isascii
-#define c_isascii(c) \
- ({ int __c = (c); \
- (__c >= 0x00 && __c <= 0x7f); \
- })
+C_CTYPE_INLINE bool
+c_isalnum (int c)
+{
+ switch (c)
+ {
+ _C_CTYPE_DIGIT:
+ _C_CTYPE_LOWER:
+ _C_CTYPE_UPPER:
+ return true;
+ default:
+ return false;
+ }
+}
-#if C_CTYPE_CONSECUTIVE_DIGITS \
- && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
-#if C_CTYPE_ASCII
-#undef c_isalnum
-#define c_isalnum(c) \
- ({ int __c = (c); \
- ((__c >= '0' && __c <= '9') \
- || ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'Z')); \
- })
-#else
-#undef c_isalnum
-#define c_isalnum(c) \
- ({ int __c = (c); \
- ((__c >= '0' && __c <= '9') \
- || (__c >= 'A' && __c <= 'Z') \
- || (__c >= 'a' && __c <= 'z')); \
- })
-#endif
-#endif
+C_CTYPE_INLINE bool
+c_isalpha (int c)
+{
+ switch (c)
+ {
+ _C_CTYPE_LOWER:
+ _C_CTYPE_UPPER:
+ return true;
+ default:
+ return false;
+ }
+}
-#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
-#if C_CTYPE_ASCII
-#undef c_isalpha
-#define c_isalpha(c) \
- ({ int __c = (c); \
- ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'Z'); \
- })
-#else
-#undef c_isalpha
-#define c_isalpha(c) \
- ({ int __c = (c); \
- ((__c >= 'A' && __c <= 'Z') || (__c >= 'a' && __c <= 'z')); \
- })
-#endif
-#endif
+/* The function isascii is not locale dependent.
+ Its use in EBCDIC is questionable. */
+C_CTYPE_INLINE bool
+c_isascii (int c)
+{
+ switch (c)
+ {
+ case ' ':
+ _C_CTYPE_CNTRL:
+ _C_CTYPE_DIGIT:
+ _C_CTYPE_LOWER:
+ _C_CTYPE_PUNCT:
+ _C_CTYPE_UPPER:
+ return true;
+ default:
+ return false;
+ }
+}
-#undef c_isblank
-#define c_isblank(c) \
- ({ int __c = (c); \
- (__c == ' ' || __c == '\t'); \
- })
+C_CTYPE_INLINE bool
+c_isblank (int c)
+{
+ return c == ' ' || c == '\t';
+}
-#if C_CTYPE_ASCII
-#undef c_iscntrl
-#define c_iscntrl(c) \
- ({ int __c = (c); \
- ((__c & ~0x1f) == 0 || __c == 0x7f); \
- })
-#endif
+C_CTYPE_INLINE bool
+c_iscntrl (int c)
+{
+ switch (c)
+ {
+ _C_CTYPE_CNTRL:
+ return true;
+ default:
+ return false;
+ }
+}
-#if C_CTYPE_CONSECUTIVE_DIGITS
-#undef c_isdigit
-#define c_isdigit(c) \
- ({ int __c = (c); \
- (__c >= '0' && __c <= '9'); \
- })
-#endif
+C_CTYPE_INLINE bool
+c_isdigit (int c)
+{
+ switch (c)
+ {
+ _C_CTYPE_DIGIT:
+ return true;
+ default:
+ return false;
+ }
+}
-#if C_CTYPE_CONSECUTIVE_LOWERCASE
-#undef c_islower
-#define c_islower(c) \
- ({ int __c = (c); \
- (__c >= 'a' && __c <= 'z'); \
- })
-#endif
+C_CTYPE_INLINE bool
+c_isgraph (int c)
+{
+ switch (c)
+ {
+ _C_CTYPE_DIGIT:
+ _C_CTYPE_LOWER:
+ _C_CTYPE_PUNCT:
+ _C_CTYPE_UPPER:
+ return true;
+ default:
+ return false;
+ }
+}
-#if C_CTYPE_ASCII
-#undef c_isgraph
-#define c_isgraph(c) \
- ({ int __c = (c); \
- (__c >= '!' && __c <= '~'); \
- })
-#endif
+C_CTYPE_INLINE bool
+c_islower (int c)
+{
+ switch (c)
+ {
+ _C_CTYPE_LOWER:
+ return true;
+ default:
+ return false;
+ }
+}
-#if C_CTYPE_ASCII
-#undef c_isprint
-#define c_isprint(c) \
- ({ int __c = (c); \
- (__c >= ' ' && __c <= '~'); \
- })
-#endif
+C_CTYPE_INLINE bool
+c_isprint (int c)
+{
+ switch (c)
+ {
+ case ' ':
+ _C_CTYPE_DIGIT:
+ _C_CTYPE_LOWER:
+ _C_CTYPE_PUNCT:
+ _C_CTYPE_UPPER:
+ return true;
+ default:
+ return false;
+ }
+}
-#if C_CTYPE_ASCII
-#undef c_ispunct
-#define c_ispunct(c) \
- ({ int _c = (c); \
- (c_isgraph (_c) && ! c_isalnum (_c)); \
- })
-#endif
+C_CTYPE_INLINE bool
+c_ispunct (int c)
+{
+ switch (c)
+ {
+ _C_CTYPE_PUNCT:
+ return true;
+ default:
+ return false;
+ }
+}
-#undef c_isspace
-#define c_isspace(c) \
- ({ int __c = (c); \
- (__c == ' ' || __c == '\t' \
- || __c == '\n' || __c == '\v' || __c == '\f' || __c == '\r'); \
- })
-
-#if C_CTYPE_CONSECUTIVE_UPPERCASE
-#undef c_isupper
-#define c_isupper(c) \
- ({ int __c = (c); \
- (__c >= 'A' && __c <= 'Z'); \
- })
-#endif
+C_CTYPE_INLINE bool
+c_isspace (int c)
+{
+ switch (c)
+ {
+ case ' ': case '\t': case '\n': case '\v': case '\f': case '\r':
+ return true;
+ default:
+ return false;
+ }
+}
-#if C_CTYPE_CONSECUTIVE_DIGITS \
- && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
-#if C_CTYPE_ASCII
-#undef c_isxdigit
-#define c_isxdigit(c) \
- ({ int __c = (c); \
- ((__c >= '0' && __c <= '9') \
- || ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'F')); \
- })
-#else
-#undef c_isxdigit
-#define c_isxdigit(c) \
- ({ int __c = (c); \
- ((__c >= '0' && __c <= '9') \
- || (__c >= 'A' && __c <= 'F') \
- || (__c >= 'a' && __c <= 'f')); \
- })
-#endif
-#endif
+C_CTYPE_INLINE bool
+c_isupper (int c)
+{
+ switch (c)
+ {
+ _C_CTYPE_UPPER:
+ return true;
+ default:
+ return false;
+ }
+}
-#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
-#undef c_tolower
-#define c_tolower(c) \
- ({ int __c = (c); \
- (__c >= 'A' && __c <= 'Z' ? __c - 'A' + 'a' : __c); \
- })
-#undef c_toupper
-#define c_toupper(c) \
- ({ int __c = (c); \
- (__c >= 'a' && __c <= 'z' ? __c - 'a' + 'A' : __c); \
- })
-#endif
+C_CTYPE_INLINE bool
+c_isxdigit (int c)
+{
+ switch (c)
+ {
+ _C_CTYPE_DIGIT:
+ _C_CTYPE_A_THRU_F:
+ return true;
+ default:
+ return false;
+ }
+}
-#endif /* optimizing for speed */
+C_CTYPE_INLINE int
+c_tolower (int c)
+{
+ switch (c)
+ {
+ _C_CTYPE_UPPER:
+ return c - 'A' + 'a';
+ default:
+ return c;
+ }
+}
+C_CTYPE_INLINE int
+c_toupper (int c)
+{
+ switch (c)
+ {
+ _C_CTYPE_LOWER:
+ return c - 'a' + 'A';
+ default:
+ return c;
+ }
+}
#ifdef __cplusplus
}
#endif
+_GL_INLINE_HEADER_END
+
#endif /* C_CTYPE_H */
/* Stack overflow handling.
- Copyright (C) 2002, 2004, 2006, 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2006, 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "c-stack.h"
#include "exitfail.h"
#include "ignore-value.h"
+#include "getprogname.h"
#if defined SA_ONSTACK && defined SA_SIGINFO
# define SIGINFO_WORKS 1
# endif
#endif
-extern char *program_name;
-
/* The user-specified action to take when a SEGV-related program error
or stack overflow occurs. */
static void (* volatile segv_action) (int);
#endif /* !SIGINFO_WORKS && !HAVE_LIBSIGSEGV */
segv_action (signo);
message = signo ? program_error_message : stack_overflow_message;
- ignore_value (write (STDERR_FILENO, program_name, strlen (program_name)));
+ ignore_value (write (STDERR_FILENO, getprogname (), strlen (getprogname ())));
ignore_value (write (STDERR_FILENO, ": ", 2));
ignore_value (write (STDERR_FILENO, message, strlen (message)));
ignore_value (write (STDERR_FILENO, "\n", 1));
/* Stack overflow handling.
- Copyright (C) 2002, 2004, 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Case-insensitive string comparison functions in C locale.
- Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2013 Free Software
+ Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2016 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
/* c-strcasecmp.c -- case insensitive string comparator in C locale
- Copyright (C) 1998-1999, 2005-2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2005-2006, 2009-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Optimized case-insensitive string comparison in C locale.
- Copyright (C) 2001-2002, 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
# 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))
/* c-strncasecmp.c -- case insensitive string comparator in C locale
- Copyright (C) 1998-1999, 2005-2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2005-2006, 2009-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Return the canonical absolute name of a given file.
- Copyright (C) 1996-2013 Free Software Foundation, Inc.
+ Copyright (C) 1996-2016 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
# define DOUBLE_SLASH_IS_DISTINCT_ROOT 0
#endif
+/* Define this independently so that stdint.h is not a prerequisite. */
+#ifndef SIZE_MAX
+# define SIZE_MAX ((size_t) -1)
+#endif
+
#if !FUNC_REALPATH_WORKS || defined _LIBC
+
+static void
+alloc_failed (void)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* Avoid errno problem without using the malloc or realloc modules; see:
+ http://lists.gnu.org/archive/html/bug-gnulib/2016-08/msg00025.html */
+ errno = ENOMEM;
+#endif
+}
+
/* Return the canonical absolute name of file NAME. A canonical name
does not contain any ".", ".." components nor any repeated path
separators ('/') or symlinks. All path components must exist. If
rpath = malloc (path_max);
if (rpath == NULL)
{
- /* It's easier to set errno to ENOMEM than to rely on the
- 'malloc-posix' gnulib module. */
- errno = ENOMEM;
+ alloc_failed ();
return NULL;
}
}
#else
struct stat st;
#endif
- int n;
/* Skip sequence of multiple path-separators. */
while (ISSLASH (*start))
new_rpath = (char *) realloc (rpath, new_size);
if (new_rpath == NULL)
{
- /* It's easier to set errno to ENOMEM than to rely on the
- 'realloc-posix' gnulib module. */
- errno = ENOMEM;
+ alloc_failed ();
goto error;
}
rpath = new_rpath;
{
char *buf;
size_t len;
+ ssize_t n;
if (++num_links > MAXSYMLINKS)
{
buf = malloca (path_max);
if (!buf)
{
- errno = ENOMEM;
+ __set_errno (ENOMEM);
goto error;
}
{
int saved_errno = errno;
freea (buf);
- errno = saved_errno;
+ __set_errno (saved_errno);
goto error;
}
buf[n] = '\0';
if (!extra_buf)
{
freea (buf);
- errno = ENOMEM;
+ __set_errno (ENOMEM);
goto error;
}
}
len = strlen (end);
- if ((long int) (n + len) >= path_max)
+ /* Check that n + len + 1 doesn't overflow and is <= path_max. */
+ if (n >= SIZE_MAX - len || n + len >= path_max)
{
freea (buf);
__set_errno (ENAMETOOLONG);
freea (extra_buf);
if (resolved == NULL)
free (rpath);
- errno = saved_errno;
+ __set_errno (saved_errno);
}
return NULL;
}
/* Temporary directories and temporary files with automatic cleanup.
- Copyright (C) 2001, 2003, 2006-2007, 2009-2013 Free Software Foundation,
+ Copyright (C) 2001, 2003, 2006-2007, 2009-2016 Free Software Foundation,
Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
# define uintptr_t unsigned long
#endif
-#if !GNULIB_FCNTL_SAFER
-/* The results of open() in this file are not used with fchdir,
- therefore save some unnecessary work in fchdir.c. */
-# undef open
-# undef close
-#endif
-
/* The use of 'volatile' in the types below (and ISO C 99 section 5.1.2.3.(5))
ensure that while constructing or modifying the data structures, the field
/* According to
<http://msdn.microsoft.com/en-us/library/windows/desktop/ms724451(v=vs.85).aspx>
- this structure must be initialised as follows: */
+ this structure must be initialized as follows: */
v.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
if (GetVersionEx (&v))
/* Temporary directories and temporary files with automatic cleanup.
- Copyright (C) 2006, 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2011-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
/* closexec.c - set or clear the close-on-exec descriptor flag
- Copyright (C) 1991, 2004-2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 1991, 2004-2006, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* closexec.c - set or clear the close-on-exec descriptor flag
- Copyright (C) 2004, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Close a stream, with nicer error checking than fclose's.
- Copyright (C) 1998-2002, 2004, 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 1998-2002, 2004, 2006-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* close replacement.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Close standard input, rewinding seekable stdin if necessary.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Close standard input, rewinding seekable stdin if necessary.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Close standard output and standard error, exiting with a diagnostic on error.
- Copyright (C) 1998-2002, 2004, 2006, 2008-2013 Free Software Foundation,
+ Copyright (C) 1998-2002, 2004, 2006, 2008-2016 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
/* Close standard output and standard error.
- Copyright (C) 1998, 2000, 2003-2004, 2006, 2008-2013 Free Software
+ Copyright (C) 1998, 2000, 2003-2004, 2006, 2008-2016 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
#! /bin/sh
# Output a system dependent table of character encoding aliases.
#
-# Copyright (C) 2000-2004, 2006-2013 Free Software Foundation, Inc.
+# Copyright (C) 2000-2004, 2006-2016 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#echo "sun_eu_greek ?" # what is this?
echo "UTF-8 UTF-8"
;;
- freebsd* | os2*)
+ freebsd*)
# FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
# localcharset.c falls back to using the full locale name
# from the environment variables.
- # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just
- # reuse FreeBSD's locale data for OS/2.
echo "C ASCII"
echo "US-ASCII ASCII"
for l in la_LN lt_LN; do
/* Define to 1 if using `alloca.c'. */
#undef C_ALLOCA
+/* Define to 1 if the C locale may have encoding errors. */
+#undef C_LOCALE_MAYBE_EILSEQ
+
/* Define as the bit index in the word where to find bit 0 of the exponent of
'double'. */
#undef DBL_EXPBIT0_BIT
/* Define as the word index where to find the sign of 'double'. */
#undef DBL_SIGNBIT_WORD
+/* the name of the file descriptor member of DIR */
+#undef DIR_FD_MEMBER_NAME
+
+#ifdef DIR_FD_MEMBER_NAME
+# define DIR_TO_FD(Dir_p) ((Dir_p)->DIR_FD_MEMBER_NAME)
+#else
+# define DIR_TO_FD(Dir_p) -1
+#endif
+
+
/* Define to 1 if // is a file system root distinct from /. */
#undef DOUBLE_SLASH_IS_DISTINCT_ROOT
/* Define this to 1 if F_DUPFD behavior does not match POSIX */
#undef FCNTL_DUPFD_BUGGY
+/* Define to nothing if C supports flexible array members, and to 1 if it does
+ not. That way, with a declaration like 'struct s { int n; double
+ d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99
+ compilers. When computing the size of such an object, don't use 'sizeof
+ (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)'
+ instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with
+ MSVC and with C++ compilers. */
+#undef FLEXIBLE_ARRAY_MEMBER
+
/* Define as the bit index in the word where to find bit 0 of the exponent of
'float'. */
#undef FLT_EXPBIT0_BIT
#undef GNULIB_LOCK
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
- whether the gnulib module malloc-gnu shall be considered present. */
-#undef GNULIB_MALLOC_GNU
-
-/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
whether the gnulib module pipe2-safer shall be considered present. */
#undef GNULIB_PIPE2_SAFER
+/* Define to 1 if printf and friends should be labeled with attribute
+ "__gnu_printf__" instead of "__printf__" */
+#undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU
+
/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
whether the gnulib module scanf shall be considered present. */
#undef GNULIB_SCANF
/* Define to 1 when the gnulib module closedir should be tested. */
#undef GNULIB_TEST_CLOSEDIR
+/* Define to 1 when the gnulib module dirfd should be tested. */
+#undef GNULIB_TEST_DIRFD
+
/* Define to 1 when the gnulib module dup should be tested. */
#undef GNULIB_TEST_DUP
/* Define to 1 when the gnulib module getdtablesize should be tested. */
#undef GNULIB_TEST_GETDTABLESIZE
-/* Define to 1 when the gnulib module getopt-gnu should be tested. */
-#undef GNULIB_TEST_GETOPT_GNU
-
/* Define to 1 when the gnulib module getpagesize should be tested. */
#undef GNULIB_TEST_GETPAGESIZE
don't. */
#undef HAVE_DECL_COPYSIGNL
+/* Define to 1 if you have the declaration of `dirfd', and to 0 if you don't.
+ */
+#undef HAVE_DECL_DIRFD
+
/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
don't. */
#undef HAVE_DECL_FEOF_UNLOCKED
don't. */
#undef HAVE_DECL_GETC_UNLOCKED
+/* Define to 1 if you have the declaration of `getdtablesize', and to 0 if you
+ don't. */
+#undef HAVE_DECL_GETDTABLESIZE
+
/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
*/
#undef HAVE_DECL_GETENV
don't. */
#undef HAVE_DECL__SYS_SIGLIST
+/* Define to 1 if you have the declaration of `__argv', and to 0 if you don't.
+ */
+#undef HAVE_DECL___ARGV
+
+/* 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 `dirfd' function. */
+#undef HAVE_DIRFD
+
/* Define to 1 if you have the 'dup2' function. */
#undef HAVE_DUP2
/* Define to 1 if you have the `getdtablesize' function. */
#undef HAVE_GETDTABLESIZE
+/* Define to 1 if you have the `getegid' function. */
+#undef HAVE_GETEGID
+
+/* Define to 1 if you have the `geteuid' function. */
+#undef HAVE_GETEUID
+
+/* Define to 1 if you have the `getexecname' function. */
+#undef HAVE_GETEXECNAME
+
+/* Define to 1 if you have the `getgid' function. */
+#undef HAVE_GETGID
+
+/* Define to 1 if you have the `getlocalename_l' function. */
+#undef HAVE_GETLOCALENAME_L
+
/* Define to 1 if you have the <getopt.h> header file. */
#undef HAVE_GETOPT_H
/* Define to 1 if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE
+/* Define to 1 if you have the `getprogname' function. */
+#undef HAVE_GETPROGNAME
+
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
+/* Define to 1 if you have the `getuid' function. */
+#undef HAVE_GETUID
+
/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
#undef HAVE_INTMAX_T
/* Define if you have the libsigsegv library. */
#undef HAVE_LIBSIGSEGV
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
/* Define to 1 if you have the `link' function. */
#undef HAVE_LINK
/* Define to 1 if you have the `lstat' function. */
#undef HAVE_LSTAT
-/* Define to 1 if your system has a GNU libc compatible 'malloc' function, and
- to 0 otherwise. */
-#undef HAVE_MALLOC_GNU
+/* Define to 1 if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
/* Define if the 'malloc' function is POSIX compliant. */
#undef HAVE_MALLOC_POSIX
/* Define to 1 if you have the `mempcpy' function. */
#undef HAVE_MEMPCPY
+/* Define to 1 if <limits.h> defines the MIN and MAX macros. */
+#undef HAVE_MINMAX_IN_LIMITS_H
+
+/* Define to 1 if <sys/param.h> defines the MIN and MAX macros. */
+#undef HAVE_MINMAX_IN_SYS_PARAM_H
+
/* Define to 1 if you have the `mkdtemp' function. */
#undef HAVE_MKDTEMP
/* Define to 1 if you have the `nl_langinfo' function. */
#undef HAVE_NL_LANGINFO
-/* Define to 1 if libc includes obstacks. */
+/* Define to 1 if the system has obstacks that work with any size object. */
#undef HAVE_OBSTACK
/* Define to 1 if you have the `opendir' function. */
/* Define to 1 if you have the `secure_getenv' function. */
#undef HAVE_SECURE_GETENV
+/* Define to 1 if you have the `setdtablesize' function. */
+#undef HAVE_SETDTABLESIZE
+
/* Define to 1 if you have the `setegid' function. */
#undef HAVE_SETEGID
/* Define to 1 if you have the <sys/bitypes.h> header file. */
#undef HAVE_SYS_BITYPES_H
+/* Define to 1 if you have the <sys/cdefs.h> header file. */
+#undef HAVE_SYS_CDEFS_H
+
/* Define to 1 if you have the <sys/inttypes.h> header file. */
#undef HAVE_SYS_INTTYPES_H
/* Define to 1 if you have the `uselocale' function. */
#undef HAVE_USELOCALE
+/* Define if you have a global __progname variable */
+#undef HAVE_VAR___PROGNAME
+
/* Define to 1 if you have the `vasnprintf' function. */
#undef HAVE_VASNPRINTF
/* Define to 1 if you have the `wcrtomb' function. */
#undef HAVE_WCRTOMB
-/* Define to 1 if you have the `wcscoll' function. */
-#undef HAVE_WCSCOLL
-
/* Define to 1 if you have the `wcslen' function. */
#undef HAVE_WCSLEN
/* Define to 1 if you have the `_set_invalid_parameter_handler' function. */
#undef HAVE__SET_INVALID_PARAMETER_HANDLER
+/* Define to 1 if the compiler supports __builtin_expect,
+ and to 2 if <builtins.h> does. */
+#undef HAVE___BUILTIN_EXPECT
+#ifndef HAVE___BUILTIN_EXPECT
+# define __builtin_expect(e, c) (e)
+#elif HAVE___BUILTIN_EXPECT == 2
+# include <builtins.h>
+#endif
+
+
/* Define to 1 if you have the `__fpurge' function. */
#undef HAVE___FPURGE
/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */
#undef MAP_ANONYMOUS
+/* Define if the mbrtowc function does not return (size_t) -2 for empty input.
+ */
+#undef MBRTOWC_EMPTY_INPUT_BUG
+
/* Define if the mbrtowc function has the NULL pwc argument bug. */
#undef MBRTOWC_NULL_ARG1_BUG
/* Define if the mbrtowc function returns a wrong return value. */
#undef MBRTOWC_RETVAL_BUG
+/* Use GNU style printf and scanf. */
+#ifndef __USE_MINGW_ANSI_STDIO
+# undef __USE_MINGW_ANSI_STDIO
+#endif
+
+
/* Define to 1 if assertions should be disabled. */
#undef NDEBUG
/* Define to the version of this package. */
#undef PACKAGE_VERSION
-/* 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
such as on Solaris 9 or cygwin 1.5. */
#undef RENAME_TRAILING_SLASH_SOURCE_BUG
+/* Define to 1 if gnulib's dirfd() replacement is used. */
+#undef REPLACE_DIRFD
+
/* Define to 1 if stat needs help when passed a directory name with a trailing
slash */
#undef REPLACE_FUNC_STAT_DIR
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
-/* Enable general extensions on OS X. */
+/* Enable general extensions on macOS. */
#ifndef _DARWIN_C_SOURCE
# undef _DARWIN_C_SOURCE
#endif
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
+/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
+#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+# undef __STDC_WANT_IEC_60559_BFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
+#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
+# undef __STDC_WANT_IEC_60559_DFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
+#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
+# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
+#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
+# undef __STDC_WANT_IEC_60559_TYPES_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
+#ifndef __STDC_WANT_LIB_EXT2__
+# undef __STDC_WANT_LIB_EXT2__
+#endif
+/* Enable extensions specified by ISO/IEC 24747:2009. */
+#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
+# undef __STDC_WANT_MATH_SPEC_FUNCS__
+#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
used. */
#undef __GETOPT_PREFIX
+/* Define to 1 if the system <stdint.h> predates C++11. */
+#undef __STDC_CONSTANT_MACROS
+
+/* Define to 1 if the system <stdint.h> predates C++11. */
+#undef __STDC_LIMIT_MACROS
+
/* 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
'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
+ Suppress extern inline (with or without __attribute__ ((__gnu_inline__)))
+ on configurations that mistakenly use 'static inline' to implement
+ functions or macros in standard C headers like <ctype.h>. For example,
+ if isdigit is mistakenly implemented via a static inline function,
+ a program containing an extern inline function that calls isdigit
+ may not work since the C standard prohibits extern inline functions
+ from calling static functions. This bug is known to occur on:
+
+ OS X 10.8 and earlier; see:
+ http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html
+
+ DragonFly; see
+ http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log
+
+ FreeBSD; see:
+ http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html
+
+ OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and
+ for clang but remains for g++; see <http://trac.macports.org/ticket/41033>.
+ Assume DragonFly and FreeBSD will be similar. */
+#if (((defined __APPLE__ && defined __MACH__) \
+ || defined __DragonFly__ || defined __FreeBSD__) \
+ && (defined __header_inline \
+ ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \
+ && ! defined __clang__) \
+ : ((! defined _DONT_USE_CTYPE_INLINE_ \
+ && (defined __GNUC__ || defined __cplusplus)) \
+ || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
+ && defined __GNUC__ && ! defined __cplusplus))))
+# define _GL_EXTERN_INLINE_STDHEADER_BUG
#endif
#if ((__GNUC__ \
? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
: (199901L <= __STDC_VERSION__ \
&& !defined __HP_cc \
+ && !defined __PGI \
&& !(defined __SUNPRO_C && __STDC__))) \
- && !defined _GL_EXTERN_INLINE_APPLE_BUG)
+ && !defined _GL_EXTERN_INLINE_STDHEADER_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__
+ && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
+# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__
/* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
# else
# define _GL_EXTERN_INLINE static _GL_UNUSED
#endif
-#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
+/* In GCC 4.6 (inclusive) to 5.1 (exclusive),
+ suppress bogus "no previous prototype for 'FOO'"
+ and "no previous declaration for 'FOO'" diagnostics,
+ when FOO is an inline function in the header; see
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113> and
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63877>. */
+#if __GNUC__ == 4 && 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\"") \
/* A replacement for va_copy, if needed. */
#define gl_va_copy(a,b) ((a) = (b))
-/* Define to rpl_gmtime if the replacement function should be used. */
-#undef gmtime
-
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
# define __GNUC_STDC_INLINE__ 1
#endif
-/* Define to rpl_localtime if the replacement function should be used. */
-#undef localtime
-
/* Define to a type if <wchar.h> does not define. */
#undef mbstate_t
is a misnomer outside of parameter lists. */
#define _UNUSED_PARAMETER_ _GL_UNUSED
+/* gcc supports the "unused" attribute on possibly unused labels, and
+ g++ has since version 4.5. Note to support C++ as well as C,
+ _GL_UNUSED_LABEL should be used with a trailing ; */
+#if !defined __cplusplus || __GNUC__ > 4 \
+ || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
+# define _GL_UNUSED_LABEL _GL_UNUSED
+#else
+# define _GL_UNUSED_LABEL
+#endif
+
/* The __pure__ attribute was added in gcc 2.96. */
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
/* dirname.c -- return all but the last element in a file name
- Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2013 Free Software
+ Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2016 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
/* dirname.c -- return all but the last element in a file name
- Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2013 Free Software
+ Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2016 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
/* Take file names apart into directory and base names.
- Copyright (C) 1998, 2001, 2003-2006, 2009-2013 Free Software Foundation,
+ Copyright (C) 1998, 2001, 2003-2006, 2009-2016 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
# define DOUBLE_SLASH_IS_DISTINCT_ROOT 0
# endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
# if GNULIB_DIRNAME
char *base_name (char const *file);
char *dir_name (char const *file);
bool strip_trailing_slashes (char *file);
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
#endif /* not DIRNAME_H_ */
/* File names on MS-DOS/Windows systems.
- Copyright (C) 2000-2001, 2004-2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2000-2001, 2004-2006, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Duplicate a file descriptor result, avoiding clobbering
STD{IN,OUT,ERR}_FILENO, with specific flags.
- Copyright (C) 2001, 2004-2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2004-2006, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Invoke dup, but avoid some glitches.
- Copyright (C) 2001, 2004-2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2004-2006, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Duplicate an open file descriptor to a specified file descriptor.
- Copyright (C) 1999, 2004-2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2004-2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# define dup2 ms_windows_dup2
+# elif defined __KLIBC__
+
+# include <InnoTekLIBC/backend.h>
+
+static int
+klibc_dup2dirfd (int fd, int desired_fd)
+{
+ int tempfd;
+ int dupfd;
+
+ tempfd = open ("NUL", O_RDONLY);
+ if (tempfd == -1)
+ return -1;
+
+ if (tempfd == desired_fd)
+ {
+ close (tempfd);
+
+ char path[_MAX_PATH];
+ if (__libc_Back_ioFHToPath (fd, path, sizeof (path)))
+ return -1;
+
+ return open(path, O_RDONLY);
+ }
+
+ dupfd = klibc_dup2dirfd (fd, desired_fd);
+
+ close (tempfd);
+
+ return dupfd;
+}
+
+static int
+klibc_dup2 (int fd, int desired_fd)
+{
+ int dupfd;
+ struct stat sbuf;
+
+ dupfd = dup2 (fd, desired_fd);
+ if (dupfd == -1 && errno == ENOTSUP \
+ && !fstat (fd, &sbuf) && S_ISDIR (sbuf.st_mode))
+ {
+ close (desired_fd);
+
+ return klibc_dup2dirfd (fd, desired_fd);
+ }
+
+ return dupfd;
+}
+
+# define dup2 klibc_dup2
# endif
int
/* On Linux kernels 2.6.26-2.6.29, dup2 (fd, fd) returns -EBADF.
On Cygwin 1.5.x, dup2 (1, 1) returns 0.
On Cygwin 1.7.17, dup2 (1, -1) dumps core.
+ On Cygwin 1.7.25, dup2 (1, 256) can dump core.
On Haiku, dup2 (fd, fd) mistakenly clears FD_CLOEXEC. */
+# if HAVE_SETDTABLESIZE
+ setdtablesize (desired_fd + 1);
+# endif
if (desired_fd < 0)
fd = desired_fd;
if (fd == desired_fd)
/* A POSIX-like <errno.h>.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Error handler for noninteractive utilities
- Copyright (C) 1990-1998, 2000-2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 1990-1998, 2000-2007, 2009-2016 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
# include <stdint.h>
# include <wchar.h>
# define mbsrtowcs __mbsrtowcs
+# define USE_UNLOCKED_IO 0
+# define _GL_ATTRIBUTE_FORMAT_PRINTF(a, b)
+# define _GL_ARG_NONNULL(a)
+#else
+# include "getprogname.h"
#endif
#if USE_UNLOCKED_IO
extern void __error_at_line (int status, int errnum, const char *file_name,
unsigned int line_number, const char *message,
...)
- __attribute__ ((__format__ (__printf__, 5, 6)));;
+ __attribute__ ((__format__ (__printf__, 5, 6)));
# define error __error
# define error_at_line __error_at_line
# include <libio/iolibio.h>
-# define fflush(s) INTUSE(_IO_fflush) (s)
+# define fflush(s) _IO_fflush (s)
# undef putc
-# define putc(c, fp) INTUSE(_IO_putc) (c, fp)
+# define putc(c, fp) _IO_putc (c, fp)
# include <bits/libc-lock.h>
# endif
# endif
-/* The calling program should define program_name and set it to the
- name of the executing program. */
-extern char *program_name;
+#define program_name getprogname ()
# if HAVE_STRERROR_R || defined strerror_r
# define __strerror_r strerror_r
#if defined HAVE_STRERROR_R || _LIBC
char errbuf[1024];
-# if STRERROR_R_CHAR_P || _LIBC
+# if _LIBC || STRERROR_R_CHAR_P
s = __strerror_r (errnum, errbuf, sizeof errbuf);
# else
if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0)
#endif
}
-static void
+static void _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) _GL_ARG_NONNULL ((3))
error_tail (int status, int errnum, const char *message, va_list args)
{
#if _LIBC
if (_IO_fwide (stderr, 0) > 0)
{
-# define ALLOCA_LIMIT 2000
size_t len = strlen (message) + 1;
wchar_t *wmessage = NULL;
mbstate_t st;
if (res != len)
break;
- if (__builtin_expect (len >= SIZE_MAX / 2, 0))
+ if (__builtin_expect (len >= SIZE_MAX / sizeof (wchar_t) / 2, 0))
{
/* This really should not happen if everything is fine. */
res = (size_t) -1;
if (old_line_number == line_number
&& (file_name == old_file_name
- || strcmp (old_file_name, file_name) == 0))
+ || (old_file_name != NULL
+ && file_name != NULL
+ && strcmp (old_file_name, file_name) == 0)))
+
/* Simply return and print nothing. */
return;
}
#if _LIBC
- __fxprintf (NULL, file_name != NULL ? "%s:%d: " : " ",
+ __fxprintf (NULL, file_name != NULL ? "%s:%u: " : " ",
file_name, line_number);
#else
- fprintf (stderr, file_name != NULL ? "%s:%d: " : " ",
+ fprintf (stderr, file_name != NULL ? "%s:%u: " : " ",
file_name, line_number);
#endif
/* Declaration for error-reporting function
- Copyright (C) 1995-1997, 2003, 2006, 2008-2013 Free Software Foundation,
+ Copyright (C) 1995-1997, 2003, 2006, 2008-2016 Free Software Foundation,
Inc.
This file is part of the GNU C Library.
# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
#endif
+/* On mingw, the flavor of printf depends on whether the extensions module
+ * is in use; the check for <stdio.h> determines the witness macro. */
+#ifndef _GL_ATTRIBUTE_SPEC_PRINTF
+# if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU
+# define _GL_ATTRIBUTE_SPEC_PRINTF __gnu_printf__
+# else
+# define _GL_ATTRIBUTE_SPEC_PRINTF __printf__
+# endif
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
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));
+ _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF, 3, 4));
extern void error_at_line (int __status, int __errnum, const char *__fname,
unsigned int __lineno, const char *__format, ...)
- _GL_ATTRIBUTE_FORMAT ((__printf__, 5, 6));
+ _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF, 5, 6));
/* If NULL, error will flush stdout, then print on stderr the program
name, a colon and a space. Otherwise, error will call this
/* Creation of autonomous subprocesses.
- Copyright (C) 2001-2004, 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006-2016 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
#endif
-/* The results of open() in this file are not used with fchdir,
- therefore save some unnecessary work in fchdir.c. */
-#undef open
-#undef close
-
#if defined EINTR && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
/* Creation of autonomous subprocesses.
- Copyright (C) 2001-2003, 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2008-2016 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
/* Failure exit status
- Copyright (C) 2002-2003, 2005-2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Failure exit status
- Copyright (C) 2002, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Emergency actions in case of a fatal signal.
- Copyright (C) 2003-2004, 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 2003-2004, 2006-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
/* Emergency actions in case of a fatal signal.
- Copyright (C) 2003-2004, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2003-2004, 2009-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
/* fclose replacement.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Provide file descriptor control.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
inherit, /* InheritHandle */
DUPLICATE_SAME_ACCESS)) /* Options */
{
- /* TODO: Translate GetLastError () into errno. */
- errno = EMFILE;
+ switch (GetLastError ())
+ {
+ case ERROR_TOO_MANY_OPEN_FILES:
+ errno = EMFILE;
+ break;
+ case ERROR_INVALID_HANDLE:
+ case ERROR_INVALID_TARGET_HANDLE:
+ case ERROR_DIRECT_ACCESS_HANDLE:
+ errno = EBADF;
+ break;
+ case ERROR_INVALID_PARAMETER:
+ case ERROR_INVALID_FUNCTION:
+ case ERROR_INVALID_ACCESS:
+ errno = EINVAL;
+ break;
+ default:
+ errno = EACCES;
+ break;
+ }
result = -1;
break;
}
if (duplicated_fd < 0)
{
CloseHandle (new_handle);
- errno = EMFILE;
result = -1;
break;
}
}
#endif /* W32 */
+#ifdef __KLIBC__
+
+# define INCL_DOS
+# include <os2.h>
+
+static int
+klibc_fcntl (int fd, int action, /* arg */...)
+{
+ va_list arg_ptr;
+ int arg;
+ struct stat sbuf;
+ int result = -1;
+
+ va_start (arg_ptr, action);
+ arg = va_arg (arg_ptr, int);
+ result = fcntl (fd, action, arg);
+ /* EPERM for F_DUPFD, ENOTSUP for others */
+ if (result == -1 && (errno == EPERM || errno == ENOTSUP)
+ && !fstat (fd, &sbuf) && S_ISDIR (sbuf.st_mode))
+ {
+ ULONG ulMode;
+
+ switch (action)
+ {
+ case F_DUPFD:
+ /* Find available fd */
+ while (fcntl (arg, F_GETFL) != -1 || errno != EBADF)
+ arg++;
+
+ result = dup2 (fd, arg);
+ break;
+
+ /* Using underlying APIs is right ? */
+ case F_GETFD:
+ if (DosQueryFHState (fd, &ulMode))
+ break;
+
+ result = (ulMode & OPEN_FLAGS_NOINHERIT) ? FD_CLOEXEC : 0;
+ break;
+
+ case F_SETFD:
+ if (arg & ~FD_CLOEXEC)
+ break;
+
+ if (DosQueryFHState (fd, &ulMode))
+ break;
+
+ if (arg & FD_CLOEXEC)
+ ulMode |= OPEN_FLAGS_NOINHERIT;
+ else
+ ulMode &= ~OPEN_FLAGS_NOINHERIT;
+
+ /* Filter supported flags. */
+ ulMode &= (OPEN_FLAGS_WRITE_THROUGH | OPEN_FLAGS_FAIL_ON_ERROR
+ | OPEN_FLAGS_NO_CACHE | OPEN_FLAGS_NOINHERIT);
+
+ if (DosSetFHState (fd, ulMode))
+ break;
+
+ result = 0;
+ break;
+
+ case F_GETFL:
+ result = 0;
+ break;
+
+ case F_SETFL:
+ if (arg != 0)
+ break;
+
+ result = 0;
+ break;
+
+ default :
+ errno = EINVAL;
+ break;
+ }
+ }
+
+ va_end (arg_ptr);
+
+ return result;
+}
+
+# define fcntl klibc_fcntl
+#endif
+
/* Perform the specified ACTION on the file descriptor FD, possibly
using the argument ARG further described below. This replacement
handles the following actions, and forwards all others on to the
/* Like <fcntl.h>, but with non-working flags defined to 0.
- Copyright (C) 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
extern "C" { ... } block, which leads to errors in C++ mode with the
overridden <sys/stat.h> from gnulib. These errors are known to be gone
with g++ version >= 4.3. */
-#if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
+#if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && (defined __ICC || !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))))
# include <sys/stat.h>
#endif
#@INCLUDE_NEXT@ @NEXT_FCNTL_H@
extern "C" { ... } block, which leads to errors in C++ mode with the
overridden <sys/stat.h> from gnulib. These errors are known to be gone
with g++ version >= 4.3. */
-#if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
+#if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && (defined __ICC || !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))))
# include <sys/stat.h>
#endif
/* The include_next requires a split double-inclusion guard. */
/* Fix up the O_* macros. */
+/* AIX 7.1 with XL C 12.1 defines O_CLOEXEC, O_NOFOLLOW, and O_TTY_INIT
+ to values outside 'int' range, so omit these misdefinitions.
+ But avoid namespace pollution on non-AIX systems. */
+#ifdef _AIX
+# include <limits.h>
+# if defined O_CLOEXEC && ! (INT_MIN <= O_CLOEXEC && O_CLOEXEC <= INT_MAX)
+# undef O_CLOEXEC
+# endif
+# if defined O_NOFOLLOW && ! (INT_MIN <= O_NOFOLLOW && O_NOFOLLOW <= INT_MAX)
+# undef O_NOFOLLOW
+# endif
+# if defined O_TTY_INIT && ! (INT_MIN <= O_TTY_INIT && O_TTY_INIT <= INT_MAX)
+# undef O_TTY_INIT
+# endif
+#endif
+
#if !defined O_DIRECT && defined O_DIRECTIO
/* Tru64 spells it 'O_DIRECTIO'. */
# define O_DIRECT O_DIRECTIO
/* Hook for making making file descriptor functions close(), ioctl() extensible.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 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
/* Hook for making making file descriptor functions close(), ioctl() extensible.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
/* Adjust a file descriptor result so that it avoids clobbering
STD{IN,OUT,ERR}_FILENO, with specific flags.
- Copyright (C) 2005-2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Return a safer copy of a file descriptor.
- Copyright (C) 2005-2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* fflush.c -- allow flushing input streams
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
static void
clear_ungetc_buffer (FILE *fp)
{
-# if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
+# if defined __sferror || defined __DragonFly__ || defined __ANDROID__
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
if (HASUB (fp))
{
fp_->_p += fp_->_r;
fp->_ungetc_count = 0;
fp->_rcount = - fp->_rcount;
}
-# elif defined _IOERR /* Minix, AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */
+# elif defined _IOERR /* Minix, AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */
/* Nothing to do. */
# else /* other implementations */
fseeko (fp, 0, SEEK_CUR);
#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 */
+# if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT
+/* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
static int
disable_seek_optimization (FILE *fp)
update_fpos_cache (FILE *fp _GL_UNUSED_PARAMETER,
off_t pos _GL_UNUSED_PARAMETER)
{
-# if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
+# if defined __sferror || defined __DragonFly__ || defined __ANDROID__
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
# if defined __CYGWIN__
/* fp_->_offset is typed as an integer. */
fp_->_offset = pos;
return result;
}
-# if (defined __sferror || defined __DragonFly__) && defined __SNPT /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
+# if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
{
/* Disable seek optimization for the next fseeko call. This tells the
/* Concatenate two arbitrary file names.
- Copyright (C) 1996-2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 1996-2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Concatenate two arbitrary file names.
- Copyright (C) 1996-2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 1996-2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Concatenate two arbitrary file names.
- Copyright (C) 1996-1997, 2003, 2005, 2007, 2009-2013 Free Software
+ Copyright (C) 1996-1997, 2003, 2005, 2007, 2009-2016 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
/* Supplemental information about the floating-point formats.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software; you can redistribute it and/or modify
/* Auxiliary definitions for <float.h>.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
/* A correct <float.h>.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Invoke fopen, but avoid some glitches.
- Copyright (C) 2001, 2004-2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2004-2006, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Open a stream to a file.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* fpending.c -- return the number of pending output bytes on a stream
- Copyright (C) 2000, 2004, 2006-2007, 2009-2013 Free Software Foundation,
+ Copyright (C) 2000, 2004, 2006-2007, 2009-2016 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
#include <config.h>
+/* Specification. */
#include "fpending.h"
+#include "stdio-impl.h"
+
/* Return the number of pending (aka buffered, unflushed)
bytes on the stream, FP, that is open for writing. */
size_t
__fpending (FILE *fp)
{
- return PENDING_OUTPUT_N_BYTES;
+ /* Most systems provide FILE as a struct and the necessary bitmask in
+ <stdio.h>, because they need it for implementing getc() and putc() as
+ fast macros. */
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+ return fp->_IO_write_ptr - fp->_IO_write_base;
+#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
+ return fp->_p - fp->_bf._base;
+#elif defined __EMX__ /* emx+gcc */
+ return fp->_ptr - fp->_buffer;
+#elif defined __minix /* Minix */
+ return fp_->_ptr - fp_->_buf;
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */
+ return (fp_->_ptr ? fp_->_ptr - fp_->_base : 0);
+#elif defined __UCLIBC__ /* uClibc */
+ return (fp->__modeflags & __FLAG_WRITING ? fp->__bufpos - fp->__bufstart : 0);
+#elif defined __QNX__ /* QNX */
+ return (fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0);
+#elif defined __MINT__ /* Atari FreeMiNT */
+ return fp->__bufp - fp->__buffer;
+#elif defined EPLAN9 /* Plan9 */
+ return fp->wp - fp->buf;
+#elif defined __VMS /* VMS */
+ return (*fp)->_ptr - (*fp)->_base;
+#else
+# error "Please port gnulib fpending.c to your platform!"
+ return 1;
+#endif
}
/* Declare __fpending.
- Copyright (C) 2000, 2003, 2005-2006, 2009-2013 Free Software Foundation,
+ Copyright (C) 2000, 2003, 2005-2006, 2009-2016 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
# include <stdio_ext.h>
#endif
-#ifndef __fpending
-size_t __fpending (FILE *);
+#if !HAVE_DECL___FPENDING
+size_t __fpending (FILE *) _GL_ATTRIBUTE_PURE;
#endif
-/* Manipulating the FPU control word.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+/* Manipulating the FPU control word. -*- coding: utf-8 -*-
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify
/* Flushing buffers of a FILE stream.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
extern int fpurge (FILE *);
# endif
int result = fpurge (fp);
-# if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
+# if defined __sferror || defined __DragonFly__ || defined __ANDROID__
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
if (result == 0)
/* Correct the invariants that fpurge broke.
<stdio.h> on BSD systems says:
fp->_IO_save_base = NULL;
}
return 0;
-# elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
+# elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
fp_->_p = fp_->_bf._base;
fp_->_r = 0;
fp_->_w = ((fp_->_flags & (__SLBF | __SNBF | __SRD)) == 0 /* fully buffered and not currently reading? */
if (fp->_ptr != NULL)
fp->_count = 0;
return 0;
-# elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */
- fp->_ptr = fp->_base;
- if (fp->_ptr != NULL)
- fp->_cnt = 0;
+# elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */
+ fp_->_ptr = fp_->_base;
+ if (fp_->_ptr != NULL)
+ fp_->_cnt = 0;
return 0;
# elif defined __UCLIBC__ /* uClibc */
# ifdef __STDIO_BUFFERS
/* Retrieve information about a FILE stream.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
return (fp->_IO_read_end - fp->_IO_read_ptr)
+ (fp->_flags & _IO_IN_BACKUP ? fp->_IO_save_end - fp->_IO_save_base :
0);
-#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
+#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
if ((fp_->_flags & __SWR) != 0 || fp_->_r < 0)
return 0;
# if defined __DragonFly__
if ((fp_->_flags & _IOWRITING) != 0)
return 0;
return fp_->_count;
-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */
if ((fp_->_flag & _IOWRT) != 0)
return 0;
return fp_->_cnt;
/* Retrieve information about a FILE stream.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Retrieve information about a FILE stream.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
return ((fp->_flags & _IO_NO_WRITES) != 0
|| ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
&& fp->_IO_read_base != NULL));
-# elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
+# elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
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 */
+# elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */
# if defined __sun /* Solaris */
- return (fp->_flag & _IOREAD) != 0 && (fp->_flag & _IOWRT) == 0;
+ return (fp_->_flag & _IOREAD) != 0 && (fp_->_flag & _IOWRT) == 0;
# else
- return (fp->_flag & _IOREAD) != 0;
+ return (fp_->_flag & _IOREAD) != 0;
# endif
# elif defined __UCLIBC__ /* uClibc */
return (fp->__modeflags & (__FLAG_READONLY | __FLAG_READING)) != 0;
/* Retrieve information about a FILE stream.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
extern "C" {
# endif
-extern bool freading (FILE *stream);
+extern bool freading (FILE *stream) _GL_ATTRIBUTE_PURE;
# ifdef __cplusplus
}
/* Split a double into fraction and mantissa.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Split a 'long double' into fraction and mantissa.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* An fseek() function that, together with fflush(), is POSIX compliant.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* An fseeko() function that, together with fflush(), is POSIX compliant.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
if (fp->_IO_read_end == fp->_IO_read_ptr
&& fp->_IO_write_ptr == fp->_IO_write_base
&& fp->_IO_save_base == NULL)
-#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
+#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
# if defined __SL64 && defined __SCLE /* Cygwin */
if ((fp->_flags & __SL64) == 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 */
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */
if (fp_->_ptr == fp_->_base
&& (fp_->_ptr == NULL || fp_->_cnt == 0))
#elif defined __UCLIBC__ /* uClibc */
off_t pos = lseek (fileno (fp), offset, whence);
if (pos == -1)
{
-#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
+#if defined __sferror || defined __DragonFly__ || defined __ANDROID__
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
fp_->_flags &= ~__SOFF;
#endif
return -1;
#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
fp->_flags &= ~_IO_EOF_SEEN;
fp->_offset = pos;
-#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
-# if defined __CYGWIN__
+#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
+# if defined __CYGWIN__ || (defined __NetBSD__ && __NetBSD_Version__ >= 600000000)
/* fp_->_offset is typed as an integer. */
fp_->_offset = pos;
# else
fp_->_flags &= ~__SEOF;
#elif defined __EMX__ /* emx+gcc */
fp->_flags &= ~_IOEOF;
-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */
- fp->_flag &= ~_IOEOF;
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */
+ fp_->_flag &= ~_IOEOF;
#elif defined __MINT__ /* Atari FreeMiNT */
fp->__offset = pos;
fp->__eof = 0;
/* fstat() replacement.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* An ftell() function that works around platform bugs.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* An ftello() function that works around platform bugs.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* getdtablesize() function for platforms that don't have it.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-#include <stdio.h>
+# include <stdio.h>
-#include "msvc-inval.h"
+# include "msvc-inval.h"
-#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
static int
_setmaxstdio_nothrow (int newmax)
{
return result;
}
-# define _setmaxstdio _setmaxstdio_nothrow
-#endif
+# define _setmaxstdio _setmaxstdio_nothrow
+# endif
-/* Cache for the previous getdtablesize () result. */
+/* Cache for the previous getdtablesize () result. Safe to cache because
+ Windows also lacks setrlimit. */
static int dtablesize;
int
return dtablesize;
}
+#else
+
+# include <limits.h>
+# include <sys/resource.h>
+
+# ifndef RLIM_SAVED_CUR
+# define RLIM_SAVED_CUR RLIM_INFINITY
+# endif
+# ifndef RLIM_SAVED_MAX
+# define RLIM_SAVED_MAX RLIM_INFINITY
+# endif
+
+# ifdef __CYGWIN__
+ /* Cygwin 1.7.25 auto-increases the RLIMIT_NOFILE soft limit until it
+ hits the compile-time constant hard limit of 3200. We might as
+ well just report the hard limit. */
+# define rlim_cur rlim_max
+# endif
+
+int
+getdtablesize (void)
+{
+ struct rlimit lim;
+
+ if (getrlimit (RLIMIT_NOFILE, &lim) == 0
+ && 0 <= lim.rlim_cur && lim.rlim_cur <= INT_MAX
+ && lim.rlim_cur != RLIM_INFINITY
+ && lim.rlim_cur != RLIM_SAVED_CUR
+ && lim.rlim_cur != RLIM_SAVED_MAX)
+ return lim.rlim_cur;
+
+ return INT_MAX;
+}
+
#endif
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-2013 Free Software
+ Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2016 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
const struct option *p;
struct option_list *next;
} *ambig_list = NULL;
+#ifdef _LIBC
+/* malloc() not used for _LIBC to simplify failure messages. */
+# define free_option_list(l)
+#else
+# define free_option_list(l) \
+ while (l != NULL) \
+ { \
+ struct option_list *pn = l->next; \
+ free (l); \
+ l = pn; \
+ }
+#endif
int exact = 0;
+ int ambig = 0;
int indfound = -1;
int option_index;
pfound = p;
indfound = option_index;
}
+ else if (ambig)
+ ; /* Taking simpler path to handling ambiguities. */
else if (long_only
|| pfound->has_arg != p->has_arg
|| pfound->flag != p->flag
|| pfound->val != p->val)
{
/* Second or later nonexact match found. */
+#ifdef _LIBC
+ struct option_list *newp = alloca (sizeof (*newp));
+#else
struct option_list *newp = malloc (sizeof (*newp));
- newp->p = p;
- newp->next = ambig_list;
- ambig_list = newp;
+ if (newp == NULL)
+ {
+ free_option_list (ambig_list);
+ ambig_list = NULL;
+ ambig = 1; /* Use simpler fallback message. */
+ }
+ else
+#endif
+ {
+ newp->p = p;
+ newp->next = ambig_list;
+ ambig_list = newp;
+ }
}
}
- if (ambig_list != NULL && !exact)
+ if ((ambig || ambig_list) && !exact)
{
- if (print_errors)
+ if (print_errors && ambig_list)
{
struct option_list first;
first.p = pfound;
fputc ('\n', stderr);
#endif
}
+ else if (print_errors && ambig)
+ {
+ fprintf (stderr,
+ _("%s: option '%s' is ambiguous\n"),
+ argv[0], argv[d->optind]);
+ }
d->__nextchar += strlen (d->__nextchar);
d->optind++;
d->optopt = 0;
+ free_option_list (ambig_list);
return '?';
}
- while (ambig_list != NULL)
- {
- struct option_list *pn = ambig_list->next;
- free (ambig_list);
- ambig_list = pn;
- }
+ free_option_list (ambig_list);
if (pfound != NULL)
{
/* Declarations for getopt.
- Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2013 Free Software
+ Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2016 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
identifiers so that they do not collide with the system functions
and variables. Renaming avoids problems with some compilers and
linkers. */
-#if defined __GETOPT_PREFIX && !defined __need_getopt
-# if !@HAVE_GETOPT_H@
-# define __need_system_stdlib_h
-# include <stdlib.h>
-# undef __need_system_stdlib_h
-# include <stdio.h>
-# include <unistd.h>
+#if defined __GETOPT_PREFIX
+# if !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
+# undef __need_getopt
# endif
-# undef __need_getopt
+# undef __GETOPT_CONCAT
+# undef __GETOPT_XCONCAT
+# undef __GETOPT_ID
# undef getopt
# undef getopt_long
# undef getopt_long_only
# undef optind
# undef optopt
# undef option
+# undef _getopt_internal
# define __GETOPT_CONCAT(x, y) x ## y
# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y)
# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
/* getopt_long and getopt_long_only entry points for GNU getopt.
- Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2013 Free Software
+ Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2016 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
/* Internal declarations for getopt.
- Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2013 Free Software
+ Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2016 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
--- /dev/null
+/* Program name management.
+ Copyright (C) 2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General 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 "getprogname.h"
+
+#include <errno.h> /* get program_invocation_name declaration */
+#include <stdlib.h> /* get __argv declaration */
+
+#ifdef _AIX
+# include <unistd.h>
+# include <procinfo.h>
+# include <string.h>
+#endif
+
+#ifdef __MVS__
+# ifndef _OPEN_SYS
+# define _OPEN_SYS
+# endif
+# include <string.h>
+# include <sys/ps.h>
+#endif
+
+#ifdef __hpux
+# include <unistd.h>
+# include <sys/param.h>
+# include <sys/pstat.h>
+# include <string.h>
+#endif
+
+#include "dirname.h"
+
+#ifndef HAVE_GETPROGNAME /* not Mac OS X, FreeBSD, NetBSD, OpenBSD >= 5.4, Cygwin */
+char const *
+getprogname (void)
+{
+# if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME /* glibc, BeOS */
+ /* https://www.gnu.org/software/libc/manual/html_node/Error-Messages.html */
+ return program_invocation_short_name;
+# elif HAVE_DECL_PROGRAM_INVOCATION_NAME /* glibc, BeOS */
+ /* https://www.gnu.org/software/libc/manual/html_node/Error-Messages.html */
+ return last_component (program_invocation_name);
+# elif HAVE_GETEXECNAME /* Solaris */
+ /* http://docs.oracle.com/cd/E19253-01/816-5168/6mbb3hrb1/index.html */
+ const char *p = getexecname ();
+ if (!p)
+ p = "?";
+ return last_component (p);
+# elif HAVE_DECL___ARGV /* mingw, MSVC */
+ /* https://msdn.microsoft.com/en-us/library/dn727674.aspx */
+ const char *p = __argv && __argv[0] ? __argv[0] : "?";
+ return last_component (p);
+# elif HAVE_VAR___PROGNAME /* OpenBSD, QNX */
+ /* http://man.openbsd.org/style.9 */
+ /* http://www.qnx.de/developers/docs/6.5.0/index.jsp?topic=%2Fcom.qnx.doc.neutrino_lib_ref%2Fp%2F__progname.html */
+ /* Be careful to declare this only when we absolutely need it
+ (OpenBSD 5.1), rather than when it's available. Otherwise,
+ its mere declaration makes program_invocation_short_name
+ malfunction (have zero length) with Fedora 25's glibc. */
+ extern char *__progname;
+ const char *p = __progname;
+ return p && p[0] ? p : "?";
+# elif _AIX /* AIX */
+ /* Idea by Bastien ROUCARIÈS,
+ http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00095.html
+ Reference: http://
+ ibm.biz/knowctr#ssw_aix_53/com.ibm.aix.basetechref/doc/basetrf1/getprocs.htm
+ */
+ static char *p;
+ static int first = 1;
+ if (first)
+ {
+ first = 0;
+ pid_t pid = getpid ();
+ struct procentry64 procs;
+ p = (0 < getprocs64 (&procs, sizeof procs, NULL, 0, &pid, 1)
+ ? strdup (procs.pi_comm)
+ : NULL);
+ if (!p)
+ p = "?";
+ }
+ return p;
+# elif defined __hpux
+ static char *p;
+ static int first = 1;
+ if (first)
+ {
+ first = 0;
+ pid_t pid = getpid ();
+ struct pst_status status;
+ p = (0 < pstat_getproc (&status, sizeof status, 0, pid)
+ ? strdup (status.pst_ucomm)
+ : NULL);
+ if (!p)
+ p = "?";
+ }
+ return p;
+# elif __MVS__ /* z/OS */
+ /* https://www.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r1.bpxbd00/rtwgetp.htm */
+ static char *p = "?";
+ static int first = 1;
+ if (first)
+ {
+ pid_t pid = getpid ();
+ int token;
+ W_PSPROC buf;
+ first = 0;
+ memset (&buf, 0, sizeof(buf));
+ buf.ps_cmdptr = (char *) malloc (buf.ps_cmdlen = PS_CMDBLEN_LONG);
+ buf.ps_conttyptr = (char *) malloc (buf.ps_conttylen = PS_CONTTYBLEN);
+ buf.ps_pathptr = (char *) malloc (buf.ps_pathlen = PS_PATHBLEN);
+ if (buf.ps_cmdptr && buf.ps_conttyptr && buf.ps_pathptr)
+ {
+ for (token = 0; token >= 0;
+ token = w_getpsent (token, &buf, sizeof(buf)))
+ {
+ if (token > 0 && buf.ps_pid == pid)
+ {
+ char *s = strdup (last_component (buf.ps_pathptr));
+ if (s)
+ p = s;
+ break;
+ }
+ }
+ }
+ free (buf.ps_cmdptr);
+ free (buf.ps_conttyptr);
+ free (buf.ps_pathptr);
+ }
+ return p;
+# else
+# error "getprogname module not ported to this OS"
+# endif
+}
+
+#endif
--- /dev/null
+/* Program name management.
+ Copyright (C) 2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General 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_GETPROGNAME_H
+#define _GL_GETPROGNAME_H
+
+#include <stdlib.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Return the base name of the executing program.
+ On native Windows this will usually end in ".exe" or ".EXE". */
+#ifndef HAVE_GETPROGNAME
+extern char const *getprogname (void)
+# ifdef HAVE_DECL_PROGRAM_INVOCATION_NAME
+ _GL_ATTRIBUTE_PURE
+# endif
+ ;
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
/* Convenience header for conditional use of GNU <libintl.h>.
- Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2013 Free Software
+ Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2016 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
if (msg_ctxt_id != NULL)
#endif
{
+ int found_translation;
memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
msg_ctxt_id[msgctxt_len - 1] = '\004';
memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
translation = dcgettext (domain, msg_ctxt_id, category);
+ found_translation = (translation != msg_ctxt_id);
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
if (msg_ctxt_id != buf)
free (msg_ctxt_id);
#endif
- if (translation != msg_ctxt_id)
+ if (found_translation)
return translation;
}
return msgid;
if (msg_ctxt_id != NULL)
#endif
{
+ int found_translation;
memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
msg_ctxt_id[msgctxt_len - 1] = '\004';
memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
+ found_translation = !(translation == msg_ctxt_id || translation == msgid_plural);
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
if (msg_ctxt_id != buf)
free (msg_ctxt_id);
#endif
- if (!(translation == msg_ctxt_id || translation == msgid_plural))
+ if (found_translation)
return translation;
}
return (n == 1 ? msgid : msgid_plural);
/* Provide gettimeofday for systems that don't have it or for which it's broken.
- Copyright (C) 2001-2003, 2005-2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2007, 2009-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Sequential list data type implemented by a hash table with another list.
- Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
/* Sequential list data type implemented by a hash table with another list.
- Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
/* Sequential list data type implemented by a linked list.
- Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
/* Sequential list data type implemented by a linked list.
- Copyright (C) 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
return NULL;
}
-static size_t
+static size_t _GL_ATTRIBUTE_PURE
gl_linked_size (gl_list_t list)
{
return list->count;
}
-static const void *
+static const void * _GL_ATTRIBUTE_PURE
gl_linked_node_value (gl_list_t list, gl_list_node_t node)
{
return node->value;
return 0;
}
-static gl_list_node_t
+static gl_list_node_t _GL_ATTRIBUTE_PURE
gl_linked_next_node (gl_list_t list, gl_list_node_t node)
{
return (node->next != &list->root ? node->next : NULL);
}
-static gl_list_node_t
+static gl_list_node_t _GL_ATTRIBUTE_PURE
gl_linked_previous_node (gl_list_t list, gl_list_node_t node)
{
return (node->prev != &list->root ? node->prev : NULL);
}
-static const void *
+static const void * _GL_ATTRIBUTE_PURE
gl_linked_get_at (gl_list_t list, size_t position)
{
size_t count = list->count;
return node;
}
-static gl_list_node_t
+static gl_list_node_t _GL_ATTRIBUTE_PURE
gl_linked_search_from_to (gl_list_t list, size_t start_index, size_t end_index,
const void *elt)
{
}
}
-static size_t
+static size_t _GL_ATTRIBUTE_PURE
gl_linked_indexof_from_to (gl_list_t list, size_t start_index, size_t end_index,
const void *elt)
{
result.list = list;
result.p = list->root.next;
result.q = &list->root;
-#ifdef lint
+#if defined GCC_LINT || defined lint
result.i = 0;
result.j = 0;
result.count = 0;
result.q = node;
}
-#ifdef lint
+#if defined GCC_LINT || defined lint
result.i = 0;
result.j = 0;
result.count = 0;
/* ---------------------- Sorted gl_list_t Data Type ---------------------- */
-static gl_list_node_t
+static gl_list_node_t _GL_ATTRIBUTE_PURE
gl_linked_sortedlist_search (gl_list_t list, gl_listelement_compar_fn compar,
const void *elt)
{
return NULL;
}
-static gl_list_node_t
+static gl_list_node_t _GL_ATTRIBUTE_PURE
gl_linked_sortedlist_search_from_to (gl_list_t list,
gl_listelement_compar_fn compar,
size_t low, size_t high,
return NULL;
}
-static size_t
+static size_t _GL_ATTRIBUTE_PURE
gl_linked_sortedlist_indexof (gl_list_t list, gl_listelement_compar_fn compar,
const void *elt)
{
return (size_t)(-1);
}
-static size_t
+static size_t _GL_ATTRIBUTE_PURE
gl_linked_sortedlist_indexof_from_to (gl_list_t list,
gl_listelement_compar_fn compar,
size_t low, size_t high,
/* Ordered set data type implemented by a binary tree.
- Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
result.p = node;
/* End point is past the rightmost node. */
result.q = NULL;
-#ifdef lint
+#if defined GCC_LINT || defined lint
result.i = 0;
result.j = 0;
result.count = 0;
/* Ordered set data type implemented by a binary tree.
- Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
/* Ordered set data type implemented by a binary tree.
- Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
/* Sequential list data type implemented by a hash table with a linked list.
- Copyright (C) 2006, 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2008-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
/* Sequential list data type implemented by a hash table with a linked list.
- Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
-/* Abstract sequential list data type.
- Copyright (C) 2006-2013 Free Software Foundation, Inc.
+/* Abstract sequential list data type. -*- coding: utf-8 -*-
+ Copyright (C) 2006-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
/* Abstract ordered set data type.
- Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
/* Abstract sequential list data type, with out-of-memory checking.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This program is free software: you can redistribute it and/or modify
/* Abstract ordered set data type, with out-of-memory checking.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This program is free software: you can redistribute it and/or modify
/* Locking in multithreaded situations.
- Copyright (C) 2005-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Locking in multithreaded situations.
- Copyright (C) 2005-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Multithreading primitives.
- Copyright (C) 2005-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Thread-local storage in multithreaded situations.
- Copyright (C) 2005-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Thread-local storage in multithreaded situations.
- Copyright (C) 2005, 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+# Copyright (C) 2002-2016 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 same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
-# 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
+# Reproduce by: gnulib-tool --import --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 do-release-commit-and-tag error execute fclose fdl-1.3 fflush filenamecat fopen fopen-safer fseeko gendocs getopt-gnu git-version-gen gitlog-to-changelog 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
libm4_a_DEPENDENCIES = $(M4_LIBOBJS)
EXTRA_libm4_a_SOURCES =
+## begin gnulib module absolute-header
+
+# Use this preprocessor expression to decide whether #include_next works.
+# Do not rely on a 'configure'-time test for this, since the expression
+# might appear in an installed header, which is used by some other compiler.
+HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER)
+
+## end gnulib module absolute-header
+
+## begin gnulib module alignof
+
+
+EXTRA_DIST += alignof.h
+
+## end gnulib module alignof
+
## begin gnulib module alloca-opt
BUILT_SOURCES += $(ALLOCA_H)
## begin gnulib module configmake
# Listed in the same order as the GNU makefile conventions, and
-# provided by autoconf 2.59c+.
+# provided by autoconf 2.59c+ or 2.70.
# The Automake-defined pkg* macros are appended, in the order
# listed in the Automake 1.10a+ documentation.
configmake.h: Makefile
echo '#define SYSCONFDIR "$(sysconfdir)"'; \
echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
+ echo '#define RUNSTATEDIR "$(runstatedir)"'; \
echo '#define INCLUDEDIR "$(includedir)"'; \
echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
echo '#define DOCDIR "$(docdir)"'; \
## end gnulib module dirname-lgpl
+## begin gnulib module do-release-commit-and-tag
+
+
+EXTRA_DIST += $(top_srcdir)/build-aux/do-release-commit-and-tag
+
+## end gnulib module do-release-commit-and-tag
+
## begin gnulib module dosname
## begin gnulib module fpending
-EXTRA_DIST += fpending.c fpending.h
+EXTRA_DIST += fpending.c fpending.h stdio-impl.h
EXTRA_libm4_a_SOURCES += fpending.c
## end gnulib module getopt-posix
+## begin gnulib module getprogname
+
+libm4_a_SOURCES += getprogname.h getprogname.c
+
+## end gnulib module getprogname
+
## begin gnulib module gettext-h
libm4_a_SOURCES += gettext.h
## end gnulib module git-version-gen
+## begin gnulib module gitlog-to-changelog
+
+
+EXTRA_DIST += $(top_srcdir)/build-aux/gitlog-to-changelog
+
+## end gnulib module gitlog-to-changelog
+
## begin gnulib module gnu-web-doc-update
## end gnulib module gnupload
+## begin gnulib module hard-locale
+
+libm4_a_SOURCES += hard-locale.c
+
+EXTRA_DIST += hard-locale.h
+
+## end gnulib module hard-locale
+
## begin gnulib module havelib
## end gnulib module langinfo
+## begin gnulib module limits-h
+
+BUILT_SOURCES += $(LIMITS_H)
+
+# We need the following in order to create <limits.h> when the system
+# doesn't have one that is compatible with GNU.
+if GL_GENERATE_LIMITS_H
+limits.h: limits.in.h $(top_builddir)/config.status
+ $(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_LIMITS_H''@|$(NEXT_LIMITS_H)|g' \
+ < $(srcdir)/limits.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+else
+limits.h: $(top_builddir)/config.status
+ rm -f $@
+endif
+MOSTLYCLEANFILES += limits.h limits.h-t
+
+EXTRA_DIST += limits.in.h
+
+## end gnulib module limits-h
+
## begin gnulib module linkedhash-list
libm4_a_SOURCES += gl_linkedhash_list.h gl_linkedhash_list.c gl_anyhash_list1.h gl_anyhash_list2.h gl_anylinked_list1.h gl_anylinked_list2.h
## end gnulib module maintainer-makefile
-## begin gnulib module malloc-gnu
-
-
-EXTRA_DIST += malloc.c
-
-EXTRA_libm4_a_SOURCES += malloc.c
-
-## end gnulib module malloc-gnu
-
## begin gnulib module malloc-posix
-e 's|@''HAVE_DECL_TRUNCF''@|$(HAVE_DECL_TRUNCF)|g' \
-e 's|@''HAVE_DECL_TRUNCL''@|$(HAVE_DECL_TRUNCL)|g' \
| \
- sed -e 's|@''REPLACE_CBRTF''@|$(REPLACE_CBRTF)|g' \
+ sed -e 's|@''REPLACE_ACOSF''@|$(REPLACE_ACOSF)|g' \
+ -e 's|@''REPLACE_ASINF''@|$(REPLACE_ASINF)|g' \
+ -e 's|@''REPLACE_ATANF''@|$(REPLACE_ATANF)|g' \
+ -e 's|@''REPLACE_ATAN2F''@|$(REPLACE_ATAN2F)|g' \
+ -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_COSF''@|$(REPLACE_COSF)|g' \
+ -e 's|@''REPLACE_COSHF''@|$(REPLACE_COSHF)|g' \
+ -e 's|@''REPLACE_EXPF''@|$(REPLACE_EXPF)|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_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_SINF''@|$(REPLACE_SINF)|g' \
+ -e 's|@''REPLACE_SINHF''@|$(REPLACE_SINHF)|g' \
+ -e 's|@''REPLACE_SQRTF''@|$(REPLACE_SQRTF)|g' \
-e 's|@''REPLACE_SQRTL''@|$(REPLACE_SQRTL)|g' \
+ -e 's|@''REPLACE_TANF''@|$(REPLACE_TANF)|g' \
+ -e 's|@''REPLACE_TANHF''@|$(REPLACE_TANHF)|g' \
-e 's|@''REPLACE_TRUNC''@|$(REPLACE_TRUNC)|g' \
-e 's|@''REPLACE_TRUNCF''@|$(REPLACE_TRUNCF)|g' \
-e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \
## end gnulib module memchr2
+## begin gnulib module minmax
+
+libm4_a_SOURCES += minmax.h
+
+## end gnulib module minmax
+
## begin gnulib module mkdtemp
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|GL_M4|g' \
-e 's|@''HAVE_SCHED_H''@|$(HAVE_SCHED_H)|g' \
+ -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_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|@''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_MAX_ALIGN_T''@|$(HAVE_MAX_ALIGN_T)|g' \
-e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
-e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
< $(srcdir)/stddef.in.h; \
-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_C99_STDINT_H''@/$(HAVE_C99_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/@''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' \
+ -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
< $(srcdir)/stdint.in.h; \
} > $@-t && \
mv $@-t $@
-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_QSORT_R''@/$(GNULIB_QSORT_R)/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|@''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_QSORT_R''@|$(HAVE_QSORT_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|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
-e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
-e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
+ -e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|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|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
+ -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \
-e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \
-e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \
-e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \
-e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \
-e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \
+ -e 's/@''GNULIB_TIME_RZ''@/$(GNULIB_TIME_RZ)/g' \
-e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
-e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
-e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
-e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \
+ -e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \
+ -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \
+ -e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \
-e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \
-e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \
-e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
-e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \
-e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
-e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
+ -e 's|@''UNISTD_H_DEFINES_STRUCT_TIMESPEC''@|$(UNISTD_H_DEFINES_STRUCT_TIMESPEC)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
-e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
-e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
-e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
- -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \
-e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
-e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \
-e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
-e 's|@''HAVE_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''@|$(HAVE_DECL_GETLOGIN)|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|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
-e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
-e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
+ -e 's|@''REPLACE_GETDTABLESIZE''@|$(REPLACE_GETDTABLESIZE)|g' \
-e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
-e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
-e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
-e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \
-e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \
-e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
+ -e 's|@''REPLACE_READLINKAT''@|$(REPLACE_READLINKAT)|g' \
-e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
-e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
-e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
+ -e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \
-e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \
-e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \
-e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \
-e 's|@''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_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
-e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \
-e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \
-e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \
+ -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
-e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \
-e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \
-e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \
--- /dev/null
+/* hard-locale.c -- Determine whether a locale is hard.
+
+ Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2016 Free Software
+ Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General 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 "hard-locale.h"
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef __GLIBC__
+# define GLIBC_VERSION __GLIBC__
+#elif defined __UCLIBC__
+# define GLIBC_VERSION 2
+#else
+# define GLIBC_VERSION 0
+#endif
+
+/* Return true if the current CATEGORY locale is hard, i.e. if you
+ can't get away with assuming traditional C or POSIX behavior. */
+bool
+hard_locale (int category)
+{
+ bool hard = true;
+ char const *p = setlocale (category, NULL);
+
+ if (p)
+ {
+ if (2 <= GLIBC_VERSION)
+ {
+ if (strcmp (p, "C") == 0 || strcmp (p, "POSIX") == 0)
+ hard = false;
+ }
+ else
+ {
+ char *locale = strdup (p);
+ if (locale)
+ {
+ /* Temporarily set the locale to the "C" and "POSIX" locales
+ to find their names, so that we can determine whether one
+ or the other is the caller's locale. */
+ if (((p = setlocale (category, "C"))
+ && strcmp (p, locale) == 0)
+ || ((p = setlocale (category, "POSIX"))
+ && strcmp (p, locale) == 0))
+ hard = false;
+
+ /* Restore the caller's locale. */
+ setlocale (category, locale);
+ free (locale);
+ }
+ }
+ }
+
+ return hard;
+}
--- /dev/null
+/* Determine whether a locale is hard.
+
+ Copyright (C) 1999, 2003-2004, 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General 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 HARD_LOCALE_H_
+# define HARD_LOCALE_H_ 1
+
+# include <stdbool.h>
+
+bool hard_locale (int);
+
+#endif /* HARD_LOCALE_H_ */
-/* ignore a function return without a compiler warning
+/* ignore a function return without a compiler warning. -*- coding: utf-8 -*-
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#ifndef _GL_IGNORE_VALUE_H
#define _GL_IGNORE_VALUE_H
-/* The __attribute__((__warn_unused_result__)) feature
- is available in gcc versions 3.4 and newer,
- while the typeof feature has been available since 2.7 at least. */
+/* Normally casting an expression to void discards its value, but GCC
+ versions 3.4 and newer have __attribute__ ((__warn_unused_result__))
+ which may cause unwanted diagnostics in that case. Use __typeof__
+ and __extension__ to work around the problem, if the workaround is
+ known to be needed. */
#if 3 < __GNUC__ + (4 <= __GNUC_MINOR__)
# define ignore_value(x) \
(__extension__ ({ __typeof__ (x) __x = (x); (void) __x; }))
/* intprops.h -- properties of integer types
- Copyright (C) 2001-2005, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001-2016 Free Software Foundation, Inc.
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
#define _GL_INTPROPS_H
#include <limits.h>
+#include <verify.h>
-/* Return an integer value, converted to the same type as the integer
- expression E after integer type promotion. V is the unconverted value. */
+#ifndef __has_builtin
+# define __has_builtin(x) 0
+#endif
+
+/* Return a value with the common real type of E and V and the value of V. */
#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
an integer. */
#define TYPE_IS_INTEGER(t) ((t) 1.5 == 1)
-/* True if negative values of the signed integer type T use two's
- complement, ones' complement, or signed magnitude representation,
- respectively. Much GNU code assumes two's complement, but some
- people like to be portable to all possible C hosts. */
-#define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1)
-#define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0)
-#define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1)
-
-/* True if the signed integer expression E uses two's complement. */
-#define _GL_INT_TWOS_COMPLEMENT(e) (~ _GL_INT_CONVERT (e, 0) == -1)
-
-/* True if the arithmetic type T is signed. */
+/* True if the real type T is signed. */
#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
-/* Return 1 if the integer expression E, after integer promotion, has
- a signed type. */
-#define _GL_INT_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
+/* Return 1 if the real expression E, after promotion, has a
+ signed or floating type. */
+#define EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
-/* Minimum and maximum values for integer types and expressions. These
- macros have undefined behavior if T is signed and has padding bits.
- If this is a problem for you, please let us know how to fix it for
- your host. */
+/* Minimum and maximum values for integer types and expressions. */
+
+/* The width in bits of the integer type or expression T.
+ Padding bits are not supported; this is checked at compile-time below. */
+#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT)
/* 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_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t))
#define TYPE_MAXIMUM(t) \
((t) (! TYPE_SIGNED (t) \
? (t) -1 \
- : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
+ : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1)))
/* The maximum and minimum values for the type of the expression E,
after integer promotion. E should not have side effects. */
#define _GL_INT_MINIMUM(e) \
- (_GL_INT_SIGNED (e) \
- ? - _GL_INT_TWOS_COMPLEMENT (e) - _GL_SIGNED_INT_MAXIMUM (e) \
+ (EXPR_SIGNED (e) \
+ ? ~ _GL_SIGNED_INT_MAXIMUM (e) \
: _GL_INT_CONVERT (e, 0))
#define _GL_INT_MAXIMUM(e) \
- (_GL_INT_SIGNED (e) \
+ (EXPR_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)
+ (((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH ((e) + 0) - 2)) - 1) * 2 + 1)
+
+/* Work around OpenVMS incompatibility with C99. */
+#if !defined LLONG_MAX && defined __INT64_MAX
+# define LLONG_MAX __INT64_MAX
+# define LLONG_MIN __INT64_MIN
+#endif
+/* This include file assumes that signed types are two's complement without
+ padding bits; the above macros have undefined behavior otherwise.
+ If this is a problem for you, please let us know how to fix it for your host.
+ As a sanity check, test the assumption for some signed types that
+ <limits.h> bounds. */
+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 (int) == INT_MIN);
+verify (TYPE_MAXIMUM (int) == INT_MAX);
+verify (TYPE_MINIMUM (long int) == LONG_MIN);
+verify (TYPE_MAXIMUM (long int) == LONG_MAX);
+#ifdef LLONG_MAX
+verify (TYPE_MINIMUM (long long int) == LLONG_MIN);
+verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
+#endif
+/* Similarly, sanity-check one ISO/IEC TS 18661-1:2014 macro if defined. */
+#ifdef UINT_WIDTH
+verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH);
+#endif
-/* Return 1 if the __typeof__ keyword works. This could be done by
+/* Does the __typeof__ keyword work? 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
+#if (2 <= __GNUC__ \
+ || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \
+ || (0x5110 <= __SUNPRO_C && !__STDC__))
# define _GL_HAVE___TYPEOF__ 1
#else
# define _GL_HAVE___TYPEOF__ 0
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)) \
+ (INT_BITS_STRLEN_BOUND (TYPE_WIDTH (t) - _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,
? (a) < (min) >> (b) \
: (max) >> (b) < (a))
+/* True if __builtin_add_overflow (A, B, P) works when P is non-null. */
+#define _GL_HAS_BUILTIN_OVERFLOW \
+ (5 <= __GNUC__ || __has_builtin (__builtin_add_overflow))
+
+/* True if __builtin_add_overflow_p (A, B, C) works. */
+#define _GL_HAS_BUILTIN_OVERFLOW_P \
+ (7 <= __GNUC__ || __has_builtin (__builtin_add_overflow_p))
/* 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))
+#if _GL_HAS_BUILTIN_OVERFLOW_P
+# define _GL_ADD_OVERFLOW(a, b, min, max) \
+ __builtin_add_overflow_p (a, b, (__typeof__ ((a) + (b))) 0)
+# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \
+ __builtin_sub_overflow_p (a, b, (__typeof__ ((a) - (b))) 0)
+# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \
+ __builtin_mul_overflow_p (a, b, (__typeof__ ((a) * (b))) 0)
+#else
+# 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))
+#endif
#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 \
: (a) % - (b)) \
== 0)
-
-/* Integer overflow checks.
+/* Check for integer overflow, and report low order bits of answer.
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
+ The INT_<op>_WRAPV macros also store the low-order bits of the answer.
+ These macros work correctly on all known practical hosts, and do not rely
on undefined behavior due to signed arithmetic overflow.
- Example usage:
+ Example usage, assuming A and B are long int:
- long int i = ...;
- long int j = ...;
- if (INT_MULTIPLY_OVERFLOW (i, j))
- printf ("multiply would overflow");
+ if (INT_MULTIPLY_OVERFLOW (a, b))
+ printf ("result would overflow\n");
else
- printf ("product is %ld", i * j);
+ printf ("result is %ld (no overflow)\n", a * b);
+
+ Example usage with WRAPV flavor:
+
+ long int result;
+ bool overflow = INT_MULTIPLY_WRAPV (a, b, &result);
+ printf ("result is %ld (%s)\n", result,
+ overflow ? "after overflow" : "no overflow");
+
+ Restrictions on these macros:
These macros do not check for all possible numerical problems or
undefined or unspecified behavior: they do not check for division
These macros may evaluate their arguments zero or multiple times, so the
arguments should not have side effects.
+ The WRAPV macros are not constant expressions. They support only
+ +, binary -, and *. The result type must be signed.
+
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,
_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))
+#if _GL_HAS_BUILTIN_OVERFLOW_P
+# define INT_NEGATE_OVERFLOW(a) INT_SUBTRACT_OVERFLOW (0, a)
+#else
+# define INT_NEGATE_OVERFLOW(a) \
+ INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
+#endif
#define INT_MULTIPLY_OVERFLOW(a, b) \
_GL_BINARY_OP_OVERFLOW (a, b, _GL_MULTIPLY_OVERFLOW)
#define INT_DIVIDE_OVERFLOW(a, b) \
_GL_INT_MINIMUM (0 * (b) + (a)), \
_GL_INT_MAXIMUM (0 * (b) + (a)))
+/* Store the low-order bits of A + B, A - B, A * B, respectively, into *R.
+ Return 1 if the result overflows. See above for restrictions. */
+#define INT_ADD_WRAPV(a, b, r) \
+ _GL_INT_OP_WRAPV (a, b, r, +, __builtin_add_overflow, INT_ADD_OVERFLOW)
+#define INT_SUBTRACT_WRAPV(a, b, r) \
+ _GL_INT_OP_WRAPV (a, b, r, -, __builtin_sub_overflow, INT_SUBTRACT_OVERFLOW)
+#define INT_MULTIPLY_WRAPV(a, b, r) \
+ _GL_INT_OP_WRAPV (a, b, r, *, __builtin_mul_overflow, INT_MULTIPLY_OVERFLOW)
+
+/* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See:
+ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193
+ https://llvm.org/bugs/show_bug.cgi?id=25390
+ For now, assume all versions of GCC-like compilers generate bogus
+ warnings for _Generic. This matters only for older compilers that
+ lack __builtin_add_overflow. */
+#if __GNUC__
+# define _GL__GENERIC_BOGUS 1
+#else
+# define _GL__GENERIC_BOGUS 0
+#endif
+
+/* Store the low-order bits of A <op> B into *R, where OP specifies
+ the operation. BUILTIN is the builtin operation, and OVERFLOW the
+ overflow predicate. Return 1 if the result overflows. See above
+ for restrictions. */
+#if _GL_HAS_BUILTIN_OVERFLOW
+# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r)
+#elif 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS
+# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \
+ (_Generic \
+ (*(r), \
+ signed char: \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned char, \
+ signed char, SCHAR_MIN, SCHAR_MAX), \
+ short int: \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \
+ short int, SHRT_MIN, SHRT_MAX), \
+ int: \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+ int, INT_MIN, INT_MAX), \
+ long int: \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+ long int, LONG_MIN, LONG_MAX), \
+ long long int: \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
+ long long int, LLONG_MIN, LLONG_MAX)))
+#else
+# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \
+ (sizeof *(r) == sizeof (signed char) \
+ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned char, \
+ signed char, SCHAR_MIN, SCHAR_MAX) \
+ : sizeof *(r) == sizeof (short int) \
+ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \
+ short int, SHRT_MIN, SHRT_MAX) \
+ : sizeof *(r) == sizeof (int) \
+ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+ int, INT_MIN, INT_MAX) \
+ : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow))
+# ifdef LLONG_MAX
+# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
+ (sizeof *(r) == sizeof (long int) \
+ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+ long int, LONG_MIN, LONG_MAX) \
+ : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
+ long long int, LLONG_MIN, LLONG_MAX))
+# else
+# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+ long int, LONG_MIN, LONG_MAX)
+# endif
+#endif
+
+/* Store the low-order bits of A <op> B into *R, where the operation
+ is given by OP. Use the unsigned type UT for calculation to avoid
+ overflow problems. *R's type is T, with extremal values TMIN and
+ TMAX. T must be a signed integer type. Return 1 if the result
+ overflows. */
+#define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \
+ (sizeof ((a) op (b)) < sizeof (t) \
+ ? _GL_INT_OP_CALC1 ((t) (a), (t) (b), r, op, overflow, ut, t, tmin, tmax) \
+ : _GL_INT_OP_CALC1 (a, b, r, op, overflow, ut, t, tmin, tmax))
+#define _GL_INT_OP_CALC1(a, b, r, op, overflow, ut, t, tmin, tmax) \
+ ((overflow (a, b) \
+ || (EXPR_SIGNED ((a) op (b)) && ((a) op (b)) < (tmin)) \
+ || (tmax) < ((a) op (b))) \
+ ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 1) \
+ : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 0))
+
+/* Return A <op> B, where the operation is given by OP. Use the
+ unsigned type UT for calculation to avoid overflow problems.
+ Convert the result to type T without overflow by subtracting TMIN
+ from large values before converting, and adding it afterwards.
+ Compilers can optimize all the operations except OP. */
+#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t, tmin, tmax) \
+ (((ut) (a) op (ut) (b)) <= (tmax) \
+ ? (t) ((ut) (a) op (ut) (b)) \
+ : ((t) (((ut) (a) op (ut) (b)) - (tmin)) + (tmin)))
+
#endif /* _GL_INTPROPS_H */
/* Test for NaN that does not need libm.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
((sizeof (DOUBLE) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
typedef union { DOUBLE value; unsigned int word[NWORDS]; } memory_double;
+/* Most hosts nowadays use IEEE floating point, so they use IEC 60559
+ representations, have infinities and NaNs, and do not trap on
+ exceptions. Define IEEE_FLOATING_POINT if this host is one of the
+ typical ones. The C11 macro __STDC_IEC_559__ is close to what is
+ wanted here, but is not quite right because this file does not require
+ all the features of C11 Annex F (and does not require C11 at all,
+ for that matter). */
+
+#define IEEE_FLOATING_POINT (FLT_RADIX == 2 && FLT_MANT_DIG == 24 \
+ && FLT_MIN_EXP == -125 && FLT_MAX_EXP == 128)
+
int
FUNC (DOUBLE x)
{
-#ifdef KNOWN_EXPBIT0_LOCATION
+#if defined KNOWN_EXPBIT0_LOCATION && IEEE_FLOATING_POINT
# if defined USE_LONG_DOUBLE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
/* Special CPU dependent code is needed to treat bit patterns outside the
IEEE 754 specification (such as Pseudo-NaNs, Pseudo-Infinities,
}
# endif
#else
- /* The configuration did not find sufficient information. Give up about
- the signaling NaNs, handle only the quiet NaNs. */
+ /* The configuration did not find sufficient information, or does
+ not use IEEE floating point. Give up about the signaling NaNs;
+ handle only the quiet NaNs. */
if (x == x)
{
# if defined USE_LONG_DOUBLE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
/* Test for NaN that does not need libm.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test for NaN that does not need libm.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test for NaN that does not need libm.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test for NaN that does not need libm.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test for NaN that does not need libm.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test for NaN that does not need libm.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Replacement for 'int' to 'long double' conversion routine.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
/* Substitute for and wrapper around <langinfo.h>.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# define CODESET 10000
/* nl_langinfo items of the LC_NUMERIC category */
# define RADIXCHAR 10001
+# define DECIMAL_POINT RADIXCHAR
# define THOUSEP 10002
+# define THOUSANDS_SEP THOUSEP
+# define GROUPING 10114
/* nl_langinfo items of the LC_TIME category */
# define D_T_FMT 10003
# define D_FMT 10004
# define ALT_DIGITS 10051
/* nl_langinfo items of the LC_MONETARY category */
# define CRNCYSTR 10052
+# define CURRENCY_SYMBOL CRNCYSTR
+# define INT_CURR_SYMBOL 10100
+# define MON_DECIMAL_POINT 10101
+# define MON_THOUSANDS_SEP 10102
+# define MON_GROUPING 10103
+# define POSITIVE_SIGN 10104
+# define NEGATIVE_SIGN 10105
+# define FRAC_DIGITS 10106
+# define INT_FRAC_DIGITS 10107
+# define P_CS_PRECEDES 10108
+# define N_CS_PRECEDES 10109
+# define P_SEP_BY_SPACE 10110
+# define N_SEP_BY_SPACE 10111
+# define P_SIGN_POSN 10112
+# define N_SIGN_POSN 10113
/* nl_langinfo items of the LC_MESSAGES category */
# define YESEXPR 10053
# define NOEXPR 10054
--- /dev/null
+/* A GNU-like <limits.h>.
+
+ Copyright 2016 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute 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 _@GUARD_PREFIX@_LIMITS_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_LIMITS_H@
+
+#ifndef _@GUARD_PREFIX@_LIMITS_H
+#define _@GUARD_PREFIX@_LIMITS_H
+
+/* The number of usable bits in an unsigned or signed integer type
+ with minimum value MIN and maximum value MAX, as an int expression
+ suitable in #if. Cover all known practical hosts. This
+ implementation exploits the fact that MAX is 1 less than a power of
+ 2, and merely counts the number of 1 bits in MAX; "COBn" means
+ "count the number of 1 bits in the low-order n bits"). */
+#define _GL_INTEGER_WIDTH(min, max) (((min) < 0) + _GL_COB128 (max))
+#define _GL_COB128(n) (_GL_COB64 ((n) >> 31 >> 31 >> 2) + _GL_COB64 (n))
+#define _GL_COB64(n) (_GL_COB32 ((n) >> 31 >> 1) + _GL_COB32 (n))
+#define _GL_COB32(n) (_GL_COB16 ((n) >> 16) + _GL_COB16 (n))
+#define _GL_COB16(n) (_GL_COB8 ((n) >> 8) + _GL_COB8 (n))
+#define _GL_COB8(n) (_GL_COB4 ((n) >> 4) + _GL_COB4 (n))
+#define _GL_COB4(n) (!!((n) & 8) + !!((n) & 4) + !!((n) & 2) + !!((n) & 1))
+
+/* Macros specified by ISO/IEC TS 18661-1:2014. */
+
+#if (! defined ULLONG_WIDTH \
+ && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__))
+# define CHAR_WIDTH _GL_INTEGER_WIDTH (CHAR_MIN, CHAR_MAX)
+# define SCHAR_WIDTH _GL_INTEGER_WIDTH (SCHAR_MIN, SCHAR_MAX)
+# define UCHAR_WIDTH _GL_INTEGER_WIDTH (0, UCHAR_MAX)
+# define SHRT_WIDTH _GL_INTEGER_WIDTH (SHRT_MIN, SHRT_MAX)
+# define USHRT_WIDTH _GL_INTEGER_WIDTH (0, USHRT_MAX)
+# define INT_WIDTH _GL_INTEGER_WIDTH (INT_MIN, INT_MAX)
+# define UINT_WIDTH _GL_INTEGER_WIDTH (0, UINT_MAX)
+# define LONG_WIDTH _GL_INTEGER_WIDTH (LONG_MIN, LONG_MAX)
+# define ULONG_WIDTH _GL_INTEGER_WIDTH (0, ULONG_MAX)
+# define LLONG_WIDTH _GL_INTEGER_WIDTH (LLONG_MIN, LLONG_MAX)
+# define ULLONG_WIDTH _GL_INTEGER_WIDTH (0, ULLONG_MAX)
+#endif /* !ULLONG_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */
+
+#endif /* _@GUARD_PREFIX@_LIMITS_H */
+#endif /* _@GUARD_PREFIX@_LIMITS_H */
/* Determine a canonical name for the current locale's character encoding.
- Copyright (C) 2000-2006, 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2000-2006, 2008-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#if defined _WIN32 || defined __WIN32__
# define WINDOWS_NATIVE
+# include <locale.h>
#endif
#if defined __EMX__
cp = charset_aliases;
if (cp == NULL)
{
-#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__)
+#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__ || defined OS2)
const char *dir;
const char *base = "charset.alias";
char *file_name;
"CP54936" "\0" "GB18030" "\0"
"CP65001" "\0" "UTF-8" "\0";
# endif
+# if defined OS2
+ /* 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. */
+
+ /* The list of encodings is taken from "List of OS/2 Codepages"
+ by Alex Taylor:
+ <http://altsan.org/os2/toolkits/uls/index.html#codepages>.
+ See also "IBM Globalization - Code page identifiers":
+ <http://www-01.ibm.com/software/globalization/cp/cp_cpgid.html>. */
+ cp = "CP813" "\0" "ISO-8859-7" "\0"
+ "CP878" "\0" "KOI8-R" "\0"
+ "CP819" "\0" "ISO-8859-1" "\0"
+ "CP912" "\0" "ISO-8859-2" "\0"
+ "CP913" "\0" "ISO-8859-3" "\0"
+ "CP914" "\0" "ISO-8859-4" "\0"
+ "CP915" "\0" "ISO-8859-5" "\0"
+ "CP916" "\0" "ISO-8859-8" "\0"
+ "CP920" "\0" "ISO-8859-9" "\0"
+ "CP921" "\0" "ISO-8859-13" "\0"
+ "CP923" "\0" "ISO-8859-15" "\0"
+ "CP954" "\0" "EUC-JP" "\0"
+ "CP964" "\0" "EUC-TW" "\0"
+ "CP970" "\0" "EUC-KR" "\0"
+ "CP1089" "\0" "ISO-8859-6" "\0"
+ "CP1208" "\0" "UTF-8" "\0"
+ "CP1381" "\0" "GB2312" "\0"
+ "CP1386" "\0" "GBK" "\0"
+ "CP3372" "\0" "EUC-JP" "\0";
+# endif
#endif
charset_aliases = cp;
static char buf[2 + 10 + 1];
- /* The Windows API has a function returning the locale's codepage as a
- number: GetACP().
- When the output goes to a console window, it needs to be provided in
- GetOEMCP() encoding if the console is using a raster font, or in
- GetConsoleOutputCP() encoding if it is using a TrueType font.
- But in GUI programs and for output sent to files and pipes, GetACP()
- encoding is the best bet. */
- sprintf (buf, "CP%u", GetACP ());
+ /* The Windows API has a function returning the locale's codepage as
+ a number, but the value doesn't change according to what the
+ 'setlocale' call specified. So we use it as a last resort, in
+ case the string returned by 'setlocale' doesn't specify the
+ codepage. */
+ char *current_locale = setlocale (LC_ALL, NULL);
+ char *pdot;
+
+ /* If they set different locales for different categories,
+ 'setlocale' will return a semi-colon separated list of locale
+ values. To make sure we use the correct one, we choose LC_CTYPE. */
+ if (strchr (current_locale, ';'))
+ current_locale = setlocale (LC_CTYPE, NULL);
+
+ pdot = strrchr (current_locale, '.');
+ if (pdot && 2 + strlen (pdot + 1) + 1 <= sizeof (buf))
+ sprintf (buf, "CP%s", pdot + 1);
+ else
+ {
+ /* The Windows API has a function returning the locale's codepage as a
+ number: GetACP().
+ When the output goes to a console window, it needs to be provided in
+ GetOEMCP() encoding if the console is using a raster font, or in
+ GetConsoleOutputCP() encoding if it is using a TrueType font.
+ But in GUI programs and for output sent to files and pipes, GetACP()
+ encoding is the best bet. */
+ sprintf (buf, "CP%u", GetACP ());
+ }
codeset = buf;
#elif defined OS2
ULONG cp[3];
ULONG cplen;
+ codeset = NULL;
+
/* Allow user to override the codeset, as set in the operating system,
with standard language environment variables. */
locale = getenv ("LC_ALL");
}
}
- /* Resolve through the charset.alias file. */
- codeset = locale;
+ /* For the POSIX locale, don't use the system's codepage. */
+ if (strcmp (locale, "C") == 0 || strcmp (locale, "POSIX") == 0)
+ codeset = "";
}
- else
+
+ if (codeset == NULL)
{
/* OS/2 has a function returning the locale's codepage as a number. */
if (DosQueryCp (sizeof (cp), cp, &cplen))
/* Determine a canonical name for the current locale's character encoding.
- Copyright (C) 2000-2003, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2000-2003, 2009-2016 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
/* A POSIX <locale.h>.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Query locale dependent information for formatting numbers.
- Copyright (C) 2012-2013 Free Software Foundation, Inc.
+ Copyright (C) 2012-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* An lseek() function that detects pipes.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Work around a bug of lstat on some systems
- Copyright (C) 1997-2006, 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2006, 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* malloc() function that is glibc compatible.
- Copyright (C) 1997-1998, 2006-2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-1998, 2006-2007, 2009-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Safe automatic memory allocation.
- Copyright (C) 2003, 2006-2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006-2007, 2009-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify
/* Safe automatic memory allocation.
- Copyright (C) 2003-2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2003-2007, 2009-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify
#include <alloca.h>
#include <stddef.h>
#include <stdlib.h>
+#include <stdint.h>
+
+#include "xalloc-oversized.h"
#ifdef __cplusplus
It allocates an array of N objects, each with S bytes of memory,
on the stack. S must be positive and N must be nonnegative.
The array must be freed using freea() before the function returns. */
-#if 1
-/* Cf. the definition of xalloc_oversized. */
-# define nmalloca(n, s) \
- ((n) > (size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) \
- ? NULL \
- : malloca ((n) * (s)))
-#else
-extern void * nmalloca (size_t n, size_t s);
-#endif
+#define nmalloca(n, s) (xalloc_oversized (n, s) ? NULL : malloca ((n) * (s)))
#ifdef __cplusplus
#include <config.h>
#define _GL_MATH_INLINE _GL_EXTERN_INLINE
#include "math.h"
+typedef int dummy;
/* A GNU-like <math.h>.
- Copyright (C) 2002-2003, 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
return func (l); \
}
# define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func) \
+_GL_BEGIN_NAMESPACE \
inline int \
func (float f) \
{ \
func (long double l) \
{ \
return _gl_cxx_ ## func ## l (l); \
-}
+} \
+_GL_END_NAMESPACE
#endif
/* Helper macros to define a portability warning for the
#if @GNULIB_ACOSF@
-# if !@HAVE_ACOSF@
-# undef acosf
+# if @REPLACE_ACOSF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef acosf
+# define acosf rpl_acosf
+# endif
+_GL_FUNCDECL_RPL (acosf, float, (float x));
+_GL_CXXALIAS_RPL (acosf, float, (float x));
+# else
+# if !@HAVE_ACOSF@
+# undef acosf
_GL_FUNCDECL_SYS (acosf, float, (float x));
-# endif
+# endif
_GL_CXXALIAS_SYS (acosf, float, (float x));
+# endif
_GL_CXXALIASWARN (acosf);
#elif defined GNULIB_POSIXCHECK
# undef acosf
#if @GNULIB_ASINF@
-# if !@HAVE_ASINF@
-# undef asinf
+# if @REPLACE_ASINF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef asinf
+# define asinf rpl_asinf
+# endif
+_GL_FUNCDECL_RPL (asinf, float, (float x));
+_GL_CXXALIAS_RPL (asinf, float, (float x));
+# else
+# if !@HAVE_ASINF@
+# undef asinf
_GL_FUNCDECL_SYS (asinf, float, (float x));
-# endif
+# endif
_GL_CXXALIAS_SYS (asinf, float, (float x));
+# endif
_GL_CXXALIASWARN (asinf);
#elif defined GNULIB_POSIXCHECK
# undef asinf
#if @GNULIB_ATANF@
-# if !@HAVE_ATANF@
-# undef atanf
+# if @REPLACE_ATANF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef atanf
+# define atanf rpl_atanf
+# endif
+_GL_FUNCDECL_RPL (atanf, float, (float x));
+_GL_CXXALIAS_RPL (atanf, float, (float x));
+# else
+# if !@HAVE_ATANF@
+# undef atanf
_GL_FUNCDECL_SYS (atanf, float, (float x));
-# endif
+# endif
_GL_CXXALIAS_SYS (atanf, float, (float x));
+# endif
_GL_CXXALIASWARN (atanf);
#elif defined GNULIB_POSIXCHECK
# undef atanf
#if @GNULIB_ATAN2F@
-# if !@HAVE_ATAN2F@
-# undef atan2f
+# if @REPLACE_ATAN2F@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef atan2f
+# define atan2f rpl_atan2f
+# endif
+_GL_FUNCDECL_RPL (atan2f, float, (float y, float x));
+_GL_CXXALIAS_RPL (atan2f, float, (float y, float x));
+# else
+# if !@HAVE_ATAN2F@
+# undef atan2f
_GL_FUNCDECL_SYS (atan2f, float, (float y, float x));
-# endif
+# endif
_GL_CXXALIAS_SYS (atan2f, float, (float y, float x));
+# endif
_GL_CXXALIASWARN (atan2f);
#elif defined GNULIB_POSIXCHECK
# undef atan2f
#if @GNULIB_CEIL@
# if @REPLACE_CEIL@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef ceil
# define ceil rpl_ceil
# endif
_GL_FUNCDECL_RPL (ceil, double, (double x));
#if @GNULIB_COSF@
-# if !@HAVE_COSF@
-# undef cosf
+# if @REPLACE_COSF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef cosf
+# define cosf rpl_cosf
+# endif
+_GL_FUNCDECL_RPL (cosf, float, (float x));
+_GL_CXXALIAS_RPL (cosf, float, (float x));
+# else
+# if !@HAVE_COSF@
+# undef cosf
_GL_FUNCDECL_SYS (cosf, float, (float x));
-# endif
+# endif
_GL_CXXALIAS_SYS (cosf, float, (float x));
+# endif
_GL_CXXALIASWARN (cosf);
#elif defined GNULIB_POSIXCHECK
# undef cosf
#if @GNULIB_COSHF@
-# if !@HAVE_COSHF@
-# undef coshf
+# if @REPLACE_COSHF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef coshf
+# define coshf rpl_coshf
+# endif
+_GL_FUNCDECL_RPL (coshf, float, (float x));
+_GL_CXXALIAS_RPL (coshf, float, (float x));
+# else
+# if !@HAVE_COSHF@
+# undef coshf
_GL_FUNCDECL_SYS (coshf, float, (float x));
-# endif
+# endif
_GL_CXXALIAS_SYS (coshf, float, (float x));
+# endif
_GL_CXXALIASWARN (coshf);
#elif defined GNULIB_POSIXCHECK
# undef coshf
#if @GNULIB_EXPF@
-# if !@HAVE_EXPF@
-# undef expf
+# if @REPLACE_EXPF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef expf
+# define expf rpl_expf
+# endif
+_GL_FUNCDECL_RPL (expf, float, (float x));
+_GL_CXXALIAS_RPL (expf, float, (float x));
+# else
+# if !@HAVE_EXPF@
+# undef expf
_GL_FUNCDECL_SYS (expf, float, (float x));
-# endif
+# endif
_GL_CXXALIAS_SYS (expf, float, (float x));
+# endif
_GL_CXXALIASWARN (expf);
#elif defined GNULIB_POSIXCHECK
# undef expf
#if @GNULIB_FLOOR@
# if @REPLACE_FLOOR@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef floor
# define floor rpl_floor
# endif
_GL_FUNCDECL_RPL (floor, double, (double x));
#if @GNULIB_FREXP@
# if @REPLACE_FREXP@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef frexp
# define frexp rpl_frexp
# endif
_GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2)));
# else
_GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr));
# endif
-_GL_CXXALIASWARN (frexp);
+_GL_CXXALIASWARN1 (frexp, double, (double x, int *expptr));
#elif defined GNULIB_POSIXCHECK
# undef frexp
/* Assume frexp is always declared. */
#if @GNULIB_SINF@
-# if !@HAVE_SINF@
-# undef sinf
+# if @REPLACE_SINF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef sinf
+# define sinf rpl_sinf
+# endif
+_GL_FUNCDECL_RPL (sinf, float, (float x));
+_GL_CXXALIAS_RPL (sinf, float, (float x));
+# else
+# if !@HAVE_SINF@
+ # undef sinf
_GL_FUNCDECL_SYS (sinf, float, (float x));
-# endif
+# endif
_GL_CXXALIAS_SYS (sinf, float, (float x));
+# endif
_GL_CXXALIASWARN (sinf);
#elif defined GNULIB_POSIXCHECK
# undef sinf
#if @GNULIB_SINHF@
-# if !@HAVE_SINHF@
-# undef sinhf
+# if @REPLACE_SINHF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef sinhf
+# define sinhf rpl_sinhf
+# endif
+_GL_FUNCDECL_RPL (sinhf, float, (float x));
+_GL_CXXALIAS_RPL (sinhf, float, (float x));
+# else
+# if !@HAVE_SINHF@
+# undef sinhf
_GL_FUNCDECL_SYS (sinhf, float, (float x));
-# endif
+# endif
_GL_CXXALIAS_SYS (sinhf, float, (float x));
+# endif
_GL_CXXALIASWARN (sinhf);
#elif defined GNULIB_POSIXCHECK
# undef sinhf
#if @GNULIB_SQRTF@
-# if !@HAVE_SQRTF@
-# undef sqrtf
+# if @REPLACE_SQRTF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef sqrtf
+# define sqrtf rpl_sqrtf
+# endif
+_GL_FUNCDECL_RPL (sqrtf, float, (float x));
+_GL_CXXALIAS_RPL (sqrtf, float, (float x));
+# else
+# if !@HAVE_SQRTF@
+# undef sqrtf
_GL_FUNCDECL_SYS (sqrtf, float, (float x));
-# endif
+# endif
_GL_CXXALIAS_SYS (sqrtf, float, (float x));
+# endif
_GL_CXXALIASWARN (sqrtf);
#elif defined GNULIB_POSIXCHECK
# undef sqrtf
#if @GNULIB_TANF@
-# if !@HAVE_TANF@
-# undef tanf
+# if @REPLACE_TANF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef tanf
+# define tanf rpl_tanf
+# endif
+_GL_FUNCDECL_RPL (tanf, float, (float x));
+_GL_CXXALIAS_RPL (tanf, float, (float x));
+# else
+# if !@HAVE_TANF@
+# undef tanf
_GL_FUNCDECL_SYS (tanf, float, (float x));
-# endif
+# endif
_GL_CXXALIAS_SYS (tanf, float, (float x));
+# endif
_GL_CXXALIASWARN (tanf);
#elif defined GNULIB_POSIXCHECK
# undef tanf
#if @GNULIB_TANHF@
-# if !@HAVE_TANHF@
-# undef tanhf
+# if @REPLACE_TANHF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef tanhf
+# define tanhf rpl_tanhf
+# endif
+_GL_FUNCDECL_RPL (tanhf, float, (float x));
+_GL_CXXALIAS_RPL (tanhf, float, (float x));
+# else
+# if !@HAVE_TANHF@
+# undef tanhf
_GL_FUNCDECL_SYS (tanhf, float, (float x));
-# endif
+# endif
_GL_CXXALIAS_SYS (tanhf, float, (float x));
+# endif
_GL_CXXALIASWARN (tanhf);
#elif defined GNULIB_POSIXCHECK
# undef tanhf
#if @GNULIB_TRUNCF@
# if @REPLACE_TRUNCF@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef truncf
# define truncf rpl_truncf
# endif
_GL_FUNCDECL_RPL (truncf, float, (float x));
#if @GNULIB_TRUNC@
# if @REPLACE_TRUNC@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef trunc
# define trunc rpl_trunc
# endif
_GL_FUNCDECL_RPL (trunc, double, (double x));
gl_isfinitef (x))
# endif
# ifdef __cplusplus
-# ifdef isfinite
+# if defined isfinite || defined GNULIB_NAMESPACE
_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite)
# undef isfinite
_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite)
gl_isinff (x))
# endif
# ifdef __cplusplus
-# ifdef isinf
+# if defined isinf || defined GNULIB_NAMESPACE
_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf)
# undef isinf
_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf)
__builtin_isnanf ((float)(x)))
# endif
# ifdef __cplusplus
-# ifdef isnan
+# if defined isnan || defined GNULIB_NAMESPACE
_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan)
# undef isnan
_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan)
#if @GNULIB_SIGNBIT@
-# if @REPLACE_SIGNBIT_USING_GCC@
+# if (@REPLACE_SIGNBIT_USING_GCC@ \
+ && (!defined __cplusplus || __cplusplus < 201103))
# undef signbit
/* GCC 4.0 and newer provides three built-ins for signbit. */
# define signbit(x) \
gl_signbitf (x))
# endif
# ifdef __cplusplus
-# ifdef signbit
+# if defined signbit || defined GNULIB_NAMESPACE
_GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit)
# undef signbit
_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit)
/* Convert multibyte character to wide character.
- Copyright (C) 1999-2002, 2005-2013 Free Software Foundation, Inc.
+ Copyright (C) 1999-2002, 2005-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
/* Specification. */
#include <wchar.h>
+#if C_LOCALE_MAYBE_EILSEQ
+# include "hard-locale.h"
+# include <locale.h>
+#endif
+
#if GNULIB_defined_mbstate_t
/* Implement mbrtowc() on top of mbtowc(). */
size_t
rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
{
-# if MBRTOWC_NULL_ARG2_BUG || MBRTOWC_RETVAL_BUG
+ size_t ret;
+ wchar_t wc;
+
+# if MBRTOWC_NULL_ARG2_BUG || MBRTOWC_RETVAL_BUG || MBRTOWC_EMPTY_INPUT_BUG
if (s == NULL)
{
pwc = NULL;
}
# endif
+# if MBRTOWC_EMPTY_INPUT_BUG
+ if (n == 0)
+ return (size_t) -2;
+# endif
+
+ if (! pwc)
+ pwc = &wc;
+
# if MBRTOWC_RETVAL_BUG
{
static mbstate_t internal_state;
size_t count = 0;
for (; n > 0; s++, n--)
{
- wchar_t wc;
- size_t ret = mbrtowc (&wc, s, 1, ps);
+ ret = mbrtowc (&wc, s, 1, ps);
if (ret == (size_t)(-1))
return (size_t)(-1);
if (ret != (size_t)(-2))
{
/* The multibyte character has been completed. */
- if (pwc != NULL)
- *pwc = wc;
+ *pwc = wc;
return (wc == 0 ? 0 : count);
}
}
}
# endif
-# if MBRTOWC_NUL_RETVAL_BUG
- {
- wchar_t wc;
- size_t ret = mbrtowc (&wc, s, n, ps);
-
- if (ret != (size_t)(-1) && ret != (size_t)(-2))
- {
- if (pwc != NULL)
- *pwc = wc;
- if (wc == 0)
- ret = 0;
- }
- return ret;
- }
-# else
- {
-# if MBRTOWC_NULL_ARG1_BUG
- wchar_t dummy;
+ ret = mbrtowc (pwc, s, n, ps);
- if (pwc == NULL)
- pwc = &dummy;
-# endif
+# if MBRTOWC_NUL_RETVAL_BUG
+ if (ret < (size_t) -2 && !*pwc)
+ return 0;
+# endif
- return mbrtowc (pwc, s, n, ps);
- }
+# if C_LOCALE_MAYBE_EILSEQ
+ if ((size_t) -2 <= ret && n != 0 && ! hard_locale (LC_CTYPE))
+ {
+ unsigned char uc = *s;
+ *pwc = uc;
+ return 1;
+ }
# endif
+
+ return ret;
}
#endif
/* Test for initial conversion state.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
/* Convert multibyte character to wide character.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
/* Convert multibyte character to wide character.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
-/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2013
+/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2016
Free Software Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
-/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2013
+/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2016
Free Software Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
/* Scan memory for the first of two bytes.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
--- /dev/null
+/* MIN, MAX macros.
+ Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2016 Free Software
+ Foundation, Inc.
+
+ This program is free software; you can redistribute 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 _MINMAX_H
+#define _MINMAX_H
+
+/* Note: MIN, MAX are also defined in <sys/param.h> on some systems
+ (glibc, IRIX, HP-UX, OSF/1). Therefore you might get warnings about
+ MIN, MAX macro redefinitions on some systems; the workaround is to
+ #include this file as the last one among the #include list. */
+
+/* Before we define the following symbols we get the <limits.h> file
+ since otherwise we get redefinitions on some systems if <limits.h> is
+ included after this file. Likewise for <sys/param.h>.
+ If more than one of these system headers define MIN and MAX, pick just
+ one of the headers (because the definitions most likely are the same). */
+#if HAVE_MINMAX_IN_LIMITS_H
+# include <limits.h>
+#elif HAVE_MINMAX_IN_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+
+/* Note: MIN and MAX should be used with two arguments of the
+ same type. They might not return the minimum and maximum of their two
+ arguments, if the arguments have different types or have unusual
+ floating-point values. For example, on a typical host with 32-bit 'int',
+ 64-bit 'long long', and 64-bit IEEE 754 'double' types:
+
+ MAX (-1, 2147483648) returns 4294967295.
+ MAX (9007199254740992.0, 9007199254740993) returns 9007199254740992.0.
+ MAX (NaN, 0.0) returns 0.0.
+ MAX (+0.0, -0.0) returns -0.0.
+
+ and in each case the answer is in some sense bogus. */
+
+/* MAX(a,b) returns the maximum of A and B. */
+#ifndef MAX
+# define MAX(a,b) ((a) > (b) ? (a) : (b))
+#endif
+
+/* MIN(a,b) returns the minimum of A and B. */
+#ifndef MIN
+# define MIN(a,b) ((a) < (b) ? (a) : (b))
+#endif
+
+#endif /* _MINMAX_H */
-/* Copyright (C) 1999, 2001-2003, 2006-2007, 2009-2013 Free Software
+/* Copyright (C) 1999, 2001-2003, 2006-2007, 2009-2016 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
/* Invoke mkstemp, but avoid some glitches.
- Copyright (C) 2005-2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2013 Free Software
+/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2016 Free Software
Foundation, Inc.
This file is derived from the one in the GNU C Library.
/* Invalid parameter handler for MSVC runtime libraries.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Invalid parameter handler for MSVC runtime libraries.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Wrappers that don't throw invalid parameter notifications
with MSVC runtime libraries.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Wrappers that don't throw invalid parameter notifications
with MSVC runtime libraries.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* nl_langinfo() replacement: query locale dependent information.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Specification. */
#include <langinfo.h>
+#include <locale.h>
+#include <string.h>
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# define WIN32_LEAN_AND_MEAN /* avoid including junk */
+# include <windows.h>
+# include <stdio.h>
+#endif
+
+/* Return the codeset of the current locale, if this is easily deducible.
+ Otherwise, return "". */
+static char *
+ctype_codeset (void)
+{
+ static char buf[2 + 10 + 1];
+ char const *locale = setlocale (LC_CTYPE, NULL);
+ char *codeset = buf;
+ size_t codesetlen;
+ codeset[0] = '\0';
+
+ if (locale && locale[0])
+ {
+ /* If the locale name contains an encoding after the dot, return it. */
+ char *dot = strchr (locale, '.');
+
+ if (dot)
+ {
+ /* Look for the possible @... trailer and remove it, if any. */
+ char *codeset_start = dot + 1;
+ char const *modifier = strchr (codeset_start, '@');
+
+ if (! modifier)
+ codeset = codeset_start;
+ else
+ {
+ codesetlen = modifier - codeset_start;
+ if (codesetlen < sizeof buf)
+ {
+ codeset = memcpy (buf, codeset_start, codesetlen);
+ codeset[codesetlen] = '\0';
+ }
+ }
+ }
+ }
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* If setlocale is successful, it returns the number of the
+ codepage, as a string. Otherwise, fall back on Windows API
+ GetACP, which returns the locale's codepage as a number (although
+ this doesn't change according to what the 'setlocale' call specified).
+ Either way, prepend "CP" to make it a valid codeset name. */
+ codesetlen = strlen (codeset);
+ if (0 < codesetlen && codesetlen < sizeof buf - 2)
+ memmove (buf + 2, codeset, codesetlen + 1);
+ else
+ sprintf (buf + 2, "%u", GetACP ());
+ codeset = memcpy (buf, "CP", 2);
+#endif
+ return codeset;
+}
+
+
#if REPLACE_NL_LANGINFO
/* Override nl_langinfo with support for added nl_item values. */
-# include <locale.h>
-# include <string.h>
-
# undef nl_langinfo
char *
{
# if GNULIB_defined_CODESET
case CODESET:
- {
- const char *locale;
- static char buf[2 + 10 + 1];
-
- locale = setlocale (LC_CTYPE, NULL);
- if (locale != NULL && locale[0] != '\0')
- {
- /* If the locale name contains an encoding after the dot, return
- it. */
- const char *dot = strchr (locale, '.');
-
- if (dot != NULL)
- {
- const char *modifier;
-
- dot++;
- /* Look for the possible @... trailer and remove it, if any. */
- modifier = strchr (dot, '@');
- if (modifier == NULL)
- return dot;
- if (modifier - dot < sizeof (buf))
- {
- memcpy (buf, dot, modifier - dot);
- buf [modifier - dot] = '\0';
- return buf;
- }
- }
- }
- return "";
- }
+ return ctype_codeset ();
# endif
# if GNULIB_defined_T_FMT_AMPM
case T_FMT_AMPM:
- return "%I:%M:%S %p";
+ return (char *) "%I:%M:%S %p";
# endif
# if GNULIB_defined_ERA
case ERA:
/* The format is not standardized. In glibc it is a sequence of strings
of the form "direction:offset:start_date:end_date:era_name:era_format"
with an empty string at the end. */
- return "";
+ return (char *) "";
case ERA_D_FMT:
/* The %Ex conversion in strftime behaves like %x if the locale does not
have an alternative time format. */
case ALT_DIGITS:
/* The format is not standardized. In glibc it is a sequence of 10
strings, appended in memory. */
- return "\0\0\0\0\0\0\0\0\0\0";
+ return (char *) "\0\0\0\0\0\0\0\0\0\0";
# endif
# if GNULIB_defined_YESEXPR || !FUNC_NL_LANGINFO_YESEXPR_WORKS
case YESEXPR:
- return "^[yY]";
+ return (char *) "^[yY]";
case NOEXPR:
- return "^[nN]";
+ return (char *) "^[nN]";
# endif
default:
break;
#else
-/* Provide nl_langinfo from scratch. */
-
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Provide nl_langinfo from scratch, either for native MS-Windows, or
+ for old Unix platforms without locales, such as Linux libc5 or
+ BeOS. */
-/* Native Windows platforms. */
-
-# define WIN32_LEAN_AND_MEAN /* avoid including junk */
-# include <windows.h>
-
-# include <stdio.h>
-
-# else
-
-/* An old Unix platform without locales, such as Linux libc5 or BeOS. */
-
-# endif
-
-# include <locale.h>
+# include <time.h>
char *
nl_langinfo (nl_item item)
{
+ static char nlbuf[100];
+ struct tm tmm = { 0 };
+
switch (item)
{
/* nl_langinfo items of the LC_CTYPE category */
case CODESET:
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
{
- static char buf[2 + 10 + 1];
-
- /* The Windows API has a function returning the locale's codepage as
- a number. */
- sprintf (buf, "CP%u", GetACP ());
- return buf;
+ char *codeset = ctype_codeset ();
+ if (*codeset)
+ return codeset;
}
-# elif defined __BEOS__
- return "UTF-8";
+# ifdef __BEOS__
+ return (char *) "UTF-8";
# else
- return "ISO-8859-1";
+ return (char *) "ISO-8859-1";
# endif
/* nl_langinfo items of the LC_NUMERIC category */
case RADIXCHAR:
return localeconv () ->decimal_point;
case THOUSEP:
return localeconv () ->thousands_sep;
+ case GROUPING:
+ return localeconv () ->grouping;
/* nl_langinfo items of the LC_TIME category.
TODO: Really use the locale. */
case D_T_FMT:
case ERA_D_T_FMT:
- return "%a %b %e %H:%M:%S %Y";
+ return (char *) "%a %b %e %H:%M:%S %Y";
case D_FMT:
case ERA_D_FMT:
- return "%m/%d/%y";
+ return (char *) "%m/%d/%y";
case T_FMT:
case ERA_T_FMT:
- return "%H:%M:%S";
+ return (char *) "%H:%M:%S";
case T_FMT_AMPM:
- return "%I:%M:%S %p";
+ return (char *) "%I:%M:%S %p";
case AM_STR:
- return "AM";
+ if (!strftime (nlbuf, sizeof nlbuf, "%p", &tmm))
+ return (char *) "AM";
+ return nlbuf;
case PM_STR:
- return "PM";
+ tmm.tm_hour = 12;
+ if (!strftime (nlbuf, sizeof nlbuf, "%p", &tmm))
+ return (char *) "PM";
+ return nlbuf;
case DAY_1:
- return "Sunday";
case DAY_2:
- return "Monday";
case DAY_3:
- return "Tuesday";
case DAY_4:
- return "Wednesday";
case DAY_5:
- return "Thursday";
case DAY_6:
- return "Friday";
case DAY_7:
- return "Saturday";
+ {
+ static char const days[][sizeof "Wednesday"] = {
+ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday",
+ "Friday", "Saturday"
+ };
+ tmm.tm_wday = item - DAY_1;
+ if (!strftime (nlbuf, sizeof nlbuf, "%A", &tmm))
+ return (char *) days[item - DAY_1];
+ return nlbuf;
+ }
case ABDAY_1:
- return "Sun";
case ABDAY_2:
- return "Mon";
case ABDAY_3:
- return "Tue";
case ABDAY_4:
- return "Wed";
case ABDAY_5:
- return "Thu";
case ABDAY_6:
- return "Fri";
case ABDAY_7:
- return "Sat";
+ {
+ static char const abdays[][sizeof "Sun"] = {
+ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
+ };
+ tmm.tm_wday = item - ABDAY_1;
+ if (!strftime (nlbuf, sizeof nlbuf, "%a", &tmm))
+ return (char *) abdays[item - ABDAY_1];
+ return nlbuf;
+ }
case MON_1:
- return "January";
case MON_2:
- return "February";
case MON_3:
- return "March";
case MON_4:
- return "April";
case MON_5:
- return "May";
case MON_6:
- return "June";
case MON_7:
- return "July";
case MON_8:
- return "August";
case MON_9:
- return "September";
case MON_10:
- return "October";
case MON_11:
- return "November";
case MON_12:
- return "December";
+ {
+ static char const months[][sizeof "September"] = {
+ "January", "February", "March", "April", "May", "June", "July",
+ "September", "October", "November", "December"
+ };
+ tmm.tm_mon = item - MON_1;
+ if (!strftime (nlbuf, sizeof nlbuf, "%B", &tmm))
+ return (char *) months[item - MON_1];
+ return nlbuf;
+ }
case ABMON_1:
- return "Jan";
case ABMON_2:
- return "Feb";
case ABMON_3:
- return "Mar";
case ABMON_4:
- return "Apr";
case ABMON_5:
- return "May";
case ABMON_6:
- return "Jun";
case ABMON_7:
- return "Jul";
case ABMON_8:
- return "Aug";
case ABMON_9:
- return "Sep";
case ABMON_10:
- return "Oct";
case ABMON_11:
- return "Nov";
case ABMON_12:
- return "Dec";
+ {
+ static char const abmonths[][sizeof "Jan"] = {
+ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul",
+ "Sep", "Oct", "Nov", "Dec"
+ };
+ tmm.tm_mon = item - ABMON_1;
+ if (!strftime (nlbuf, sizeof nlbuf, "%b", &tmm))
+ return (char *) abmonths[item - ABMON_1];
+ return nlbuf;
+ }
case ERA:
- return "";
+ return (char *) "";
case ALT_DIGITS:
- return "\0\0\0\0\0\0\0\0\0\0";
- /* nl_langinfo items of the LC_MONETARY category
- TODO: Really use the locale. */
+ return (char *) "\0\0\0\0\0\0\0\0\0\0";
+ /* nl_langinfo items of the LC_MONETARY category. */
case CRNCYSTR:
- return "-";
+ return localeconv () ->currency_symbol;
+ case INT_CURR_SYMBOL:
+ return localeconv () ->int_curr_symbol;
+ case MON_DECIMAL_POINT:
+ return localeconv () ->mon_decimal_point;
+ case MON_THOUSANDS_SEP:
+ return localeconv () ->mon_thousands_sep;
+ case MON_GROUPING:
+ return localeconv () ->mon_grouping;
+ case POSITIVE_SIGN:
+ return localeconv () ->positive_sign;
+ case NEGATIVE_SIGN:
+ return localeconv () ->negative_sign;
+ case FRAC_DIGITS:
+ return & localeconv () ->frac_digits;
+ case INT_FRAC_DIGITS:
+ return & localeconv () ->int_frac_digits;
+ case P_CS_PRECEDES:
+ return & localeconv () ->p_cs_precedes;
+ case N_CS_PRECEDES:
+ return & localeconv () ->n_cs_precedes;
+ case P_SEP_BY_SPACE:
+ return & localeconv () ->p_sep_by_space;
+ case N_SEP_BY_SPACE:
+ return & localeconv () ->n_sep_by_space;
+ case P_SIGN_POSN:
+ return & localeconv () ->p_sign_posn;
+ case N_SIGN_POSN:
+ return & localeconv () ->n_sign_posn;
/* nl_langinfo items of the LC_MESSAGES category
TODO: Really use the locale. */
case YESEXPR:
- return "^[yY]";
+ return (char *) "^[yY]";
case NOEXPR:
- return "^[nN]";
+ return (char *) "^[nN]";
default:
- return "";
+ return (char *) "";
}
}
/* obstack.c - subroutines used implicitly by object stack macros
+ Copyright (C) 1988-2016 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
- Copyright (C) 1988-1994, 1996-2006, 2009-2013 Free Software Foundation, Inc.
+ 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 free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either 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 the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
- 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
# include <obstack.h>
-# include <shlib-compat.h>
#else
# include <config.h>
# include "obstack.h"
#endif
-/* NOTE BEFORE MODIFYING THIS FILE: This version number must be
- incremented whenever callers compiled using an old obstack.h can no
- longer properly call the functions in this obstack.c. */
-#define OBSTACK_INTERFACE_VERSION 1
+/* NOTE BEFORE MODIFYING THIS FILE: _OBSTACK_INTERFACE_VERSION in
+ obstack.h must be incremented whenever callers compiled using an old
+ obstack.h can no longer properly call the functions in this file. */
/* Comment out all this code if we are using the GNU C Library, and are not
actually compiling the library itself, and the installed library
(especially if it is a shared library). Rather than having every GNU
program understand 'configure --with-gnu-libc' and omit the object
files, it is simpler to just do this in the source for each such file. */
-
-#include <stdio.h> /* Random thing to get __GNU_LIBRARY__. */
#if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
# include <gnu-versions.h>
-# if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
-# define ELIDE_CODE
+# if (_GNU_OBSTACK_INTERFACE_VERSION == _OBSTACK_INTERFACE_VERSION \
+ || (_GNU_OBSTACK_INTERFACE_VERSION == 1 \
+ && _OBSTACK_INTERFACE_VERSION == 2 \
+ && defined SIZEOF_INT && defined SIZEOF_SIZE_T \
+ && SIZEOF_INT == SIZEOF_SIZE_T))
+# define _OBSTACK_ELIDE_CODE
# endif
#endif
-#include <stddef.h>
-
-#ifndef ELIDE_CODE
-
+#ifndef _OBSTACK_ELIDE_CODE
+/* If GCC, or if an oddball (testing?) host that #defines __alignof__,
+ use the already-supplied __alignof__. Otherwise, this must be Gnulib
+ (as glibc assumes GCC); defer to Gnulib's alignof_type. */
+# if !defined __GNUC__ && !defined __alignof__
+# include <alignof.h>
+# define __alignof__(type) alignof_type (type)
+# endif
+# include <stdlib.h>
# include <stdint.h>
-/* Determine default alignment. */
-union fooround
-{
- uintmax_t i;
- long double d;
- void *p;
-};
-struct fooalign
-{
- char c;
- union fooround u;
-};
-/* If malloc were really smart, it would round addresses to DEFAULT_ALIGNMENT.
- But in fact it might be less smart and round addresses to as much as
- DEFAULT_ROUNDING. So we prepare for it to do that. */
-enum
- {
- DEFAULT_ALIGNMENT = offsetof (struct fooalign, u),
- DEFAULT_ROUNDING = sizeof (union fooround)
- };
-
-/* 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. */
-# ifndef COPYING_UNIT
-# define COPYING_UNIT int
+# ifndef MAX
+# define MAX(a,b) ((a) > (b) ? (a) : (b))
# endif
+/* Determine default alignment. */
-/* 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 _Noreturn void print_and_abort (void);
-void (*obstack_alloc_failed_handler) (void) = print_and_abort;
+/* If malloc were really smart, it would round addresses to DEFAULT_ALIGNMENT.
+ But in fact it might be less smart and round addresses to as much as
+ DEFAULT_ROUNDING. So we prepare for it to do that.
+
+ DEFAULT_ALIGNMENT cannot be an enum constant; see gnulib's alignof.h. */
+#define DEFAULT_ALIGNMENT MAX (__alignof__ (long double), \
+ MAX (__alignof__ (uintmax_t), \
+ __alignof__ (void *)))
+#define DEFAULT_ROUNDING MAX (sizeof (long double), \
+ MAX (sizeof (uintmax_t), \
+ sizeof (void *)))
+
+/* Call functions with either the traditional malloc/free calling
+ interface, or the mmalloc/mfree interface (that adds an extra first
+ argument), based on the value of use_extra_arg. */
+
+static void *
+call_chunkfun (struct obstack *h, size_t size)
+{
+ if (h->use_extra_arg)
+ return h->chunkfun.extra (h->extra_arg, size);
+ else
+ return h->chunkfun.plain (size);
+}
-/* Exit value used when 'print_and_abort' is used. */
-# include <stdlib.h>
-# ifdef _LIBC
-int obstack_exit_failure = EXIT_FAILURE;
-# else
-# include "exitfail.h"
-# define obstack_exit_failure exit_failure
-# endif
+static void
+call_freefun (struct obstack *h, void *old_chunk)
+{
+ if (h->use_extra_arg)
+ h->freefun.extra (h->extra_arg, old_chunk);
+ else
+ h->freefun.plain (old_chunk);
+}
-# ifdef _LIBC
-# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4)
-/* A looong time ago (before 1994, anyway; we're not sure) this global variable
- was used by non-GNU-C macros to avoid multiple evaluation. The GNU C
- library still exports it because somebody might use it. */
-struct obstack *_obstack_compat;
-compat_symbol (libc, _obstack_compat, _obstack, GLIBC_2_0);
-# endif
-# endif
-/* Define a macro that either calls functions with the traditional malloc/free
- calling interface, or calls functions with the mmalloc/mfree interface
- (that adds an extra first argument), based on the state of use_extra_arg.
- For free, do not use ?:, since some compilers, like the MIPS compilers,
- do not allow (expr) ? void : void. */
-
-# define CALL_CHUNKFUN(h, size) \
- (((h) -> use_extra_arg) \
- ? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
- : (*(struct _obstack_chunk *(*) (long)) (h)->chunkfun) ((size)))
-
-# define CALL_FREEFUN(h, old_chunk) \
- do { \
- if ((h) -> use_extra_arg) \
- (*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
- else \
- (*(void (*) (void *)) (h)->freefun) ((old_chunk)); \
- } while (0)
-
-\f
/* Initialize an obstack H for use. Specify chunk size SIZE (0 means default).
Objects start on multiples of ALIGNMENT (0 means use default).
- CHUNKFUN is the function to use to allocate chunks,
- and FREEFUN the function to free them.
Return nonzero if successful, calls obstack_alloc_failed_handler if
allocation fails. */
-int
-_obstack_begin (struct obstack *h,
- int size, int alignment,
- void *(*chunkfun) (long),
- void (*freefun) (void *))
+static int
+_obstack_begin_worker (struct obstack *h,
+ _OBSTACK_SIZE_T size, _OBSTACK_SIZE_T alignment)
{
- register struct _obstack_chunk *chunk; /* points to new chunk */
+ struct _obstack_chunk *chunk; /* points to new chunk */
if (alignment == 0)
alignment = DEFAULT_ALIGNMENT;
size = 4096 - extra;
}
- h->chunkfun = (struct _obstack_chunk * (*)(void *, long)) chunkfun;
- h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
h->chunk_size = size;
h->alignment_mask = alignment - 1;
- h->use_extra_arg = 0;
- chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size);
+ chunk = h->chunk = call_chunkfun (h, h->chunk_size);
if (!chunk)
(*obstack_alloc_failed_handler) ();
h->next_free = h->object_base = __PTR_ALIGN ((char *) chunk, chunk->contents,
alignment - 1);
- h->chunk_limit = chunk->limit
- = (char *) chunk + h->chunk_size;
+ h->chunk_limit = chunk->limit = (char *) chunk + h->chunk_size;
chunk->prev = 0;
/* The initial chunk now contains no empty object. */
h->maybe_empty_object = 0;
}
int
-_obstack_begin_1 (struct obstack *h, int size, int alignment,
- void *(*chunkfun) (void *, long),
+_obstack_begin (struct obstack *h,
+ _OBSTACK_SIZE_T size, _OBSTACK_SIZE_T alignment,
+ void *(*chunkfun) (size_t),
+ void (*freefun) (void *))
+{
+ h->chunkfun.plain = chunkfun;
+ h->freefun.plain = freefun;
+ h->use_extra_arg = 0;
+ return _obstack_begin_worker (h, size, alignment);
+}
+
+int
+_obstack_begin_1 (struct obstack *h,
+ _OBSTACK_SIZE_T size, _OBSTACK_SIZE_T alignment,
+ void *(*chunkfun) (void *, size_t),
void (*freefun) (void *, void *),
void *arg)
{
- register struct _obstack_chunk *chunk; /* points to new chunk */
-
- if (alignment == 0)
- alignment = DEFAULT_ALIGNMENT;
- if (size == 0)
- /* Default size is what GNU malloc can fit in a 4096-byte block. */
- {
- /* 12 is sizeof (mhead) and 4 is EXTRA from GNU malloc.
- Use the values for range checking, because if range checking is off,
- the extra bytes won't be missed terribly, but if range checking is on
- and we used a larger request, a whole extra 4096 bytes would be
- allocated.
-
- These number are irrelevant to the new GNU malloc. I suspect it is
- less sensitive to the size of the request. */
- int extra = ((((12 + DEFAULT_ROUNDING - 1) & ~(DEFAULT_ROUNDING - 1))
- + 4 + DEFAULT_ROUNDING - 1)
- & ~(DEFAULT_ROUNDING - 1));
- size = 4096 - extra;
- }
-
- h->chunkfun = (struct _obstack_chunk * (*)(void *,long)) chunkfun;
- h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
- h->chunk_size = size;
- h->alignment_mask = alignment - 1;
+ h->chunkfun.extra = chunkfun;
+ h->freefun.extra = freefun;
h->extra_arg = arg;
h->use_extra_arg = 1;
-
- chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size);
- if (!chunk)
- (*obstack_alloc_failed_handler) ();
- h->next_free = h->object_base = __PTR_ALIGN ((char *) chunk, chunk->contents,
- alignment - 1);
- h->chunk_limit = chunk->limit
- = (char *) chunk + h->chunk_size;
- chunk->prev = 0;
- /* The initial chunk now contains no empty object. */
- h->maybe_empty_object = 0;
- h->alloc_failed = 0;
- return 1;
+ return _obstack_begin_worker (h, size, alignment);
}
/* Allocate a new current chunk for the obstack *H
to the beginning of the new one. */
void
-_obstack_newchunk (struct obstack *h, int length)
+_obstack_newchunk (struct obstack *h, _OBSTACK_SIZE_T length)
{
- register struct _obstack_chunk *old_chunk = h->chunk;
- register struct _obstack_chunk *new_chunk;
- register long new_size;
- register long obj_size = h->next_free - h->object_base;
- register long i;
- long already;
+ struct _obstack_chunk *old_chunk = h->chunk;
+ struct _obstack_chunk *new_chunk = 0;
+ size_t obj_size = h->next_free - h->object_base;
char *object_base;
/* Compute size for new chunk. */
- new_size = (obj_size + length) + (obj_size >> 3) + h->alignment_mask + 100;
+ size_t sum1 = obj_size + length;
+ size_t sum2 = sum1 + h->alignment_mask;
+ size_t new_size = sum2 + (obj_size >> 3) + 100;
+ if (new_size < sum2)
+ new_size = sum2;
if (new_size < h->chunk_size)
new_size = h->chunk_size;
/* Allocate and initialize the new chunk. */
- new_chunk = CALL_CHUNKFUN (h, new_size);
+ if (obj_size <= sum1 && sum1 <= sum2)
+ new_chunk = call_chunkfun (h, new_size);
if (!new_chunk)
- (*obstack_alloc_failed_handler) ();
+ (*obstack_alloc_failed_handler)();
h->chunk = new_chunk;
new_chunk->prev = old_chunk;
new_chunk->limit = h->chunk_limit = (char *) new_chunk + new_size;
object_base =
__PTR_ALIGN ((char *) new_chunk, new_chunk->contents, h->alignment_mask);
- /* Move the existing object to the new chunk.
- Word at a time is fast and is safe if the object
- is sufficiently aligned. */
- if (h->alignment_mask + 1 >= DEFAULT_ALIGNMENT)
- {
- for (i = obj_size / sizeof (COPYING_UNIT) - 1;
- i >= 0; i--)
- ((COPYING_UNIT *)object_base)[i]
- = ((COPYING_UNIT *)h->object_base)[i];
- /* We used to copy the odd few remaining bytes as one extra COPYING_UNIT,
- but that can cross a page boundary on a machine
- which does not do strict alignment for COPYING_UNITS. */
- already = obj_size / sizeof (COPYING_UNIT) * sizeof (COPYING_UNIT);
- }
- else
- already = 0;
- /* Copy remaining bytes one by one. */
- for (i = already; i < obj_size; i++)
- object_base[i] = h->object_base[i];
+ /* Move the existing object to the new chunk. */
+ memcpy (object_base, h->object_base, obj_size);
/* If the object just copied was the only data in OLD_CHUNK,
free that chunk and remove it from the chain.
But not if that chunk might contain an empty object. */
- if (! h->maybe_empty_object
+ if (!h->maybe_empty_object
&& (h->object_base
== __PTR_ALIGN ((char *) old_chunk, old_chunk->contents,
h->alignment_mask)))
{
new_chunk->prev = old_chunk->prev;
- CALL_FREEFUN (h, old_chunk);
+ call_freefun (h, old_chunk);
}
h->object_base = object_base;
/* The new chunk certainly contains no empty object yet. */
h->maybe_empty_object = 0;
}
-# ifdef _LIBC
-libc_hidden_def (_obstack_newchunk)
-# endif
/* Return nonzero if object OBJ has been allocated from obstack H.
This is here for debugging.
/* Suppress -Wmissing-prototypes warning. We don't want to declare this in
obstack.h because it is just for debugging. */
-int _obstack_allocated_p (struct obstack *h, void *obj);
+int _obstack_allocated_p (struct obstack *h, void *obj) __attribute_pure__;
int
_obstack_allocated_p (struct obstack *h, void *obj)
{
- register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
- register struct _obstack_chunk *plp; /* point to previous chunk if any */
+ struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
+ struct _obstack_chunk *plp; /* point to previous chunk if any */
lp = (h)->chunk;
/* We use >= rather than > since the object cannot be exactly at
}
return lp != 0;
}
-\f
+
/* Free objects in obstack H, including OBJ and everything allocate
more recently than OBJ. If OBJ is zero, free everything in H. */
-# undef obstack_free
-
void
-__obstack_free (struct obstack *h, void *obj)
+_obstack_free (struct obstack *h, void *obj)
{
- register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
- register struct _obstack_chunk *plp; /* point to previous chunk if any */
+ struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
+ struct _obstack_chunk *plp; /* point to previous chunk if any */
lp = h->chunk;
/* We use >= because there cannot be an object at the beginning of a chunk.
while (lp != 0 && ((void *) lp >= obj || (void *) (lp)->limit < obj))
{
plp = lp->prev;
- CALL_FREEFUN (h, lp);
+ call_freefun (h, lp);
lp = plp;
/* If we switch chunks, we can't tell whether the new current
chunk contains an empty object, so assume that it may. */
abort ();
}
-# ifdef _LIBC
-/* Older versions of libc used a function _obstack_free intended to be
- called by non-GCC compilers. */
-strong_alias (obstack_free, _obstack_free)
-# endif
-\f
-int
+_OBSTACK_SIZE_T
_obstack_memory_used (struct obstack *h)
{
- register struct _obstack_chunk* lp;
- register int nbytes = 0;
+ struct _obstack_chunk *lp;
+ _OBSTACK_SIZE_T nbytes = 0;
for (lp = h->chunk; lp != 0; lp = lp->prev)
{
}
return nbytes;
}
-\f
+
+# ifndef _OBSTACK_NO_ERROR_HANDLER
/* Define the error handler. */
-# ifdef _LIBC
-# include <libintl.h>
-# else
-# include "gettext.h"
-# endif
-# ifndef _
-# define _(msgid) gettext (msgid)
-# endif
+# include <stdio.h>
-# ifdef _LIBC
-# include <libio/iolibio.h>
-# endif
+/* Exit value used when 'print_and_abort' is used. */
+# ifdef _LIBC
+int obstack_exit_failure = EXIT_FAILURE;
+# else
+# include "exitfail.h"
+# define obstack_exit_failure exit_failure
+# endif
+
+# ifdef _LIBC
+# include <libintl.h>
+# else
+# include "gettext.h"
+# endif
+# ifndef _
+# define _(msgid) gettext (msgid)
+# endif
+
+# ifdef _LIBC
+# include <libio/iolibio.h>
+# endif
static _Noreturn void
print_and_abort (void)
happen because the "memory exhausted" message appears in other places
like this and the translation should be reused instead of creating
a very similar string which requires a separate translation. */
-# ifdef _LIBC
+# ifdef _LIBC
(void) __fxprintf (NULL, "%s\n", _("memory exhausted"));
-# else
+# else
fprintf (stderr, "%s\n", _("memory exhausted"));
-# endif
+# endif
exit (obstack_exit_failure);
}
-#endif /* !ELIDE_CODE */
+/* 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'. */
+__attribute_noreturn__ void (*obstack_alloc_failed_handler) (void)
+ = print_and_abort;
+# endif /* !_OBSTACK_NO_ERROR_HANDLER */
+#endif /* !_OBSTACK_ELIDE_CODE */
/* obstack.h - object stack macros
- Copyright (C) 1988-1994, 1996-1999, 2003-2006, 2009-2013 Free Software
- Foundation, Inc.
+ Copyright (C) 1988-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ 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, see <http://www.gnu.org/licenses/>. */
+ 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/>. */
/* Summary:
-All the apparent functions defined here are macros. The idea
-is that you would use these pre-tested macros to solve a
-very specific set of problems, and they would run fast.
-Caution: no side-effects in arguments please!! They may be
-evaluated MANY times!!
-
-These macros operate a stack of objects. Each object starts life
-small, and may grow to maturity. (Consider building a word syllable
-by syllable.) An object can move while it is growing. Once it has
-been "finished" it never changes address again. So the "top of the
-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
-them before using any obstack macros.
-
-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.
-
-One motivation for this package is the problem of growing char strings
-in symbol tables. Unless you are "fascist pig with a read-only mind"
---Gosper's immortal quote from HAKMEM item 154, out of context--you
-would not like to put any arbitrary upper limit on the length of your
-symbols.
-
-In practice this often means you will build many short symbols and a
-few long symbols. At the time you are reading a symbol you don't know
-how long it is. One traditional method is to read a symbol into a
-buffer, realloc()ating the buffer every time you try to read a symbol
-that is longer than the buffer. This is beaut, but you still will
-want to copy the symbol from the buffer to a more permanent
-symbol-table entry say about half the time.
-
-With obstacks, you can work differently. Use one obstack for all symbol
-names. As you read a symbol, grow the name in the obstack gradually.
-When the name is complete, finalize it. Then, if the symbol exists already,
-free the newly read name.
-
-The way we do this is to take a large chunk, allocating memory from
-low addresses. When you want to build a symbol in the chunk you just
-add chars above the current "high water mark" in the chunk. When you
-have finished adding chars, because you got to the end of the symbol,
-you know how long the chars are, and you can create a new object.
-Mostly the chars will not burst over the highest address of the chunk,
-because you would typically expect a chunk to be (say) 100 times as
-long as an average object.
-
-In case that isn't clear, when we have enough chars to make up
-the object, THEY ARE ALREADY CONTIGUOUS IN THE CHUNK (guaranteed)
-so we just point to it where it lies. No moving of chars is
-needed and this is the second win: potentially long strings need
-never be explicitly shuffled. Once an object is formed, it does not
-change its address during its lifetime.
-
-When the chars burst over a chunk boundary, we allocate a larger
-chunk, and then copy the partly formed object from the end of the old
-chunk to the beginning of the new larger chunk. We then carry on
-accreting characters to the end of the object as we normally would.
-
-A special macro is provided to add a single char at a time to a
-growing object. This allows the use of register variables, which
-break the ordinary 'growth' macro.
-
-Summary:
+ All the apparent functions defined here are macros. The idea
+ is that you would use these pre-tested macros to solve a
+ very specific set of problems, and they would run fast.
+ Caution: no side-effects in arguments please!! They may be
+ evaluated MANY times!!
+
+ These macros operate a stack of objects. Each object starts life
+ small, and may grow to maturity. (Consider building a word syllable
+ by syllable.) An object can move while it is growing. Once it has
+ been "finished" it never changes address again. So the "top of the
+ 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
+ them before using any obstack macros.
+
+ 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.
+
+ One motivation for this package is the problem of growing char strings
+ in symbol tables. Unless you are "fascist pig with a read-only mind"
+ --Gosper's immortal quote from HAKMEM item 154, out of context--you
+ would not like to put any arbitrary upper limit on the length of your
+ symbols.
+
+ In practice this often means you will build many short symbols and a
+ few long symbols. At the time you are reading a symbol you don't know
+ how long it is. One traditional method is to read a symbol into a
+ buffer, realloc()ating the buffer every time you try to read a symbol
+ that is longer than the buffer. This is beaut, but you still will
+ want to copy the symbol from the buffer to a more permanent
+ symbol-table entry say about half the time.
+
+ With obstacks, you can work differently. Use one obstack for all symbol
+ names. As you read a symbol, grow the name in the obstack gradually.
+ When the name is complete, finalize it. Then, if the symbol exists already,
+ free the newly read name.
+
+ The way we do this is to take a large chunk, allocating memory from
+ low addresses. When you want to build a symbol in the chunk you just
+ add chars above the current "high water mark" in the chunk. When you
+ have finished adding chars, because you got to the end of the symbol,
+ you know how long the chars are, and you can create a new object.
+ Mostly the chars will not burst over the highest address of the chunk,
+ because you would typically expect a chunk to be (say) 100 times as
+ long as an average object.
+
+ In case that isn't clear, when we have enough chars to make up
+ the object, THEY ARE ALREADY CONTIGUOUS IN THE CHUNK (guaranteed)
+ so we just point to it where it lies. No moving of chars is
+ needed and this is the second win: potentially long strings need
+ never be explicitly shuffled. Once an object is formed, it does not
+ change its address during its lifetime.
+
+ When the chars burst over a chunk boundary, we allocate a larger
+ chunk, and then copy the partly formed object from the end of the old
+ chunk to the beginning of the new larger chunk. We then carry on
+ accreting characters to the end of the object as we normally would.
+
+ A special macro is provided to add a single char at a time to a
+ growing object. This allows the use of register variables, which
+ break the ordinary 'growth' macro.
+
+ Summary:
We allocate large chunks.
We carve out one object at a time from the current chunk.
Once carved, an object never moves.
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.)
-*/
+ */
/* Don't do the contents of this file more than once. */
#ifndef _OBSTACK_H
#define _OBSTACK_H 1
-\f
-/* We need the type of a pointer subtraction. If __PTRDIFF_TYPE__ is
- defined, as with GNU C, use that; that way we don't pollute the
- namespace with <stddef.h>'s symbols. Otherwise, include <stddef.h>
- and use ptrdiff_t. */
-
-#ifdef __PTRDIFF_TYPE__
-# define PTR_INT_TYPE __PTRDIFF_TYPE__
+
+#ifndef _OBSTACK_INTERFACE_VERSION
+# define _OBSTACK_INTERFACE_VERSION 2
+#endif
+
+#include <stddef.h> /* For size_t and ptrdiff_t. */
+#include <string.h> /* For __GNU_LIBRARY__, and memcpy. */
+
+#if __STDC_VERSION__ < 199901L
+# define __FLEXIBLE_ARRAY_MEMBER 1
#else
-# include <stddef.h>
-# define PTR_INT_TYPE ptrdiff_t
+# define __FLEXIBLE_ARRAY_MEMBER
+#endif
+
+#if _OBSTACK_INTERFACE_VERSION == 1
+/* For binary compatibility with obstack version 1, which used "int"
+ and "long" for these two types. */
+# define _OBSTACK_SIZE_T unsigned int
+# define _CHUNK_SIZE_T unsigned long
+# define _OBSTACK_CAST(type, expr) ((type) (expr))
+#else
+/* Version 2 with sane types, especially for 64-bit hosts. */
+# define _OBSTACK_SIZE_T size_t
+# define _CHUNK_SIZE_T size_t
+# define _OBSTACK_CAST(type, expr) (expr)
#endif
/* If B is the base of an object addressed by P, return the result of
#define __BPTR_ALIGN(B, P, A) ((B) + (((P) - (B) + (A)) & ~(A)))
-/* Similar 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
+ and converted back again. If ptrdiff_t is narrower than a
pointer (e.g., the AS/400), play it safe and compute the alignment
relative to B. Otherwise, use the faster strategy of computing the
alignment relative to 0. */
-#define __PTR_ALIGN(B, P, A) \
- __BPTR_ALIGN (sizeof (PTR_INT_TYPE) < sizeof (void *) ? (B) : (char *) 0, \
+#define __PTR_ALIGN(B, P, A) \
+ __BPTR_ALIGN (sizeof (ptrdiff_t) < sizeof (void *) ? (B) : (char *) 0, \
P, A)
-#include <string.h>
+#ifndef __attribute_pure__
+# define __attribute_pure__ _GL_ATTRIBUTE_PURE
+#endif
+
+/* Not the same as _Noreturn, since it also works with function pointers. */
+#ifndef __attribute_noreturn__
+# if 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C
+# define __attribute_noreturn__ __attribute__ ((__noreturn__))
+# else
+# define __attribute_noreturn__
+# endif
+#endif
#ifdef __cplusplus
extern "C" {
struct _obstack_chunk /* Lives at front of each chunk. */
{
- char *limit; /* 1 past end of this chunk */
+ char *limit; /* 1 past end of this chunk */
struct _obstack_chunk *prev; /* address of prior chunk or NULL */
- char contents[4]; /* objects begin here */
+ char contents[__FLEXIBLE_ARRAY_MEMBER]; /* objects begin here */
};
struct obstack /* control current object in current chunk */
{
- long chunk_size; /* preferred size to allocate chunks in */
+ _CHUNK_SIZE_T chunk_size; /* preferred size to allocate chunks in */
struct _obstack_chunk *chunk; /* address of current struct obstack_chunk */
- char *object_base; /* address of object we are building */
- char *next_free; /* where to add next char to current object */
- char *chunk_limit; /* address of char after current chunk */
+ char *object_base; /* address of object we are building */
+ char *next_free; /* where to add next char to current object */
+ char *chunk_limit; /* address of char after current chunk */
union
{
- PTR_INT_TYPE tempint;
- void *tempptr;
+ _OBSTACK_SIZE_T i;
+ void *p;
} 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
- casts to the prototypeless function type in all assignments,
- but having prototypes here quiets -Wstrict-prototypes. */
- struct _obstack_chunk *(*chunkfun) (void *, long);
- void (*freefun) (void *, struct _obstack_chunk *);
+ _OBSTACK_SIZE_T alignment_mask; /* Mask of alignment for each object. */
+
+ /* These prototypes vary based on 'use_extra_arg'. */
+ union
+ {
+ void *(*plain) (size_t);
+ void *(*extra) (void *, size_t);
+ } chunkfun;
+ union
+ {
+ void (*plain) (void *);
+ void (*extra) (void *, void *);
+ } freefun;
+
void *extra_arg; /* first arg for chunk alloc/dealloc funcs */
- unsigned use_extra_arg:1; /* chunk alloc/dealloc funcs take extra arg */
- unsigned maybe_empty_object:1;/* There is a possibility that the current
- chunk contains a zero-length object. This
- prevents freeing the chunk if we allocate
- a bigger chunk to replace it. */
- unsigned alloc_failed:1; /* No longer used, as we now call the failed
- handler on error, but retained for binary
- compatibility. */
+ unsigned use_extra_arg : 1; /* chunk alloc/dealloc funcs take extra arg */
+ unsigned maybe_empty_object : 1; /* There is a possibility that the current
+ chunk contains a zero-length object. This
+ prevents freeing the chunk if we allocate
+ a bigger chunk to replace it. */
+ unsigned alloc_failed : 1; /* No longer used, as we now call the failed
+ handler on error, but retained for binary
+ compatibility. */
};
/* Declare the external functions we use; they are in obstack.c. */
-extern void _obstack_newchunk (struct obstack *, int);
-extern int _obstack_begin (struct obstack *, int, int,
- void *(*) (long), void (*) (void *));
-extern int _obstack_begin_1 (struct obstack *, int, int,
- void *(*) (void *, long),
+extern void _obstack_newchunk (struct obstack *, _OBSTACK_SIZE_T);
+extern void _obstack_free (struct obstack *, void *);
+extern int _obstack_begin (struct obstack *,
+ _OBSTACK_SIZE_T, _OBSTACK_SIZE_T,
+ void *(*) (size_t), void (*) (void *));
+extern int _obstack_begin_1 (struct obstack *,
+ _OBSTACK_SIZE_T, _OBSTACK_SIZE_T,
+ void *(*) (void *, size_t),
void (*) (void *, void *), void *);
-extern int _obstack_memory_used (struct obstack *);
+extern _OBSTACK_SIZE_T _obstack_memory_used (struct obstack *)
+ __attribute_pure__;
-/* The default name of the function for freeing a chunk is 'obstack_free',
- but gnulib users can override this by defining '__obstack_free'. */
-#ifndef __obstack_free
-# define __obstack_free obstack_free
-#endif
-extern void __obstack_free (struct obstack *obstack, void *block);
-\f
/* 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);
+extern __attribute_noreturn__ void (*obstack_alloc_failed_handler) (void);
/* Exit value used when 'print_and_abort' is used. */
extern int obstack_exit_failure;
-\f
+
/* Pointer to beginning of object being allocated or to be allocated next.
Note that this might not be the final address of the object
because a new chunk might be needed to hold the final size. */
/* Pointer to next byte not yet allocated in current chunk. */
-#define obstack_next_free(h) ((h)->next_free)
+#define obstack_next_free(h) ((void *) (h)->next_free)
/* Mask specifying low bits that should be clear in address of an object. */
#define obstack_alignment_mask(h) ((h)->alignment_mask)
/* To prevent prototype warnings provide complete argument list. */
-#define obstack_init(h) \
- _obstack_begin ((h), 0, 0, \
- (void *(*) (long)) obstack_chunk_alloc, \
- (void (*) (void *)) obstack_chunk_free)
+#define obstack_init(h) \
+ _obstack_begin ((h), 0, 0, \
+ _OBSTACK_CAST (void *(*) (size_t), obstack_chunk_alloc), \
+ _OBSTACK_CAST (void (*) (void *), obstack_chunk_free))
-#define obstack_begin(h, size) \
- _obstack_begin ((h), (size), 0, \
- (void *(*) (long)) obstack_chunk_alloc, \
- (void (*) (void *)) obstack_chunk_free)
+#define obstack_begin(h, size) \
+ _obstack_begin ((h), (size), 0, \
+ _OBSTACK_CAST (void *(*) (size_t), obstack_chunk_alloc), \
+ _OBSTACK_CAST (void (*) (void *), obstack_chunk_free))
-#define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
- _obstack_begin ((h), (size), (alignment), \
- (void *(*) (long)) (chunkfun), \
- (void (*) (void *)) (freefun))
+#define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
+ _obstack_begin ((h), (size), (alignment), \
+ _OBSTACK_CAST (void *(*) (size_t), chunkfun), \
+ _OBSTACK_CAST (void (*) (void *), freefun))
#define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
- _obstack_begin_1 ((h), (size), (alignment), \
- (void *(*) (void *, long)) (chunkfun), \
- (void (*) (void *, void *)) (freefun), (arg))
+ _obstack_begin_1 ((h), (size), (alignment), \
+ _OBSTACK_CAST (void *(*) (void *, size_t), chunkfun), \
+ _OBSTACK_CAST (void (*) (void *, void *), freefun), arg)
-#define obstack_chunkfun(h, newchunkfun) \
- ((h) -> chunkfun = (struct _obstack_chunk *(*)(void *, long)) (newchunkfun))
+#define obstack_chunkfun(h, newchunkfun) \
+ ((void) ((h)->chunkfun.extra = (void *(*) (void *, size_t)) (newchunkfun)))
-#define obstack_freefun(h, newfreefun) \
- ((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun))
+#define obstack_freefun(h, newfreefun) \
+ ((void) ((h)->freefun.extra = (void *(*) (void *, void *)) (newfreefun)))
-#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = (achar))
+#define obstack_1grow_fast(h, achar) ((void) (*((h)->next_free)++ = (achar)))
-#define obstack_blank_fast(h,n) ((h)->next_free += (n))
+#define obstack_blank_fast(h, n) ((void) ((h)->next_free += (n)))
#define obstack_memory_used(h) _obstack_memory_used (h)
-\f
+
#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__. */
-# if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
+# if !defined __GNUC_MINOR__ || __GNUC__ * 1000 + __GNUC_MINOR__ < 2008
# define __extension__
# endif
without using a global variable.
Also, we can avoid using the 'temp' slot, to make faster code. */
-# define obstack_object_size(OBSTACK) \
- __extension__ \
- ({ struct obstack const *__o = (OBSTACK); \
- (unsigned) (__o->next_free - __o->object_base); })
-
-# define obstack_room(OBSTACK) \
- __extension__ \
- ({ struct obstack const *__o = (OBSTACK); \
- (unsigned) (__o->chunk_limit - __o->next_free); })
-
-# define obstack_make_room(OBSTACK,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->chunk_limit - __o->next_free < __len) \
- _obstack_newchunk (__o, __len); \
- (void) 0; })
-
-# define obstack_empty_p(OBSTACK) \
- __extension__ \
- ({ struct obstack const *__o = (OBSTACK); \
- (__o->chunk->prev == 0 \
- && __o->next_free == __PTR_ALIGN ((char *) __o->chunk, \
- __o->chunk->contents, \
- __o->alignment_mask)); })
-
-# define obstack_grow(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->next_free + __len > __o->chunk_limit) \
- _obstack_newchunk (__o, __len); \
- memcpy (__o->next_free, where, __len); \
- __o->next_free += __len; \
- (void) 0; })
-
-# define obstack_grow0(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->next_free + __len + 1 > __o->chunk_limit) \
- _obstack_newchunk (__o, __len + 1); \
- memcpy (__o->next_free, where, __len); \
- __o->next_free += __len; \
- *(__o->next_free)++ = 0; \
- (void) 0; })
-
-# define obstack_1grow(OBSTACK,datum) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- if (__o->next_free + 1 > __o->chunk_limit) \
- _obstack_newchunk (__o, 1); \
- obstack_1grow_fast (__o, datum); \
- (void) 0; })
+# define obstack_object_size(OBSTACK) \
+ __extension__ \
+ ({ struct obstack const *__o = (OBSTACK); \
+ (_OBSTACK_SIZE_T) (__o->next_free - __o->object_base); })
+
+/* The local variable is named __o1 to avoid a shadowed variable
+ warning when invoked from other obstack macros. */
+# define obstack_room(OBSTACK) \
+ __extension__ \
+ ({ struct obstack const *__o1 = (OBSTACK); \
+ (_OBSTACK_SIZE_T) (__o1->chunk_limit - __o1->next_free); })
+
+# define obstack_make_room(OBSTACK, length) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ _OBSTACK_SIZE_T __len = (length); \
+ if (obstack_room (__o) < __len) \
+ _obstack_newchunk (__o, __len); \
+ (void) 0; })
+
+# define obstack_empty_p(OBSTACK) \
+ __extension__ \
+ ({ struct obstack const *__o = (OBSTACK); \
+ (__o->chunk->prev == 0 \
+ && __o->next_free == __PTR_ALIGN ((char *) __o->chunk, \
+ __o->chunk->contents, \
+ __o->alignment_mask)); })
+
+# define obstack_grow(OBSTACK, where, length) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ _OBSTACK_SIZE_T __len = (length); \
+ if (obstack_room (__o) < __len) \
+ _obstack_newchunk (__o, __len); \
+ memcpy (__o->next_free, where, __len); \
+ __o->next_free += __len; \
+ (void) 0; })
+
+# define obstack_grow0(OBSTACK, where, length) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ _OBSTACK_SIZE_T __len = (length); \
+ if (obstack_room (__o) < __len + 1) \
+ _obstack_newchunk (__o, __len + 1); \
+ memcpy (__o->next_free, where, __len); \
+ __o->next_free += __len; \
+ *(__o->next_free)++ = 0; \
+ (void) 0; })
+
+# define obstack_1grow(OBSTACK, datum) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ if (obstack_room (__o) < 1) \
+ _obstack_newchunk (__o, 1); \
+ obstack_1grow_fast (__o, datum); })
/* These assume that the obstack alignment is good enough for pointers
or ints, and that the data added so far to the current object
shares that much alignment. */
-# define obstack_ptr_grow(OBSTACK,datum) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- if (__o->next_free + sizeof (void *) > __o->chunk_limit) \
- _obstack_newchunk (__o, sizeof (void *)); \
- obstack_ptr_grow_fast (__o, datum); }) \
-
-# define obstack_int_grow(OBSTACK,datum) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- if (__o->next_free + sizeof (int) > __o->chunk_limit) \
- _obstack_newchunk (__o, sizeof (int)); \
- obstack_int_grow_fast (__o, datum); })
-
-# define obstack_ptr_grow_fast(OBSTACK,aptr) \
-__extension__ \
-({ struct obstack *__o1 = (OBSTACK); \
- 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); \
- void *__p1 = __o1->next_free; \
- *(int *) __p1 = (aint); \
- __o1->next_free += sizeof (int); \
- (void) 0; })
-
-# define obstack_blank(OBSTACK,length) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- int __len = (length); \
- if (__o->chunk_limit - __o->next_free < __len) \
- _obstack_newchunk (__o, __len); \
- obstack_blank_fast (__o, __len); \
- (void) 0; })
-
-# define obstack_alloc(OBSTACK,length) \
-__extension__ \
-({ struct obstack *__h = (OBSTACK); \
- obstack_blank (__h, (length)); \
- obstack_finish (__h); })
-
-# define obstack_copy(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__h = (OBSTACK); \
- obstack_grow (__h, (where), (length)); \
- obstack_finish (__h); })
-
-# define obstack_copy0(OBSTACK,where,length) \
-__extension__ \
-({ struct obstack *__h = (OBSTACK); \
- obstack_grow0 (__h, (where), (length)); \
- obstack_finish (__h); })
-
-/* The local variable is named __o1 to avoid a name conflict
- when obstack_blank is called. */
-# define obstack_finish(OBSTACK) \
-__extension__ \
-({ struct obstack *__o1 = (OBSTACK); \
- void *__value = (void *) __o1->object_base; \
- if (__o1->next_free == __value) \
- __o1->maybe_empty_object = 1; \
- __o1->next_free \
- = __PTR_ALIGN (__o1->object_base, __o1->next_free, \
- __o1->alignment_mask); \
- if (__o1->next_free - (char *)__o1->chunk \
- > __o1->chunk_limit - (char *)__o1->chunk) \
- __o1->next_free = __o1->chunk_limit; \
- __o1->object_base = __o1->next_free; \
- __value; })
-
-# define obstack_free(OBSTACK, OBJ) \
-__extension__ \
-({ struct obstack *__o = (OBSTACK); \
- void *__obj = (OBJ); \
- if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \
- __o->next_free = __o->object_base = (char *)__obj; \
- else (__obstack_free) (__o, __obj); })
-\f
+# define obstack_ptr_grow(OBSTACK, datum) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ if (obstack_room (__o) < sizeof (void *)) \
+ _obstack_newchunk (__o, sizeof (void *)); \
+ obstack_ptr_grow_fast (__o, datum); })
+
+# define obstack_int_grow(OBSTACK, datum) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ if (obstack_room (__o) < sizeof (int)) \
+ _obstack_newchunk (__o, sizeof (int)); \
+ obstack_int_grow_fast (__o, datum); })
+
+# define obstack_ptr_grow_fast(OBSTACK, aptr) \
+ __extension__ \
+ ({ struct obstack *__o1 = (OBSTACK); \
+ 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); \
+ void *__p1 = __o1->next_free; \
+ *(int *) __p1 = (aint); \
+ __o1->next_free += sizeof (int); \
+ (void) 0; })
+
+# define obstack_blank(OBSTACK, length) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ _OBSTACK_SIZE_T __len = (length); \
+ if (obstack_room (__o) < __len) \
+ _obstack_newchunk (__o, __len); \
+ obstack_blank_fast (__o, __len); })
+
+# define obstack_alloc(OBSTACK, length) \
+ __extension__ \
+ ({ struct obstack *__h = (OBSTACK); \
+ obstack_blank (__h, (length)); \
+ obstack_finish (__h); })
+
+# define obstack_copy(OBSTACK, where, length) \
+ __extension__ \
+ ({ struct obstack *__h = (OBSTACK); \
+ obstack_grow (__h, (where), (length)); \
+ obstack_finish (__h); })
+
+# define obstack_copy0(OBSTACK, where, length) \
+ __extension__ \
+ ({ struct obstack *__h = (OBSTACK); \
+ obstack_grow0 (__h, (where), (length)); \
+ obstack_finish (__h); })
+
+/* The local variable is named __o1 to avoid a shadowed variable
+ warning when invoked from other obstack macros, typically obstack_free. */
+# define obstack_finish(OBSTACK) \
+ __extension__ \
+ ({ struct obstack *__o1 = (OBSTACK); \
+ void *__value = (void *) __o1->object_base; \
+ if (__o1->next_free == __value) \
+ __o1->maybe_empty_object = 1; \
+ __o1->next_free \
+ = __PTR_ALIGN (__o1->object_base, __o1->next_free, \
+ __o1->alignment_mask); \
+ if ((size_t) (__o1->next_free - (char *) __o1->chunk) \
+ > (size_t) (__o1->chunk_limit - (char *) __o1->chunk)) \
+ __o1->next_free = __o1->chunk_limit; \
+ __o1->object_base = __o1->next_free; \
+ __value; })
+
+# define obstack_free(OBSTACK, OBJ) \
+ __extension__ \
+ ({ struct obstack *__o = (OBSTACK); \
+ void *__obj = (void *) (OBJ); \
+ if (__obj > (void *) __o->chunk && __obj < (void *) __o->chunk_limit) \
+ __o->next_free = __o->object_base = (char *) __obj; \
+ else \
+ _obstack_free (__o, __obj); })
+
#else /* not __GNUC__ */
-# define obstack_object_size(h) \
- (unsigned) ((h)->next_free - (h)->object_base)
+# define obstack_object_size(h) \
+ ((_OBSTACK_SIZE_T) ((h)->next_free - (h)->object_base))
-# define obstack_room(h) \
- (unsigned) ((h)->chunk_limit - (h)->next_free)
+# define obstack_room(h) \
+ ((_OBSTACK_SIZE_T) ((h)->chunk_limit - (h)->next_free))
-# define obstack_empty_p(h) \
- ((h)->chunk->prev == 0 \
- && (h)->next_free == __PTR_ALIGN ((char *) (h)->chunk, \
- (h)->chunk->contents, \
- (h)->alignment_mask))
+# define obstack_empty_p(h) \
+ ((h)->chunk->prev == 0 \
+ && (h)->next_free == __PTR_ALIGN ((char *) (h)->chunk, \
+ (h)->chunk->contents, \
+ (h)->alignment_mask))
/* Note that the call to _obstack_newchunk is enclosed in (..., 0)
so that we can avoid having void expressions
Casting the third operand to void was tried before,
but some compilers won't accept it. */
-# define obstack_make_room(h,length) \
-( (h)->temp.tempint = (length), \
- (((h)->next_free + (h)->temp.tempint > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0))
-
-# define obstack_grow(h,where,length) \
-( (h)->temp.tempint = (length), \
- (((h)->next_free + (h)->temp.tempint > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0), \
- memcpy ((h)->next_free, where, (h)->temp.tempint), \
- (h)->next_free += (h)->temp.tempint)
-
-# define obstack_grow0(h,where,length) \
-( (h)->temp.tempint = (length), \
- (((h)->next_free + (h)->temp.tempint + 1 > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), (h)->temp.tempint + 1), 0) : 0), \
- memcpy ((h)->next_free, where, (h)->temp.tempint), \
- (h)->next_free += (h)->temp.tempint, \
- *((h)->next_free)++ = 0)
-
-# define obstack_1grow(h,datum) \
-( (((h)->next_free + 1 > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), 1), 0) : 0), \
- obstack_1grow_fast (h, datum))
-
-# define obstack_ptr_grow(h,datum) \
-( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \
- obstack_ptr_grow_fast (h, datum))
-
-# define obstack_int_grow(h,datum) \
-( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \
- obstack_int_grow_fast (h, datum))
-
-# define obstack_ptr_grow_fast(h,aptr) \
- (((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr))
-
-# define obstack_int_grow_fast(h,aint) \
- (((int *) ((h)->next_free += sizeof (int)))[-1] = (aint))
-
-# define obstack_blank(h,length) \
-( (h)->temp.tempint = (length), \
- (((h)->chunk_limit - (h)->next_free < (h)->temp.tempint) \
- ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0), \
- obstack_blank_fast (h, (h)->temp.tempint))
-
-# define obstack_alloc(h,length) \
- (obstack_blank ((h), (length)), obstack_finish ((h)))
-
-# define obstack_copy(h,where,length) \
- (obstack_grow ((h), (where), (length)), obstack_finish ((h)))
-
-# define obstack_copy0(h,where,length) \
- (obstack_grow0 ((h), (where), (length)), obstack_finish ((h)))
-
-# define obstack_finish(h) \
-( ((h)->next_free == (h)->object_base \
- ? (((h)->maybe_empty_object = 1), 0) \
- : 0), \
- (h)->temp.tempptr = (h)->object_base, \
- (h)->next_free \
- = __PTR_ALIGN ((h)->object_base, (h)->next_free, \
- (h)->alignment_mask), \
- (((h)->next_free - (char *) (h)->chunk \
- > (h)->chunk_limit - (char *) (h)->chunk) \
- ? ((h)->next_free = (h)->chunk_limit) : 0), \
- (h)->object_base = (h)->next_free, \
- (h)->temp.tempptr)
-
-# define obstack_free(h,obj) \
-( (h)->temp.tempint = (char *) (obj) - (char *) (h)->chunk, \
- ((((h)->temp.tempint > 0 \
- && (h)->temp.tempint < (h)->chunk_limit - (char *) (h)->chunk)) \
- ? (int) ((h)->next_free = (h)->object_base \
- = (h)->temp.tempint + (char *) (h)->chunk) \
- : (((__obstack_free) ((h), (h)->temp.tempint + (char *) (h)->chunk), 0), 0)))
+# define obstack_make_room(h, length) \
+ ((h)->temp.i = (length), \
+ ((obstack_room (h) < (h)->temp.i) \
+ ? (_obstack_newchunk (h, (h)->temp.i), 0) : 0), \
+ (void) 0)
+
+# define obstack_grow(h, where, length) \
+ ((h)->temp.i = (length), \
+ ((obstack_room (h) < (h)->temp.i) \
+ ? (_obstack_newchunk ((h), (h)->temp.i), 0) : 0), \
+ memcpy ((h)->next_free, where, (h)->temp.i), \
+ (h)->next_free += (h)->temp.i, \
+ (void) 0)
+
+# define obstack_grow0(h, where, length) \
+ ((h)->temp.i = (length), \
+ ((obstack_room (h) < (h)->temp.i + 1) \
+ ? (_obstack_newchunk ((h), (h)->temp.i + 1), 0) : 0), \
+ memcpy ((h)->next_free, where, (h)->temp.i), \
+ (h)->next_free += (h)->temp.i, \
+ *((h)->next_free)++ = 0, \
+ (void) 0)
+
+# define obstack_1grow(h, datum) \
+ (((obstack_room (h) < 1) \
+ ? (_obstack_newchunk ((h), 1), 0) : 0), \
+ obstack_1grow_fast (h, datum))
+
+# define obstack_ptr_grow(h, datum) \
+ (((obstack_room (h) < sizeof (char *)) \
+ ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \
+ obstack_ptr_grow_fast (h, datum))
+
+# define obstack_int_grow(h, datum) \
+ (((obstack_room (h) < sizeof (int)) \
+ ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \
+ obstack_int_grow_fast (h, datum))
+
+# define obstack_ptr_grow_fast(h, aptr) \
+ (((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr), \
+ (void) 0)
+
+# define obstack_int_grow_fast(h, aint) \
+ (((int *) ((h)->next_free += sizeof (int)))[-1] = (aint), \
+ (void) 0)
+
+# define obstack_blank(h, length) \
+ ((h)->temp.i = (length), \
+ ((obstack_room (h) < (h)->temp.i) \
+ ? (_obstack_newchunk ((h), (h)->temp.i), 0) : 0), \
+ obstack_blank_fast (h, (h)->temp.i))
+
+# define obstack_alloc(h, length) \
+ (obstack_blank ((h), (length)), obstack_finish ((h)))
+
+# define obstack_copy(h, where, length) \
+ (obstack_grow ((h), (where), (length)), obstack_finish ((h)))
+
+# define obstack_copy0(h, where, length) \
+ (obstack_grow0 ((h), (where), (length)), obstack_finish ((h)))
+
+# define obstack_finish(h) \
+ (((h)->next_free == (h)->object_base \
+ ? (((h)->maybe_empty_object = 1), 0) \
+ : 0), \
+ (h)->temp.p = (h)->object_base, \
+ (h)->next_free \
+ = __PTR_ALIGN ((h)->object_base, (h)->next_free, \
+ (h)->alignment_mask), \
+ (((size_t) ((h)->next_free - (char *) (h)->chunk) \
+ > (size_t) ((h)->chunk_limit - (char *) (h)->chunk)) \
+ ? ((h)->next_free = (h)->chunk_limit) : 0), \
+ (h)->object_base = (h)->next_free, \
+ (h)->temp.p)
+
+# define obstack_free(h, obj) \
+ ((h)->temp.p = (void *) (obj), \
+ (((h)->temp.p > (void *) (h)->chunk \
+ && (h)->temp.p < (void *) (h)->chunk_limit) \
+ ? (void) ((h)->next_free = (h)->object_base = (char *) (h)->temp.p) \
+ : _obstack_free ((h), (h)->temp.p)))
#endif /* not __GNUC__ */
} /* C++ */
#endif
-#endif /* obstack.h */
+#endif /* _OBSTACK_H */
/* Open a descriptor to a file.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Define PATH_MAX somehow. Requires sys/types.h.
- Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2013 Free Software
+ Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2016 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
/* Invoke pipe, but avoid some glitches.
- Copyright (C) 2005-2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Invoke pipe2, but avoid some glitches.
- Copyright (C) 2005-2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Create a pipe, with specific opening flags.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Decomposed printf argument list.
- Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2013 Free Software
+ Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2016 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
/* Decomposed printf argument list.
- Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2013 Free Software
+ Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2016 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
/* Split a double into fraction and mantissa, for hexadecimal printf.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Split a double into fraction and mantissa, for hexadecimal printf.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Split a 'long double' into fraction and mantissa, for hexadecimal printf.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Split a 'long double' into fraction and mantissa, for hexadecimal printf.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Formatted output to strings.
- Copyright (C) 1999-2000, 2002-2003, 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 1999-2000, 2002-2003, 2006-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Parse printf format string.
- Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2013 Free Software
+ Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2016 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
/* Program name management.
- Copyright (C) 2001-2003, 2005-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify
/* Program name management.
- Copyright (C) 2001-2004, 2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006, 2009-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify
/* quote.h - prototypes for quote.c
- Copyright (C) 1998-2001, 2003, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 1998-2001, 2003, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* quotearg.c - quote arguments for output
- Copyright (C) 1998-2002, 2004-2013 Free Software Foundation, Inc.
+ Copyright (C) 1998-2002, 2004-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "quotearg.h"
#include "quote.h"
+#include "minmax.h"
#include "xalloc.h"
#include "c-strcaseeq.h"
#include "localcharset.h"
#include <errno.h>
#include <limits.h>
#include <stdbool.h>
+#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <wchar.h>
"literal",
"shell",
"shell-always",
+ "shell-escape",
+ "shell-escape-always",
"c",
"c-maybe",
"escape",
literal_quoting_style,
shell_quoting_style,
shell_always_quoting_style,
+ shell_escape_quoting_style,
+ shell_escape_always_quoting_style,
c_quoting_style,
c_maybe_quoting_style,
escape_quoting_style,
/* Get the value of O's quoting style. If O is null, use the default. */
enum quoting_style
-get_quoting_style (struct quoting_options *o)
+get_quoting_style (struct quoting_options const *o)
{
return (o ? o : &default_quoting_options)->style;
}
static struct quoting_options /* NOT PURE!! */
quoting_options_from_style (enum quoting_style style)
{
- struct quoting_options o = { 0, 0, { 0 }, NULL, NULL };
+ struct quoting_options o = { literal_quoting_style, 0, { 0 }, NULL, NULL };
if (style == custom_quoting_style)
abort ();
o.style = style;
{
size_t i;
size_t len = 0;
+ size_t orig_buffersize = 0;
char const *quote_string = 0;
size_t quote_string_len = 0;
bool backslash_escapes = false;
bool unibyte_locale = MB_CUR_MAX == 1;
bool elide_outer_quotes = (flags & QA_ELIDE_OUTER_QUOTES) != 0;
+ bool pending_shell_escape_end = false;
+ bool encountered_single_quote = false;
+ bool all_c_and_shell_quote_compat = true;
#define STORE(c) \
do \
} \
while (0)
+#define START_ESC() \
+ do \
+ { \
+ if (elide_outer_quotes) \
+ goto force_outer_quoting_style; \
+ escaping = true; \
+ if (quoting_style == shell_always_quoting_style \
+ && ! pending_shell_escape_end) \
+ { \
+ STORE ('\''); \
+ STORE ('$'); \
+ STORE ('\''); \
+ pending_shell_escape_end = true; \
+ } \
+ STORE ('\\'); \
+ } \
+ while (0)
+
+#define END_ESC() \
+ do \
+ { \
+ if (pending_shell_escape_end && ! escaping) \
+ { \
+ STORE ('\''); \
+ STORE ('\''); \
+ pending_shell_escape_end = false; \
+ } \
+ } \
+ while (0)
+
+ process_input:
+
switch (quoting_style)
{
case c_maybe_quoting_style:
}
break;
+ case shell_escape_quoting_style:
+ backslash_escapes = true;
+ /* Fall through. */
case shell_quoting_style:
- quoting_style = shell_always_quoting_style;
elide_outer_quotes = true;
/* Fall through. */
+ case shell_escape_always_quoting_style:
+ if (!elide_outer_quotes)
+ backslash_escapes = true;
+ /* Fall through. */
case shell_always_quoting_style:
+ quoting_style = shell_always_quoting_style;
if (!elide_outer_quotes)
STORE ('\'');
quote_string = "'";
unsigned char c;
unsigned char esc;
bool is_right_quote = false;
+ bool escaping = false;
+ bool c_and_shell_quote_compat = false;
if (backslash_escapes
+ && quoting_style != shell_always_quoting_style
&& quote_string_len
&& (i + quote_string_len
<= (argsize == SIZE_MAX && 1 < quote_string_len
case '\0':
if (backslash_escapes)
{
- if (elide_outer_quotes)
- goto force_outer_quoting_style;
- STORE ('\\');
+ START_ESC ();
/* If quote_string were to begin with digits, we'd need to
test for the end of the arg as well. However, it's
hard to imagine any locale that would use digits in
quotes, and set_custom_quoting is documented not to
- accept them. */
- if (i + 1 < argsize && '0' <= arg[i + 1] && arg[i + 1] <= '9')
+ accept them. Use only a single \0 with shell-escape
+ as currently digits are not printed within $'...' */
+ if (quoting_style != shell_always_quoting_style
+ && i + 1 < argsize && '0' <= arg[i + 1] && arg[i + 1] <= '9')
{
STORE ('0');
STORE ('0');
case '\t': esc = 't'; goto c_and_shell_escape;
case '\v': esc = 'v'; goto c_escape;
case '\\': esc = c;
+ /* Never need to escape '\' in shell case. */
+ if (quoting_style == shell_always_quoting_style)
+ {
+ if (elide_outer_quotes)
+ goto force_outer_quoting_style;
+ goto store_c;
+ }
+
/* No need to escape the escape if we are trying to elide
outer quotes and nothing else is problematic. */
if (backslash_escapes && elide_outer_quotes && quote_string_len)
break;
/* Fall through. */
case ' ':
+ c_and_shell_quote_compat = true;
+ /* Fall through. */
case '!': /* special in bash */
case '"': case '$': case '&':
case '(': case ')': case '*': case ';':
break;
case '\'':
+ encountered_single_quote = true;
+ c_and_shell_quote_compat = true;
if (quoting_style == shell_always_quoting_style)
{
if (elide_outer_quotes)
goto force_outer_quoting_style;
+
+ if (buffersize && ! orig_buffersize)
+ {
+ /* Just scan string to see if supports a more concise
+ representation, rather than writing a longer string
+ but returning the length of the more concise form. */
+ orig_buffersize = buffersize;
+ buffersize = 0;
+ }
+
STORE ('\'');
STORE ('\\');
STORE ('\'');
+ pending_shell_escape_end = false;
}
break;
them. Also, a digit or a special letter would cause
trouble if it appeared in quote_these_too, but that's also
documented as not accepting them. */
+ c_and_shell_quote_compat = true;
break;
default:
while (! mbsinit (&mbstate));
}
+ c_and_shell_quote_compat = printable;
+
if (1 < m || (backslash_escapes && ! printable))
{
/* Output a multibyte sequence, or an escaped
{
if (backslash_escapes && ! printable)
{
- if (elide_outer_quotes)
- goto force_outer_quoting_style;
- STORE ('\\');
+ START_ESC ();
STORE ('0' + (c >> 6));
STORE ('0' + ((c >> 3) & 7));
c = '0' + (c & 7);
}
if (ilim <= i + 1)
break;
+ END_ESC ();
STORE (c);
c = arg[++i];
}
}
}
- if (! ((backslash_escapes || elide_outer_quotes)
+ if (! (((backslash_escapes && quoting_style != shell_always_quoting_style)
+ || elide_outer_quotes)
&& quote_these_too
- && quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS)))
+ && quote_these_too[c / INT_BITS] >> (c % INT_BITS) & 1)
&& !is_right_quote)
goto store_c;
store_escape:
- if (elide_outer_quotes)
- goto force_outer_quoting_style;
- STORE ('\\');
+ START_ESC ();
store_c:
+ END_ESC ();
STORE (c);
+
+ if (! c_and_shell_quote_compat)
+ all_c_and_shell_quote_compat = false;
}
if (len == 0 && quoting_style == shell_always_quoting_style
&& elide_outer_quotes)
goto force_outer_quoting_style;
+ /* Single shell quotes (') are commonly enough used as an apostrophe,
+ that we attempt to minimize the quoting in this case. Note itʼs
+ better to use the apostrophe modifier "\u02BC" if possible, as that
+ renders better and works with the word match regex \W+ etc. */
+ if (quoting_style == shell_always_quoting_style && ! elide_outer_quotes
+ && encountered_single_quote)
+ {
+ if (all_c_and_shell_quote_compat)
+ return quotearg_buffer_restyled (buffer, orig_buffersize, arg, argsize,
+ c_quoting_style,
+ flags, quote_these_too,
+ left_quote, right_quote);
+ else if (! buffersize && orig_buffersize)
+ {
+ /* Disable read-only scan, and reprocess to write quoted string. */
+ buffersize = orig_buffersize;
+ len = 0;
+ goto process_input;
+ }
+ }
+
if (quote_string && !elide_outer_quotes)
for (; *quote_string; quote_string++)
STORE (*quote_string);
force_outer_quoting_style:
/* Don't reuse quote_these_too, since the addition of outer quotes
sufficiently quotes the specified characters. */
+ if (quoting_style == shell_always_quoting_style && backslash_escapes)
+ quoting_style = shell_escape_always_quoting_style;
return quotearg_buffer_restyled (buffer, buffersize, arg, argsize,
quoting_style,
flags & ~QA_ELIDE_OUTER_QUOTES, NULL,
/* Preallocate a slot 0 buffer, so that the caller can always quote
one small component of a "memory exhausted" message in slot 0. */
static char slot0[256];
-static unsigned int nslots = 1;
+static int nslots = 1;
static struct slotvec slotvec0 = {sizeof slot0, slot0};
static struct slotvec *slotvec = &slotvec0;
quotearg_free (void)
{
struct slotvec *sv = slotvec;
- unsigned int i;
+ int i;
for (i = 1; i < nslots; i++)
free (sv[i].val);
if (sv[0].val != slot0)
{
int e = errno;
- unsigned int n0 = n;
struct slotvec *sv = slotvec;
if (n < 0)
abort ();
- if (nslots <= n0)
+ if (nslots <= n)
{
- /* FIXME: technically, the type of n1 should be 'unsigned int',
- but that evokes an unsuppressible warning from gcc-4.0.1 and
- older. If gcc ever provides an option to suppress that warning,
- revert to the original type, so that the test in xalloc_oversized
- is once again performed only at compile time. */
- size_t n1 = n0 + 1;
bool preallocated = (sv == &slotvec0);
- if (xalloc_oversized (n1, sizeof *sv))
+ if (MIN (INT_MAX, MIN (PTRDIFF_MAX, SIZE_MAX) / sizeof *sv) <= n)
xalloc_die ();
- slotvec = sv = xrealloc (preallocated ? NULL : sv, n1 * sizeof *sv);
+ slotvec = sv = xrealloc (preallocated ? NULL : sv, (n + 1) * sizeof *sv);
if (preallocated)
*sv = slotvec0;
- memset (sv + nslots, 0, (n1 - nslots) * sizeof *sv);
- nslots = n1;
+ memset (sv + nslots, 0, (n + 1 - nslots) * sizeof *sv);
+ nslots = n + 1;
}
{
}
char *
+quotearg_n_style_colon (int n, enum quoting_style s, char const *arg)
+{
+ struct quoting_options options;
+ options = quoting_options_from_style (s);
+ set_char_quoting (&options, ':', 1);
+ return quotearg_n_options (n, arg, SIZE_MAX, &options);
+}
+
+char *
quotearg_n_custom (int n, char const *left_quote,
char const *right_quote, char const *arg)
{
/* quotearg.h - quote arguments for output
- Copyright (C) 1998-2002, 2004, 2006, 2008-2013 Free Software Foundation,
+ Copyright (C) 1998-2002, 2004, 2006, 2008-2016 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
*/
shell_always_quoting_style,
+ /* Quote names for the shell if they contain shell metacharacters
+ or other problematic characters (ls --quoting-style=shell-escape).
+ Non printable characters are quoted using the $'...' syntax,
+ which originated in ksh93 and is widely supported by most shells,
+ and proposed for inclusion in POSIX.
+
+ quotearg_buffer:
+ "simple", "''$'\\0'' '$'\\t\\n'\\''\"'$'\\033''??/\\'", "a:b"
+ quotearg:
+ "simple", "''$'\\0'' '$'\\t\\n'\\''\"'$'\\033''??/\\'", "a:b"
+ quotearg_colon:
+ "simple", "''$'\\0'' '$'\\t\\n'\\''\"'$'\\033''??/\\'", "'a:b'"
+ */
+ shell_escape_quoting_style,
+
+ /* Quote names for the shell even if they would normally not
+ require quoting (ls --quoting-style=shell-escape).
+ Non printable characters are quoted using the $'...' syntax,
+ which originated in ksh93 and is widely supported by most shells,
+ and proposed for inclusion in POSIX. Behaves like
+ shell_escape_quoting_style if QA_ELIDE_OUTER_QUOTES is in effect.
+
+ quotearg_buffer:
+ "simple", "''$'\\0'' '$'\\t\\n'\\''\"'$'\\033''??/\'", "a:b"
+ quotearg:
+ "simple", "''$'\\0'' '$'\\t\\n'\\''\"'$'\\033''??/\'", "a:b"
+ quotearg_colon:
+ "simple", "''$'\\0'' '$'\\t\\n'\\''\"'$'\\033''??/\'", "'a:b'"
+ */
+ shell_escape_always_quoting_style,
+
/* Quote names as for a C language string (ls --quoting-style=c).
Behaves like c_maybe_quoting_style if QA_ELIDE_OUTER_QUOTES is
in effect. Split into consecutive strings if
struct quoting_options *clone_quoting_options (struct quoting_options *o);
/* Get the value of O's quoting style. If O is null, use the default. */
-enum quoting_style get_quoting_style (struct quoting_options *o);
+enum quoting_style get_quoting_style (struct quoting_options const *o);
/* In O (or in the default if O is null),
set the value of the quoting style to S. */
/* Like quotearg_colon (ARG), except it can quote null bytes. */
char *quotearg_colon_mem (char const *arg, size_t argsize);
+/* Like quotearg_n_style, except with ':' quoting enabled. */
+char *quotearg_n_style_colon (int n, enum quoting_style s, char const *arg);
+
/* Like quotearg_n_style (N, S, ARG) but with S as custom_quoting_style
with left quote as LEFT_QUOTE and right quote as RIGHT_QUOTE. See
set_custom_quoting for a description of acceptable LEFT_QUOTE and
/* Provide a non-threads replacement for the POSIX raise function.
- Copyright (C) 2002-2003, 2005-2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2006, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Searching in a string.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Stub for readlink().
- Copyright (C) 2003-2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2003-2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# Add this package to a list of references stored in a text file.
#
-# Copyright (C) 2000, 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2009-2016 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# Remove this package from a list of references stored in a text file.
#
-# Copyright (C) 2000, 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2009-2016 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2013 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#ifdef _LIBC
+# include <locale/weight.h>
+#endif
+
static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern,
size_t length, reg_syntax_t syntax);
static void re_compile_fastmap_iter (regex_t *bufp,
gettext_noop ("Invalid back reference") /* REG_ESUBREG */
"\0"
#define REG_EBRACK_IDX (REG_ESUBREG_IDX + sizeof "Invalid back reference")
- gettext_noop ("Unmatched [ or [^") /* REG_EBRACK */
+ gettext_noop ("Unmatched [, [^, [:, [., or [=") /* REG_EBRACK */
"\0"
-#define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [ or [^")
+#define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [, [^, [:, [., or [=")
gettext_noop ("Unmatched ( or \\(") /* REG_EPAREN */
"\0"
#define REG_EBRACE_IDX (REG_EPAREN_IDX + sizeof "Unmatched ( or \\(")
Assumes the 'allocated' (and perhaps 'buffer') and 'translate' fields
are set in BUFP on entry. */
-#ifdef _LIBC
-const char *
-re_compile_pattern (pattern, length, bufp)
- const char *pattern;
- size_t length;
- struct re_pattern_buffer *bufp;
-#else /* size_t might promote */
const char *
re_compile_pattern (const char *pattern, size_t length,
struct re_pattern_buffer *bufp)
-#endif
{
reg_errcode_t ret;
defined in regex.h. We return the old syntax. */
reg_syntax_t
-re_set_syntax (syntax)
- reg_syntax_t syntax;
+re_set_syntax (reg_syntax_t syntax)
{
reg_syntax_t ret = re_syntax_options;
#endif
int
-re_compile_fastmap (bufp)
- struct re_pattern_buffer *bufp;
+re_compile_fastmap (struct re_pattern_buffer *bufp)
{
re_dfa_t *dfa = bufp->buffer;
char *fastmap = bufp->fastmap;
memset (&state, '\0', sizeof (state));
if (__mbrtowc (&wc, (const char *) buf, p - buf,
&state) == p - buf
- && (__wcrtomb ((char *) buf, towlower (wc), &state)
+ && (__wcrtomb ((char *) buf, __towlower (wc), &state)
!= (size_t) -1))
re_set_fastmap (fastmap, false, buf[0]);
}
re_set_fastmap (fastmap, icase, *(unsigned char *) buf);
if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1)
{
- if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state)
+ if (__wcrtomb (buf, __towlower (cset->mbchars[i]), &state)
!= (size_t) -1)
re_set_fastmap (fastmap, false, *(unsigned char *) buf);
}
the return codes and their meanings.) */
int
-regcomp (preg, pattern, cflags)
- regex_t *_Restrict_ preg;
- const char *_Restrict_ pattern;
- int cflags;
+regcomp (regex_t *_Restrict_ preg, const char *_Restrict_ pattern, int cflags)
{
reg_errcode_t ret;
reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED
/* Returns a message corresponding to an error code, ERRCODE, returned
from either regcomp or regexec. We don't use PREG here. */
-#ifdef _LIBC
-size_t
-regerror (errcode, preg, errbuf, errbuf_size)
- int errcode;
- const regex_t *_Restrict_ preg;
- char *_Restrict_ errbuf;
- size_t errbuf_size;
-#else /* size_t might promote */
size_t
-regerror (int errcode, const regex_t *_Restrict_ preg,
- char *_Restrict_ errbuf, size_t errbuf_size)
-#endif
+regerror (int errcode, const regex_t *_Restrict_ preg, char *_Restrict_ errbuf,
+ size_t errbuf_size)
{
const char *msg;
size_t msg_size;
/* Free dynamically allocated space used by PREG. */
void
-regfree (preg)
- regex_t *preg;
+regfree (regex_t *preg)
{
re_dfa_t *dfa = preg->buffer;
if (BE (dfa != NULL, 1))
regcomp/regexec above without link errors. */
weak_function
# endif
-re_comp (s)
- const char *s;
+re_comp (const char *s)
{
reg_errcode_t ret;
char *fastmap;
{
node->first = node;
node->node_idx = re_dfa_add_node (dfa, node->token);
- if (BE (node->node_idx == REG_MISSING, 0))
+ if (BE (node->node_idx == -1, 0))
return REG_ESPACE;
if (node->token.type == ANCHOR)
dfa->nodes[node->node_idx].constraint = node->token.opr.ctx_type;
right = node->right->first->node_idx;
else
right = node->next->node_idx;
- assert (REG_VALID_INDEX (left));
- assert (REG_VALID_INDEX (right));
+ assert (left > -1);
+ assert (right > -1);
err = re_node_set_init_2 (dfa->edests + idx, left, right);
}
break;
org_dest = dfa->nexts[org_node];
re_node_set_empty (dfa->edests + clone_node);
clone_dest = duplicate_node (dfa, org_dest, constraint);
- if (BE (clone_dest == REG_MISSING, 0))
+ if (BE (clone_dest == -1, 0))
return REG_ESPACE;
dfa->nexts[clone_node] = dfa->nexts[org_node];
ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
/* In case the node has another constraint, append it. */
constraint |= dfa->nodes[org_node].constraint;
clone_dest = duplicate_node (dfa, org_dest, constraint);
- if (BE (clone_dest == REG_MISSING, 0))
+ if (BE (clone_dest == -1, 0))
return REG_ESPACE;
ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
if (BE (! ok, 0))
re_node_set_empty (dfa->edests + clone_node);
/* Search for a duplicated node which satisfies the constraint. */
clone_dest = search_duplicated_node (dfa, org_dest, constraint);
- if (clone_dest == REG_MISSING)
+ if (clone_dest == -1)
{
/* There is no such duplicated node, create a new one. */
reg_errcode_t err;
clone_dest = duplicate_node (dfa, org_dest, constraint);
- if (BE (clone_dest == REG_MISSING, 0))
+ if (BE (clone_dest == -1, 0))
return REG_ESPACE;
ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
if (BE (! ok, 0))
org_dest = dfa->edests[org_node].elems[1];
clone_dest = duplicate_node (dfa, org_dest, constraint);
- if (BE (clone_dest == REG_MISSING, 0))
+ if (BE (clone_dest == -1, 0))
return REG_ESPACE;
ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
if (BE (! ok, 0))
&& constraint == dfa->nodes[idx].constraint)
return idx; /* Found. */
}
- return REG_MISSING; /* Not found. */
+ return -1; /* Not found. */
}
/* Duplicate the node whose index is ORG_IDX and set the constraint CONSTRAINT.
- Return the index of the new node, or REG_MISSING if insufficient storage is
+ Return the index of the new node, or -1 if insufficient storage is
available. */
static Idx
duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint)
{
Idx dup_idx = re_dfa_add_node (dfa, dfa->nodes[org_idx]);
- if (BE (dup_idx != REG_MISSING, 1))
+ if (BE (dup_idx != -1, 1))
{
dfa->nodes[dup_idx].constraint = constraint;
dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].constraint;
}
#ifdef DEBUG
- assert (dfa->eclosures[node_idx].nelem != REG_MISSING);
+ assert (dfa->eclosures[node_idx].nelem != -1);
#endif
/* If we have already calculated, skip it. */
/* This indicates that we are calculating this node now.
We reference this value to avoid infinite loop. */
- dfa->eclosures[node].nelem = REG_MISSING;
+ dfa->eclosures[node].nelem = -1;
/* If the current node has constraints, duplicate all nodes
since they must inherit the constraints. */
Idx edest = dfa->edests[node].elems[i];
/* If calculating the epsilon closure of 'edest' is in progress,
return intermediate result. */
- if (dfa->eclosures[edest].nelem == REG_MISSING)
+ if (dfa->eclosures[edest].nelem == -1)
{
incomplete = true;
continue;
{
re_dfa_t *dfa = preg->buffer;
bin_tree_t *tree, *branch = NULL;
+ bitset_word_t initial_bkref_map = dfa->completed_bkref_map;
tree = parse_branch (regexp, preg, token, syntax, nest, err);
if (BE (*err != REG_NOERROR && tree == NULL, 0))
return NULL;
if (token->type != OP_ALT && token->type != END_OF_RE
&& (nest == 0 || token->type != OP_CLOSE_SUBEXP))
{
+ bitset_word_t accumulated_bkref_map = dfa->completed_bkref_map;
+ dfa->completed_bkref_map = initial_bkref_map;
branch = parse_branch (regexp, preg, token, syntax, nest, err);
if (BE (*err != REG_NOERROR && branch == NULL, 0))
- return NULL;
+ {
+ if (tree != NULL)
+ postorder (tree, free_tree, NULL);
+ return NULL;
+ }
+ dfa->completed_bkref_map |= accumulated_bkref_map;
}
else
branch = NULL;
while (token->type == OP_DUP_ASTERISK || token->type == OP_DUP_PLUS
|| token->type == OP_DUP_QUESTION || token->type == OP_OPEN_DUP_NUM)
{
- tree = parse_dup_op (tree, regexp, dfa, token, syntax, err);
- if (BE (*err != REG_NOERROR && tree == NULL, 0))
- return NULL;
+ bin_tree_t *dup_tree = parse_dup_op (tree, regexp, dfa, token,
+ syntax, err);
+ if (BE (*err != REG_NOERROR && dup_tree == NULL, 0))
+ {
+ if (tree != NULL)
+ postorder (tree, free_tree, NULL);
+ return NULL;
+ }
+ tree = dup_tree;
/* In BRE consecutive duplications are not allowed. */
if ((syntax & RE_CONTEXT_INVALID_DUP)
&& (token->type == OP_DUP_ASTERISK
|| token->type == OP_OPEN_DUP_NUM))
{
+ if (tree != NULL)
+ postorder (tree, free_tree, NULL);
*err = REG_BADRPT;
return NULL;
}
{
end = 0;
start = fetch_number (regexp, token, syntax);
- if (start == REG_MISSING)
+ if (start == -1)
{
if (token->type == CHARACTER && token->opr.c == ',')
start = 0; /* We treat "{,m}" as "{0,m}". */
return NULL;
}
}
- if (BE (start != REG_ERROR, 1))
+ if (BE (start != -2, 1))
{
/* We treat "{n}" as "{n,n}". */
end = ((token->type == OP_CLOSE_DUP_NUM) ? start
: ((token->type == CHARACTER && token->opr.c == ',')
- ? fetch_number (regexp, token, syntax) : REG_ERROR));
+ ? fetch_number (regexp, token, syntax) : -2));
}
- if (BE (start == REG_ERROR || end == REG_ERROR, 0))
+ if (BE (start == -2 || end == -2, 0))
{
/* Invalid sequence. */
if (BE (!(syntax & RE_INVALID_INTERVAL_ORD), 0))
return elem;
}
- if (BE ((end != REG_MISSING && start > end)
+ if (BE ((end != -1 && start > end)
|| token->type != OP_CLOSE_DUP_NUM, 0))
{
/* First number greater than second. */
return NULL;
}
- if (BE (RE_DUP_MAX < (end == REG_MISSING ? start : end), 0))
+ if (BE (RE_DUP_MAX < (end == -1 ? start : end), 0))
{
*err = REG_ESIZE;
return NULL;
else
{
start = (token->type == OP_DUP_PLUS) ? 1 : 0;
- end = (token->type == OP_DUP_QUESTION) ? 1 : REG_MISSING;
+ end = (token->type == OP_DUP_QUESTION) ? 1 : -1;
}
fetch_token (token, regexp, syntax);
/* Duplicate ELEM before it is marked optional. */
elem = duplicate_tree (elem, dfa);
+ if (BE (elem == NULL, 0))
+ goto parse_dup_op_espace;
old_tree = tree;
}
else
}
tree = create_tree (dfa, elem, NULL,
- (end == REG_MISSING ? OP_DUP_ASTERISK : OP_ALT));
+ (end == -1 ? OP_DUP_ASTERISK : OP_ALT));
if (BE (tree == NULL, 0))
goto parse_dup_op_espace;
True if the arithmetic type T is signed. */
#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
- /* This loop is actually executed only when end != REG_MISSING,
+ /* This loop is actually executed only when end != -1,
to rewrite <re>{0,n} as (<re>(<re>...<re>?)?)?... We have
already created the start+1-th copy. */
- if (TYPE_SIGNED (Idx) || end != REG_MISSING)
+ if (TYPE_SIGNED (Idx) || end != -1)
for (i = start + 2; i <= end; ++i)
{
elem = duplicate_tree (elem, dfa);
#define BRACKET_NAME_BUF_SIZE 32
#ifndef _LIBC
+
+# ifdef RE_ENABLE_I18N
+/* Convert the byte B to the corresponding wide character. In a
+ unibyte locale, treat B as itself if it is an encoding error.
+ In a multibyte locale, return WEOF if B is an encoding error. */
+static wint_t
+parse_byte (unsigned char b, re_charset_t *mbcset)
+{
+ wint_t wc = __btowc (b);
+ return wc == WEOF && !mbcset ? b : wc;
+}
+#endif
+
/* Local function for parse_bracket_exp only used in case of NOT _LIBC.
Build the range expression which starts from START_ELEM, and ends
at END_ELEM. The result are written to MBCSET and SBCSET.
: ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0]
: 0));
start_wc = ((start_elem->type == SB_CHAR || start_elem->type == COLL_SYM)
- ? __btowc (start_ch) : start_elem->opr.wch);
+ ? parse_byte (start_ch, mbcset) : start_elem->opr.wch);
end_wc = ((end_elem->type == SB_CHAR || end_elem->type == COLL_SYM)
- ? __btowc (end_ch) : end_elem->opr.wch);
+ ? parse_byte (end_ch, mbcset) : end_elem->opr.wch);
if (start_wc == WEOF || end_wc == WEOF)
return REG_ECOLLATE;
else if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_wc > end_wc, 0))
new_nranges);
if (BE (new_array_start == NULL || new_array_end == NULL, 0))
- return REG_ESPACE;
+ {
+ re_free (new_array_start);
+ re_free (new_array_end);
+ return REG_ESPACE;
+ }
mbcset->range_starts = new_array_start;
mbcset->range_ends = new_array_end;
re_token_t token2;
start_elem.opr.name = start_name_buf;
+ start_elem.type = COLL_SYM;
ret = parse_bracket_element (&start_elem, regexp, token, token_len, dfa,
syntax, first_round);
if (BE (ret != REG_NOERROR, 0))
if (is_range_exp == true)
{
end_elem.opr.name = end_name_buf;
+ end_elem.type = COLL_SYM;
ret = parse_bracket_element (&end_elem, regexp, &token2, token_len2,
dfa, syntax, true);
if (BE (ret != REG_NOERROR, 0))
int32_t idx1, idx2;
unsigned int ch;
size_t len;
- /* This #include defines a local function! */
-# include <locale/weight.h>
/* Calculate the index for equivalence class. */
cp = name;
table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB);
_NL_COLLATE_EXTRAMB);
indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
_NL_COLLATE_INDIRECTMB);
- idx1 = findidx (&cp, -1);
+ idx1 = findidx (table, indirect, extra, &cp, -1);
if (BE (idx1 == 0 || *cp != '\0', 0))
/* This isn't a valid character. */
return REG_ECOLLATE;
{
char_buf[0] = ch;
cp = char_buf;
- idx2 = findidx (&cp, 1);
+ idx2 = findidx (table, indirect, extra, &cp, 1);
/*
idx2 = table[ch];
*/
bin_tree_t *tree;
sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1);
-#ifdef RE_ENABLE_I18N
- mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1);
-#endif /* RE_ENABLE_I18N */
-
-#ifdef RE_ENABLE_I18N
- if (BE (sbcset == NULL || mbcset == NULL, 0))
-#else /* not RE_ENABLE_I18N */
if (BE (sbcset == NULL, 0))
-#endif /* not RE_ENABLE_I18N */
{
*err = REG_ESPACE;
return NULL;
}
-
- if (non_match)
- {
#ifdef RE_ENABLE_I18N
- mbcset->non_match = 1;
-#endif /* not RE_ENABLE_I18N */
+ mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1);
+ if (BE (mbcset == NULL, 0))
+ {
+ re_free (sbcset);
+ *err = REG_ESPACE;
+ return NULL;
}
+ mbcset->non_match = non_match;
+#endif /* RE_ENABLE_I18N */
/* We don't care the syntax in this case. */
ret = build_charclass (trans, sbcset,
#endif
/* Build a tree for simple bracket. */
+#if defined GCC_LINT || defined lint
+ memset (&br_token, 0, sizeof br_token);
+#endif
br_token.type = SIMPLE_BRACKET;
br_token.opr.sbcset = sbcset;
tree = create_token_tree (dfa, NULL, NULL, &br_token);
/* This is intended for the expressions like "a{1,3}".
Fetch a number from 'input', and return the number.
- Return REG_MISSING if the number field is empty like "{,1}".
+ Return -1 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. */
+ Return -2 if an error occurred. */
static Idx
fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax)
{
- Idx num = REG_MISSING;
+ Idx num = -1;
unsigned char c;
while (1)
{
fetch_token (token, input, syntax);
c = token->opr.c;
if (BE (token->type == END_OF_RE, 0))
- return REG_ERROR;
+ return -2;
if (token->type == OP_CLOSE_DUP_NUM || c == ',')
break;
- num = ((token->type != CHARACTER || c < '0' || '9' < c
- || num == REG_ERROR)
- ? REG_ERROR
- : num == REG_MISSING
+ num = ((token->type != CHARACTER || c < '0' || '9' < c || num == -2)
+ ? -2
+ : num == -1
? c - '0'
: MIN (RE_DUP_MAX + 1, num * 10 + c - '0'));
}
re_token_type_t type)
{
re_token_t t;
+#if defined GCC_LINT || defined lint
+ memset (&t, 0, sizeof t);
+#endif
t.type = type;
return create_token_tree (dfa, left, right, &t);
}
tree->token.opt_subexp = 0;
tree->first = NULL;
tree->next = NULL;
- tree->node_idx = REG_MISSING;
+ tree->node_idx = -1;
if (left != NULL)
left->parent = tree;
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2013 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
/* Definitions for data structures and routines for the regular
expression library.
- Copyright (C) 1985, 1989-1993, 1995-1998, 2000-2003, 2005-2013 Free Software
+ Copyright (C) 1985, 1989-1993, 1995-1998, 2000-2003, 2005-2016 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
supported within glibc itself, and glibc users should not define
_REGEX_LARGE_OFFSETS. */
-/* The type of nonnegative object indexes. Traditionally, GNU regex
- uses 'int' for these. Code that uses __re_idx_t should work
- regardless of whether the type is signed. */
-typedef size_t __re_idx_t;
-
/* The type of object sizes. */
typedef size_t __re_size_t;
/* The 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;
| RE_INVALID_INTERVAL_ORD)
# define RE_SYNTAX_GREP \
- (RE_BK_PLUS_QM | RE_CHAR_CLASSES \
- | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \
- | RE_NEWLINE_ALT)
+ ((RE_SYNTAX_POSIX_BASIC | RE_NEWLINE_ALT) \
+ & ~(RE_CONTEXT_INVALID_DUP | RE_DOT_NOT_NULL))
# define RE_SYNTAX_EGREP \
- (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \
- | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \
- | RE_NEWLINE_ALT | RE_NO_BK_PARENS \
- | RE_NO_BK_VBAR)
+ ((RE_SYNTAX_POSIX_EXTENDED | RE_INVALID_INTERVAL_ORD | RE_NEWLINE_ALT) \
+ & ~(RE_CONTEXT_INVALID_OPS | RE_DOT_NOT_NULL))
+/* POSIX grep -E behavior is no longer incompatible with GNU. */
# define RE_SYNTAX_POSIX_EGREP \
- (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \
- | RE_INVALID_INTERVAL_ORD)
+ RE_SYNTAX_EGREP
/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */
# define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC
#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. */
+ is wider than ssize_t, so ssize_t is safe. ptrdiff_t is not
+ visible here, so use ssize_t. */
typedef ssize_t regoff_t;
#else
/* The traditional GNU regex implementation mishandles strings longer
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
+ Note that the translate table must either have been initialized 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,
match, or -2 for an internal error. Also return register
information in REGS (if REGS and BUFFER->no_sub are nonzero). */
extern regoff_t re_search (struct re_pattern_buffer *__buffer,
- const char *__string, __re_idx_t __length,
- __re_idx_t __start, regoff_t __range,
+ const char *__String, regoff_t __length,
+ regoff_t __start, regoff_t __range,
struct re_registers *__regs);
/* Like 're_search', but search in the concatenation of STRING1 and
STRING2. Also, stop searching at index START + STOP. */
extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer,
- const char *__string1, __re_idx_t __length1,
- const char *__string2, __re_idx_t __length2,
- __re_idx_t __start, regoff_t __range,
+ const char *__string1, regoff_t __length1,
+ const char *__string2, regoff_t __length2,
+ regoff_t __start, regoff_t __range,
struct re_registers *__regs,
- __re_idx_t __stop);
+ regoff_t __stop);
/* Like 're_search', but return how many characters in STRING the regexp
in BUFFER matched, starting at position START. */
extern regoff_t re_match (struct re_pattern_buffer *__buffer,
- const char *__string, __re_idx_t __length,
- __re_idx_t __start, struct re_registers *__regs);
+ const char *__String, regoff_t __length,
+ regoff_t __start, struct re_registers *__regs);
/* Relates to 're_match' as 're_search_2' relates to 're_search'. */
extern regoff_t re_match_2 (struct re_pattern_buffer *__buffer,
- const char *__string1, __re_idx_t __length1,
- const char *__string2, __re_idx_t __length2,
- __re_idx_t __start, struct re_registers *__regs,
- __re_idx_t __stop);
+ const char *__string1, regoff_t __length1,
+ const char *__string2, regoff_t __length2,
+ regoff_t __start, struct re_registers *__regs,
+ regoff_t __stop);
/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
regoff_t *__starts, regoff_t *__ends);
#endif /* Use GNU */
-#if defined _REGEX_RE_COMP || (defined _LIBC && defined __USE_BSD)
+#if defined _REGEX_RE_COMP || (defined _LIBC && defined __USE_MISC)
# ifndef _CRAY
/* 4.2 bsd compatibility. */
extern char *re_comp (const char *);
int __cflags);
extern int regexec (const regex_t *_Restrict_ __preg,
- const char *_Restrict_ __string, size_t __nmatch,
+ const char *_Restrict_ __String, size_t __nmatch,
regmatch_t __pmatch[_Restrict_arr_],
int __eflags);
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2013 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
+ byte_idx), remain_len, &pstr->cur_state);
if (BE (mbclen < (size_t) -2, 1))
{
- wchar_t wcu = wc;
- if (iswlower (wc))
+ wchar_t wcu = __towupper (wc);
+ if (wcu != wc)
{
size_t mbcdlen;
- wcu = towupper (wc);
- mbcdlen = wcrtomb (buf, wcu, &prev_st);
+ mbcdlen = __wcrtomb (buf, wcu, &prev_st);
if (BE (mbclen == mbcdlen, 1))
memcpy (pstr->mbs + byte_idx, buf, mbclen);
else
mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state);
if (BE (mbclen < (size_t) -2, 1))
{
- wchar_t wcu = wc;
- if (iswlower (wc))
+ wchar_t wcu = __towupper (wc);
+ if (wcu != wc)
{
size_t mbcdlen;
- wcu = towupper (wc);
mbcdlen = wcrtomb ((char *) buf, wcu, &prev_st);
if (BE (mbclen == mbcdlen, 1))
memcpy (pstr->mbs + byte_idx, buf, mbclen);
int ch = pstr->raw_mbs[pstr->raw_mbs_idx + char_idx];
if (BE (pstr->trans != NULL, 0))
ch = pstr->trans[ch];
- if (islower (ch))
- pstr->mbs[char_idx] = toupper (ch);
- else
- pstr->mbs[char_idx] = ch;
+ pstr->mbs[char_idx] = toupper (ch);
}
pstr->valid_len = char_idx;
pstr->valid_raw_len = char_idx;
pstr->valid_len - offset);
pstr->valid_len -= offset;
pstr->valid_raw_len -= offset;
-#if DEBUG
+#if defined DEBUG && DEBUG
assert (pstr->valid_len > 0);
#endif
}
re_string_context_at (const re_string_t *input, Idx idx, int eflags)
{
int c;
- if (BE (! REG_VALID_INDEX (idx), 0))
+ if (BE (idx < 0, 0))
/* In this case, we use the value stored in input->tip_context,
since we can't know the character in input->mbs[-1] here. */
return input->tip_context;
Idx wc_idx = idx;
while(input->wcs[wc_idx] == WEOF)
{
-#ifdef DEBUG
+#if defined DEBUG && DEBUG
/* It must not happen. */
- assert (REG_VALID_INDEX (wc_idx));
+ assert (wc_idx >= 0);
#endif
--wc_idx;
- if (! REG_VALID_INDEX (wc_idx))
+ if (wc_idx < 0)
return input->tip_context;
}
wc = input->wcs[wc_idx];
if (src1->elems[i1] == src2->elems[i2])
{
/* Try to find the item in DEST. Maybe we could binary search? */
- while (REG_VALID_INDEX (id) && dest->elems[id] > src1->elems[i1])
+ while (id >= 0 && dest->elems[id] > src1->elems[i1])
--id;
- if (! REG_VALID_INDEX (id) || dest->elems[id] != src1->elems[i1])
+ if (id < 0 || dest->elems[id] != src1->elems[i1])
dest->elems[--sbase] = src1->elems[i1];
- if (! REG_VALID_INDEX (--i1) || ! REG_VALID_INDEX (--i2))
+ if (--i1 < 0 || --i2 < 0)
break;
}
/* Lower the highest of the two items. */
else if (src1->elems[i1] < src2->elems[i2])
{
- if (! REG_VALID_INDEX (--i2))
+ if (--i2 < 0)
break;
}
else
{
- if (! REG_VALID_INDEX (--i1))
+ if (--i1 < 0)
break;
}
}
DEST elements are already in place; this is more or
less the same loop that is in re_node_set_merge. */
dest->nelem += delta;
- if (delta > 0 && REG_VALID_INDEX (id))
+ if (delta > 0 && id >= 0)
for (;;)
{
if (dest->elems[is] > dest->elems[id])
{
/* Slide from the bottom. */
dest->elems[id + delta] = dest->elems[id];
- if (! REG_VALID_INDEX (--id))
+ if (--id < 0)
break;
}
}
/* Copy into the top of DEST the items of SRC that are not
found in DEST. Maybe we could binary search in DEST? */
for (sbase = dest->nelem + 2 * src->nelem,
- is = src->nelem - 1, id = dest->nelem - 1;
- REG_VALID_INDEX (is) && REG_VALID_INDEX (id); )
+ is = src->nelem - 1, id = dest->nelem - 1; is >= 0 && id >= 0; )
{
if (dest->elems[id] == src->elems[is])
is--, id--;
--id;
}
- if (REG_VALID_INDEX (is))
+ if (is >= 0)
{
/* If DEST is exhausted, the remaining items of SRC must be unique. */
sbase -= is + 1;
{
/* Slide from the bottom. */
dest->elems[id + delta] = dest->elems[id];
- if (! REG_VALID_INDEX (--id))
+ if (--id < 0)
{
/* Copy remaining SRC elements. */
memcpy (dest->elems, dest->elems + sbase,
Idx i;
if (set1 == NULL || set2 == NULL || set1->nelem != set2->nelem)
return false;
- for (i = set1->nelem ; REG_VALID_INDEX (--i) ; )
+ for (i = set1->nelem ; --i >= 0 ; )
if (set1->elems[i] != set2->elems[i])
return false;
return true;
re_node_set_contains (const re_node_set *set, Idx elem)
{
__re_size_t idx, right, mid;
- if (! REG_VALID_NONZERO_INDEX (set->nelem))
+ if (set->nelem <= 0)
return 0;
/* Binary search the element. */
\f
/* Add the token TOKEN to dfa->nodes, and return the index of the token.
- Or return REG_MISSING if an error occurred. */
+ Or return -1 if an error occurred. */
static Idx
internal_function
MAX (sizeof (re_node_set),
sizeof (Idx)));
if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < new_nodes_alloc, 0))
- return REG_MISSING;
+ return -1;
new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc);
if (BE (new_nodes == NULL, 0))
- return REG_MISSING;
+ return -1;
dfa->nodes = new_nodes;
new_nexts = re_realloc (dfa->nexts, Idx, new_nodes_alloc);
new_indices = re_realloc (dfa->org_indices, Idx, new_nodes_alloc);
new_eclosures = re_realloc (dfa->eclosures, re_node_set, new_nodes_alloc);
if (BE (new_nexts == NULL || new_indices == NULL
|| new_edests == NULL || new_eclosures == NULL, 0))
- return REG_MISSING;
+ {
+ re_free (new_nexts);
+ re_free (new_indices);
+ re_free (new_edests);
+ re_free (new_eclosures);
+ return -1;
+ }
dfa->nexts = new_nexts;
dfa->org_indices = new_indices;
dfa->edests = new_edests;
((token.type == OP_PERIOD && dfa->mb_cur_max > 1)
|| token.type == COMPLEX_BRACKET);
#endif
- dfa->nexts[dfa->nodes_len] = REG_MISSING;
+ dfa->nexts[dfa->nodes_len] = -1;
re_node_set_init_empty (dfa->edests + dfa->nodes_len);
re_node_set_init_empty (dfa->eclosures + dfa->nodes_len);
return dfa->nodes_len++;
re_dfastate_t *new_state;
struct re_state_table_entry *spot;
Idx i;
-#ifdef lint
+#if defined GCC_LINT || defined lint
/* Suppress bogus uninitialized-variable warnings. */
*err = REG_NOERROR;
#endif
re_dfastate_t *new_state;
struct re_state_table_entry *spot;
Idx i;
-#ifdef lint
+#if defined GCC_LINT || defined lint
/* Suppress bogus uninitialized-variable warnings. */
*err = REG_NOERROR;
#endif
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2013 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
#include <stdbool.h>
#include <stdint.h>
+#include "intprops.h"
+
#ifdef _LIBC
-# include <bits/libc-lock.h>
+# include <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
+#elif defined GNULIB_LOCK && !defined USE_UNLOCKED_IO
# include "glthread/lock.h"
/* Use gl_lock_define if empty macro arguments are known to work.
Otherwise, fall back on less-portable substitutes. */
# 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
+#elif defined GNULIB_PTHREAD && !defined USE_UNLOCKED_IO
# include <pthread.h>
# define lock_define(name) pthread_mutex_t name;
# define lock_init(lock) pthread_mutex_init (&(lock), 0)
# ifndef _RE_DEFINE_LOCALE_FUNCTIONS
# define _RE_DEFINE_LOCALE_FUNCTIONS 1
# include <locale/localeinfo.h>
-# include <locale/elem-hash.h>
# include <locale/coll-lookup.h>
# endif
#endif
# define gettext_noop(String) String
#endif
-#if (defined MB_CUR_MAX && HAVE_WCTYPE_H && HAVE_ISWCTYPE && HAVE_WCSCOLL) || _LIBC
+#if (defined MB_CUR_MAX && HAVE_WCTYPE_H && HAVE_ISWCTYPE) || _LIBC
# define RE_ENABLE_I18N
#endif
-#if __GNUC__ >= 3
-# define BE(expr, val) __builtin_expect (expr, val)
-#else
-# define BE(expr, val) (expr)
-#endif
+#define BE(expr, val) __builtin_expect (expr, val)
/* Number of ASCII characters. */
#define ASCII_CHARS 0x80
# undef __wctype
# undef __iswctype
# define __wctype wctype
+# define __iswalnum iswalnum
# define __iswctype iswctype
+# define __towlower towlower
+# define __towupper towupper
# define __btowc btowc
# define __mbrtowc mbrtowc
# define __wcrtomb wcrtomb
# define __attribute__(arg)
#endif
-typedef __re_idx_t Idx;
-#ifdef _REGEX_LARGE_OFFSETS
-# define IDX_MAX (SIZE_MAX - 2)
-#else
-# define IDX_MAX INT_MAX
-#endif
-
-/* Special return value for failure to match. */
-#define REG_MISSING ((Idx) -1)
-
-/* Special return value for internal error. */
-#define REG_ERROR ((Idx) -2)
-
-/* Test whether N is a valid index, and is not one of the above. */
-#ifdef _REGEX_LARGE_OFFSETS
-# define REG_VALID_INDEX(n) ((Idx) (n) < REG_ERROR)
-#else
-# define REG_VALID_INDEX(n) (0 <= (n))
+#ifndef SSIZE_MAX
+# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
#endif
-/* Test whether N is a valid nonzero index. */
+/* The type of indexes into strings. This is signed, not size_t,
+ since the API requires indexes to fit in regoff_t anyway, and using
+ signed integers makes the code a bit smaller and presumably faster.
+ The traditional GNU regex implementation uses int for indexes.
+ The POSIX-compatible implementation uses a possibly-wider type.
+ The name 'Idx' is three letters to minimize the hassle of
+ reindenting a lot of regex code that formerly used 'int'. */
+typedef regoff_t Idx;
#ifdef _REGEX_LARGE_OFFSETS
-# define REG_VALID_NONZERO_INDEX(n) ((Idx) ((n) - 1) < (Idx) (REG_ERROR - 1))
+# define IDX_MAX SSIZE_MAX
#else
-# define REG_VALID_NONZERO_INDEX(n) (0 < (n))
+# define IDX_MAX INT_MAX
#endif
/* A hash value, suitable for computing hash tables. */
#ifndef _LIBC
# define internal_function
+# define IS_IN(libc) false
#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 */
+#endif /* RE_ENABLE_I18N */
static void build_upper_buffer (re_string_t *pstr) internal_function;
static void re_string_translate_buffer (re_string_t *pstr) internal_function;
static unsigned int re_string_context_at (const re_string_t *input, Idx idx,
int eflags)
internal_function __attribute__ ((pure));
-#endif
+
#define re_string_peek_byte(pstr, offset) \
((pstr)->mbs[(pstr)->cur_idx + offset])
#define re_string_fetch_byte(pstr) \
#define IS_WORD_CHAR(ch) (isalnum (ch) || (ch) == '_')
#define IS_NEWLINE(ch) ((ch) == NEWLINE_CHAR)
-#define IS_WIDE_WORD_CHAR(ch) (iswalnum (ch) || (ch) == L'_')
+#define IS_WIDE_WORD_CHAR(ch) (__iswalnum (ch) || (ch) == L'_')
#define IS_WIDE_NEWLINE(ch) ((ch) == WIDE_NEWLINE_CHAR)
#define NOT_SATISFY_PREV_CONSTRAINT(constraint,context) \
return (wint_t) pstr->wcs[idx];
}
-# ifndef NOT_IN_libc
+# ifdef _LIBC
+# include <locale/weight.h>
+# endif
+
static int
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;
-# include <locale/weight.h>
uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
if (nrules != 0)
indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
_NL_COLLATE_INDIRECTMB);
p = pstr->mbs + idx;
- findidx (&p, pstr->len - idx);
+ findidx (table, indirect, extra, &p, pstr->len - idx);
return p - pstr->mbs - idx;
}
else
-# endif /* _LIBC */
+# endif /* _LIBC */
return 1;
}
-# endif
#endif /* RE_ENABLE_I18N */
#ifndef __GNUC_PREREQ
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2013 Free Software Foundation, Inc.
+ Copyright (C) 2002-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
We return 0 if we find a match and REG_NOMATCH if not. */
int
-regexec (preg, string, nmatch, pmatch, eflags)
- const regex_t *_Restrict_ preg;
- const char *_Restrict_ string;
- size_t nmatch;
- regmatch_t pmatch[_Restrict_arr_];
- int eflags;
+regexec (const regex_t *_Restrict_ preg, const char *_Restrict_ string,
+ size_t nmatch, regmatch_t pmatch[], int eflags)
{
reg_errcode_t err;
Idx start, length;
match was found and -2 indicates an internal error. */
regoff_t
-re_match (bufp, string, length, start, regs)
- struct re_pattern_buffer *bufp;
- const char *string;
- Idx length, start;
- struct re_registers *regs;
+re_match (struct re_pattern_buffer *bufp, const char *string, Idx length,
+ Idx start, struct re_registers *regs)
{
return re_search_stub (bufp, string, length, start, 0, length, regs, true);
}
#endif
regoff_t
-re_search (bufp, string, length, start, range, regs)
- struct re_pattern_buffer *bufp;
- const char *string;
- Idx length, start;
- regoff_t range;
- struct re_registers *regs;
+re_search (struct re_pattern_buffer *bufp, const char *string, Idx length,
+ Idx start, regoff_t range, struct re_registers *regs)
{
return re_search_stub (bufp, string, length, start, range, length, regs,
false);
#endif
regoff_t
-re_match_2 (bufp, string1, length1, string2, length2, start, regs, stop)
- struct re_pattern_buffer *bufp;
- const char *string1, *string2;
- Idx length1, length2, start, stop;
- struct re_registers *regs;
+re_match_2 (struct re_pattern_buffer *bufp, const char *string1, Idx length1,
+ const char *string2, Idx length2, Idx start,
+ struct re_registers *regs, Idx stop)
{
return re_search_2_stub (bufp, string1, length1, string2, length2,
start, 0, regs, stop, true);
#endif
regoff_t
-re_search_2 (bufp, string1, length1, string2, length2, start, range, regs, stop)
- struct re_pattern_buffer *bufp;
- const char *string1, *string2;
- Idx length1, length2, start, stop;
- regoff_t range;
- struct re_registers *regs;
+re_search_2 (struct re_pattern_buffer *bufp, const char *string1, Idx length1,
+ const char *string2, Idx length2, Idx start, regoff_t range,
+ struct re_registers *regs, Idx stop)
{
return re_search_2_stub (bufp, string1, length1, string2, length2,
start, range, regs, stop, false);
#endif
static regoff_t
-re_search_2_stub (struct re_pattern_buffer *bufp,
- const char *string1, Idx length1,
- const char *string2, Idx length2,
- Idx start, regoff_t range, struct re_registers *regs,
+internal_function
+re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1,
+ Idx length1, const char *string2, Idx length2, Idx start,
+ regoff_t range, struct re_registers *regs,
Idx stop, bool ret_len)
{
const char *str;
regoff_t rval;
- Idx len = length1 + length2;
+ Idx len;
char *s = NULL;
- if (BE (length1 < 0 || length2 < 0 || stop < 0 || len < length1, 0))
+ if (BE ((length1 < 0 || length2 < 0 || stop < 0
+ || INT_ADD_WRAPV (length1, length2, &len)),
+ 0))
return -2;
/* Concatenate the strings. */
otherwise the position of the match is returned. */
static regoff_t
-re_search_stub (struct re_pattern_buffer *bufp,
- const char *string, Idx length,
+internal_function
+re_search_stub (struct re_pattern_buffer *bufp, const char *string, Idx length,
Idx start, regoff_t range, Idx stop, struct re_registers *regs,
bool ret_len)
{
}
static unsigned
+internal_function
re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs,
int regs_allocated)
{
freeing the old data. */
void
-re_set_registers (bufp, regs, num_regs, starts, ends)
- struct re_pattern_buffer *bufp;
- struct re_registers *regs;
- __re_size_t num_regs;
- regoff_t *starts, *ends;
+re_set_registers (struct re_pattern_buffer *bufp, struct re_registers *regs,
+ __re_size_t num_regs, regoff_t *starts, regoff_t *ends)
{
if (num_regs)
{
# ifdef _LIBC
weak_function
# endif
-re_exec (s)
- const char *s;
+re_exec (const char *s)
{
return 0 == regexec (&re_comp_buf, s, 0, NULL, 0);
}
(0 <= LAST_START && LAST_START <= LENGTH) */
static reg_errcode_t
-__attribute_warn_unused_result__
-re_search_internal (const regex_t *preg,
- const char *string, Idx length,
- Idx start, Idx last_start, Idx stop,
- size_t nmatch, regmatch_t pmatch[],
- int eflags)
+__attribute_warn_unused_result__ internal_function
+re_search_internal (const regex_t *preg, const char *string, Idx length,
+ Idx start, Idx last_start, Idx stop, size_t nmatch,
+ regmatch_t pmatch[], int eflags)
{
reg_errcode_t err;
const re_dfa_t *dfa = preg->buffer;
bool fl_longest_match;
int match_kind;
Idx match_first;
- Idx match_last = REG_MISSING;
+ Idx match_last = -1;
Idx extra_nmatch;
bool sb;
int ch;
mctx.state_log_top = mctx.nbkref_ents = mctx.max_mb_elem_len = 0;
match_last = check_matching (&mctx, fl_longest_match,
start <= last_start ? &match_first : NULL);
- if (match_last != REG_MISSING)
+ if (match_last != -1)
{
- if (BE (match_last == REG_ERROR, 0))
+ if (BE (match_last == -2, 0))
{
err = REG_ESPACE;
goto free_return;
break;
if (BE (err != REG_NOMATCH, 0))
goto free_return;
- match_last = REG_MISSING;
+ match_last = -1;
}
else
break; /* We found a match. */
}
#ifdef DEBUG
- assert (match_last != REG_MISSING);
+ assert (match_last != -1);
assert (err == REG_NOERROR);
#endif
}
static reg_errcode_t
-__attribute_warn_unused_result__
+internal_function __attribute_warn_unused_result__
prune_impossible_nodes (re_match_context_t *mctx)
{
const re_dfa_t *const dfa = mctx->dfa;
do
{
--match_last;
- if (! REG_VALID_INDEX (match_last))
+ if (match_last < 0)
{
ret = REG_NOMATCH;
goto free_return;
}
/* Check whether the regular expression match input string INPUT or not,
- and return the index where the matching end. Return REG_MISSING if
- there is no match, and return REG_ERROR in case of an error.
+ and return the index where the matching end. Return -1 if
+ there is no match, and return -2 in case of an error.
FL_LONGEST_MATCH means we want the POSIX longest matching.
If P_MATCH_FIRST is not NULL, and the match fails, it is set to the
next place where we may want to try matching.
const re_dfa_t *const dfa = mctx->dfa;
reg_errcode_t err;
Idx match = 0;
- Idx match_last = REG_MISSING;
+ Idx match_last = -1;
Idx cur_str_idx = re_string_cur_idx (&mctx->input);
re_dfastate_t *cur_state;
bool at_init_state = p_match_first != NULL;
if (BE (cur_state == NULL, 0))
{
assert (err == REG_ESPACE);
- return REG_ERROR;
+ return -2;
}
if (mctx->state_log != NULL)
if (BE (err != REG_NOERROR, 0))
{
assert (err == REG_ESPACE);
- return REG_ERROR;
+ return -2;
}
}
state using the state log, if available and if we have not
already found a valid (even if not the longest) match. */
if (BE (err != REG_NOERROR, 0))
- return REG_ERROR;
+ return -2;
if (mctx->state_log == NULL
|| (match && !fl_longest_match)
/* Compute the next node to which "NFA" transit from NODE("NFA" is a NFA
corresponding to the DFA).
Return the destination node, and update EPS_VIA_NODES;
- return REG_MISSING in case of errors. */
+ return -1 in case of errors. */
static Idx
internal_function
Idx dest_node;
ok = re_node_set_insert (eps_via_nodes, node);
if (BE (! ok, 0))
- return REG_ERROR;
- /* Pick up a valid destination, or return REG_MISSING if none
+ return -2;
+ /* Pick up a valid destination, or return -1 if none
is found. */
- for (dest_node = REG_MISSING, i = 0; i < edests->nelem; ++i)
+ for (dest_node = -1, i = 0; i < edests->nelem; ++i)
{
Idx candidate = edests->elems[i];
if (!re_node_set_contains (cur_nodes, candidate))
continue;
- if (dest_node == REG_MISSING)
+ if (dest_node == -1)
dest_node = candidate;
else
else if (fs != NULL
&& push_fail_stack (fs, *pidx, candidate, nregs, regs,
eps_via_nodes))
- return REG_ERROR;
+ return -2;
/* We know we are going to exit. */
break;
if (fs != NULL)
{
if (regs[subexp_idx].rm_so == -1 || regs[subexp_idx].rm_eo == -1)
- return REG_MISSING;
+ return -1;
else if (naccepted)
{
char *buf = (char *) re_string_get_buffer (&mctx->input);
if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx,
naccepted) != 0)
- return REG_MISSING;
+ return -1;
}
}
Idx dest_node;
ok = re_node_set_insert (eps_via_nodes, node);
if (BE (! ok, 0))
- return REG_ERROR;
+ return -2;
dest_node = dfa->edests[node].elems[0];
if (re_node_set_contains (&mctx->state_log[*pidx]->nodes,
dest_node))
if (fs && (*pidx > mctx->match_last || mctx->state_log[*pidx] == NULL
|| !re_node_set_contains (&mctx->state_log[*pidx]->nodes,
dest_node)))
- return REG_MISSING;
+ return -1;
re_node_set_empty (eps_via_nodes);
return dest_node;
}
}
- return REG_MISSING;
+ return -1;
}
static reg_errcode_t
regmatch_t *regs, re_node_set *eps_via_nodes)
{
Idx num = --fs->num;
- assert (REG_VALID_INDEX (num));
+ assert (num >= 0);
*pidx = fs->stack[num].idx;
memcpy (regs, fs->stack[num].regs, sizeof (regmatch_t) * nregs);
re_node_set_free (eps_via_nodes);
cur_node = proceed_next_node (mctx, nmatch, pmatch, &idx, cur_node,
&eps_via_nodes, fs);
- if (BE (! REG_VALID_INDEX (cur_node), 0))
+ if (BE (cur_node < 0, 0))
{
- if (BE (cur_node == REG_ERROR, 0))
+ if (BE (cur_node == -2, 0))
{
re_node_set_free (&eps_via_nodes);
if (prev_idx_match_malloced)
{
Idx edst1 = dfa->edests[cur_node].elems[0];
Idx edst2 = ((dfa->edests[cur_node].nelem > 1)
- ? dfa->edests[cur_node].elems[1] : REG_MISSING);
+ ? dfa->edests[cur_node].elems[1] : -1);
if ((!re_node_set_contains (inv_eclosure, edst1)
&& re_node_set_contains (dest_nodes, edst1))
- || (REG_VALID_NONZERO_INDEX (edst2)
+ || (edst2 > 0
&& !re_node_set_contains (inv_eclosure, edst2)
&& re_node_set_contains (dest_nodes, edst2)))
{
switch (dfa->nodes[node].type)
{
case OP_BACK_REF:
- if (bkref_idx != REG_MISSING)
+ if (bkref_idx != -1)
{
struct re_backref_cache_entry *ent = mctx->bkref_ents + bkref_idx;
do
subexp_idx = dfa->nodes[ent->node].opr.idx;
if (ent->subexp_to == str_idx)
{
- Idx ops_node = REG_MISSING;
- Idx cls_node = REG_MISSING;
+ Idx ops_node = -1;
+ Idx cls_node = -1;
for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx)
{
Idx node = dest_nodes->elems[node_idx];
/* Check the limitation of the open subexpression. */
/* Note that (ent->subexp_to = str_idx != ent->subexp_from). */
- if (REG_VALID_INDEX (ops_node))
+ if (ops_node >= 0)
{
err = sub_epsilon_src_nodes (dfa, ops_node, dest_nodes,
candidates);
}
/* Check the limitation of the close subexpression. */
- if (REG_VALID_INDEX (cls_node))
+ if (cls_node >= 0)
for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx)
{
Idx node = dest_nodes->elems[node_idx];
re_sift_context_t local_sctx;
Idx first_idx = search_cur_bkref_entry (mctx, str_idx);
- if (first_idx == REG_MISSING)
+ if (first_idx == -1)
return REG_NOERROR;
local_sctx.sifted_states = NULL; /* Mark that it hasn't been initialized. */
if (BE (err != REG_NOERROR, 0))
return err;
#ifdef DEBUG
- assert (dfa->nexts[cur_node_idx] != REG_MISSING);
+ assert (dfa->nexts[cur_node_idx] != -1);
#endif
new_nodes = dfa->eclosures + dfa->nexts[cur_node_idx];
/* 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);
+ assert (dfa->nexts[node_idx] != -1);
#endif
for (; bkc_idx < mctx->nbkref_ents; ++bkc_idx)
{
const char *buf = (const char *) re_string_get_buffer (&mctx->input);
/* Return if we have already checked BKREF_NODE at BKREF_STR_IDX. */
Idx cache_idx = search_cur_bkref_entry (mctx, bkref_str_idx);
- if (cache_idx != REG_MISSING)
+ if (cache_idx != -1)
{
const struct re_backref_cache_entry *entry
= mctx->bkref_ents + cache_idx;
nodes = &mctx->state_log[sl_str]->nodes;
cls_node = find_subexp_node (dfa, nodes, subexp_num,
OP_CLOSE_SUBEXP);
- if (cls_node == REG_MISSING)
+ if (cls_node == -1)
continue; /* No. */
if (sub_top->path == NULL)
{
&& node->opr.idx == subexp_idx)
return cls_node;
}
- return REG_MISSING;
+ return -1;
}
/* Check whether the node TOP_NODE at TOP_STR can arrive to the node
Idx cur_node = cur_nodes->elems[idx];
const re_node_set *eclosure = dfa->eclosures + cur_node;
outside_node = find_subexp_node (dfa, eclosure, ex_subexp, type);
- if (outside_node == REG_MISSING)
+ if (outside_node == -1)
{
/* There are no problematic nodes, just merge them. */
err = re_node_set_merge (&new_nodes, eclosure);
Idx cache_idx_start = search_cur_bkref_entry (mctx, cur_str);
struct re_backref_cache_entry *ent;
- if (cache_idx_start == REG_MISSING)
+ if (cache_idx_start == -1)
return REG_NOERROR;
restart:
/* 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 (BE (ndests <= 0, 0))
{
if (dests_node_malloced)
free (dests_alloc);
for (j = 0; j < dests_node[i].nelem; ++j)
{
next_node = dfa->nexts[dests_node[i].elems[j]];
- if (next_node != REG_MISSING)
+ if (next_node != -1)
{
err = re_node_set_merge (&follows, dfa->eclosures + next_node);
if (BE (err != REG_NOERROR, 0))
error_return:
for (j = 0; j < ndests; ++j)
re_node_set_free (dests_node + j);
- return REG_MISSING;
+ return -1;
}
#ifdef RE_ENABLE_I18N
one collating element like '.', '[a-z]', opposite to the other nodes
can only accept one byte. */
+# ifdef _LIBC
+# include <locale/weight.h>
+# endif
+
static int
internal_function
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;
- /* This #include defines a local function! */
-# include <locale/weight.h>
/* match with collating_symbol? */
if (cset->ncoll_syms)
_NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB);
indirect = (const int32_t *)
_NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
- int32_t idx = findidx (&cp, elem_len);
+ int32_t idx = findidx (table, indirect, extra, &cp, elem_len);
if (idx > 0)
for (i = 0; i < cset->nequiv_classes; ++i)
{
match_ctx_init (re_match_context_t *mctx, int eflags, Idx n)
{
mctx->eflags = eflags;
- mctx->match_last = REG_MISSING;
+ mctx->match_last = -1;
if (n > 0)
{
/* Avoid overflow. */
return REG_NOERROR;
}
-/* Return the first entry with the same str_idx, or REG_MISSING if none is
+/* Return the first entry with the same str_idx, or -1 if none is
found. Note that MCTX->BKREF_ENTS is already sorted by MCTX->STR_IDX. */
static Idx
if (left < last && mctx->bkref_ents[left].str_idx == str_idx)
return left;
else
- return REG_MISSING;
+ return -1;
}
/* Register the node NODE, whose type is OP_OPEN_SUBEXP, and which matches
/* Work around rename bugs in some systems.
- Copyright (C) 2001-2003, 2005-2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2006, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
char *dst_temp = (char *) dst;
bool src_slash;
bool dst_slash;
- bool dst_exists;
+ bool dst_exists _GL_UNUSED;
int ret_val = -1;
int rename_errno = ENOTDIR;
struct stat src_st;
ret_val = rename (src_temp, dst_temp);
rename_errno = errno;
- out:
+
+ out: _GL_UNUSED_LABEL;
+
if (src_temp != src)
free (src_temp);
if (dst_temp != dst)
/* Work around rmdir bugs.
- Copyright (C) 1988, 1990, 1999, 2003-2006, 2009-2013 Free Software
+ Copyright (C) 1988, 1990, 1999, 2003-2006, 2009-2016 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
-/* Determine whether two stat buffers refer to the same file.
+/* Determine whether two stat buffers are known to refer to the same file.
- Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
&& (a).st_ino[1] == (b).st_ino[1] \
&& (a).st_ino[2] == (b).st_ino[2] \
&& (a).st_dev == (b).st_dev)
+# elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* On MinGW, struct stat lacks necessary info, so always return 0.
+ Callers can use !a.st_ino to deduce that the information is unknown. */
+# define SAME_INODE(a, b) 0
# else
# define SAME_INODE(a, b) \
((a).st_ino == (b).st_ino \
-/* Replacement <sched.h> for platforms that lack it.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+/* A GNU-like <sched.h>.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* The include_next requires a split double-inclusion guard. */
#if @HAVE_SCHED_H@
+# if @HAVE_SYS_CDEFS_H@
+# include <sys/cdefs.h>
+# endif
# @INCLUDE_NEXT@ @NEXT_SCHED_H@
#endif
and Mac OS X 10.5. */
#include <sys/types.h>
+#ifdef __KLIBC__
+
+/* On OS/2 kLIBC, struct sched_param is in spawn.h */
+# include <spawn.h>
+
+#endif
+
#if !@HAVE_STRUCT_SCHED_PARAM@
# if !GNULIB_defined_struct_sched_param
-/* Look up an environment variable more securely.
+/* Look up an environment variable, returning NULL in insecure situations.
- Copyright 2013 Free Software Foundation, Inc.
+ Copyright 2013-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
#include <stdlib.h>
#if !HAVE___SECURE_GETENV
-# if HAVE_ISSETUGID
+# if HAVE_ISSETUGID || (HAVE_GETUID && HAVE_GETEUID && HAVE_GETGID && HAVE_GETEGID)
# include <unistd.h>
-# else
-# undef issetugid
-# define issetugid() 1
# endif
#endif
char *
secure_getenv (char const *name)
{
-#if HAVE___SECURE_GETENV
+#if HAVE___SECURE_GETENV /* glibc */
return __secure_getenv (name);
-#else
+#elif HAVE_ISSETUGID /* OS X, FreeBSD, NetBSD, OpenBSD */
if (issetugid ())
- return 0;
+ return NULL;
+ return getenv (name);
+#elif HAVE_GETUID && HAVE_GETEUID && HAVE_GETGID && HAVE_GETEGID /* other Unix */
+ if (geteuid () != getuid () || getegid () != getgid ())
+ return NULL;
return getenv (name);
+#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* native Windows */
+ /* On native Windows, there is no such concept as setuid or setgid binaries.
+ - Programs launched as system services have high privileges, but they don't
+ inherit environment variables from a user.
+ - Programs launched by a user with "Run as Administrator" have high
+ privileges and use the environment variables, but the user has been asked
+ whether he agrees.
+ - Programs launched by a user without "Run as Administrator" cannot gain
+ high privileges, therefore there is no risk. */
+ return getenv (name);
+#else
+ return NULL;
#endif
}
/* Convenience declarations when working with <signal.h>.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Return the handler of a signal, as a sa_handler_t value regardless
of its true type. The resulting function can be compared to
special values like SIG_IGN but it is not portable to call it. */
-SIG_HANDLER_INLINE sa_handler_t
+SIG_HANDLER_INLINE sa_handler_t _GL_ATTRIBUTE_PURE
get_handler (struct sigaction const *a)
{
#ifdef SA_SIGINFO
/* POSIX compatible signal blocking.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
Written by Eric Blake <ebb9@byu.net>, 2008.
This program is free software: you can redistribute it and/or modify
/* Canonical list of all signal names.
- Copyright (C) 1996-1999, 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 1996-1999, 2008-2016 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
/* A GNU-like <signal.h>.
- Copyright (C) 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#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>.
+/* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6, Android
+ 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 __APPLE__ && defined __MACH__) \
+ || defined __FreeBSD__ || defined __OpenBSD__ || defined __osf__ \
+ || defined __sun || defined __ANDROID__) \
&& ! defined __GLIBC__
# include <pthread.h>
#endif
/* signbit() macro: Determine the sign bit of a floating-point number.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* signbit() macro: Determine the sign bit of a floating-point number.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* signbit() macro: Determine the sign bit of a floating-point number.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* POSIX compatible signal blocking.
- Copyright (C) 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
/* size_max.h -- declare SIZE_MAX through system headers
- Copyright (C) 2005-2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2016 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify
/* Formatted output to strings.
- Copyright (C) 2004, 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006-2016 Free Software Foundation, Inc.
Written by Simon Josefsson and Paul Eggert.
This program is free software; you can redistribute it and/or modify
/* Creation of subprocesses, communicating via pipes.
- Copyright (C) 2001-2004, 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006-2016 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
#define _(str) gettext (str)
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if (((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \
+ || defined __KLIBC__)
/* Native Windows API. */
# include <process.h>
#endif
-/* The results of open() in this file are not used with fchdir,
- therefore save some unnecessary work in fchdir.c. */
-#undef open
-#undef close
-
#ifdef EINTR
bool slave_process, bool exit_on_error,
int fd[2])
{
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if (((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \
+ || defined __KLIBC__)
/* Native Windows API.
This uses _pipe(), dup2(), and spawnv(). It could also be implemented
/* Creation of subprocesses, communicating via pipes.
- Copyright (C) 2001-2003, 2006, 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006, 2008-2016 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
/* Definitions for POSIX spawn interface.
- Copyright (C) 2000, 2003-2004, 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2003-2004, 2008-2016 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
-/* Copyright (C) 2000, 2009-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009-2016 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
-/* Copyright (C) 2000, 2009-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009-2016 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
-/* Copyright (C) 2000, 2009-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009-2016 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
-/* Copyright (C) 2000, 2009-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009-2016 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
-/* Copyright (C) 2000, 2009-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009-2016 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
-/* Copyright (C) 2000, 2008-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2008-2016 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
-/* Copyright (C) 2000, 2009-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009-2016 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
-/* Copyright (C) 2000, 2009-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009-2016 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
-/* Copyright (C) 2000, 2004, 2009-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2004, 2009-2016 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
-/* Copyright (C) 2000, 2009-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009-2016 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
/* Guts of POSIX spawn interface. Generic POSIX.1 version.
- Copyright (C) 2000-2006, 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2000-2006, 2008-2016 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
-/* Copyright (C) 2000, 2009-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009-2016 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
/* Work around platform bugs in stat.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Substitute for and wrapper around <stdarg.h>.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-/* Copyright (C) 2001-2003, 2006-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2003, 2006-2016 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
/* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _GL_STDDEF_WINT_T)
# ifdef __need_wint_t
-# undef _@GUARD_PREFIX@_STDDEF_H
# define _GL_STDDEF_WINT_T
# endif
# @INCLUDE_NEXT@ @NEXT_STDDEF_H@
# @INCLUDE_NEXT@ @NEXT_STDDEF_H@
-# ifndef _@GUARD_PREFIX@_STDDEF_H
-# define _@GUARD_PREFIX@_STDDEF_H
-
/* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */
-#if @REPLACE_NULL@
-# undef NULL
-# ifdef __cplusplus
+# if (@REPLACE_NULL@ \
+ && (!defined _@GUARD_PREFIX@_STDDEF_H || defined _GL_STDDEF_WINT_T))
+# undef NULL
+# ifdef __cplusplus
/* ISO C++ says that the macro NULL must expand to an integer constant
expression, hence '((void *) 0)' is not allowed in C++. */
-# if __GNUG__ >= 3
+# if __GNUG__ >= 3
/* GNU C++ has a __null macro that behaves like an integer ('int' or
'long') but has the same size as a pointer. Use that, to avoid
warnings. */
-# define NULL __null
-# else
-# define NULL 0L
+# define NULL __null
+# else
+# define NULL 0L
+# endif
+# else
+# define NULL ((void *) 0)
+# endif
# endif
-# else
-# define NULL ((void *) 0)
-# endif
-#endif
+
+# ifndef _@GUARD_PREFIX@_STDDEF_H
+# define _@GUARD_PREFIX@_STDDEF_H
/* Some platforms lack wchar_t. */
#if !@HAVE_WCHAR_T@
# define wchar_t int
#endif
+/* Some platforms lack max_align_t. The check for _GCC_MAX_ALIGN_T is
+ a hack in case the configure-time test was done with g++ even though
+ we are currently compiling with gcc. */
+#if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T)
+/* On the x86, the maximum storage alignment of double, long, etc. is 4,
+ but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8,
+ and the C11 standard allows this. Work around this problem by
+ using __alignof__ (which returns 8 for double) rather than _Alignof
+ (which returns 4), and align each union member accordingly. */
+# ifdef __GNUC__
+# define _GL_STDDEF_ALIGNAS(type) \
+ __attribute__ ((__aligned__ (__alignof__ (type))))
+# else
+# define _GL_STDDEF_ALIGNAS(type) /* */
+# endif
+typedef union
+{
+ char *__p _GL_STDDEF_ALIGNAS (char *);
+ double __d _GL_STDDEF_ALIGNAS (double);
+ long double __ld _GL_STDDEF_ALIGNAS (long double);
+ long int __i _GL_STDDEF_ALIGNAS (long int);
+} max_align_t;
+#endif
+
# endif /* _@GUARD_PREFIX@_STDDEF_H */
# endif /* _@GUARD_PREFIX@_STDDEF_H */
#endif /* __need_XXX */
-/* Copyright (C) 2001-2002, 2004-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2002, 2004-2016 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
This file is part of gnulib.
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
+#if defined __ANDROID__ && defined _GL_INCLUDING_SYS_TYPES_H
# @INCLUDE_NEXT@ @NEXT_STDINT_H@
#else
#if ! defined _@GUARD_PREFIX@_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H
#define _@GUARD_PREFIX@_STDINT_H
+/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX,
+ LONG_MIN, LONG_MAX, ULONG_MAX, _GL_INTEGER_WIDTH. */
+#include <limits.h>
+
+/* Override WINT_MIN and WINT_MAX if gnulib's <wchar.h> or <wctype.h> overrides
+ wint_t. */
+#if @GNULIB_OVERRIDES_WINT_T@
+# undef WINT_MIN
+# undef WINT_MAX
+# define WINT_MIN 0x0U
+# define WINT_MAX 0xffffffffU
+#endif
+
+#if ! @HAVE_C99_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.
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 SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX,
- LONG_MIN, LONG_MAX, ULONG_MAX. */
-#include <limits.h>
+# if @HAVE_SYS_TYPES_H@ && ! defined _AIX
+# include <sys/types.h>
+# endif
-#if @HAVE_INTTYPES_H@
+# if @HAVE_INTTYPES_H@
/* In OpenBSD 3.8, <inttypes.h> includes <machine/types.h>, which defines
int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__.
<inttypes.h> also defines intptr_t and uintptr_t. */
-# include <inttypes.h>
-#elif @HAVE_SYS_INTTYPES_H@
+# include <inttypes.h>
+# elif @HAVE_SYS_INTTYPES_H@
/* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and
the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */
-# include <sys/inttypes.h>
-#endif
+# include <sys/inttypes.h>
+# endif
-#if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__
+# if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__
/* Linux libc4 >= 4.6.7 and libc5 have a <sys/bitypes.h> that defines
int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is
included by <sys/types.h>. */
-# include <sys/bitypes.h>
-#endif
+# include <sys/bitypes.h>
+# endif
-#undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
+# undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
/* Minimum and maximum values for an integer type under the usual assumption.
Return an unspecified value if BITS == 0, adding a check to pacify
picky compilers. */
-#define _STDINT_MIN(signed, bits, zero) \
- ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero))
+# define _STDINT_MIN(signed, bits, zero) \
+ ((signed) ? ~ _STDINT_MAX (signed, bits, zero) : (zero))
-#define _STDINT_MAX(signed, bits, zero) \
- ((signed) \
- ? ~ _STDINT_MIN (signed, bits, zero) \
- : /* The expression for the unsigned case. The subtraction of (signed) \
- is a nop in the unsigned case and avoids "signed integer overflow" \
- warnings in the signed case. */ \
- ((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)
+# define _STDINT_MAX(signed, bits, zero) \
+ (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)
#if !GNULIB_defined_stdint_types
/* Here we assume a standard architecture where the hardware integer
types have 8, 16, 32, optionally 64 bits. */
-#undef int8_t
-#undef uint8_t
+# undef int8_t
+# undef uint8_t
typedef signed char gl_int8_t;
typedef unsigned char gl_uint8_t;
-#define int8_t gl_int8_t
-#define uint8_t gl_uint8_t
+# define int8_t gl_int8_t
+# define uint8_t gl_uint8_t
-#undef int16_t
-#undef uint16_t
+# undef int16_t
+# undef uint16_t
typedef short int gl_int16_t;
typedef unsigned short int gl_uint16_t;
-#define int16_t gl_int16_t
-#define uint16_t gl_uint16_t
+# define int16_t gl_int16_t
+# define uint16_t gl_uint16_t
-#undef int32_t
-#undef uint32_t
+# undef int32_t
+# undef uint32_t
typedef int gl_int32_t;
typedef unsigned int gl_uint32_t;
-#define int32_t gl_int32_t
-#define uint32_t gl_uint32_t
+# define int32_t gl_int32_t
+# define uint32_t gl_uint32_t
/* If the system defines INT64_MAX, assume int64_t works. That way,
if the underlying platform defines int64_t to be a 64-bit long long
int, which would mess up C++ name mangling. We must use #ifdef
rather than #if, to avoid an error with HP-UX 10.20 cc. */
-#ifdef INT64_MAX
-# define GL_INT64_T
-#else
+# ifdef INT64_MAX
+# define GL_INT64_T
+# else
/* Do not undefine int64_t if gnulib is not being used with 64-bit
types, since otherwise it breaks platforms like Tandem/NSK. */
-# if LONG_MAX >> 31 >> 31 == 1
-# undef int64_t
+# if LONG_MAX >> 31 >> 31 == 1
+# undef int64_t
typedef long int gl_int64_t;
-# define int64_t gl_int64_t
-# define GL_INT64_T
-# elif defined _MSC_VER
-# undef int64_t
+# define int64_t gl_int64_t
+# define GL_INT64_T
+# elif defined _MSC_VER
+# undef int64_t
typedef __int64 gl_int64_t;
-# define int64_t gl_int64_t
-# define GL_INT64_T
-# elif @HAVE_LONG_LONG_INT@
-# undef int64_t
+# define int64_t gl_int64_t
+# define GL_INT64_T
+# elif @HAVE_LONG_LONG_INT@
+# undef int64_t
typedef long long int gl_int64_t;
-# define int64_t gl_int64_t
-# define GL_INT64_T
+# define int64_t gl_int64_t
+# define GL_INT64_T
+# endif
# endif
-#endif
-#ifdef UINT64_MAX
-# define GL_UINT64_T
-#else
-# if ULONG_MAX >> 31 >> 31 >> 1 == 1
-# undef uint64_t
-typedef unsigned long int gl_uint64_t;
-# define uint64_t gl_uint64_t
+# ifdef UINT64_MAX
# define GL_UINT64_T
-# elif defined _MSC_VER
-# undef uint64_t
+# else
+# if ULONG_MAX >> 31 >> 31 >> 1 == 1
+# undef uint64_t
+typedef unsigned long int gl_uint64_t;
+# define uint64_t gl_uint64_t
+# define GL_UINT64_T
+# elif defined _MSC_VER
+# undef uint64_t
typedef unsigned __int64 gl_uint64_t;
-# define uint64_t gl_uint64_t
-# define GL_UINT64_T
-# elif @HAVE_UNSIGNED_LONG_LONG_INT@
-# undef uint64_t
+# define uint64_t gl_uint64_t
+# define GL_UINT64_T
+# elif @HAVE_UNSIGNED_LONG_LONG_INT@
+# undef uint64_t
typedef unsigned long long int gl_uint64_t;
-# define uint64_t gl_uint64_t
-# define GL_UINT64_T
+# define uint64_t gl_uint64_t
+# define GL_UINT64_T
+# endif
# endif
-#endif
/* Avoid collision with Solaris 2.5.1 <pthread.h> etc. */
-#define _UINT8_T
-#define _UINT32_T
-#define _UINT64_T
+# define _UINT8_T
+# define _UINT32_T
+# define _UINT64_T
/* 7.18.1.2. Minimum-width integer types */
types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
are the same as the corresponding N_t types. */
-#undef int_least8_t
-#undef uint_least8_t
-#undef int_least16_t
-#undef uint_least16_t
-#undef int_least32_t
-#undef uint_least32_t
-#undef int_least64_t
-#undef uint_least64_t
-#define int_least8_t int8_t
-#define uint_least8_t uint8_t
-#define int_least16_t int16_t
-#define uint_least16_t uint16_t
-#define int_least32_t int32_t
-#define uint_least32_t uint32_t
-#ifdef GL_INT64_T
-# define int_least64_t int64_t
-#endif
-#ifdef GL_UINT64_T
-# define uint_least64_t uint64_t
-#endif
+# undef int_least8_t
+# undef uint_least8_t
+# undef int_least16_t
+# undef uint_least16_t
+# undef int_least32_t
+# undef uint_least32_t
+# undef int_least64_t
+# undef uint_least64_t
+# define int_least8_t int8_t
+# define uint_least8_t uint8_t
+# define int_least16_t int16_t
+# define uint_least16_t uint16_t
+# define int_least32_t int32_t
+# define uint_least32_t uint32_t
+# ifdef GL_INT64_T
+# define int_least64_t int64_t
+# endif
+# ifdef GL_UINT64_T
+# define uint_least64_t uint64_t
+# endif
/* 7.18.1.3. Fastest minimum-width integer types */
uses types consistent with glibc, as that lessens the chance of
incompatibility with older GNU hosts. */
-#undef int_fast8_t
-#undef uint_fast8_t
-#undef int_fast16_t
-#undef uint_fast16_t
-#undef int_fast32_t
-#undef uint_fast32_t
-#undef int_fast64_t
-#undef uint_fast64_t
+# undef int_fast8_t
+# undef uint_fast8_t
+# undef int_fast16_t
+# undef uint_fast16_t
+# undef int_fast32_t
+# undef uint_fast32_t
+# undef int_fast64_t
+# undef uint_fast64_t
typedef signed char gl_int_fast8_t;
typedef unsigned char gl_uint_fast8_t;
-#ifdef __sun
+# 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
+# else
typedef long int gl_int_fast32_t;
typedef unsigned long int gl_uint_fast32_t;
-#endif
+# endif
typedef gl_int_fast32_t gl_int_fast16_t;
typedef gl_uint_fast32_t gl_uint_fast16_t;
-#define int_fast8_t gl_int_fast8_t
-#define uint_fast8_t gl_uint_fast8_t
-#define int_fast16_t gl_int_fast16_t
-#define uint_fast16_t gl_uint_fast16_t
-#define int_fast32_t gl_int_fast32_t
-#define uint_fast32_t gl_uint_fast32_t
-#ifdef GL_INT64_T
-# define int_fast64_t int64_t
-#endif
-#ifdef GL_UINT64_T
-# define uint_fast64_t uint64_t
-#endif
+# define int_fast8_t gl_int_fast8_t
+# define uint_fast8_t gl_uint_fast8_t
+# define int_fast16_t gl_int_fast16_t
+# define uint_fast16_t gl_uint_fast16_t
+# define int_fast32_t gl_int_fast32_t
+# define uint_fast32_t gl_uint_fast32_t
+# ifdef GL_INT64_T
+# define int_fast64_t int64_t
+# endif
+# ifdef GL_UINT64_T
+# define uint_fast64_t uint64_t
+# endif
/* 7.18.1.4. Integer types capable of holding object pointers */
-#undef intptr_t
-#undef uintptr_t
+/* kLIBC's stdint.h defines _INTPTR_T_DECLARED and needs its own
+ definitions of intptr_t and uintptr_t (which use int and unsigned)
+ to avoid clashes with declarations of system functions like sbrk. */
+# ifndef _INTPTR_T_DECLARED
+# undef intptr_t
+# undef uintptr_t
typedef long int gl_intptr_t;
typedef unsigned long int gl_uintptr_t;
-#define intptr_t gl_intptr_t
-#define uintptr_t gl_uintptr_t
+# define intptr_t gl_intptr_t
+# define uintptr_t gl_uintptr_t
+# endif
/* 7.18.1.5. Greatest-width integer types */
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
+# 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
-#endif
-#ifndef UINTMAX_MAX
-# undef UINTMAX_C
-# 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
-#endif
/* Verify that intmax_t and uintmax_t have the same size. Too much code
breaks if this is not the case. If this check fails, the reason is likely
typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
? 1 : -1];
-#define GNULIB_defined_stdint_types 1
-#endif /* !GNULIB_defined_stdint_types */
+# define GNULIB_defined_stdint_types 1
+# endif /* !GNULIB_defined_stdint_types */
/* 7.18.2. Limits of specified-width integer types */
/* Here we assume a standard architecture where the hardware integer
types have 8, 16, 32, optionally 64 bits. */
-#undef INT8_MIN
-#undef INT8_MAX
-#undef UINT8_MAX
-#define INT8_MIN (~ INT8_MAX)
-#define INT8_MAX 127
-#define UINT8_MAX 255
-
-#undef INT16_MIN
-#undef INT16_MAX
-#undef UINT16_MAX
-#define INT16_MIN (~ INT16_MAX)
-#define INT16_MAX 32767
-#define UINT16_MAX 65535
-
-#undef INT32_MIN
-#undef INT32_MAX
-#undef UINT32_MAX
-#define INT32_MIN (~ INT32_MAX)
-#define INT32_MAX 2147483647
-#define UINT32_MAX 4294967295U
-
-#if defined GL_INT64_T && ! defined INT64_MAX
+# undef INT8_MIN
+# undef INT8_MAX
+# undef UINT8_MAX
+# define INT8_MIN (~ INT8_MAX)
+# define INT8_MAX 127
+# define UINT8_MAX 255
+
+# undef INT16_MIN
+# undef INT16_MAX
+# undef UINT16_MAX
+# define INT16_MIN (~ INT16_MAX)
+# define INT16_MAX 32767
+# define UINT16_MAX 65535
+
+# undef INT32_MIN
+# undef INT32_MAX
+# undef UINT32_MAX
+# define INT32_MIN (~ INT32_MAX)
+# define INT32_MAX 2147483647
+# define UINT32_MAX 4294967295U
+
+# if defined GL_INT64_T && ! defined INT64_MAX
/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0
evaluates the latter incorrectly in preprocessor expressions. */
-# define INT64_MIN (- INTMAX_C (1) << 63)
-# define INT64_MAX INTMAX_C (9223372036854775807)
-#endif
+# define INT64_MIN (- INTMAX_C (1) << 63)
+# define INT64_MAX INTMAX_C (9223372036854775807)
+# endif
-#if defined GL_UINT64_T && ! defined UINT64_MAX
-# define UINT64_MAX UINTMAX_C (18446744073709551615)
-#endif
+# if defined GL_UINT64_T && ! defined UINT64_MAX
+# define UINT64_MAX UINTMAX_C (18446744073709551615)
+# endif
/* 7.18.2.2. Limits of minimum-width integer types */
types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
are the same as the corresponding N_t types. */
-#undef INT_LEAST8_MIN
-#undef INT_LEAST8_MAX
-#undef UINT_LEAST8_MAX
-#define INT_LEAST8_MIN INT8_MIN
-#define INT_LEAST8_MAX INT8_MAX
-#define UINT_LEAST8_MAX UINT8_MAX
-
-#undef INT_LEAST16_MIN
-#undef INT_LEAST16_MAX
-#undef UINT_LEAST16_MAX
-#define INT_LEAST16_MIN INT16_MIN
-#define INT_LEAST16_MAX INT16_MAX
-#define UINT_LEAST16_MAX UINT16_MAX
-
-#undef INT_LEAST32_MIN
-#undef INT_LEAST32_MAX
-#undef UINT_LEAST32_MAX
-#define INT_LEAST32_MIN INT32_MIN
-#define INT_LEAST32_MAX INT32_MAX
-#define UINT_LEAST32_MAX UINT32_MAX
-
-#undef INT_LEAST64_MIN
-#undef INT_LEAST64_MAX
-#ifdef GL_INT64_T
-# define INT_LEAST64_MIN INT64_MIN
-# define INT_LEAST64_MAX INT64_MAX
-#endif
+# undef INT_LEAST8_MIN
+# undef INT_LEAST8_MAX
+# undef UINT_LEAST8_MAX
+# define INT_LEAST8_MIN INT8_MIN
+# define INT_LEAST8_MAX INT8_MAX
+# define UINT_LEAST8_MAX UINT8_MAX
+
+# undef INT_LEAST16_MIN
+# undef INT_LEAST16_MAX
+# undef UINT_LEAST16_MAX
+# define INT_LEAST16_MIN INT16_MIN
+# define INT_LEAST16_MAX INT16_MAX
+# define UINT_LEAST16_MAX UINT16_MAX
+
+# undef INT_LEAST32_MIN
+# undef INT_LEAST32_MAX
+# undef UINT_LEAST32_MAX
+# define INT_LEAST32_MIN INT32_MIN
+# define INT_LEAST32_MAX INT32_MAX
+# define UINT_LEAST32_MAX UINT32_MAX
+
+# undef INT_LEAST64_MIN
+# undef INT_LEAST64_MAX
+# ifdef GL_INT64_T
+# define INT_LEAST64_MIN INT64_MIN
+# define INT_LEAST64_MAX INT64_MAX
+# endif
-#undef UINT_LEAST64_MAX
-#ifdef GL_UINT64_T
-# define UINT_LEAST64_MAX UINT64_MAX
-#endif
+# undef UINT_LEAST64_MAX
+# ifdef GL_UINT64_T
+# define UINT_LEAST64_MAX UINT64_MAX
+# endif
/* 7.18.2.3. Limits of fastest minimum-width integer types */
types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
are taken from the same list of types. */
-#undef INT_FAST8_MIN
-#undef INT_FAST8_MAX
-#undef UINT_FAST8_MAX
-#define INT_FAST8_MIN SCHAR_MIN
-#define INT_FAST8_MAX SCHAR_MAX
-#define UINT_FAST8_MAX UCHAR_MAX
-
-#undef INT_FAST16_MIN
-#undef INT_FAST16_MAX
-#undef UINT_FAST16_MAX
-#define INT_FAST16_MIN INT_FAST32_MIN
-#define INT_FAST16_MAX INT_FAST32_MAX
-#define UINT_FAST16_MAX UINT_FAST32_MAX
-
-#undef INT_FAST32_MIN
-#undef INT_FAST32_MAX
-#undef UINT_FAST32_MAX
-#ifdef __sun
-# define INT_FAST32_MIN INT_MIN
-# define INT_FAST32_MAX INT_MAX
-# define UINT_FAST32_MAX UINT_MAX
-#else
-# define INT_FAST32_MIN LONG_MIN
-# define INT_FAST32_MAX LONG_MAX
-# define UINT_FAST32_MAX ULONG_MAX
-#endif
+# undef INT_FAST8_MIN
+# undef INT_FAST8_MAX
+# undef UINT_FAST8_MAX
+# define INT_FAST8_MIN SCHAR_MIN
+# define INT_FAST8_MAX SCHAR_MAX
+# define UINT_FAST8_MAX UCHAR_MAX
+
+# undef INT_FAST16_MIN
+# undef INT_FAST16_MAX
+# undef UINT_FAST16_MAX
+# define INT_FAST16_MIN INT_FAST32_MIN
+# define INT_FAST16_MAX INT_FAST32_MAX
+# define UINT_FAST16_MAX UINT_FAST32_MAX
+
+# undef INT_FAST32_MIN
+# undef INT_FAST32_MAX
+# undef UINT_FAST32_MAX
+# ifdef __sun
+# define INT_FAST32_MIN INT_MIN
+# define INT_FAST32_MAX INT_MAX
+# define UINT_FAST32_MAX UINT_MAX
+# else
+# define INT_FAST32_MIN LONG_MIN
+# define INT_FAST32_MAX LONG_MAX
+# define UINT_FAST32_MAX ULONG_MAX
+# endif
-#undef INT_FAST64_MIN
-#undef INT_FAST64_MAX
-#ifdef GL_INT64_T
-# define INT_FAST64_MIN INT64_MIN
-# define INT_FAST64_MAX INT64_MAX
-#endif
+# undef INT_FAST64_MIN
+# undef INT_FAST64_MAX
+# ifdef GL_INT64_T
+# define INT_FAST64_MIN INT64_MIN
+# define INT_FAST64_MAX INT64_MAX
+# endif
-#undef UINT_FAST64_MAX
-#ifdef GL_UINT64_T
-# define UINT_FAST64_MAX UINT64_MAX
-#endif
+# undef UINT_FAST64_MAX
+# ifdef GL_UINT64_T
+# define UINT_FAST64_MAX UINT64_MAX
+# endif
/* 7.18.2.4. Limits of integer types capable of holding object pointers */
-#undef INTPTR_MIN
-#undef INTPTR_MAX
-#undef UINTPTR_MAX
-#define INTPTR_MIN LONG_MIN
-#define INTPTR_MAX LONG_MAX
-#define UINTPTR_MAX ULONG_MAX
+# undef INTPTR_MIN
+# undef INTPTR_MAX
+# undef UINTPTR_MAX
+# define INTPTR_MIN LONG_MIN
+# define INTPTR_MAX LONG_MAX
+# define UINTPTR_MAX ULONG_MAX
/* 7.18.2.5. Limits of greatest-width integer types */
-#ifndef INTMAX_MAX
-# undef INTMAX_MIN
-# ifdef INT64_MAX
-# define INTMAX_MIN INT64_MIN
-# define INTMAX_MAX INT64_MAX
-# else
-# define INTMAX_MIN INT32_MIN
-# define INTMAX_MAX INT32_MAX
+# 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
-#endif
-#ifndef 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
-#endif
/* 7.18.3. Limits of other integer types */
/* ptrdiff_t limits */
-#undef PTRDIFF_MIN
-#undef PTRDIFF_MAX
-#if @APPLE_UNIVERSAL_BUILD@
-# ifdef _LP64
-# define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l)
-# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l)
+# undef PTRDIFF_MIN
+# undef PTRDIFF_MAX
+# if @APPLE_UNIVERSAL_BUILD@
+# ifdef _LP64
+# define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l)
+# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l)
+# else
+# define PTRDIFF_MIN _STDINT_MIN (1, 32, 0)
+# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0)
+# endif
# else
-# define PTRDIFF_MIN _STDINT_MIN (1, 32, 0)
-# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0)
-# endif
-#else
-# define PTRDIFF_MIN \
+# define PTRDIFF_MIN \
_STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
-# define PTRDIFF_MAX \
+# define PTRDIFF_MAX \
_STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
-#endif
+# endif
/* sig_atomic_t limits */
-#undef SIG_ATOMIC_MIN
-#undef SIG_ATOMIC_MAX
-#define SIG_ATOMIC_MIN \
+# undef SIG_ATOMIC_MIN
+# undef SIG_ATOMIC_MAX
+# define SIG_ATOMIC_MIN \
_STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
0@SIG_ATOMIC_T_SUFFIX@)
-#define SIG_ATOMIC_MAX \
+# define SIG_ATOMIC_MAX \
_STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
0@SIG_ATOMIC_T_SUFFIX@)
/* size_t limit */
-#undef SIZE_MAX
-#if @APPLE_UNIVERSAL_BUILD@
-# ifdef _LP64
-# define SIZE_MAX _STDINT_MAX (0, 64, 0ul)
+# undef SIZE_MAX
+# if @APPLE_UNIVERSAL_BUILD@
+# ifdef _LP64
+# define SIZE_MAX _STDINT_MAX (0, 64, 0ul)
+# else
+# define SIZE_MAX _STDINT_MAX (0, 32, 0ul)
+# endif
# else
-# define SIZE_MAX _STDINT_MAX (0, 32, 0ul)
+# define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@)
# endif
-#else
-# define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@)
-#endif
/* wchar_t limits */
/* Get WCHAR_MIN, WCHAR_MAX.
sequence of nested includes
<wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the latter includes
<stdint.h> and assumes its types are already defined. */
-#if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX)
+# if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX)
/* 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>
-# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
-# include <wchar.h>
-# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
-#endif
-#undef WCHAR_MIN
-#undef WCHAR_MAX
-#define WCHAR_MIN \
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
+# include <wchar.h>
+# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
+# endif
+# undef WCHAR_MIN
+# undef WCHAR_MAX
+# define WCHAR_MIN \
_STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
-#define WCHAR_MAX \
+# define WCHAR_MAX \
_STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
/* wint_t limits */
-#undef WINT_MIN
-#undef WINT_MAX
-#define WINT_MIN \
+# undef WINT_MIN
+# undef WINT_MAX
+# define WINT_MIN \
_STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
-#define WINT_MAX \
+# define WINT_MAX \
_STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
/* 7.18.4. Macros for integer constants */
/* Here we assume a standard architecture where the hardware integer
types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */
-#undef INT8_C
-#undef UINT8_C
-#define INT8_C(x) x
-#define UINT8_C(x) x
-
-#undef INT16_C
-#undef UINT16_C
-#define INT16_C(x) x
-#define UINT16_C(x) x
-
-#undef INT32_C
-#undef UINT32_C
-#define INT32_C(x) x
-#define UINT32_C(x) x ## U
-
-#undef INT64_C
-#undef UINT64_C
-#if LONG_MAX >> 31 >> 31 == 1
-# define INT64_C(x) x##L
-#elif defined _MSC_VER
-# define INT64_C(x) x##i64
-#elif @HAVE_LONG_LONG_INT@
-# define INT64_C(x) x##LL
-#endif
-#if ULONG_MAX >> 31 >> 31 >> 1 == 1
-# define UINT64_C(x) x##UL
-#elif defined _MSC_VER
-# define UINT64_C(x) x##ui64
-#elif @HAVE_UNSIGNED_LONG_LONG_INT@
-# define UINT64_C(x) x##ULL
-#endif
+# undef INT8_C
+# undef UINT8_C
+# define INT8_C(x) x
+# define UINT8_C(x) x
+
+# undef INT16_C
+# undef UINT16_C
+# define INT16_C(x) x
+# define UINT16_C(x) x
+
+# undef INT32_C
+# undef UINT32_C
+# define INT32_C(x) x
+# define UINT32_C(x) x ## U
+
+# undef INT64_C
+# undef UINT64_C
+# if LONG_MAX >> 31 >> 31 == 1
+# define INT64_C(x) x##L
+# elif defined _MSC_VER
+# define INT64_C(x) x##i64
+# elif @HAVE_LONG_LONG_INT@
+# define INT64_C(x) x##LL
+# endif
+# if ULONG_MAX >> 31 >> 31 >> 1 == 1
+# define UINT64_C(x) x##UL
+# elif defined _MSC_VER
+# define UINT64_C(x) x##ui64
+# elif @HAVE_UNSIGNED_LONG_LONG_INT@
+# define UINT64_C(x) x##ULL
+# endif
/* 7.18.4.2. Macros for greatest-width integer constants */
-#ifndef INTMAX_C
-# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
-# define INTMAX_C(x) x##LL
-# elif defined GL_INT64_T
-# define INTMAX_C(x) INT64_C(x)
-# else
-# define INTMAX_C(x) x##L
+# 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
-#endif
-#ifndef UINTMAX_C
-# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
-# define UINTMAX_C(x) x##ULL
-# elif defined GL_UINT64_T
-# define UINTMAX_C(x) UINT64_C(x)
-# else
-# define UINTMAX_C(x) x##UL
+# 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
+
+#endif /* !@HAVE_C99_STDINT_H@ */
+
+/* Macros specified by ISO/IEC TS 18661-1:2014. */
+
+#if (!defined UINTMAX_WIDTH \
+ && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__))
+# ifdef INT8_MAX
+# define INT8_WIDTH _GL_INTEGER_WIDTH (INT8_MIN, INT8_MAX)
+# endif
+# ifdef UINT8_MAX
+# define UINT8_WIDTH _GL_INTEGER_WIDTH (0, UINT8_MAX)
+# endif
+# ifdef INT16_MAX
+# define INT16_WIDTH _GL_INTEGER_WIDTH (INT16_MIN, INT16_MAX)
+# endif
+# ifdef UINT16_MAX
+# define UINT16_WIDTH _GL_INTEGER_WIDTH (0, UINT16_MAX)
+# endif
+# ifdef INT32_MAX
+# define INT32_WIDTH _GL_INTEGER_WIDTH (INT32_MIN, INT32_MAX)
+# endif
+# ifdef UINT32_MAX
+# define UINT32_WIDTH _GL_INTEGER_WIDTH (0, UINT32_MAX)
+# endif
+# ifdef INT64_MAX
+# define INT64_WIDTH _GL_INTEGER_WIDTH (INT64_MIN, INT64_MAX)
+# endif
+# ifdef UINT64_MAX
+# define UINT64_WIDTH _GL_INTEGER_WIDTH (0, UINT64_MAX)
+# endif
+# define INT_LEAST8_WIDTH _GL_INTEGER_WIDTH (INT_LEAST8_MIN, INT_LEAST8_MAX)
+# define UINT_LEAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST8_MAX)
+# define INT_LEAST16_WIDTH _GL_INTEGER_WIDTH (INT_LEAST16_MIN, INT_LEAST16_MAX)
+# define UINT_LEAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST16_MAX)
+# define INT_LEAST32_WIDTH _GL_INTEGER_WIDTH (INT_LEAST32_MIN, INT_LEAST32_MAX)
+# define UINT_LEAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST32_MAX)
+# define INT_LEAST64_WIDTH _GL_INTEGER_WIDTH (INT_LEAST64_MIN, INT_LEAST64_MAX)
+# define UINT_LEAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST64_MAX)
+# define INT_FAST8_WIDTH _GL_INTEGER_WIDTH (INT_FAST8_MIN, INT_FAST8_MAX)
+# define UINT_FAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST8_MAX)
+# define INT_FAST16_WIDTH _GL_INTEGER_WIDTH (INT_FAST16_MIN, INT_FAST16_MAX)
+# define UINT_FAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST16_MAX)
+# define INT_FAST32_WIDTH _GL_INTEGER_WIDTH (INT_FAST32_MIN, INT_FAST32_MAX)
+# define UINT_FAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST32_MAX)
+# define INT_FAST64_WIDTH _GL_INTEGER_WIDTH (INT_FAST64_MIN, INT_FAST64_MAX)
+# define UINT_FAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST64_MAX)
+# define INTPTR_WIDTH _GL_INTEGER_WIDTH (INTPTR_MIN, INTPTR_MAX)
+# define UINTPTR_WIDTH _GL_INTEGER_WIDTH (0, UINTPTR_MAX)
+# define INTMAX_WIDTH _GL_INTEGER_WIDTH (INTMAX_MIN, INTMAX_MAX)
+# define UINTMAX_WIDTH _GL_INTEGER_WIDTH (0, UINTMAX_MAX)
+# define PTRDIFF_WIDTH _GL_INTEGER_WIDTH (PTRDIFF_MIN, PTRDIFF_MAX)
+# define SIZE_WIDTH _GL_INTEGER_WIDTH (0, SIZE_MAX)
+# define WCHAR_WIDTH _GL_INTEGER_WIDTH (WCHAR_MIN, WCHAR_MAX)
+# ifdef WINT_MAX
+# define WINT_WIDTH _GL_INTEGER_WIDTH (WINT_MIN, WINT_MAX)
+# endif
+# ifdef SIG_ATOMIC_MAX
+# define SIG_ATOMIC_WIDTH _GL_INTEGER_WIDTH (SIG_ATOMIC_MIN, SIG_ATOMIC_MAX)
+# endif
+#endif /* !WINT_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */
#endif /* _@GUARD_PREFIX@_STDINT_H */
#endif /* !(defined __ANDROID__ && ...) */
/* Like stdio.h, but redefine some names to avoid glitches.
- Copyright (C) 2005-2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Implementation details of FILE streams.
- Copyright (C) 2007-2008, 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2008, 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <errno.h> /* For detecting Plan9. */
-#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
+#if defined __sferror || defined __DragonFly__ || defined __ANDROID__
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
# 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>. */
/* More fields, not relevant here. */
};
# define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub
-# else /* FreeBSD, NetBSD <= 1.5Z, DragonFly, Mac OS X, Cygwin */
+# else /* FreeBSD, NetBSD <= 1.5Z, DragonFly, Mac OS X, Cygwin, Android */
# define fp_ub fp_->_ub
# endif
# define _flag __flag
# endif
+#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* newer Windows with MSVC */
+
+/* <stdio.h> does not define the innards of FILE any more. */
+# define WINDOWS_OPAQUE_FILE
+
+struct _gl_real_FILE
+{
+ /* Note: Compared to older Windows and to mingw, it has the fields
+ _base and _cnt swapped. */
+ unsigned char *_ptr;
+ unsigned char *_base;
+ int _cnt;
+ int _flag;
+ int _file;
+ int _charbuf;
+ int _bufsiz;
+};
+# define fp_ ((struct _gl_real_FILE *) fp)
+
+/* These values were determined by a program similar to the one at
+ <http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00165.html>. */
+# define _IOREAD 0x1
+# define _IOWRT 0x2
+# define _IORW 0x4
+# define _IOEOF 0x8
+# define _IOERR 0x10
+
#endif
/* Invoke stdio functions, but avoid some glitches.
- Copyright (C) 2001, 2003, 2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2006, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* POSIX compatible FILE stream write function.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
/* A GNU-like <stdio.h>.
- Copyright (C) 2004, 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2007-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
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) \
+#if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU
+# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \
+ _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument)
+#else
+# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \
_GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument))
+#endif
/* _GL_ATTRIBUTE_FORMAT_SCANF
indicates to GCC that the function takes a format string and arguments,
# include <unistd.h>
#endif
+/* MSVC declares 'perror' in <stdlib.h>, not in <stdio.h>. We must include
+ it before we #define perror rpl_perror. */
+/* But in any case avoid namespace pollution on glibc systems. */
+#if (@GNULIB_PERROR@ || defined GNULIB_POSIXCHECK) \
+ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \
+ && ! defined __GLIBC__
+# include <stdlib.h>
+#endif
+
+/* MSVC declares 'remove' in <io.h>, not in <stdio.h>. We must include
+ it before we #define remove rpl_remove. */
+/* MSVC declares 'rename' in <io.h>, not in <stdio.h>. We must include
+ it before we #define rename rpl_rename. */
+/* But in any case avoid namespace pollution on glibc systems. */
+#if (@GNULIB_REMOVE@ || @GNULIB_RENAME@ || defined GNULIB_POSIXCHECK) \
+ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \
+ && ! defined __GLIBC__
+# include <io.h>
+#endif
+
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
so any use of gets warrants an unconditional warning; besides, C11
removed it. */
#undef gets
-#if HAVE_RAW_DECL_GETS
+#if HAVE_RAW_DECL_GETS && !defined __cplusplus
_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
/* Like stdlib.h, but redefine some names to avoid glitches.
- Copyright (C) 2005-2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Invoke stdlib.h functions, but avoid some glitches.
- Copyright (C) 2005, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* A GNU-like <stdlib.h>.
- Copyright (C) 1995, 2001-2004, 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001-2004, 2006-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
_GL_CXXALIASWARN (putenv);
#endif
+#if @GNULIB_QSORT_R@
+/* Sort an array of NMEMB elements, starting at address BASE, each element
+ occupying SIZE bytes, in ascending order according to the comparison
+ function COMPARE. */
+# if @REPLACE_QSORT_R@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef qsort_r
+# define qsort_r rpl_qsort_r
+# endif
+_GL_FUNCDECL_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
+ int (*compare) (void const *, void const *,
+ void *),
+ void *arg) _GL_ARG_NONNULL ((1, 4)));
+_GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
+ int (*compare) (void const *, void const *,
+ void *),
+ void *arg));
+# else
+# if !@HAVE_QSORT_R@
+_GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
+ int (*compare) (void const *, void const *,
+ void *),
+ void *arg) _GL_ARG_NONNULL ((1, 4)));
+# endif
+_GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
+ int (*compare) (void const *, void const *,
+ void *),
+ void *arg));
+# endif
+_GL_CXXALIASWARN (qsort_r);
+#elif defined GNULIB_POSIXCHECK
+# undef qsort_r
+# if HAVE_RAW_DECL_QSORT_R
+_GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - "
+ "use gnulib module qsort_r for portability");
+# endif
+#endif
+
#if @GNULIB_RANDOM_R@
# if !@HAVE_RANDOM_R@
/* Byte-wise substring search, using the Two-Way algorithm.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Eric Blake <ebb9@byu.net>, 2008.
/* Searching in a string.
- Copyright (C) 2003, 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Optimized string comparison.
- Copyright (C) 2001-2002, 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
/* strerror-override.c --- POSIX compatible system error routine
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* strerror-override.h --- POSIX compatible system error routine
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
|| GNULIB_defined_EOWNERDEAD \
|| GNULIB_defined_ENOTRECOVERABLE \
|| GNULIB_defined_EILSEQ
-extern const char *strerror_override (int errnum);
+extern const char *strerror_override (int errnum) _GL_ATTRIBUTE_CONST;
# else
# define strerror_override(ignored) NULL
# endif
/* strerror.c --- POSIX compatible system error routine
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
if (sizeof buf <= len)
abort ();
- return memcpy (buf, msg, len + 1);
+ memcpy (buf, msg, len + 1);
+ return buf;
}
/* A GNU-like <string.h>.
- Copyright (C) 1995-1996, 2001-2013 Free Software Foundation, Inc.
+ Copyright (C) 1995-1996, 2001-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
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@_STRING_H
-
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
+#if defined _GL_ALREADY_INCLUDING_STRING_H
+/* Special invocation convention:
+ - On OS X/NetBSD we have a sequence of nested includes
+ <string.h> -> <strings.h> -> "string.h"
+ In this situation system _chk variants due to -D_FORTIFY_SOURCE
+ might be used after any replacements defined here. */
+
+#@INCLUDE_NEXT@ @NEXT_STRING_H@
+
+#else
+/* Normal invocation convention. */
+
+#ifndef _@GUARD_PREFIX@_STRING_H
+
+#define _GL_ALREADY_INCLUDING_STRING_H
+
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_STRING_H@
+#undef _GL_ALREADY_INCLUDING_STRING_H
+
#ifndef _@GUARD_PREFIX@_STRING_H
#define _@GUARD_PREFIX@_STRING_H
# undef strndup
# define strndup rpl_strndup
# endif
-_GL_FUNCDECL_RPL (strndup, char *, (char const *__string, size_t __n)
+_GL_FUNCDECL_RPL (strndup, char *, (char const *__s, size_t __n)
_GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (strndup, char *, (char const *__string, size_t __n));
+_GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n));
# else
# if ! @HAVE_DECL_STRNDUP@
-_GL_FUNCDECL_SYS (strndup, char *, (char const *__string, size_t __n)
+_GL_FUNCDECL_SYS (strndup, char *, (char const *__s, size_t __n)
_GL_ARG_NONNULL ((1)));
# endif
-_GL_CXXALIAS_SYS (strndup, char *, (char const *__string, size_t __n));
+_GL_CXXALIAS_SYS (strndup, char *, (char const *__s, size_t __n));
# endif
_GL_CXXALIASWARN (strndup);
#elif defined GNULIB_POSIXCHECK
# undef strnlen
# define strnlen rpl_strnlen
# endif
-_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__string, size_t __maxlen)
+_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__s, size_t __maxlen)
_GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__string, size_t __maxlen));
+_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__s, size_t __maxlen));
# else
# if ! @HAVE_DECL_STRNLEN@
-_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__string, size_t __maxlen)
+_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__s, size_t __maxlen)
_GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1)));
# endif
-_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__string, size_t __maxlen));
+_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__s, size_t __maxlen));
# endif
_GL_CXXALIASWARN (strnlen);
#elif defined GNULIB_POSIXCHECK
#endif /* _@GUARD_PREFIX@_STRING_H */
#endif /* _@GUARD_PREFIX@_STRING_H */
+#endif
/* stripslash.c -- remove redundant trailing slashes from a file name
- Copyright (C) 1990, 2001, 2003-2006, 2009-2013 Free Software Foundation,
+ Copyright (C) 1990, 2001, 2003-2006, 2009-2016 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
/* A replacement function, for systems that lack strndup.
- Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2013 Free Software
+ Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2016 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
/* Find the length of STRING, but scan at most MAXLEN characters.
- Copyright (C) 2005-2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2009-2016 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify
-/* Copyright (C) 1991, 1994-2002, 2005, 2008-2013 Free Software Foundation,
+/* Copyright (C) 1991, 1994-2002, 2005, 2008-2016 Free Software Foundation,
Inc.
This file is part of the GNU C Library.
-/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2013 Free Software
+/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2016 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
#include <stdbool.h>
-#ifndef _LIBC
-# define __builtin_expect(expr, val) (expr)
-#endif
-
#define RETURN_TYPE char *
#define AVAILABLE(h, h_l, j, n_l) \
(!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l)) \
-/* Copyright (C) 1991-1992, 1997, 1999, 2003, 2006, 2008-2013 Free Software
+/* Copyright (C) 1991-1992, 1997, 1999, 2003, 2006, 2008-2016 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
const char *s = nptr;
const char *end;
char *endbuf;
- int saved_errno;
+ int saved_errno = errno;
/* Eat whitespace. */
while (locale_isspace (*s))
if (*s == '-' || *s == '+')
++s;
- saved_errno = errno;
num = underlying_strtod (s, &endbuf);
end = endbuf;
if (*s == '0' && c_tolower (s[1]) == 'x')
{
if (! c_isxdigit (s[2 + (s[2] == '.')]))
- end = s + 1;
+ {
+ end = s + 1;
+
+ /* strtod() on z/OS returns ERANGE for "0x". */
+ errno = saved_errno;
+ }
else if (end <= s + 2)
{
num = parse_number (s + 2, 16, 2, 4, 'p', &endbuf);
better to use the underlying implementation's result, since a
nice implementation populates the bits of the NaN according
to interpreting n-char-sequence as a hexadecimal number. */
- if (s != end)
+ if (s != end || num == num)
num = NAN;
errno = saved_errno;
}
/* Provide a more complete sys/stat header file.
- Copyright (C) 2005-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Provide a more complete sys/time.h.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
(struct timeval *restrict, void *restrict));
# endif
_GL_CXXALIASWARN (gettimeofday);
+# if defined __cplusplus && defined GNULIB_NAMESPACE
+namespace GNULIB_NAMESPACE {
+ typedef ::timeval
+#undef timeval
+ timeval;
+}
+# endif
#elif defined GNULIB_POSIXCHECK
# undef gettimeofday
# if HAVE_RAW_DECL_GETTIMEOFDAY
/* Provide a more complete sys/types.h.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#ifndef _@GUARD_PREFIX@_SYS_TYPES_H
/* The include_next requires a split double-inclusion guard. */
+# define _GL_INCLUDING_SYS_TYPES_H
#@INCLUDE_NEXT@ @NEXT_SYS_TYPES_H@
+# undef _GL_INCLUDING_SYS_TYPES_H
#ifndef _@GUARD_PREFIX@_SYS_TYPES_H
#define _@GUARD_PREFIX@_SYS_TYPES_H
/* A POSIX-like <sys/wait.h>.
- Copyright (C) 2001-2003, 2005-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* tempname.c - generate the name of a temporary file.
- Copyright (C) 1991-2003, 2005-2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 1991-2003, 2005-2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# define struct_stat64 struct stat64
#else
# define struct_stat64 struct stat
+# define __try_tempname try_tempname
# define __gen_tempname gen_tempname
# define __getpid getpid
# define __gettimeofday gettimeofday
static const char letters[] =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
-/* Generate a temporary file name based on TMPL. TMPL must match the
- rules for mk[s]temp (i.e. end in "XXXXXX", possibly with a suffix).
- The name constructed does not exist at the time of the call to
- __gen_tempname. TMPL is overwritten with the result.
-
- KIND may be one of:
- __GT_NOCREATE: simply verify that the name does not exist
- at the time of the call.
- __GT_FILE: create the file using open(O_CREAT|O_EXCL)
- and return a read-write fd. The file is mode 0600.
- __GT_DIR: create a directory, which will be mode 0700.
-
- We use a clever algorithm to get hard-to-predict names. */
int
-__gen_tempname (char *tmpl, int suffixlen, int flags, int kind)
+__try_tempname (char *tmpl, int suffixlen, void *args,
+ int (*tryfunc) (char *, void *))
{
int len;
char *XXXXXX;
unsigned int count;
int fd = -1;
int save_errno = errno;
- struct_stat64 st;
/* A lower bound on the number of temporary files to attempt to
generate. The maximum total number of temporary file names that
v /= 62;
XXXXXX[5] = letters[v % 62];
- switch (kind)
- {
- case __GT_FILE:
- fd = __open (tmpl,
- (flags & ~O_ACCMODE)
- | O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
- break;
-
- case __GT_DIR:
- fd = __mkdir (tmpl, S_IRUSR | S_IWUSR | S_IXUSR);
- break;
-
- case __GT_NOCREATE:
- /* This case is backward from the other three. __gen_tempname
- succeeds if __xstat fails because the name does not exist.
- Note the continue to bypass the common logic at the bottom
- of the loop. */
- if (__lxstat64 (_STAT_VER, tmpl, &st) < 0)
- {
- if (errno == ENOENT)
- {
- __set_errno (save_errno);
- return 0;
- }
- else
- /* Give up now. */
- return -1;
- }
- continue;
-
- default:
- assert (! "invalid KIND in __gen_tempname");
- abort ();
- }
-
+ fd = tryfunc (tmpl, args);
if (fd >= 0)
{
__set_errno (save_errno);
__set_errno (EEXIST);
return -1;
}
+
+static int
+try_file (char *tmpl, void *flags)
+{
+ int *openflags = flags;
+ return __open (tmpl,
+ (*openflags & ~O_ACCMODE)
+ | O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
+}
+
+static int
+try_dir (char *tmpl, void *flags _GL_UNUSED)
+{
+ return __mkdir (tmpl, S_IRUSR | S_IWUSR | S_IXUSR);
+}
+
+static int
+try_nocreate (char *tmpl, void *flags _GL_UNUSED)
+{
+ struct_stat64 st;
+
+ if (__lxstat64 (_STAT_VER, tmpl, &st) == 0)
+ __set_errno (EEXIST);
+ return errno == ENOENT ? 0 : -1;
+}
+
+/* Generate a temporary file name based on TMPL. TMPL must match the
+ rules for mk[s]temp (i.e. end in "XXXXXX", possibly with a suffix).
+ The name constructed does not exist at the time of the call to
+ __gen_tempname. TMPL is overwritten with the result.
+
+ KIND may be one of:
+ __GT_NOCREATE: simply verify that the name does not exist
+ at the time of the call.
+ __GT_FILE: create the file using open(O_CREAT|O_EXCL)
+ and return a read-write fd. The file is mode 0600.
+ __GT_DIR: create a directory, which will be mode 0700.
+
+ We use a clever algorithm to get hard-to-predict names. */
+int
+__gen_tempname (char *tmpl, int suffixlen, int flags, int kind)
+{
+ int (*tryfunc) (char *, void *);
+
+ switch (kind)
+ {
+ case __GT_FILE:
+ tryfunc = try_file;
+ break;
+
+ case __GT_DIR:
+ tryfunc = try_dir;
+ break;
+
+ case __GT_NOCREATE:
+ tryfunc = try_nocreate;
+ break;
+
+ default:
+ assert (! "invalid KIND in __gen_tempname");
+ abort ();
+ }
+ return __try_tempname (tmpl, suffixlen, &flags, tryfunc);
+}
/* Create a temporary file or directory.
- Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# define GT_NOCREATE 2
# endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Generate a temporary file name based on TMPL. TMPL must match the
rules for mk[s]temp (i.e. end in "XXXXXX", possibly with a suffix).
The name constructed does not exist at the time of the call to
We use a clever algorithm to get hard-to-predict names. */
extern int gen_tempname (char *tmpl, int suffixlen, int flags, int kind);
+/* Similar to gen_tempname, but TRYFUNC is called for each temporary
+ name to try. If TRYFUNC returns a non-negative number, TRY_GEN_TEMPNAME
+ returns with this value. Otherwise, if errno is set to EEXIST, another
+ name is tried, or else TRY_GEN_TEMPNAME returns -1. */
+extern int try_tempname (char *tmpl, int suffixlen, void *args,
+ int (*tryfunc) (char *, void *));
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GL_TEMPNAME_H */
/* A more-standard <time.h>.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Don't get in the way of glibc when it includes time.h merely to
declare a few standard symbols, rather than to declare all the
- symbols. Also, Solaris 8 <time.h> eventually includes itself
+ symbols. (However, skip this for MinGW as it treats __need_time_t
+ incompatibly.) Also, Solaris 8 <time.h> eventually includes itself
recursively; if that is happening, just include the system <time.h>
without adding our own declarations. */
-#if (defined __need_time_t || defined __need_clock_t \
- || defined __need_timespec \
+#if (((defined __need_time_t || defined __need_clock_t \
+ || defined __need_timespec) \
+ && !defined __MINGW32__) \
|| defined _@GUARD_PREFIX@_TIME_H)
# @INCLUDE_NEXT@ @NEXT_TIME_H@
/* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3).
Or they define it with the wrong member names or define it in <sys/time.h>
- (e.g., FreeBSD circa 1997). Stock Mingw does not define it, but the
- pthreads-win32 library defines it in <pthread.h>. */
+ (e.g., FreeBSD circa 1997). Stock Mingw prior to 3.0 does not define it,
+ but the pthreads-win32 library defines it in <pthread.h>. */
# if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@
# if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
# include <sys/time.h>
# elif @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
# include <pthread.h>
-/* The pthreads-win32 <pthread.h> also defines a couple of broken macros. */
-# undef asctime_r
-# undef ctime_r
-# undef gmtime_r
-# undef localtime_r
-# undef rand_r
-# undef strtok_r
+# elif @UNISTD_H_DEFINES_STRUCT_TIMESPEC@
+# include <unistd.h>
# else
# ifdef __cplusplus
# endif
# endif
+/* Convert TIMER to RESULT, assuming local time and UTC respectively. See
+ <http://www.opengroup.org/susv3xsh/localtime.html> and
+ <http://www.opengroup.org/susv3xsh/gmtime.html>. */
+# if @GNULIB_GETTIMEOFDAY@
+# if @REPLACE_LOCALTIME@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef localtime
+# define localtime rpl_localtime
+# endif
+_GL_FUNCDECL_RPL (localtime, struct tm *, (time_t const *__timer)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (localtime, struct tm *, (time_t const *__timer));
+# else
+_GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer));
+# endif
+_GL_CXXALIASWARN (localtime);
+# endif
+
+# if @GNULIB_GETTIMEOFDAY@
+# if @REPLACE_GMTIME@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef gmtime
+# define gmtime rpl_gmtime
+# endif
+_GL_FUNCDECL_RPL (gmtime, struct tm *, (time_t const *__timer)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (gmtime, struct tm *, (time_t const *__timer));
+# else
+_GL_CXXALIAS_SYS (gmtime, struct tm *, (time_t const *__timer));
+# endif
+_GL_CXXALIASWARN (gmtime);
+# endif
+
/* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store
the resulting broken-down time into TM. See
<http://www.opengroup.org/susv3xsh/strptime.html>. */
_GL_CXXALIASWARN (strptime);
# endif
+# if defined _GNU_SOURCE && @GNULIB_TIME_RZ@ && ! @HAVE_TIMEZONE_T@
+typedef struct tm_zone *timezone_t;
+_GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name));
+_GL_CXXALIAS_SYS (tzalloc, timezone_t, (char const *__name));
+_GL_FUNCDECL_SYS (tzfree, void, (timezone_t __tz));
+_GL_CXXALIAS_SYS (tzfree, void, (timezone_t __tz));
+_GL_FUNCDECL_SYS (localtime_rz, struct tm *,
+ (timezone_t __tz, time_t const *restrict __timer,
+ struct tm *restrict __result) _GL_ARG_NONNULL ((2, 3)));
+_GL_CXXALIAS_SYS (localtime_rz, struct tm *,
+ (timezone_t __tz, time_t const *restrict __timer,
+ struct tm *restrict __result));
+_GL_FUNCDECL_SYS (mktime_z, time_t,
+ (timezone_t __tz, struct tm *restrict __result)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_SYS (mktime_z, time_t,
+ (timezone_t __tz, struct tm *restrict __result));
+# endif
+
/* Convert TM to a time_t value, assuming UTC. */
# if @GNULIB_TIMEGM@
# if @REPLACE_TIMEGM@
-/* Copyright (C) 1999, 2001-2002, 2006, 2009-2013 Free Software Foundation,
+/* Copyright (C) 1999, 2001-2002, 2006, 2009-2016 Free Software Foundation,
Inc.
This file is part of the GNU C Library.
/* Determine a temporary directory.
- Copyright (C) 2001-2002, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Like unistd.h, but redefine some names to avoid glitches.
- Copyright (C) 2005, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Invoke unistd-like functions, but avoid some glitches.
- Copyright (C) 2001, 2003, 2005, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2005, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
#define _GL_UNISTD_INLINE _GL_EXTERN_INLINE
#include "unistd.h"
+typedef int dummy;
/* Substitute for and wrapper around <unistd.h>.
- Copyright (C) 2003-2013 Free Software Foundation, Inc.
+ Copyright (C) 2003-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#endif
@PRAGMA_COLUMNS@
+#ifdef _GL_INCLUDING_UNISTD_H
+/* Special invocation convention:
+ - On Mac OS X 10.3.9 we have a sequence of nested includes
+ <unistd.h> -> <signal.h> -> <pthread.h> -> <unistd.h>
+ In this situation, the functions are not yet declared, therefore we cannot
+ provide the C++ aliases. */
+
+#@INCLUDE_NEXT@ @NEXT_UNISTD_H@
+
+#else
+/* Normal invocation convention. */
+
/* The include_next requires a split double-inclusion guard. */
#if @HAVE_UNISTD_H@
+# define _GL_INCLUDING_UNISTD_H
# @INCLUDE_NEXT@ @NEXT_UNISTD_H@
+# undef _GL_INCLUDING_UNISTD_H
#endif
/* Get all possible declarations of gethostname(). */
#include <stddef.h>
/* mingw doesn't define the SEEK_* or *_FILENO macros in <unistd.h>. */
+/* MSVC declares 'unlink' in <stdio.h>, not in <unistd.h>. We must include
+ it before we #define unlink rpl_unlink. */
/* Cygwin 1.7.1 declares symlinkat in <stdio.h>, not in <unistd.h>. */
/* But avoid namespace pollution on glibc systems. */
#if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \
+ || ((@GNULIB_UNLINK@ || defined GNULIB_POSIXCHECK) \
+ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) \
|| ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \
&& defined __CYGWIN__)) \
&& ! defined __GLIBC__
/* Set of environment variables and values. An array of strings of the form
"VARIABLE=VALUE", terminated with a NULL. */
# if defined __APPLE__ && defined __MACH__
+# include <TargetConditionals.h>
+# if !TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR
+# define _GL_USE_CRT_EXTERNS
+# endif
+# endif
+# ifdef _GL_USE_CRT_EXTERNS
# include <crt_externs.h>
# define environ (*_NSGetEnviron ())
# else
#if @GNULIB_GETDTABLESIZE@
/* Return the maximum number of file descriptors in the current process.
In POSIX, this is same as sysconf (_SC_OPEN_MAX). */
-# if !@HAVE_GETDTABLESIZE@
+# if @REPLACE_GETDTABLESIZE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef getdtablesize
+# define getdtablesize rpl_getdtablesize
+# endif
+_GL_FUNCDECL_RPL (getdtablesize, int, (void));
+_GL_CXXALIAS_RPL (getdtablesize, int, (void));
+# else
+# if !@HAVE_GETDTABLESIZE@
_GL_FUNCDECL_SYS (getdtablesize, int, (void));
-# endif
+# endif
_GL_CXXALIAS_SYS (getdtablesize, int, (void));
+# endif
_GL_CXXALIASWARN (getdtablesize);
#elif defined GNULIB_POSIXCHECK
# undef getdtablesize
${LOGNAME-$USER} on Unix platforms,
$USERNAME on native Windows platforms.
*/
-# if !@HAVE_GETLOGIN@
+# if !@HAVE_DECL_GETLOGIN@
_GL_FUNCDECL_SYS (getlogin, char *, (void));
# endif
_GL_CXXALIAS_SYS (getlogin, char *, (void));
#if @GNULIB_READLINKAT@
-# if !@HAVE_READLINKAT@
+# if @REPLACE_READLINKAT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define readlinkat rpl_readlinkat
+# endif
+_GL_FUNCDECL_RPL (readlinkat, ssize_t,
+ (int fd, char const *file, char *buf, size_t len)
+ _GL_ARG_NONNULL ((2, 3)));
+_GL_CXXALIAS_RPL (readlinkat, ssize_t,
+ (int fd, char const *file, char *buf, size_t len));
+# else
+# if !@HAVE_READLINKAT@
_GL_FUNCDECL_SYS (readlinkat, ssize_t,
(int fd, char const *file, char *buf, size_t len)
_GL_ARG_NONNULL ((2, 3)));
-# endif
+# endif
_GL_CXXALIAS_SYS (readlinkat, ssize_t,
(int fd, char const *file, char *buf, size_t len));
+# endif
_GL_CXXALIASWARN (readlinkat);
#elif defined GNULIB_POSIXCHECK
# undef readlinkat
#if @GNULIB_SYMLINKAT@
-# if !@HAVE_SYMLINKAT@
+# if @REPLACE_SYMLINKAT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef symlinkat
+# define symlinkat rpl_symlinkat
+# endif
+_GL_FUNCDECL_RPL (symlinkat, int,
+ (char const *contents, int fd, char const *file)
+ _GL_ARG_NONNULL ((1, 3)));
+_GL_CXXALIAS_RPL (symlinkat, int,
+ (char const *contents, int fd, char const *file));
+# else
+# if !@HAVE_SYMLINKAT@
_GL_FUNCDECL_SYS (symlinkat, int,
(char const *contents, int fd, char const *file)
_GL_ARG_NONNULL ((1, 3)));
-# endif
+# endif
_GL_CXXALIAS_SYS (symlinkat, int,
(char const *contents, int fd, char const *file));
+# endif
_GL_CXXALIASWARN (symlinkat);
#elif defined GNULIB_POSIXCHECK
# undef symlinkat
_GL_INLINE_HEADER_END
#endif /* _@GUARD_PREFIX@_UNISTD_H */
+#endif /* _GL_INCLUDING_UNISTD_H */
#endif /* _@GUARD_PREFIX@_UNISTD_H */
/* Prefer faster, non-thread-safe stdio functions if available.
- Copyright (C) 2001-2004, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* vsprintf with automatic memory allocation.
- Copyright (C) 1999, 2002-2013 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* GCC >= 4.0 with -Wall emits unjustified "... may be used uninitialized"
warnings in this file. Use -Dlint to suppress them. */
-#ifdef lint
+#if defined GCC_LINT || defined lint
# define IF_LINT(Code) Code
#else
# define IF_LINT(Code) /* empty */
else
{
do
- result[length++] = (unsigned char) *cp++;
+ result[length++] = *cp++;
while (--n > 0);
}
}
if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
abort ();
arg = a.arg[dp->width_arg_index].a.a_int;
+ width = arg;
if (arg < 0)
{
/* "A negative field width is taken as a '-' flag
followed by a positive field width." */
flags |= FLAG_LEFT;
- width = (unsigned int) (-arg);
+ width = -width;
}
- else
- width = arg;
}
else
{
characters = 0;
}
- if (has_width && width > characters
- && !(dp->flags & FLAG_LEFT))
+ if (characters < width && !(dp->flags & FLAG_LEFT))
{
size_t n = width - characters;
ENSURE_ALLOCATION (xsum (length, n));
}
# endif
- if (has_width && width > characters
- && (dp->flags & FLAG_LEFT))
+ if (characters < width && (dp->flags & FLAG_LEFT))
{
size_t n = width - characters;
ENSURE_ALLOCATION (xsum (length, n));
characters = 0;
}
- if (has_width && width > characters
- && !(dp->flags & FLAG_LEFT))
+ if (characters < width && !(dp->flags & FLAG_LEFT))
{
size_t n = width - characters;
ENSURE_ALLOCATION (xsum (length, n));
}
# endif
- if (has_width && width > characters
- && (dp->flags & FLAG_LEFT))
+ if (characters < width && (dp->flags & FLAG_LEFT))
{
size_t n = width - characters;
ENSURE_ALLOCATION (xsum (length, n));
characters = 0;
}
- if (has_width && width > characters
- && !(dp->flags & FLAG_LEFT))
+ if (characters < width && !(dp->flags & FLAG_LEFT))
{
size_t n = width - characters;
ENSURE_ALLOCATION (xsum (length, n));
}
# endif
- if (has_width && width > characters
- && (dp->flags & FLAG_LEFT))
+ if (characters < width && (dp->flags & FLAG_LEFT))
{
size_t n = width - characters;
ENSURE_ALLOCATION (xsum (length, n));
if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
abort ();
arg = a.arg[dp->width_arg_index].a.a_int;
+ width = arg;
if (arg < 0)
{
/* "A negative field width is taken as a '-' flag
followed by a positive field width." */
flags |= FLAG_LEFT;
- width = (unsigned int) (-arg);
+ width = -width;
}
- else
- width = arg;
}
else
{
characters = 0;
}
- if (has_width && width > characters
- && !(dp->flags & FLAG_LEFT))
+ if (characters < width && !(dp->flags & FLAG_LEFT))
{
size_t n = width - characters;
ENSURE_ALLOCATION (xsum (length, n));
}
}
- if (has_width && width > characters
- && (dp->flags & FLAG_LEFT))
+ if (characters < width && (dp->flags & FLAG_LEFT))
{
size_t n = width - characters;
ENSURE_ALLOCATION (xsum (length, n));
/* w doesn't matter. */
w = 0;
- if (has_width && width > w
- && !(dp->flags & FLAG_LEFT))
+ if (w < width && !(dp->flags & FLAG_LEFT))
{
size_t n = width - w;
ENSURE_ALLOCATION (xsum (length, n));
length += tmpdst_len;
# endif
- if (has_width && width > w
- && (dp->flags & FLAG_LEFT))
+ if (w < width && (dp->flags & FLAG_LEFT))
{
size_t n = width - w;
ENSURE_ALLOCATION (xsum (length, n));
{
arg_type type = a.arg[dp->arg_index].type;
int flags = dp->flags;
- int has_width;
size_t width;
int has_precision;
size_t precision;
size_t tmp_length;
+ size_t count;
DCHAR_T tmpbuf[700];
DCHAR_T *tmp;
DCHAR_T *pad_ptr;
DCHAR_T *p;
- has_width = 0;
width = 0;
if (dp->width_start != dp->width_end)
{
if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
abort ();
arg = a.arg[dp->width_arg_index].a.a_int;
+ width = arg;
if (arg < 0)
{
/* "A negative field width is taken as a '-' flag
followed by a positive field width." */
flags |= FLAG_LEFT;
- width = (unsigned int) (-arg);
+ width = -width;
}
- else
- width = arg;
}
else
{
width = xsum (xtimes (width, 10), *digitp++ - '0');
while (digitp != dp->width_end);
}
- has_width = 1;
}
has_precision = 0;
abort ();
# endif
}
+
/* The generated string now extends from tmp to p, with the
zero padding insertion point being at pad_ptr. */
- if (has_width && p - tmp < width)
+ count = p - tmp;
+
+ if (count < width)
{
- size_t pad = width - (p - tmp);
+ size_t pad = width - count;
DCHAR_T *end = p + pad;
if (flags & FLAG_LEFT)
p = end;
}
- {
- size_t count = p - tmp;
+ count = p - tmp;
- if (count >= tmp_length)
- /* tmp_length was incorrectly calculated - fix the
- code above! */
- abort ();
+ if (count >= tmp_length)
+ /* tmp_length was incorrectly calculated - fix the
+ code above! */
+ abort ();
- /* Make room for the result. */
- if (count >= allocated - length)
- {
- size_t n = xsum (length, count);
+ /* Make room for the result. */
+ if (count >= allocated - length)
+ {
+ size_t n = xsum (length, count);
- ENSURE_ALLOCATION (n);
- }
+ ENSURE_ALLOCATION (n);
+ }
- /* Append the result. */
- memcpy (result + length, tmp, count * sizeof (DCHAR_T));
- if (tmp != tmpbuf)
- free (tmp);
- length += count;
- }
+ /* Append the result. */
+ memcpy (result + length, tmp, count * sizeof (DCHAR_T));
+ if (tmp != tmpbuf)
+ free (tmp);
+ length += count;
}
#endif
#if (NEED_PRINTF_INFINITE_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL
arg_type type = a.arg[dp->arg_index].type;
# endif
int flags = dp->flags;
- int has_width;
size_t width;
+ size_t count;
int has_precision;
size_t precision;
size_t tmp_length;
DCHAR_T *pad_ptr;
DCHAR_T *p;
- has_width = 0;
width = 0;
if (dp->width_start != dp->width_end)
{
if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
abort ();
arg = a.arg[dp->width_arg_index].a.a_int;
+ width = arg;
if (arg < 0)
{
/* "A negative field width is taken as a '-' flag
followed by a positive field width." */
flags |= FLAG_LEFT;
- width = (unsigned int) (-arg);
+ width = -width;
}
- else
- width = arg;
}
else
{
width = xsum (xtimes (width, 10), *digitp++ - '0');
while (digitp != dp->width_end);
}
- has_width = 1;
}
has_precision = 0;
digits without trailing zeroes. */
if (exponent >= 0)
{
- size_t count = exponent + 1;
+ size_t ecount = exponent + 1;
/* Note: count <= precision = ndigits. */
- for (; count > 0; count--)
+ for (; ecount > 0; ecount--)
*p++ = digits[--ndigits];
if ((flags & FLAG_ALT) || ndigits > nzeroes)
{
}
else
{
- size_t count = -exponent - 1;
+ size_t ecount = -exponent - 1;
*p++ = '0';
*p++ = decimal_point_char ();
- for (; count > 0; count--)
+ for (; ecount > 0; ecount--)
*p++ = '0';
while (ndigits > nzeroes)
{
digits without trailing zeroes. */
if (exponent >= 0)
{
- size_t count = exponent + 1;
- /* Note: count <= precision = ndigits. */
- for (; count > 0; count--)
+ size_t ecount = exponent + 1;
+ /* Note: ecount <= precision = ndigits. */
+ for (; ecount > 0; ecount--)
*p++ = digits[--ndigits];
if ((flags & FLAG_ALT) || ndigits > nzeroes)
{
}
else
{
- size_t count = -exponent - 1;
+ size_t ecount = -exponent - 1;
*p++ = '0';
*p++ = decimal_point_char ();
- for (; count > 0; count--)
+ for (; ecount > 0; ecount--)
*p++ = '0';
while (ndigits > nzeroes)
{
/* The generated string now extends from tmp to p, with the
zero padding insertion point being at pad_ptr. */
- if (has_width && p - tmp < width)
+ count = p - tmp;
+
+ if (count < width)
{
- size_t pad = width - (p - tmp);
+ size_t pad = width - count;
DCHAR_T *end = p + pad;
if (flags & FLAG_LEFT)
p = end;
}
- {
- size_t count = p - tmp;
+ count = p - tmp;
- if (count >= tmp_length)
- /* tmp_length was incorrectly calculated - fix the
- code above! */
- abort ();
+ if (count >= tmp_length)
+ /* tmp_length was incorrectly calculated - fix the
+ code above! */
+ abort ();
- /* Make room for the result. */
- if (count >= allocated - length)
- {
- size_t n = xsum (length, count);
+ /* Make room for the result. */
+ if (count >= allocated - length)
+ {
+ size_t n = xsum (length, count);
- ENSURE_ALLOCATION (n);
- }
+ ENSURE_ALLOCATION (n);
+ }
- /* Append the result. */
- memcpy (result + length, tmp, count * sizeof (DCHAR_T));
- if (tmp != tmpbuf)
- free (tmp);
- length += count;
- }
+ /* Append the result. */
+ memcpy (result + length, tmp, count * sizeof (DCHAR_T));
+ if (tmp != tmpbuf)
+ free (tmp);
+ length += count;
}
#endif
else
{
arg_type type = a.arg[dp->arg_index].type;
int flags = dp->flags;
-#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
int has_width;
+#endif
+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
size_t width;
#endif
#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || NEED_PRINTF_UNBOUNDED_PRECISION
TCHAR_T *tmp;
#endif
-#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
has_width = 0;
+#endif
+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
width = 0;
if (dp->width_start != dp->width_end)
{
if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
abort ();
arg = a.arg[dp->width_arg_index].a.a_int;
+ width = arg;
if (arg < 0)
{
/* "A negative field width is taken as a '-' flag
followed by a positive field width." */
flags |= FLAG_LEFT;
- width = (unsigned int) (-arg);
+ width = -width;
}
- else
- width = arg;
}
else
{
width = xsum (xtimes (width, 10), *digitp++ - '0');
while (digitp != dp->width_end);
}
+#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
has_width = 1;
+#endif
}
#endif
{
const FCHAR_T *mp = dp->width_start;
do
- *fbp++ = (unsigned char) *mp++;
+ *fbp++ = *mp++;
while (--n > 0);
}
}
{
const FCHAR_T *mp = dp->precision_start;
do
- *fbp++ = (unsigned char) *mp++;
+ *fbp++ = *mp++;
while (--n > 0);
}
}
break;
# else
*fbp++ = 'l';
- /*FALLTHROUGH*/
# endif
#endif
+ /*FALLTHROUGH*/
case TYPE_LONGINT:
case TYPE_ULONGINT:
#if HAVE_WINT_T
size_t tmp_length =
MAX_ROOM_NEEDED (&a, dp->arg_index,
dp->conversion, type, flags,
- has_width ? width : 0,
+ width,
has_precision,
precision, pad_ourselves);
/* SNPRINTF or sprintf failed. Save and use the errno
that it has set, if any. */
int saved_errno = errno;
+ if (saved_errno == 0)
+ {
+ if (dp->conversion == 'c' || dp->conversion == 's')
+ saved_errno = EILSEQ;
+ else
+ saved_errno = EINVAL;
+ }
if (!(result == resultbuf || result == NULL))
free (result);
if (buf_malloced != NULL)
free (buf_malloced);
CLEANUP ();
- errno =
- (saved_errno != 0
- ? saved_errno
- : (dp->conversion == 'c' || dp->conversion == 's'
- ? EILSEQ
- : EINVAL));
+
+ errno = saved_errno;
return NULL;
}
tmpsrc += count;
tmpdst += count;
for (n = count; n > 0; n--)
- *--tmpdst = (unsigned char) *--tmpsrc;
+ *--tmpdst = *--tmpsrc;
}
}
#endif
/* vsprintf with automatic memory allocation.
- Copyright (C) 2002-2004, 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2002-2004, 2007-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Compile-time assert-like macros.
- Copyright (C) 2005-2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#define verify(R) _GL_VERIFY (R, "verify (" #R ")")
+#ifndef __has_builtin
+# define __has_builtin(x) 0
+#endif
+
+/* Assume that R always holds. This lets the compiler optimize
+ accordingly. R should not have side-effects; it may or may not be
+ evaluated. Behavior is undefined if R is false. */
+
+#if (__has_builtin (__builtin_unreachable) \
+ || 4 < __GNUC__ + (5 <= __GNUC_MINOR__))
+# define assume(R) ((R) ? (void) 0 : __builtin_unreachable ())
+#elif 1200 <= _MSC_VER
+# define assume(R) __assume (R)
+#elif ((defined GCC_LINT || defined lint) \
+ && (__has_builtin (__builtin_trap) \
+ || 3 < __GNUC__ + (3 < __GNUC_MINOR__ + (4 <= __GNUC_PATCHLEVEL__))))
+ /* Doing it this way helps various packages when configured with
+ --enable-gcc-warnings, which compiles with -Dlint. It's nicer
+ when 'assume' silences warnings even with older GCCs. */
+# define assume(R) ((R) ? (void) 0 : __builtin_trap ())
+#else
+# define assume(R) ((void) (0 && (R)))
+#endif
+
/* @assert.h omit end@ */
#endif
/* va_list error handler for noninteractive utilities
- Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Declaration for va_list error-reporting function
- Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Variable with FSF copyright information, for version-etc.
- Copyright (C) 1999-2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 1999-2006, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Print --version and bug-reporting information in a consistent format.
- Copyright (C) 1999-2013 Free Software Foundation, Inc.
+ Copyright (C) 1999-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# define PACKAGE PACKAGE_TARNAME
#endif
-enum { COPYRIGHT_YEAR = 2013 };
+enum { COPYRIGHT_YEAR = 2016 };
/* The three functions below display the --version information the
standard way.
/* Print --version and bug-reporting information in a consistent format.
- Copyright (C) 1999, 2003, 2005, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2003, 2005, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Auxiliary functions for the creation of subprocesses. Native Windows API.
- Copyright (C) 2001, 2003-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
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 __KLIBC__
/* Get declarations of the native Windows API functions. */
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
/* Get _open_osfhandle(). */
#include <io.h>
- 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_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"
+#ifndef __KLIBC__
+# 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"
+#else
+# define SHELL_SPECIAL_CHARS ""
+# define SHELL_SPACE_CHARS ""
+#endif
static char **
prepare_spawn (char **argv)
{
/* Waiting for a subprocess to finish.
- Copyright (C) 2001-2003, 2005-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2016 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
/* Waiting for a subprocess to finish.
- Copyright (C) 2001-2003, 2006, 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006, 2008-2016 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
/* Wait for process state change.
- Copyright (C) 2001-2003, 2005-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#endif
@PRAGMA_COLUMNS@
-#if defined __need_mbstate_t || defined __need_wint_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H
+#if (((defined __need_mbstate_t || defined __need_wint_t) \
+ && !defined __MINGW32__ && !defined __KLIBC__) \
+ || (defined __hpux \
+ && ((defined _INTTYPES_INCLUDED && !defined strtoimax) \
+ || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) \
+ || (defined __MINGW32__ && defined __STRING_H_SOURCED__) \
+ || defined _GL_ALREADY_INCLUDING_WCHAR_H)
/* Special invocation convention:
- - Inside glibc and uClibc header files.
+ - Inside glibc and uClibc header files, but not MinGW.
- On HP-UX 11.00 we have a sequence of nested includes
<wchar.h> -> <stdlib.h> -> <stdint.h>, and the latter includes <wchar.h>,
once indirectly <stdint.h> -> <sys/types.h> -> <inttypes.h> -> <wchar.h>
and once directly. In both situations 'wint_t' is not yet defined,
therefore we cannot provide the function overrides; instead include only
the system's <wchar.h>.
+ - With MinGW 3.22, when <string.h> includes <wchar.h>, only some part of
+ <wchar.h> is actually processed, and that doesn't include 'mbstate_t'.
- On IRIX 6.5, similarly, we have an include <wchar.h> -> <wctype.h>, and
the latter includes <wchar.h>. But here, we have no way to detect whether
<wctype.h> is completely included or is still being included. */
# define WEOF -1
# endif
#else
-/* MSVC defines wint_t as 'unsigned short' in <crtdefs.h>.
+/* mingw and MSVC define 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_OVERRIDES_WINT_T@
# if !GNULIB_defined_wint_t
# include <crtdefs.h>
typedef unsigned int rpl_wint_t;
# if !@HAVE_DECL_WCWIDTH@
/* wcwidth exists but is not declared. */
_GL_FUNCDECL_SYS (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE);
+# elif defined __KLIBC__
+/* On OS/2 kLIBC, wcwidth is a macro that expands to the name of a
+ static inline function. The implementation of wcwidth in wcwidth.c
+ causes a "conflicting types" error. */
+# undef wcwidth
# endif
_GL_CXXALIAS_SYS (wcwidth, int, (wchar_t));
# endif
/* Convert wide character to multibyte character.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
/* A substitute for ISO C99 <wctype.h>, for platforms that lack it.
- Copyright (C) 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
* wctrans_t, and wctype_t are not yet implemented.
*/
-#ifndef _@GUARD_PREFIX@_WCTYPE_H
-
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
+#if (defined __MINGW32__ && defined __CTYPE_H_SOURCED__)
+
+/* Special invocation convention:
+ - With MinGW 3.22, when <ctype.h> includes <wctype.h>, only some part of
+ <wctype.h> is being processed, which doesn't include the idempotency
+ guard. */
+
+#@INCLUDE_NEXT@ @NEXT_WCTYPE_H@
+
+#else
+/* Normal invocation convention. */
+
+#ifndef _@GUARD_PREFIX@_WCTYPE_H
+
#if @HAVE_WINT_T@
/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.
Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
# define WEOF -1
# endif
#else
-/* MSVC defines wint_t as 'unsigned short' in <crtdefs.h>.
+/* mingw and MSVC define 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_OVERRIDES_WINT_T@
# if !GNULIB_defined_wint_t
# include <crtdefs.h>
typedef unsigned int rpl_wint_t;
#endif /* _@GUARD_PREFIX@_WCTYPE_H */
#endif /* _@GUARD_PREFIX@_WCTYPE_H */
+#endif
/* Report a memory allocation failure and exit.
- Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2013 Free Software
+ Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2016 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
/* xalloc-oversized.h -- memory allocation size checking
- Copyright (C) 1990-2000, 2003-2004, 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 1990-2000, 2003-2004, 2006-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef XALLOC_OVERSIZED_H_
-# define XALLOC_OVERSIZED_H_
+#define XALLOC_OVERSIZED_H_
-# include <stddef.h>
+#include <stddef.h>
+#include <stdint.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.
+/* Default for (non-Clang) compilers that lack __has_builtin. */
+#ifndef __has_builtin
+# define __has_builtin(x) 0
+#endif
+/* True if N * S would overflow in a size_t calculation,
+ or would generate a value larger than PTRDIFF_MAX.
+ This expands to a constant expression if N and S are both constants.
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. */
+ calculations, so the conservative size_t-based dividend to use here
+ is SIZE_MAX - 1. */
+#define __xalloc_oversized(n, s) \
+ ((size_t) (PTRDIFF_MAX < SIZE_MAX ? PTRDIFF_MAX : SIZE_MAX - 1) / (s) < (n))
+
+#if PTRDIFF_MAX < SIZE_MAX
+typedef ptrdiff_t __xalloc_count_type;
+#else
+typedef size_t __xalloc_count_type;
+#endif
+
+/* Return 1 if an array of N objects, each of size S, cannot exist
+ reliably due to size or ptrdiff_t 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. */
+
+#if 7 <= __GNUC__ || __has_builtin (__builtin_add_overflow_p)
# define xalloc_oversized(n, s) \
- ((size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) < (n))
+ __builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1)
+#elif ((5 <= __GNUC__ \
+ || (__has_builtin (__builtin_mul_overflow) \
+ && __has_builtin (__builtin_constant_p))) \
+ && !__STRICT_ANSI__)
+# define xalloc_oversized(n, s) \
+ (__builtin_constant_p (n) && __builtin_constant_p (s) \
+ ? __xalloc_oversized (n, s) \
+ : ({ __xalloc_count_type __xalloc_count; \
+ __builtin_mul_overflow (n, s, &__xalloc_count); }))
+
+/* Other compilers use integer division; this may be slower but is
+ more portable. */
+#else
+# define xalloc_oversized(n, s) __xalloc_oversized (n, s)
+#endif
#endif /* !XALLOC_OVERSIZED_H_ */
/* xalloc.h -- malloc with out-of-memory checking
- Copyright (C) 1990-2000, 2003-2004, 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 1990-2000, 2003-2004, 2006-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#define XALLOC_H_
#include <stddef.h>
+#include <stdint.h>
#include "xalloc-oversized.h"
# define _GL_ATTRIBUTE_MALLOC
#endif
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+#if ! defined __clang__ && \
+ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args))
#else
# define _GL_ATTRIBUTE_ALLOC_SIZE(args)
_GL_ATTRIBUTE_ALLOC_SIZE ((2));
void *x2realloc (void *p, size_t *pn);
void *xmemdup (void const *p, size_t s)
- _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((2));
+ _GL_ATTRIBUTE_ALLOC_SIZE ((2));
char *xstrdup (char const *str)
_GL_ATTRIBUTE_MALLOC;
/* If P is null, allocate a block of at least *PN such objects;
otherwise, reallocate P so that it contains more than *PN objects
- each of S bytes. *PN must be nonzero unless P is null, and S must
- be nonzero. Set *PN to the new number of objects, and return the
- pointer to the new block. *PN is never set to zero, and the
- returned pointer is never null.
+ each of S bytes. S must be nonzero. Set *PN to the new number of
+ objects, and return the pointer to the new block. *PN is never set
+ to zero, and the returned pointer is never null.
Repeated reallocations are guaranteed to make progress, either by
allocating an initial block with a nonzero size, or by allocating a
}
else
{
- /* Set N = ceil (1.5 * N) so that progress is made if N == 1.
- Check for overflow, so that N * S stays in size_t range.
- The check is slightly conservative, but an exact check isn't
- worth the trouble. */
- if ((size_t) -1 / 3 * 2 / s <= n)
+ /* Set N = floor (1.5 * N) + 1 so that progress is made even if N == 0.
+ Check for overflow, so that N * S stays in both ptrdiff_t and
+ size_t range. The check may be slightly conservative, but an
+ exact check isn't worth the trouble. */
+ if ((PTRDIFF_MAX < SIZE_MAX ? PTRDIFF_MAX : SIZE_MAX) / 3 * 2 / s
+ <= n)
xalloc_die ();
- n += (n + 1) / 2;
+ n += n / 2 + 1;
}
*pn = n;
#endif
+_GL_INLINE_HEADER_END
#endif /* !XALLOC_H_ */
/* vasprintf and asprintf with out-of-memory checking.
- Copyright (C) 1999, 2002-2004, 2006, 2009-2013 Free Software Foundation,
+ Copyright (C) 1999, 2002-2004, 2006, 2009-2016 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
/* xmalloc.c -- malloc with out of memory checking
- Copyright (C) 1990-2000, 2002-2006, 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 1990-2000, 2002-2006, 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
xcalloc (size_t n, size_t s)
{
void *p;
- /* Test for overflow, since some calloc implementations don't have
- proper overflow checks. But omit overflow and size-zero tests if
- HAVE_GNU_CALLOC, since GNU calloc catches overflow and never
- returns NULL if successful. */
- if ((! HAVE_GNU_CALLOC && xalloc_oversized (n, s))
+ /* Test for overflow, since objects with size greater than
+ PTRDIFF_MAX cause pointer subtraction to go awry. Omit size-zero
+ tests if HAVE_GNU_CALLOC, since GNU calloc never returns NULL if
+ successful. */
+ if (xalloc_oversized (n, s)
|| (! (p = calloc (n, s)) && (HAVE_GNU_CALLOC || n != 0)))
xalloc_die ();
return p;
/* Safe automatic memory allocation with out of memory checking.
- Copyright (C) 2003, 2006-2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006-2007, 2009-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
/* Safe automatic memory allocation with out of memory checking.
- Copyright (C) 2003, 2005, 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005, 2007, 2009-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
/* printf wrappers that fail immediately for non-file-related errors
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* printf wrappers that fail immediately for non-file-related errors
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* xsize.h -- Checked size_t computations.
- Copyright (C) 2003, 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2008-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Duplicate a bounded initial segment of a string, with out-of-memory
checking.
- Copyright (C) 2003, 2006-2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006-2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Duplicate a bounded initial segment of a string, with out-of-memory
checking.
- Copyright (C) 2003, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* vasprintf and asprintf with out-of-memory checking.
- Copyright (C) 1999, 2002-2004, 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002-2004, 2006-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* vasprintf and asprintf with out-of-memory checking.
- Copyright (C) 2002-2004, 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 2002-2004, 2006-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-# 00gnulib.m4 serial 2
-dnl Copyright (C) 2009-2013 Free Software Foundation, Inc.
+# 00gnulib.m4 serial 3
+dnl Copyright (C) 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl This file must be named something that sorts before all other
dnl gnulib-provided .m4 files. It is needed until such time as we can
-dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE semantics.
+dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE and
+dnl m4_divert semantics.
+
+# Until autoconf 2.63, handling of the diversion stack required m4_init
+# to be called first; but this does not happen with aclocal. Wrapping
+# the entire execution in another layer of the diversion stack fixes this.
+# Worse, prior to autoconf 2.62, m4_wrap depended on the underlying m4
+# for whether it was FIFO or LIFO; in order to properly balance with
+# m4_init, we need to undo our push just before anything wrapped within
+# the m4_init body. The way to ensure this is to wrap both sides of
+# m4_init with a one-shot macro that does the pop at the right time.
+m4_ifndef([_m4_divert_diversion],
+[m4_divert_push([KILL])
+m4_define([gl_divert_fixup], [m4_divert_pop()m4_define([$0])])
+m4_define([m4_init],
+ [gl_divert_fixup()]m4_defn([m4_init])[gl_divert_fixup()])])
+
# AC_DEFUN_ONCE([NAME], VALUE)
# ----------------------------
--- /dev/null
+# absolute-header.m4 serial 16
+dnl Copyright (C) 2006-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Derek Price.
+
+# gl_ABSOLUTE_HEADER(HEADER1 HEADER2 ...)
+# ---------------------------------------
+# Find the absolute name of a header file, testing first if the header exists.
+# If the header were sys/inttypes.h, this macro would define
+# ABSOLUTE_SYS_INTTYPES_H to the '""' quoted absolute name of sys/inttypes.h
+# in config.h
+# (e.g. '#define ABSOLUTE_SYS_INTTYPES_H "///usr/include/sys/inttypes.h"').
+# The three "///" are to pacify Sun C 5.8, which otherwise would say
+# "warning: #include of /usr/include/... may be non-portable".
+# Use '""', not '<>', so that the /// cannot be confused with a C99 comment.
+# Note: This macro assumes that the header file is not empty after
+# preprocessing, i.e. it does not only define preprocessor macros but also
+# provides some type/enum definitions or function/variable declarations.
+AC_DEFUN([gl_ABSOLUTE_HEADER],
+[AC_REQUIRE([AC_CANONICAL_HOST])
+AC_LANG_PREPROC_REQUIRE()dnl
+dnl FIXME: gl_absolute_header and ac_header_exists must be used unquoted
+dnl until we can assume autoconf 2.64 or newer.
+m4_foreach_w([gl_HEADER_NAME], [$1],
+ [AS_VAR_PUSHDEF([gl_absolute_header],
+ [gl_cv_absolute_]m4_defn([gl_HEADER_NAME]))dnl
+ AC_CACHE_CHECK([absolute name of <]m4_defn([gl_HEADER_NAME])[>],
+ m4_defn([gl_absolute_header]),
+ [AS_VAR_PUSHDEF([ac_header_exists],
+ [ac_cv_header_]m4_defn([gl_HEADER_NAME]))dnl
+ AC_CHECK_HEADERS_ONCE(m4_defn([gl_HEADER_NAME]))dnl
+ if test AS_VAR_GET(ac_header_exists) = yes; then
+ gl_ABSOLUTE_HEADER_ONE(m4_defn([gl_HEADER_NAME]))
+ fi
+ AS_VAR_POPDEF([ac_header_exists])dnl
+ ])dnl
+ AC_DEFINE_UNQUOTED(AS_TR_CPP([ABSOLUTE_]m4_defn([gl_HEADER_NAME])),
+ ["AS_VAR_GET(gl_absolute_header)"],
+ [Define this to an absolute name of <]m4_defn([gl_HEADER_NAME])[>.])
+ AS_VAR_POPDEF([gl_absolute_header])dnl
+])dnl
+])# gl_ABSOLUTE_HEADER
+
+# gl_ABSOLUTE_HEADER_ONE(HEADER)
+# ------------------------------
+# Like gl_ABSOLUTE_HEADER, except that:
+# - it assumes that the header exists,
+# - it uses the current CPPFLAGS,
+# - it does not cache the result,
+# - it is silent.
+AC_DEFUN([gl_ABSOLUTE_HEADER_ONE],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <]]m4_dquote([$1])[[>]])])
+ dnl AIX "xlc -E" and "cc -E" omit #line directives for header files
+ dnl that contain only a #include of other header files and no
+ dnl non-comment tokens of their own. This leads to a failure to
+ dnl detect the absolute name of <dirent.h>, <signal.h>, <poll.h>
+ dnl and others. The workaround is to force preservation of comments
+ dnl through option -C. This ensures all necessary #line directives
+ dnl are present. GCC supports option -C as well.
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+changequote(,)
+ case "$host_os" in
+ mingw*)
+ dnl For the sake of native Windows compilers (excluding gcc),
+ dnl treat backslash as a directory separator, like /.
+ dnl Actually, these compilers use a double-backslash as
+ dnl directory separator, inside the
+ dnl # line "filename"
+ dnl directives.
+ gl_dirsep_regex='[/\\]'
+ ;;
+ *)
+ gl_dirsep_regex='\/'
+ ;;
+ esac
+ dnl A sed expression that turns a string into a basic regular
+ dnl expression, for use within "/.../".
+ gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+ gl_header_literal_regex=`echo '$1' \
+ | sed -e "$gl_make_literal_regex_sed"`
+ gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+ s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+ s|^/[^/]|//&|
+ p
+ q
+ }'
+changequote([,])
+ dnl eval is necessary to expand gl_absname_cpp.
+ dnl Ultrix and Pyramid sh refuse to redirect output of eval,
+ dnl so use subshell.
+ AS_VAR_SET([gl_cv_absolute_]AS_TR_SH([[$1]]),
+[`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
+ sed -n "$gl_absolute_header_sed"`])
+])
# alloca.m4 serial 14
-dnl Copyright (C) 2002-2004, 2006-2007, 2009-2013 Free Software Foundation,
+dnl Copyright (C) 2002-2004, 2006-2007, 2009-2016 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,
# ansi-c++.m4 serial 9
-dnl Copyright (C) 2002-2003, 2005, 2010-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005, 2010-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# asm-underscore.m4 serial 2
-dnl Copyright (C) 2010-2013 Free Software Foundation, Inc.
+# asm-underscore.m4 serial 3
+dnl Copyright (C) 2010-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
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
+ if LC_ALL=C grep -E '(^|[[^a-zA-Z0-9_]])_foo([[^a-zA-Z0-9_]]|$)' conftest.$gl_asmext >/dev/null; then
gl_cv_prog_as_underscore=yes
else
gl_cv_prog_as_underscore=no
#serial 7
-# Copyright (C) 1998-1999, 2001, 2004, 2008-2013 Free Software Foundation, Inc.
+# Copyright (C) 1998-1999, 2001, 2004, 2008-2016 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.
# autobuild.m4 serial 7
-dnl Copyright (C) 2004, 2006-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# btowc.m4 serial 10
-dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
--- /dev/null
+dnl Check for __builtin_expect.
+
+dnl Copyright 2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Paul Eggert.
+
+AC_DEFUN([gl___BUILTIN_EXPECT],
+[
+ AC_CACHE_CHECK([for __builtin_expect],
+ [gl_cv___builtin_expect],
+ [AC_LINK_IFELSE(
+ [AC_LANG_SOURCE([[
+ int
+ main (int argc, char **argv)
+ {
+ argc = __builtin_expect (argc, 100);
+ return argv[argc != 100][0];
+ }]])],
+ [gl_cv___builtin_expect=yes],
+ [AC_LINK_IFELSE(
+ [AC_LANG_SOURCE([[
+ #include <builtins.h>
+ int
+ main (int argc, char **argv)
+ {
+ argc = __builtin_expect (argc, 100);
+ return argv[argc != 100][0];
+ }]])],
+ [gl_cv___builtin_expect="in <builtins.h>"],
+ [gl_cv___builtin_expect=no])])])
+ if test "$gl_cv___builtin_expect" = yes; then
+ AC_DEFINE([HAVE___BUILTIN_EXPECT], [1])
+ elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
+ AC_DEFINE([HAVE___BUILTIN_EXPECT], [2])
+ fi
+ AH_VERBATIM([HAVE___BUILTIN_EXPECT],
+ [/* Define to 1 if the compiler supports __builtin_expect,
+ and to 2 if <builtins.h> does. */
+#undef HAVE___BUILTIN_EXPECT
+#ifndef HAVE___BUILTIN_EXPECT
+# define __builtin_expect(e, c) (e)
+#elif HAVE___BUILTIN_EXPECT == 2
+# include <builtins.h>
+#endif
+ ])
+])
# Check prerequisites for compiling lib/c-stack.c.
-# Copyright (C) 2002-2004, 2008-2013 Free Software Foundation, Inc.
+# Copyright (C) 2002-2004, 2008-2016 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.
-# canonicalize.m4 serial 26
+# canonicalize.m4 serial 28
-dnl Copyright (C) 2003-2007, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2007, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
char *name = realpath ("conftest.a", NULL);
if (!(name && *name == '/'))
result |= 1;
+ free (name);
}
{
char *name = realpath ("conftest.b/../conftest.a", NULL);
if (name != NULL)
result |= 2;
+ free (name);
}
{
char *name = realpath ("conftest.a/", NULL);
if (name != NULL)
result |= 4;
+ free (name);
}
{
char *name1 = realpath (".", NULL);
char *name2 = realpath ("conftest.d//./..", NULL);
- if (strcmp (name1, name2) != 0)
+ if (! name1 || ! name2 || strcmp (name1, name2))
result |= 8;
+ free (name1);
+ free (name2);
}
return result;
]])
#serial 4
-dnl Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2007, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# close.m4 serial 8
-dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# closedir.m4 serial 2
-dnl Copyright (C) 2011-2013 Free Software Foundation, Inc.
+# closedir.m4 serial 5
+dnl Copyright (C) 2011-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
fi
fi
])
+ dnl Replace closedir() for supporting the gnulib-defined dirfd() function.
+ case $host_os,$HAVE_CLOSEDIR in
+ os2*,1)
+ REPLACE_CLOSEDIR=1;;
+ esac
])
# closein.m4 serial 2
-dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# closeout.m4 serial 6
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2013 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2016 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,
# codeset.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2000-2002, 2006, 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016 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.
# Say that -DHAVE_CONFIG_H is not needed.
-dnl Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# configmake.m4 serial 1
-dnl Copyright (C) 2010-2013 Free Software Foundation, Inc.
+# configmake.m4 serial 2
+dnl Copyright (C) 2010-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# gl_CONFIGMAKE_PREP
# ------------------
# Guarantee all of the standard directory variables, even when used with
-# autoconf 2.59 (datarootdir wasn't supported until 2.59c) or automake
-# 1.9.6 (pkglibexecdir wasn't supported until 1.10b.).
+# autoconf 2.59 (datarootdir wasn't supported until 2.59c, and runstatedir
+# in 2.70) or automake 1.9.6 (pkglibexecdir wasn't supported until 1.10b,
+# and runstatedir in 1.14.1).
AC_DEFUN([gl_CONFIGMAKE_PREP],
[
dnl Technically, datadir should default to datarootdir. But if
if test "x$localedir" = x; then
AC_SUBST([localedir], ['${datarootdir}/locale'])
fi
+ dnl Added in autoconf 2.70
+ if test "x$runstatedir" = x; then
+ AC_SUBST([runstatedir], ['${localstatedir}/run'])
+ fi
dnl Automake 1.9.6 only lacks pkglibexecdir; and since 1.11 merely
dnl provides it without AC_SUBST, this blind use of AC_SUBST is safe.
--- /dev/null
+# ctype_h.m4 serial 6
+dnl Copyright (C) 2009-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_CTYPE_H],
+[
+ AC_REQUIRE([gl_CTYPE_H_DEFAULTS])
+
+ dnl <ctype.h> is always overridden, because of GNULIB_POSIXCHECK.
+ gl_NEXT_HEADERS([ctype.h])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[#include <ctype.h>
+ ]], [isblank])
+])
+
+AC_DEFUN([gl_CTYPE_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_CTYPE_H_DEFAULTS])
+ gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+])
+
+AC_DEFUN([gl_CTYPE_H_DEFAULTS],
+[
+ GNULIB_ISBLANK=0; AC_SUBST([GNULIB_ISBLANK])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_ISBLANK=1; AC_SUBST([HAVE_ISBLANK])
+])
# dirent_h.m4 serial 16
-dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
--- /dev/null
+# serial 24 -*- Autoconf -*-
+
+dnl Find out how to get the file descriptor associated with an open DIR*.
+
+# Copyright (C) 2001-2006, 2008-2016 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl From Jim Meyering
+
+AC_DEFUN([gl_FUNC_DIRFD],
+[
+ AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
+
+ dnl Persuade glibc <dirent.h> to declare dirfd().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_CHECK_FUNCS([dirfd])
+ AC_CHECK_DECLS([dirfd], , ,
+ [[#include <sys/types.h>
+ #include <dirent.h>]])
+ if test $ac_cv_have_decl_dirfd = no; then
+ HAVE_DECL_DIRFD=0
+ fi
+
+ AC_CACHE_CHECK([whether dirfd is a macro],
+ gl_cv_func_dirfd_macro,
+ [AC_EGREP_CPP([dirent_header_defines_dirfd], [
+#include <sys/types.h>
+#include <dirent.h>
+#ifdef dirfd
+ dirent_header_defines_dirfd
+#endif],
+ gl_cv_func_dirfd_macro=yes,
+ gl_cv_func_dirfd_macro=no)])
+
+ # Use the replacement if we have no function or macro with that name,
+ # or if OS/2 kLIBC whose dirfd() does not work.
+ # Replace only if the system declares dirfd already.
+ case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
+ no,no,*,yes | *,*,os2*,yes)
+ REPLACE_DIRFD=1
+ AC_DEFINE([REPLACE_DIRFD], [1],
+ [Define to 1 if gnulib's dirfd() replacement is used.]);;
+ esac
+])
+
+dnl Prerequisites of lib/dirfd.c.
+AC_DEFUN([gl_PREREQ_DIRFD],
+[
+ AC_CACHE_CHECK([how to get the file descriptor associated with an open DIR*],
+ [gl_cv_sys_dir_fd_member_name],
+ [
+ dirfd_save_CFLAGS=$CFLAGS
+ for ac_expr in d_fd dd_fd; do
+
+ CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/types.h>
+ #include <dirent.h>]],
+ [[DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;]])],
+ [dir_fd_found=yes]
+ )
+ CFLAGS=$dirfd_save_CFLAGS
+ test "$dir_fd_found" = yes && break
+ done
+ test "$dir_fd_found" = yes || ac_expr=no_such_member
+
+ gl_cv_sys_dir_fd_member_name=$ac_expr
+ ]
+ )
+ if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
+ AC_DEFINE_UNQUOTED([DIR_FD_MEMBER_NAME],
+ [$gl_cv_sys_dir_fd_member_name],
+ [the name of the file descriptor member of DIR])
+ fi
+ AH_VERBATIM([DIR_TO_FD],
+ [#ifdef DIR_FD_MEMBER_NAME
+# define DIR_TO_FD(Dir_p) ((Dir_p)->DIR_FD_MEMBER_NAME)
+#else
+# define DIR_TO_FD(Dir_p) -1
+#endif
+])
+])
#serial 10 -*- autoconf -*-
-dnl Copyright (C) 2002-2006, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# double-slash-root.m4 serial 4 -*- Autoconf -*-
-dnl Copyright (C) 2006, 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# dup.m4 serial 3
-dnl Copyright (C) 2011-2013 Free Software Foundation, Inc.
+# dup.m4 serial 4
+dnl Copyright (C) 2011-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
REPLACE_DUP=1
fi
])
+ AC_CACHE_CHECK([whether dup works], [gl_cv_func_dup_works],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM([[#include <unistd.h>
+ #include <fcntl.h>
+ #include <errno.h>]],
+ [[/* On OS/2 kLIBC, dup does not work on a directory fd. */
+ int fd = open (".", O_RDONLY);
+ return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
+ ]])
+ ],
+ [gl_cv_func_dup_works=yes],
+ [gl_cv_func_dup_works=no],
+ [gl_cv_func_dup_works='guessing yes'])
+ ])
+ case "$gl_cv_func_dup_works" in
+ *yes) ;;
+ *)
+ REPLACE_DUP=1
+ ;;
+ esac
])
# Prerequisites of lib/dup.c.
-#serial 19
-dnl Copyright (C) 2002, 2005, 2007, 2009-2013 Free Software Foundation, Inc.
+#serial 25
+dnl Copyright (C) 2002, 2005, 2007, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
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;
-#ifdef FD_CLOEXEC
- if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
- result |= 1;
-#endif
- if (dup2 (1, 1) == 0)
- result |= 2;
-#ifdef FD_CLOEXEC
- if (fcntl (1, F_GETFD) != FD_CLOEXEC)
- result |= 4;
-#endif
- close (0);
- if (dup2 (0, 0) != -1)
- result |= 8;
- /* Many gnulib modules require POSIX conformance of EBADF. */
- if (dup2 (2, 1000000) == -1 && errno != EBADF)
- result |= 16;
- /* Flush out a cygwin core dump. */
- if (dup2 (2, -1) != -1 || errno != EBADF)
- result |= 32;
- return result;
- ])
+ AC_LANG_PROGRAM(
+ [[#include <errno.h>
+ #include <fcntl.h>
+ #include <limits.h>
+ #include <sys/resource.h>
+ #include <unistd.h>
+ #ifndef RLIM_SAVED_CUR
+ # define RLIM_SAVED_CUR RLIM_INFINITY
+ #endif
+ #ifndef RLIM_SAVED_MAX
+ # define RLIM_SAVED_MAX RLIM_INFINITY
+ #endif
+ ]],
+ [[int result = 0;
+ int bad_fd = INT_MAX;
+ struct rlimit rlim;
+ if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
+ && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
+ && rlim.rlim_cur != RLIM_INFINITY
+ && rlim.rlim_cur != RLIM_SAVED_MAX
+ && rlim.rlim_cur != RLIM_SAVED_CUR)
+ bad_fd = rlim.rlim_cur;
+ #ifdef FD_CLOEXEC
+ if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
+ result |= 1;
+ #endif
+ if (dup2 (1, 1) != 1)
+ result |= 2;
+ #ifdef FD_CLOEXEC
+ if (fcntl (1, F_GETFD) != FD_CLOEXEC)
+ result |= 4;
+ #endif
+ close (0);
+ if (dup2 (0, 0) != -1)
+ result |= 8;
+ /* Many gnulib modules require POSIX conformance of EBADF. */
+ if (dup2 (2, bad_fd) == -1 && errno != EBADF)
+ result |= 16;
+ /* Flush out some cygwin core dumps. */
+ if (dup2 (2, -1) != -1 || errno != EBADF)
+ result |= 32;
+ dup2 (2, 255);
+ dup2 (2, 256);
+ /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
+ {
+ int fd = open (".", O_RDONLY);
+ if (fd == -1)
+ result |= 64;
+ else if (dup2 (fd, fd + 1) == -1)
+ result |= 128;
+
+ close (fd);
+ }
+ return result;]])
],
[gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no],
[case "$host_os" in
gl_cv_func_dup2_works="guessing no" ;;
cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
gl_cv_func_dup2_works="guessing no" ;;
- linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
- # closed fd may yield -EBADF instead of -1 / errno=EBADF.
- gl_cv_func_dup2_works="guessing no" ;;
- freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
+ aix* | freebsd*)
+ # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
+ # not EBADF.
gl_cv_func_dup2_works="guessing no" ;;
haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
gl_cv_func_dup2_works="guessing no" ;;
+ *-android*) # implemented using dup3(), which fails if oldfd == newfd
+ gl_cv_func_dup2_works="guessing no" ;;
+ os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
+ gl_cv_func_dup2_works="guessing no" ;;
*) gl_cv_func_dup2_works="guessing yes" ;;
esac])
])
*yes) ;;
*)
REPLACE_DUP2=1
+ AC_CHECK_FUNCS([setdtablesize])
;;
esac
fi
# eealloc.m4 serial 3
-dnl Copyright (C) 2003, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# environ.m4 serial 6
-dnl Copyright (C) 2001-2004, 2006-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2004, 2006-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# errno_h.m4 serial 12
-dnl Copyright (C) 2004, 2006, 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006, 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free 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 14
-# Copyright (C) 1996-1998, 2001-2004, 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-1998, 2001-2004, 2009-2016 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# execute.m4 serial 5
-dnl Copyright (C) 2003, 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# exponentd.m4 serial 3
-dnl Copyright (C) 2007-2008, 2010-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2008, 2010-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# exponentf.m4 serial 2
-dnl Copyright (C) 2007-2008, 2010-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2008, 2010-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# exponentl.m4 serial 3
-dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free 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 13 -*- Autoconf -*-
+# serial 15 -*- Autoconf -*-
# Enable extensions on systems that normally disable them.
-# Copyright (C) 2003, 2006-2013 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2016 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.
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
-/* Enable general extensions on OS X. */
+/* Enable general extensions on macOS. */
#ifndef _DARWIN_C_SOURCE
# undef _DARWIN_C_SOURCE
#endif
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
+/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
+#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+# undef __STDC_WANT_IEC_60559_BFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
+#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
+# undef __STDC_WANT_IEC_60559_DFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
+#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
+# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
+#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
+# undef __STDC_WANT_IEC_60559_TYPES_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
+#ifndef __STDC_WANT_LIB_EXT2__
+# undef __STDC_WANT_LIB_EXT2__
+#endif
+/* Enable extensions specified by ISO/IEC 24747:2009. */
+#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
+# undef __STDC_WANT_MATH_SPEC_FUNCS__
+#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
AC_DEFINE([_DARWIN_C_SOURCE])
AC_DEFINE([_GNU_SOURCE])
AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+ AC_DEFINE([__STDC_WANT_IEC_60559_ATTRIBS_EXT__])
+ AC_DEFINE([__STDC_WANT_IEC_60559_BFP_EXT__])
+ AC_DEFINE([__STDC_WANT_IEC_60559_DFP_EXT__])
+ AC_DEFINE([__STDC_WANT_IEC_60559_FUNCS_EXT__])
+ AC_DEFINE([__STDC_WANT_IEC_60559_TYPES_EXT__])
+ AC_DEFINE([__STDC_WANT_LIB_EXT2__])
+ AC_DEFINE([__STDC_WANT_MATH_SPEC_FUNCS__])
AC_DEFINE([_TANDEM_SOURCE])
AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined],
[ac_cv_should_define__xopen_source],
dnl 'extern inline' a la ISO C99.
-dnl Copyright 2012-2013 Free Software Foundation, Inc.
+dnl Copyright 2012-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
'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
+ Suppress extern inline (with or without __attribute__ ((__gnu_inline__)))
+ on configurations that mistakenly use 'static inline' to implement
+ functions or macros in standard C headers like <ctype.h>. For example,
+ if isdigit is mistakenly implemented via a static inline function,
+ a program containing an extern inline function that calls isdigit
+ may not work since the C standard prohibits extern inline functions
+ from calling static functions. This bug is known to occur on:
+
+ OS X 10.8 and earlier; see:
+ http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html
+
+ DragonFly; see
+ http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log
+
+ FreeBSD; see:
+ http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html
+
+ OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and
+ for clang but remains for g++; see <http://trac.macports.org/ticket/41033>.
+ Assume DragonFly and FreeBSD will be similar. */
+#if (((defined __APPLE__ && defined __MACH__) \
+ || defined __DragonFly__ || defined __FreeBSD__) \
+ && (defined __header_inline \
+ ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \
+ && ! defined __clang__) \
+ : ((! defined _DONT_USE_CTYPE_INLINE_ \
+ && (defined __GNUC__ || defined __cplusplus)) \
+ || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
+ && defined __GNUC__ && ! defined __cplusplus))))
+# define _GL_EXTERN_INLINE_STDHEADER_BUG
#endif
#if ((__GNUC__ \
? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
: (199901L <= __STDC_VERSION__ \
&& !defined __HP_cc \
+ && !defined __PGI \
&& !(defined __SUNPRO_C && __STDC__))) \
- && !defined _GL_EXTERN_INLINE_APPLE_BUG)
+ && !defined _GL_EXTERN_INLINE_STDHEADER_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__
+ && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
+# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__
/* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
# else
# define _GL_EXTERN_INLINE static _GL_UNUSED
#endif
-#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
+/* In GCC 4.6 (inclusive) to 5.1 (exclusive),
+ suppress bogus "no previous prototype for 'FOO'"
+ and "no previous declaration for 'FOO'" diagnostics,
+ when FOO is an inline function in the header; see
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113> and
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63877>. */
+#if __GNUC__ == 4 && 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\"") \
# fatal-signal.m4 serial 9
-dnl Copyright (C) 2003-2004, 2006, 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2004, 2006, 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# fclose.m4 serial 6
-dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
+# fclose.m4 serial 7
+dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl 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_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
gl_FUNC_FFLUSH_STDIN
if test $gl_cv_func_fflush_stdin != yes; then
if test $REPLACE_CLOSE = 1; then
REPLACE_FCLOSE=1
fi
+
+ case "$host_os" in
+ openedition) REPLACE_FCLOSE=1 ;;
+ esac
])
# fcntl-o.m4 serial 4
-dnl Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# fcntl.m4 serial 5
-dnl Copyright (C) 2009-2013 Free Software Foundation, Inc.
+# fcntl.m4 serial 9
+dnl Copyright (C) 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free 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 haiku alpha 2 F_DUPFD has wrong errno
AC_CACHE_CHECK([whether fcntl handles F_DUPFD correctly],
[gl_cv_func_fcntl_f_dupfd_works],
- [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-#include <fcntl.h>
-#include <errno.h>
-]], [[int result = 0;
- if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
- if (errno != EINVAL) result |= 2;
- return result;
- ]])],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <errno.h>
+ #include <fcntl.h>
+ #include <limits.h>
+ #include <sys/resource.h>
+ #include <unistd.h>
+ #ifndef RLIM_SAVED_CUR
+ # define RLIM_SAVED_CUR RLIM_INFINITY
+ #endif
+ #ifndef RLIM_SAVED_MAX
+ # define RLIM_SAVED_MAX RLIM_INFINITY
+ #endif
+ ]],
+ [[int result = 0;
+ int bad_fd = INT_MAX;
+ struct rlimit rlim;
+ if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
+ && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
+ && rlim.rlim_cur != RLIM_INFINITY
+ && rlim.rlim_cur != RLIM_SAVED_MAX
+ && rlim.rlim_cur != RLIM_SAVED_CUR)
+ bad_fd = rlim.rlim_cur;
+ if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
+ if (errno != EINVAL) result |= 2;
+ if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
+ if (errno != EINVAL) result |= 8;
+ /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
+ {
+ int fd;
+ fd = open (".", O_RDONLY);
+ if (fd == -1)
+ result |= 16;
+ else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
+ result |= 32;
+
+ close (fd);
+ }
+ return result;]])],
[gl_cv_func_fcntl_f_dupfd_works=yes],
[gl_cv_func_fcntl_f_dupfd_works=no],
- [# Guess that it works on glibc systems
- case $host_os in #((
- *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
- *) gl_cv_func_fcntl_f_dupfd_works="guessing no";;
+ [case $host_os in
+ aix* | cygwin* | haiku*)
+ gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
+ *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
esac])])
case $gl_cv_func_fcntl_f_dupfd_works in
*yes) ;;
# serial 15
# Configure fcntl.h.
-dnl Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2007, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# fdopen.m4 serial 3
-dnl Copyright (C) 2011-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# fflush.m4 serial 15
-# Copyright (C) 2007-2013 Free Software Foundation, Inc.
+# Copyright (C) 2007-2016 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.
# filenamecat.m4 serial 11
-dnl Copyright (C) 2002-2006, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
--- /dev/null
+# serial 4
+# Check for flexible array member support.
+
+# Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Paul Eggert.
+
+AC_DEFUN([AC_C_FLEXIBLE_ARRAY_MEMBER],
+[
+ AC_CACHE_CHECK([for flexible array member],
+ ac_cv_c_flexmember,
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdlib.h>
+ #include <stdio.h>
+ #include <stddef.h>
+ struct s { int n; double d[]; };]],
+ [[int m = getchar ();
+ size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
+ nbytes += sizeof (struct s) - 1;
+ nbytes -= nbytes % sizeof (struct s);
+ struct s *p = malloc (nbytes);
+ p->d[0] = 0.0;
+ return p->d != (double *) NULL;]])],
+ [ac_cv_c_flexmember=yes],
+ [ac_cv_c_flexmember=no])])
+ if test $ac_cv_c_flexmember = yes; then
+ AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [],
+ [Define to nothing if C supports flexible array members, and to
+ 1 if it does not. That way, with a declaration like 'struct s
+ { int n; double d@<:@FLEXIBLE_ARRAY_MEMBER@:>@; };', the struct hack
+ can be used with pre-C99 compilers.
+ When computing the size of such an object, don't use 'sizeof (struct s)'
+ as it overestimates the size. Use 'offsetof (struct s, d)' instead.
+ Don't use 'offsetof (struct s, d@<:@0@:>@)', as this doesn't work with
+ MSVC and with C++ compilers.])
+ else
+ AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [1])
+ fi
+])
# float_h.m4 serial 9
-dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# fopen.m4 serial 9
-dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free 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 20
+# serial 22
-# Copyright (C) 2000-2001, 2004-2013 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2004-2016 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
dnl Find out how to determine the number of pending output bytes on a stream.
dnl glibc (2.1.93 and newer) and Solaris provide __fpending. On other systems,
-dnl we have to grub around in the FILE struct.
+dnl we have to grub around in the (possibly opaque) FILE struct.
AC_DEFUN([gl_FUNC_FPENDING],
[
AC_CHECK_HEADERS_ONCE([stdio_ext.h])
+ fp_headers='
+ #include <stdio.h>
+ #if HAVE_STDIO_EXT_H
+ # include <stdio_ext.h>
+ #endif
+ '
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
- ]],
+ [AC_LANG_PROGRAM([$fp_headers],
[[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' \
- \
- '# Minix' \
- 'fp->_ptr - fp->_buf' \
- \
- '# Plan9' \
- 'fp->wp - fp->buf' \
- \
- '# VMS' \
- '(*fp)->_ptr - (*fp)->_base' \
- \
- '# e.g., DGUX R4.11; the info is not available' \
- 1 \
- ; do
-
- # Skip each embedded comment.
- case "$ac_expr" in '#'*) continue;; esac
-
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <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'])
+ if test $gl_cv_func___fpending = yes; then
+ AC_CHECK_DECLS([__fpending], [], [], [$fp_headers])
+ fi
])
-# fpieee.m4 serial 2
-dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+# fpieee.m4 serial 2 -*- coding: utf-8 -*-
+dnl Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# fpurge.m4 serial 7
-dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# freadahead.m4 serial 1
-dnl Copyright (C) 2012-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# freading.m4 serial 1
-dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# frexp.m4 serial 15
-dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# frexpl.m4 serial 20
-dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# fseek.m4 serial 4
-dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# fseeko.m4 serial 17
-dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# fstat.m4 serial 4
-dnl Copyright (C) 2011-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# ftell.m4 serial 3
-dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# ftello.m4 serial 11
-dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# getcwd.m4 - check for working getcwd that is compatible with glibc
-# Copyright (C) 2001, 2003-2007, 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003-2007, 2009-2016 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 13
AC_DEFUN([gl_FUNC_GETCWD_NULL],
[
AC_CACHE_CHECK([whether getcwd (NULL, 0) allocates memory for result],
[gl_cv_func_getcwd_null],
[AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+# include <stdlib.h>
# if HAVE_UNISTD_H
# include <unistd.h>
# else /* on Windows with MSVC */
return 3;
if (f[1] != '\0')
return 4;
+ free (f);
return 0;
}
#endif
[Define to 1 if getcwd works, except it sometimes fails when it
shouldn't, setting errno to ERANGE, ENAMETOOLONG, or ENOENT.])
;;
+ "yes, but with shorter paths")
+ AC_DEFINE([HAVE_GETCWD_SHORTER], [1],
+ [Define to 1 if getcwd works, but with shorter paths
+ than is generally tested with the replacement.])
+ ;;
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 \
+ || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
|| test $gl_abort_bug = yes; then
REPLACE_GETCWD=1
fi
-# getdtablesize.m4 serial 4
-dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
+# getdtablesize.m4 serial 6
+dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_GETDTABLESIZE],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
AC_CHECK_FUNCS_ONCE([getdtablesize])
- if test $ac_cv_func_getdtablesize != yes; then
+ AC_CHECK_DECLS_ONCE([getdtablesize])
+ if test $ac_cv_func_getdtablesize = yes &&
+ test $ac_cv_have_decl_getdtablesize = yes; then
+ # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
+ # up to an unchangeable hard limit; all other platforms correctly
+ # require setrlimit before getdtablesize() can report a larger value.
+ AC_CACHE_CHECK([whether getdtablesize works],
+ [gl_cv_func_getdtablesize_works],
+ [AC_RUN_IFELSE([
+ AC_LANG_PROGRAM([[#include <unistd.h>]],
+ [int size = getdtablesize();
+ if (dup2 (0, getdtablesize()) != -1)
+ return 1;
+ if (size != getdtablesize())
+ return 2;
+ ])],
+ [gl_cv_func_getdtablesize_works=yes],
+ [gl_cv_func_getdtablesize_works=no],
+ [case "$host_os" in
+ cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
+ gl_cv_func_getdtablesize_works="guessing no" ;;
+ *) gl_cv_func_getdtablesize_works="guessing yes" ;;
+ esac])
+ ])
+ case "$gl_cv_func_getdtablesize_works" in
+ *yes) ;;
+ *) REPLACE_GETDTABLESIZE=1 ;;
+ esac
+ else
HAVE_GETDTABLESIZE=0
fi
])
# getopt.m4 serial 44
-dnl Copyright (C) 2002-2006, 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# getpagesize.m4 serial 9
-dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2013 Free Software Foundation,
+dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2016 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,
--- /dev/null
+# getprogname.m4 - check for getprogname or replacements for it
+
+# Copyright (C) 2016 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
+
+AC_DEFUN([gl_FUNC_GETPROGNAME],
+[
+ AC_CHECK_FUNCS_ONCE([getprogname getexecname])
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ ac_found=0
+ AC_CHECK_DECLS([program_invocation_name], [ac_found=1], [],
+ [#include <errno.h>])
+ AC_CHECK_DECLS([program_invocation_short_name], [ac_found=1], [],
+ [#include <errno.h>])
+ AC_CHECK_DECLS([__argv], [ac_found=1], [], [#include <stdlib.h>])
+
+ # Incur the cost of this test only if none of the above worked.
+ if test $ac_found = 0; then
+ # On OpenBSD 5.1, using the global __progname variable appears to be
+ # the only way to implement getprogname.
+ AC_CACHE_CHECK([whether __progname is defined in default libraries],
+ [gl_cv_var___progname],
+ [
+ gl_cv_var___progname=
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[extern char *__progname;]],
+ [[return *__progname;]]
+ )],
+ [gl_cv_var___progname=yes]
+ )
+ ]
+ )
+ if test "$gl_cv_var___progname" = yes; then
+ AC_DEFINE([HAVE_VAR___PROGNAME], 1,
+ [Define if you have a global __progname variable])
+ fi
+ fi
+])
-# serial 20
+# serial 21
-# Copyright (C) 2001-2003, 2005, 2007, 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2003, 2005, 2007, 2009-2016 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
])
AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [
- AC_DEFINE([gmtime], [rpl_gmtime],
- [Define to rpl_gmtime if the replacement function should be used.])
- AC_DEFINE([localtime], [rpl_localtime],
- [Define to rpl_localtime if the replacement function should be used.])
+ REPLACE_GMTIME=1
+ REPLACE_LOCALTIME=1
])
# Prerequisites of lib/gettimeofday.c.
# glibc21.m4 serial 5
-dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2013 Free Software Foundation,
+dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2016 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,
-# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+# Copyright (C) 2002-2016 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
# Specification in the form of a command-line invocation:
-# 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
+# gnulib-tool --import --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 do-release-commit-and-tag error execute fclose fdl-1.3 fflush filenamecat fopen fopen-safer fseeko gendocs getopt-gnu git-version-gen gitlog-to-changelog 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([gl])
closein
config-h
dirname
+ do-release-commit-and-tag
error
execute
fclose
gendocs
getopt-gnu
git-version-gen
+ gitlog-to-changelog
gnu-web-doc-update
gnumakefile
gnupload
-# gnulib-common.m4 serial 33
-dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
+# gnulib-common.m4 serial 36
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
is a misnomer outside of parameter lists. */
#define _UNUSED_PARAMETER_ _GL_UNUSED
+/* gcc supports the "unused" attribute on possibly unused labels, and
+ g++ has since version 4.5. Note to support C++ as well as C,
+ _GL_UNUSED_LABEL should be used with a trailing ; */
+#if !defined __cplusplus || __GNUC__ > 4 \
+ || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
+# define _GL_UNUSED_LABEL _GL_UNUSED
+#else
+# define _GL_UNUSED_LABEL
+#endif
+
/* The __pure__ attribute was added in gcc 2.96. */
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
[
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 library formats. In particular, the GNU binutils programs ar and ranlib
dnl produce libraries that work only with gcc, not with cc.
AC_REQUIRE([AC_PROG_CC])
+ AC_BEFORE([$0], [AM_PROG_AR])
AC_CACHE_CHECK([for Minix Amsterdam compiler], [gl_cv_c_amsterdam_compiler],
[
AC_EGREP_CPP([Amsterdam],
[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
+
+ dnl Don't compete with AM_PROG_AR's decision about AR/ARFLAGS if we are not
+ dnl building with __ACK__.
+ if test $gl_cv_c_amsterdam_compiler = yes; then
+ if test -z "$AR"; 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'
+ ARFLAGS='-o'
fi
+ else
+ dnl AM_PROG_AR was added in automake v1.11.2. AM_PROG_AR does not AC_SUBST
+ dnl ARFLAGS variable (it is filed into Makefile.in directly by automake
+ dnl script on-demand, if not specified by ./configure of course).
+ dnl Don't AC_REQUIRE the AM_PROG_AR otherwise the code for __ACK__ above
+ dnl will be ignored. Also, pay attention to call AM_PROG_AR in else block
+ dnl because AM_PROG_AR is written so it could re-set AR variable even for
+ dnl __ACK__. It may seem like its easier to avoid calling the macro here,
+ dnl but we need to AC_SUBST both AR/ARFLAGS (thus those must have some good
+ dnl default value and automake should usually know them).
+ m4_ifdef([AM_PROG_AR], [AM_PROG_AR], [:])
fi
+
+ dnl In case the code above has not helped with setting AR/ARFLAGS, use
+ dnl Automake-documented default values for AR and ARFLAGS, but prefer
+ dnl ${host}-ar over ar (useful for cross-compiling).
+ AC_CHECK_TOOL([AR], [ar], [ar])
+ if test -z "$ARFLAGS"; then
+ ARFLAGS='cr'
+ fi
+
AC_SUBST([AR])
AC_SUBST([ARFLAGS])
if test -z "$RANLIB"; then
])
# AC_C_RESTRICT
-# This definition overrides the AC_C_RESTRICT macro from autoconf 2.60..2.61,
-# so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++
-# works.
-# This definition can be removed once autoconf >= 2.62 can be assumed.
-# AC_AUTOCONF_VERSION was introduced in 2.62, so use that as the witness.
-m4_ifndef([AC_AUTOCONF_VERSION],[
+# This definition is copied from post-2.69 Autoconf and overrides the
+# AC_C_RESTRICT macro from autoconf 2.60..2.69. It can be removed
+# once autoconf >= 2.70 can be assumed. It's painful to check version
+# numbers, and in practice this macro is more up-to-date than Autoconf
+# is, so override Autoconf unconditionally.
AC_DEFUN([AC_C_RESTRICT],
[AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict],
[ac_cv_c_restrict=no
# The order here caters to the fact that C++ does not require restrict.
for ac_kw in __restrict __restrict__ _Restrict restrict; do
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
- [[typedef int * int_ptr;
- int foo (int_ptr $ac_kw ip) {
- return ip[0];
- }]],
- [[int s[1];
- int * $ac_kw t = s;
- t[0] = 0;
- return foo(t)]])],
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[typedef int *int_ptr;
+ int foo (int_ptr $ac_kw ip) { return ip[0]; }
+ int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
+ int bar (int ip[$ac_kw]) { return ip[0]; }
+ ]],
+ [[int s[1];
+ int *$ac_kw t = s;
+ t[0] = 0;
+ return foo (t) + bar (t);
+ ]])],
[ac_cv_c_restrict=$ac_kw])
test "$ac_cv_c_restrict" != no && break
done
nothing if this is not supported. Do not define if restrict is
supported directly. */
#undef restrict
-/* Work around a bug in Sun C++: it does not support _Restrict, even
- though the corresponding Sun C compiler does, which causes
- "#define restrict _Restrict" in the previous line. Perhaps some future
- version of Sun C++ will work with _Restrict; if so, it'll probably
- define __RESTRICT, just as Sun C does. */
+/* Work around a bug in Sun C++: it does not support _Restrict or
+ __restrict__, even though the corresponding Sun C compiler ends up with
+ "#define restrict _Restrict" or "#define restrict __restrict__" in the
+ previous line. Perhaps some future version of Sun C++ will work with
+ restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
#if defined __SUNPRO_CC && !defined __RESTRICT
# define _Restrict
+# define __restrict__
#endif])
case $ac_cv_c_restrict in
restrict) ;;
no) AC_DEFINE([restrict], []) ;;
*) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;;
esac
-])
-])
+])# AC_C_RESTRICT
# gl_BIGENDIAN
# is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd.
AC_CACHE_VAL([$1], [$2])
as_echo_n="$saved_as_echo_n"
])
+
+# AS_VAR_COPY was added in autoconf 2.63b
+m4_define_default([AS_VAR_COPY],
+[AS_LITERAL_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])])
+
+# AC_PROG_SED was added in autoconf 2.59b
+m4_ifndef([AC_PROG_SED],
+[AC_DEFUN([AC_PROG_SED],
+[AC_CACHE_CHECK([for a sed that does not truncate output], ac_cv_path_SED,
+ [dnl ac_script should not contain more than 99 commands (for HP-UX sed),
+ dnl but more than about 7000 bytes, to catch a limit in Solaris 8 /usr/ucb/sed.
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ AS_UNSET([ac_script])
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ _AS_PATH_WALK([], [
+ for ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ AS_EXECUTABLE_P(["$ac_path_SED"]) || continue
+ case `"$ac_path_SED" --version 2>&1` in
+ *GNU*) ac_cv_path_SED=$ac_path_SED ac_path_SED_found=:;;
+ *)
+ ac_count=0
+ _AS_ECHO_N([0123456789]) >conftest.in
+ while :
+ do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo >> conftest.nl
+ "$ac_path_SED" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
+ diff conftest.out conftest.nl >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best so far, but keep looking for better
+ ac_cv_path_SED=$ac_path_SED
+ ac_path_SED_max=$ac_count
+ fi
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+ esac
+ $ac_path_SED_found && break 3
+ done
+ done])
+ if test -z "$ac_cv_path_SED"; then
+ AC_ERROR([no acceptable sed could be found in \$PATH])
+ fi
+ else
+ ac_cv_path_SED=$SED
+ fi
+ SED="$ac_cv_path_SED"
+ AC_SUBST([SED])dnl
+ rm -f conftest.sed
+])])])
# DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+# Copyright (C) 2002-2016 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
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
+
+ # Pre-early section.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([gl_PROG_AR_RANLIB])
+
AC_REQUIRE([AM_PROG_CC_C_O])
+ # Code from module absolute-header:
+ # Code from module alignof:
+ # Code from module alignof-tests:
# Code from module alloca-opt:
# Code from module alloca-opt-tests:
# Code from module announce-gen:
# Code from module binary-io-tests:
# Code from module btowc:
# Code from module btowc-tests:
+ # Code from module builtin-expect:
# Code from module c-ctype:
# Code from module c-ctype-tests:
# Code from module c-stack:
# Code from module closeout:
# Code from module config-h:
# Code from module configmake:
+ # Code from module ctype:
+ # Code from module ctype-tests:
# Code from module dirent:
# Code from module dirent-c++-tests:
# Code from module dirent-tests:
+ # Code from module dirfd:
# Code from module dirname:
# Code from module dirname-lgpl:
# Code from module dirname-tests:
+ # Code from module do-release-commit-and-tag:
# Code from module dosname:
# Code from module double-slash-root:
# Code from module dup:
# Code from module execute:
# 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 filenamecat:
# Code from module filenamecat-lgpl:
# Code from module filenamecat-tests:
+ # Code from module flexmember:
# Code from module float:
# Code from module float-tests:
# Code from module fopen:
# Code from module getdtablesize:
# Code from module getdtablesize-tests:
# Code from module getopt-gnu:
+ # Code from module getopt-gnu-tests:
# Code from module getopt-posix:
# Code from module getopt-posix-tests:
# Code from module getpagesize:
+ # Code from module getprogname:
+ # Code from module getprogname-tests:
# Code from module gettext-h:
# Code from module gettimeofday:
# Code from module gettimeofday-tests:
# Code from module git-version-gen:
+ # Code from module gitlog-to-changelog:
# Code from module gnu-web-doc-update:
# Code from module gnumakefile:
# Code from module gnupload:
# Code from module gpl-3.0:
+ # Code from module hard-locale:
# Code from module havelib:
# Code from module ignore-value:
# Code from module ignore-value-tests:
# Code from module inttypes:
# Code from module inttypes-incomplete:
# Code from module inttypes-tests:
+ # Code from module isblank:
+ # Code from module isblank-tests:
# Code from module isnand-nolibm:
# Code from module isnand-nolibm-tests:
# Code from module isnanf-nolibm:
# Code from module largefile:
AC_REQUIRE([AC_SYS_LARGEFILE])
# Code from module libsigsegv:
+ # Code from module limits-h:
+ # Code from module limits-h-tests:
# Code from module link:
# Code from module link-tests:
# Code from module linkedhash-list:
# Code from module lstat:
# Code from module lstat-tests:
# Code from module maintainer-makefile:
- # Code from module malloc-gnu:
- # Code from module malloc-gnu-tests:
# Code from module malloc-posix:
# Code from module malloca:
# Code from module malloca-tests:
# Code from module memchr-tests:
# Code from module memchr2:
# Code from module memchr2-tests:
+ # Code from module minmax:
# Code from module mkdtemp:
# Code from module mkstemp:
# Code from module msvc-inval:
# Code from module ssize_t:
# Code from module stat:
# Code from module stat-tests:
+ # Code from module stdalign:
+ # Code from module stdalign-tests:
# Code from module stdarg:
dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode
dnl for the builtin va_copy to work. With Autoconf 2.60 or later,
gl_PREREQ_BTOWC
fi
gl_WCHAR_MODULE_INDICATOR([btowc])
+ gl___BUILTIN_EXPECT
gl_C_STACK
gl_CANONICALIZE_LGPL
if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
gl_FUNC_FPENDING
if test $gl_cv_func___fpending = no; then
AC_LIBOBJ([fpending])
- gl_PREREQ_FPENDING
fi
gl_FUNC_FPURGE
if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
fi
gl_STDIO_MODULE_INDICATOR([ftello])
gl_FUNC_GETDTABLESIZE
- if test $HAVE_GETDTABLESIZE = 0; then
+ if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
AC_LIBOBJ([getdtablesize])
gl_PREREQ_GETDTABLESIZE
fi
GNULIB_GL_M4_UNISTD_H_GETOPT=1
fi
AC_SUBST([GNULIB_GL_M4_UNISTD_H_GETOPT])
- gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
gl_FUNC_GETOPT_POSIX
if test $REPLACE_GETOPT = 1; then
AC_LIBOBJ([getopt])
GNULIB_GL_M4_UNISTD_H_GETOPT=1
fi
AC_SUBST([GNULIB_GL_M4_UNISTD_H_GETOPT])
+ gl_FUNC_GETPROGNAME
AC_SUBST([LIBINTL])
AC_SUBST([LTLIBINTL])
gl_FUNC_GETTIMEOFDAY
m4_defn([m4_PACKAGE_VERSION])), [1], [],
[AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
[GNUmakefile=$GNUmakefile])])
+ gl_HARD_LOCALE
gl_FUNC_ISNAND_NO_LIBM
if test $gl_func_isnand_no_libm != yes; then
AC_LIBOBJ([isnand])
gl_LANGINFO_H
AC_REQUIRE([gl_LARGEFILE])
gl_LIBSIGSEGV
+ gl_LIMITS_H
gl_LOCALCHARSET
LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
gl_SYS_STAT_MODULE_INDICATOR([lstat])
AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER],
[AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])])
- gl_FUNC_MALLOC_GNU
- if test $REPLACE_MALLOC = 1; then
- AC_LIBOBJ([malloc])
- fi
- gl_MODULE_INDICATOR([malloc-gnu])
+ AC_REQUIRE([AC_PROG_SED])
gl_FUNC_MALLOC_POSIX
if test $REPLACE_MALLOC = 1; then
AC_LIBOBJ([malloc])
gl_PREREQ_MEMCHR
fi
gl_STRING_MODULE_INDICATOR([memchr])
+ gl_MINMAX
gl_FUNC_MKDTEMP
if test $HAVE_MKDTEMP = 0; then
AC_LIBOBJ([mkdtemp])
gl_PREREQ_MKSTEMP
fi
gl_STDLIB_MODULE_INDICATOR([mkstemp])
- gl_MSVC_INVAL
+ AC_REQUIRE([gl_MSVC_INVAL])
if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
AC_LIBOBJ([msvc-inval])
fi
- gl_MSVC_NOTHROW
+ AC_REQUIRE([gl_MSVC_NOTHROW])
if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
AC_LIBOBJ([msvc-nothrow])
fi
AC_LIBOBJ([closedir])
fi
gl_DIRENT_MODULE_INDICATOR([closedir])
+ gl_CTYPE_H
gl_DIRENT_H
+ gl_FUNC_DIRFD
+ if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
+ || test $REPLACE_DIRFD = 1; then
+ AC_LIBOBJ([dirfd])
+ gl_PREREQ_DIRFD
+ fi
+ gl_DIRENT_MODULE_INDICATOR([dirfd])
gl_FUNC_DUP
if test $REPLACE_DUP = 1; then
AC_LIBOBJ([dup])
gl_PREREQ_FDOPEN
fi
gl_STDIO_MODULE_INDICATOR([fdopen])
+ AC_C_FLEXIBLE_ARRAY_MEMBER
gl_FUNC_UNGETC_WORKS
gl_FUNC_UNGETC_WORKS
gl_FUNC_UNGETC_WORKS
gl_UNISTD_MODULE_INDICATOR([getpagesize])
gl_INTTYPES_H
gl_INTTYPES_INCOMPLETE
+ gl_FUNC_ISBLANK
+ if test $HAVE_ISBLANK = 0; then
+ AC_LIBOBJ([isblank])
+ fi
+ gl_CTYPE_MODULE_INDICATOR([isblank])
gl_DOUBLE_EXPONENT_LOCATION
gl_FLOAT_EXPONENT_LOCATION
gl_LONG_DOUBLE_EXPONENT_LOCATION
fi
gl_UNISTD_MODULE_INDICATOR([sleep])
AC_CHECK_DECLS_ONCE([alarm])
+ gl_STDALIGN_H
AC_REQUIRE([gt_TYPE_WCHAR_T])
AC_REQUIRE([gt_TYPE_WINT_T])
gl_FUNC_STRDUP_POSIX
AC_DEFUN([M4_FILE_LIST], [
build-aux/announce-gen
build-aux/config.rpath
+ build-aux/do-release-commit-and-tag
build-aux/gendocs.sh
build-aux/git-version-gen
+ build-aux/gitlog-to-changelog
build-aux/gnu-web-doc-update
build-aux/gnupload
build-aux/snippet/_Noreturn.h
build-aux/vc-list-files
doc/fdl-1.3.texi
doc/gendocs_template
+ doc/gendocs_template_min
doc/gpl-3.0.texi
+ lib/alignof.h
lib/alloca.in.h
lib/asnprintf.c
lib/asprintf.c
lib/getopt.in.h
lib/getopt1.c
lib/getopt_int.h
+ lib/getprogname.c
+ lib/getprogname.h
lib/gettext.h
lib/gettimeofday.c
lib/gl_anyhash_list1.h
lib/glthread/threadlib.c
lib/glthread/tls.c
lib/glthread/tls.h
+ lib/hard-locale.c
+ lib/hard-locale.h
lib/ignore-value.h
lib/intprops.h
lib/isnan.c
lib/isnanl.c
lib/itold.c
lib/langinfo.in.h
+ lib/limits.in.h
lib/localcharset.c
lib/localcharset.h
lib/locale.in.h
lib/memchr2.c
lib/memchr2.h
lib/memchr2.valgrind
+ lib/minmax.h
lib/mkdtemp.c
lib/mkstemp-safer.c
lib/mkstemp.c
lib/xvasprintf.c
lib/xvasprintf.h
m4/00gnulib.m4
+ m4/absolute-header.m4
m4/alloca.m4
m4/ansi-c++.m4
m4/asm-underscore.m4
m4/assert.m4
m4/autobuild.m4
m4/btowc.m4
+ m4/builtin-expect.m4
m4/c-stack.m4
m4/canonicalize.m4
m4/close-stream.m4
m4/codeset.m4
m4/config-h.m4
m4/configmake.m4
+ m4/ctype.m4
m4/dirent_h.m4
+ m4/dirfd.m4
m4/dirname.m4
m4/double-slash-root.m4
m4/dup.m4
m4/fdopen.m4
m4/fflush.m4
m4/filenamecat.m4
+ m4/flexmember.m4
m4/float_h.m4
m4/fopen.m4
m4/fpending.m4
m4/getdtablesize.m4
m4/getopt.m4
m4/getpagesize.m4
+ m4/getprogname.m4
m4/gettimeofday.m4
m4/glibc21.m4
m4/gnulib-common.m4
+ m4/hard-locale.m4
m4/include_next.m4
m4/intlmacosx.m4
m4/intmax_t.m4
m4/inttypes-pri.m4
m4/inttypes.m4
m4/inttypes_h.m4
+ m4/isblank.m4
m4/isnand.m4
m4/isnanf.m4
m4/isnanl.m4
m4/lib-link.m4
m4/lib-prefix.m4
m4/libsigsegv.m4
+ m4/limits-h.m4
m4/link.m4
m4/localcharset.m4
m4/locale-fr.m4
m4/mbstate_t.m4
m4/mbtowc.m4
m4/memchr.m4
+ m4/minmax.m4
m4/mkdtemp.m4
m4/mkstemp.m4
m4/mmap-anon.m4
m4/multiarch.m4
m4/nl_langinfo.m4
m4/nocrash.m4
+ m4/obstack.m4
m4/off_t.m4
m4/open.m4
m4/opendir.m4
m4/spawn_h.m4
m4/ssize_t.m4
m4/stat.m4
+ m4/stdalign.m4
m4/stdarg.m4
m4/stdbool.m4
m4/stddef_h.m4
tests/randomd.c
tests/randoml.c
tests/signature.h
+ tests/test-alignof.c
tests/test-alloca-opt.c
tests/test-array_list.c
tests/test-array_oset.c
tests/test-close.c
tests/test-closein.c
tests/test-closein.sh
+ tests/test-ctype.c
tests/test-dirent-c++.cc
tests/test-dirent.c
tests/test-dirname.c
tests/test-fwrite.c
tests/test-getcwd-lgpl.c
tests/test-getdtablesize.c
- tests/test-getopt.c
+ tests/test-getopt-gnu.c
+ tests/test-getopt-main.h
+ tests/test-getopt-posix.c
tests/test-getopt.h
tests/test-getopt_long.h
+ tests/test-getprogname.c
tests/test-gettimeofday.c
tests/test-ignore-value.c
tests/test-init.sh
tests/test-intprops.c
tests/test-inttypes.c
+ tests/test-isblank.c
tests/test-isnand-nolibm.c
tests/test-isnand.h
tests/test-isnanf-nolibm.c
tests/test-isnanl.h
tests/test-langinfo-c++.cc
tests/test-langinfo.c
+ tests/test-limits-h.c
tests/test-link.c
tests/test-link.h
tests/test-linkedhash_list.c
tests/test-lseek.sh
tests/test-lstat.c
tests/test-lstat.h
- tests/test-malloc-gnu.c
tests/test-malloca.c
tests/test-math-c++.cc
tests/test-math-c++2.cc
tests/test-mbrtowc2.sh
tests/test-mbrtowc3.sh
tests/test-mbrtowc4.sh
+ tests/test-mbrtowc5.sh
tests/test-mbsinit.c
tests/test-mbsinit.sh
tests/test-memchr.c
tests/test-spawn.c
tests/test-stat.c
tests/test-stat.h
+ tests/test-stdalign.c
tests/test-stdbool.c
tests/test-stddef.c
tests/test-stdint.c
tests/test-xvasprintf.c
tests/zerosize-ptr.h
tests=lib/closedir.c
+ tests=lib/ctype.in.h
tests=lib/dirent-private.h
tests=lib/dirent.in.h
+ tests=lib/dirfd.c
tests=lib/dup.c
tests=lib/fdopen.c
tests=lib/filename.h
+ tests=lib/flexmember.h
tests=lib/getcwd-lgpl.c
tests=lib/getpagesize.c
tests=lib/gl_array_list.c
tests=lib/gl_array_oset.c
tests=lib/gl_array_oset.h
tests=lib/inttypes.in.h
+ tests=lib/isblank.c
tests=lib/link.c
tests=lib/localename.c
tests=lib/localename.h
tests=lib/setenv.c
tests=lib/setlocale.c
tests=lib/sleep.c
+ tests=lib/stdalign.in.h
tests=lib/strdup.c
tests=lib/symlink.c
tests=lib/unsetenv.c
--- /dev/null
+# hard-locale.m4 serial 8
+dnl Copyright (C) 2002-2006, 2009-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free 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 No prerequisites of lib/hard-locale.c.
+AC_DEFUN([gl_HARD_LOCALE],
+[
+ :
+])
# include_next.m4 serial 23
-dnl Copyright (C) 2006-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
if test AS_VAR_GET(gl_header_exists) = yes; then
AS_VAR_POPDEF([gl_header_exists])
])
- AC_LANG_CONFTEST(
- [AC_LANG_SOURCE(
- [[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]]
- )])
- dnl AIX "xlc -E" and "cc -E" omit #line directives for header
- dnl files that contain only a #include of other header files and
- dnl no non-comment tokens of their own. This leads to a failure
- dnl to detect the absolute name of <dirent.h>, <signal.h>,
- dnl <poll.h> and others. The workaround is to force preservation
- dnl of comments through option -C. This ensures all necessary
- dnl #line directives are present. GCC supports option -C as well.
- case "$host_os" in
- aix*) gl_absname_cpp="$ac_cpp -C" ;;
- *) gl_absname_cpp="$ac_cpp" ;;
- esac
-changequote(,)
- case "$host_os" in
- mingw*)
- dnl For the sake of native Windows compilers (excluding gcc),
- dnl treat backslash as a directory separator, like /.
- dnl Actually, these compilers use a double-backslash as
- dnl directory separator, inside the
- dnl # line "filename"
- dnl directives.
- gl_dirsep_regex='[/\\]'
- ;;
- *)
- gl_dirsep_regex='\/'
- ;;
- esac
- dnl A sed expression that turns a string into a basic regular
- dnl expression, for use within "/.../".
- gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-changequote([,])
- gl_header_literal_regex=`echo ']m4_defn([gl_HEADER_NAME])[' \
- | sed -e "$gl_make_literal_regex_sed"`
- gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
- s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-changequote(,)dnl
- s|^/[^/]|//&|
-changequote([,])dnl
- p
- q
- }'
- dnl eval is necessary to expand gl_absname_cpp.
- dnl Ultrix and Pyramid sh refuse to redirect output of eval,
- dnl so use subshell.
- AS_VAR_SET(gl_next_header,
- ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
- sed -n "$gl_absolute_header_sed"`'"'])
+ gl_ABSOLUTE_HEADER_ONE(gl_HEADER_NAME)
+ AS_VAR_COPY([gl_header], [gl_cv_absolute_]AS_TR_SH(gl_HEADER_NAME))
+ AS_VAR_SET(gl_next_header, ['"'$gl_header'"'])
m4_if([$2], [check],
[else
AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>'])
# intlmacosx.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2004-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2014, 2016 Free Software Foundation, Inc.
dnl This file is free software; the Free 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 This file 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 gettext package is covered by the GNU General Public License.
dnl They are *not* in the public domain.
dnl Checks for special options needed on Mac OS X.
# intmax_t.m4 serial 8
-dnl Copyright (C) 1997-2004, 2006-2007, 2009-2013 Free Software Foundation,
+dnl Copyright (C) 1997-2004, 2006-2007, 2009-2016 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,
# inttypes-pri.m4 serial 7 (gettext-0.18.2)
-dnl Copyright (C) 1997-2002, 2006, 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2002, 2006, 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# inttypes.m4 serial 26
-dnl Copyright (C) 2006-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX])
HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX])
REPLACE_STRTOIMAX=0; AC_SUBST([REPLACE_STRTOIMAX])
+ REPLACE_STRTOUMAX=0; AC_SUBST([REPLACE_STRTOUMAX])
INT32_MAX_LT_INTMAX_MAX=1; AC_SUBST([INT32_MAX_LT_INTMAX_MAX])
INT64_MAX_EQ_LONG_MAX='defined _LP64'; AC_SUBST([INT64_MAX_EQ_LONG_MAX])
PRI_MACROS_BROKEN=0; AC_SUBST([PRI_MACROS_BROKEN])
# inttypes_h.m4 serial 10
-dnl Copyright (C) 1997-2004, 2006, 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006, 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
--- /dev/null
+# isblank.m4 serial 3
+dnl Copyright (C) 2009-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_ISBLANK],
+[
+ dnl Persuade glibc <ctype.h> to declare isblank().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([gl_CTYPE_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([isblank])
+ if test $ac_cv_func_isblank = no; then
+ HAVE_ISBLANK=0
+ fi
+])
# isnand.m4 serial 11
-dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# isnanf.m4 serial 14
-dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# isnanl.m4 serial 17
-dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
+# isnanl.m4 serial 19
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
])
])
-dnl Test whether isnanl() recognizes all numbers which are neither finite nor
-dnl infinite. This test fails e.g. on NetBSD/i386 and on glibc/ia64.
-dnl Also, the GCC >= 4.0 built-in __builtin_isnanl does not pass the tests
-dnl - for pseudo-denormals on i686 and x86_64,
-dnl - for pseudo-zeroes, unnormalized numbers, and pseudo-denormals on ia64.
+dnl Test whether isnanl() recognizes all canonical numbers which are neither
+dnl finite nor infinite.
AC_DEFUN([gl_FUNC_ISNANL_WORKS],
[
AC_REQUIRE([AC_PROG_CC])
# ifdef WORDS_BIGENDIAN
# define LDBL80_WORDS(exponent,manthi,mantlo) \
{ ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
- ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
+ ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
(unsigned int) (mantlo) << 16 \
}
# else
if (!isnanl (x.value))
result |= 2;
}
- /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
- Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
- Intel IA-64 Architecture Software Developer's Manual, Volume 1:
- Application Architecture.
- Table 5-2 "Floating-Point Register Encodings"
- Figure 5-6 "Memory to Floating-Point Register Data Translation"
- */
+ /* isnanl should return something even for noncanonical values. */
{ /* Pseudo-NaN. */
static memory_long_double x =
{ LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
- if (!isnanl (x.value))
+ if (isnanl (x.value) && !isnanl (x.value))
result |= 4;
}
{ /* Pseudo-Infinity. */
static memory_long_double x =
{ LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
- if (!isnanl (x.value))
+ if (isnanl (x.value) && !isnanl (x.value))
result |= 8;
}
{ /* Pseudo-Zero. */
static memory_long_double x =
{ LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
- if (!isnanl (x.value))
+ if (isnanl (x.value) && !isnanl (x.value))
result |= 16;
}
{ /* Unnormalized number. */
static memory_long_double x =
{ LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
- if (!isnanl (x.value))
+ if (isnanl (x.value) && !isnanl (x.value))
result |= 32;
}
{ /* Pseudo-Denormal. */
static memory_long_double x =
{ LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
- if (!isnanl (x.value))
+ if (isnanl (x.value) && !isnanl (x.value))
result |= 64;
}
#endif
}]])],
[gl_cv_func_isnanl_works=yes],
[gl_cv_func_isnanl_works=no],
- [case "$host_cpu" in
- # Guess no on ia64, x86_64, i386.
- ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";;
- *)
- case "$host_os" in
- netbsd*) gl_cv_func_isnanl_works="guessing no";;
- *) gl_cv_func_isnanl_works="guessing yes";;
- esac
- ;;
- esac
- ])
+ [gl_cv_func_isnanl_works="guessing yes"])
])
])
# langinfo_h.m4 serial 7
-dnl Copyright (C) 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Enable large files on systems where this is not the default.
-# Copyright 1992-1996, 1998-2013 Free Software Foundation, Inc.
+# Copyright 1992-1996, 1998-2016 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.
# lcmessage.m4 serial 7 (gettext-0.18.2)
-dnl Copyright (C) 1995-2002, 2004-2005, 2008-2013 Free Software Foundation,
-dnl Inc.
+dnl Copyright (C) 1995-2002, 2004-2005, 2008-2014, 2016 Free Software
+dnl Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl
-dnl This file can can be used in projects which are not available under
+dnl This file 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 gettext package is covered by the GNU General Public License.
dnl They are *not* in the public domain.
dnl Authors:
# ldexp.m4 serial 1
-dnl Copyright (C) 2010-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# ldexpl.m4 serial 16
-dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# lib-ld.m4 serial 6
-dnl Copyright (C) 1996-2003, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 1996-2003, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# lib-link.m4 serial 26 (gettext-0.18.2)
-dnl Copyright (C) 2001-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# lib-prefix.m4 serial 7 (gettext-0.18)
-dnl Copyright (C) 2001-2005, 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2005, 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# libsigsegv.m4 serial 4
-dnl Copyright (C) 2002-2003, 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
--- /dev/null
+dnl Check whether limits.h has needed features.
+
+dnl Copyright 2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+AC_DEFUN_ONCE([gl_LIMITS_H],
+[
+ gl_CHECK_NEXT_HEADERS([limits.h])
+
+ AC_CACHE_CHECK([whether limits.h has ULLONG_WIDTH etc.],
+ [gl_cv_header_limits_width],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+ #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
+ #endif
+ #include <limits.h>
+ int ullw = ULLONG_WIDTH;]])],
+ [gl_cv_header_limits_width=yes],
+ [gl_cv_header_limits_width=no])])
+ if test "$gl_cv_header_limits_width" = yes; then
+ LIMITS_H=
+ else
+ LIMITS_H=limits.h
+ fi
+ AC_SUBST([LIMITS_H])
+ AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"])
+])
# link.m4 serial 8
-dnl Copyright (C) 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[[#include <unistd.h>
+ #include <stdio.h>
]],
[[int result = 0;
if (!link ("conftest.a", "conftest.b/"))
# localcharset.m4 serial 7
-dnl Copyright (C) 2002, 2004, 2006, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004, 2006, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# locale-fr.m4 serial 17
-dnl Copyright (C) 2003, 2005-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# locale-ja.m4 serial 12
-dnl Copyright (C) 2003, 2005-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# locale-tr.m4 serial 10
-dnl Copyright (C) 2003, 2005-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# locale-zh.m4 serial 12
-dnl Copyright (C) 2003, 2005-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# locale_h.m4 serial 19
-dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# localeconv.m4 serial 1
-dnl Copyright (C) 2012-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# localename.m4 serial 2
-dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_REQUIRE([gt_LC_MESSAGES])
AC_REQUIRE([gt_INTL_MACOSX])
AC_CHECK_FUNCS([setlocale uselocale])
+ dnl Solaris 12 provides getlocalename_l, while Illumos doesn't have
+ dnl it nor the equivalent.
+ if test $ac_cv_func_uselocale = yes; then
+ AC_CHECK_FUNCS([getlocalename_l])
+ fi
])
# lock.m4 serial 13 (gettext-0.18.2)
-dnl Copyright (C) 2005-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# longlong.m4 serial 17
-dnl Copyright (C) 1999-2007, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 1999-2007, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# lseek.m4 serial 10
-dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free 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 26
+# serial 27
-# Copyright (C) 1997-2001, 2003-2013 Free Software Foundation, Inc.
+# Copyright (C) 1997-2001, 2003-2016 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
[gl_cv_func_lstat_dereferences_slashed_symlink],
[rm -f conftest.sym conftest.file
echo >conftest.file
- if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
- [AC_INCLUDES_DEFAULT],
- [[struct stat sbuf;
- /* Linux will dereference the symlink and fail, as required by
- POSIX. That is better in the sense that it means we will not
- have to compile and use the lstat wrapper. */
- return lstat ("conftest.sym/", &sbuf) == 0;
- ]])],
- [gl_cv_func_lstat_dereferences_slashed_symlink=yes],
- [gl_cv_func_lstat_dereferences_slashed_symlink=no],
- [case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
- esac
- ])
- else
- # If the 'ln -s' command failed, then we probably don't even
- # have an lstat function.
- gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
- fi
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [AC_INCLUDES_DEFAULT],
+ [[struct stat sbuf;
+ if (symlink ("conftest.file", "conftest.sym") != 0)
+ return 1;
+ /* Linux will dereference the symlink and fail, as required by
+ POSIX. That is better in the sense that it means we will not
+ have to compile and use the lstat wrapper. */
+ return lstat ("conftest.sym/", &sbuf) == 0;
+ ]])],
+ [gl_cv_func_lstat_dereferences_slashed_symlink=yes],
+ [gl_cv_func_lstat_dereferences_slashed_symlink=no],
+ [case "$host_os" in
+ *-gnu*)
+ # Guess yes on glibc systems.
+ 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
+ ])
rm -f conftest.sym conftest.file
])
case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
-# malloc.m4 serial 14
-dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+# malloc.m4 serial 15
+dnl Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free 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
+# This is adapted with modifications from upstream Autoconf here:
+# http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c
AC_DEFUN([_AC_FUNC_MALLOC_IF],
[
AC_REQUIRE([AC_HEADER_STDC])dnl
char *malloc ();
#endif
]],
- [[return ! malloc (0);]])
+ [[char *p = malloc (0);
+ int result = !p;
+ free (p);
+ return result;]])
],
[ac_cv_func_malloc_0_nonnull=yes],
[ac_cv_func_malloc_0_nonnull=no],
# malloca.m4 serial 1
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2013 Free Software Foundation,
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2016 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,
-# manywarnings.m4 serial 5
-dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
+# manywarnings.m4 serial 8
+dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
CFLAGS="$CFLAGS -W -Werror"
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
- [[void f (void)
+ [[int f (void)
{
typedef struct { int a; int b; } s_t;
s_t s1 = { 0, };
+ return s1.b;
}
]],
[[]])],
fi
# List all gcc warning categories.
+ # To compare this list to your installed GCC's, run this Bash command:
+ #
+ # comm -3 \
+ # <(sed -n 's/^ *\(-[^ ]*\) .*/\1/p' manywarnings.m4 | sort) \
+ # <(gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort |
+ # grep -v -x -f <(
+ # awk '/^[^#]/ {print $1}' ../build-aux/gcc-warning.spec))
+
gl_manywarn_set=
for gl_manywarn_item in \
+ -fno-common \
-W \
-Wabi \
-Waddress \
-Waggressive-loop-optimizations \
-Wall \
- -Warray-bounds \
-Wattributes \
-Wbad-function-cast \
+ -Wbool-compare \
-Wbuiltin-macro-redefined \
-Wcast-align \
-Wchar-subscripts \
+ -Wchkp \
-Wclobbered \
-Wcomment \
-Wcomments \
-Wcoverage-mismatch \
-Wcpp \
+ -Wdate-time \
-Wdeprecated \
-Wdeprecated-declarations \
+ -Wdesignated-init \
-Wdisabled-optimization \
+ -Wdiscarded-array-qualifiers \
+ -Wdiscarded-qualifiers \
-Wdiv-by-zero \
-Wdouble-promotion \
+ -Wduplicated-cond \
-Wempty-body \
-Wendif-labels \
-Wenum-compare \
-Wformat-extra-args \
-Wformat-nonliteral \
-Wformat-security \
+ -Wformat-signedness \
-Wformat-y2k \
-Wformat-zero-length \
+ -Wframe-address \
-Wfree-nonheap-object \
+ -Whsa \
+ -Wignored-attributes \
-Wignored-qualifiers \
-Wimplicit \
-Wimplicit-function-declaration \
-Wimplicit-int \
+ -Wincompatible-pointer-types \
-Winit-self \
-Winline \
+ -Wint-conversion \
-Wint-to-pointer-cast \
-Winvalid-memory-model \
-Winvalid-pch \
-Wjump-misses-init \
+ -Wlogical-not-parentheses \
-Wlogical-op \
-Wmain \
-Wmaybe-uninitialized \
+ -Wmemset-transposed-args \
+ -Wmisleading-indentation \
-Wmissing-braces \
-Wmissing-declarations \
-Wmissing-field-initializers \
-Wmissing-include-dirs \
-Wmissing-parameter-type \
-Wmissing-prototypes \
- -Wmudflap \
-Wmultichar \
-Wnarrowing \
-Wnested-externs \
-Wnonnull \
- -Wnormalized=nfc \
+ -Wnonnull-compare \
+ -Wnull-dereference \
+ -Wodr \
-Wold-style-declaration \
-Wold-style-definition \
+ -Wopenmp-simd \
-Woverflow \
-Woverlength-strings \
-Woverride-init \
-Wpragmas \
-Wreturn-local-addr \
-Wreturn-type \
+ -Wscalar-storage-order \
-Wsequence-point \
-Wshadow \
+ -Wshift-count-negative \
+ -Wshift-count-overflow \
+ -Wshift-negative-value \
+ -Wsizeof-array-argument \
-Wsizeof-pointer-memaccess \
-Wstack-protector \
-Wstrict-aliasing \
-Wsuggest-attribute=format \
-Wsuggest-attribute=noreturn \
-Wsuggest-attribute=pure \
+ -Wsuggest-final-methods \
+ -Wsuggest-final-types \
-Wswitch \
+ -Wswitch-bool \
-Wswitch-default \
-Wsync-nand \
-Wsystem-headers \
+ -Wtautological-compare \
-Wtrampolines \
-Wtrigraphs \
-Wtype-limits \
gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
done
+ # gcc --help=warnings outputs an unusual form for these options; list
+ # them here so that the above 'comm' command doesn't report a false match.
+ gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2"
+ gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc"
+ gl_manywarn_set="$gl_manywarn_set -Wshift-overflow=2"
+ gl_manywarn_set="$gl_manywarn_set -Wunused-const-variable=2"
+
+ # These are needed for older GCC versions.
+ if test -n "$GCC"; then
+ case `($CC --version) 2>/dev/null` in
+ 'gcc (GCC) '[[0-3]].* | \
+ 'gcc (GCC) '4.[[0-7]].*)
+ gl_manywarn_set="$gl_manywarn_set -fdiagnostics-show-option"
+ gl_manywarn_set="$gl_manywarn_set -funit-at-a-time"
+ ;;
+ esac
+ fi
+
# Disable specific options as needed.
if test "$gl_cv_cc_nomfi_needed" = yes; then
gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
-# math_h.m4 serial 114
-dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
+# math_h.m4 serial 115
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
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_ACOSF=0; AC_SUBST([REPLACE_ACOSF])
+ REPLACE_ASINF=0; AC_SUBST([REPLACE_ASINF])
+ REPLACE_ATANF=0; AC_SUBST([REPLACE_ATANF])
+ REPLACE_ATAN2F=0; AC_SUBST([REPLACE_ATAN2F])
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_COSF=0; AC_SUBST([REPLACE_COSF])
+ REPLACE_COSHF=0; AC_SUBST([REPLACE_COSHF])
+ REPLACE_EXPF=0; AC_SUBST([REPLACE_EXPF])
REPLACE_EXPM1=0; AC_SUBST([REPLACE_EXPM1])
REPLACE_EXPM1F=0; AC_SUBST([REPLACE_EXPM1F])
REPLACE_EXP2=0; AC_SUBST([REPLACE_EXP2])
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_SINF=0; AC_SUBST([REPLACE_SINF])
+ REPLACE_SINHF=0; AC_SUBST([REPLACE_SINHF])
+ REPLACE_SQRTF=0; AC_SUBST([REPLACE_SQRTF])
REPLACE_SQRTL=0; AC_SUBST([REPLACE_SQRTL])
+ REPLACE_TANF=0; AC_SUBST([REPLACE_TANF])
+ REPLACE_TANHF=0; AC_SUBST([REPLACE_TANHF])
REPLACE_TRUNC=0; AC_SUBST([REPLACE_TRUNC])
REPLACE_TRUNCF=0; AC_SUBST([REPLACE_TRUNCF])
REPLACE_TRUNCL=0; AC_SUBST([REPLACE_TRUNCL])
-# mbrtowc.m4 serial 25
-dnl Copyright (C) 2001-2002, 2004-2005, 2008-2013 Free Software Foundation,
+# mbrtowc.m4 serial 27 -*- coding: utf-8 -*-
+dnl Copyright (C) 2001-2002, 2004-2005, 2008-2016 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,
gl_MBRTOWC_NULL_ARG2
gl_MBRTOWC_RETVAL
gl_MBRTOWC_NUL_RETVAL
+ gl_MBRTOWC_EMPTY_INPUT
+ gl_MBRTOWC_C_LOCALE
case "$gl_cv_func_mbrtowc_null_arg1" in
*yes) ;;
*) AC_DEFINE([MBRTOWC_NULL_ARG1_BUG], [1],
REPLACE_MBRTOWC=1
;;
esac
+ case "$gl_cv_func_mbrtowc_empty_input" in
+ *yes) ;;
+ *) AC_DEFINE([MBRTOWC_EMPTY_INPUT_BUG], [1],
+ [Define if the mbrtowc function does not return (size_t) -2
+ for empty input.])
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ case $gl_cv_C_locale_sans_EILSEQ in
+ *yes) ;;
+ *) AC_DEFINE([C_LOCALE_MAYBE_EILSEQ], [1],
+ [Define to 1 if the C locale may have encoding errors.])
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
fi
fi
])
memset (&state, '\0', sizeof (mbstate_t));
if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
if (mbsinit (&state))
- return 1;
+ return 2;
}
return 0;
}]])],
memset (&state, '\0', sizeof (mbstate_t));
if (mbrtowc (&wc, input + 3, 6, &state) != 4
&& mbtowc (&wc, input + 3, 6) == 4)
- return 1;
+ return 2;
}
return 0;
}]])],
mbrtowc (&wc, NULL, 5, &state);
/* Check that wc was not modified. */
if (wc != (wchar_t) 0xBADFACE)
- return 1;
+ return 2;
}
return 0;
}]])],
memset (&state, '\0', sizeof (mbstate_t));
if (mbrtowc (&wc, "", 1, &state) != 0)
- return 1;
+ return 2;
}
return 0;
}]])],
])
])
+dnl Test whether mbrtowc returns the correct value on empty input.
+
+AC_DEFUN([gl_MBRTOWC_EMPTY_INPUT],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrtowc works on empty input],
+ [gl_cv_func_mbrtowc_empty_input],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on AIX and glibc systems.
+ aix* | *-gnu*)
+ gl_cv_func_mbrtowc_empty_input="guessing no" ;;
+ *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
+ esac
+changequote([,])dnl
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+ #include <wchar.h>
+ static wchar_t wc;
+ static mbstate_t mbs;
+ int
+ main (void)
+ {
+ return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
+ }]])],
+ [gl_cv_func_mbrtowc_empty_input=yes],
+ [gl_cv_func_mbrtowc_empty_input=no],
+ [:])
+ ])
+])
+
+dnl Test whether mbrtowc reports encoding errors in the C locale.
+dnl Although POSIX was never intended to allow this, the GNU C Library
+dnl and other implementations do it. See:
+dnl https://sourceware.org/bugzilla/show_bug.cgi?id=19932
+
+AC_DEFUN([gl_MBRTOWC_C_LOCALE],
+[
+ AC_CACHE_CHECK([whether the C locale is free of encoding errors],
+ [gl_cv_C_locale_sans_EILSEQ],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+ gl_cv_C_locale_sans_EILSEQ="guessing no"
+
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <limits.h>
+ #include <locale.h>
+ #include <wchar.h>
+ ]], [[
+ int i;
+ char *locale = setlocale (LC_ALL, "C");
+ if (! locale)
+ return 2;
+ for (i = CHAR_MIN; i <= CHAR_MAX; i++)
+ {
+ char c = i;
+ wchar_t wc;
+ mbstate_t mbs = { 0, };
+ size_t ss = mbrtowc (&wc, &c, 1, &mbs);
+ if (1 < ss)
+ return 3;
+ }
+ return 0;
+ ]])],
+ [gl_cv_C_locale_sans_EILSEQ=yes],
+ [gl_cv_C_locale_sans_EILSEQ=no],
+ [:])])
+])
+
# Prerequisites of lib/mbrtowc.c.
AC_DEFUN([gl_PREREQ_MBRTOWC], [
:
# mbsinit.m4 serial 8
-dnl Copyright (C) 2008, 2010-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2010-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# mbstate_t.m4 serial 13
-dnl Copyright (C) 2000-2002, 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# mbtowc.m4 serial 2
-dnl Copyright (C) 2011-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# memchr.m4 serial 12
-dnl Copyright (C) 2002-2004, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
--- /dev/null
+# minmax.m4 serial 4
+dnl Copyright (C) 2005, 2009-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_PREREQ([2.53])
+
+AC_DEFUN([gl_MINMAX],
+[
+ AC_REQUIRE([gl_PREREQ_MINMAX])
+])
+
+# Prerequisites of lib/minmax.h.
+AC_DEFUN([gl_PREREQ_MINMAX],
+[
+ gl_MINMAX_IN_HEADER([limits.h])
+ gl_MINMAX_IN_HEADER([sys/param.h])
+])
+
+dnl gl_MINMAX_IN_HEADER(HEADER)
+dnl The parameter has to be a literal header name; it cannot be macro,
+dnl nor a shell variable. (Because autoheader collects only AC_DEFINE
+dnl invocations with a literal macro name.)
+AC_DEFUN([gl_MINMAX_IN_HEADER],
+[
+ m4_pushdef([header], AS_TR_SH([$1]))
+ m4_pushdef([HEADER], AS_TR_CPP([$1]))
+ AC_CACHE_CHECK([whether <$1> defines MIN and MAX],
+ [gl_cv_minmax_in_]header,
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <$1>
+ int x = MIN (42, 17);]],
+ [[]])],
+ [gl_cv_minmax_in_]header[=yes],
+ [gl_cv_minmax_in_]header[=no])])
+ if test $gl_cv_minmax_in_[]header = yes; then
+ AC_DEFINE([HAVE_MINMAX_IN_]HEADER, 1,
+ [Define to 1 if <$1> defines the MIN and MAX macros.])
+ fi
+ m4_popdef([HEADER])
+ m4_popdef([header])
+])
# mkdtemp.m4 serial 8
-dnl Copyright (C) 2001-2003, 2006-2007, 2009-2013 Free Software Foundation,
+dnl Copyright (C) 2001-2003, 2006-2007, 2009-2016 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,
#serial 23
-# Copyright (C) 2001, 2003-2007, 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003-2007, 2009-2016 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.
# mmap-anon.m4 serial 10
-dnl Copyright (C) 2005, 2007, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# mode_t.m4 serial 2
-dnl Copyright (C) 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# msvc-inval.m4 serial 1
-dnl Copyright (C) 2011-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# msvc-nothrow.m4 serial 1
-dnl Copyright (C) 2011-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# multiarch.m4 serial 7
-dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# nl_langinfo.m4 serial 5
-dnl Copyright (C) 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# nocrash.m4 serial 4
-dnl Copyright (C) 2005, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
#else
/* Avoid a crash on POSIX systems. */
#include <signal.h>
+#include <unistd.h>
/* A POSIX signal handler. */
static void
exception_handler (int sig)
{
- exit (1);
+ _exit (1);
}
static void
nocrash_init (void)
--- /dev/null
+# See if we need to provide obstacks.
+
+dnl Copyright 1996-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This replaces Autoconf's AC_FUNC_OBSTACK.
+dnl The Autoconf version should be marked obsolete at some point.
+
+AC_DEFUN([AC_FUNC_OBSTACK],
+ [AC_LIBSOURCES([obstack.h, obstack.c])dnl
+ AC_CACHE_CHECK([for obstacks that work with any size object],
+ [ac_cv_func_obstack],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include "obstack.h"
+ void *obstack_chunk_alloc (size_t n) { return 0; }
+ void obstack_chunk_free (void *p) { }
+ /* Check that an internal function returns size_t, not int. */
+ size_t _obstack_memory_used (struct obstack *);
+ ]],
+ [[struct obstack mem;
+ obstack_init (&mem);
+ obstack_free (&mem, 0);
+ ]])],
+ [ac_cv_func_obstack=yes],
+ [ac_cv_func_obstack=no])])
+ if test "$ac_cv_func_obstack" = yes; then
+ AC_DEFINE([HAVE_OBSTACK], 1,
+ [Define to 1 if the system has obstacks that work with any size object.])
+ else
+ AC_LIBOBJ([obstack])
+ fi
+])
# off_t.m4 serial 1
-dnl Copyright (C) 2012-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# open.m4 serial 14
-dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# opendir.m4 serial 2
-dnl Copyright (C) 2011-2013 Free Software Foundation, Inc.
+# opendir.m4 serial 4
+dnl Copyright (C) 2011-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
fi
fi
])
+ dnl Replace opendir() on OS/2 kLIBC to support dirfd() function replaced
+ dnl by gnulib.
+ case $host_os,$HAVE_OPENDIR in
+ os2*,1)
+ REPLACE_OPENDIR=1;;
+ esac
])
# pathmax.m4 serial 10
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2013 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2016 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,
# pipe2.m4 serial 2
-dnl Copyright (C) 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# posix_spawn.m4 serial 11
-dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# printf-frexp.m4 serial 5
-dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# printf-frexpl.m4 serial 10
-dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# printf.m4 serial 50
-dnl Copyright (C) 2003, 2007-2013 Free Software Foundation, Inc.
+# printf.m4 serial 52
+dnl Copyright (C) 2003, 2007-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
|| strcmp (buf, "12345671 33") != 0)
result |= 1;
+#else
+ result |= 1;
#endif
buf[0] = '\0';
if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";;
# Guess yes on FreeBSD >= 5.
- freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";;
+ freebsd[1-4].*) gl_cv_func_printf_sizes_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
# Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";;
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_printf_infinite="guessing yes";;
# Guess yes on FreeBSD >= 6.
- freebsd[1-5]*) gl_cv_func_printf_infinite="guessing no";;
+ freebsd[1-5].*) gl_cv_func_printf_infinite="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
# Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";;
# ifdef WORDS_BIGENDIAN
# define LDBL80_WORDS(exponent,manthi,mantlo) \
{ ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
- ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
+ ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
(unsigned int) (mantlo) << 16 \
}
# else
{ /* Pseudo-NaN. */
static union { unsigned int word[4]; long double value; } x =
{ LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
- if (sprintf (buf, "%Lf", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Lf", x.value) <= 0)
result |= 4;
- if (sprintf (buf, "%Le", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Le", x.value) <= 0)
result |= 4;
- if (sprintf (buf, "%Lg", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Lg", x.value) <= 0)
result |= 4;
}
{ /* Pseudo-Infinity. */
static union { unsigned int word[4]; long double value; } x =
{ LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
- if (sprintf (buf, "%Lf", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Lf", x.value) <= 0)
result |= 8;
- if (sprintf (buf, "%Le", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Le", x.value) <= 0)
result |= 8;
- if (sprintf (buf, "%Lg", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Lg", x.value) <= 0)
result |= 8;
}
{ /* Pseudo-Zero. */
static union { unsigned int word[4]; long double value; } x =
{ LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
- if (sprintf (buf, "%Lf", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Lf", x.value) <= 0)
result |= 16;
- if (sprintf (buf, "%Le", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Le", x.value) <= 0)
result |= 16;
- if (sprintf (buf, "%Lg", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Lg", x.value) <= 0)
result |= 16;
}
{ /* Unnormalized number. */
static union { unsigned int word[4]; long double value; } x =
{ LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
- if (sprintf (buf, "%Lf", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Lf", x.value) <= 0)
result |= 32;
- if (sprintf (buf, "%Le", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Le", x.value) <= 0)
result |= 32;
- if (sprintf (buf, "%Lg", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Lg", x.value) <= 0)
result |= 32;
}
{ /* Pseudo-Denormal. */
static union { unsigned int word[4]; long double value; } x =
{ LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
- if (sprintf (buf, "%Lf", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Lf", x.value) <= 0)
result |= 64;
- if (sprintf (buf, "%Le", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Le", x.value) <= 0)
result |= 64;
- if (sprintf (buf, "%Lg", x.value) < 0
- || !strisnan (buf, 0, strlen (buf)))
+ if (sprintf (buf, "%Lg", x.value) <= 0)
result |= 64;
}
#endif
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";;
# Guess yes on FreeBSD >= 6.
- freebsd[1-5]*) gl_cv_func_printf_infinite_long_double="guessing no";;
+ freebsd[1-5].*) gl_cv_func_printf_infinite_long_double="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
# Guess yes on HP-UX >= 11.
hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_printf_directive_f="guessing yes";;
# Guess yes on FreeBSD >= 6.
- freebsd[1-5]*) gl_cv_func_printf_directive_f="guessing no";;
+ freebsd[1-5].*) gl_cv_func_printf_directive_f="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
# Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";;
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
# Guess yes on FreeBSD >= 5.
- freebsd[1-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ freebsd[1-4].*) gl_cv_func_snprintf_truncation_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
# Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";;
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
# Guess yes on FreeBSD >= 5.
- freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";;
+ freebsd[1-4].*) gl_cv_func_snprintf_retval_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
# Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_snprintf_directive_n="guessing yes";;
# Guess yes on FreeBSD >= 5.
- freebsd[1-4]*) gl_cv_func_snprintf_directive_n="guessing no";;
+ freebsd[1-4].*) gl_cv_func_snprintf_directive_n="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
# Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_snprintf_directive_n="guessing no";;
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
# Guess yes on FreeBSD >= 5.
- freebsd[1-4]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ freebsd[1-4].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
# Guess yes on Mac OS X >= 10.3.
darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
# putenv.m4 serial 20
-dnl Copyright (C) 2002-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# quotearg.m4 serial 9
-dnl Copyright (C) 2002, 2004-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# raise.m4 serial 3
-dnl Copyright (C) 2011-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# rawmemchr.m4 serial 2
-dnl Copyright (C) 2003, 2007-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# readdir.m4 serial 1
-dnl Copyright (C) 2011-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# readlink.m4 serial 12
-dnl Copyright (C) 2003, 2007, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free 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 64
+# serial 66
-# Copyright (C) 1996-2001, 2003-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2001, 2003-2016 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# If cross compiling, assume the test would fail and use the included
# regex.c.
AC_CHECK_DECLS_ONCE([alarm])
+ AC_CHECK_HEADERS_ONCE([malloc.h])
AC_CACHE_CHECK([for working re_compile_pattern],
[gl_cv_func_re_compile_pattern_working],
[AC_RUN_IFELSE(
#include <locale.h>
#include <limits.h>
#include <string.h>
- #if HAVE_DECL_ALARM
- # include <unistd.h>
+
+ #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
# include <signal.h>
+ # include <unistd.h>
+ #endif
+
+ #if HAVE_MALLOC_H
+ # include <malloc.h>
+ #endif
+
+ #ifdef M_CHECK_ACTION
+ /* Exit with distinguishable exit code. */
+ static void sigabrt_no_core (int sig) { raise (SIGTERM); }
#endif
]],
[[int result = 0;
const char *s;
struct re_registers regs;
+ /* Some builds of glibc go into an infinite loop on this
+ test. Use alarm to force death, and mallopt to avoid
+ malloc recursion in diagnosing the corrupted heap. */
#if HAVE_DECL_ALARM
- /* Some builds of glibc go into an infinite loop on this test. */
signal (SIGALRM, SIG_DFL);
alarm (2);
#endif
+#ifdef M_CHECK_ACTION
+ signal (SIGABRT, sigabrt_no_core);
+ mallopt (M_CHECK_ACTION, 2);
+#endif
+
if (setlocale (LC_ALL, "en_US.UTF-8"))
{
{
0, sizeof data - 1, ®s)
!= -1)
result |= 1;
+ regfree (®ex);
}
{
if (i != 0 && i != 21)
result |= 1;
}
+ regfree (®ex);
}
if (! setlocale (LC_ALL, "C"))
AC_REQUIRE([gl_EEMALLOC])
AC_REQUIRE([gl_GLIBC21])
AC_CHECK_HEADERS([libintl.h])
- AC_CHECK_FUNCS_ONCE([isblank iswctype wcscoll])
+ AC_CHECK_FUNCS_ONCE([isblank iswctype])
AC_CHECK_DECLS([isblank], [], [], [[#include <ctype.h>]])
])
# serial 26
-# Copyright (C) 2001, 2003, 2005-2006, 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005-2006, 2009-2016 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.
# rmdir.m4 serial 13
-dnl Copyright (C) 2002, 2005, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# sched_h.m4 serial 6
-dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
+# sched_h.m4 serial 9
+dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_SCHED_H],
[
+ AC_CHECK_HEADERS_ONCE([sys/cdefs.h])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[
#include <sched.h>
]])],
[SCHED_H=''],
[SCHED_H='sched.h'
+ AC_CHECK_HEADERS([sched.h], [], [],
+ [[#if HAVE_SYS_CDEFS_H
+ #include <sys/cdefs.h>
+ #endif
+ ]])
+ gl_NEXT_HEADERS([sched.h])
- gl_CHECK_NEXT_HEADERS([sched.h])
-
- if test $ac_cv_header_sched_h = yes; then
+ if test "$ac_cv_header_sched_h" = yes; then
HAVE_SCHED_H=1
else
HAVE_SCHED_H=0
fi
AC_SUBST([HAVE_SCHED_H])
- AC_CHECK_TYPE([struct sched_param],
- [HAVE_STRUCT_SCHED_PARAM=1], [HAVE_STRUCT_SCHED_PARAM=0],
- [#include <sched.h>])
+ if test "$HAVE_SCHED_H" = 1; then
+ AC_CHECK_TYPE([struct sched_param],
+ [HAVE_STRUCT_SCHED_PARAM=1], [HAVE_STRUCT_SCHED_PARAM=0],
+ [[#if HAVE_SYS_CDEFS_H
+ #include <sys/cdefs.h>
+ #endif
+ #include <sched.h>
+ ]])
+ else
+ dnl On OS/2 kLIBC, struct sched_param is in spawn.h.
+ AC_CHECK_TYPE([struct sched_param],
+ [HAVE_STRUCT_SCHED_PARAM=1], [HAVE_STRUCT_SCHED_PARAM=0],
+ [#include <spawn.h>])
+ fi
AC_SUBST([HAVE_STRUCT_SCHED_PARAM])
+ if test "$ac_cv_header_sys_cdefs_h" = yes; then
+ HAVE_SYS_CDEFS_H=1
+ else
+ HAVE_SYS_CDEFS_H=0
+ fi
+ AC_SUBST([HAVE_SYS_CDEFS_H])
+
dnl Ensure the type pid_t gets defined.
AC_REQUIRE([AC_TYPE_PID_T])
])
# Look up an environment variable more securely.
-dnl Copyright 2013 Free Software Foundation, Inc.
+dnl Copyright 2013-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
if test $ac_cv_func___secure_getenv = no; then
AC_CHECK_FUNCS([issetugid])
fi
+ AC_CHECK_FUNCS_ONCE([getuid geteuid getgid getegid])
])
# setenv.m4 serial 26
-dnl Copyright (C) 2001-2004, 2006-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2004, 2006-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# setlocale.m4 serial 4
-dnl Copyright (C) 2011-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# sig_atomic_t.m4 serial 3
-dnl Copyright (C) 2003, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# sigaction.m4 serial 7
-dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# signal_h.m4 serial 18
-dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# signalblocking.m4 serial 14
-dnl Copyright (C) 2001-2002, 2006-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2002, 2006-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# signbit.m4 serial 13
-dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# sigpipe.m4 serial 2
-dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# size_max.m4 serial 10
-dnl Copyright (C) 2003, 2005-2006, 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2006, 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# sleep.m4 serial 7
-dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# snprintf.m4 serial 6
-dnl Copyright (C) 2002-2004, 2007-2013 Free Software Foundation, Inc.
+# snprintf.m4 serial 7
+dnl Copyright (C) 2002-2004, 2007-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_LIBOBJ([snprintf])
if test $ac_cv_func_snprintf = yes; then
REPLACE_SNPRINTF=1
+ else
+ AC_CHECK_DECLS_ONCE([snprintf])
+ if test $ac_cv_have_decl_snprintf = yes; then
+ dnl If the function is declared but does not appear to exist, it may be
+ dnl defined as an inline function. In order to avoid a conflict, we have
+ dnl to define rpl_snprintf, not snprintf.
+ REPLACE_SNPRINTF=1
+ fi
fi
gl_PREREQ_SNPRINTF
])
# spawn-pipe.m4 serial 2
-dnl Copyright (C) 2004, 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# spawn_h.m4 serial 16
-dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free 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 once only, before all statements that occur in other macros.
AC_REQUIRE([gl_SPAWN_H_DEFAULTS])
- AC_CHECK_FUNCS_ONCE([posix_spawn])
+ LIB_POSIX_SPAWN=
+ AC_SUBST([LIB_POSIX_SPAWN])
+ gl_saved_libs=$LIBS
+ AC_SEARCH_LIBS([posix_spawn], [rt],
+ [test "$ac_cv_search_posix_spawn" = "none required" ||
+ LIB_POSIX_SPAWN=$ac_cv_search_posix_spawn])
+ AC_CHECK_FUNCS([posix_spawn])
+ LIBS=$gl_saved_libs
+
if test $ac_cv_func_posix_spawn != yes; then
HAVE_POSIX_SPAWN=0
fi
# ssize_t.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2001-2003, 2006, 2010-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2003, 2006, 2010-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free 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 11
-# Copyright (C) 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2009-2016 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
--- /dev/null
+# Check for stdalign.h that conforms to C11.
+
+dnl Copyright 2011-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Prepare for substituting <stdalign.h> if it is not supported.
+
+AC_DEFUN([gl_STDALIGN_H],
+[
+ AC_CACHE_CHECK([for working stdalign.h],
+ [gl_cv_header_working_stdalign_h],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdalign.h>
+ #include <stddef.h>
+
+ /* Test that alignof yields a result consistent with offsetof.
+ This catches GCC bug 52023
+ <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
+ #ifdef __cplusplus
+ template <class t> struct alignof_helper { char a; t b; };
+ # define ao(type) offsetof (alignof_helper<type>, b)
+ #else
+ # define ao(type) offsetof (struct { char a; type b; }, b)
+ #endif
+ char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
+ char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
+ char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
+
+ /* Test _Alignas only on platforms where gnulib can help. */
+ #if \
+ ((defined __cplusplus && 201103 <= __cplusplus) \
+ || (defined __APPLE__ && defined __MACH__ \
+ ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
+ : __GNUC__) \
+ || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \
+ || __ICC || 0x5110 <= __SUNPRO_C \
+ || 1300 <= _MSC_VER)
+ struct alignas_test { char c; char alignas (8) alignas_8; };
+ char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
+ ? 1 : -1];
+ #endif
+ ]])],
+ [gl_cv_header_working_stdalign_h=yes],
+ [gl_cv_header_working_stdalign_h=no])])
+
+ if test $gl_cv_header_working_stdalign_h = yes; then
+ STDALIGN_H=''
+ else
+ STDALIGN_H='stdalign.h'
+ fi
+
+ AC_SUBST([STDALIGN_H])
+ AM_CONDITIONAL([GL_GENERATE_STDALIGN_H], [test -n "$STDALIGN_H"])
+])
# stdarg.m4 serial 6
-dnl Copyright (C) 2006, 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Check for stdbool.h that conforms to C99.
-dnl Copyright (C) 2002-2006, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-#serial 5
+#serial 7
# Prepare for substituting <stdbool.h> if it is not supported.
[AC_LANG_PROGRAM(
[[
#include <stdbool.h>
- #ifndef bool
- "error: bool is not defined"
- #endif
- #ifndef false
- "error: false is not defined"
- #endif
- #if false
- "error: false is not 0"
- #endif
- #ifndef true
- "error: true is not defined"
- #endif
- #if true != 1
- "error: true is not 1"
+
+ #ifdef __cplusplus
+ typedef bool Bool;
+ #else
+ typedef _Bool Bool;
+ #ifndef bool
+ "error: bool is not defined"
+ #endif
+ #ifndef false
+ "error: false is not defined"
+ #endif
+ #if false
+ "error: false is not 0"
+ #endif
+ #ifndef true
+ "error: true is not defined"
+ #endif
+ #if true != 1
+ "error: true is not 1"
+ #endif
#endif
+
#ifndef __bool_true_false_are_defined
"error: __bool_true_false_are_defined is not defined"
#endif
- struct s { _Bool s: 1; _Bool t; } s;
+ struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
char a[true == 1 ? 1 : -1];
char b[false == 0 ? 1 : -1];
char c[__bool_true_false_are_defined == 1 ? 1 : -1];
char d[(bool) 0.5 == true ? 1 : -1];
/* See body of main program for 'e'. */
- char f[(_Bool) 0.0 == false ? 1 : -1];
+ char f[(Bool) 0.0 == false ? 1 : -1];
char g[true];
- char h[sizeof (_Bool)];
+ char h[sizeof (Bool)];
char i[sizeof s.t];
enum { j = false, k = true, l = false * true, m = true * 256 };
/* The following fails for
HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
- _Bool n[m];
+ Bool n[m];
char o[sizeof n == m * sizeof n[0] ? 1 : -1];
- char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+ char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
/* Catch a bug in an HP-UX C compiler. See
http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
*/
- _Bool q = true;
- _Bool *pq = &q;
+ Bool q = true;
+ Bool *pq = &q;
+ bool *qq = &q;
]],
[[
bool e = &s;
- *pq |= q;
- *pq |= ! q;
+ *pq |= q; *pq |= ! q;
+ *qq |= q; *qq |= ! q;
/* Refer to every declared value, to avoid compiler optimizations. */
return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
- + !m + !n + !o + !p + !q + !pq);
+ + !m + !n + !o + !p + !q + !pq + !qq);
]])],
[ac_cv_header_stdbool_h=yes],
[ac_cv_header_stdbool_h=no])])
-dnl A placeholder for POSIX 2008 <stddef.h>, for platforms that have issues.
-# stddef_h.m4 serial 4
-dnl Copyright (C) 2009-2013 Free Software Foundation, Inc.
+dnl A placeholder for <stddef.h>, for platforms that have issues.
+# stddef_h.m4 serial 5
+dnl Copyright (C) 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
AC_REQUIRE([gt_TYPE_WCHAR_T])
STDDEF_H=
+ AC_CHECK_TYPE([max_align_t], [], [HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h],
+ [[#include <stddef.h>
+ ]])
if test $gt_cv_c_wchar_t = no; then
HAVE_WCHAR_T=0
STDDEF_H=stddef.h
[
dnl Assume proper GNU behavior unless another module says otherwise.
REPLACE_NULL=0; AC_SUBST([REPLACE_NULL])
+ HAVE_MAX_ALIGN_T=1; AC_SUBST([HAVE_MAX_ALIGN_T])
HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T])
])
-# stdint.m4 serial 43
-dnl Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# stdint.m4 serial 50
+dnl Copyright (C) 2001-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
[
AC_PREREQ([2.59])dnl
+ AC_REQUIRE([gl_LIMITS_H])
+ AC_REQUIRE([gt_TYPE_WINT_T])
+
dnl Check for long long int and unsigned long long int.
AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
if test $ac_cv_type_long_long_int = yes; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#define __STDC_CONSTANT_MACROS 1
+#define __STDC_LIMIT_MACROS 1
#include <stdint.h>
/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
#if !(defined WCHAR_MIN && defined WCHAR_MAX)
intmax_t i = INTMAX_MAX;
uintmax_t j = UINTMAX_MAX;
+/* Check that SIZE_MAX has the correct type, if possible. */
+#if 201112 <= __STDC_VERSION__
+int k = _Generic (SIZE_MAX, size_t: 0);
+#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
+ || (0x5110 <= __SUNPRO_C && !__STDC__))
+extern size_t k;
+extern __typeof__ (SIZE_MAX) k;
+#endif
+
#include <limits.h> /* for CHAR_BIT */
#define TYPE_MINIMUM(t) \
((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
AC_RUN_IFELSE([
AC_LANG_PROGRAM([[
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#define __STDC_CONSTANT_MACROS 1
+#define __STDC_LIMIT_MACROS 1
#include <stdint.h>
]
gl_STDINT_INCLUDES
])
])
fi
+
+ HAVE_C99_STDINT_H=0
+ HAVE_SYS_BITYPES_H=0
+ HAVE_SYS_INTTYPES_H=0
+ STDINT_H=stdint.h
if test "$gl_cv_header_working_stdint_h" = yes; then
- STDINT_H=
+ HAVE_C99_STDINT_H=1
+ dnl Now see whether the system <stdint.h> works without
+ dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined.
+ AC_CACHE_CHECK([whether stdint.h predates C++11],
+ [gl_cv_header_stdint_predates_cxx11_h],
+ [gl_cv_header_stdint_predates_cxx11_h=yes
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+]
+gl_STDINT_INCLUDES
+[
+intmax_t im = INTMAX_MAX;
+int32_t i32 = INT32_C (0x7fffffff);
+ ]])],
+ [gl_cv_header_stdint_predates_cxx11_h=no])])
+
+ if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
+ AC_DEFINE([__STDC_CONSTANT_MACROS], [1],
+ [Define to 1 if the system <stdint.h> predates C++11.])
+ AC_DEFINE([__STDC_LIMIT_MACROS], [1],
+ [Define to 1 if the system <stdint.h> predates C++11.])
+ fi
+ AC_CACHE_CHECK([whether stdint.h has UINTMAX_WIDTH etc.],
+ [gl_cv_header_stdint_width],
+ [gl_cv_header_stdint_width=no
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ /* Work if build is not clean. */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
+ #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+ #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
+ #endif
+ #include <stdint.h>
+ ]gl_STDINT_INCLUDES[
+ int iw = UINTMAX_WIDTH;
+ ]])],
+ [gl_cv_header_stdint_width=yes])])
+ if test "$gl_cv_header_stdint_width" = yes; then
+ STDINT_H=
+ fi
else
dnl Check for <sys/inttypes.h>, and for
dnl <sys/bitypes.h> (used in Linux libc4 >= 4.6.7 and libc5).
AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h])
if test $ac_cv_header_sys_inttypes_h = yes; then
HAVE_SYS_INTTYPES_H=1
- else
- HAVE_SYS_INTTYPES_H=0
fi
- AC_SUBST([HAVE_SYS_INTTYPES_H])
if test $ac_cv_header_sys_bitypes_h = yes; then
HAVE_SYS_BITYPES_H=1
- else
- HAVE_SYS_BITYPES_H=0
fi
- AC_SUBST([HAVE_SYS_BITYPES_H])
-
gl_STDINT_TYPE_PROPERTIES
- STDINT_H=stdint.h
fi
+
+ dnl The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
+ LIMITS_H=limits.h
+ AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"])
+
+ AC_SUBST([HAVE_C99_STDINT_H])
+ AC_SUBST([HAVE_SYS_BITYPES_H])
+ AC_SUBST([HAVE_SYS_INTTYPES_H])
AC_SUBST([STDINT_H])
AM_CONDITIONAL([GL_GENERATE_STDINT_H], [test -n "$STDINT_H"])
])
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
+ if test $GNULIB_OVERRIDES_WINT_T = 1; then
BITSIZEOF_WINT_T=32
fi
])
m4_ifdef([AC_COMPUTE_INT], [], [
AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])])
])
-
-# Hey Emacs!
-# Local Variables:
-# indent-tabs-mode: nil
-# End:
# stdint_h.m4 serial 9
-dnl Copyright (C) 1997-2004, 2006, 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006, 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# stdio_h.m4 serial 43
-dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
+# stdio_h.m4 serial 48
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_STDIO_H],
[
+ AH_VERBATIM([MINGW_ANSI_STDIO],
+[/* Use GNU style printf and scanf. */
+#ifndef __USE_MINGW_ANSI_STDIO
+# undef __USE_MINGW_ANSI_STDIO
+#endif
+])
+ AC_DEFINE([__USE_MINGW_ANSI_STDIO])
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
gl_NEXT_HEADERS([stdio.h])
+ dnl Determine whether __USE_MINGW_ANSI_STDIO makes printf and
+ dnl inttypes.h behave like gnu instead of system; we must give our
+ dnl printf wrapper the right attribute to match.
+ AC_CACHE_CHECK([which flavor of printf attribute matches inttypes macros],
+ [gl_cv_func_printf_attribute_flavor],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #define __STDC_FORMAT_MACROS 1
+ #include <stdio.h>
+ #include <inttypes.h>
+ /* For non-mingw systems, compilation will trivially succeed.
+ For mingw, compilation will succeed for older mingw (system
+ printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
+ #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
+ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+ extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
+ #endif
+ ]])], [gl_cv_func_printf_attribute_flavor=system],
+ [gl_cv_func_printf_attribute_flavor=gnu])])
+ if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
+ AC_DEFINE([GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU], [1],
+ [Define to 1 if printf and friends should be labeled with
+ attribute "__gnu_printf__" instead of "__printf__"])
+ fi
+
dnl No need to create extra modules for these functions. Everyone who uses
dnl <stdio.h> likely needs them.
GNULIB_FSCANF=1
-# stdlib_h.m4 serial 42
-dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
+# stdlib_h.m4 serial 43
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
#endif
]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt
initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps
- posix_openpt ptsname ptsname_r random random_r realpath rpmatch
+ posix_openpt ptsname ptsname_r qsort_r random random_r realpath rpmatch
secure_getenv setenv setstate setstate_r srandom srandom_r
strtod strtoll strtoull unlockpt unsetenv])
])
GNULIB_PTSNAME=0; AC_SUBST([GNULIB_PTSNAME])
GNULIB_PTSNAME_R=0; AC_SUBST([GNULIB_PTSNAME_R])
GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV])
+ GNULIB_QSORT_R=0; AC_SUBST([GNULIB_QSORT_R])
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])
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_QSORT_R=1; AC_SUBST([HAVE_QSORT_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])
REPLACE_PTSNAME=0; AC_SUBST([REPLACE_PTSNAME])
REPLACE_PTSNAME_R=0; AC_SUBST([REPLACE_PTSNAME_R])
REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV])
+ REPLACE_QSORT_R=0; AC_SUBST([REPLACE_QSORT_R])
REPLACE_RANDOM_R=0; AC_SUBST([REPLACE_RANDOM_R])
REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC])
REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH])
# strchrnul.m4 serial 9
-dnl Copyright (C) 2003, 2007, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# strdup.m4 serial 13
-dnl Copyright (C) 2002-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
# strerror.m4 serial 17
-dnl Copyright (C) 2002, 2007-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2007-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Configure a GNU-like replacement for <string.h>.
-# Copyright (C) 2007-2013 Free Software Foundation, Inc.
+# Copyright (C) 2007-2016 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.
-# strndup.m4 serial 21
-dnl Copyright (C) 2002-2003, 2005-2013 Free Software Foundation, Inc.
+# strndup.m4 serial 22
+dnl Copyright (C) 2002-2003, 2005-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
#endif
char *strndup (const char *, size_t);
#endif
+ int result;
char *s;
s = strndup ("some longer string", 15);
free (s);
s = strndup ("shorter string", 13);
- return s[13] != '\0';]])],
+ result = s[13] != '\0';
+ free (s);
+ return result;]])],
[gl_cv_func_strndup_works=yes],
[gl_cv_func_strndup_works=no],
[
# strnlen.m4 serial 13
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2013 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2016 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,
# strsignal.m4 serial 8
-dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# strstr.m4 serial 16
-dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
+# strstr.m4 serial 17
+dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_CACHE_CHECK([whether strstr works in linear time],
[gl_cv_func_strstr_linear],
[AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#ifdef __MVS__
+/* z/OS does not deliver signals while strstr() is running (thanks to
+ restrictions on its LE runtime), which prevents us from limiting the
+ running time of this test. */
+# error "This test does not work properly on z/OS"
+#endif
#include <signal.h> /* for signal */
#include <string.h> /* for strstr */
#include <stdlib.h> /* for malloc */
#include <unistd.h> /* for alarm */
-static void quit (int sig) { exit (sig + 128); }
+static void quit (int sig) { _exit (sig + 128); }
]], [[
int result = 0;
size_t m = 1000000;
# strtod.m4 serial 22
-dnl Copyright (C) 2002-2003, 2006-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2006-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free 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 6
# See if we need to provide symlink replacement.
-dnl Copyright (C) 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# sys_socket_h.m4 serial 23
-dnl Copyright (C) 2005-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# sys_stat_h.m4 serial 28 -*- Autoconf -*-
-dnl Copyright (C) 2006-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Configure a replacement for <sys/time.h>.
# serial 8
-# Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009-2016 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.
HAVE_GETTIMEOFDAY=1; AC_SUBST([HAVE_GETTIMEOFDAY])
HAVE_STRUCT_TIMEVAL=1; AC_SUBST([HAVE_STRUCT_TIMEVAL])
HAVE_SYS_TIME_H=1; AC_SUBST([HAVE_SYS_TIME_H])
+ HAVE_TIMEZONE_T=0; AC_SUBST([HAVE_TIMEZONE_T])
REPLACE_GETTIMEOFDAY=0; AC_SUBST([REPLACE_GETTIMEOFDAY])
REPLACE_STRUCT_TIMEVAL=0; AC_SUBST([REPLACE_STRUCT_TIMEVAL])
])
-# sys_types_h.m4 serial 5
-dnl Copyright (C) 2011-2013 Free Software Foundation, Inc.
+# sys_types_h.m4 serial 6
+dnl Copyright (C) 2011-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS],
[
])
+
+# This works around a buggy version in autoconf <= 2.69.
+# See <https://lists.gnu.org/archive/html/autoconf/2016-08/msg00014.html>
+
+m4_version_prereq([2.70], [], [
+
+# This is taken from the following Autoconf patch:
+# http://git.sv.gnu.org/cgit/autoconf.git/commit/?id=e17a30e98
+
+m4_undefine([AC_HEADER_MAJOR])
+AC_DEFUN([AC_HEADER_MAJOR],
+[AC_CHECK_HEADERS_ONCE([sys/types.h])
+AC_CHECK_HEADER([sys/mkdev.h],
+ [AC_DEFINE([MAJOR_IN_MKDEV], [1],
+ [Define to 1 if `major', `minor', and `makedev' are declared in
+ <mkdev.h>.])])
+if test $ac_cv_header_sys_mkdev_h = no; then
+ AC_CHECK_HEADER([sys/sysmacros.h],
+ [AC_DEFINE([MAJOR_IN_SYSMACROS], [1],
+ [Define to 1 if `major', `minor', and `makedev' are declared in
+ <sysmacros.h>.])])
+fi
+])
+
+])
# sys_wait_h.m4 serial 6
-dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
#serial 5
-# Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2006-2007, 2009-2016 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.
-# threadlib.m4 serial 10 (gettext-0.18.2)
-dnl Copyright (C) 2005-2013 Free Software Foundation, Inc.
+# threadlib.m4 serial 12
+dnl Copyright (C) 2005-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free 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 Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for
dnl programs that really need multithread functionality. The difference
dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak
-dnl symbols, typically LIBTHREAD="" whereas LIBMULTITHREAD="-lpthread".
+dnl symbols, typically LIBTHREAD is empty whereas LIBMULTITHREAD is not.
dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
dnl multithread-safe programs.
# Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
# in libc. IRIX 6.5 has the first one in both libc and libpthread, but
# the second one only in libpthread, and lock.c needs it.
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <pthread.h>]],
- [[pthread_mutex_lock((pthread_mutex_t*)0);
- pthread_mutexattr_init((pthread_mutexattr_t*)0);]])],
- [gl_have_pthread=yes])
+ #
+ # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
+ # needs -pthread for some reason. See:
+ # http://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00023.html
+ save_LIBS=$LIBS
+ for gl_pthread in '' '-pthread'; do
+ LIBS="$LIBS $gl_pthread"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <pthread.h>
+ pthread_mutex_t m;
+ pthread_mutexattr_t ma;
+ ]],
+ [[pthread_mutex_lock (&m);
+ pthread_mutexattr_init (&ma);]])],
+ [gl_have_pthread=yes
+ LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread
+ LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread])
+ LIBS=$save_LIBS
+ test -n "$gl_have_pthread" && break
+ done
+
# Test for libpthread by looking for pthread_kill. (Not pthread_self,
# since it is defined as a macro on OSF/1.)
- if test -n "$gl_have_pthread"; then
+ if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then
# The program links fine without libpthread. But it may actually
# need to link with libpthread in order to create multiple threads.
AC_CHECK_LIB([pthread], [pthread_kill],
# Therefore pthread_in_use() needs to actually try to create a
# thread: pthread_create from libc will fail, whereas
# pthread_create will actually create a thread.
+ # On Solaris 10 or newer, this test is no longer needed, because
+ # libc contains the fully functional pthread functions.
case "$host_os" in
- solaris* | hpux*)
+ solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*)
AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1],
[Define if the pthread_in_use() detection is hard.])
esac
])
- else
+ elif test -z "$gl_have_pthread"; then
# Some library is needed. Try libpthread and libc_r.
AC_CHECK_LIB([pthread], [pthread_kill],
[gl_have_pthread=yes
dnl
dnl GNU Hurd/glibc posix
dnl
+dnl Ubuntu 14.04 posix -pthread Y OK
+dnl
dnl FreeBSD 5.3 posix -lc_r Y
dnl posix -lkse ? Y
dnl posix -lpthread ? Y
# Configure a more-standard replacement for <time.h>.
-# Copyright (C) 2000-2001, 2003-2007, 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2016 Free Software Foundation, Inc.
-# serial 7
+# serial 9
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
])
dnl Check whether 'struct timespec' is declared
-dnl in time.h, sys/time.h, or pthread.h.
+dnl in time.h, sys/time.h, pthread.h, or unistd.h.
AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
[
TIME_H_DEFINES_STRUCT_TIMESPEC=0
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
+ UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
TIME_H_DEFINES_STRUCT_TIMESPEC=1
else
[gl_cv_sys_struct_timespec_in_pthread_h=no])])
if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
+ else
+ AC_CACHE_CHECK([for struct timespec in <unistd.h>],
+ [gl_cv_sys_struct_timespec_in_unistd_h],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <unistd.h>
+ ]],
+ [[static struct timespec x; x.tv_sec = x.tv_nsec;]])],
+ [gl_cv_sys_struct_timespec_in_unistd_h=yes],
+ [gl_cv_sys_struct_timespec_in_unistd_h=no])])
+ if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
+ UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
+ fi
fi
fi
fi
AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC])
AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC])
AC_SUBST([PTHREAD_H_DEFINES_STRUCT_TIMESPEC])
+ AC_SUBST([UNISTD_H_DEFINES_STRUCT_TIMESPEC])
])
AC_DEFUN([gl_TIME_MODULE_INDICATOR],
GNULIB_STRPTIME=0; AC_SUBST([GNULIB_STRPTIME])
GNULIB_TIMEGM=0; AC_SUBST([GNULIB_TIMEGM])
GNULIB_TIME_R=0; AC_SUBST([GNULIB_TIME_R])
+ GNULIB_TIME_RZ=0; AC_SUBST([GNULIB_TIME_RZ])
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_DECL_LOCALTIME_R=1; AC_SUBST([HAVE_DECL_LOCALTIME_R])
HAVE_NANOSLEEP=1; AC_SUBST([HAVE_NANOSLEEP])
REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME])
REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP])
REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM])
+
+ dnl Hack so that the time module doesn't depend on the sys_time module.
+ dnl First, default GNULIB_GETTIMEOFDAY to 0 if sys_time is absent.
+ : ${GNULIB_GETTIMEOFDAY=0}; AC_SUBST([GNULIB_GETTIMEOFDAY])
+ dnl Second, it's OK to not use GNULIB_PORTCHECK for REPLACE_GMTIME
+ dnl and REPLACE_LOCALTIME, as portability to Solaris 2.6 and earlier
+ dnl is no longer a big deal.
+ REPLACE_GMTIME=0; AC_SUBST([REPLACE_GMTIME])
+ REPLACE_LOCALTIME=0; AC_SUBST([REPLACE_LOCALTIME])
])
# tls.m4 serial 2 (gettext-0.18)
-dnl Copyright (C) 2005, 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# tmpdir.m4 serial 4
-dnl Copyright (C) 2001-2002, 2006, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2002, 2006, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# ungetc.m4 serial 3
-dnl Copyright (C) 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
fclose (f); remove ("conftest.tmp");])],
[gl_cv_func_ungetc_works=yes], [gl_cv_func_ungetc_works=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_ungetc_works="guessing yes" ;;
+ # Guess yes on glibc and bionic systems.
+ *-gnu*|*-android*)
+ gl_cv_func_ungetc_works="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_ungetc_works="guessing no" ;;
esac
#serial 9
-dnl Copyright (C) 2002, 2005-2006, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005-2006, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# unistd_h.m4 serial 66
-dnl Copyright (C) 2006-2013 Free Software Foundation, Inc.
+# unistd_h.m4 serial 69
+dnl Copyright (C) 2006-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
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=1; AC_SUBST([HAVE_DECL_GETLOGIN])
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])
REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE])
REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD])
REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME])
+ REPLACE_GETDTABLESIZE=0; AC_SUBST([REPLACE_GETDTABLESIZE])
REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R])
REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS])
REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE])
REPLACE_PWRITE=0; AC_SUBST([REPLACE_PWRITE])
REPLACE_READ=0; AC_SUBST([REPLACE_READ])
REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK])
+ REPLACE_READLINKAT=0; AC_SUBST([REPLACE_READLINKAT])
REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR])
REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP])
REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK])
+ REPLACE_SYMLINKAT=0; AC_SUBST([REPLACE_SYMLINKAT])
REPLACE_TTYNAME_R=0; AC_SUBST([REPLACE_TTYNAME_R])
REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK])
REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT])
# unlocked-io.m4 serial 15
-# Copyright (C) 1998-2006, 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 1998-2006, 2009-2016 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# vasnprintf.m4 serial 36
-dnl Copyright (C) 2002-2004, 2006-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2006-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# vasprintf-posix.m4 serial 13
-dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# vasprintf.m4 serial 6
-dnl Copyright (C) 2002-2003, 2006-2007, 2009-2013 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2006-2007, 2009-2016 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,
# version-etc.m4 serial 1
-# Copyright (C) 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2009-2016 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.
# wait-process.m4 serial 6
-dnl Copyright (C) 2003, 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# waitpid.m4 serial 2
-dnl Copyright (C) 2010-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# warnings.m4 serial 10
-dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
+# warnings.m4 serial 11
+dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
gl_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])])
+ AC_LINK_IFELSE([m4_default([$4], [AC_LANG_PROGRAM([])])],
+ [AS_VAR_SET(gl_Warn, [yes])],
+ [AS_VAR_SET(gl_Warn, [no])])
gl_Flags="$gl_save_compiler_FLAGS"
])
AS_VAR_IF(gl_Warn, [yes], [$2], [$3])
dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
-dnl Copyright (C) 2007-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl Written by Eric Blake.
-# wchar_h.m4 serial 39
+# wchar_h.m4 serial 40
AC_DEFUN([gl_WCHAR_H],
[
extern int zero (void);
int main () { return zero(); }
]])])
+ dnl Do not rename the object file from conftest.$ac_objext to
+ dnl conftest1.$ac_objext, as this will cause the link to fail on
+ dnl z/OS when using the XPLINK object format (due to duplicate
+ dnl CSECT names). Instead, temporarily redefine $ac_compile so
+ dnl that the object file has the latter name from the start.
+ save_ac_compile="$ac_compile"
+ ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
if AC_TRY_EVAL([ac_compile]); then
- mv conftest.$ac_objext conftest1.$ac_objext
AC_LANG_CONFTEST([
AC_LANG_SOURCE([[#define wcstod renamed_wcstod
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
#include <wchar.h>
int zero (void) { return 0; }
]])])
+ dnl See note above about renaming object files.
+ ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
if AC_TRY_EVAL([ac_compile]); then
- mv conftest.$ac_objext conftest2.$ac_objext
if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then
:
else
fi
fi
fi
+ ac_compile="$save_ac_compile"
rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
])
if test $gl_cv_header_wchar_h_correct_inline = no; then
# wchar_t.m4 serial 4 (gettext-0.18.2)
-dnl Copyright (C) 2002-2003, 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# wcrtomb.m4 serial 11
-dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# wctob.m4 serial 10
-dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# wctomb.m4 serial 2
-dnl Copyright (C) 2011-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free 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 A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
-dnl Copyright (C) 2006-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# wint_t.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2003, 2007-2013 Free Software Foundation, Inc.
+# wint_t.m4 serial 6
+dnl Copyright (C) 2003, 2007-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl From Bruno Haible.
-dnl Test whether <wchar.h> has the 'wint_t' type.
+dnl Test whether <wchar.h> has the 'wint_t' type and whether gnulib's
+dnl <wchar.h> or <wctype.h> would, if present, override 'wint_t'.
dnl Prerequisite: AC_PROG_CC
AC_DEFUN([gt_TYPE_WINT_T],
[gt_cv_c_wint_t=no])])
if test $gt_cv_c_wint_t = yes; then
AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.])
+
+ dnl Determine whether gnulib's <wchar.h> or <wctype.h> would, if present,
+ dnl override 'wint_t'.
+ AC_CACHE_CHECK([whether wint_t is too small],
+ [gl_cv_type_wint_t_too_small],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+/* 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>. */
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+#endif
+#include <wchar.h>
+ int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
+ ]])],
+ [gl_cv_type_wint_t_too_small=no],
+ [gl_cv_type_wint_t_too_small=yes])])
+ if test $gl_cv_type_wint_t_too_small = yes; then
+ GNULIB_OVERRIDES_WINT_T=1
+ else
+ GNULIB_OVERRIDES_WINT_T=0
+ fi
+ else
+ GNULIB_OVERRIDES_WINT_T=0
fi
+ AC_SUBST([GNULIB_OVERRIDES_WINT_T])
])
# write.m4 serial 5
-dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# xalloc.m4 serial 18
-dnl Copyright (C) 2002-2006, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# xsize.m4 serial 5
-dnl Copyright (C) 2003-2004, 2008-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2004, 2008-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# xstrndup.m4 serial 2
-dnl Copyright (C) 2003, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# xvasprintf.m4 serial 2
-dnl Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# This Makefile fragment tries to be general-purpose enough to be
# used by many projects via the gnulib maintainer-makefile module.
-## Copyright (C) 2001-2013 Free Software Foundation, Inc.
+## Copyright (C) 2001-2016 Free Software Foundation, Inc.
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
# ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
ME := maint.mk
-# 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)
VC_LIST = $(srcdir)/$(_build-aux)/vc-list-files -C $(srcdir)
+# You can override this variable in cfg.mk if your gnulib submodule lives
+# in a different location.
+gnulib_dir ?= $(srcdir)/gnulib
+
# You can override this variable in cfg.mk to set your own regexp
# matching files to ignore.
VC_LIST_ALWAYS_EXCLUDE_REGEX ?= ^$$
ifeq ($(srcdir),.)
_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,
_sc_excl = \
$(or $(exclude_file_name_regexp--$@),^$$)
VC_LIST_EXCEPT = \
- $(VC_LIST) | sed 's|^$(_dot_escaped_srcdir)/||' \
+ $(VC_LIST) | $(SED) 's|^$(_dot_escaped_srcdir)/||' \
| if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; \
else grep -Ev -e "$${VC_LIST_EXCEPT_DEFAULT-ChangeLog}"; fi \
| grep -Ev -e '($(VC_LIST_ALWAYS_EXCLUDE_REGEX)|$(_sc_excl))' \
## Sanity checks. ##
## --------------- ##
+ifneq ($(_gl-Makefile),)
_cfg_mk := $(wildcard $(srcdir)/cfg.mk)
# Collect the names of rules starting with 'sc_'.
-syntax-check-rules := $(sort $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' \
- $(srcdir)/$(ME) $(_cfg_mk)))
+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)
$(filter-out $(local-checks-to-skip), $(local-checks-available)))
syntax-check: $(local-check)
+endif
# _sc_search_regexp
#
halt='the above files do not include <config.h>' \
$(_sc_search_regexp)
+# Print each file name for which the first #include does not match
+# $(config_h_header). Like grep -m 1, this only looks at the first match.
+perl_config_h_first_ = \
+ -e 'BEGIN {$$ret = 0}' \
+ -e 'if (/^\# *include\b/) {' \
+ -e ' if (not m{^\# *include $(config_h_header)}) {' \
+ -e ' print "$$ARGV\n";' \
+ -e ' $$ret = 1;' \
+ -e ' }' \
+ -e ' \# Move on to next file after first include' \
+ -e ' close ARGV;' \
+ -e '}' \
+ -e 'END {exit $$ret}'
+
# You must include <config.h> before including any other header file.
# This can possibly be via a package-specific header, if given by cfg.mk.
sc_require_config_h_first:
- @if $(VC_LIST_EXCEPT) | grep -l '\.c$$' > /dev/null; then \
- fail=0; \
- for i in $$($(VC_LIST_EXCEPT) | grep '\.c$$'); do \
- grep '^# *include\>' $$i | sed 1q \
- | grep -E '^# *include $(config_h_header)' > /dev/null \
- || { echo $$i; fail=1; }; \
- done; \
- test $$fail = 1 && \
+ @if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \
+ files=$$($(VC_LIST_EXCEPT) | grep '\.c$$') && \
+ perl -n $(perl_config_h_first_) $$files || \
{ echo '$(ME): the above files include some other header' \
'before <config.h>' 1>&2; exit 1; } || :; \
else :; \
# 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'`; \
- if $(VC_LIST_EXCEPT) | grep -l '\.c$$' > /dev/null; then \
+ h_esc=`echo '[<"]'"$$h"'[">]'|$(SED) 's/\./\\\\./g'`; \
+ if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \
files=$$(grep -l '^# *include '"$$h_esc" \
$$($(VC_LIST_EXCEPT) | grep '\.c$$')) && \
grep -LE "$$re" $$files | grep . && \
sc_prohibit_openat_without_use:
@h='openat.h' \
- re='\<(openat_(permissive|needs_fchdir|(save|restore)_fail)|l?(stat|ch(own|mod))at|(euid)?accessat)\>' \
+ re='\<(openat_(permissive|needs_fchdir|(save|restore)_fail)|l?(stat|ch(own|mod))at|(euid)?accessat|(FCHMOD|FCHOWN|STAT)AT_INLINE)\>' \
$(_sc_header_without_use)
# Prohibit the inclusion of c-ctype.h without an actual use.
re='\<(strn?casecmp|ffs(ll)?)\>' \
$(_sc_header_without_use)
-# Get the list of symbol names with this:
-# 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_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
+# Extract the raw list of symbol names with this:
+gl_extract_define_simple = \
+ /^\# *define ([A-Z]\w+)\(/ and print $$1
+# Filter out duplicates and convert to a space-separated list:
+_intprops_names = \
+ $(shell f=$(gnulib_dir)/lib/intprops.h; \
+ perl -lne '$(gl_extract_define_simple)' $$f | sort -u | tr '\n' ' ')
+# Remove trailing space and convert to a regular expression:
_intprops_syms_re = $(subst $(_sp),|,$(strip $(_intprops_names)))
# Prohibit the inclusion of intprops.h without an actual use.
sc_prohibit_intprops_without_use:
$(_sc_search_regexp)
# Ensure that each .c file containing a "main" function also
-# calls set_program_name.
-sc_program_name:
- @require='set_program_name *\(m?argv\[0\]\);' \
- in_vc_files='\.c$$' \
- containing='\<main *(' \
- halt='the above files do not call set_program_name' \
- $(_sc_search_regexp)
-
-# Ensure that each .c file containing a "main" function also
# calls bindtextdomain.
sc_bindtextdomain:
@require='bindtextdomain *\(' \
# #if HAVE_HEADER_H that you remove, be sure that your project explicitly
# requires the gnulib module that guarantees the usability of that header.
gl_assured_headers_ = \
- cd $(gnulib_dir)/lib && echo *.in.h|sed 's/\.in\.h//g'
+ cd $(gnulib_dir)/lib && echo *.in.h|$(SED) 's/\.in\.h//g'
# Convert the list of names to upper case, and replace each space with "|".
az_ = abcdefghijklmnopqrstuvwxyz
&& perl -lne '$(gl_extract_significant_defines_)' $$f; \
done; \
) | sort -u \
- | sed 's/^/^ *# *(define|undef) */;s/$$/\\>/'
+ | $(SED) 's/^/^ *# *(define|undef) */;s/$$/\\>/'
endef
# Don't define macros that we already get from gnulib header files.
-e ' print "$$ARGV:$$n:$$v\n";' \
-e ' }'
+prohibit_doubled_words_ = \
+ the then in an on if is it but for or at and do to
+# expand the regex before running the check to avoid using expensive captures
+prohibit_doubled_word_expanded_ = \
+ $(join $(prohibit_doubled_words_),$(addprefix \s+,$(prohibit_doubled_words_)))
prohibit_doubled_word_RE_ ?= \
- /\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt]o)\s+\1\b/gims
+ /\b(?:$(subst $(_sp),|,$(prohibit_doubled_word_expanded_)))\b/gims
prohibit_doubled_word_ = \
-e 'while ($(prohibit_doubled_word_RE_))' \
$(perl_filename_lineno_text_)
| grep -vE '$(ignore_undesirable_word_sequence_RE_)' | grep . \
&& { echo '$(ME): undesirable word sequence' >&2; exit 1; } || :
+# Except for shell files and for loops, double semicolon is probably a mistake
+sc_prohibit_double_semicolon:
+ @prohibit='; *;[ {} \]*(/[/*]|$$)' \
+ in_vc_files='\.[chly]$$' \
+ exclude='\bfor *\(.*\)' \
+ halt="Double semicolon detected" \
+ $(_sc_search_regexp)
+
_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.
$(_sc_search_regexp)
NEWS_hash = \
- $$(sed -n '/^\*.* $(PREV_VERSION_REGEXP) ([0-9-]*)/,$$p' \
+ $$($(SED) -n '/^\*.* $(PREV_VERSION_REGEXP) ([0-9-]*)/,$$p' \
$(srcdir)/NEWS \
| perl -0777 -pe \
's/^Copyright.+?Free\sSoftware\sFoundation,\sInc\.\n//ms' \
| md5sum - \
- | sed 's/ .*//')
+ | $(SED) 's/ .*//')
# Ensure that we don't accidentally insert an entry into an old NEWS block.
sc_immutable_NEWS:
&& { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || :
news-check: NEWS
- $(AM_V_GEN)if sed -n $(news-check-lines-spec)p $< \
+ $(AM_V_GEN)if $(SED) -n $(news-check-lines-spec)p $< \
| grep -E $(news-check-regexp) >/dev/null; then \
:; \
else \
'you have changed the set of files with translatable diagnostics;\n\
apply the above patch\n'
+# Generate a list of files in which to search for translatable strings.
+perl_translatable_files_list_ = \
+ -e 'foreach $$file (@ARGV) {' \
+ -e ' \# Consider only file extensions with one or two letters' \
+ -e ' $$file =~ /\...?$$/ or next;' \
+ -e ' \# Ignore m4 and mk files' \
+ -e ' $$file =~ /\.m[4k]$$/ and next;' \
+ -e ' \# Ignore a .c or .h file with a corresponding .l or .y file' \
+ -e ' $$file =~ /(.+)\.[ch]$$/ && (-e "$${1}.l" || -e "$${1}.y")' \
+ -e ' and next;' \
+ -e ' \# Skip unreadable files' \
+ -e ' -r $$file or next;' \
+ -e ' print "$$file ";' \
+ -e '}'
+
# 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
@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)) $(generated_files); do \
- test -r $$file || continue; \
- case $$file in \
- *.m4|*.mk) continue ;; \
- *.?|*.??) ;; \
- *) continue;; \
- esac; \
- case $$file in \
- *.[ch]) \
- base=`expr " $$file" : ' \(.*\)\..'`; \
- { test -f $$base.l || test -f $$base.y; } && continue;; \
- esac; \
- files="$$files $$file"; \
- done; \
+ files=$$(perl $(perl_translatable_files_list_) \
+ $$($(VC_LIST_EXCEPT)) $(generated_files)); \
grep -E -l '$(_gl_translatable_string_re)' $$files \
- | sed 's|^$(_dot_escaped_srcdir)/||' | sort -u > $@-2; \
+ | $(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; \
in_vc_files=$(sample-test) \
halt='out of date copyright in $(sample-test); update it' \
$(_sc_search_regexp)
- @require='Copyright @copyright\{\} .*'$$(date +%Y)' Free' \
+ @require='Copyright @copyright\{\} .*'$$(date +%Y) \
in_vc_files=$(texi) \
halt='out of date copyright in $(texi); update it' \
$(_sc_search_regexp)
rel-files = $(DIST_ARCHIVES)
-gnulib_dir ?= $(srcdir)/gnulib
-gnulib-version = $$(cd $(gnulib_dir) && git describe)
+gnulib-version = $$(cd $(gnulib_dir) \
+ && { git describe || git rev-parse --short=10 HEAD; } )
bootstrap-tools ?= autoconf,automake,gnulib
+gpgv = $$(gpgv2 --version >/dev/null && echo gpgv2 || echo gpgv)
# If it's not already specified, derive the GPG key ID from
# the signed tag we've just applied to mark this release.
gpg_key_ID ?= \
$$(cd $(srcdir) \
&& git cat-file tag v$(VERSION) \
- | gpgv --status-fd 1 --keyring /dev/null - - 2>/dev/null \
+ | $(gpgv) --status-fd 1 --keyring /dev/null - - 2>/dev/null \
| awk '/^\[GNUPG:\] ERRSIG / {print $$3; exit}')
translation_project_ ?= coordinator@translationproject.org
&& git --version >/dev/null 2>&1; then \
cd $(srcdir) && \
git submodule --quiet foreach \
- test '"$$(git rev-parse "$$sha1")"' \
- = '"$$(git merge-base origin "$$sha1")"' \
+ 'test "$$(git rev-parse "$$sha1")" \
+ = "$$(git merge-base origin "$$sha1")"' \
|| { echo '$(ME): found non-public submodule commit' >&2; \
exit 1; }; \
else \
$(AM_V_at)$(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
release:
+ $(AM_V_GEN)$(MAKE) _version
$(AM_V_GEN)$(MAKE) $(release-type)
# Override this in cfg.mk if you follow different procedures.
test -n "$$t" && gl=$$t; \
fi; \
for diff in $$(cd $$gl; git ls-files | grep '\.diff$$'); do \
- b=$$(printf %s "$$diff"|sed 's/\.diff$$//'); \
+ b=$$(printf %s "$$diff"|$(SED) 's/\.diff$$//'); \
VERSION_CONTROL=none \
patch "$(gnulib_dir)/$$b" "$$gl/$$diff" || exit 1; \
( cd $(gnulib_dir) || exit 1; \
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//;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)
# 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+) *\(/
+_gl_TS_function_match ?= /^(?:$(_gl_TS_extern)) +.*?(\w+) *\(/
# If your project uses a macro like "XTERN", then put
# the following in cfg.mk to override this default:
.PHONY: _gl_tight_scope
_gl_tight_scope: $(bin_PROGRAMS)
+ sed_wrap='s/^/^_?/;s/$$/$$/'; \
t=exceptions-$$$$; \
trap 's=$$?; rm -f $$t; exit $$s' 0; \
for sig in 1 2 3 13 15; 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); \
+ ( printf '%s\n' '__.*' $(_gl_TS_unmarked_extern_functions); \
grep -h -A1 '^extern .*[^;]$$' $$src \
- | grep -vE '^(extern |--)' | sed 's/ .*//'; \
+ | grep -vE '^(extern |--|#)' | $(SED) 's/ .*//; /^$$/d'; \
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 \
+ '$(_gl_TS_function_match) and print $$1' $$hdr; \
+ ) | sort -u | $(SED) "$$sed_wrap" > $$t; \
+ nm -g $(_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\$$"' \
+ ( printf '%s\n' '__.*' main $(_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 | $(SED) "$$sed_wrap" > $$t; \
+ nm -g $(_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; } || :
## Makefile.am - template for generating Makefile via Automake
##
-## Copyright (C) 2006-2013 Free Software Foundation, Inc.
+## Copyright (C) 2006-2014, 2016 Free Software Foundation, Inc.
##
## This file is part of GNU M4.
##
AUTOMAKE_OPTIONS = nostdinc
AM_CPPFLAGS = -I$(top_srcdir)/lib -I../lib
AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
+AM_LDFLAGS = $(OS2_LDFLAGS)
bin_PROGRAMS = m4
noinst_HEADERS = m4.h
m4_SOURCES = m4.c builtin.c debug.c eval.c format.c freeze.c input.c \
-# Makefile.in generated by automake 1.14 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
host_triplet = @host@
bin_PROGRAMS = m4$(EXEEXT)
subdir = src
-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/absolute-header.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/builtin-expect.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/ctype.m4 $(top_srcdir)/m4/dirent_h.m4 \
+ $(top_srcdir)/m4/dirfd.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/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/flexmember.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/getprogname.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/hard-locale.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/inttypes_h.m4 $(top_srcdir)/m4/isblank.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/limits-h.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/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/memchr.m4 $(top_srcdir)/m4/minmax.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/obstack.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/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/stdalign.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)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+ $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/lib/config.h
CONFIG_CLEAN_FILES =
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+ $(top_srcdir)/build-aux/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
pkglibexecdir = @pkglibexecdir@
ACLOCAL = @ACLOCAL@
GNULIB_IMAXABS = @GNULIB_IMAXABS@
GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
GNULIB_ISATTY = @GNULIB_ISATTY@
+GNULIB_ISBLANK = @GNULIB_ISBLANK@
GNULIB_ISFINITE = @GNULIB_ISFINITE@
GNULIB_ISINF = @GNULIB_ISINF@
GNULIB_ISNAN = @GNULIB_ISNAN@
GNULIB_OPEN = @GNULIB_OPEN@
GNULIB_OPENAT = @GNULIB_OPENAT@
GNULIB_OPENDIR = @GNULIB_OPENDIR@
+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@
GNULIB_PCLOSE = @GNULIB_PCLOSE@
GNULIB_PERROR = @GNULIB_PERROR@
GNULIB_PIPE = @GNULIB_PIPE@
GNULIB_PUTENV = @GNULIB_PUTENV@
GNULIB_PUTS = @GNULIB_PUTS@
GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_QSORT_R = @GNULIB_QSORT_R@
GNULIB_RAISE = @GNULIB_RAISE@
GNULIB_RANDOM = @GNULIB_RANDOM@
GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
GNULIB_TANL = @GNULIB_TANL@
GNULIB_TIMEGM = @GNULIB_TIMEGM@
GNULIB_TIME_R = @GNULIB_TIME_R@
+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@
GNULIB_TMPFILE = @GNULIB_TMPFILE@
GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
GNULIB_TRUNC = @GNULIB_TRUNC@
HAVE_ATANL = @HAVE_ATANL@
HAVE_ATOLL = @HAVE_ATOLL@
HAVE_BTOWC = @HAVE_BTOWC@
+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@
HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
HAVE_CBRT = @HAVE_CBRT@
HAVE_CBRTF = @HAVE_CBRTF@
HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
HAVE_ILOGBF = @HAVE_ILOGBF@
HAVE_ILOGBL = @HAVE_ILOGBL@
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_ISBLANK = @HAVE_ISBLANK@
HAVE_ISNAND = @HAVE_ISNAND@
HAVE_ISNANF = @HAVE_ISNANF@
HAVE_ISNANL = @HAVE_ISNANL@
HAVE_LOGL = @HAVE_LOGL@
HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
HAVE_LSTAT = @HAVE_LSTAT@
+HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
HAVE_MBRLEN = @HAVE_MBRLEN@
HAVE_MBRTOWC = @HAVE_MBRTOWC@
HAVE_MBSINIT = @HAVE_MBSINIT@
HAVE_PTSNAME = @HAVE_PTSNAME@
HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_QSORT_R = @HAVE_QSORT_R@
HAVE_RAISE = @HAVE_RAISE@
HAVE_RANDOM = @HAVE_RANDOM@
HAVE_RANDOM_H = @HAVE_RANDOM_H@
HAVE_SYMLINK = @HAVE_SYMLINK@
HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_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_TANHF = @HAVE_TANHF@
HAVE_TANL = @HAVE_TANL@
HAVE_TIMEGM = @HAVE_TIMEGM@
+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
HAVE_UNISTD_H = @HAVE_UNISTD_H@
HAVE_UNLINKAT = @HAVE_UNLINKAT@
LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@
LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@
LIBTHREAD = @LIBTHREAD@
+LIB_POSIX_SPAWN = @LIB_POSIX_SPAWN@
+LIMITS_H = @LIMITS_H@
LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
LOCALE_FR = @LOCALE_FR@
LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
M4tests_WITNESS = @M4tests_WITNESS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@
NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
NEXT_AS_FIRST_DIRECTIVE_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_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_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_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
+NEXT_CTYPE_H = @NEXT_CTYPE_H@
NEXT_DIRENT_H = @NEXT_DIRENT_H@
NEXT_ERRNO_H = @NEXT_ERRNO_H@
NEXT_FCNTL_H = @NEXT_FCNTL_H@
NEXT_GETOPT_H = @NEXT_GETOPT_H@
NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
+NEXT_LIMITS_H = @NEXT_LIMITS_H@
NEXT_LOCALE_H = @NEXT_LOCALE_H@
NEXT_MATH_H = @NEXT_MATH_H@
NEXT_SCHED_H = @NEXT_SCHED_H@
NEXT_WCHAR_H = @NEXT_WCHAR_H@
NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
OBJEXT = @OBJEXT@
+OS2_LDFLAGS = @OS2_LDFLAGS@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
+REPLACE_ACOSF = @REPLACE_ACOSF@
+REPLACE_ASINF = @REPLACE_ASINF@
+REPLACE_ATAN2F = @REPLACE_ATAN2F@
+REPLACE_ATANF = @REPLACE_ATANF@
REPLACE_BTOWC = @REPLACE_BTOWC@
REPLACE_CALLOC = @REPLACE_CALLOC@
REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
REPLACE_CHOWN = @REPLACE_CHOWN@
REPLACE_CLOSE = @REPLACE_CLOSE@
REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@
+REPLACE_COSF = @REPLACE_COSF@
+REPLACE_COSHF = @REPLACE_COSHF@
REPLACE_DIRFD = @REPLACE_DIRFD@
REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
REPLACE_EXP2 = @REPLACE_EXP2@
REPLACE_EXP2L = @REPLACE_EXP2L@
+REPLACE_EXPF = @REPLACE_EXPF@
REPLACE_EXPM1 = @REPLACE_EXPM1@
REPLACE_EXPM1F = @REPLACE_EXPM1F@
REPLACE_FABSL = @REPLACE_FABSL@
REPLACE_GETCWD = @REPLACE_GETCWD@
REPLACE_GETDELIM = @REPLACE_GETDELIM@
REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
+REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@
REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
REPLACE_GETLINE = @REPLACE_GETLINE@
REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_GMTIME = @REPLACE_GMTIME@
REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
REPLACE_HYPOT = @REPLACE_HYPOT@
REPLACE_HYPOTF = @REPLACE_HYPOTF@
REPLACE_LINK = @REPLACE_LINK@
REPLACE_LINKAT = @REPLACE_LINKAT@
REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
+REPLACE_LOCALTIME = @REPLACE_LOCALTIME@
REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
REPLACE_LOG = @REPLACE_LOG@
REPLACE_LOG10 = @REPLACE_LOG10@
REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
REPLACE_PUTENV = @REPLACE_PUTENV@
REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_QSORT_R = @REPLACE_QSORT_R@
REPLACE_RAISE = @REPLACE_RAISE@
REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
REPLACE_READ = @REPLACE_READ@
REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_READLINKAT = @REPLACE_READLINKAT@
REPLACE_REALLOC = @REPLACE_REALLOC@
REPLACE_REALPATH = @REPLACE_REALPATH@
REPLACE_REMAINDER = @REPLACE_REMAINDER@
REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
REPLACE_SIGNBIT = @REPLACE_SIGNBIT@
REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
+REPLACE_SINF = @REPLACE_SINF@
+REPLACE_SINHF = @REPLACE_SINHF@
REPLACE_SLEEP = @REPLACE_SLEEP@
REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_SQRTF = @REPLACE_SQRTF@
REPLACE_SQRTL = @REPLACE_SQRTL@
REPLACE_STAT = @REPLACE_STAT@
REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
REPLACE_STRTOD = @REPLACE_STRTOD@
REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@
REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
+REPLACE_TANF = @REPLACE_TANF@
+REPLACE_TANHF = @REPLACE_TANHF@
REPLACE_TIMEGM = @REPLACE_TIMEGM@
REPLACE_TMPFILE = @REPLACE_TMPFILE@
REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
REPLACE_WRITE = @REPLACE_WRITE@
SCHED_H = @SCHED_H@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
+STDALIGN_H = @STDALIGN_H@
STDARG_H = @STDARG_H@
STDBOOL_H = @STDBOOL_H@
STDDEF_H = @STDDEF_H@
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_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@
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@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
am__include = @am__include@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
AUTOMAKE_OPTIONS = nostdinc
AM_CPPFLAGS = -I$(top_srcdir)/lib -I../lib
AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
+AM_LDFLAGS = $(OS2_LDFLAGS)
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
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu src/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
ps ps-am tags tags-am uninstall uninstall-am \
uninstall-binPROGRAMS
+.PRECIOUS: Makefile
+
# 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.
/* GNU m4 -- A simple macro processor
- Copyright (C) 1989-1994, 2000, 2004, 2006-2013 Free Software
+ Copyright (C) 1989-1994, 2000, 2004, 2006-2014, 2016 Free Software
Foundation, Inc.
This file is part of GNU M4.
sysval = 127;
return;
}
+#if OS2
+ /* On OS/2 kLIBC, fdopen() creates a stream in a mode of a file descriptor.
+ So include "t" to open a stream in a text mode explicitly on OS/2. */
+ pin = fdopen (fd, "rt");
+#else
pin = fdopen (fd, "r");
+#endif
if (pin == NULL)
{
M4ERROR ((warning_status, errno, "cannot run command `%s'", cmd));
{
close (fd);
/* Remove NUL, then finish quote. */
- obstack_blank (obs, -1);
+ obstack_blank_fast (obs, -1);
obstack_grow (obs, rquote.string, rquote.length);
}
}
/* GNU m4 -- A simple macro processor
- Copyright (C) 1991-1994, 2004, 2006-2007, 2009-2013 Free Software
- Foundation, Inc.
+ Copyright (C) 1991-1994, 2004, 2006-2007, 2009-2014, 2016 Free
+ Software Foundation, Inc.
This file is part of GNU M4.
/* GNU m4 -- A simple macro processor
- Copyright (C) 1989-1994, 2006-2007, 2009-2013 Free Software
+ Copyright (C) 1989-1994, 2006-2007, 2009-2014, 2016 Free Software
Foundation, Inc.
This file is part of GNU M4.
/* GNU m4 -- A simple macro processor
- Copyright (C) 1989-1994, 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 1989-1994, 2006-2014, 2016 Free Software Foundation,
+ Inc.
This file is part of GNU M4.
/* GNU m4 -- A simple macro processor
- Copyright (C) 1989-1994, 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 1989-1994, 2006-2014, 2016 Free Software Foundation,
+ Inc.
This file is part of GNU M4.
/* GNU m4 -- A simple macro processor
- Copyright (C) 1989-1994, 2004-2013 Free Software Foundation, Inc.
+ Copyright (C) 1989-1994, 2004-2014, 2016 Free Software Foundation,
+ Inc.
This file is part of GNU M4.
/* GNU m4 -- A simple macro processor
- Copyright (C) 1989-1994, 2004-2013 Free Software Foundation, Inc.
+ Copyright (C) 1989-1994, 2004-2014, 2016 Free Software Foundation,
+ Inc.
This file is part of GNU M4.
{"trace", required_argument, NULL, 't'},
{"traditional", no_argument, NULL, 'G'},
{"undefine", required_argument, NULL, 'U'},
+#ifdef ENABLE_CHANGEWORD
{"word-regexp", required_argument, NULL, 'W'},
+#endif
{"debugfile", optional_argument, NULL, DEBUGFILE_OPTION},
{"diversions", required_argument, NULL, DIVERSIONS_OPTION},
/* GNU m4 -- A simple macro processor
- Copyright (C) 1989-1994, 2004-2013 Free Software Foundation, Inc.
+ Copyright (C) 1989-1994, 2004-2014, 2016 Free Software Foundation,
+ Inc.
This file is part of GNU M4.
/* GNU m4 -- A simple macro processor
- Copyright (C) 1989-1994, 2006-2007, 2009-2013 Free Software
+ Copyright (C) 1989-1994, 2006-2007, 2009-2014, 2016 Free Software
Foundation, Inc.
This file is part of GNU M4.
/* The shared stack of pointers to collected arguments for macro
calls. This object is never finished; we exploit the fact that
- obstack_blank is documented to take a negative size to reduce the
- size again. */
+ obstack_blank_fast is documented to take a negative size to reduce
+ the size again. */
static struct obstack argv_stack;
/*----------------------------------------------------------------------.
obstack_free (&argc_stack, argv[0]);
else
obstack_free (&arguments, NULL);
- obstack_blank (&argv_stack, -argc * sizeof (token_data *));
+ obstack_blank_fast (&argv_stack, -argc * sizeof (token_data *));
}
/* GNU m4 -- A simple macro processor
- Copyright (C) 1989-1994, 2004-2013 Free Software Foundation, Inc.
+ Copyright (C) 1989-1994, 2004-2014, 2016 Free Software Foundation,
+ Inc.
This file is part of GNU M4.
/* GNU m4 -- A simple macro processor
- Copyright (C) 1989-1993, 2004, 2006-2013 Free Software Foundation,
- Inc.
+ Copyright (C) 1989-1993, 2004, 2006-2014, 2016 Free Software
+ Foundation, Inc.
This file is part of GNU M4.
/* GNU m4 -- A simple macro processor
- Copyright (C) 1989-1994, 2003, 2006-2013 Free Software Foundation,
- Inc.
+ Copyright (C) 1989-1994, 2003, 2006-2014, 2016 Free Software
+ Foundation, Inc.
This file is part of GNU M4.
## Makefile.am - template for generating Makefile via Automake
##
-## Copyright (C) 2009-2013 Free Software Foundation, Inc.
+## Copyright (C) 2009-2014, 2016 Free Software Foundation, Inc.
##
## This file is part of GNU M4.
##
-# Makefile.in generated by automake 1.14 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@SET_MAKE@
-# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+# Copyright (C) 2002-2016 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
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-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-chdir$(EXEEXT) test-cloexec$(EXEEXT) test-close$(EXEEXT) \
- test-closein.sh $(am__EXEEXT_1) test-dirent$(EXEEXT) \
+TESTS = test-alignof$(EXEEXT) 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-chdir$(EXEEXT) \
+ test-cloexec$(EXEEXT) test-close$(EXEEXT) test-closein.sh \
+ test-ctype$(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-ftell3$(EXEEXT) test-ftello.sh test-ftello2.sh \
test-ftello3$(EXEEXT) test-ftello4.sh test-fwrite$(EXEEXT) \
test-getcwd-lgpl$(EXEEXT) test-getdtablesize$(EXEEXT) \
- test-getopt$(EXEEXT) test-gettimeofday$(EXEEXT) \
+ test-getopt-gnu$(EXEEXT) test-getopt-posix$(EXEEXT) \
+ test-getprogname$(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_3) test-langinfo$(EXEEXT) test-link$(EXEEXT) \
- test-linkedhash_list$(EXEEXT) $(am__EXEEXT_4) \
- test-locale$(EXEEXT) test-localeconv$(EXEEXT) \
+ test-inttypes$(EXEEXT) test-isblank$(EXEEXT) \
+ test-isnand-nolibm$(EXEEXT) test-isnanf-nolibm$(EXEEXT) \
+ test-isnanl-nolibm$(EXEEXT) $(am__EXEEXT_3) \
+ test-langinfo$(EXEEXT) test-limits-h$(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-malloca$(EXEEXT) $(am__EXEEXT_5) test-math$(EXEEXT) \
+ test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh \
+ test-mbrtowc4.sh test-mbrtowc5.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-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-spawn$(EXEEXT) test-stat$(EXEEXT) test-stdalign$(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-xvasprintf$(EXEEXT)
XFAIL_TESTS =
noinst_PROGRAMS =
-check_PROGRAMS = test-alloca-opt$(EXEEXT) test-array_list$(EXEEXT) \
- test-array_oset$(EXEEXT) test-avltree_oset$(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-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) \
+check_PROGRAMS = test-alignof$(EXEEXT) test-alloca-opt$(EXEEXT) \
+ test-array_list$(EXEEXT) test-array_oset$(EXEEXT) \
+ test-avltree_oset$(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-chdir$(EXEEXT) test-cloexec$(EXEEXT) test-close$(EXEEXT) \
+ test-closein$(EXEEXT) test-ctype$(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-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-getdtablesize$(EXEEXT) test-getopt-gnu$(EXEEXT) \
+ test-getopt-posix$(EXEEXT) test-getprogname$(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_3) \
- test-langinfo$(EXEEXT) test-link$(EXEEXT) \
- test-linkedhash_list$(EXEEXT) $(am__EXEEXT_4) \
- test-locale$(EXEEXT) test-localeconv$(EXEEXT) \
+ test-isblank$(EXEEXT) test-isnand-nolibm$(EXEEXT) \
+ test-isnanf-nolibm$(EXEEXT) test-isnanl-nolibm$(EXEEXT) \
+ $(am__EXEEXT_3) test-langinfo$(EXEEXT) test-limits-h$(EXEEXT) \
+ test-link$(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-lstat$(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-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-spawn$(EXEEXT) test-stat$(EXEEXT) test-stdalign$(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) \
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/absolute-header.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/builtin-expect.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/ctype.m4 $(top_srcdir)/m4/dirent_h.m4 \
+ $(top_srcdir)/m4/dirfd.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/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/flexmember.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/getprogname.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/hard-locale.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/inttypes_h.m4 $(top_srcdir)/m4/isblank.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/limits-h.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/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/memchr.m4 $(top_srcdir)/m4/minmax.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/obstack.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/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/stdalign.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)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+ $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/lib/config.h
CONFIG_CLEAN_FILES =
@ANSICXX_TRUE@am__EXEEXT_18 = test-wchar-c++$(EXEEXT)
@ANSICXX_TRUE@am__EXEEXT_19 = test-wctype-h-c++$(EXEEXT)
PROGRAMS = $(noinst_PROGRAMS)
+test_alignof_SOURCES = test-alignof.c
+test_alignof_OBJECTS = test-alignof.$(OBJEXT)
+test_alignof_LDADD = $(LDADD)
+test_alignof_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_alloca_opt_SOURCES = test-alloca-opt.c
test_alloca_opt_OBJECTS = test-alloca-opt.$(OBJEXT)
test_alloca_opt_LDADD = $(LDADD)
test_closein_SOURCES = test-closein.c
test_closein_OBJECTS = test-closein.$(OBJEXT)
test_closein_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_ctype_SOURCES = test-ctype.c
+test_ctype_OBJECTS = test-ctype.$(OBJEXT)
+test_ctype_LDADD = $(LDADD)
+test_ctype_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_dirent_SOURCES = test-dirent.c
test_dirent_OBJECTS = test-dirent.$(OBJEXT)
test_dirent_LDADD = $(LDADD)
test_getdtablesize_LDADD = $(LDADD)
test_getdtablesize_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
$(am__DEPENDENCIES_1)
-test_getopt_SOURCES = test-getopt.c
-test_getopt_OBJECTS = test-getopt.$(OBJEXT)
-test_getopt_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
+test_getopt_gnu_SOURCES = test-getopt-gnu.c
+test_getopt_gnu_OBJECTS = test-getopt-gnu.$(OBJEXT)
+test_getopt_gnu_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_1)
+test_getopt_posix_SOURCES = test-getopt-posix.c
+test_getopt_posix_OBJECTS = test-getopt-posix.$(OBJEXT)
+test_getopt_posix_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_1)
+test_getprogname_SOURCES = test-getprogname.c
+test_getprogname_OBJECTS = test-getprogname.$(OBJEXT)
+test_getprogname_DEPENDENCIES = $(am__DEPENDENCIES_2)
test_gettimeofday_SOURCES = test-gettimeofday.c
test_gettimeofday_OBJECTS = test-gettimeofday.$(OBJEXT)
test_gettimeofday_LDADD = $(LDADD)
test_inttypes_LDADD = $(LDADD)
test_inttypes_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
$(am__DEPENDENCIES_1)
+test_isblank_SOURCES = test-isblank.c
+test_isblank_OBJECTS = test-isblank.$(OBJEXT)
+test_isblank_LDADD = $(LDADD)
+test_isblank_DEPENDENCIES = libtests.a ../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)
test_langinfo_c___LDADD = $(LDADD)
test_langinfo_c___DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
$(am__DEPENDENCIES_1)
+test_limits_h_SOURCES = test-limits-h.c
+test_limits_h_OBJECTS = test-limits-h.$(OBJEXT)
+test_limits_h_LDADD = $(LDADD)
+test_limits_h_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_link_SOURCES = test-link.c
test_link_OBJECTS = test-link.$(OBJEXT)
test_link_LDADD = $(LDADD)
test_lstat_LDADD = $(LDADD)
test_lstat_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
$(am__DEPENDENCIES_1)
-test_malloc_gnu_SOURCES = test-malloc-gnu.c
-test_malloc_gnu_OBJECTS = test-malloc-gnu.$(OBJEXT)
-test_malloc_gnu_LDADD = $(LDADD)
-test_malloc_gnu_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
- $(am__DEPENDENCIES_1)
test_malloca_SOURCES = test-malloca.c
test_malloca_OBJECTS = test-malloca.$(OBJEXT)
test_malloca_LDADD = $(LDADD)
$(am__DEPENDENCIES_1)
test_regex_SOURCES = test-regex.c
test_regex_OBJECTS = test-regex.$(OBJEXT)
-test_regex_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_regex_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
test_rename_SOURCES = test-rename.c
test_rename_OBJECTS = test-rename.$(OBJEXT)
test_rename_LDADD = $(LDADD)
test_stat_SOURCES = test-stat.c
test_stat_OBJECTS = test-stat.$(OBJEXT)
test_stat_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
+test_stdalign_SOURCES = test-stdalign.c
+test_stdalign_OBJECTS = test-stdalign.$(OBJEXT)
+test_stdalign_LDADD = $(LDADD)
+test_stdalign_DEPENDENCIES = libtests.a ../lib/libm4.a libtests.a \
+ $(am__DEPENDENCIES_1)
test_stdbool_SOURCES = test-stdbool.c
test_stdbool_OBJECTS = test-stdbool.$(OBJEXT)
test_stdbool_LDADD = $(LDADD)
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-alignof.c 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-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-cloexec.c test-close.c test-closein.c test-ctype.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-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-getdtablesize.c test-getopt-gnu.c test-getopt-posix.c \
+ test-getprogname.c test-gettimeofday.c test-ignore-value.c \
+ test-intprops.c test-inttypes.c test-isblank.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-langinfo.c $(test_langinfo_c___SOURCES) test-limits-h.c \
+ test-link.c test-linkedhash_list.c test-locale.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-lseek.c test-lstat.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_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-spawn-pipe-main.c test-stat.c test-stdalign.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_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-alignof.c 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-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-localeconv.c \
- test-localename.c test-lseek.c test-lstat.c test-malloc-gnu.c \
+ test-cloexec.c test-close.c test-closein.c test-ctype.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-gnu.c test-getopt-posix.c \
+ test-getprogname.c test-gettimeofday.c test-ignore-value.c \
+ test-intprops.c test-inttypes.c test-isblank.c \
+ test-isnand-nolibm.c test-isnanf-nolibm.c test-isnanl-nolibm.c \
+ test-langinfo.c $(am__test_langinfo_c___SOURCES_DIST) \
+ test-limits-h.c test-link.c test-linkedhash_list.c \
+ test-locale.c $(am__test_locale_c___SOURCES_DIST) \
+ test-localeconv.c test-localename.c test-lseek.c test-lstat.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-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 \
+ test-stdalign.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_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
$(TEST_LOG_FLAGS)
DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/gnulib.mk \
+ $(top_srcdir)/build-aux/depcomp \
+ $(top_srcdir)/build-aux/test-driver
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
CXXFLAGS = @CXXFLAGS@
CXX_CHOICE = @CXX_CHOICE@
CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
+DEFS = @DEFS@ -DEXEEXT=\"@EXEEXT@\"
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
GNULIB_IMAXABS = @GNULIB_IMAXABS@
GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
GNULIB_ISATTY = @GNULIB_ISATTY@
+GNULIB_ISBLANK = @GNULIB_ISBLANK@
GNULIB_ISFINITE = @GNULIB_ISFINITE@
GNULIB_ISINF = @GNULIB_ISINF@
GNULIB_ISNAN = @GNULIB_ISNAN@
GNULIB_OPEN = @GNULIB_OPEN@
GNULIB_OPENAT = @GNULIB_OPENAT@
GNULIB_OPENDIR = @GNULIB_OPENDIR@
+GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@
GNULIB_PCLOSE = @GNULIB_PCLOSE@
GNULIB_PERROR = @GNULIB_PERROR@
GNULIB_PIPE = @GNULIB_PIPE@
GNULIB_PUTENV = @GNULIB_PUTENV@
GNULIB_PUTS = @GNULIB_PUTS@
GNULIB_PWRITE = @GNULIB_PWRITE@
+GNULIB_QSORT_R = @GNULIB_QSORT_R@
GNULIB_RAISE = @GNULIB_RAISE@
GNULIB_RANDOM = @GNULIB_RANDOM@
GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
GNULIB_TANL = @GNULIB_TANL@
GNULIB_TIMEGM = @GNULIB_TIMEGM@
GNULIB_TIME_R = @GNULIB_TIME_R@
+GNULIB_TIME_RZ = @GNULIB_TIME_RZ@
GNULIB_TMPFILE = @GNULIB_TMPFILE@
GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
GNULIB_TRUNC = @GNULIB_TRUNC@
HAVE_ATANL = @HAVE_ATANL@
HAVE_ATOLL = @HAVE_ATOLL@
HAVE_BTOWC = @HAVE_BTOWC@
+HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@
HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
HAVE_CBRT = @HAVE_CBRT@
HAVE_CBRTF = @HAVE_CBRTF@
HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
+HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
HAVE_ILOGBF = @HAVE_ILOGBF@
HAVE_ILOGBL = @HAVE_ILOGBL@
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_ISBLANK = @HAVE_ISBLANK@
HAVE_ISNAND = @HAVE_ISNAND@
HAVE_ISNANF = @HAVE_ISNANF@
HAVE_ISNANL = @HAVE_ISNANL@
HAVE_LOGL = @HAVE_LOGL@
HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
HAVE_LSTAT = @HAVE_LSTAT@
+HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
HAVE_MBRLEN = @HAVE_MBRLEN@
HAVE_MBRTOWC = @HAVE_MBRTOWC@
HAVE_MBSINIT = @HAVE_MBSINIT@
HAVE_PTSNAME = @HAVE_PTSNAME@
HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
HAVE_PWRITE = @HAVE_PWRITE@
+HAVE_QSORT_R = @HAVE_QSORT_R@
HAVE_RAISE = @HAVE_RAISE@
HAVE_RANDOM = @HAVE_RANDOM@
HAVE_RANDOM_H = @HAVE_RANDOM_H@
HAVE_SYMLINK = @HAVE_SYMLINK@
HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_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_TANHF = @HAVE_TANHF@
HAVE_TANL = @HAVE_TANL@
HAVE_TIMEGM = @HAVE_TIMEGM@
+HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
HAVE_UNISTD_H = @HAVE_UNISTD_H@
HAVE_UNLINKAT = @HAVE_UNLINKAT@
LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@
LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@
LIBTHREAD = @LIBTHREAD@
+LIB_POSIX_SPAWN = @LIB_POSIX_SPAWN@
+LIMITS_H = @LIMITS_H@
LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
LOCALE_FR = @LOCALE_FR@
LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
M4tests_WITNESS = @M4tests_WITNESS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@
NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
NEXT_AS_FIRST_DIRECTIVE_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_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_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_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
+NEXT_CTYPE_H = @NEXT_CTYPE_H@
NEXT_DIRENT_H = @NEXT_DIRENT_H@
NEXT_ERRNO_H = @NEXT_ERRNO_H@
NEXT_FCNTL_H = @NEXT_FCNTL_H@
NEXT_GETOPT_H = @NEXT_GETOPT_H@
NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
+NEXT_LIMITS_H = @NEXT_LIMITS_H@
NEXT_LOCALE_H = @NEXT_LOCALE_H@
NEXT_MATH_H = @NEXT_MATH_H@
NEXT_SCHED_H = @NEXT_SCHED_H@
NEXT_WCHAR_H = @NEXT_WCHAR_H@
NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
OBJEXT = @OBJEXT@
+OS2_LDFLAGS = @OS2_LDFLAGS@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
+REPLACE_ACOSF = @REPLACE_ACOSF@
+REPLACE_ASINF = @REPLACE_ASINF@
+REPLACE_ATAN2F = @REPLACE_ATAN2F@
+REPLACE_ATANF = @REPLACE_ATANF@
REPLACE_BTOWC = @REPLACE_BTOWC@
REPLACE_CALLOC = @REPLACE_CALLOC@
REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
REPLACE_CHOWN = @REPLACE_CHOWN@
REPLACE_CLOSE = @REPLACE_CLOSE@
REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@
+REPLACE_COSF = @REPLACE_COSF@
+REPLACE_COSHF = @REPLACE_COSHF@
REPLACE_DIRFD = @REPLACE_DIRFD@
REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
REPLACE_EXP2 = @REPLACE_EXP2@
REPLACE_EXP2L = @REPLACE_EXP2L@
+REPLACE_EXPF = @REPLACE_EXPF@
REPLACE_EXPM1 = @REPLACE_EXPM1@
REPLACE_EXPM1F = @REPLACE_EXPM1F@
REPLACE_FABSL = @REPLACE_FABSL@
REPLACE_GETCWD = @REPLACE_GETCWD@
REPLACE_GETDELIM = @REPLACE_GETDELIM@
REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
+REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@
REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
REPLACE_GETLINE = @REPLACE_GETLINE@
REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_GMTIME = @REPLACE_GMTIME@
REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
REPLACE_HYPOT = @REPLACE_HYPOT@
REPLACE_HYPOTF = @REPLACE_HYPOTF@
REPLACE_LINK = @REPLACE_LINK@
REPLACE_LINKAT = @REPLACE_LINKAT@
REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
+REPLACE_LOCALTIME = @REPLACE_LOCALTIME@
REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
REPLACE_LOG = @REPLACE_LOG@
REPLACE_LOG10 = @REPLACE_LOG10@
REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
REPLACE_PUTENV = @REPLACE_PUTENV@
REPLACE_PWRITE = @REPLACE_PWRITE@
+REPLACE_QSORT_R = @REPLACE_QSORT_R@
REPLACE_RAISE = @REPLACE_RAISE@
REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
REPLACE_READ = @REPLACE_READ@
REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_READLINKAT = @REPLACE_READLINKAT@
REPLACE_REALLOC = @REPLACE_REALLOC@
REPLACE_REALPATH = @REPLACE_REALPATH@
REPLACE_REMAINDER = @REPLACE_REMAINDER@
REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
REPLACE_SIGNBIT = @REPLACE_SIGNBIT@
REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
+REPLACE_SINF = @REPLACE_SINF@
+REPLACE_SINHF = @REPLACE_SINHF@
REPLACE_SLEEP = @REPLACE_SLEEP@
REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_SQRTF = @REPLACE_SQRTF@
REPLACE_SQRTL = @REPLACE_SQRTL@
REPLACE_STAT = @REPLACE_STAT@
REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
REPLACE_STRTOD = @REPLACE_STRTOD@
REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@
REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
+REPLACE_TANF = @REPLACE_TANF@
+REPLACE_TANHF = @REPLACE_TANHF@
REPLACE_TIMEGM = @REPLACE_TIMEGM@
REPLACE_TMPFILE = @REPLACE_TMPFILE@
REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
REPLACE_WRITE = @REPLACE_WRITE@
SCHED_H = @SCHED_H@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
+STDALIGN_H = @STDALIGN_H@
STDARG_H = @STDARG_H@
STDBOOL_H = @STDBOOL_H@
STDDEF_H = @STDDEF_H@
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_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@
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@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
am__include = @am__include@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
+runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
noinst_HEADERS =
noinst_LIBRARIES =
check_LIBRARIES = libtests.a
-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 \
+EXTRA_DIST = test-alignof.c 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-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 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-closein.sh test-closein.c ctype.in.h test-ctype.c \
+ dirent.in.h test-dirent-c++.cc signature.h test-dirent.c \
+ dirfd.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-fgetc.c signature.h \
+ macros.h filename.h test-filenamecat.c flexmember.h \
+ 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-gnu.c test-getopt-main.h test-getopt.h \
+ test-getopt_long.h macros.h signature.h test-getopt-posix.c \
+ test-getopt-main.h test-getopt.h getpagesize.c \
+ test-getprogname.c signature.h test-gettimeofday.c \
+ test-ignore-value.c test-intprops.c macros.h inttypes.in.h \
+ test-inttypes.c isblank.c test-isblank.c signature.h macros.h \
+ test-isnand-nolibm.c test-isnand.h minus-zero.h infinity.h \
+ nan.h macros.h test-isnanf-nolibm.c test-isnanf.h minus-zero.h \
+ infinity.h nan.h macros.h test-isnanl-nolibm.c test-isnanl.h \
+ minus-zero.h infinity.h nan.h macros.h test-langinfo-c++.cc \
+ signature.h test-langinfo.c test-limits-h.c link.c test-link.h \
+ test-link.c signature.h 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-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 \
- signature.h macros.h test-mbsinit.sh test-mbsinit.c \
- 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 dirent-private.h \
- opendir.c test-pathmax.c test-pipe2.c signature.h macros.h \
+ test-mbrtowc4.sh test-mbrtowc5.sh test-mbrtowc.c \
+ test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh \
+ test-mbrtowc-w32-3.sh test-mbrtowc-w32-4.sh \
+ test-mbrtowc-w32-5.sh test-mbrtowc-w32.c signature.h macros.h \
+ test-mbsinit.sh test-mbsinit.c signature.h macros.h \
+ test-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 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 \
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-stat.c signature.h macros.h stdalign.in.h test-stdalign.c \
+ 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 \
# 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
+BUILT_SOURCES = ctype.h dirent.h inttypes.h $(am__append_13) \
+ arg-nonnull.h c++defs.h unused-parameter.h warn-on-use.h \
+ $(STDALIGN_H)
SUFFIXES =
+
+# This test expects compilation of test-verify.c to fail, and
+# each time it fails, the makefile rule does not perform the usual
+# "mv -f $name.Tpo $name.po, so tell make clean to remove that file.
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
+ ctype.h ctype.h-t 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 stdalign.h stdalign.h-t .deps/test-verify.Tpo
MOSTLYCLEANDIRS =
CLEANFILES =
DISTCLEANFILES =
gl_array_oset.c localename.c
libtests_a_LIBADD = $(M4tests_LIBOBJS)
libtests_a_DEPENDENCIES = $(M4tests_LIBOBJS)
-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
+EXTRA_libtests_a_SOURCES = closedir.c dirfd.c dup.c fdopen.c \
+ getcwd-lgpl.c getpagesize.c isblank.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
test_array_oset_LDADD = $(LDADD) @LIBINTL@
test_c_stack_LDADD = $(LDADD) $(LIBCSTACK) @LIBINTL@
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)
+test_getopt_gnu_LDADD = $(LDADD) $(LIBINTL)
+test_getopt_posix_LDADD = $(LDADD) $(LIBINTL)
+test_getprogname_LDADD = $(LDADD)
@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@ $(LIBTHREAD)
@ANSICXX_TRUE@test_math_c___LDADD = $(LDADD) $(COPYSIGNL_LIBM) $(RINT_LIBM) $(RINTL_LIBM)
test_pipe2_LDADD = $(LDADD) $(LIBSOCKET)
test_quotearg_simple_LDADD = $(LDADD) @LIBINTL@
-test_regex_LDADD = $(LDADD) @LIBINTL@
+test_regex_LDADD = $(LDADD) @LIBINTL@ $(LIBTHREAD) $(LIB_PTHREAD)
@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)
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign tests/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*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:
+$(srcdir)/gnulib.mk $(am__empty):
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
clean-noinstPROGRAMS:
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+test-alignof$(EXEEXT): $(test_alignof_OBJECTS) $(test_alignof_DEPENDENCIES) $(EXTRA_test_alignof_DEPENDENCIES)
+ @rm -f test-alignof$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_alignof_OBJECTS) $(test_alignof_LDADD) $(LIBS)
+
test-alloca-opt$(EXEEXT): $(test_alloca_opt_OBJECTS) $(test_alloca_opt_DEPENDENCIES) $(EXTRA_test_alloca_opt_DEPENDENCIES)
@rm -f test-alloca-opt$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_alloca_opt_OBJECTS) $(test_alloca_opt_LDADD) $(LIBS)
@rm -f test-closein$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_closein_OBJECTS) $(test_closein_LDADD) $(LIBS)
+test-ctype$(EXEEXT): $(test_ctype_OBJECTS) $(test_ctype_DEPENDENCIES) $(EXTRA_test_ctype_DEPENDENCIES)
+ @rm -f test-ctype$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_ctype_OBJECTS) $(test_ctype_LDADD) $(LIBS)
+
test-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)
@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) $(EXTRA_test_getopt_DEPENDENCIES)
- @rm -f test-getopt$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(test_getopt_OBJECTS) $(test_getopt_LDADD) $(LIBS)
+test-getopt-gnu$(EXEEXT): $(test_getopt_gnu_OBJECTS) $(test_getopt_gnu_DEPENDENCIES) $(EXTRA_test_getopt_gnu_DEPENDENCIES)
+ @rm -f test-getopt-gnu$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_getopt_gnu_OBJECTS) $(test_getopt_gnu_LDADD) $(LIBS)
+
+test-getopt-posix$(EXEEXT): $(test_getopt_posix_OBJECTS) $(test_getopt_posix_DEPENDENCIES) $(EXTRA_test_getopt_posix_DEPENDENCIES)
+ @rm -f test-getopt-posix$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_getopt_posix_OBJECTS) $(test_getopt_posix_LDADD) $(LIBS)
+
+test-getprogname$(EXEEXT): $(test_getprogname_OBJECTS) $(test_getprogname_DEPENDENCIES) $(EXTRA_test_getprogname_DEPENDENCIES)
+ @rm -f test-getprogname$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_getprogname_OBJECTS) $(test_getprogname_LDADD) $(LIBS)
test-gettimeofday$(EXEEXT): $(test_gettimeofday_OBJECTS) $(test_gettimeofday_DEPENDENCIES) $(EXTRA_test_gettimeofday_DEPENDENCIES)
@rm -f test-gettimeofday$(EXEEXT)
@rm -f test-inttypes$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_inttypes_OBJECTS) $(test_inttypes_LDADD) $(LIBS)
+test-isblank$(EXEEXT): $(test_isblank_OBJECTS) $(test_isblank_DEPENDENCIES) $(EXTRA_test_isblank_DEPENDENCIES)
+ @rm -f test-isblank$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_isblank_OBJECTS) $(test_isblank_LDADD) $(LIBS)
+
test-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)
@rm -f test-langinfo-c++$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(test_langinfo_c___OBJECTS) $(test_langinfo_c___LDADD) $(LIBS)
+test-limits-h$(EXEEXT): $(test_limits_h_OBJECTS) $(test_limits_h_DEPENDENCIES) $(EXTRA_test_limits_h_DEPENDENCIES)
+ @rm -f test-limits-h$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_limits_h_OBJECTS) $(test_limits_h_LDADD) $(LIBS)
+
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)
@rm -f test-lstat$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_lstat_OBJECTS) $(test_lstat_LDADD) $(LIBS)
-test-malloc-gnu$(EXEEXT): $(test_malloc_gnu_OBJECTS) $(test_malloc_gnu_DEPENDENCIES) $(EXTRA_test_malloc_gnu_DEPENDENCIES)
- @rm -f test-malloc-gnu$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(test_malloc_gnu_OBJECTS) $(test_malloc_gnu_LDADD) $(LIBS)
-
test-malloca$(EXEEXT): $(test_malloca_OBJECTS) $(test_malloca_DEPENDENCIES) $(EXTRA_test_malloca_DEPENDENCIES)
@rm -f test-malloca$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_malloca_OBJECTS) $(test_malloca_LDADD) $(LIBS)
@rm -f test-stat$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_stat_OBJECTS) $(test_stat_LDADD) $(LIBS)
+test-stdalign$(EXEEXT): $(test_stdalign_OBJECTS) $(test_stdalign_DEPENDENCIES) $(EXTRA_test_stdalign_DEPENDENCIES)
+ @rm -f test-stdalign$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_stdalign_OBJECTS) $(test_stdalign_LDADD) $(LIBS)
+
test-stdbool$(EXEEXT): $(test_stdbool_OBJECTS) $(test_stdbool_DEPENDENCIES) $(EXTRA_test_stdbool_DEPENDENCIES)
@rm -f test-stdbool$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_stdbool_OBJECTS) $(test_stdbool_LDADD) $(LIBS)
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/closedir.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirfd.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)/isblank.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)/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-alignof.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-alloca-opt.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-array_list.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-array_oset.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-ctype.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-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-getopt-gnu.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getopt-posix.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getprogname.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-gettimeofday.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ignore-value.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-intprops.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-inttypes.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isblank.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isnand-nolibm.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isnanf-nolibm.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isnanl-nolibm.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-langinfo-c++.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-langinfo.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-limits-h.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-link.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-linkedhash_list.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-locale-c++.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@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-malloc-gnu.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-malloca.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-math-c++.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-math-c++2.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-stdalign.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdbool.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stddef.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdint.Po@am__quote@
if test -n "$$am__remaking_logs"; then \
echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
"recursion detected" >&2; \
- else \
+ elif test -n "$$redo_logs"; then \
am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
fi; \
if $(am__make_dryrun); then :; else \
am__force_recheck=am--force-recheck \
TEST_LOGS="$$log_list"; \
exit $$?
+test-alignof.log: test-alignof$(EXEEXT)
+ @p='test-alignof$(EXEEXT)'; \
+ b='test-alignof'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-alloca-opt.log: test-alloca-opt$(EXEEXT)
@p='test-alloca-opt$(EXEEXT)'; \
b='test-alloca-opt'; \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-ctype.log: test-ctype$(EXEEXT)
+ @p='test-ctype$(EXEEXT)'; \
+ b='test-ctype'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-dirent-c++.log: test-dirent-c++$(EXEEXT)
@p='test-dirent-c++$(EXEEXT)'; \
b='test-dirent-c++'; \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
-test-getopt.log: test-getopt$(EXEEXT)
- @p='test-getopt$(EXEEXT)'; \
- b='test-getopt'; \
+test-getopt-gnu.log: test-getopt-gnu$(EXEEXT)
+ @p='test-getopt-gnu$(EXEEXT)'; \
+ b='test-getopt-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-getopt-posix.log: test-getopt-posix$(EXEEXT)
+ @p='test-getopt-posix$(EXEEXT)'; \
+ b='test-getopt-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-getprogname.log: test-getprogname$(EXEEXT)
+ @p='test-getprogname$(EXEEXT)'; \
+ b='test-getprogname'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-isblank.log: test-isblank$(EXEEXT)
+ @p='test-isblank$(EXEEXT)'; \
+ b='test-isblank'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-isnand-nolibm.log: test-isnand-nolibm$(EXEEXT)
@p='test-isnand-nolibm$(EXEEXT)'; \
b='test-isnand-nolibm'; \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-limits-h.log: test-limits-h$(EXEEXT)
+ @p='test-limits-h$(EXEEXT)'; \
+ b='test-limits-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-link.log: test-link$(EXEEXT)
@p='test-link$(EXEEXT)'; \
b='test-link'; \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
-test-malloc-gnu.log: test-malloc-gnu$(EXEEXT)
- @p='test-malloc-gnu$(EXEEXT)'; \
- b='test-malloc-gnu'; \
- $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
- --log-file $$b.log --trs-file $$b.trs \
- $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
- "$$tst" $(AM_TESTS_FD_REDIRECT)
test-malloca.log: test-malloca$(EXEEXT)
@p='test-malloca$(EXEEXT)'; \
b='test-malloca'; \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-mbrtowc5.sh.log: test-mbrtowc5.sh
+ @p='test-mbrtowc5.sh'; \
+ b='test-mbrtowc5.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-mbrtowc-w32-1.sh.log: test-mbrtowc-w32-1.sh
@p='test-mbrtowc-w32-1.sh'; \
b='test-mbrtowc-w32-1.sh'; \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
+test-stdalign.log: test-stdalign$(EXEEXT)
+ @p='test-stdalign$(EXEEXT)'; \
+ b='test-stdalign'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
test-stdbool.log: test-stdbool$(EXEEXT)
@p='test-stdbool$(EXEEXT)'; \
b='test-stdbool'; \
mostlyclean-local pdf pdf-am ps ps-am recheck tags tags-am \
uninstall uninstall-am
+.PRECIOUS: Makefile
+
+
+# We need the following in order to create <ctype.h> when the system
+# doesn't have one that works with the given compiler.
+ctype.h: ctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''GUARD_PREFIX''@|GL_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_CTYPE_H''@|$(NEXT_CTYPE_H)|g' \
+ -e 's/@''GNULIB_ISBLANK''@/$(GNULIB_ISBLANK)/g' \
+ -e 's/@''HAVE_ISBLANK''@/$(HAVE_ISBLANK)/g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/ctype.in.h; \
+ } > $@-t && \
+ mv $@-t $@
# We need the following in order to create <dirent.h> when the system
# doesn't have one that works with the given compiler.
-e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \
-e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \
-e 's/@''REPLACE_STRTOIMAX''@/$(REPLACE_STRTOIMAX)/g' \
+ -e 's/@''REPLACE_STRTOUMAX''@/$(REPLACE_STRTOUMAX)/g' \
-e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \
-e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \
-e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \
> $@-t && \
mv $@-t $@
+# We need the following in order to create <stdalign.h> when the system
+# doesn't have one that works.
+@GL_GENERATE_STDALIGN_H_TRUE@stdalign.h: stdalign.in.h $(top_builddir)/config.status
+@GL_GENERATE_STDALIGN_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
+@GL_GENERATE_STDALIGN_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+@GL_GENERATE_STDALIGN_H_TRUE@ cat $(srcdir)/stdalign.in.h; \
+@GL_GENERATE_STDALIGN_H_TRUE@ } > $@-t && \
+@GL_GENERATE_STDALIGN_H_TRUE@ mv $@-t $@
+@GL_GENERATE_STDALIGN_H_FALSE@stdalign.h: $(top_builddir)/config.status
+@GL_GENERATE_STDALIGN_H_FALSE@ rm -f $@
+
# Clean up after Solaris cc.
clean-local:
rm -rf SunWS_cache
/* Stop reading the entries of a directory.
- Copyright (C) 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
int
closedir (DIR *dirp)
{
-# if REPLACE_FCHDIR
+# if REPLACE_FCHDIR || REPLACE_DIRFD
int fd = dirfd (dirp);
# endif
int retval;
retval = closedir (dirp);
+# ifdef __KLIBC__
+ if (!retval)
+ _gl_unregister_dirp_fd (fd);
+# endif
#else
if (dirp->current != INVALID_HANDLE_VALUE)
--- /dev/null
+/* A substitute for ISO C99 <ctype.h>, for platforms on which it is incomplete.
+
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute 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 Bruno Haible. */
+
+/*
+ * ISO C 99 <ctype.h> for platforms on which it is incomplete.
+ * <http://www.opengroup.org/onlinepubs/9699919799/basedefs/ctype.h.html>
+ */
+
+#ifndef _@GUARD_PREFIX@_CTYPE_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* Include the original <ctype.h>. */
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_CTYPE_H@
+
+#ifndef _@GUARD_PREFIX@_CTYPE_H
+#define _@GUARD_PREFIX@_CTYPE_H
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+/* Return non-zero if c is a blank, i.e. a space or tab character. */
+#if @GNULIB_ISBLANK@
+# if !@HAVE_ISBLANK@
+_GL_EXTERN_C int isblank (int c);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef isblank
+# if HAVE_RAW_DECL_ISBLANK
+_GL_WARN_ON_USE (isblank, "isblank is unportable - "
+ "use gnulib module isblank for portability");
+# endif
+#endif
+
+#endif /* _@GUARD_PREFIX@_CTYPE_H */
+#endif /* _@GUARD_PREFIX@_CTYPE_H */
/* Private details of the DIR type.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* A GNU-like <dirent.h>.
- Copyright (C) 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef opendir
# define opendir rpl_opendir
+# define GNULIB_defined_opendir 1
# endif
_GL_FUNCDECL_RPL (opendir, DIR *, (const char *dir_name) _GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (opendir, DIR *, (const char *dir_name));
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef closedir
# define closedir rpl_closedir
+# define GNULIB_defined_closedir 1
# endif
_GL_FUNCDECL_RPL (closedir, int, (DIR *dirp) _GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (closedir, int, (DIR *dirp));
# endif
_GL_FUNCDECL_RPL (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (dirfd, int, (DIR *));
+
+# ifdef __KLIBC__
+/* Gnulib internal hooks needed to maintain the dirfd metadata. */
+_GL_EXTERN_C int _gl_register_dirp_fd (int fd, DIR *dirp)
+ _GL_ARG_NONNULL ((2));
+_GL_EXTERN_C void _gl_unregister_dirp_fd (int fd);
+# endif
# else
# if defined __cplusplus && defined GNULIB_NAMESPACE && defined dirfd
/* dirfd is defined as a macro and not as a function.
--- /dev/null
+/* dirfd.c -- return the file descriptor associated with an open DIR*
+
+ Copyright (C) 2001, 2006, 2008-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General 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. */
+
+#include <config.h>
+
+#include <dirent.h>
+#include <errno.h>
+
+#ifdef __KLIBC__
+# include <stdlib.h>
+# include <io.h>
+
+static struct dirp_fd_list
+{
+ DIR *dirp;
+ int fd;
+ struct dirp_fd_list *next;
+} *dirp_fd_start = NULL;
+
+/* Register fd associated with dirp to dirp_fd_list. */
+int
+_gl_register_dirp_fd (int fd, DIR *dirp)
+{
+ struct dirp_fd_list *new_dirp_fd = malloc (sizeof *new_dirp_fd);
+ if (!new_dirp_fd)
+ return -1;
+
+ new_dirp_fd->dirp = dirp;
+ new_dirp_fd->fd = fd;
+ new_dirp_fd->next = dirp_fd_start;
+
+ dirp_fd_start = new_dirp_fd;
+
+ return 0;
+}
+
+/* Unregister fd from dirp_fd_list with closing it */
+void
+_gl_unregister_dirp_fd (int fd)
+{
+ struct dirp_fd_list *dirp_fd;
+ struct dirp_fd_list *dirp_fd_prev;
+
+ for (dirp_fd_prev = NULL, dirp_fd = dirp_fd_start; dirp_fd;
+ dirp_fd_prev = dirp_fd, dirp_fd = dirp_fd->next)
+ {
+ if (dirp_fd->fd == fd)
+ {
+ if (dirp_fd_prev)
+ dirp_fd_prev->next = dirp_fd->next;
+ else /* dirp_fd == dirp_fd_start */
+ dirp_fd_start = dirp_fd_start->next;
+
+ close (fd);
+ free (dirp_fd);
+ break;
+ }
+ }
+}
+#endif
+
+int
+dirfd (DIR *dir_p)
+{
+ int fd = DIR_TO_FD (dir_p);
+ if (fd == -1)
+#ifndef __KLIBC__
+ errno = ENOTSUP;
+#else
+ {
+ struct dirp_fd_list *dirp_fd;
+
+ for (dirp_fd = dirp_fd_start; dirp_fd; dirp_fd = dirp_fd->next)
+ if (dirp_fd->dirp == dir_p)
+ return dirp_fd->fd;
+
+ errno = EINVAL;
+ }
+#endif
+
+ return fd;
+}
/* Duplicate an open file descriptor.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
return result;
}
+#elif defined __KLIBC__
+# include <fcntl.h>
+# include <sys/stat.h>
+
+# include <InnoTekLIBC/backend.h>
+
+static int
+dup_nothrow (int fd)
+{
+ int dupfd;
+ struct stat sbuf;
+
+ dupfd = dup (fd);
+ if (dupfd == -1 && errno == ENOTSUP \
+ && !fstat (fd, &sbuf) && S_ISDIR (sbuf.st_mode))
+ {
+ char path[_MAX_PATH];
+
+ /* Get a path from fd */
+ if (!__libc_Back_ioFHToPath (fd, path, sizeof (path)))
+ dupfd = open (path, O_RDONLY);
+ }
+
+ return dupfd;
+}
#else
# define dup_nothrow dup
#endif
/* Open a stream with a given file descriptor.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Basic filename support macros.
- Copyright (C) 2001-2004, 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
--- /dev/null
+/* Sizes of structs with flexible array members.
+
+ Copyright 2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General 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. */
+
+#include <stddef.h>
+
+/* Nonzero multiple of alignment of TYPE, suitable for FLEXSIZEOF below.
+ On older platforms without _Alignof, use a pessimistic bound that is
+ safe in practice even if FLEXIBLE_ARRAY_MEMBER is 1.
+ On newer platforms, use _Alignof to get a tighter bound. */
+
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
+# define FLEXALIGNOF(type) (sizeof (type) & ~ (sizeof (type) - 1))
+#else
+# define FLEXALIGNOF(type) _Alignof (type)
+#endif
+
+/* Upper bound on the size of a struct of type TYPE with a flexible
+ array member named MEMBER that is followed by N bytes of other data.
+ This is not simply sizeof (TYPE) + N, since it may require
+ alignment on unusually picky C11 platforms, and
+ FLEXIBLE_ARRAY_MEMBER may be 1 on pre-C11 platforms.
+ Yield a value less than N if and only if arithmetic overflow occurs. */
+
+#define FLEXSIZEOF(type, member, n) \
+ ((offsetof (type, member) + FLEXALIGNOF (type) - 1 + (n)) \
+ & ~ (FLEXALIGNOF (type) - 1))
-/* Copyright (C) 2011-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2016 Free Software Foundation, Inc.
This file is part of gnulib.
This program is free software: you can redistribute it and/or modify
/* getpagesize emulation for systems where it cannot be done in a C macro.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Sequential list data type implemented by an array.
- Copyright (C) 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
return list->count;
}
-static const void *
+static const void * _GL_ATTRIBUTE_PURE
gl_array_node_value (gl_list_t list, gl_list_node_t node)
{
uintptr_t index = NODE_TO_INDEX (node);
return 0;
}
-static gl_list_node_t
+static gl_list_node_t _GL_ATTRIBUTE_PURE
gl_array_next_node (gl_list_t list, gl_list_node_t node)
{
uintptr_t index = NODE_TO_INDEX (node);
return NULL;
}
-static gl_list_node_t
+static gl_list_node_t _GL_ATTRIBUTE_PURE
gl_array_previous_node (gl_list_t list, gl_list_node_t node)
{
uintptr_t index = NODE_TO_INDEX (node);
return NULL;
}
-static const void *
+static const void * _GL_ATTRIBUTE_PURE
gl_array_get_at (gl_list_t list, size_t position)
{
size_t count = list->count;
result.count = list->count;
result.p = list->elements + 0;
result.q = list->elements + list->count;
-#ifdef lint
+#if defined GCC_LINT || defined lint
result.i = 0;
result.j = 0;
#endif
result.count = list->count;
result.p = list->elements + start_index;
result.q = list->elements + end_index;
-#ifdef lint
+#if defined GCC_LINT || defined lint
result.i = 0;
result.j = 0;
#endif
/* Sequential list data type implemented by an array.
- Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
/* Ordered set data type implemented by an array.
- Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
result.count = set->count;
result.p = set->elements + 0;
result.q = set->elements + set->count;
-#ifdef lint
+#if defined GCC_LINT || defined lint
result.i = 0;
result.j = 0;
#endif
/* Ordered set data type implemented by an array.
- Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+# Copyright (C) 2002-2016 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
TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' srcdir='$(srcdir)'
+## begin gnulib module alignof-tests
+
+TESTS += test-alignof
+check_PROGRAMS += test-alignof
+
+EXTRA_DIST += test-alignof.c
+
+## end gnulib module alignof-tests
+
## begin gnulib module alloca-opt-tests
TESTS += test-alloca-opt
TESTS += test-c-ctype
check_PROGRAMS += test-c-ctype
-
EXTRA_DIST += test-c-ctype.c macros.h
## end gnulib module c-ctype-tests
## end gnulib module closein-tests
+## begin gnulib module ctype
+
+BUILT_SOURCES += ctype.h
+
+# We need the following in order to create <ctype.h> when the system
+# doesn't have one that works with the given compiler.
+ctype.h: ctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''GUARD_PREFIX''@|GL_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_CTYPE_H''@|$(NEXT_CTYPE_H)|g' \
+ -e 's/@''GNULIB_ISBLANK''@/$(GNULIB_ISBLANK)/g' \
+ -e 's/@''HAVE_ISBLANK''@/$(HAVE_ISBLANK)/g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/ctype.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += ctype.h ctype.h-t
+
+EXTRA_DIST += ctype.in.h
+
+## end gnulib module ctype
+
+## begin gnulib module ctype-tests
+
+TESTS += test-ctype
+check_PROGRAMS += test-ctype
+EXTRA_DIST += test-ctype.c
+
+## end gnulib module ctype-tests
+
## begin gnulib module dirent
BUILT_SOURCES += dirent.h
## end gnulib module dirent-tests
+## begin gnulib module dirfd
+
+
+EXTRA_DIST += dirfd.c
+
+EXTRA_libtests_a_SOURCES += dirfd.c
+
+## end gnulib module dirfd
+
## begin gnulib module dirname-tests
TESTS += test-dirname
## end gnulib module filenamecat-tests
+## begin gnulib module flexmember
+
+
+EXTRA_DIST += flexmember.h
+
+## end gnulib module flexmember
+
## begin gnulib module float-tests
TESTS += test-float
## end gnulib module getdtablesize-tests
+## begin gnulib module getopt-gnu-tests
+
+TESTS += test-getopt-gnu
+check_PROGRAMS += test-getopt-gnu
+test_getopt_gnu_LDADD = $(LDADD) $(LIBINTL)
+EXTRA_DIST += macros.h signature.h test-getopt-gnu.c test-getopt-main.h test-getopt.h test-getopt_long.h
+
+## end gnulib module getopt-gnu-tests
+
## begin gnulib module getopt-posix-tests
-TESTS += test-getopt
-check_PROGRAMS += test-getopt
-test_getopt_LDADD = $(LDADD) $(LIBINTL)
-EXTRA_DIST += macros.h signature.h test-getopt.c test-getopt.h test-getopt_long.h
+TESTS += test-getopt-posix
+check_PROGRAMS += test-getopt-posix
+test_getopt_posix_LDADD = $(LDADD) $(LIBINTL)
+EXTRA_DIST += macros.h signature.h test-getopt-posix.c test-getopt-main.h test-getopt.h
## end gnulib module getopt-posix-tests
## end gnulib module getpagesize
+## begin gnulib module getprogname-tests
+
+DEFS += -DEXEEXT=\"@EXEEXT@\"
+TESTS += test-getprogname
+check_PROGRAMS += test-getprogname
+test_getprogname_LDADD = $(LDADD)
+EXTRA_DIST += test-getprogname.c
+
+## end gnulib module getprogname-tests
+
## begin gnulib module gettimeofday-tests
TESTS += test-gettimeofday
-e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \
-e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \
-e 's/@''REPLACE_STRTOIMAX''@/$(REPLACE_STRTOIMAX)/g' \
+ -e 's/@''REPLACE_STRTOUMAX''@/$(REPLACE_STRTOUMAX)/g' \
-e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \
-e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \
-e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \
## end gnulib module inttypes-tests
+## begin gnulib module isblank
+
+
+EXTRA_DIST += isblank.c
+
+EXTRA_libtests_a_SOURCES += isblank.c
+
+## end gnulib module isblank
+
+## begin gnulib module isblank-tests
+
+TESTS += test-isblank
+check_PROGRAMS += test-isblank
+EXTRA_DIST += test-isblank.c signature.h macros.h
+
+## end gnulib module isblank-tests
+
## begin gnulib module isnand-nolibm-tests
TESTS += test-isnand-nolibm
## end gnulib module langinfo-tests
+## begin gnulib module limits-h-tests
+
+TESTS += test-limits-h
+check_PROGRAMS += test-limits-h
+EXTRA_DIST += test-limits-h.c
+
+## end gnulib module limits-h-tests
+
## begin gnulib module link
## end gnulib module lstat-tests
-## begin gnulib module malloc-gnu-tests
-
-TESTS += test-malloc-gnu
-check_PROGRAMS += test-malloc-gnu
-EXTRA_DIST += test-malloc-gnu.c
-
-## end gnulib module malloc-gnu-tests
-
## begin gnulib module malloca-tests
TESTS += test-malloca
TESTS += \
test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh \
+ test-mbrtowc5.sh \
test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh test-mbrtowc-w32-3.sh \
test-mbrtowc-w32-4.sh test-mbrtowc-w32-5.sh
TESTS_ENVIRONMENT += \
LOCALE_JA='@LOCALE_JA@' \
LOCALE_ZH_CN='@LOCALE_ZH_CN@'
check_PROGRAMS += test-mbrtowc test-mbrtowc-w32
-
-EXTRA_DIST += test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh test-mbrtowc.c test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh test-mbrtowc-w32-3.sh test-mbrtowc-w32-4.sh test-mbrtowc-w32-5.sh test-mbrtowc-w32.c signature.h macros.h
+EXTRA_DIST += test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh test-mbrtowc5.sh test-mbrtowc.c test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh test-mbrtowc-w32-3.sh test-mbrtowc-w32-4.sh test-mbrtowc-w32-5.sh test-mbrtowc-w32.c signature.h macros.h
## end gnulib module mbrtowc-tests
TESTS += test-regex
check_PROGRAMS += test-regex
-test_regex_LDADD = $(LDADD) @LIBINTL@
+test_regex_LDADD = $(LDADD) @LIBINTL@ $(LIBTHREAD) $(LIB_PTHREAD)
EXTRA_DIST += test-regex.c macros.h
## end gnulib module regex-tests
## end gnulib module stat-tests
+## begin gnulib module stdalign
+
+BUILT_SOURCES += $(STDALIGN_H)
+
+# We need the following in order to create <stdalign.h> when the system
+# doesn't have one that works.
+if GL_GENERATE_STDALIGN_H
+stdalign.h: stdalign.in.h $(top_builddir)/config.status
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ cat $(srcdir)/stdalign.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+else
+stdalign.h: $(top_builddir)/config.status
+ rm -f $@
+endif
+MOSTLYCLEANFILES += stdalign.h stdalign.h-t
+
+EXTRA_DIST += stdalign.in.h
+
+## end gnulib module stdalign
+
+## begin gnulib module stdalign-tests
+
+TESTS += test-stdalign
+check_PROGRAMS += test-stdalign
+EXTRA_DIST += test-stdalign.c macros.h
+
+## end gnulib module stdalign-tests
+
## begin gnulib module stdbool-tests
TESTS += test-stdbool
TESTS_ENVIRONMENT += MAKE='$(MAKE)'
TESTS += test-verify test-verify.sh
check_PROGRAMS += test-verify
+
+# This test expects compilation of test-verify.c to fail, and
+# each time it fails, the makefile rule does not perform the usual
+# "mv -f $name.Tpo $name.po, so tell make clean to remove that file.
+MOSTLYCLEANFILES += .deps/test-verify.Tpo
EXTRA_DIST += test-verify.c test-verify.sh
## end gnulib module verify-tests
/* Macros for infinity.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Infinityf () returns a 'float' +Infinity. */
-/* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */
-#if defined _MSC_VER
+/* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f.
+ The IBM XL C compiler on z/OS complains. */
+#if defined _MSC_VER || (defined __MVS__ && defined __IBMC__)
static float
Infinityf ()
{
/* Infinityd () returns a 'double' +Infinity. */
-/* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */
-#if defined _MSC_VER
+/* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0.
+ The IBM XL C compiler on z/OS complains. */
+#if defined _MSC_VER || (defined __MVS__ && defined __IBMC__)
static double
Infinityd ()
{
/* 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
+/* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L.
+ The IBM XL C compiler on z/OS complains. */
+#if defined _MSC_VER || (defined __MVS__ && defined __IBMC__)
+static long double
Infinityl ()
{
static long double zero = 0.0L;
# source this file; set up for tests
-# Copyright (C) 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2009-2016 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# Running a single test, with verbose output:
# $ make check TESTS=test-foo.sh VERBOSE=yes
#
+# Running a single test, keeping the temporary directory:
+# $ make check TESTS=test-foo.sh KEEP=yes
+#
# Running a single test, with single-stepping:
# 1. Go into a sub-shell:
# $ bash
fatal_ () { warn_ "$ME_: hard error: $@"; Exit 99; }
framework_failure_ () { warn_ "$ME_: set-up failure: $@"; Exit 99; }
+# This is used to simplify checking of the return value
+# which is useful when ensuring a command fails as desired.
+# I.e., just doing `command ... &&fail=1` will not catch
+# a segfault in command for example. With this helper you
+# instead check an explicit exit code like
+# returns_ 1 command ... || fail
+returns_ () {
+ # Disable tracing so it doesn't interfere with stderr of the wrapped command
+ { set +x; } 2>/dev/null
+
+ local exp_exit="$1"
+ shift
+ "$@"
+ test $? -eq $exp_exit && ret_=0 || ret_=1
+
+ if test "$VERBOSE" = yes && test "$gl_set_x_corrupts_stderr_" = false; then
+ set -x
+ fi
+ { return $ret_; } 2>/dev/null
+}
+
# Sanitize this shell to POSIX mode, if possible.
DUALCASE=1; export DUALCASE
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
fi
# We require $(...) support unconditionally.
+# We require non-surprising "local" semantics (this eliminates dash).
+# This takes the admittedly draconian step of eliminating dash, because the
+# assignment tab=$(printf '\t') works fine, yet preceding it with "local "
+# transforms it into an assignment that sets the variable to the empty string.
+# That is too counter-intuitive, and can lead to subtle run-time malfunction.
+# The example below is less subtle in that with dash, it evokes the run-time
+# exception "dash: 1: local: 1: bad variable name".
# We require a few additional shell features only when $EXEEXT is nonempty,
# in order to support automatic $EXEEXT emulation:
# - hyphen-containing alias names
# ? - not ok
gl_shell_test_script_='
test $(echo y) = y || exit 1
+f_local_() { local v=1; }; f_local_ || exit 1
+f_dash_local_fail_() { local t=$(printf " 1"); }; f_dash_local_fail_
score_=10
if test "$VERBOSE" = yes; then
test -n "$( (exec 3>&1; set -x; P=1 true 2>&3) 2> /dev/null)" && score_=9
*x*) opts_=-x ;;
*) opts_= ;;
esac
+ re_shell=$re_shell_
+ export re_shell
exec "$re_shell_" $opts_ "$0" --no-reexec "$@"
echo "$ME_: exec failed" 1>&2
exit 127
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.
+for diff_opt_ in -u -U3 -c '' no; do
+ test "$diff_opt_" != no &&
+ diff_out_=`exec 2>/dev/null; diff $diff_opt_ "$0" "$0" < /dev/null` &&
+ break
+done
+if test "$diff_opt_" != no; then
if test -z "$diff_out_"; then
- compare_ () { diff -u "$@"; }
+ compare_ () { diff $diff_opt_ "$@"; }
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
+ # If no differences were found, AIX and HP-UX 'diff' produce output
+ # like "No differences encountered". Hide this output.
+ diff $diff_opt_ "$@" > diff.out
+ diff_status_=$?
+ test $diff_status_ -eq 0 || cat diff.out || diff_status_=2
+ rm -f diff.out || diff_status_=2
+ return $diff_status_
}
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
+elif cmp -s /dev/null /dev/null 2>/dev/null; then
compare_ () { cmp -s "$@"; }
else
compare_ () { cmp "$@"; }
{
__st=$?
cleanup_
- # cd out of the directory we're about to remove
- cd "$initial_cwd_" || cd / || cd /tmp
- chmod -R u+rwx "$test_dir_"
- # If removal fails and exit status was to be 0, then change it to 1.
- rm -rf "$test_dir_" || { test $__st = 0 && __st=1; }
+ if test "$KEEP" = yes; then
+ echo "Not removing temporary directory $test_dir_"
+ else
+ # cd out of the directory we're about to remove
+ cd "$initial_cwd_" || cd / || cd /tmp
+ chmod -R u+rwx "$test_dir_"
+ # If removal fails and exit status was to be 0, then change it to 1.
+ rm -rf "$test_dir_" || { test $__st = 0 && __st=1; }
+ fi
exit $__st
}
fi
initial_cwd_=$PWD
- fail=0
pfx_=`testdir_prefix_`
test_dir_=`mktempd_ "$initial_cwd_" "$pfx_-$ME_.XXXX"` \
# Disallow any trailing slash on specified destdir:
# it would subvert the post-mktemp "case"-based destdir test.
case $destdir_ in
- /) ;;
+ / | //) destdir_slash_=$destdir;;
*/) fail_ "invalid destination dir: remove trailing slash(es)";;
+ *) destdir_slash_=$destdir_/;;
esac
case $template_ in
esac
# First, try to use mktemp.
- d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` \
- || fail=1
+ d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` &&
# The resulting name must be in the specified directory.
- case $d in "$destdir_"*);; *) fail=1;; esac
+ case $d in "$destdir_slash_"*) :;; *) false;; esac &&
# It must have created the directory.
- test -d "$d" || fail=1
+ test -d "$d" &&
# It must have 0700 permissions. Handle sticky "S" bits.
- perms=`ls -dgo "$d" 2>/dev/null|tr S -` || fail=1
- case $perms in drwx------*) ;; *) fail=1;; esac
-
- test $fail = 0 && {
+ perms=`ls -dgo "$d" 2>/dev/null` &&
+ case $perms in drwx--[-S]---*) :;; *) false;; esac && {
echo "$d"
return
}
i_=1
while :; do
X_=`rand_bytes_ $nx_`
- candidate_dir_="$destdir_/$base_template_$X_"
+ candidate_dir_="$destdir_slash_$base_template_$X_"
err_=`mkdir -m 0700 "$candidate_dir_" 2>&1` \
&& { echo "$candidate_dir_"; return; }
test $MAX_TRIES_ -le $i_ && break;
-/* Copyright (C) 2006-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2016 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Derek Price.
This file is part of gnulib.
#endif
/* Get CHAR_BIT. */
#include <limits.h>
+/* On mingw, __USE_MINGW_ANSI_STDIO only works if <stdio.h> is also included */
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# include <stdio.h>
+#endif
#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
#if @GNULIB_STRTOUMAX@
-# if !@HAVE_DECL_STRTOUMAX@
-# undef strtoumax
+# if @REPLACE_STRTOUMAX@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef strtoumax
+# define strtoumax rpl_strtoumax
+# endif
+_GL_FUNCDECL_RPL (strtoumax, uintmax_t,
+ (const char *, char **, int) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strtoumax, uintmax_t, (const char *, char **, int));
+# else
+# if !@HAVE_DECL_STRTOUMAX@
+# undef strtoumax
_GL_FUNCDECL_SYS (strtoumax, uintmax_t,
(const char *, char **, int) _GL_ARG_NONNULL ((1)));
-# endif
+# endif
_GL_CXXALIAS_SYS (strtoumax, uintmax_t, (const char *, char **, int));
+# endif
_GL_CXXALIASWARN (strtoumax);
#elif defined GNULIB_POSIXCHECK
# undef strtoumax
--- /dev/null
+/* Test whether a character is a blank.
+
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General 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 <ctype.h>
+
+int
+isblank (int c)
+{
+ /* On all known platforms, in all predefined locales, isblank(c) is likely
+ equivalent with (c == ' ' || c == '\t'). Look at the glibc definition
+ (in glibc/localedata/locales/i18n): The "blank" characters are '\t', ' ',
+ U+1680, U+180E, U+2000..U+2006, U+2008..U+200A, U+205F, U+3000, and none
+ except the first two is present in a common 8-bit encoding. Therefore
+ the substitute for other platforms is not more complicated than this. */
+ return (c == ' ' || c == '\t');
+}
/* Emulate link on platforms that lack it, namely native Windows platforms.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Determine name of the currently selected locale.
- Copyright (C) 1995-2013 Free Software Foundation, Inc.
+ Copyright (C) 1995-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <locale.h>
#include <string.h>
+#include "flexmember.h"
+
#if HAVE_USELOCALE
/* Mac OS X 10.5 defines the locale_t type in <xlocale.h>. */
# if defined __APPLE__ && defined __MACH__
# include <xlocale.h>
# endif
-# include <langinfo.h>
+# if __GLIBC__ >= 2 && !defined __UCLIBC__
+# include <langinfo.h>
+# endif
# if !defined IN_LIBINTL
# include "glthread/lock.h"
# endif
+# if defined __sun && HAVE_GETLOCALENAME_L
+/* Solaris >= 12. */
+extern char * getlocalename_l(int, locale_t);
+# endif
#endif
#if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
#if defined _WIN32 || defined __WIN32__
# define WINDOWS_NATIVE
+# if !defined IN_LIBINTL
+# include "glthread/lock.h"
+# endif
#endif
#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
+# include <winnls.h>
/* List of language codes, sorted by value:
0x01 LANG_ARABIC
0x02 LANG_BULGARIAN
# ifndef LOCALE_SNAME
# define LOCALE_SNAME 0x5c
# endif
+# ifndef LOCALE_NAME_MAX_LENGTH
+# define LOCALE_NAME_MAX_LENGTH 85
+# endif
#endif
return gl_locale_name_from_win32_LANGID (langid);
}
+# ifdef WINDOWS_NATIVE
+
+/* Two variables to interface between get_lcid and the EnumLocales
+ callback function below. */
+static LCID found_lcid;
+static char lname[LC_MAX * (LOCALE_NAME_MAX_LENGTH + 1) + 1];
+
+/* Callback function for EnumLocales. */
+static BOOL CALLBACK
+enum_locales_fn (LPTSTR locale_num_str)
+{
+ char *endp;
+ char locval[2 * LOCALE_NAME_MAX_LENGTH + 1 + 1];
+ LCID try_lcid = strtoul (locale_num_str, &endp, 16);
+
+ if (GetLocaleInfo (try_lcid, LOCALE_SENGLANGUAGE,
+ locval, LOCALE_NAME_MAX_LENGTH))
+ {
+ strcat (locval, "_");
+ if (GetLocaleInfo (try_lcid, LOCALE_SENGCOUNTRY,
+ locval + strlen (locval), LOCALE_NAME_MAX_LENGTH))
+ {
+ size_t locval_len = strlen (locval);
+
+ if (strncmp (locval, lname, locval_len) == 0
+ && (lname[locval_len] == '.'
+ || lname[locval_len] == '\0'))
+ {
+ found_lcid = try_lcid;
+ return FALSE;
+ }
+ }
+ }
+ return TRUE;
+}
+
+/* This lock protects the get_lcid against multiple simultaneous calls. */
+gl_lock_define_initialized(static, get_lcid_lock)
+
+/* Return the Locale ID (LCID) number given the locale's name, a
+ string, in LOCALE_NAME. This works by enumerating all the locales
+ supported by the system, until we find one whose name matches
+ LOCALE_NAME. */
+static LCID
+get_lcid (const char *locale_name)
+{
+ /* A simple cache. */
+ static LCID last_lcid;
+ static char last_locale[1000];
+
+ /* Lock while looking for an LCID, to protect access to static
+ variables: last_lcid, last_locale, found_lcid, and lname. */
+ gl_lock_lock (get_lcid_lock);
+ if (last_lcid > 0 && strcmp (locale_name, last_locale) == 0)
+ {
+ gl_lock_unlock (get_lcid_lock);
+ return last_lcid;
+ }
+ strncpy (lname, locale_name, sizeof (lname) - 1);
+ lname[sizeof (lname) - 1] = '\0';
+ found_lcid = 0;
+ EnumSystemLocales (enum_locales_fn, LCID_SUPPORTED);
+ if (found_lcid > 0)
+ {
+ last_lcid = found_lcid;
+ strcpy (last_locale, locale_name);
+ }
+ gl_lock_unlock (get_lcid_lock);
+ return found_lcid;
+}
+
+# endif
#endif
-#if HAVE_USELOCALE /* glibc or Mac OS X */
+#if HAVE_USELOCALE /* glibc, Solaris >= 12 or Mac OS X */
/* Simple hash set of strings. We don't want to drag in lots of hash table
code here. */
/* A hash function for NUL-terminated char* strings using
the method described by Bruno Haible.
See http://www.haible.de/bruno/hashfunc.html. */
-static size_t
+static size_t _GL_ATTRIBUTE_PURE
string_hash (const void *x)
{
const char *s = (const char *) x;
struct hash_node
{
struct hash_node * volatile next;
- char contents[100]; /* has variable size */
+ char contents[FLEXIBLE_ARRAY_MEMBER];
};
# define HASH_TABLE_SIZE 257
size = strlen (string) + 1;
new_node =
(struct hash_node *)
- malloc (offsetof (struct hash_node, contents[0]) + size);
+ malloc (FLEXSIZEOF (struct hash_node, contents, size));
if (new_node == NULL)
/* Out of memory. Return a statically allocated string. */
return "C";
return "";
}
return querylocale (mask, thread_locale);
+# elif defined __sun && HAVE_GETLOCALENAME_L
+ /* Solaris >= 12. */
+ return getlocalename_l (category, thread_locale);
+# elif defined __ANDROID__
+ return MB_CUR_MAX == 4 ? "C.UTF-8" : "C";
# endif
}
}
const char *name = gl_locale_name_thread_unsafe (category, categoryname);
if (name != NULL)
return struniq (name);
+#elif defined WINDOWS_NATIVE
+ if (LC_MIN <= category && category <= LC_MAX)
+ {
+ char *locname = setlocale (category, NULL);
+ LCID lcid = 0;
+
+ /* If CATEGORY is LC_ALL, the result might be a semi-colon
+ separated list of locales. We need only one, so we take the
+ one corresponding to LC_CTYPE, as the most important for
+ character translations. */
+ if (strchr (locname, ';'))
+ locname = setlocale (LC_CTYPE, NULL);
+
+ /* Convert locale name to LCID. We don't want to use
+ LocaleNameToLCID because (a) it is only available since Vista,
+ and (b) it doesn't accept locale names returned by 'setlocale'. */
+ lcid = get_lcid (locname);
+
+ if (lcid > 0)
+ return gl_locale_name_from_win32_LCID (lcid);
+ }
#endif
return NULL;
}
/* Determine name of the currently selected locale.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
not require such a facility."
The result must not be freed; it is statically allocated. */
-extern const char * gl_locale_name_default (void);
-
+extern const char * gl_locale_name_default (void)
+#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE \
+ || defined _WIN32 || defined __WIN32__ || defined __CYGWIN__)
+ _GL_ATTRIBUTE_CONST
+#endif
+ ;
#ifdef __cplusplus
}
/* Common macros used by gnulib tests.
- Copyright (C) 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
{ \
if (!(expr)) \
{ \
- fprintf (ASSERT_STREAM, "%s:%d: assertion failed\n", \
- __FILE__, __LINE__); \
+ fprintf (ASSERT_STREAM, "%s:%d: assertion '%s' failed\n", \
+ __FILE__, __LINE__, #expr); \
fflush (ASSERT_STREAM); \
abort (); \
} \
/* Macros for floating-point negative zero.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Macros for not-a-number.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* IBM z/OS supports both hexadecimal and IEEE floating-point formats. The
+ former does not support NaN and its isnan() implementation returns zero
+ for all values. */
+#if defined __MVS__ && defined __IBMC__ && !defined __BFP__
+# error "NaN is not supported with IBM's hexadecimal floating-point format; please re-compile with -qfloat=ieee"
+#endif
+
/* NaNf () returns a 'float' not-a-number. */
/* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler choke
- on the expression 0.0 / 0.0. */
-#if defined __DECC || defined _MSC_VER
+ on the expression 0.0 / 0.0. The IBM XL C compiler on z/OS complains. */
+#if defined __DECC || defined _MSC_VER || (defined __MVS__ && defined __IBMC__)
static float
NaNf ()
{
/* NaNd () returns a 'double' not-a-number. */
/* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler choke
- on the expression 0.0 / 0.0. */
-#if defined __DECC || defined _MSC_VER
+ on the expression 0.0 / 0.0. The IBM XL C compiler on z/OS complains. */
+#if defined __DECC || defined _MSC_VER || (defined __MVS__ && defined __IBMC__)
static double
NaNd ()
{
/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
runtime type conversion.
- The Microsoft MSVC 9 compiler chokes on the expression 0.0L / 0.0L. */
+ The Microsoft MSVC 9 compiler chokes on the expression 0.0L / 0.0L.
+ The IBM XL C compiler on z/OS complains. */
#ifdef __sgi
static long double NaNl ()
{
double zero = 0.0;
return zero / zero;
}
-#elif defined _MSC_VER
+#elif defined _MSC_VER || (defined __MVS__ && defined __IBMC__)
static long double
NaNl ()
{
/* Start reading the entries of a directory.
- Copyright (C) 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# include <unistd.h>
#endif
+#ifdef __KLIBC__
+# include <io.h>
+# include <fcntl.h>
+#endif
+
DIR *
opendir (const char *dir_name)
{
if (dirp == NULL)
return NULL;
+# ifdef __KLIBC__
+ {
+ int fd = open (dir_name, O_RDONLY);
+ if (fd == -1 || _gl_register_dirp_fd (fd, dirp))
+ {
+ int saved_errno = errno;
+
+ close (fd);
+ closedir (dirp);
+
+ errno = saved_errno;
+
+ return NULL;
+ }
+ }
+# endif
#else
char dir_name_mask[MAX_PATH + 1 + 1 + 1];
-/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2013 Free Software
+/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2016 Free Software
Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C
/* Some random 'double' numbers used by gnulib tests.
- Copyright (C) 2012-2013 Free Software Foundation, Inc.
+ Copyright (C) 2012-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Some random 'long double' numbers used by gnulib tests.
- Copyright (C) 2012-2013 Free Software Foundation, Inc.
+ Copyright (C) 2012-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Read the next entry of a directory.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-/* Copyright (C) 1992, 1995-2003, 2005-2013 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995-2003, 2005-2016 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
-/* Set the current locale.
- Copyright (C) 2009, 2011-2013 Free Software Foundation, Inc.
+/* Set the current locale. -*- coding: utf-8 -*-
+ Copyright (C) 2009, 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
{ "sq", "Albanian" },
{ "sr", "Serbian (Latin)" },
{ "sr@cyrillic", "SRB" }, /* Serbian (Cyrillic) */
+ { "sv", "Swedish" },
{ "sw", "Swahili" },
{ "syr", "Syriac" },
{ "ta", "Tamil" },
/* Macro for checking that a function declaration is compliant.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Pausing execution of the current thread.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify
--- /dev/null
+/* A substitute for ISO C11 <stdalign.h>.
+
+ Copyright 2011-2016 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute 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 Paul Eggert and Bruno Haible. */
+
+#ifndef _GL_STDALIGN_H
+#define _GL_STDALIGN_H
+
+/* ISO C11 <stdalign.h> for platforms that lack it.
+
+ References:
+ ISO C11 (latest free draft
+ <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf>)
+ sections 6.5.3.4, 6.7.5, 7.15.
+ C++11 (latest free draft
+ <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf>)
+ section 18.10. */
+
+/* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment
+ requirement of a structure member (i.e., slot or field) that is of
+ type TYPE, as an integer constant expression.
+
+ This differs from GCC's __alignof__ operator, which can yield a
+ better-performing alignment for an object of that type. For
+ example, on x86 with GCC, __alignof__ (double) and __alignof__
+ (long long) are 8, whereas alignof (double) and alignof (long long)
+ are 4 unless the option '-malign-double' is used.
+
+ The result cannot be used as a value for an 'enum' constant, if you
+ want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc.
+
+ Include <stddef.h> for offsetof. */
+#include <stddef.h>
+
+/* FreeBSD 9.1 <sys/cdefs.h>, included by <stddef.h> and lots of other
+ standard headers, defines conflicting implementations of _Alignas
+ and _Alignof that are no better than ours; override them. */
+#undef _Alignas
+#undef _Alignof
+
+/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023
+ <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
+#if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \
+ || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9)))
+# ifdef __cplusplus
+# if 201103 <= __cplusplus
+# define _Alignof(type) alignof (type)
+# else
+ template <class __t> struct __alignof_helper { char __a; __t __b; };
+# define _Alignof(type) offsetof (__alignof_helper<type>, __b)
+# endif
+# else
+# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b)
+# endif
+#endif
+#if ! (defined __cplusplus && 201103 <= __cplusplus)
+# define alignof _Alignof
+#endif
+#define __alignof_is_defined 1
+
+/* alignas (A), also known as _Alignas (A), aligns a variable or type
+ to the alignment A, where A is an integer constant expression. For
+ example:
+
+ int alignas (8) foo;
+ struct s { int a; int alignas (8) bar; };
+
+ aligns the address of FOO and the offset of BAR to be multiples of 8.
+
+ A should be a power of two that is at least the type's alignment
+ and at most the implementation's alignment limit. This limit is
+ 2**28 on typical GNUish hosts, and 2**13 on MSVC. To be portable
+ to MSVC through at least version 10.0, A should be an integer
+ constant, as MSVC does not support expressions such as 1 << 3.
+ To be portable to Sun C 5.11, do not align auto variables to
+ anything stricter than their default alignment.
+
+ The following C11 requirements are not supported here:
+
+ - If A is zero, alignas has no effect.
+ - alignas can be used multiple times; the strictest one wins.
+ - alignas (TYPE) is equivalent to alignas (alignof (TYPE)).
+
+ */
+
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
+# if defined __cplusplus && 201103 <= __cplusplus
+# define _Alignas(a) alignas (a)
+# elif ((defined __APPLE__ && defined __MACH__ \
+ ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
+ : __GNUC__) \
+ || 061200 <= __HP_cc || 061200 <= __HP_aCC \
+ || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__)
+# define _Alignas(a) __attribute__ ((__aligned__ (a)))
+# elif 1300 <= _MSC_VER
+# define _Alignas(a) __declspec (align (a))
+# endif
+#endif
+#if ((defined _Alignas && ! (defined __cplusplus && 201103 <= __cplusplus)) \
+ || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
+# define alignas _Alignas
+#endif
+#if defined alignas || (defined __cplusplus && 201103 <= __cplusplus)
+# define __alignas_is_defined 1
+#endif
+
+#endif /* _GL_STDALIGN_H */
-/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2013 Free Software
+/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2016 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
/* Stub for symlink().
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
--- /dev/null
+/* Test of <alignof.h>.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General 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>, 2009. */
+
+#include <config.h>
+
+#include <alignof.h>
+
+#include <stddef.h>
+#include <stdint.h>
+
+#include "verify.h"
+
+typedef long double longdouble;
+typedef struct { char a[1]; } struct1;
+typedef struct { char a[2]; } struct2;
+typedef struct { char a[3]; } struct3;
+typedef struct { char a[4]; } struct4;
+
+#define CHECK(type) \
+ typedef struct { char slot1; type slot2; } type##_helper; \
+ verify (alignof_slot (type) == offsetof (type##_helper, slot2)); \
+ const int type##_slot_alignment = alignof_slot (type); \
+ const int type##_type_alignment = alignof_type (type);
+
+CHECK (char)
+CHECK (short)
+CHECK (int)
+CHECK (long)
+CHECK (float)
+CHECK (double)
+CHECK (longdouble)
+#ifdef INT64_MAX
+CHECK (int64_t)
+#endif
+CHECK (struct1)
+CHECK (struct2)
+CHECK (struct3)
+CHECK (struct4)
+
+int
+main ()
+{
+ return 0;
+}
/* Test of optional automatic memory allocation.
- Copyright (C) 2005, 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of sequential list data type implementation.
- Copyright (C) 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify
#include <stdlib.h>
-#include "progname.h"
#include "macros.h"
static const char *objects[15] =
{
gl_list_t list1, list2;
- set_program_name (argv[0]);
-
/* Allow the user to provide a non-default random seed on the command line. */
if (argc > 1)
srand (atoi (argv[1]));
/* Test of ordered set data type implementation.
- Copyright (C) 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify
#include "gl_xlist.h"
#include "gl_array_list.h"
-#include "progname.h"
#include "macros.h"
static const char *objects[30] =
gl_oset_t set1;
gl_list_t set2;
- set_program_name (argv[0]);
-
/* Allow the user to provide a non-default random seed on the command line. */
if (argc > 1)
srand (atoi (argv[1]));
/* Test of ordered set data type implementation.
- Copyright (C) 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
#include <string.h>
#include "gl_array_oset.h"
-#include "progname.h"
#include "macros.h"
extern void gl_avltree_oset_check_invariants (gl_oset_t set);
{
gl_oset_t set1, set2;
- set_program_name (argv[0]);
-
/* Allow the user to provide a non-default random seed on the command line. */
if (argc > 1)
srand (atoi (argv[1]));
/* Test of binary mode I/O.
- Copyright (C) 2005, 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of conversion of unibyte character to wide character.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of character handling in C locale.
- Copyright (C) 2005, 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "c-ctype.h"
+#include <ctype.h>
+#include <limits.h>
#include <locale.h>
#include "macros.h"
static void
-test_all (void)
+test_agree_with_C_locale (void)
{
int c;
- for (c = -0x80; c < 0x100; c++)
+ for (c = 0; c <= UCHAR_MAX; c++)
{
- ASSERT (c_isascii (c) == (c >= 0 && c < 0x80));
-
- switch (c)
+ ASSERT (c_isascii (c) == (isascii (c) != 0));
+ if (c_isascii (c))
{
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
- case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
- case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
- case 'Y': case 'Z':
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
- case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
- case 's': case 't': case 'u': case 'v': case 'w': case 'x':
- case 'y': case 'z':
- case '0': case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '8': case '9':
- ASSERT (c_isalnum (c) == 1);
- break;
- default:
- ASSERT (c_isalnum (c) == 0);
- break;
+ ASSERT (c_isalnum (c) == (isalnum (c) != 0));
+ ASSERT (c_isalpha (c) == (isalpha (c) != 0));
+ ASSERT (c_isblank (c) == (isblank (c) != 0));
+ ASSERT (c_iscntrl (c) == (iscntrl (c) != 0));
+ ASSERT (c_isdigit (c) == (isdigit (c) != 0));
+ ASSERT (c_islower (c) == (islower (c) != 0));
+ ASSERT (c_isgraph (c) == (isgraph (c) != 0));
+ ASSERT (c_isprint (c) == (isprint (c) != 0));
+ ASSERT (c_ispunct (c) == (ispunct (c) != 0));
+ ASSERT (c_isspace (c) == (isspace (c) != 0));
+ ASSERT (c_isupper (c) == (isupper (c) != 0));
+ ASSERT (c_isxdigit (c) == (isxdigit (c) != 0));
+ ASSERT (c_tolower (c) == tolower (c));
+ ASSERT (c_toupper (c) == toupper (c));
}
+ }
+}
- switch (c)
+static void
+test_all (void)
+{
+ int c;
+ int n_isascii = 0;
+
+ for (c = CHAR_MIN; c <= UCHAR_MAX; c++)
+ {
+ if (! (0 <= c && c <= CHAR_MAX))
{
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
- case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
- case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
- case 'Y': case 'Z':
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
- case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
- case 's': case 't': case 'u': case 'v': case 'w': case 'x':
- case 'y': case 'z':
- ASSERT (c_isalpha (c) == 1);
- break;
- default:
- ASSERT (c_isalpha (c) == 0);
- break;
+ ASSERT (! c_isascii (c));
+ ASSERT (! c_isalnum (c));
+ ASSERT (! c_isalpha (c));
+ ASSERT (! c_isblank (c));
+ ASSERT (! c_iscntrl (c));
+ ASSERT (! c_isdigit (c));
+ ASSERT (! c_islower (c));
+ ASSERT (! c_isgraph (c));
+ ASSERT (! c_isprint (c));
+ ASSERT (! c_ispunct (c));
+ ASSERT (! c_isspace (c));
+ ASSERT (! c_isupper (c));
+ ASSERT (! c_isxdigit (c));
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == c);
}
+ n_isascii += c_isascii (c);
+
+#ifdef C_CTYPE_ASCII
+ ASSERT (c_isascii (c) == (0 <= c && c <= 0x7f));
+#endif
+
+ ASSERT (c_isascii (c) == (c_isprint (c) || c_iscntrl (c)));
+
+ ASSERT (c_isalnum (c) == (c_isalpha (c) || c_isdigit (c)));
+
+ ASSERT (c_isalpha (c) == (c_islower (c) || c_isupper (c)));
+
switch (c)
{
case '\t': case ' ':
break;
}
+#ifdef C_CTYPE_ASCII
ASSERT (c_iscntrl (c) == ((c >= 0 && c < 0x20) || c == 0x7f));
+#endif
+
+ switch (c)
+ {
+ case '\a': case '\b': case '\f': case '\n':
+ case '\r': case '\t': case '\v':
+ ASSERT (c_iscntrl (c));
+ break;
+ }
+
+ ASSERT (! (c_iscntrl (c) && c_isprint (c)));
switch (c)
{
case 's': case 't': case 'u': case 'v': case 'w': case 'x':
case 'y': case 'z':
ASSERT (c_islower (c) == 1);
+ ASSERT (c_toupper (c) == c - 'a' + 'A');
break;
default:
ASSERT (c_islower (c) == 0);
+ ASSERT (c_toupper (c) == c);
break;
}
+#ifdef C_CTYPE_ASCII
ASSERT (c_isgraph (c) == ((c >= 0x20 && c < 0x7f) && c != ' '));
ASSERT (c_isprint (c) == (c >= 0x20 && c < 0x7f));
+#endif
+
+ ASSERT (c_isgraph (c) == (c_isalnum (c) || c_ispunct (c)));
+
+ ASSERT (c_isprint (c) == (c_isgraph (c) || c == ' '));
- ASSERT (c_ispunct (c) == (c_isgraph (c) && !c_isalnum (c)));
+ switch (c)
+ {
+ case '!': case '"': case '#': case '$': case '%': case '&': case '\'':
+ case '(': case ')': case '*': case '+': case ',': case '-': case '.':
+ case '/': case ':': case ';': case '<': case '=': case '>': case '?':
+ case '@': case '[': case'\\': case ']': case '^': case '_': case '`':
+ case '{': case '|': case '}': case '~':
+ ASSERT (c_ispunct (c) == 1);
+ break;
+ default:
+ ASSERT (c_ispunct (c) == 0);
+ break;
+ }
switch (c)
{
case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
case 'Y': case 'Z':
ASSERT (c_isupper (c) == 1);
+ ASSERT (c_tolower (c) == c - 'A' + 'a');
break;
default:
ASSERT (c_isupper (c) == 0);
+ ASSERT (c_tolower (c) == c);
break;
}
ASSERT (c_isxdigit (c) == 0);
break;
}
-
- switch (c)
- {
- case 'A':
- ASSERT (c_tolower (c) == 'a');
- ASSERT (c_toupper (c) == c);
- break;
- case 'B':
- ASSERT (c_tolower (c) == 'b');
- ASSERT (c_toupper (c) == c);
- break;
- case 'C':
- ASSERT (c_tolower (c) == 'c');
- ASSERT (c_toupper (c) == c);
- break;
- case 'D':
- ASSERT (c_tolower (c) == 'd');
- ASSERT (c_toupper (c) == c);
- break;
- case 'E':
- ASSERT (c_tolower (c) == 'e');
- ASSERT (c_toupper (c) == c);
- break;
- case 'F':
- ASSERT (c_tolower (c) == 'f');
- ASSERT (c_toupper (c) == c);
- break;
- case 'G':
- ASSERT (c_tolower (c) == 'g');
- ASSERT (c_toupper (c) == c);
- break;
- case 'H':
- ASSERT (c_tolower (c) == 'h');
- ASSERT (c_toupper (c) == c);
- break;
- case 'I':
- ASSERT (c_tolower (c) == 'i');
- ASSERT (c_toupper (c) == c);
- break;
- case 'J':
- ASSERT (c_tolower (c) == 'j');
- ASSERT (c_toupper (c) == c);
- break;
- case 'K':
- ASSERT (c_tolower (c) == 'k');
- ASSERT (c_toupper (c) == c);
- break;
- case 'L':
- ASSERT (c_tolower (c) == 'l');
- ASSERT (c_toupper (c) == c);
- break;
- case 'M':
- ASSERT (c_tolower (c) == 'm');
- ASSERT (c_toupper (c) == c);
- break;
- case 'N':
- ASSERT (c_tolower (c) == 'n');
- ASSERT (c_toupper (c) == c);
- break;
- case 'O':
- ASSERT (c_tolower (c) == 'o');
- ASSERT (c_toupper (c) == c);
- break;
- case 'P':
- ASSERT (c_tolower (c) == 'p');
- ASSERT (c_toupper (c) == c);
- break;
- case 'Q':
- ASSERT (c_tolower (c) == 'q');
- ASSERT (c_toupper (c) == c);
- break;
- case 'R':
- ASSERT (c_tolower (c) == 'r');
- ASSERT (c_toupper (c) == c);
- break;
- case 'S':
- ASSERT (c_tolower (c) == 's');
- ASSERT (c_toupper (c) == c);
- break;
- case 'T':
- ASSERT (c_tolower (c) == 't');
- ASSERT (c_toupper (c) == c);
- break;
- case 'U':
- ASSERT (c_tolower (c) == 'u');
- ASSERT (c_toupper (c) == c);
- break;
- case 'V':
- ASSERT (c_tolower (c) == 'v');
- ASSERT (c_toupper (c) == c);
- break;
- case 'W':
- ASSERT (c_tolower (c) == 'w');
- ASSERT (c_toupper (c) == c);
- break;
- case 'X':
- ASSERT (c_tolower (c) == 'x');
- ASSERT (c_toupper (c) == c);
- break;
- case 'Y':
- ASSERT (c_tolower (c) == 'y');
- ASSERT (c_toupper (c) == c);
- break;
- case 'Z':
- ASSERT (c_tolower (c) == 'z');
- ASSERT (c_toupper (c) == c);
- break;
- case 'a':
- ASSERT (c_tolower (c) == c);
- ASSERT (c_toupper (c) == 'A');
- break;
- case 'b':
- ASSERT (c_tolower (c) == c);
- ASSERT (c_toupper (c) == 'B');
- break;
- case 'c':
- ASSERT (c_tolower (c) == c);
- ASSERT (c_toupper (c) == 'C');
- break;
- case 'd':
- ASSERT (c_tolower (c) == c);
- ASSERT (c_toupper (c) == 'D');
- break;
- case 'e':
- ASSERT (c_tolower (c) == c);
- ASSERT (c_toupper (c) == 'E');
- break;
- case 'f':
- ASSERT (c_tolower (c) == c);
- ASSERT (c_toupper (c) == 'F');
- break;
- case 'g':
- ASSERT (c_tolower (c) == c);
- ASSERT (c_toupper (c) == 'G');
- break;
- case 'h':
- ASSERT (c_tolower (c) == c);
- ASSERT (c_toupper (c) == 'H');
- break;
- case 'i':
- ASSERT (c_tolower (c) == c);
- ASSERT (c_toupper (c) == 'I');
- break;
- case 'j':
- ASSERT (c_tolower (c) == c);
- ASSERT (c_toupper (c) == 'J');
- break;
- case 'k':
- ASSERT (c_tolower (c) == c);
- ASSERT (c_toupper (c) == 'K');
- break;
- case 'l':
- ASSERT (c_tolower (c) == c);
- ASSERT (c_toupper (c) == 'L');
- break;
- case 'm':
- ASSERT (c_tolower (c) == c);
- ASSERT (c_toupper (c) == 'M');
- break;
- case 'n':
- ASSERT (c_tolower (c) == c);
- ASSERT (c_toupper (c) == 'N');
- break;
- case 'o':
- ASSERT (c_tolower (c) == c);
- ASSERT (c_toupper (c) == 'O');
- break;
- case 'p':
- ASSERT (c_tolower (c) == c);
- ASSERT (c_toupper (c) == 'P');
- break;
- case 'q':
- ASSERT (c_tolower (c) == c);
- ASSERT (c_toupper (c) == 'Q');
- break;
- case 'r':
- ASSERT (c_tolower (c) == c);
- ASSERT (c_toupper (c) == 'R');
- break;
- case 's':
- ASSERT (c_tolower (c) == c);
- ASSERT (c_toupper (c) == 'S');
- break;
- case 't':
- ASSERT (c_tolower (c) == c);
- ASSERT (c_toupper (c) == 'T');
- break;
- case 'u':
- ASSERT (c_tolower (c) == c);
- ASSERT (c_toupper (c) == 'U');
- break;
- case 'v':
- ASSERT (c_tolower (c) == c);
- ASSERT (c_toupper (c) == 'V');
- break;
- case 'w':
- ASSERT (c_tolower (c) == c);
- ASSERT (c_toupper (c) == 'W');
- break;
- case 'x':
- ASSERT (c_tolower (c) == c);
- ASSERT (c_toupper (c) == 'X');
- break;
- case 'y':
- ASSERT (c_tolower (c) == c);
- ASSERT (c_toupper (c) == 'Y');
- break;
- case 'z':
- ASSERT (c_tolower (c) == c);
- ASSERT (c_toupper (c) == 'Z');
- break;
- default:
- ASSERT (c_tolower (c) == c);
- ASSERT (c_toupper (c) == c);
- break;
- }
}
+
+ ASSERT (n_isascii == 128);
}
int
main ()
{
+ test_agree_with_C_locale ();
+
test_all ();
setlocale (LC_ALL, "de_DE");
/* Test of c-stack module.
- Copyright (C) 2002, 2004, 2006, 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2006, 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "macros.h"
-char *program_name;
-
static volatile int *
recurse_1 (volatile int n, volatile int *p)
{
setrlimit (RLIMIT_STACK, &rl);
#endif
- program_name = argv[0];
if (c_stack_action (NULL) == 0)
{
if (1 < argc)
/* Test of case-insensitive string comparison function.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
#include "c-strcase.h"
+#include "c-ctype.h"
#include <locale.h>
#include <string.h>
ASSERT (c_strcasecmp ("\303\266zg\303\274r", "\303\226ZG\303\234R") > 0); /* özgür */
ASSERT (c_strcasecmp ("\303\226ZG\303\234R", "\303\266zg\303\274r") < 0); /* özgür */
+#if C_CTYPE_ASCII
/* This test shows how strings of different size cannot compare equal. */
ASSERT (c_strcasecmp ("turkish", "TURK\304\260SH") < 0);
ASSERT (c_strcasecmp ("TURK\304\260SH", "turkish") > 0);
+#endif
return 0;
}
/* Test of case-insensitive string comparison function.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
#include "c-strcase.h"
+#include "c-ctype.h"
#include <locale.h>
#include <string.h>
ASSERT (c_strncasecmp ("\303\266zg\303\274r", "\303\226ZG\303\234R", 99) > 0); /* özgür */
ASSERT (c_strncasecmp ("\303\226ZG\303\234R", "\303\266zg\303\274r", 99) < 0); /* özgür */
+#if C_CTYPE_ASCII
/* This test shows how strings of different size cannot compare equal. */
ASSERT (c_strncasecmp ("turkish", "TURK\304\260SH", 7) < 0);
ASSERT (c_strncasecmp ("TURK\304\260SH", "turkish", 7) > 0);
+#endif
return 0;
}
/* Test of execution of program termination handlers.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
ASSERT (result2);
ASSERT (stat ("/", &st1) == 0);
ASSERT (stat ("//", &st2) == 0);
+ /* On IBM z/OS, "/" and "//" are distinct, yet they both have
+ st_dev == st_ino == 1. */
+#ifndef __MVS__
if (SAME_INODE (st1, st2))
{
ASSERT (strcmp (result1, "/") == 0);
ASSERT (strcmp (result2, "/") == 0);
}
else
+#endif
{
ASSERT (strcmp (result1, "//") == 0);
ASSERT (strcmp (result2, "//") == 0);
/* Test changing to a directory.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test duplicating non-inheritable file descriptors.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test closing a file or socket.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of closein module.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "binary-io.h"
#include "ignore-value.h"
-char *program_name;
-
/* With no arguments, do nothing. With arguments, attempt to consume
first 6 bytes of stdin. In either case, let exit() take care of
closing std streams and changing exit status if ferror(stdin). */
{
char buf[7];
atexit (close_stdin);
- program_name = argv[0];
/* close_stdin currently relies on ftell, but mingw ftell is
unreliable on text mode input. */
-/* Test of malloc function.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+/* Test of <ctype.h> substitute.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
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 <stdlib.h>
+#include <ctype.h>
int
-main ()
+main (void)
{
- /* Check that malloc (0) is not a NULL pointer. */
- if (malloc (0) == NULL)
- return 1;
-
return 0;
}
/* Test of <dirent.h> substitute in C++ mode.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <dirent.h> substitute.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test the gnulib dirname module.
- Copyright (C) 2005-2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
{
ok = false;
printf ("dir_name '%s': got '%s' len %d,"
- " expected '%s' len %ld\n",
+ " expected '%s' len %lu\n",
t->name, dir, dirlen,
t->dir, (unsigned long) strlen (t->dir));
}
{
ok = false;
printf ("base_name '%s': got '%s' len %d,"
- " expected '%s' len %ld\n",
+ " expected '%s' len %lu\n",
t->name, base, baselen,
t->base, (unsigned long) strlen (t->base));
}
/* Test that dup_safer leaves standard fds alone.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test duplicating a file descriptor.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test duplicating file descriptors.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
errno = 0;
ASSERT (dup2 (fd, -2) == -1);
ASSERT (errno == EBADF);
+ if (bad_fd > 256)
+ {
+ ASSERT (dup2 (fd, 255) == 255);
+ ASSERT (dup2 (fd, 256) == 256);
+ ASSERT (close (255) == 0);
+ ASSERT (close (256) == 0);
+ }
+ ASSERT (dup2 (fd, bad_fd - 1) == bad_fd - 1);
+ ASSERT (close (bad_fd - 1) == 0);
errno = 0;
ASSERT (dup2 (fd, bad_fd) == -1);
ASSERT (errno == EBADF);
/* Test of environ variable.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <errno.h> substitute.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of fclose module.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <fcntl.h> substitute in C++ mode.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <fcntl.h> substitute.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#if O_RSYNC && O_RSYNC != O_DSYNC
case O_RSYNC:
#endif
-#if O_SYNC && O_SYNC != O_RSYNC
+#if O_SYNC && O_SYNC != O_DSYNC && O_SYNC != O_RSYNC
case O_SYNC:
#endif
#if O_TTY_INIT
/* Test of fcntl(2).
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test opening a stream with a file descriptor.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
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);
- }
+ /* Test behavior on failure. POSIX makes it hard to check for
+ failure, since the behavior is not well-defined on invalid file
+ descriptors, so try fdopen 1000 times and if that's not enough to
+ fail due to EMFILE, so be it. */
+
+ int i;
+ for (i = 0; i < 1000; i++)
+ {
+ errno = 0;
+ if (! fdopen (STDOUT_FILENO, "w"))
+ {
+ ASSERT (errno != 0);
+ break;
+ }
+ }
return 0;
}
/* Test of POSIX compatible fflush() function.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of POSIX compatible fflush() function.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of fgetc() function.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of concatenation of two arbitrary file names.
- Copyright (C) 1996-2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 1996-2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdlib.h>
#include <string.h>
-#include "progname.h"
int
main (int argc _GL_UNUSED, char *argv[])
unsigned int i;
bool fail = false;
- set_program_name (argv[0]);
-
for (i = 0; i < sizeof tests / sizeof tests[0]; i++)
{
char *base_in_result;
/* Test of <float.h> substitute.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of opening a file stream.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of opening a file stream.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of opening a file stream.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Ensure that __fpending works.
- Copyright (C) 2004, 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of fpurge() function.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of fputc() function.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of fread() function.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of freadahead() function.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of freading() function.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of splitting a double into fraction and mantissa.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of splitting a double into fraction and mantissa.
- Copyright (C) 2012-2013 Free Software Foundation, Inc.
+ Copyright (C) 2012-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of splitting a 'long double' into fraction and mantissa.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of fseek() function.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of fseeko() function.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of fseeko() function.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of fseeko() function.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Tests of fstat() function.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of ftell() function.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of ftell() function.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of ftello() function.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of ftello() function.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of ftello() function.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of fwrite() function.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of getcwd() function.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of getdtablesize() function.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
main (int argc, char *argv[])
{
ASSERT (getdtablesize () >= 3);
+ ASSERT (dup2 (0, getdtablesize() - 1) == getdtablesize () - 1);
+ ASSERT (dup2 (0, getdtablesize()) == -1);
return 0;
}
--- /dev/null
+/* Test of command line argument processing.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General 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>, 2009. */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+ ftell link warning if we are not using the gnulib ftell module. */
+#define _GL_NO_LARGE_FILES
+
+/* POSIX and glibc provide the getopt() function in <unistd.h>, see
+ http://pubs.opengroup.org/onlinepubs/9699919799/functions/getopt.html
+ https://www.gnu.org/software/libc/manual/html_node/Using-Getopt.html
+ But gnulib provides the getopt() function in <getopt.h>, not in <unistd.h>.
+ This is what we are testing here. */
+#include <getopt.h>
+
+#ifndef __getopt_argv_const
+# define __getopt_argv_const const
+#endif
+#include "signature.h"
+SIGNATURE_CHECK (getopt_long, int, (int, char *__getopt_argv_const *,
+ char const *, struct option const *,
+ int *));
+SIGNATURE_CHECK (getopt_long_only, int, (int, char *__getopt_argv_const *,
+ char const *, struct option const *,
+ int *));
+
+#define TEST_GETOPT_GNU 1
+#define TEST_GETOPT_TMP_NAME "test-getopt-gnu.tmp"
+#include "test-getopt-main.h"
/* Test of command line argument processing.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
-#include <config.h>
-
-/* None of the files accessed by this test are large, so disable the
- ftell link warning if we are not using the gnulib ftell module. */
-#define _GL_NO_LARGE_FILES
-
-#if GNULIB_TEST_GETOPT_GNU
-# include <getopt.h>
-
-# ifndef __getopt_argv_const
-# define __getopt_argv_const const
-# endif
-# include "signature.h"
-SIGNATURE_CHECK (getopt_long, int, (int, char *__getopt_argv_const *,
- char const *, struct option const *,
- int *));
-SIGNATURE_CHECK (getopt_long_only, int, (int, char *__getopt_argv_const *,
- char const *, struct option const *,
- int *));
-
-#endif
-
-#include <unistd.h>
-
#include "signature.h"
SIGNATURE_CHECK (getopt, int, (int, char * const[], char const *));
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
/* This test intentionally remaps stderr. So, we arrange to have fd 10
(outside the range of interesting fd's during the test) set up to
static FILE *myerr;
#include "test-getopt.h"
-#if GNULIB_TEST_GETOPT_GNU
+#if TEST_GETOPT_GNU
# include "test-getopt_long.h"
#endif
|| (myerr = fdopen (BACKUP_STDERR_FILENO, "w")) == NULL)
return 2;
- ASSERT (freopen ("test-getopt.tmp", "w", stderr) == stderr);
+ ASSERT (freopen (TEST_GETOPT_TMP_NAME, "w", stderr) == stderr);
/* These default values are required by POSIX. */
ASSERT (optind == 1);
setenv ("POSIXLY_CORRECT", "1", 1);
test_getopt ();
-#if GNULIB_TEST_GETOPT_GNU
+#if TEST_GETOPT_GNU
test_getopt_long_posix ();
#endif
unsetenv ("POSIXLY_CORRECT");
test_getopt ();
-#if GNULIB_TEST_GETOPT_GNU
+#if TEST_GETOPT_GNU
test_getopt_long ();
test_getopt_long_only ();
#endif
ASSERT (fclose (stderr) == 0);
- ASSERT (remove ("test-getopt.tmp") == 0);
+ ASSERT (remove (TEST_GETOPT_TMP_NAME) == 0);
return 0;
}
--- /dev/null
+/* Test of command line argument processing.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General 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>, 2009. */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+ ftell link warning if we are not using the gnulib ftell module. */
+#define _GL_NO_LARGE_FILES
+
+/* POSIX and glibc provide the getopt() function in <unistd.h>, see
+ http://pubs.opengroup.org/onlinepubs/9699919799/functions/getopt.html
+ https://www.gnu.org/software/libc/manual/html_node/Using-Getopt.html
+ But gnulib provides the getopt() function in <getopt.h>, not in <unistd.h>.
+ Nevertheless the getopt() function should also be found in <unistd.h>. */
+#include <unistd.h>
+
+#define TEST_GETOPT_GNU 0
+#define TEST_GETOPT_TMP_NAME "test-getopt-posix.tmp"
+#include "test-getopt-main.h"
/* Test of command line argument processing.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of command line argument processing.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
--- /dev/null
+/* Test the gnulib getprogname module.
+ Copyright (C) 2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General 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 "getprogname.h"
+#include <string.h>
+#include <assert.h>
+
+#ifdef __hpux
+# define STREQ(a, b) (strncmp (a, b, 14) == 0)
+#else
+# define STREQ(a, b) (strcmp (a, b) == 0)
+#endif
+
+int
+main (void)
+{
+ char const *p = getprogname ();
+
+ /* libtool creates a temporary executable whose name is sometimes prefixed
+ with "lt-" (depends on the platform). But the name of the temporary
+ executable is a detail that should not be visible to the end user and to
+ the test suite. Remove this "lt-" prefix here. */
+ if (strncmp (p, "lt-", 3) == 0)
+ p += 3;
+
+ /* Note: You can make this test fail
+ a) by running it on a case-insensitive file system (such as on Windows,
+ Cygwin, or on Mac OS X with a case-insensitive HFS+ file system),
+ with an invocation that contains upper case characters, e.g.
+ test-GETPROGNAME,
+ b) by hardlinking or symlinking it to a different name (e.g. test-foo)
+ and invoking it through that name.
+ That's not the intended use. The Makefile always invokes it as
+ 'test-getprogname${EXEEXT}'. */
+#if defined __CYGWIN__
+ /* The Cygwin getprogname() function strips the ".exe" suffix. */
+ assert (STREQ (p, "test-getprogname"));
+#else
+ assert (STREQ (p, "test-getprogname" EXEEXT));
+#endif
+
+ return 0;
+}
/*
- * Copyright (C) 2005, 2007, 2009-2013 Free Software Foundation, Inc.
+ * Copyright (C) 2005, 2007, 2009-2016 Free Software Foundation, Inc.
* Written by Jim Meyering.
*
* This program is free software: you can redistribute it and/or modify
/* Test the "ignore-value" module.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#!/bin/sh
# Unit tests for init.sh
-# Copyright (C) 2011-2013 Free Software Foundation, Inc.
+# Copyright (C) 2011-2016 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
# 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
+ # Also, remove space after leading '+', since AIX 7.1 diff outputs a space.
+ sed 's/ .*//;/^@@/d;s/^+ /+/' out > k && mv k out
cat <<\EOF > exp
--- empty
+++ in
/* Test intprops.h.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* 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__
+/* Tell gcc not to warn about the long expressions that the overflow
+ macros expand to, or about the (X < 0) expressions. */
+#if 4 < __GNUC__ + (3 <= __GNUC_MINOR__)
+# pragma GCC diagnostic ignored "-Woverlength-strings"
# pragma GCC diagnostic ignored "-Wtype-limits"
+
+/* Work around a bug in GCC 6.1 and earlier; see:
+ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68971 */
+# pragma GCC diagnostic ignored "-Woverflow"
+
#endif
#include <config.h>
#include <stdbool.h>
#include <inttypes.h>
+#include <limits.h>
#include "macros.h"
# define VERIFY(x) ASSERT (x)
#endif
+#define DONTCARE __LINE__
+
int
main (void)
{
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))));
+ /* Integer representation. Check that it is two's complement. */
+ VERIFY (INT_MIN + INT_MAX < 0);
/* TYPE_MINIMUM, TYPE_MAXIMUM. */
VERIFY (TYPE_MINIMUM (char) == CHAR_MIN);
#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>_OVERFLOW tests, so define macros to do both. OP is the
+ operation, OPNAME its symbolic name, A and B its operands, T the
+ result type, V the overflow flag, and VRES the result if V and if
+ two's complement. CHECK_BINOP is for most binary operatinos,
+ CHECK_SBINOP for binary +, -, * when the result type is signed,
+ and CHECK_UNOP for unary operations. */
+ #define CHECK_BINOP(op, opname, a, b, t, v, vres) \
+ VERIFY (INT_##opname##_RANGE_OVERFLOW (a, b, TYPE_MINIMUM (t), \
+ TYPE_MAXIMUM (t)) \
+ == (v)); \
+ VERIFY (INT_##opname##_OVERFLOW (a, b) == (v))
+ #define CHECK_SBINOP(op, opname, a, b, t, v, vres) \
+ CHECK_BINOP(op, opname, a, b, t, v, vres); \
+ { \
+ t result; \
+ ASSERT (INT_##opname##_WRAPV (a, b, &result) == (v)); \
+ ASSERT (result == ((v) ? (vres) : ((a) op (b)))); \
+ }
+ #define CHECK_UNOP(op, opname, a, t, v) \
+ VERIFY (INT_##opname##_RANGE_OVERFLOW (a, TYPE_MINIMUM (t), \
+ TYPE_MAXIMUM (t)) \
+ == (v)); \
+ VERIFY (INT_##opname##_OVERFLOW (a) == (v))
/* 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));
+
+ CHECK_SBINOP (+, ADD, INT_MAX, 1, int, true, INT_MIN);
+ CHECK_SBINOP (+, ADD, INT_MAX, -1, int, false, INT_MAX - 1);
+ CHECK_SBINOP (+, ADD, INT_MIN, 1, int, false, INT_MIN + 1);
+ CHECK_SBINOP (+, ADD, INT_MIN, -1, int, true, INT_MAX);
+ CHECK_BINOP (+, ADD, UINT_MAX, 1u, unsigned int, true, 0u);
+ CHECK_BINOP (+, ADD, 0u, 1u, unsigned int, false, 1u);
+
+ CHECK_SBINOP (-, SUBTRACT, INT_MAX, 1, int, false, INT_MAX - 1);
+ CHECK_SBINOP (-, SUBTRACT, INT_MAX, -1, int, true, INT_MIN);
+ CHECK_SBINOP (-, SUBTRACT, INT_MIN, 1, int, true, INT_MAX);
+ CHECK_SBINOP (-, SUBTRACT, INT_MIN, -1, int, false, INT_MIN - -1);
+ CHECK_BINOP (-, SUBTRACT, UINT_MAX, 1u, unsigned int, false, UINT_MAX - 1u);
+ CHECK_BINOP (-, SUBTRACT, 0u, 1u, unsigned int, true, 0u - 1u);
+
+ CHECK_UNOP (-, NEGATE, INT_MIN, int, true);
+ CHECK_UNOP (-, NEGATE, 0, int, false);
+ CHECK_UNOP (-, NEGATE, INT_MAX, int, false);
+ CHECK_UNOP (-, NEGATE, 0u, unsigned int, false);
+ CHECK_UNOP (-, NEGATE, 1u, unsigned int, true);
+ CHECK_UNOP (-, NEGATE, UINT_MAX, unsigned int, true);
+
+ CHECK_SBINOP (*, MULTIPLY, INT_MAX, INT_MAX, int, true, 1);
+ CHECK_SBINOP (*, MULTIPLY, INT_MAX, INT_MIN, int, true, INT_MIN);
+ CHECK_SBINOP (*, MULTIPLY, INT_MIN, INT_MAX, int, true, INT_MIN);
+ CHECK_SBINOP (*, MULTIPLY, INT_MIN, INT_MIN, int, true, 0);
+ CHECK_SBINOP (*, MULTIPLY, -1, INT_MIN, int,
+ INT_NEGATE_OVERFLOW (INT_MIN), INT_MIN);
+ CHECK_SBINOP (*, MULTIPLY, LONG_MIN / INT_MAX, (long int) INT_MAX,
+ long int, false, LONG_MIN - LONG_MIN % INT_MAX);
+
+ CHECK_BINOP (/, DIVIDE, INT_MIN, -1, int,
+ INT_NEGATE_OVERFLOW (INT_MIN), INT_MIN);
+ CHECK_BINOP (/, DIVIDE, INT_MAX, 1, int, false, INT_MAX);
+ CHECK_BINOP (/, DIVIDE, (unsigned int) INT_MIN, -1u, unsigned int,
+ false, INT_MIN / -1u);
+
+ CHECK_BINOP (%, REMAINDER, INT_MIN, -1, int, INT_NEGATE_OVERFLOW (INT_MIN), 0);
+ CHECK_BINOP (%, REMAINDER, INT_MAX, 1, int, false, 0);
+ CHECK_BINOP (%, REMAINDER, (unsigned int) INT_MIN, -1u, unsigned int,
+ false, INT_MIN % -1u);
+
+ CHECK_BINOP (<<, LEFT_SHIFT, UINT_MAX, 1, unsigned int, true, UINT_MAX << 1);
+ CHECK_BINOP (<<, LEFT_SHIFT, UINT_MAX / 2 + 1, 1, unsigned int, true,
+ (UINT_MAX / 2 + 1) << 1);
+ CHECK_BINOP (<<, LEFT_SHIFT, UINT_MAX / 2, 1, unsigned int, false,
+ (UINT_MAX / 2) << 1);
+
+ /* INT_<op>_OVERFLOW and INT_<op>_WRAPV with mixed types. */
+ #define CHECK_SUM(a, b, t, v, vres) \
+ CHECK_SUM1(a, b, t, v, vres); \
+ CHECK_SUM1(b, a, t, v, vres)
+ #define CHECK_SSUM(a, b, t, v, vres) \
+ CHECK_SSUM1(a, b, t, v, vres); \
+ CHECK_SSUM1(b, a, t, v, vres)
+ #define CHECK_SUM1(a, b, t, v, vres) \
+ VERIFY (INT_ADD_OVERFLOW (a, b) == (v))
+ #define CHECK_SSUM1(a, b, t, v, vres) \
+ CHECK_SUM1(a, b, t, v, vres); \
+ { \
+ t result; \
+ ASSERT (INT_ADD_WRAPV (a, b, &result) == (v)); \
+ ASSERT (result == ((v) ? (vres) : ((a) + (b)))); \
+ }
+ CHECK_SSUM (-1, LONG_MIN, long int, true, LONG_MAX);
+ CHECK_SUM (-1, UINT_MAX, unsigned int, false, DONTCARE);
+ CHECK_SSUM (-1L, INT_MIN, long int, INT_MIN == LONG_MIN,
+ INT_MIN == LONG_MIN ? INT_MAX : DONTCARE);
+ CHECK_SUM (0u, -1, unsigned int, true, 0u + -1);
+ CHECK_SUM (0u, 0, unsigned int, false, DONTCARE);
+ CHECK_SUM (0u, 1, unsigned int, false, DONTCARE);
+ CHECK_SSUM (1, LONG_MAX, long int, true, LONG_MIN);
+ CHECK_SUM (1, UINT_MAX, unsigned int, true, 0u);
+ CHECK_SSUM (1L, INT_MAX, long int, INT_MAX == LONG_MAX,
+ INT_MAX == LONG_MAX ? INT_MIN : DONTCARE);
+ CHECK_SUM (1u, INT_MAX, unsigned int, INT_MAX == UINT_MAX, 1u + INT_MAX);
+ CHECK_SUM (1u, INT_MIN, unsigned int, true, 1u + INT_MIN);
+ {
+ long int result;
+ ASSERT (INT_ADD_WRAPV (1, INT_MAX, &result) == (INT_MAX == LONG_MAX));
+ ASSERT (INT_ADD_WRAPV (-1, INT_MIN, &result) == (INT_MIN == LONG_MIN));
+ }
+
+ #define CHECK_DIFFERENCE(a, b, t, v, vres) \
+ VERIFY (INT_SUBTRACT_OVERFLOW (a, b) == (v))
+ #define CHECK_SDIFFERENCE(a, b, t, v, vres) \
+ CHECK_DIFFERENCE(a, b, t, v, vres); \
+ { \
+ t result; \
+ ASSERT (INT_SUBTRACT_WRAPV (a, b, &result) == (v)); \
+ ASSERT (result == ((v) ? (vres) : ((a) - (b)))); \
+ }
+ CHECK_DIFFERENCE (INT_MAX, 1u, unsigned int, UINT_MAX < INT_MAX - 1,
+ INT_MAX - 1u);
+ CHECK_DIFFERENCE (UINT_MAX, 1, unsigned int, false, UINT_MAX - 1);
+ CHECK_DIFFERENCE (0u, -1, unsigned int, false, 0u - -1);
+ CHECK_DIFFERENCE (UINT_MAX, -1, unsigned int, true, UINT_MAX - -1);
+ CHECK_DIFFERENCE (INT_MIN, 1u, unsigned int, true, INT_MIN - 1u);
+ CHECK_DIFFERENCE (-1, 0u, unsigned int, true, -1 - 0u);
+ CHECK_SDIFFERENCE (-1, INT_MIN, int, false, -1 - INT_MIN);
+ CHECK_SDIFFERENCE (-1, INT_MAX, int, false, -1 - INT_MAX);
+ CHECK_SDIFFERENCE (0, INT_MIN, int, INT_MIN < -INT_MAX, INT_MIN);
+ CHECK_SDIFFERENCE (0, INT_MAX, int, false, 0 - INT_MAX);
+ {
+ long int result;
+ ASSERT (INT_SUBTRACT_WRAPV (INT_MAX, -1, &result) == (INT_MAX == LONG_MAX));
+ ASSERT (INT_SUBTRACT_WRAPV (INT_MIN, 1, &result) == (INT_MAX == LONG_MAX));
+ }
+
+ #define CHECK_PRODUCT(a, b, t, v, vres) \
+ CHECK_PRODUCT1(a, b, t, v, vres); \
+ CHECK_PRODUCT1(b, a, t, v, vres)
+ #define CHECK_SPRODUCT(a, b, t, v, vres) \
+ CHECK_SPRODUCT1(a, b, t, v, vres); \
+ CHECK_SPRODUCT1(b, a, t, v, vres)
+ #define CHECK_PRODUCT1(a, b, t, v, vres) \
+ VERIFY (INT_MULTIPLY_OVERFLOW (a, b) == (v))
+ #define CHECK_SPRODUCT1(a, b, t, v, vres) \
+ CHECK_PRODUCT1(a, b, t, v, vres); \
+ { \
+ t result; \
+ ASSERT (INT_MULTIPLY_WRAPV (a, b, &result) == (v)); \
+ ASSERT (result == ((v) ? (vres) : ((a) * (b)))); \
+ }
+ CHECK_PRODUCT (-1, 1u, unsigned int, true, -1 * 1u);
+ CHECK_SPRODUCT (-1, INT_MIN, int, INT_NEGATE_OVERFLOW (INT_MIN), INT_MIN);
+ CHECK_PRODUCT (-1, UINT_MAX, unsigned int, true, -1 * UINT_MAX);
+ CHECK_SPRODUCT (-32768, LONG_MAX / -32768 - 1, long int, true, LONG_MIN);
+ CHECK_SPRODUCT (-12345, LONG_MAX / -12345, long int, false, DONTCARE);
+ CHECK_SPRODUCT (0, -1, int, false, DONTCARE);
+ CHECK_SPRODUCT (0, 0, int, false, DONTCARE);
+ CHECK_PRODUCT (0, 0u, unsigned int, false, DONTCARE);
+ CHECK_SPRODUCT (0, 1, int, false, DONTCARE);
+ CHECK_SPRODUCT (0, INT_MAX, int, false, DONTCARE);
+ CHECK_SPRODUCT (0, INT_MIN, int, false, DONTCARE);
+ CHECK_PRODUCT (0, UINT_MAX, unsigned int, false, DONTCARE);
+ CHECK_PRODUCT (0u, -1, unsigned int, false, DONTCARE);
+ CHECK_PRODUCT (0u, 0, unsigned int, false, DONTCARE);
+ CHECK_PRODUCT (0u, 0u, unsigned int, false, DONTCARE);
+ CHECK_PRODUCT (0u, 1, unsigned int, false, DONTCARE);
+ CHECK_PRODUCT (0u, INT_MAX, unsigned int, false, DONTCARE);
+ CHECK_PRODUCT (0u, INT_MIN, unsigned int, false, DONTCARE);
+ CHECK_PRODUCT (0u, UINT_MAX, unsigned int, false, DONTCARE);
+ CHECK_SPRODUCT (1, INT_MAX, int, false, DONTCARE);
+ CHECK_SPRODUCT (1, INT_MIN, int, false, DONTCARE);
+ CHECK_PRODUCT (1, UINT_MAX, unsigned int, false, DONTCARE);
+ CHECK_PRODUCT (1u, INT_MIN, unsigned int, true, 1u * INT_MIN);
+ CHECK_PRODUCT (1u, INT_MAX, unsigned int, UINT_MAX < INT_MAX, 1u * INT_MAX);
+ CHECK_PRODUCT (INT_MAX, UINT_MAX, unsigned int, true, INT_MAX * UINT_MAX);
+ CHECK_PRODUCT (INT_MAX, ULONG_MAX, unsigned long int, true,
+ INT_MAX * ULONG_MAX);
+ CHECK_SPRODUCT (INT_MIN, LONG_MAX / INT_MIN - 1, long int, true, LONG_MIN);
+ CHECK_SPRODUCT (INT_MIN, LONG_MAX / INT_MIN, long int, false, DONTCARE);
+ CHECK_PRODUCT (INT_MIN, UINT_MAX, unsigned int, true, INT_MIN * UINT_MAX);
+ CHECK_PRODUCT (INT_MIN, ULONG_MAX, unsigned long int, true,
+ INT_MIN * ULONG_MAX);
+ {
+ long int result;
+ ASSERT (INT_MULTIPLY_WRAPV (INT_MAX, INT_MAX, &result)
+ == (LONG_MAX / INT_MAX < INT_MAX));
+ ASSERT (INT_MULTIPLY_WRAPV (INT_MAX, INT_MAX, &result)
+ || result == INT_MAX * (long int) INT_MAX);
+ ASSERT (INT_MULTIPLY_WRAPV (INT_MIN, INT_MIN, &result)
+ || result == INT_MIN * (long int) INT_MIN);
+ }
+
+# ifdef LLONG_MAX
+ {
+ long long int result;
+ ASSERT (INT_MULTIPLY_WRAPV (LONG_MAX, LONG_MAX, &result)
+ == (LLONG_MAX / LONG_MAX < LONG_MAX));
+ ASSERT (INT_MULTIPLY_WRAPV (LONG_MAX, LONG_MAX, &result)
+ || result == LONG_MAX * (long long int) LONG_MAX);
+ ASSERT (INT_MULTIPLY_WRAPV (LONG_MIN, LONG_MIN, &result)
+ || result == LONG_MIN * (long long int) LONG_MIN);
+ }
+# endif
+
+ #define CHECK_QUOTIENT(a, b, v) VERIFY (INT_DIVIDE_OVERFLOW (a, b) == (v))
+
+ CHECK_QUOTIENT (INT_MIN, -1L, INT_MIN == LONG_MIN);
+ CHECK_QUOTIENT (INT_MIN, UINT_MAX, false);
+ CHECK_QUOTIENT (INTMAX_MIN, UINTMAX_MAX, false);
+ CHECK_QUOTIENT (INTMAX_MIN, UINT_MAX, false);
+ CHECK_QUOTIENT (-11, 10u, true);
+ CHECK_QUOTIENT (-10, 10u, true);
+ CHECK_QUOTIENT (-9, 10u, false);
+ CHECK_QUOTIENT (11u, -10, true);
+ CHECK_QUOTIENT (10u, -10, true);
+ CHECK_QUOTIENT (9u, -10, false);
+
+ #define CHECK_REMAINDER(a, b, v) VERIFY (INT_REMAINDER_OVERFLOW (a, b) == (v))
+
+ CHECK_REMAINDER (INT_MIN, -1L, INT_MIN == LONG_MIN);
+ CHECK_REMAINDER (-1, UINT_MAX, true);
+ CHECK_REMAINDER ((intmax_t) -1, UINTMAX_MAX, true);
+ CHECK_REMAINDER (INTMAX_MIN, UINT_MAX,
+ (INTMAX_MAX < UINT_MAX
+ && - (unsigned int) INTMAX_MIN % UINT_MAX != 0));
+ CHECK_REMAINDER (INT_MIN, ULONG_MAX, INT_MIN % ULONG_MAX != 1);
+ CHECK_REMAINDER (1u, -1, false);
+ CHECK_REMAINDER (37*39u, -39, false);
+ CHECK_REMAINDER (37*39u + 1, -39, true);
+ CHECK_REMAINDER (37*39u - 1, -39, true);
+ CHECK_REMAINDER (LONG_MAX, -INT_MAX, false);
return 0;
}
/* Test of <inttypes.h> substitute.
- Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
--- /dev/null
+/* Test of isblank() function.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General 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>, 2009. */
+
+#include <config.h>
+
+#include <ctype.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (isblank, int, (int));
+
+#include <limits.h>
+#include <stdio.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+ unsigned int c;
+
+ /* Verify the property in the "C" locale.
+ POSIX specifies in
+ <http://www.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html>
+ that
+ - in all locales, the blank characters include the <space> and <tab>
+ characters,
+ - in the "POSIX" locale (which is usually the same as the "C" locale),
+ the blank characters include only the ASCII <space> and <tab>
+ characters. */
+ for (c = 0; c <= UCHAR_MAX; c++)
+ ASSERT (!isblank (c) == !(c == ' ' || c == '\t'));
+ ASSERT (!isblank (EOF));
+
+ return 0;
+}
/* Test of isnand() substitute.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of isnand() substitute.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of isnanf() substitute.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of isnanf() substitute.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of isnanl() substitute.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of isnanl() substitute.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* A bit pattern that is different from a Quiet NaN. With a bit of luck,
it's a Signalling NaN. */
{
+#if defined __powerpc__ && LDBL_MANT_DIG == 106
+ /* This is PowerPC "double double", a pair of two doubles. Inf and Nan are
+ represented as the corresponding 64-bit IEEE values in the first double;
+ the second is ignored. Manipulate only the first double. */
+ #undef NWORDS
+ #define NWORDS \
+ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+#endif
+
memory_long_double m;
m.value = NaNl ();
# if LDBL_EXPBIT0_BIT > 0
# ifdef WORDS_BIGENDIAN
# define LDBL80_WORDS(exponent,manthi,mantlo) \
{ ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
- ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
+ ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
(unsigned int) (mantlo) << 16 \
}
# else
{ LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
ASSERT (isnanl (x.value));
}
- /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
- Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
- Intel IA-64 Architecture Software Developer's Manual, Volume 1:
- Application Architecture.
- Table 5-2 "Floating-Point Register Encodings"
- Figure 5-6 "Memory to Floating-Point Register Data Translation"
- */
+ /* isnanl should return something for noncanonical values. */
{ /* Pseudo-NaN. */
static memory_long_double x =
{ LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
- ASSERT (isnanl (x.value));
+ ASSERT (isnanl (x.value) || !isnanl (x.value));
}
{ /* Pseudo-Infinity. */
static memory_long_double x =
{ LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
- ASSERT (isnanl (x.value));
+ ASSERT (isnanl (x.value) || !isnanl (x.value));
}
{ /* Pseudo-Zero. */
static memory_long_double x =
{ LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
- ASSERT (isnanl (x.value));
+ ASSERT (isnanl (x.value) || !isnanl (x.value));
}
{ /* Unnormalized number. */
static memory_long_double x =
{ LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
- ASSERT (isnanl (x.value));
+ ASSERT (isnanl (x.value) || !isnanl (x.value));
}
{ /* Pseudo-Denormal. */
static memory_long_double x =
{ LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
- ASSERT (isnanl (x.value));
+ ASSERT (isnanl (x.value) || !isnanl (x.value));
}
#endif
/* Test of <langinfo.h> substitute in C++ mode.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <langinfo.h> substitute.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
--- /dev/null
+/* Test of <limits.h> substitute.
+ Copyright 2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General 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. */
+
+#include <config.h>
+
+#include <limits.h>
+
+#include "verify.h"
+
+#if 4 < __GNUC__ + (3 <= __GNUC_MINOR__)
+# pragma GCC diagnostic ignored "-Woverlength-strings"
+#endif
+
+/* Macros specified by ISO/IEC TS 18661-1:2014. */
+
+#define verify_width(width, min, max) \
+ verify ((max) >> ((width) - 1 - ((min) < 0)) == 1)
+
+verify_width (CHAR_WIDTH, CHAR_MIN, CHAR_MAX);
+verify_width (SCHAR_WIDTH, SCHAR_MIN, SCHAR_MAX);
+verify_width (UCHAR_WIDTH, 0, UCHAR_MAX);
+verify_width (SHRT_WIDTH, SHRT_MIN, SHRT_MAX);
+verify_width (USHRT_WIDTH, 0, USHRT_MAX);
+verify_width (INT_WIDTH, INT_MIN, INT_MAX);
+verify_width (UINT_WIDTH, 0, UINT_MAX);
+verify_width (LONG_WIDTH, LONG_MIN, LONG_MAX);
+verify_width (ULONG_WIDTH, 0, ULONG_MAX);
+verify_width (LLONG_WIDTH, LLONG_MIN, LLONG_MAX);
+verify_width (ULLONG_WIDTH, 0, ULLONG_MAX);
+
+int
+main (void)
+{
+ return 0;
+}
/* Test of link() function.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of link() function.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of sequential list data type implementation.
- Copyright (C) 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
#include <string.h>
#include "gl_array_list.h"
-#include "progname.h"
#include "macros.h"
static const char *objects[15] =
{
gl_list_t list1, list2, list3;
- set_program_name (argv[0]);
-
/* Allow the user to provide a non-default random seed on the command line. */
if (argc > 1)
srand (atoi (argv[1]));
/* Test of <locale.h> substitute in C++ mode.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <locale.h> substitute in C++ mode.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <locale.h> substitute.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
LC_TIME
};
-#if HAVE_NEWLOCALE
-/* Check that the locale_t type and the LC_GLOBAL_LOCALE macro are defined. */
-locale_t b = LC_GLOBAL_LOCALE;
-#endif
-
/* Check that the 'struct lconv' type is defined. */
struct lconv l;
int ls;
int
main ()
{
+#if HAVE_NEWLOCALE
+ /* Check that the locale_t type and the LC_GLOBAL_LOCALE macro are defined. */
+ locale_t b = LC_GLOBAL_LOCALE;
+ (void) b;
+#endif
+
/* Check that 'struct lconv' has the ISO C and POSIX specified members. */
ls += sizeof (*l.decimal_point);
ls += sizeof (*l.thousands_sep);
/* Test of localeconv() function.
- Copyright (C) 2012-2013 Free Software Foundation, Inc.
+ Copyright (C) 2012-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of gl_locale_name function and its variants.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
name = gl_locale_name (LC_MESSAGES, "LC_MESSAGES");
ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+ uselocale (LC_GLOBAL_LOCALE);
+ freelocale (locale);
}
}
for (i = 0; i < SIZEOF (categories); i++)
{
int category_mask = categories[i].mask;
- locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
- if (locale != NULL)
+ locale_t loc = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
+ if (loc != NULL)
{
- locale = newlocale (category_mask, "de_DE.UTF-8", locale);
- if (locale != NULL)
+ locale_t locale = newlocale (category_mask, "de_DE.UTF-8", loc);
+ if (locale == NULL)
+ freelocale (loc);
+ else
{
unsigned int j;
else
ASSERT (strcmp (name_j, "fr_FR.UTF-8") == 0);
}
+ uselocale (LC_GLOBAL_LOCALE);
+ freelocale (locale);
}
}
}
ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
name = gl_locale_name_thread (LC_MESSAGES, "LC_MESSAGES");
ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+ uselocale (LC_GLOBAL_LOCALE);
+ freelocale (locale);
}
}
for (i = 0; i < SIZEOF (categories); i++)
{
int category_mask = categories[i].mask;
- locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
- if (locale != NULL)
+ locale_t loc = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
+ if (loc != NULL)
{
- locale = newlocale (category_mask, "de_DE.UTF-8", locale);
- if (locale != NULL)
+ locale_t locale = newlocale (category_mask, "de_DE.UTF-8", loc);
+ if (locale == NULL)
+ freelocale (loc);
+ else
{
unsigned int j;
else
ASSERT (strcmp (name_j, "fr_FR.UTF-8") == 0);
}
+ uselocale (LC_GLOBAL_LOCALE);
+ freelocale (locale);
}
}
}
ASSERT (strcmp (unsaved_names[j][i], name) == 0);
}
uselocale (LC_GLOBAL_LOCALE);
+ freelocale (locale);
}
}
/* Verify the unsaved_names are still valid. */
unsigned int i;
for (i = 0; i < SIZEOF (categories); i++)
- ASSERT (strcmp (unsaved_names[j][i], saved_names[j][i]) == 0);
+ {
+ ASSERT (strcmp (unsaved_names[j][i], saved_names[j][i]) == 0);
+ free (saved_names[j][i]);
+ }
}
}
#else
uselocale (locale);
name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
ASSERT (strcmp (name, "C") == 0);
+ uselocale (LC_GLOBAL_LOCALE);
+ freelocale (locale);
}
}
#endif
uselocale (locale);
name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES");
ASSERT (strcmp (name, "C") == 0);
+ uselocale (LC_GLOBAL_LOCALE);
+ freelocale (locale);
}
}
#endif
{
uselocale (locale);
ASSERT (strcmp (gl_locale_name_default (), name) == 0);
+ uselocale (LC_GLOBAL_LOCALE);
+ freelocale (locale);
}
}
#endif
/* Test of lseek() function.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of lstat() function.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of lstat() function.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of safe automatic memory allocation.
- Copyright (C) 2005, 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <math.h> substitute in C++ mode.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "signature.h"
/* Signature check for a function that takes a real-floating argument.
- Check that each overloaded function with the specified signature exists. */
+ Check that each overloaded function with the specified signature
+ exists in the GNULIB_NAMESPACE namespace. */
#define REAL_FLOATING_CHECK(func,\
rettype1, parameters1,\
rettype2, parameters2,\
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)
+ = static_cast<rettype(*)parameters>(GNULIB_NAMESPACE::func)
/* Keep these checks in the same order as math.in.h! */
/* Test of <math.h> substitute in C++ mode.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <math.h> substitute.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of conversion of multibyte character to wide character.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of conversion of multibyte character to wide character.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
memset (&state, '\0', sizeof (mbstate_t));
wc = (wchar_t) 0xBADFACE;
ret = mbrtowc (&wc, "x", 0, &state);
- /* gnulib's implementation returns (size_t)(-2).
- The AIX 5.1 implementation returns (size_t)(-1).
- glibc's implementation returns 0. */
- ASSERT (ret == (size_t)(-2) || ret == (size_t)(-1) || ret == 0);
+ ASSERT (ret == (size_t)(-2));
ASSERT (mbsinit (&state));
}
for (c = 0; c < 0x100; c++)
switch (c)
{
+ default:
+ if (! (c && 1 < argc && argv[1][0] == '5'))
+ break;
+ /* Fall through. */
case '\t': case '\v': case '\f':
case ' ': case '!': case '"': case '#': case '%':
case '&': case '\'': case '(': case ')': case '*':
case 'p': case 'q': case 'r': case 's': case 't':
case 'u': case 'v': case 'w': case 'x': case 'y':
case 'z': case '{': case '|': case '}': case '~':
- /* c is in the ISO C "basic character set". */
+ /* c is in the ISO C "basic character set", or argv[1] starts
+ with '5' so we are testing all nonnull bytes. */
buf[0] = c;
wc = (wchar_t) 0xBADFACE;
ret = mbrtowc (&wc, buf, 1, &state);
ASSERT (mbsinit (&state));
}
return 0;
+
+ case '5':
+ /* C locale; tested above. */
+ return 0;
}
return 1;
--- /dev/null
+#!/bin/sh
+# Test whether the POSIX locale has encoding errors.
+LC_ALL=C \
+./test-mbrtowc${EXEEXT} 5 || exit
+LC_ALL=POSIX \
+./test-mbrtowc${EXEEXT} 5
/* Test of test for initial conversion state.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/*
- * Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2016 Free Software Foundation, Inc.
* Written by Eric Blake and Bruno Haible
*
* This program is free software: you can redistribute it and/or modify
/*
- * Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2016 Free Software Foundation, Inc.
* Written by Eric Blake
*
* This program is free software: you can redistribute it and/or modify
/* Test of nl_langinfo replacement.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of opening a file descriptor.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of opening a file descriptor.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+/* Make test_open always inline if we're using Fortify, which defines
+ __always_inline to do that. Do nothing otherwise. This works
+ around a glibc bug whereby 'open' cannot be used as a function
+ pointer when _FORTIFY_SOURCE is positive. */
+
+#if __GLIBC__ && defined __always_inline
+# define ALWAYS_INLINE __always_inline
+#else
+# define ALWAYS_INLINE
+#endif
+
/* This file is designed to test both open(n,buf[,mode]) and
openat(AT_FDCWD,n,buf[,mode]). FUNC is the function to test.
Assumes that BASE and ASSERT are already defined, and that
appropriate headers are already included. If PRINT, warn before
skipping symlink tests with status 77. */
-static int
+static ALWAYS_INLINE int
test_open (int (*func) (char const *, int, ...), bool print)
{
int fd;
/* Test of "pathmax.h".
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of pipe2.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of posix_spawn() function.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of posix_spawn() function.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test posix_spawn_file_actions_addclose() function.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test posix_spawn_file_actions_adddup2() function.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test posix_spawn_file_actions_addopen() function.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of splitting a double into fraction and mantissa.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of splitting a 'long double' into fraction and mantissa.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of quotearg family of functions.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <string.h>
#include "localcharset.h"
-#include "progname.h"
#include "macros.h"
#include "zerosize-ptr.h"
static struct result_groups results_g[] = {
/* literal_quoting_style */
{ { "", "\0""1\0", 3, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
- LQ RQ, LQ RQ },
+ "a' b", LQ RQ, LQ RQ },
{ "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
- LQ RQ, LQ RQ },
+ "a' b", LQ RQ, LQ RQ },
{ "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
- LQ RQ, LQ RQ } },
+ "a' b", LQ RQ, LQ RQ } },
/* shell_quoting_style */
{ { "''", "\0""1\0", 3, "simple", "' \t\n'\\''\"\033?""?/\\'", "a:b",
- "'a\\b'", LQ RQ, LQ RQ },
+ "'a\\b'", "\"a' b\"", LQ RQ, LQ RQ },
{ "''", "1", 1, "simple", "' \t\n'\\''\"\033?""?/\\'", "a:b",
- "'a\\b'", LQ RQ, LQ RQ },
+ "'a\\b'", "\"a' b\"", LQ RQ, LQ RQ },
{ "''", "1", 1, "simple", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
- "'a\\b'", LQ RQ, LQ RQ } },
+ "'a\\b'", "\"a' b\"", LQ RQ, LQ RQ } },
/* shell_always_quoting_style */
{ { "''", "'\0""1\0'", 5, "'simple'", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
- "'a\\b'", "'" LQ RQ "'", "'" LQ RQ "'" },
+ "'a\\b'", "\"a' b\"", "'" LQ RQ "'", "'" LQ RQ "'" },
{ "''", "'1'", 3, "'simple'", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
- "'a\\b'", "'" LQ RQ "'", "'" LQ RQ "'" },
+ "'a\\b'", "\"a' b\"", "'" LQ RQ "'", "'" LQ RQ "'" },
{ "''", "'1'", 3, "'simple'", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
- "'a\\b'", "'" LQ RQ "'", "'" LQ RQ "'" } },
+ "'a\\b'", "\"a' b\"", "'" LQ RQ "'", "'" LQ RQ "'" } },
+
+ /* shell_escape_quoting_style */
+ { { "''", "''$'\\0''1'$'\\0'", 15, "simple",
+ "' '$'\\t\\n'\\''\"'$'\\033''?""?/\\'", "a:b",
+ "'a\\b'", "\"a' b\"", "''$'" LQ_ENC RQ_ENC "'", LQ RQ },
+ { "''", "''$'\\0''1'$'\\0'", 15, "simple",
+ "' '$'\\t\\n'\\''\"'$'\\033''?""?/\\'", "a:b",
+ "'a\\b'", "\"a' b\"", "''$'" LQ_ENC RQ_ENC "'", LQ RQ },
+ { "''", "''$'\\0''1'$'\\0'", 15, "simple",
+ "' '$'\\t\\n'\\''\"'$'\\033''?""?/\\'", "'a:b'",
+ "'a\\b'", "\"a' b\"", "''$'" LQ_ENC RQ_ENC "'", LQ RQ } },
+
+ /* shell_escape_always_quoting_style */
+ { { "''", "''$'\\0''1'$'\\0'", 15, "'simple'",
+ "' '$'\\t\\n'\\''\"'$'\\033''?""?/\\'", "'a:b'",
+ "'a\\b'", "\"a' b\"", "''$'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
+ { "''", "''$'\\0''1'$'\\0'", 15, "'simple'",
+ "' '$'\\t\\n'\\''\"'$'\\033''?""?/\\'", "'a:b'",
+ "'a\\b'", "\"a' b\"", "''$'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
+ { "''", "''$'\\0''1'$'\\0'", 15, "'simple'",
+ "' '$'\\t\\n'\\''\"'$'\\033''?""?/\\'", "'a:b'",
+ "'a\\b'", "\"a' b\"", "''$'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" } },
/* c_quoting_style */
{ { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
"\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
- "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
+ "\"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 "\"" },
+ "\"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 "\"" } },
+ "\"a' b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" } },
/* c_maybe_quoting_style */
{ { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
- "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
+ "a:b", "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 },
+ "a:b", "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 } },
+ "\"a:b\"", "a\\b", "a' b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ } },
/* escape_quoting_style */
{ { "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a:b",
- "a\\\\b", LQ_ENC RQ_ENC, LQ RQ },
+ "a\\\\b", "a' b", LQ_ENC RQ_ENC, LQ RQ },
{ "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a:b",
- "a\\\\b", LQ_ENC RQ_ENC, LQ RQ },
+ "a\\\\b", "a' b", LQ_ENC RQ_ENC, LQ RQ },
{ "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a\\:b",
- "a\\\\b", LQ_ENC RQ_ENC, LQ RQ } },
+ "a\\\\b", "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 "'" },
+ "'a:b'", "'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 "'" },
+ "'a:b'", "'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 "'" } },
+ "'a\\:b'", "'a\\\\b'", "'a\\' b'",
+ "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" } },
/* clocale_quoting_style */
{ { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
"\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
- "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
+ "\"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 "\"" },
+ "\"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 "\"" } }
+ "\"a' b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" } }
};
static struct result_groups flag_results[] = {
/* literal_quoting_style and QA_ELIDE_NULL_BYTES */
- { { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ,
- LQ RQ },
- { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ,
- LQ RQ },
- { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ,
- LQ RQ } },
+ { { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", "a' b",
+ LQ RQ, LQ RQ },
+ { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", "a' b",
+ LQ RQ, LQ RQ },
+ { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", "a' b",
+ LQ RQ, LQ RQ } },
/* c_quoting_style and QA_ELIDE_OUTER_QUOTES */
{ { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
- "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
+ "a:b", "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 },
+ "a:b", "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 } },
+ "\"a:b\"", "a\\b", "a' b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ } },
/* c_quoting_style and QA_SPLIT_TRIGRAPHS */
{ { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
"\" \\t\\n'\\\"\\033?\"\"?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
- "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
+ "\"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 "\"" },
+ "\"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 "\"" } }
+ "\"a' b\"", "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" } }
};
static char const *custom_quotes[][2] = {
/* left_quote = right_quote = "" */
{ { "", "\\0001\\0", 7, "simple",
" \\t\\n'\"\\033?""?/\\\\", "a:b", "a\\\\b",
- LQ_ENC RQ_ENC, LQ RQ },
+ "a' b", LQ_ENC RQ_ENC, LQ RQ },
{ "", "\\0001\\0", 7, "simple",
" \\t\\n'\"\\033?""?/\\\\", "a:b", "a\\\\b",
- LQ_ENC RQ_ENC, LQ RQ },
+ "a' b", LQ_ENC RQ_ENC, LQ RQ },
{ "", "\\0001\\0", 7, "simple",
" \\t\\n'\"\\033?""?/\\\\", "a\\:b", "a\\\\b",
- LQ_ENC RQ_ENC, LQ RQ } },
+ "a' b", LQ_ENC RQ_ENC, LQ RQ } },
/* left_quote = right_quote = "'" */
{ { "''", "'\\0001\\0'", 9, "'simple'",
"' \\t\\n\\'\"\\033?""?/\\\\'", "'a:b'", "'a\\\\b'",
- "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
+ "'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 "'" },
+ "'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 "'" } },
+ "'a\\' b'", "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" } },
/* left_quote = "(" and right_quote = ")" */
{ { "()", "(\\0001\\0)", 9, "(simple)",
"( \\t\\n'\"\\033?""?/\\\\)", "(a:b)", "(a\\\\b)",
- "(" LQ_ENC RQ_ENC ")", "(" LQ RQ ")" },
+ "(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 ")" },
+ "(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 ")" } },
+ "(a' b)", "(" LQ_ENC RQ_ENC ")", "(" LQ RQ ")" } },
/* left_quote = ":" and right_quote = " " */
{ { ": ", ":\\0001\\0 ", 9, ":simple ",
":\\ \\t\\n'\"\\033?""?/\\\\ ", ":a:b ", ":a\\\\b ",
- ":" LQ_ENC RQ_ENC " ", ":" LQ RQ " " },
+ ":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 " " },
+ ":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 " " } },
+ ":a'\\ b ", ":" LQ_ENC RQ_ENC " ", ":" LQ RQ " " } },
/* left_quote = " " and right_quote = ":" */
{ { " :", " \\0001\\0:", 9, " simple:",
" \\t\\n'\"\\033?""?/\\\\:", " a\\:b:", " a\\\\b:",
- " " LQ_ENC RQ_ENC ":", " " LQ RQ ":" },
+ " 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 ":" },
+ " 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 ":" } },
+ " a' b:", " " LQ_ENC RQ_ENC ":", " " LQ RQ ":" } },
/* left_quote = "# " and right_quote = "\n" */
{ { "# \n", "# \\0001\\0\n", 10, "# simple\n",
"# \\t\\n'\"\\033?""?/\\\\\n", "# a:b\n", "# a\\\\b\n",
- "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" },
+ "# a' b\n", "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" },
{ "# \n", "# \\0001\\0\n", 10, "# simple\n",
"# \\t\\n'\"\\033?""?/\\\\\n", "# a:b\n", "# a\\\\b\n",
- "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" },
+ "# a' b\n", "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" },
{ "# \n", "# \\0001\\0\n", 10, "# simple\n",
"# \\t\\n'\"\\033?""?/\\\\\n", "# a\\:b\n", "# a\\\\b\n",
- "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" } },
+ "# a' b\n", "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" } },
/* left_quote = "\"'" and right_quote = "'\"" */
{ { "\"''\"", "\"'\\0001\\0'\"", 11, "\"'simple'\"",
"\"' \\t\\n\\'\"\\033?""?/\\\\'\"", "\"'a:b'\"", "\"'a\\\\b'\"",
- "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" },
+ "\"'a' b'\"", "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" },
{ "\"''\"", "\"'\\0001\\0'\"", 11, "\"'simple'\"",
"\"' \\t\\n\\'\"\\033?""?/\\\\'\"", "\"'a:b'\"", "\"'a\\\\b'\"",
- "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" },
+ "\"'a' b'\"", "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" },
{ "\"''\"", "\"'\\0001\\0'\"", 11, "\"'simple'\"",
"\"' \\t\\n\\'\"\\033?""?/\\\\'\"", "\"'a\\:b'\"", "\"'a\\\\b'\"",
- "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" } }
+ "\"'a' b'\"", "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" } }
};
+static char *
+use_quote_double_quotes (const char *str, size_t *len)
+{
+ char *p = *len == SIZE_MAX ? quotearg_char (str, '"')
+ : quotearg_char_mem (str, *len, '"');
+ *len = strlen (p);
+ return p;
+}
+
int
main (int argc _GL_UNUSED, char *argv[])
{
int i;
bool ascii_only = MB_CUR_MAX == 1 && !isprint ((unsigned char) LQ[0]);
- set_program_name (argv[0]);
-
/* This part of the program is hard-wired to the C locale since it
does not call setlocale. However, according to POSIX, the use of
8-bit bytes in a character context in the C locale gives
/* Test of quotearg family of functions.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
char const *str4; /* Translation of " \t\n'\"\033?""?/\\". */
char const *str5; /* Translation of "a:b". */
char const *str6; /* Translation of "a\\b". */
- char const *str7a; /* Translation of LQ RQ, in ASCII charset. */
- char const *str7b; /* Translation of LQ RQ, in Latin1 or UTF-8 charset. */
+ char const *str7; /* Translation of "a' b". */
+ char const *str8a; /* Translation of LQ RQ, in ASCII charset. */
+ char const *str8b; /* Translation of LQ RQ, in Latin1 or UTF-8 charset. */
};
struct result_groups {
static struct result_strings inputs = {
"", "\0001\0", 3, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
- LQ RQ, NULL
+ "a' b", LQ RQ, NULL
};
static void
p = func (inputs.str6, &len);
compare (results->str6, strlen (results->str6), p, len);
- len = strlen (inputs.str7a);
- p = func (inputs.str7a, &len);
+ len = strlen (inputs.str7);
+ p = func (inputs.str7, &len);
+ compare (results->str7, strlen (results->str7), p, len);
+
+ len = strlen (inputs.str8a);
+ p = func (inputs.str8a, &len);
if (ascii_only)
- compare (results->str7a, strlen (results->str7a), p, len);
+ compare (results->str8a, strlen (results->str8a), p, len);
else
- compare (results->str7b, strlen (results->str7b), p, len);
+ compare (results->str8b, strlen (results->str8b), p, len);
}
static char *
}
static char *
-use_quote_double_quotes (const char *str, size_t *len)
-{
- char *p = *len == SIZE_MAX ? quotearg_char (str, '"')
- : quotearg_char_mem (str, *len, '"');
- *len = strlen (p);
- return p;
-}
-
-static char *
use_quotearg_colon (const char *str, size_t *len)
{
char *p = (*len == SIZE_MAX ? quotearg_colon (str)
/* Test raising a signal.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/*
- * Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2016 Free Software Foundation, Inc.
* Written by Eric Blake and Bruno Haible
*
* This program is free software: you can redistribute it and/or modify
/* Tests of readlink.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Tests of readlink.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test regular expressions
- Copyright 1996-2001, 2003-2013 Free Software Foundation, Inc.
+ Copyright 1996-2001, 2003-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <locale.h>
#include <limits.h>
+#include <stdlib.h>
#include <string.h>
#if HAVE_DECL_ALARM
# include <unistd.h>
s = re_compile_pattern (pat, sizeof pat - 1, ®ex);
if (s)
result |= 1;
- else if (re_search (®ex, data, sizeof data - 1,
- 0, sizeof data - 1, ®s)
- != -1)
- result |= 1;
+ else
+ {
+ memset (®s, 0, sizeof regs);
+ if (re_search (®ex, data, sizeof data - 1,
+ 0, sizeof data - 1, ®s)
+ != -1)
+ result |= 1;
+ regfree (®ex);
+ free (regs.start);
+ free (regs.end);
+ }
}
/* Check whether it's really a UTF-8 locale.
result |= 1;
else
{
+ memset (®s, 0, sizeof regs);
i = re_search (®ex, data, sizeof data - 1,
0, sizeof data - 1, 0);
if (i != 0 && i != 21)
result |= 1;
+ regfree (®ex);
+ free (regs.start);
+ free (regs.end);
}
}
if (s)
result |= 2;
/* This should fail, but succeeds for glibc-2.5. */
- else if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1)
- result |= 2;
+ else
+ {
+ memset (®s, 0, sizeof regs);
+ if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1)
+ result |= 2;
+ regfree (®ex);
+ free (regs.start);
+ free (regs.end);
+ }
/* This regular expression is from Spencer ere test number 75
in grep-2.3. */
s = re_compile_pattern ("a[[:@:>@:]]b\n", 11, ®ex);
/* This should fail with _Invalid character class name_ error. */
if (!s)
- result |= 4;
+ {
+ result |= 4;
+ regfree (®ex);
+ }
/* Ensure that [b-a] is diagnosed as invalid, when
using RE_NO_EMPTY_RANGES. */
memset (®ex, 0, sizeof regex);
s = re_compile_pattern ("a[b-a]", 6, ®ex);
if (s == 0)
- result |= 8;
+ {
+ result |= 8;
+ regfree (®ex);
+ }
/* This should succeed, but does not for glibc-2.1.3. */
memset (®ex, 0, sizeof regex);
s = re_compile_pattern ("{1", 2, ®ex);
if (s)
result |= 8;
+ else
+ regfree (®ex);
/* The following example is derived from a problem report
against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
if (s)
result |= 8;
/* This should match, but does not for glibc-2.2.1. */
- else if (re_match (®ex, "an", 2, 0, ®s) != 2)
- result |= 8;
+ else
+ {
+ memset (®s, 0, sizeof regs);
+ if (re_match (®ex, "an", 2, 0, ®s) != 2)
+ result |= 8;
+ regfree (®ex);
+ free (regs.start);
+ free (regs.end);
+ }
memset (®ex, 0, sizeof regex);
s = re_compile_pattern ("x", 1, ®ex);
if (s)
result |= 8;
/* glibc-2.2.93 does not work with a negative RANGE argument. */
- else if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1)
- result |= 8;
+ else
+ {
+ memset (®s, 0, sizeof regs);
+ if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1)
+ result |= 8;
+ regfree (®ex);
+ free (regs.start);
+ free (regs.end);
+ }
/* The version of regex.c in older versions of gnulib
ignored RE_ICASE. Detect that problem too. */
s = re_compile_pattern ("x", 1, ®ex);
if (s)
result |= 16;
- else if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0)
- result |= 16;
+ else
+ {
+ memset (®s, 0, sizeof regs);
+ if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0)
+ result |= 16;
+ regfree (®ex);
+ free (regs.start);
+ free (regs.end);
+ }
/* Catch a bug reported by Vin Shelton in
http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex);
if (s)
result |= 32;
+ else
+ regfree (®ex);
/* REG_STARTEND was added to glibc on 2004-01-15.
Reject older versions. */
/* Test of rename() function.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of rename() function.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Tests of rmdir.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Tests of rmdir.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <sched.h> substitute.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Tests of setenv.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of setting the current locale.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test that the two results are the same. */
ASSERT (strcmp (name1, name2) == 0);
+ free (name1);
+ free (name2);
return 0;
}
/* Test of setting the current locale.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of sigaction() function.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <signal.h> substitute in C++ mode.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <signal.h> substitute in C++ mode.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <signal.h> substitute.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of signbit() substitute.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#define NWORDS \
((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
typedef union { long double value; unsigned int word[NWORDS]; } memory_long_double;
+
+#if defined __powerpc__ && LDBL_MANT_DIG == 106
+ /* This is PowerPC "double double", a pair of two doubles. Inf and Nan are
+ represented as the corresponding 64-bit IEEE values in the first double;
+ the second is ignored. Manipulate only the first double. */
+ #undef NWORDS
+ #define NWORDS \
+ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+#endif
+
memory_long_double m;
m.value = zerol / zerol;
# if LDBL_EXPBIT0_BIT > 0
/* Test of SIGPIPE handling.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# 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
+./test-sigpipe${EXEEXT} C 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
/* Test of sigprocmask.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of sleep() function.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of snprintf() function.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <spawn.h> substitute in C++ mode.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Child program invoked by test-spawn-pipe-main.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of create_pipe_bidi/wait_subprocess.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "spawn-pipe.h"
#include "wait-process.h"
-#include "progname.h"
#include <stdbool.h>
#include <stdio.h>
int test;
int fd;
- set_program_name (argv[0]);
-
if (argc != 3)
{
fprintf (stderr, "%s: need 2 arguments\n", argv[0]);
/* Test of <spawn.h> substitute.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Tests of stat.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <fcntl.h>
#include <errno.h>
#include <stdbool.h>
+#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
/* Tests of stat.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
ASSERT (unlink (BASE "link2") == 0);
ASSERT (unlink (BASE "link3") == 0);
ASSERT (unlink (BASE "link4") == 0);
+ free (cwd);
return 0;
}
--- /dev/null
+/* Test of <stdalign.h>.
+ Copyright 2009-2016 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General 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, inspired by Bruno Haible's test-alignof.c. */
+
+#include <config.h>
+
+#include <stdalign.h>
+
+#include <stddef.h>
+#include <stdint.h>
+
+#include "verify.h"
+
+#include "macros.h"
+
+typedef long double longdouble;
+typedef struct { char a[1]; } struct1;
+typedef struct { char a[2]; } struct2;
+typedef struct { char a[3]; } struct3;
+typedef struct { char a[4]; } struct4;
+
+verify (__alignof_is_defined == 1);
+#ifndef alignof
+# error "alignof is not a macro"
+#endif
+
+#if __alignas_is_defined
+verify (__alignas_is_defined == 1);
+# ifndef alignas
+# error "alignas is not a macro"
+# endif
+/* mingw can go up only to 8. 8 is all that GNU Emacs needs, so let's
+ limit the test to 8 for now. */
+# define TEST_ALIGNMENT 8
+#else
+# define _Alignas(alignment)
+# define alignas(alignment)
+# define TEST_ALIGNMENT 1
+#endif
+
+#define CHECK_STATIC(type) \
+ typedef struct { char slot1; type slot2; } type##_helper; \
+ verify (alignof (type) == offsetof (type##_helper, slot2)); \
+ verify (_Alignof (type) == alignof (type)); \
+ const int type##_alignment = alignof (type); \
+ type alignas (TEST_ALIGNMENT) static_##type##_alignas; \
+ type _Alignas (TEST_ALIGNMENT) static_##type##_Alignas
+
+#define CHECK_ALIGNED(var) ASSERT ((uintptr_t) &(var) % TEST_ALIGNMENT == 0)
+
+CHECK_STATIC (char);
+CHECK_STATIC (short);
+CHECK_STATIC (int);
+CHECK_STATIC (long);
+#ifdef INT64_MAX
+CHECK_STATIC (int64_t);
+#endif
+CHECK_STATIC (float);
+CHECK_STATIC (double);
+/* CHECK_STATIC (longdouble); */
+CHECK_STATIC (struct1);
+CHECK_STATIC (struct2);
+CHECK_STATIC (struct3);
+CHECK_STATIC (struct4);
+
+int
+main ()
+{
+#if defined __SUNPRO_C
+ /* Avoid a test failure due to Sun Studio Developer Bug Report #2125432. */
+ fputs ("Skipping test: known Sun C compiler bug\n", stderr);
+ return 77;
+#else
+ CHECK_ALIGNED (static_char_alignas);
+ CHECK_ALIGNED (static_char_Alignas);
+ CHECK_ALIGNED (static_short_alignas);
+ CHECK_ALIGNED (static_short_Alignas);
+ CHECK_ALIGNED (static_int_alignas);
+ CHECK_ALIGNED (static_int_Alignas);
+ CHECK_ALIGNED (static_long_alignas);
+ CHECK_ALIGNED (static_long_Alignas);
+# ifdef INT64_MAX
+ CHECK_ALIGNED (static_int64_t_alignas);
+ CHECK_ALIGNED (static_int64_t_Alignas);
+# endif
+ CHECK_ALIGNED (static_float_alignas);
+ CHECK_ALIGNED (static_float_Alignas);
+ CHECK_ALIGNED (static_double_alignas);
+ CHECK_ALIGNED (static_double_Alignas);
+ /* CHECK_ALIGNED (static_longdouble_alignas); */
+ /* CHECK_ALIGNED (static_longdouble_Alignas); */
+ CHECK_ALIGNED (static_struct1_alignas);
+ CHECK_ALIGNED (static_struct1_Alignas);
+ CHECK_ALIGNED (static_struct2_alignas);
+ CHECK_ALIGNED (static_struct2_Alignas);
+ CHECK_ALIGNED (static_struct3_alignas);
+ CHECK_ALIGNED (static_struct3_Alignas);
+ CHECK_ALIGNED (static_struct4_alignas);
+ CHECK_ALIGNED (static_struct4_Alignas);
+ return 0;
+#endif
+}
/* Test of <stdbool.h> substitute.
- Copyright (C) 2002-2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2002-2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <stddef.h> substitute.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
#include <stddef.h>
-
+#include <stdalign.h>
#include "verify.h"
/* Check that appropriate types are defined. */
wchar_t a = 'c';
ptrdiff_t b = 1;
size_t c = 2;
+max_align_t x;
/* Check that NULL can be passed through varargs as a pointer type,
per POSIX 2008. */
verify (offsetof (struct d, e) < -1); /* Must be unsigned. */
verify (offsetof (struct d, f) == 1);
+/* Check max_align_t's alignment. */
+verify (alignof (double) <= alignof (max_align_t));
+verify (alignof (int) <= alignof (max_align_t));
+verify (alignof (long double) <= alignof (max_align_t));
+verify (alignof (long int) <= alignof (max_align_t));
+verify (alignof (ptrdiff_t) <= alignof (max_align_t));
+verify (alignof (size_t) <= alignof (max_align_t));
+verify (alignof (wchar_t) <= alignof (max_align_t));
+verify (alignof (struct d) <= alignof (max_align_t));
+#if defined __GNUC__ || defined __IBM__ALIGNOF__
+verify (__alignof__ (double) <= __alignof__ (max_align_t));
+verify (__alignof__ (int) <= __alignof__ (max_align_t));
+verify (__alignof__ (long double) <= __alignof__ (max_align_t));
+verify (__alignof__ (long int) <= __alignof__ (max_align_t));
+verify (__alignof__ (ptrdiff_t) <= __alignof__ (max_align_t));
+verify (__alignof__ (size_t) <= __alignof__ (max_align_t));
+verify (__alignof__ (wchar_t) <= __alignof__ (max_align_t));
+verify (__alignof__ (struct d) <= __alignof__ (max_align_t));
+#endif
+
int
main (void)
{
/* Test of <stdint.h> substitute.
- Copyright (C) 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
verify (UINTMAX_C (17) == 17);
verify_same_types (UINTMAX_C (17), (uintmax_t)0 + 0);
+/* Use _GL_VERIFY (with a fixed-length diagnostic string) rather than verify,
+ because the latter would require forming each stringified expression, and
+ many of these would be so long as to trigger a warning/error like this:
+
+ test-stdint.c:407:1: error: string length '6980' is greater than the \
+ length '4095' ISO C99 compilers are required to support \
+ [-Werror=overlength-strings]
+ */
+#define verify_width(width, min, max) \
+ _GL_VERIFY ((max) >> ((width) - 1 - ((min) < 0)) == 1, \
+ "verify_width check")
+
+/* Macros specified by ISO/IEC TS 18661-1:2014. */
+
+#ifdef INT8_MAX
+verify_width (INT8_WIDTH, INT8_MIN, INT8_MAX);
+#endif
+#ifdef UINT8_MAX
+verify_width (UINT8_WIDTH, 0, UINT8_MAX);
+#endif
+#ifdef INT16_MAX
+verify_width (INT16_WIDTH, INT16_MIN, INT16_MAX);
+#endif
+#ifdef UINT16_MAX
+verify_width (UINT16_WIDTH, 0, UINT16_MAX);
+#endif
+#ifdef INT32_MAX
+verify_width (INT32_WIDTH, INT32_MIN, INT32_MAX);
+#endif
+#ifdef UINT32_MAX
+verify_width (UINT32_WIDTH, 0, UINT32_MAX);
+#endif
+#ifdef INT64_MAX
+verify_width (INT64_WIDTH, INT64_MIN, INT64_MAX);
+#endif
+#ifdef UINT64_MAX
+verify_width (UINT64_WIDTH, 0, UINT64_MAX);
+#endif
+verify_width (INT_LEAST8_WIDTH, INT_LEAST8_MIN, INT_LEAST8_MAX);
+verify_width (UINT_LEAST8_WIDTH, 0, UINT_LEAST8_MAX);
+verify_width (INT_LEAST16_WIDTH, INT_LEAST16_MIN, INT_LEAST16_MAX);
+verify_width (UINT_LEAST16_WIDTH, 0, UINT_LEAST16_MAX);
+verify_width (INT_LEAST32_WIDTH, INT_LEAST32_MIN, INT_LEAST32_MAX);
+verify_width (UINT_LEAST32_WIDTH, 0, UINT_LEAST32_MAX);
+verify_width (INT_LEAST64_WIDTH, INT_LEAST64_MIN, INT_LEAST64_MAX);
+verify_width (UINT_LEAST64_WIDTH, 0, UINT_LEAST64_MAX);
+verify_width (INT_FAST8_WIDTH, INT_FAST8_MIN, INT_FAST8_MAX);
+verify_width (UINT_FAST8_WIDTH, 0, UINT_FAST8_MAX);
+verify_width (INT_FAST16_WIDTH, INT_FAST16_MIN, INT_FAST16_MAX);
+verify_width (UINT_FAST16_WIDTH, 0, UINT_FAST16_MAX);
+verify_width (INT_FAST32_WIDTH, INT_FAST32_MIN, INT_FAST32_MAX);
+verify_width (UINT_FAST32_WIDTH, 0, UINT_FAST32_MAX);
+verify_width (INT_FAST64_WIDTH, INT_FAST64_MIN, INT_FAST64_MAX);
+verify_width (UINT_FAST64_WIDTH, 0, UINT_FAST64_MAX);
+verify_width (INTPTR_WIDTH, INTPTR_MIN, INTPTR_MAX);
+verify_width (UINTPTR_WIDTH, 0, UINTPTR_MAX);
+verify_width (INTMAX_WIDTH, INTMAX_MIN, INTMAX_MAX);
+verify_width (UINTMAX_WIDTH, 0, UINTMAX_MAX);
+verify_width (PTRDIFF_WIDTH, PTRDIFF_MIN, PTRDIFF_MAX);
+verify_width (SIZE_WIDTH, 0, SIZE_MAX);
+verify_width (WCHAR_WIDTH, WCHAR_MIN, WCHAR_MAX);
+#ifdef WINT_MAX
+verify_width (WINT_WIDTH, WINT_MIN, WINT_MAX);
+#endif
+#ifdef SIG_ATOMIC_MAX
+verify_width (SIG_ATOMIC_WIDTH, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX);
+#endif
int
main (void)
/* Test of <stdio.h> substitute in C++ mode.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <stdio.h> substitute in C++ mode.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <stdio.h> substitute.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <stdlib.h> substitute in C++ mode.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <stdlib.h> substitute in C++ mode.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <stdlib.h> substitute.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/*
- * Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2016 Free Software Foundation, Inc.
* Written by Eric Blake and Bruno Haible
*
* This program is free software: you can redistribute it and/or modify
/* Test of strerror() function.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <string.h> substitute in C++ mode.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <string.h> substitute in C++ mode.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <string.h> substitute.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/*
- * Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ * Copyright (C) 2010-2016 Free Software Foundation, Inc.
* Written by Eric Blake
*
* This program is free software: you can redistribute it and/or modify
/* Test of strsignal() function.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/*
- * Copyright (C) 2004, 2007-2013 Free Software Foundation, Inc.
+ * Copyright (C) 2004, 2007-2016 Free Software Foundation, Inc.
* Written by Bruno Haible and Eric Blake
*
* This program is free software: you can redistribute it and/or modify
ASSERT (p);
ASSERT (p - haystack == i);
}
+ free (haystack);
}
return 0;
/*
- * Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2016 Free Software Foundation, Inc.
* Written by Eric Blake
*
* This program is free software: you can redistribute it and/or modify
/* Tests of symlink.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Tests of symlink.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <sys/stat.h> substitute in C++ mode.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <sys/stat.h> substitute.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <sys/time.h> substitute in C++ mode.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <sys/time.h> substitute.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <sys/types.h> substitute in C++ mode.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <sys/types.h> substitute.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <sys/wait.h> substitute in C++ mode.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <sys/wait.h> substitute.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of macros shared between <sys/wait.h> and <stdlib.h>.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <time.h> substitute in C++ mode.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <time.h> substitute in C++ mode.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <time.h> substitute.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <unistd.h> substitute in C++ mode.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <unistd.h> substitute.
- Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Tests of unsetenv.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#!/bin/sh
# Test suite for update-copyright.
-# Copyright (C) 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2009-2016 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
TMP=$TMP_BASE
s=$TMP-script
cat <<\EOF > $s
-eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" ${1+"$@"}'
+eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" "$@"'
& eval 'exec perl -wS -0777 -pi "$0" $argv:q'
if 0;
s/a/b/
/* Test of vasnprintf() and asnprintf() functions.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of POSIX compatible vasprintf() and asprintf() functions.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#ifdef WORDS_BIGENDIAN
# define LDBL80_WORDS(exponent,manthi,mantlo) \
{ ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
- ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
+ ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
(unsigned int) (mantlo) << 16 \
}
#else
ASSERT (retval == strlen (result));
free (result);
}
- /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
- Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
- Intel IA-64 Architecture Software Developer's Manual, Volume 1:
- Application Architecture.
- Table 5-2 "Floating-Point Register Encodings"
- Figure 5-6 "Memory to Floating-Point Register Data Translation"
- */
+ /* asprintf should print something for noncanonical values. */
{ /* Pseudo-NaN. */
static union { unsigned int word[4]; long double value; } x =
{ LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
int retval =
my_asprintf (&result, "%La %d", x.value, 33, 44, 55);
ASSERT (result != NULL);
- ASSERT (strlen (result) >= 3 + 3
- && strisnan (result, 0, strlen (result) - 3, 0)
- && strcmp (result + strlen (result) - 3, " 33") == 0);
ASSERT (retval == strlen (result));
+ ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0);
free (result);
}
{ /* Pseudo-Infinity. */
int retval =
my_asprintf (&result, "%La %d", x.value, 33, 44, 55);
ASSERT (result != NULL);
- ASSERT (strlen (result) >= 3 + 3
- && strisnan (result, 0, strlen (result) - 3, 0)
- && strcmp (result + strlen (result) - 3, " 33") == 0);
ASSERT (retval == strlen (result));
+ ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0);
free (result);
}
{ /* Pseudo-Zero. */
int retval =
my_asprintf (&result, "%La %d", x.value, 33, 44, 55);
ASSERT (result != NULL);
- ASSERT (strlen (result) >= 3 + 3
- && strisnan (result, 0, strlen (result) - 3, 0)
- && strcmp (result + strlen (result) - 3, " 33") == 0);
ASSERT (retval == strlen (result));
+ ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0);
free (result);
}
{ /* Unnormalized number. */
int retval =
my_asprintf (&result, "%La %d", x.value, 33, 44, 55);
ASSERT (result != NULL);
- ASSERT (strlen (result) >= 3 + 3
- && strisnan (result, 0, strlen (result) - 3, 0)
- && strcmp (result + strlen (result) - 3, " 33") == 0);
ASSERT (retval == strlen (result));
+ ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0);
free (result);
}
{ /* Pseudo-Denormal. */
int retval =
my_asprintf (&result, "%La %d", x.value, 33, 44, 55);
ASSERT (result != NULL);
- ASSERT (strlen (result) >= 3 + 3
- && strisnan (result, 0, strlen (result) - 3, 0)
- && strcmp (result + strlen (result) - 3, " 33") == 0);
ASSERT (retval == strlen (result));
+ ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0);
free (result);
}
#endif
ASSERT (retval == strlen (result));
free (result);
}
- /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
- Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
- Intel IA-64 Architecture Software Developer's Manual, Volume 1:
- Application Architecture.
- Table 5-2 "Floating-Point Register Encodings"
- Figure 5-6 "Memory to Floating-Point Register Data Translation"
- */
+ /* asprintf should print something for noncanonical values. */
{ /* Pseudo-NaN. */
static union { unsigned int word[4]; long double value; } x =
{ LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
int retval =
my_asprintf (&result, "%Lf %d", x.value, 33, 44, 55);
ASSERT (result != NULL);
- ASSERT (strlen (result) >= 3 + 3
- && strisnan (result, 0, strlen (result) - 3, 0)
- && strcmp (result + strlen (result) - 3, " 33") == 0);
ASSERT (retval == strlen (result));
+ ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0);
free (result);
}
{ /* Pseudo-Infinity. */
int retval =
my_asprintf (&result, "%Lf %d", x.value, 33, 44, 55);
ASSERT (result != NULL);
- ASSERT (strlen (result) >= 3 + 3
- && strisnan (result, 0, strlen (result) - 3, 0)
- && strcmp (result + strlen (result) - 3, " 33") == 0);
ASSERT (retval == strlen (result));
+ ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0);
free (result);
}
{ /* Pseudo-Zero. */
int retval =
my_asprintf (&result, "%Lf %d", x.value, 33, 44, 55);
ASSERT (result != NULL);
- ASSERT (strlen (result) >= 3 + 3
- && strisnan (result, 0, strlen (result) - 3, 0)
- && strcmp (result + strlen (result) - 3, " 33") == 0);
ASSERT (retval == strlen (result));
+ ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0);
free (result);
}
{ /* Unnormalized number. */
int retval =
my_asprintf (&result, "%Lf %d", x.value, 33, 44, 55);
ASSERT (result != NULL);
- ASSERT (strlen (result) >= 3 + 3
- && strisnan (result, 0, strlen (result) - 3, 0)
- && strcmp (result + strlen (result) - 3, " 33") == 0);
ASSERT (retval == strlen (result));
+ ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0);
free (result);
}
{ /* Pseudo-Denormal. */
int retval =
my_asprintf (&result, "%Lf %d", x.value, 33, 44, 55);
ASSERT (result != NULL);
- ASSERT (strlen (result) >= 3 + 3
- && strisnan (result, 0, strlen (result) - 3, 0)
- && strcmp (result + strlen (result) - 3, " 33") == 0);
ASSERT (retval == strlen (result));
+ ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0);
free (result);
}
#endif
ASSERT (retval == strlen (result));
free (result);
}
- /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
- Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
- Intel IA-64 Architecture Software Developer's Manual, Volume 1:
- Application Architecture.
- Table 5-2 "Floating-Point Register Encodings"
- Figure 5-6 "Memory to Floating-Point Register Data Translation"
- */
+ /* asprintf should print something for noncanonical values. */
{ /* Pseudo-NaN. */
static union { unsigned int word[4]; long double value; } x =
{ LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
int retval =
my_asprintf (&result, "%Le %d", x.value, 33, 44, 55);
ASSERT (result != NULL);
- ASSERT (strlen (result) >= 3 + 3
- && strisnan (result, 0, strlen (result) - 3, 0)
- && strcmp (result + strlen (result) - 3, " 33") == 0);
ASSERT (retval == strlen (result));
+ ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0);
free (result);
}
{ /* Pseudo-Infinity. */
int retval =
my_asprintf (&result, "%Le %d", x.value, 33, 44, 55);
ASSERT (result != NULL);
- ASSERT (strlen (result) >= 3 + 3
- && strisnan (result, 0, strlen (result) - 3, 0)
- && strcmp (result + strlen (result) - 3, " 33") == 0);
ASSERT (retval == strlen (result));
+ ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0);
free (result);
}
{ /* Pseudo-Zero. */
int retval =
my_asprintf (&result, "%Le %d", x.value, 33, 44, 55);
ASSERT (result != NULL);
- ASSERT (strlen (result) >= 3 + 3
- && strisnan (result, 0, strlen (result) - 3, 0)
- && strcmp (result + strlen (result) - 3, " 33") == 0);
ASSERT (retval == strlen (result));
+ ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0);
free (result);
}
{ /* Unnormalized number. */
int retval =
my_asprintf (&result, "%Le %d", x.value, 33, 44, 55);
ASSERT (result != NULL);
- ASSERT (strlen (result) >= 3 + 3
- && strisnan (result, 0, strlen (result) - 3, 0)
- && strcmp (result + strlen (result) - 3, " 33") == 0);
ASSERT (retval == strlen (result));
+ ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0);
free (result);
}
{ /* Pseudo-Denormal. */
int retval =
my_asprintf (&result, "%Le %d", x.value, 33, 44, 55);
ASSERT (result != NULL);
- ASSERT (strlen (result) >= 3 + 3
- && strisnan (result, 0, strlen (result) - 3, 0)
- && strcmp (result + strlen (result) - 3, " 33") == 0);
ASSERT (retval == strlen (result));
+ ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0);
free (result);
}
#endif
ASSERT (retval == strlen (result));
free (result);
}
- /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
- Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
- Intel IA-64 Architecture Software Developer's Manual, Volume 1:
- Application Architecture.
- Table 5-2 "Floating-Point Register Encodings"
- Figure 5-6 "Memory to Floating-Point Register Data Translation"
- */
+ /* asprintf should print something for noncanonical values. */
{ /* Pseudo-NaN. */
static union { unsigned int word[4]; long double value; } x =
{ LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
int retval =
my_asprintf (&result, "%Lg %d", x.value, 33, 44, 55);
ASSERT (result != NULL);
- ASSERT (strlen (result) >= 3 + 3
- && strisnan (result, 0, strlen (result) - 3, 0)
- && strcmp (result + strlen (result) - 3, " 33") == 0);
ASSERT (retval == strlen (result));
+ ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0);
free (result);
}
{ /* Pseudo-Infinity. */
int retval =
my_asprintf (&result, "%Lg %d", x.value, 33, 44, 55);
ASSERT (result != NULL);
- ASSERT (strlen (result) >= 3 + 3
- && strisnan (result, 0, strlen (result) - 3, 0)
- && strcmp (result + strlen (result) - 3, " 33") == 0);
ASSERT (retval == strlen (result));
+ ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0);
free (result);
}
{ /* Pseudo-Zero. */
int retval =
my_asprintf (&result, "%Lg %d", x.value, 33, 44, 55);
ASSERT (result != NULL);
- ASSERT (strlen (result) >= 3 + 3
- && strisnan (result, 0, strlen (result) - 3, 0)
- && strcmp (result + strlen (result) - 3, " 33") == 0);
ASSERT (retval == strlen (result));
+ ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0);
free (result);
}
{ /* Unnormalized number. */
int retval =
my_asprintf (&result, "%Lg %d", x.value, 33, 44, 55);
ASSERT (result != NULL);
- ASSERT (strlen (result) >= 3 + 3
- && strisnan (result, 0, strlen (result) - 3, 0)
- && strcmp (result + strlen (result) - 3, " 33") == 0);
ASSERT (retval == strlen (result));
+ ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0);
free (result);
}
{ /* Pseudo-Denormal. */
int retval =
my_asprintf (&result, "%Lg %d", x.value, 33, 44, 55);
ASSERT (result != NULL);
- ASSERT (strlen (result) >= 3 + 3
- && strisnan (result, 0, strlen (result) - 3, 0)
- && strcmp (result + strlen (result) - 3, " 33") == 0);
ASSERT (retval == strlen (result));
+ ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0);
free (result);
}
#endif
/* Test of vasprintf() and asprintf() functions.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#!/bin/sh
# Unit tests for vc-list-files
-# Copyright (C) 2008-2013 Free Software Foundation, Inc.
+# Copyright (C) 2008-2016 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
#!/bin/sh
# Unit tests for vc-list-files
-# Copyright (C) 2008-2013 Free Software Foundation, Inc.
+# Copyright (C) 2008-2016 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
/* Test the "verify" module.
- Copyright (C) 2005, 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test suite for version-etc.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This file is part of the GNUlib Library.
This program is free software: you can redistribute it and/or modify
#include "version-etc.h"
-#include "progname.h"
#define AUTHORS "Sergey Poznyakoff", "Eric Blake"
int
main (int argc _GL_UNUSED, char **argv)
{
- set_program_name (argv[0]);
version_etc (stdout, "test-version-etc", "dummy", "0", AUTHORS,
(const char *) NULL);
return 0;
#! /bin/sh
# Test suite for version-etc.
-# Copyright (C) 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2009-2016 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
/* Test of <wchar.h> substitute in C++ mode.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <wchar.h> substitute.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of conversion of wide character to multibyte character.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of conversion of wide character to multibyte character.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <wctype.h> substitute in C++ mode.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <wctype.h> substitute.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test the write() function.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of xalloc_die() function.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
#include "xalloc.h"
-#include "progname.h"
int
main (int argc _GL_UNUSED, char **argv)
{
- set_program_name (argv[0]);
xalloc_die ();
return 0;
}
#!/bin/sh
# Test suite for xalloc_die.
-# Copyright (C) 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2009-2016 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
/* Test of xvasprintf() and xasprintf() functions.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+/* Tell GCC not to warn about the specific edge cases tested here. */
+#if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
+# pragma GCC diagnostic ignored "-Wformat-zero-length"
+# pragma GCC diagnostic ignored "-Wformat-nonliteral"
+# pragma GCC diagnostic ignored "-Wformat-security"
+#endif
+
#include <config.h>
#include "xvasprintf.h"
#include <stdlib.h>
#include <string.h>
-#include "progname.h"
#include "macros.h"
static char *
int
main (int argc _GL_UNUSED, char *argv[])
{
- set_program_name (argv[0]);
-
test_xvasprintf ();
test_xasprintf ();
-/* Copyright (C) 1992, 1995-2002, 2005-2013 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995-2002, 2005-2016 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
/* Convert wide character to unibyte character.
- Copyright (C) 2008, 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2010-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
/* Convert wide character to multibyte character.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
/* Convert wide character to multibyte character.
- Copyright (C) 2011-2013 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
/* POSIX compatible write() function.
- Copyright (C) 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2008-2016 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
/* Return a pointer to a zero-size object in memory.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by