+2010-01-01 Jim Meyering <meyering@redhat.com>
+
+ ChangeLog: tweak to eliminate unnecessary copyright line
+ * ChangeLog: Remove a copyright line that was mistakenly updated
+ by today's update-copyright run. Reported by Eric Blake.
+
+ test-update-copyright: don't let envvar setting cause test failure
+ * tests/test-update-copyright.sh: Set UPDATE_COPYRIGHT_MAX_LINE_LENGTH.
+
+2010-01-01 Bruno Haible <bruno@clisp.org>
+
+ localename: Avoid gcc warning.
+ * lib/localename.c (gl_locale_name_thread_unsafe): Don't define this
+ function if it is not used.
+
+2010-01-01 Jim Meyering <meyering@redhat.com>
+
+ update nearly all FSF copyright year lists to include 2010
+ Use the same procedure as for 2009, outlined in
+ http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
+
+ version-etc: set COPYRIGHT_YEAR to 2010
+ * lib/version-etc.c (COPYRIGHT_YEAR): Manually update the enum.
+
+2009-12-31 Eric Blake <ebb9@byu.net>
+
+ doc: correct availability of cygwin 1.5.x getopt
+ * doc/posix-functions/optarg.texi (optarg): Cygwin supplies getopt
+ variables.
+ * doc/posix-functions/opterr.texi (opterr): Likewise.
+ * doc/posix-functions/optind.texi (optind): Likewise.
+ * doc/posix-functions/optopt.texi (optopt): Likewise.
+ * doc/posix-functions/tzname.texi (tzname): Likewise.
+
+ openat: update maintainer
+ * modules/openat (Maintainer): Add myself.
+
+ utimens: avoid shadowing warning
+ * lib/utimens.c (fdutimens, lutimens): Consolidate separate stat
+ buffers into one, to avoid shadowing, as well as avoiding a
+ redundant stat.
+ Reported by Jim Meyering.
+
+ test-dup2: avoid compiler warning
+ * tests/test-dup2.c (is_inheritable): Only define if used.
+
+2010-01-01 Bruno Haible <bruno@clisp.org>
+
+ vasnprintf: Avoid passing an 'rpl_mbstate_t *' to the system's wcrtomb.
+ * lib/vasnprintf.c (VASNPRINTF): If GNULIB_defined_mbstate_t is
+ defined, use wctomb instead of wcrtomb.
+
+2010-01-01 Bruno Haible <bruno@clisp.org>
+
+ iconv: Reject native Solaris iconv.
+ * m4/iconv.m4 (AM_ICONV_LINK): Recognize native Solaris iconv() bug.
+ * doc/posix-functions/iconv.texi: Document native Solaris iconv() bug.
+
+2009-12-31 Bruno Haible <bruno@clisp.org>
+
+ * tests/test-signal.c (main): Remove test of 'SIG'.
+
+2009-12-31 Bruno Haible <bruno@clisp.org>
+
+ spawn: Fix incomplete fix.
+ * lib/spawn.in.h (posix_spawnattr_getflags, posix_spawnattr_setflags,
+ posix_spawnattr_getpgroup, posix_spawnattr_setpgroup): Correct the link
+ warnings for GNULIB_POSIXCHECK again.
+ Reported by Eric Blake.
+
+2009-12-31 Bruno Haible <bruno@clisp.org>
+
+ Avoid namespace pollution on glibc systems.
+ * lib/spawn.in.h: Don't include <sched.h>, <signal.h> on glibc systems.
+ * lib/sys_times.in.h: Don't include <time.h> on glibc systems.
+ * lib/wchar.in.h: Don't include <stddef.h>, <stdio.h>, <time.h> on
+ glibc systems.
+
+2009-12-31 Bruno Haible <bruno@clisp.org>
+
+ * m4/wchar.m4 (gl_WCHAR_H): Remove gl_STDDEF_H invocation.
+ (gl_REPLACE_WCHAR_H): Turn into a no-op.
+ * m4/arpa_inet_h.m4 (gl_REPLACE_ARPA_INET_H): Likewise.
+ * m4/dirent_h.m4 (gl_REPLACE_DIRENT_H): Likewise.
+ * m4/locale_h.m4 (gl_REPLACE_LOCALE_H): Likewise.
+ * m4/spawn_h.m4 (gl_REPLACE_SPAWN_H): Likewise.
+ * m4/sys_ioctl_h.m4 (gl_REPLACE_SYS_IOCTL_H): Likewise.
+
+2009-12-31 Bruno Haible <bruno@clisp.org>
+
+ * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Invoke
+ gl_CHECK_NEXT_HEADERS before testing ac_cv_header_sys_select_h, not
+ afterwards.
+
+2009-12-31 Bruno Haible <bruno@clisp.org>
+
+ * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H_DEFAULTS): Don't set
+ SYS_UTSNAME_H.
+
+2009-12-31 Bruno Haible <bruno@clisp.org>
+
+ spawn: Fix misapplied patch.
+ * lib/spawn.in.h (posix_spawnattr_getflags, posix_spawnattr_setflags,
+ posix_spawnattr_getpgroup, posix_spawnattr_setpgroup): Correct the link
+ warnings for GNULIB_POSIXCHECK.
+
+2009-12-31 Bruno Haible <bruno@clisp.org>
+
+ times: Update after sys_times changed.
+ * m4/times.m4: New file, extracted from modules/times. Set HAVE_TIMES.
+ * modules/times (Files): Add it.
+ (configure.ac): Invoke gl_FUNC_TIMES.
+
+2009-12-31 Bruno Haible <bruno@clisp.org>
+
+ Use AC_C_INLINE where necessary.
+ * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Require AC_C_INLINE.
+ * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Likewise.
+ * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
+ * m4/mbchar.m4 (gl_MBCHAR): Likewise.
+ * m4/mbfile.m4 (gl_MBFILE): Likewise.
+ * m4/mbiter.m4 (gl_MBITER): Likewise.
+ * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
+ * m4/stat.m4 (gl_FUNC_STAT): Likewise.
+ * m4/wait-process.m4 (gl_WAIT_PROCESS): Likewise.
+ * modules/u64 (configure.ac): Likewise.
+
+2009-12-31 Bruno Haible <bruno@clisp.org>
+
+ Use AC_C_INLINE instead of module 'inline' where possible.
+ * modules/inline (Description): Clarify purpose.
+ * m4/count-one-bits.m4 (gl_COUNT_ONE_BITS): Require AC_C_INLINE.
+ * modules/count-one-bits (Depends-on): Remove inline.
+ * m4/openat.m4 (gl_PREREQ_OPENAT): Require AC_C_INLINE.
+ * modules/openat (Depends-on): Remove inline.
+ * modules/fdutimensat (Depends-on, configure.ac): Require AC_C_INLINE
+ instead of depending on module 'inline'.
+ * modules/filevercmp (Depends-on, configure.ac): Likewise.
+ * modules/unicase/cased (Depends-on, configure.ac): Likewise.
+ * modules/unicase/ignorable (Depends-on, configure.ac): Likewise.
+ * modules/unictype/category-of (Depends-on, configure.ac): Likewise.
+ * modules/unictype/category-test (Depends-on, configure.ac): Likewise.
+ * modules/unictype/ctype-alnum (Depends-on, configure.ac): Likewise.
+ * modules/unictype/ctype-alpha (Depends-on, configure.ac): Likewise.
+ * modules/unictype/ctype-blank (Depends-on, configure.ac): Likewise.
+ * modules/unictype/ctype-cntrl (Depends-on, configure.ac): Likewise.
+ * modules/unictype/ctype-digit (Depends-on, configure.ac): Likewise.
+ * modules/unictype/ctype-graph (Depends-on, configure.ac): Likewise.
+ * modules/unictype/ctype-lower (Depends-on, configure.ac): Likewise.
+ * modules/unictype/ctype-print (Depends-on, configure.ac): Likewise.
+ * modules/unictype/ctype-punct (Depends-on, configure.ac): Likewise.
+ * modules/unictype/ctype-space (Depends-on, configure.ac): Likewise.
+ * modules/unictype/ctype-upper (Depends-on, configure.ac): Likewise.
+ * modules/unictype/ctype-xdigit (Depends-on, configure.ac): Likewise.
+ * modules/unictype/property-alphabetic (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-ascii-hex-digit (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-bidi-arabic-digit (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-bidi-arabic-right-to-left (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-bidi-block-separator (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-bidi-boundary-neutral (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-bidi-common-separator (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-bidi-control (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-bidi-embedding-or-override (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-bidi-eur-num-separator (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-bidi-eur-num-terminator (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-bidi-european-digit (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-bidi-hebrew-right-to-left (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-bidi-left-to-right (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-bidi-non-spacing-mark (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-bidi-other-neutral (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-bidi-pdf (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-bidi-segment-separator (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-bidi-whitespace (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-combining (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-composite (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-currency-symbol (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-dash (Depends-on, configure.ac): Likewise.
+ * modules/unictype/property-decimal-digit (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-default-ignorable-code-point (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-deprecated (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-diacritic (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-extender (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-format-control (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-grapheme-base (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-grapheme-extend (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-grapheme-link (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-hex-digit (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-hyphen (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-id-continue (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-id-start (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-ideographic (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-ids-binary-operator (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-ids-trinary-operator (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-ignorable-control (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-iso-control (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-join-control (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-left-of-pair (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-line-separator (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-logical-order-exception (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-lowercase (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-math (Depends-on, configure.ac): Likewise.
+ * modules/unictype/property-non-break (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-not-a-character (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-numeric (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-other-alphabetic (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-other-default-ignorable-code-point
+ (Depends-on, configure.ac): Likewise.
+ * modules/unictype/property-other-grapheme-extend (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-other-id-continue (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-other-id-start (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-other-lowercase (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-other-math (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-other-uppercase (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-paired-punctuation (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-paragraph-separator (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-pattern-syntax (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-pattern-white-space (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-private-use (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-punctuation (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-quotation-mark (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-radical (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-sentence-terminal (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-soft-dotted (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-space (Depends-on, configure.ac): Likewise.
+ * modules/unictype/property-terminal-punctuation (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-titlecase (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-unassigned-code-value (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-unified-ideograph (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-uppercase (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-variation-selector (Depends-on,
+ configure.ac): Likewise.
+ * modules/unictype/property-white-space (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-xid-continue (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-xid-start (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/property-zero-width (Depends-on, configure.ac):
+ Likewise.
+ * modules/unictype/syntax-c-ident (Depends-on, configure.ac): Likewise.
+ * modules/unictype/syntax-java-ident (Depends-on, configure.ac):
+ Likewise.
+
+2009-12-31 Bruno Haible <bruno@clisp.org>
+
+ Remove unnecessary AC_C_INLINE invocation.
+ * m4/popen.m4 (gl_PREREQ_POPEN): Don't invoke AC_C_INLINE. Not needed
+ since 2009-08-21.
+
+2009-12-31 Jim Meyering <meyering@redhat.com>
+
+ maint.mk: don't require explicit gpg_key_ID in cfg.mk
+ * top/maint.mk (gpg_key_ID): Derive key ID from signed release tag.
+ With this change, we can all remove the gpg_key_ID = ... definition
+ from our respective cfg.mk files.
+
+ maint.mk: create announcement template in ~/, not in /tmp
+ * top/maint.mk (emit_upload_commands): Adjust.
+ (release-prep): Emit into ~/announce-..., not /tmp/announce-...
+ Remove temporary file, .ci-msg.
+
+2009-12-31 Eric Blake <ebb9@byu.net>
+
+ link-warning: always build headers with link warnings
+ * modules/arpa_inet (Makefile.am): Always build replacement
+ header.
+ * modules/ctype (Makefile.am): Likewise.
+ * modules/dirent (Makefile.am): Likewise.
+ * modules/inttypes (Makefile.am): Likewise.
+ * modules/langinfo (Makefile.am): Likewise.
+ * modules/locale (Makefile.am): Likewise.
+ * modules/spawn (Makefile.am): Likewise.
+ * modules/sys_file (Makefile.am): Likewise.
+ * modules/sys_ioctl (Makefile.am): Likewise.
+ * modules/sys_select (Makefile.am): Likewise.
+ * modules/sys_socket (Makefile.am): Likewise.
+ * modules/sys_times (Makefile.am): Likewise.
+ * modules/sys_utsname (Makefile.am): Likewise.
+ * modules/sys_wait (Makefile.am): Likewise.
+ * modules/wchar (Makefile.am): Likewise.
+ * m4/arpa_inet_h.m4 (gl_HEADER_ARPA_INET)
+ (gl_ARPA_INET_H_DEFAULTS): Drop unneeded variable.
+ * m4/ctype.m4 (gl_CTYPE_H_DEFAULTS): Likewise.
+ * m4/isblank.m4 (gl_FUNC_ISBLANK): Likewise.
+ * m4/dirent_h.m4 (gl_REPLACE_DIRENT_H, gl_DIRENT_H_DEFAULTS):
+ Likewise.
+ * m4/inttypes.m4 (gl_INTTYPES_H): Likewise.
+ * m4/langinfo_h.m4 (gl_LANGINFO_H): Likewise.
+ * m4/locale_h.m4 (gl_REPLACE_LOCALE_H, gl_LOCALE_H_DEFAULTS):
+ Likewise.
+ * m4/spawn_h.m4 (gl_REPLACE_SPAWN_H, gl_SPAWN_H_DEFAULTS):
+ Likewise.
+ * m4/sys_file_h.m4 (gl_HEADER_SYS_FILE_H): Likewise.
+ * m4/sys_ioctl_h.m4 (gl_SYS_IOCTL_H, gl_REPLACE_SYS_IOCTL_H)
+ (gl_SYS_IOCTL_H_DEFAULTS): Likewise.
+ * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
+ * m4/sys_times_h.m4 (gl_SYS_TIMES_H): Likewise.
+ * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H)
+ (gl_SYS_UTSNAME_H_DEFAULTS): Likewise.
+ * m4/wchar.m4 (gl_WCHAR_H, gl_REPLACE_WCHAR_H)
+ (gl_WCHAR_H_DEFAULTS): Likewise.
+
+2009-12-31 Eric Blake <ebb9@byu.net>
+
+ signal, spawn: use link warnings
+ * lib/signal.in.h (sigset_t): Make unconditional.
+ (sigismember, sigemptyset, sigaddset, sigdelset, sigfillset)
+ (sigpending, sigprocmask, sigaction): Add link warnings.
+ * lib/spawn.in.h (posix_spawn, posix_spawnp, posix_spawnattr_init)
+ (posix_spawnattr_destroy, posix_spawnattr_getsigdefault)
+ (posix_spawnattr_setsigdefault, posix_spawnattr_getsigmask)
+ (posix_spawnattr_setsigmask, posix_spawnattr_getflags)
+ (posix_spawnattr_setflags, posix_spawnattr_getpgroup)
+ (posix_spawnattr_setpgroup, posix_spawnattr_getschedpolicy)
+ (posix_spawnattr_setschedpolicy, posix_spawnattr_getschedparam)
+ (posix_spawnattr_setschedparam, posix_spawn_file_actions_init)
+ (posix_spawn_file_actions_destroy)
+ (posix_spawn_file_actions_addopen)
+ (posix_spawn_file_actions_addclose)
+ (posix_spawwn_file_actions_adddup2): Likewise.
+ * m4/signal_h.m4 (gl_SIGNAL_H): Guarantee uid_t.
+ * tests/test-signal.c (main): Enhance test.
+
+ spawn: improve wrapper support
+ * m4/spawn_h.m4 (gl_SPAWN_H): Check for type existence.
+ (gl_SPAWN_H_DEFAULTS): New defaults.
+ * modules/spawn (Makefile.am): Substitute them.
+ * lib/spawn.in.h: (posix_spawnattr_t, posix_spawn_file_actions_t):
+ Only declare if missing or broken.
+
+ sys_times, sys_utsname: use include_next
+ * m4/sys_times_h.m4 (gl_SYS_TIMES_H): Support wrapping an existing
+ header.
+ (gl_SYS_TIMES_H_DEFAULTS): Add another variable.
+ * m4/sys_utsname_h.m4 (gl_SYS_UTSNAME_H)
+ (gl_SYS_UTSNAME_H_DEFAULTS): Likewise.
+ * modules/sys_times (Depends-on): Add include_next.
+ (Makefile.am): Substitute additional values.
+ * modules/sys_utsname (Depends-on, Makefile.am): Likewise.
+ * lib/sys_times.in.h (includes): Include native header, if
+ available.
+ * lib/sys_utsname.in.h (includes): Likewise.
+ * tests/test-sys_times.c (main): Enhance test.
+
+ fdutimensat: revert prior patch
+ * modules/fdutimensat (Depends-on): Re-add inline; it is needed by
+ utimens.h.
+ Reported by Bruno Haible.
+
+2009-12-30 Eric Blake <ebb9@byu.net>
+
+ sys_wait: drop link-warning dependency
+ * modules/sys_wait (Depends-on, Makefile.am): Drop unneeded
+ link-warning efforts.
+ * lib/sys_wait.in.h: Likewise.
+
+ fdutimensat: remove bogus dependency
+ * modules/fdutimensat (Depends-on): Drop inline.
+
+ unistd: fix typo
+ * lib/unistd.in.h (linkat) [GNULIB_POSIXCHECK]: Fix typo.
+
+2009-12-30 Bruno Haible <bruno@clisp.org>
+
+ Fix compilation error with Solaris cc.
+ * lib/unicase/u8-is-invariant.c: Include <stdbool.h>.
+ * lib/unicase/u16-is-invariant.c: Likewise.
+ * lib/unicase/u32-is-invariant.c: Likewise.
+ Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
+
+2009-12-30 Bruno Haible <bruno@clisp.org>
+
+ Fix test crash.
+ * tests/test-localename.c (test_locale_name_thread): Skip unavailable
+ locales.
+ Reported by Simon Josefsson <simon@josefsson.org>.
+
+2009-12-30 Bruno Haible <bruno@clisp.org>
+
+ Fix compilation error on most platforms.
+ * tests/test-localename.c (categories): Define only if HAVE_NEWLOCALE.
+ Reported by Simon Josefsson <simon@josefsson.org>
+ and Nelson H. F. Beebe <beebe@math.utah.edu>.
+
+2009-12-30 Eric Blake <ebb9@byu.net>
+
+ futimens, utimensat: work around ntfs-3g bug
+ * lib/utimensat.c (rpl_utimensat): Drop attempts to cache whether
+ a ctime bug is present, and expand workaround to cover ntfs-3g.
+ * lib/utimens.c (fdutimens, lutimens): Likewise.
+ (utimensat_ctime_really, detect_ctime_bug): Drop cache mechanism.
+ (validate_timespec): Adjust return value.
+ * m4/futimens.m4 (gl_FUNC_FUTIMENS): Update comment.
+ * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Likewise.
+ Reported by ctrn3e8 <ctrn3e8@gmail.com>.
+
+2009-12-29 Eric Blake <ebb9@byu.net>
+
+ link-warning: make usage consistent
+ * modules/ctype (Depends-on): Add link-warning.
+ (Makefile.am): Update rules accordingly.
+ * modules/langinfo (Depends-on, Makefile.am): Likewise.
+ * modules/locale (Depends-on, Makefile.am): Likewise.
+ * modules/sys_file (Makefile.am): Likewise.
+ * modules/getopt-posix (Makefile.am): Delete unused link warning
+ efforts.
+ * lib/ctype.in.h (GL_LINK_WARNING): Ensure definition before use.
+ * lib/langinfo.in.h (GL_LINK_WARNING): Likewise.
+ * lib/locale.in.h (GL_LINK_WARNING): Likewise.
+ * lib/sys_file.in.h (GL_LINK_WARNING): Likewise.
+
+ stdio: remove unused variables
+ * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Remove unused variables.
+ * m4/fseeko.m4 (gl_FUNC_FSEEKO): Likewise.
+ * m4/ftello.m4 (gl_FUNC_FTELLO): Likewise.
+
+ tests: test more substitute headers
+ * modules/ctype-tests: New file.
+ * modules/dirent-tests: Likewise.
+ * modules/spawn-tests: Likewise.
+ * modules/sys_file-tests: Likewise.
+ * modules/sys_ioctl-tests: Likewise.
+ * modules/sys_wait-tests: Likewise.
+ * tests/test-ctype.c: Likewise.
+ * tests/test-dirent.c: Likewise.
+ * tests/test-spawn.c: Likewise.
+ * tests/test-sys_file.c: Likewise.
+ * tests/test-sys_ioctl.c: Likewise.
+ * tests/test-sys_wait.c: Likewise.
+ * m4/spawn_h.m4 (gl_SPAWN_H): Replace header if it is missing.
+ * lib/sys_file.in.h (LOCK_SH, LOCK_EX, LOCK_UN, LOCK_NB): Provide
+ whether or not flock is in use.
+
+ tests: remove License section from module
+ * modules/arpa_inet-tests: Remove unneeded section.
+ * modules/byteswap-tests: Likewise.
+ * modules/ceilf-tests: Likewise.
+ * modules/ceill-tests: Likewise.
+ * modules/crypto/des-tests: Likewise.
+ * modules/crypto/gc-arcfour-tests: Likewise.
+ * modules/crypto/gc-arctwo-tests: Likewise.
+ * modules/crypto/gc-des-tests: Likewise.
+ * modules/crypto/gc-hmac-md5-tests: Likewise.
+ * modules/crypto/gc-hmac-sha1-tests: Likewise.
+ * modules/crypto/gc-md2-tests: Likewise.
+ * modules/crypto/gc-md4-tests: Likewise.
+ * modules/crypto/gc-md5-tests: Likewise.
+ * modules/crypto/gc-pbkdf2-sha1-tests: Likewise.
+ * modules/crypto/gc-rijndael-tests: Likewise.
+ * modules/crypto/gc-sha1-tests: Likewise.
+ * modules/crypto/gc-tests: Likewise.
+ * modules/crypto/md2-tests: Likewise.
+ * modules/crypto/md4-tests: Likewise.
+ * modules/fcntl-h-tests: Likewise.
+ * modules/floorf-tests: Likewise.
+ * modules/floorl-tests: Likewise.
+ * modules/frexp-nolibm-tests: Likewise.
+ * modules/frexp-tests: Likewise.
+ * modules/frexpl-nolibm-tests: Likewise.
+ * modules/frexpl-tests: Likewise.
+ * modules/getaddrinfo-tests: Likewise.
+ * modules/inttypes-tests: Likewise.
+ * modules/isfinite-tests: Likewise.
+ * modules/isinf-tests: Likewise.
+ * modules/ldexpl-tests: Likewise.
+ * modules/locale-tests: Likewise.
+ * modules/math-tests: Likewise.
+ * modules/netdb-tests: Likewise.
+ * modules/netinet_in-tests: Likewise.
+ * modules/printf-frexp-tests: Likewise.
+ * modules/printf-frexpl-tests: Likewise.
+ * modules/priv-set-tests: Likewise.
+ * modules/random_r-tests: Likewise.
+ * modules/round-tests: Likewise.
+ * modules/roundf-tests: Likewise.
+ * modules/roundl-tests: Likewise.
+ * modules/search-tests: Likewise.
+ * modules/select-tests: Likewise.
+ * modules/signal-tests: Likewise.
+ * modules/stdbool-tests: Likewise.
+ * modules/stddef-tests: Likewise.
+ * modules/stdint-tests: Likewise.
+ * modules/stdio-tests: Likewise.
+ * modules/stdlib-tests: Likewise.
+ * modules/string-tests: Likewise.
+ * modules/strings-tests: Likewise.
+ * modules/sys_select-tests: Likewise.
+ * modules/sys_socket-tests: Likewise.
+ * modules/sys_stat-tests: Likewise.
+ * modules/sys_time-tests: Likewise.
+ * modules/sys_utsname-tests: Likewise.
+ * modules/sysexits-tests: Likewise.
+ * modules/time-tests: Likewise.
+ * modules/trunc-tests: Likewise.
+ * modules/truncf-tests: Likewise.
+ * modules/truncl-tests: Likewise.
+ * modules/tsearch-tests: Likewise.
+ * modules/unistd-tests: Likewise.
+ * modules/wchar-tests: Likewise.
+ * modules/wctype-tests: Likewise.
+
+ tests: fix license on several tests
+ * tests/test-des.c: Update to GPLv3+.
+ * tests/test-flock.c: Likewise.
+ * tests/test-fsync.c: Likewise.
+ * tests/test-futimens.h: Likewise.
+ * tests/test-gc-arcfour.c: Likewise.
+ * tests/test-gc-arctwo.c: Likewise.
+ * tests/test-gc-des.c: Likewise.
+ * tests/test-gc-hmac-md5.c: Likewise.
+ * tests/test-gc-hmac-sha1.c: Likewise.
+ * tests/test-gc-md2.c: Likewise.
+ * tests/test-gc-md4.c: Likewise.
+ * tests/test-gc-md5.c: Likewise.
+ * tests/test-gc-pbkdf2-sha1.c: Likewise.
+ * tests/test-gc-rijndael.c: Likewise.
+ * tests/test-gc-sha1.c: Likewise.
+ * tests/test-gc.c: Likewise.
+ * tests/test-getcwd.c: Likewise.
+ * tests/test-link.c: Likewise.
+ * tests/test-link.h: Likewise.
+ * tests/test-lutimens.h: Likewise.
+ * tests/test-md2.c: Likewise.
+ * tests/test-md4.c: Likewise.
+ * tests/test-mkdir.h: Likewise.
+ * tests/test-rename.c: Likewise.
+ * tests/test-rename.h: Likewise.
+ * tests/test-safe-alloc.c: Likewise.
+ * tests/test-utimens-common.h: Likewise.
+ * tests/test-utimens.h: Likewise.
+
+ maint: sync license texts
+ * config/srclist.txt: Add gpl-1.3.texi, lgpl-1.3.texi.
+ * doc/gpl-3.0.texi: Revert copyright year update.
+ * doc/lgpl-3.0.texi: Likewise.
+
+2009-12-29 Jim Meyering <meyering@redhat.com>
+
+ update nearly all FSF copyright year lists to include 2009
+ The files named by the following are exempted:
+ grep -v '^#' config/srclist.txt|grep -v '^$' | while read src dst; do
+ test -f "$dst" && { echo "$dst"; continue; }
+ test -d "$dst" || continue
+ echo "$dst"/$(basename "$src")
+ done > exempt
+ git ls-files tests/unictype >> exempt
+ In the remaining files, convert to all-interval notation if
+ - there is already at least one year interval like 2000-2003
+ - the file is maintained by me
+ - the file is in lib/uni*/, where that style already prevails
+ Otherwise, use update-copyright's default.
+
+2009-12-29 Simon Josefsson <simon@josefsson.org>
+ and Eric Blake <ebb9@byu.net>
+
+ tests: don't require debug system() to pass
+ * tests/test-lstat.h (test_lstat_func): Move debug cleanup...
+ * tests/test-rmdir.h (test_rmdir_func): Likewise.
+ * tests/test-unlink.h (test_unlink_func): Likewise.
+ * tests/test-fstatat.c (main): ...into callers.
+ * tests/test-lstat.c (main): Likewise.
+ * tests/test-rmdir.c (main): Likewise.
+ * tests/test-unlink.c (main): Likewise.
+ * tests/test-unlinkat.c (main): Likewise.
+ * tests/test-areadlink-with-size.c (main): Don't require a
+ debug-only system call to pass, aiding cross-testing to mingw.
+ * tests/test-areadlink.c (main): Likewise.
+ * tests/test-areadlinkat-with-size.c (main): Likewise.
+ * tests/test-areadlinkat.c (main): Likewise.
+ * tests/test-canonicalize-lgpl.c (main): Likewise.
+ * tests/test-canonicalize.c (main): Likewise.
+ * tests/test-chown.c (main): Likewise.
+ * tests/test-fchownat.c (main): Likewise.
+ * tests/test-lchown.c (main): Likewise.
+ * tests/test-fdutimensat.c (main): Likewise.
+ * tests/test-futimens.c (main): Likewise.
+ * tests/test-link.c (main): Likewise.
+ * tests/test-linkat.c (main): Likewise.
+ * tests/test-mkdir.c (main): Likewise.
+ * tests/test-mkdirat.c (main): Likewise.
+ * tests/test-mkfifo.c (main): Likewise.
+ * tests/test-mkfifoat.c (main): Likewise.
+ * tests/test-mknod.c (main): Likewise.
+ * tests/test-readlink.c (main): Likewise.
+ * tests/test-remove.c (main): Likewise.
+ * tests/test-rename.c (main): Likewise.
+ * tests/test-renameat.c (main): Likewise.
+ * tests/test-symlink.c (main): Likewise.
+ * tests/test-symlinkat.c (main): Likewise.
+ * tests/test-utimens.c (main): Likewise.
+ * tests/test-utimensat.c (main): Likewise.
+
+2009-12-29 Simon Josefsson <simon@josefsson.org>
+
+ * modules/selinux-h (selinux/selinux.h, selinux/context.h): Depend
+ on $(UNUSED_PARAMETER_H) to avoid build failure.
+
+2009-12-28 Jim Meyering <meyering@redhat.com>
+
+ update-copyright: you may specify a max. line length other than 72
+ * build-aux/update-copyright: Honor $UPDATE_COPYRIGHT_MAX_LINE_LENGTH.
+
+ maint: use consistent FSF copyright line syntax
+ * lib/posixtm.c: Add missing comma in FSF copyright line.
+ * lib/posixtm.h: Likewise.
+ * lib/getugroups.c: Add missing ", Inc.".
+
+ pmccabe2html: emit consistent FSF copyright; remove trailing blanks
+ * build-aux/pmccabe2html: Insert comma before "Inc." in emitted
+ FSF copyright line. Remove trailing blanks.
+
+2009-12-28 Eric Blake <ebb9@byu.net>
+
+ test-dup2: reduce dependencies
+ * modules/cloexec (Configure.ac): Set witness.
+ * modules/dup2-tests (Depends-on): Drop cloexec.
+ * tests/test-dup2.c (main): Skip portion of test if cloexec module
+ not present.
+ Suggested by Bruno Haible.
+
+2009-12-26 Bruno Haible <bruno@clisp.org>
+
+ Remove an unneeded dependency.
+ * modules/fseterr (Depends-on): Remove dup2.
+
+2009-12-26 Eric Blake <ebb9@byu.net>
+
+ tests: use macros.h in more places
+ * tests/macros.h (ASSERT): Depend on ASSERT_STREAM.
+ (ASSERT_STREAM): Provide default of stderr.
+ * tests/test-dirent-safer.c: Include macros.h, using alternate
+ stream for assertions.
+ * tests/test-dup-safer.c: Likewise.
+ * tests/test-freopen-safer.c: Likewise.
+ * tests/test-getopt.c: Likewise.
+ * tests/test-openat-safer.c: Likewise.
+ * tests/test-pipe.c: Likewise.
+ * tests/test-popen-safer.c: Likewise.
+ * modules/dirent-safer-tests (Files): Include macros.h.
+ * modules/unistd-safer-tests (Files): Likewise.
+ * modules/freopen-safer-tests (Files): Likewise.
+ * modules/getopt-posix-tests (Files): Likewise.
+ * modules/openat-safer-tests (Files): Likewise.
+ * modules/pipe-tests (Files): Likewise.
+
+2009-12-26 Bruno Haible <bruno@clisp.org>
+
+ javacomp: Portability fix.
+ * m4/javacomp.m4 (gt_JAVACOMP): Fix creation of conftestver.class so
+ that it also works on Solaris.
+
+2009-12-26 Bruno Haible <bruno@clisp.org>
+
+ localename: Fix storage allocation of gl_locale_name_thread's result.
+ * lib/localename.c (SIZE_BITS, string_hash, struct hash_node,
+ HASH_TABLE_SIZE, struniq_hash_table, struniq_lock, struniq): Define on
+ all platforms that have 'uselocale'.
+ (gl_locale_name_thread_unsafe): New function, extracted from
+ gl_locale_name_thread.
+ (gl_locale_name_thread): Call struniq on all platforms that have
+ 'uselocale'.
+ * tests/test-localename.c (test_locale_name_thread): Check that the
+ resulting strings are permanently allocated.
+ * modules/localename-tests (Depends-on): Add strdup.
+
+2009-12-26 Bruno Haible <bruno@clisp.org>
+
+ * tests/test-localename.c (categories): Fill in the strings.
+
+2009-12-26 Jim Meyering <meyering@redhat.com>
+
+ isdir: complete the removal of m4/isdir.m4
+ * modules/isdir (configure.ac): Remove reference to gl_ISDIR.
+
+ isdir: clean up, since at least grep still uses it
+ * lib/isdir.c: Include "isdir.h".
+ (S_ISDIR): Remove now-unneeded definition.
+ * modules/isdir (Files): Add lib/isdir.h.
+ * lib/isdir.h: New file, with declaration.
+ * m4/isdir.m4: Remove file -- unneeded.
+
+2009-12-25 Bruno Haible <bruno@clisp.org>
+
+ selinux-h: Make generated .h files standalone.
+ * lib/se-context.in.h: Arrange to include _GL_UNUSED_PARAMETER
+ definition. Use _GL_UNUSED_PARAMETER instead of _GL_UNUSED.
+ * lib/se-selinux.in.h: Likewise.
+ * modules/selinux-h (Depends-on): Add unused-parameter.
+ (Makefile.am): Insert definition of _GL_UNUSED_PARAMETER into
+ selinux/selinux.h and selinux/context.h.
+ Suggested by Eric Blake.
+
+2009-12-25 Bruno Haible <bruno@clisp.org>
+
+ Move gl_FCNTL_O_FLAGS to a separate .m4 file.
+ * m4/fcntl-o.m4: New file, extracted from m4/fcntl_h.m4.
+ * m4/fcntl_h.m4 (gl_FCNTL_O_FLAGS): Remove macro.
+ * modules/fcntl-h (Files): Add m4/fcntl-o.m4.
+ * modules/localcharset (Files): Likewise. Remove m4/fcntl_h.m4.
+
+2009-12-24 Bruno Haible <bruno@clisp.org>
+
+ openat: Fix warning.
+ * lib/openat-proc.c: Include <unistd.h>.
+
+2009-12-24 Bruno Haible <bruno@clisp.org>
+
+ New module 'unused-parameter'.
+ * build-aux/unused-parameter.h: New file, extracted from earlier
+ gnulib-common.m4.
+ * modules/unused-parameter: New file.
+ * lib/unistr.h: Include unused-parameter.h.
+ (u32_mbtouc_unsafe, u32_mbtouc): Use _GL_UNUSED_PARAMETER instead of
+ _GL_UNUSED.
+ * modules/unistr/base (Depends-on): Add unused-parameter.
+
+2009-12-24 Bruno Haible <bruno@clisp.org>
+
+ Add missing dependencies to 'extensions' module.
+ * m4/extensions.m4: Add comment.
+ * modules/accept4 (Depends-on): Add extensions.
+ * modules/dup3 (Depends-on): Likewise.
+ * modules/fcntl (Depends-on): Likewise.
+ * modules/futimens (Depends-on): Likewise.
+ * modules/mknod (Depends-on): Likewise.
+ * modules/pipe2 (Depends-on): Likewise.
+ * modules/stat-time (Depends-on): Likewise.
+ * modules/strcasestr-simple (Depends-on): Likewise.
+ * modules/strsignal (Depends-on): Likewise.
+ * modules/utimensat (Depends-on): Likewise.
+ * modules/localcharset (Depends-on): Likewise. Needed because of
+ gl_FCNTL_O_FLAGS.
+ * modules/wcrtomb (Depends-on): Likewise. Needed because of
+ AC_TYPE_MBSTATE_T.
+ * modules/wcsnrtombs (Depends-on): Likewise.
+ * modules/wcsrtombs (Depends-on): Likewise.
+
+2009-12-24 Bruno Haible <bruno@clisp.org>
+
+ binary-io: Avoid gcc warning due to SET_BINARY.
+ * lib/binary-io.h (SET_BINARY): Cast the result to void.
+ Reported by Jim Meyering <jim@meyering.net>. Suggestion by Eric Blake.
+
+2009-12-24 Bruno Haible <bruno@clisp.org>
+
+ Avoid future namespace pollution on glibc systems.
+ * lib/arpa_inet.in.h: Don't include <sys/socket.h> on glibc systems.
+ * lib/sys_ioctl.in.h: Don't include <unistd.h> on glibc systems.
+ * lib/sys_select.in.h: Don't include <sys/time.h> and <string.h> on
+ glibc systems.
+
+2009-12-24 Bruno Haible <bruno@clisp.org>
+
+ Refactor common macros used in tests.
+ * tests/macros.h: New file.
+ * tests/test-areadlink.c: Include macros.h. Don't include <stdio.h>
+ and/or <stdlib.h>, if appropriate.
+ (ASSERT, SIZEOF): Remove macros.
+ * tests/test-areadlink-with-size.c: Likewise.
+ * tests/test-areadlinkat.c: Likewise.
+ * tests/test-areadlinkat-with-size.c: Likewise.
+ * tests/test-argmatch.c: Likewise.
+ * tests/test-argv-iter.c: Likewise.
+ * tests/test-array-mergesort.c: Likewise.
+ * tests/test-array_list.c: Likewise.
+ * tests/test-array_oset.c: Likewise.
+ * tests/test-avltree_list.c: Likewise.
+ * tests/test-avltree_oset.c: Likewise.
+ * tests/test-avltreehash_list.c: Likewise.
+ * tests/test-base64.c: Likewise.
+ * tests/test-binary-io.c: Likewise.
+ * tests/test-bitrotate.c: Likewise.
+ * tests/test-btowc.c: Likewise.
+ * tests/test-byteswap.c: Likewise.
+ * tests/test-c-ctype.c: Likewise.
+ * tests/test-c-stack.c: Likewise.
+ * tests/test-c-strcasecmp.c: Likewise.
+ * tests/test-c-strcasestr.c: Likewise.
+ * tests/test-c-strncasecmp.c: Likewise.
+ * tests/test-c-strstr.c: Likewise.
+ * tests/test-canonicalize-lgpl.c: Likewise.
+ * tests/test-canonicalize.c: Likewise.
+ * tests/test-carray_list.c: Likewise.
+ * tests/test-ceilf1.c: Likewise.
+ * tests/test-ceilf2.c: Likewise.
+ * tests/test-ceill.c: Likewise.
+ * tests/test-chown.c: Likewise.
+ * tests/test-cloexec.c: Likewise.
+ * tests/test-copy-acl.c: Likewise.
+ * tests/test-copy-file.c: Likewise.
+ * tests/test-count-one-bits.c: Likewise.
+ * tests/test-dprintf-posix.c: Likewise.
+ * tests/test-dup2.c: Likewise.
+ * tests/test-dup3.c: Likewise.
+ * tests/test-duplocale.c: Likewise.
+ * tests/test-fbufmode.c: Likewise.
+ * tests/test-fchdir.c: Likewise.
+ * tests/test-fchownat.c: Likewise.
+ * tests/test-fcntl-safer.c: Likewise.
+ * tests/test-fcntl.c: Likewise.
+ * tests/test-fdopendir.c: Likewise.
+ * tests/test-fdutimensat.c: Likewise.
+ * tests/test-fflush2.c: Likewise.
+ * tests/test-file-has-acl.c: Likewise.
+ * tests/test-filevercmp.c: Likewise.
+ * tests/test-flock.c: Likewise.
+ * tests/test-floorf1.c: Likewise.
+ * tests/test-floorf2.c: Likewise.
+ * tests/test-floorl.c: Likewise.
+ * tests/test-fnmatch.c: Likewise.
+ * tests/test-fopen.h: Likewise.
+ * tests/test-fpending.c: Likewise.
+ * tests/test-fprintf-posix.c: Likewise.
+ * tests/test-fpurge.c: Likewise.
+ * tests/test-freadable.c: Likewise.
+ * tests/test-freadahead.c: Likewise.
+ * tests/test-freading.c: Likewise.
+ * tests/test-freadptr.c: Likewise.
+ * tests/test-freadptr2.c: Likewise.
+ * tests/test-freadseek.c: Likewise.
+ * tests/test-freopen.c: Likewise.
+ * tests/test-frexp.c: Likewise.
+ * tests/test-frexpl.c: Likewise.
+ * tests/test-fseek.c: Likewise.
+ * tests/test-fseeko.c: Likewise.
+ * tests/test-fstatat.c: Likewise.
+ * tests/test-fstrcmp.c: Likewise.
+ * tests/test-fsync.c: Likewise.
+ * tests/test-ftell.c: Likewise.
+ * tests/test-ftello.c: Likewise.
+ * tests/test-func.c: Likewise.
+ * tests/test-futimens.c: Likewise.
+ * tests/test-fwritable.c: Likewise.
+ * tests/test-fwriting.c: Likewise.
+ * tests/test-getcwd.c: Likewise.
+ * tests/test-getdate.c: Likewise.
+ * tests/test-getdelim.c: Likewise.
+ * tests/test-getdtablesize.c: Likewise.
+ * tests/test-getgroups.c: Likewise.
+ * tests/test-getline.c: Likewise.
+ * tests/test-getndelim2.c: Likewise.
+ * tests/test-glob.c: Likewise.
+ * tests/test-hash.c: Likewise.
+ * tests/test-i-ring.c: Likewise.
+ * tests/test-iconv-utf.c: Likewise.
+ * tests/test-iconv.c: Likewise.
+ * tests/test-idpriv-drop.c: Likewise.
+ * tests/test-idpriv-droptemp.c: Likewise.
+ * tests/test-inet_ntop.c: Likewise.
+ * tests/test-inet_pton.c: Likewise.
+ * tests/test-isblank.c: Likewise.
+ * tests/test-isfinite.c: Likewise.
+ * tests/test-isinf.c: Likewise.
+ * tests/test-isnan.c: Likewise.
+ * tests/test-isnand.h: Likewise.
+ * tests/test-isnanf.h: Likewise.
+ * tests/test-isnanl.h: Likewise.
+ * tests/test-lchown.c: Likewise.
+ * tests/test-ldexpl.c: Likewise.
+ * tests/test-link.c: Likewise.
+ * tests/test-linkat.c: Likewise.
+ * tests/test-linked_list.c: Likewise.
+ * tests/test-linkedhash_list.c: Likewise.
+ * tests/test-localename.c: Likewise.
+ * tests/test-lseek.c: Likewise.
+ * tests/test-lstat.c: Likewise.
+ * tests/test-mbmemcasecmp.c: Likewise.
+ * tests/test-mbmemcasecoll.c: Likewise.
+ * tests/test-mbrtowc.c: Likewise.
+ * tests/test-mbscasecmp.c: Likewise.
+ * tests/test-mbscasestr1.c: Likewise.
+ * tests/test-mbscasestr2.c: Likewise.
+ * tests/test-mbscasestr3.c: Likewise.
+ * tests/test-mbscasestr4.c: Likewise.
+ * tests/test-mbschr.c: Likewise.
+ * tests/test-mbscspn.c: Likewise.
+ * tests/test-mbsinit.c: Likewise.
+ * tests/test-mbsncasecmp.c: Likewise.
+ * tests/test-mbsnrtowcs.c: Likewise.
+ * tests/test-mbspbrk.c: Likewise.
+ * tests/test-mbspcasecmp.c: Likewise.
+ * tests/test-mbsrchr.c: Likewise.
+ * tests/test-mbsrtowcs.c: Likewise.
+ * tests/test-mbsspn.c: Likewise.
+ * tests/test-mbsstr1.c: Likewise.
+ * tests/test-mbsstr2.c: Likewise.
+ * tests/test-mbsstr3.c: Likewise.
+ * tests/test-memchr.c: Likewise.
+ * tests/test-memchr2.c: Likewise.
+ * tests/test-memcmp.c: Likewise.
+ * tests/test-memmem.c: Likewise.
+ * tests/test-memrchr.c: Likewise.
+ * tests/test-mkdir.c: Likewise.
+ * tests/test-mkdirat.c: Likewise.
+ * tests/test-mkfifo.c: Likewise.
+ * tests/test-mkfifoat.c: Likewise.
+ * tests/test-mknod.c: Likewise.
+ * tests/test-nanosleep.c: Likewise.
+ * tests/test-nl_langinfo.c: Likewise.
+ * tests/test-obstack-printf.c: Likewise.
+ * tests/test-open.c: Likewise.
+ * tests/test-openat.c: Likewise.
+ * tests/test-pipe-filter-gi1.c: Likewise.
+ * tests/test-pipe-filter-gi2-main.c: Likewise.
+ * tests/test-pipe-filter-ii1.c: Likewise.
+ * tests/test-pipe-filter-ii2-main.c: Likewise.
+ * tests/test-pipe2.c: Likewise.
+ * tests/test-popen.h: Likewise.
+ * tests/test-posixtm.c: Likewise.
+ * tests/test-pread.c: Likewise.
+ * tests/test-printf-frexp.c: Likewise.
+ * tests/test-printf-frexpl.c: Likewise.
+ * tests/test-printf-posix.c: Likewise.
+ * tests/test-priv-set.c: Likewise.
+ * tests/test-quotearg.c: Likewise.
+ * tests/test-random_r.c: Likewise.
+ * tests/test-rawmemchr.c: Likewise.
+ * tests/test-rbtree_list.c: Likewise.
+ * tests/test-rbtree_oset.c: Likewise.
+ * tests/test-rbtreehash_list.c: Likewise.
+ * tests/test-readlink.c: Likewise.
+ * tests/test-remove.c: Likewise.
+ * tests/test-rename.c: Likewise.
+ * tests/test-renameat.c: Likewise.
+ * tests/test-rmdir.c: Likewise.
+ * tests/test-round1.c: Likewise.
+ * tests/test-roundf1.c: Likewise.
+ * tests/test-roundl.c: Likewise.
+ * tests/test-safe-alloc.c: Likewise.
+ * tests/test-sameacls.c: Likewise.
+ * tests/test-set-mode-acl.c: Likewise.
+ * tests/test-setenv.c: Likewise.
+ * tests/test-sigaction.c: Likewise.
+ * tests/test-signbit.c: Likewise.
+ * tests/test-sleep.c: Likewise.
+ * tests/test-snprintf-posix.c: Likewise.
+ * tests/test-snprintf.c: Likewise.
+ * tests/test-sprintf-posix.c: Likewise.
+ * tests/test-stat-time.c: Likewise.
+ * tests/test-stat.c: Likewise.
+ * tests/test-strcasestr.c: Likewise.
+ * tests/test-strchrnul.c: Likewise.
+ * tests/test-strerror.c: Likewise.
+ * tests/test-striconv.c: Likewise.
+ * tests/test-striconveh.c: Likewise.
+ * tests/test-striconveha.c: Likewise.
+ * tests/test-strsignal.c: Likewise.
+ * tests/test-strstr.c: Likewise.
+ * tests/test-strtod.c: Likewise.
+ * tests/test-strverscmp.c: Likewise.
+ * tests/test-symlink.c: Likewise.
+ * tests/test-symlinkat.c: Likewise.
+ * tests/test-trunc1.c: Likewise.
+ * tests/test-trunc2.c: Likewise.
+ * tests/test-truncf1.c: Likewise.
+ * tests/test-truncf2.c: Likewise.
+ * tests/test-truncl.c: Likewise.
+ * tests/test-uname.c: Likewise.
+ * tests/test-unlink.c: Likewise.
+ * tests/test-unlinkat.c: Likewise.
+ * tests/test-unsetenv.c: Likewise.
+ * tests/test-usleep.c: Likewise.
+ * tests/test-utimens.c: Likewise.
+ * tests/test-utimensat.c: Likewise.
+ * tests/test-vasnprintf-posix.c: Likewise.
+ * tests/test-vasnprintf-posix2.c: Likewise.
+ * tests/test-vasnprintf.c: Likewise.
+ * tests/test-vasprintf-posix.c: Likewise.
+ * tests/test-vasprintf.c: Likewise.
+ * tests/test-vdprintf-posix.c: Likewise.
+ * tests/test-vfprintf-posix.c: Likewise.
+ * tests/test-vprintf-posix.c: Likewise.
+ * tests/test-vsnprintf-posix.c: Likewise.
+ * tests/test-vsnprintf.c: Likewise.
+ * tests/test-vsprintf-posix.c: Likewise.
+ * tests/test-wcrtomb.c: Likewise.
+ * tests/test-wcsnrtombs.c: Likewise.
+ * tests/test-wcsrtombs.c: Likewise.
+ * tests/test-wctype.c: Likewise.
+ * tests/test-wcwidth.c: Likewise.
+ * tests/test-xfprintf-posix.c: Likewise.
+ * tests/test-xmemdup0.c: Likewise.
+ * tests/test-xprintf-posix.c: Likewise.
+ * tests/test-xvasprintf.c: Likewise.
+ * tests/unicase/test-locale-language.c: Likewise.
+ * tests/unicase/test-mapping-part1.h: Likewise.
+ * tests/unicase/test-predicate-part1.h: Likewise.
+ * tests/unicase/test-u8-casecmp.c: Likewise.
+ * tests/unicase/test-u8-casecoll.c: Likewise.
+ * tests/unicase/test-u8-casefold.c: Likewise.
+ * tests/unicase/test-u8-is-cased.c: Likewise.
+ * tests/unicase/test-u8-is-casefolded.c: Likewise.
+ * tests/unicase/test-u8-is-lowercase.c: Likewise.
+ * tests/unicase/test-u8-is-titlecase.c: Likewise.
+ * tests/unicase/test-u8-is-uppercase.c: Likewise.
+ * tests/unicase/test-u8-tolower.c: Likewise.
+ * tests/unicase/test-u8-totitle.c: Likewise.
+ * tests/unicase/test-u8-toupper.c: Likewise.
+ * tests/unicase/test-u16-casecmp.c: Likewise.
+ * tests/unicase/test-u16-casecoll.c: Likewise.
+ * tests/unicase/test-u16-casefold.c: Likewise.
+ * tests/unicase/test-u16-is-cased.c: Likewise.
+ * tests/unicase/test-u16-is-casefolded.c: Likewise.
+ * tests/unicase/test-u16-is-lowercase.c: Likewise.
+ * tests/unicase/test-u16-is-titlecase.c: Likewise.
+ * tests/unicase/test-u16-is-uppercase.c: Likewise.
+ * tests/unicase/test-u16-tolower.c: Likewise.
+ * tests/unicase/test-u16-totitle.c: Likewise.
+ * tests/unicase/test-u16-toupper.c: Likewise.
+ * tests/unicase/test-u32-casecmp.c: Likewise.
+ * tests/unicase/test-u32-casecoll.c: Likewise.
+ * tests/unicase/test-u32-casefold.c: Likewise.
+ * tests/unicase/test-u32-is-cased.c: Likewise.
+ * tests/unicase/test-u32-is-casefolded.c: Likewise.
+ * tests/unicase/test-u32-is-lowercase.c: Likewise.
+ * tests/unicase/test-u32-is-titlecase.c: Likewise.
+ * tests/unicase/test-u32-is-uppercase.c: Likewise.
+ * tests/unicase/test-u32-tolower.c: Likewise.
+ * tests/unicase/test-u32-totitle.c: Likewise.
+ * tests/unicase/test-u32-toupper.c: Likewise.
+ * tests/unicase/test-ulc-casecmp.c: Likewise.
+ * tests/unicase/test-ulc-casecoll.c: Likewise.
+ * tests/uniconv/test-u8-conv-from-enc.c: Likewise.
+ * tests/uniconv/test-u8-conv-to-enc.c: Likewise.
+ * tests/uniconv/test-u8-strconv-from-enc.c: Likewise.
+ * tests/uniconv/test-u8-strconv-to-enc.c: Likewise.
+ * tests/uniconv/test-u16-conv-from-enc.c: Likewise.
+ * tests/uniconv/test-u16-conv-to-enc.c: Likewise.
+ * tests/uniconv/test-u16-strconv-from-enc.c: Likewise.
+ * tests/uniconv/test-u16-strconv-to-enc.c: Likewise.
+ * tests/uniconv/test-u32-conv-from-enc.c: Likewise.
+ * tests/uniconv/test-u32-conv-to-enc.c: Likewise.
+ * tests/uniconv/test-u32-strconv-from-enc.c: Likewise.
+ * tests/uniconv/test-u32-strconv-to-enc.c: Likewise.
+ * tests/unictype/test-bidi_byname.c: Likewise.
+ * tests/unictype/test-bidi_name.c: Likewise.
+ * tests/unictype/test-bidi_of.c: Likewise.
+ * tests/unictype/test-bidi_test.c: Likewise.
+ * tests/unictype/test-block_list.c: Likewise.
+ * tests/unictype/test-block_of.c: Likewise.
+ * tests/unictype/test-block_test.c: Likewise.
+ * tests/unictype/test-categ_and.c: Likewise.
+ * tests/unictype/test-categ_and_not.c: Likewise.
+ * tests/unictype/test-categ_byname.c: Likewise.
+ * tests/unictype/test-categ_name.c: Likewise.
+ * tests/unictype/test-categ_none.c: Likewise.
+ * tests/unictype/test-categ_of.c: Likewise.
+ * tests/unictype/test-categ_or.c: Likewise.
+ * tests/unictype/test-categ_test_withtable.c: Likewise.
+ * tests/unictype/test-combining.c: Likewise.
+ * tests/unictype/test-decdigit.c: Likewise.
+ * tests/unictype/test-digit.c: Likewise.
+ * tests/unictype/test-mirror.c: Likewise.
+ * tests/unictype/test-numeric.c: Likewise.
+ * tests/unictype/test-pr_byname.c: Likewise.
+ * tests/unictype/test-pr_test.c: Likewise.
+ * tests/unictype/test-predicate-part1.h: Likewise.
+ * tests/unictype/test-scripts.c: Likewise.
+ * tests/unictype/test-sy_c_ident.c: Likewise.
+ * tests/unictype/test-sy_java_ident.c: Likewise.
+ * tests/unilbrk/test-u8-possible-linebreaks.c: Likewise.
+ * tests/unilbrk/test-u8-width-linebreaks.c: Likewise.
+ * tests/unilbrk/test-u16-possible-linebreaks.c: Likewise.
+ * tests/unilbrk/test-u16-width-linebreaks.c: Likewise.
+ * tests/unilbrk/test-u32-possible-linebreaks.c: Likewise.
+ * tests/unilbrk/test-u32-width-linebreaks.c: Likewise.
+ * tests/unilbrk/test-ulc-possible-linebreaks.c: Likewise.
+ * tests/unilbrk/test-ulc-width-linebreaks.c: Likewise.
+ * tests/uninorm/test-canonical-decomposition.c: Likewise.
+ * tests/uninorm/test-compat-decomposition.c: Likewise.
+ * tests/uninorm/test-composition.c: Likewise.
+ * tests/uninorm/test-decomposing-form.c: Likewise.
+ * tests/uninorm/test-decomposition.c: Likewise.
+ * tests/uninorm/test-u8-nfc.c: Likewise.
+ * tests/uninorm/test-u8-nfd.c: Likewise.
+ * tests/uninorm/test-u8-nfkc.c: Likewise.
+ * tests/uninorm/test-u8-nfkd.c: Likewise.
+ * tests/uninorm/test-u8-normcmp.c: Likewise.
+ * tests/uninorm/test-u8-normcoll.c: Likewise.
+ * tests/uninorm/test-u16-nfc.c: Likewise.
+ * tests/uninorm/test-u16-nfd.c: Likewise.
+ * tests/uninorm/test-u16-nfkc.c: Likewise.
+ * tests/uninorm/test-u16-nfkd.c: Likewise.
+ * tests/uninorm/test-u16-normcmp.c: Likewise.
+ * tests/uninorm/test-u16-normcoll.c: Likewise.
+ * tests/uninorm/test-u32-nfc.c: Likewise.
+ * tests/uninorm/test-u32-nfd.c: Likewise.
+ * tests/uninorm/test-u32-nfkc.c: Likewise.
+ * tests/uninorm/test-u32-nfkd.c: Likewise.
+ * tests/uninorm/test-u32-normalize-big.c: Likewise.
+ * tests/uninorm/test-u32-normcmp.c: Likewise.
+ * tests/uninorm/test-u32-normcoll.c: Likewise.
+ * tests/uninorm/test-uninorm-filter-nfc.c: Likewise.
+ * tests/unistdio/test-u8-asnprintf1.c: Likewise.
+ * tests/unistdio/test-u8-vasnprintf1.c: Likewise.
+ * tests/unistdio/test-u8-vasnprintf2.c: Likewise.
+ * tests/unistdio/test-u8-vasnprintf3.c: Likewise.
+ * tests/unistdio/test-u8-vasprintf1.c: Likewise.
+ * tests/unistdio/test-u8-vsnprintf1.c: Likewise.
+ * tests/unistdio/test-u8-vsprintf1.c: Likewise.
+ * tests/unistdio/test-u16-asnprintf1.c: Likewise.
+ * tests/unistdio/test-u16-vasnprintf1.c: Likewise.
+ * tests/unistdio/test-u16-vasnprintf2.c: Likewise.
+ * tests/unistdio/test-u16-vasnprintf3.c: Likewise.
+ * tests/unistdio/test-u16-vasprintf1.c: Likewise.
+ * tests/unistdio/test-u16-vsnprintf1.c: Likewise.
+ * tests/unistdio/test-u16-vsprintf1.c: Likewise.
+ * tests/unistdio/test-u32-asnprintf1.c: Likewise.
+ * tests/unistdio/test-u32-vasnprintf1.c: Likewise.
+ * tests/unistdio/test-u32-vasnprintf2.c: Likewise.
+ * tests/unistdio/test-u32-vasnprintf3.c: Likewise.
+ * tests/unistdio/test-u32-vasprintf1.c: Likewise.
+ * tests/unistdio/test-u32-vsnprintf1.c: Likewise.
+ * tests/unistdio/test-u32-vsprintf1.c: Likewise.
+ * tests/unistdio/test-ulc-asnprintf1.c: Likewise.
+ * tests/unistdio/test-ulc-vasnprintf1.c: Likewise.
+ * tests/unistdio/test-ulc-vasnprintf2.c: Likewise.
+ * tests/unistdio/test-ulc-vasnprintf3.c: Likewise.
+ * tests/unistdio/test-ulc-vasprintf1.c: Likewise.
+ * tests/unistdio/test-ulc-vsnprintf1.c: Likewise.
+ * tests/unistdio/test-ulc-vsprintf1.c: Likewise.
+ * tests/uniwbrk/test-u8-wordbreaks.c: Likewise.
+ * tests/uniwbrk/test-u16-wordbreaks.c: Likewise.
+ * tests/uniwbrk/test-u32-wordbreaks.c: Likewise.
+ * tests/uniwbrk/test-ulc-wordbreaks.c: Likewise.
+ * tests/uniwidth/test-u8-strwidth.c: Likewise.
+ * tests/uniwidth/test-u8-width.c: Likewise.
+ * tests/uniwidth/test-u16-strwidth.c: Likewise.
+ * tests/uniwidth/test-u16-width.c: Likewise.
+ * tests/uniwidth/test-u32-strwidth.c: Likewise.
+ * tests/uniwidth/test-u32-width.c: Likewise.
+ * tests/uniwidth/test-uc_width.c: Likewise.
+ * tests/uniwidth/test-uc_width2.c: Likewise.
+ * modules/acl-tests (Files): Add tests/macros.h.
+ * modules/areadlink-tests (Files): Likewise.
+ * modules/areadlink-with-size-tests (Files): Likewise.
+ * modules/areadlinkat-tests (Files): Likewise.
+ * modules/areadlinkat-with-size-tests (Files): Likewise.
+ * modules/argmatch-tests (Files): Likewise.
+ * modules/argv-iter-tests (Files): Likewise.
+ * modules/array-list-tests (Files): Likewise.
+ * modules/array-mergesort-tests (Files): Likewise.
+ * modules/array-oset-tests (Files): Likewise.
+ * modules/avltree-list-tests (Files): Likewise.
+ * modules/avltree-oset-tests (Files): Likewise.
+ * modules/avltreehash-list-tests (Files): Likewise.
+ * modules/base64-tests (Files): Likewise.
+ * modules/binary-io-tests (Files): Likewise.
+ * modules/bitrotate-tests (Files): Likewise.
+ * modules/btowc-tests (Files): Likewise.
+ * modules/byteswap-tests (Files): Likewise.
+ * modules/c-ctype-tests (Files): Likewise.
+ * modules/c-stack-tests (Files): Likewise.
+ * modules/c-strcase-tests (Files): Likewise.
+ * modules/c-strcasestr-tests (Files): Likewise.
+ * modules/c-strstr-tests (Files): Likewise.
+ * modules/canonicalize-lgpl-tests (Files): Likewise.
+ * modules/canonicalize-tests (Files): Likewise.
+ * modules/carray-list-tests (Files): Likewise.
+ * modules/ceilf-tests (Files): Likewise.
+ * modules/ceill-tests (Files): Likewise.
+ * modules/chown-tests (Files): Likewise.
+ * modules/cloexec-tests (Files): Likewise.
+ * modules/copy-file-tests (Files): Likewise.
+ * modules/count-one-bits-tests (Files): Likewise.
+ * modules/dprintf-posix-tests (Files): Likewise.
+ * modules/dup2-tests (Files): Likewise.
+ * modules/dup3-tests (Files): Likewise.
+ * modules/duplocale-tests (Files): Likewise.
+ * modules/fbufmode-tests (Files): Likewise.
+ * modules/fchdir-tests (Files): Likewise.
+ * modules/fcntl-safer-tests (Files): Likewise.
+ * modules/fcntl-tests (Files): Likewise.
+ * modules/fdopendir-tests (Files): Likewise.
+ * modules/fdutimensat-tests (Files): Likewise.
+ * modules/fflush-tests (Files): Likewise.
+ * modules/filevercmp-tests (Files): Likewise.
+ * modules/flock-tests (Files): Likewise.
+ * modules/floorf-tests (Files): Likewise.
+ * modules/floorl-tests (Files): Likewise.
+ * modules/fnmatch-tests (Files): Likewise.
+ * modules/fopen-safer-tests (Files): Likewise.
+ * modules/fopen-tests (Files): Likewise.
+ * modules/fpending-tests (Files): Likewise.
+ * modules/fprintf-posix-tests (Files): Likewise.
+ * modules/fpurge-tests (Files): Likewise.
+ * modules/freadable-tests (Files): Likewise.
+ * modules/freadahead-tests (Files): Likewise.
+ * modules/freading-tests (Files): Likewise.
+ * modules/freadptr-tests (Files): Likewise.
+ * modules/freadseek-tests (Files): Likewise.
+ * modules/freopen-tests (Files): Likewise.
+ * modules/frexp-nolibm-tests (Files): Likewise.
+ * modules/frexp-tests (Files): Likewise.
+ * modules/frexpl-nolibm-tests (Files): Likewise.
+ * modules/frexpl-tests (Files): Likewise.
+ * modules/fseek-tests (Files): Likewise.
+ * modules/fseeko-tests (Files): Likewise.
+ * modules/fstrcmp-tests (Files): Likewise.
+ * modules/fsync-tests (Files): Likewise.
+ * modules/ftell-tests (Files): Likewise.
+ * modules/ftello-tests (Files): Likewise.
+ * modules/func-tests (Files): Likewise.
+ * modules/futimens-tests (Files): Likewise.
+ * modules/fwritable-tests (Files): Likewise.
+ * modules/fwriting-tests (Files): Likewise.
+ * modules/getcwd-tests (Files): Likewise.
+ * modules/getdate-tests (Files): Likewise.
+ * modules/getdelim-tests (Files): Likewise.
+ * modules/getdtablesize-tests (Files): Likewise.
+ * modules/getgroups-tests (Files): Likewise.
+ * modules/getline-tests (Files): Likewise.
+ * modules/getndelim2-tests (Files): Likewise.
+ * modules/glob-tests (Files): Likewise.
+ * modules/hash-tests (Files): Likewise.
+ * modules/i-ring-tests (Files): Likewise.
+ * modules/iconv-tests (Files): Likewise.
+ * modules/iconv_open-utf-tests (Files): Likewise.
+ * modules/idpriv-drop-tests (Files): Likewise.
+ * modules/idpriv-droptemp-tests (Files): Likewise.
+ * modules/inet_ntop-tests (Files): Likewise.
+ * modules/inet_pton-tests (Files): Likewise.
+ * modules/isblank-tests (Files): Likewise.
+ * modules/isfinite-tests (Files): Likewise.
+ * modules/isinf-tests (Files): Likewise.
+ * modules/isnan-tests (Files): Likewise.
+ * modules/isnand-nolibm-tests (Files): Likewise.
+ * modules/isnand-tests (Files): Likewise.
+ * modules/isnanf-nolibm-tests (Files): Likewise.
+ * modules/isnanf-tests (Files): Likewise.
+ * modules/isnanl-nolibm-tests (Files): Likewise.
+ * modules/isnanl-tests (Files): Likewise.
+ * modules/lchown-tests (Files): Likewise.
+ * modules/ldexpl-tests (Files): Likewise.
+ * modules/link-tests (Files): Likewise.
+ * modules/linkat-tests (Files): Likewise.
+ * modules/linked-list-tests (Files): Likewise.
+ * modules/linkedhash-list-tests (Files): Likewise.
+ * modules/localename-tests (Files): Likewise.
+ * modules/lseek-tests (Files): Likewise.
+ * modules/lstat-tests (Files): Likewise.
+ * modules/mbmemcasecmp-tests (Files): Likewise.
+ * modules/mbmemcasecoll-tests (Files): Likewise.
+ * modules/mbrtowc-tests (Files): Likewise.
+ * modules/mbscasecmp-tests (Files): Likewise.
+ * modules/mbscasestr-tests (Files): Likewise.
+ * modules/mbschr-tests (Files): Likewise.
+ * modules/mbscspn-tests (Files): Likewise.
+ * modules/mbsinit-tests (Files): Likewise.
+ * modules/mbsncasecmp-tests (Files): Likewise.
+ * modules/mbsnrtowcs-tests (Files): Likewise.
+ * modules/mbspbrk-tests (Files): Likewise.
+ * modules/mbspcasecmp-tests (Files): Likewise.
+ * modules/mbsrchr-tests (Files): Likewise.
+ * modules/mbsrtowcs-tests (Files): Likewise.
+ * modules/mbsspn-tests (Files): Likewise.
+ * modules/mbsstr-tests (Files): Likewise.
+ * modules/memchr-tests (Files): Likewise.
+ * modules/memchr2-tests (Files): Likewise.
+ * modules/memcmp-tests (Files): Likewise.
+ * modules/memmem-tests (Files): Likewise.
+ * modules/memrchr-tests (Files): Likewise.
+ * modules/mkdir-tests (Files): Likewise.
+ * modules/mkfifo-tests (Files): Likewise.
+ * modules/mkfifoat-tests (Files): Likewise.
+ * modules/mknod-tests (Files): Likewise.
+ * modules/nanosleep-tests (Files): Likewise.
+ * modules/nl_langinfo-tests (Files): Likewise.
+ * modules/obstack-printf-tests (Files): Likewise.
+ * modules/open-tests (Files): Likewise.
+ * modules/openat-tests (Files): Likewise.
+ * modules/pipe-filter-gi-tests (Files): Likewise.
+ * modules/pipe-filter-ii-tests (Files): Likewise.
+ * modules/pipe2-tests (Files): Likewise.
+ * modules/popen-safer-tests (Files): Likewise.
+ * modules/popen-tests (Files): Likewise.
+ * modules/posixtm-tests (Files): Likewise.
+ * modules/pread-tests (Files): Likewise.
+ * modules/printf-frexp-tests (Files): Likewise.
+ * modules/printf-frexpl-tests (Files): Likewise.
+ * modules/printf-posix-tests (Files): Likewise.
+ * modules/priv-set-tests (Files): Likewise.
+ * modules/quotearg-tests (Files): Likewise.
+ * modules/random_r-tests (Files): Likewise.
+ * modules/rawmemchr-tests (Files): Likewise.
+ * modules/rbtree-list-tests (Files): Likewise.
+ * modules/rbtree-oset-tests (Files): Likewise.
+ * modules/rbtreehash-list-tests (Files): Likewise.
+ * modules/readlink-tests (Files): Likewise.
+ * modules/remove-tests (Files): Likewise.
+ * modules/rename-tests (Files): Likewise.
+ * modules/renameat-tests (Files): Likewise.
+ * modules/rmdir-tests (Files): Likewise.
+ * modules/round-tests (Files): Likewise.
+ * modules/roundf-tests (Files): Likewise.
+ * modules/roundl-tests (Files): Likewise.
+ * modules/safe-alloc-tests (Files): Likewise.
+ * modules/setenv-tests (Files): Likewise.
+ * modules/sigaction-tests (Files): Likewise.
+ * modules/signbit-tests (Files): Likewise.
+ * modules/sleep-tests (Files): Likewise.
+ * modules/snprintf-posix-tests (Files): Likewise.
+ * modules/snprintf-tests (Files): Likewise.
+ * modules/sprintf-posix-tests (Files): Likewise.
+ * modules/stat-tests (Files): Likewise.
+ * modules/stat-time-tests (Files): Likewise.
+ * modules/strcasestr-tests (Files): Likewise.
+ * modules/strchrnul-tests (Files): Likewise.
+ * modules/strerror-tests (Files): Likewise.
+ * modules/striconv-tests (Files): Likewise.
+ * modules/striconveh-tests (Files): Likewise.
+ * modules/striconveha-tests (Files): Likewise.
+ * modules/strsignal-tests (Files): Likewise.
+ * modules/strstr-tests (Files): Likewise.
+ * modules/strtod-tests (Files): Likewise.
+ * modules/strverscmp-tests (Files): Likewise.
+ * modules/symlink-tests (Files): Likewise.
+ * modules/symlinkat-tests (Files): Likewise.
+ * modules/trunc-tests (Files): Likewise.
+ * modules/truncf-tests (Files): Likewise.
+ * modules/truncl-tests (Files): Likewise.
+ * modules/uname-tests (Files): Likewise.
+ * modules/unicase/cased-tests (Files): Likewise.
+ * modules/unicase/ignorable-tests (Files): Likewise.
+ * modules/unicase/locale-language-tests (Files): Likewise.
+ * modules/unicase/tolower-tests (Files): Likewise.
+ * modules/unicase/totitle-tests (Files): Likewise.
+ * modules/unicase/toupper-tests (Files): Likewise.
+ * modules/unicase/u8-casecmp-tests (Files): Likewise.
+ * modules/unicase/u8-casecoll-tests (Files): Likewise.
+ * modules/unicase/u8-casefold-tests (Files): Likewise.
+ * modules/unicase/u8-is-cased-tests (Files): Likewise.
+ * modules/unicase/u8-is-casefolded-tests (Files): Likewise.
+ * modules/unicase/u8-is-lowercase-tests (Files): Likewise.
+ * modules/unicase/u8-is-titlecase-tests (Files): Likewise.
+ * modules/unicase/u8-is-uppercase-tests (Files): Likewise.
+ * modules/unicase/u8-tolower-tests (Files): Likewise.
+ * modules/unicase/u8-totitle-tests (Files): Likewise.
+ * modules/unicase/u8-toupper-tests (Files): Likewise.
+ * modules/unicase/u16-casecmp-tests (Files): Likewise.
+ * modules/unicase/u16-casecoll-tests (Files): Likewise.
+ * modules/unicase/u16-casefold-tests (Files): Likewise.
+ * modules/unicase/u16-is-cased-tests (Files): Likewise.
+ * modules/unicase/u16-is-casefolded-tests (Files): Likewise.
+ * modules/unicase/u16-is-lowercase-tests (Files): Likewise.
+ * modules/unicase/u16-is-titlecase-tests (Files): Likewise.
+ * modules/unicase/u16-is-uppercase-tests (Files): Likewise.
+ * modules/unicase/u16-tolower-tests (Files): Likewise.
+ * modules/unicase/u16-totitle-tests (Files): Likewise.
+ * modules/unicase/u16-toupper-tests (Files): Likewise.
+ * modules/unicase/u32-casecmp-tests (Files): Likewise.
+ * modules/unicase/u32-casecoll-tests (Files): Likewise.
+ * modules/unicase/u32-casefold-tests (Files): Likewise.
+ * modules/unicase/u32-is-cased-tests (Files): Likewise.
+ * modules/unicase/u32-is-casefolded-tests (Files): Likewise.
+ * modules/unicase/u32-is-lowercase-tests (Files): Likewise.
+ * modules/unicase/u32-is-titlecase-tests (Files): Likewise.
+ * modules/unicase/u32-is-uppercase-tests (Files): Likewise.
+ * modules/unicase/u32-tolower-tests (Files): Likewise.
+ * modules/unicase/u32-totitle-tests (Files): Likewise.
+ * modules/unicase/u32-toupper-tests (Files): Likewise.
+ * modules/unicase/ulc-casecmp-tests (Files): Likewise.
+ * modules/unicase/ulc-casecoll-tests (Files): Likewise.
+ * modules/uniconv/u8-conv-from-enc-tests (Files): Likewise.
+ * modules/uniconv/u8-conv-to-enc-tests (Files): Likewise.
+ * modules/uniconv/u8-strconv-from-enc-tests (Files): Likewise.
+ * modules/uniconv/u8-strconv-to-enc-tests (Files): Likewise.
+ * modules/uniconv/u16-conv-from-enc-tests (Files): Likewise.
+ * modules/uniconv/u16-conv-to-enc-tests (Files): Likewise.
+ * modules/uniconv/u16-strconv-from-enc-tests (Files): Likewise.
+ * modules/uniconv/u16-strconv-to-enc-tests (Files): Likewise.
+ * modules/uniconv/u32-conv-from-enc-tests (Files): Likewise.
+ * modules/uniconv/u32-conv-to-enc-tests (Files): Likewise.
+ * modules/uniconv/u32-strconv-from-enc-tests (Files): Likewise.
+ * modules/uniconv/u32-strconv-to-enc-tests (Files): Likewise.
+ * modules/unictype/bidicategory-byname-tests (Files): Likewise.
+ * modules/unictype/bidicategory-name-tests (Files): Likewise.
+ * modules/unictype/bidicategory-of-tests (Files): Likewise.
+ * modules/unictype/bidicategory-test-tests (Files): Likewise.
+ * modules/unictype/block-list-tests (Files): Likewise.
+ * modules/unictype/block-of-tests (Files): Likewise.
+ * modules/unictype/block-test-tests (Files): Likewise.
+ * modules/unictype/category-C-tests (Files): Likewise.
+ * modules/unictype/category-Cc-tests (Files): Likewise.
+ * modules/unictype/category-Cf-tests (Files): Likewise.
+ * modules/unictype/category-Cn-tests (Files): Likewise.
+ * modules/unictype/category-Co-tests (Files): Likewise.
+ * modules/unictype/category-Cs-tests (Files): Likewise.
+ * modules/unictype/category-L-tests (Files): Likewise.
+ * modules/unictype/category-Ll-tests (Files): Likewise.
+ * modules/unictype/category-Lm-tests (Files): Likewise.
+ * modules/unictype/category-Lo-tests (Files): Likewise.
+ * modules/unictype/category-Lt-tests (Files): Likewise.
+ * modules/unictype/category-Lu-tests (Files): Likewise.
+ * modules/unictype/category-M-tests (Files): Likewise.
+ * modules/unictype/category-Mc-tests (Files): Likewise.
+ * modules/unictype/category-Me-tests (Files): Likewise.
+ * modules/unictype/category-Mn-tests (Files): Likewise.
+ * modules/unictype/category-N-tests (Files): Likewise.
+ * modules/unictype/category-Nd-tests (Files): Likewise.
+ * modules/unictype/category-Nl-tests (Files): Likewise.
+ * modules/unictype/category-No-tests (Files): Likewise.
+ * modules/unictype/category-P-tests (Files): Likewise.
+ * modules/unictype/category-Pc-tests (Files): Likewise.
+ * modules/unictype/category-Pd-tests (Files): Likewise.
+ * modules/unictype/category-Pe-tests (Files): Likewise.
+ * modules/unictype/category-Pf-tests (Files): Likewise.
+ * modules/unictype/category-Pi-tests (Files): Likewise.
+ * modules/unictype/category-Po-tests (Files): Likewise.
+ * modules/unictype/category-Ps-tests (Files): Likewise.
+ * modules/unictype/category-S-tests (Files): Likewise.
+ * modules/unictype/category-Sc-tests (Files): Likewise.
+ * modules/unictype/category-Sk-tests (Files): Likewise.
+ * modules/unictype/category-Sm-tests (Files): Likewise.
+ * modules/unictype/category-So-tests (Files): Likewise.
+ * modules/unictype/category-Z-tests (Files): Likewise.
+ * modules/unictype/category-Zl-tests (Files): Likewise.
+ * modules/unictype/category-Zp-tests (Files): Likewise.
+ * modules/unictype/category-Zs-tests (Files): Likewise.
+ * modules/unictype/category-and-not-tests (Files): Likewise.
+ * modules/unictype/category-and-tests (Files): Likewise.
+ * modules/unictype/category-byname-tests (Files): Likewise.
+ * modules/unictype/category-name-tests (Files): Likewise.
+ * modules/unictype/category-none-tests (Files): Likewise.
+ * modules/unictype/category-of-tests (Files): Likewise.
+ * modules/unictype/category-or-tests (Files): Likewise.
+ * modules/unictype/category-test-withtable-tests (Files): Likewise.
+ * modules/unictype/combining-class-tests (Files): Likewise.
+ * modules/unictype/ctype-alnum-tests (Files): Likewise.
+ * modules/unictype/ctype-alpha-tests (Files): Likewise.
+ * modules/unictype/ctype-blank-tests (Files): Likewise.
+ * modules/unictype/ctype-cntrl-tests (Files): Likewise.
+ * modules/unictype/ctype-digit-tests (Files): Likewise.
+ * modules/unictype/ctype-graph-tests (Files): Likewise.
+ * modules/unictype/ctype-lower-tests (Files): Likewise.
+ * modules/unictype/ctype-print-tests (Files): Likewise.
+ * modules/unictype/ctype-punct-tests (Files): Likewise.
+ * modules/unictype/ctype-space-tests (Files): Likewise.
+ * modules/unictype/ctype-upper-tests (Files): Likewise.
+ * modules/unictype/ctype-xdigit-tests (Files): Likewise.
+ * modules/unictype/decimal-digit-tests (Files): Likewise.
+ * modules/unictype/digit-tests (Files): Likewise.
+ * modules/unictype/mirror-tests (Files): Likewise.
+ * modules/unictype/numeric-tests (Files): Likewise.
+ * modules/unictype/property-alphabetic-tests (Files): Likewise.
+ * modules/unictype/property-ascii-hex-digit-tests (Files): Likewise.
+ * modules/unictype/property-bidi-arabic-digit-tests (Files): Likewise.
+ * modules/unictype/property-bidi-arabic-right-to-left-tests (Files):
+ Likewise.
+ * modules/unictype/property-bidi-block-separator-tests (Files):
+ Likewise.
+ * modules/unictype/property-bidi-boundary-neutral-tests (Files):
+ Likewise.
+ * modules/unictype/property-bidi-common-separator-tests (Files):
+ Likewise.
+ * modules/unictype/property-bidi-control-tests (Files): Likewise.
+ * modules/unictype/property-bidi-embedding-or-override-tests (Files):
+ Likewise.
+ * modules/unictype/property-bidi-eur-num-separator-tests (Files):
+ Likewise.
+ * modules/unictype/property-bidi-eur-num-terminator-tests (Files):
+ Likewise.
+ * modules/unictype/property-bidi-european-digit-tests (Files): Likewise.
+ * modules/unictype/property-bidi-hebrew-right-to-left-tests (Files):
+ Likewise.
+ * modules/unictype/property-bidi-left-to-right-tests (Files): Likewise.
+ * modules/unictype/property-bidi-non-spacing-mark-tests (Files):
+ Likewise.
+ * modules/unictype/property-bidi-other-neutral-tests (Files): Likewise.
+ * modules/unictype/property-bidi-pdf-tests (Files): Likewise.
+ * modules/unictype/property-bidi-segment-separator-tests (Files):
+ Likewise.
+ * modules/unictype/property-bidi-whitespace-tests (Files): Likewise.
+ * modules/unictype/property-byname-tests (Files): Likewise.
+ * modules/unictype/property-combining-tests (Files): Likewise.
+ * modules/unictype/property-composite-tests (Files): Likewise.
+ * modules/unictype/property-currency-symbol-tests (Files): Likewise.
+ * modules/unictype/property-dash-tests (Files): Likewise.
+ * modules/unictype/property-decimal-digit-tests (Files): Likewise.
+ * modules/unictype/property-default-ignorable-code-point-tests (Files):
+ Likewise.
+ * modules/unictype/property-deprecated-tests (Files): Likewise.
+ * modules/unictype/property-diacritic-tests (Files): Likewise.
+ * modules/unictype/property-extender-tests (Files): Likewise.
+ * modules/unictype/property-format-control-tests (Files): Likewise.
+ * modules/unictype/property-grapheme-base-tests (Files): Likewise.
+ * modules/unictype/property-grapheme-extend-tests (Files): Likewise.
+ * modules/unictype/property-grapheme-link-tests (Files): Likewise.
+ * modules/unictype/property-hex-digit-tests (Files): Likewise.
+ * modules/unictype/property-hyphen-tests (Files): Likewise.
+ * modules/unictype/property-id-continue-tests (Files): Likewise.
+ * modules/unictype/property-id-start-tests (Files): Likewise.
+ * modules/unictype/property-ideographic-tests (Files): Likewise.
+ * modules/unictype/property-ids-binary-operator-tests (Files): Likewise.
+ * modules/unictype/property-ids-trinary-operator-tests (Files):
+ Likewise.
+ * modules/unictype/property-ignorable-control-tests (Files): Likewise.
+ * modules/unictype/property-iso-control-tests (Files): Likewise.
+ * modules/unictype/property-join-control-tests (Files): Likewise.
+ * modules/unictype/property-left-of-pair-tests (Files): Likewise.
+ * modules/unictype/property-line-separator-tests (Files): Likewise.
+ * modules/unictype/property-logical-order-exception-tests (Files):
+ Likewise.
+ * modules/unictype/property-lowercase-tests (Files): Likewise.
+ * modules/unictype/property-math-tests (Files): Likewise.
+ * modules/unictype/property-non-break-tests (Files): Likewise.
+ * modules/unictype/property-not-a-character-tests (Files): Likewise.
+ * modules/unictype/property-numeric-tests (Files): Likewise.
+ * modules/unictype/property-other-alphabetic-tests (Files): Likewise.
+ * modules/unictype/property-other-default-ignorable-code-point-tests
+ (Files): Likewise.
+ * modules/unictype/property-other-grapheme-extend-tests (Files):
+ Likewise.
+ * modules/unictype/property-other-id-continue-tests (Files): Likewise.
+ * modules/unictype/property-other-id-start-tests (Files): Likewise.
+ * modules/unictype/property-other-lowercase-tests (Files): Likewise.
+ * modules/unictype/property-other-math-tests (Files): Likewise.
+ * modules/unictype/property-other-uppercase-tests (Files): Likewise.
+ * modules/unictype/property-paired-punctuation-tests (Files): Likewise.
+ * modules/unictype/property-paragraph-separator-tests (Files): Likewise.
+ * modules/unictype/property-pattern-syntax-tests (Files): Likewise.
+ * modules/unictype/property-pattern-white-space-tests (Files): Likewise.
+ * modules/unictype/property-private-use-tests (Files): Likewise.
+ * modules/unictype/property-punctuation-tests (Files): Likewise.
+ * modules/unictype/property-quotation-mark-tests (Files): Likewise.
+ * modules/unictype/property-radical-tests (Files): Likewise.
+ * modules/unictype/property-sentence-terminal-tests (Files): Likewise.
+ * modules/unictype/property-soft-dotted-tests (Files): Likewise.
+ * modules/unictype/property-space-tests (Files): Likewise.
+ * modules/unictype/property-terminal-punctuation-tests (Files):
+ Likewise.
+ * modules/unictype/property-test-tests (Files): Likewise.
+ * modules/unictype/property-titlecase-tests (Files): Likewise.
+ * modules/unictype/property-unassigned-code-value-tests (Files):
+ Likewise.
+ * modules/unictype/property-unified-ideograph-tests (Files): Likewise.
+ * modules/unictype/property-uppercase-tests (Files): Likewise.
+ * modules/unictype/property-variation-selector-tests (Files): Likewise.
+ * modules/unictype/property-white-space-tests (Files): Likewise.
+ * modules/unictype/property-xid-continue-tests (Files): Likewise.
+ * modules/unictype/property-xid-start-tests (Files): Likewise.
+ * modules/unictype/property-zero-width-tests (Files): Likewise.
+ * modules/unictype/scripts-tests (Files): Likewise.
+ * modules/unictype/syntax-c-ident-tests (Files): Likewise.
+ * modules/unictype/syntax-c-whitespace-tests (Files): Likewise.
+ * modules/unictype/syntax-java-ident-tests (Files): Likewise.
+ * modules/unictype/syntax-java-whitespace-tests (Files): Likewise.
+ * modules/unilbrk/u8-possible-linebreaks-tests (Files): Likewise.
+ * modules/unilbrk/u8-width-linebreaks-tests (Files): Likewise.
+ * modules/unilbrk/u16-possible-linebreaks-tests (Files): Likewise.
+ * modules/unilbrk/u16-width-linebreaks-tests (Files): Likewise.
+ * modules/unilbrk/u32-possible-linebreaks-tests (Files): Likewise.
+ * modules/unilbrk/u32-width-linebreaks-tests (Files): Likewise.
+ * modules/unilbrk/ulc-possible-linebreaks-tests (Files): Likewise.
+ * modules/unilbrk/ulc-width-linebreaks-tests (Files): Likewise.
+ * modules/uninorm/canonical-decomposition-tests (Files): Likewise.
+ * modules/uninorm/compat-decomposition-tests (Files): Likewise.
+ * modules/uninorm/composition-tests (Files): Likewise.
+ * modules/uninorm/decomposing-form-tests (Files): Likewise.
+ * modules/uninorm/decomposition-tests (Files): Likewise.
+ * modules/uninorm/filter-tests (Files): Likewise.
+ * modules/uninorm/nfc-tests (Files): Likewise.
+ * modules/uninorm/nfd-tests (Files): Likewise.
+ * modules/uninorm/nfkc-tests (Files): Likewise.
+ * modules/uninorm/nfkd-tests (Files): Likewise.
+ * modules/uninorm/u8-normcmp-tests (Files): Likewise.
+ * modules/uninorm/u8-normcoll-tests (Files): Likewise.
+ * modules/uninorm/u16-normcmp-tests (Files): Likewise.
+ * modules/uninorm/u16-normcoll-tests (Files): Likewise.
+ * modules/uninorm/u32-normcmp-tests (Files): Likewise.
+ * modules/uninorm/u32-normcoll-tests (Files): Likewise.
+ * modules/unistdio/u8-asnprintf-tests (Files): Likewise.
+ * modules/unistdio/u8-vasnprintf-tests (Files): Likewise.
+ * modules/unistdio/u8-vasprintf-tests (Files): Likewise.
+ * modules/unistdio/u8-vsnprintf-tests (Files): Likewise.
+ * modules/unistdio/u8-vsprintf-tests (Files): Likewise.
+ * modules/unistdio/u16-asnprintf-tests (Files): Likewise.
+ * modules/unistdio/u16-vasnprintf-tests (Files): Likewise.
+ * modules/unistdio/u16-vasprintf-tests (Files): Likewise.
+ * modules/unistdio/u16-vsnprintf-tests (Files): Likewise.
+ * modules/unistdio/u16-vsprintf-tests (Files): Likewise.
+ * modules/unistdio/u32-asnprintf-tests (Files): Likewise.
+ * modules/unistdio/u32-vasnprintf-tests (Files): Likewise.
+ * modules/unistdio/u32-vasprintf-tests (Files): Likewise.
+ * modules/unistdio/u32-vsnprintf-tests (Files): Likewise.
+ * modules/unistdio/u32-vsprintf-tests (Files): Likewise.
+ * modules/unistdio/ulc-asnprintf-tests (Files): Likewise.
+ * modules/unistdio/ulc-vasnprintf-tests (Files): Likewise.
+ * modules/unistdio/ulc-vasprintf-tests (Files): Likewise.
+ * modules/unistdio/ulc-vsnprintf-tests (Files): Likewise.
+ * modules/unistdio/ulc-vsprintf-tests (Files): Likewise.
+ * modules/uniwbrk/u8-wordbreaks-tests (Files): Likewise.
+ * modules/uniwbrk/u16-wordbreaks-tests (Files): Likewise.
+ * modules/uniwbrk/u32-wordbreaks-tests (Files): Likewise.
+ * modules/uniwbrk/ulc-wordbreaks-tests (Files): Likewise.
+ * modules/uniwidth/u8-strwidth-tests (Files): Likewise.
+ * modules/uniwidth/u8-width-tests (Files): Likewise.
+ * modules/uniwidth/u16-strwidth-tests (Files): Likewise.
+ * modules/uniwidth/u16-width-tests (Files): Likewise.
+ * modules/uniwidth/u32-strwidth-tests (Files): Likewise.
+ * modules/uniwidth/u32-width-tests (Files): Likewise.
+ * modules/uniwidth/width-tests (Files): Likewise.
+ * modules/unlink-tests (Files): Likewise.
+ * modules/unsetenv-tests (Files): Likewise.
+ * modules/usleep-tests (Files): Likewise.
+ * modules/utimens-tests (Files): Likewise.
+ * modules/utimensat-tests (Files): Likewise.
+ * modules/vasnprintf-posix-tests (Files): Likewise.
+ * modules/vasnprintf-tests (Files): Likewise.
+ * modules/vasprintf-posix-tests (Files): Likewise.
+ * modules/vasprintf-tests (Files): Likewise.
+ * modules/vdprintf-posix-tests (Files): Likewise.
+ * modules/vfprintf-posix-tests (Files): Likewise.
+ * modules/vprintf-posix-tests (Files): Likewise.
+ * modules/vsnprintf-posix-tests (Files): Likewise.
+ * modules/vsnprintf-tests (Files): Likewise.
+ * modules/vsprintf-posix-tests (Files): Likewise.
+ * modules/wcrtomb-tests (Files): Likewise.
+ * modules/wcsnrtombs-tests (Files): Likewise.
+ * modules/wcsrtombs-tests (Files): Likewise.
+ * modules/wctype-tests (Files): Likewise.
+ * modules/wcwidth-tests (Files): Likewise.
+ * modules/xmemdup0-tests (Files): Likewise.
+ * modules/xprintf-posix-tests (Files): Likewise.
+ * modules/xvasprintf-tests (Files): Likewise.
+
+2009-12-24 Eric Blake <ebb9@byu.net>
+
+ test-nanosleep: fix typo
+ * tests/test-nanosleep.c (SIGNATURE_CHECK): Fix typo in previous
+ patch.
+ Reported by Bruno Haible.
+
+2009-12-24 Bruno Haible <bruno@clisp.org>
+
+ Reduce namespace pollution on glibc systems.
+ * lib/inttypes.in.h: Don't include <stdint.h> on glibc systems.
+ * lib/stdlib.in.h: Don't include <stdint.h>, <unistd.h> on glibc
+ systems.
+ * lib/unistd.in.h: Don't include <stdio.h>, <fcntl.h>, <stdlib.h>,
+ <getopt.h> on glibc systems.
+ * lib/fcntl.in.h: Don't include <sys/stat.h>, <unistd.h> on glibc
+ systems.
+ * lib/fcntl.c: Include <unistd.h> here instead.
+
+2009-12-24 Bruno Haible <bruno@clisp.org>
+
+ * lib/stdlib.in.h (includes): Fix typo in today's commit.
+
+2009-12-24 Eric Blake <ebb9@byu.net>
+
+ tests: add signature checks
+ * tests/signature.h (SIGNATURE_CHECK): New file.
+ * modules/atexit-tests (Files): Use it.
+ * modules/btowc-tests (Files): Likewise.
+ * modules/canonicalize-lgpl-tests (Files): Likewise.
+ * modules/ceilf-tests (Files): Likewise.
+ * modules/ceill-tests (Files): Likewise.
+ * modules/chown-tests (Files): Likewise.
+ * modules/dprintf-posix-tests (Files): Likewise.
+ * modules/dup2-tests (Files): Likewise.
+ * modules/dup3-tests (Files): Likewise.
+ * modules/duplocale-tests (Files): Likewise.
+ * modules/fchdir-tests (Files): Likewise.
+ * modules/fcntl-tests (Files): Likewise.
+ * modules/fdopendir-tests (Files): Likewise.
+ * modules/fflush-tests (Files): Likewise.
+ * modules/flock-tests (Files): Likewise.
+ * modules/floorf-tests (Files): Likewise.
+ * modules/floorl-tests (Files): Likewise.
+ * modules/fnmatch-tests (Files): Likewise.
+ * modules/fopen-tests (Files): Likewise.
+ * modules/fprintf-posix-tests (Files): Likewise.
+ * modules/freopen-tests (Files): Likewise.
+ * modules/frexp-nolibm-tests (Files): Likewise.
+ * modules/frexp-tests (Files): Likewise.
+ * modules/frexpl-nolibm-tests (Files): Likewise.
+ * modules/frexpl-tests (Files): Likewise.
+ * modules/fseek-tests (Files): Likewise.
+ * modules/fseeko-tests (Files): Likewise.
+ * modules/fsync-tests (Files): Likewise.
+ * modules/ftell-tests (Files): Likewise.
+ * modules/ftello-tests (Files): Likewise.
+ * modules/futimens-tests (Files): Likewise.
+ * modules/getaddrinfo-tests (Files): Likewise.
+ * modules/getcwd-tests (Files): Likewise.
+ * modules/getdelim-tests (Files): Likewise.
+ * modules/getdtablesize-tests (Files): Likewise.
+ * modules/getgroups-tests (Files): Likewise.
+ * modules/gethostname-tests (Files): Likewise.
+ * modules/getline-tests (Files): Likewise.
+ * modules/getopt-posix-tests (Files): Likewise.
+ * modules/gettimeofday-tests (Files): Likewise.
+ * modules/glob-tests (Files): Likewise.
+ * modules/iconv-tests (Files): Likewise.
+ * modules/inet_ntop-tests (Files): Likewise.
+ * modules/inet_pton-tests (Files): Likewise.
+ * modules/isblank-tests (Files): Likewise.
+ * modules/lchown-tests (Files): Likewise.
+ * modules/ldexpl-tests (Files): Likewise.
+ * modules/link-tests (Files): Likewise.
+ * modules/linkat-tests (Files): Likewise.
+ * modules/lseek-tests (Files): Likewise.
+ * modules/lstat-tests (Files): Likewise.
+ * modules/mbrtowc-tests (Files): Likewise.
+ * modules/mbsinit-tests (Files): Likewise.
+ * modules/mbsnrtowcs-tests (Files): Likewise.
+ * modules/mbsrtowcs-tests (Files): Likewise.
+ * modules/memchr-tests (Files): Likewise.
+ * modules/memcmp-tests (Files): Likewise.
+ * modules/memmem-tests (Files): Likewise.
+ * modules/memrchr-tests (Files): Likewise.
+ * modules/mkdir-tests (Files): Likewise.
+ * modules/mkfifo-tests (Files): Likewise.
+ * modules/mkfifoat-tests (Files): Likewise.
+ * modules/mknod-tests (Files): Likewise.
+ * modules/nanosleep-tests (Files): Likewise.
+ * modules/nl_langinfo-tests (Files): Likewise.
+ * modules/obstack-printf-tests (Files): Likewise.
+ * modules/open-tests (Files): Likewise.
+ * modules/openat-tests (Files): Likewise.
+ * modules/perror-tests (Files): Likewise.
+ * modules/pipe2-tests (Files): Likewise.
+ * modules/poll-tests (Files): Likewise.
+ * modules/popen-tests (Files): Likewise.
+ * modules/posix_spawn-tests (Files): Likewise.
+ * modules/posix_spawnp-tests (Files): Likewise.
+ * modules/pread-tests (Files): Likewise.
+ * modules/printf-posix-tests (Files): Likewise.
+ * modules/pty-tests (Files): Likewise.
+ * modules/random_r-tests (Files): Likewise.
+ * modules/rawmemchr-tests (Files): Likewise.
+ * modules/readlink-tests (Files): Likewise.
+ * modules/remove-tests (Files): Likewise.
+ * modules/rename-tests (Files): Likewise.
+ * modules/renameat-tests (Files): Likewise.
+ * modules/rmdir-tests (Files): Likewise.
+ * modules/round-tests (Files): Likewise.
+ * modules/roundf-tests (Files): Likewise.
+ * modules/roundl-tests (Files): Likewise.
+ * modules/select-tests (Files): Likewise.
+ * modules/setenv-tests (Files): Likewise.
+ * modules/sigaction-tests (Files): Likewise.
+ * modules/sleep-tests (Files): Likewise.
+ * modules/snprintf-posix-tests (Files): Likewise.
+ * modules/snprintf-tests (Files): Likewise.
+ * modules/sprintf-posix-tests (Files): Likewise.
+ * modules/stat-tests (Files): Likewise.
+ * modules/strcasestr-tests (Files): Likewise.
+ * modules/strchrnul-tests (Files): Likewise.
+ * modules/strerror-tests (Files): Likewise.
+ * modules/strsignal-tests (Files): Likewise.
+ * modules/strstr-tests (Files): Likewise.
+ * modules/strtod-tests (Files): Likewise.
+ * modules/strverscmp-tests (Files): Likewise.
+ * modules/symlink-tests (Files): Likewise.
+ * modules/symlinkat-tests (Files): Likewise.
+ * modules/times-tests (Files): Likewise.
+ * modules/trunc-tests (Files): Likewise.
+ * modules/truncf-tests (Files): Likewise.
+ * modules/truncl-tests (Files): Likewise.
+ * modules/tsearch-tests (Files): Likewise.
+ * modules/uname-tests (Files): Likewise.
+ * modules/unlink-tests (Files): Likewise.
+ * modules/unsetenv-tests (Files): Likewise.
+ * modules/usleep-tests (Files): Likewise.
+ * modules/utimensat-tests (Files): Likewise.
+ * modules/vasprintf-tests (Files): Likewise.
+ * modules/vdprintf-posix-tests (Files): Likewise.
+ * modules/vfprintf-posix-tests (Files): Likewise.
+ * modules/vprintf-posix-tests (Files): Likewise.
+ * modules/vsnprintf-posix-tests (Files): Likewise.
+ * modules/vsnprintf-tests (Files): Likewise.
+ * modules/vsprintf-posix-tests (Files): Likewise.
+ * modules/wcrtomb-tests (Files): Likewise.
+ * modules/wcsnrtombs-tests (Files): Likewise.
+ * modules/wcsrtombs-tests (Files): Likewise.
+ * modules/wcwidth-tests (Files): Likewise.
+ * tests/test-isfinite.c (isfinite): Ensure macro declaration.
+ * tests/test-isinf.c (isinf): Likewise.
+ * tests/test-isnan.c (isnan): Likewise.
+ * tests/test-signbit.c (signbit): Likewise.
+ * tests/test-select.c (FD_CLR, FD_ISSET, FD_SET, FD_ZERO): Ensure
+ declaration, either as macro or with correct signature.
+ (select): Ensure function under test is declared with correct
+ signature in correct header.
+ * tests/test-atexit.c (atexit): Likewise.
+ * tests/test-btowc.c (btowc): Likewise.
+ * tests/test-canonicalize-lgpl.c (realpath)
+ (canonicalize_file_name): Likewise.
+ * tests/test-ceilf1.c (ceilf): Likewise.
+ * tests/test-ceill.c (ceill): Likewise.
+ * tests/test-chown.c (chown): Likewise.
+ * tests/test-dprintf-posix.c (dprintf): Likewise.
+ * tests/test-dup2.c (dup2): Likewise.
+ * tests/test-dup3.c (dup3): Likewise.
+ * tests/test-duplocale.c (duplocale): Likewise.
+ * tests/test-fchdir.c (fchdir): Likewise.
+ * tests/test-fchownat.c (fchownat): Likewise.
+ * tests/test-fcntl.c (fcntl): Likewise.
+ * tests/test-fdopendir.c (fdopendir): Likewise.
+ * tests/test-fflush.c (fflush): Likewise.
+ * tests/test-flock.c (flock): Likewise.
+ * tests/test-floorf1.c (floorf): Likewise.
+ * tests/test-floorl.c (floorl): Likewise.
+ * tests/test-fnmatch.c (fnmatch): Likewise.
+ * tests/test-fopen.c (fopen): Likewise.
+ * tests/test-fprintf-posix.c (fprintf): Likewise.
+ * tests/test-freopen.c (freopen): Likewise.
+ * tests/test-frexp.c (frexp): Likewise.
+ * tests/test-frexpl.c (frexpl): Likewise.
+ * tests/test-fseek.c (fseek): Likewise.
+ * tests/test-fseeko.c (fseeko): Likewise.
+ * tests/test-fstatat.c (fstatat): Likewise.
+ * tests/test-fsync.c (fsync): Likewise.
+ * tests/test-ftell.c (ftell): Likewise.
+ * tests/test-ftello.c (ftello): Likewise.
+ * tests/test-futimens.c (futimens): Likewise.
+ * tests/test-getaddrinfo.c (getaddrinfo, freeaddrinfo)
+ (gai_strerror): Likewise.
+ * tests/test-getcwd.c (getcwd): Likewise.
+ * tests/test-getdelim.c (getdelim): Likewise.
+ * tests/test-getdtablesize.c (getdtablesize): Likewise.
+ * tests/test-getgroups.c (getgroups): Likewise.
+ * tests/test-gethostname.c (gethostname): Likewise.
+ * tests/test-getline.c (getline): Likewise.
+ * tests/test-getopt.c (getopt, getopt_long, getopt_long_only):
+ Likewise.
+ * tests/test-gettimeofday.c (gettimeofday): Likewise.
+ * tests/test-glob.c (glob, globfree): Likewise.
+ * tests/test-iconv.c (iconv, iconv_open, iconv_close): Likewise.
+ * tests/test-inet_ntop.c (inet_ntop): Likewise.
+ * tests/test-inet_pton.c (inet_pton): Likewise.
+ * tests/test-isblank.c (isblank): Likewise.
+ * tests/test-lchown.c (lchown): Likewise.
+ * tests/test-ldexpl.c (ldexpl): Likewise.
+ * tests/test-link.c (link): Likewise.
+ * tests/test-linkat.c (linkat): Likewise.
+ * tests/test-lseek.c (lseek): Likewise.
+ * tests/test-lstat.c (lstat): Likewise.
+ * tests/test-mbrtowc.c (mbrtowc): Likewise.
+ * tests/test-mbsinit.c (mbsinit): Likewise.
+ * tests/test-mbsnrtowcs.c (mbsnrtowcs): Likewise.
+ * tests/test-mbsrtowcs.c (mbsrtowcs): Likewise.
+ * tests/test-memchr.c (memchr): Likewise.
+ * tests/test-memcmp.c (memcmp): Likewise.
+ * tests/test-memmem.c (memmem): Likewise.
+ * tests/test-memrchr.c (memrchr): Likewise.
+ * tests/test-mkdir.c (mkdir): Likewise.
+ * tests/test-mkdirat.c (mkdirat): Likewise.
+ * tests/test-mkfifo.c (mkfifo): Likewise.
+ * tests/test-mkfifoat.c (mkfifoat, mknodat): Likewise.
+ * tests/test-mknod.c (mknod): Likewise.
+ * tests/test-nanosleep.c (nanosleep): Likewise.
+ * tests/test-nl_langinfo.c (nl_langinfo): Likewise.
+ * tests/test-obstack-printf.c (obstack_printf, obstack_vprintf):
+ Likewise.
+ * tests/test-open.c (open): Likewise.
+ * tests/test-openat.c (openat): Likewise.
+ * tests/test-perror.c (perror): Likewise.
+ * tests/test-pipe2.c (pipe2): Likewise.
+ * tests/test-poll.c (poll): Likewise.
+ * tests/test-popen.c (popen, pclose): Likewise.
+ * tests/test-posix_spawn1.c (posix_spawnp, posix_spawnattr_init)
+ (posix_spawnattr_destroy, posix_spawnattr_setsigmask)
+ (posix_spawnattr_setflags, posix_spawn_file_actions_init)
+ (posix_spawn_file_actions_destroy)
+ (posix_spawn_file_actions_addclose)
+ (posix_spawn_file_actions_addopen)
+ (posix_spawn_file_actions_adddup2): Likewise.
+ * tests/test-posix_spawn3.c (posix_spawn): Likewise.
+ * tests/test-pread.c (pread): Likewise.
+ * tests/test-printf-posix.c (printf): Likewise.
+ * tests/test-pty.c (openpty, forkpty): Likewise.
+ * tests/test-random_r.c (srandom_r, initstate_r, setstate_r)
+ (random_r): Likewise.
+ * tests/test-rawmemchr.c (rawmemchr): Likewise.
+ * tests/test-readlink.c (readlink): Likewise.
+ * tests/test-remove.c (remove): Likewise.
+ * tests/test-rename.c (rename): Likewise.
+ * tests/test-renameat.c (renameat): Likewise.
+ * tests/test-rmdir.c (rmdir): Likewise.
+ * tests/test-round1.c (round): Likewise.
+ * tests/test-roundf1.c (roundf): Likewise.
+ * tests/test-roundl.c (roundl): Likewise.
+ * tests/test-setenv.c (setenv): Likewise.
+ * tests/test-sigaction.c (sigaction): Likewise.
+ * tests/test-sleep.c (sleep): Likewise.
+ * tests/test-snprintf.c (snprintf): Likewise.
+ * tests/test-sprintf-posix.c (sprintf): Likewise.
+ * tests/test-stat.c (stat): Likewise.
+ * tests/test-stpncpy.c (stpncpy): Likewise.
+ * tests/test-strcasestr.c (strcasestr): Likewise.
+ * tests/test-strchrnul.c (strchrnul): Likewise.
+ * tests/test-strerror.c (strerror): Likewise.
+ * tests/test-strsignal.c (strsignal): Likewise.
+ * tests/test-strstr.c (strstr): Likewise.
+ * tests/test-strtod.c (strtod): Likewise.
+ * tests/test-strverscmp.c (strverscmp): Likewise.
+ * tests/test-symlink.c (symlink): Likewise.
+ * tests/test-symlinkat.c (symlinkat, readlinkat): Likewise.
+ * tests/test-times.c (times): Likewise.
+ * tests/test-trunc1.c (trunc): Likewise.
+ * tests/test-truncf1.c (truncf): Likewise.
+ * tests/test-truncl.c (truncl): Likewise.
+ * tests/test-tsearch.c (tdelete, tfind, tsearch, twalk):
+ Likewise.
+ * tests/test-uname.c (uname): Likewise.
+ * tests/test-unlink.c (unlink): Likewise.
+ * tests/test-unlinkat.c (unlinkat): Likewise.
+ * tests/test-unsetenv.c (unsetenv): Likewise.
+ * tests/test-usleep.c (usleep): Likewise.
+ * tests/test-utimensat.c (utimensat): Likewise.
+ * tests/test-vasprintf.c (asprintf, vasprintf): Likewise.
+ * tests/test-vdprintf-posix.c (vdprintf): Likewise.
+ * tests/test-vfprintf-posix.c (vfprintf): Likewise.
+ * tests/test-vprintf-posix.c (vprintf): Likewise.
+ * tests/test-vsnprintf.c (vsnprintf): Likewise.
+ * tests/test-vsprintf-posix.c (vsprintf): Likewise.
+ * tests/test-wcrtomb.c (wcrtomb): Likewise.
+ * tests/test-wcsnrtombs.c (wcsnrtombs): Likewise.
+ * tests/test-wcsrtombs.c (wcsrtombs): Likewise.
+ * tests/test-wcwidth.c (wcwidth): Likewise.
+
+ build: pull in conditional headers during GNULIB_POSIXCHECK
+ * lib/stdio.in.h (includes): Using GNULIB_POSIXCHECK also requires
+ definitions from any conditionally-included headers.
+ * lib/stdlib.in.h (includes): Likewise.
+ * lib/unistd.in.h (includes): Likewise.
+
+2009-12-24 Bruno Haible <bruno@clisp.org>
+
+ * tests/test-argv-iter.c: Include header file being tested immediately
+ after config.h.
+ * tests/test-base64.c: Likewise.
+ * tests/test-flock.c: Likewise.
+ * tests/test-fsync.c: Likewise.
+ * tests/test-getdate.c: Likewise.
+ * tests/test-getndelim2.c: Likewise.
+ * tests/test-isfinite.c: Likewise.
+ * tests/test-isinf.c: Likewise.
+ * tests/test-strerror.c: Likewise.
+ * tests/test-strsignal.c: Likewise.
+
+2009-12-23 Eric Blake <ebb9@byu.net>
+
+ unistd: work around cygwin bug
+ * lib/unistd.in.h (includes): Pick up headers needed for cygwin.
+ * doc/posix-functions/unlinkat.texi (unlinkat): Document the bug.
+ * doc/posix-functions/symlinkat.texi (symlinkat): Likewise.
+
+2009-12-23 Bruno Haible <bruno@clisp.org>
+
+ localename: More tests.
+ * tests/test-localename.c (SIZEOF): New macro.
+ (categories): New variable.
+ (test_locale_name, test_locale_name_posix, test_locale_name_environ,
+ test_locale_name_default): Add test w.r.t. thread locale.
+ (test_locale_name_thread): New function.
+ (main): Invoke it.
+
+ localename: Make aware of thread locale.
+ * lib/localename.h (gl_locale_name_thread): New declaration.
+ (gl_locale_name, gl_locale_name_posix, gl_locale_name_default): Clarify
+ behaviour with respect to thread locale.
+ * lib/localename.c: Include <limits.h>, <stddef.h>, <xlocale.h>,
+ <langinfo.h>, glthread/lock.h.
+ (SIZE_BITS): New macro.
+ (string_hash): New function.
+ (struct hash_node): New type.
+ (HASH_TABLE_SIZE): New macro.
+ (struniq_hash_table, struniq_lock): New variables.
+ (struniq): New function.
+ (gl_locale_name_thread): New function.
+ (gl_locale_name): Invoke it.
+ * m4/localename.m4 (gl_LOCALENAME): Test for uselocale function.
+ * modules/localename (Depends-on): Add lock.
+ Reported by Mike Gran <spk121@yahoo.com>.
+
+2009-12-23 Eric Blake <ebb9@byu.net>
+
+ va-args: new module
+ * modules/va-args: New file.
+ * m4/va-args.m4 (gl_VA_ARGS): Likewise.
+ * MODULES.html.sh (Core language properties): Mention it.
+
+ gnulib-common: prefer _GL_UNUSED over _UNUSED_PARAMETER_
+ * m4/gnulib-common.m4 (gl_COMMON): Create a more-appropriately
+ named alias for __attribute__((__unused__)).
+ * lib/chown.c: Update client.
+ * lib/fchmodat.c: Likewise.
+ * lib/fts.c: Likewise.
+ * lib/getdate.y: Likewise.
+ * lib/getgroups.c: Likewise.
+ * lib/getopt.c: Likewise.
+ * lib/getugroups.c: Likewise.
+ * lib/mkdir.c: Likewise.
+ * lib/mkfifo.c: Likewise.
+ * lib/mkfifoat.c: Likewise.
+ * lib/mknod.c: Likewise.
+ * lib/mknodat.c: Likewise.
+ * lib/readlink.c: Likewise.
+ * lib/se-context.in.h: Likewise.
+ * lib/se-selinux.in.h: Likewise.
+ * lib/sockets.c: Likewise.
+ * lib/symlink.c: Likewise.
+ * lib/symlinkat.c: Likewise.
+ * lib/unicodeio.c: Likewise.
+ * lib/unistr.h: Likewise.
+ * tests/test-areadlink.c: Likewise.
+ * tests/test-areadlinkat.c: Likewise.
+ * tests/test-filenamecat.c: Likewise.
+ * tests/test-fseeko.c: Likewise.
+ * tests/test-ftello.c: Likewise.
+ * tests/test-getdate.c: Likewise.
+ * tests/test-getgroups.c: Likewise.
+ * tests/test-gethostname.c: Likewise.
+ * tests/test-quotearg.c: Likewise.
+ * tests/test-version-etc.c: Likewise.
+ * tests/test-xalloc-die.c: Likewise.
+ * tests/test-xfprintf-posix.c: Likewise.
+ * tests/test-xprintf-posix.c: Likewise.
+ * tests/test-xvasprintf.c: Likewise.
+
+ tests: avoid compiler warnings
+ * tests/test-fcntl.c (main): Delete unused parameters.
+ * tests/test-freopen-safer.c (main): Likewise.
+ * tests/test-xalloc-die.c (main): Mark unused parameters.
+ * tests/test-fseeko.c (main): Likewise.
+ * tests/test-ftello.c (main): Likewise.
+ * tests/test-nanosleep.c (main): Avoid declaration warning.
+ * tests/test-sleep.c (main): Likewise.
+ * tests/test-unsetenv.c (main): Silence warning about string
+ literal.
+ * m4/setenv.m4 (gl_FUNC_UNSETENV): Likewise.
+
+2009-12-23 Bruno Haible <bruno@clisp.org>
+
+ * tests/test-localename.c (test_locale_name): New function, extracted
+ from main. Also test mixed situations.
+ (test_locale_name_posix, test_locale_name_environ,
+ test_locale_name_default): New functions.
+ (main): Invoke them all.
+ * modules/localename-tests (configure.ac): Test for newlocale.
+
+2009-12-23 Bruno Haible <bruno@clisp.org>
+
+ unistd: Ensure getcwd gets declared before being overridden.
+ * lib/unistd.in.h: Conditionally include <io.h>.
+
+2009-12-22 Bruno Haible <bruno@clisp.org>
+
+ wchar: Diagnose broken combination of glibc and gcc versions and flags.
+ * m4/wchar.m4 (gl_WCHAR_H_INLINE_OK): New macro.
+ (gl_WCHAR_H): Invoke it.
+ * m4/btowc.m4 (gl_FUNC_BTOWC): Require it.
+ * doc/posix-headers/wchar.texi: Mention the interoperability problem.
+ Reported by Karl Berry <karl@freefriends.org>.
+
+2009-12-22 Eric Blake <ebb9@byu.net>
+
+ math, unistd: avoid redundant includes
+ * lib/math.in.h (isnan): No need to re-include <math.h>.
+ * lib/unistd.in.h (getcwd): Likewise, for <stdlib.h>.
+
+ getsubopt: work around cygwin bug
+ * lib/stdlib.in.h (includes): Move unistd inclusion sooner, to
+ avoid conflicting with system getsubopt.
+ * doc/posix-functions/getsubopt.texi (getsubopt): Document the
+ bug.
+
+ getopt: synchronize from glibc
+ * lib/getopt.c (_getopt_initialize, _getopt_internal_r): Swap
+ parameter order. Adjust all callers.
+ (_getopt_internal_r, main): Adjust quoting in error messages.
+ Drop considerations for outdated POSIX 1003.2 error message.
+ * lib/getopt1.c (_getopt_long_r, _getopt_long_only_r): Adjust
+ callers.
+ * lib/getopt_int.h (_getopt_internal_r): Adjust prototype.
+
+ test-getopt: test stderr behavior
+ * modules/getopt-posix-tests (Depends-on): Add dup2.
+ * tests/test-getopt.c (ASSERT): Avoid stderr.
+ (main): Move stderr to a temporary file.
+ * tests/test-getopt.h (getopt_loop): No longer manipulate opterr.
+ Instead, add parameter to inform caller if output occurred.
+ (test_getopt): Adjust all existing tests to expect silence, and
+ add new tests of leading ":".
+ * doc/glibc-functions/getopt_long.texi (getopt_long): Document
+ glibc shortcomings with leading "-:" or "+:" in optstring.
+ * doc/glibc-functions/getopt_long_only.texi (getopt_long_only):
+ Likewise.
+ * doc/posix-functions/getopt.texi (getopt): Likewise.
+
+ test-getopt: enhance test
+ * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Require that getopt_long
+ supports optind=0.
+ * tests/test-getopt.c (OPTIND_MIN): Move...
+ * tests/test-getopt.h (OPTIND_MIN): ...here.
+ * tests/test-getopt_long.h (test_getopt_long): Add more coverage.
+ Require that optind=0 works, since modern BSD supports it in
+ addition to optreset, and since coreutils expects it.
+ (test_getopt_long_only): New test.
+ * doc/glibc-functions/getopt_long.texi (getopt_long): Document
+ glibc shortcomings with 'W;', and enforcement of optind=0.
+ * doc/glibc-functions/getopt_long_only.texi (getopt_long_only):
+ Likewise.
+
+2009-12-21 Bruno Haible <bruno@clisp.org>
+
+ localename: Improvements for MacOS X and Cygwin.
+ * lib/localename.h (gl_locale_name_environ): New declaration.
+ * lib/localename.c (gl_locale_name_environ): New function, extracted from
+ gl_locale_name_posix. Ignore dummy LANG values on MacOS X and Cygwin.
+ (gl_locale_name_posix): Invoke it.
+ (gl_locale_name_default): Add comments. Use Windows native API also on
+ Cygwin.
+
+2009-12-21 Bruno Haible <bruno@clisp.org>
+
+ Update list of Win32 locale ids.
+ * lib/localename.c (LANG_ROMANSH): Renamed from LANG_RHAETO_ROMANCE.
+ (LANG_SAMI): Renamed from LANG_SAAMI.
+ (LANG_BASHKIR, LANG_LUXEMBOURGISH, LANG_GREENLANDIC,
+ LANG_MAPUDUNGUN, LANG_MOHAWK, LANG_BRETON, LANG_OCCITAN, LANG_CORSICAN,
+ LANG_ALSATIAN, LANG_YAKUT, LANG_KICHE, LANG_KINYARWANDA, LANG_WOLOF,
+ LANG_DARI, LANG_SCOTTISH_GAELIC): New macros.
+ (SUBLANG_AFRIKAANS_SOUTH_AFRICA, SUBLANG_ALBANIAN_ALBANIA,
+ SUBLANG_ALSATIAN_FRANCE, SUBLANG_AMHARIC_ETHIOPIA,
+ SUBLANG_ARMENIAN_ARMENIA, SUBLANG_ASSAMESE_INDIA,
+ SUBLANG_BASHKIR_RUSSIA, SUBLANG_BASQUE_BASQUE,
+ SUBLANG_BELARUSIAN_BELARUS, SUBLANG_BRETON_FRANCE,
+ SUBLANG_BULGARIAN_BULGARIA, SUBLANG_CAMBODIAN_CAMBODIA,
+ SUBLANG_CATALAN_SPAIN, SUBLANG_CORSICAN_FRANCE,
+ SUBLANG_CZECH_CZECH_REPUBLIC, SUBLANG_DANISH_DENMARK,
+ SUBLANG_DARI_AFGHANISTAN, SUBLANG_DIVEHI_MALDIVES,
+ SUBLANG_DUTCH_SURINAM, SUBLANG_ESTONIAN_ESTONIA,
+ SUBLANG_FAEROESE_FAROE_ISLANDS, SUBLANG_FARSI_IRAN,
+ SUBLANG_FINNISH_FINLAND, SUBLANG_FRISIAN_NETHERLANDS,
+ SUBLANG_GALICIAN_SPAIN, SUBLANG_GEORGIAN_GEORGIA,
+ SUBLANG_GREEK_GREECE, SUBLANG_GREENLANDIC_GREENLAND,
+ SUBLANG_GUJARATI_INDIA, SUBLANG_HAUSA_NIGERIA_LATIN,
+ SUBLANG_HEBREW_ISRAEL, SUBLANG_HINDI_INDIA, SUBLANG_HUNGARIAN_HUNGARY,
+ SUBLANG_ICELANDIC_ICELAND, SUBLANG_IGBO_NIGERIA,
+ SUBLANG_INDONESIAN_INDONESIA, SUBLANG_INUKTITUT_CANADA,
+ SUBLANG_INUKTITUT_CANADA_LATIN, SUBLANG_IRISH_IRELAND,
+ SUBLANG_JAPANESE_JAPAN, SUBLANG_KANNADA_INDIA,
+ SUBLANG_KAZAK_KAZAKHSTAN, SUBLANG_KICHE_GUATEMALA,
+ SUBLANG_KINYARWANDA_RWANDA, SUBLANG_KONKANI_INDIA,
+ SUBLANG_KYRGYZ_KYRGYZSTAN, SUBLANG_LAO_LAOS, SUBLANG_LATVIAN_LATVIA,
+ SUBLANG_LITHUANIAN_LITHUANIA, SUBLANG_LOWER_SORBIAN_GERMANY,
+ SUBLANG_LUXEMBOURGISH_LUXEMBOURG, SUBLANG_MACEDONIAN_MACEDONIA,
+ SUBLANG_MALAYALAM_INDIA, SUBLANG_MALTESE_MALTA,
+ SUBLANG_MAORI_NEW_ZEALAND, SUBLANG_MAPUDUNGUN_CHILE,
+ SUBLANG_MARATHI_INDIA, SUBLANG_MOHAWK_CANADA, SUBLANG_NEPALI_NEPAL,
+ SUBLANG_OCCITAN_FRANCE, SUBLANG_ORIYA_INDIA,
+ SUBLANG_PASHTO_AFGHANISTAN, SUBLANG_POLISH_POLAND,
+ SUBLANG_ROMANSH_SWITZERLAND, SUBLANG_SAMI_NORTHERN_NORWAY,
+ SUBLANG_SAMI_NORTHERN_SWEDEN, SUBLANG_SAMI_NORTHERN_FINLAND,
+ SUBLANG_SAMI_LULE_NORWAY, SUBLANG_SAMI_LULE_SWEDEN,
+ SUBLANG_SAMI_SOUTHERN_NORWAY, SUBLANG_SAMI_SOUTHERN_SWEDEN,
+ SUBLANG_SAMI_SKOLT_FINLAND, SUBLANG_SAMI_INARI_FINLAND,
+ SUBLANG_SANSKRIT_INDIA, SUBLANG_SINHALESE_SRI_LANKA,
+ SUBLANG_SLOVAK_SLOVAKIA, SUBLANG_SLOVENIAN_SLOVENIA,
+ SUBLANG_SOTHO_SOUTH_AFRICA, SUBLANG_SWAHILI_KENYA,
+ SUBLANG_SWEDISH_SWEDEN, SUBLANG_SYRIAC_SYRIA,
+ SUBLANG_TAGALOG_PHILIPPINES, SUBLANG_TAJIK_TAJIKISTAN,
+ SUBLANG_TAMIL_INDIA, SUBLANG_TATAR_RUSSIA, SUBLANG_TELUGU_INDIA,
+ SUBLANG_THAI_THAILAND, SUBLANG_TSWANA_SOUTH_AFRICA,
+ SUBLANG_TURKISH_TURKEY, SUBLANG_TURKMEN_TURKMENISTAN,
+ SUBLANG_UKRAINIAN_UKRAINE, SUBLANG_UPPER_SORBIAN_GERMANY,
+ SUBLANG_VIETNAMESE_VIETNAM, SUBLANG_WELSH_UNITED_KINGDOM,
+ SUBLANG_WOLOF_SENEGAL, SUBLANG_XHOSA_SOUTH_AFRICA,
+ SUBLANG_YAKUT_RUSSIA, SUBLANG_YI_PRC, SUBLANG_YORUBA_NIGERIA,
+ SUBLANG_ZULU_SOUTH_AFRICA): New macros.
+ (gl_locale_name_from_win32_LANGID): Handle also the territory neutral
+ locale ids. Add support for Alsatian, Bashkir, Breton, Corsican, Dari,
+ Greenlandic, K'iche', Kinyarwanda, Luxembourgish, Mapudungun, Mohawk,
+ Occitan, Scottish Gaelic, Wolof, Yakut. Change language code for Yi.
+ Add more languages and countries for Sami, Sorbian. Add more countries
+ for Serbian, Dutch. Add more scripts for Inuktitut. Be more precise
+ for Pashto. Change country for Syriac, Tswana.
+
+2009-12-21 Eric Blake <ebb9@byu.net>
+
+ test-utimens: avoid spurious failure
+ * tests/test-chown.h (nap): Factor...
+ * tests/nap.h: ...into new file.
+ * tests/test-lchown.h (nap): Avoid duplication.
+ * tests/test-utimens-common.h (nap): Use shared implementation,
+ necessary on file systems with 1-second resolution.
+ * modules/chown-tests (Files): Include new file.
+ * modules/fdutimensat-tests (Files): Likewise.
+ * modules/futimens-tests (Files): Likewise.
+ * modules/lchown-tests (Files): Likewise.
+ * modules/openat-tests (Files): Likewise.
+ * modules/utimens-tests (Files): Likewise.
+ * modules/utimensat-tests (Files): Likewise.
+
+2009-12-19 Eric Blake <ebb9@byu.net>
+
+ futimens, utimensat: work around Linux bug
+ * m4/futimens.m4 (gl_FUNC_FUTIMENS): Detect ctime bug.
+ * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Likewise.
+ * lib/utimensat.c (rpl_utimensat): Work around it.
+ * lib/futimens.c (rpl_futimens): Adjust comment.
+
+ utimens: work around Linux ctime bug
+ * lib/utimens.c (detect_ctime_bug): New helper function.
+ (update_timespec): Differentiate between workaround needed for
+ this bug vs. what is needed for systems that lack utimensat.
+ (fdutimens, lutimens): Work around bug.
+
+ utimens: check for ctime update
+ * tests/test-utimens-common.h (check_ctime): Define.
+ * tests/test-utimens.h (test_utimens): Expose the Linux bug.
+ * tests/test-futimens.h (test_futimens): Likewise.
+ * tests/test-lutimens.h (test_lutimens): Likewise.
+ * doc/posix-functions/futimens.texi (futimens): Document the bug.
+ * doc/posix-functions/utimensat.texi (utimensat): Likewise.
+
+2009-12-19 Bruno Haible <bruno@clisp.org>
+
+ dprintf-posix: Check against memory leak fixed on 2009-12-15.
+ * tests/test-dprintf-posix2.sh: New file.
+ * tests/test-dprintf-posix2.c: New file.
+ * modules/dprintf-posix-tests (Files): Add them.
+ (configure.ac): Check for getrlimit and setrlimit.
+ (Makefile.am): Augment TESTS and CHECK_PROGRAMS.
+
+2009-12-19 Bruno Haible <bruno@clisp.org>
+
+ fprintf-posix: Check against memory leak fixed on 2009-12-15.
+ * tests/test-fprintf-posix3.sh: New file.
+ * tests/test-fprintf-posix3.c: New file.
+ * modules/fprintf-posix-tests (Files): Add them.
+ (Makefile.am): Augment TESTS and CHECK_PROGRAMS.
+
+2009-12-19 Eric Blake <ebb9@byu.net>
+
+ dirfd: fix prototype
+ * lib/dirent.in.h (dirfd): Argument is not const, per POSIX.
+ * lib/dirfd.c (dirfd): Likewise.
+
+ canonicalize: reduce memory usage
+ * lib/canonicalize.c (canonicalize_filename_mode): Trim the
+ allocation to size.
+ Reported by Solar Designer <solar@openwall.com>.
+
+2009-12-19 Bruno Haible <bruno@clisp.org>
+
+ New module attribute 'Applicability'.
+ * modules/TEMPLATE-EXTENDED: New field 'Applicability'.
+ * gnulib-tool: New option --extract-applicability.
+ (func_usage): Document it.
+ (sed_extract_prog): Recognize it.
+ (func_get_applicability): New function.
+ (func_import): Generalize handling of 'link-warning' module.
+ * modules/link-warning (Applicability): New section.
+ * modules/arg-nonnull (Applicability): New section.
+ Repoted by Simon Josefsson <simon@josefsson.org>.
+
+2009-12-19 Bruno Haible <bruno@clisp.org>
+
+ fflush: tweak
+ * lib/fflush.c (update_fpos_cache): Don't use fpos_t on Cygwin.
+ * lib/fseeko.c (rpl_fseeko): Likewise.
+
+2009-12-16 José E. Marchesi <jemarch@gnu.org> (tiny change)
+
+ * lib/gl_list.h: Fix typo in comment.
+
+2009-12-16 Eric Blake <ebb9@byu.net>
+
+ fcntl: use to simplify other modules
+ * modules/cloexec (Depends-on): Add fcntl.
+ * modules/fchdir (Depends-on): Likewise.
+ * modules/fd-safer-flag (Depends-on): Likewise.
+ * modules/unistd-safer (Depends-on): Likewise.
+ * modules/dup3 (configure.ac): Set module indicator.
+ * m4/fchdir.m4 (gl_FUNC_FCHDIR): Replace fcntl if fchdir is
+ missing.
+ * lib/fchdir.c (_gl_register_dup): Fix comment.
+ * lib/cloexec.c (dup_cloexec): Simplify, by relying on fcntl.
+ * lib/dup-safer.c (dup_safer): Likewise.
+ * lib/dup-safer-flag.c (dup_safer_flag): Likewise.
+ * lib/dup3.c (dup3): Likewise.
+ * tests/test-fchdir.c (main): Enhance test.
+ Fixes a dup_cloexec bug reported by OndÅ™ej VaÅ¡Ãk.
+
+ fcntl: port portions of fcntl to mingw
+ * m4/fcntl.m4 (gl_FUNC_FCNTL): Also build fcntl.c on mingw.
+ * lib/fcntl.c (fcntl) <F_DUPFD, F_DUPFD_CLOEXEC, F_GETFD>: Provide
+ replacement for mingw.
+ * modules/fcntl (Description): Update.
+ (Depends-on): Add dup2.
+ * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Add witness.
+ * modules/fcntl-h (Makefile.am): Substitute it.
+ * lib/fcntl.in.h (fcntl): Update declaration.
+ (F_DUPFD, F_GETFD): New macros, when needed.
+ * doc/posix-headers/fcntl.texi (fcntl.h): Update documentation.
+ * doc/posix-functions/fcntl.texi (fcntl): Likewise.
+ * tests/test-fcntl.c (check_flags, main): Enhance test for items
+ we now guarantee.
+
+ fcntl: work around cygwin bug in F_DUPFD
+ * m4/fcntl.m4 (gl_REPLACE_FCNTL): New macro.
+ (gl_FUNC_FCNTL): Use it. Test for F_DUPFD bug.
+ * lib/fcntl.c (rpl_fcntl) <F_DUPFD>: Work around it.
+ <F_DUPFD_CLOEXEC>: Reduce calls to _gl_register_dup.
+ * doc/posix-functions/fcntl.texi (fcntl): Document it.
+
+ fcntl: support F_DUPFD_CLOEXEC on systems with fcntl
+ * modules/fcntl (Files): List new files.
+ (configure.ac): Run a test.
+ * m4/fcntl.m4 (gl_FUNC_FCNTL): New file.
+ * lib/fcntl.c (rpl_fcntl): Likewise.
+ * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Add witness defaults.
+ (gl_FCNTL_H): Always replace fcntl.h.
+ * modules/fcntl-h (Makefile.am): Substitute witnesses.
+ * lib/fcntl.in.h (fcntl): Declare replacement.
+ (F_DUPFD_CLOEXEC, GNULIB_defined_F_DUPFD_CLOEXEC): New macro when
+ needed, plus a witness.
+ * doc/posix-functions/fcntl.texi (fcntl): Document this.
+ * doc/posix-headers/fcntl.texi (fcntl.h): Likewise.
+ * tests/test-fcntl.c: New file.
+ * modules/fcntl-tests: Likewise.
+
+ binary-io: avoid potential compilation warning
+ * lib/binary-io.h [__DJGPP__]: Avoid null preprocessor
+ directives.
+
+ fflush: avoid compilation error on NetBSD
+ * lib/fflush.c (update_fpos_cache): Use a union to safely convert
+ between off_t and fpos_t, since the latter is sometimes a struct.
+ * lib/fseeko.c (rpl_fseeko): Likewise.
+ Reported by Alexander Nasonov <alnsn@yandex.ru>.
+
+2009-12-15 Eric Blake <ebb9@byu.net>
+
+ fcntl-h, stdio, sys_ioctl: fix declarations
+ * lib/stdio.in.h (dprintf): Use of link warning on a variadic
+ function must not take arguments.
+ * lib/sys_ioctl.in.h (ioctl): Likewise.
+ * lib/fcntl.in.h (openat): Likewise. Declare extern.
+ (open): Add a link warning.
+
+2009-12-15 Jim Meyering <meyering@redhat.com>
+
+ areadlink, areadlink-with-size: relax license to LGPLv2+
+ * modules/areadlink (License): Relax to LGPLv2+.
+ * modules/areadlink-with-size (License): Likewise.
+
+2009-12-15 Joel E. Denny <jdenny@clemson.edu>
+ Bruno Haible <bruno@clisp.org>
+
+ *printf: Fix memory leak.
+ * lib/fprintf.c (fprintf): Free memory allocated by vasnprintf.
+ * lib/vfprintf.c (vfprintf): Likewise.
+ * lib/dprintf.c (dprintf): Likewise.
+ * lib/vdprintf.c (vdprintf): Likewise.
+
+2009-12-14 Eric Blake <ebb9@byu.net>
+
+ accept4: adjust module dependencies
+ * modules/accept4 (Depends-on): Use fcntl-h, not fcntl.
+
+ utimens: one more try at avoiding compiler warning
+ * lib/utimens.c (lutimens): Lower scope of result.
+
+2009-12-13 Bruno Haible <bruno@clisp.org>
+
+ Move the malloc checking from module 'list' to new module 'xlist'.
+ * modules/xlist: New file.
+ * lib/gl_xlist.h: New file.
+ * lib/gl_xlist.c: New file.
+ * lib/gl_list.h (gl_list_create_empty, gl_list_create,
+ gl_list_node_set_value, gl_list_set_at, gl_list_add_first,
+ gl_list_add_last, gl_list_add_before, gl_list_add_after,
+ gl_list_nx_add_at, gl_sortedlist_add): Disable declarations.
+ (gl_list_nx_create_empty, gl_list_nx_create, gl_list_node_nx_set_value,
+ gl_list_nx_set_at, gl_list_nx_add_first, gl_list_nx_add_last,
+ gl_list_nx_add_before, gl_list_nx_add_after, gl_list_nx_add_at,
+ gl_sortedlist_nx_add): New declarations.
+ (struct gl_list_implementation): Rename and change methods accordingly.
+ (gl_list_nx_create_empty): Renamed from gl_list_create_empty.
+ (gl_list_nx_create): Renamed from gl_list_create.
+ (gl_list_node_nx_set_value): Renamed from gl_list_node_set_value.
+ (gl_list_nx_set_at): Renamed from gl_list_set_at.
+ (gl_list_nx_add_first): Renamed from gl_list_add_first.
+ (gl_list_nx_add_last): Renamed from gl_list_add_last.
+ (gl_list_nx_add_before): Renamed from gl_list_add_before.
+ (gl_list_nx_add_after): Renamed from gl_list_add_after.
+ (gl_list_nx_add_at): Renamed from gl_list_add_at.
+ (gl_sortedlist_nx_add): Renamed from gl_sortedlist_add.
+ * lib/gl_list.c (gl_list_nx_create_empty): Renamed from
+ gl_list_create_empty.
+ (gl_list_nx_create): Renamed from gl_list_create.
+ (gl_list_node_nx_set_value): Renamed from gl_list_node_set_value.
+ (gl_list_nx_set_at): Renamed from gl_list_set_at.
+ (gl_list_nx_add_first): Renamed from gl_list_add_first.
+ (gl_list_nx_add_last): Renamed from gl_list_add_last.
+ (gl_list_nx_add_before): Renamed from gl_list_add_before.
+ (gl_list_nx_add_after): Renamed from gl_list_add_after.
+ (gl_list_nx_add_at): Renamed from gl_list_add_at.
+ (gl_sortedlist_nx_add): Renamed from gl_sortedlist_add.
+ * lib/gl_array_list.c: Don't include xalloc.h.
+ (gl_array_nx_create_empty): Renamed from gl_array_create_empty. Return
+ NULL upon out-of-memory.
+ (gl_array_nx_create): Renamed from gl_array_create. Return NULL upon
+ out-of-memory.
+ (gl_array_node_nx_set_value): Renamed from gl_array_node_set_value.
+ Change return type to 'int'.
+ (gl_array_nx_set_at): Renamed from gl_array_set_at.
+ (grow): Change return type to 'int'. Return -1 upon out-of-memory.
+ (gl_array_nx_add_first): Renamed from gl_array_add_first. Return NULL
+ upon out-of-memory.
+ (gl_array_nx_add_last): Renamed from gl_array_add_last. Return NULL
+ upon out-of-memory.
+ (gl_array_nx_add_before): Renamed from gl_array_add_before. Return NULL
+ upon out-of-memory.
+ (gl_array_nx_add_after): Renamed from gl_array_add_after. Return NULL
+ upon out-of-memory.
+ (gl_array_nx_add_at): Renamed from gl_array_add_at. Return NULL upon
+ out-of-memory.
+ (gl_array_sortedlist_nx_add): Renamed from gl_array_sortedlist_add.
+ Update.
+ (gl_array_list_implementation): Update.
+ * lib/gl_carray_list.c: Don't include xalloc.h.
+ (gl_carray_nx_create_empty): Renamed from gl_carray_create_empty.
+ Return NULL upon out-of-memory.
+ (gl_carray_nx_create): Renamed from gl_carray_create. Return NULL upon
+ out-of-memory.
+ (gl_carray_node_nx_set_value): Renamed from gl_carray_node_set_value.
+ Change return type to 'int'.
+ (gl_carray_nx_set_at): Renamed from gl_carray_set_at.
+ (grow): Change return type to 'int'. Return -1 upon out-of-memory.
+ (gl_carray_nx_add_first): Renamed from gl_carray_add_first. Return NULL
+ upon out-of-memory.
+ (gl_carray_nx_add_last): Renamed from gl_carray_add_last. Return NULL
+ upon out-of-memory.
+ (gl_carray_nx_add_at): Renamed from gl_carray_add_at. Return NULL upon
+ out-of-memory.
+ (gl_carray_nx_add_before): Renamed from gl_carray_add_before. Update.
+ (gl_carray_nx_add_after): Renamed from gl_carray_add_after. Update.
+ (gl_carray_sortedlist_nx_add): Renamed from gl_carray_sortedlist_add.
+ Update.
+ (gl_carray_list_implementation): Update.
+ * lib/gl_anyhash_list2.h (hash_resize): Do nothing upon out-of-memory.
+ * lib/gl_anylinked_list2.h (gl_linked_nx_create_empty): Renamed from
+ gl_linked_create_empty. Return NULL upon out-of-memory.
+ (gl_linked_nx_create): Renamed from gl_linked_create. Return NULL upon
+ out-of-memory.
+ (gl_linked_node_nx_set_value): Renamed from gl_linked_node_set_value.
+ Change return type to 'int'. Return -1 upon out-of-memory.
+ (gl_linked_nx_set_at): Renamed from gl_linked_set_at. Return NULL upon
+ out-of-memory.
+ (gl_linked_nx_add_first): Renamed from gl_linked_add_first. Return NULL
+ upon out-of-memory.
+ (gl_linked_nx_add_last): Renamed from gl_linked_add_last. Return NULL
+ upon out-of-memory.
+ (gl_linked_nx_add_before): Renamed from gl_linked_add_before. Return
+ NULL upon out-of-memory.
+ (gl_linked_nx_add_after): Renamed from gl_linked_add_after. Return NULL
+ upon out-of-memory.
+ (gl_linked_nx_add_at): Renamed from gl_linked_add_at. Return NULL upon
+ out-of-memory.
+ (gl_linked_sortedlist_nx_add): Renamed from gl_linked_sortedlist_add.
+ Update.
+ * lib/gl_linked_list.c: Don't include xalloc.h.
+ (gl_linked_list_implementation): Update.
+ * lib/gl_linkedhash_list.c: Don't include xalloc.h.
+ (add_to_bucket): Change return type to 'int'.
+ (gl_linkedhash_list_implementation): Update.
+ * lib/gl_anytree_list1.h (free_subtree): New function.
+ * lib/gl_anytree_list2.h (gl_tree_nx_create_empty): Renamed from
+ gl_tree_create_empty. Return NULL upon out-of-memory.
+ (gl_tree_node_nx_set_value): Renamed from gl_tree_node_set_value.
+ Change return type to 'int'. Return -1 upon out-of-memory.
+ (gl_tree_nx_set_at): Renamed from gl_tree_set_at. Return NULL upon
+ out-of-memory.
+ (gl_tree_nx_add_at): Renamed from gl_tree_add_at. Update.
+ (gl_tree_remove_node): New function, moved here from
+ lib/gl_anyavltree_list2.h and lib/gl_anyrbtree_list2.h.
+ (gl_tree_sortedlist_nx_add): Renamed from gl_tree_sortedlist_add.
+ Update.
+ * lib/gl_anyavltree_list2.h (create_subtree_with_contents): Use
+ malloc, not xmalloc. Return NULL upon out-of-memory.
+ (gl_tree_nx_create): Renamed from gl_tree_create. Return NULL upon
+ out-of-memory.
+ (gl_tree_remove_node_from_tree): New function, extracted from
+ gl_tree_remove_node.
+ (gl_tree_nx_add_first): Renamed from gl_tree_add_first. Return NULL
+ upon out-of-memory.
+ (gl_tree_nx_add_last): Renamed from gl_tree_add_last. Return NULL upon
+ out-of-memory.
+ (gl_tree_nx_add_before): Renamed from gl_tree_add_before. Return NULL
+ upon out-of-memory.
+ (gl_tree_nx_add_after): Renamed from gl_tree_add_after. Return NULL
+ upon out-of-memory.
+ (gl_tree_remove_node): Remove function. Moved to gl_anytree_list2.h.
+ * lib/gl_anyrbtree_list2.h (create_subtree_with_contents): Use malloc,
+ not xmalloc. Return NULL upon out-of-memory.
+ (gl_tree_nx_create): Renamed from gl_tree_create. Return NULL upon
+ out-of-memory.
+ (gl_tree_remove_node_from_tree): New function, extracted from
+ gl_tree_remove_node.
+ (gl_tree_nx_add_first): Renamed from gl_tree_add_first. Return NULL
+ upon out-of-memory.
+ (gl_tree_nx_add_last): Renamed from gl_tree_add_last. Return NULL upon
+ out-of-memory.
+ (gl_tree_nx_add_before): Renamed from gl_tree_add_before. Return NULL
+ upon out-of-memory.
+ (gl_tree_nx_add_after): Renamed from gl_tree_add_after. Return NULL
+ upon out-of-memory.
+ (gl_tree_remove_node): Remove function. Moved to gl_anytree_list2.h.
+ * lib/gl_avltree_list.c: Don't include xalloc.h. Include
+ gl_anytree_list1.h before gl_anyavltree_list2.h.
+ (gl_avltree_list_implementation): Update.
+ * lib/gl_rbtree_list.c: Don't include xalloc.h. Include
+ gl_anytree_list1.h before gl_anyavltree_list2.h.
+ (gl_rbtree_list_implementation): Update.
+ * lib/gl_anytreehash_list1.h (add_to_bucket, add_nodes_to_buckets):
+ Change return type to 'int'. Return -1 upon out-of-memory. Use
+ __builtin_expect.
+ * lib/gl_avltreehash_list.c: Don't include xalloc.h.
+ (gl_avltreehash_list_implementation): Update.
+ * lib/gl_rbtreehash_list.c: Don't include xalloc.h.
+ (gl_rbtreehash_list_implementation): Update.
+ * modules/array-list (Depends-on): Remove xalloc.
+ * modules/carray-list (Depends-on): Likewise.
+ * modules/linked-list (Depends-on): Likewise.
+ * modules/linkedhash-list (Depends-on): Likewise.
+ * modules/avltree-list (Depends-on): Likewise.
+ * modules/rbtree-list (Depends-on): Likewise.
+ * modules/avltreehash-list (Depends-on): Likewise.
+ * modules/rbtreehash-list (Depends-on): Likewise.
+
+ * modules/xsublist: New file.
+ * lib/gl_xsublist.h: New file.
+ * lib/gl_xsublist.c: New file.
+ * lib/gl_sublist.h (gl_sublist_create): Disable declaration.
+ (gl_sublist_nx_create): New declaration.
+ * lib/gl_sublist.c: Don't include xalloc.h.
+ (gl_sublist_nx_create_empty): Renamed from gl_sublist_create_empty.
+ (gl_sublist_nx_create_fill): Renamed from gl_sublist_create_fill.
+ (gl_sublist_node_nx_set_value): Renamed from gl_sublist_node_set_value.
+ Change return type to 'int'. Return -1 upon out-of-memory.
+ (gl_sublist_nx_set_at): Renamed from gl_sublist_set_at. Return NULL
+ upon out-of-memory.
+ (gl_sublist_nx_add_first): Renamed from gl_sublist_add_first. Return
+ NULL upon out-of-memory.
+ (gl_sublist_nx_add_last): Renamed from gl_sublist_add_last. Return NULL
+ upon out-of-memory.
+ (gl_sublist_nx_add_before): Renamed from gl_sublist_add_before. Return
+ NULL upon out-of-memory.
+ (gl_sublist_nx_add_after): Renamed from gl_sublist_add_after. Return
+ NULL upon out-of-memory.
+ (gl_sublist_nx_add_at): Renamed from gl_sublist_add_at. Return NULL
+ upon out-of-memory.
+ (gl_sublist_sortedlist_nx_add): Renamed from gl_sublist_sortedlist_add.
+ (gl_sublist_list_implementation): Update.
+ (gl_sublist_nx_create): Renamed from gl_sublist_create. Return NULL
+ upon out-of-memory.
+ * modules/sublist (Depends-on): Remove xalloc.
+
+ * tests/test-array_list.c: Use gl_list_nx_* functions where possible.
+ * tests/test-carray_list.c: Likewise.
+ * tests/test-linked_list.c: Likewise.
+ * tests/test-linkedhash_list.c: Likewise.
+ * tests/test-avltree_list.c: Likewise.
+ * tests/test-rbtree_list.c: Likewise.
+ * tests/test-avltreehash_list.c: Likewise.
+ * tests/test-rbtreehash_list.c: Likewise.
+ * modules/array-list-tests (Makefile.am): Don't link with @LIBINTL@.
+ * modules/carray-list-tests (Makefile.am): Likewise.
+ * modules/linked-list-tests (Makefile.am): Likewise.
+ * modules/linkedhash-list-tests (Makefile.am): Likewise.
+ * modules/avltree-list-tests (Makefile.am): Likewise.
+ * modules/rbtree-list-tests (Makefile.am): Likewise.
+ * modules/avltreehash-list-tests (Makefile.am): Likewise.
+ * modules/rbtreehash-list-tests (Makefile.am): Likewise.
+
+ * NEWS: Mention the changes.
+
+ * lib/clean-temp.c: Include gl_xlist.h.
+ * modules/clean-temp (Depends-on): Add xlist.
+
+ * lib/git-merge-changelog.c: Include gl_xlist.h instead of gl_list.h.
+ * modules/git-merge-changelog (Depends-on): Add xlist. Remove list.
+
+ * tests/test-array_oset.c: Include gl_xlist.h.
+ * modules/array-oset-tests (Depends-on): Add xlist.
+
+ Reported by José E. Marchesi <jemarch@gnu.org>.
+
+2009-12-13 Bruno Haible <bruno@clisp.org>
+
+ Move the malloc checking from module 'oset' to new module 'xoset'.
+ * modules/xoset: New file.
+ * lib/gl_xoset.h: New file.
+ * lib/gl_xoset.c: New file.
+ * lib/gl_oset.h (gl_oset_create_empty, gl_oset_add): Disable
+ declarations.
+ (gl_oset_nx_create_empty, gl_oset_nx_add): New declarations.
+ (struct gl_oset_implementation): Rename and change methods accordingly.
+ (gl_oset_nx_create_empty): Renamed from gl_oset_create_empty.
+ (gl_oset_nx_add): Renamed from gl_oset_add. Change return type to
+ 'int'. Mark as __warn_unused_result__.
+ * lib/gl_oset.c (gl_oset_nx_create_empty): Renamed from
+ gl_oset_create_empty.
+ (gl_oset_nx_add): Renamed from gl_oset_add. Change return type to
+ 'int'.
+ * lib/gl_array_oset.c: Don't include xalloc.h.
+ (gl_array_nx_create_empty): Renamed from gl_array_create_empty. Use
+ malloc, not xmalloc.
+ (grow): Change return type to 'int'. Don't call xalloc_die.
+ (gl_array_nx_add_at): Renamed from gl_array_add_at. Change return type
+ to 'int'.
+ (gl_array_nx_add): Renamed from gl_array_add. Change return type to
+ 'int'.
+ (gl_array_oset_implementation): Update.
+ * lib/gl_anytree_oset.h (gl_tree_nx_create_empty): Renamed from
+ gl_tree_create_empty.
+ (gl_tree_nx_add): Renamed from gl_tree_add. Change return type to
+ 'int'.
+ * lib/gl_avltree_oset.c: Don't include xalloc.h.
+ (gl_tree_nx_add_first): Renamed from gl_tree_add_first. Use malloc, not
+ xmalloc.
+ (gl_tree_nx_add_before): Renamed from gl_tree_add_before. Use malloc,
+ not xmalloc.
+ (gl_tree_nx_add_after): Renamed from gl_tree_add_after. Use malloc, not
+ xmalloc.
+ (gl_avltree_oset_implementation): Update.
+ * lib/gl_rbtree_oset.c: Don't include xalloc.h.
+ (gl_tree_nx_add_first): Renamed from gl_tree_add_first. Use malloc, not
+ xmalloc.
+ (gl_tree_nx_add_before): Renamed from gl_tree_add_before. Use malloc,
+ not xmalloc.
+ (gl_tree_nx_add_after): Renamed from gl_tree_add_after. Use malloc, not
+ xmalloc.
+ (gl_rbtree_oset_implementation): Update.
+ * modules/array-oset (Depends-on): Remove xalloc.
+ * modules/avltree-oset (Depends-on): Likewise.
+ * modules/rbtree-oset (Depends-on): Likewise.
+ * tests/test-array_oset.c: Use gl_oset_nx_* functions where possible.
+ * tests/test-avltree_oset.c: Likewise.
+ * tests/test-rbtree_oset.c: Likewise.
+ * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
+ * modules/avltree-oset-tests (Makefile.am): Don't link with @LIBINTL@.
+ * modules/rbtree-oset-tests (Makefile.am): Likewise.
+ * NEWS: Mention the change.
+
+2009-12-05 Alfred M. Szmidt <ams@gnu.org>
+
+ maint.mk: allow a project to override release-prep commands
+ * top/maint.mk (alpha, beta, stable): Move release-preparatory
+ commands into a new rule.
+ (release-prep): New rule.
+ (release-prep-hook): New overridable variable.
+
+2009-12-13 Bruno Haible <bruno@clisp.org>
+
+ * lib/localcharset.c (locale_charset): Fix comment about use of GetACP.
+
+2009-12-13 Jim Meyering <meyering@redhat.com>
+
+ maint.mk (null_AM_MAKEFLAGS, built_programs): remove unused definitions
+ * top/maint.mk (null_AM_MAKEFLAGS, built_programs): Remove definitions.
+
+2009-12-12 Bruno Haible <bruno@clisp.org>
+
+ duplocale: Tweak.
+ * lib/duplocale.c (rpl_duplocale): Mark categories array as 'const'.
+
+2009-12-12 Karl Berry <karl@gnu.org>
+
+ * config/srclist.txt (strtoll.c): tab changes, no more sync.
+
+2009-12-12 Bruno Haible <bruno@clisp.org>
+
+ * m4/po.m4: Undo incorrect untabification.
+
+2009-12-12 Bruno Haible <bruno@clisp.org>
+
+ c-strtod, c-strtold: Use multithread-safe implementation on MacOS X.
+ * modules/c-strtod (Depends-on): Add locale.
+ * modules/c-strtold (Depends-on): Likewise.
+
+2009-12-12 Bruno Haible <bruno@clisp.org>
+
+ * lib/localcharset.c (locale_charset): Add comment about use of GetACP.
+
+2009-12-11 Eric Blake <ebb9@byu.net>
+
+ setenv: relax requirement in light of POSIX ruling
+ * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): Test handling of "" but
+ not NULL.
+ * tests/test-setenv.c (main): Relax test.
+ * tests/test-unsetenv.c (main): Likewise.
+ * doc/posix-functions/setenv.texi (setenv): Document this.
+ * doc/posix-functions/unsetenv.texi (unsetenv): Likewise.
+
+2009-12-11 Bruno Haible <bruno@clisp.org>
+
+ New module 'fd-safer-flag'.
+ * lib/dup-safer-flag.c: New file, extracted from lib/dup-safer.c.
+ * lib/dup-safer.c (dup_safer_flag): Remove function.
+ * lib/fd-safer-flag.c: New file, extracted from lib/fd-safer.c.
+ * lib/fd-safer.c (fd_safer_flag): Remove function.
+ * lib/unistd-safer.h (dup_safer_flag, fd_safer_flag): Update condition.
+ * modules/cloexec (configure.ac): Drop indicator macro.
+ * modules/fd-safer-flag: New file.
+ * modules/pipe2-safer (Depends-on): Add fd-safer-flag. Remove cloexec.
+ * modules/stdlib-safer (Depends-on): Add fd-safer-flag.
+ * modules/unistd-safer-tests (Depends-on): Add fd-safer-flag.
+
+2009-12-11 Bruno Haible <bruno@clisp.org>
+
+ Tests for module 'nl_langinfo'.
+ * modules/nl_langinfo-tests: New file.
+ * tests/test-nl_langinfo.sh: New file.
+ * tests/test-nl_langinfo.c: New file.
+
+ New module 'nl_langinfo'.
+ * lib/nl_langinfo.c: New file.
+ * m4/nl_langinfo.m4: New file.
+ * modules/nl_langinfo: New file.
+ * doc/posix-functions/nl_langinfo.texi: Mention the new module.
+
+2009-12-11 Bruno Haible <bruno@clisp.org>
+
+ Tests for module 'langinfo'.
+ * modules/langinfo-tests: New file.
+ * tests/test-langinfo.c: New file.
+
+ New module 'langinfo'.
+ * lib/langinfo.in.h: New file.
+ * m4/langinfo_h.m4: New file.
+ * modules/langinfo: New file.
+ * doc/posix-headers/langinfo.texi: Mention the new module.
+
+2009-12-11 Bruno Haible <bruno@clisp.org>
+
+ * lib/config.charset: Untabify.
+
+2009-12-11 Bruno Haible <bruno@clisp.org>
+
+ * modules/unistd-safer (configure.ac): Drop indicator macro.
+
+2009-12-11 Bruno Haible <bruno@clisp.org>
+
+ Move pipe2-safer code to its own file.
+ * lib/pipe2-safer.c: New file, extracted from lib/pipe-safer.c.
+ * lib/pipe-safer.c (pipe2_safer): Remove function.
+ * modules/pipe2-safer (Files): Add lib/pipe2-safer.c.
+ (Makefile.am): Add it to lib_SOURCES.
+
+2009-12-10 Bruno Haible <bruno@clisp.org>
+
+ * lib/recvfrom.c (rpl_recvfrom): Allow the from argument to be NULL.
+
+2009-12-10 Bruno Haible <bruno@clisp.org>
+
+ Declare which arguments expect non-NULL values, for GCC and clang.
+ * build-aux/arg-nonnull.h: New file.
+ * modules/arg-nonnull: New file.
+ * lib/arpa_inet.in.h (_GL_ARG_NONNULL): New placeholder.
+ (inet_ntop, inet_pton): Use it.
+ * lib/dirent.in.h (_GL_ARG_NONNULL): New placeholder.
+ (closedir, dirfd, opendir, scandir, alphasort): Use it.
+ * lib/fcntl.in.h (_GL_ARG_NONNULL): New placeholder.
+ (open, openat): Use it.
+ * lib/fnmatch.in.h (_GL_ARG_NONNULL): New placeholder.
+ (fnmatch): Use it.
+ * lib/getopt.in.h (_GL_ARG_NONNULL): New placeholder.
+ (getopt, getopt_long, getopt_long_only): Use it.
+ * lib/glob.in.h (_GL_ARG_NONNULL): New placeholder.
+ * lib/glob-libc.h (glob, globfree, glob64, globfree64, glob_pattern_p):
+ Use it.
+ * lib/iconv.in.h (_GL_ARG_NONNULL): New placeholder.
+ (iconv_open): Use it.
+ * lib/inttypes.in.h (_GL_ARG_NONNULL): New placeholder.
+ (strtoimax, strtoumax): Use it.
+ * lib/locale.in.h (_GL_ARG_NONNULL): New placeholder.
+ (duplocale): Use it.
+ * lib/math.in.h (_GL_ARG_NONNULL): New placeholder.
+ (frexp, frexpl): Use it.
+ * lib/netdb.in.h (_GL_ARG_NONNULL): New placeholder.
+ (getaddrinfo, freeaddrinfo, getnameinfo): Use it.
+ * lib/search.in.h (_GL_ARG_NONNULL): New placeholder.
+ (tsearch, tfind, tdelete, twalk): Use it.
+ * lib/signal.in.h (_GL_ARG_NONNULL): New placeholder.
+ (sigismember, sigemptyset, sigaddset, sigdelset, sigfillset,
+ sigpending): Use it.
+ * lib/spawn.in.h (_GL_ARG_NONNULL): New placeholder.
+ (posix_spawn, posix_spawnp, posix_spawnattr_init,
+ posix_spawnattr_destroy, posix_spawnattr_getsigdefault,
+ posix_spawnattr_setsigdefault, posix_spawnattr_getsigmask,
+ posix_spawnattr_setsigmask, posix_spawnattr_getflags,
+ posix_spawnattr_setflags, posix_spawnattr_getpgroup,
+ posix_spawnattr_setpgroup, posix_spawnattr_getschedpolicy,
+ posix_spawnattr_setschedpolicy, posix_spawnattr_getschedparam,
+ posix_spawnattr_setschedparam, posix_spawn_file_actions_init,
+ posix_spawn_file_actions_destroy, posix_spawn_file_actions_addopen,
+ posix_spawn_file_actions_addclose, posix_spawn_file_actions_adddup2):
+ Use it.
+ * lib/stdio.in.h (_GL_ARG_NONNULL): New placeholder.
+ (dprintf, fclose, fopen, fprintf, fpurge, fputc, fputs, freopen,
+ rpl_fseek, fseeko, rpl_ftell, ftello, fwrite, getdelim, getline,
+ obstack_printf, obstack_vprintf, popen, printf, putc, puts, remove,
+ rename, renameat, snprintf, sprintf, asprintf, vasprintf, vdprintf,
+ vfprintf, vprintf, vsnprintf, vsprintf): Use it.
+ * lib/stdlib.in.h (_GL_ARG_NONNULL): New placeholder.
+ (atoll, canonicalize_file_name, getloadavg, getsubopt, mkdtemp,
+ mkostemp, mkostemps, mkstemp, mkstemps, putenv, srandom_r, initstate_r,
+ setstate_r, random_r, realpath, rpmatch, setenv, strtod, strtoll,
+ strtoull, unsetenv): Use it.
+ * lib/string.in.h (_GL_ARG_NONNULL): New placeholder.
+ (memchr, memmem, mempcpy, memrchr, rawmemchr, stpcpy, stpncpy,
+ strchrnul, strdup, strndup, strnlen, strpbrk, strsep, strstr,
+ strcasestr, strtok_r, mbslen, mbsnlen, mbschr, mbsrchr, mbsstr,
+ mbscasecmp, mbsncasecmp, mbspcasecmp, mbscasestr, mbscspn, mbspbrk,
+ mbsspn, mbssep, mbstok_r, strverscmp): Use it.
+ * lib/strings.in.h (_GL_ARG_NONNULL): New placeholder.
+ (strcasecmp, strncasecmp): Use it.
+ * lib/sys_socket.in.h (_GL_ARG_NONNULL): New placeholder.
+ (rpl_connect, rpl_bind, rpl_getpeername, rpl_getsockname,
+ rpl_getsockopt, rpl_recv, rpl_send, rpl_recvfrom, rpl_sendto,
+ rpl_setsockopt): Use it.
+ * lib/sys_stat.in.h (_GL_ARG_NONNULL): New placeholder.
+ (fchmodat, fstat, fstatat, lchmod, rpl_lstat, mkdir, mkdirat, mkfifo,
+ mkfifoat, mknod, mknodat, stat, utimensat): Use it.
+ * lib/sys_time.in.h (_GL_ARG_NONNULL): New placeholder.
+ (gettimeofday): Use it.
+ * lib/sys_times.in.h (_GL_ARG_NONNULL): New placeholder.
+ (times): Use it.
+ * lib/sys_utsname.in.h (_GL_ARG_NONNULL): New placeholder.
+ (uname): Use it.
+ * lib/time.in.h (_GL_ARG_NONNULL): New placeholder.
+ (nanosleep, mktime, localtime_r, gmtime_r, strptime, timegm): Use it.
+ * lib/unistd.in.h (_GL_ARG_NONNULL): New placeholder.
+ (chown, euidaccess, faccessat, _gl_register_fd, fchownat,
+ getdomainname, gethostname, getlogin_r, lchown, link, linkat, pipe2,
+ pread, readlink, readlinkat, rmdir, symlink, symlinkat, unlink,
+ unlinkat, write): Use it.
+ * lib/wchar.in.h (_GL_ARG_NONNULL): New placeholder.
+ (mbsrtowcs, mbsnrtowcs, wcsrtombs, wcsnrtombs): Use it.
+ * lib/argv-iter.h: Include arg-nonnull.h.
+ (_ATTRIBUTE_NONNULL_): Remove macro.
+ (argv_iter_init_argv, argv_iter_init_stream, argv_iter,
+ argv_iter_n_args, argv_iter_free): Use _GL_ARG_NONNULL.
+ * lib/canonicalize-lgpl.c (_GL_ARG_NONNULL): Define, to defeat gcc
+ optimization.
+ * lib/getaddrinfo.c (_GL_ARG_NONNULL): Likewise.
+ * lib/getdelim.c (_GL_ARG_NONNULL): Likewise.
+ * lib/glob.c (_GL_ARG_NONNULL): Likewise.
+ * lib/random_r.c (_GL_ARG_NONNULL): Likewise.
+ * lib/setenv.c (_GL_ARG_NONNULL): Likewise.
+ * lib/strtod.c (_GL_ARG_NONNULL): Likewise.
+ * lib/tsearch.c (_GL_ARG_NONNULL): Likewise.
+ * lib/unsetenv.c (_GL_ARG_NONNULL): Likewise.
+ * modules/arpa_inet (Depends-on): Add arg-nonnull.
+ (Makefile.am): Insert arg-nonnull.h into arpa/inet.h.
+ * modules/dirent (Depends-on): Add arg-nonnull.
+ (Makefile.am): Insert arg-nonnull.h into dirent.h.
+ * modules/fcntl-h (Depends-on): Add arg-nonnull.
+ (Makefile.am): Insert arg-nonnull.h into fcntl.h.
+ * modules/fnmatch (Depends-on): Add arg-nonnull.
+ (Makefile.am): Insert arg-nonnull.h into fnmatch.h.
+ * modules/getopt-posix (Depends-on): Add arg-nonnull.
+ (Makefile.am): Insert arg-nonnull.h into getopt.h.
+ * modules/glob (Depends-on): Add arg-nonnull.
+ (Makefile.am): Insert arg-nonnull.h into glob.h.
+ * modules/iconv_open (Depends-on): Add arg-nonnull.
+ (Makefile.am): Insert arg-nonnull.h into iconv.h.
+ * modules/inttypes (Depends-on): Add arg-nonnull.
+ (Makefile.am): Insert arg-nonnull.h into inttypes.h.
+ * modules/locale (Depends-on): Add arg-nonnull.
+ (Makefile.am): Insert arg-nonnull.h into locale.h.
+ * modules/math (Depends-on): Add arg-nonnull.
+ (Makefile.am): Insert arg-nonnull.h into math.h.
+ * modules/netdb (Depends-on): Add arg-nonnull.
+ (Makefile.am): Insert arg-nonnull.h into netdb.h.
+ * modules/search (Depends-on): Add arg-nonnull.
+ (Makefile.am): Insert arg-nonnull.h into search.h.
+ * modules/signal (Depends-on): Add arg-nonnull.
+ (Makefile.am): Insert arg-nonnull.h into signal.h.
+ * modules/spawn (Depends-on): Add arg-nonnull.
+ (Makefile.am): Insert arg-nonnull.h into spawn.h.
+ * modules/stdio (Depends-on): Add arg-nonnull.
+ (Makefile.am): Insert arg-nonnull.h into stdio.h.
+ * modules/stdlib (Depends-on): Add arg-nonnull.
+ (Makefile.am): Insert arg-nonnull.h into stdlib.h.
+ * modules/string (Depends-on): Add arg-nonnull.
+ (Makefile.am): Insert arg-nonnull.h into string.h.
+ * modules/strings (Depends-on): Add arg-nonnull.
+ (Makefile.am): Insert arg-nonnull.h into strings.h.
+ * modules/sys_socket (Depends-on): Add arg-nonnull.
+ (Makefile.am): Insert arg-nonnull.h into sys/socket.h.
+ * modules/sys_stat (Depends-on): Add arg-nonnull.
+ (Makefile.am): Insert arg-nonnull.h into sys/stat.h.
+ * modules/sys_time (Depends-on): Add arg-nonnull.
+ (Makefile.am): Insert arg-nonnull.h into sys/time.h.
+ * modules/sys_times (Depends-on): Add arg-nonnull.
+ (Makefile.am): Insert arg-nonnull.h into sys/times.h.
+ * modules/sys_utsname (Depends-on): Add arg-nonnull.
+ (Makefile.am): Insert arg-nonnull.h into sys/utsname.h.
+ * modules/time (Depends-on): Add arg-nonnull.
+ (Makefile.am): Insert arg-nonnull.h into time.h.
+ * modules/unistd (Depends-on): Add arg-nonnull.
+ (Makefile.am): Insert arg-nonnull.h into unistd.h.
+ * modules/wchar (Depends-on): Add arg-nonnull.
+ (Makefile.am): Insert arg-nonnull.h into wchar.h.
+ * modules/argv-iter (Depends-on): Add arg-nonnull.
+ * tests/test-canonicalize.c (null_ptr): New function.
+ (main): Use it.
+ * tests/test-canonicalize-lgpl.c (null_ptr): New function.
+ (main): Use it.
+ * tests/test-memmem.c (null_ptr): New function.
+ (main): Use it.
+ Reported by Jim Meyering.
+
2009-12-10 Bruno Haible <bruno@clisp.org>
Use spaces for indentation, not tabs.
--with-packager=Gentoo \
--with-packager-bug-report=http://bugs.gentoo.org/ \
--with-packager-version="patchset 1.6"
- $ ./src/ls --version | head -n3
+ $ ./src/ls --version | head -n2
ls (GNU coreutils) 7.1-dirty
Packaged by Gentoo (patchset 1.6)
- Copyright (C) 2009 Free Software Foundation, Inc.
Note that the bug reporting info via --help doesn't show up because
coreutils uses its own custom emit_bug_reporting_address() implementation
in src/system.h. If it didn't, it'd look like:
coding: utf-8
End:
- Copyright (C) 1997-2009 Free Software Foundation, Inc.
+ Copyright (C) 1997-2010 Free Software Foundation, Inc.
Copying and distribution of this file, with or without
modification, are permitted provided the copyright notice
#!/bin/sh
#
-# Copyright (C) 2002-2009 Free Software Foundation, Inc.
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
func_module func
func_module inline
func_module longlong
+ func_module va-args
func_module vararrays
func_end_table
# Makefile for gnulib central.
-# Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
#
# Copying and distribution of this file, with or without modification,
# in any medium, are permitted without royalty provided the copyright
Date Modules Changes
+2009-12-13 sublist The module does not define functions any more that
+ call xalloc_die() in out-of-memory situations. Use
+ module 'xsublist' and include file "gl_xsublist.h"
+ instead.
+
+2009-12-13 list The module does not define functions any more that
+ call xalloc_die() in out-of-memory situations.
+ Use module 'xlist' and include file "gl_xlist.h"
+ instead.
+
+2009-12-13 oset The module does not define functions any more that
+ call xalloc_die() in out-of-memory situations.
+ Use module 'xoset' and include file "gl_xoset.h"
+ instead.
+
2009-12-10 * Most source code files have been converted to
indentation by spaces (rather than tabs). Patches
of gnulib source code needs to be updated.
-----
-Copyright 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free
-Software Foundation, Inc.
+Copyright 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# If you change this file with Emacs, please let the write hook
# do its job. Otherwise, update this string manually.
-# Copyright (C) 2002-2009 Free Software Foundation, Inc.
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
--- /dev/null
+/* A C macro for declaring that specific arguments must not be NULL.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
+ that the values passed as arguments n, ..., m must be non-NULL pointers.
+ n = 1 stands for the first argument, n = 2 for the second argument etc. */
+#ifndef _GL_ARG_NONNULL
+# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
+# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
+# else
+# define _GL_ARG_NONNULL(params)
+# endif
+#endif
# Bootstrap this package from checked-out sources.
-# Copyright (C) 2003-2009 Free Software Foundation, Inc.
+# Copyright (C) 2003-2010 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# Bootstrap configuration.
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
# Free Software Foundation, Inc.
-timestamp='2009-11-20'
+timestamp='2009-12-30'
# 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
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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."
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable at run time.
#
-# Copyright 1996-2008 Free Software Foundation, Inc.
+# Copyright 1996-2010 Free Software Foundation, Inc.
# Taken from GNU libtool, 2003
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable.
#
-# Copyright 1996-2008 Free Software Foundation, Inc.
+# Copyright 1996-2010 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
# Free Software Foundation, Inc.
-timestamp='2009-11-20'
+timestamp='2009-12-31'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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."
-dicos*)
os=-dicos
;;
+ -nacl*)
+ ;;
-none)
;;
*)
#!/bin/sh
# Compile a C# program.
-# Copyright (C) 2003-2006 Free Software Foundation, Inc.
+# Copyright (C) 2003-2006, 2009-2010 Free Software Foundation, Inc.
# Written by Bruno Haible <bruno@clisp.org>, 2003.
#
# This program is free software: you can redistribute it and/or modify
#!/bin/sh
# Execute a C# program.
-# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005, 2009, 2010 Free Software Foundation, Inc.
# Written by Bruno Haible <bruno@clisp.org>, 2003.
#
# This program is free software: you can redistribute it and/or modify
# Note: this is a bash script (could be zsh or dash)
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# If you change this file with Emacs, please let the write hook
# do its job. Otherwise, update this string manually.
-# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2008-2010 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
VERSION=2009-07-21.16; # UTC
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#!/bin/sh
# Sign files and upload them.
-scriptversion=2009-11-29.20; # UTC
+scriptversion=2009-12-21.21; # UTC
# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation
#
--delete oopsbar-0.9.91.tar.gz \\
-- foobar-0.9.91.tar.gz
+gnupload uses the ncftpput program to do the transfers; if you don't
+happen to have an ncftp package installed, the ncftpput-ftp script in
+the build-aux/ directory of the gnulib package
+(http://savannah.gnu.org/projects/gnulib) may serve as a replacement.
+
Report bugs to <bug-automake@gnu.org>.
Send patches to <automake-patches@gnu.org>."
#!/bin/sh
# install-reloc - install a program including a relocating wrapper
-# Copyright (C) 2003, 2005-2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005-2007, 2009-2010 Free Software Foundation, Inc.
# Written by Bruno Haible <bruno@clisp.org>, 2003.
#
# This program is free software: you can redistribute it and/or modify
#!/bin/sh
# Compile a Java program.
-# Copyright (C) 2001-2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2001-2002, 2006, 2009-2010 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
#!/bin/sh
# Execute a Java program.
-# Copyright (C) 2001, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2006, 2009, 2010 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
#!/bin/sh
# Determine the dynamically linked dependencies of a program.
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
# Written by Bruno Haible <bruno@clisp.org>, 2006.
#
# This program is free software: you can redistribute it and/or modify
/* A C macro for emitting link time warnings.
- Copyright (C) 1995, 1997, 2000, 2002-2003, 2007, 2009 Free Software
+ Copyright (C) 1995, 1997, 2000, 2002-2003, 2007, 2009-2010 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
#!/bin/sh
# Create a temporary directory, much like mktemp -d does.
-# Copyright (C) 2007-2008 Free Software Foundation, Inc.
+# Copyright (C) 2007-2010 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# If you change this file with Emacs, please let the write hook
# do its job. Otherwise, update this string manually.
-# Copyright (C) 2002-2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2007, 2009-2010 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# pmccabe2html - AWK script to convert pmccabe output to html
-# Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
html_prolog = "<a href=\"" url "\">Back to " package_name " Homepage</a><br/><br/>"
}
html_epilog = "<hr color=\"black\" size=\"2\"/> \
-Copyright (c) 2007, 2008 Free Software Foundation Inc."
+Copyright (c) 2007, 2008 Free Software Foundation, Inc."
html_doctype = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \
\"http://www.w3.org/TR/html401/loose.dtd\">"
html_comment = "<!-- Generated by gnulib's pmccabe2html at " systime() " -->"
{
print "<caption class=\"function_table_caption\">" caption "</caption>"
}
- html_fnc_header(fname_p,
- mcyclo_p,
- cyclo_p,
- num_statements_p,
- num_lines_p,
- first_line_p,
+ html_fnc_header(fname_p,
+ mcyclo_p,
+ cyclo_p,
+ num_statements_p,
+ num_lines_p,
+ first_line_p,
file_p)
for (nfnc = 1; nfnc < nfuncs; nfnc++)
{
html_fnc(nfnc,
- fname_p,
- mcyclo_p,
- cyclo_p,
- num_statements_p,
- num_lines_p,
- first_line_p,
+ fname_p,
+ mcyclo_p,
+ cyclo_p,
+ num_statements_p,
+ num_lines_p,
+ first_line_p,
file_p)
}
print "</table>"
if (mcyclo[nfun] > cyclo_high_max)
{
trclass="function_entry_untestable"
- }
+ }
else if (mcyclo[nfun] > cyclo_moderate_max)
{
trclass="function_entry_high"
{
print file[nfun]
}
-
+
print "</td>"
if (num_lines_p) { num_columns++ }
if (first_line_p) { num_columns++ }
if (file_p) { num_columns++ }
-
+
print "<td colspan=\"" num_columns "\" height=\"0\">"
print "<div id=\"" fname "_src\" class=\"function_src\" style=\"position: relative; display: none;\">"
print "<pre class=\"function_src\">"
sub(/\\</, "<", codeline)
sub(/\\>/, ">", codeline)
sub(/&/, "&", codeline)
-
+
print codeline
}
close(fname nfun "_fn.txt")
print "Simple module, without much risk"
print "</td>"
print "</tr>"
- # Moderate
+ # Moderate
print "<tr>"
print "<td class=\"ranges_entry_moderate\">"
print " "
print "==Details for all functions=="
print "Used ranges:"
-
+
print "{| class =\"cyclo_ranges_table\""
print "|-"
print "| class=\"cyclo_ranges_header_entry\" | "
{
print "|+" caption
}
- wiki_fnc_header(fname_p,
- mcyclo_p,
- cyclo_p,
- num_statements_p,
- num_lines_p,
- first_line_p,
+ wiki_fnc_header(fname_p,
+ mcyclo_p,
+ cyclo_p,
+ num_statements_p,
+ num_lines_p,
+ first_line_p,
file_p)
for (nfnc = 1; nfnc < nfuncs; nfnc++)
{
wiki_fnc(nfnc,
- fname_p,
- mcyclo_p,
- cyclo_p,
- num_statements_p,
- num_lines_p,
- first_line_p,
+ fname_p,
+ mcyclo_p,
+ cyclo_p,
+ num_statements_p,
+ num_lines_p,
+ first_line_p,
file_p)
}
print "|}"
if (mcyclo[nfnc] > cyclo_high_max)
{
trclass="cyclo_function_entry_untestable"
- }
+ }
else if (mcyclo[nfnc] > cyclo_moderate_max)
{
trclass="cyclo_function_entry_high"
href = source_file_link_tmpl
sub(/%FILENAME%/, file[nfnc], href)
}
-
+
# Source file
print "| class=\"cyclo_function_entry_filename\" |" \
((href != "") ? "[" href " " file[nfnc] "]" : "[" file[nfnc] "]")
}
# Print prolog
- if ((output_lang == "html") &&
+ if ((output_lang == "html") &&
(html_prolog != ""))
{
print html_prolog
wiki_function_cyclo()
}
}
-
+
# Print epilog
- if ((output_lang == "html") &&
+ if ((output_lang == "html") &&
(html_epilog != ""))
{
print html_epilog
# Output a system dependent linker command for putting a relocatable library
# search path into an executable.
#
-# Copyright 2003 Free Software Foundation, Inc.
+# Copyright 2003, 2009, 2010 Free Software Foundation, Inc.
# Written by Bruno Haible <bruno@clisp.org>, 2003.
#
# This program is free software: you can redistribute it and/or modify
# package by hand; see doc/relocatable-maint.texi (in Gnulib) for
# details.
#
-# Copyright (C) 2003, 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005-2007, 2009-2010 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
--- /dev/null
+/* A C macro for declaring that specific function parameters are not used.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter
+ declarations for parameters that are not used. This helps to reduce
+ warnings, such as from GCC -Wunused-parameter. The syntax is as follows:
+ type param _GL_UNUSED_PARAMETER
+ or more generally
+ param_decl _GL_UNUSED_PARAMETER
+ For example:
+ int param _GL_UNUSED_PARAMETER
+ int *(*param)(void) _GL_UNUSED_PARAMETER
+ Other possible, but obscure and discouraged syntaxes:
+ int _GL_UNUSED_PARAMETER *(*param)(void)
+ _GL_UNUSED_PARAMETER int *(*param)(void)
+ */
+#ifndef _GL_UNUSED_PARAMETER
+# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+# define _GL_UNUSED_PARAMETER __attribute__ ((__unused__))
+# else
+# define _GL_UNUSED_PARAMETER
+# endif
+#endif
if 0;
# Update an FSF copyright year list to include the current year.
-my $VERSION = '2009-10-30.15:57'; # UTC
+my $VERSION = '2009-12-28.11:09'; # UTC
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009-2010 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# are expanded instead.
# 3. For testing purposes, you can set the assumed current year in
# UPDATE_COPYRIGHT_YEAR.
+# 4. The default maximum line length for a copyright line is 72.
+# Set UPDATE_COPYRIGHT_MAX_LINE_LENGTH to use a different length.
use strict;
use warnings;
my $circle_c_re = '(?:\([cC]\)|@copyright{}|©)';
my $holder = 'Free Software Foundation, Inc.';
my $prefix_max = 5;
-my $margin = 72;
+my $margin = $ENV{UPDATE_COPYRIGHT_MAX_LINE_LENGTH};
+!$margin || $margin !~ m/^\d+$/
+ and $margin = 72;
+
my $tab_width = 8;
my $this_year = $ENV{UPDATE_COPYRIGHT_YEAR};
# If you change this file with Emacs, please let the write hook
# do its job. Otherwise, update this string manually.
-# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2008-2010 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# Print a version string.
scriptversion=2009-07-21.16; # UTC
-# Copyright (C) 2006-2009 Free Software Foundation, Inc.
+# Copyright (C) 2006-2010 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#! /bin/sh
#
-# Copyright (C) 2001, 2003, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2006, 2009, 2010 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#!/usr/bin/perl -w
# Check a gnulib module.
-# Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2007, 2009, 2010 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
define print-header
printf '%s\n' \
"/* Functions for dealing with '\0' separated arg vectors." \
-" Copyright (C) 1995-1998, 2000-2002, 2006 Free Software Foundation, Inc."\
+" Copyright (C) 1995-1998, 2000-2002, 2006, 2009-2010 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"\
# Check for files in directory $1 being up to date, according to the
# list on stdin. Don't actually make any changes, just show the diffs.
#
-# Copyright (C) 2002, 2003, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
$GNUWWWLICENSES/agpl-3.0.texi doc
$GNUWWWLICENSES/fdl-1.3.texi doc
$GNUWWWLICENSES/fdl-1.3.texi doc/fdl.texi
+$GNUWWWLICENSES/gpl-3.0.texi doc
+$GNUWWWLICENSES/lgpl-3.0.texi doc
#
# The official forms for contributors to fill out, mentioned in maintain.
$GNUORG/conditions.text doc/Copyright
#$LIBCSRC/posix/regexec.c lib gpl
#
# c89 changes $LIBCSRC/string/strdup.c lib gpl
-$LIBCSRC/stdlib/strtoll.c lib gpl
+#tab changes $LIBCSRC/stdlib/strtoll.c lib gpl
$LIBCSRC/stdlib/strtoul.c lib gpl
# (no more strtok_r.h) $LIBCSRC/string/strtok_r.c lib gpl
# (gnulib needs config.h?) $LIBCSRC/string/memmem.c lib gpl
# Makefile for gnulib doc.
-# Copyright (C) 2004, 2006-2009 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006-2010 Free Software Foundation, Inc.
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
@c Documentation of gnulib module 'alloca-opt'.
-@c Copyright (C) 2004, 2007 Free Software Foundation, Inc.
+@c Copyright (C) 2004, 2007, 2009, 2010 Free Software Foundation, Inc.
@c Permission is granted to copy, distribute and/or modify this document
@c under the terms of the GNU Free Documentation License, Version 1.3 or
@c Documentation of gnulib module 'alloca'.
-@c Copyright (C) 2004, 2007 Free Software Foundation, Inc.
+@c Copyright (C) 2004, 2007, 2009, 2010 Free Software Foundation, Inc.
@c Permission is granted to copy, distribute and/or modify this document
@c under the terms of the GNU Free Documentation License, Version 1.3 or
@c Documentation of gnulib module 'c-ctype'.
-@c Copyright (C) 2008 Free Software Foundation, Inc.
+@c Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
@c Permission is granted to copy, distribute and/or modify this document
@c under the terms of the GNU Free Documentation License, Version 1.3 or
@c Documentation of gnulib module 'c-strcase'.
-@c Copyright (C) 2008 Free Software Foundation, Inc.
+@c Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
@c Permission is granted to copy, distribute and/or modify this document
@c under the terms of the GNU Free Documentation License, Version 1.3 or
@c Documentation of gnulib module 'c-strcaseeq'.
-@c Copyright (C) 2008 Free Software Foundation, Inc.
+@c Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
@c Permission is granted to copy, distribute and/or modify this document
@c under the terms of the GNU Free Documentation License, Version 1.3 or
@c Documentation of gnulib module 'c-strcasestr'.
-@c Copyright (C) 2008 Free Software Foundation, Inc.
+@c Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
@c Permission is granted to copy, distribute and/or modify this document
@c under the terms of the GNU Free Documentation License, Version 1.3 or
@c Documentation of gnulib module 'c-strstr'.
-@c Copyright (C) 2008 Free Software Foundation, Inc.
+@c Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
@c Permission is granted to copy, distribute and/or modify this document
@c under the terms of the GNU Free Documentation License, Version 1.3 or
@c Documentation of gnulib module 'c-strtod'.
-@c Copyright (C) 2008-2009 Free Software Foundation, Inc.
+@c Copyright (C) 2008-2010 Free Software Foundation, Inc.
@c Permission is granted to copy, distribute and/or modify this document
@c under the terms of the GNU Free Documentation License, Version 1.3 or
@c Documentation of gnulib module 'c-strtold'.
-@c Copyright (C) 2008 Free Software Foundation, Inc.
+@c Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
@c Permission is granted to copy, distribute and/or modify this document
@c under the terms of the GNU Free Documentation License, Version 1.3 or
@section ctime
@findex ctime
-@c Copyright (C) 2005 Free Software Foundation, Inc.
+@c Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc.
@c Permission is granted to copy, distribute and/or modify this document
@c under the terms of the GNU Free Documentation License, Version 1.3 or
@findex progname
@vindex program_name
-@c Copyright (C) 2007 Free Software Foundation, Inc.
+@c Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
@c Permission is granted to copy, distribute and/or modify this document
@c under the terms of the GNU Free Documentation License, Version 1.3 or
@section gcd: greatest common divisor
@findex gcd
-@c Copyright (C) 2006 Free Software Foundation, Inc.
+@c Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
@c Permission is granted to copy, distribute and/or modify this document
@c under the terms of the GNU Free Documentation License, Version 1.3 or
@c GNU date syntax documentation
-@c Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-@c 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+@c Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+@c 2004, 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
@c Permission is granted to copy, distribute and/or modify this document
@c under the terms of the GNU Free Documentation License, Version 1.3 or
options string when @env{POSIXLY_CORRECT} is set on some platforms:
Cygwin 1.7.0.
@item
+Some implementations fail to reset state, including re-checking
+@env{POSIXLY_CORRECT}, when @code{optind} is set to @samp{0}:
+NetBSD, Cygwin 1.7.0.
+@item
The function @code{getopt_long} does not support options with optional
arguments on some platforms:
MacOS X 10.5, OpenBSD 4.0, AIX 5.2, IRIX 6.5, Solaris 10, Cygwin 1.5.x.
Portability problems not fixed by Gnulib:
@itemize
@item
-The glibc implementation allows a complete reset of the environment,
-including re-checking for @env{POSIXLY_CORRECT}, by setting
-@code{optind} to 0. Other implementations provide @code{optreset},
-causing a reset by setting it non-zero, although it does not
-necessarily re-read @env{POSIXLY_CORRECT}.
+The glibc extension of using @samp{W;} in the optstring argument to
+allow @code{-W foo} to behave synonymously with @code{--foo} is not
+very reliable, even in glibc.
+@item
+Mixing a leading @samp{-} or @samp{+} with a leading @samp{:} in the
+optstring argument has inconsistent effects across platforms.
@end itemize
in the options string when @env{POSIXLY_CORRECT} is set on some platforms:
Cygwin 1.7.0.
@item
+Some implementations fail to reset state, including re-checking
+@env{POSIXLY_CORRECT}, when @code{optind} is set to @samp{0}:
+NetBSD, Cygwin 1.7.0.
+@item
The function @code{getopt_long_only} does not support options with
optional arguments on some platforms:
MacOS X 10.5, OpenBSD 4.0, AIX 5.2, Solaris 10, Cygwin 1.5.x.
Portability problems not fixed by Gnulib:
@itemize
@item
-The glibc implementation allows a complete reset of the environment,
-including re-checking for @env{POSIXLY_CORRECT}, by setting
-@code{optind} to 0. Other implementations provide @code{optreset},
-causing a reset by setting it non-zero, although it does not
-necessarily re-read @env{POSIXLY_CORRECT}.
+The glibc extension of using @samp{W;} in the optstring argument to
+allow @code{-W foo} to behave synonymously with @code{--foo} is not
+very reliable.
+@item
+Some implementations return success instead of reporting an ambiguity
+if user's option is a prefix of two long options with the same flag:
+FreeBSD.
+@item
+Mixing a leading @samp{-} or @samp{+} with a leading @samp{:} in the
+optstring argument has inconsistent effects across platforms.
@end itemize
@node Invoking gnulib-tool
@chapter Invoking gnulib-tool
-@c Copyright (C) 2005-2009 Free Software Foundation, Inc.
+@c Copyright (C) 2005-2010 Free Software Foundation, Inc.
@c Permission is granted to copy, distribute and/or modify this document
@c under the terms of the GNU Free Documentation License, Version 1.3 or
which is a library of common routines intended to be shared at the
source level.
-Copyright @copyright{} 2004-2009 Free Software Foundation, Inc.
+Copyright @copyright{} 2004-2010 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
@section inet_ntoa
@findex inet_ntoa
-@c Copyright (C) 2005 Free Software Foundation, Inc.
+@c Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc.
@c Permission is granted to copy, distribute and/or modify this document
@c under the terms of the GNU Free Documentation License, Version 1.3 or
@c Documentation of gnulib module 'lib-symbol-visibility'.
-@c Copyright (C) 2005-2006, 2009 Free Software Foundation, Inc.
+@c Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
@c Permission is granted to copy, distribute and/or modify this document
@c under the terms of the GNU Free Documentation License, Version 1.3 or
@c For double-sided printing, uncomment:
@c @setchapternewpage odd
@c This date is automagically updated when you save this file:
-@set lastupdate November 20, 2009
+@set lastupdate December 12, 2009
@c %**end of header
@dircategory GNU organization
@enumerate
@item
-The file to be distributed (for example, @file{foo.tar.gz}).
+The file to be distributed; for example, @file{foo.tar.gz}.
@item
-Detached GPG binary signature for (1), made using @samp{gpg -b}
-(for example, @file{foo.tar.gz.sig}).
+Detached GPG binary signature file for (1); for example,
+@file{foo.tar.gz.sig}. Make this with @samp{gpg -b foo.tar.gz}.
+
@item
-A clearsigned @dfn{directive file}, made using @samp{gpg --clearsign}
-(for example, @file{foo.tar.gz.directive.asc}).
+A clearsigned @dfn{directive file}; for example,
+@file{foo.tar.gz.directive.asc}. Make this by preparing the plain
+text file @file{foo.tar.gz.directive} and then run @samp{gpg
+--clearsign foo.tar.gz.directive}. @xref{FTP Upload Directive File -
+v1.1}, for the contents of the directive file.
@end enumerate
The names of the files are important. The signature file must have the
package. You also receive a message when your upload has been successfully
processed.
-One relatively easy way to create and transfer the necessary files is
-to use the @code{gnupload} script, which is available from the
+One automated way to create and transfer the necessary files is to use
+the @code{gnupload} script, which is available from the
@file{build-aux/} directory of the @code{gnulib} project at
@url{http://savannah.gnu.org/projects/gnulib}. @code{gnupload} can
also remove uploaded files. Run @code{gnupload --help} for a
@code{gnupload} uses the @code{ncftpput} program to do the actual
transfers; if you don't happen to have the @code{ncftp} package
installed, the @code{ncftpput-ftp} script in the @file{build-aux/}
-directory of @code{gnulib}. serves as a replacement which uses plain
+directory of @code{gnulib} serves as a replacement which uses plain
command line @code{ftp}.
-If you have difficulties processing an upload, email
+If you have difficulties with an upload, email
@email{ftp-upload@@gnu.org}.
POSIX specification: @url{http://www.opengroup.org/onlinepubs/9699919799/functions/fcntl.html}
-Gnulib module: ---
+Gnulib module: fcntl
Portability problems fixed by Gnulib:
@itemize
+@item
+This function does not support @code{F_DUPFD_CLOEXEC} on some
+platforms:
+MacOS X 10.3, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, AIX 5.1, HP-UX 11,
+IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.7.1, mingw, Interix 3.5,
+BeOS.
+Note that the gnulib replacement code is functional but not atomic.
+
+@item
+The @code{F_DUPFD} action of this function does not reject
+out-of-range targets properly on some platforms:
+Cygwin 1.5.x.
+
+@item
+This function is missing on some platforms:
+mingw.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
-This function is missing on some platforms:
-mingw.
+The replacement function does not support @code{F_SETFD},
+@code{F_GETFL}, @code{F_SETFL}, @code{F_GETOWN}, @code{F_SETOWN},
+@code{F_GETLK}, @code{F_SETLK}, and @code{F_SETLKW} on some platforms:
+mingw
@end itemize
the @code{tv_sec} argument to be 0, and don't necessarily handle all
file permissions in the manner required by POSIX:
Linux kernel 2.6.25.
+@item
+When using @code{UTIME_OMIT} for the modification time, but specifying
+an access time, some systems fail to update the change time:
+Linux kernel 2.6.32.
@end itemize
Portability problems not fixed by Gnulib:
@code{optind} to 0. Other implementations provide @code{optreset},
causing a reset by setting it non-zero, although it does not
necessarily re-read @env{POSIXLY_CORRECT}.
+@item
+Mixing a leading @samp{-} or @samp{+} with a leading @samp{:} in the
+optstring argument has inconsistent effects across platforms.
@end itemize
Portability problems fixed by Gnulib:
@itemize
@item
+This function is declared in @code{unistd.h} instead of
+@code{stdlib.h} on some platforms:
+Cygwin 1.7.1.
+@item
This function is missing on some platforms:
mingw, BeOS.
@end itemize
GNU libiconv is not found if installed in @file{$PREFIX/lib}.
@item
Failures are not distinguishable from successful returns on some platforms:
-AIX 5.1.
+AIX 5.1, Solaris 10.
@end itemize
Portability problems not fixed by Gnulib:
POSIX specification: @url{http://www.opengroup.org/onlinepubs/9699919799/functions/nl_langinfo.html}
-Gnulib module: ---
+Gnulib module: nl_langinfo
Portability problems fixed by Gnulib:
@itemize
-@end itemize
-
-Portability problems not fixed by Gnulib:
-@itemize
@item
This function is missing on some platforms:
mingw, BeOS.
@item
-Some older versions of glibc had @code{nl_langinfo} but not the @code{CODESET}
-macro.
+The constant @code{CODESET} is not supported on some platforms:
+glibc 2.0.6, OpenBSD 3.8.
+@item
+The constants @code{ERA}, @code{ERA_D_FMT}, @code{ERA_D_T_FMT},
+@code{ERA_T_FMT}, @code{ALT_DIGITS} are not supported on some platforms:
+OpenBSD 3.8.
+@end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
@item
On Cygwin 1.5.x, which doesn't have locales, @code{nl_langinfo(CODESET)} always
returns @code{"US-ASCII"}.
@itemize
@item
This variable is missing on some platforms:
-MacOS X 10.3, IRIX 6.5, OSF/1 5.1, Cygwin 1.5.x.
+MacOS X 10.3, IRIX 6.5, OSF/1 5.1.
@end itemize
@itemize
@item
This variable is missing on some platforms:
-IRIX 6.5, OSF/1 5.1, Cygwin 1.5.x.
+IRIX 6.5, OSF/1 5.1.
@end itemize
@itemize
@item
This variable is missing on some platforms:
-IRIX 6.5, OSF/1 5.1, Cygwin 1.5.x.
+IRIX 6.5, OSF/1 5.1.
@end itemize
@itemize
@item
This variable is missing on some platforms:
-MacOS X 10.3, IRIX 6.5, OSF/1 5.1, Cygwin 1.5.x.
+MacOS X 10.3, IRIX 6.5, OSF/1 5.1.
@end itemize
AIX 4.3.2, HP-UX 11, IRIX 6.5, Solaris 9, mingw, BeOS.
@item
On some platforms, this function does not fail with @samp{EINVAL} when
-passed a null pointer, an empty string, or a string containing @samp{=}:
+passed an empty string or a string containing @samp{=}:
FreeBSD 6.0, NetBSD 1.6, OpenBSD 3.8, Cygwin 1.5.x.
@item
On some platforms, this function removes a leading @samp{=} from the
Portability problems not fixed by Gnulib:
@itemize
+@item
+Older versions of POSIX required that @code{setenv(NULL,"",0)} gracefully
+fail with @code{EINVAL}, but not all implementations guarantee this,
+and the requirement was removed.
@end itemize
glibc 2.3.6, MacOS X 10.3, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, AIX
5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, Interix 3.5, BeOS.
But the replacement function is not safe to be used in libraries and is not multithread-safe.
+@item
+Some platforms declare this function in @code{stdio.h} instead of
+@code{unistd.h}:
+Cygwin 1.7.1.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
This variable is missing on some platforms:
-IRIX 6.5, OSF/1 5.1, Cygwin, mingw.
+IRIX 6.5, OSF/1 5.1, mingw.
@item
The address of this variable is not a compile-time constant on some platforms:
Cygwin, mingw.
@item
Some systems mistakenly succeed on @code{unlinkat(fd,"file/",flag)}:
GNU/Hurd, Solaris 9.
+@item
+Some platforms declare this function in @code{fcntl.h} instead of
+@code{unistd.h}:
+Cygwin 1.7.1.
@end itemize
Portability problems not fixed by Gnulib:
MacOS X 10.3, FreeBSD 6.0, NetBSD 1.6, OpenBSD 3.8, OSF/1 5.1.
@item
On some platforms, this function does not fail with @samp{EINVAL} when
-passed a null pointer, an empty string, or a string containing @samp{=}:
+passed an empty string or a string containing @samp{=}:
FreeBSD 6.0, NetBSD 1.6, OpenBSD 3.8.
@item
This function removes only the first value association for the given
Portability problems not fixed by Gnulib:
@itemize
+@item
+Older versions of POSIX required that @code{unsetenv(NULL)} gracefully
+fail with @code{EINVAL}, but not all implementations guarantee this,
+and the requirement was removed.
@end itemize
@code{ENOSYS} on some platforms:
Linux kernel 2.6.21.
@item
+This function fails with @code{ENOSYS} if passed the flag
+@code{AT_SYMLINK_NOFOLLOW} on a regular file:
+Linux kernel 2.6.22.
+@item
When using @code{UTIME_OMIT} or @code{UTIME_NOW}, some systems require
the @code{tv_sec} argument to be 0, and don't necessarily handle all
file permissions in the manner required by POSIX:
Linux kernel 2.6.25.
+@item
+When using @code{UTIME_OMIT} for the modification time, but specifying
+an access time, some systems fail to update the change time:
+Linux kernel 2.6.32.
@end itemize
Portability problems not fixed by Gnulib:
on some platforms but not on others.
@item
-@samp{FD_CLOEXEC} is not defined on some platforms:
+@samp{FD_CLOEXEC}, @samp{F_DUPFD}, and @samp{F_GETFD} are not defined
+on some platforms:
mingw.
@item
+@samp{F_DUPFD_CLOEXEC} is not defined on some platforms:
+MacOS X 10.3, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, AIX 5.1, HP-UX 11,
+IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.7.1, mingw, Interix 3.5,
+BeOS.
+
+@item
@samp{AT_FDCWD}, @samp{AT_EACCESS}, @samp{AT_SYMLINK_NOFOLLOW},
@samp{AT_SYMLINK_FOLLOW}, and @samp{AT_REMOVEDIR}
are not defined on many platforms:
on some platforms.
@item
-@samp{F_DUPFD}, @samp{F_DUPFD_CLOEXEC}, @samp{F_GETFD}, and
-@samp{F_SETFD} are not defined on some platforms:
-mingw
-
-@item
-@samp{F_GETFL}, @samp{F_SETFL}, @samp{F_GETLK}, @samp{F_SETLK},
-@samp{F_SETLOKW}, @samp{F_GETOWN}, and @samp{F_SETOWN} are not defined
-on some platforms.
+@samp{F_SETFD}, @samp{F_GETFL}, @samp{F_SETFL}, @samp{F_GETLK},
+@samp{F_SETLK}, @samp{F_SETLOKW}, @samp{F_GETOWN}, and @samp{F_SETOWN}
+are not defined on some platforms:
+mingw.
@item
@samp{POSIX_FADV_DONTNEED}, @samp{POSIX_FADV_NOREUSE},
POSIX specification: @url{http://www.opengroup.org/susv3xbd/langinfo.h.html}
-Gnulib module: ---
+Gnulib module: langinfo
Portability problems fixed by Gnulib:
@itemize
+@item
+This header file is missing on some platforms:
+mingw, BeOS.
+@item
+The constant @code{CODESET} is not defined on some platforms:
+glibc 2.0.6, OpenBSD 3.8.
+@item
+The constants @code{ERA}, @code{ERA_D_FMT}, @code{ERA_D_T_FMT},
+@code{ERA_T_FMT}, @code{ALT_DIGITS} are not defined on some platforms:
+OpenBSD 3.8.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
-@item
-This header file is missing on some platforms:
-mingw, BeOS.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
+@item
+This header file leads to link errors and endless recursions or endless loops
+on some platforms:
+glibc version 2.5 or older, together with gcc version 4.3 or newer and the
+option @samp{-std=c99} or @samp{-std=gnu99}.
@end itemize
@node Quoting
@section Quoting
-@c Copyright (C) 2005 Free Software Foundation, Inc.
+@c Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc.
@c Permission is granted to copy, distribute and/or modify this document
@c under the terms of the GNU Free Documentation License, Version 1.3 or
-@c Copyright (C) 1994, 1996, 1998, 2000, 2001, 2003, 2004, 2005, 2006, 2007
-@c Free Software Foundation, Inc.
+@c Copyright (C) 1994, 1996, 1998, 2000, 2001, 2003, 2004, 2005, 2006, 2007,
+@c 2009, 2010 Free Software Foundation, Inc.
@c
@c Permission is granted to copy, distribute and/or modify this document
@c under the terms of the GNU Free Documentation License, Version 1.3 or
-----
-Copyright (C) 2003, 2005, 2006 Free Software Foundation, Inc.
+Copyright (C) 2003, 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
@setfilename standards.info
@settitle GNU Coding Standards
@c This date is automagically updated when you save this file:
-@set lastupdate November 20, 2009
+@set lastupdate December 11, 2009
@c %**end of header
@dircategory GNU organization
distribution. So if you do distribute non-source files, always make
sure they are up to date when you make a new distribution.
-Make sure that the directory into which the distribution unpacks (as
-well as any subdirectories) are all world-writable (octal mode 777).
-This is so that old versions of @code{tar} which preserve the
-ownership and permissions of the files from the tar archive will be
-able to extract all the files even if the user is unprivileged.
-
-Make sure that all the files in the distribution are world-readable.
+Make sure that all the files in the distribution are world-readable, and
+that directories are world-readable and world-searchable (octal mode 755).
+We used to recommend that all directories in the distribution also be
+world-writable (octal mode 777), because ancient versions of @code{tar}
+would otherwise not cope when extracting the archive as an unprivileged
+user. That can easily lead to security issues when creating the archive,
+however, so now we recommend against that.
Don't include any symbolic links in the distribution itself. If the tar
file contains symbolic links, then people cannot even unpack it on
@c GNU verify module documentation
-@c Copyright (C) 2006 Free Software Foundation, Inc.
+@c Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
@c Permission is granted to copy, distribute and/or modify this document
@c under the terms of the GNU Free Documentation License, Version 1.3
#! /bin/sh
#
-# Copyright (C) 2002-2009 Free Software Foundation, Inc.
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
gnulib-tool --extract-description module
gnulib-tool --extract-status module
gnulib-tool --extract-notice module
+ gnulib-tool --extract-applicability module
gnulib-tool --extract-filelist module
gnulib-tool --extract-dependencies module
gnulib-tool --extract-autoconf-snippet module
s/^Description:[ ]*$//
s/^Status:[ ]*$//
s/^Notice:[ ]*$//
+ s/^Applicability:[ ]*$//
s/^Files:[ ]*$//
s/^Depends-on:[ ]*$//
s/^configure\.ac-early:[ ]*$//
sed -n -e "/^Notice$sed_extract_prog" < "$lookedup_file"
}
+# func_get_applicability module
+# Input:
+# - local_gnulib_dir from --local-dir
+# The expected result (on stdout) is either 'main', or 'tests', or 'all'.
+func_get_applicability ()
+{
+ func_lookup_file "modules/$1"
+ { sed -n -e "/^Applicability$sed_extract_prog" < "$lookedup_file"
+ # The default is 'main' or 'tests', depending on the module's name.
+ case "$1" in
+ *-tests) echo "tests";;
+ *) echo "main";;
+ esac
+ } | sed -e 's,^ *$,,' | sed -e 1q
+}
+
# func_get_filelist module
# Input:
# - local_gnulib_dir from --local-dir
# is specified, it will consist only of LGPLed source.
# The tests-related module list is the transitive closure of the specified
# modules, including tests modules, minus the main module list excluding
- # 'link-warning'. Its lib/* sources (brought in through dependencies of
- # *-tests modules) go into $testsbase/. It may contain GPLed source, even if
- # --lgpl is specified.
+ # modules of applicability 'all'. Its lib/* sources (brought in through
+ # dependencies of *-tests modules) go into $testsbase/. It may contain GPLed
+ # source, even if --lgpl is specified.
# Determine main module list.
saved_inctests="$inctests"
inctests=""
fi
# Determine tests-related module list.
echo "$final_modules" | LC_ALL=C sort -u > "$tmp"/final-modules
- sed_remove_link_warning='/^link-warning$/d'
- testsrelated_modules=`func_reset_sigpipe; echo "$main_modules" | LC_ALL=C sort -u | sed -e "$sed_remove_link_warning" | LC_ALL=C join -v 2 - "$tmp"/final-modules`
+ testsrelated_modules=`func_reset_sigpipe
+ for module in $main_modules; do
+ if test \`func_get_applicability $module\` = main; then
+ echo $module
+ fi
+ done \
+ | LC_ALL=C sort -u | LC_ALL=C join -v 2 - "$tmp"/final-modules`
if test $verbose -ge 1; then
echo "Tests-related module list:"
echo "$testsrelated_modules" | sed -e 's/^/ /'
done
;;
+ extract-applicability )
+ for module
+ do
+ func_verify_module
+ if test -n "$module"; then
+ func_get_applicability "$module"
+ fi
+ done
+ ;;
+
extract-filelist )
for module
do
/* accept.c --- wrappers for Windows accept function
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Accept a connection on a socket, with specific opening flags.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Internal implementation of access control lists.
- Copyright (C) 2002-2003, 2005-2009 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* acl.c - access control lists
- Copyright (C) 2002, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Return the number of entries in an ACL.
- Copyright (C) 2002-2003, 2005-2009 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Determine alignment of types.
- Copyright (C) 2003-2004, 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2003-2004, 2006, 2009-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Memory allocation on the stack.
- Copyright (C) 1995, 1999, 2001-2004, 2006-2008 Free Software
- Foundation, Inc.
+ Copyright (C) 1995, 1999, 2001-2004, 2006-2010 Free Software Foundation,
+ Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
-/* Copyright (C) 1992, 1997, 1998, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1997, 1998, 2009, 2010 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
/* arcfour.c --- The arcfour stream cipher
- * Copyright (C) 2000, 2001, 2002, 2003, 2005, 2006 Free Software
+ * Copyright (C) 2000, 2001, 2002, 2003, 2005, 2006, 2009, 2010 Free Software
* Foundation, Inc.
*
* This file is free software; you can redistribute it and/or modify
/* arcfour.h --- The arcfour stream cipher
- * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005
- * Free Software Foundation, Inc.
+ * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2009, 2010 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
/* arctwo.c --- The RC2 cipher as described in RFC 2268.
- * Copyright (C) 2003, 2004, 2005, 2006, 2008 Free Software Foundation, Inc.
+ * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010 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
/* arctwo.h --- The arctwo block cipher
- * Copyright (C) 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+ * Copyright (C) 2000, 2001, 2002, 2003, 2005, 2009, 2010 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
/* readlink wrapper to return the link name in malloc'd storage.
Unlike xreadlink and xreadlink_with_size, don't ever call exit.
- Copyright (C) 2001, 2003-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* areadlink.c -- readlink wrapper to return the link name in malloc'd storage
Unlike xreadlink and xreadlink_with_size, don't ever call exit.
- Copyright (C) 2001, 2003-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Read symbolic links without size limitation.
- Copyright (C) 2001, 2003, 2004, 2007, 2009 Free Software
- Foundation, Inc.
+ Copyright (C) 2001, 2003-2004, 2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* readlinkat wrapper to return the link name in malloc'd storage.
Unlike xreadlinkat, only call exit on failure to change directory.
- Copyright (C) 2001, 2003-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* areadlinkat.c -- readlinkat wrapper to return malloc'd link name
Unlike xreadlinkat, only call exit on failure to change directory.
- Copyright (C) 2001, 2003-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* argmatch.c -- find a match for a string in an array
- Copyright (C) 1990, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007
- Free Software Foundation, Inc.
+ Copyright (C) 1990, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+ 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* argmatch.h -- definitions and prototypes for argmatch.c
- Copyright (C) 1990, 1998, 1999, 2001, 2002, 2004, 2005 Free Software
- Foundation, Inc.
+ Copyright (C) 1990, 1998, 1999, 2001, 2002, 2004, 2005, 2009, 2010 Free
+ Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Default definition for ARGP_PROGRAM_BUG_ADDRESS.
- Copyright (C) 1996, 1997, 1999, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1999, 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
/* Default definition for ARGP_ERR_EXIT_STATUS
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
/* Word-wrapping and line-truncating streams
- Copyright (C) 1997-1999,2001,2002,2003,2005 Free Software Foundation, Inc.
+ Copyright (C) 1997-1999, 2001-2003, 2005, 2009-2010 Free Software
+ Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
/* Word-wrapping and line-truncating streams.
- Copyright (C) 1997, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2006-2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
/* Real definitions for extern inline functions in argp-fmtstream.h
- Copyright (C) 1997, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2003, 2004, 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
/* Hierarchial argument parsing help output
- Copyright (C) 1995-2005, 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1995-2005, 2007, 2009-2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
/* Name frobnication for compiling argp outside of glibc
- Copyright (C) 1997, 2003, 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2003, 2007, 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
/* Hierarchial argument parsing, layered over getopt
- Copyright (C) 1995-2000, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1995-2000, 2002-2004, 2009-2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
/* Full and short program names for argp module
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Default definition for ARGP_PROGRAM_VERSION.
- Copyright (C) 1996, 1997, 1999, 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1999, 2006, 2009, 2010 Free Software Foundation,
+ Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
/* Default definition for ARGP_PROGRAM_VERSION_HOOK.
- Copyright (C) 1996, 1997, 1999, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1999, 2004, 2009, 2010 Free Software Foundation,
+ Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
/* Version hook for Argp.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Version hook for Argp.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Real definitions for extern inline functions in argp.h
- Copyright (C) 1997, 1998, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2004, 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
/* Hierarchial argument parsing, layered over getopt.
- Copyright (C) 1995-1999,2003-2008 Free Software Foundation, Inc.
+ Copyright (C) 1995-1999, 2003-2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
/* Iterate over arguments from argv or --files0-from=FILE
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Iterate over arguments from argv or --files0-from=FILE
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdio.h>
#include <stdbool.h>
+/* Definition of _GL_ARG_NONNULL. */
+#include "arg-nonnull.h"
+
struct argv_iterator;
enum argv_iter_err;
-#undef _ATTRIBUTE_NONNULL_
-#if __GNUC__ == 3 && __GNUC_MINOR__ >= 3 || 3 < __GNUC__
-# define _ATTRIBUTE_NONNULL_(m) __attribute__ ((__nonnull__ (m)))
-#else
-# define _ATTRIBUTE_NONNULL_(m)
-#endif
-
enum argv_iter_err
{
AI_ERR_OK = 1,
};
struct argv_iterator *argv_iter_init_argv (char **argv)
- _ATTRIBUTE_NONNULL_ (1);
+ _GL_ARG_NONNULL ((1));
struct argv_iterator *argv_iter_init_stream (FILE *fp)
- _ATTRIBUTE_NONNULL_ (1);
+ _GL_ARG_NONNULL ((1));
char *argv_iter (struct argv_iterator *, enum argv_iter_err *)
- _ATTRIBUTE_NONNULL_ (1) _ATTRIBUTE_NONNULL_ (2);
+ _GL_ARG_NONNULL ((1, 2));
size_t argv_iter_n_args (struct argv_iterator const *)
- _ATTRIBUTE_NONNULL_ (1);
+ _GL_ARG_NONNULL ((1));
void argv_iter_free (struct argv_iterator *)
- _ATTRIBUTE_NONNULL_ (1);
+ _GL_ARG_NONNULL ((1));
/* Functions for dealing with '\0' separated arg vectors.
- Copyright (C) 1995-1998, 2000-2002, 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000-2002, 2006, 2008-2010 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
/* Routines for dealing with '\0' separated arg vectors.
- Copyright (C) 1995,96,97,98,99,2000,2004,2007 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2004, 2007, 2009, 2010
+ 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 <arpa/inet.h>.
- Copyright (C) 2005-2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2008-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#ifndef _GL_ARPA_INET_H
/* Gnulib's sys/socket.h is responsible for pulling in winsock2.h etc
- under MinGW. */
-#include <sys/socket.h>
+ under MinGW.
+ But avoid namespace pollution on glibc systems. */
+#ifndef __GLIBC__
+# include <sys/socket.h>
+#endif
#if @HAVE_ARPA_INET_H@
/* The definition of GL_LINK_WARNING is copied here. */
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
#ifdef __cplusplus
extern "C" {
#endif
For more details, see the POSIX:2001 specification
<http://www.opengroup.org/susv3xsh/inet_ntop.html>. */
extern const char *inet_ntop (int af, const void *restrict src,
- char *restrict dst, socklen_t cnt);
+ char *restrict dst, socklen_t cnt)
+ _GL_ARG_NONNULL ((2, 3));
# endif
#elif defined GNULIB_POSIXCHECK
# undef inet_ntop
#if @GNULIB_INET_PTON@
# if !@HAVE_DECL_INET_PTON@
-extern int inet_pton (int af, const char *restrict src, void *restrict dst);
+extern int inet_pton (int af, const char *restrict src, void *restrict dst)
+ _GL_ARG_NONNULL ((2, 3));
# endif
#elif defined GNULIB_POSIXCHECK
# undef inet_pton
/* Stable-sorting of an array using mergesort.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 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
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Define an at-style functions like fstatat, unlinkat, fchownat, etc.
- Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Define an at-style functions like linkat or renameat.
- Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-/* Copyright (C) 1991, 1997, 1998, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1997, 1998, 2008, 2009, 2010 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
/* backupfile.c -- make Emacs style backup file names
- Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 Free Software
- Foundation, Inc.
+ Copyright (C) 1990-2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* backupfile.h -- declarations for making Emacs style backup file names
- Copyright (C) 1990, 1991, 1992, 1997, 1998, 1999, 2003, 2004 Free
- Software Foundation, Inc.
+ Copyright (C) 1990-1992, 1997-1999, 2003-2004, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* base64.c -- Encode binary data using printable characters.
- Copyright (C) 1999, 2000, 2001, 2004, 2005, 2006 Free Software
+ Copyright (C) 1999, 2000, 2001, 2004, 2005, 2006, 2009, 2010 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
/* base64.h -- Encode binary data using printable characters.
- Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
Written by Simon Josefsson.
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, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
- 2009 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* basename.c -- return the last element in a file name
- Copyright (C) 1990, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
- 2009 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Binary mode I/O.
- Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2005, 2008, 2009, 2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# undef O_BINARY
# undef O_TEXT
#endif
+
+/* SET_BINARY (fd);
+ changes the file descriptor fd to perform binary I/O. */
#if O_BINARY
# if defined __EMX__ || defined __DJGPP__ || defined __CYGWIN__
# include <io.h> /* declares setmode() */
# endif
# ifdef __DJGPP__
# include <unistd.h> /* declares isatty() */
-# /* Avoid putting stdin/stdout in binary mode if it is connected to the
-# console, because that would make it impossible for the user to
-# interrupt the program through Ctrl-C or Ctrl-Break. */
-# define SET_BINARY(fd) (!isatty (fd) ? (setmode (fd, O_BINARY), 0) : 0)
+ /* Avoid putting stdin/stdout in binary mode if it is connected to
+ the console, because that would make it impossible for the user
+ to interrupt the program through Ctrl-C or Ctrl-Break. */
+# define SET_BINARY(fd) ((void) (!isatty (fd) ? (setmode (fd, O_BINARY), 0) : 0))
# else
-# define SET_BINARY(fd) setmode (fd, O_BINARY)
+# define SET_BINARY(fd) ((void) setmode (fd, O_BINARY))
# endif
#else
/* On reasonable systems, binary I/O is the default. */
# undef O_BINARY
# define O_BINARY 0
-# define SET_BINARY(fd) /* nothing */
+# define SET_BINARY(fd) /* do nothing */ ((void) 0)
#endif
#endif /* _BINARY_H */
/* bind.c --- wrappers for Windows bind function
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* bitrotate.h - Rotate bits in integers
- Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Convert unibyte character to wide character.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
/* byteswap.h - Byte swapping
- Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
Written by Oskar Liljeblad <oskar@osk.mine.nu>, 2005.
This program is free software: you can redistribute it and/or modify
/* Character handling in C locale.
- Copyright 2000-2003, 2006 Free Software Foundation, Inc.
+ Copyright 2000-2003, 2006, 2009-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
<ctype.h> functions' behaviour depends on the current locale set via
setlocale.
- Copyright (C) 2000-2003, 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2000-2003, 2006, 2008-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Stack overflow handling.
- Copyright (C) 2002, 2004, 2006, 2008, 2009 Free Software
- Foundation, Inc.
+ Copyright (C) 2002, 2004, 2006, 2008, 2009, 2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Stack overflow handling.
- Copyright (C) 2002, 2004, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Case-insensitive string comparison functions in C locale.
- Copyright (C) 1995-1996, 2001, 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* c-strcasecmp.c -- case insensitive string comparator in C locale
- Copyright (C) 1998-1999, 2005-2006 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2005-2006, 2009-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Optimized case-insensitive string comparison in C locale.
- Copyright (C) 2001-2002, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* c-strcasestr.c -- case insensitive substring search in C locale
- Copyright (C) 2005-2008 Free Software Foundation, Inc.
+ Copyright (C) 2005-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2005.
This program is free software: you can redistribute it and/or modify
/* Case-insensitive searching in a string in C locale.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* c-strncasecmp.c -- case insensitive string comparator in C locale
- Copyright (C) 1998-1999, 2005-2006 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2005-2006, 2009-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* c-strstr.c -- substring search in C locale
- Copyright (C) 2005-2008 Free Software Foundation, Inc.
+ Copyright (C) 2005-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2005, 2007.
This program is free software: you can redistribute it and/or modify
/* Searching in a string.
- Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Convert string to double, using the C locale.
- Copyright (C) 2003, 2004, 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2003-2004, 2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Convert string to double, using the C locale.
- Copyright (C) 2003-2004, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2003-2004, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* calloc() function that is glibc compatible.
This wrapper function is required at least on Tru64 UNIX 5.1 and mingw.
- Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2004-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Host name canonicalization
- Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2005-2010 Free Software Foundation, Inc.
Written by Derek Price <derek@ximbiot.com>.
/* Host name canonicalization
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009-2010 Free Software Foundation, Inc.
Written by Derek Price <derek@ximbiot.com>
/* Return the canonical absolute name of a given file.
- Copyright (C) 1996-2009 Free Software Foundation, Inc.
+ Copyright (C) 1996-2010 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
#if !HAVE_CANONICALIZE_FILE_NAME || !FUNC_REALPATH_WORKS || defined _LIBC
+/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
+ optimizes away the name == NULL test below. */
+#define _GL_ARG_NONNULL(params)
+
/* Specification. */
#include <stdlib.h>
/* Return the canonical absolute name of a given file.
- Copyright (C) 1996-2009 Free Software Foundation, Inc.
+ Copyright (C) 1996-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rname + 1 && *dest == '/')
dest++;
*dest = '\0';
+ if (rname_limit != dest + 1)
+ rname = xrealloc (rname, dest - rname + 1);
free (extra_buf);
if (ht)
/* Return the canonical absolute name of a given file.
- Copyright (C) 1996-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1996-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Round towards positive infinity.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Round towards positive infinity.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Round towards positive infinity.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* provide a chdir function that tries not to fail due to ENAMETOOLONG
- Copyright (C) 2004-2009 Free Software Foundation, Inc.
+ Copyright (C) 2004-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* provide a chdir function that tries not to fail due to ENAMETOOLONG
- Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2004-2005, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* much like chdir(2), but safer
- Copyright (C) 2005-2006, 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* much like chdir(2), but safer
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* check-version.h --- Check version string compatibility.
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2008 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008,
+ 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* check-version.h --- Check version string compatibility.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* provide consistent interface to chown for systems that don't interpret
an ID of -1 as meaning `don't change the corresponding ID'.
- Copyright (C) 1997, 2004-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2004-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Simple stub that always fails with ENOSYS, for mingw. */
int
-chown (const char *file _UNUSED_PARAMETER_, uid_t uid _UNUSED_PARAMETER_,
- gid_t gid _UNUSED_PARAMETER_)
+chown (const char *file _GL_UNUSED, uid_t uid _GL_UNUSED,
+ gid_t gid _GL_UNUSED)
{
errno = ENOSYS;
return -1;
/* Java CLASSPATH handling.
- Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006, 2009-2010 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
/* Java CLASSPATH handling.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2009, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2003.
This program is free software: you can redistribute it and/or modify
/* Temporary directories and temporary files with automatic cleanup.
- Copyright (C) 2001, 2003, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2006-2007, 2009-2010 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 "tmpdir.h"
#include "xalloc.h"
#include "xmalloca.h"
+#include "gl_xlist.h"
#include "gl_linkedhash_list.h"
#include "gettext.h"
#if GNULIB_FWRITEERROR
/* Temporary directories and temporary files with automatic cleanup.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009, 2010 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, 2005, 2006, 2009 Free Software
- Foundation, Inc.
+ Copyright (C) 1991, 2004-2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <fcntl.h>
#include <unistd.h>
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* Native Woe32 API. */
-# define WIN32_LEAN_AND_MEAN
-# include <windows.h>
-# include <io.h>
-#endif
-
-
/* Set the `FD_CLOEXEC' flag of DESC if VALUE is true,
or clear the flag if VALUE is false.
Return 0 on success, or -1 on error with `errno' set.
int
set_cloexec_flag (int desc, bool value)
{
-#if defined F_GETFD && defined F_SETFD
+#ifdef F_SETFD
int flags = fcntl (desc, F_GETFD, 0);
return -1;
-#else
+#else /* !F_SETFD */
/* Use dup2 to reject invalid file descriptors; the cloexec flag
will be unaffected. */
/* There is nothing we can do on this kind of platform. Punt. */
return 0;
-#endif
+#endif /* !F_SETFD */
}
int
dup_cloexec (int fd)
{
- int nfd;
-
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-
- /* Native Woe32 API. */
- HANDLE curr_process = GetCurrentProcess ();
- HANDLE old_handle = (HANDLE) _get_osfhandle (fd);
- HANDLE new_handle;
- int mode;
-
- if (old_handle == INVALID_HANDLE_VALUE
- || (mode = setmode (fd, O_BINARY)) == -1)
- {
- /* fd is closed, or is open to no handle at all.
- We cannot duplicate fd in this case, because _open_osfhandle
- fails for an INVALID_HANDLE_VALUE argument. */
- errno = EBADF;
- return -1;
- }
- setmode (fd, mode);
-
- if (!DuplicateHandle (curr_process, /* SourceProcessHandle */
- old_handle, /* SourceHandle */
- curr_process, /* TargetProcessHandle */
- (PHANDLE) &new_handle, /* TargetHandle */
- (DWORD) 0, /* DesiredAccess */
- FALSE, /* InheritHandle */
- DUPLICATE_SAME_ACCESS)) /* Options */
- {
- /* TODO: Translate GetLastError () into errno. */
- errno = EMFILE;
- return -1;
- }
-
- nfd = _open_osfhandle ((long) new_handle, mode | O_NOINHERIT);
- if (nfd < 0)
- {
- CloseHandle (new_handle);
- errno = EMFILE;
- return -1;
- }
-
-# if REPLACE_FCHDIR
- if (0 <= nfd)
- nfd = _gl_register_dup (fd, nfd);
-# endif
- return nfd;
-
-#else /* !_WIN32 */
-
- /* Unix API. */
-
-# ifdef F_DUPFD_CLOEXEC
- nfd = fcntl (fd, F_DUPFD_CLOEXEC, 0);
-# if REPLACE_FCHDIR
- if (0 <= nfd)
- nfd = _gl_register_dup (fd, nfd);
-# endif
-
-# else /* !F_DUPFD_CLOEXEC */
- nfd = dup (fd);
- if (0 <= nfd && set_cloexec_flag (nfd, true) < 0)
- {
- int saved_errno = errno;
- close (nfd);
- nfd = -1;
- errno = saved_errno;
- }
-# endif /* !F_DUPFD_CLOEXEC */
-
- return nfd;
-
-#endif /* !_WIN32 */
+ return fcntl (fd, F_DUPFD_CLOEXEC, 0);
}
/* closexec.c - set or clear the close-on-exec descriptor flag
- Copyright (C) 2004, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Hook for making the close() function extensible.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 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 the close() function extensible.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Close a stream, with nicer error checking than fclose's.
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2006, 2007, 2008 Free
- Software Foundation, Inc.
+ Copyright (C) 1998-2002, 2004, 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* close replacement.
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Close standard input, rewinding seekable stdin if necessary.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Close standard input, rewinding seekable stdin if necessary.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Close standard output and standard error, exiting with a diagnostic on error.
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2006, 2008 Free
- Software Foundation, Inc.
+ Copyright (C) 1998-2002, 2004, 2006, 2008-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Close standard output and standard error.
- Copyright (C) 1998, 2000, 2003, 2004, 2006, 2008 Free Software Foundation,
- Inc.
+ Copyright (C) 1998, 2000, 2003-2004, 2006, 2008-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Construct a full filename from a directory and a relative filename.
- Copyright (C) 2001-2004, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
/* Construct a full filename from a directory and a relative filename.
- Copyright (C) 2001-2004, 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#! /bin/sh
# Output a system dependent table of character encoding aliases.
#
-# Copyright (C) 2000-2004, 2006-2009 Free Software Foundation, Inc.
+# Copyright (C) 2000-2004, 2006-2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# List of references, updated during installation:
echo "# Packages using this file: "
case "$os" in
- linux-gnulibc1*)
- # Linux libc5 doesn't have nl_langinfo(CODESET); therefore
- # localcharset.c falls back to using the full locale name
- # from the environment variables.
- echo "C ASCII"
- echo "POSIX ASCII"
- for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \
- en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \
- en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \
- es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \
- et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \
- fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \
- it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \
- sv_FI sv_SE; do
- echo "$l ISO-8859-1"
- echo "$l.iso-8859-1 ISO-8859-1"
- echo "$l.iso-8859-15 ISO-8859-15"
- echo "$l.iso-8859-15@euro ISO-8859-15"
- echo "$l@euro ISO-8859-15"
- echo "$l.cp-437 CP437"
- echo "$l.cp-850 CP850"
- echo "$l.cp-1252 CP1252"
- echo "$l.cp-1252@euro CP1252"
- #echo "$l.atari-st ATARI-ST" # not a commonly used encoding
- echo "$l.utf-8 UTF-8"
- echo "$l.utf-8@euro UTF-8"
- done
- for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \
- sl_SI sr sr_CS sr_YU; do
- echo "$l ISO-8859-2"
- echo "$l.iso-8859-2 ISO-8859-2"
- echo "$l.cp-852 CP852"
- echo "$l.cp-1250 CP1250"
- echo "$l.utf-8 UTF-8"
- done
- for l in mk mk_MK ru ru_RU; do
- echo "$l ISO-8859-5"
- echo "$l.iso-8859-5 ISO-8859-5"
- echo "$l.koi8-r KOI8-R"
- echo "$l.cp-866 CP866"
- echo "$l.cp-1251 CP1251"
- echo "$l.utf-8 UTF-8"
- done
- for l in ar ar_SA; do
- echo "$l ISO-8859-6"
- echo "$l.iso-8859-6 ISO-8859-6"
- echo "$l.cp-864 CP864"
- #echo "$l.cp-868 CP868" # not a commonly used encoding
- echo "$l.cp-1256 CP1256"
- echo "$l.utf-8 UTF-8"
- done
- for l in el el_GR gr gr_GR; do
- echo "$l ISO-8859-7"
- echo "$l.iso-8859-7 ISO-8859-7"
- echo "$l.cp-869 CP869"
- echo "$l.cp-1253 CP1253"
- echo "$l.cp-1253@euro CP1253"
- echo "$l.utf-8 UTF-8"
- echo "$l.utf-8@euro UTF-8"
- done
- for l in he he_IL iw iw_IL; do
- echo "$l ISO-8859-8"
- echo "$l.iso-8859-8 ISO-8859-8"
- echo "$l.cp-862 CP862"
- echo "$l.cp-1255 CP1255"
- echo "$l.utf-8 UTF-8"
- done
- for l in tr tr_TR; do
- echo "$l ISO-8859-9"
- echo "$l.iso-8859-9 ISO-8859-9"
- echo "$l.cp-857 CP857"
- echo "$l.cp-1254 CP1254"
- echo "$l.utf-8 UTF-8"
- done
- for l in lt lt_LT lv lv_LV; do
- #echo "$l BALTIC" # not a commonly used encoding, wrong encoding name
- echo "$l ISO-8859-13"
- done
- for l in ru_UA uk uk_UA; do
- echo "$l KOI8-U"
- done
- for l in zh zh_CN; do
- #echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name
- echo "$l GB2312"
- done
- for l in ja ja_JP ja_JP.EUC; do
- echo "$l EUC-JP"
- done
- for l in ko ko_KR; do
- echo "$l EUC-KR"
- done
- for l in th th_TH; do
- echo "$l TIS-620"
- done
- for l in fa fa_IR; do
- #echo "$l ISIRI-3342" # a broken encoding
- echo "$l.utf-8 UTF-8"
- done
- ;;
- linux* | *-gnu*)
- # With glibc-2.1 or newer, we don't need any canonicalization,
- # because glibc has iconv and both glibc and libiconv support all
- # GNU canonical names directly. Therefore, the Makefile does not
- # need to install the alias file at all.
- # The following applies only to glibc-2.0.x and older libcs.
- echo "ISO_646.IRV:1983 ASCII"
- ;;
- aix*)
- echo "ISO8859-1 ISO-8859-1"
- echo "ISO8859-2 ISO-8859-2"
- echo "ISO8859-5 ISO-8859-5"
- echo "ISO8859-6 ISO-8859-6"
- echo "ISO8859-7 ISO-8859-7"
- echo "ISO8859-8 ISO-8859-8"
- echo "ISO8859-9 ISO-8859-9"
- echo "ISO8859-15 ISO-8859-15"
- echo "IBM-850 CP850"
- echo "IBM-856 CP856"
- echo "IBM-921 ISO-8859-13"
- echo "IBM-922 CP922"
- echo "IBM-932 CP932"
- echo "IBM-943 CP943"
- echo "IBM-1046 CP1046"
- echo "IBM-1124 CP1124"
- echo "IBM-1129 CP1129"
- echo "IBM-1252 CP1252"
- echo "IBM-eucCN GB2312"
- echo "IBM-eucJP EUC-JP"
- echo "IBM-eucKR EUC-KR"
- echo "IBM-eucTW EUC-TW"
- echo "big5 BIG5"
- echo "GBK GBK"
- echo "TIS-620 TIS-620"
- echo "UTF-8 UTF-8"
- ;;
- hpux*)
- echo "iso88591 ISO-8859-1"
- echo "iso88592 ISO-8859-2"
- echo "iso88595 ISO-8859-5"
- echo "iso88596 ISO-8859-6"
- echo "iso88597 ISO-8859-7"
- echo "iso88598 ISO-8859-8"
- echo "iso88599 ISO-8859-9"
- echo "iso885915 ISO-8859-15"
- echo "roman8 HP-ROMAN8"
- echo "arabic8 HP-ARABIC8"
- echo "greek8 HP-GREEK8"
- echo "hebrew8 HP-HEBREW8"
- echo "turkish8 HP-TURKISH8"
- echo "kana8 HP-KANA8"
- echo "tis620 TIS-620"
- echo "big5 BIG5"
- echo "eucJP EUC-JP"
- echo "eucKR EUC-KR"
- echo "eucTW EUC-TW"
- echo "hp15CN GB2312"
- #echo "ccdc ?" # what is this?
- echo "SJIS SHIFT_JIS"
- echo "utf8 UTF-8"
- ;;
- irix*)
- echo "ISO8859-1 ISO-8859-1"
- echo "ISO8859-2 ISO-8859-2"
- echo "ISO8859-5 ISO-8859-5"
- echo "ISO8859-7 ISO-8859-7"
- echo "ISO8859-9 ISO-8859-9"
- echo "eucCN GB2312"
- echo "eucJP EUC-JP"
- echo "eucKR EUC-KR"
- echo "eucTW EUC-TW"
- ;;
- osf*)
- echo "ISO8859-1 ISO-8859-1"
- echo "ISO8859-2 ISO-8859-2"
- echo "ISO8859-4 ISO-8859-4"
- echo "ISO8859-5 ISO-8859-5"
- echo "ISO8859-7 ISO-8859-7"
- echo "ISO8859-8 ISO-8859-8"
- echo "ISO8859-9 ISO-8859-9"
- echo "ISO8859-15 ISO-8859-15"
- echo "cp850 CP850"
- echo "big5 BIG5"
- echo "dechanyu DEC-HANYU"
- echo "dechanzi GB2312"
- echo "deckanji DEC-KANJI"
- echo "deckorean EUC-KR"
- echo "eucJP EUC-JP"
- echo "eucKR EUC-KR"
- echo "eucTW EUC-TW"
- echo "GBK GBK"
- echo "KSC5601 CP949"
- echo "sdeckanji EUC-JP"
- echo "SJIS SHIFT_JIS"
- echo "TACTIS TIS-620"
- echo "UTF-8 UTF-8"
- ;;
- solaris*)
- echo "646 ASCII"
- echo "ISO8859-1 ISO-8859-1"
- echo "ISO8859-2 ISO-8859-2"
- echo "ISO8859-3 ISO-8859-3"
- echo "ISO8859-4 ISO-8859-4"
- echo "ISO8859-5 ISO-8859-5"
- echo "ISO8859-6 ISO-8859-6"
- echo "ISO8859-7 ISO-8859-7"
- echo "ISO8859-8 ISO-8859-8"
- echo "ISO8859-9 ISO-8859-9"
- echo "ISO8859-15 ISO-8859-15"
- echo "koi8-r KOI8-R"
- echo "ansi-1251 CP1251"
- echo "BIG5 BIG5"
- echo "Big5-HKSCS BIG5-HKSCS"
- echo "gb2312 GB2312"
- echo "GBK GBK"
- echo "GB18030 GB18030"
- echo "cns11643 EUC-TW"
- echo "5601 EUC-KR"
- echo "ko_KR.johap92 JOHAB"
- echo "eucJP EUC-JP"
- echo "PCK SHIFT_JIS"
- echo "TIS620.2533 TIS-620"
- #echo "sun_eu_greek ?" # what is this?
- echo "UTF-8 UTF-8"
- ;;
- freebsd* | os2*)
- # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
- # localcharset.c falls back to using the full locale name
- # from the environment variables.
- # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just
- # reuse FreeBSD's locale data for OS/2.
- echo "C ASCII"
- echo "US-ASCII ASCII"
- for l in la_LN lt_LN; do
- echo "$l.ASCII ASCII"
- done
- for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
- fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
- lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
- echo "$l.ISO_8859-1 ISO-8859-1"
- echo "$l.DIS_8859-15 ISO-8859-15"
- done
- for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do
- echo "$l.ISO_8859-2 ISO-8859-2"
- done
- for l in la_LN lt_LT; do
- echo "$l.ISO_8859-4 ISO-8859-4"
- done
- for l in ru_RU ru_SU; do
- echo "$l.KOI8-R KOI8-R"
- echo "$l.ISO_8859-5 ISO-8859-5"
- echo "$l.CP866 CP866"
- done
- echo "uk_UA.KOI8-U KOI8-U"
- echo "zh_TW.BIG5 BIG5"
- echo "zh_TW.Big5 BIG5"
- echo "zh_CN.EUC GB2312"
- echo "ja_JP.EUC EUC-JP"
- echo "ja_JP.SJIS SHIFT_JIS"
- echo "ja_JP.Shift_JIS SHIFT_JIS"
- echo "ko_KR.EUC EUC-KR"
- ;;
- netbsd*)
- echo "646 ASCII"
- echo "ISO8859-1 ISO-8859-1"
- echo "ISO8859-2 ISO-8859-2"
- echo "ISO8859-4 ISO-8859-4"
- echo "ISO8859-5 ISO-8859-5"
- echo "ISO8859-7 ISO-8859-7"
- echo "ISO8859-13 ISO-8859-13"
- echo "ISO8859-15 ISO-8859-15"
- echo "eucCN GB2312"
- echo "eucJP EUC-JP"
- echo "eucKR EUC-KR"
- echo "eucTW EUC-TW"
- echo "BIG5 BIG5"
- echo "SJIS SHIFT_JIS"
- ;;
- openbsd*)
- echo "646 ASCII"
- echo "ISO8859-1 ISO-8859-1"
- echo "ISO8859-2 ISO-8859-2"
- echo "ISO8859-4 ISO-8859-4"
- echo "ISO8859-5 ISO-8859-5"
- echo "ISO8859-7 ISO-8859-7"
- echo "ISO8859-13 ISO-8859-13"
- echo "ISO8859-15 ISO-8859-15"
- ;;
- darwin[56]*)
- # Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore
- # localcharset.c falls back to using the full locale name
- # from the environment variables.
- echo "C ASCII"
- for l in en_AU en_CA en_GB en_US la_LN; do
- echo "$l.US-ASCII ASCII"
- done
- for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
- fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \
- nl_NL no_NO pt_PT sv_SE; do
- echo "$l ISO-8859-1"
- echo "$l.ISO8859-1 ISO-8859-1"
- echo "$l.ISO8859-15 ISO-8859-15"
- done
- for l in la_LN; do
- echo "$l.ISO8859-1 ISO-8859-1"
- echo "$l.ISO8859-15 ISO-8859-15"
- done
- for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do
- echo "$l.ISO8859-2 ISO-8859-2"
- done
- for l in la_LN lt_LT; do
- echo "$l.ISO8859-4 ISO-8859-4"
- done
- for l in ru_RU; do
- echo "$l.KOI8-R KOI8-R"
- echo "$l.ISO8859-5 ISO-8859-5"
- echo "$l.CP866 CP866"
- done
- for l in bg_BG; do
- echo "$l.CP1251 CP1251"
- done
- echo "uk_UA.KOI8-U KOI8-U"
- echo "zh_TW.BIG5 BIG5"
- echo "zh_TW.Big5 BIG5"
- echo "zh_CN.EUC GB2312"
- echo "ja_JP.EUC EUC-JP"
- echo "ja_JP.SJIS SHIFT_JIS"
- echo "ko_KR.EUC EUC-KR"
- ;;
- darwin*)
- # Darwin 7.5 has nl_langinfo(CODESET), but sometimes its value is
- # useless:
- # - It returns the empty string when LANG is set to a locale of the
- # form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8
- # LC_CTYPE file.
- # - The environment variables LANG, LC_CTYPE, LC_ALL are not set by
- # the system; nl_langinfo(CODESET) returns "US-ASCII" in this case.
- # - The documentation says:
- # "... all code that calls BSD system routines should ensure
- # that the const *char parameters of these routines are in UTF-8
- # encoding. All BSD system functions expect their string
- # parameters to be in UTF-8 encoding and nothing else."
- # It also says
- # "An additional caveat is that string parameters for files,
- # paths, and other file-system entities must be in canonical
- # UTF-8. In a canonical UTF-8 Unicode string, all decomposable
- # characters are decomposed ..."
- # but this is not true: You can pass non-decomposed UTF-8 strings
- # to file system functions, and it is the OS which will convert
- # them to decomposed UTF-8 before accessing the file system.
- # - The Apple Terminal application displays UTF-8 by default.
- # - However, other applications are free to use different encodings:
- # - xterm uses ISO-8859-1 by default.
- # - TextEdit uses MacRoman by default.
- # We prefer UTF-8 over decomposed UTF-8-MAC because one should
- # minimize the use of decomposed Unicode. Unfortunately, through the
- # Darwin file system, decomposed UTF-8 strings are leaked into user
- # space nevertheless.
- # Then there are also the locales with encodings other than US-ASCII
- # and UTF-8. These locales can be occasionally useful to users (e.g.
- # when grepping through ISO-8859-1 encoded text files), when all their
- # file names are in US-ASCII.
- echo "ISO8859-1 ISO-8859-1"
- echo "ISO8859-2 ISO-8859-2"
- echo "ISO8859-4 ISO-8859-4"
- echo "ISO8859-5 ISO-8859-5"
- echo "ISO8859-7 ISO-8859-7"
- echo "ISO8859-9 ISO-8859-9"
- echo "ISO8859-13 ISO-8859-13"
- echo "ISO8859-15 ISO-8859-15"
- echo "KOI8-R KOI8-R"
- echo "KOI8-U KOI8-U"
- echo "CP866 CP866"
- echo "CP949 CP949"
- echo "CP1131 CP1131"
- echo "CP1251 CP1251"
- echo "eucCN GB2312"
- echo "GB2312 GB2312"
- echo "eucJP EUC-JP"
- echo "eucKR EUC-KR"
- echo "Big5 BIG5"
- echo "Big5HKSCS BIG5-HKSCS"
- echo "GBK GBK"
- echo "GB18030 GB18030"
- echo "SJIS SHIFT_JIS"
- echo "ARMSCII-8 ARMSCII-8"
- echo "PT154 PT154"
- #echo "ISCII-DEV ?"
- echo "* UTF-8"
- ;;
- beos* | haiku*)
- # BeOS and Haiku have a single locale, and it has UTF-8 encoding.
- echo "* UTF-8"
- ;;
- msdosdjgpp*)
- # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore
- # localcharset.c falls back to using the full locale name
- # from the environment variables.
- echo "#"
- echo "# The encodings given here may not all be correct."
- echo "# If you find that the encoding given for your language and"
- echo "# country is not the one your DOS machine actually uses, just"
- echo "# correct it in this file, and send a mail to"
- echo "# Juan Manuel Guerrero <juan.guerrero@gmx.de>"
- echo "# and Bruno Haible <bruno@clisp.org>."
- echo "#"
- echo "C ASCII"
- # ISO-8859-1 languages
- echo "ca CP850"
- echo "ca_ES CP850"
- echo "da CP865" # not CP850 ??
- echo "da_DK CP865" # not CP850 ??
- echo "de CP850"
- echo "de_AT CP850"
- echo "de_CH CP850"
- echo "de_DE CP850"
- echo "en CP850"
- echo "en_AU CP850" # not CP437 ??
- echo "en_CA CP850"
- echo "en_GB CP850"
- echo "en_NZ CP437"
- echo "en_US CP437"
- echo "en_ZA CP850" # not CP437 ??
- echo "es CP850"
- echo "es_AR CP850"
- echo "es_BO CP850"
- echo "es_CL CP850"
- echo "es_CO CP850"
- echo "es_CR CP850"
- echo "es_CU CP850"
- echo "es_DO CP850"
- echo "es_EC CP850"
- echo "es_ES CP850"
- echo "es_GT CP850"
- echo "es_HN CP850"
- echo "es_MX CP850"
- echo "es_NI CP850"
- echo "es_PA CP850"
- echo "es_PY CP850"
- echo "es_PE CP850"
- echo "es_SV CP850"
- echo "es_UY CP850"
- echo "es_VE CP850"
- echo "et CP850"
- echo "et_EE CP850"
- echo "eu CP850"
- echo "eu_ES CP850"
- echo "fi CP850"
- echo "fi_FI CP850"
- echo "fr CP850"
- echo "fr_BE CP850"
- echo "fr_CA CP850"
- echo "fr_CH CP850"
- echo "fr_FR CP850"
- echo "ga CP850"
- echo "ga_IE CP850"
- echo "gd CP850"
- echo "gd_GB CP850"
- echo "gl CP850"
- echo "gl_ES CP850"
- echo "id CP850" # not CP437 ??
- echo "id_ID CP850" # not CP437 ??
- echo "is CP861" # not CP850 ??
- echo "is_IS CP861" # not CP850 ??
- echo "it CP850"
- echo "it_CH CP850"
- echo "it_IT CP850"
- echo "lt CP775"
- echo "lt_LT CP775"
- echo "lv CP775"
- echo "lv_LV CP775"
- echo "nb CP865" # not CP850 ??
- echo "nb_NO CP865" # not CP850 ??
- echo "nl CP850"
- echo "nl_BE CP850"
- echo "nl_NL CP850"
- echo "nn CP865" # not CP850 ??
- echo "nn_NO CP865" # not CP850 ??
- echo "no CP865" # not CP850 ??
- echo "no_NO CP865" # not CP850 ??
- echo "pt CP850"
- echo "pt_BR CP850"
- echo "pt_PT CP850"
- echo "sv CP850"
- echo "sv_SE CP850"
- # ISO-8859-2 languages
- echo "cs CP852"
- echo "cs_CZ CP852"
- echo "hr CP852"
- echo "hr_HR CP852"
- echo "hu CP852"
- echo "hu_HU CP852"
- echo "pl CP852"
- echo "pl_PL CP852"
- echo "ro CP852"
- echo "ro_RO CP852"
- echo "sk CP852"
- echo "sk_SK CP852"
- echo "sl CP852"
- echo "sl_SI CP852"
- echo "sq CP852"
- echo "sq_AL CP852"
- echo "sr CP852" # CP852 or CP866 or CP855 ??
- echo "sr_CS CP852" # CP852 or CP866 or CP855 ??
- echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
- # ISO-8859-3 languages
- echo "mt CP850"
- echo "mt_MT CP850"
- # ISO-8859-5 languages
- echo "be CP866"
- echo "be_BE CP866"
- echo "bg CP866" # not CP855 ??
- echo "bg_BG CP866" # not CP855 ??
- echo "mk CP866" # not CP855 ??
- echo "mk_MK CP866" # not CP855 ??
- echo "ru CP866"
- echo "ru_RU CP866"
- echo "uk CP1125"
- echo "uk_UA CP1125"
- # ISO-8859-6 languages
- echo "ar CP864"
- echo "ar_AE CP864"
- echo "ar_DZ CP864"
- echo "ar_EG CP864"
- echo "ar_IQ CP864"
- echo "ar_IR CP864"
- echo "ar_JO CP864"
- echo "ar_KW CP864"
- echo "ar_MA CP864"
- echo "ar_OM CP864"
- echo "ar_QA CP864"
- echo "ar_SA CP864"
- echo "ar_SY CP864"
- # ISO-8859-7 languages
- echo "el CP869"
- echo "el_GR CP869"
- # ISO-8859-8 languages
- echo "he CP862"
- echo "he_IL CP862"
- # ISO-8859-9 languages
- echo "tr CP857"
- echo "tr_TR CP857"
- # Japanese
- echo "ja CP932"
- echo "ja_JP CP932"
- # Chinese
- echo "zh_CN GBK"
- echo "zh_TW CP950" # not CP938 ??
- # Korean
- echo "kr CP949" # not CP934 ??
- echo "kr_KR CP949" # not CP934 ??
- # Thai
- echo "th CP874"
- echo "th_TH CP874"
- # Other
- echo "eo CP850"
- echo "eo_EO CP850"
- ;;
+ linux-gnulibc1*)
+ # Linux libc5 doesn't have nl_langinfo(CODESET); therefore
+ # localcharset.c falls back to using the full locale name
+ # from the environment variables.
+ echo "C ASCII"
+ echo "POSIX ASCII"
+ for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \
+ en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \
+ en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \
+ es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \
+ et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \
+ fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \
+ it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \
+ sv_FI sv_SE; do
+ echo "$l ISO-8859-1"
+ echo "$l.iso-8859-1 ISO-8859-1"
+ echo "$l.iso-8859-15 ISO-8859-15"
+ echo "$l.iso-8859-15@euro ISO-8859-15"
+ echo "$l@euro ISO-8859-15"
+ echo "$l.cp-437 CP437"
+ echo "$l.cp-850 CP850"
+ echo "$l.cp-1252 CP1252"
+ echo "$l.cp-1252@euro CP1252"
+ #echo "$l.atari-st ATARI-ST" # not a commonly used encoding
+ echo "$l.utf-8 UTF-8"
+ echo "$l.utf-8@euro UTF-8"
+ done
+ for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \
+ sl_SI sr sr_CS sr_YU; do
+ echo "$l ISO-8859-2"
+ echo "$l.iso-8859-2 ISO-8859-2"
+ echo "$l.cp-852 CP852"
+ echo "$l.cp-1250 CP1250"
+ echo "$l.utf-8 UTF-8"
+ done
+ for l in mk mk_MK ru ru_RU; do
+ echo "$l ISO-8859-5"
+ echo "$l.iso-8859-5 ISO-8859-5"
+ echo "$l.koi8-r KOI8-R"
+ echo "$l.cp-866 CP866"
+ echo "$l.cp-1251 CP1251"
+ echo "$l.utf-8 UTF-8"
+ done
+ for l in ar ar_SA; do
+ echo "$l ISO-8859-6"
+ echo "$l.iso-8859-6 ISO-8859-6"
+ echo "$l.cp-864 CP864"
+ #echo "$l.cp-868 CP868" # not a commonly used encoding
+ echo "$l.cp-1256 CP1256"
+ echo "$l.utf-8 UTF-8"
+ done
+ for l in el el_GR gr gr_GR; do
+ echo "$l ISO-8859-7"
+ echo "$l.iso-8859-7 ISO-8859-7"
+ echo "$l.cp-869 CP869"
+ echo "$l.cp-1253 CP1253"
+ echo "$l.cp-1253@euro CP1253"
+ echo "$l.utf-8 UTF-8"
+ echo "$l.utf-8@euro UTF-8"
+ done
+ for l in he he_IL iw iw_IL; do
+ echo "$l ISO-8859-8"
+ echo "$l.iso-8859-8 ISO-8859-8"
+ echo "$l.cp-862 CP862"
+ echo "$l.cp-1255 CP1255"
+ echo "$l.utf-8 UTF-8"
+ done
+ for l in tr tr_TR; do
+ echo "$l ISO-8859-9"
+ echo "$l.iso-8859-9 ISO-8859-9"
+ echo "$l.cp-857 CP857"
+ echo "$l.cp-1254 CP1254"
+ echo "$l.utf-8 UTF-8"
+ done
+ for l in lt lt_LT lv lv_LV; do
+ #echo "$l BALTIC" # not a commonly used encoding, wrong encoding name
+ echo "$l ISO-8859-13"
+ done
+ for l in ru_UA uk uk_UA; do
+ echo "$l KOI8-U"
+ done
+ for l in zh zh_CN; do
+ #echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name
+ echo "$l GB2312"
+ done
+ for l in ja ja_JP ja_JP.EUC; do
+ echo "$l EUC-JP"
+ done
+ for l in ko ko_KR; do
+ echo "$l EUC-KR"
+ done
+ for l in th th_TH; do
+ echo "$l TIS-620"
+ done
+ for l in fa fa_IR; do
+ #echo "$l ISIRI-3342" # a broken encoding
+ echo "$l.utf-8 UTF-8"
+ done
+ ;;
+ linux* | *-gnu*)
+ # With glibc-2.1 or newer, we don't need any canonicalization,
+ # because glibc has iconv and both glibc and libiconv support all
+ # GNU canonical names directly. Therefore, the Makefile does not
+ # need to install the alias file at all.
+ # The following applies only to glibc-2.0.x and older libcs.
+ echo "ISO_646.IRV:1983 ASCII"
+ ;;
+ aix*)
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-6 ISO-8859-6"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-8 ISO-8859-8"
+ echo "ISO8859-9 ISO-8859-9"
+ echo "ISO8859-15 ISO-8859-15"
+ echo "IBM-850 CP850"
+ echo "IBM-856 CP856"
+ echo "IBM-921 ISO-8859-13"
+ echo "IBM-922 CP922"
+ echo "IBM-932 CP932"
+ echo "IBM-943 CP943"
+ echo "IBM-1046 CP1046"
+ echo "IBM-1124 CP1124"
+ echo "IBM-1129 CP1129"
+ echo "IBM-1252 CP1252"
+ echo "IBM-eucCN GB2312"
+ echo "IBM-eucJP EUC-JP"
+ echo "IBM-eucKR EUC-KR"
+ echo "IBM-eucTW EUC-TW"
+ echo "big5 BIG5"
+ echo "GBK GBK"
+ echo "TIS-620 TIS-620"
+ echo "UTF-8 UTF-8"
+ ;;
+ hpux*)
+ echo "iso88591 ISO-8859-1"
+ echo "iso88592 ISO-8859-2"
+ echo "iso88595 ISO-8859-5"
+ echo "iso88596 ISO-8859-6"
+ echo "iso88597 ISO-8859-7"
+ echo "iso88598 ISO-8859-8"
+ echo "iso88599 ISO-8859-9"
+ echo "iso885915 ISO-8859-15"
+ echo "roman8 HP-ROMAN8"
+ echo "arabic8 HP-ARABIC8"
+ echo "greek8 HP-GREEK8"
+ echo "hebrew8 HP-HEBREW8"
+ echo "turkish8 HP-TURKISH8"
+ echo "kana8 HP-KANA8"
+ echo "tis620 TIS-620"
+ echo "big5 BIG5"
+ echo "eucJP EUC-JP"
+ echo "eucKR EUC-KR"
+ echo "eucTW EUC-TW"
+ echo "hp15CN GB2312"
+ #echo "ccdc ?" # what is this?
+ echo "SJIS SHIFT_JIS"
+ echo "utf8 UTF-8"
+ ;;
+ irix*)
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-9 ISO-8859-9"
+ echo "eucCN GB2312"
+ echo "eucJP EUC-JP"
+ echo "eucKR EUC-KR"
+ echo "eucTW EUC-TW"
+ ;;
+ osf*)
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-4 ISO-8859-4"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-8 ISO-8859-8"
+ echo "ISO8859-9 ISO-8859-9"
+ echo "ISO8859-15 ISO-8859-15"
+ echo "cp850 CP850"
+ echo "big5 BIG5"
+ echo "dechanyu DEC-HANYU"
+ echo "dechanzi GB2312"
+ echo "deckanji DEC-KANJI"
+ echo "deckorean EUC-KR"
+ echo "eucJP EUC-JP"
+ echo "eucKR EUC-KR"
+ echo "eucTW EUC-TW"
+ echo "GBK GBK"
+ echo "KSC5601 CP949"
+ echo "sdeckanji EUC-JP"
+ echo "SJIS SHIFT_JIS"
+ echo "TACTIS TIS-620"
+ echo "UTF-8 UTF-8"
+ ;;
+ solaris*)
+ echo "646 ASCII"
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-3 ISO-8859-3"
+ echo "ISO8859-4 ISO-8859-4"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-6 ISO-8859-6"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-8 ISO-8859-8"
+ echo "ISO8859-9 ISO-8859-9"
+ echo "ISO8859-15 ISO-8859-15"
+ echo "koi8-r KOI8-R"
+ echo "ansi-1251 CP1251"
+ echo "BIG5 BIG5"
+ echo "Big5-HKSCS BIG5-HKSCS"
+ echo "gb2312 GB2312"
+ echo "GBK GBK"
+ echo "GB18030 GB18030"
+ echo "cns11643 EUC-TW"
+ echo "5601 EUC-KR"
+ echo "ko_KR.johap92 JOHAB"
+ echo "eucJP EUC-JP"
+ echo "PCK SHIFT_JIS"
+ echo "TIS620.2533 TIS-620"
+ #echo "sun_eu_greek ?" # what is this?
+ echo "UTF-8 UTF-8"
+ ;;
+ freebsd* | os2*)
+ # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
+ # localcharset.c falls back to using the full locale name
+ # from the environment variables.
+ # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just
+ # reuse FreeBSD's locale data for OS/2.
+ echo "C ASCII"
+ echo "US-ASCII ASCII"
+ for l in la_LN lt_LN; do
+ echo "$l.ASCII ASCII"
+ done
+ for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
+ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
+ lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
+ echo "$l.ISO_8859-1 ISO-8859-1"
+ echo "$l.DIS_8859-15 ISO-8859-15"
+ done
+ for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do
+ echo "$l.ISO_8859-2 ISO-8859-2"
+ done
+ for l in la_LN lt_LT; do
+ echo "$l.ISO_8859-4 ISO-8859-4"
+ done
+ for l in ru_RU ru_SU; do
+ echo "$l.KOI8-R KOI8-R"
+ echo "$l.ISO_8859-5 ISO-8859-5"
+ echo "$l.CP866 CP866"
+ done
+ echo "uk_UA.KOI8-U KOI8-U"
+ echo "zh_TW.BIG5 BIG5"
+ echo "zh_TW.Big5 BIG5"
+ echo "zh_CN.EUC GB2312"
+ echo "ja_JP.EUC EUC-JP"
+ echo "ja_JP.SJIS SHIFT_JIS"
+ echo "ja_JP.Shift_JIS SHIFT_JIS"
+ echo "ko_KR.EUC EUC-KR"
+ ;;
+ netbsd*)
+ echo "646 ASCII"
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-4 ISO-8859-4"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-13 ISO-8859-13"
+ echo "ISO8859-15 ISO-8859-15"
+ echo "eucCN GB2312"
+ echo "eucJP EUC-JP"
+ echo "eucKR EUC-KR"
+ echo "eucTW EUC-TW"
+ echo "BIG5 BIG5"
+ echo "SJIS SHIFT_JIS"
+ ;;
+ openbsd*)
+ echo "646 ASCII"
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-4 ISO-8859-4"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-13 ISO-8859-13"
+ echo "ISO8859-15 ISO-8859-15"
+ ;;
+ darwin[56]*)
+ # Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore
+ # localcharset.c falls back to using the full locale name
+ # from the environment variables.
+ echo "C ASCII"
+ for l in en_AU en_CA en_GB en_US la_LN; do
+ echo "$l.US-ASCII ASCII"
+ done
+ for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
+ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \
+ nl_NL no_NO pt_PT sv_SE; do
+ echo "$l ISO-8859-1"
+ echo "$l.ISO8859-1 ISO-8859-1"
+ echo "$l.ISO8859-15 ISO-8859-15"
+ done
+ for l in la_LN; do
+ echo "$l.ISO8859-1 ISO-8859-1"
+ echo "$l.ISO8859-15 ISO-8859-15"
+ done
+ for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do
+ echo "$l.ISO8859-2 ISO-8859-2"
+ done
+ for l in la_LN lt_LT; do
+ echo "$l.ISO8859-4 ISO-8859-4"
+ done
+ for l in ru_RU; do
+ echo "$l.KOI8-R KOI8-R"
+ echo "$l.ISO8859-5 ISO-8859-5"
+ echo "$l.CP866 CP866"
+ done
+ for l in bg_BG; do
+ echo "$l.CP1251 CP1251"
+ done
+ echo "uk_UA.KOI8-U KOI8-U"
+ echo "zh_TW.BIG5 BIG5"
+ echo "zh_TW.Big5 BIG5"
+ echo "zh_CN.EUC GB2312"
+ echo "ja_JP.EUC EUC-JP"
+ echo "ja_JP.SJIS SHIFT_JIS"
+ echo "ko_KR.EUC EUC-KR"
+ ;;
+ darwin*)
+ # Darwin 7.5 has nl_langinfo(CODESET), but sometimes its value is
+ # useless:
+ # - It returns the empty string when LANG is set to a locale of the
+ # form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8
+ # LC_CTYPE file.
+ # - The environment variables LANG, LC_CTYPE, LC_ALL are not set by
+ # the system; nl_langinfo(CODESET) returns "US-ASCII" in this case.
+ # - The documentation says:
+ # "... all code that calls BSD system routines should ensure
+ # that the const *char parameters of these routines are in UTF-8
+ # encoding. All BSD system functions expect their string
+ # parameters to be in UTF-8 encoding and nothing else."
+ # It also says
+ # "An additional caveat is that string parameters for files,
+ # paths, and other file-system entities must be in canonical
+ # UTF-8. In a canonical UTF-8 Unicode string, all decomposable
+ # characters are decomposed ..."
+ # but this is not true: You can pass non-decomposed UTF-8 strings
+ # to file system functions, and it is the OS which will convert
+ # them to decomposed UTF-8 before accessing the file system.
+ # - The Apple Terminal application displays UTF-8 by default.
+ # - However, other applications are free to use different encodings:
+ # - xterm uses ISO-8859-1 by default.
+ # - TextEdit uses MacRoman by default.
+ # We prefer UTF-8 over decomposed UTF-8-MAC because one should
+ # minimize the use of decomposed Unicode. Unfortunately, through the
+ # Darwin file system, decomposed UTF-8 strings are leaked into user
+ # space nevertheless.
+ # Then there are also the locales with encodings other than US-ASCII
+ # and UTF-8. These locales can be occasionally useful to users (e.g.
+ # when grepping through ISO-8859-1 encoded text files), when all their
+ # file names are in US-ASCII.
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-4 ISO-8859-4"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-9 ISO-8859-9"
+ echo "ISO8859-13 ISO-8859-13"
+ echo "ISO8859-15 ISO-8859-15"
+ echo "KOI8-R KOI8-R"
+ echo "KOI8-U KOI8-U"
+ echo "CP866 CP866"
+ echo "CP949 CP949"
+ echo "CP1131 CP1131"
+ echo "CP1251 CP1251"
+ echo "eucCN GB2312"
+ echo "GB2312 GB2312"
+ echo "eucJP EUC-JP"
+ echo "eucKR EUC-KR"
+ echo "Big5 BIG5"
+ echo "Big5HKSCS BIG5-HKSCS"
+ echo "GBK GBK"
+ echo "GB18030 GB18030"
+ echo "SJIS SHIFT_JIS"
+ echo "ARMSCII-8 ARMSCII-8"
+ echo "PT154 PT154"
+ #echo "ISCII-DEV ?"
+ echo "* UTF-8"
+ ;;
+ beos* | haiku*)
+ # BeOS and Haiku have a single locale, and it has UTF-8 encoding.
+ echo "* UTF-8"
+ ;;
+ msdosdjgpp*)
+ # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore
+ # localcharset.c falls back to using the full locale name
+ # from the environment variables.
+ echo "#"
+ echo "# The encodings given here may not all be correct."
+ echo "# If you find that the encoding given for your language and"
+ echo "# country is not the one your DOS machine actually uses, just"
+ echo "# correct it in this file, and send a mail to"
+ echo "# Juan Manuel Guerrero <juan.guerrero@gmx.de>"
+ echo "# and Bruno Haible <bruno@clisp.org>."
+ echo "#"
+ echo "C ASCII"
+ # ISO-8859-1 languages
+ echo "ca CP850"
+ echo "ca_ES CP850"
+ echo "da CP865" # not CP850 ??
+ echo "da_DK CP865" # not CP850 ??
+ echo "de CP850"
+ echo "de_AT CP850"
+ echo "de_CH CP850"
+ echo "de_DE CP850"
+ echo "en CP850"
+ echo "en_AU CP850" # not CP437 ??
+ echo "en_CA CP850"
+ echo "en_GB CP850"
+ echo "en_NZ CP437"
+ echo "en_US CP437"
+ echo "en_ZA CP850" # not CP437 ??
+ echo "es CP850"
+ echo "es_AR CP850"
+ echo "es_BO CP850"
+ echo "es_CL CP850"
+ echo "es_CO CP850"
+ echo "es_CR CP850"
+ echo "es_CU CP850"
+ echo "es_DO CP850"
+ echo "es_EC CP850"
+ echo "es_ES CP850"
+ echo "es_GT CP850"
+ echo "es_HN CP850"
+ echo "es_MX CP850"
+ echo "es_NI CP850"
+ echo "es_PA CP850"
+ echo "es_PY CP850"
+ echo "es_PE CP850"
+ echo "es_SV CP850"
+ echo "es_UY CP850"
+ echo "es_VE CP850"
+ echo "et CP850"
+ echo "et_EE CP850"
+ echo "eu CP850"
+ echo "eu_ES CP850"
+ echo "fi CP850"
+ echo "fi_FI CP850"
+ echo "fr CP850"
+ echo "fr_BE CP850"
+ echo "fr_CA CP850"
+ echo "fr_CH CP850"
+ echo "fr_FR CP850"
+ echo "ga CP850"
+ echo "ga_IE CP850"
+ echo "gd CP850"
+ echo "gd_GB CP850"
+ echo "gl CP850"
+ echo "gl_ES CP850"
+ echo "id CP850" # not CP437 ??
+ echo "id_ID CP850" # not CP437 ??
+ echo "is CP861" # not CP850 ??
+ echo "is_IS CP861" # not CP850 ??
+ echo "it CP850"
+ echo "it_CH CP850"
+ echo "it_IT CP850"
+ echo "lt CP775"
+ echo "lt_LT CP775"
+ echo "lv CP775"
+ echo "lv_LV CP775"
+ echo "nb CP865" # not CP850 ??
+ echo "nb_NO CP865" # not CP850 ??
+ echo "nl CP850"
+ echo "nl_BE CP850"
+ echo "nl_NL CP850"
+ echo "nn CP865" # not CP850 ??
+ echo "nn_NO CP865" # not CP850 ??
+ echo "no CP865" # not CP850 ??
+ echo "no_NO CP865" # not CP850 ??
+ echo "pt CP850"
+ echo "pt_BR CP850"
+ echo "pt_PT CP850"
+ echo "sv CP850"
+ echo "sv_SE CP850"
+ # ISO-8859-2 languages
+ echo "cs CP852"
+ echo "cs_CZ CP852"
+ echo "hr CP852"
+ echo "hr_HR CP852"
+ echo "hu CP852"
+ echo "hu_HU CP852"
+ echo "pl CP852"
+ echo "pl_PL CP852"
+ echo "ro CP852"
+ echo "ro_RO CP852"
+ echo "sk CP852"
+ echo "sk_SK CP852"
+ echo "sl CP852"
+ echo "sl_SI CP852"
+ echo "sq CP852"
+ echo "sq_AL CP852"
+ echo "sr CP852" # CP852 or CP866 or CP855 ??
+ echo "sr_CS CP852" # CP852 or CP866 or CP855 ??
+ echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
+ # ISO-8859-3 languages
+ echo "mt CP850"
+ echo "mt_MT CP850"
+ # ISO-8859-5 languages
+ echo "be CP866"
+ echo "be_BE CP866"
+ echo "bg CP866" # not CP855 ??
+ echo "bg_BG CP866" # not CP855 ??
+ echo "mk CP866" # not CP855 ??
+ echo "mk_MK CP866" # not CP855 ??
+ echo "ru CP866"
+ echo "ru_RU CP866"
+ echo "uk CP1125"
+ echo "uk_UA CP1125"
+ # ISO-8859-6 languages
+ echo "ar CP864"
+ echo "ar_AE CP864"
+ echo "ar_DZ CP864"
+ echo "ar_EG CP864"
+ echo "ar_IQ CP864"
+ echo "ar_IR CP864"
+ echo "ar_JO CP864"
+ echo "ar_KW CP864"
+ echo "ar_MA CP864"
+ echo "ar_OM CP864"
+ echo "ar_QA CP864"
+ echo "ar_SA CP864"
+ echo "ar_SY CP864"
+ # ISO-8859-7 languages
+ echo "el CP869"
+ echo "el_GR CP869"
+ # ISO-8859-8 languages
+ echo "he CP862"
+ echo "he_IL CP862"
+ # ISO-8859-9 languages
+ echo "tr CP857"
+ echo "tr_TR CP857"
+ # Japanese
+ echo "ja CP932"
+ echo "ja_JP CP932"
+ # Chinese
+ echo "zh_CN GBK"
+ echo "zh_TW CP950" # not CP938 ??
+ # Korean
+ echo "kr CP949" # not CP934 ??
+ echo "kr_KR CP949" # not CP934 ??
+ # Thai
+ echo "th CP874"
+ echo "th_TH CP874"
+ # Other
+ echo "eo CP850"
+ echo "eo_EO CP850"
+ ;;
esac
/* connect.c --- wrappers for Windows connect function
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* copy-acl.c - copy access control list from one file to another file
- Copyright (C) 2002-2003, 2005-2008 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Copying of files.
- Copyright (C) 2001-2003, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006-2007, 2009-2010 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
/* Copying of files.
- Copyright (C) 2001-2003 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2009-2010 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
/* count-one-bits.h -- counts the number of 1-bits in a word.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* crc.c -- cyclic redundancy checks
- Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* crc.h -- cyclic redundancy checks
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Invoke creat, but avoid some glitches.
- Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Compile a C# program.
- Copyright (C) 2003-2008 Free Software Foundation, Inc.
+ Copyright (C) 2003-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
/* Compile a C# program.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2009, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
/* Execute a C# program.
- Copyright (C) 2003-2008 Free Software Foundation, Inc.
+ Copyright (C) 2003-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
/* Execute a C# program.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2009, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
/* A substitute for ISO C99 <ctype.h>, for platforms on which it is incomplete.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#ifndef _GL_CTYPE_H
#define _GL_CTYPE_H
+/* The definition of GL_LINK_WARNING is copied here. */
+
/* Return non-zero if c is a blank, i.e. a space or tab character. */
#if @GNULIB_ISBLANK@
# if !@HAVE_ISBLANK@
/* help detect directory cycles efficiently
- Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003-2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* help detect directory cycles efficiently
- Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003-2004, 2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* des.c --- DES and Triple-DES encryption/decryption Algorithm
- * Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007
- * Free Software Foundation, Inc.
+ * Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009,
+ * 2010 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
/* des.h --- DES cipher implementation.
- * Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+ * Copyright (C) 2005, 2007, 2009, 2010 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
/* Diacritics processing for a few character codes.
- Copyright (C) 1990, 1991, 1992, 1993, 2000, 2006 Free Software
- Foundation, Inc.
+ Copyright (C) 1990-1993, 2000, 2006, 2009-2010 Free Software Foundation,
+ Inc.
François Pinard <pinard@iro.umontreal.ca>, 1988.
/* Diacritics processing for a few character codes.
- Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
+ Copyright (C) 1990-1993, 2009-2010 Free Software Foundation, Inc.
François Pinard <pinard@iro.umontreal.ca>, 1988.
All this file is a temporary hack, waiting for locales in GNU.
/* Analyze differences between two vectors.
- Copyright (C) 1988-1989, 1992-1995, 2001-2004, 2006-2009 Free
- Software Foundation, Inc.
+ Copyright (C) 1988-1989, 1992-1995, 2001-2004, 2006-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Change the ownership and mode bits of a directory.
- Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Like dirent.h, but redefine some names to avoid glitches.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Invoke dirent-like functions, but avoid some glitches.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* A GNU-like <dirent.h>.
- Copyright (C) 2006-2009 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* The definition of GL_LINK_WARNING is copied here. */
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
#ifdef __cplusplus
extern "C" {
#if @REPLACE_CLOSEDIR@
# define closedir rpl_closedir
-extern int closedir (DIR *);
+extern int closedir (DIR *) _GL_ARG_NONNULL ((1));
#endif
#if @GNULIB_DIRFD@
# if !@HAVE_DECL_DIRFD@ && !defined dirfd
/* Return the file descriptor associated with the given directory stream,
or -1 if none exists. */
-extern int dirfd (DIR const *dir);
+extern int dirfd (DIR *dir) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef dirfd
#if @REPLACE_OPENDIR@
# define opendir rpl_opendir
-extern DIR * opendir (const char *);
+extern DIR * opendir (const char *) _GL_ARG_NONNULL ((1));
#endif
#if @GNULIB_SCANDIR@
# if !@HAVE_SCANDIR@
extern int scandir (const char *dir, struct dirent ***namelist,
int (*filter) (const struct dirent *),
- int (*cmp) (const struct dirent **, const struct dirent **));
+ int (*cmp) (const struct dirent **, const struct dirent **))
+ _GL_ARG_NONNULL ((1, 2, 4));
# endif
#elif defined GNULIB_POSIXCHECK
# undef scandir
#if @GNULIB_ALPHASORT@
/* Compare two 'struct dirent' entries alphabetically. */
# if !@HAVE_ALPHASORT@
-extern int alphasort (const struct dirent **, const struct dirent **);
+extern int alphasort (const struct dirent **, const struct dirent **)
+ _GL_ARG_NONNULL ((1, 2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef alphasort
/* dirfd.c -- return the file descriptor associated with an open DIR*
- Copyright (C) 2001, 2006, 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2006, 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <errno.h>
int
-dirfd (DIR const *dir_p)
+dirfd (DIR *dir_p)
{
int fd = DIR_TO_FD (dir_p);
if (fd == -1)
/* dirname.c -- return all but the last element in a file name
- Copyright (C) 1990, 1998, 2000, 2001, 2003, 2004, 2005, 2006, 2009
- Free Software Foundation, Inc.
+ Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* dirname.c -- return all but the last element in a file name
- Copyright (C) 1990, 1998, 2000, 2001, 2003, 2004, 2005, 2006, 2009
- Free Software Foundation, Inc.
+ Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Take file names apart into directory and base names.
- Copyright (C) 1998, 2001, 2003-2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2001, 2003-2006, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Formatted output to a file descriptor.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
return -1;
}
+ if (output != buf)
+ free (output);
+
if (len > INT_MAX)
{
errno = EOVERFLOW;
/* A dummy file, to prevent empty libraries from breaking builds.
- Copyright (C) 2004, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
--- /dev/null
+/* Duplicate a file descriptor result, avoiding clobbering
+ STD{IN,OUT,ERR}_FILENO, with specific flags.
+
+ Copyright (C) 2001, 2004-2006, 2009-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert and Eric Blake. */
+
+#include <config.h>
+
+/* Specification. */
+#include "unistd-safer.h"
+
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "cloexec.h"
+
+#ifndef O_CLOEXEC
+# define O_CLOEXEC 0
+#endif
+
+/* Like dup, but do not return STDIN_FILENO, STDOUT_FILENO, or
+ STDERR_FILENO. If FLAG contains O_CLOEXEC, behave like
+ fcntl(F_DUPFD_CLOEXEC) rather than fcntl(F_DUPFD). */
+
+int
+dup_safer_flag (int fd, int flag)
+{
+ return fcntl (fd, (flag & O_CLOEXEC) ? F_DUPFD_CLOEXEC : F_DUPFD,
+ STDERR_FILENO + 1);
+}
/* Invoke dup, but avoid some glitches.
- Copyright (C) 2001, 2004, 2005, 2006, 2009 Free Software
- Foundation, Inc.
+ Copyright (C) 2001, 2004-2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
int
dup_safer (int fd)
{
-#if defined F_DUPFD && !REPLACE_FCHDIR
return fcntl (fd, F_DUPFD, STDERR_FILENO + 1);
-#else
- /* fd_safer calls us back, but eventually the recursion unwinds and
- does the right thing. */
- return fd_safer (dup (fd));
-#endif
}
-
-#if GNULIB_CLOEXEC
-
-# include "cloexec.h"
-
-# ifndef O_CLOEXEC
-# define O_CLOEXEC 0
-# endif
-
-/* Like dup, but do not return STDIN_FILENO, STDOUT_FILENO, or
- STDERR_FILENO. If FLAG contains O_CLOEXEC, behave like
- fcntl(F_DUPFD_CLOEXEC) rather than fcntl(F_DUPFD). */
-
-int
-dup_safer_flag (int fd, int flag)
-{
- if (flag & O_CLOEXEC)
- {
-# if defined F_DUPFD_CLOEXEC && !REPLACE_FCHDIR
- return fcntl (fd, F_DUPFD_CLOEXEC, STDERR_FILENO + 1);
-# else
- /* fd_safer_flag calls us back, but eventually the recursion
- unwinds and does the right thing. */
- fd = dup_cloexec (fd);
- return fd_safer_flag (fd, flag);
-# endif
- }
- return dup_safer (fd);
-}
-
-#endif
/* Duplicate an open file descriptor to a specified file descriptor.
- Copyright (C) 1999, 2004, 2005, 2006, 2007, 2009 Free Software
- Foundation, Inc.
+ Copyright (C) 1999, 2004-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Copy a file descriptor, applying specific flags.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
}
#endif
- if (oldfd < 0 || newfd < 0 || newfd >= getdtablesize ())
+ if (newfd < 0 || newfd >= getdtablesize () || fcntl (oldfd, F_GETFD) == -1)
{
errno = EBADF;
return -1;
return -1;
}
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
-/* Native Woe32 API. */
-
if (flags & O_CLOEXEC)
{
- /* Neither dup() nor dup2() can create a file descriptor with
- O_CLOEXEC = O_NOINHERIT set. We need to use the low-level function
- _open_osfhandle for this. Iterate until all file descriptors less
- than newfd are filled up. */
- HANDLE curr_process = GetCurrentProcess ();
- HANDLE old_handle = (HANDLE) _get_osfhandle (oldfd);
- unsigned char fds_to_close[OPEN_MAX_MAX / CHAR_BIT];
- unsigned int fds_to_close_bound = 0;
int result;
-
- if (old_handle == INVALID_HANDLE_VALUE)
- {
- /* oldfd is not open, or is an unassigned standard file
- descriptor. */
- errno = EBADF;
- return -1;
- }
-
close (newfd);
-
- for (;;)
+ result = fcntl (oldfd, F_DUPFD_CLOEXEC, newfd);
+ if (newfd < result)
{
- HANDLE new_handle;
- int duplicated_fd;
- unsigned int index;
-
- if (!DuplicateHandle (curr_process, /* SourceProcessHandle */
- old_handle, /* SourceHandle */
- curr_process, /* TargetProcessHandle */
- (PHANDLE) &new_handle, /* TargetHandle */
- (DWORD) 0, /* DesiredAccess */
- FALSE, /* InheritHandle */
- DUPLICATE_SAME_ACCESS)) /* Options */
- {
- errno = EBADF; /* arbitrary */
- result = -1;
- break;
- }
- duplicated_fd = _open_osfhandle ((long) new_handle, flags);
- if (duplicated_fd < 0)
- {
- CloseHandle (new_handle);
- result = -1;
- break;
- }
- if (duplicated_fd > newfd)
- /* Shouldn't happen, since newfd is still closed. */
- abort ();
- if (duplicated_fd == newfd)
- {
- result = newfd;
- break;
- }
-
- /* Set the bit duplicated_fd in fds_to_close[]. */
- index = (unsigned int) duplicated_fd / CHAR_BIT;
- if (index >= fds_to_close_bound)
- {
- if (index >= sizeof (fds_to_close))
- /* Need to increase OPEN_MAX_MAX. */
- abort ();
- memset (fds_to_close + fds_to_close_bound, '\0',
- index + 1 - fds_to_close_bound);
- fds_to_close_bound = index + 1;
- }
- fds_to_close[index] |= 1 << ((unsigned int) duplicated_fd % CHAR_BIT);
+ close (result);
+ errno = EIO;
+ result = -1;
}
-
- /* Close the previous fds that turned out to be too small. */
- {
- int saved_errno = errno;
- unsigned int duplicated_fd;
-
- for (duplicated_fd = 0;
- duplicated_fd < fds_to_close_bound * CHAR_BIT;
- duplicated_fd++)
- if ((fds_to_close[duplicated_fd / CHAR_BIT]
- >> (duplicated_fd % CHAR_BIT))
- & 1)
- close (duplicated_fd);
-
- errno = saved_errno;
- }
-
-#if REPLACE_FCHDIR
- if (result == newfd)
- result = _gl_register_dup (oldfd, newfd);
-#endif
- return result;
+ if (result < 0)
+ return -1;
}
-
- if (dup2 (oldfd, newfd) < 0)
- return -1;
-
-#else
-/* Unix API. */
-
- if (dup2 (oldfd, newfd) < 0)
+ else if (dup2 (oldfd, newfd) < 0)
return -1;
- /* POSIX <http://www.opengroup.org/onlinepubs/9699919799/functions/dup.html>
- says that initially, the FD_CLOEXEC flag is cleared on newfd. */
-
- if (flags & O_CLOEXEC)
- {
- int fcntl_flags;
-
- if ((fcntl_flags = fcntl (newfd, F_GETFD, 0)) < 0
- || fcntl (newfd, F_SETFD, fcntl_flags | FD_CLOEXEC) == -1)
- {
- int saved_errno = errno;
- close (newfd);
- errno = saved_errno;
- return -1;
- }
- }
-
-#endif
-
#if O_BINARY
if (flags & O_BINARY)
setmode (newfd, O_BINARY);
setmode (newfd, O_TEXT);
#endif
-#if REPLACE_FCHDIR
- newfd = _gl_register_dup (oldfd, newfd);
-#endif
return newfd;
}
/* Duplicate a locale object.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
{
/* Create a copy of the locale by fetching the name of each locale
category, starting with LC_CTYPE. */
- static struct { int cat; int mask; } categories[] =
+ static struct { int cat; int mask; } const categories[] =
{
{ LC_NUMERIC, LC_NUMERIC_MASK },
{ LC_TIME, LC_TIME_MASK },
/* Memory allocation with expensive empty allocations.
- Copyright (C) 2003, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2008, 2009, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003,
based on prior work by Jim Meyering.
/* A POSIX-like <errno.h>.
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Error handler for noninteractive utilities
- Copyright (C) 1990-1998, 2000-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1990-1998, 2000-2007, 2009-2010 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
/* Declaration for error-reporting function
- Copyright (C) 1995, 1996, 1997, 2003, 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 2003, 2006, 2008, 2009, 2010 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
/* euidaccess -- check if effective user id can access file
- Copyright (C) 1990, 1991, 1995, 1998, 2000, 2003, 2004, 2005, 2006,
- 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1990-1991, 1995, 1998, 2000, 2003-2006, 2008-2010 Free
+ Software Foundation, Inc.
This file is part of the GNU C Library.
/* exclude.c -- exclude file names
- Copyright (C) 1992, 1993, 1994, 1997, 1999, 2000, 2001, 2002, 2003,
- 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1993, 1994, 1997, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* exclude.h -- declarations for excluding file names
- Copyright (C) 1992, 1993, 1994, 1997, 1999, 2001, 2002, 2003, 2005,
- 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1993, 1994, 1997, 1999, 2001, 2002, 2003, 2005, 2006,
+ 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Creation of autonomous subprocesses.
- Copyright (C) 2001-2004, 2006-2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006-2010 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
/* Creation of autonomous subprocesses.
- Copyright (C) 2001-2003, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2008-2010 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, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2005, 2006, 2007, 2009, 2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Failure exit status
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Emulation for expl.
Contributed by Paolo Bonzini
- Copyright 2002, 2003, 2007 Free Software Foundation, Inc.
+ Copyright 2002, 2003, 2007, 2009, 2010 Free Software Foundation, Inc.
This file is part of gnulib.
/* Check the access rights of a file relative to an open directory.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Emergency actions in case of a fatal signal.
- Copyright (C) 2003-2004, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2003-2004, 2006-2010 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 Free Software Foundation, Inc.
+ Copyright (C) 2003-2004, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
/* Retrieve information about a FILE stream.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Retrieve information about a FILE stream.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* fchdir replacement.
- Copyright (C) 2006-2009 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
and fcntl. Both arguments must be valid and distinct file
descriptors. Close NEWFD and return -1 if OLDFD is tracking a
directory, but there is insufficient memory to track the same
- directory in NEWFD; otherwise return NEWFD.
-
- FIXME: Need to implement rpl_fcntl in gnulib, and have it call
- this. */
+ directory in NEWFD; otherwise return NEWFD. */
int
_gl_register_dup (int oldfd, int newfd)
{
/* Change the protections of file relative to an open directory.
- Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# undef lchmod
# define lchmod lchmod_rpl
static int
-lchmod (char const *f _UNUSED_PARAMETER_, mode_t m _UNUSED_PARAMETER_)
+lchmod (char const *f _GL_UNUSED, mode_t m _GL_UNUSED)
{
errno = ENOSYS;
return -1;
when the buggy fchownat-with-AT_SYMLINK_NOFOLLOW operates on a symlink, it
mistakenly affects the symlink referent, rather than the symlink itself.
- Copyright (C) 2006-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* fclose replacement.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Like fcntl.h, but redefine some names to avoid glitches.
- Copyright (C) 2005, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Invoke fcntl-like functions, but avoid some glitches.
- Copyright (C) 2005, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
--- /dev/null
+/* Provide file descriptor control.
+
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <fcntl.h>
+
+#include <errno.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <unistd.h>
+
+#if !HAVE_FCNTL
+# define rpl_fcntl fcntl
+#endif
+#undef fcntl
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Get declarations of the Win32 API functions. */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+
+/* Upper bound on getdtablesize(). See lib/getdtablesize.c. */
+# define OPEN_MAX_MAX 0x10000
+
+/* Duplicate OLDFD into the first available slot of at least NEWFD,
+ which must be positive, with FLAGS determining whether the duplicate
+ will be inheritable. */
+static int
+dupfd (int oldfd, int newfd, int flags)
+{
+ /* Mingw has no way to create an arbitrary fd. Iterate until all
+ file descriptors less than newfd are filled up. */
+ HANDLE curr_process = GetCurrentProcess ();
+ HANDLE old_handle = (HANDLE) _get_osfhandle (oldfd);
+ unsigned char fds_to_close[OPEN_MAX_MAX / CHAR_BIT];
+ unsigned int fds_to_close_bound = 0;
+ int result;
+ BOOL inherit = flags & O_CLOEXEC ? FALSE : TRUE;
+ int mode;
+
+ if (newfd < 0 || getdtablesize () <= newfd)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+ if (old_handle == INVALID_HANDLE_VALUE
+ || (mode = setmode (oldfd, O_BINARY)) == -1)
+ {
+ /* oldfd is not open, or is an unassigned standard file
+ descriptor. */
+ errno = EBADF;
+ return -1;
+ }
+ setmode (oldfd, mode);
+ flags |= mode;
+
+ for (;;)
+ {
+ HANDLE new_handle;
+ int duplicated_fd;
+ unsigned int index;
+
+ if (!DuplicateHandle (curr_process, /* SourceProcessHandle */
+ old_handle, /* SourceHandle */
+ curr_process, /* TargetProcessHandle */
+ (PHANDLE) &new_handle, /* TargetHandle */
+ (DWORD) 0, /* DesiredAccess */
+ inherit, /* InheritHandle */
+ DUPLICATE_SAME_ACCESS)) /* Options */
+ {
+ /* TODO: Translate GetLastError () into errno. */
+ errno = EMFILE;
+ result = -1;
+ break;
+ }
+ duplicated_fd = _open_osfhandle ((long) new_handle, flags);
+ if (duplicated_fd < 0)
+ {
+ CloseHandle (new_handle);
+ errno = EMFILE;
+ result = -1;
+ break;
+ }
+ if (newfd <= duplicated_fd)
+ {
+ result = duplicated_fd;
+ break;
+ }
+
+ /* Set the bit duplicated_fd in fds_to_close[]. */
+ index = (unsigned int) duplicated_fd / CHAR_BIT;
+ if (fds_to_close_bound <= index)
+ {
+ if (sizeof fds_to_close <= index)
+ /* Need to increase OPEN_MAX_MAX. */
+ abort ();
+ memset (fds_to_close + fds_to_close_bound, '\0',
+ index + 1 - fds_to_close_bound);
+ fds_to_close_bound = index + 1;
+ }
+ fds_to_close[index] |= 1 << ((unsigned int) duplicated_fd % CHAR_BIT);
+ }
+
+ /* Close the previous fds that turned out to be too small. */
+ {
+ int saved_errno = errno;
+ unsigned int duplicated_fd;
+
+ for (duplicated_fd = 0;
+ duplicated_fd < fds_to_close_bound * CHAR_BIT;
+ duplicated_fd++)
+ if ((fds_to_close[duplicated_fd / CHAR_BIT]
+ >> (duplicated_fd % CHAR_BIT))
+ & 1)
+ close (duplicated_fd);
+
+ errno = saved_errno;
+ }
+
+# if REPLACE_FCHDIR
+ if (0 <= result)
+ result = _gl_register_dup (oldfd, result);
+# endif
+ return result;
+}
+#endif /* W32 */
+
+/* Perform the specified ACTION on the file descriptor FD, possibly
+ using the argument ARG further described below. This replacement
+ handles the following actions, and forwards all others on to the
+ native fcntl. An unrecognized ACTION returns -1 with errno set to
+ EINVAL.
+
+ F_DUPFD - duplicate FD, with int ARG being the minimum target fd.
+ If successful, return the duplicate, which will be inheritable;
+ otherwise return -1 and set errno.
+
+ F_DUPFD_CLOEXEC - duplicate FD, with int ARG being the minimum
+ target fd. If successful, return the duplicate, which will not be
+ inheritable; otherwise return -1 and set errno.
+
+ F_GETFD - ARG need not be present. If successful, return a
+ non-negative value containing the descriptor flags of FD (only
+ FD_CLOEXEC is portable, but other flags may be present); otherwise
+ return -1 and set errno. */
+
+int
+rpl_fcntl (int fd, int action, /* arg */...)
+{
+ va_list arg;
+ int result = -1;
+ va_start (arg, action);
+ switch (action)
+ {
+
+#if !HAVE_FCNTL
+ case F_DUPFD:
+ {
+ int target = va_arg (arg, int);
+ result = dupfd (fd, target, 0);
+ break;
+ }
+#elif FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR
+ case F_DUPFD:
+ {
+ int target = va_arg (arg, int);
+ /* Detect invalid target; needed for cygwin 1.5.x. */
+ if (target < 0 || getdtablesize () <= target)
+ errno = EINVAL;
+ else
+ {
+ result = fcntl (fd, action, target);
+# if REPLACE_FCHDIR
+ if (0 <= result)
+ result = _gl_register_dup (fd, result);
+# endif
+ }
+ break;
+ } /* F_DUPFD */
+#endif /* FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR */
+
+ case F_DUPFD_CLOEXEC:
+ {
+ int target = va_arg (arg, int);
+
+#if !HAVE_FCNTL
+ result = dupfd (fd, target, O_CLOEXEC);
+ break;
+#else /* HAVE_FCNTL */
+ /* Try the system call first, if the headers claim it exists
+ (that is, if GNULIB_defined_F_DUPFD_CLOEXEC is 0), since we
+ may be running with a glibc that has the macro but with an
+ older kernel that does not support it. Cache the
+ information on whether the system call really works, but
+ avoid caching failure if the corresponding F_DUPFD fails
+ for any reason. 0 = unknown, 1 = yes, -1 = no. */
+ static int have_dupfd_cloexec = GNULIB_defined_F_DUPFD_CLOEXEC ? -1 : 0;
+ if (0 <= have_dupfd_cloexec)
+ {
+ result = fcntl (fd, action, target);
+ if (0 <= result || errno != EINVAL)
+ {
+ have_dupfd_cloexec = 1;
+# if REPLACE_FCHDIR
+ if (0 <= result)
+ result = _gl_register_dup (fd, result);
+# endif
+ }
+ else
+ {
+ result = rpl_fcntl (fd, F_DUPFD, target);
+ if (result < 0)
+ break;
+ have_dupfd_cloexec = -1;
+ }
+ }
+ else
+ result = rpl_fcntl (fd, F_DUPFD, target);
+ if (0 <= result && have_dupfd_cloexec == -1)
+ {
+ int flags = fcntl (result, F_GETFD);
+ if (flags < 0 || fcntl (result, F_SETFD, flags | FD_CLOEXEC) == -1)
+ {
+ int saved_errno = errno;
+ close (result);
+ errno = saved_errno;
+ result = -1;
+ }
+ }
+ break;
+#endif /* HAVE_FCNTL */
+ } /* F_DUPFD_CLOEXEC */
+
+#if !HAVE_FCNTL
+ case F_GETFD:
+ {
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ HANDLE handle = (HANDLE) _get_osfhandle (fd);
+ DWORD flags;
+ if (handle == INVALID_HANDLE_VALUE
+ || GetHandleInformation (handle, &flags) == 0)
+ errno = EBADF;
+ else
+ result = (flags & HANDLE_FLAG_INHERIT) ? 0 : FD_CLOEXEC;
+# else /* !W32 */
+ /* Use dup2 to reject invalid file descriptors. No way to
+ access this information, so punt. */
+ if (0 <= dup2 (fd, fd))
+ result = 0;
+# endif /* !W32 */
+ break;
+ } /* F_GETFD */
+#endif /* !HAVE_FCNTL */
+
+ /* Implementing F_SETFD on mingw is not trivial - there is no
+ API for changing the O_NOINHERIT bit on an fd, and merely
+ changing the HANDLE_FLAG_INHERIT bit on the underlying handle
+ can lead to odd state. It may be possible by duplicating the
+ handle, using _open_osfhandle with the right flags, then
+ using dup2 to move the duplicate onto the original, but that
+ is not supported for now. */
+
+ default:
+ {
+#if HAVE_FCNTL
+ void *p = va_arg (arg, void *);
+ result = fcntl (fd, action, p);
+#else
+ errno = EINVAL;
+#endif
+ break;
+ }
+ }
+ va_end (arg);
+ return result;
+}
/* Like <fcntl.h>, but with non-working flags defined to 0.
- Copyright (C) 2006-2009 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Special invocation convention. */
#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
+#ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */
+# include <sys/stat.h>
+# include <unistd.h>
+#endif
#@INCLUDE_NEXT@ @NEXT_FCNTL_H@
#else
#ifndef _GL_FCNTL_H
#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
+#ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */
+# include <sys/stat.h>
+# include <unistd.h>
+#endif
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_FCNTL_H@
/* The definition of GL_LINK_WARNING is copied here. */
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
/* Declare overridden functions. */
extern "C" {
#endif
+#if @GNULIB_FCNTL@
+# if @REPLACE_FCNTL@
+# undef fcntl
+# define fcntl rpl_fcntl
+# endif
+# if !@HAVE_FCNTL@ || @REPLACE_FCNTL@
+extern int fcntl (int fd, int action, ...);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef fcntl
+# define fcntl \
+ (GL_LINK_WARNING ("fcntl is not always POSIX compliant - " \
+ "use gnulib module fcntl for portability"), \
+ fcntl)
+#endif
+
#if @GNULIB_OPEN@
# if @REPLACE_OPEN@
# undef open
# define open rpl_open
-extern int open (const char *filename, int flags, ...);
+extern int open (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1));
# endif
+#elif defined GNULIB_POSIXCHECK
+# undef open
+# define open \
+ (GL_LINK_WARNING ("open is not always POSIX compliant - " \
+ "use gnulib module open for portability"), \
+ open)
#endif
#if @GNULIB_OPENAT@
# define openat rpl_openat
# endif
# if !@HAVE_OPENAT@ || @REPLACE_OPENAT@
-int openat (int fd, char const *file, int flags, /* mode_t mode */ ...);
+extern int openat (int fd, char const *file, int flags, /* mode_t mode */ ...)
+ _GL_ARG_NONNULL ((2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef openat
-# define openat(f,u,g) \
+# define openat \
(GL_LINK_WARNING ("openat is not portable - " \
"use gnulib module openat for portability"), \
openat)
}
#endif
-/* Fix up the FD_* macros. */
+/* Fix up the FD_* macros, only known to be missing on mingw. */
#ifndef FD_CLOEXEC
# define FD_CLOEXEC 1
#endif
+/* Fix up the supported F_* macros. Intentionally leave other F_*
+ macros undefined. Only known to be missing on mingw. */
+
+#ifndef F_DUPFD_CLOEXEC
+# define F_DUPFD_CLOEXEC 0x40000000
+/* Witness variable: 1 if gnulib defined F_DUPFD_CLOEXEC, 0 otherwise. */
+# define GNULIB_defined_F_DUPFD_CLOEXEC 1
+#else
+# define GNULIB_defined_F_DUPFD_CLOEXEC 0
+#endif
+
+#ifndef F_DUPFD
+# define F_DUPFD 1
+#endif
+
+#ifndef F_GETFD
+# define F_GETFD 2
+#endif
+
/* Fix up the O_* macros. */
#if !defined O_DIRECT && defined O_DIRECTIO
--- /dev/null
+/* Adjust a file descriptor result so that it avoids clobbering
+ STD{IN,OUT,ERR}_FILENO, with specific flags.
+
+ Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert and Eric Blake. */
+
+#include <config.h>
+
+/* Specification. */
+#include "unistd-safer.h"
+
+#include <errno.h>
+#include <unistd.h>
+
+/* Return FD, unless FD would be a copy of standard input, output, or
+ error; in that case, return a duplicate of FD, closing FD. If FLAG
+ contains O_CLOEXEC, the returned FD will have close-on-exec
+ semantics. On failure to duplicate, close FD, set errno, and
+ return -1. Preserve errno if FD is negative, so that the caller
+ can always inspect errno when the returned value is negative.
+
+ This function is usefully wrapped around functions that return file
+ descriptors, e.g., fd_safer_flag (open ("file", O_RDONLY | flag), flag). */
+
+int
+fd_safer_flag (int fd, int flag)
+{
+ if (STDIN_FILENO <= fd && fd <= STDERR_FILENO)
+ {
+ int f = dup_safer_flag (fd, flag);
+ int e = errno;
+ close (fd);
+ errno = e;
+ fd = f;
+ }
+
+ return fd;
+}
/* Return a safer copy of a file descriptor.
- Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unistd-safer.h"
#include <errno.h>
-
#include <unistd.h>
/* Return FD, unless FD would be a copy of standard input, output, or
return fd;
}
-
-#if GNULIB_CLOEXEC
-
-/* Return FD, unless FD would be a copy of standard input, output, or
- error; in that case, return a duplicate of FD, closing FD. If FLAG
- contains O_CLOEXEC, the returned FD will have close-on-exec
- semantics. On failure to duplicate, close FD, set errno, and
- return -1. Preserve errno if FD is negative, so that the caller
- can always inspect errno when the returned value is negative.
-
- This function is usefully wrapped around functions that return file
- descriptors, e.g., fd_safer_flag (open ("file", O_RDONLY | flag), flag). */
-
-int
-fd_safer_flag (int fd, int flag)
-{
- if (STDIN_FILENO <= fd && fd <= STDERR_FILENO)
- {
- int f = dup_safer_flag (fd, flag);
- int e = errno;
- close (fd);
- errno = e;
- fd = f;
- }
-
- return fd;
-}
-
-#endif /* GNULIB_CLOEXEC */
/* provide a replacement fdopendir function
- Copyright (C) 2004-2009 Free Software Foundation, Inc.
+ Copyright (C) 2004-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Set file access and modification times.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
/* fflush.c -- allow flushing input streams
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
update_fpos_cache (FILE *fp, off_t pos)
{
#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+# if defined __CYGWIN__
+ /* fp_->_offset is typed as an integer. */
fp_->_offset = pos;
+# else
+ /* fp_->_offset is an fpos_t. */
+ /* Use a union, since on NetBSD, the compilation flags determine
+ whether fpos_t is typedef'd to off_t or a struct containing a
+ single off_t member. */
+ union
+ {
+ fpos_t f;
+ off_t o;
+ } u;
+ u.o = pos;
+ fp_->_offset = u.f;
+# endif
fp_->_flags |= __SOFF;
#endif
}
/* Test whether a file has a nontrivial access control list.
- Copyright (C) 2002-2003, 2005-2009 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Specialized functions to manipulate a set of files.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Return a string describing the type of a file.
- Copyright (C) 1993, 1994, 2001, 2002, 2004, 2005, 2006 Free
- Software Foundation, Inc.
+ Copyright (C) 1993-1994, 2001-2002, 2004-2006, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Return a string describing the type of a file.
- Copyright (C) 1993, 1994, 2001, 2002, 2004, 2005 Free Software
+ Copyright (C) 1993-1994, 2001-2002, 2004-2005, 2009-2010 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
/* Convert file size to number of blocks on System V-like machines.
- Copyright (C) 1990, 1997, 1998, 1999, 2004, 2005, 2006 Free Software
+ Copyright (C) 1990, 1997-1999, 2004-2006, 2009-2010 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
/* filemode.c -- make a string describing file modes
- Copyright (C) 1985, 1990, 1993, 1998-2000, 2004, 2006 Free Software
- Foundation, Inc.
+ Copyright (C) 1985, 1990, 1993, 1998-2000, 2004, 2006, 2009-2010 Free
+ Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Make a string describing file modes.
- Copyright (C) 1998, 1999, 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2003, 2006, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Basic filename support macros.
- Copyright (C) 2001-2004, 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Concatenate two arbitrary file names.
- Copyright (C) 1996-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1996-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Concatenate two arbitrary file names.
- Copyright (C) 1996-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1996-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Concatenate two arbitrary file names.
- Copyright (C) 1996, 1997, 2003, 2005, 2007, 2009 Free Software
+ Copyright (C) 1996-1997, 2003, 2005, 2007, 2009-2010 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
/*
Copyright (C) 1995 Ian Jackson <iwj10@cus.cam.ac.uk>
Copyright (C) 2001 Anthony Towns <aj@azure.humbug.org.au>
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/*
Copyright (C) 1995 Ian Jackson <iwj10@cus.cam.ac.uk>
Copyright (C) 2001 Anthony Towns <aj@azure.humbug.org.au>
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Locating a program in PATH.
- Copyright (C) 2001-2004, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2008.
This program is free software: you can redistribute it and/or modify
/* Locating a program in PATH.
- Copyright (C) 2001-2004, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006-2010 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
/* Locating a program in PATH.
- Copyright (C) 2001-2003 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2009-2010 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
/* Supplemental information about the floating-point formats.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software; you can redistribute it and/or modify
/* A correct <float.h>.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Written by Richard W.M. Jones <rjones.at.redhat.com>
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
/* Round towards negative infinity.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Round towards negative infinity.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Round towards negative infinity.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-/* Copyright (C) 1991,1992,1993,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2009
- Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ 2003, 2004, 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Copyright (C) 1991, 1992, 1993, 1996, 1997, 1998, 1999, 2001, 2002, 2003,
- 2005, 2007 Free Software Foundation, Inc.
+ 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
#ifndef _FNMATCH_H
#define _FNMATCH_H 1
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
#ifdef __cplusplus
extern "C" {
#endif
/* Match NAME against the file name pattern PATTERN,
returning zero if it matches, FNM_NOMATCH if not. */
extern int fnmatch (const char *__pattern, const char *__name,
- int __flags);
+ int __flags)
+ _GL_ARG_NONNULL ((1, 2));
#ifdef __cplusplus
}
-/* Copyright (C) 1991,1992,1993,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2009
- Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+ 2003, 2004, 2005, 2006, 2009, 2010 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
/* Invoke fopen, but avoid some glitches.
- Copyright (C) 2001, 2004, 2005, 2006, 2009 Free Software
- Foundation, Inc.
+ Copyright (C) 2001, 2004-2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Open a stream to a file.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* fpending.c -- return the number of pending output bytes on a stream
- Copyright (C) 2000, 2004, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2004, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Declare __fpending.
- Copyright (C) 2000, 2003, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2003, 2005-2006, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Formatted output to a stream.
- Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
return -1;
}
+ if (output != buf)
+ free (output);
+
if (len > INT_MAX)
{
errno = EOVERFLOW;
/* Generate time strings directly to the output. */
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Manipulating the FPU control word.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 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-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Retrieve information about a FILE stream.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Retrieve information about a FILE stream.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Retrieve information about a FILE stream.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Retrieve information about a FILE stream.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Retrieve information about a FILE stream.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Retrieve information about a FILE stream.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Retrieve information about a FILE stream.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Retrieve information about a FILE stream.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Skipping input from a FILE stream.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Skipping input from a FILE stream.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Work around incompatibility on older systems where free (NULL) fails.
- Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Invoke freopen, but avoid some glitches.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Open a stream to a file.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Split a double into fraction and mantissa.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Split a 'long double' into fraction and mantissa.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* An fseek() function that, together with fflush(), is POSIX compliant.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* An fseeko() function that, together with fflush(), is POSIX compliant.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
fp->_flags &= ~_IO_EOF_SEEN;
#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+# if defined __CYGWIN__
+ /* fp_->_offset is typed as an integer. */
fp_->_offset = pos;
+# else
+ /* fp_->_offset is an fpos_t. */
+ {
+ /* Use a union, since on NetBSD, the compilation flags
+ determine whether fpos_t is typedef'd to off_t or a struct
+ containing a single off_t member. */
+ union
+ {
+ fpos_t f;
+ off_t o;
+ } u;
+ u.o = pos;
+ fp_->_offset = u.f;
+ }
+# endif
fp_->_flags |= __SOFF;
fp_->_flags &= ~__SEOF;
#elif defined __EMX__ /* emx+gcc */
/* Set the error indicator of a stream.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Set the error indicator of a stream.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Work around an fstatat bug on Solaris 9.
- Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Functions to make fuzzy comparisons between strings
- Copyright (C) 1988-1989, 1992-1993, 1995, 2001-2003, 2006, 2008
- Free Software Foundation, Inc.
+ Copyright (C) 1988-1989, 1992-1993, 1995, 2001-2003, 2006, 2008-2010 Free
+ Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Fuzzy string comparison.
- Copyright (C) 1995, 2000, 2002-2003, 2006, 2008 Free Software
+ Copyright (C) 1995, 2000, 2002-2003, 2006, 2008-2010 Free Software
Foundation, Inc.
This file was written by Peter Miller <pmiller@agso.gov.au>
/* fsusage.c -- return space usage of mounted file systems
- Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009
- Free Software Foundation, Inc.
+ Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* fsusage.h -- declarations for file system space usage info
- Copyright (C) 1991, 1992, 1997, 2003, 2004, 2005, 2006 Free Software
+ Copyright (C) 1991-1992, 1997, 2003-2006, 2009-2010 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
Written by Richard W.M. Jones <rjones.at.redhat.com>
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
/* An ftell() function that works around platform bugs.
- Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* An ftello() function that works around platform bugs.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Detect cycles in file tree walks.
- Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003-2006, 2009-2010 Free Software Foundation, Inc.
Written by Jim Meyering.
/* Traverse a file hierarchy.
- Copyright (C) 2004-2009 Free Software Foundation, Inc.
+ Copyright (C) 2004-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#else
static bool
-dirent_inode_sort_may_be_useful (int dir_fd _UNUSED_PARAMETER_) { return true; }
+dirent_inode_sort_may_be_useful (int dir_fd _GL_UNUSED) { return true; }
static bool
-leaf_optimization_applies (int dir_fd _UNUSED_PARAMETER_) { return false; }
+leaf_optimization_applies (int dir_fd _GL_UNUSED) { return false; }
#endif
#if GNULIB_FTS
*/
/* ARGSUSED */
int
-fts_set(FTS *sp _UNUSED_PARAMETER_, FTSENT *p, int instr)
+fts_set(FTS *sp _GL_UNUSED, FTSENT *p, int instr)
{
if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW &&
instr != FTS_NOINSTR && instr != FTS_SKIP) {
/* Traverse a file hierarchy.
- Copyright (C) 2004-2009 Free Software Foundation, Inc.
+ Copyright (C) 2004-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* An interface to read that retries after partial reads and interrupts.
- Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* An interface to read() that reads all it is asked to read.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* An interface to read and write that retries (if necessary) until complete.
- Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1993-1994, 1997-2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* An interface to write() that writes all it is asked to write.
- Copyright (C) 2002-2003 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Set the access and modification time of an open fd.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
{
/* fdutimens also works around bugs in native futimens, when running
with glibc compiled against newer headers but on a Linux kernel
- older than 2.6.26. */
+ older than 2.6.32. */
return fdutimens (NULL, fd, times);
}
/* Retrieve information about a FILE stream.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Retrieve information about a FILE stream.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Detect write error on a stream.
- Copyright (C) 2003-2006, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2003-2006, 2008-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
/* Detect write error on a stream.
- Copyright (C) 2003, 2005-2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005-2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
/* Retrieve information about a FILE stream.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Retrieve information about a FILE stream.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-/* Copyright (C) 1997, 2001, 2002, 2004, 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2001, 2002, 2004, 2005, 2006, 2008, 2009, 2010 Free
+ Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <pjb27@cam.ac.uk>, 1997.
/* gc-gnulib.c --- Common gnulib internal crypto interface functions
- * Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free
+ * Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
* Software Foundation, Inc.
*
* This file is free software; you can redistribute it and/or modify
/* gc-libgcrypt.c --- Crypto wrappers around Libgcrypt for GC.
- * Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free
+ * Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
* Software Foundation, Inc.
*
* This file is free software; you can redistribute it and/or modify
/* gc-pbkdf2-sha1.c --- Password-Based Key Derivation Function a'la PKCS#5
- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2010 Free Software
+ Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Arithmetic.
- Copyright (C) 2001-2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify
/* Arithmetic.
- Copyright (C) 2001-2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify
/* Generate Unicode conforming character classification tables and
line break properties tables and word break property tables and
decomposition/composition and case mapping tables from a UnicodeData file.
- Copyright (C) 2000-2002, 2004, 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2000-2002, 2004, 2007-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2000-2002.
This program is free software: you can redistribute it and/or modify
/* Get address information (partial implementation).
- Copyright (C) 1997, 2001, 2002, 2004, 2005, 2006, 2007, 2008 Free Software
- Foundation, Inc.
+ Copyright (C) 1997, 2001-2002, 2004-2010 Free Software Foundation, Inc.
Contributed by Simon Josefsson <simon@josefsson.org>.
This program is free software; you can redistribute it and/or modify
#include <config.h>
+/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
+ optimizes away the sa == NULL test below. */
+#define _GL_ARG_NONNULL(params)
+
#include <netdb.h>
#if HAVE_NETINET_IN_H
-/* Copyright (C) 1991-1999, 2004-2009 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1999, 2004-2010 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
/* Parse a string into an internal time stamp.
- Copyright (C) 1995, 1997, 1998, 2003, 2004, 2007 Free Software
+ Copyright (C) 1995, 1997, 1998, 2003, 2004, 2007, 2009, 2010 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
%{
/* Parse a string into an internal time stamp.
- Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
- Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+ 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Do nothing if the parser reports an error. */
static int
-yyerror (parser_control const *pc _UNUSED_PARAMETER_,
- char const *s _UNUSED_PARAMETER_)
+yyerror (parser_control const *pc _GL_UNUSED,
+ char const *s _GL_UNUSED)
{
return 0;
}
/* getdelim.c --- Implementation of replacement getdelim function.
- Copyright (C) 1994, 1996, 1997, 1998, 2001, 2003, 2005, 2006, 2007,
- 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1996, 1997, 1998, 2001, 2003, 2005, 2006, 2007, 2008,
+ 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
#include <config.h>
+/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
+ optimizes away the lineptr == NULL || n == NULL || fp == NULL tests below. */
+#define _GL_ARG_NONNULL(params)
+
#include <stdio.h>
#include <limits.h>
/* getdomainname emulation for systems that doesn't have it.
- Copyright (C) 2003, 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* getdtablesize() function for platforms that don't have it.
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
/* wrap getfilecon, lgetfilecon, and fgetfilecon
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* provide consistent interface to getgroups for systems that don't allow N==0
- Copyright (C) 1996, 1999, 2003, 2006, 2007, 2008, 2009 Free
- Software Foundation, Inc.
+ Copyright (C) 1996, 1999, 2003, 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Provide a stub that fails with ENOSYS, since there is no group
information available on mingw. */
int
-getgroups (int n _UNUSED_PARAMETER_, GETGROUPS_T *groups _UNUSED_PARAMETER_)
+getgroups (int n _GL_UNUSED, GETGROUPS_T *groups _GL_UNUSED)
{
errno = ENOSYS;
return -1;
/* gethostname emulation for SysV and POSIX.1.
- Copyright (C) 1992, 2003, 2006, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1992, 2003, 2006, 2008, 2009, 2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* gethrxtime -- get high resolution real time
- Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* gethrxtime -- get high resolution real time
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* getline.c --- Implementation of replacement getline function.
- Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
/* Get the system load averages.
- Copyright (C) 1985, 1986, 1987, 1988, 1989, 1991, 1992, 1993, 1994,
- 1995, 1997, 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free
- Software Foundation, Inc.
+ Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2010 Free Software
+ Foundation, Inc.
NOTE: The canonical source of this file is maintained with gnulib.
Bugs can be reported to bug-gnulib@gnu.org.
/* Provide a working getlogin_r for systems which lack it.
- Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* getndelim2 - Read a line from a stream, stopping at one of 2 delimiters,
with bounded memory allocation.
- Copyright (C) 1993, 1996, 1997, 1998, 2000, 2003, 2004, 2006, 2008 Free
- Software Foundation, Inc.
+ Copyright (C) 1993, 1996, 1997, 1998, 2000, 2003, 2004, 2006, 2008, 2009,
+ 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* getndelim2 - Read a line from a stream, stopping at one of 2 delimiters,
with bounded memory allocation.
- Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2006, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* getnline - Read a line from a stream, with bounded memory allocation.
- Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2006, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* getnline - Read a line from a stream, with bounded memory allocation.
- Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Getopt for GNU.
- NOTE: getopt is now part of the C library, so if you don't know what
+ 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,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002,2003,2004,2006,2008,2009
- Free Software Foundation, Inc.
+ Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2010 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 attribute_hidden
#endif
-/* Unlike standard Unix `getopt', functions like `getopt_long'
- let the user intersperse the options with the other arguments.
+/* This version of `getopt' appears to the caller like standard Unix `getopt'
+ but it behaves differently for the user, since it allows the user
+ to intersperse the options with the other arguments.
As `getopt_long' works, it permutes the elements of ARGV so that,
when it is done, all the options precede everything else. Thus
Using `getopt' or setting the environment variable POSIXLY_CORRECT
disables permutation.
- Then the application's behavior is completely standard.
+ Then the behavior is completely standard.
GNU application programs can use a third alternative mode in which
they can distinguish the relative order of options and other arguments. */
/* Initialize the internal data when the first call is made. */
static const char *
-_getopt_initialize (int argc _UNUSED_PARAMETER_,
- char **argv _UNUSED_PARAMETER_, const char *optstring,
- int posixly_correct, struct _getopt_data *d)
+_getopt_initialize (int argc _GL_UNUSED,
+ char **argv _GL_UNUSED, const char *optstring,
+ struct _getopt_data *d, int posixly_correct)
{
/* Start processing options with ARGV-element 1 (since ARGV-element 0
is the program name); the sequence of previously skipped
`flag' field is nonzero, the value of the option's `val' field
if the `flag' field is zero.
+ The elements of ARGV aren't really const, because we permute them.
+ But we pretend they're const in the prototype to be compatible
+ with other systems.
+
LONGOPTS is a vector of `struct option' terminated by an
element containing a name which is zero.
recent call.
If LONG_ONLY is nonzero, '-' as well as '--' can introduce
- long-named options.
-
- If POSIXLY_CORRECT is nonzero, behave as if the POSIXLY_CORRECT
- environment variable were set. */
+ long-named options. */
int
_getopt_internal_r (int argc, char **argv, const char *optstring,
const struct option *longopts, int *longind,
- int long_only, int posixly_correct, struct _getopt_data *d)
+ int long_only, struct _getopt_data *d, int posixly_correct)
{
int print_errors = d->opterr;
if (optstring[0] == ':')
{
if (d->optind == 0)
d->optind = 1; /* Don't scan ARGV[0], the program name. */
- optstring = _getopt_initialize (argc, argv, optstring,
- posixly_correct, d);
+ optstring = _getopt_initialize (argc, argv, optstring, d,
+ posixly_correct);
d->__initialized = 1;
}
#if defined _LIBC && defined USE_IN_LIBIO
char *buf;
- if (__asprintf (&buf, _("%s: option `%s' is ambiguous\n"),
+ if (__asprintf (&buf, _("%s: option '%s' is ambiguous\n"),
argv[0], argv[d->optind]) >= 0)
{
_IO_flockfile (stderr);
free (buf);
}
#else
- fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
+ fprintf (stderr, _("%s: option '%s' is ambiguous\n"),
argv[0], argv[d->optind]);
#endif
}
/* --option */
#if defined _LIBC && defined USE_IN_LIBIO
n = __asprintf (&buf, _("\
-%s: option `--%s' doesn't allow an argument\n"),
+%s: option '--%s' doesn't allow an argument\n"),
argv[0], pfound->name);
#else
fprintf (stderr, _("\
-%s: option `--%s' doesn't allow an argument\n"),
+%s: option '--%s' doesn't allow an argument\n"),
argv[0], pfound->name);
#endif
}
/* +option or -option */
#if defined _LIBC && defined USE_IN_LIBIO
n = __asprintf (&buf, _("\
-%s: option `%c%s' doesn't allow an argument\n"),
+%s: option '%c%s' doesn't allow an argument\n"),
argv[0], argv[d->optind - 1][0],
pfound->name);
#else
fprintf (stderr, _("\
-%s: option `%c%s' doesn't allow an argument\n"),
+%s: option '%c%s' doesn't allow an argument\n"),
argv[0], argv[d->optind - 1][0],
pfound->name);
#endif
char *buf;
if (__asprintf (&buf, _("\
-%s: option `%s' requires an argument\n"),
+%s: option '%s' requires an argument\n"),
argv[0], argv[d->optind - 1]) >= 0)
{
_IO_flockfile (stderr);
}
#else
fprintf (stderr,
- _("%s: option `%s' requires an argument\n"),
+ _("%s: option '%s' requires an argument\n"),
argv[0], argv[d->optind - 1]);
#endif
}
{
/* --option */
#if defined _LIBC && defined USE_IN_LIBIO
- n = __asprintf (&buf, _("%s: unrecognized option `--%s'\n"),
+ n = __asprintf (&buf, _("%s: unrecognized option '--%s'\n"),
argv[0], d->__nextchar);
#else
- fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
+ fprintf (stderr, _("%s: unrecognized option '--%s'\n"),
argv[0], d->__nextchar);
#endif
}
{
/* +option or -option */
#if defined _LIBC && defined USE_IN_LIBIO
- n = __asprintf (&buf, _("%s: unrecognized option `%c%s'\n"),
+ n = __asprintf (&buf, _("%s: unrecognized option '%c%s'\n"),
argv[0], argv[d->optind][0], d->__nextchar);
#else
- fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
+ fprintf (stderr, _("%s: unrecognized option '%c%s'\n"),
argv[0], argv[d->optind][0], d->__nextchar);
#endif
}
int n;
#endif
- if (d->__posixly_correct)
- {
- /* 1003.2 specifies the format of this message. */
-#if defined _LIBC && defined USE_IN_LIBIO
- n = __asprintf (&buf, _("%s: illegal option -- %c\n"),
- argv[0], c);
-#else
- fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c);
-#endif
- }
- else
- {
#if defined _LIBC && defined USE_IN_LIBIO
- n = __asprintf (&buf, _("%s: invalid option -- %c\n"),
- argv[0], c);
+ n = __asprintf (&buf, _("%s: invalid option -- '%c'\n"),
+ argv[0], c);
#else
- fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c);
+ fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c);
#endif
- }
#if defined _LIBC && defined USE_IN_LIBIO
if (n >= 0)
{
if (print_errors)
{
- /* 1003.2 specifies the format of this message. */
#if defined _LIBC && defined USE_IN_LIBIO
char *buf;
if (__asprintf (&buf,
- _("%s: option requires an argument -- %c\n"),
+ _("%s: option requires an argument -- '%c'\n"),
argv[0], c) >= 0)
{
_IO_flockfile (stderr);
free (buf);
}
#else
- fprintf (stderr, _("%s: option requires an argument -- %c\n"),
+ fprintf (stderr,
+ _("%s: option requires an argument -- '%c'\n"),
argv[0], c);
#endif
}
#if defined _LIBC && defined USE_IN_LIBIO
char *buf;
- if (__asprintf (&buf, _("%s: option `-W %s' is ambiguous\n"),
+ if (__asprintf (&buf, _("%s: option '-W %s' is ambiguous\n"),
argv[0], argv[d->optind]) >= 0)
{
_IO_flockfile (stderr);
free (buf);
}
#else
- fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
+ fprintf (stderr, _("%s: option '-W %s' is ambiguous\n"),
argv[0], argv[d->optind]);
#endif
}
char *buf;
if (__asprintf (&buf, _("\
-%s: option `-W %s' doesn't allow an argument\n"),
+%s: option '-W %s' doesn't allow an argument\n"),
argv[0], pfound->name) >= 0)
{
_IO_flockfile (stderr);
}
#else
fprintf (stderr, _("\
-%s: option `-W %s' doesn't allow an argument\n"),
+%s: option '-W %s' doesn't allow an argument\n"),
argv[0], pfound->name);
#endif
}
char *buf;
if (__asprintf (&buf, _("\
-%s: option `%s' requires an argument\n"),
+%s: option '%s' requires an argument\n"),
argv[0], argv[d->optind - 1]) >= 0)
{
_IO_flockfile (stderr);
}
#else
fprintf (stderr,
- _("%s: option `%s' requires an argument\n"),
+ _("%s: option '%s' requires an argument\n"),
argv[0], argv[d->optind - 1]);
#endif
}
{
if (print_errors)
{
- /* 1003.2 specifies the format of this message. */
#if defined _LIBC && defined USE_IN_LIBIO
char *buf;
if (__asprintf (&buf, _("\
-%s: option requires an argument -- %c\n"),
+%s: option requires an argument -- '%c'\n"),
argv[0], c) >= 0)
{
_IO_flockfile (stderr);
}
#else
fprintf (stderr,
- _("%s: option requires an argument -- %c\n"),
+ _("%s: option requires an argument -- '%c'\n"),
argv[0], c);
#endif
}
int
_getopt_internal (int argc, char **argv, const char *optstring,
- const struct option *longopts, int *longind,
- int long_only, int posixly_correct)
+ const struct option *longopts, int *longind, int long_only,
+ int posixly_correct)
{
int result;
getopt_data.optind = optind;
getopt_data.opterr = opterr;
- result = _getopt_internal_r (argc, argv, optstring, longopts, longind,
- long_only, posixly_correct, &getopt_data);
+ result = _getopt_internal_r (argc, argv, optstring, longopts,
+ longind, long_only, &getopt_data,
+ posixly_correct);
optind = getopt_data.optind;
optarg = getopt_data.optarg;
int
getopt (int argc, char *const *argv, const char *optstring)
{
- return _getopt_internal (argc, (char **) argv, optstring, NULL, NULL, 0,
- POSIXLY_CORRECT);
+ return _getopt_internal (argc, (char **) argv, optstring,
+ (const struct option *) 0,
+ (int *) 0,
+ 0, POSIXLY_CORRECT);
+}
+
+#ifdef _LIBC
+int
+__posix_getopt (int argc, char *const *argv, const char *optstring)
+{
+ return _getopt_internal (argc, argv, optstring,
+ (const struct option *) 0,
+ (int *) 0,
+ 0, 1);
}
+#endif
\f
#ifdef TEST
break;
case 'c':
- printf ("option c with value `%s'\n", optarg);
+ printf ("option c with value '%s'\n", optarg);
break;
case '?':
/* Declarations for getopt.
- Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2005,2006,2007,2009
- Free Software Foundation, Inc.
+ Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2010 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
# endif
#endif
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
#ifdef __cplusplus
extern "C" {
#endif
the environment, then do not permute arguments. */
extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
- __THROW;
+ __THROW _GL_ARG_NONNULL ((2, 3));
#ifndef __need_getopt
extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind)
- __THROW;
+ __THROW _GL_ARG_NONNULL ((2, 3));
extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind)
- __THROW;
+ __THROW _GL_ARG_NONNULL ((2, 3));
#endif
/* getopt_long and getopt_long_only entry points for GNU getopt.
- Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2004,2006,2009
- Free Software Foundation, Inc.
+ Copyright (C) 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997,
+ 1998, 2004, 2006, 2009, 2010 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
struct _getopt_data *d)
{
return _getopt_internal_r (argc, argv, options, long_options, opt_index,
- 0, 0, d);
+ 0, d, 0);
}
/* Like getopt_long, but '-' as well as '--' can indicate a long option.
struct _getopt_data *d)
{
return _getopt_internal_r (argc, argv, options, long_options, opt_index,
- 1, 0, d);
+ 1, d, 0);
}
\f
/* Internal declarations for getopt.
- Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2009
- Free Software Foundation, Inc.
+ Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2010 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
extern int _getopt_internal_r (int ___argc, char **___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind,
- int __long_only, int __posixly_correct,
- struct _getopt_data *__data);
+ int __long_only, struct _getopt_data *__data,
+ int __posixly_correct);
extern int _getopt_long_r (int ___argc, char **___argv,
const char *__shortopts,
/* getpagesize emulation for systems where it cannot be done in a C macro.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-/* Copyright (C) 1992-2001, 2003, 2004, 2005, 2006, 2007 Free Software
- Foundation, Inc.
+/* Copyright (C) 1992-2001, 2003-2007, 2009-2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
/* getpass.h -- Read a password of arbitrary length from /dev/tty or stdin.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2009-2010 Free Software Foundation, Inc.
Contributed by Simon Josefsson <jas@extundo.com>, 2004.
This program is free software; you can redistribute it and/or modify
/* getpeername.c --- wrappers for Windows getpeername function
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* getsockname.c --- wrappers for Windows getsockname function
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* getsockopt.c --- wrappers for Windows getsockopt function
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Parse comma separated list into words.
- Copyright (C) 1996, 1997, 1999, 2004, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1999, 2004, 2007, 2009, 2010 Free Software
+ Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
/* Convenience header for conditional use of GNU <libintl.h>.
- Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* gettime -- get the system clock
- Copyright (C) 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Provide gettimeofday for systems that don't have it or for which it's broken.
- Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, 2009 Free Software
- Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* getugroups.c -- return a list of the groups a user is in
- Copyright (C) 1990, 1991, 1998-2000, 2003-2009 Free Software Foundation.
+ Copyright (C) 1990-1991, 1998-2000, 2003-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
can do is fail with ENOSYS. */
int
-getugroups (int maxcount _UNUSED_PARAMETER_,
- gid_t *grouplist _UNUSED_PARAMETER_,
- char const *username _UNUSED_PARAMETER_,
- gid_t gid _UNUSED_PARAMETER_)
+getugroups (int maxcount _GL_UNUSED,
+ gid_t *grouplist _GL_UNUSED,
+ char const *username _GL_UNUSED,
+ gid_t gid _GL_UNUSED)
{
errno = ENOSYS;
return -1;
/* Get a list of group IDs associated with a specified user ID.
- Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* getusershell.c -- Return names of valid user shells.
- Copyright (C) 1991, 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 Free
- Software Foundation, Inc.
+ Copyright (C) 1991, 1997, 2000-2001, 2003-2006, 2008-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "progname.h"
#include "error.h"
#include "read-file.h"
-#include "gl_list.h"
+#include "gl_xlist.h"
#include "gl_array_list.h"
#include "gl_linkedhash_list.h"
#include "gl_rbtreehash_list.h"
/* Sequential list data type implemented by a binary tree.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009, 2010 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 binary tree.
- Copyright (C) 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
/* -------------------------- gl_list_t Data Type -------------------------- */
/* Create a subtree for count >= 1 elements.
- Its height is h where 2^(h-1) <= count <= 2^h - 1. */
+ Its height is h where 2^(h-1) <= count <= 2^h - 1.
+ Return NULL upon out-of-memory. */
static gl_list_node_t
create_subtree_with_contents (size_t count, const void **contents)
{
size_t half1 = (count - 1) / 2;
size_t half2 = count / 2;
/* Note: half1 + half2 = count - 1. */
- gl_list_node_t node = XMALLOC (struct gl_list_node_impl);
+ gl_list_node_t node =
+ (struct gl_list_node_impl *) malloc (sizeof (struct gl_list_node_impl));
+ if (node == NULL)
+ return NULL;
if (half1 > 0)
{
node->left = create_subtree_with_contents (half1, contents);
+ if (node->left == NULL)
+ goto fail1;
node->left->parent = node;
}
else
if (half2 > 0)
{
node->right = create_subtree_with_contents (half2, contents + half1 + 1);
+ if (node->right == NULL)
+ goto fail2;
node->right->parent = node;
}
else
node->branch_size = count;
return node;
+
+ fail2:
+ if (node->left != NULL)
+ free_subtree (node->left);
+ fail1:
+ free (node);
+ return NULL;
}
static gl_list_t
-gl_tree_create (gl_list_implementation_t implementation,
- gl_listelement_equals_fn equals_fn,
- gl_listelement_hashcode_fn hashcode_fn,
- gl_listelement_dispose_fn dispose_fn,
- bool allow_duplicates,
- size_t count, const void **contents)
+gl_tree_nx_create (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates,
+ size_t count, const void **contents)
{
- struct gl_list_impl *list = XMALLOC (struct gl_list_impl);
+ struct gl_list_impl *list =
+ (struct gl_list_impl *) malloc (sizeof (struct gl_list_impl));
+
+ if (list == NULL)
+ return NULL;
list->base.vtable = implementation;
list->base.equals_fn = equals_fn;
if (estimate < 10)
estimate = 10;
list->table_size = next_prime (estimate);
- list->table = XCALLOC (list->table_size, gl_hash_entry_t);
+ if (size_overflow_p (xtimes (list->table_size, sizeof (gl_hash_entry_t))))
+ goto fail1;
+ list->table =
+ (gl_hash_entry_t *) calloc (list->table_size, sizeof (gl_hash_entry_t));
+ if (list->table == NULL)
+ goto fail1;
}
#endif
if (count > 0)
{
list->root = create_subtree_with_contents (count, contents);
+ if (list->root == NULL)
+ goto fail2;
list->root->parent = NULL;
#if WITH_HASHTABLE
/* Now that the tree is built, node_position() works. Now we can
add the nodes to the hash table. */
- add_nodes_to_buckets (list);
+ if (add_nodes_to_buckets (list) < 0)
+ goto fail3;
#endif
}
else
list->root = NULL;
return list;
+
+#if WITH_HASHTABLE
+ fail3:
+ free_subtree (list->root);
+#endif
+ fail2:
+#if WITH_HASHTABLE
+ free (list->table);
+ fail1:
+#endif
+ free (list);
+ return NULL;
}
/* Ensure the tree is balanced, after an insertion or deletion operation.
}
}
+static void
+gl_tree_remove_node_from_tree (gl_list_t list, gl_list_node_t node)
+{
+ gl_list_node_t parent = node->parent;
+
+ if (node->left == NULL)
+ {
+ /* Replace node with node->right. */
+ gl_list_node_t child = node->right;
+
+ if (child != NULL)
+ child->parent = parent;
+ if (parent == NULL)
+ list->root = child;
+ else
+ {
+ if (parent->left == node)
+ parent->left = child;
+ else /* parent->right == node */
+ parent->right = child;
+
+ /* Update branch_size fields of the parent nodes. */
+ {
+ gl_list_node_t p;
+
+ for (p = parent; p != NULL; p = p->parent)
+ p->branch_size--;
+ }
+
+ rebalance (list, child, -1, parent);
+ }
+ }
+ else if (node->right == NULL)
+ {
+ /* It is not absolutely necessary to treat this case. But the more
+ general case below is more complicated, hence slower. */
+ /* Replace node with node->left. */
+ gl_list_node_t child = node->left;
+
+ child->parent = parent;
+ if (parent == NULL)
+ list->root = child;
+ else
+ {
+ if (parent->left == node)
+ parent->left = child;
+ else /* parent->right == node */
+ parent->right = child;
+
+ /* Update branch_size fields of the parent nodes. */
+ {
+ gl_list_node_t p;
+
+ for (p = parent; p != NULL; p = p->parent)
+ p->branch_size--;
+ }
+
+ rebalance (list, child, -1, parent);
+ }
+ }
+ else
+ {
+ /* Replace node with the rightmost element of the node->left subtree. */
+ gl_list_node_t subst;
+ gl_list_node_t subst_parent;
+ gl_list_node_t child;
+
+ for (subst = node->left; subst->right != NULL; )
+ subst = subst->right;
+
+ subst_parent = subst->parent;
+
+ child = subst->left;
+
+ /* The case subst_parent == node is special: If we do nothing special,
+ we get confusion about node->left, subst->left and child->parent.
+ subst_parent == node
+ <==> The 'for' loop above terminated immediately.
+ <==> subst == subst_parent->left
+ [otherwise subst == subst_parent->right]
+ In this case, we would need to first set
+ child->parent = node; node->left = child;
+ and later - when we copy subst into node's position - again
+ child->parent = subst; subst->left = child;
+ Altogether a no-op. */
+ if (subst_parent != node)
+ {
+ if (child != NULL)
+ child->parent = subst_parent;
+ subst_parent->right = child;
+ }
+
+ /* Update branch_size fields of the parent nodes. */
+ {
+ gl_list_node_t p;
+
+ for (p = subst_parent; p != NULL; p = p->parent)
+ p->branch_size--;
+ }
+
+ /* Copy subst into node's position.
+ (This is safer than to copy subst's value into node, keep node in
+ place, and free subst.) */
+ if (subst_parent != node)
+ {
+ subst->left = node->left;
+ subst->left->parent = subst;
+ }
+ subst->right = node->right;
+ subst->right->parent = subst;
+ subst->balance = node->balance;
+ subst->branch_size = node->branch_size;
+ subst->parent = parent;
+ if (parent == NULL)
+ list->root = subst;
+ else if (parent->left == node)
+ parent->left = subst;
+ else /* parent->right == node */
+ parent->right = subst;
+
+ /* Rebalancing starts at child's parent, that is subst_parent -
+ except when subst_parent == node. In this case, we need to use
+ its replacement, subst. */
+ rebalance (list, child, -1, subst_parent != node ? subst_parent : subst);
+ }
+}
+
static gl_list_node_t
-gl_tree_add_first (gl_list_t list, const void *elt)
+gl_tree_nx_add_first (gl_list_t list, const void *elt)
{
/* Create new node. */
- gl_list_node_t new_node = XMALLOC (struct gl_list_node_impl);
+ gl_list_node_t new_node =
+ (struct gl_list_node_impl *) malloc (sizeof (struct gl_list_node_impl));
+
+ if (new_node == NULL)
+ return NULL;
new_node->left = NULL;
new_node->right = NULL;
/* Add node to the hash table.
Note that this is only possible _after_ the node has been added to the
tree structure, because add_to_bucket() uses node_position(). */
- add_to_bucket (list, new_node);
+ if (add_to_bucket (list, new_node) < 0)
+ {
+ gl_tree_remove_node_from_tree (list, new_node);
+ free (new_node);
+ return NULL;
+ }
hash_resize_after_add (list);
#endif
}
static gl_list_node_t
-gl_tree_add_last (gl_list_t list, const void *elt)
+gl_tree_nx_add_last (gl_list_t list, const void *elt)
{
/* Create new node. */
- gl_list_node_t new_node = XMALLOC (struct gl_list_node_impl);
+ gl_list_node_t new_node =
+ (struct gl_list_node_impl *) malloc (sizeof (struct gl_list_node_impl));
+
+ if (new_node == NULL)
+ return NULL;
new_node->left = NULL;
new_node->right = NULL;
/* Add node to the hash table.
Note that this is only possible _after_ the node has been added to the
tree structure, because add_to_bucket() uses node_position(). */
- add_to_bucket (list, new_node);
+ if (add_to_bucket (list, new_node) < 0)
+ {
+ gl_tree_remove_node_from_tree (list, new_node);
+ free (new_node);
+ return NULL;
+ }
hash_resize_after_add (list);
#endif
}
static gl_list_node_t
-gl_tree_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
+gl_tree_nx_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
{
/* Create new node. */
- gl_list_node_t new_node = XMALLOC (struct gl_list_node_impl);
+ gl_list_node_t new_node;
bool height_inc;
+ new_node =
+ (struct gl_list_node_impl *) malloc (sizeof (struct gl_list_node_impl));
+ if (new_node == NULL)
+ return NULL;
+
new_node->left = NULL;
new_node->right = NULL;
new_node->balance = 0;
/* Add node to the hash table.
Note that this is only possible _after_ the node has been added to the
tree structure, because add_to_bucket() uses node_position(). */
- add_to_bucket (list, new_node);
+ if (add_to_bucket (list, new_node) < 0)
+ {
+ gl_tree_remove_node_from_tree (list, new_node);
+ free (new_node);
+ return NULL;
+ }
hash_resize_after_add (list);
#endif
}
static gl_list_node_t
-gl_tree_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
+gl_tree_nx_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
{
/* Create new node. */
- gl_list_node_t new_node = XMALLOC (struct gl_list_node_impl);
+ gl_list_node_t new_node;
bool height_inc;
+ new_node =
+ (struct gl_list_node_impl *) malloc (sizeof (struct gl_list_node_impl));
+ if (new_node == NULL)
+ return NULL;
+
new_node->left = NULL;
new_node->right = NULL;
new_node->balance = 0;
/* Add node to the hash table.
Note that this is only possible _after_ the node has been added to the
tree structure, because add_to_bucket() uses node_position(). */
- add_to_bucket (list, new_node);
+ if (add_to_bucket (list, new_node) < 0)
+ {
+ gl_tree_remove_node_from_tree (list, new_node);
+ free (new_node);
+ return NULL;
+ }
hash_resize_after_add (list);
#endif
return new_node;
}
-
-static bool
-gl_tree_remove_node (gl_list_t list, gl_list_node_t node)
-{
- gl_list_node_t parent;
-
-#if WITH_HASHTABLE
- /* Remove node from the hash table.
- Note that this is only possible _before_ the node is removed from the
- tree structure, because remove_from_bucket() uses node_position(). */
- remove_from_bucket (list, node);
-#endif
-
- parent = node->parent;
-
- if (node->left == NULL)
- {
- /* Replace node with node->right. */
- gl_list_node_t child = node->right;
-
- if (child != NULL)
- child->parent = parent;
- if (parent == NULL)
- list->root = child;
- else
- {
- if (parent->left == node)
- parent->left = child;
- else /* parent->right == node */
- parent->right = child;
-
- /* Update branch_size fields of the parent nodes. */
- {
- gl_list_node_t p;
-
- for (p = parent; p != NULL; p = p->parent)
- p->branch_size--;
- }
-
- rebalance (list, child, -1, parent);
- }
- }
- else if (node->right == NULL)
- {
- /* It is not absolutely necessary to treat this case. But the more
- general case below is more complicated, hence slower. */
- /* Replace node with node->left. */
- gl_list_node_t child = node->left;
-
- child->parent = parent;
- if (parent == NULL)
- list->root = child;
- else
- {
- if (parent->left == node)
- parent->left = child;
- else /* parent->right == node */
- parent->right = child;
-
- /* Update branch_size fields of the parent nodes. */
- {
- gl_list_node_t p;
-
- for (p = parent; p != NULL; p = p->parent)
- p->branch_size--;
- }
-
- rebalance (list, child, -1, parent);
- }
- }
- else
- {
- /* Replace node with the rightmost element of the node->left subtree. */
- gl_list_node_t subst;
- gl_list_node_t subst_parent;
- gl_list_node_t child;
-
- for (subst = node->left; subst->right != NULL; )
- subst = subst->right;
-
- subst_parent = subst->parent;
-
- child = subst->left;
-
- /* The case subst_parent == node is special: If we do nothing special,
- we get confusion about node->left, subst->left and child->parent.
- subst_parent == node
- <==> The 'for' loop above terminated immediately.
- <==> subst == subst_parent->left
- [otherwise subst == subst_parent->right]
- In this case, we would need to first set
- child->parent = node; node->left = child;
- and later - when we copy subst into node's position - again
- child->parent = subst; subst->left = child;
- Altogether a no-op. */
- if (subst_parent != node)
- {
- if (child != NULL)
- child->parent = subst_parent;
- subst_parent->right = child;
- }
-
- /* Update branch_size fields of the parent nodes. */
- {
- gl_list_node_t p;
-
- for (p = subst_parent; p != NULL; p = p->parent)
- p->branch_size--;
- }
-
- /* Copy subst into node's position.
- (This is safer than to copy subst's value into node, keep node in
- place, and free subst.) */
- if (subst_parent != node)
- {
- subst->left = node->left;
- subst->left->parent = subst;
- }
- subst->right = node->right;
- subst->right->parent = subst;
- subst->balance = node->balance;
- subst->branch_size = node->branch_size;
- subst->parent = parent;
- if (parent == NULL)
- list->root = subst;
- else if (parent->left == node)
- parent->left = subst;
- else /* parent->right == node */
- parent->right = subst;
-
- /* Rebalancing starts at child's parent, that is subst_parent -
- except when subst_parent == node. In this case, we need to use
- its replacement, subst. */
- rebalance (list, child, -1, subst_parent != node ? subst_parent : subst);
- }
-
- if (list->base.dispose_fn != NULL)
- list->base.dispose_fn (node->value);
- free (node);
- return true;
-}
/* Sequential list data type implemented by a hash table with another list.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009, 2010 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 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
{
gl_hash_entry_t *old_table = list->table;
/* Allocate the new table. */
- gl_hash_entry_t *new_table = XCALLOC (new_size, gl_hash_entry_t);
+ gl_hash_entry_t *new_table;
size_t i;
+ if (size_overflow_p (xtimes (new_size, sizeof (gl_hash_entry_t))))
+ goto fail;
+ new_table =
+ (gl_hash_entry_t *) calloc (new_size, sizeof (gl_hash_entry_t));
+ if (new_table == NULL)
+ goto fail;
+
/* Iterate through the entries of the old table. */
for (i = list->table_size; i > 0; )
{
list->table_size = new_size;
free (old_table);
}
+ return;
+
+ fail:
+ /* Just continue without resizing the table. */
+ return;
}
/* Sequential list data type implemented by a linked list.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009, 2010 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-2008 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
/* -------------------------- gl_list_t Data Type -------------------------- */
static gl_list_t
-gl_linked_create_empty (gl_list_implementation_t implementation,
- gl_listelement_equals_fn equals_fn,
- gl_listelement_hashcode_fn hashcode_fn,
- gl_listelement_dispose_fn dispose_fn,
- bool allow_duplicates)
+gl_linked_nx_create_empty (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates)
{
- struct gl_list_impl *list = XMALLOC (struct gl_list_impl);
+ struct gl_list_impl *list =
+ (struct gl_list_impl *) malloc (sizeof (struct gl_list_impl));
+
+ if (list == NULL)
+ return NULL;
list->base.vtable = implementation;
list->base.equals_fn = equals_fn;
list->base.allow_duplicates = allow_duplicates;
#if WITH_HASHTABLE
list->table_size = 11;
- list->table = XCALLOC (list->table_size, gl_hash_entry_t);
+ list->table =
+ (gl_hash_entry_t *) calloc (list->table_size, sizeof (gl_hash_entry_t));
+ if (list->table == NULL)
+ goto fail;
#endif
list->root.next = &list->root;
list->root.prev = &list->root;
list->count = 0;
return list;
+
+#if WITH_HASHTABLE
+ fail:
+ free (list);
+ return NULL;
+#endif
}
static gl_list_t
-gl_linked_create (gl_list_implementation_t implementation,
+gl_linked_nx_create (gl_list_implementation_t implementation,
gl_listelement_equals_fn equals_fn,
gl_listelement_hashcode_fn hashcode_fn,
gl_listelement_dispose_fn dispose_fn,
bool allow_duplicates,
size_t count, const void **contents)
{
- struct gl_list_impl *list = XMALLOC (struct gl_list_impl);
+ struct gl_list_impl *list =
+ (struct gl_list_impl *) malloc (sizeof (struct gl_list_impl));
gl_list_node_t tail;
+ if (list == NULL)
+ return NULL;
+
list->base.vtable = implementation;
list->base.equals_fn = equals_fn;
list->base.hashcode_fn = hashcode_fn;
if (estimate < 10)
estimate = 10;
list->table_size = next_prime (estimate);
- list->table = XCALLOC (list->table_size, gl_hash_entry_t);
+ if (size_overflow_p (xtimes (list->table_size, sizeof (gl_hash_entry_t))))
+ goto fail1;
+ list->table =
+ (gl_hash_entry_t *) calloc (list->table_size, sizeof (gl_hash_entry_t));
+ if (list->table == NULL)
+ goto fail1;
}
#endif
list->count = count;
tail = &list->root;
for (; count > 0; contents++, count--)
{
- gl_list_node_t node = XMALLOC (struct gl_list_node_impl);
+ gl_list_node_t node =
+ (struct gl_list_node_impl *) malloc (sizeof (struct gl_list_node_impl));
+
+ if (node == NULL)
+ goto fail2;
node->value = *contents;
#if WITH_HASHTABLE
: (size_t)(uintptr_t) node->value);
/* Add node to the hash table. */
- add_to_bucket (list, node);
+ if (add_to_bucket (list, node) < 0)
+ {
+ free (node);
+ goto fail2;
+ }
#endif
/* Add node to the list. */
list->root.prev = tail;
return list;
+
+ fail2:
+ {
+ gl_list_node_t node;
+
+ for (node = tail; node != &list->root; )
+ {
+ gl_list_node_t prev = node->prev;
+
+ free (node);
+ node = prev;
+ }
+ }
+#if WITH_HASHTABLE
+ free (list->table);
+ fail1:
+#endif
+ free (list);
+ return NULL;
}
static size_t
return node->value;
}
-static void
-gl_linked_node_set_value (gl_list_t list, gl_list_node_t node, const void *elt)
+static int
+gl_linked_node_nx_set_value (gl_list_t list, gl_list_node_t node,
+ const void *elt)
{
#if WITH_HASHTABLE
if (elt != node->value)
remove_from_bucket (list, node);
node->value = elt;
node->h.hashcode = new_hashcode;
- add_to_bucket (list, node);
+ if (add_to_bucket (list, node) < 0)
+ {
+ /* Out of memory. We removed node from a bucket but cannot add
+ it to another bucket. In order to avoid inconsistencies, we
+ must remove node entirely from the list. */
+ gl_list_node_t before_removed = node->prev;
+ gl_list_node_t after_removed = node->next;
+ ASYNCSAFE(gl_list_node_t) before_removed->next = after_removed;
+ after_removed->prev = before_removed;
+ list->count--;
+ free (node);
+ return -1;
+ }
}
else
node->value = elt;
#else
node->value = elt;
#endif
+ return 0;
}
static gl_list_node_t
}
static gl_list_node_t
-gl_linked_set_at (gl_list_t list, size_t position, const void *elt)
+gl_linked_nx_set_at (gl_list_t list, size_t position, const void *elt)
{
size_t count = list->count;
gl_list_node_t node;
remove_from_bucket (list, node);
node->value = elt;
node->h.hashcode = new_hashcode;
- add_to_bucket (list, node);
+ if (add_to_bucket (list, node) < 0)
+ {
+ /* Out of memory. We removed node from a bucket but cannot add
+ it to another bucket. In order to avoid inconsistencies, we
+ must remove node entirely from the list. */
+ gl_list_node_t before_removed = node->prev;
+ gl_list_node_t after_removed = node->next;
+ ASYNCSAFE(gl_list_node_t) before_removed->next = after_removed;
+ after_removed->prev = before_removed;
+ list->count--;
+ free (node);
+ return NULL;
+ }
}
else
node->value = elt;
}
static gl_list_node_t
-gl_linked_add_first (gl_list_t list, const void *elt)
+gl_linked_nx_add_first (gl_list_t list, const void *elt)
{
- gl_list_node_t node = XMALLOC (struct gl_list_node_impl);
+ gl_list_node_t node =
+ (struct gl_list_node_impl *) malloc (sizeof (struct gl_list_node_impl));
+
+ if (node == NULL)
+ return NULL;
ASYNCSAFE(const void *) node->value = elt;
#if WITH_HASHTABLE
: (size_t)(uintptr_t) node->value);
/* Add node to the hash table. */
- add_to_bucket (list, node);
+ if (add_to_bucket (list, node) < 0)
+ {
+ free (node);
+ return NULL;
+ }
#endif
/* Add node to the list. */
}
static gl_list_node_t
-gl_linked_add_last (gl_list_t list, const void *elt)
+gl_linked_nx_add_last (gl_list_t list, const void *elt)
{
- gl_list_node_t node = XMALLOC (struct gl_list_node_impl);
+ gl_list_node_t node =
+ (struct gl_list_node_impl *) malloc (sizeof (struct gl_list_node_impl));
+
+ if (node == NULL)
+ return NULL;
ASYNCSAFE(const void *) node->value = elt;
#if WITH_HASHTABLE
: (size_t)(uintptr_t) node->value);
/* Add node to the hash table. */
- add_to_bucket (list, node);
+ if (add_to_bucket (list, node) < 0)
+ {
+ free (node);
+ return NULL;
+ }
#endif
/* Add node to the list. */
}
static gl_list_node_t
-gl_linked_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
+gl_linked_nx_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
{
- gl_list_node_t new_node = XMALLOC (struct gl_list_node_impl);
+ gl_list_node_t new_node =
+ (struct gl_list_node_impl *) malloc (sizeof (struct gl_list_node_impl));
+
+ if (new_node == NULL)
+ return NULL;
ASYNCSAFE(const void *) new_node->value = elt;
#if WITH_HASHTABLE
: (size_t)(uintptr_t) new_node->value);
/* Add new_node to the hash table. */
- add_to_bucket (list, new_node);
+ if (add_to_bucket (list, new_node) < 0)
+ {
+ free (new_node);
+ return NULL;
+ }
#endif
/* Add new_node to the list. */
}
static gl_list_node_t
-gl_linked_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
+gl_linked_nx_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
{
- gl_list_node_t new_node = XMALLOC (struct gl_list_node_impl);
+ gl_list_node_t new_node =
+ (struct gl_list_node_impl *) malloc (sizeof (struct gl_list_node_impl));
+
+ if (new_node == NULL)
+ return NULL;
ASYNCSAFE(const void *) new_node->value = elt;
#if WITH_HASHTABLE
: (size_t)(uintptr_t) new_node->value);
/* Add new_node to the hash table. */
- add_to_bucket (list, new_node);
+ if (add_to_bucket (list, new_node) < 0)
+ {
+ free (new_node);
+ return NULL;
+ }
#endif
/* Add new_node to the list. */
}
static gl_list_node_t
-gl_linked_add_at (gl_list_t list, size_t position, const void *elt)
+gl_linked_nx_add_at (gl_list_t list, size_t position, const void *elt)
{
size_t count = list->count;
gl_list_node_t new_node;
/* Invalid argument. */
abort ();
- new_node = XMALLOC (struct gl_list_node_impl);
+ new_node = (struct gl_list_node_impl *) malloc (sizeof (struct gl_list_node_impl));
+ if (new_node == NULL)
+ return NULL;
+
ASYNCSAFE(const void *) new_node->value = elt;
#if WITH_HASHTABLE
new_node->h.hashcode =
: (size_t)(uintptr_t) new_node->value);
/* Add new_node to the hash table. */
- add_to_bucket (list, new_node);
+ if (add_to_bucket (list, new_node) < 0)
+ {
+ free (new_node);
+ return NULL;
+ }
#endif
/* Add new_node to the list. */
}
static gl_list_node_t
-gl_linked_sortedlist_add (gl_list_t list, gl_listelement_compar_fn compar,
- const void *elt)
+gl_linked_sortedlist_nx_add (gl_list_t list, gl_listelement_compar_fn compar,
+ const void *elt)
{
gl_list_node_t node;
for (node = list->root.next; node != &list->root; node = node->next)
if (compar (node->value, elt) >= 0)
- return gl_linked_add_before (list, node, elt);
- return gl_linked_add_last (list, elt);
+ return gl_linked_nx_add_before (list, node, elt);
+ return gl_linked_nx_add_last (list, elt);
}
static bool
/* Sequential list data type implemented by a binary tree.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009, 2010 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 binary tree.
- Copyright (C) 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
/* Create a subtree for count >= 1 elements.
Its black-height bh is passed as argument, with
2^bh - 1 <= count <= 2^(bh+1) - 1. bh == 0 implies count == 1.
- Its height is h where 2^(h-1) <= count <= 2^h - 1. */
+ Its height is h where 2^(h-1) <= count <= 2^h - 1.
+ Return NULL upon out-of-memory. */
static gl_list_node_t
create_subtree_with_contents (unsigned int bh,
size_t count, const void **contents)
size_t half1 = (count - 1) / 2;
size_t half2 = count / 2;
/* Note: half1 + half2 = count - 1. */
- gl_list_node_t node = XMALLOC (struct gl_list_node_impl);
+ gl_list_node_t node =
+ (struct gl_list_node_impl *) malloc (sizeof (struct gl_list_node_impl));
+ if (node == NULL)
+ return NULL;
if (half1 > 0)
{
2^(bh-1) - 1 <= half1 <= 2^bh - 1. */
node->left =
create_subtree_with_contents (bh - 1, half1, contents);
+ if (node->left == NULL)
+ goto fail1;
node->left->parent = node;
}
else
2^(bh-1) - 1 <= half2 <= 2^bh - 1. */
node->right =
create_subtree_with_contents (bh - 1, half2, contents + half1 + 1);
+ if (node->right == NULL)
+ goto fail2;
node->right->parent = node;
}
else
node->branch_size = count;
return node;
+
+ fail2:
+ if (node->left != NULL)
+ free_subtree (node->left);
+ fail1:
+ free (node);
+ return NULL;
}
static gl_list_t
-gl_tree_create (gl_list_implementation_t implementation,
- gl_listelement_equals_fn equals_fn,
- gl_listelement_hashcode_fn hashcode_fn,
- gl_listelement_dispose_fn dispose_fn,
- bool allow_duplicates,
- size_t count, const void **contents)
+gl_tree_nx_create (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates,
+ size_t count, const void **contents)
{
- struct gl_list_impl *list = XMALLOC (struct gl_list_impl);
+ struct gl_list_impl *list =
+ (struct gl_list_impl *) malloc (sizeof (struct gl_list_impl));
+
+ if (list == NULL)
+ return NULL;
list->base.vtable = implementation;
list->base.equals_fn = equals_fn;
if (estimate < 10)
estimate = 10;
list->table_size = next_prime (estimate);
- list->table = XCALLOC (list->table_size, gl_hash_entry_t);
+ if (size_overflow_p (xtimes (list->table_size, sizeof (gl_hash_entry_t))))
+ goto fail1;
+ list->table =
+ (gl_hash_entry_t *) calloc (list->table_size, sizeof (gl_hash_entry_t));
+ if (list->table == NULL)
+ goto fail1;
}
#endif
if (count > 0)
}
list->root = create_subtree_with_contents (bh, count, contents);
+ if (list->root == NULL)
+ goto fail2;
list->root->parent = NULL;
#if WITH_HASHTABLE
/* Now that the tree is built, node_position() works. Now we can
add the nodes to the hash table. */
- add_nodes_to_buckets (list);
+ if (add_nodes_to_buckets (list) < 0)
+ goto fail3;
#endif
}
else
list->root = NULL;
return list;
+
+#if WITH_HASHTABLE
+ fail3:
+ free_subtree (list->root);
+#endif
+ fail2:
+#if WITH_HASHTABLE
+ free (list->table);
+ fail1:
+#endif
+ free (list);
+ return NULL;
}
/* Rotate left a subtree.
}
}
+static void
+gl_tree_remove_node_from_tree (gl_list_t list, gl_list_node_t node)
+{
+ gl_list_node_t parent = node->parent;
+
+ if (node->left == NULL)
+ {
+ /* Replace node with node->right. */
+ gl_list_node_t child = node->right;
+
+ if (child != NULL)
+ {
+ child->parent = parent;
+ /* Since node->left == NULL, child must be RED and of height 1,
+ hence node must have been BLACK. Recolor the child. */
+ child->color = BLACK;
+ }
+ if (parent == NULL)
+ list->root = child;
+ else
+ {
+ if (parent->left == node)
+ parent->left = child;
+ else /* parent->right == node */
+ parent->right = child;
+
+ /* Update branch_size fields of the parent nodes. */
+ {
+ gl_list_node_t p;
+
+ for (p = parent; p != NULL; p = p->parent)
+ p->branch_size--;
+ }
+
+ if (child == NULL && node->color == BLACK)
+ rebalance_after_remove (list, child, parent);
+ }
+ }
+ else if (node->right == NULL)
+ {
+ /* It is not absolutely necessary to treat this case. But the more
+ general case below is more complicated, hence slower. */
+ /* Replace node with node->left. */
+ gl_list_node_t child = node->left;
+
+ child->parent = parent;
+ /* Since node->right == NULL, child must be RED and of height 1,
+ hence node must have been BLACK. Recolor the child. */
+ child->color = BLACK;
+ if (parent == NULL)
+ list->root = child;
+ else
+ {
+ if (parent->left == node)
+ parent->left = child;
+ else /* parent->right == node */
+ parent->right = child;
+
+ /* Update branch_size fields of the parent nodes. */
+ {
+ gl_list_node_t p;
+
+ for (p = parent; p != NULL; p = p->parent)
+ p->branch_size--;
+ }
+ }
+ }
+ else
+ {
+ /* Replace node with the rightmost element of the node->left subtree. */
+ gl_list_node_t subst;
+ gl_list_node_t subst_parent;
+ gl_list_node_t child;
+ color_t removed_color;
+
+ for (subst = node->left; subst->right != NULL; )
+ subst = subst->right;
+
+ subst_parent = subst->parent;
+
+ child = subst->left;
+
+ removed_color = subst->color;
+
+ /* The case subst_parent == node is special: If we do nothing special,
+ we get confusion about node->left, subst->left and child->parent.
+ subst_parent == node
+ <==> The 'for' loop above terminated immediately.
+ <==> subst == subst_parent->left
+ [otherwise subst == subst_parent->right]
+ In this case, we would need to first set
+ child->parent = node; node->left = child;
+ and later - when we copy subst into node's position - again
+ child->parent = subst; subst->left = child;
+ Altogether a no-op. */
+ if (subst_parent != node)
+ {
+ if (child != NULL)
+ child->parent = subst_parent;
+ subst_parent->right = child;
+ }
+
+ /* Update branch_size fields of the parent nodes. */
+ {
+ gl_list_node_t p;
+
+ for (p = subst_parent; p != NULL; p = p->parent)
+ p->branch_size--;
+ }
+
+ /* Copy subst into node's position.
+ (This is safer than to copy subst's value into node, keep node in
+ place, and free subst.) */
+ if (subst_parent != node)
+ {
+ subst->left = node->left;
+ subst->left->parent = subst;
+ }
+ subst->right = node->right;
+ subst->right->parent = subst;
+ subst->color = node->color;
+ subst->branch_size = node->branch_size;
+ subst->parent = parent;
+ if (parent == NULL)
+ list->root = subst;
+ else if (parent->left == node)
+ parent->left = subst;
+ else /* parent->right == node */
+ parent->right = subst;
+
+ if (removed_color == BLACK)
+ {
+ if (child != NULL && child->color == RED)
+ /* Recolor the child. */
+ child->color = BLACK;
+ else
+ /* Rebalancing starts at child's parent, that is subst_parent -
+ except when subst_parent == node. In this case, we need to use
+ its replacement, subst. */
+ rebalance_after_remove (list, child,
+ subst_parent != node ? subst_parent : subst);
+ }
+ }
+}
+
static gl_list_node_t
-gl_tree_add_first (gl_list_t list, const void *elt)
+gl_tree_nx_add_first (gl_list_t list, const void *elt)
{
/* Create new node. */
- gl_list_node_t new_node = XMALLOC (struct gl_list_node_impl);
+ gl_list_node_t new_node =
+ (struct gl_list_node_impl *) malloc (sizeof (struct gl_list_node_impl));
+
+ if (new_node == NULL)
+ return NULL;
new_node->left = NULL;
new_node->right = NULL;
/* Add node to the hash table.
Note that this is only possible _after_ the node has been added to the
tree structure, because add_to_bucket() uses node_position(). */
- add_to_bucket (list, new_node);
+ if (add_to_bucket (list, new_node) < 0)
+ {
+ gl_tree_remove_node_from_tree (list, new_node);
+ free (new_node);
+ return NULL;
+ }
hash_resize_after_add (list);
#endif
}
static gl_list_node_t
-gl_tree_add_last (gl_list_t list, const void *elt)
+gl_tree_nx_add_last (gl_list_t list, const void *elt)
{
/* Create new node. */
- gl_list_node_t new_node = XMALLOC (struct gl_list_node_impl);
+ gl_list_node_t new_node =
+ (struct gl_list_node_impl *) malloc (sizeof (struct gl_list_node_impl));
+
+ if (new_node == NULL)
+ return NULL;
new_node->left = NULL;
new_node->right = NULL;
/* Add node to the hash table.
Note that this is only possible _after_ the node has been added to the
tree structure, because add_to_bucket() uses node_position(). */
- add_to_bucket (list, new_node);
+ if (add_to_bucket (list, new_node) < 0)
+ {
+ gl_tree_remove_node_from_tree (list, new_node);
+ free (new_node);
+ return NULL;
+ }
hash_resize_after_add (list);
#endif
}
static gl_list_node_t
-gl_tree_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
+gl_tree_nx_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
{
/* Create new node. */
- gl_list_node_t new_node = XMALLOC (struct gl_list_node_impl);
+ gl_list_node_t new_node =
+ (struct gl_list_node_impl *) malloc (sizeof (struct gl_list_node_impl));
+
+ if (new_node == NULL)
+ return NULL;
new_node->left = NULL;
new_node->right = NULL;
/* Add node to the hash table.
Note that this is only possible _after_ the node has been added to the
tree structure, because add_to_bucket() uses node_position(). */
- add_to_bucket (list, new_node);
+ if (add_to_bucket (list, new_node) < 0)
+ {
+ gl_tree_remove_node_from_tree (list, new_node);
+ free (new_node);
+ return NULL;
+ }
hash_resize_after_add (list);
#endif
}
static gl_list_node_t
-gl_tree_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
+gl_tree_nx_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
{
/* Create new node. */
- gl_list_node_t new_node = XMALLOC (struct gl_list_node_impl);
+ gl_list_node_t new_node =
+ (struct gl_list_node_impl *) malloc (sizeof (struct gl_list_node_impl));
+
+ if (new_node == NULL)
+ return NULL;
new_node->left = NULL;
new_node->right = NULL;
/* Add node to the hash table.
Note that this is only possible _after_ the node has been added to the
tree structure, because add_to_bucket() uses node_position(). */
- add_to_bucket (list, new_node);
+ if (add_to_bucket (list, new_node) < 0)
+ {
+ gl_tree_remove_node_from_tree (list, new_node);
+ free (new_node);
+ return NULL;
+ }
hash_resize_after_add (list);
#endif
return new_node;
}
-
-static bool
-gl_tree_remove_node (gl_list_t list, gl_list_node_t node)
-{
- gl_list_node_t parent;
-
-#if WITH_HASHTABLE
- /* Remove node from the hash table.
- Note that this is only possible _before_ the node is removed from the
- tree structure, because remove_from_bucket() uses node_position(). */
- remove_from_bucket (list, node);
-#endif
-
- parent = node->parent;
-
- if (node->left == NULL)
- {
- /* Replace node with node->right. */
- gl_list_node_t child = node->right;
-
- if (child != NULL)
- {
- child->parent = parent;
- /* Since node->left == NULL, child must be RED and of height 1,
- hence node must have been BLACK. Recolor the child. */
- child->color = BLACK;
- }
- if (parent == NULL)
- list->root = child;
- else
- {
- if (parent->left == node)
- parent->left = child;
- else /* parent->right == node */
- parent->right = child;
-
- /* Update branch_size fields of the parent nodes. */
- {
- gl_list_node_t p;
-
- for (p = parent; p != NULL; p = p->parent)
- p->branch_size--;
- }
-
- if (child == NULL && node->color == BLACK)
- rebalance_after_remove (list, child, parent);
- }
- }
- else if (node->right == NULL)
- {
- /* It is not absolutely necessary to treat this case. But the more
- general case below is more complicated, hence slower. */
- /* Replace node with node->left. */
- gl_list_node_t child = node->left;
-
- child->parent = parent;
- /* Since node->right == NULL, child must be RED and of height 1,
- hence node must have been BLACK. Recolor the child. */
- child->color = BLACK;
- if (parent == NULL)
- list->root = child;
- else
- {
- if (parent->left == node)
- parent->left = child;
- else /* parent->right == node */
- parent->right = child;
-
- /* Update branch_size fields of the parent nodes. */
- {
- gl_list_node_t p;
-
- for (p = parent; p != NULL; p = p->parent)
- p->branch_size--;
- }
- }
- }
- else
- {
- /* Replace node with the rightmost element of the node->left subtree. */
- gl_list_node_t subst;
- gl_list_node_t subst_parent;
- gl_list_node_t child;
- color_t removed_color;
-
- for (subst = node->left; subst->right != NULL; )
- subst = subst->right;
-
- subst_parent = subst->parent;
-
- child = subst->left;
-
- removed_color = subst->color;
-
- /* The case subst_parent == node is special: If we do nothing special,
- we get confusion about node->left, subst->left and child->parent.
- subst_parent == node
- <==> The 'for' loop above terminated immediately.
- <==> subst == subst_parent->left
- [otherwise subst == subst_parent->right]
- In this case, we would need to first set
- child->parent = node; node->left = child;
- and later - when we copy subst into node's position - again
- child->parent = subst; subst->left = child;
- Altogether a no-op. */
- if (subst_parent != node)
- {
- if (child != NULL)
- child->parent = subst_parent;
- subst_parent->right = child;
- }
-
- /* Update branch_size fields of the parent nodes. */
- {
- gl_list_node_t p;
-
- for (p = subst_parent; p != NULL; p = p->parent)
- p->branch_size--;
- }
-
- /* Copy subst into node's position.
- (This is safer than to copy subst's value into node, keep node in
- place, and free subst.) */
- if (subst_parent != node)
- {
- subst->left = node->left;
- subst->left->parent = subst;
- }
- subst->right = node->right;
- subst->right->parent = subst;
- subst->color = node->color;
- subst->branch_size = node->branch_size;
- subst->parent = parent;
- if (parent == NULL)
- list->root = subst;
- else if (parent->left == node)
- parent->left = subst;
- else /* parent->right == node */
- parent->right = subst;
-
- if (removed_color == BLACK)
- {
- if (child != NULL && child->color == RED)
- /* Recolor the child. */
- child->color = BLACK;
- else
- /* Rebalancing starts at child's parent, that is subst_parent -
- except when subst_parent == node. In this case, we need to use
- its replacement, subst. */
- rebalance_after_remove (list, child,
- subst_parent != node ? subst_parent : subst);
- }
- }
-
- if (list->base.dispose_fn != NULL)
- list->base.dispose_fn (node->value);
- free (node);
- return true;
-}
/* Sequential list data type implemented by a binary tree.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
/* A stack used for iterating across the elements. */
typedef iterstack_item_t iterstack_t[MAXHEIGHT];
+
+/* Free a non-empty subtree recursively.
+ This function is recursive and therefore not very fast. */
+static void
+free_subtree (gl_list_node_t node)
+{
+ if (node->left != NULL)
+ free_subtree (node->left);
+ if (node->right != NULL)
+ free_subtree (node->right);
+ free (node);
+}
/* Sequential list data type implemented by a binary tree.
- Copyright (C) 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
gl_avltreehash_list.c, gl_rbtreehash_list.c. */
static gl_list_t
-gl_tree_create_empty (gl_list_implementation_t implementation,
- gl_listelement_equals_fn equals_fn,
- gl_listelement_hashcode_fn hashcode_fn,
- gl_listelement_dispose_fn dispose_fn,
- bool allow_duplicates)
+gl_tree_nx_create_empty (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates)
{
- struct gl_list_impl *list = XMALLOC (struct gl_list_impl);
+ struct gl_list_impl *list = (struct gl_list_impl *) malloc (sizeof (struct gl_list_impl));
+
+ if (list == NULL)
+ return NULL;
list->base.vtable = implementation;
list->base.equals_fn = equals_fn;
list->base.allow_duplicates = allow_duplicates;
#if WITH_HASHTABLE
list->table_size = 11;
- list->table = XCALLOC (list->table_size, gl_hash_entry_t);
+ list->table =
+ (gl_hash_entry_t *) calloc (list->table_size, sizeof (gl_hash_entry_t));
+ if (list->table == NULL)
+ goto fail;
#endif
list->root = NULL;
return list;
+
+#if WITH_HASHTABLE
+ fail:
+ free (list);
+ return NULL;
+#endif
}
static size_t
return node->value;
}
-static void
-gl_tree_node_set_value (gl_list_t list, gl_list_node_t node, const void *elt)
+static int
+gl_tree_node_nx_set_value (gl_list_t list, gl_list_node_t node, const void *elt)
{
#if WITH_HASHTABLE
if (elt != node->value)
remove_from_bucket (list, node);
node->value = elt;
node->h.hashcode = new_hashcode;
- add_to_bucket (list, node);
+ if (add_to_bucket (list, node) < 0)
+ {
+ /* Out of memory. We removed node from a bucket but cannot add
+ it to another bucket. In order to avoid inconsistencies, we
+ must remove node entirely from the list. */
+ gl_tree_remove_node_from_tree (list, node);
+ free (node);
+ return -1;
+ }
}
else
node->value = elt;
#else
node->value = elt;
#endif
+ return 0;
}
static gl_list_node_t
}
static gl_list_node_t
-gl_tree_set_at (gl_list_t list, size_t position, const void *elt)
+gl_tree_nx_set_at (gl_list_t list, size_t position, const void *elt)
{
gl_list_node_t node = list->root;
remove_from_bucket (list, node);
node->value = elt;
node->h.hashcode = new_hashcode;
- add_to_bucket (list, node);
+ if (add_to_bucket (list, node) < 0)
+ {
+ /* Out of memory. We removed node from a bucket but cannot add
+ it to another bucket. In order to avoid inconsistencies, we
+ must remove node entirely from the list. */
+ gl_tree_remove_node_from_tree (list, node);
+ free (node);
+ return NULL;
+ }
}
else
node->value = elt;
#endif
static gl_list_node_t
-gl_tree_add_at (gl_list_t list, size_t position, const void *elt)
+gl_tree_nx_add_at (gl_list_t list, size_t position, const void *elt)
{
size_t count = (list->root != NULL ? list->root->branch_size : 0);
/* Invalid argument. */
abort ();
if (position == count)
- return gl_tree_add_last (list, elt);
+ return gl_tree_nx_add_last (list, elt);
else
- return gl_tree_add_before (list, node_at (list->root, position), elt);
+ return gl_tree_nx_add_before (list, node_at (list->root, position), elt);
+}
+
+static bool
+gl_tree_remove_node (gl_list_t list, gl_list_node_t node)
+{
+#if WITH_HASHTABLE
+ /* Remove node from the hash table.
+ Note that this is only possible _before_ the node is removed from the
+ tree structure, because remove_from_bucket() uses node_position(). */
+ remove_from_bucket (list, node);
+#endif
+
+ gl_tree_remove_node_from_tree (list, node);
+
+ if (list->base.dispose_fn != NULL)
+ list->base.dispose_fn (node->value);
+ free (node);
+ return true;
}
static bool
}
static gl_list_node_t
-gl_tree_sortedlist_add (gl_list_t list, gl_listelement_compar_fn compar,
- const void *elt)
+gl_tree_sortedlist_nx_add (gl_list_t list, gl_listelement_compar_fn compar,
+ const void *elt)
{
gl_list_node_t node = list->root;
if (node == NULL)
- return gl_tree_add_first (list, elt);
+ return gl_tree_nx_add_first (list, elt);
for (;;)
{
if (cmp < 0)
{
if (node->right == NULL)
- return gl_tree_add_after (list, node, elt);
+ return gl_tree_nx_add_after (list, node, elt);
node = node->right;
}
else if (cmp > 0)
{
if (node->left == NULL)
- return gl_tree_add_before (list, node, elt);
+ return gl_tree_nx_add_before (list, node, elt);
node = node->left;
}
else /* cmp == 0 */
- return gl_tree_add_before (list, node, elt);
+ return gl_tree_nx_add_before (list, node, elt);
}
}
/* Ordered set data type implemented by a binary tree.
- Copyright (C) 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
typedef iterstack_item_t iterstack_t[MAXHEIGHT];
static gl_oset_t
-gl_tree_create_empty (gl_oset_implementation_t implementation,
- gl_setelement_compar_fn compar_fn,
- gl_setelement_dispose_fn dispose_fn)
+gl_tree_nx_create_empty (gl_oset_implementation_t implementation,
+ gl_setelement_compar_fn compar_fn,
+ gl_setelement_dispose_fn dispose_fn)
{
- struct gl_oset_impl *set = XMALLOC (struct gl_oset_impl);
+ struct gl_oset_impl *set =
+ (struct gl_oset_impl *) malloc (sizeof (struct gl_oset_impl));
+
+ if (set == NULL)
+ return NULL;
set->base.vtable = implementation;
set->base.compar_fn = compar_fn;
return NULL;
}
-static bool
-gl_tree_add (gl_oset_t set, const void *elt)
+static int
+gl_tree_nx_add (gl_oset_t set, const void *elt)
{
gl_setelement_compar_fn compar;
gl_oset_node_t node = set->root;
if (node == NULL)
{
- gl_tree_add_first (set, elt);
+ if (gl_tree_nx_add_first (set, elt) == NULL)
+ return -1;
return true;
}
{
if (node->right == NULL)
{
- gl_tree_add_after (set, node, elt);
+ if (gl_tree_nx_add_after (set, node, elt) == NULL)
+ return -1;
return true;
}
node = node->right;
{
if (node->left == NULL)
{
- gl_tree_add_before (set, node, elt);
+ if (gl_tree_nx_add_before (set, node, elt) == NULL)
+ return -1;
return true;
}
node = node->left;
/* Sequential list data type implemented by a hash table with a binary tree.
- Copyright (C) 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
/* Add a node to the hash table structure.
If duplicates are allowed, this function performs in average time
- O((log n)^2): gl_oset_add may need to add an element to an ordered set of
- size O(n), needing O(log n) comparison function calls. The comparison
+ O((log n)^2): gl_oset_nx_add may need to add an element to an ordered set
+ of size O(n), needing O(log n) comparison function calls. The comparison
function is compare_by_position, which is O(log n) worst-case.
- If duplicates are forbidden, this function is O(1). */
-static void
+ If duplicates are forbidden, this function is O(1).
+ Return 0 upon success, -1 upon out-of-memory. */
+static int
add_to_bucket (gl_list_t list, gl_list_node_t new_node)
{
size_t bucket = new_node->h.hashcode % list->table_size;
{
/* Found already multiple nodes with the same value.
Add the new_node to it. */
- gl_oset_add (nodes, new_node);
- return;
+ return gl_oset_nx_add (nodes, new_node);
}
}
else
struct gl_multiple_nodes *multi_entry;
nodes =
- gl_oset_create_empty (OSET_TREE_FLAVOR,
- compare_by_position, NULL);
+ gl_oset_nx_create_empty (OSET_TREE_FLAVOR,
+ compare_by_position, NULL);
+ if (nodes == NULL)
+ return -1;
- gl_oset_add (nodes, node);
- gl_oset_add (nodes, new_node);
+ if (gl_oset_nx_add (nodes, node) < 0)
+ goto fail;
+ if (gl_oset_nx_add (nodes, new_node) < 0)
+ goto fail;
- multi_entry = XMALLOC (struct gl_multiple_nodes);
+ multi_entry =
+ (struct gl_multiple_nodes *) malloc (sizeof (struct gl_multiple_nodes));
+ if (multi_entry == NULL)
+ goto fail;
multi_entry->h.hash_next = entry->hash_next;
multi_entry->h.hashcode = entry->hashcode;
multi_entry->magic = MULTIPLE_NODES_MAGIC;
multi_entry->nodes = nodes;
*entryp = &multi_entry->h;
- return;
+ return 0;
+
+ fail:
+ gl_oset_free (nodes);
+ return -1;
}
}
}
/* If no duplicates are allowed, multiple nodes are not needed. */
new_node->h.hash_next = list->table[bucket];
list->table[bucket] = &new_node->h;
+ return 0;
}
+/* Tell GCC that the likely return value is 0. */
+#if __GNUC__ >= 3
+# define add_to_bucket(list,node) \
+ __builtin_expect ((add_to_bucket) (list, node), 0)
+#endif
/* Remove a node from the hash table structure.
If duplicates are allowed, this function performs in average time
}
/* Build up the hash table during initialization: Store all the nodes of
- list->root in the hash table. */
-static inline void
+ list->root in the hash table.
+ Return 0 upon success, -1 upon out-of-memory. */
+static inline int
add_nodes_to_buckets (gl_list_t list)
{
/* Iterate across all nodes. */
for (;;)
{
if (stack_ptr == &stack[0])
- return;
+ goto done;
stack_ptr--;
if (!stack_ptr->rightp)
break;
(list->base.hashcode_fn != NULL
? list->base.hashcode_fn (node->value)
: (size_t)(uintptr_t) node->value);
- add_to_bucket (list, node);
+ if (add_to_bucket (list, node) < 0)
+ goto fail;
/* Descend on right branch. */
stack_ptr->rightp = true;
node = node->right;
stack_ptr++;
}
+ done:
+ return 0;
+
+ fail:
+ /* Undo everything. */
+ for (;;)
+ {
+ /* Descend on left branch. */
+ stack_ptr->rightp = false;
+ node = node->left;
+ stack_ptr++;
+ /* Descend on right branch. */
+ for (;;)
+ {
+ if (node == NULL)
+ break;
+ stack_ptr->node = node;
+ stack_ptr->rightp = true;
+ node = node->right;
+ stack_ptr++;
+ }
+ /* Climb up again. */
+ for (;;)
+ {
+ if (stack_ptr == &stack[0])
+ goto fail_done;
+ stack_ptr--;
+ if (stack_ptr->rightp)
+ break;
+ }
+ node = stack_ptr->node;
+ /* Remove the current node from the hash table. */
+ remove_from_bucket (list, node);
+ }
+ fail_done:
+ return -1;
}
+/* Tell GCC that the likely return value is 0. */
+#if __GNUC__ >= 3
+# define add_nodes_to_buckets(list) \
+ __builtin_expect ((add_nodes_to_buckets) (list), 0)
+#endif
/* Sequential list data type implemented by a hash table with a binary tree.
- Copyright (C) 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2010 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 an array.
- Copyright (C) 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
/* Get memcpy. */
#include <string.h>
-#include "xalloc.h"
-
/* Checked size_t computations. */
#include "xsize.h"
#define NODE_TO_INDEX(node) ((uintptr_t)(node) - 1)
static gl_list_t
-gl_array_create_empty (gl_list_implementation_t implementation,
- gl_listelement_equals_fn equals_fn,
- gl_listelement_hashcode_fn hashcode_fn,
- gl_listelement_dispose_fn dispose_fn,
- bool allow_duplicates)
+gl_array_nx_create_empty (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates)
{
- struct gl_list_impl *list = XMALLOC (struct gl_list_impl);
+ struct gl_list_impl *list =
+ (struct gl_list_impl *) malloc (sizeof (struct gl_list_impl));
+
+ if (list == NULL)
+ return NULL;
list->base.vtable = implementation;
list->base.equals_fn = equals_fn;
}
static gl_list_t
-gl_array_create (gl_list_implementation_t implementation,
- gl_listelement_equals_fn equals_fn,
- gl_listelement_hashcode_fn hashcode_fn,
- gl_listelement_dispose_fn dispose_fn,
- bool allow_duplicates,
- size_t count, const void **contents)
+gl_array_nx_create (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates,
+ size_t count, const void **contents)
{
- struct gl_list_impl *list = XMALLOC (struct gl_list_impl);
+ struct gl_list_impl *list =
+ (struct gl_list_impl *) malloc (sizeof (struct gl_list_impl));
+
+ if (list == NULL)
+ return NULL;
list->base.vtable = implementation;
list->base.equals_fn = equals_fn;
list->base.allow_duplicates = allow_duplicates;
if (count > 0)
{
- list->elements = XNMALLOC (count, const void *);
+ if (size_overflow_p (xtimes (count, sizeof (const void *))))
+ goto fail;
+ list->elements = (const void **) malloc (count * sizeof (const void *));
+ if (list->elements == NULL)
+ goto fail;
memcpy (list->elements, contents, count * sizeof (const void *));
}
else
list->allocated = count;
return list;
+
+ fail:
+ free (list);
+ return NULL;
}
static size_t
return list->elements[index];
}
-static void
-gl_array_node_set_value (gl_list_t list, gl_list_node_t node, const void *elt)
+static int
+gl_array_node_nx_set_value (gl_list_t list, gl_list_node_t node,
+ const void *elt)
{
uintptr_t index = NODE_TO_INDEX (node);
if (!(index < list->count))
/* Invalid argument. */
abort ();
list->elements[index] = elt;
+ return 0;
}
static gl_list_node_t
}
static gl_list_node_t
-gl_array_set_at (gl_list_t list, size_t position, const void *elt)
+gl_array_nx_set_at (gl_list_t list, size_t position, const void *elt)
{
size_t count = list->count;
return INDEX_TO_NODE (index);
}
-/* Ensure that list->allocated > list->count. */
-static void
+/* Ensure that list->allocated > list->count.
+ Return 0 upon success, -1 upon out-of-memory. */
+static int
grow (gl_list_t list)
{
size_t new_allocated;
memory_size = xtimes (new_allocated, sizeof (const void *));
if (size_overflow_p (memory_size))
/* Overflow, would lead to out of memory. */
- xalloc_die ();
- memory = (const void **) xrealloc (list->elements, memory_size);
+ return -1;
+ memory = (const void **) realloc (list->elements, memory_size);
if (memory == NULL)
/* Out of memory. */
- xalloc_die ();
+ return -1;
list->elements = memory;
list->allocated = new_allocated;
+ return 0;
}
static gl_list_node_t
-gl_array_add_first (gl_list_t list, const void *elt)
+gl_array_nx_add_first (gl_list_t list, const void *elt)
{
size_t count = list->count;
const void **elements;
size_t i;
if (count == list->allocated)
- grow (list);
+ if (grow (list) < 0)
+ return NULL;
elements = list->elements;
for (i = count; i > 0; i--)
elements[i] = elements[i - 1];
}
static gl_list_node_t
-gl_array_add_last (gl_list_t list, const void *elt)
+gl_array_nx_add_last (gl_list_t list, const void *elt)
{
size_t count = list->count;
if (count == list->allocated)
- grow (list);
+ if (grow (list) < 0)
+ return NULL;
list->elements[count] = elt;
list->count = count + 1;
return INDEX_TO_NODE (count);
}
static gl_list_node_t
-gl_array_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
+gl_array_nx_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
{
size_t count = list->count;
uintptr_t index = NODE_TO_INDEX (node);
abort ();
position = index;
if (count == list->allocated)
- grow (list);
+ if (grow (list) < 0)
+ return NULL;
elements = list->elements;
for (i = count; i > position; i--)
elements[i] = elements[i - 1];
}
static gl_list_node_t
-gl_array_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
+gl_array_nx_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
{
size_t count = list->count;
uintptr_t index = NODE_TO_INDEX (node);
abort ();
position = index + 1;
if (count == list->allocated)
- grow (list);
+ if (grow (list) < 0)
+ return NULL;
elements = list->elements;
for (i = count; i > position; i--)
elements[i] = elements[i - 1];
}
static gl_list_node_t
-gl_array_add_at (gl_list_t list, size_t position, const void *elt)
+gl_array_nx_add_at (gl_list_t list, size_t position, const void *elt)
{
size_t count = list->count;
const void **elements;
/* Invalid argument. */
abort ();
if (count == list->allocated)
- grow (list);
+ if (grow (list) < 0)
+ return NULL;
elements = list->elements;
for (i = count; i > position; i--)
elements[i] = elements[i - 1];
}
static gl_list_node_t
-gl_array_sortedlist_add (gl_list_t list, gl_listelement_compar_fn compar,
- const void *elt)
+gl_array_sortedlist_nx_add (gl_list_t list, gl_listelement_compar_fn compar,
+ const void *elt)
{
size_t count = list->count;
size_t low = 0;
break;
}
}
- return gl_array_add_at (list, low, elt);
+ return gl_array_nx_add_at (list, low, elt);
}
static bool
const struct gl_list_implementation gl_array_list_implementation =
{
- gl_array_create_empty,
- gl_array_create,
+ gl_array_nx_create_empty,
+ gl_array_nx_create,
gl_array_size,
gl_array_node_value,
- gl_array_node_set_value,
+ gl_array_node_nx_set_value,
gl_array_next_node,
gl_array_previous_node,
gl_array_get_at,
- gl_array_set_at,
+ gl_array_nx_set_at,
gl_array_search_from_to,
gl_array_indexof_from_to,
- gl_array_add_first,
- gl_array_add_last,
- gl_array_add_before,
- gl_array_add_after,
- gl_array_add_at,
+ gl_array_nx_add_first,
+ gl_array_nx_add_last,
+ gl_array_nx_add_before,
+ gl_array_nx_add_after,
+ gl_array_nx_add_at,
gl_array_remove_node,
gl_array_remove_at,
gl_array_remove,
gl_array_sortedlist_search_from_to,
gl_array_sortedlist_indexof,
gl_array_sortedlist_indexof_from_to,
- gl_array_sortedlist_add,
+ gl_array_sortedlist_nx_add,
gl_array_sortedlist_remove
};
/* Sequential list data type implemented by an array.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009, 2010 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 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2010 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 <stdlib.h>
-#include "xalloc.h"
-
/* Checked size_t computations. */
#include "xsize.h"
};
static gl_oset_t
-gl_array_create_empty (gl_oset_implementation_t implementation,
- gl_setelement_compar_fn compar_fn,
- gl_setelement_dispose_fn dispose_fn)
+gl_array_nx_create_empty (gl_oset_implementation_t implementation,
+ gl_setelement_compar_fn compar_fn,
+ gl_setelement_dispose_fn dispose_fn)
{
- struct gl_oset_impl *set = XMALLOC (struct gl_oset_impl);
+ struct gl_oset_impl *set =
+ (struct gl_oset_impl *) malloc (sizeof (struct gl_oset_impl));
+
+ if (set == NULL)
+ return NULL;
set->base.vtable = implementation;
set->base.compar_fn = compar_fn;
return false;
}
-/* Ensure that set->allocated > set->count. */
-static void
+/* Ensure that set->allocated > set->count.
+ Return 0 upon success, -1 upon out-of-memory. */
+static int
grow (gl_oset_t set)
{
size_t new_allocated;
memory_size = xtimes (new_allocated, sizeof (const void *));
if (size_overflow_p (memory_size))
/* Overflow, would lead to out of memory. */
- xalloc_die ();
- memory = (const void **) xrealloc (set->elements, memory_size);
+ return -1;
+ memory = (const void **) realloc (set->elements, memory_size);
if (memory == NULL)
/* Out of memory. */
- xalloc_die ();
+ return -1;
set->elements = memory;
set->allocated = new_allocated;
+ return 0;
}
/* Add the given element ELT at the given position,
- 0 <= position <= gl_oset_size (set). */
-static inline void
-gl_array_add_at (gl_oset_t set, size_t position, const void *elt)
+ 0 <= position <= gl_oset_size (set).
+ Return 1 upon success, -1 upon out-of-memory. */
+static inline int
+gl_array_nx_add_at (gl_oset_t set, size_t position, const void *elt)
{
size_t count = set->count;
const void **elements;
size_t i;
if (count == set->allocated)
- grow (set);
+ if (grow (set) < 0)
+ return -1;
elements = set->elements;
for (i = count; i > position; i--)
elements[i] = elements[i - 1];
elements[position] = elt;
set->count = count + 1;
+ return 1;
}
/* Remove the element at the given position,
set->count = count - 1;
}
-static bool
-gl_array_add (gl_oset_t set, const void *elt)
+static int
+gl_array_nx_add (gl_oset_t set, const void *elt)
{
size_t count = set->count;
size_t low = 0;
}
while (low < high);
}
- gl_array_add_at (set, low, elt);
- return true;
+ return gl_array_nx_add_at (set, low, elt);
}
static bool
const struct gl_oset_implementation gl_array_oset_implementation =
{
- gl_array_create_empty,
+ gl_array_nx_create_empty,
gl_array_size,
gl_array_search,
gl_array_search_atleast,
- gl_array_add,
+ gl_array_nx_add,
gl_array_remove,
gl_array_free,
gl_array_iterator,
/* Ordered set data type implemented by an array.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009, 2010 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 binary tree.
- Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2008-2010 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 <stdlib.h>
-#include "xalloc.h"
-
/* -------------------------- gl_list_t Data Type -------------------------- */
/* Generic AVL tree code. */
#include "gl_anyavltree_list1.h"
-#include "gl_anyavltree_list2.h"
/* Generic binary tree code. */
#include "gl_anytree_list1.h"
+
+/* Generic AVL tree code. */
+#include "gl_anyavltree_list2.h"
+
+/* Generic binary tree code. */
#include "gl_anytree_list2.h"
/* For debugging. */
const struct gl_list_implementation gl_avltree_list_implementation =
{
- gl_tree_create_empty,
- gl_tree_create,
+ gl_tree_nx_create_empty,
+ gl_tree_nx_create,
gl_tree_size,
gl_tree_node_value,
- gl_tree_node_set_value,
+ gl_tree_node_nx_set_value,
gl_tree_next_node,
gl_tree_previous_node,
gl_tree_get_at,
- gl_tree_set_at,
+ gl_tree_nx_set_at,
gl_tree_search_from_to,
gl_tree_indexof_from_to,
- gl_tree_add_first,
- gl_tree_add_last,
- gl_tree_add_before,
- gl_tree_add_after,
- gl_tree_add_at,
+ gl_tree_nx_add_first,
+ gl_tree_nx_add_last,
+ gl_tree_nx_add_before,
+ gl_tree_nx_add_after,
+ gl_tree_nx_add_at,
gl_tree_remove_node,
gl_tree_remove_at,
gl_tree_remove,
gl_tree_sortedlist_search_from_to,
gl_tree_sortedlist_indexof,
gl_tree_sortedlist_indexof_from_to,
- gl_tree_sortedlist_add,
+ gl_tree_sortedlist_nx_add,
gl_tree_sortedlist_remove
};
/* Sequential list data type implemented by a binary tree.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009, 2010 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-2007 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2010 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 <stdlib.h>
-#include "xalloc.h"
-
/* An AVL tree is a binary tree where
1. The height of each node is calculated as
heightof(node) = 1 + max (heightof(node.left), heightof(node.right)).
}
static gl_oset_node_t
-gl_tree_add_first (gl_oset_t set, const void *elt)
+gl_tree_nx_add_first (gl_oset_t set, const void *elt)
{
/* Create new node. */
- gl_oset_node_t new_node = XMALLOC (struct gl_oset_node_impl);
+ gl_oset_node_t new_node =
+ (struct gl_oset_node_impl *) malloc (sizeof (struct gl_oset_node_impl));
+
+ if (new_node == NULL)
+ return NULL;
new_node->left = NULL;
new_node->right = NULL;
}
static gl_oset_node_t
-gl_tree_add_before (gl_oset_t set, gl_oset_node_t node, const void *elt)
+gl_tree_nx_add_before (gl_oset_t set, gl_oset_node_t node, const void *elt)
{
/* Create new node. */
- gl_oset_node_t new_node = XMALLOC (struct gl_oset_node_impl);
+ gl_oset_node_t new_node =
+ (struct gl_oset_node_impl *) malloc (sizeof (struct gl_oset_node_impl));
bool height_inc;
+ if (new_node == NULL)
+ return NULL;
+
new_node->left = NULL;
new_node->right = NULL;
new_node->balance = 0;
}
static gl_oset_node_t
-gl_tree_add_after (gl_oset_t set, gl_oset_node_t node, const void *elt)
+gl_tree_nx_add_after (gl_oset_t set, gl_oset_node_t node, const void *elt)
{
/* Create new node. */
- gl_oset_node_t new_node = XMALLOC (struct gl_oset_node_impl);
+ gl_oset_node_t new_node =
+ (struct gl_oset_node_impl *) malloc (sizeof (struct gl_oset_node_impl));
bool height_inc;
+ if (new_node == NULL)
+ return NULL;
+
new_node->left = NULL;
new_node->right = NULL;
new_node->balance = 0;
const struct gl_oset_implementation gl_avltree_oset_implementation =
{
- gl_tree_create_empty,
+ gl_tree_nx_create_empty,
gl_tree_size,
gl_tree_search,
gl_tree_search_atleast,
- gl_tree_add,
+ gl_tree_nx_add,
gl_tree_remove,
gl_tree_oset_free,
gl_tree_iterator,
/* Ordered set data type implemented by a binary tree.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009, 2010 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 binary tree.
- Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2008-2010 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 <stdlib.h>
#include "gl_avltree_oset.h"
-#include "xalloc.h"
#include "xsize.h"
#ifndef uintptr_t
const struct gl_list_implementation gl_avltreehash_list_implementation =
{
- gl_tree_create_empty,
- gl_tree_create,
+ gl_tree_nx_create_empty,
+ gl_tree_nx_create,
gl_tree_size,
gl_tree_node_value,
- gl_tree_node_set_value,
+ gl_tree_node_nx_set_value,
gl_tree_next_node,
gl_tree_previous_node,
gl_tree_get_at,
- gl_tree_set_at,
+ gl_tree_nx_set_at,
gl_tree_search_from_to,
gl_tree_indexof_from_to,
- gl_tree_add_first,
- gl_tree_add_last,
- gl_tree_add_before,
- gl_tree_add_after,
- gl_tree_add_at,
+ gl_tree_nx_add_first,
+ gl_tree_nx_add_last,
+ gl_tree_nx_add_before,
+ gl_tree_nx_add_after,
+ gl_tree_nx_add_at,
gl_tree_remove_node,
gl_tree_remove_at,
gl_tree_remove,
gl_tree_sortedlist_search_from_to,
gl_tree_sortedlist_indexof,
gl_tree_sortedlist_indexof_from_to,
- gl_tree_sortedlist_add,
+ gl_tree_sortedlist_nx_add,
gl_tree_sortedlist_remove
};
/* Sequential list data type implemented by a hash table with a binary tree.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009, 2010 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 circular array.
- Copyright (C) 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
/* Get memcpy. */
#include <string.h>
-#include "xalloc.h"
-
/* Checked size_t computations. */
#include "xsize.h"
#define NODE_TO_INDEX(node) ((uintptr_t)(node) - 1)
static gl_list_t
-gl_carray_create_empty (gl_list_implementation_t implementation,
- gl_listelement_equals_fn equals_fn,
- gl_listelement_hashcode_fn hashcode_fn,
- gl_listelement_dispose_fn dispose_fn,
- bool allow_duplicates)
+gl_carray_nx_create_empty (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates)
{
- struct gl_list_impl *list = XMALLOC (struct gl_list_impl);
+ struct gl_list_impl *list =
+ (struct gl_list_impl *) malloc (sizeof (struct gl_list_impl));
+
+ if (list == NULL)
+ return NULL;
list->base.vtable = implementation;
list->base.equals_fn = equals_fn;
}
static gl_list_t
-gl_carray_create (gl_list_implementation_t implementation,
+gl_carray_nx_create (gl_list_implementation_t implementation,
gl_listelement_equals_fn equals_fn,
gl_listelement_hashcode_fn hashcode_fn,
gl_listelement_dispose_fn dispose_fn,
bool allow_duplicates,
size_t count, const void **contents)
{
- struct gl_list_impl *list = XMALLOC (struct gl_list_impl);
+ struct gl_list_impl *list =
+ (struct gl_list_impl *) malloc (sizeof (struct gl_list_impl));
+
+ if (list == NULL)
+ return NULL;
list->base.vtable = implementation;
list->base.equals_fn = equals_fn;
list->base.allow_duplicates = allow_duplicates;
if (count > 0)
{
- list->elements = XNMALLOC (count, const void *);
+ if (size_overflow_p (xtimes (count, sizeof (const void *))))
+ goto fail;
+ list->elements = (const void **) malloc (count * sizeof (const void *));
+ if (list->elements == NULL)
+ goto fail;
memcpy (list->elements, contents, count * sizeof (const void *));
}
else
list->allocated = count;
return list;
+
+ fail:
+ free (list);
+ return NULL;
}
static size_t
return list->elements[i];
}
-static void
-gl_carray_node_set_value (gl_list_t list, gl_list_node_t node, const void *elt)
+static int
+gl_carray_node_nx_set_value (gl_list_t list, gl_list_node_t node,
+ const void *elt)
{
uintptr_t index = NODE_TO_INDEX (node);
size_t i;
if (i >= list->allocated)
i -= list->allocated;
list->elements[i] = elt;
+ return 0;
}
static gl_list_node_t
}
static gl_list_node_t
-gl_carray_set_at (gl_list_t list, size_t position, const void *elt)
+gl_carray_nx_set_at (gl_list_t list, size_t position, const void *elt)
{
size_t count = list->count;
size_t i;
return INDEX_TO_NODE (index);
}
-/* Ensure that list->allocated > list->count. */
-static void
+/* Ensure that list->allocated > list->count.
+ Return 0 upon success, -1 upon out-of-memory. */
+static int
grow (gl_list_t list)
{
size_t new_allocated;
memory_size = xtimes (new_allocated, sizeof (const void *));
if (size_overflow_p (memory_size))
/* Overflow, would lead to out of memory. */
- xalloc_die ();
+ return -1;
if (list->offset > 0 && list->count > 0)
{
- memory = (const void **) xmalloc (memory_size);
+ memory = (const void **) malloc (memory_size);
if (memory == NULL)
/* Out of memory. */
- xalloc_die ();
+ return -1;
if (list->offset + list->count > list->allocated)
{
memcpy (memory, &list->elements[list->offset],
}
else
{
- memory = (const void **) xrealloc (list->elements, memory_size);
+ memory = (const void **) realloc (list->elements, memory_size);
if (memory == NULL)
/* Out of memory. */
- xalloc_die ();
+ return -1;
}
list->elements = memory;
list->offset = 0;
list->allocated = new_allocated;
+ return 0;
}
static gl_list_node_t
-gl_carray_add_first (gl_list_t list, const void *elt)
+gl_carray_nx_add_first (gl_list_t list, const void *elt)
{
size_t count = list->count;
if (count == list->allocated)
- grow (list);
+ if (grow (list) < 0)
+ return NULL;
list->offset = (list->offset == 0 ? list->allocated : list->offset) - 1;
list->elements[list->offset] = elt;
list->count = count + 1;
}
static gl_list_node_t
-gl_carray_add_last (gl_list_t list, const void *elt)
+gl_carray_nx_add_last (gl_list_t list, const void *elt)
{
size_t count = list->count;
size_t i;
if (count == list->allocated)
- grow (list);
+ if (grow (list) < 0)
+ return NULL;
i = list->offset + count;
if (i >= list->allocated)
i -= list->allocated;
}
static gl_list_node_t
-gl_carray_add_at (gl_list_t list, size_t position, const void *elt)
+gl_carray_nx_add_at (gl_list_t list, size_t position, const void *elt)
{
size_t count = list->count;
const void **elements;
/* Invalid argument. */
abort ();
if (count == list->allocated)
- grow (list);
+ if (grow (list) < 0)
+ return NULL;
elements = list->elements;
if (position <= (count / 2))
{
}
static gl_list_node_t
-gl_carray_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
+gl_carray_nx_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
{
size_t count = list->count;
uintptr_t index = NODE_TO_INDEX (node);
if (!(index < count))
/* Invalid argument. */
abort ();
- return gl_carray_add_at (list, index, elt);
+ return gl_carray_nx_add_at (list, index, elt);
}
static gl_list_node_t
-gl_carray_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
+gl_carray_nx_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
{
size_t count = list->count;
uintptr_t index = NODE_TO_INDEX (node);
if (!(index < count))
/* Invalid argument. */
abort ();
- return gl_carray_add_at (list, index + 1, elt);
+ return gl_carray_nx_add_at (list, index + 1, elt);
}
static bool
}
static gl_list_node_t
-gl_carray_sortedlist_add (gl_list_t list, gl_listelement_compar_fn compar,
- const void *elt)
+gl_carray_sortedlist_nx_add (gl_list_t list, gl_listelement_compar_fn compar,
+ const void *elt)
{
size_t count = list->count;
size_t low = 0;
break;
}
}
- return gl_carray_add_at (list, low, elt);
+ return gl_carray_nx_add_at (list, low, elt);
}
static bool
const struct gl_list_implementation gl_carray_list_implementation =
{
- gl_carray_create_empty,
- gl_carray_create,
+ gl_carray_nx_create_empty,
+ gl_carray_nx_create,
gl_carray_size,
gl_carray_node_value,
- gl_carray_node_set_value,
+ gl_carray_node_nx_set_value,
gl_carray_next_node,
gl_carray_previous_node,
gl_carray_get_at,
- gl_carray_set_at,
+ gl_carray_nx_set_at,
gl_carray_search_from_to,
gl_carray_indexof_from_to,
- gl_carray_add_first,
- gl_carray_add_last,
- gl_carray_add_before,
- gl_carray_add_after,
- gl_carray_add_at,
+ gl_carray_nx_add_first,
+ gl_carray_nx_add_last,
+ gl_carray_nx_add_before,
+ gl_carray_nx_add_after,
+ gl_carray_nx_add_at,
gl_carray_remove_node,
gl_carray_remove_at,
gl_carray_remove,
gl_carray_sortedlist_search_from_to,
gl_carray_sortedlist_indexof,
gl_carray_sortedlist_indexof_from_to,
- gl_carray_sortedlist_add,
+ gl_carray_sortedlist_nx_add,
gl_carray_sortedlist_remove
};
/* Sequential list data type implemented by a circular array.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009, 2010 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, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2008-2010 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 <stdlib.h>
-#include "xalloc.h"
-
/* -------------------------- gl_list_t Data Type -------------------------- */
/* Generic linked list code. */
const struct gl_list_implementation gl_linked_list_implementation =
{
- gl_linked_create_empty,
- gl_linked_create,
+ gl_linked_nx_create_empty,
+ gl_linked_nx_create,
gl_linked_size,
gl_linked_node_value,
- gl_linked_node_set_value,
+ gl_linked_node_nx_set_value,
gl_linked_next_node,
gl_linked_previous_node,
gl_linked_get_at,
- gl_linked_set_at,
+ gl_linked_nx_set_at,
gl_linked_search_from_to,
gl_linked_indexof_from_to,
- gl_linked_add_first,
- gl_linked_add_last,
- gl_linked_add_before,
- gl_linked_add_after,
- gl_linked_add_at,
+ gl_linked_nx_add_first,
+ gl_linked_nx_add_last,
+ gl_linked_nx_add_before,
+ gl_linked_nx_add_after,
+ gl_linked_nx_add_at,
gl_linked_remove_node,
gl_linked_remove_at,
gl_linked_remove,
gl_linked_sortedlist_search_from_to,
gl_linked_sortedlist_indexof,
gl_linked_sortedlist_indexof_from_to,
- gl_linked_sortedlist_add,
+ gl_linked_sortedlist_nx_add,
gl_linked_sortedlist_remove
};
/* Sequential list data type implemented by a linked list.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009, 2010 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 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2008-2010 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 <stdint.h> /* for SIZE_MAX */
#include <stdlib.h>
-#include "xalloc.h"
#include "xsize.h"
#ifndef uintptr_t
node->h.hash_next = list->table[bucket];
list->table[bucket] = &node->h;
}
+/* Tell all compilers that the return value is 0. */
+#define add_to_bucket(list,node) ((add_to_bucket) (list, node), 0)
/* Remove a node from the hash table structure. */
static inline void
const struct gl_list_implementation gl_linkedhash_list_implementation =
{
- gl_linked_create_empty,
- gl_linked_create,
+ gl_linked_nx_create_empty,
+ gl_linked_nx_create,
gl_linked_size,
gl_linked_node_value,
- gl_linked_node_set_value,
+ gl_linked_node_nx_set_value,
gl_linked_next_node,
gl_linked_previous_node,
gl_linked_get_at,
- gl_linked_set_at,
+ gl_linked_nx_set_at,
gl_linked_search_from_to,
gl_linked_indexof_from_to,
- gl_linked_add_first,
- gl_linked_add_last,
- gl_linked_add_before,
- gl_linked_add_after,
- gl_linked_add_at,
+ gl_linked_nx_add_first,
+ gl_linked_nx_add_last,
+ gl_linked_nx_add_before,
+ gl_linked_nx_add_after,
+ gl_linked_nx_add_at,
gl_linked_remove_node,
gl_linked_remove_at,
gl_linked_remove,
gl_linked_sortedlist_search_from_to,
gl_linked_sortedlist_indexof,
gl_linked_sortedlist_indexof_from_to,
- gl_linked_sortedlist_add,
+ gl_linked_sortedlist_nx_add,
gl_linked_sortedlist_remove
};
/* Sequential list data type implemented by a hash table with a linked list.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009, 2010 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-2009 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
Use #define to avoid a warning because of extern vs. static. */
gl_list_t
-gl_list_create_empty (gl_list_implementation_t implementation,
- gl_listelement_equals_fn equals_fn,
- gl_listelement_hashcode_fn hashcode_fn,
- gl_listelement_dispose_fn dispose_fn,
- bool allow_duplicates)
+gl_list_nx_create_empty (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates)
{
- return implementation->create_empty (implementation, equals_fn, hashcode_fn,
- dispose_fn, allow_duplicates);
+ return implementation->nx_create_empty (implementation, equals_fn,
+ hashcode_fn, dispose_fn,
+ allow_duplicates);
}
gl_list_t
-gl_list_create (gl_list_implementation_t implementation,
- gl_listelement_equals_fn equals_fn,
- gl_listelement_hashcode_fn hashcode_fn,
- gl_listelement_dispose_fn dispose_fn,
- bool allow_duplicates,
- size_t count, const void **contents)
+gl_list_nx_create (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates,
+ size_t count, const void **contents)
{
- return implementation->create (implementation, equals_fn, hashcode_fn,
- dispose_fn, allow_duplicates, count, contents);
+ return implementation->nx_create (implementation, equals_fn, hashcode_fn,
+ dispose_fn, allow_duplicates, count,
+ contents);
}
size_t
->node_value (list, node);
}
-void
-gl_list_node_set_value (gl_list_t list, gl_list_node_t node, const void *elt)
+int
+gl_list_node_nx_set_value (gl_list_t list, gl_list_node_t node,
+ const void *elt)
{
- ((const struct gl_list_impl_base *) list)->vtable
- ->node_set_value (list, node, elt);
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->node_nx_set_value (list, node, elt);
}
gl_list_node_t
}
gl_list_node_t
-gl_list_set_at (gl_list_t list, size_t position, const void *elt)
+gl_list_nx_set_at (gl_list_t list, size_t position, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
- ->set_at (list, position, elt);
+ ->nx_set_at (list, position, elt);
}
gl_list_node_t
}
gl_list_node_t
-gl_list_add_first (gl_list_t list, const void *elt)
+gl_list_nx_add_first (gl_list_t list, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
- ->add_first (list, elt);
+ ->nx_add_first (list, elt);
}
gl_list_node_t
-gl_list_add_last (gl_list_t list, const void *elt)
+gl_list_nx_add_last (gl_list_t list, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
- ->add_last (list, elt);
+ ->nx_add_last (list, elt);
}
gl_list_node_t
-gl_list_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
+gl_list_nx_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
- ->add_before (list, node, elt);
+ ->nx_add_before (list, node, elt);
}
gl_list_node_t
-gl_list_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
+gl_list_nx_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
- ->add_after (list, node, elt);
+ ->nx_add_after (list, node, elt);
}
gl_list_node_t
-gl_list_add_at (gl_list_t list, size_t position, const void *elt)
+gl_list_nx_add_at (gl_list_t list, size_t position, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
- ->add_at (list, position, elt);
+ ->nx_add_at (list, position, elt);
}
bool
}
gl_list_node_t
-gl_sortedlist_add (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
+gl_sortedlist_nx_add (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
- ->sortedlist_add (list, compar, elt);
+ ->sortedlist_nx_add (list, compar, elt);
}
bool
/* Abstract sequential list data type.
- Copyright (C) 2006-2009 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
DISPOSE_FN is an element disposal function or NULL.
ALLOW_DUPLICATES is false if duplicate elements shall not be allowed in
the list. The implementation may verify this at runtime. */
+#if 0 /* declared in gl_xlist.h */
extern gl_list_t gl_list_create_empty (gl_list_implementation_t implementation,
gl_listelement_equals_fn equals_fn,
gl_listelement_hashcode_fn hashcode_fn,
gl_listelement_dispose_fn dispose_fn,
bool allow_duplicates);
+#endif
+/* Likewise. Return NULL upon out-of-memory. */
+extern gl_list_t gl_list_nx_create_empty (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates);
/* Create a list with given contents.
IMPLEMENTATION is one of GL_ARRAY_LIST, GL_CARRAY_LIST, GL_LINKED_LIST,
the list. The implementation may verify this at runtime.
COUNT is the number of initial elements.
CONTENTS[0..COUNT-1] is the initial contents. */
+#if 0 /* declared in gl_xlist.h */
extern gl_list_t gl_list_create (gl_list_implementation_t implementation,
gl_listelement_equals_fn equals_fn,
gl_listelement_hashcode_fn hashcode_fn,
gl_listelement_dispose_fn dispose_fn,
bool allow_duplicates,
size_t count, const void **contents);
+#endif
+/* Likewise. Return NULL upon out-of-memory. */
+extern gl_list_t gl_list_nx_create (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates,
+ size_t count, const void **contents);
/* Return the current number of elements in a list. */
extern size_t gl_list_size (gl_list_t list);
extern const void * gl_list_node_value (gl_list_t list, gl_list_node_t node);
/* Replace the element value represented by a list node. */
+#if 0 /* declared in gl_xlist.h */
extern void gl_list_node_set_value (gl_list_t list, gl_list_node_t node,
const void *elt);
+#endif
+/* Likewise. Return 0 upon success, -1 upon out-of-memory. */
+extern int gl_list_node_nx_set_value (gl_list_t list, gl_list_node_t node,
+ const void *elt)
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ __attribute__ ((__warn_unused_result__))
+#endif
+ ;
/* Return the node immediately after the given node in the list, or NULL
if the given node is the last (rightmost) one in the list. */
/* Replace the element at a given position in the list.
POSITION must be >= 0 and < gl_list_size (list).
Return its node. */
+#if 0 /* declared in gl_xlist.h */
extern gl_list_node_t gl_list_set_at (gl_list_t list, size_t position,
const void *elt);
+#endif
+/* Likewise. Return NULL upon out-of-memory. */
+extern gl_list_node_t gl_list_nx_set_at (gl_list_t list, size_t position,
+ const void *elt)
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ __attribute__ ((__warn_unused_result__))
+#endif
+ ;
/* Search whether an element is already in the list.
Return its node if found, or NULL if not present in the list. */
/* Add an element as the first element of the list.
Return its node. */
+#if 0 /* declared in gl_xlist.h */
extern gl_list_node_t gl_list_add_first (gl_list_t list, const void *elt);
+#endif
+/* Likewise. Return NULL upon out-of-memory. */
+extern gl_list_node_t gl_list_nx_add_first (gl_list_t list, const void *elt)
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ __attribute__ ((__warn_unused_result__))
+#endif
+ ;
/* Add an element as the last element of the list.
Return its node. */
+#if 0 /* declared in gl_xlist.h */
extern gl_list_node_t gl_list_add_last (gl_list_t list, const void *elt);
+#endif
+/* Likewise. Return NULL upon out-of-memory. */
+extern gl_list_node_t gl_list_nx_add_last (gl_list_t list, const void *elt)
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ __attribute__ ((__warn_unused_result__))
+#endif
+ ;
/* Add an element before a given element node of the list.
Return its node. */
+#if 0 /* declared in gl_xlist.h */
extern gl_list_node_t gl_list_add_before (gl_list_t list, gl_list_node_t node,
const void *elt);
+#endif
+/* Likewise. Return NULL upon out-of-memory. */
+extern gl_list_node_t gl_list_nx_add_before (gl_list_t list,
+ gl_list_node_t node,
+ const void *elt)
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ __attribute__ ((__warn_unused_result__))
+#endif
+ ;
/* Add an element after a given element node of the list.
Return its node. */
+#if 0 /* declared in gl_xlist.h */
extern gl_list_node_t gl_list_add_after (gl_list_t list, gl_list_node_t node,
const void *elt);
+#endif
+/* Likewise. Return NULL upon out-of-memory. */
+extern gl_list_node_t gl_list_nx_add_after (gl_list_t list, gl_list_node_t node,
+ const void *elt)
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ __attribute__ ((__warn_unused_result__))
+#endif
+ ;
-/* Add an element add a given position in the list.
+/* Add an element at a given position in the list.
POSITION must be >= 0 and <= gl_list_size (list). */
+#if 0 /* declared in gl_xlist.h */
extern gl_list_node_t gl_list_add_at (gl_list_t list, size_t position,
const void *elt);
+#endif
+/* Likewise. Return NULL upon out-of-memory. */
+extern gl_list_node_t gl_list_nx_add_at (gl_list_t list, size_t position,
+ const void *elt)
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ __attribute__ ((__warn_unused_result__))
+#endif
+ ;
/* Remove an element from the list.
Return true. */
/* Add an element at the appropriate position in the list.
The list is assumed to be sorted with COMPAR.
Return its node. */
+#if 0 /* declared in gl_xlist.h */
extern gl_list_node_t gl_sortedlist_add (gl_list_t list,
gl_listelement_compar_fn compar,
const void *elt);
+#endif
+/* Likewise. Return NULL upon out-of-memory. */
+extern gl_list_node_t gl_sortedlist_nx_add (gl_list_t list,
+ gl_listelement_compar_fn compar,
+ const void *elt)
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ __attribute__ ((__warn_unused_result__))
+#endif
+ ;
/* Search and remove an element from the list.
The list is assumed to be sorted with COMPAR.
struct gl_list_implementation
{
/* gl_list_t functions. */
- gl_list_t (*create_empty) (gl_list_implementation_t implementation,
- gl_listelement_equals_fn equals_fn,
- gl_listelement_hashcode_fn hashcode_fn,
- gl_listelement_dispose_fn dispose_fn,
- bool allow_duplicates);
- gl_list_t (*create) (gl_list_implementation_t implementation,
- gl_listelement_equals_fn equals_fn,
- gl_listelement_hashcode_fn hashcode_fn,
- gl_listelement_dispose_fn dispose_fn,
- bool allow_duplicates,
- size_t count, const void **contents);
+ gl_list_t (*nx_create_empty) (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates);
+ gl_list_t (*nx_create) (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates,
+ size_t count, const void **contents);
size_t (*size) (gl_list_t list);
const void * (*node_value) (gl_list_t list, gl_list_node_t node);
- void (*node_set_value) (gl_list_t list, gl_list_node_t node, const void *elt);
+ int (*node_nx_set_value) (gl_list_t list, gl_list_node_t node,
+ const void *elt);
gl_list_node_t (*next_node) (gl_list_t list, gl_list_node_t node);
gl_list_node_t (*previous_node) (gl_list_t list, gl_list_node_t node);
const void * (*get_at) (gl_list_t list, size_t position);
- gl_list_node_t (*set_at) (gl_list_t list, size_t position, const void *elt);
+ gl_list_node_t (*nx_set_at) (gl_list_t list, size_t position,
+ const void *elt);
gl_list_node_t (*search_from_to) (gl_list_t list, size_t start_index,
size_t end_index, const void *elt);
size_t (*indexof_from_to) (gl_list_t list, size_t start_index,
size_t end_index, const void *elt);
- gl_list_node_t (*add_first) (gl_list_t list, const void *elt);
- gl_list_node_t (*add_last) (gl_list_t list, const void *elt);
- gl_list_node_t (*add_before) (gl_list_t list, gl_list_node_t node,
- const void *elt);
- gl_list_node_t (*add_after) (gl_list_t list, gl_list_node_t node,
+ gl_list_node_t (*nx_add_first) (gl_list_t list, const void *elt);
+ gl_list_node_t (*nx_add_last) (gl_list_t list, const void *elt);
+ gl_list_node_t (*nx_add_before) (gl_list_t list, gl_list_node_t node,
+ const void *elt);
+ gl_list_node_t (*nx_add_after) (gl_list_t list, gl_list_node_t node,
+ const void *elt);
+ gl_list_node_t (*nx_add_at) (gl_list_t list, size_t position,
const void *elt);
- gl_list_node_t (*add_at) (gl_list_t list, size_t position,
- const void *elt);
bool (*remove_node) (gl_list_t list, gl_list_node_t node);
bool (*remove_at) (gl_list_t list, size_t position);
bool (*remove_elt) (gl_list_t list, const void *elt);
gl_listelement_compar_fn compar,
size_t start_index, size_t end_index,
const void *elt);
- gl_list_node_t (*sortedlist_add) (gl_list_t list,
- gl_listelement_compar_fn compar,
+ gl_list_node_t (*sortedlist_nx_add) (gl_list_t list,
+ gl_listelement_compar_fn compar,
const void *elt);
bool (*sortedlist_remove) (gl_list_t list,
gl_listelement_compar_fn compar,
struct gl_list_implementation.
Use #define to avoid a warning because of extern vs. static. */
-# define gl_list_create_empty gl_list_create_empty_inline
+# define gl_list_nx_create_empty gl_list_nx_create_empty_inline
static inline gl_list_t
-gl_list_create_empty (gl_list_implementation_t implementation,
- gl_listelement_equals_fn equals_fn,
- gl_listelement_hashcode_fn hashcode_fn,
- gl_listelement_dispose_fn dispose_fn,
- bool allow_duplicates)
+gl_list_nx_create_empty (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates)
{
- return implementation->create_empty (implementation, equals_fn, hashcode_fn,
- dispose_fn, allow_duplicates);
+ return implementation->nx_create_empty (implementation, equals_fn,
+ hashcode_fn, dispose_fn,
+ allow_duplicates);
}
-# define gl_list_create gl_list_create_inline
+# define gl_list_nx_create gl_list_nx_create_inline
static inline gl_list_t
-gl_list_create (gl_list_implementation_t implementation,
- gl_listelement_equals_fn equals_fn,
- gl_listelement_hashcode_fn hashcode_fn,
- gl_listelement_dispose_fn dispose_fn,
- bool allow_duplicates,
- size_t count, const void **contents)
+gl_list_nx_create (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates,
+ size_t count, const void **contents)
{
- return implementation->create (implementation, equals_fn, hashcode_fn,
- dispose_fn, allow_duplicates, count, contents);
+ return implementation->nx_create (implementation, equals_fn, hashcode_fn,
+ dispose_fn, allow_duplicates, count,
+ contents);
}
# define gl_list_size gl_list_size_inline
->node_value (list, node);
}
-# define gl_list_node_set_value gl_list_node_set_value_inline
-static inline void
-gl_list_node_set_value (gl_list_t list, gl_list_node_t node, const void *elt)
+# define gl_list_node_nx_set_value gl_list_node_nx_set_value_inline
+static inline int
+gl_list_node_nx_set_value (gl_list_t list, gl_list_node_t node,
+ const void *elt)
{
- ((const struct gl_list_impl_base *) list)->vtable
- ->node_set_value (list, node, elt);
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->node_nx_set_value (list, node, elt);
}
# define gl_list_next_node gl_list_next_node_inline
->get_at (list, position);
}
-# define gl_list_set_at gl_list_set_at_inline
+# define gl_list_nx_set_at gl_list_nx_set_at_inline
static inline gl_list_node_t
-gl_list_set_at (gl_list_t list, size_t position, const void *elt)
+gl_list_nx_set_at (gl_list_t list, size_t position, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
- ->set_at (list, position, elt);
+ ->nx_set_at (list, position, elt);
}
# define gl_list_search gl_list_search_inline
->indexof_from_to (list, start_index, end_index, elt);
}
-# define gl_list_add_first gl_list_add_first_inline
+# define gl_list_nx_add_first gl_list_nx_add_first_inline
static inline gl_list_node_t
-gl_list_add_first (gl_list_t list, const void *elt)
+gl_list_nx_add_first (gl_list_t list, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
- ->add_first (list, elt);
+ ->nx_add_first (list, elt);
}
-# define gl_list_add_last gl_list_add_last_inline
+# define gl_list_nx_add_last gl_list_nx_add_last_inline
static inline gl_list_node_t
-gl_list_add_last (gl_list_t list, const void *elt)
+gl_list_nx_add_last (gl_list_t list, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
- ->add_last (list, elt);
+ ->nx_add_last (list, elt);
}
-# define gl_list_add_before gl_list_add_before_inline
+# define gl_list_nx_add_before gl_list_nx_add_before_inline
static inline gl_list_node_t
-gl_list_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
+gl_list_nx_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
- ->add_before (list, node, elt);
+ ->nx_add_before (list, node, elt);
}
-# define gl_list_add_after gl_list_add_after_inline
+# define gl_list_nx_add_after gl_list_nx_add_after_inline
static inline gl_list_node_t
-gl_list_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
+gl_list_nx_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
- ->add_after (list, node, elt);
+ ->nx_add_after (list, node, elt);
}
-# define gl_list_add_at gl_list_add_at_inline
+# define gl_list_nx_add_at gl_list_nx_add_at_inline
static inline gl_list_node_t
-gl_list_add_at (gl_list_t list, size_t position, const void *elt)
+gl_list_nx_add_at (gl_list_t list, size_t position, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
- ->add_at (list, position, elt);
+ ->nx_add_at (list, position, elt);
}
# define gl_list_remove_node gl_list_remove_node_inline
elt);
}
-# define gl_sortedlist_add gl_sortedlist_add_inline
+# define gl_sortedlist_nx_add gl_sortedlist_nx_add_inline
static inline gl_list_node_t
-gl_sortedlist_add (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
+gl_sortedlist_nx_add (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
{
return ((const struct gl_list_impl_base *) list)->vtable
- ->sortedlist_add (list, compar, elt);
+ ->sortedlist_nx_add (list, compar, elt);
}
# define gl_sortedlist_remove gl_sortedlist_remove_inline
/* Abstract ordered set data type.
- Copyright (C) 2006-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
Use #define to avoid a warning because of extern vs. static. */
gl_oset_t
-gl_oset_create_empty (gl_oset_implementation_t implementation,
- gl_setelement_compar_fn compar_fn,
- gl_setelement_dispose_fn dispose_fn)
+gl_oset_nx_create_empty (gl_oset_implementation_t implementation,
+ gl_setelement_compar_fn compar_fn,
+ gl_setelement_dispose_fn dispose_fn)
{
- return implementation->create_empty (implementation, compar_fn, dispose_fn);
+ return implementation->nx_create_empty (implementation, compar_fn,
+ dispose_fn);
}
size_t
->search_atleast (set, threshold_fn, threshold, eltp);
}
-bool
-gl_oset_add (gl_oset_t set, const void *elt)
+int
+gl_oset_nx_add (gl_oset_t set, const void *elt)
{
- return ((const struct gl_oset_impl_base *) set)->vtable->add (set, elt);
+ return ((const struct gl_oset_impl_base *) set)->vtable->nx_add (set, elt);
}
bool
/* Abstract ordered set data type.
- Copyright (C) 2006-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
IMPLEMENTATION is one of GL_ARRAY_OSET, GL_AVLTREE_OSET, GL_RBTREE_OSET.
COMPAR_FN is an element comparison function or NULL.
DISPOSE_FN is an element disposal function or NULL. */
+#if 0 /* declared in gl_xoset.h */
extern gl_oset_t gl_oset_create_empty (gl_oset_implementation_t implementation,
gl_setelement_compar_fn compar_fn,
gl_setelement_dispose_fn dispose_fn);
+#endif
+/* Likewise. Return NULL upon out-of-memory. */
+extern gl_oset_t gl_oset_nx_create_empty (gl_oset_implementation_t implementation,
+ gl_setelement_compar_fn compar_fn,
+ gl_setelement_dispose_fn dispose_fn);
/* Return the current number of elements in an ordered set. */
extern size_t gl_oset_size (gl_oset_t set);
const void **eltp);
/* Add an element to an ordered set.
- Return true if it was not already in the set and added. */
+ Return true if it was not already in the set and added, false otherwise. */
+#if 0 /* declared in gl_xoset.h */
extern bool gl_oset_add (gl_oset_t set, const void *elt);
+#endif
+/* Likewise. Return -1 upon out-of-memory. */
+extern int gl_oset_nx_add (gl_oset_t set, const void *elt)
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ __attribute__ ((__warn_unused_result__))
+#endif
+ ;
/* Remove an element from an ordered set.
Return true if it was found and removed. */
struct gl_oset_implementation
{
/* gl_oset_t functions. */
- gl_oset_t (*create_empty) (gl_oset_implementation_t implementation,
- gl_setelement_compar_fn compar_fn,
- gl_setelement_dispose_fn dispose_fn);
+ gl_oset_t (*nx_create_empty) (gl_oset_implementation_t implementation,
+ gl_setelement_compar_fn compar_fn,
+ gl_setelement_dispose_fn dispose_fn);
size_t (*size) (gl_oset_t set);
bool (*search) (gl_oset_t set, const void *elt);
bool (*search_atleast) (gl_oset_t set,
gl_setelement_threshold_fn threshold_fn,
const void *threshold, const void **eltp);
- bool (*add) (gl_oset_t set, const void *elt);
+ int (*nx_add) (gl_oset_t set, const void *elt);
bool (*remove_elt) (gl_oset_t set, const void *elt);
void (*oset_free) (gl_oset_t set);
/* gl_oset_iterator_t functions. */
struct gl_oset_implementation.
Use #define to avoid a warning because of extern vs. static. */
-# define gl_oset_create_empty gl_oset_create_empty_inline
+# define gl_oset_nx_create_empty gl_oset_nx_create_empty_inline
static inline gl_oset_t
-gl_oset_create_empty (gl_oset_implementation_t implementation,
- gl_setelement_compar_fn compar_fn,
- gl_setelement_dispose_fn dispose_fn)
+gl_oset_nx_create_empty (gl_oset_implementation_t implementation,
+ gl_setelement_compar_fn compar_fn,
+ gl_setelement_dispose_fn dispose_fn)
{
- return implementation->create_empty (implementation, compar_fn, dispose_fn);
+ return implementation->nx_create_empty (implementation, compar_fn,
+ dispose_fn);
}
# define gl_oset_size gl_oset_size_inline
->search_atleast (set, threshold_fn, threshold, eltp);
}
-# define gl_oset_add gl_oset_add_inline
-static inline bool
-gl_oset_add (gl_oset_t set, const void *elt)
+# define gl_oset_nx_add gl_oset_nx_add_inline
+static inline int
+gl_oset_nx_add (gl_oset_t set, const void *elt)
{
- return ((const struct gl_oset_impl_base *) set)->vtable->add (set, elt);
+ return ((const struct gl_oset_impl_base *) set)->vtable->nx_add (set, elt);
}
# define gl_oset_remove gl_oset_remove_inline
/* Sequential list data type implemented by a binary tree.
- Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2008-2010 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 <stdlib.h>
-#include "xalloc.h"
-
/* -------------------------- gl_list_t Data Type -------------------------- */
/* Generic red-black tree code. */
#include "gl_anyrbtree_list1.h"
-#include "gl_anyrbtree_list2.h"
/* Generic binary tree code. */
#include "gl_anytree_list1.h"
+
+/* Generic red-black tree code. */
+#include "gl_anyrbtree_list2.h"
+
+/* Generic binary tree code. */
#include "gl_anytree_list2.h"
/* For debugging. */
const struct gl_list_implementation gl_rbtree_list_implementation =
{
- gl_tree_create_empty,
- gl_tree_create,
+ gl_tree_nx_create_empty,
+ gl_tree_nx_create,
gl_tree_size,
gl_tree_node_value,
- gl_tree_node_set_value,
+ gl_tree_node_nx_set_value,
gl_tree_next_node,
gl_tree_previous_node,
gl_tree_get_at,
- gl_tree_set_at,
+ gl_tree_nx_set_at,
gl_tree_search_from_to,
gl_tree_indexof_from_to,
- gl_tree_add_first,
- gl_tree_add_last,
- gl_tree_add_before,
- gl_tree_add_after,
- gl_tree_add_at,
+ gl_tree_nx_add_first,
+ gl_tree_nx_add_last,
+ gl_tree_nx_add_before,
+ gl_tree_nx_add_after,
+ gl_tree_nx_add_at,
gl_tree_remove_node,
gl_tree_remove_at,
gl_tree_remove,
gl_tree_sortedlist_search_from_to,
gl_tree_sortedlist_indexof,
gl_tree_sortedlist_indexof_from_to,
- gl_tree_sortedlist_add,
+ gl_tree_sortedlist_nx_add,
gl_tree_sortedlist_remove
};
/* Sequential list data type implemented by a binary tree.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009, 2010 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-2007 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2010 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 <stdlib.h>
-#include "xalloc.h"
-
/* A red-black tree is a binary tree where every node is colored black or
red such that
1. The root is black.
}
static gl_oset_node_t
-gl_tree_add_first (gl_oset_t set, const void *elt)
+gl_tree_nx_add_first (gl_oset_t set, const void *elt)
{
/* Create new node. */
- gl_oset_node_t new_node = XMALLOC (struct gl_oset_node_impl);
+ gl_oset_node_t new_node =
+ (struct gl_oset_node_impl *) malloc (sizeof (struct gl_oset_node_impl));
+
+ if (new_node == NULL)
+ return NULL;
new_node->left = NULL;
new_node->right = NULL;
}
static gl_oset_node_t
-gl_tree_add_before (gl_oset_t set, gl_oset_node_t node, const void *elt)
+gl_tree_nx_add_before (gl_oset_t set, gl_oset_node_t node, const void *elt)
{
/* Create new node. */
- gl_oset_node_t new_node = XMALLOC (struct gl_oset_node_impl);
+ gl_oset_node_t new_node =
+ (struct gl_oset_node_impl *) malloc (sizeof (struct gl_oset_node_impl));
+
+ if (new_node == NULL)
+ return NULL;
new_node->left = NULL;
new_node->right = NULL;
}
static gl_oset_node_t
-gl_tree_add_after (gl_oset_t set, gl_oset_node_t node, const void *elt)
+gl_tree_nx_add_after (gl_oset_t set, gl_oset_node_t node, const void *elt)
{
/* Create new node. */
- gl_oset_node_t new_node = XMALLOC (struct gl_oset_node_impl);
+ gl_oset_node_t new_node =
+ (struct gl_oset_node_impl *) malloc (sizeof (struct gl_oset_node_impl));
+
+ if (new_node == NULL)
+ return NULL;
new_node->left = NULL;
new_node->right = NULL;
const struct gl_oset_implementation gl_rbtree_oset_implementation =
{
- gl_tree_create_empty,
+ gl_tree_nx_create_empty,
gl_tree_size,
gl_tree_search,
gl_tree_search_atleast,
- gl_tree_add,
+ gl_tree_nx_add,
gl_tree_remove,
gl_tree_oset_free,
gl_tree_iterator,
/* Ordered set data type implemented by a binary tree.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009, 2010 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 binary tree.
- Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2008-2010 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 <stdlib.h>
#include "gl_rbtree_oset.h"
-#include "xalloc.h"
#include "xsize.h"
#ifndef uintptr_t
const struct gl_list_implementation gl_rbtreehash_list_implementation =
{
- gl_tree_create_empty,
- gl_tree_create,
+ gl_tree_nx_create_empty,
+ gl_tree_nx_create,
gl_tree_size,
gl_tree_node_value,
- gl_tree_node_set_value,
+ gl_tree_node_nx_set_value,
gl_tree_next_node,
gl_tree_previous_node,
gl_tree_get_at,
- gl_tree_set_at,
+ gl_tree_nx_set_at,
gl_tree_search_from_to,
gl_tree_indexof_from_to,
- gl_tree_add_first,
- gl_tree_add_last,
- gl_tree_add_before,
- gl_tree_add_after,
- gl_tree_add_at,
+ gl_tree_nx_add_first,
+ gl_tree_nx_add_last,
+ gl_tree_nx_add_before,
+ gl_tree_nx_add_after,
+ gl_tree_nx_add_at,
gl_tree_remove_node,
gl_tree_remove_at,
gl_tree_remove,
gl_tree_sortedlist_search_from_to,
gl_tree_sortedlist_indexof,
gl_tree_sortedlist_indexof_from_to,
- gl_tree_sortedlist_add,
+ gl_tree_sortedlist_nx_add,
gl_tree_sortedlist_remove
};
/* Sequential list data type implemented by a hash table with a binary tree.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009, 2010 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 backed by another list.
- Copyright (C) 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 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 <stdlib.h>
-#include "xalloc.h"
-
#ifndef uintptr_t
# define uintptr_t unsigned long
#endif
#define NODE_TO_INDEX(node) ((uintptr_t)(node) - 1)
static gl_list_t
-gl_sublist_create_empty (gl_list_implementation_t implementation,
- gl_listelement_equals_fn equals_fn,
- gl_listelement_hashcode_fn hashcode_fn,
- gl_listelement_dispose_fn dispose_fn,
- bool allow_duplicates)
+gl_sublist_nx_create_empty (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates)
{
/* Shouldn't be called. */
abort ();
}
static gl_list_t
-gl_sublist_create_fill (gl_list_implementation_t implementation,
- gl_listelement_equals_fn equals_fn,
- gl_listelement_hashcode_fn hashcode_fn,
- gl_listelement_dispose_fn dispose_fn,
- bool allow_duplicates,
- size_t count, const void **contents)
+gl_sublist_nx_create_fill (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates,
+ size_t count, const void **contents)
{
/* Shouldn't be called. */
abort ();
return gl_list_get_at (list->whole, list->start + index);
}
-static void
-gl_sublist_node_set_value (gl_list_t list, gl_list_node_t node, const void *elt)
+static int
+gl_sublist_node_nx_set_value (gl_list_t list, gl_list_node_t node, const void *elt)
{
uintptr_t index = NODE_TO_INDEX (node);
if (!(index < list->end - list->start))
/* Invalid argument. */
abort ();
- gl_list_set_at (list->whole, list->start + index, elt);
+ if (gl_list_nx_set_at (list->whole, list->start + index, elt) == NULL)
+ return -1;
+ return 0;
}
static gl_list_node_t
}
static gl_list_node_t
-gl_sublist_set_at (gl_list_t list, size_t position, const void *elt)
+gl_sublist_nx_set_at (gl_list_t list, size_t position, const void *elt)
{
if (!(position < list->end - list->start))
/* Invalid argument. */
abort ();
- gl_list_set_at (list->whole, list->start + position, elt);
+ if (gl_list_nx_set_at (list->whole, list->start + position, elt) == NULL)
+ return NULL;
return INDEX_TO_NODE (position);
}
}
static gl_list_node_t
-gl_sublist_add_first (gl_list_t list, const void *elt)
+gl_sublist_nx_add_first (gl_list_t list, const void *elt)
{
- gl_list_add_at (list->whole, list->start, elt);
+ if (gl_list_nx_add_at (list->whole, list->start, elt) == NULL)
+ return NULL;
list->end++;
return INDEX_TO_NODE (0);
}
static gl_list_node_t
-gl_sublist_add_last (gl_list_t list, const void *elt)
+gl_sublist_nx_add_last (gl_list_t list, const void *elt)
{
- gl_list_add_at (list->whole, list->end, elt);
+ if (gl_list_nx_add_at (list->whole, list->end, elt) == NULL)
+ return NULL;
list->end++;
return INDEX_TO_NODE (list->end - list->start - 1);
}
static gl_list_node_t
-gl_sublist_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
+gl_sublist_nx_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
{
size_t position = NODE_TO_INDEX (node);
if (!(position < list->end - list->start))
/* Invalid argument. */
abort ();
- gl_list_add_at (list->whole, list->start + position, elt);
+ if (gl_list_nx_add_at (list->whole, list->start + position, elt) == NULL)
+ return NULL;
list->end++;
return INDEX_TO_NODE (position);
}
static gl_list_node_t
-gl_sublist_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
+gl_sublist_nx_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
{
size_t position = NODE_TO_INDEX (node);
if (!(position < list->end - list->start))
/* Invalid argument. */
abort ();
position++;
- gl_list_add_at (list->whole, list->start + position, elt);
+ if (gl_list_nx_add_at (list->whole, list->start + position, elt) == NULL)
+ return NULL;
list->end++;
return INDEX_TO_NODE (position);
}
static gl_list_node_t
-gl_sublist_add_at (gl_list_t list, size_t position, const void *elt)
+gl_sublist_nx_add_at (gl_list_t list, size_t position, const void *elt)
{
if (!(position <= list->end - list->start))
/* Invalid argument. */
abort ();
- gl_list_add_at (list->whole, list->start + position, elt);
+ if (gl_list_nx_add_at (list->whole, list->start + position, elt) == NULL)
+ return NULL;
list->end++;
return INDEX_TO_NODE (position);
}
}
static gl_list_node_t
-gl_sublist_sortedlist_add (gl_list_t list,
- gl_listelement_compar_fn compar,
- const void *elt)
+gl_sublist_sortedlist_nx_add (gl_list_t list,
+ gl_listelement_compar_fn compar,
+ const void *elt)
{
/* It's impossible to implement this method without risking to put the
whole list into unsorted order (namely, when the given ELT is smaller
static const struct gl_list_implementation gl_sublist_list_implementation =
{
- gl_sublist_create_empty,
- gl_sublist_create_fill,
+ gl_sublist_nx_create_empty,
+ gl_sublist_nx_create_fill,
gl_sublist_size,
gl_sublist_node_value,
- gl_sublist_node_set_value,
+ gl_sublist_node_nx_set_value,
gl_sublist_next_node,
gl_sublist_previous_node,
gl_sublist_get_at,
- gl_sublist_set_at,
+ gl_sublist_nx_set_at,
gl_sublist_search_from_to,
gl_sublist_indexof_from_to,
- gl_sublist_add_first,
- gl_sublist_add_last,
- gl_sublist_add_before,
- gl_sublist_add_after,
- gl_sublist_add_at,
+ gl_sublist_nx_add_first,
+ gl_sublist_nx_add_last,
+ gl_sublist_nx_add_before,
+ gl_sublist_nx_add_after,
+ gl_sublist_nx_add_at,
gl_sublist_remove_node,
gl_sublist_remove_at,
gl_sublist_remove,
gl_sublist_sortedlist_search_from_to,
gl_sublist_sortedlist_indexof,
gl_sublist_sortedlist_indexof_from_to,
- gl_sublist_sortedlist_add,
+ gl_sublist_sortedlist_nx_add,
gl_sublist_sortedlist_remove
};
gl_list_t
-gl_sublist_create (gl_list_t whole_list, size_t start_index, size_t end_index)
+gl_sublist_nx_create (gl_list_t whole_list, size_t start_index, size_t end_index)
{
if (!(start_index <= end_index && end_index <= gl_list_size (whole_list)))
/* Invalid arguments. */
abort ();
{
- struct gl_list_impl *list = XMALLOC (struct gl_list_impl);
+ struct gl_list_impl *list =
+ (struct gl_list_impl *) malloc (sizeof (struct gl_list_impl));
+
+ if (list == NULL)
+ return NULL;
list->base.vtable = &gl_sublist_list_implementation;
list->base.equals_fn = whole_list->base.equals_fn; /* actually unused */
/* Sequential list data type backed by another list.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
- The sublist is only valid as long as the whole list is valid.
- The sublist must not be passed to the gl_list_sortedlist_add() function.
*/
+#if 0 /* declared in gl_xsublist.h */
extern gl_list_t gl_sublist_create (gl_list_t whole_list,
size_t start_index, size_t end_index);
+#endif
+/* Likewise. Return NULL upon out-of-memory. */
+extern gl_list_t gl_sublist_nx_create (gl_list_t whole_list,
+ size_t start_index, size_t end_index);
#ifdef __cplusplus
--- /dev/null
+/* Abstract sequential list data type, with out-of-memory checking.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2009.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "gl_xlist.h"
+
+#if !HAVE_INLINE
+
+gl_list_t
+gl_list_create_empty (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates)
+{
+ gl_list_t result =
+ gl_list_nx_create_empty (implementation, equals_fn, hashcode_fn, dispose_fn,
+ allow_duplicates);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+gl_list_t
+gl_list_create (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates,
+ size_t count, const void **contents)
+{
+ gl_list_t result =
+ gl_list_nx_create (implementation, equals_fn, hashcode_fn, dispose_fn,
+ allow_duplicates, count, contents);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+void
+gl_list_node_set_value (gl_list_t list, gl_list_node_t node, const void *elt)
+{
+ int result = gl_list_node_nx_set_value (list, node, elt);
+ if (result < 0)
+ xalloc_die ();
+}
+
+gl_list_node_t
+gl_list_set_at (gl_list_t list, size_t position, const void *elt)
+{
+ gl_list_node_t result = gl_list_nx_set_at (list, position, elt);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+gl_list_node_t
+gl_list_add_first (gl_list_t list, const void *elt)
+{
+ gl_list_node_t result = gl_list_nx_add_first (list, elt);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+gl_list_node_t
+gl_list_add_last (gl_list_t list, const void *elt)
+{
+ gl_list_node_t result = gl_list_nx_add_last (list, elt);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+gl_list_node_t
+gl_list_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
+{
+ gl_list_node_t result = gl_list_nx_add_before (list, node, elt);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+gl_list_node_t
+gl_list_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
+{
+ gl_list_node_t result = gl_list_nx_add_after (list, node, elt);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+gl_list_node_t
+gl_list_add_at (gl_list_t list, size_t position, const void *elt)
+{
+ gl_list_node_t result = gl_list_nx_add_at (list, position, elt);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+gl_list_node_t
+gl_sortedlist_add (gl_list_t list, gl_listelement_compar_fn compar,
+ const void *elt)
+{
+ gl_list_node_t result = gl_sortedlist_nx_add (list, compar, elt);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+#endif
--- /dev/null
+/* Abstract sequential list data type, with out-of-memory checking.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2009.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GL_XLIST_H
+#define _GL_XLIST_H
+
+#include "gl_list.h"
+#include "xalloc.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* These functions are thin wrappers around the corresponding functions with
+ _nx_ infix from gl_list.h. Upon out-of-memory, they invoke xalloc_die (),
+ instead of returning an error indicator. */
+extern gl_list_t gl_list_create_empty (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates);
+extern gl_list_t gl_list_create (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates,
+ size_t count, const void **contents);
+extern void gl_list_node_set_value (gl_list_t list, gl_list_node_t node,
+ const void *elt);
+extern gl_list_node_t gl_list_set_at (gl_list_t list, size_t position,
+ const void *elt);
+extern gl_list_node_t gl_list_add_first (gl_list_t list, const void *elt);
+extern gl_list_node_t gl_list_add_last (gl_list_t list, const void *elt);
+extern gl_list_node_t gl_list_add_before (gl_list_t list, gl_list_node_t node,
+ const void *elt);
+extern gl_list_node_t gl_list_add_after (gl_list_t list, gl_list_node_t node,
+ const void *elt);
+extern gl_list_node_t gl_list_add_at (gl_list_t list, size_t position,
+ const void *elt);
+extern gl_list_node_t gl_sortedlist_add (gl_list_t list,
+ gl_listelement_compar_fn compar,
+ const void *elt);
+
+#if HAVE_INLINE
+
+# define gl_list_create_empty gl_list_create_empty_inline
+static inline gl_list_t
+gl_list_create_empty (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates)
+{
+ gl_list_t result =
+ gl_list_nx_create_empty (implementation, equals_fn, hashcode_fn, dispose_fn,
+ allow_duplicates);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+# define gl_list_create gl_list_create_inline
+static inline gl_list_t
+gl_list_create (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates,
+ size_t count, const void **contents)
+{
+ gl_list_t result =
+ gl_list_nx_create (implementation, equals_fn, hashcode_fn, dispose_fn,
+ allow_duplicates, count, contents);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+# define gl_list_node_set_value gl_list_node_set_value_inline
+static inline void
+gl_list_node_set_value (gl_list_t list, gl_list_node_t node, const void *elt)
+{
+ int result = gl_list_node_nx_set_value (list, node, elt);
+ if (result < 0)
+ xalloc_die ();
+}
+
+# define gl_list_set_at gl_list_set_at_inline
+static inline gl_list_node_t
+gl_list_set_at (gl_list_t list, size_t position, const void *elt)
+{
+ gl_list_node_t result = gl_list_nx_set_at (list, position, elt);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+# define gl_list_add_first gl_list_add_first_inline
+static inline gl_list_node_t
+gl_list_add_first (gl_list_t list, const void *elt)
+{
+ gl_list_node_t result = gl_list_nx_add_first (list, elt);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+# define gl_list_add_last gl_list_add_last_inline
+static inline gl_list_node_t
+gl_list_add_last (gl_list_t list, const void *elt)
+{
+ gl_list_node_t result = gl_list_nx_add_last (list, elt);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+# define gl_list_add_before gl_list_add_before_inline
+static inline gl_list_node_t
+gl_list_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
+{
+ gl_list_node_t result = gl_list_nx_add_before (list, node, elt);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+# define gl_list_add_after gl_list_add_after_inline
+static inline gl_list_node_t
+gl_list_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
+{
+ gl_list_node_t result = gl_list_nx_add_after (list, node, elt);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+# define gl_list_add_at gl_list_add_at_inline
+static inline gl_list_node_t
+gl_list_add_at (gl_list_t list, size_t position, const void *elt)
+{
+ gl_list_node_t result = gl_list_nx_add_at (list, position, elt);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+# define gl_sortedlist_add gl_sortedlist_add_inline
+static inline gl_list_node_t
+gl_sortedlist_add (gl_list_t list, gl_listelement_compar_fn compar,
+ const void *elt)
+{
+ gl_list_node_t result = gl_sortedlist_nx_add (list, compar, elt);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_XLIST_H */
--- /dev/null
+/* Abstract ordered set data type, with out-of-memory checking.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2009.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "gl_xoset.h"
+
+#if !HAVE_INLINE
+
+gl_oset_t
+gl_oset_create_empty (gl_oset_implementation_t implementation,
+ gl_setelement_compar_fn compar_fn,
+ gl_setelement_dispose_fn dispose_fn)
+{
+ gl_oset_t result =
+ gl_oset_nx_create_empty (implementation, compar_fn, dispose_fn);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+bool
+gl_oset_add (gl_oset_t set, const void *elt)
+{
+ int result = gl_oset_nx_add (set, elt);
+ if (result < 0)
+ xalloc_die ();
+ return result;
+}
+
+#endif
--- /dev/null
+/* Abstract ordered set data type, with out-of-memory checking.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2009.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GL_XOSET_H
+#define _GL_XOSET_H
+
+#include "gl_oset.h"
+#include "xalloc.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* These functions are thin wrappers around the corresponding functions with
+ _nx_ infix from gl_oset.h. Upon out-of-memory, they invoke xalloc_die (),
+ instead of returning an error indicator. */
+extern gl_oset_t gl_oset_create_empty (gl_oset_implementation_t implementation,
+ gl_setelement_compar_fn compar_fn,
+ gl_setelement_dispose_fn dispose_fn);
+extern bool gl_oset_add (gl_oset_t set, const void *elt);
+
+#if HAVE_INLINE
+
+# define gl_oset_create_empty gl_oset_create_empty_inline
+static inline gl_oset_t
+gl_oset_create_empty (gl_oset_implementation_t implementation,
+ gl_setelement_compar_fn compar_fn,
+ gl_setelement_dispose_fn dispose_fn)
+{
+ gl_oset_t result =
+ gl_oset_nx_create_empty (implementation, compar_fn, dispose_fn);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+# define gl_oset_add gl_oset_add_inline
+static inline bool
+gl_oset_add (gl_oset_t set, const void *elt)
+{
+ int result = gl_oset_nx_add (set, elt);
+ if (result < 0)
+ xalloc_die ();
+ return result;
+}
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_XOSET_H */
--- /dev/null
+/* Sequential list data type backed by another list, with out-of-memory
+ checking.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2009.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "gl_xsublist.h"
+
+#if !HAVE_INLINE
+
+gl_list_t
+gl_sublist_create (gl_list_t whole_list, size_t start_index, size_t end_index)
+{
+ gl_list_t result = gl_sublist_nx_create (whole_list, start_index, end_index);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+#endif
--- /dev/null
+/* Sequential list data type backed by another list, with out-of-memory
+ checking.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2009.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GL_XSUBLIST_H
+#define _GL_XSUBLIST_H
+
+#include "gl_sublist.h"
+#include "xalloc.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* These functions are thin wrappers around the corresponding functions with
+ _nx_ infix from gl_sublist.h. Upon out-of-memory, they invoke
+ xalloc_die (), instead of returning an error indicator. */
+extern gl_list_t gl_sublist_create (gl_list_t whole_list,
+ size_t start_index, size_t end_index);
+
+#if HAVE_INLINE
+
+# define gl_sublist_create gl_sublist_create_inline
+static inline gl_list_t
+gl_sublist_create (gl_list_t whole_list, size_t start_index, size_t end_index)
+{
+ gl_list_t result = gl_sublist_nx_create (whole_list, start_index, end_index);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_XSUBLIST_H */
-/* Copyright (C) 1991,92,95-98,2000,2001,2004-2007 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1992, 1995-1998, 2000-2001, 2004-2007, 2009-2010 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
#if !defined __USE_FILE_OFFSET64 || __GNUC__ < 2 || defined __GLOB_GNULIB
extern int glob (const char *_Restrict_ __pattern, int __flags,
int (*__errfunc) (const char *, int),
- glob_t *_Restrict_ __pglob) __THROW;
+ glob_t *_Restrict_ __pglob) __THROW _GL_ARG_NONNULL ((1, 4));
/* Free storage allocated in PGLOB by a previous `glob' call. */
-extern void globfree (glob_t *__pglob) __THROW;
+extern void globfree (glob_t *__pglob) __THROW _GL_ARG_NONNULL ((1));
#else
extern int __REDIRECT_NTH (glob, (const char *_Restrict_ __pattern,
int __flags,
#if defined __USE_LARGEFILE64 && !defined __GLOB_GNULIB
extern int glob64 (const char *_Restrict_ __pattern, int __flags,
int (*__errfunc) (const char *, int),
- glob64_t *_Restrict_ __pglob) __THROW;
+ glob64_t *_Restrict_ __pglob)
+ __THROW _GL_ARG_NONNULL ((1, 4));
-extern void globfree64 (glob64_t *__pglob) __THROW;
+extern void globfree64 (glob64_t *__pglob) __THROW _GL_ARG_NONNULL ((1));
#endif
This function is not part of the interface specified by POSIX.2
but several programs want to use it. */
-extern int glob_pattern_p (const char *__pattern, int __quote) __THROW;
+extern int glob_pattern_p (const char *__pattern, int __quote)
+ __THROW _GL_ARG_NONNULL ((1));
#endif
__END_DECLS
-/* Copyright (C) 1991-2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
- Free Software Foundation, Inc.
+/* Copyright (C) 1991-2010 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 <config.h>
#endif
+/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
+ optimizes away the pattern == NULL || pglob == NULL tests below. */
+#define _GL_ARG_NONNULL(params)
+
#include <glob.h>
#include <errno.h>
/* glob.h -- Find a path matching a pattern.
- Copyright (C) 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2009-2010 Free Software Foundation, Inc.
Written by Derek Price <derek@ximbiot.com> & Paul Eggert <eggert@CS.UCLA.EDU>
# define __THROW
#endif
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
#ifndef __size_t
# define __size_t size_t
#endif
/* Condition variables for multithreading.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Condition variables for multithreading.
- Copyright (C) 2005-2008 Free Software Foundation, Inc.
+ Copyright (C) 2005-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Locking in multithreaded situations.
- Copyright (C) 2005-2008 Free Software Foundation, Inc.
+ Copyright (C) 2005-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Locking in multithreaded situations.
- Copyright (C) 2005-2008 Free Software Foundation, Inc.
+ Copyright (C) 2005-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Creating and controlling threads.
- Copyright (C) 2005-2008 Free Software Foundation, Inc.
+ Copyright (C) 2005-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Creating and controlling threads.
- Copyright (C) 2005-2008 Free Software Foundation, Inc.
+ Copyright (C) 2005-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Multithreading primitives.
- Copyright (C) 2005-2009 Free Software Foundation, Inc.
+ Copyright (C) 2005-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Thread-local storage in multithreaded situations.
- Copyright (C) 2005-2008 Free Software Foundation, Inc.
+ Copyright (C) 2005-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Thread-local storage in multithreaded situations.
- Copyright (C) 2005, 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Yielding the processor to other threads and processes.
- Copyright (C) 2005-2008 Free Software Foundation, Inc.
+ Copyright (C) 2005-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* group-member.c -- determine whether group id is in calling user's group list
- Copyright (C) 1994, 1997, 1998, 2003, 2005, 2006, 2009 Free Software
+ Copyright (C) 1994, 1997-1998, 2003, 2005-2006, 2009-2010 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
/* Determine whether group id is in calling user's group list.
- Copyright (C) 1994, 1997, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1997, 2003, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* hard-locale.c -- Determine whether a locale is hard.
- Copyright (C) 1997, 1998, 1999, 2002, 2003, 2004, 2006, 2007 Free
- Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2002, 2003, 2004, 2006, 2007, 2009, 2010
+ Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Determine whether a locale is hard.
- Copyright (C) 1999, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2003, 2004, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* hash-pjw.c -- compute a hash value from a NUL-terminated string.
- Copyright (C) 2001, 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* hash-pjw.h -- declaration for a simple hash function
- Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Hash functions for file-related triples: name, device, inode.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* hash - hashing table processing.
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007,
- 2009 Free Software Foundation, Inc.
+ Copyright (C) 1998-2004, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Jim Meyering, 1992.
/* hash - hashing table processing.
- Copyright (C) 1998, 1999, 2001, 2003, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2001, 2003, 2009-2010 Free Software Foundation,
+ Inc.
Written by Jim Meyering <meyering@ascend.com>, 1998.
This program is free software: you can redistribute it and/or modify
/* hmac-md5.c -- hashed message authentication codes
- Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* hmac-sha1.c -- hashed message authentication codes
- Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* hmac.h -- hashed message authentication codes
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* human.c -- print human readable file size
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+ 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* human.h -- print human readable file size
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+ 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* a simple ring buffer
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* definitions for a simple ring buffer
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Character set conversion.
- Copyright (C) 1999-2001, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1999-2001, 2007, 2009-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* A GNU-like <iconv.h>.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#ifndef _GL_ICONV_H
#define _GL_ICONV_H
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
#ifdef __cplusplus
extern "C" {
#endif
/* An iconv_open wrapper that supports the IANA standardized encoding names
("ISO-8859-1" etc.) as far as possible. */
# define iconv_open rpl_iconv_open
-extern iconv_t iconv_open (const char *tocode, const char *fromcode);
+extern iconv_t iconv_open (const char *tocode, const char *fromcode)
+ _GL_ARG_NONNULL ((1, 2));
#endif
#if @REPLACE_ICONV_UTF@
/* Character set conversion.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Character set conversion.
- Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Character set conversion handler type.
- Copyright (C) 2001-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible.
This program is free software: you can redistribute it and/or modify
/* idcache.c -- map user and group IDs, cached for speed
- Copyright (C) 1985, 1988, 1989, 1990, 1997, 1998, 2003, 2005-2007
- Free Software Foundation, Inc.
+ Copyright (C) 1985, 1988-1990, 1997-1998, 2003, 2005-2007, 2009-2010 Free
+ Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Dropping uid/gid privileges of the current process permanently.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Dropping uid/gid privileges of the current process temporarily.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Dropping uid/gid privileges of the current process.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* ignore a function return without a compiler warning
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* imaxabs() function: absolute value of 'intmax_t'.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* imaxdiv() function: division of 'intmax_t'.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* inet_ntop.c -- convert IPv4 and IPv6 addresses from binary to text form
- Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2008-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* inet_pton.c -- convert IPv4 and IPv6 addresses from text to binary form
- Copyright (C) 2006, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* intprops.h -- properties of integer types
- Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009 Free Software
+ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009, 2010 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
/* inttostr.c -- convert integers to printable strings
- Copyright (C) 2001, 2006, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* inttostr.h -- convert integers to printable strings
- Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software
- Foundation, Inc.
+ Copyright (C) 2001-2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-/* Copyright (C) 2006-2009 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2010 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Derek Price.
This file is part of gnulib.
#if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
#define INTTYPES_H
-/* Include <stdint.h> or the gnulib replacement. */
-#include <stdint.h>
+/* Include <stdint.h> or the gnulib replacement.
+ But avoid namespace pollution on glibc systems. */
+#ifndef __GLIBC__
+# include <stdint.h>
+#endif
/* Get CHAR_BIT. */
#include <limits.h>
/* The definition of GL_LINK_WARNING is copied here. */
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
/* 7.8.1 Macros for format specifiers */
#if ! defined __cplusplus || defined __STDC_FORMAT_MACROS
#if @GNULIB_STRTOIMAX@
# if !@HAVE_DECL_STRTOIMAX@
-extern intmax_t strtoimax (const char *, char **, int);
+extern intmax_t strtoimax (const char *, char **, int) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef strtoimax
#if @GNULIB_STRTOUMAX@
# if !@HAVE_DECL_STRTOUMAX@
-extern uintmax_t strtoumax (const char *, char **, int);
+extern uintmax_t strtoumax (const char *, char **, int) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef strtoumax
/* ioctl.c --- wrappers for Windows ioctl function
- Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test whether a file descriptor is a pipe.
- Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test whether a character is a blank.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* isdir.c -- determine whether a directory exists
- Copyright (C) 1990, 1998, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1998, 2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
+#include "isdir.h"
+
#include <sys/types.h>
#include <sys/stat.h>
-#if STAT_MACROS_BROKEN
-# undef S_ISDIR
-#endif
-
-#if !defined S_ISDIR && defined S_IFDIR
-# define S_ISDIR(Mode) (((Mode) & S_IFMT) == S_IFDIR)
-#endif
-
/* If PATH is an existing directory or symbolic link to a directory,
return nonzero, else 0. */
-
int
isdir (const char *path)
{
--- /dev/null
+int isdir (const char *path);
/* Test for finite value (zero, subnormal, or normal, and not infinite or NaN).
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test for positive or negative infinity.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test for NaN that does not need libm.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test for NaN that does not need libm.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test for NaN that does not need libm.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test for NaN that does not need libm.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test for NaN that does not need libm.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test for NaN that does not need libm.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test for NaN that does not need libm.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Compile a Java program.
- Copyright (C) 2001-2003, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006-2010 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
/* Compile a Java program.
- Copyright (C) 2001-2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2006, 2009-2010 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
/* Execute a Java program.
- Copyright (C) 2001-2003, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006-2010 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
/* Execute a Java program.
- Copyright (C) 2001-2002 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2009-2010 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
/* Determine the Java version supported by javaexec.
- Copyright (C) 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
/* Determine the Java version supported by javaexec.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
/* Show the Java version.
- * Copyright (C) 2006 Free Software Foundation, Inc.
+ * Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
--- /dev/null
+/* Substitute for and wrapper around <langinfo.h>.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 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, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/*
+ * POSIX <langinfo.h> for platforms that lack it or have an incomplete one.
+ * <http://www.opengroup.org/onlinepubs/9699919799/basedefs/langinfo.h.html>
+ */
+
+#ifndef _GL_LANGINFO_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+/* The include_next requires a split double-inclusion guard. */
+#if @HAVE_LANGINFO_H@
+# @INCLUDE_NEXT@ @NEXT_LANGINFO_H@
+#endif
+
+#ifndef _GL_LANGINFO_H
+#define _GL_LANGINFO_H
+
+
+#if !@HAVE_LANGINFO_H@
+
+/* A platform that lacks <langinfo.h>. */
+
+/* Assume that it also lacks <nl_types.h> and the nl_item type. */
+typedef int nl_item;
+
+/* nl_langinfo items of the LC_CTYPE category */
+# define CODESET 10000
+/* nl_langinfo items of the LC_NUMERIC category */
+# define RADIXCHAR 10001
+# define THOUSEP 10002
+/* nl_langinfo items of the LC_TIME category */
+# define D_T_FMT 10003
+# define D_FMT 10004
+# define T_FMT 10005
+# define T_FMT_AMPM 10006
+# define AM_STR 10007
+# define PM_STR 10008
+# define DAY_1 10009
+# define DAY_2 (DAY_1 + 1)
+# define DAY_3 (DAY_1 + 2)
+# define DAY_4 (DAY_1 + 3)
+# define DAY_5 (DAY_1 + 4)
+# define DAY_6 (DAY_1 + 5)
+# define DAY_7 (DAY_1 + 6)
+# define ABDAY_1 10016
+# define ABDAY_2 (ABDAY_1 + 1)
+# define ABDAY_3 (ABDAY_1 + 2)
+# define ABDAY_4 (ABDAY_1 + 3)
+# define ABDAY_5 (ABDAY_1 + 4)
+# define ABDAY_6 (ABDAY_1 + 5)
+# define ABDAY_7 (ABDAY_1 + 6)
+# define MON_1 10023
+# define MON_2 (MON_1 + 1)
+# define MON_3 (MON_1 + 2)
+# define MON_4 (MON_1 + 3)
+# define MON_5 (MON_1 + 4)
+# define MON_6 (MON_1 + 5)
+# define MON_7 (MON_1 + 6)
+# define MON_8 (MON_1 + 7)
+# define MON_9 (MON_1 + 8)
+# define MON_10 (MON_1 + 9)
+# define MON_11 (MON_1 + 10)
+# define MON_12 (MON_1 + 11)
+# define ABMON_1 10035
+# define ABMON_2 (ABMON_1 + 1)
+# define ABMON_3 (ABMON_1 + 2)
+# define ABMON_4 (ABMON_1 + 3)
+# define ABMON_5 (ABMON_1 + 4)
+# define ABMON_6 (ABMON_1 + 5)
+# define ABMON_7 (ABMON_1 + 6)
+# define ABMON_8 (ABMON_1 + 7)
+# define ABMON_9 (ABMON_1 + 8)
+# define ABMON_10 (ABMON_1 + 9)
+# define ABMON_11 (ABMON_1 + 10)
+# define ABMON_12 (ABMON_1 + 11)
+# define ERA 10047
+# define ERA_D_FMT 10048
+# define ERA_D_T_FMT 10049
+# define ERA_T_FMT 10050
+# define ALT_DIGITS 10051
+/* nl_langinfo items of the LC_MONETARY category */
+# define CRNCYSTR 10052
+/* nl_langinfo items of the LC_MESSAGES category */
+# define YESEXPR 10053
+# define NOEXPR 10054
+
+#else
+
+/* A platform that has <langinfo.h>. */
+
+# if !@HAVE_LANGINFO_CODESET@
+# define CODESET 10000
+# define GNULIB_defined_CODESET 1
+# endif
+
+# if !@HAVE_LANGINFO_ERA@
+# define ERA 10047
+# define ERA_D_FMT 10048
+# define ERA_D_T_FMT 10049
+# define ERA_T_FMT 10050
+# define ALT_DIGITS 10051
+# define GNULIB_defined_ERA 1
+# endif
+
+#endif
+
+/* The definition of GL_LINK_WARNING is copied here. */
+
+/* Declare overridden functions. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Return a piece of locale dependent information.
+ Note: The difference between nl_langinfo (CODESET) and locale_charset ()
+ is that the latter normalizes the encoding names to GNU conventions. */
+
+#if @GNULIB_NL_LANGINFO@
+# if @REPLACE_NL_LANGINFO@
+# undef nl_langinfo
+# define nl_langinfo rpl_nl_langinfo
+# endif
+# if !@HAVE_NL_LANGINFO@ || @REPLACE_NL_LANGINFO@
+extern char *nl_langinfo (nl_item item);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef nl_langinfo
+# define nl_langinfo(i) \
+ (GL_LINK_WARNING ("nl_langinfo is not portable - " \
+ "use gnulib module nl_langinfo for portability"), \
+ nl_langinfo (i))
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _GL_LANGINFO_H */
+#endif /* _GL_LANGINFO_H */
/* Provide a stub lchown function for systems that lack it.
- Copyright (C) 1998, 1999, 2002, 2004, 2006, 2007, 2009 Free
- Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2002, 2004, 2006-2007, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Emulation for ldexpl.
Contributed by Paolo Bonzini
- Copyright 2002, 2003, 2007, 2008 Free Software Foundation, Inc.
+ Copyright 2002, 2003, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This file is part of gnulib.
/* linebuffer.c -- read arbitrarily long lines
- Copyright (C) 1986, 1991, 1998, 1999, 2001, 2003, 2004, 2006, 2007
+ Copyright (C) 1986, 1991, 1998-1999, 2001, 2003-2004, 2006-2007, 2009-2010
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
/* linebuffer.h -- declarations for reading arbitrarily long lines
- Copyright (C) 1986, 1991, 1998, 1999, 2002, 2003, 2007 Free Software
- Foundation, Inc.
+ Copyright (C) 1986, 1991, 1998-1999, 2002-2003, 2007, 2009-2010 Free
+ Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Emulate link on platforms that lack it, namely native Windows platforms.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Create a hard link relative to open directories.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* listen.c --- wrappers for Windows listen function
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Determine a canonical name for the current locale's character encoding.
- Copyright (C) 2000-2006, 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2000-2006, 2008-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
codeset = nl_langinfo (CODESET);
# ifdef __CYGWIN__
- /* Cygwin 2006 does not have locales. nl_langinfo (CODESET) always
+ /* Cygwin 1.5.x does not have locales. nl_langinfo (CODESET) always
returns "US-ASCII". As long as this is not fixed, return the suffix
of the locale name from the environment variables (if present) or
the codepage as a number. */
}
}
- /* Woe32 has a function returning the locale's codepage as a number. */
+ /* Woe32 has a function returning the locale's codepage as a number:
+ GetACP(). This encoding is used by Cygwin, unless the user has set
+ the environment variable CYGWIN=codepage:oem (which very few people
+ do).
+ Output directed to console windows needs to be converted (to
+ GetOEMCP() if the console is using a raster font, or to
+ GetConsoleOutputCP() if it is using a TrueType font). Cygwin does
+ this conversion transparently (see winsup/cygwin/fhandler_console.cc),
+ converting to GetConsoleOutputCP(). This leads to correct results,
+ except when SetConsoleOutputCP has been called and a raster font is
+ in use. */
sprintf (buf, "CP%u", GetACP ());
codeset = buf;
}
static char buf[2 + 10 + 1];
- /* Woe32 has a function returning the locale's codepage as a number. */
+ /* Woe32 has a function returning the locale's codepage as a number:
+ GetACP().
+ When the output goes to a console window, it needs to be provided in
+ GetOEMCP() encoding if the console is using a raster font, or in
+ GetConsoleOutputCP() encoding if it is using a TrueType font.
+ But in GUI programs and for output sent to files and pipes, GetACP()
+ encoding is the best bet. */
sprintf (buf, "CP%u", GetACP ());
codeset = buf;
/* Determine a canonical name for the current locale's character encoding.
- Copyright (C) 2000-2003 Free Software Foundation, Inc.
+ Copyright (C) 2000-2003, 2009-2010 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-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# include <xlocale.h>
#endif
+/* The definition of GL_LINK_WARNING is copied here. */
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
/* The LC_MESSAGES locale category is specified in POSIX, but not in ISO C.
On systems that don't define it, use the same value as GNU libintl. */
#if !defined LC_MESSAGES
# if @REPLACE_DUPLOCALE@
# undef duplocale
# define duplocale rpl_duplocale
-extern locale_t duplocale (locale_t locale);
+extern locale_t duplocale (locale_t locale) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef duplocale
/* Determine name of the currently selected locale.
- Copyright (C) 1995-1999, 2000-2008 Free Software Foundation, Inc.
+ Copyright (C) 1995-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published
# include "localename.h"
#endif
+#include <limits.h>
+#include <stddef.h>
#include <stdlib.h>
#include <locale.h>
+#include <string.h>
+
+#if HAVE_USELOCALE
+/* MacOS X 10.5 defines the locale_t type in <xlocale.h>. */
+# if defined __APPLE__ && defined __MACH__
+# include <xlocale.h>
+# endif
+# include <langinfo.h>
+# if !defined IN_LIBINTL
+# include "glthread/lock.h"
+# endif
+#endif
#if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
-# include <string.h>
# include <CoreFoundation/CFString.h>
# if HAVE_CFLOCALECOPYCURRENT
# include <CoreFoundation/CFLocale.h>
# define WIN32_NATIVE
#endif
-#ifdef WIN32_NATIVE
+#if defined WIN32_NATIVE || defined __CYGWIN__ /* WIN32 or Cygwin */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
/* List of language codes, sorted by value:
0x14 LANG_NORWEGIAN
0x15 LANG_POLISH
0x16 LANG_PORTUGUESE
- 0x17 LANG_RHAETO_ROMANCE
+ 0x17 LANG_ROMANSH
0x18 LANG_ROMANIAN
0x19 LANG_RUSSIAN
0x1a LANG_CROATIAN == LANG_SERBIAN
0x38 LANG_FAEROESE
0x39 LANG_HINDI
0x3a LANG_MALTESE
- 0x3b LANG_SAAMI
+ 0x3b LANG_SAMI
0x3c LANG_GAELIC
0x3d LANG_YIDDISH
0x3e LANG_MALAY
0x68 LANG_HAUSA
0x69 LANG_IBIBIO
0x6a LANG_YORUBA
+ 0x6d LANG_BASHKIR
+ 0x6e LANG_LUXEMBOURGISH
+ 0x6f LANG_GREENLANDIC
0x70 LANG_IGBO
0x71 LANG_KANURI
0x72 LANG_OROMO
0x77 LANG_SOMALI
0x78 LANG_YI
0x79 LANG_PAPIAMENTU
+ 0x7a LANG_MAPUDUNGUN
+ 0x7c LANG_MOHAWK
+ 0x7e LANG_BRETON
+ 0x82 LANG_OCCITAN
+ 0x83 LANG_CORSICAN
+ 0x84 LANG_ALSATIAN
+ 0x85 LANG_YAKUT
+ 0x86 LANG_KICHE
+ 0x87 LANG_KINYARWANDA
+ 0x88 LANG_WOLOF
+ 0x8c LANG_DARI
+ 0x91 LANG_SCOTTISH_GAELIC
*/
/* Mingw headers don't have latest language and sublanguage codes. */
# ifndef LANG_AFRIKAANS
# ifndef LANG_ALBANIAN
# define LANG_ALBANIAN 0x1c
# endif
+# ifndef LANG_ALSATIAN
+# define LANG_ALSATIAN 0x84
+# endif
# ifndef LANG_AMHARIC
# define LANG_AMHARIC 0x5e
# endif
# ifndef LANG_AZERI
# define LANG_AZERI 0x2c
# endif
+# ifndef LANG_BASHKIR
+# define LANG_BASHKIR 0x6d
+# endif
# ifndef LANG_BASQUE
# define LANG_BASQUE 0x2d
# endif
# ifndef LANG_BENGALI
# define LANG_BENGALI 0x45
# endif
+# ifndef LANG_BRETON
+# define LANG_BRETON 0x7e
+# endif
# ifndef LANG_BURMESE
# define LANG_BURMESE 0x55
# endif
# ifndef LANG_CHEROKEE
# define LANG_CHEROKEE 0x5c
# endif
+# ifndef LANG_CORSICAN
+# define LANG_CORSICAN 0x83
+# endif
+# ifndef LANG_DARI
+# define LANG_DARI 0x8c
+# endif
# ifndef LANG_DIVEHI
# define LANG_DIVEHI 0x65
# endif
# ifndef LANG_GEORGIAN
# define LANG_GEORGIAN 0x37
# endif
+# ifndef LANG_GREENLANDIC
+# define LANG_GREENLANDIC 0x6f
+# endif
# ifndef LANG_GUARANI
# define LANG_GUARANI 0x74
# endif
# ifndef LANG_KAZAK
# define LANG_KAZAK 0x3f
# endif
+# ifndef LANG_KICHE
+# define LANG_KICHE 0x86
+# endif
+# ifndef LANG_KINYARWANDA
+# define LANG_KINYARWANDA 0x87
+# endif
# ifndef LANG_KONKANI
# define LANG_KONKANI 0x57
# endif
# ifndef LANG_LITHUANIAN
# define LANG_LITHUANIAN 0x27
# endif
+# ifndef LANG_LUXEMBOURGISH
+# define LANG_LUXEMBOURGISH 0x6e
+# endif
# ifndef LANG_MACEDONIAN
# define LANG_MACEDONIAN 0x2f
# endif
# ifndef LANG_MAORI
# define LANG_MAORI 0x81
# endif
+# ifndef LANG_MAPUDUNGUN
+# define LANG_MAPUDUNGUN 0x7a
+# endif
# ifndef LANG_MARATHI
# define LANG_MARATHI 0x4e
# endif
+# ifndef LANG_MOHAWK
+# define LANG_MOHAWK 0x7c
+# endif
# ifndef LANG_MONGOLIAN
# define LANG_MONGOLIAN 0x50
# endif
# ifndef LANG_NEPALI
# define LANG_NEPALI 0x61
# endif
+# ifndef LANG_OCCITAN
+# define LANG_OCCITAN 0x82
+# endif
# ifndef LANG_ORIYA
# define LANG_ORIYA 0x48
# endif
# ifndef LANG_QUECHUA
# define LANG_QUECHUA 0x6b
# endif
-# ifndef LANG_RHAETO_ROMANCE
-# define LANG_RHAETO_ROMANCE 0x17
+# ifndef LANG_ROMANSH
+# define LANG_ROMANSH 0x17
# endif
-# ifndef LANG_SAAMI
-# define LANG_SAAMI 0x3b
+# ifndef LANG_SAMI
+# define LANG_SAMI 0x3b
# endif
# ifndef LANG_SANSKRIT
# define LANG_SANSKRIT 0x4f
# endif
+# ifndef LANG_SCOTTISH_GAELIC
+# define LANG_SCOTTISH_GAELIC 0x91
+# endif
# ifndef LANG_SERBIAN
# define LANG_SERBIAN 0x1a
# endif
# ifndef LANG_WELSH
# define LANG_WELSH 0x52
# endif
+# ifndef LANG_WOLOF
+# define LANG_WOLOF 0x88
+# endif
# ifndef LANG_XHOSA
# define LANG_XHOSA 0x34
# endif
+# ifndef LANG_YAKUT
+# define LANG_YAKUT 0x85
+# endif
# ifndef LANG_YI
# define LANG_YI 0x78
# endif
# ifndef LANG_ZULU
# define LANG_ZULU 0x35
# endif
+# ifndef SUBLANG_AFRIKAANS_SOUTH_AFRICA
+# define SUBLANG_AFRIKAANS_SOUTH_AFRICA 0x01
+# endif
+# ifndef SUBLANG_ALBANIAN_ALBANIA
+# define SUBLANG_ALBANIAN_ALBANIA 0x01
+# endif
+# ifndef SUBLANG_ALSATIAN_FRANCE
+# define SUBLANG_ALSATIAN_FRANCE 0x01
+# endif
+# ifndef SUBLANG_AMHARIC_ETHIOPIA
+# define SUBLANG_AMHARIC_ETHIOPIA 0x01
+# endif
# ifndef SUBLANG_ARABIC_SAUDI_ARABIA
# define SUBLANG_ARABIC_SAUDI_ARABIA 0x01
# endif
# ifndef SUBLANG_ARABIC_QATAR
# define SUBLANG_ARABIC_QATAR 0x10
# endif
+# ifndef SUBLANG_ARMENIAN_ARMENIA
+# define SUBLANG_ARMENIAN_ARMENIA 0x01
+# endif
+# ifndef SUBLANG_ASSAMESE_INDIA
+# define SUBLANG_ASSAMESE_INDIA 0x01
+# endif
# ifndef SUBLANG_AZERI_LATIN
# define SUBLANG_AZERI_LATIN 0x01
# endif
# ifndef SUBLANG_AZERI_CYRILLIC
# define SUBLANG_AZERI_CYRILLIC 0x02
# endif
+# ifndef SUBLANG_BASHKIR_RUSSIA
+# define SUBLANG_BASHKIR_RUSSIA 0x01
+# endif
+# ifndef SUBLANG_BASQUE_BASQUE
+# define SUBLANG_BASQUE_BASQUE 0x01
+# endif
+# ifndef SUBLANG_BELARUSIAN_BELARUS
+# define SUBLANG_BELARUSIAN_BELARUS 0x01
+# endif
# ifndef SUBLANG_BENGALI_INDIA
# define SUBLANG_BENGALI_INDIA 0x01
# endif
# ifndef SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC
# define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x08
# endif
+# ifndef SUBLANG_BRETON_FRANCE
+# define SUBLANG_BRETON_FRANCE 0x01
+# endif
+# ifndef SUBLANG_BULGARIAN_BULGARIA
+# define SUBLANG_BULGARIAN_BULGARIA 0x01
+# endif
+# ifndef SUBLANG_CAMBODIAN_CAMBODIA
+# define SUBLANG_CAMBODIAN_CAMBODIA 0x01
+# endif
+# ifndef SUBLANG_CATALAN_SPAIN
+# define SUBLANG_CATALAN_SPAIN 0x01
+# endif
+# ifndef SUBLANG_CORSICAN_FRANCE
+# define SUBLANG_CORSICAN_FRANCE 0x01
+# endif
# ifndef SUBLANG_CROATIAN_CROATIA
# define SUBLANG_CROATIAN_CROATIA 0x01
# endif
# ifndef SUBLANG_CHINESE_MACAU
# define SUBLANG_CHINESE_MACAU 0x05
# endif
+# ifndef SUBLANG_CZECH_CZECH_REPUBLIC
+# define SUBLANG_CZECH_CZECH_REPUBLIC 0x01
+# endif
+# ifndef SUBLANG_DANISH_DENMARK
+# define SUBLANG_DANISH_DENMARK 0x01
+# endif
+# ifndef SUBLANG_DARI_AFGHANISTAN
+# define SUBLANG_DARI_AFGHANISTAN 0x01
+# endif
+# ifndef SUBLANG_DIVEHI_MALDIVES
+# define SUBLANG_DIVEHI_MALDIVES 0x01
+# endif
+# ifndef SUBLANG_DUTCH_SURINAM
+# define SUBLANG_DUTCH_SURINAM 0x03
+# endif
# ifndef SUBLANG_ENGLISH_SOUTH_AFRICA
# define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07
# endif
# ifndef SUBLANG_ENGLISH_SINGAPORE
# define SUBLANG_ENGLISH_SINGAPORE 0x12
# endif
+# ifndef SUBLANG_ESTONIAN_ESTONIA
+# define SUBLANG_ESTONIAN_ESTONIA 0x01
+# endif
+# ifndef SUBLANG_FAEROESE_FAROE_ISLANDS
+# define SUBLANG_FAEROESE_FAROE_ISLANDS 0x01
+# endif
+# ifndef SUBLANG_FARSI_IRAN
+# define SUBLANG_FARSI_IRAN 0x01
+# endif
+# ifndef SUBLANG_FINNISH_FINLAND
+# define SUBLANG_FINNISH_FINLAND 0x01
+# endif
# ifndef SUBLANG_FRENCH_LUXEMBOURG
# define SUBLANG_FRENCH_LUXEMBOURG 0x05
# endif
# ifndef SUBLANG_FRENCH_HAITI
# define SUBLANG_FRENCH_HAITI 0x0f
# endif
+# ifndef SUBLANG_FRISIAN_NETHERLANDS
+# define SUBLANG_FRISIAN_NETHERLANDS 0x01
+# endif
+# ifndef SUBLANG_GALICIAN_SPAIN
+# define SUBLANG_GALICIAN_SPAIN 0x01
+# endif
+# ifndef SUBLANG_GEORGIAN_GEORGIA
+# define SUBLANG_GEORGIAN_GEORGIA 0x01
+# endif
# ifndef SUBLANG_GERMAN_LUXEMBOURG
# define SUBLANG_GERMAN_LUXEMBOURG 0x04
# endif
# ifndef SUBLANG_GERMAN_LIECHTENSTEIN
# define SUBLANG_GERMAN_LIECHTENSTEIN 0x05
# endif
+# ifndef SUBLANG_GREEK_GREECE
+# define SUBLANG_GREEK_GREECE 0x01
+# endif
+# ifndef SUBLANG_GREENLANDIC_GREENLAND
+# define SUBLANG_GREENLANDIC_GREENLAND 0x01
+# endif
+# ifndef SUBLANG_GUJARATI_INDIA
+# define SUBLANG_GUJARATI_INDIA 0x01
+# endif
+# ifndef SUBLANG_HAUSA_NIGERIA_LATIN
+# define SUBLANG_HAUSA_NIGERIA_LATIN 0x01
+# endif
+# ifndef SUBLANG_HEBREW_ISRAEL
+# define SUBLANG_HEBREW_ISRAEL 0x01
+# endif
+# ifndef SUBLANG_HINDI_INDIA
+# define SUBLANG_HINDI_INDIA 0x01
+# endif
+# ifndef SUBLANG_HUNGARIAN_HUNGARY
+# define SUBLANG_HUNGARIAN_HUNGARY 0x01
+# endif
+# ifndef SUBLANG_ICELANDIC_ICELAND
+# define SUBLANG_ICELANDIC_ICELAND 0x01
+# endif
+# ifndef SUBLANG_IGBO_NIGERIA
+# define SUBLANG_IGBO_NIGERIA 0x01
+# endif
+# ifndef SUBLANG_INDONESIAN_INDONESIA
+# define SUBLANG_INDONESIAN_INDONESIA 0x01
+# endif
+# ifndef SUBLANG_INUKTITUT_CANADA
+# define SUBLANG_INUKTITUT_CANADA 0x01
+# endif
+# undef SUBLANG_INUKTITUT_CANADA_LATIN
+# define SUBLANG_INUKTITUT_CANADA_LATIN 0x02
+# undef SUBLANG_IRISH_IRELAND
+# define SUBLANG_IRISH_IRELAND 0x02
+# ifndef SUBLANG_JAPANESE_JAPAN
+# define SUBLANG_JAPANESE_JAPAN 0x01
+# endif
+# ifndef SUBLANG_KANNADA_INDIA
+# define SUBLANG_KANNADA_INDIA 0x01
+# endif
# ifndef SUBLANG_KASHMIRI_INDIA
# define SUBLANG_KASHMIRI_INDIA 0x02
# endif
+# ifndef SUBLANG_KAZAK_KAZAKHSTAN
+# define SUBLANG_KAZAK_KAZAKHSTAN 0x01
+# endif
+# ifndef SUBLANG_KICHE_GUATEMALA
+# define SUBLANG_KICHE_GUATEMALA 0x01
+# endif
+# ifndef SUBLANG_KINYARWANDA_RWANDA
+# define SUBLANG_KINYARWANDA_RWANDA 0x01
+# endif
+# ifndef SUBLANG_KONKANI_INDIA
+# define SUBLANG_KONKANI_INDIA 0x01
+# endif
+# ifndef SUBLANG_KYRGYZ_KYRGYZSTAN
+# define SUBLANG_KYRGYZ_KYRGYZSTAN 0x01
+# endif
+# ifndef SUBLANG_LAO_LAOS
+# define SUBLANG_LAO_LAOS 0x01
+# endif
+# ifndef SUBLANG_LATVIAN_LATVIA
+# define SUBLANG_LATVIAN_LATVIA 0x01
+# endif
+# ifndef SUBLANG_LITHUANIAN_LITHUANIA
+# define SUBLANG_LITHUANIAN_LITHUANIA 0x01
+# endif
+# undef SUBLANG_LOWER_SORBIAN_GERMANY
+# define SUBLANG_LOWER_SORBIAN_GERMANY 0x02
+# ifndef SUBLANG_LUXEMBOURGISH_LUXEMBOURG
+# define SUBLANG_LUXEMBOURGISH_LUXEMBOURG 0x01
+# endif
+# ifndef SUBLANG_MACEDONIAN_MACEDONIA
+# define SUBLANG_MACEDONIAN_MACEDONIA 0x01
+# endif
# ifndef SUBLANG_MALAY_MALAYSIA
# define SUBLANG_MALAY_MALAYSIA 0x01
# endif
# ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM
# define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02
# endif
+# ifndef SUBLANG_MALAYALAM_INDIA
+# define SUBLANG_MALAYALAM_INDIA 0x01
+# endif
+# ifndef SUBLANG_MALTESE_MALTA
+# define SUBLANG_MALTESE_MALTA 0x01
+# endif
+# ifndef SUBLANG_MAORI_NEW_ZEALAND
+# define SUBLANG_MAORI_NEW_ZEALAND 0x01
+# endif
+# ifndef SUBLANG_MAPUDUNGUN_CHILE
+# define SUBLANG_MAPUDUNGUN_CHILE 0x01
+# endif
+# ifndef SUBLANG_MARATHI_INDIA
+# define SUBLANG_MARATHI_INDIA 0x01
+# endif
+# ifndef SUBLANG_MOHAWK_CANADA
+# define SUBLANG_MOHAWK_CANADA 0x01
+# endif
# ifndef SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA
# define SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA 0x01
# endif
# ifndef SUBLANG_MONGOLIAN_PRC
# define SUBLANG_MONGOLIAN_PRC 0x02
# endif
+# ifndef SUBLANG_NEPALI_NEPAL
+# define SUBLANG_NEPALI_NEPAL 0x01
+# endif
# ifndef SUBLANG_NEPALI_INDIA
# define SUBLANG_NEPALI_INDIA 0x02
# endif
+# ifndef SUBLANG_OCCITAN_FRANCE
+# define SUBLANG_OCCITAN_FRANCE 0x01
+# endif
+# ifndef SUBLANG_ORIYA_INDIA
+# define SUBLANG_ORIYA_INDIA 0x01
+# endif
+# ifndef SUBLANG_PASHTO_AFGHANISTAN
+# define SUBLANG_PASHTO_AFGHANISTAN 0x01
+# endif
+# ifndef SUBLANG_POLISH_POLAND
+# define SUBLANG_POLISH_POLAND 0x01
+# endif
# ifndef SUBLANG_PUNJABI_INDIA
# define SUBLANG_PUNJABI_INDIA 0x01
# endif
# ifndef SUBLANG_ROMANIAN_MOLDOVA
# define SUBLANG_ROMANIAN_MOLDOVA 0x02
# endif
+# ifndef SUBLANG_ROMANSH_SWITZERLAND
+# define SUBLANG_ROMANSH_SWITZERLAND 0x01
+# endif
# ifndef SUBLANG_RUSSIAN_RUSSIA
# define SUBLANG_RUSSIAN_RUSSIA 0x01
# endif
# ifndef SUBLANG_RUSSIAN_MOLDAVIA
# define SUBLANG_RUSSIAN_MOLDAVIA 0x02
# endif
+# ifndef SUBLANG_SAMI_NORTHERN_NORWAY
+# define SUBLANG_SAMI_NORTHERN_NORWAY 0x01
+# endif
+# ifndef SUBLANG_SAMI_NORTHERN_SWEDEN
+# define SUBLANG_SAMI_NORTHERN_SWEDEN 0x02
+# endif
+# ifndef SUBLANG_SAMI_NORTHERN_FINLAND
+# define SUBLANG_SAMI_NORTHERN_FINLAND 0x03
+# endif
+# ifndef SUBLANG_SAMI_LULE_NORWAY
+# define SUBLANG_SAMI_LULE_NORWAY 0x04
+# endif
+# ifndef SUBLANG_SAMI_LULE_SWEDEN
+# define SUBLANG_SAMI_LULE_SWEDEN 0x05
+# endif
+# ifndef SUBLANG_SAMI_SOUTHERN_NORWAY
+# define SUBLANG_SAMI_SOUTHERN_NORWAY 0x06
+# endif
+# ifndef SUBLANG_SAMI_SOUTHERN_SWEDEN
+# define SUBLANG_SAMI_SOUTHERN_SWEDEN 0x07
+# endif
+# undef SUBLANG_SAMI_SKOLT_FINLAND
+# define SUBLANG_SAMI_SKOLT_FINLAND 0x08
+# undef SUBLANG_SAMI_INARI_FINLAND
+# define SUBLANG_SAMI_INARI_FINLAND 0x09
+# ifndef SUBLANG_SANSKRIT_INDIA
+# define SUBLANG_SANSKRIT_INDIA 0x01
+# endif
# ifndef SUBLANG_SERBIAN_LATIN
# define SUBLANG_SERBIAN_LATIN 0x02
# endif
# ifndef SUBLANG_SINDHI_AFGHANISTAN
# define SUBLANG_SINDHI_AFGHANISTAN 0x02
# endif
+# ifndef SUBLANG_SINHALESE_SRI_LANKA
+# define SUBLANG_SINHALESE_SRI_LANKA 0x01
+# endif
+# ifndef SUBLANG_SLOVAK_SLOVAKIA
+# define SUBLANG_SLOVAK_SLOVAKIA 0x01
+# endif
+# ifndef SUBLANG_SLOVENIAN_SLOVENIA
+# define SUBLANG_SLOVENIAN_SLOVENIA 0x01
+# endif
+# ifndef SUBLANG_SOTHO_SOUTH_AFRICA
+# define SUBLANG_SOTHO_SOUTH_AFRICA 0x01
+# endif
# ifndef SUBLANG_SPANISH_GUATEMALA
# define SUBLANG_SPANISH_GUATEMALA 0x04
# endif
# ifndef SUBLANG_SPANISH_US
# define SUBLANG_SPANISH_US 0x15
# endif
+# ifndef SUBLANG_SWAHILI_KENYA
+# define SUBLANG_SWAHILI_KENYA 0x01
+# endif
+# ifndef SUBLANG_SWEDISH_SWEDEN
+# define SUBLANG_SWEDISH_SWEDEN 0x01
+# endif
# ifndef SUBLANG_SWEDISH_FINLAND
# define SUBLANG_SWEDISH_FINLAND 0x02
# endif
+# ifndef SUBLANG_SYRIAC_SYRIA
+# define SUBLANG_SYRIAC_SYRIA 0x01
+# endif
+# ifndef SUBLANG_TAGALOG_PHILIPPINES
+# define SUBLANG_TAGALOG_PHILIPPINES 0x01
+# endif
+# ifndef SUBLANG_TAJIK_TAJIKISTAN
+# define SUBLANG_TAJIK_TAJIKISTAN 0x01
+# endif
# ifndef SUBLANG_TAMAZIGHT_ARABIC
# define SUBLANG_TAMAZIGHT_ARABIC 0x01
# endif
# ifndef SUBLANG_TAMAZIGHT_ALGERIA_LATIN
# define SUBLANG_TAMAZIGHT_ALGERIA_LATIN 0x02
# endif
+# ifndef SUBLANG_TAMIL_INDIA
+# define SUBLANG_TAMIL_INDIA 0x01
+# endif
+# ifndef SUBLANG_TATAR_RUSSIA
+# define SUBLANG_TATAR_RUSSIA 0x01
+# endif
+# ifndef SUBLANG_TELUGU_INDIA
+# define SUBLANG_TELUGU_INDIA 0x01
+# endif
+# ifndef SUBLANG_THAI_THAILAND
+# define SUBLANG_THAI_THAILAND 0x01
+# endif
# ifndef SUBLANG_TIBETAN_PRC
# define SUBLANG_TIBETAN_PRC 0x01
# endif
# ifndef SUBLANG_TIGRINYA_ERITREA
# define SUBLANG_TIGRINYA_ERITREA 0x02
# endif
+# ifndef SUBLANG_TSWANA_SOUTH_AFRICA
+# define SUBLANG_TSWANA_SOUTH_AFRICA 0x01
+# endif
+# ifndef SUBLANG_TURKISH_TURKEY
+# define SUBLANG_TURKISH_TURKEY 0x01
+# endif
+# ifndef SUBLANG_TURKMEN_TURKMENISTAN
+# define SUBLANG_TURKMEN_TURKMENISTAN 0x01
+# endif
# ifndef SUBLANG_UIGHUR_PRC
# define SUBLANG_UIGHUR_PRC 0x01
# endif
+# ifndef SUBLANG_UKRAINIAN_UKRAINE
+# define SUBLANG_UKRAINIAN_UKRAINE 0x01
+# endif
+# ifndef SUBLANG_UPPER_SORBIAN_GERMANY
+# define SUBLANG_UPPER_SORBIAN_GERMANY 0x01
+# endif
# ifndef SUBLANG_URDU_PAKISTAN
# define SUBLANG_URDU_PAKISTAN 0x01
# endif
# ifndef SUBLANG_UZBEK_CYRILLIC
# define SUBLANG_UZBEK_CYRILLIC 0x02
# endif
+# ifndef SUBLANG_VIETNAMESE_VIETNAM
+# define SUBLANG_VIETNAMESE_VIETNAM 0x01
+# endif
+# ifndef SUBLANG_WELSH_UNITED_KINGDOM
+# define SUBLANG_WELSH_UNITED_KINGDOM 0x01
+# endif
+# ifndef SUBLANG_WOLOF_SENEGAL
+# define SUBLANG_WOLOF_SENEGAL 0x01
+# endif
+# ifndef SUBLANG_XHOSA_SOUTH_AFRICA
+# define SUBLANG_XHOSA_SOUTH_AFRICA 0x01
+# endif
+# ifndef SUBLANG_YAKUT_RUSSIA
+# define SUBLANG_YAKUT_RUSSIA 0x01
+# endif
+# ifndef SUBLANG_YI_PRC
+# define SUBLANG_YI_PRC 0x01
+# endif
+# ifndef SUBLANG_YORUBA_NIGERIA
+# define SUBLANG_YORUBA_NIGERIA 0x01
+# endif
+# ifndef SUBLANG_ZULU_SOUTH_AFRICA
+# define SUBLANG_ZULU_SOUTH_AFRICA 0x01
+# endif
/* GetLocaleInfoA operations. */
# ifndef LOCALE_SNAME
# define LOCALE_SNAME 0x5c
#endif
-#ifdef WIN32_NATIVE
+#if defined WIN32_NATIVE || defined __CYGWIN__ /* WIN32 or Cygwin */
/* Canonicalize a Win32 native locale name to a Unix locale name.
NAME is a sufficiently large buffer.
For details about languages, see http://www.ethnologue.com/ . */
switch (primary)
{
- case LANG_AFRIKAANS: return "af_ZA";
- case LANG_ALBANIAN: return "sq_AL";
- case LANG_AMHARIC: return "am_ET";
+ case LANG_AFRIKAANS:
+ switch (sub)
+ {
+ case SUBLANG_AFRIKAANS_SOUTH_AFRICA: return "af_ZA";
+ }
+ return "af";
+ case LANG_ALBANIAN:
+ switch (sub)
+ {
+ case SUBLANG_ALBANIAN_ALBANIA: return "sq_AL";
+ }
+ return "sq";
+ case LANG_ALSATIAN:
+ switch (sub)
+ {
+ case SUBLANG_ALSATIAN_FRANCE: return "gsw_FR";
+ }
+ return "gsw";
+ case LANG_AMHARIC:
+ switch (sub)
+ {
+ case SUBLANG_AMHARIC_ETHIOPIA: return "am_ET";
+ }
+ return "am";
case LANG_ARABIC:
switch (sub)
{
case SUBLANG_ARABIC_QATAR: return "ar_QA";
}
return "ar";
- case LANG_ARMENIAN: return "hy_AM";
- case LANG_ASSAMESE: return "as_IN";
+ case LANG_ARMENIAN:
+ switch (sub)
+ {
+ case SUBLANG_ARMENIAN_ARMENIA: return "hy_AM";
+ }
+ return "hy";
+ case LANG_ASSAMESE:
+ switch (sub)
+ {
+ case SUBLANG_ASSAMESE_INDIA: return "as_IN";
+ }
+ return "as";
case LANG_AZERI:
switch (sub)
{
/* FIXME: Adjust this when Azerbaijani locales appear on Unix. */
+ case 0x1e: return "az@latin";
case SUBLANG_AZERI_LATIN: return "az_AZ@latin";
+ case 0x1d: return "az@cyrillic";
case SUBLANG_AZERI_CYRILLIC: return "az_AZ@cyrillic";
}
return "az";
+ case LANG_BASHKIR:
+ switch (sub)
+ {
+ case SUBLANG_BASHKIR_RUSSIA: return "ba_RU";
+ }
+ return "ba";
case LANG_BASQUE:
switch (sub)
{
- case SUBLANG_DEFAULT: return "eu_ES";
+ case SUBLANG_BASQUE_BASQUE: return "eu_ES";
}
return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR". */
- case LANG_BELARUSIAN: return "be_BY";
+ case LANG_BELARUSIAN:
+ switch (sub)
+ {
+ case SUBLANG_BELARUSIAN_BELARUS: return "be_BY";
+ }
+ return "be";
case LANG_BENGALI:
switch (sub)
{
case SUBLANG_BENGALI_BANGLADESH: return "bn_BD";
}
return "bn";
- case LANG_BULGARIAN: return "bg_BG";
- case LANG_BURMESE: return "my_MM";
- case LANG_CAMBODIAN: return "km_KH";
- case LANG_CATALAN: return "ca_ES";
- case LANG_CHEROKEE: return "chr_US";
+ case LANG_BRETON:
+ switch (sub)
+ {
+ case SUBLANG_BRETON_FRANCE: return "br_FR";
+ }
+ return "br";
+ case LANG_BULGARIAN:
+ switch (sub)
+ {
+ case SUBLANG_BULGARIAN_BULGARIA: return "bg_BG";
+ }
+ return "bg";
+ case LANG_BURMESE:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "my_MM";
+ }
+ return "my";
+ case LANG_CAMBODIAN:
+ switch (sub)
+ {
+ case SUBLANG_CAMBODIAN_CAMBODIA: return "km_KH";
+ }
+ return "km";
+ case LANG_CATALAN:
+ switch (sub)
+ {
+ case SUBLANG_CATALAN_SPAIN: return "ca_ES";
+ }
+ return "ca";
+ case LANG_CHEROKEE:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "chr_US";
+ }
+ return "chr";
case LANG_CHINESE:
switch (sub)
{
- case SUBLANG_CHINESE_TRADITIONAL: return "zh_TW";
- case SUBLANG_CHINESE_SIMPLIFIED: return "zh_CN";
- case SUBLANG_CHINESE_HONGKONG: return "zh_HK";
- case SUBLANG_CHINESE_SINGAPORE: return "zh_SG";
- case SUBLANG_CHINESE_MACAU: return "zh_MO";
+ case SUBLANG_CHINESE_TRADITIONAL: case 0x1f: return "zh_TW";
+ case SUBLANG_CHINESE_SIMPLIFIED: case 0x00: return "zh_CN";
+ case SUBLANG_CHINESE_HONGKONG: return "zh_HK"; /* traditional */
+ case SUBLANG_CHINESE_SINGAPORE: return "zh_SG"; /* simplified */
+ case SUBLANG_CHINESE_MACAU: return "zh_MO"; /* traditional */
}
return "zh";
- case LANG_CROATIAN: /* LANG_CROATIAN == LANG_SERBIAN
- * What used to be called Serbo-Croatian
- * should really now be two separate
- * languages because of political reasons.
- * (Says tml, who knows nothing about Serbian
- * or Croatian.)
- * (I can feel those flames coming already.)
- */
+ case LANG_CORSICAN:
+ switch (sub)
+ {
+ case SUBLANG_CORSICAN_FRANCE: return "co_FR";
+ }
+ return "co";
+ case LANG_CROATIAN: /* LANG_CROATIAN == LANG_SERBIAN == LANG_BOSNIAN
+ * What used to be called Serbo-Croatian
+ * should really now be two separate
+ * languages because of political reasons.
+ * (Says tml, who knows nothing about Serbian
+ * or Croatian.)
+ * (I can feel those flames coming already.)
+ */
switch (sub)
{
+ /* Croatian */
+ case 0x00: return "hr";
case SUBLANG_CROATIAN_CROATIA: return "hr_HR";
- case SUBLANG_SERBIAN_LATIN: return "sr_CS";
- case SUBLANG_SERBIAN_CYRILLIC: return "sr_CS@cyrillic";
case SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN: return "hr_BA";
- case SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN: return "bs_BA";
+ /* Serbian */
+ case 0x1f: return "sr";
+ case 0x1c: return "sr"; /* latin */
+ case SUBLANG_SERBIAN_LATIN: return "sr_CS"; /* latin */
+ case 0x09: return "sr_RS"; /* latin */
+ case 0x0b: return "sr_ME"; /* latin */
+ case 0x06: return "sr_BA"; /* latin */
+ case 0x1b: return "sr@cyrillic";
+ case SUBLANG_SERBIAN_CYRILLIC: return "sr_CS@cyrillic";
+ case 0x0a: return "sr_RS@cyrillic";
+ case 0x0c: return "sr_ME@cyrillic";
+ case 0x07: return "sr_BA@cyrillic";
+ /* Bosnian */
+ case 0x1e: return "bs";
+ case 0x1a: return "bs"; /* latin */
+ case SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN: return "bs_BA"; /* latin */
+ case 0x19: return "bs@cyrillic";
case SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC: return "bs_BA@cyrillic";
}
return "hr";
- case LANG_CZECH: return "cs_CZ";
- case LANG_DANISH: return "da_DK";
- case LANG_DIVEHI: return "dv_MV";
+ case LANG_CZECH:
+ switch (sub)
+ {
+ case SUBLANG_CZECH_CZECH_REPUBLIC: return "cs_CZ";
+ }
+ return "cs";
+ case LANG_DANISH:
+ switch (sub)
+ {
+ case SUBLANG_DANISH_DENMARK: return "da_DK";
+ }
+ return "da";
+ case LANG_DARI:
+ /* FIXME: Adjust this when such locales appear on Unix. */
+ switch (sub)
+ {
+ case SUBLANG_DARI_AFGHANISTAN: return "prs_AF";
+ }
+ return "prs";
+ case LANG_DIVEHI:
+ switch (sub)
+ {
+ case SUBLANG_DIVEHI_MALDIVES: return "dv_MV";
+ }
+ return "dv";
case LANG_DUTCH:
switch (sub)
{
case SUBLANG_DUTCH: return "nl_NL";
case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE";
+ case SUBLANG_DUTCH_SURINAM: return "nl_SR";
}
return "nl";
- case LANG_EDO: return "bin_NG";
+ case LANG_EDO:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "bin_NG";
+ }
+ return "bin";
case LANG_ENGLISH:
switch (sub)
{
case SUBLANG_ENGLISH_SINGAPORE: return "en_SG";
}
return "en";
- case LANG_ESTONIAN: return "et_EE";
- case LANG_FAEROESE: return "fo_FO";
- case LANG_FARSI: return "fa_IR";
- case LANG_FINNISH: return "fi_FI";
+ case LANG_ESTONIAN:
+ switch (sub)
+ {
+ case SUBLANG_ESTONIAN_ESTONIA: return "et_EE";
+ }
+ return "et";
+ case LANG_FAEROESE:
+ switch (sub)
+ {
+ case SUBLANG_FAEROESE_FAROE_ISLANDS: return "fo_FO";
+ }
+ return "fo";
+ case LANG_FARSI:
+ switch (sub)
+ {
+ case SUBLANG_FARSI_IRAN: return "fa_IR";
+ }
+ return "fa";
+ case LANG_FINNISH:
+ switch (sub)
+ {
+ case SUBLANG_FINNISH_FINLAND: return "fi_FI";
+ }
+ return "fi";
case LANG_FRENCH:
switch (sub)
{
case SUBLANG_FRENCH_HAITI: return "fr_HT";
}
return "fr";
- case LANG_FRISIAN: return "fy_NL";
+ case LANG_FRISIAN:
+ switch (sub)
+ {
+ case SUBLANG_FRISIAN_NETHERLANDS: return "fy_NL";
+ }
+ return "fy";
case LANG_FULFULDE:
/* Spoken in Nigeria, Guinea, Senegal, Mali, Niger, Cameroon, Benin. */
- return "ff_NG";
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "ff_NG";
+ }
+ return "ff";
case LANG_GAELIC:
switch (sub)
{
- case 0x01: /* SCOTTISH */ return "gd_GB";
- case 0x02: /* IRISH */ return "ga_IE";
+ case 0x01: /* SCOTTISH */
+ /* old, superseded by LANG_SCOTTISH_GAELIC */
+ return "gd_GB";
+ case SUBLANG_IRISH_IRELAND: return "ga_IE";
+ }
+ return "ga";
+ case LANG_GALICIAN:
+ switch (sub)
+ {
+ case SUBLANG_GALICIAN_SPAIN: return "gl_ES";
+ }
+ return "gl";
+ case LANG_GEORGIAN:
+ switch (sub)
+ {
+ case SUBLANG_GEORGIAN_GEORGIA: return "ka_GE";
}
- return "C";
- case LANG_GALICIAN: return "gl_ES";
- case LANG_GEORGIAN: return "ka_GE";
+ return "ka";
case LANG_GERMAN:
switch (sub)
{
case SUBLANG_GERMAN_LIECHTENSTEIN: return "de_LI";
}
return "de";
- case LANG_GREEK: return "el_GR";
- case LANG_GUARANI: return "gn_PY";
- case LANG_GUJARATI: return "gu_IN";
- case LANG_HAUSA: return "ha_NG";
+ case LANG_GREEK:
+ switch (sub)
+ {
+ case SUBLANG_GREEK_GREECE: return "el_GR";
+ }
+ return "el";
+ case LANG_GREENLANDIC:
+ switch (sub)
+ {
+ case SUBLANG_GREENLANDIC_GREENLAND: return "kl_GL";
+ }
+ return "kl";
+ case LANG_GUARANI:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "gn_PY";
+ }
+ return "gn";
+ case LANG_GUJARATI:
+ switch (sub)
+ {
+ case SUBLANG_GUJARATI_INDIA: return "gu_IN";
+ }
+ return "gu";
+ case LANG_HAUSA:
+ switch (sub)
+ {
+ case 0x1f: return "ha";
+ case SUBLANG_HAUSA_NIGERIA_LATIN: return "ha_NG";
+ }
+ return "ha";
case LANG_HAWAIIAN:
/* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers)
or Hawaii Creole English ("cpe_US", 600000 speakers)? */
- return "cpe_US";
- case LANG_HEBREW: return "he_IL";
- case LANG_HINDI: return "hi_IN";
- case LANG_HUNGARIAN: return "hu_HU";
- case LANG_IBIBIO: return "nic_NG";
- case LANG_ICELANDIC: return "is_IS";
- case LANG_IGBO: return "ig_NG";
- case LANG_INDONESIAN: return "id_ID";
- case LANG_INUKTITUT: return "iu_CA";
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "cpe_US";
+ }
+ return "cpe";
+ case LANG_HEBREW:
+ switch (sub)
+ {
+ case SUBLANG_HEBREW_ISRAEL: return "he_IL";
+ }
+ return "he";
+ case LANG_HINDI:
+ switch (sub)
+ {
+ case SUBLANG_HINDI_INDIA: return "hi_IN";
+ }
+ return "hi";
+ case LANG_HUNGARIAN:
+ switch (sub)
+ {
+ case SUBLANG_HUNGARIAN_HUNGARY: return "hu_HU";
+ }
+ return "hu";
+ case LANG_IBIBIO:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "nic_NG";
+ }
+ return "nic";
+ case LANG_ICELANDIC:
+ switch (sub)
+ {
+ case SUBLANG_ICELANDIC_ICELAND: return "is_IS";
+ }
+ return "is";
+ case LANG_IGBO:
+ switch (sub)
+ {
+ case SUBLANG_IGBO_NIGERIA: return "ig_NG";
+ }
+ return "ig";
+ case LANG_INDONESIAN:
+ switch (sub)
+ {
+ case SUBLANG_INDONESIAN_INDONESIA: return "id_ID";
+ }
+ return "id";
+ case LANG_INUKTITUT:
+ switch (sub)
+ {
+ case 0x1e: return "iu"; /* syllabic */
+ case SUBLANG_INUKTITUT_CANADA: return "iu_CA"; /* syllabic */
+ case 0x1f: return "iu@latin";
+ case SUBLANG_INUKTITUT_CANADA_LATIN: return "iu_CA@latin";
+ }
+ return "iu";
case LANG_ITALIAN:
switch (sub)
{
case SUBLANG_ITALIAN_SWISS: return "it_CH";
}
return "it";
- case LANG_JAPANESE: return "ja_JP";
- case LANG_KANNADA: return "kn_IN";
- case LANG_KANURI: return "kr_NG";
+ case LANG_JAPANESE:
+ switch (sub)
+ {
+ case SUBLANG_JAPANESE_JAPAN: return "ja_JP";
+ }
+ return "ja";
+ case LANG_KANNADA:
+ switch (sub)
+ {
+ case SUBLANG_KANNADA_INDIA: return "kn_IN";
+ }
+ return "kn";
+ case LANG_KANURI:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "kr_NG";
+ }
+ return "kr";
case LANG_KASHMIRI:
switch (sub)
{
case SUBLANG_KASHMIRI_INDIA: return "ks_IN";
}
return "ks";
- case LANG_KAZAK: return "kk_KZ";
+ case LANG_KAZAK:
+ switch (sub)
+ {
+ case SUBLANG_KAZAK_KAZAKHSTAN: return "kk_KZ";
+ }
+ return "kk";
+ case LANG_KICHE:
+ /* FIXME: Adjust this when such locales appear on Unix. */
+ switch (sub)
+ {
+ case SUBLANG_KICHE_GUATEMALA: return "qut_GT";
+ }
+ return "qut";
+ case LANG_KINYARWANDA:
+ switch (sub)
+ {
+ case SUBLANG_KINYARWANDA_RWANDA: return "rw_RW";
+ }
+ return "rw";
case LANG_KONKANI:
/* FIXME: Adjust this when such locales appear on Unix. */
- return "kok_IN";
- case LANG_KOREAN: return "ko_KR";
- case LANG_KYRGYZ: return "ky_KG";
- case LANG_LAO: return "lo_LA";
- case LANG_LATIN: return "la_VA";
- case LANG_LATVIAN: return "lv_LV";
- case LANG_LITHUANIAN: return "lt_LT";
- case LANG_MACEDONIAN: return "mk_MK";
+ switch (sub)
+ {
+ case SUBLANG_KONKANI_INDIA: return "kok_IN";
+ }
+ return "kok";
+ case LANG_KOREAN:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "ko_KR";
+ }
+ return "ko";
+ case LANG_KYRGYZ:
+ switch (sub)
+ {
+ case SUBLANG_KYRGYZ_KYRGYZSTAN: return "ky_KG";
+ }
+ return "ky";
+ case LANG_LAO:
+ switch (sub)
+ {
+ case SUBLANG_LAO_LAOS: return "lo_LA";
+ }
+ return "lo";
+ case LANG_LATIN:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "la_VA";
+ }
+ return "la";
+ case LANG_LATVIAN:
+ switch (sub)
+ {
+ case SUBLANG_LATVIAN_LATVIA: return "lv_LV";
+ }
+ return "lv";
+ case LANG_LITHUANIAN:
+ switch (sub)
+ {
+ case SUBLANG_LITHUANIAN_LITHUANIA: return "lt_LT";
+ }
+ return "lt";
+ case LANG_LUXEMBOURGISH:
+ switch (sub)
+ {
+ case SUBLANG_LUXEMBOURGISH_LUXEMBOURG: return "lb_LU";
+ }
+ return "lb";
+ case LANG_MACEDONIAN:
+ switch (sub)
+ {
+ case SUBLANG_MACEDONIAN_MACEDONIA: return "mk_MK";
+ }
+ return "mk";
case LANG_MALAY:
switch (sub)
{
case SUBLANG_MALAY_BRUNEI_DARUSSALAM: return "ms_BN";
}
return "ms";
- case LANG_MALAYALAM: return "ml_IN";
- case LANG_MALTESE: return "mt_MT";
+ case LANG_MALAYALAM:
+ switch (sub)
+ {
+ case SUBLANG_MALAYALAM_INDIA: return "ml_IN";
+ }
+ return "ml";
+ case LANG_MALTESE:
+ switch (sub)
+ {
+ case SUBLANG_MALTESE_MALTA: return "mt_MT";
+ }
+ return "mt";
case LANG_MANIPURI:
/* FIXME: Adjust this when such locales appear on Unix. */
- return "mni_IN";
- case LANG_MAORI: return "mi_NZ";
- case LANG_MARATHI: return "mr_IN";
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "mni_IN";
+ }
+ return "mni";
+ case LANG_MAORI:
+ switch (sub)
+ {
+ case SUBLANG_MAORI_NEW_ZEALAND: return "mi_NZ";
+ }
+ return "mi";
+ case LANG_MAPUDUNGUN:
+ switch (sub)
+ {
+ case SUBLANG_MAPUDUNGUN_CHILE: return "arn_CL";
+ }
+ return "arn";
+ case LANG_MARATHI:
+ switch (sub)
+ {
+ case SUBLANG_MARATHI_INDIA: return "mr_IN";
+ }
+ return "mr";
+ case LANG_MOHAWK:
+ switch (sub)
+ {
+ case SUBLANG_MOHAWK_CANADA: return "moh_CA";
+ }
+ return "moh";
case LANG_MONGOLIAN:
switch (sub)
{
- case SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA: return "mn_MN";
- case SUBLANG_MONGOLIAN_PRC: return "mn_CN";
+ case SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA: case 0x1e: return "mn_MN";
+ case SUBLANG_MONGOLIAN_PRC: case 0x1f: return "mn_CN";
}
return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN". */
case LANG_NEPALI:
switch (sub)
{
- case SUBLANG_DEFAULT: return "ne_NP";
+ case SUBLANG_NEPALI_NEPAL: return "ne_NP";
case SUBLANG_NEPALI_INDIA: return "ne_IN";
}
return "ne";
case LANG_NORWEGIAN:
switch (sub)
{
+ case 0x1f: return "nb";
case SUBLANG_NORWEGIAN_BOKMAL: return "nb_NO";
+ case 0x1e: return "nn";
case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO";
}
return "no";
- case LANG_ORIYA: return "or_IN";
- case LANG_OROMO: return "om_ET";
- case LANG_PAPIAMENTU: return "pap_AN";
+ case LANG_OCCITAN:
+ switch (sub)
+ {
+ case SUBLANG_OCCITAN_FRANCE: return "oc_FR";
+ }
+ return "oc";
+ case LANG_ORIYA:
+ switch (sub)
+ {
+ case SUBLANG_ORIYA_INDIA: return "or_IN";
+ }
+ return "or";
+ case LANG_OROMO:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "om_ET";
+ }
+ return "om";
+ case LANG_PAPIAMENTU:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "pap_AN";
+ }
+ return "pap";
case LANG_PASHTO:
+ switch (sub)
+ {
+ case SUBLANG_PASHTO_AFGHANISTAN: return "ps_AF";
+ }
return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF". */
- case LANG_POLISH: return "pl_PL";
+ case LANG_POLISH:
+ switch (sub)
+ {
+ case SUBLANG_POLISH_POLAND: return "pl_PL";
+ }
+ return "pl";
case LANG_PORTUGUESE:
switch (sub)
{
- case SUBLANG_PORTUGUESE: return "pt_PT";
/* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT.
Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */
case SUBLANG_PORTUGUESE_BRAZILIAN: return "pt_BR";
+ case SUBLANG_PORTUGUESE: return "pt_PT";
}
return "pt";
case LANG_PUNJABI:
}
return "pa";
case LANG_QUECHUA:
+ /* Note: Microsoft uses the non-ISO language code "quz". */
switch (sub)
{
case SUBLANG_QUECHUA_BOLIVIA: return "qu_BO";
case SUBLANG_QUECHUA_PERU: return "qu_PE";
}
return "qu";
- case LANG_RHAETO_ROMANCE: return "rm_CH";
case LANG_ROMANIAN:
switch (sub)
{
case SUBLANG_ROMANIAN_MOLDOVA: return "ro_MD";
}
return "ro";
+ case LANG_ROMANSH:
+ switch (sub)
+ {
+ case SUBLANG_ROMANSH_SWITZERLAND: return "rm_CH";
+ }
+ return "rm";
case LANG_RUSSIAN:
switch (sub)
{
case SUBLANG_RUSSIAN_MOLDAVIA: return "ru_MD";
}
return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA" or "ru_MD". */
- case LANG_SAAMI: /* actually Northern Sami */ return "se_NO";
- case LANG_SANSKRIT: return "sa_IN";
+ case LANG_SAMI:
+ switch (sub)
+ {
+ /* Northern Sami */
+ case 0x00: return "se";
+ case SUBLANG_SAMI_NORTHERN_NORWAY: return "se_NO";
+ case SUBLANG_SAMI_NORTHERN_SWEDEN: return "se_SE";
+ case SUBLANG_SAMI_NORTHERN_FINLAND: return "se_FI";
+ /* Lule Sami */
+ case 0x1f: return "smj";
+ case SUBLANG_SAMI_LULE_NORWAY: return "smj_NO";
+ case SUBLANG_SAMI_LULE_SWEDEN: return "smj_SE";
+ /* Southern Sami */
+ case 0x1e: return "sma";
+ case SUBLANG_SAMI_SOUTHERN_NORWAY: return "sma_NO";
+ case SUBLANG_SAMI_SOUTHERN_SWEDEN: return "sma_SE";
+ /* Skolt Sami */
+ case 0x1d: return "sms";
+ case SUBLANG_SAMI_SKOLT_FINLAND: return "sms_FI";
+ /* Inari Sami */
+ case 0x1c: return "smn";
+ case SUBLANG_SAMI_INARI_FINLAND: return "smn_FI";
+ }
+ return "se"; /* or "smi"? */
+ case LANG_SANSKRIT:
+ switch (sub)
+ {
+ case SUBLANG_SANSKRIT_INDIA: return "sa_IN";
+ }
+ return "sa";
+ case LANG_SCOTTISH_GAELIC:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "gd_GB";
+ }
+ return "gd";
case LANG_SINDHI:
switch (sub)
{
/*case SUBLANG_SINDHI_AFGHANISTAN: return "sd_AF";*/
}
return "sd";
- case LANG_SINHALESE: return "si_LK";
- case LANG_SLOVAK: return "sk_SK";
- case LANG_SLOVENIAN: return "sl_SI";
- case LANG_SOMALI: return "so_SO";
+ case LANG_SINHALESE:
+ switch (sub)
+ {
+ case SUBLANG_SINHALESE_SRI_LANKA: return "si_LK";
+ }
+ return "si";
+ case LANG_SLOVAK:
+ switch (sub)
+ {
+ case SUBLANG_SLOVAK_SLOVAKIA: return "sk_SK";
+ }
+ return "sk";
+ case LANG_SLOVENIAN:
+ switch (sub)
+ {
+ case SUBLANG_SLOVENIAN_SLOVENIA: return "sl_SI";
+ }
+ return "sl";
+ case LANG_SOMALI:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "so_SO";
+ }
+ return "so";
case LANG_SORBIAN:
/* FIXME: Adjust this when such locales appear on Unix. */
- return "wen_DE";
+ switch (sub)
+ {
+ /* Upper Sorbian */
+ case 0x00: return "hsb";
+ case SUBLANG_UPPER_SORBIAN_GERMANY: return "hsb_DE";
+ /* Lower Sorbian */
+ case 0x1f: return "dsb";
+ case SUBLANG_LOWER_SORBIAN_GERMANY: return "dsb_DE";
+ }
+ return "wen";
case LANG_SOTHO:
/* <http://www.microsoft.com/globaldev/reference/lcid-all.mspx> calls
it "Sepedi"; according to
<http://www.ethnologue.com/show_language.asp?code=nso>
<http://www.ethnologue.com/show_language.asp?code=sot>
it's the same as Northern Sotho. */
- return "nso_ZA";
+ switch (sub)
+ {
+ case SUBLANG_SOTHO_SOUTH_AFRICA: return "nso_ZA";
+ }
+ return "nso";
case LANG_SPANISH:
switch (sub)
{
case SUBLANG_SPANISH_US: return "es_US";
}
return "es";
- case LANG_SUTU: return "bnt_TZ"; /* or "st_LS" or "nso_ZA"? */
- case LANG_SWAHILI: return "sw_KE";
+ case LANG_SUTU:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "bnt_TZ"; /* or "st_LS" or "nso_ZA"? */
+ }
+ return "bnt";
+ case LANG_SWAHILI:
+ switch (sub)
+ {
+ case SUBLANG_SWAHILI_KENYA: return "sw_KE";
+ }
+ return "sw";
case LANG_SWEDISH:
switch (sub)
{
- case SUBLANG_DEFAULT: return "sv_SE";
+ case SUBLANG_SWEDISH_SWEDEN: return "sv_SE";
case SUBLANG_SWEDISH_FINLAND: return "sv_FI";
}
return "sv";
- case LANG_SYRIAC: return "syr_TR"; /* An extinct language. */
- case LANG_TAGALOG: return "tl_PH";
- case LANG_TAJIK: return "tg_TJ";
+ case LANG_SYRIAC:
+ switch (sub)
+ {
+ case SUBLANG_SYRIAC_SYRIA: return "syr_SY"; /* An extinct language. */
+ }
+ return "syr";
+ case LANG_TAGALOG:
+ switch (sub)
+ {
+ case SUBLANG_TAGALOG_PHILIPPINES: return "tl_PH"; /* or "fil_PH"? */
+ }
+ return "tl"; /* or "fil"? */
+ case LANG_TAJIK:
+ switch (sub)
+ {
+ case 0x1f: return "tg";
+ case SUBLANG_TAJIK_TAJIKISTAN: return "tg_TJ";
+ }
+ return "tg";
case LANG_TAMAZIGHT:
+ /* Note: Microsoft uses the non-ISO language code "tmz". */
switch (sub)
{
/* FIXME: Adjust this when Tamazight locales appear on Unix. */
case SUBLANG_TAMAZIGHT_ARABIC: return "ber_MA@arabic";
+ case 0x1f: return "ber@latin";
case SUBLANG_TAMAZIGHT_ALGERIA_LATIN: return "ber_DZ@latin";
}
- return "ber_MA";
+ return "ber";
case LANG_TAMIL:
switch (sub)
{
- case SUBLANG_DEFAULT: return "ta_IN";
+ case SUBLANG_TAMIL_INDIA: return "ta_IN";
}
return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */
- case LANG_TATAR: return "tt_RU";
- case LANG_TELUGU: return "te_IN";
- case LANG_THAI: return "th_TH";
+ case LANG_TATAR:
+ switch (sub)
+ {
+ case SUBLANG_TATAR_RUSSIA: return "tt_RU";
+ }
+ return "tt";
+ case LANG_TELUGU:
+ switch (sub)
+ {
+ case SUBLANG_TELUGU_INDIA: return "te_IN";
+ }
+ return "te";
+ case LANG_THAI:
+ switch (sub)
+ {
+ case SUBLANG_THAI_THAILAND: return "th_TH";
+ }
+ return "th";
case LANG_TIBETAN:
switch (sub)
{
case SUBLANG_TIGRINYA_ERITREA: return "ti_ER";
}
return "ti";
- case LANG_TSONGA: return "ts_ZA";
- case LANG_TSWANA: return "tn_BW";
- case LANG_TURKISH: return "tr_TR";
- case LANG_TURKMEN: return "tk_TM";
+ case LANG_TSONGA:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "ts_ZA";
+ }
+ return "ts";
+ case LANG_TSWANA:
+ /* Spoken in South Africa, Botswana. */
+ switch (sub)
+ {
+ case SUBLANG_TSWANA_SOUTH_AFRICA: return "tn_ZA";
+ }
+ return "tn";
+ case LANG_TURKISH:
+ switch (sub)
+ {
+ case SUBLANG_TURKISH_TURKEY: return "tr_TR";
+ }
+ return "tr";
+ case LANG_TURKMEN:
+ switch (sub)
+ {
+ case SUBLANG_TURKMEN_TURKMENISTAN: return "tk_TM";
+ }
+ return "tk";
case LANG_UIGHUR:
switch (sub)
{
case SUBLANG_UIGHUR_PRC: return "ug_CN";
}
return "ug";
- case LANG_UKRAINIAN: return "uk_UA";
+ case LANG_UKRAINIAN:
+ switch (sub)
+ {
+ case SUBLANG_UKRAINIAN_UKRAINE: return "uk_UA";
+ }
+ return "uk";
case LANG_URDU:
switch (sub)
{
case LANG_UZBEK:
switch (sub)
{
+ case 0x1f: return "uz";
case SUBLANG_UZBEK_LATIN: return "uz_UZ";
+ case 0x1e: return "uz@cyrillic";
case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ@cyrillic";
}
return "uz";
- case LANG_VENDA: return "ve_ZA";
- case LANG_VIETNAMESE: return "vi_VN";
- case LANG_WELSH: return "cy_GB";
- case LANG_XHOSA: return "xh_ZA";
- case LANG_YI: return "sit_CN";
- case LANG_YIDDISH: return "yi_IL";
- case LANG_YORUBA: return "yo_NG";
- case LANG_ZULU: return "zu_ZA";
+ case LANG_VENDA:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "ve_ZA";
+ }
+ return "ve";
+ case LANG_VIETNAMESE:
+ switch (sub)
+ {
+ case SUBLANG_VIETNAMESE_VIETNAM: return "vi_VN";
+ }
+ return "vi";
+ case LANG_WELSH:
+ switch (sub)
+ {
+ case SUBLANG_WELSH_UNITED_KINGDOM: return "cy_GB";
+ }
+ return "cy";
+ case LANG_WOLOF:
+ switch (sub)
+ {
+ case SUBLANG_WOLOF_SENEGAL: return "wo_SN";
+ }
+ return "wo";
+ case LANG_XHOSA:
+ switch (sub)
+ {
+ case SUBLANG_XHOSA_SOUTH_AFRICA: return "xh_ZA";
+ }
+ return "xh";
+ case LANG_YAKUT:
+ switch (sub)
+ {
+ case SUBLANG_YAKUT_RUSSIA: return "sah_RU";
+ }
+ return "sah";
+ case LANG_YI:
+ switch (sub)
+ {
+ case SUBLANG_YI_PRC: return "ii_CN";
+ }
+ return "ii";
+ case LANG_YIDDISH:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "yi_IL";
+ }
+ return "yi";
+ case LANG_YORUBA:
+ switch (sub)
+ {
+ case SUBLANG_YORUBA_NIGERIA: return "yo_NG";
+ }
+ return "yo";
+ case LANG_ZULU:
+ switch (sub)
+ {
+ case SUBLANG_ZULU_SOUTH_AFRICA: return "zu_ZA";
+ }
+ return "zu";
default: return "C";
}
}
#endif
+#if HAVE_USELOCALE /* glibc or MacOS X */
+
+/* Simple hash set of strings. We don't want to drag in lots of hash table
+ code here. */
+
+# define SIZE_BITS (sizeof (size_t) * CHAR_BIT)
+
+/* A hash function for NUL-terminated char* strings using
+ the method described by Bruno Haible.
+ See http://www.haible.de/bruno/hashfunc.html. */
+static size_t
+string_hash (const void *x)
+{
+ const char *s = (const char *) x;
+ size_t h = 0;
+
+ for (; *s; s++)
+ h = *s + ((h << 9) | (h >> (SIZE_BITS - 9)));
+
+ return h;
+}
+
+/* A hash table of fixed size. Multiple threads can access it read-only
+ simultaneously, but only one thread can insert into it at the same time. */
+
+/* A node in a hash bucket collision list. */
+struct hash_node
+ {
+ struct hash_node * volatile next;
+ char contents[100]; /* has variable size */
+ };
+
+# define HASH_TABLE_SIZE 257
+static struct hash_node * volatile struniq_hash_table[HASH_TABLE_SIZE]
+ /* = { NULL, ..., NULL } */;
+
+/* This lock protects the struniq_hash_table against multiple simultaneous
+ insertions. */
+gl_lock_define_initialized(static, struniq_lock)
+
+/* Store a copy of the given string in a string pool with indefinite extent.
+ Return a pointer to this copy. */
+static const char *
+struniq (const char *string)
+{
+ size_t hashcode = string_hash (string);
+ size_t slot = hashcode % HASH_TABLE_SIZE;
+ size_t size;
+ struct hash_node *new_node;
+ struct hash_node *p;
+ for (p = struniq_hash_table[slot]; p != NULL; p = p->next)
+ if (strcmp (p->contents, string) == 0)
+ return p->contents;
+ size = strlen (string) + 1;
+ new_node =
+ (struct hash_node *)
+ malloc (offsetof (struct hash_node, contents[0]) + size);
+ if (new_node == NULL)
+ /* Out of memory. Return a statically allocated string. */
+ return "C";
+ memcpy (new_node->contents, string, size);
+ /* Lock while inserting new_node. */
+ gl_lock_lock (struniq_lock);
+ /* Check whether another thread already added the string while we were
+ waiting on the lock. */
+ for (p = struniq_hash_table[slot]; p != NULL; p = p->next)
+ if (strcmp (p->contents, string) == 0)
+ {
+ free (new_node);
+ new_node = p;
+ goto done;
+ }
+ /* Really insert new_node into the hash table. Fill new_node entirely first,
+ because other threads may be iterating over the linked list. */
+ new_node->next = struniq_hash_table[slot];
+ struniq_hash_table[slot] = new_node;
+ done:
+ /* Unlock after new_node is inserted. */
+ gl_lock_unlock (struniq_lock);
+ return new_node->contents;
+}
+
+#endif
+
+
+#if defined IN_LIBINTL || HAVE_USELOCALE
+
+/* Like gl_locale_name_thread, except that the result is not in storage of
+ indefinite extent. */
+# if !defined IN_LIBINTL
+static
+# endif
+const char *
+gl_locale_name_thread_unsafe (int category, const char *categoryname)
+{
+# if HAVE_USELOCALE
+ {
+ locale_t thread_locale = uselocale (NULL);
+ if (thread_locale != LC_GLOBAL_LOCALE)
+ {
+# if __GLIBC__ >= 2
+ /* Work around an incorrect definition of the _NL_LOCALE_NAME macro in
+ glibc < 2.12.
+ See <http://sourceware.org/bugzilla/show_bug.cgi?id=10968>. */
+ const char *name =
+ nl_langinfo (_NL_ITEM ((category), _NL_ITEM_INDEX (-1)));
+ if (name[0] == '\0')
+ /* Fallback code for glibc < 2.4, which did not implement
+ nl_langinfo (_NL_LOCALE_NAME (category)). */
+ name = thread_locale->__names[category];
+ return name;
+# endif
+# if defined __APPLE__ && defined __MACH__ /* MacOS X */
+ /* The locale name is found deep in an undocumented data structure.
+ Since it's stored in a buffer of size 32 and newlocale() rejects
+ locale names of length > 31, we can assume that it is NUL terminated
+ in this buffer. But we need to make a copy of the locale name, of
+ indefinite extent. */
+ struct _xlocale
+ {
+ int32_t __refcount;
+ void (*__free_extra)(void *);
+ __darwin_mbstate_t __mbs[10];
+ int64_t __magic;
+ unsigned char __collate_load_error;
+ unsigned char __collate_substitute_nontrivial;
+ unsigned char _messages_using_locale;
+ unsigned char _monetary_using_locale;
+ unsigned char _numeric_using_locale;
+ unsigned char _time_using_locale;
+ unsigned char __mlocale_changed;
+ unsigned char __nlocale_changed;
+ unsigned char __numeric_fp_cvt;
+ struct __xlocale_st_collate *__lc_collate;
+ struct __xlocale_st_runelocale *__lc_ctype;
+ struct __xlocale_st_messages *__lc_messages;
+ struct __xlocale_st_monetary *__lc_monetary;
+ struct __xlocale_st_numeric *__lc_numeric;
+ struct _xlocale *__lc_numeric_loc;
+ struct __xlocale_st_time *__lc_time;
+ /* more */
+ };
+ struct __xlocale_st_collate
+ {
+ int32_t __refcount;
+ void (*__free_extra)(void *);
+ char __encoding[32];
+ /* more */
+ };
+ struct __xlocale_st_runelocale
+ {
+ int32_t __refcount;
+ void (*__free_extra)(void *);
+ char __ctype_encoding[32];
+ /* more */
+ };
+ struct __xlocale_st_messages
+ {
+ int32_t __refcount;
+ void (*__free_extra)(void *);
+ char *_messages_locale_buf;
+ /* more */
+ };
+ struct __xlocale_st_monetary
+ {
+ int32_t __refcount;
+ void (*__free_extra)(void *);
+ char *_monetary_locale_buf;
+ /* more */
+ };
+ struct __xlocale_st_numeric {
+ int32_t __refcount;
+ void (*__free_extra)(void *);
+ char *_numeric_locale_buf;
+ /* more */
+ };
+ struct __xlocale_st_time {
+ int32_t __refcount;
+ void (*__free_extra)(void *);
+ char *_time_locale_buf;
+ /* more */
+ };
+ struct _xlocale *tlp = (struct _xlocale *) thread_locale;
+ switch (category)
+ {
+ case LC_CTYPE:
+ return tlp->__lc_ctype->__ctype_encoding;
+ case LC_NUMERIC:
+ return tlp->_numeric_using_locale
+ ? tlp->__lc_numeric->_numeric_locale_buf
+ : "C";
+ case LC_TIME:
+ return tlp->_time_using_locale
+ ? tlp->__lc_time->_time_locale_buf
+ : "C";
+ case LC_COLLATE:
+ return !tlp->__collate_load_error
+ ? tlp->__lc_collate->__encoding
+ : "C";
+ case LC_MONETARY:
+ return tlp->_monetary_using_locale
+ ? tlp->__lc_monetary->_monetary_locale_buf
+ : "C";
+ case LC_MESSAGES:
+ return tlp->_messages_using_locale
+ ? tlp->__lc_messages->_messages_locale_buf
+ : "C";
+ default: /* We shouldn't get here. */
+ return "";
+ }
+# endif
+ }
+ }
+# endif
+ return NULL;
+}
+
+#endif
+
+const char *
+gl_locale_name_thread (int category, const char *categoryname)
+{
+#if HAVE_USELOCALE
+ const char *name = gl_locale_name_thread_unsafe (category, categoryname);
+ if (name != NULL)
+ return struniq (name);
+#endif
+ return NULL;
+}
+
/* XPG3 defines the result of 'setlocale (category, NULL)' as:
"Directs 'setlocale()' to query 'category' and return the current
setting of 'local'."
# define HAVE_LOCALE_NULL
#endif
-/* Determine the current locale's name, and canonicalize it into XPG syntax
- language[_territory][.codeset][@modifier]
- The codeset part in the result is not reliable; the locale_charset()
- should be used for codeset information instead.
- The result must not be freed; it is statically allocated. */
-
const char *
gl_locale_name_posix (int category, const char *categoryname)
{
#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
return setlocale (category, NULL);
#else
+ /* On other systems we ignore what setlocale reports and instead look at the
+ environment variables directly. This is necessary
+ 1. on systems which have a facility for customizing the default locale
+ (MacOS X, native Windows, Cygwin) and where the system's setlocale()
+ function ignores this default locale (MacOS X, Cygwin), in two cases:
+ a. when the user missed to use the setlocale() override from libintl
+ (for example by not including <libintl.h>),
+ b. when setlocale supports only the "C" locale, such as on Cygwin
+ 1.5.x. In this case even the override from libintl cannot help.
+ 2. on all systems where setlocale supports only the "C" locale. */
+ /* Strictly speaking, it is a POSIX violation to look at the environment
+ variables regardless whether setlocale has been called or not. POSIX
+ says:
+ "For C-language programs, the POSIX locale shall be the
+ default locale when the setlocale() function is not called."
+ But we assume that all programs that use internationalized APIs call
+ setlocale (LC_ALL, ""). */
+ return gl_locale_name_environ (category, categoryname);
+#endif
+}
+
+const char *
+gl_locale_name_environ (int category, const char *categoryname)
+{
const char *retval;
/* Setting of LC_ALL overrides all other. */
/* Last possibility is the LANG environment variable. */
retval = getenv ("LANG");
if (retval != NULL && retval[0] != '\0')
- return retval;
+ {
+#if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
+ /* MacOS X 10.2 or newer.
+ Ignore invalid LANG value set by the Terminal application. */
+ if (strcmp (retval, "UTF-8") != 0)
+#endif
+#if defined __CYGWIN__
+ /* Cygwin.
+ Ignore dummy LANG value set by ~/.profile. */
+ if (strcmp (retval, "C.UTF-8") != 0)
+#endif
+ return retval;
+ }
return NULL;
-#endif
}
const char *
implementation-defined locale. Some implementations may provide
facilities for local installation administrators to set the default
locale, customizing it for each location. POSIX:2001 does not require
- such a facility. */
+ such a facility.
+
+ The systems with such a facility are MacOS X and Windows: They provide a
+ GUI that allows the user to choose a locale.
+ - On MacOS X, by default, none of LC_* or LANG are set. Starting with
+ MacOS X 10.4 or 10.5, LANG is set for processes launched by the
+ 'Terminal' application (but sometimes to an incorrect value "UTF-8").
+ When no environment variable is set, setlocale (LC_ALL, "") uses the
+ "C" locale.
+ - On native Windows, by default, none of LC_* or LANG are set.
+ When no environment variable is set, setlocale (LC_ALL, "") uses the
+ locale chosen by the user.
+ - On Cygwin 1.5.x, by default, none of LC_* or LANG are set.
+ When no environment variable is set, setlocale (LC_ALL, "") uses the
+ "C" locale.
+ - On Cygwin 1.7, by default, LANG is set to "C.UTF-8" when the default
+ ~/.profile is executed.
+ When no environment variable is set, setlocale (LC_ALL, "") uses the
+ "C.UTF-8" locale, which operates in the same way as the "C" locale.
+ */
-#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined(WIN32_NATIVE))
+#if !(HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE || defined WIN32_NATIVE || defined __CYGWIN__)
/* The system does not have a way of setting the locale, other than the
POSIX specified environment variables. We use C as default locale. */
# endif
-# if defined(WIN32_NATIVE) /* WIN32, not Cygwin */
+# if defined WIN32_NATIVE || defined __CYGWIN__ /* WIN32 or Cygwin */
{
LCID lcid;
#endif
}
+/* Determine the current locale's name, and canonicalize it into XPG syntax
+ language[_territory][.codeset][@modifier]
+ The codeset part in the result is not reliable; the locale_charset()
+ should be used for codeset information instead.
+ The result must not be freed; it is statically allocated. */
+
const char *
gl_locale_name (int category, const char *categoryname)
{
const char *retval;
+ retval = gl_locale_name_thread (category, categoryname);
+ if (retval != NULL)
+ return retval;
+
retval = gl_locale_name_posix (category, categoryname);
if (retval != NULL)
return retval;
/* Determine name of the currently selected locale.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published
/* Determine the current locale's name.
- It considers both the POSIX notion of locale name (see function
- gl_locale_name_posix) and the system notion of locale name (see function
- gl_locale_name_default).
+ It considers both the POSIX notion of locale name (see functions
+ gl_locale_name_thread and gl_locale_name_posix) and the system notion
+ of locale name (see function gl_locale_name_default).
CATEGORY is a locale category abbreviation, as defined in <locale.h>,
but not LC_ALL. E.g. LC_MESSAGES.
CATEGORYNAME is the name of CATEGORY as a string, e.g. "LC_MESSAGES".
The result must not be freed; it is statically allocated. */
extern const char * gl_locale_name (int category, const char *categoryname);
-/* Determine the current locale's name, as specified by setlocale() calls
- or by environment variables.
+/* Determine the current per-thread locale's name, as specified by uselocale()
+ calls.
+ CATEGORY is a locale category abbreviation, as defined in <locale.h>,
+ but not LC_ALL. E.g. LC_MESSAGES.
+ CATEGORYNAME is the name of CATEGORY as a string, e.g. "LC_MESSAGES".
+ Return the locale category's name, canonicalized into XPG syntax
+ language[_territory][.codeset][@modifier]
+ or NULL if no locale has been specified for the current thread.
+ The codeset part in the result is not reliable; the locale_charset()
+ should be used for codeset information instead.
+ The result must not be freed; it is statically allocated. */
+extern const char * gl_locale_name_thread (int category, const char *categoryname);
+
+/* Determine the thread-independent current locale's name, as specified by
+ setlocale() calls or by environment variables.
CATEGORY is a locale category abbreviation, as defined in <locale.h>,
but not LC_ALL. E.g. LC_MESSAGES.
CATEGORYNAME is the name of CATEGORY as a string, e.g. "LC_MESSAGES".
The result must not be freed; it is statically allocated. */
extern const char * gl_locale_name_posix (int category, const char *categoryname);
+/* Determine the default locale's name, as specified by environment
+ variables.
+ Return the locale category's name, or NULL if no locale has been specified
+ by environment variables.
+ The result must not be freed; it is statically allocated. */
+extern const char * gl_locale_name_environ (int category, const char *categoryname);
+
/* Determine the default locale's name. This is the current locale's name,
- if not specified by setlocale() calls or by environment variables. This
- locale name is usually determined by systems settings that the user can
- manipulate through a GUI.
+ if not specified by uselocale() calls, by setlocale() calls, or by
+ environment variables. This locale name is usually determined by systems
+ settings that the user can manipulate through a GUI.
Quoting POSIX:2001:
"All implementations shall define a locale as the default locale,
/* Utility to accept --help and --version options as unobtrusively as possible.
- Copyright (C) 1993, 1994, 1998, 1999, 2000, 2002, 2003, 2004, 2005,
- 2006 Free Software Foundation, Inc.
+ Copyright (C) 1993-1994, 1998-2000, 2002-2006, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* long-options.h -- declaration for --help- and --version-handling function.
- Copyright (C) 1993, 1994, 1998, 1999, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1993-1994, 1998-1999, 2003, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* An lseek() function that detects pipes.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Work around a bug of lstat on some systems
- Copyright (C) 1997-1999, 2000-2006, 2008-2009 Free Software
- Foundation, Inc.
+ Copyright (C) 1997-2006, 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* malloc() function that is glibc compatible.
- Copyright (C) 1997, 1998, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1997-1998, 2006-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Safe automatic memory allocation.
- Copyright (C) 2003, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006-2007, 2009-2010 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 Free Software Foundation, Inc.
+ Copyright (C) 2003-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify
/* A GNU-like <math.h>.
- Copyright (C) 2002-2003, 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* The definition of GL_LINK_WARNING is copied here. */
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
#ifdef __cplusplus
extern "C" {
#if @GNULIB_FREXP@
# if @REPLACE_FREXP@
# define frexp rpl_frexp
-extern double frexp (double x, int *expptr);
+extern double frexp (double x, int *expptr) _GL_ARG_NONNULL ((2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef frexp
# define frexpl rpl_frexpl
#endif
#if (@GNULIB_FREXPL@ && @REPLACE_FREXPL@) || !@HAVE_DECL_FREXPL@
-extern long double frexpl (long double x, int *expptr);
+extern long double frexpl (long double x, int *expptr) _GL_ARG_NONNULL ((2));
#endif
#if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK
# undef frexpl
# if @HAVE_ISNANF@
/* The original <math.h> included above provides a declaration of isnan macro
or (older) isnanf function. */
-# include <math.h>
# if __GNUC__ >= 4
/* GCC 4.0 and newer provides three built-ins for isnan. */
# undef isnanf
to 'double' numbers earlier but now is a type-generic macro. */
# if @HAVE_ISNAND@
/* The original <math.h> included above provides a declaration of isnan macro. */
-# include <math.h>
# if __GNUC__ >= 4
/* GCC 4.0 and newer provides three built-ins for isnan. */
# undef isnand
/* Test for NaN for 'long double' numbers. */
# if @HAVE_ISNANL@
/* The original <math.h> included above provides a declaration of isnan macro or (older) isnanl function. */
-# include <math.h>
# if __GNUC__ >= 4
/* GCC 4.0 and newer provides three built-ins for isnan. */
# undef isnanl
-/* Copyright (C) 2001, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2006, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Multibyte character data type.
- Copyright (C) 2001, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2005-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Multibyte character I/O: macros for multi-byte encodings.
- Copyright (C) 2001, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2005, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Iterating through multibyte strings: macros for multi-byte encodings.
- Copyright (C) 2001, 2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Compare two memory areas with possibly different lengths, case-insensitive.
- Copyright (C) 1998-1999, 2005-2009 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2005-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009,
based on earlier glibc code.
/* Compare two memory areas with possibly different lengths, case-insensitive.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Locale-specific case-ignoring memory comparison.
- Copyright (C) 2001, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2009, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it
/* Locale-specific case-ignoring memory comparison.
- Copyright (C) 2001, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Recognize multibyte character.
- Copyright (C) 1999-2000, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1999-2000, 2008-2010 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) 1999-2002, 2005-2009 Free Software Foundation, Inc.
+ Copyright (C) 1999-2002, 2005-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
/* Case-insensitive string comparison function.
- Copyright (C) 1998-1999, 2005-2008 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2005-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2005,
based on earlier glibc code.
/* Case-insensitive searching in a string.
- Copyright (C) 2005-2008 Free Software Foundation, Inc.
+ Copyright (C) 2005-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2005.
This program is free software: you can redistribute it and/or modify
/* Searching a string for a character.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify
/* Searching a string for a character among a given set of characters.
- Copyright (C) 1999, 2002, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify
/* Test for initial conversion state.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
/* Counting the multibyte characters in a string.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify
/* Case-insensitive string comparison function.
- Copyright (C) 1998-1999, 2005-2008 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2005-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2005,
based on earlier glibc code.
/* Counting the multibyte characters in a string.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify
/* Convert string to wide string.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
/* Searching a string for a character among a given set of characters.
- Copyright (C) 1999, 2002, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify
/* Case-insensitive string comparison function.
- Copyright (C) 1998-1999, 2005-2008 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2005-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify
/* Searching a string for the last occurrence of a character.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify
/* Convert string to wide string.
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 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 string to wide string.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
/* Tokenizing a string.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify
/* Searching a string for a character outside a given set of characters.
- Copyright (C) 1999, 2002, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify
/* Searching in a string.
- Copyright (C) 2005-2008 Free Software Foundation, Inc.
+ Copyright (C) 2005-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2005.
This program is free software: you can redistribute it and/or modify
/* Tokenizing a string.
- Copyright (C) 1999, 2002, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify
/* Determine the number of screen columns needed for a string.
- Copyright (C) 2000-2008 Free Software Foundation, Inc.
+ Copyright (C) 2000-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Determine the number of screen columns needed for a string.
- Copyright (C) 2000-2004, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2000-2004, 2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Iterating through multibyte strings: macros for multi-byte encodings.
- Copyright (C) 2001, 2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Functions to compute MD2 message digest of files or memory blocks.
according to the definition of MD2 in RFC 1319 from April 1992.
- Copyright (C) 1995,1996,1997,1999,2000,2001,2002,2003,2005,2006,2008
- Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005, 2006,
+ 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
/* Declarations of functions and data types used for MD2 sum
library functions.
- Copyright (C) 2000, 2001, 2003, 2005, 2008, 2009 Free Software Foundation,
- Inc.
+ Copyright (C) 2000, 2001, 2003, 2005, 2008, 2009, 2010 Free Software
+ Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
/* Functions to compute MD4 message digest of files or memory blocks.
according to the definition of MD4 in RFC 1320 from April 1992.
- Copyright (C) 1995,1996,1997,1999,2000,2001,2002,2003,2005,2006,2008
- Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005, 2006,
+ 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
/* Declarations of functions and data types used for MD4 sum
library functions.
- Copyright (C) 2000, 2001, 2003, 2005, 2008, 2009 Free Software Foundation,
- Inc.
+ Copyright (C) 2000, 2001, 2003, 2005, 2008, 2009, 2010 Free Software
+ Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
/* Functions to compute MD5 message digest of files or memory blocks.
according to the definition of MD5 in RFC 1321 from April 1992.
- Copyright (C) 1995,1996,1997,1999,2000,2001,2005,2006,2008
- Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1999, 2000, 2001, 2005, 2006, 2008, 2009,
+ 2010 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
/* Declaration of functions and data types used for MD5 sum computing
library functions.
- Copyright (C) 1995-1997,1999,2000,2001,2004,2005,2006,2008,2009
- Free Software Foundation, Inc.
+ Copyright (C) 1995-1997, 1999-2001, 2004-2006, 2008-2010 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
/* Case-insensitive buffer comparator.
- Copyright (C) 1996, 1997, 2000, 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1996-1997, 2000, 2003, 2006, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Case-insensitive buffer comparator.
- Copyright (C) 1996, 1998, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1998, 2003, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-/* Copyright (C) 1991, 1993, 1996, 1997, 1999, 2000, 2003, 2004, 2006, 2008
+/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2010
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 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1996, 1997, 1999, 2000, 2003, 2004, 2006, 2008,
+ 2009, 2010 Free Software Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
with help from Dan Sahlin (dan@sics.se) and
/* Scan memory for the first of two bytes.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-/* Copyright (C) 1991, 1993, 1995, 1997, 1998, 2003, 2006, 2009 Free Software
- Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995, 1997-1998, 2003, 2006, 2009-2010 Free
+ Software Foundation, Inc.
Contributed by Torbjorn Granlund (tege@sics.se).
/* Compare two memory areas with possibly different lengths.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Compare two memory areas with possibly different lengths.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Locale-specific memory comparison.
- Copyright (C) 1999, 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002-2004, 2006, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Locale-specific memory comparison.
- Copyright (C) 1999, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2003, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-/* Copyright (C) 1995, 1997, 2000, 2003, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997, 2000, 2003, 2006, 2009-2010 Free Software
+ * Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-/* Copyright (C) 1991,92,93,94,96,97,98,2000,2004,2007,2008 Free Software
- Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1994, 1996, 1997, 1998, 2000, 2004, 2007,
+ 2008, 2009, 2010 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
/* Copy memory area and return pointer after last written byte.
- Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* memrchr -- find the last occurrence of a byte in a memory block
- Copyright (C) 1991, 1993, 1996, 1997, 1999, 2000, 2003, 2004, 2005,
- 2006, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2010 Free Software
+ Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
with help from Dan Sahlin (dan@sics.se) and
/* memset.c -- set an area of memory to a given value
- Copyright (C) 1991, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1991, 2003, 2009-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Locale dependent memory area transformation for comparison.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 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
/* Locale dependent memory area transformation for comparison.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* memxor.c -- perform binary exclusive OR operation of two memory blocks.
- Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* memxor.h -- perform binary exclusive OR operation on memory blocks.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* mgetgroups.c -- return a list of the groups a user or current process is in
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Get a list of all group IDs associated with a specified user ID.
- Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* MIN, MAX macros.
- Copyright (C) 1995, 1998, 2001, 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009, 2010 Free Software
+ Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Make a file's ancestor directories.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* mkdir-p.c -- Ensure that a directory and its parents exist.
- Copyright (C) 1990, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005,
- 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1997-2000, 2002-2007, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* mkdir-p.h -- Ensure that a directory and its parents exist.
- Copyright (C) 1994, 1995, 1996, 1997, 2000, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 1994-1997, 2000, 2003-2006, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* On some systems, mkdir ("foo/", 0700) fails because of the trailing
slash. On those systems, this wrapper removes the trailing slash.
- Copyright (C) 2001, 2003, 2006, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2006, 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
alias mkdir), only in the nonstandard io.h. */
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
# define mkdir(name,mode) _mkdir (name)
-# define maybe_unused _UNUSED_PARAMETER_
+# define maybe_unused _GL_UNUSED
#else
# define maybe_unused /* empty */
#endif
/* fd-relative mkdir
- Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-/* Copyright (C) 1999, 2001-2003, 2006-2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2001-2003, 2006-2007, 2009-2010 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
/* Create a named fifo.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Mingw lacks mkfifo; always fail with ENOSYS. */
int
-mkfifo (char const *name _UNUSED_PARAMETER_, mode_t mode _UNUSED_PARAMETER_)
+mkfifo (char const *name _GL_UNUSED, mode_t mode _GL_UNUSED)
{
errno = ENOSYS;
return -1;
/* Create a named fifo relative to an open directory.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Mingw lacks mkfifo, so this wrapper is trivial. */
int
-mkfifoat (int fd _UNUSED_PARAMETER_, char const *path _UNUSED_PARAMETER_,
- mode_t mode _UNUSED_PARAMETER_)
+mkfifoat (int fd _GL_UNUSED, char const *path _GL_UNUSED,
+ mode_t mode _GL_UNUSED)
{
errno = ENOSYS;
return -1;
/* Create a device inode.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Mingw lacks mknod; always fail with ENOSYS. */
int
-mknod (char const *name _UNUSED_PARAMETER_, mode_t mode _UNUSED_PARAMETER_,
- dev_t dev _UNUSED_PARAMETER_)
+mknod (char const *name _GL_UNUSED, mode_t mode _GL_UNUSED,
+ dev_t dev _GL_UNUSED)
{
errno = ENOSYS;
return -1;
/* Create an inode relative to an open directory.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Mingw lacks mknod, so this wrapper is trivial. */
int
-mknodat (int fd _UNUSED_PARAMETER_, char const *path _UNUSED_PARAMETER_,
- mode_t mode _UNUSED_PARAMETER_, dev_t dev _UNUSED_PARAMETER_)
+mknodat (int fd _GL_UNUSED, char const *path _GL_UNUSED,
+ mode_t mode _GL_UNUSED, dev_t dev _GL_UNUSED)
{
errno = ENOSYS;
return -1;
-/* Copyright (C) 1998, 1999, 2001, 2005, 2006, 2007, 2009 Free
- Software Foundation, Inc.
+/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2010 Free Software
+ Foundation, Inc.
This file is derived from the one in the GNU C Library.
This program is free software: you can redistribute it and/or modify
-/* Copyright (C) 1998, 1999, 2001, 2005, 2006, 2007, 2009 Free
- Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2001, 2005, 2006, 2007, 2009, 2010 Free Software
+ Foundation, Inc.
This file is derived from the one in the GNU C Library.
This program is free software: you can redistribute it and/or modify
/* Invoke mkstemp, but avoid some glitches.
- Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-/* Copyright (C) 1998, 1999, 2001, 2005, 2006, 2007, 2009 Free
- Software Foundation, Inc.
+/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2010 Free Software
+ Foundation, Inc.
This file is derived from the one in the GNU C Library.
This program is free software: you can redistribute it and/or modify
-/* Copyright (C) 1998, 1999, 2001, 2005, 2006, 2007, 2009 Free
- Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2001, 2005, 2006, 2007, 2009, 2010 Free Software
+ Foundation, Inc.
This file is derived from the one in the GNU C Library.
This program is free software: you can redistribute it and/or modify
/* Convert a `struct tm' to a time_t value.
- Copyright (C) 1993-1999, 2002-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1993-1999, 2002-2007, 2009-2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Paul Eggert <eggert@twinsun.com>.
/* modechange.c -- file mode manipulation
- Copyright (C) 1989, 1990, 1997, 1998, 1999, 2001, 2003, 2004, 2005,
- 2006 Free Software Foundation, Inc.
+ Copyright (C) 1989-1990, 1997-1999, 2001, 2003-2006, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* modechange.h -- definitions for file mode manipulation
- Copyright (C) 1989, 1990, 1997, 2003, 2004, 2005, 2006 Free
- Software Foundation, Inc.
+ Copyright (C) 1989-1990, 1997, 2003-2006, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* mountlist.c -- return a list of mounted file systems
- Copyright (C) 1991, 1992, 1997-2009 Free Software Foundation, Inc.
+ Copyright (C) 1991-1992, 1997-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* mountlist.h -- declarations for list of mounted file systems
- Copyright (C) 1991, 1992, 1998, 2000, 2001, 2002, 2003, 2004, 2005
- Free Software Foundation, Inc.
+ Copyright (C) 1991-1992, 1998, 2000-2005, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Sort a vector of pointers to data.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Provide a replacement for the POSIX nanosleep function.
- Copyright (C) 1999, 2000, 2002, 2004, 2005, 2006, 2007, 2008, 2009
- Free Software Foundation, Inc.
+ Copyright (C) 1999-2000, 2002, 2004-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Provide a netdb.h header file for systems lacking it (read: MinGW).
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify
/* Get netdb.h definitions such as struct hostent for MinGW. */
#include <sys/socket.h>
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
/* Declarations for a platform that lacks <netdb.h>, or where it is
incomplete. */
extern int getaddrinfo (const char *restrict nodename,
const char *restrict servname,
const struct addrinfo *restrict hints,
- struct addrinfo **restrict res);
+ struct addrinfo **restrict res)
+ _GL_ARG_NONNULL ((4));
# endif
# if !@HAVE_DECL_FREEADDRINFO@
/* Free `addrinfo' structure AI including associated storage.
For more details, see the POSIX:2001 specification
<http://www.opengroup.org/susv3xsh/getaddrinfo.html>. */
-extern void freeaddrinfo (struct addrinfo *ai);
+extern void freeaddrinfo (struct addrinfo *ai) _GL_ARG_NONNULL ((1));
# endif
# if !@HAVE_DECL_GAI_STRERROR@
extern int getnameinfo(const struct sockaddr *restrict sa, socklen_t salen,
char *restrict node, socklen_t nodelen,
char *restrict service, socklen_t servicelen,
- int flags);
+ int flags)
+ _GL_ARG_NONNULL ((1));
# endif
/* Possible flags for getnameinfo. */
/* Substitute for <netinet/in.h>.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
--- /dev/null
+/* nl_langinfo() replacement: query locale dependent information.
+
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <langinfo.h>
+
+#if REPLACE_NL_LANGINFO
+
+/* Override nl_langinfo with support for added nl_item values. */
+
+# include <locale.h>
+# include <string.h>
+
+# undef nl_langinfo
+
+char *
+rpl_nl_langinfo (nl_item item)
+{
+ switch (item)
+ {
+# if GNULIB_defined_CODESET
+ case CODESET:
+ {
+ const char *locale;
+ static char buf[2 + 10 + 1];
+
+ locale = setlocale (LC_CTYPE, NULL);
+ if (locale != NULL && locale[0] != '\0')
+ {
+ /* If the locale name contains an encoding after the dot, return
+ it. */
+ const char *dot = strchr (locale, '.');
+
+ if (dot != NULL)
+ {
+ const char *modifier;
+
+ dot++;
+ /* Look for the possible @... trailer and remove it, if any. */
+ modifier = strchr (dot, '@');
+ if (modifier == NULL)
+ return dot;
+ if (modifier - dot < sizeof (buf))
+ {
+ memcpy (buf, dot, modifier - dot);
+ buf [modifier - dot] = '\0';
+ return buf;
+ }
+ }
+ }
+ return "";
+ }
+# endif
+# if GNULIB_defined_ERA
+ case ERA:
+ /* The format is not standardized. In glibc it is a sequence of strings
+ of the form "direction:offset:start_date:end_date:era_name:era_format"
+ with an empty string at the end. */
+ return "";
+ case ERA_D_FMT:
+ /* The %Ex conversion in strftime behaves like %x if the locale does not
+ have an alternative time format. */
+ item = D_FMT;
+ break;
+ case ERA_D_T_FMT:
+ /* The %Ec conversion in strftime behaves like %c if the locale does not
+ have an alternative time format. */
+ item = D_T_FMT;
+ break;
+ case ERA_T_FMT:
+ /* The %EX conversion in strftime behaves like %X if the locale does not
+ have an alternative time format. */
+ item = T_FMT;
+ break;
+ case ALT_DIGITS:
+ /* The format is not standardized. In glibc it is a sequence of 10
+ strings, appended in memory. */
+ return "\0\0\0\0\0\0\0\0\0\0";
+# endif
+ default:
+ break;
+ }
+ return nl_langinfo (item);
+}
+
+#else
+
+/* Provide nl_langinfo from scratch. */
+
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+/* Native Windows platforms. */
+
+# define WIN32_LEAN_AND_MEAN /* avoid including junk */
+# include <windows.h>
+
+# include <stdio.h>
+
+# else
+
+/* An old Unix platform without locales, such as Linux libc5 or BeOS. */
+
+# endif
+
+# include <locale.h>
+
+char *
+nl_langinfo (nl_item item)
+{
+ switch (item)
+ {
+ /* nl_langinfo items of the LC_CTYPE category */
+ case CODESET:
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ {
+ static char buf[2 + 10 + 1];
+
+ /* Woe32 has a function returning the locale's codepage as a number. */
+ sprintf (buf, "CP%u", GetACP ());
+ return buf;
+ }
+# elif defined __BEOS__
+ return "UTF-8";
+# else
+ return "ISO-8859-1";
+# endif
+ /* nl_langinfo items of the LC_NUMERIC category */
+ case RADIXCHAR:
+ return localeconv () ->decimal_point;
+ case THOUSEP:
+ return localeconv () ->thousands_sep;
+ /* nl_langinfo items of the LC_TIME category.
+ TODO: Really use the locale. */
+ case D_T_FMT:
+ case ERA_D_T_FMT:
+ return "%a %b %e %H:%M:%S %Y";
+ case D_FMT:
+ case ERA_D_FMT:
+ return "%m/%d/%y";
+ case T_FMT:
+ case ERA_T_FMT:
+ return "%H:%M:%S";
+ case T_FMT_AMPM:
+ return "%I:%M:%S %p";
+ case AM_STR:
+ return "AM";
+ case PM_STR:
+ return "PM";
+ case DAY_1:
+ return "Sunday";
+ case DAY_2:
+ return "Monday";
+ case DAY_3:
+ return "Tuesday";
+ case DAY_4:
+ return "Wednesday";
+ case DAY_5:
+ return "Thursday";
+ case DAY_6:
+ return "Friday";
+ case DAY_7:
+ return "Saturday";
+ case ABDAY_1:
+ return "Sun";
+ case ABDAY_2:
+ return "Mon";
+ case ABDAY_3:
+ return "Tue";
+ case ABDAY_4:
+ return "Wed";
+ case ABDAY_5:
+ return "Thu";
+ case ABDAY_6:
+ return "Fri";
+ case ABDAY_7:
+ return "Sat";
+ case MON_1:
+ return "January";
+ case MON_2:
+ return "February";
+ case MON_3:
+ return "March";
+ case MON_4:
+ return "April";
+ case MON_5:
+ return "May";
+ case MON_6:
+ return "June";
+ case MON_7:
+ return "July";
+ case MON_8:
+ return "August";
+ case MON_9:
+ return "September";
+ case MON_10:
+ return "October";
+ case MON_11:
+ return "November";
+ case MON_12:
+ return "December";
+ case ABMON_1:
+ return "Jan";
+ case ABMON_2:
+ return "Feb";
+ case ABMON_3:
+ return "Mar";
+ case ABMON_4:
+ return "Apr";
+ case ABMON_5:
+ return "May";
+ case ABMON_6:
+ return "Jun";
+ case ABMON_7:
+ return "Jul";
+ case ABMON_8:
+ return "Aug";
+ case ABMON_9:
+ return "Sep";
+ case ABMON_10:
+ return "Oct";
+ case ABMON_11:
+ return "Nov";
+ case ABMON_12:
+ return "Dec";
+ case ERA:
+ return "";
+ case ALT_DIGITS:
+ return "\0\0\0\0\0\0\0\0\0\0";
+ /* nl_langinfo items of the LC_MONETARY category
+ TODO: Really use the locale. */
+ case CRNCYSTR:
+ return "-";
+ /* nl_langinfo items of the LC_MESSAGES category
+ TODO: Really use the locale. */
+ case YESEXPR:
+ return "^[yY]";
+ case NOEXPR:
+ return "^[nN]";
+ default:
+ return "";
+ }
+}
+
+#endif
/* Detect the number of processors.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Detect the number of processors.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* obstack.c - subroutines used implicitly by object stack macros
- Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997,
- 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
+ Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998,
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
/* obstack.h - object stack macros
- Copyright (C) 1988-1994,1996-1999,2003,2004,2005,2006
- Free Software Foundation, Inc.
+ Copyright (C) 1988-1994, 1996-1999, 2003-2006, 2009-2010 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
/* Formatted output to obstacks.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Invoke open, but avoid some glitches.
- Copyright (C) 2005, 2006, 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Open a descriptor to a file.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Report a save- or restore-cwd failure in our openat replacement and then exit.
- Copyright (C) 2005, 2006, 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Internals for openat-like functions.
- Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Create /proc/self/fd-related names for subfiles of open directories.
- Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdio.h>
#include <string.h>
+#include <unistd.h>
#include "dirname.h"
#include "intprops.h"
/* Invoke openat, but avoid some glitches.
- Copyright (C) 2005, 2006, 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* provide a replacement openat function
- Copyright (C) 2004-2009 Free Software Foundation, Inc.
+ Copyright (C) 2004-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* provide a replacement openat function
- Copyright (C) 2004-2006, 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2004-2006, 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Invoke opendir, but avoid some glitches.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Memory allocation aligned to system page boundaries.
- Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Memory allocation aligned to system page boundaries.
- Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Parse a time duration and return a seconds count
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
Written by Bruce Korb <bkorb@gnu.org>, 2008.
This program is free software: you can redistribute it and/or modify
/* Parse a time duration and return a seconds count
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
Written by Bruce Korb <bkorb@gnu.org>, 2008.
This program is free software: you can redistribute it and/or modify
/* Define PATH_MAX somehow. Requires sys/types.h.
- Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Print a message describing error code.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
Written by Bruno Haible and Simon Josefsson.
This program is free software: you can redistribute it and/or modify
/* Calculate the size of physical memory.
- Copyright (C) 2000, 2001, 2003, 2005, 2006 Free Software
+ Copyright (C) 2000-2001, 2003, 2005-2006, 2009-2010 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
/* Calculate the size of physical memory.
- Copyright (C) 2000, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2003, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Auxiliary code for filtering of data through a subprocess.
- Copyright (C) 2001-2003, 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2008-2010 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2009.
This program is free software: you can redistribute it and/or modify
/* Filtering of data through a subprocess.
- Copyright (C) 2001-2003, 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2008-2010 Free Software Foundation, Inc.
Written by Paolo Bonzini <bonzini@gnu.org>, 2009,
and Bruno Haible <bruno@clisp.org>, 2009.
/* Filtering of data through a subprocess.
- Copyright (C) 2001-2003, 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2008-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This program is free software: you can redistribute it and/or modify
/* Filtering of data through a subprocess.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2009,
and Paolo Bonzini <bonzini@gnu.org>, 2009.
/* Invoke pipe, but avoid some glitches.
- Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
return -1;
}
-
-#if GNULIB_PIPE2_SAFER
-/* Like pipe2, but ensure that neither of the file descriptors is
- STDIN_FILENO, STDOUT_FILENO, or STDERR_FILENO. */
-
-int
-pipe2_safer (int fd[2], int flags)
-{
- if (pipe2 (fd, flags) == 0)
- {
- int i;
- for (i = 0; i < 2; i++)
- {
- fd[i] = fd_safer_flag (fd[i], flags);
- if (fd[i] < 0)
- {
- int e = errno;
- close (fd[1 - i]);
- errno = e;
- return -1;
- }
- }
-
- return 0;
- }
- return -1;
-}
-#endif /* GNULIB_PIPE2 */
/* Creation of subprocesses, communicating via pipes.
- Copyright (C) 2001-2004, 2006-2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006-2010 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
/* Creation of subprocesses, communicating via pipes.
- Copyright (C) 2001-2003, 2006, 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006, 2008-2010 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
--- /dev/null
+/* Invoke pipe2, but avoid some glitches.
+ Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake. */
+
+#include <config.h>
+
+/* Specification. */
+#include "unistd-safer.h"
+
+#include <unistd.h>
+#include <errno.h>
+
+/* Like pipe2, but ensure that neither of the file descriptors is
+ STDIN_FILENO, STDOUT_FILENO, or STDERR_FILENO. */
+
+int
+pipe2_safer (int fd[2], int flags)
+{
+ /* This is a generalization of the pipe_safer implementation. */
+ if (pipe2 (fd, flags) == 0)
+ {
+ int i;
+ for (i = 0; i < 2; i++)
+ {
+ fd[i] = fd_safer_flag (fd[i], flags);
+ if (fd[i] < 0)
+ {
+ int e = errno;
+ close (fd[1 - i]);
+ errno = e;
+ return -1;
+ }
+ }
+
+ return 0;
+ }
+ return -1;
+}
/* Create a pipe, with specific opening flags.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Emulation for poll(2)
Contributed by Paolo Bonzini.
- Copyright 2001-2003, 2006-2009 Free Software Foundation, Inc.
+ Copyright 2001-2003, 2006-2010 Free Software Foundation, Inc.
This file is part of gnulib.
/* Header for poll(2) emulation
Contributed by Paolo Bonzini.
- Copyright 2001, 2002, 2003, 2007 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003, 2007, 2009, 2010 Free Software Foundation, Inc.
This file is part of gnulib.
/* Invoke popen, but avoid some glitches.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Open a stream to a sub-process.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Parse dates for touch and date.
- Copyright (C) 1989, 1990, 1991, 1998, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2009 Free Software Foundation Inc.
+ Copyright (C) 1989-1991, 1998, 2000-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Parse dates for touch and date.
- Copyright (C) 1998, 2003, 2005, 2007 Free Software Foundation Inc.
+ Copyright (C) 1998, 2003, 2005, 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Which POSIX version to conform to, for utilities.
- Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software
- Foundation, Inc.
+ Copyright (C) 2002-2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* replacement pread function
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Decomposed printf argument list.
- Copyright (C) 1999, 2002-2003, 2005-2007, 2009 Free Software
+ Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2010 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 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002-2003, 2006-2007, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Split a double into fraction and mantissa, for hexadecimal printf.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Split a double into fraction and mantissa, for hexadecimal printf.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Split a 'long double' into fraction and mantissa, for hexadecimal printf.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Split a 'long double' into fraction and mantissa, for hexadecimal printf.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Formatted output to strings.
- Copyright (C) 1999-2000, 2002-2003, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 1999-2000, 2002-2003, 2006-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Parse printf format string.
- Copyright (C) 1999, 2002-2003, 2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002-2003, 2005, 2007, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Formatted output to a stream.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Query, remove, or restore a Solaris privilege.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Query, remove, or restore a Solaris privilege.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Program name management.
- Copyright (C) 2001-2003, 2005-2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2010 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 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify
/* Provide relocatable programs.
- Copyright (C) 2003-2009 Free Software Foundation, Inc.
+ Copyright (C) 2003-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
/* Localization of proper names.
- Copyright (C) 2006-2009 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
/* Localization of proper names.
- Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
/* Implement a trivial subset of the pthreads library.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2008
- Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2010 Free Software
+ Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C
Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu.
/* quote.c - quote arguments for output
- Copyright (C) 1998, 1999, 2000, 2001, 2003, 2005, 2006 Free
+ Copyright (C) 1998, 1999, 2000, 2001, 2003, 2005, 2006, 2009, 2010 Free
Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
/* quote.h - prototypes for quote.c
- Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software
+ Copyright (C) 1998, 1999, 2000, 2001, 2003, 2009, 2010 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
/* quotearg.c - quote arguments for output
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007,
- 2008 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008,
+ 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* quotearg.h - quote arguments for output
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2006, 2008 Free
- Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2006, 2008, 2009, 2010
+ Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Provide a non-threads replacement for the POSIX raise function.
- Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/*
- Copyright (C) 1995, 2005, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2005, 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
+/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
+ optimizes away the buf == NULL, arg_state == NULL, result == NULL tests
+ below. */
+#define _GL_ARG_NONNULL(params)
+
#include <errno.h>
#include <limits.h>
#include <stddef.h>
/* Searching in a string.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* read-file.c -- read file contents into a string
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
Written by Simon Josefsson and Bruno Haible.
This program is free software; you can redistribute it and/or modify
/* read-file.h -- read file contents into a string
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify
/* readline.c --- Simple implementation of readline.
- Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
Written by Simon Josefsson
This program is free software: you can redistribute it and/or modify
/* readline.h --- Simple implementation of readline.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc.
Written by Simon Josefsson
This program is free software: you can redistribute it and/or modify
/* Stub for readlink().
- Copyright (C) 2003-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2003-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
such as DJGPP 2.03 and mingw32. */
ssize_t
-readlink (const char *name, char *buf _UNUSED_PARAMETER_,
- size_t bufsize _UNUSED_PARAMETER_)
+readlink (const char *name, char *buf _GL_UNUSED,
+ size_t bufsize _GL_UNUSED)
{
struct stat statbuf;
/* readtokens.c -- Functions for reading tokens from an input stream.
- Copyright (C) 1990-1991, 1999-2004, 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1990-1991, 1999-2004, 2006, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* readtokens.h -- Functions for reading tokens from an input stream.
- Copyright (C) 1990, 1991, 1999, 2001-2004 Free Software Foundation, Inc.
+ Copyright (C) 1990-1991, 1999, 2001-2004, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* readtokens0.c -- Read NUL-separated tokens from an input stream.
- Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* readtokens0.h -- read NUL-separated tokens from an input stream.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* GNU's read utmp module.
- Copyright (C) 1992-2001, 2003, 2004, 2005, 2006 Free Software
- Foundation, Inc.
+ Copyright (C) 1992-2001, 2003-2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Declarations for GNU's read utmp module.
- Copyright (C) 1992-2007 Free Software Foundation, Inc.
+ Copyright (C) 1992-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* realloc() function that is glibc compatible.
- Copyright (C) 1997, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* recv.c --- wrappers for Windows recv function
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* recvfrom.c --- wrappers for Windows recvfrom function
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
rpl_recvfrom (int fd, void *buf, int len, int flags, struct sockaddr *from,
int *fromlen)
{
- int frombufsize = *fromlen;
+ int frombufsize = (from != NULL ? *fromlen : 0);
SOCKET sock = FD_TO_SOCKET (fd);
int r = recvfrom (sock, buf, len, flags, from, fromlen);
/* Winsock recvfrom() only returns a valid 'from' when the socket is
connectionless. POSIX gives a valid 'from' for all types of sockets. */
- else if (*fromlen == frombufsize)
+ else if (from != NULL && *fromlen == frombufsize)
rpl_getpeername (fd, from, fromlen);
return r;
# Add this package to a list of references stored in a text file.
#
-# Copyright (C) 2000 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2009, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# Remove this package from a list of references stored in a text file.
#
-# Copyright (C) 2000 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2009, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
/* Extended regular expression matching and search library.
- Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009
- Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+ Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
/* Extended regular expression matching and search library.
- Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2005, 2006, 2009, 2010 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-93,1995-98,2000,2001,2002,2003,2005,2006
- Free Software Foundation, Inc.
+ Copyright (C) 1985, 1989, 1990, 1991, 1992, 1993, 1995, 1996, 1997, 1998,
+ 2000, 2001, 2002, 2003, 2005, 2006, 2009, 2010 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
/* Extended regular expression matching and search library.
- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
- Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+ Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
/* Extended regular expression matching and search library.
- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
- Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+ Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
/* Extended regular expression matching and search library.
- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
- Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+ Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
/* Provide relocatable packages.
- Copyright (C) 2003-2006, 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2003-2006, 2008-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify it
This must come before <config.h> because <config.h> may include
<features.h>, and once <features.h> has been included, it's too late. */
#ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
+# define _GNU_SOURCE 1
#endif
#include <config.h>
/* Provide relocatable packages.
- Copyright (C) 2003, 2005, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005, 2008, 2009, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify it
/* Relocating wrapper program.
- Copyright (C) 2003, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
/* Remove a file or directory.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Work around rename bugs in some systems.
- Copyright (C) 2001, 2002, 2003, 2005, 2006, 2009 Free Software
- Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Rename a file relative to open directories.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* rijndael-alg-fst.c --- Rijndael cipher implementation.
- * Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+ * Copyright (C) 2005, 2006, 2009, 2010 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
/* rijndael-alg-fst.h --- Rijndael cipher implementation.
- * Copyright (C) 2005 Free Software Foundation, Inc.
+ * Copyright (C) 2005, 2009, 2010 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
/* rijndael-api-fst.c --- Rijndael cipher implementation.
- * Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+ * Copyright (C) 2005, 2006, 2009, 2010 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
/* rijndael-api-fst.h --- Rijndael cipher implementation.
- * Copyright (C) 2005 Free Software Foundation, Inc.
+ * Copyright (C) 2005, 2009, 2010 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
/* Work around rmdir bugs.
- Copyright (C) 1988, 1990, 1999, 2003, 2004, 2005, 2006, 2009 Free
- Software Foundation, Inc.
+ Copyright (C) 1988, 1990, 1999, 2003-2006, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Round toward nearest, breaking ties away from zero.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Round toward nearest, breaking ties away from zero.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Round toward nearest, breaking ties away from zero.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Determine whether string value is affirmation or negative response
according to current locale's data.
- Copyright (C) 1996, 1998, 2000, 2002, 2003, 2006-2008 Free Software
+ Copyright (C) 1996, 1998, 2000, 2002-2003, 2006-2010 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
/* safe-alloc.c: safer memory allocation
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
/* safe-alloc.h: safer memory allocation
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
/* An interface to read and write that retries after interrupts.
- Copyright (C) 1993, 1994, 1998, 2002, 2003, 2004, 2005, 2006 Free
- Software Foundation, Inc.
+ Copyright (C) 1993-1994, 1998, 2002-2006, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* An interface to read() that retries after interrupts.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* An interface to write that retries after interrupts.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* An interface to write() that retries after interrupts.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Determine whether two stat buffers refer to the same file.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Determine whether two file names refer to the same file.
- Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006 Free
- Software Foundation, Inc.
+ Copyright (C) 1997-2000, 2002-2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Determine whether two file names refer to the same file.
- Copyright (C) 1997, 1998, 1999, 2000, 2003, 2004 Free Software
- Foundation, Inc.
+ Copyright (C) 1997-2000, 2003-2004, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* save-cwd.c -- Save and restore current working directory.
- Copyright (C) 1995, 1997, 1998, 2003, 2004, 2005, 2006, 2009 Free
- Software Foundation, Inc.
+ Copyright (C) 1995, 1997-1998, 2003-2006, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Save and restore current working directory.
- Copyright (C) 1995, 1997, 1998, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1997-1998, 2003, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* savedir.c -- save the list of files in a directory in a string
- Copyright (C) 1990, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
- 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1997-2001, 2003-2006, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Save the list of files in a directory in a string.
- Copyright (C) 1997, 1999, 2001, 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2001, 2003, 2005, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Save and restore the working directory, possibly using a child process.
- Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Save and restore the working directory, possibly using a subprocess.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-/* Copyright (C) 1992-1998, 2000, 2002, 2003, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1992-1998, 2000, 2002-2003, 2009-2010 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
/* Replacement <sched.h> for platforms that lack it.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# include <errno.h>
+/* The definition of _GL_UNUSED_PARAMETER is copied here. */
+
typedef int context_t;
-static inline context_t context_new (char const *s _UNUSED_PARAMETER_)
+static inline context_t context_new (char const *s _GL_UNUSED_PARAMETER)
{ errno = ENOTSUP; return 0; }
-static inline char *context_str (context_t con _UNUSED_PARAMETER_)
+static inline char *context_str (context_t con _GL_UNUSED_PARAMETER)
{ errno = ENOTSUP; return (void *) 0; }
-static inline void context_free (context_t c _UNUSED_PARAMETER_) {}
+static inline void context_free (context_t c _GL_UNUSED_PARAMETER) {}
-static inline int context_user_set (context_t sc _UNUSED_PARAMETER_,
- char const *s _UNUSED_PARAMETER_)
+static inline int context_user_set (context_t sc _GL_UNUSED_PARAMETER,
+ char const *s _GL_UNUSED_PARAMETER)
{ errno = ENOTSUP; return -1; }
-static inline int context_role_set (context_t sc _UNUSED_PARAMETER_,
- char const *s _UNUSED_PARAMETER_)
+static inline int context_role_set (context_t sc _GL_UNUSED_PARAMETER,
+ char const *s _GL_UNUSED_PARAMETER)
{ errno = ENOTSUP; return -1; }
-static inline int context_range_set (context_t sc _UNUSED_PARAMETER_,
- char const *s _UNUSED_PARAMETER_)
+static inline int context_range_set (context_t sc _GL_UNUSED_PARAMETER,
+ char const *s _GL_UNUSED_PARAMETER)
{ errno = ENOTSUP; return -1; }
-static inline int context_type_set (context_t sc _UNUSED_PARAMETER_,
- char const *s _UNUSED_PARAMETER_)
+static inline int context_type_set (context_t sc _GL_UNUSED_PARAMETER,
+ char const *s _GL_UNUSED_PARAMETER)
{ errno = ENOTSUP; return -1; }
#endif
# include <sys/types.h>
# include <errno.h>
+/* The definition of _GL_UNUSED_PARAMETER is copied here. */
+
typedef unsigned short security_class_t;
# define security_context_t char*
# define is_selinux_enabled() 0
-static inline int getcon (security_context_t *con _UNUSED_PARAMETER_)
+static inline int getcon (security_context_t *con _GL_UNUSED_PARAMETER)
{ errno = ENOTSUP; return -1; }
-static inline void freecon (security_context_t con _UNUSED_PARAMETER_) {}
+static inline void freecon (security_context_t con _GL_UNUSED_PARAMETER) {}
-static inline int getfscreatecon (security_context_t *con _UNUSED_PARAMETER_)
+static inline int getfscreatecon (security_context_t *con _GL_UNUSED_PARAMETER)
{ errno = ENOTSUP; return -1; }
-static inline int setfscreatecon (security_context_t con _UNUSED_PARAMETER_)
+static inline int setfscreatecon (security_context_t con _GL_UNUSED_PARAMETER)
{ errno = ENOTSUP; return -1; }
-static inline int matchpathcon (char const *file _UNUSED_PARAMETER_,
- mode_t m _UNUSED_PARAMETER_,
- security_context_t *con _UNUSED_PARAMETER_)
+static inline int matchpathcon (char const *file _GL_UNUSED_PARAMETER,
+ mode_t m _GL_UNUSED_PARAMETER,
+ security_context_t *con _GL_UNUSED_PARAMETER)
{ errno = ENOTSUP; return -1; }
-static inline int getfilecon (char const *file _UNUSED_PARAMETER_,
- security_context_t *con _UNUSED_PARAMETER_)
+static inline int getfilecon (char const *file _GL_UNUSED_PARAMETER,
+ security_context_t *con _GL_UNUSED_PARAMETER)
{ errno = ENOTSUP; return -1; }
-static inline int lgetfilecon (char const *file _UNUSED_PARAMETER_,
- security_context_t *con _UNUSED_PARAMETER_)
+static inline int lgetfilecon (char const *file _GL_UNUSED_PARAMETER,
+ security_context_t *con _GL_UNUSED_PARAMETER)
{ errno = ENOTSUP; return -1; }
static inline int fgetfilecon (int fd,
- security_context_t *con _UNUSED_PARAMETER_)
+ security_context_t *con _GL_UNUSED_PARAMETER)
{ errno = ENOTSUP; return -1; }
-static inline int setfilecon (char const *file _UNUSED_PARAMETER_,
- security_context_t con _UNUSED_PARAMETER_)
+static inline int setfilecon (char const *file _GL_UNUSED_PARAMETER,
+ security_context_t con _GL_UNUSED_PARAMETER)
{ errno = ENOTSUP; return -1; }
-static inline int lsetfilecon (char const *file _UNUSED_PARAMETER_,
- security_context_t con _UNUSED_PARAMETER_)
+static inline int lsetfilecon (char const *file _GL_UNUSED_PARAMETER,
+ security_context_t con _GL_UNUSED_PARAMETER)
{ errno = ENOTSUP; return -1; }
-static inline int fsetfilecon (int fd _UNUSED_PARAMETER_,
- security_context_t con _UNUSED_PARAMETER_)
+static inline int fsetfilecon (int fd _GL_UNUSED_PARAMETER,
+ security_context_t con _GL_UNUSED_PARAMETER)
{ errno = ENOTSUP; return -1; }
static inline int security_check_context
- (security_context_t con _UNUSED_PARAMETER_)
+ (security_context_t con _GL_UNUSED_PARAMETER)
{ errno = ENOTSUP; return -1; }
static inline int security_check_context_raw
- (security_context_t con _UNUSED_PARAMETER_)
+ (security_context_t con _GL_UNUSED_PARAMETER)
{ errno = ENOTSUP; return -1; }
-static inline int setexeccon (security_context_t con _UNUSED_PARAMETER_)
+static inline int setexeccon (security_context_t con _GL_UNUSED_PARAMETER)
{ errno = ENOTSUP; return -1; }
static inline int security_compute_create
- (security_context_t scon _UNUSED_PARAMETER_,
- security_context_t tcon _UNUSED_PARAMETER_,
- security_class_t tclass _UNUSED_PARAMETER_,
- security_context_t *newcon _UNUSED_PARAMETER_)
+ (security_context_t scon _GL_UNUSED_PARAMETER,
+ security_context_t tcon _GL_UNUSED_PARAMETER,
+ security_class_t tclass _GL_UNUSED_PARAMETER,
+ security_context_t *newcon _GL_UNUSED_PARAMETER)
{ errno = ENOTSUP; return -1; }
static inline int matchpathcon_init_prefix
- (char const *path _UNUSED_PARAMETER_,
- char const *prefix _UNUSED_PARAMETER_)
+ (char const *path _GL_UNUSED_PARAMETER,
+ char const *prefix _GL_UNUSED_PARAMETER)
{ errno = ENOTSUP; return -1; }
# endif
/* A GNU-like <search.h>.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* The definition of GL_LINK_WARNING is copied here. */
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
#ifdef __cplusplus
extern "C" {
If one is found, it is returned. Otherwise, a new element equal to KEY
is inserted in the tree and is returned. */
extern void * tsearch (const void *key, void **vrootp,
- int (*compar) (const void *, const void *));
+ int (*compar) (const void *, const void *))
+ _GL_ARG_NONNULL ((1, 2, 3));
/* Searches an element in the tree *VROOTP that compares equal to KEY.
If one is found, it is returned. Otherwise, NULL is returned. */
extern void * tfind (const void *key, void *const *vrootp,
- int (*compar) (const void *, const void *));
+ int (*compar) (const void *, const void *))
+ _GL_ARG_NONNULL ((1, 2, 3));
/* Searches an element in the tree *VROOTP that compares equal to KEY.
If one is found, it is removed from the tree, and its parent node is
returned. Otherwise, NULL is returned. */
extern void * tdelete (const void *key, void **vrootp,
- int (*compar) (const void *, const void *));
+ int (*compar) (const void *, const void *))
+ _GL_ARG_NONNULL ((1, 2, 3));
/* Perform a depth-first, left-to-right traversal of the tree VROOT.
The ACTION function is called:
2. an indicator which visit of the node this is,
3. the level of the node in the tree (0 for the root). */
extern void twalk (const void *vroot,
- void (*action) (const void *, VISIT, int));
+ void (*action) (const void *, VISIT, int))
+ _GL_ARG_NONNULL ((2));
# endif
#elif defined GNULIB_POSIXCHECK
/* Emulation for select(2)
Contributed by Paolo Bonzini.
- Copyright 2008-2009 Free Software Foundation, Inc.
+ Copyright 2008-2010 Free Software Foundation, Inc.
This file is part of gnulib.
/* openat-style fd-relative functions for SE Linux
- Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Prototypes for openat-style fd-relative SELinux functions
- Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* send.c --- wrappers for Windows send function
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* sendto.c --- wrappers for Windows sendto function
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* set-mode-acl.c - set access control list equivalent to a mode
- Copyright (C) 2002-2003, 2005-2009 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-/* Copyright (C) 1992,1995-1999,2000-2003,2005-2009 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995-2003, 2005-2010 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
#if !_LIBC
# include <config.h>
#endif
+
+/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
+ optimizes away the name == NULL test below. */
+#define _GL_ARG_NONNULL(params)
+
#include <alloca.h>
/* Specification. */
/* setsockopt.c --- wrappers for Windows setsockopt function
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* settime -- set the system clock
- Copyright (C) 2002, 2004, 2005, 2006, 2007, 2009 Free Software
- Foundation, Inc.
+ Copyright (C) 2002, 2004-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Shell quoting.
- Copyright (C) 2001-2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006, 2009-2010 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
/* Shell quoting.
- Copyright (C) 2001-2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2004, 2009-2010 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
/* sha1.c - Functions to compute SHA1 message digest of files or
memory blocks according to the NIST specification FIPS-180-1.
- Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2008 Free Software
- Foundation, Inc.
+ Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2008, 2009, 2010 Free
+ Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
/* Declarations of functions and data types used for SHA1 sum
library functions.
- Copyright (C) 2000, 2001, 2003, 2005, 2006, 2008, 2009
- Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2003, 2005, 2006, 2008, 2009, 2010 Free Software
+ Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
/* sha256.c - Functions to compute SHA256 and SHA224 message digest of files or
memory blocks according to the NIST specification FIPS-180-2.
- Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Declarations of functions and data types used for SHA256 and SHA224 sum
library functions.
- Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* sha512.c - Functions to compute SHA512 and SHA384 message digest of files or
memory blocks according to the NIST specification FIPS-180-2.
- Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Declarations of functions and data types used for SHA512 and SHA384 sum
library functions.
- Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* shutdown.c --- wrappers for Windows shutdown function
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Convenience declarations when working with <signal.h>.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* sig2str.c -- convert between signal names and numbers
- Copyright (C) 2002, 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* sig2str.h -- convert between signal names and numbers
- Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* POSIX compatible signal blocking.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 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,97,98,99,2008 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2008, 2009, 2010 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-2009 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* The definition of GL_LINK_WARNING is copied here. */
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
/* Define pid_t, uid_t.
Also, mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
#include <sys/types.h>
# define sig_atomic_t rpl_sig_atomic_t
#endif
+/* A set or mask of signals. */
+#if !@HAVE_SIGSET_T@
+typedef unsigned int sigset_t;
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
#endif
-#if !@HAVE_POSIX_SIGNALBLOCKING@
+#if @GNULIB_SIGPROCMASK@
+# if !@HAVE_POSIX_SIGNALBLOCKING@
/* Maximum signal number + 1. */
-# ifndef NSIG
-# define NSIG 32
-# endif
+# ifndef NSIG
+# define NSIG 32
+# endif
/* This code supports only 32 signals. */
typedef int verify_NSIG_constraint[2 * (NSIG <= 32) - 1];
-/* A set or mask of signals. */
-# if !@HAVE_SIGSET_T@
-typedef unsigned int sigset_t;
-# endif
-
/* Test whether a given signal is contained in a signal set. */
-extern int sigismember (const sigset_t *set, int sig);
+extern int sigismember (const sigset_t *set, int sig) _GL_ARG_NONNULL ((1));
/* Initialize a signal set to the empty set. */
-extern int sigemptyset (sigset_t *set);
+extern int sigemptyset (sigset_t *set) _GL_ARG_NONNULL ((1));
/* Add a signal to a signal set. */
-extern int sigaddset (sigset_t *set, int sig);
+extern int sigaddset (sigset_t *set, int sig) _GL_ARG_NONNULL ((1));
/* Remove a signal from a signal set. */
-extern int sigdelset (sigset_t *set, int sig);
+extern int sigdelset (sigset_t *set, int sig) _GL_ARG_NONNULL ((1));
/* Fill a signal set with all possible signals. */
-extern int sigfillset (sigset_t *set);
+extern int sigfillset (sigset_t *set) _GL_ARG_NONNULL ((1));
/* Return the set of those blocked signals that are pending. */
-extern int sigpending (sigset_t *set);
+extern int sigpending (sigset_t *set) _GL_ARG_NONNULL ((1));
/* If OLD_SET is not NULL, put the current set of blocked signals in *OLD_SET.
Then, if SET is not NULL, affect the current set of blocked signals by
combining it with *SET as indicated in OPERATION.
In this implementation, you are not allowed to change a signal handler
while the signal is blocked. */
-# define SIG_BLOCK 0 /* blocked_set = blocked_set | *set; */
-# define SIG_SETMASK 1 /* blocked_set = *set; */
-# define SIG_UNBLOCK 2 /* blocked_set = blocked_set & ~*set; */
+# define SIG_BLOCK 0 /* blocked_set = blocked_set | *set; */
+# define SIG_SETMASK 1 /* blocked_set = *set; */
+# define SIG_UNBLOCK 2 /* blocked_set = blocked_set & ~*set; */
extern int sigprocmask (int operation, const sigset_t *set, sigset_t *old_set);
-# define signal rpl_signal
+# define signal rpl_signal
/* Install the handler FUNC for signal SIG, and return the previous
handler. */
extern void (*signal (int sig, void (*func) (int))) (int);
-# if GNULIB_defined_SIGPIPE
+# if GNULIB_defined_SIGPIPE
/* Raise signal SIG. */
-# undef raise
-# define raise rpl_raise
+# undef raise
+# define raise rpl_raise
extern int raise (int sig);
-# endif
-
-#endif /* !@HAVE_POSIX_SIGNALBLOCKING@ */
-
-
-#if !@HAVE_SIGACTION@
-
-# if !@HAVE_SIGINFO_T@
+# endif
+
+# endif /* !@HAVE_POSIX_SIGNALBLOCKING@ */
+#elif defined GNULIB_POSIXCHECK
+# undef sigaddset
+# define sigaddset(s,n) \
+ (GL_LINK_WARNING ("sigaddset is unportable - " \
+ "use gnulib module sigprocmask for portability"), \
+ sigaddset (s, n))
+# undef sigdelset
+# define sigdelset(s,n) \
+ (GL_LINK_WARNING ("sigdelset is unportable - " \
+ "use gnulib module sigprocmask for portability"), \
+ sigdelset (s, n))
+# undef sigemptyset
+# define sigemptyset(s) \
+ (GL_LINK_WARNING ("sigemptyset is unportable - " \
+ "use gnulib module sigprocmask for portability"), \
+ sigemptyset (s))
+# undef sigfillset
+# define sigfillset(s) \
+ (GL_LINK_WARNING ("sigfillset is unportable - " \
+ "use gnulib module sigprocmask for portability"), \
+ sigfillset (s))
+# undef sigismember
+# define sigismember(s,n) \
+ (GL_LINK_WARNING ("sigismember is unportable - " \
+ "use gnulib module sigprocmask for portability"), \
+ sigismember (s, n))
+# undef sigpending
+# define sigpending(s) \
+ (GL_LINK_WARNING ("sigpending is unportable - " \
+ "use gnulib module sigprocmask for portability"), \
+ sigpending (s))
+# undef sigprocmask
+# define sigprocmask(h,s,o) \
+ (GL_LINK_WARNING ("sigprocmask is unportable - " \
+ "use gnulib module sigprocmask for portability"), \
+ sigprocmask (h, s, o))
+#endif /* @GNULIB_SIGPROCMASK@ */
+
+
+#if @GNULIB_SIGACTION@
+# if !@HAVE_SIGACTION@
+
+# if !@HAVE_SIGINFO_T@
/* Present to allow compilation, but unsupported by gnulib. */
union sigval
{
union sigval si_value;
};
typedef struct siginfo_t siginfo_t;
-# endif /* !@HAVE_SIGINFO_T@ */
+# endif /* !@HAVE_SIGINFO_T@ */
/* We assume that platforms which lack the sigaction() function also lack
the 'struct sigaction' type, and vice versa. */
/* Not all POSIX flags are supported. */
int sa_flags;
};
-# define sa_handler _sa_func._sa_handler
-# define sa_sigaction _sa_func._sa_sigaction
+# define sa_handler _sa_func._sa_handler
+# define sa_sigaction _sa_func._sa_sigaction
/* Unsupported flags are not present. */
-# define SA_RESETHAND 1
-# define SA_NODEFER 2
-# define SA_RESTART 4
+# define SA_RESETHAND 1
+# define SA_NODEFER 2
+# define SA_RESTART 4
extern int sigaction (int, const struct sigaction *restrict,
struct sigaction *restrict);
-#elif !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@
+# elif !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@
-# define sa_sigaction sa_handler
-
-#endif /* !@HAVE_SIGACTION@, !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@ */
+# define sa_sigaction sa_handler
+# endif /* !@HAVE_SIGACTION@, !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@ */
+#elif defined GNULIB_POSIXCHECK
+# undef sigaction
+# define sigaction(s,a,o) \
+ (GL_LINK_WARNING ("sigaction is unportable - " \
+ "use gnulib module sigaction for portability"), \
+ sigaction (s, a, o))
+#endif
/* Some systems don't have SA_NODEFER. */
#ifndef SA_NODEFER
/* signbit() macro: Determine the sign bit of a floating-point number.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* signbit() macro: Determine the sign bit of a floating-point number.
- Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* signbit() macro: Determine the sign bit of a floating-point number.
- Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Report a SIGPIPE signal and exit.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Report a SIGPIPE signal and exit.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* POSIX compatible signal blocking.
- Copyright (C) 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
/* Quad-precision floating point trigonometric functions on <-pi/4,pi/4>.
- Copyright (C) 1999, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jj@ultra.linux.cz>
/* size_max.h -- declare SIZE_MAX through system headers
- Copyright (C) 2005-2006 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify
/* Pausing execution of the current thread.
- Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify
/* Formatted output to strings.
- Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006-2010 Free Software Foundation, Inc.
Written by Simon Josefsson and Paul Eggert.
This program is free software; you can redistribute it and/or modify
/* socket.c --- wrappers for Windows socket function
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* sockets.c --- wrappers for Windows socket functions
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#endif /* WINDOWS_SOCKETS */
int
-gl_sockets_startup (int version _UNUSED_PARAMETER_)
+gl_sockets_startup (int version _GL_UNUSED)
{
#if WINDOWS_SOCKETS
if (version > initialized_sockets_version)
/* sockets.h - wrappers for Windows socket functions
- Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009, 2010 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
/* Definitions for POSIX spawn interface.
- Copyright (C) 2000, 2003, 2004, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2003-2004, 2008-2010 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
#ifndef _GL_SPAWN_H
#define _GL_SPAWN_H
-#include <sched.h>
-#include <signal.h>
+/* Get definitions of 'struct sched_param' and 'sigset_t'.
+ But avoid namespace pollution on glibc systems. */
+#ifndef __GLIBC__
+# include <sched.h>
+# include <signal.h>
+#endif
+
#include <sys/types.h>
#ifndef __THROW
/* The definition of GL_LINK_WARNING is copied here. */
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
/* Data structure to contain attributes for thread creation. */
#if @REPLACE_POSIX_SPAWN@
# define posix_spawnattr_t rpl_posix_spawnattr_t
#endif
+#if @REPLACE_POSIX_SPAWN@ || !@HAVE_POSIX_SPAWNATTR_T@
typedef struct
{
short int _flags;
int _policy;
int __pad[16];
} posix_spawnattr_t;
+#endif
/* Data structure to contain information about the actions to be
#if @REPLACE_POSIX_SPAWN@
# define posix_spawn_file_actions_t rpl_posix_spawn_file_actions_t
#endif
+#if @REPLACE_POSIX_SPAWN@ || !@HAVE_POSIX_SPAWN_FILE_ACTIONS_T@
typedef struct
{
int _allocated;
struct __spawn_action *_actions;
int __pad[16];
} posix_spawn_file_actions_t;
+#endif
/* Flags to be set in the `posix_spawnattr_t'. */
const posix_spawn_file_actions_t *_Restrict_ __file_actions,
const posix_spawnattr_t *_Restrict_ __attrp,
char *const argv[_Restrict_arr_],
- char *const envp[_Restrict_arr_]);
-# endif
+ char *const envp[_Restrict_arr_])
+ _GL_ARG_NONNULL ((2, 5, 6));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawn
+# define posix_spawn(a,b,c,d,e,f) \
+ (GL_LINK_WARNING ("posix_spawn is unportable - " \
+ "use gnulib module posix_spawn for portability"), \
+ posix_spawn (a, b, c, d, e, f))
#endif
#if @GNULIB_POSIX_SPAWNP@
extern int posix_spawnp (pid_t *__pid, const char *__file,
const posix_spawn_file_actions_t *__file_actions,
const posix_spawnattr_t *__attrp,
- char *const argv[], char *const envp[]);
-# endif
+ char *const argv[], char *const envp[])
+ _GL_ARG_NONNULL ((2, 5, 6));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnp
+# define posix_spawnp(a,b,c,d,e,f) \
+ (GL_LINK_WARNING ("posix_spawnp is unportable - " \
+ "use gnulib module posix_spawnp for portability"), \
+ posix_spawnp (a, b, c, d, e, f))
#endif
# define posix_spawnattr_init rpl_posix_spawnattr_init
# endif
# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
-extern int posix_spawnattr_init (posix_spawnattr_t *__attr) __THROW;
-# endif
+extern int posix_spawnattr_init (posix_spawnattr_t *__attr)
+ __THROW _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_init
+# define posix_spawnattr_init(a) \
+ (GL_LINK_WARNING ("posix_spawnattr_init is unportable - " \
+ "use gnulib module posix_spawnattr_init for portability"), \
+ posix_spawnattr_init (a))
#endif
#if @GNULIB_POSIX_SPAWNATTR_DESTROY@
# define posix_spawnattr_destroy rpl_posix_spawnattr_destroy
# endif
# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
-extern int posix_spawnattr_destroy (posix_spawnattr_t *__attr) __THROW;
-# endif
+extern int posix_spawnattr_destroy (posix_spawnattr_t *__attr)
+ __THROW _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_destroy
+# define posix_spawnattr_destroy(a) \
+ (GL_LINK_WARNING ("posix_spawnattr_destroy is unportable - " \
+ "use gnulib module posix_spawnattr_destroy for portability"), \
+ posix_spawnattr_destroy (a))
#endif
#if @GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT@
# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
extern int posix_spawnattr_getsigdefault (const posix_spawnattr_t *_Restrict_ __attr,
sigset_t *_Restrict_ __sigdefault)
- __THROW;
-# endif
+ __THROW _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_getsigdefault
+# define posix_spawnattr_getsigdefault(a, b) \
+ (GL_LINK_WARNING ("posix_spawnattr_getsigdefault is unportable - " \
+ "use gnulib module posix_spawnattr_getsigdefault for portability"), \
+ posix_spawnattr_getsigdefault (a, b))
#endif
#if @GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT@
# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
extern int posix_spawnattr_setsigdefault (posix_spawnattr_t *_Restrict_ __attr,
const sigset_t *_Restrict_ __sigdefault)
- __THROW;
-# endif
+ __THROW _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_setsigdefault
+# define posix_spawnattr_setsigdefault(a, b) \
+ (GL_LINK_WARNING ("posix_spawnattr_setsigdefault is unportable - " \
+ "use gnulib module posix_spawnattr_setsigdefault for portability"), \
+ posix_spawnattr_setsigdefault (a, b))
#endif
#if @GNULIB_POSIX_SPAWNATTR_GETSIGMASK@
# endif
# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
extern int posix_spawnattr_getsigmask (const posix_spawnattr_t *_Restrict_ __attr,
- sigset_t *_Restrict_ __sigmask) __THROW;
-# endif
+ sigset_t *_Restrict_ __sigmask)
+ __THROW _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_getsigmask
+# define posix_spawnattr_getsigmask(a, b) \
+ (GL_LINK_WARNING ("posix_spawnattr_getsigmask is unportable - " \
+ "use gnulib module posix_spawnattr_getsigmask for portability"), \
+ posix_spawnattr_getsigmask (a, b))
#endif
#if @GNULIB_POSIX_SPAWNATTR_SETSIGMASK@
# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
extern int posix_spawnattr_setsigmask (posix_spawnattr_t *_Restrict_ __attr,
const sigset_t *_Restrict_ __sigmask)
- __THROW;
-# endif
+ __THROW _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_setsigmask
+# define posix_spawnattr_setsigmask(a, b) \
+ (GL_LINK_WARNING ("posix_spawnattr_setsigmask is unportable - " \
+ "use gnulib module posix_spawnattr_setsigmask for portability"), \
+ posix_spawnattr_setsigmask (a, b))
#endif
#if @GNULIB_POSIX_SPAWNATTR_GETFLAGS@
# endif
# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
extern int posix_spawnattr_getflags (const posix_spawnattr_t *_Restrict_ __attr,
- short int *_Restrict_ __flags) __THROW;
-# endif
+ short int *_Restrict_ __flags)
+ __THROW _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_getflags
+# define posix_spawnattr_getflags(a, b) \
+ (GL_LINK_WARNING ("posix_spawnattr_getflags is unportable - " \
+ "use gnulib module posix_spawnattr_getflags for portability"), \
+ posix_spawnattr_getflags (a, b))
#endif
#if @GNULIB_POSIX_SPAWNATTR_SETFLAGS@
# endif
# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
extern int posix_spawnattr_setflags (posix_spawnattr_t *__attr,
- short int __flags) __THROW;
-# endif
+ short int __flags)
+ __THROW _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_setflags
+# define posix_spawnattr_setflags(a, b) \
+ (GL_LINK_WARNING ("posix_spawnattr_setflags is unportable - " \
+ "use gnulib module posix_spawnattr_setflags for portability"), \
+ posix_spawnattr_setflags (a, b))
#endif
#if @GNULIB_POSIX_SPAWNATTR_GETPGROUP@
# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
extern int posix_spawnattr_getpgroup (const posix_spawnattr_t *_Restrict_ __attr,
pid_t *_Restrict_ __pgroup)
- __THROW;
-# endif
+ __THROW _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_getpgroup
+# define posix_spawnattr_getpgroup(a, b) \
+ (GL_LINK_WARNING ("posix_spawnattr_getpgroup is unportable - " \
+ "use gnulib module posix_spawnattr_getpgroup for portability"), \
+ posix_spawnattr_getpgroup (a, b))
#endif
#if @GNULIB_POSIX_SPAWNATTR_SETPGROUP@
# endif
# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
extern int posix_spawnattr_setpgroup (posix_spawnattr_t *__attr,
- pid_t __pgroup) __THROW;
-# endif
+ pid_t __pgroup)
+ __THROW _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_setpgroup
+# define posix_spawnattr_setpgroup(a, b) \
+ (GL_LINK_WARNING ("posix_spawnattr_setpgroup is unportable - " \
+ "use gnulib module posix_spawnattr_setpgroup for portability"), \
+ posix_spawnattr_setpgroup (a, b))
#endif
#if @GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY@
# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
extern int posix_spawnattr_getschedpolicy (const posix_spawnattr_t *_Restrict_ __attr,
int *_Restrict_ __schedpolicy)
- __THROW;
-# endif
+ __THROW _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_getschedpolicy
+# define posix_spawnattr_getschedpolicy(a, b) \
+ (GL_LINK_WARNING ("posix_spawnattr_getschedpolicy is unportable - " \
+ "use gnulib module posix_spawnattr_getschedpolicy for portability"), \
+ posix_spawnattr_getschedpolicy (a, b))
#endif
#if @GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY@
# endif
# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
extern int posix_spawnattr_setschedpolicy (posix_spawnattr_t *__attr,
- int __schedpolicy) __THROW;
-# endif
+ int __schedpolicy)
+ __THROW _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_setschedpolicy
+# define posix_spawnattr_setschedpolicy(a, b) \
+ (GL_LINK_WARNING ("posix_spawnattr_setschedpolicy is unportable - " \
+ "use gnulib module posix_spawnattr_setschedpolicy for portability"), \
+ posix_spawnattr_setschedpolicy (a, b))
#endif
#if @GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM@
# endif
# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
extern int posix_spawnattr_getschedparam (const posix_spawnattr_t *_Restrict_ __attr,
- struct sched_param *_Restrict_ __schedparam) __THROW;
-# endif
+ struct sched_param *_Restrict_ __schedparam)
+ __THROW _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_getschedparam
+# define posix_spawnattr_getschedparam(a, b) \
+ (GL_LINK_WARNING ("posix_spawnattr_getschedparam is unportable - " \
+ "use gnulib module posix_spawnattr_getschedparam for portability"), \
+ posix_spawnattr_getschedparam (a, b))
#endif
#if @GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM@
# endif
# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
extern int posix_spawnattr_setschedparam (posix_spawnattr_t *_Restrict_ __attr,
- const struct sched_param *_Restrict_ __schedparam) __THROW;
-# endif
+ const struct sched_param *_Restrict_ __schedparam)
+ __THROW _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_setschedparam
+# define posix_spawnattr_setschedparam(a, b) \
+ (GL_LINK_WARNING ("posix_spawnattr_setschedparam is unportable - " \
+ "use gnulib module posix_spawnattr_setschedparam for portability"), \
+ posix_spawnattr_setschedparam (a, b))
#endif
# define posix_spawn_file_actions_init rpl_posix_spawn_file_actions_init
# endif
# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
-extern int posix_spawn_file_actions_init (posix_spawn_file_actions_t *__file_actions) __THROW;
-# endif
+extern int posix_spawn_file_actions_init (posix_spawn_file_actions_t *__file_actions)
+ __THROW _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawn_file_actions_init
+# define posix_spawn_file_actions_init(a) \
+ (GL_LINK_WARNING ("posix_spawn_file_actions_init is unportable - " \
+ "use gnulib module posix_spawn_file_actions_init for portability"), \
+ posix_spawn_file_actions_init (a))
#endif
#if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY@
# define posix_spawn_file_actions_destroy rpl_posix_spawn_file_actions_destroy
# endif
# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
-extern int posix_spawn_file_actions_destroy (posix_spawn_file_actions_t *__file_actions) __THROW;
-# endif
+extern int posix_spawn_file_actions_destroy (posix_spawn_file_actions_t *__file_actions)
+ __THROW _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawn_file_actions_destroy
+# define posix_spawn_file_actions_destroy(a) \
+ (GL_LINK_WARNING ("posix_spawn_file_actions_destroy is unportable - " \
+ "use gnulib module posix_spawn_file_actions_destroy for portability"), \
+ posix_spawn_file_actions_destroy (a))
#endif
#if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
int __fd,
const char *_Restrict_ __path,
int __oflag, mode_t __mode)
- __THROW;
-# endif
+ __THROW _GL_ARG_NONNULL ((1, 3));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawn_file_actions_addopen
+# define posix_spawn_file_actions_addopen(a, b, c, d, e) \
+ (GL_LINK_WARNING ("posix_spawn_file_actions_addopen is unportable - " \
+ "use gnulib module posix_spawn_file_actions_addopen for portability"), \
+ posix_spawn_file_actions_addopen (a, b, c, d, e))
#endif
#if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@
# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
extern int posix_spawn_file_actions_addclose (posix_spawn_file_actions_t *__file_actions,
int __fd)
- __THROW;
-# endif
+ __THROW _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawn_file_actions_addclose
+# define posix_spawn_file_actions_addclose(a,b) \
+ (GL_LINK_WARNING ("posix_spawn_file_actions_addclose is unportable - " \
+ "use gnulib module posix_spawn_file_actions_addclose for portability"), \
+ posix_spawn_file_actions_addclose (a, b))
#endif
#if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@
# endif
# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
extern int posix_spawn_file_actions_adddup2 (posix_spawn_file_actions_t *__file_actions,
- int __fd, int __newfd) __THROW;
-# endif
+ int __fd, int __newfd)
+ __THROW _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawn_file_actions_adddup2
+# define posix_spawn_file_actions_adddup2(a,b,c) \
+ (GL_LINK_WARNING ("posix_spawn_file_actions_adddup2 is unportable - " \
+ "use gnulib module posix_spawn_file_actions_adddup2 for portability"), \
+ posix_spawn_file_actions_adddup2 (a, b, c))
#endif
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009, 2010 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 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009, 2010 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 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009, 2010 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 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009, 2010 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 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009, 2010 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 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2008, 2009, 2010 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 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009, 2010 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 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009, 2010 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 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009, 2010 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 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009, 2010 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 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2008, 2009, 2010 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 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009, 2010 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 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009, 2010 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 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009, 2010 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 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009, 2010 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 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2004, 2009, 2010 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 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009, 2010 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 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009, 2010 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 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009, 2010 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 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009, 2010 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-2009 Free Software Foundation, Inc.
+ Copyright (C) 2000-2006, 2008-2010 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 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2009, 2010 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
/* Formatted output to strings.
- Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Emulation for sqrtl.
Contributed by Paolo Bonzini
- Copyright 2002, 2003, 2007 Free Software Foundation, Inc.
+ Copyright 2002, 2003, 2007, 2009, 2010 Free Software Foundation, Inc.
This file is part of gnulib.
/* stat-related time functions.
- Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Work around platform bugs in stat.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Substitute for and wrapper around <stdarg.h>.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-/* Copyright (C) 2001-2003, 2006-2008 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2003, 2006-2010 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 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-/* Copyright (C) 2001-2002, 2004-2009 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2002, 2004-2010 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
This file is part of gnulib.
/* Like stdio.h, but redefine some names to avoid glitches.
- Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Implementation details of FILE streams.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Invoke stdio functions, but avoid some glitches.
- Copyright (C) 2001, 2003, 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* POSIX compatible FILE stream write function.
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 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-2009 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2007-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdarg.h>
#include <stddef.h>
-#if (@GNULIB_FSEEKO@ && @REPLACE_FSEEKO@) \
- || (@GNULIB_FTELLO@ && @REPLACE_FTELLO@) \
- || (@GNULIB_GETDELIM@ && !@HAVE_DECL_GETDELIM@) \
- || (@GNULIB_GETLINE@ && (!@HAVE_DECL_GETLINE@ || @REPLACE_GETLINE@))
+#if ((@GNULIB_FSEEKO@ && @REPLACE_FSEEKO@) \
+ || (@GNULIB_FTELLO@ && @REPLACE_FTELLO@) \
+ || (@GNULIB_GETDELIM@ && !@HAVE_DECL_GETDELIM@) \
+ || (@GNULIB_GETLINE@ && (!@HAVE_DECL_GETLINE@ || @REPLACE_GETLINE@)) \
+ || defined GNULIB_POSIXCHECK)
/* Get off_t and ssize_t. */
# include <sys/types.h>
#endif
/* The definition of GL_LINK_WARNING is copied here. */
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
#ifdef __cplusplus
extern "C" {
# endif
# if @REPLACE_DPRINTF@ || !@HAVE_DPRINTF@
extern int dprintf (int fd, const char *format, ...)
- __attribute__ ((__format__ (__printf__, 2, 3)));
+ __attribute__ ((__format__ (__printf__, 2, 3))) _GL_ARG_NONNULL ((2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef dprintf
-# define dprintf(d,f,a) \
+# define dprintf \
(GL_LINK_WARNING ("dprintf is unportable - " \
"use gnulib module dprintf for portability"), \
- dprintf (d, f, a))
+ dprintf)
#endif
#if @GNULIB_FCLOSE@
# if @REPLACE_FCLOSE@
# define fclose rpl_fclose
/* Close STREAM and its underlying file descriptor. */
-extern int fclose (FILE *stream);
+extern int fclose (FILE *stream) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef fclose
# if @REPLACE_FOPEN@
# undef fopen
# define fopen rpl_fopen
-extern FILE * fopen (const char *filename, const char *mode);
+extern FILE * fopen (const char *filename, const char *mode)
+ _GL_ARG_NONNULL ((1, 2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef fopen
# if @REPLACE_FPRINTF@
# define fprintf rpl_fprintf
extern int fprintf (FILE *fp, const char *format, ...)
- __attribute__ ((__format__ (__printf__, 2, 3)));
+ __attribute__ ((__format__ (__printf__, 2, 3)))
+ _GL_ARG_NONNULL ((1, 2));
# endif
#elif @GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
# define fprintf rpl_fprintf
extern int fprintf (FILE *fp, const char *format, ...)
- __attribute__ ((__format__ (__printf__, 2, 3)));
+ __attribute__ ((__format__ (__printf__, 2, 3)))
+ _GL_ARG_NONNULL ((1, 2));
#elif defined GNULIB_POSIXCHECK
# undef fprintf
# define fprintf \
was before the write calls. When discarding pending input, the file
position is advanced to match the end of the previously read input.
Return 0 if successful. Upon error, return -1 and set errno. */
- extern int fpurge (FILE *gl_stream);
+ extern int fpurge (FILE *gl_stream) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef fpurge
#if @GNULIB_FPUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
# undef fputc
# define fputc rpl_fputc
-extern int fputc (int c, FILE *stream);
+extern int fputc (int c, FILE *stream) _GL_ARG_NONNULL ((2));
#endif
#if @GNULIB_FPUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
# undef fputs
# define fputs rpl_fputs
-extern int fputs (const char *string, FILE *stream);
+extern int fputs (const char *string, FILE *stream) _GL_ARG_NONNULL ((1, 2));
#endif
#if @GNULIB_FREOPEN@
# if @REPLACE_FREOPEN@
# undef freopen
# define freopen rpl_freopen
-extern FILE * freopen (const char *filename, const char *mode, FILE *stream);
+extern FILE * freopen (const char *filename, const char *mode, FILE *stream)
+ _GL_ARG_NONNULL ((2, 3));
# endif
#elif defined GNULIB_POSIXCHECK
# undef freopen
#endif
#if @GNULIB_FSEEK@ && @REPLACE_FSEEK@
-extern int rpl_fseek (FILE *fp, long offset, int whence);
+extern int rpl_fseek (FILE *fp, long offset, int whence) _GL_ARG_NONNULL ((1));
# undef fseek
# if defined GNULIB_POSIXCHECK
# define fseek(f,o,w) \
/* Provide fseek, fseeko functions that are aware of a preceding
fflush(), and which detect pipes. */
# define fseeko rpl_fseeko
-extern int fseeko (FILE *fp, off_t offset, int whence);
+extern int fseeko (FILE *fp, off_t offset, int whence) _GL_ARG_NONNULL ((1));
# if !@GNULIB_FSEEK@
# undef fseek
# define fseek(f,o,w) \
#endif
#if @GNULIB_FTELL@ && @REPLACE_FTELL@
-extern long rpl_ftell (FILE *fp);
+extern long rpl_ftell (FILE *fp) _GL_ARG_NONNULL ((1));
# undef ftell
# if GNULIB_POSIXCHECK
# define ftell(f) \
#if @GNULIB_FTELLO@
# if @REPLACE_FTELLO@
# define ftello rpl_ftello
-extern off_t ftello (FILE *fp);
+extern off_t ftello (FILE *fp) _GL_ARG_NONNULL ((1));
# if !@GNULIB_FTELL@
# undef ftell
# define ftell(f) \
#if @GNULIB_FWRITE@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
# undef fwrite
# define fwrite rpl_fwrite
-extern size_t fwrite (const void *ptr, size_t s, size_t n, FILE *stream);
+extern size_t fwrite (const void *ptr, size_t s, size_t n, FILE *stream)
+ _GL_ARG_NONNULL ((1, 4));
#endif
#if @GNULIB_GETDELIM@
Return the number of bytes read and stored at *LINEPTR (not including the
NUL terminator), or -1 on error or EOF. */
extern ssize_t getdelim (char **lineptr, size_t *linesize, int delimiter,
- FILE *stream);
+ FILE *stream)
+ _GL_ARG_NONNULL ((1, 2, 4));
# endif
#elif defined GNULIB_POSIXCHECK
# undef getdelim
bytes of space. It is realloc'd as necessary.
Return the number of bytes read and stored at *LINEPTR (not including the
NUL terminator), or -1 on error or EOF. */
-extern ssize_t getline (char **lineptr, size_t *linesize, FILE *stream);
+extern ssize_t getline (char **lineptr, size_t *linesize, FILE *stream)
+ _GL_ARG_NONNULL ((1, 2, 3));
# endif
#elif defined GNULIB_POSIXCHECK
# undef getline
memory allocation error, call obstack_alloc_failed_handler. Upon
other error, return -1. */
extern int obstack_printf (struct obstack *obs, const char *format, ...)
- __attribute__ ((__format__ (__printf__, 2, 3)));
+ __attribute__ ((__format__ (__printf__, 2, 3))) _GL_ARG_NONNULL ((1, 2));
extern int obstack_vprintf (struct obstack *obs, const char *format,
va_list args)
- __attribute__ ((__format__ (__printf__, 2, 0)));
+ __attribute__ ((__format__ (__printf__, 2, 0))) _GL_ARG_NONNULL ((1, 2));
# endif
#endif
# if @REPLACE_POPEN@
# undef popen
# define popen rpl_popen
-extern FILE *popen (const char *cmd, const char *mode);
+extern FILE *popen (const char *cmd, const char *mode)
+ _GL_ARG_NONNULL ((1, 2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef popen
/* Don't break __attribute__((format(printf,M,N))). */
# define printf __printf__
extern int printf (const char *format, ...)
- __attribute__ ((__format__ (__printf__, 1, 2)));
+ __attribute__ ((__format__ (__printf__, 1, 2))) _GL_ARG_NONNULL ((1));
# endif
#elif @GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
/* Don't break __attribute__((format(printf,M,N))). */
# define printf __printf__
extern int printf (const char *format, ...)
- __attribute__ ((__format__ (__printf__, 1, 2)));
+ __attribute__ ((__format__ (__printf__, 1, 2))) _GL_ARG_NONNULL ((1));
#elif defined GNULIB_POSIXCHECK
# undef printf
# define printf \
#if @GNULIB_PUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
# undef putc
# define putc rpl_fputc
-extern int putc (int c, FILE *stream);
+extern int putc (int c, FILE *stream) _GL_ARG_NONNULL ((2));
#endif
#if @GNULIB_PUTCHAR@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
#if @GNULIB_PUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
# undef puts
# define puts rpl_puts
-extern int puts (const char *string);
+extern int puts (const char *string) _GL_ARG_NONNULL ((1));
#endif
#if @GNULIB_REMOVE@
# if @REPLACE_REMOVE@
# undef remove
# define remove rpl_remove
-extern int remove (const char *name);
+extern int remove (const char *name) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef remove
# if @REPLACE_RENAME@
# undef rename
# define rename rpl_rename
-extern int rename (const char *old_filename, const char *new_filename);
+extern int rename (const char *old_filename, const char *new_filename)
+ _GL_ARG_NONNULL ((1, 2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef rename
# define renameat rpl_renameat
# endif
# if !@HAVE_RENAMEAT@ || @REPLACE_RENAMEAT@
-extern int renameat (int fd1, char const *file1, int fd2, char const *file2);
+extern int renameat (int fd1, char const *file1, int fd2, char const *file2)
+ _GL_ARG_NONNULL ((2, 4));
# endif
#elif defined GNULIB_POSIXCHECK
# undef renameat
# endif
# if @REPLACE_SNPRINTF@ || !@HAVE_DECL_SNPRINTF@
extern int snprintf (char *str, size_t size, const char *format, ...)
- __attribute__ ((__format__ (__printf__, 3, 4)));
+ __attribute__ ((__format__ (__printf__, 3, 4)))
+ _GL_ARG_NONNULL ((3));
# endif
#elif defined GNULIB_POSIXCHECK
# undef snprintf
# if @REPLACE_SPRINTF@
# define sprintf rpl_sprintf
extern int sprintf (char *str, const char *format, ...)
- __attribute__ ((__format__ (__printf__, 2, 3)));
+ __attribute__ ((__format__ (__printf__, 2, 3)))
+ _GL_ARG_NONNULL ((1, 2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef sprintf
*RESULT and return the number of resulting bytes, excluding the trailing
NUL. Upon memory allocation error, or some other error, return -1. */
extern int asprintf (char **result, const char *format, ...)
- __attribute__ ((__format__ (__printf__, 2, 3)));
+ __attribute__ ((__format__ (__printf__, 2, 3))) _GL_ARG_NONNULL ((1, 2));
extern int vasprintf (char **result, const char *format, va_list args)
- __attribute__ ((__format__ (__printf__, 2, 0)));
+ __attribute__ ((__format__ (__printf__, 2, 0))) _GL_ARG_NONNULL ((1, 2));
# endif
#endif
# endif
# if @REPLACE_VDPRINTF@ || !@HAVE_VDPRINTF@
extern int vdprintf (int fd, const char *format, va_list args)
- __attribute__ ((__format__ (__printf__, 2, 0)));
+ __attribute__ ((__format__ (__printf__, 2, 0))) _GL_ARG_NONNULL ((2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef vdprintf
# if @REPLACE_VFPRINTF@
# define vfprintf rpl_vfprintf
extern int vfprintf (FILE *fp, const char *format, va_list args)
- __attribute__ ((__format__ (__printf__, 2, 0)));
+ __attribute__ ((__format__ (__printf__, 2, 0)))
+ _GL_ARG_NONNULL ((1, 2));
# endif
#elif @GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
# define vfprintf rpl_vfprintf
extern int vfprintf (FILE *fp, const char *format, va_list args)
- __attribute__ ((__format__ (__printf__, 2, 0)));
+ __attribute__ ((__format__ (__printf__, 2, 0)))
+ _GL_ARG_NONNULL ((1, 2));
#elif defined GNULIB_POSIXCHECK
# undef vfprintf
# define vfprintf(s,f,a) \
# if @REPLACE_VPRINTF@
# define vprintf rpl_vprintf
extern int vprintf (const char *format, va_list args)
- __attribute__ ((__format__ (__printf__, 1, 0)));
+ __attribute__ ((__format__ (__printf__, 1, 0))) _GL_ARG_NONNULL ((1));
# endif
#elif @GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
# define vprintf rpl_vprintf
extern int vprintf (const char *format, va_list args)
- __attribute__ ((__format__ (__printf__, 1, 0)));
+ __attribute__ ((__format__ (__printf__, 1, 0))) _GL_ARG_NONNULL ((1));
#elif defined GNULIB_POSIXCHECK
# undef vprintf
# define vprintf(f,a) \
# endif
# if @REPLACE_VSNPRINTF@ || !@HAVE_DECL_VSNPRINTF@
extern int vsnprintf (char *str, size_t size, const char *format, va_list args)
- __attribute__ ((__format__ (__printf__, 3, 0)));
+ __attribute__ ((__format__ (__printf__, 3, 0)))
+ _GL_ARG_NONNULL ((3));
# endif
#elif defined GNULIB_POSIXCHECK
# undef vsnprintf
# if @REPLACE_VSPRINTF@
# define vsprintf rpl_vsprintf
extern int vsprintf (char *str, const char *format, va_list args)
- __attribute__ ((__format__ (__printf__, 2, 0)));
+ __attribute__ ((__format__ (__printf__, 2, 0)))
+ _GL_ARG_NONNULL ((1, 2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef vsprintf
/* Like stdlib.h, but redefine some names to avoid glitches.
- Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Invoke stdlib.h functions, but avoid some glitches.
- Copyright (C) 2005, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* A GNU-like <stdlib.h>.
- Copyright (C) 1995, 2001-2004, 2006-2009 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001-2004, 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stddef.h>
/* Solaris declares getloadavg() in <sys/loadavg.h>. */
-#if @GNULIB_GETLOADAVG@ && @HAVE_SYS_LOADAVG_H@
+#if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@
# include <sys/loadavg.h>
#endif
# include <random.h>
#endif
-#if @GNULIB_RANDOM_R@ || !@HAVE_STRUCT_RANDOM_DATA@
+#if !@HAVE_STRUCT_RANDOM_DATA@ || (@GNULIB_RANDOM_R@ && !@HAVE_RANDOM_R@) \
+ || defined GNULIB_POSIXCHECK
# include <stdint.h>
#endif
};
#endif
+#if (@GNULIB_MKSTEMP@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__
+/* On MacOS X 10.3, only <unistd.h> declares mkstemp. */
+/* On Cygwin 1.7.1, only <unistd.h> declares getsubopt. */
+/* But avoid namespace pollution on glibc systems. */
+# include <unistd.h>
+#endif
+
/* The definition of GL_LINK_WARNING is copied here. */
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
/* Some systems do not define EXIT_*, despite otherwise supporting C89. */
#ifndef EXIT_SUCCESS
# if !@HAVE_ATOLL@
/* Parse a signed decimal integer.
Returns the value of the integer. Errors are not detected. */
-extern long long atoll (const char *string);
+extern long long atoll (const char *string) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef atoll
# define canonicalize_file_name rpl_canonicalize_file_name
# endif
# if !@HAVE_CANONICALIZE_FILE_NAME@ || @REPLACE_CANONICALIZE_FILE_NAME@
-extern char *canonicalize_file_name (const char *name);
+extern char *canonicalize_file_name (const char *name) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef canonicalize_file_name
The three numbers are the load average of the last 1 minute, the last 5
minutes, and the last 15 minutes, respectively.
LOADAVG is an array of NELEM numbers. */
-extern int getloadavg (double loadavg[], int nelem);
+extern int getloadavg (double loadavg[], int nelem) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef getloadavg
For more details see the POSIX:2001 specification.
http://www.opengroup.org/susv3xsh/getsubopt.html */
# if !@HAVE_GETSUBOPT@
-extern int getsubopt (char **optionp, char *const *tokens, char **valuep);
+extern int getsubopt (char **optionp, char *const *tokens, char **valuep)
+ _GL_ARG_NONNULL ((1, 2, 3));
# endif
#elif defined GNULIB_POSIXCHECK
# undef getsubopt
they are replaced with a string that makes the directory name unique.
Returns TEMPLATE, or a null pointer if it cannot get a unique name.
The directory is created mode 700. */
-extern char * mkdtemp (char * /*template*/);
+extern char * mkdtemp (char * /*template*/) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef mkdtemp
implementation.
Returns the open file descriptor if successful, otherwise -1 and errno
set. */
-extern int mkostemp (char * /*template*/, int /*flags*/);
+extern int mkostemp (char * /*template*/, int /*flags*/) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef mkostemp
implementation.
Returns the open file descriptor if successful, otherwise -1 and errno
set. */
-extern int mkostemps (char * /*template*/, int /*suffixlen*/, int /*flags*/);
+extern int mkostemps (char * /*template*/, int /*suffixlen*/, int /*flags*/)
+ _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef mkostemps
Returns the open file descriptor if successful, otherwise -1 and errno
set. */
# define mkstemp rpl_mkstemp
-extern int mkstemp (char * /*template*/);
-# else
-/* On MacOS X 10.3, only <unistd.h> declares mkstemp. */
-# include <unistd.h>
+extern int mkstemp (char * /*template*/) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef mkstemp
implementation.
Returns the open file descriptor if successful, otherwise -1 and errno
set. */
-extern int mkstemps (char * /*template*/, int /*suffixlen*/);
+extern int mkstemps (char * /*template*/, int /*suffixlen*/)
+ _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef mkstemps
# if @REPLACE_PUTENV@
# undef putenv
# define putenv rpl_putenv
-extern int putenv (char *string);
+extern int putenv (char *string) _GL_ARG_NONNULL ((1));
# endif
#endif
# define RAND_MAX 2147483647
# endif
-int srandom_r (unsigned int seed, struct random_data *rand_state);
+int srandom_r (unsigned int seed, struct random_data *rand_state)
+ _GL_ARG_NONNULL ((2));
int initstate_r (unsigned int seed, char *buf, size_t buf_size,
- struct random_data *rand_state);
-int setstate_r (char *arg_state, struct random_data *rand_state);
-int random_r (struct random_data *buf, int32_t *result);
+ struct random_data *rand_state)
+ _GL_ARG_NONNULL ((2, 4));
+int setstate_r (char *arg_state, struct random_data *rand_state)
+ _GL_ARG_NONNULL ((1, 2));
+int random_r (struct random_data *buf, int32_t *result)
+ _GL_ARG_NONNULL ((1, 2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef random_r
# define realpath rpl_realpath
# endif
# if !@HAVE_REALPATH@ || @REPLACE_REALPATH@
-extern char *realpath (const char *name, char *resolved);
+extern char *realpath (const char *name, char *resolved) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef realpath
# if !@HAVE_RPMATCH@
/* Test a user response to a question.
Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear. */
-extern int rpmatch (const char *response);
+extern int rpmatch (const char *response) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef rpmatch
# if !@HAVE_SETENV@ || @REPLACE_SETENV@
/* Set NAME to VALUE in the environment.
If REPLACE is nonzero, overwrite an existing value. */
-extern int setenv (const char *name, const char *value, int replace);
+extern int setenv (const char *name, const char *value, int replace)
+ _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef setenv
# endif
# if !@HAVE_STRTOD@ || @REPLACE_STRTOD@
/* Parse a double from STRING, updating ENDP if appropriate. */
-extern double strtod (const char *str, char **endp);
+extern double strtod (const char *str, char **endp) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef strtod
stored in *ENDPTR.
Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set
to ERANGE. */
-extern long long strtoll (const char *string, char **endptr, int base);
+extern long long strtoll (const char *string, char **endptr, int base)
+ _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef strtoll
stored in *ENDPTR.
Upon overflow, the return value is ULLONG_MAX, and errno is set to
ERANGE. */
-extern unsigned long long strtoull (const char *string, char **endptr, int base);
+extern unsigned long long strtoull (const char *string, char **endptr, int base)
+ _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef strtoull
# endif
# if !@HAVE_UNSETENV@ || @REPLACE_UNSETENV@
/* Remove the variable NAME from the environment. */
-extern int unsetenv (const char *name);
+extern int unsetenv (const char *name) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef unsetenv
/* stpcpy.c -- copy a string and return pointer to end of new string
- Copyright (C) 1992, 1995, 1997-1998, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1995, 1997-1998, 2006, 2009-2010 Free Software
+ Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
-/* Copyright (C) 1993, 1995-1997, 2002-2003, 2005-2007 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995-1997, 2002-2003, 2005-2007, 2009-2010 Free Software
+ * Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@gnu.org.
/* Substring search in a NUL terminated string of 'char' elements,
using the Knuth-Morris-Pratt algorithm.
- Copyright (C) 2005-2008 Free Software Foundation, Inc.
+ Copyright (C) 2005-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2005.
This program is free software; you can redistribute it and/or modify
/* Byte-wise substring search, using the Two-Way algorithm.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Eric Blake <ebb9@byu.net>, 2008.
/* Case-insensitive string comparison function.
- Copyright (C) 1998-1999, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2005-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Case-insensitive searching in a string.
- Copyright (C) 2005-2008 Free Software Foundation, Inc.
+ Copyright (C) 2005-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2005.
This program is free software; you can redistribute it and/or modify
/* Searching in a string.
- Copyright (C) 2003, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-/* Copyright (C) 1991, 1994, 1996-1997, 2002-2003, 2005-2006 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1996-1997, 2002-2003, 2005-2006, 2009-2010 Free
+ * Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@gnu.org.
-/* Copyright (C) 1991, 1996, 1997, 1998, 2002, 2003, 2004, 2006, 2007 Free
- Software Foundation, Inc.
+/* Copyright (C) 1991, 1996, 1997, 1998, 2002, 2003, 2004, 2006, 2007, 2009,
+ 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
/* Optimized string comparison.
- Copyright (C) 2001-2002, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* strerror.c --- POSIX compatible system error routine
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-/* Copyright (C) 1991-1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2009 Free Software
- Foundation, Inc.
+/* Copyright (C) 1991-2001, 2003-2007, 2009-2010 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
/* declarations for strftime.c
- Copyright (C) 2002, 2004, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Charset conversion.
- Copyright (C) 2001-2007 Free Software Foundation, Inc.
+ Copyright (C) 2001-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible and Simon Josefsson.
This program is free software; you can redistribute it and/or modify
/* Charset conversion.
- Copyright (C) 2001-2004, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible and Simon Josefsson.
This program is free software; you can redistribute it and/or modify
/* Character set conversion with error handling.
- Copyright (C) 2001-2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2010 Free Software Foundation, Inc.
Written by Bruno Haible and Simon Josefsson.
This program is free software: you can redistribute it and/or modify
/* Character set conversion with error handling.
- Copyright (C) 2001-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible and Simon Josefsson.
This program is free software: you can redistribute it and/or modify
/* Character set conversion with error handling and autodetection.
- Copyright (C) 2002, 2005, 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
Written by Bruno Haible.
This program is free software: you can redistribute it and/or modify
/* Character set conversion with error handling and autodetection.
- Copyright (C) 2002, 2005, 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005, 2007-2010 Free Software Foundation, Inc.
Written by Bruno Haible.
This program is free software: you can redistribute it and/or modify
/* A GNU-like <string.h>.
- Copyright (C) 1995-1996, 2001-2009 Free Software Foundation, Inc.
+ Copyright (C) 1995-1996, 2001-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* The definition of GL_LINK_WARNING is copied here. */
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
#ifdef __cplusplus
extern "C" {
# if @REPLACE_MEMCHR@
# define memchr rpl_memchr
extern void *memchr (void const *__s, int __c, size_t __n)
- __attribute__ ((__pure__));
+ __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef memchr
# if ! @HAVE_DECL_MEMMEM@ || @REPLACE_MEMMEM@
extern void *memmem (void const *__haystack, size_t __haystack_len,
void const *__needle, size_t __needle_len)
- __attribute__ ((__pure__));
+ __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 3));
# endif
#elif defined GNULIB_POSIXCHECK
# undef memmem
#if @GNULIB_MEMPCPY@
# if ! @HAVE_MEMPCPY@
extern void *mempcpy (void *restrict __dest, void const *restrict __src,
- size_t __n);
+ size_t __n)
+ _GL_ARG_NONNULL ((1, 2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef mempcpy
#if @GNULIB_MEMRCHR@
# if ! @HAVE_DECL_MEMRCHR@
extern void *memrchr (void const *, int, size_t)
- __attribute__ ((__pure__));
+ __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef memrchr
#if @GNULIB_RAWMEMCHR@
# if ! @HAVE_RAWMEMCHR@
extern void *rawmemchr (void const *__s, int __c_in)
- __attribute__ ((__pure__));
+ __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef rawmemchr
/* Copy SRC to DST, returning the address of the terminating '\0' in DST. */
#if @GNULIB_STPCPY@
# if ! @HAVE_STPCPY@
-extern char *stpcpy (char *restrict __dst, char const *restrict __src);
+extern char *stpcpy (char *restrict __dst, char const *restrict __src)
+ _GL_ARG_NONNULL ((1, 2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef stpcpy
# if ! @HAVE_STPNCPY@
# define stpncpy gnu_stpncpy
extern char *stpncpy (char *restrict __dst, char const *restrict __src,
- size_t __n);
+ size_t __n)
+ _GL_ARG_NONNULL ((1, 2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef stpncpy
#if @GNULIB_STRCHRNUL@
# if ! @HAVE_STRCHRNUL@
extern char *strchrnul (char const *__s, int __c_in)
- __attribute__ ((__pure__));
+ __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef strchrnul
# define strdup rpl_strdup
# endif
# if !(@HAVE_DECL_STRDUP@ || defined strdup) || @REPLACE_STRDUP@
-extern char *strdup (char const *__s);
+extern char *strdup (char const *__s) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef strdup
# define strndup rpl_strndup
# endif
# if @REPLACE_STRNDUP@ || ! @HAVE_DECL_STRNDUP@
-extern char *strndup (char const *__string, size_t __n);
+extern char *strndup (char const *__string, size_t __n) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef strndup
#if @GNULIB_STRNLEN@
# if ! @HAVE_DECL_STRNLEN@
extern size_t strnlen (char const *__string, size_t __maxlen)
- __attribute__ ((__pure__));
+ __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef strnlen
#if @GNULIB_STRPBRK@
# if ! @HAVE_STRPBRK@
extern char *strpbrk (char const *__s, char const *__accept)
- __attribute__ ((__pure__));
+ __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 2));
# endif
# if defined GNULIB_POSIXCHECK
/* strpbrk() assumes the second argument is a list of single-byte characters.
See also strtok_r(). */
#if @GNULIB_STRSEP@
# if ! @HAVE_STRSEP@
-extern char *strsep (char **restrict __stringp, char const *restrict __delim);
+extern char *strsep (char **restrict __stringp, char const *restrict __delim)
+ _GL_ARG_NONNULL ((1, 2));
# endif
# if defined GNULIB_POSIXCHECK
# undef strsep
#if @GNULIB_STRSTR@
# if @REPLACE_STRSTR@
# define strstr rpl_strstr
-char *strstr (const char *haystack, const char *needle)
- __attribute__ ((__pure__));
+extern char *strstr (const char *haystack, const char *needle)
+ __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 2));
# endif
#elif defined GNULIB_POSIXCHECK
/* strstr() does not work with multibyte strings if the locale encoding is
# endif
# if ! @HAVE_STRCASESTR@ || @REPLACE_STRCASESTR@
extern char *strcasestr (const char *haystack, const char *needle)
- __attribute__ ((__pure__));
+ __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 2));
# endif
#elif defined GNULIB_POSIXCHECK
/* strcasestr() does not work with multibyte strings:
# endif
# if ! @HAVE_DECL_STRTOK_R@ || @REPLACE_STRTOK_R@
extern char *strtok_r (char *restrict s, char const *restrict delim,
- char **restrict save_ptr);
+ char **restrict save_ptr)
+ _GL_ARG_NONNULL ((2, 3));
# endif
# if defined GNULIB_POSIXCHECK
# undef strtok_r
#if @GNULIB_MBSLEN@
/* Return the number of multibyte characters in the character string STRING.
This considers multibyte characters, unlike strlen, which counts bytes. */
-extern size_t mbslen (const char *string);
+extern size_t mbslen (const char *string) _GL_ARG_NONNULL ((1));
#endif
#if @GNULIB_MBSNLEN@
/* Return the number of multibyte characters in the character string starting
at STRING and ending at STRING + LEN. */
-extern size_t mbsnlen (const char *string, size_t len);
+extern size_t mbsnlen (const char *string, size_t len) _GL_ARG_NONNULL ((1));
#endif
#if @GNULIB_MBSCHR@
Unlike strchr(), this function works correctly in multibyte locales with
encodings such as GB18030. */
# define mbschr rpl_mbschr /* avoid collision with HP-UX function */
-extern char * mbschr (const char *string, int c);
+extern char * mbschr (const char *string, int c) _GL_ARG_NONNULL ((1));
#endif
#if @GNULIB_MBSRCHR@
Unlike strrchr(), this function works correctly in multibyte locales with
encodings such as GB18030. */
# define mbsrchr rpl_mbsrchr /* avoid collision with HP-UX function */
-extern char * mbsrchr (const char *string, int c);
+extern char * mbsrchr (const char *string, int c) _GL_ARG_NONNULL ((1));
#endif
#if @GNULIB_MBSSTR@
string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK.
Unlike strstr(), this function works correctly in multibyte locales with
encodings different from UTF-8. */
-extern char * mbsstr (const char *haystack, const char *needle);
+extern char * mbsstr (const char *haystack, const char *needle)
+ _GL_ARG_NONNULL ((1, 2));
#endif
#if @GNULIB_MBSCASECMP@
Note: This function may, in multibyte locales, return 0 for strings of
different lengths!
Unlike strcasecmp(), this function works correctly in multibyte locales. */
-extern int mbscasecmp (const char *s1, const char *s2);
+extern int mbscasecmp (const char *s1, const char *s2)
+ _GL_ARG_NONNULL ((1, 2));
#endif
#if @GNULIB_MBSNCASECMP@
of different lengths!
Unlike strncasecmp(), this function works correctly in multibyte locales.
But beware that N is not a byte count but a character count! */
-extern int mbsncasecmp (const char *s1, const char *s2, size_t n);
+extern int mbsncasecmp (const char *s1, const char *s2, size_t n)
+ _GL_ARG_NONNULL ((1, 2));
#endif
#if @GNULIB_MBSPCASECMP@
smaller length than PREFIX!
Unlike strncasecmp(), this function works correctly in multibyte
locales. */
-extern char * mbspcasecmp (const char *string, const char *prefix);
+extern char * mbspcasecmp (const char *string, const char *prefix)
+ _GL_ARG_NONNULL ((1, 2));
#endif
#if @GNULIB_MBSCASESTR@
Note: This function may, in multibyte locales, return success even if
strlen (haystack) < strlen (needle) !
Unlike strcasestr(), this function works correctly in multibyte locales. */
-extern char * mbscasestr (const char *haystack, const char *needle);
+extern char * mbscasestr (const char *haystack, const char *needle)
+ _GL_ARG_NONNULL ((1, 2));
#endif
#if @GNULIB_MBSCSPN@
beginning of the string to this occurrence, or to the end of the string
if none exists.
Unlike strcspn(), this function works correctly in multibyte locales. */
-extern size_t mbscspn (const char *string, const char *accept);
+extern size_t mbscspn (const char *string, const char *accept)
+ _GL_ARG_NONNULL ((1, 2));
#endif
#if @GNULIB_MBSPBRK@
exists.
Unlike strpbrk(), this function works correctly in multibyte locales. */
# define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */
-extern char * mbspbrk (const char *string, const char *accept);
+extern char * mbspbrk (const char *string, const char *accept)
+ _GL_ARG_NONNULL ((1, 2));
#endif
#if @GNULIB_MBSSPN@
beginning of the string to this occurrence, or to the end of the string
if none exists.
Unlike strspn(), this function works correctly in multibyte locales. */
-extern size_t mbsspn (const char *string, const char *reject);
+extern size_t mbsspn (const char *string, const char *reject)
+ _GL_ARG_NONNULL ((1, 2));
#endif
#if @GNULIB_MBSSEP@
Caveat: The identity of the delimiting character is lost.
See also mbstok_r(). */
-extern char * mbssep (char **stringp, const char *delim);
+extern char * mbssep (char **stringp, const char *delim)
+ _GL_ARG_NONNULL ((1, 2));
#endif
#if @GNULIB_MBSTOK_R@
Caveat: The identity of the delimiting character is lost.
See also mbssep(). */
-extern char * mbstok_r (char *string, const char *delim, char **save_ptr);
+extern char * mbstok_r (char *string, const char *delim, char **save_ptr)
+ _GL_ARG_NONNULL ((2, 3));
#endif
/* Map any int, typically from errno, into an error message. */
#if @GNULIB_STRVERSCMP@
# if !@HAVE_STRVERSCMP@
-extern int strverscmp (const char *, const char *);
+extern int strverscmp (const char *, const char *) _GL_ARG_NONNULL ((1, 2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef strverscmp
/* A substitute <strings.h>.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* The definition of GL_LINK_WARNING is copied here. */
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
#ifdef __cplusplus
extern "C" {
than S2.
Note: This function does not work in multibyte locales. */
#if ! @HAVE_STRCASECMP@
-extern int strcasecmp (char const *s1, char const *s2);
+extern int strcasecmp (char const *s1, char const *s2)
+ _GL_ARG_NONNULL ((1, 2));
#endif
#if defined GNULIB_POSIXCHECK
/* strcasecmp() does not work with multibyte strings:
lexicographically less than, equal to or greater than S2.
Note: This function cannot work correctly in multibyte locales. */
#if ! @HAVE_DECL_STRNCASECMP@
-extern int strncasecmp (char const *s1, char const *s2, size_t n);
+extern int strncasecmp (char const *s1, char const *s2, size_t n)
+ _GL_ARG_NONNULL ((1, 2));
#endif
#if defined GNULIB_POSIXCHECK
/* strncasecmp() does not work with multibyte strings:
/* stripslash.c -- remove redundant trailing slashes from a file name
- Copyright (C) 1990, 2001, 2003-2006 Free Software Foundation, Inc.
+ Copyright (C) 1990, 2001, 2003-2006, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* strncasecmp.c -- case insensitive string comparator
- Copyright (C) 1998-1999, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2005-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* A replacement function, for systems that lack strndup.
- Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2005, 2006, 2007
- Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2005, 2006, 2007, 2009,
+ 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
/* Find the length of STRING, but scan at most MAXLEN characters.
- Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify
/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
- Copyright (C) 2005-2006 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-/* Copyright (C) 1991, 1994, 2000, 2002-2003, 2006 Free Software
+/* Copyright (C) 1991, 1994, 2000, 2002-2003, 2006, 2009-2010 Free Software
Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
-/* Copyright (C) 2002, 2004, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2004, 2005, 2007, 2009, 2010 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) 2004, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2007, 2009, 2010 Free Software Foundation, Inc.
Written by Yoann Vandoorselaere <yoann@prelude-ids.org>.
-/* Copyright (C) 1991, 1994-2002, 2005, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994-2002, 2005, 2008-2010 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) 1991,92,93,94,96,97,98,2000,2004,2007,2008 Free Software
- Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1994, 1996, 1997, 1998, 2000, 2004, 2007,
+ 2008, 2009, 2010 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) 1991, 1992, 1997, 1999, 2003, 2006, 2008 Free
- Software Foundation, Inc.
+/* Copyright (C) 1991-1992, 1997, 1999, 2003, 2006, 2008-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
+/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
+ optimizes away the nptr == NULL test below. */
+#define _GL_ARG_NONNULL(params)
+
#include <stdlib.h>
#include <ctype.h>
/* Convert string representation of a number into an intmax_t value.
- Copyright (C) 1999, 2001, 2002, 2003, 2004, 2006 Free Software
+ Copyright (C) 1999, 2001, 2002, 2003, 2004, 2006, 2009, 2010 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
/* Reentrant string tokenizer. Generic version.
- Copyright (C) 1991,1996-1999,2001,2004,2007,2009 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1996-1999, 2001, 2004, 2007, 2009-2010 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 string representation of a number into an integer value.
Copyright (C) 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2003, 2005,
- 2006, 2007
- Free Software Foundation, Inc.
+ 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C
Library. Bugs can be reported to bug-glibc@gnu.org.
/* Function to parse a `long long int' from text.
- Copyright (C) 1995, 1996, 1997, 1999, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1999, 2001, 2009, 2010 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) 1991, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1997, 2009, 2010 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
/* Function to parse an `unsigned long long int' from text.
- Copyright (C) 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1999, 2009, 2010 Free Software Foundation,
+ Inc.
NOTE: The canonical source of this file is maintained with the GNU C
Library. Bugs can be reported to bug-glibc@gnu.org.
/* Compare strings while treating digits characters numerically.
- Copyright (C) 1997, 2000, 2002, 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000, 2002, 2004, 2006, 2009-2010 Free Software
+ Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jean-François Bignolles <bignolle@ecoledoc.ibp.fr>, 1997.
/* Stub for symlink().
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* The system does not support symlinks. */
int
-symlink (char const *contents _UNUSED_PARAMETER_,
- char const *name _UNUSED_PARAMETER_)
+symlink (char const *contents _GL_UNUSED,
+ char const *name _GL_UNUSED)
{
errno = ENOSYS;
return -1;
/* Create a symlink relative to an open directory.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# include <errno.h>
int
-symlinkat (char const *path1 _UNUSED_PARAMETER_, int fd _UNUSED_PARAMETER_,
- char const *path2 _UNUSED_PARAMETER_)
+symlinkat (char const *path1 _GL_UNUSED, int fd _GL_UNUSED,
+ char const *path2 _GL_UNUSED)
{
errno = ENOSYS;
return -1;
/* Provide a more complete sys/file.h.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#ifndef _GL_SYS_FILE_H
#define _GL_SYS_FILE_H
+#ifndef LOCK_SH
+/* Operations for the 'flock' call (same as Linux kernel constants). */
+# define LOCK_SH 1 /* Shared lock. */
+# define LOCK_EX 2 /* Exclusive lock. */
+# define LOCK_UN 8 /* Unlock. */
+
+/* Can be OR'd in to one of the above. */
+# define LOCK_NB 4 /* Don't block when locking. */
+#endif
+
+/* The definition of GL_LINK_WARNING is copied here. */
#if @GNULIB_FLOCK@
/* Apply or remove advisory locks on an open file.
Return 0 if successful, otherwise -1 and errno set. */
# if !@HAVE_FLOCK@
extern int flock (int fd, int operation);
-
-/* Operations for the 'flock' call (same as Linux kernel constants). */
-#define LOCK_SH 1 /* Shared lock. */
-#define LOCK_EX 2 /* Exclusive lock. */
-#define LOCK_UN 8 /* Unlock. */
-
-/* Can be OR'd in to one of the above. */
-#define LOCK_NB 4 /* Don't block when locking. */
-
# endif
#elif defined GNULIB_POSIXCHECK
# undef flock
/* Substitute for and wrapper around <sys/ioctl.h>.
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#define _GL_SYS_IOCTL_H
/* AIX 5.1 and Solaris 10 declare ioctl() in <unistd.h> and in <stropts.h>,
- but not in <sys/ioctl.h>. */
-#include <unistd.h>
+ but not in <sys/ioctl.h>.
+ But avoid namespace pollution on glibc systems. */
+#ifndef __GLIBC__
+# include <unistd.h>
+#endif
/* The definition of GL_LINK_WARNING is copied here. */
# define ioctl ioctl_used_without_requesting_gnulib_module_ioctl
#elif defined GNULIB_POSIXCHECK
# undef ioctl
-# define ioctl(f,c,a) \
+# define ioctl \
(GL_LINK_WARNING ("ioctl does not portably work on sockets - " \
"use gnulib module ioctl for portability"), \
- ioctl (f, c, a))
+ ioctl)
#endif
/* Substitute for <sys/select.h>.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# include <sys/types.h>
/* On OSF/1 4.0, <sys/select.h> provides only a forward declaration
- of 'struct timeval', and no definition of this type. */
-# include <sys/time.h>
+ of 'struct timeval', and no definition of this type.
+ But avoid namespace pollution on glibc systems. */
+# ifndef __GLIBC__
+# include <sys/time.h>
+# endif
/* On Solaris 10, <sys/select.h> provides an FD_ZERO implementation
- that relies on memset(), but without including <string.h>. */
-# include <string.h>
+ that relies on memset(), but without including <string.h>.
+ But avoid namespace pollution on glibc systems. */
+# ifndef __GLIBC__
+# include <string.h>
+# endif
/* The include_next requires a split double-inclusion guard. */
# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@
/* Provide a sys/socket header file for systems lacking it (read: MinGW)
and for systems where it is incomplete.
- Copyright (C) 2005-2009 Free Software Foundation, Inc.
+ Copyright (C) 2005-2010 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify
#ifndef _GL_SYS_SOCKET_H
#define _GL_SYS_SOCKET_H
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
#if !@HAVE_SA_FAMILY_T@
typedef unsigned short sa_family_t;
#endif
# if @HAVE_WINSOCK2_H@
# undef connect
# define connect rpl_connect
-extern int rpl_connect (int, struct sockaddr *, int);
+extern int rpl_connect (int, struct sockaddr *, int) _GL_ARG_NONNULL ((2));
# endif
# elif @HAVE_WINSOCK2_H@
# undef connect
# if @HAVE_WINSOCK2_H@
# undef bind
# define bind rpl_bind
-extern int rpl_bind (int, struct sockaddr *, int);
+extern int rpl_bind (int, struct sockaddr *, int) _GL_ARG_NONNULL ((2));
# endif
# elif @HAVE_WINSOCK2_H@
# undef bind
# if @HAVE_WINSOCK2_H@
# undef getpeername
# define getpeername rpl_getpeername
-extern int rpl_getpeername (int, struct sockaddr *, int *);
+extern int rpl_getpeername (int, struct sockaddr *, int *)
+ _GL_ARG_NONNULL ((2, 3));
# endif
# elif @HAVE_WINSOCK2_H@
# undef getpeername
# if @HAVE_WINSOCK2_H@
# undef getsockname
# define getsockname rpl_getsockname
-extern int rpl_getsockname (int, struct sockaddr *, int *);
+extern int rpl_getsockname (int, struct sockaddr *, int *)
+ _GL_ARG_NONNULL ((2, 3));
# endif
# elif @HAVE_WINSOCK2_H@
# undef getsockname
# if @HAVE_WINSOCK2_H@
# undef getsockopt
# define getsockopt rpl_getsockopt
-extern int rpl_getsockopt (int, int, int, void *, socklen_t *);
+extern int rpl_getsockopt (int, int, int, void *, socklen_t *)
+ _GL_ARG_NONNULL ((4, 5));
# endif
# elif @HAVE_WINSOCK2_H@
# undef getsockopt
# if @HAVE_WINSOCK2_H@
# undef recv
# define recv rpl_recv
-extern int rpl_recv (int, void *, int, int);
+extern int rpl_recv (int, void *, int, int) _GL_ARG_NONNULL ((2));
# endif
# elif @HAVE_WINSOCK2_H@
# undef recv
# if @HAVE_WINSOCK2_H@
# undef send
# define send rpl_send
-extern int rpl_send (int, const void *, int, int);
+extern int rpl_send (int, const void *, int, int) _GL_ARG_NONNULL ((2));
# endif
# elif @HAVE_WINSOCK2_H@
# undef send
# if @HAVE_WINSOCK2_H@
# undef recvfrom
# define recvfrom rpl_recvfrom
-extern int rpl_recvfrom (int, void *, int, int, struct sockaddr *, int *);
+extern int rpl_recvfrom (int, void *, int, int, struct sockaddr *, int *)
+ _GL_ARG_NONNULL ((2));
# endif
# elif @HAVE_WINSOCK2_H@
# undef recvfrom
# if @HAVE_WINSOCK2_H@
# undef sendto
# define sendto rpl_sendto
-extern int rpl_sendto (int, const void *, int, int, struct sockaddr *, int);
+extern int rpl_sendto (int, const void *, int, int, struct sockaddr *, int)
+ _GL_ARG_NONNULL ((2));
# endif
# elif @HAVE_WINSOCK2_H@
# undef sendto
# if @HAVE_WINSOCK2_H@
# undef setsockopt
# define setsockopt rpl_setsockopt
-extern int rpl_setsockopt (int, int, int, const void *, socklen_t);
+extern int rpl_setsockopt (int, int, int, const void *, socklen_t)
+ _GL_ARG_NONNULL ((4));
# endif
# elif @HAVE_WINSOCK2_H@
# undef setsockopt
/* Provide a more complete sys/stat header file.
- Copyright (C) 2005-2009 Free Software Foundation, Inc.
+ Copyright (C) 2005-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* The definition of GL_LINK_WARNING is copied here. */
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
/* Before doing "#define mkdir rpl_mkdir" below, we need to include all
headers that may declare mkdir(). */
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
#if @GNULIB_FCHMODAT@
# if !@HAVE_FCHMODAT@
-extern int fchmodat (int fd, char const *file, mode_t mode, int flag);
+extern int fchmodat (int fd, char const *file, mode_t mode, int flag)
+ _GL_ARG_NONNULL ((2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef fchmodat
#if @REPLACE_FSTAT@
# define fstat rpl_fstat
-extern int fstat (int fd, struct stat *buf);
+extern int fstat (int fd, struct stat *buf) _GL_ARG_NONNULL ((2));
#endif
# define fstatat rpl_fstatat
# endif
# if !@HAVE_FSTATAT@ || @REPLACE_FSTATAT@
-extern int fstatat (int fd, char const *name, struct stat *st, int flags);
+extern int fstatat (int fd, char const *name, struct stat *st, int flags)
+ _GL_ARG_NONNULL ((2, 3));
# endif
#elif defined GNULIB_POSIXCHECK
# undef fstatat
# define lchmod chmod
# endif
# if 0 /* assume already declared */
-extern int lchmod (const char *filename, mode_t mode);
+extern int lchmod (const char *filename, mode_t mode) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef lchmod
# elif @REPLACE_LSTAT@
# undef lstat
# define lstat rpl_lstat
-extern int rpl_lstat (const char *name, struct stat *buf);
+extern int rpl_lstat (const char *name, struct stat *buf)
+ _GL_ARG_NONNULL ((1, 2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef lstat
#if @REPLACE_MKDIR@
# undef mkdir
# define mkdir rpl_mkdir
-extern int mkdir (char const *name, mode_t mode);
+extern int mkdir (char const *name, mode_t mode) _GL_ARG_NONNULL ((1));
#else
/* mingw's _mkdir() function has 1 argument, but we pass 2 arguments.
Additionally, it declares _mkdir (and depending on compile flags, an
#if @GNULIB_MKDIRAT@
# if !@HAVE_MKDIRAT@
-extern int mkdirat (int fd, char const *file, mode_t mode);
+extern int mkdirat (int fd, char const *file, mode_t mode)
+ _GL_ARG_NONNULL ((2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef mkdirat
# define mkfifo rpl_mkfifo
# endif
# if !@HAVE_MKFIFO@ || @REPLACE_MKFIFO@
-int mkfifo (char const *file, mode_t mode);
+extern int mkfifo (char const *file, mode_t mode) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef mkfifo
#if @GNULIB_MKFIFOAT@
# if !@HAVE_MKFIFOAT@
-int mkfifoat (int fd, char const *file, mode_t mode);
+extern int mkfifoat (int fd, char const *file, mode_t mode)
+ _GL_ARG_NONNULL ((2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef mkfifoat
# define mknod rpl_mknod
# endif
# if !@HAVE_MKNOD@ || @REPLACE_MKNOD@
-int mknod (char const *file, mode_t mode, dev_t dev);
+extern int mknod (char const *file, mode_t mode, dev_t dev)
+ _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef mknod
#if @GNULIB_MKNODAT@
# if !@HAVE_MKNODAT@
-int mknodat (int fd, char const *file, mode_t mode, dev_t dev);
+extern int mknodat (int fd, char const *file, mode_t mode, dev_t dev)
+ _GL_ARG_NONNULL ((2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef mknodat
# else /* !_LARGE_FILES */
# define stat(name, st) rpl_stat (name, st)
# endif /* !_LARGE_FILES */
-extern int stat (const char *name, struct stat *buf);
+extern int stat (const char *name, struct stat *buf) _GL_ARG_NONNULL ((1, 2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef stat
# endif
# if !@HAVE_UTIMENSAT@ || @REPLACE_UTIMENSAT@
extern int utimensat (int fd, char const *name,
- struct timespec const times[2], int flag);
+ struct timespec const times[2], int flag)
+ _GL_ARG_NONNULL ((2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef utimensat
/* Provide a more complete sys/time.h.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# include <time.h>
# endif
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
#ifdef __cplusplus
extern "C" {
#endif
# if @REPLACE_GETTIMEOFDAY@
# undef gettimeofday
# define gettimeofday rpl_gettimeofday
-int gettimeofday (struct timeval *restrict, void *restrict);
+extern int gettimeofday (struct timeval *restrict, void *restrict)
+ _GL_ARG_NONNULL ((1));
# endif
#ifdef __cplusplus
/* Provide a sys/times.h header file.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
is missing. */
#ifndef _GL_SYS_TIMES_H
+
+# if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+# endif
+
+# if @HAVE_SYS_TIMES_H@
+# @INCLUDE_NEXT@ @NEXT_SYS_TIMES_H@
+# endif
+
# define _GL_SYS_TIMES_H
-/* Get clock_t. */
-# include <time.h>
+/* Get clock_t.
+ But avoid namespace pollution on glibc systems. */
+# ifndef __GLIBC__
+# include <time.h>
+# endif
/* The definition of GL_LINK_WARNING is copied here. */
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
# ifdef __cplusplus
extern "C" {
# endif
+# if !@HAVE_STRUCT_TMS@
/* Structure describing CPU time used by a process and its children. */
struct tms
{
clock_t tms_cutime; /* User CPU time of dead children. */
clock_t tms_cstime; /* System CPU time of dead children. */
};
+# endif
# if @GNULIB_TIMES@
- extern clock_t times (struct tms *buffer);
+# if !@HAVE_TIMES@
+ extern clock_t times (struct tms *buffer) _GL_ARG_NONNULL ((1));
+# endif
# elif defined GNULIB_POSIXCHECK
# undef times
# define times(s) \
/* Substitute for <sys/utsname.h>.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _GL_SYS_UTSNAME_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+#if @HAVE_SYS_UTSNAME_H@
+# @INCLUDE_NEXT@ @NEXT_SYS_UTSNAME_H@
+#endif
+
#define _GL_SYS_UTSNAME_H
/* The definition of GL_LINK_WARNING is copied here. */
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
#ifdef __cplusplus
extern "C" {
#endif
-
+#if !@HAVE_STRUCT_UTSNAME@
/* Length of the entries in 'struct utsname' is 256. */
-#define _UTSNAME_LENGTH 256
+# define _UTSNAME_LENGTH 256
-#ifndef _UTSNAME_NODENAME_LENGTH
-# define _UTSNAME_NODENAME_LENGTH _UTSNAME_LENGTH
-#endif
-#ifndef _UTSNAME_SYSNAME_LENGTH
-# define _UTSNAME_SYSNAME_LENGTH _UTSNAME_LENGTH
-#endif
-#ifndef _UTSNAME_RELEASE_LENGTH
-# define _UTSNAME_RELEASE_LENGTH _UTSNAME_LENGTH
-#endif
-#ifndef _UTSNAME_VERSION_LENGTH
-# define _UTSNAME_VERSION_LENGTH _UTSNAME_LENGTH
-#endif
-#ifndef _UTSNAME_MACHINE_LENGTH
-# define _UTSNAME_MACHINE_LENGTH _UTSNAME_LENGTH
-#endif
+# ifndef _UTSNAME_NODENAME_LENGTH
+# define _UTSNAME_NODENAME_LENGTH _UTSNAME_LENGTH
+# endif
+# ifndef _UTSNAME_SYSNAME_LENGTH
+# define _UTSNAME_SYSNAME_LENGTH _UTSNAME_LENGTH
+# endif
+# ifndef _UTSNAME_RELEASE_LENGTH
+# define _UTSNAME_RELEASE_LENGTH _UTSNAME_LENGTH
+# endif
+# ifndef _UTSNAME_VERSION_LENGTH
+# define _UTSNAME_VERSION_LENGTH _UTSNAME_LENGTH
+# endif
+# ifndef _UTSNAME_MACHINE_LENGTH
+# define _UTSNAME_MACHINE_LENGTH _UTSNAME_LENGTH
+# endif
/* Structure describing the system and machine. */
struct utsname
/* Name of the hardware type the system is running on. */
char machine[_UTSNAME_MACHINE_LENGTH];
};
+#endif /* !@HAVE_STRUCT_UTSNAME@ */
#if @GNULIB_UNAME@
# if !@HAVE_UNAME@
-extern int uname (struct utsname *buf);
+extern int uname (struct utsname *buf) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef uname
/* A POSIX-like <sys/wait.h>.
- Copyright (C) 2001-2003, 2005-2008 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#ifndef _GL_SYS_WAIT_H
#define _GL_SYS_WAIT_H
-/* The definition of GL_LINK_WARNING is copied here. */
-
#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
/* Unix API. */
/* exit() exit codes for some BSD system programs.
- Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* tempname.c - generate the name of a temporary file.
- Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2009 Free Software Foundation,
- Inc.
+ Copyright (C) 1991-2003, 2005-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Create a temporary file or directory.
- Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* A more-standard <time.h>.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* NetBSD 5.0 mis-defines NULL. */
#include <stddef.h>
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
# ifdef __cplusplus
extern "C" {
# endif
<http://www.opengroup.org/susv3xsh/nanosleep.html>. */
# if @REPLACE_NANOSLEEP@
# define nanosleep rpl_nanosleep
-int nanosleep (struct timespec const *__rqtp, struct timespec *__rmtp);
+extern int nanosleep (struct timespec const *__rqtp, struct timespec *__rmtp)
+ _GL_ARG_NONNULL ((1));
# endif
/* Return the 'time_t' representation of TP and normalize TP. */
# if @REPLACE_MKTIME@
# define mktime rpl_mktime
-extern time_t mktime (struct tm *__tp);
+extern time_t mktime (struct tm *__tp) _GL_ARG_NONNULL ((1));
# endif
/* Convert TIMER to RESULT, assuming local time and UTC respectively. See
# define localtime_r rpl_localtime_r
# undef gmtime_r
# define gmtime_r rpl_gmtime_r
-struct tm *localtime_r (time_t const *restrict __timer,
- struct tm *restrict __result);
-struct tm *gmtime_r (time_t const *restrict __timer,
- struct tm *restrict __result);
+extern struct tm *localtime_r (time_t const *restrict __timer,
+ struct tm *restrict __result)
+ _GL_ARG_NONNULL ((1, 2));
+extern struct tm *gmtime_r (time_t const *restrict __timer,
+ struct tm *restrict __result)
+ _GL_ARG_NONNULL ((1, 2));
# endif
/* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store
# if @REPLACE_STRPTIME@
# undef strptime
# define strptime rpl_strptime
-char *strptime (char const *restrict __buf, char const *restrict __format,
- struct tm *restrict __tm);
+extern char *strptime (char const *restrict __buf,
+ char const *restrict __format,
+ struct tm *restrict __tm)
+ _GL_ARG_NONNULL ((1, 2, 3));
# endif
/* Convert TM to a time_t value, assuming UTC. */
# if @REPLACE_TIMEGM@
# undef timegm
# define timegm rpl_timegm
-time_t timegm (struct tm *__tm);
+extern time_t timegm (struct tm *__tm) _GL_ARG_NONNULL ((1));
# endif
/* Encourage applications to avoid unsafe functions that can overrun
/* Reentrant time functions like localtime_r.
- Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Convert UTC calendar time to simple time. Like mktime but assumes UTC.
- Copyright (C) 1994, 1997, 2003, 2004, 2006, 2007, 2009 Free Software
+ Copyright (C) 1994, 1997, 2003, 2004, 2006, 2007, 2009, 2010 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
/* Get process times
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* timespec -- System time interface
- Copyright (C) 2000, 2002, 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-/* Copyright (C) 1999, 2001-2002, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2001-2002, 2006, 2009-2010 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
/* Determine a temporary directory.
- Copyright (C) 2001-2002 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Invoke tmpfile, but avoid some glitches.
- Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Create a temporary file.
- Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Quad-precision floating point argument reduction.
- Copyright (C) 1999, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2007, 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jj@ultra.linux.cz>
/* Declarations for sinl, cosl, tanl internal functions
Contributed by Paolo Bonzini
- Copyright 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2002, 2003, 2009, 2010 Free Software Foundation, Inc.
This file is part of gnulib.
/* Removes leading and/or trailing whitespaces
- Copyright (C) 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Removes leading and/or trailing whitespaces
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Round towards zero.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Round towards zero.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Round towards zero.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-/* Copyright (C) 1995-1997, 2000, 2006-2007 Free Software Foundation, Inc.
+/* Copyright (C) 1995-1997, 2000, 2006-2007, 2009-2010 Free Software
+ Foundation, Inc.
Contributed by Bernd Schmidt <crux@Pool.Informatik.RWTH-Aachen.DE>, 1997.
NOTE: The canonical source of this file is maintained with the GNU C
#include <config.h>
+/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
+ optimizes away the rootp == NULL tests below. */
+#define _GL_ARG_NONNULL(params)
+
/* Specification. */
#ifdef IN_LIBINTL
# include "tsearch.h"
/* uint64_t-like operations that work even on hosts lacking uint64_t
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* uname replacement.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Unicode character case mappings.
- Copyright (C) 2002, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Test whether a Unicode character is cased.
- Copyright (C) 2002, 2006-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 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
/* Casefolding of Unicode characters.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Case related properties of Unicode characters.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Case-mapping contexts of UTF-8/UTF-16/UTF-32 substring.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Case-mapping context of empty prefix string.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Case-mapping context of empty suffix string.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Test whether a Unicode character is case-ignorable.
- Copyright (C) 2002, 2006-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 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
/* Internal functions for Unicode character case mappings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Language code of current locale.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Simple case mapping for Unicode characters.
- Copyright (C) 2002, 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 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
/* Special casing table.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Special casing table.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Casefold mapping for Unicode characters (locale and context independent).
- Copyright (C) 2002, 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 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
/* Lowercase mapping for Unicode characters (locale and context independent).
- Copyright (C) 2002, 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 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
/* Titlecase mapping for Unicode characters (locale and context independent).
- Copyright (C) 2002, 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 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
/* Uppercase mapping for Unicode characters (locale and context independent).
- Copyright (C) 2002, 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 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
/* Case and normalization insensitive comparison of Unicode strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Locale dependent, case and normalization insensitive comparison of Unicode
strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Casefolding mapping for Unicode strings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Case mapping for UTF-8/UTF-16/UTF-32 strings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Locale dependent transformation for case insensitive comparison of Unicode
strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Casefolding mapping for Unicode substrings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Titlecase mapping for UTF-8/UTF-16/UTF-32 substrings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Test whether case matters for a Unicode string.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Test whether a Unicode string is invariant under a given case mapping.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Case-mapping context of prefix UTF-8/UTF-16/UTF-32 string.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Case-mapping context of suffix UTF-8/UTF-16/UTF-32 string.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Titlecase mapping for UTF-8/UTF-16/UTF-32 strings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Case and normalization insensitive comparison of UTF-16 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Locale dependent, case and normalization insensitive comparison of UTF-16
strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Casefolding mapping for UTF-16 strings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Case mapping for UTF-16 strings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Locale dependent transformation for case insensitive comparison of UTF-16
strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Casefolding mapping for UTF-16 substrings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Lowercase mapping for UTF-16 substrings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Titlecase mapping for UTF-16 substrings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Uppercase mapping for UTF-16 substrings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Test whether case matters for an UTF-16 string.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Test whether an UTF-16 string is already case-folded.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Test whether an UTF-16 string is invariant under a given case mapping.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
#include "unicase/invariant.h"
#include <errno.h>
+#include <stdbool.h>
#include <stdlib.h>
#include "uninorm.h"
/* Test whether an UTF-16 string is entirely lower case.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Test whether an UTF-16 string is entirely title case.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Test whether an UTF-16 string is entirely upper case.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Case-mapping context of prefix UTF-16 string.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Case-mapping context of suffix UTF-16 string.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Lowercase mapping for UTF-16 strings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Titlecase mapping for UTF-16 strings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Uppercase mapping for UTF-16 strings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Case and normalization insensitive comparison of UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Locale dependent, case and normalization insensitive comparison of UTF-32
strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Casefolding mapping for UTF-32 strings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Case mapping for UTF-32 strings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Locale dependent transformation for case insensitive comparison of UTF-32
strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Casefolding mapping for UTF-32 substrings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Lowercase mapping for UTF-32 substrings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Titlecase mapping for UTF-32 substrings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Uppercase mapping for UTF-32 substrings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Test whether case matters for an UTF-32 string.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Test whether an UTF-32 string is already case-folded.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Test whether an UTF-32 string is invariant under a given case mapping.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
#include "unicase/invariant.h"
#include <errno.h>
+#include <stdbool.h>
#include <stdlib.h>
#include "uninorm.h"
/* Test whether an UTF-32 string is entirely lower case.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Test whether an UTF-32 string is entirely title case.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Test whether an UTF-32 string is entirely upper case.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Case-mapping context of prefix UTF-32 string.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Case-mapping context of suffix UTF-32 string.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Lowercase mapping for UTF-32 strings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Titlecase mapping for UTF-32 strings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Uppercase mapping for UTF-32 strings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Case and normalization insensitive comparison of UTF-8 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Locale dependent, case and normalization insensitive comparison of UTF-8
strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Casefolding mapping for UTF-8 strings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Case mapping for UTF-8 strings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Locale dependent transformation for case insensitive comparison of UTF-8
strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Casefolding mapping for UTF-8 substrings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Lowercase mapping for UTF-8 substrings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Titlecase mapping for UTF-8 substrings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Uppercase mapping for UTF-8 substrings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Test whether case matters for an UTF-8 string.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Test whether an UTF-8 string is already case-folded.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Test whether an UTF-8 string is invariant under a given case mapping.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
#include "unicase/invariant.h"
#include <errno.h>
+#include <stdbool.h>
#include <stdlib.h>
#include "uninorm.h"
/* Test whether an UTF-8 string is entirely lower case.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Test whether an UTF-8 string is entirely title case.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Test whether an UTF-8 string is entirely upper case.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Case-mapping context of prefix UTF-8 string.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Case-mapping context of suffix UTF-8 string.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Lowercase mapping for UTF-8 strings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Titlecase mapping for UTF-8 strings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Uppercase mapping for UTF-8 strings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Case and normalization insensitive comparison of strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Locale dependent, case and normalization insensitive comparison of strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Locale dependent transformation for case insensitive comparison of strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Case mapping for UTF-8/UTF-16/UTF-32 strings (locale dependent).
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Unicode character output to streams with locale dependent encoding.
- Copyright (C) 2000-2003, 2006, 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2000-2003, 2006, 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Simple failure callback that displays an error and exits. */
static long
exit_failure_callback (unsigned int code, const char *msg,
- void *callback_arg _UNUSED_PARAMETER_)
+ void *callback_arg _GL_UNUSED)
{
if (msg == NULL)
error (1, 0, _("cannot convert U+%04X to local character set"), code);
ASCII, using the same notation as ISO C99 strings. */
static long
fallback_failure_callback (unsigned int code,
- const char *msg _UNUSED_PARAMETER_,
+ const char *msg _GL_UNUSED,
void *callback_arg)
{
FILE *stream = (FILE *) callback_arg;
/* Unicode character output to streams with locale dependent encoding.
- Copyright (C) 2000-2003, 2005, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2000-2003, 2005, 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Conversions between Unicode and legacy encodings.
- Copyright (C) 2002, 2005, 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Conversion to UTF-16/UTF-32 from legacy encodings.
- Copyright (C) 2002, 2006-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Conversion from UTF-16/UTF-32 to legacy encodings.
- Copyright (C) 2002, 2006-2009 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Conversion to UTF-8/UTF-16/UTF-32 from legacy encodings.
- Copyright (C) 2002, 2006-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Conversion from UTF-16/UTF-32 to legacy encodings.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Conversion to UTF-16 from legacy encodings.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Conversion from UTF-16 to legacy encodings.
- Copyright (C) 2002, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Conversion to UTF-16 from legacy encodings.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Conversion to UTF-16 from the locale encoding.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Conversion from UTF-16 to legacy encodings.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Conversion from UTF-16 to the locale encoding.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Conversion to UTF-32 from legacy encodings.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Conversion from UTF-32 to legacy encodings.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Conversion to UTF-32 from legacy encodings.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Conversion to UTF-32 from the locale encoding.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Conversion from UTF-32 to legacy encodings.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Conversion from UTF-32 to the locale encoding.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Conversion to UTF-8 from legacy encodings.
- Copyright (C) 2002, 2006-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Conversion from UTF-8 to legacy encodings.
- Copyright (C) 2002, 2006-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Conversion to UTF-8 from legacy encodings.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Conversion to UTF-8 from the locale encoding.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Conversion from UTF-8 to legacy encodings.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Conversion from UTF-8 to the locale encoding.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Unicode character classification and properties.
- Copyright (C) 2002, 2005-2009 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
-/* Copyright (C) 2000-2001 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2001, 2009-2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Bruno Haible <haible@clisp.cons.org>, 2000.
-/* Copyright (C) 2000-2002 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2002, 2009-2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Bruno Haible <haible@clisp.cons.org>, 2000.
/* Bidi categories of Unicode characters.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Bidi categories of Unicode characters.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Bidi categories of Unicode characters.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Bidi categories of Unicode characters.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Three-level bitmap lookup.
- Copyright (C) 2000-2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 2000-2002, 2005-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2000-2002.
This program is free software: you can redistribute it and/or modify it
/* Blocks of Unicode characters.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify it
/* Blocks of Unicode characters.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify it
/* Categories of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Combining classes of Unicode characters.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* ISO C <ctype.h> like properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* ISO C <ctype.h> like properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* ISO C <ctype.h> like properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* ISO C <ctype.h> like properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* ISO C <ctype.h> like properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* ISO C <ctype.h> like properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* ISO C <ctype.h> like properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* ISO C <ctype.h> like properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* ISO C <ctype.h> like properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* ISO C <ctype.h> like properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* ISO C <ctype.h> like properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* ISO C <ctype.h> like properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Values of decimal digit Unicode characters.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Values of digit Unicode characters.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Three-level bitmap lookup.
- Copyright (C) 2000-2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 2000-2002, 2005-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2000-2002.
This program is free software: you can redistribute it and/or modify it
/* Mirrored Unicode characters.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Values of numeric Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Properties of Unicode characters.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Scripts of Unicode characters.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify it
/* Syntax properties of Unicode characters.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify it
/* Syntax properties of Unicode characters.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify it
/* Syntax properties of Unicode characters.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify it
/* Syntax properties of Unicode characters.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify it
/* Line breaking of Unicode strings.
- Copyright (C) 2001-2003, 2005-2008 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it
/* Line breaking properties of Unicode characters. */
/* Generated automatically by gen-lbrk for Unicode 5.1.0. */
-/* Copyright (C) 2000-2002, 2004, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2002, 2004, 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Line breaking properties of Unicode characters. */
/* Generated automatically by gen-lbrk for Unicode 5.1.0. */
-/* Copyright (C) 2000-2002, 2004, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2002, 2004, 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Line breaking auxiliary tables.
- Copyright (C) 2001-2003, 2006-2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it
/* Line breaking auxiliary tables.
- Copyright (C) 2001-2003, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it
/* Line breaking of UTF-16 strings.
- Copyright (C) 2001-2003, 2006-2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it
/* Line breaking of UTF-16 strings.
- Copyright (C) 2001-2003, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it
/* Line breaking of UTF-32 strings.
- Copyright (C) 2001-2003, 2006-2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it
/* Line breaking of UTF-32 strings.
- Copyright (C) 2001-2003, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it
/* Line breaking of UTF-8 strings.
- Copyright (C) 2001-2003, 2006-2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it
/* Line breaking of UTF-8 strings.
- Copyright (C) 2001-2003, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it
/* Line breaking auxiliary functions.
- Copyright (C) 2001-2003, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it
/* Line breaking auxiliary functions.
- Copyright (C) 2001-2003, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it
/* Line breaking of strings.
- Copyright (C) 2001-2003, 2006-2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it
/* Line breaking of strings.
- Copyright (C) 2001-2003, 2006-2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it
/* Association between Unicode characters and their names.
- Copyright (C) 2000-2002, 2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2000-2002, 2005, 2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Association between Unicode characters and their names.
- Copyright (C) 2000-2002, 2005-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2000-2002, 2005-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Normalization forms (composition and decomposition) of Unicode strings.
- Copyright (C) 2001-2002, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2009-2010 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
/* Canonical decomposition of Unicode characters.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Compatibility decomposition of Unicode characters.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Canonical composition of Unicode characters. */
/* Generated automatically by gen-uni-tables for Unicode 5.1.0. */
-/* Copyright (C) 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Canonical composition of Unicode characters.
- Copyright (C) 2002, 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 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
/* Decomposition of Unicode strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Decomposition of Unicode strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Decomposing variant of a normalization form.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Decomposition of Unicode characters.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Decomposition of Unicode characters.
- Copyright (C) 2001-2003, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2009-2010 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
/* Decomposition of Unicode characters.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Unicode Normalization Form C.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Unicode Normalization Form D.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Unicode Normalization Form KC.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Unicode Normalization Form KD.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Normalization of Unicode strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Decomposition and composition of Unicode strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Normalization insensitive comparison of Unicode strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Locale dependent, normalization insensitive comparison of Unicode strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Locale dependent transformation for comparison of Unicode strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Normalization of UTF-16 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Normalization insensitive comparison of UTF-16 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Locale dependent, normalization insensitive comparison of UTF-16 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Locale dependent transformation for comparison of UTF-16 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Normalization of UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Normalization insensitive comparison of UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Locale dependent, normalization insensitive comparison of UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Locale dependent transformation for comparison of UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Normalization of UTF-8 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Normalization insensitive comparison of UTF-8 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Locale dependent, normalization insensitive comparison of UTF-8 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Locale dependent transformation for comparison of UTF-8 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Stream-based normalization of Unicode strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Like unistd.h, but redefine some names to avoid glitches.
- Copyright (C) 2005, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Invoke unistd-like functions, but avoid some glitches.
- Copyright (C) 2001, 2003, 2005, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2005, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
int fd_safer (int);
int pipe_safer (int[2]);
-#if GNULIB_CLOEXEC
+#if GNULIB_FD_SAFER_FLAG
int dup_safer_flag (int, int);
int fd_safer_flag (int, int);
#endif
/* Substitute for and wrapper around <unistd.h>.
- Copyright (C) 2003-2009 Free Software Foundation, Inc.
+ Copyright (C) 2003-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stddef.h>
/* mingw doesn't define the SEEK_* or *_FILENO macros in <unistd.h>. */
-#if !(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET)
+/* 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_SYMLINKAT@ || defined GNULIB_POSIXCHECK)) \
+ && ! defined __GLIBC__
# include <stdio.h>
#endif
+/* Cygwin 1.7.1 declares unlinkat in <fcntl.h>, not in <unistd.h>. */
+/* But avoid namespace pollution on glibc systems. */
+#if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__
+# include <fcntl.h>
+#endif
+
/* mingw fails to declare _exit in <unistd.h>. */
/* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
-#include <stdlib.h>
+/* Solaris declares getcwd not only in <unistd.h> but also in <stdlib.h>. */
+/* But avoid namespace pollution on glibc systems. */
+#ifndef __GLIBC__
+# include <stdlib.h>
+#endif
+
+/* mingw declares getcwd in <io.h>, not in <unistd.h>. */
+#if ((@GNULIB_GETCWD@ || defined GNULIB_POSIXCHECK) \
+ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
+# include <io.h>
+#endif
#if ((@GNULIB_WRITE@ && @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@) \
|| (@GNULIB_READLINK@ && (!@HAVE_READLINK@ || @REPLACE_READLINK@)) \
- || (@GNULIB_READLINKAT@ && !@HAVE_READLINKAT@))
+ || (@GNULIB_READLINKAT@ && !@HAVE_READLINKAT@) \
+ || defined GNULIB_POSIXCHECK)
/* Get ssize_t. */
# include <sys/types.h>
#endif
-/* Get getopt(), optarg, optind, opterr, optopt. */
-#if @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT
+/* Get getopt(), optarg, optind, opterr, optopt.
+ But avoid namespace pollution on glibc systems. */
+#if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT
# include <getopt.h>
#endif
/* The definition of GL_LINK_WARNING is copied here. */
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
/* OS/2 EMX lacks these macros. */
#ifndef STDIN_FILENO
Return 0 if successful, otherwise -1 and errno set.
See the POSIX:2001 specification
<http://www.opengroup.org/susv3xsh/chown.html>. */
-extern int chown (const char *file, uid_t uid, gid_t gid);
+extern int chown (const char *file, uid_t uid, gid_t gid)
+ _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef chown
# if !@HAVE_EUIDACCESS@
/* Like access(), except that it uses the effective user id and group id of
the current process. */
-extern int euidaccess (const char *filename, int mode);
+extern int euidaccess (const char *filename, int mode) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef euidaccess
#if @GNULIB_FACCESSAT@
# if !@HAVE_FACCESSAT@
-int faccessat (int fd, char const *file, int mode, int flag);
+extern int faccessat (int fd, char const *file, int mode, int flag)
+ _GL_ARG_NONNULL ((2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef faccessat
extern int fchdir (int /*fd*/);
/* Gnulib internal hooks needed to maintain the fchdir metadata. */
-extern int _gl_register_fd (int fd, const char *filename);
+extern int _gl_register_fd (int fd, const char *filename)
+ _GL_ARG_NONNULL ((2));
extern void _gl_unregister_fd (int fd);
extern int _gl_register_dup (int oldfd, int newfd);
extern const char *_gl_directory_name (int fd);
# define fchownat rpl_fchownat
# endif
# if !@HAVE_FCHOWNAT@ || @REPLACE_FCHOWNAT@
-extern int fchownat (int fd, char const *file, uid_t owner, gid_t group, int flag);
+extern int fchownat (int fd, char const *file, uid_t owner, gid_t group, int flag)
+ _GL_ARG_NONNULL ((2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef fchownat
#if @GNULIB_GETCWD@
-/* Include the headers that might declare getcwd so that they will not
- cause confusion if included after this file. */
-# include <stdlib.h>
# if @REPLACE_GETCWD@
/* Get the name of the current working directory, and put it in SIZE bytes
of BUF.
If the NIS domain name is longer than LEN, set errno = EINVAL and return -1.
Return 0 if successful, otherwise set errno and return -1. */
# if !@HAVE_GETDOMAINNAME@
-extern int getdomainname(char *name, size_t len);
+extern int getdomainname(char *name, size_t len) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef getdomainname
# define gethostname rpl_gethostname
# endif
# if @UNISTD_H_HAVE_WINSOCK2_H@ || !@HAVE_GETHOSTNAME@
-extern int gethostname(char *name, size_t len);
+extern int gethostname(char *name, size_t len) _GL_ARG_NONNULL ((1));
# endif
#elif @UNISTD_H_HAVE_WINSOCK2_H@
# undef gethostname
See <http://www.opengroup.org/susv3xsh/getlogin.html>.
*/
# if !@HAVE_DECL_GETLOGIN_R@
-extern int getlogin_r (char *name, size_t size);
+extern int getlogin_r (char *name, size_t size) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef getlogin_r
Return 0 if successful, otherwise -1 and errno set.
See the POSIX:2001 specification
<http://www.opengroup.org/susv3xsh/lchown.html>. */
-extern int lchown (char const *file, uid_t owner, gid_t group);
+extern int lchown (char const *file, uid_t owner, gid_t group)
+ _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef lchown
See POSIX:2001 specification
<http://www.opengroup.org/susv3xsh/link.html>. */
# if !@HAVE_LINK@ || @REPLACE_LINK@
-extern int link (const char *path1, const char *path2);
+extern int link (const char *path1, const char *path2)
+ _GL_ARG_NONNULL ((1, 2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef link
Return 0 if successful, otherwise -1 and errno set. */
# if !@HAVE_LINKAT@ || @REPLACE_LINKAT@
extern int linkat (int fd1, const char *path1, int fd2, const char *path2,
- int flag);
+ int flag)
+ _GL_ARG_NONNULL ((2, 4));
# endif
#elif defined GNULIB_POSIXCHECK
# undef linkat
-# define link(f1,path1,f2,path2,f) \
+# define linkat(f1,path1,f2,path2,f) \
(GL_LINK_WARNING ("linkat is unportable - " \
"use gnulib module linkat for portability"), \
linkat (f1, path1, f2, path2,f))
# if @HAVE_PIPE2@
# define pipe2 rpl_pipe2
# endif
-extern int pipe2 (int fd[2], int flags);
+extern int pipe2 (int fd[2], int flags) _GL_ARG_NONNULL ((1));
#elif defined GNULIB_POSIXCHECK
# undef pipe2
# define pipe2(f,o) \
set errno and return -1. 0 indicates EOF. See the POSIX:2001
specification <http://www.opengroup.org/susv3xsh/pread.html>. */
# if !@HAVE_PREAD@ || @REPLACE_PREAD@
- extern ssize_t pread (int fd, void *buf, size_t bufsize, off_t offset);
+ extern ssize_t pread (int fd, void *buf, size_t bufsize, off_t offset)
+ _GL_ARG_NONNULL ((2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef pread
See the POSIX:2001 specification
<http://www.opengroup.org/susv3xsh/readlink.html>. */
# if !@HAVE_READLINK@ || @REPLACE_READLINK@
-extern ssize_t readlink (const char *file, char *buf, size_t bufsize);
+extern ssize_t readlink (const char *file, char *buf, size_t bufsize)
+ _GL_ARG_NONNULL ((1, 2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef readlink
#if @GNULIB_READLINKAT@
# if !@HAVE_READLINKAT@
-ssize_t readlinkat (int fd, char const *file, char *buf, size_t len);
+extern ssize_t readlinkat (int fd, char const *file, char *buf, size_t len)
+ _GL_ARG_NONNULL ((2, 3));
# endif
#elif defined GNULIB_POSIXCHECK
# undef readlinkat
# if @REPLACE_RMDIR@
# define rmdir rpl_rmdir
/* Remove the directory DIR. */
-extern int rmdir (char const *name);
+extern int rmdir (char const *name) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef rmdir
# define symlink rpl_symlink
# endif
# if !@HAVE_SYMLINK@ || @REPLACE_SYMLINK@
-int symlink (char const *contents, char const *file);
+extern int symlink (char const *contents, char const *file)
+ _GL_ARG_NONNULL ((1, 2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef symlink
#if @GNULIB_SYMLINKAT@
# if !@HAVE_SYMLINKAT@
-int symlinkat (char const *contents, int fd, char const *file);
+extern int symlinkat (char const *contents, int fd, char const *file)
+ _GL_ARG_NONNULL ((1, 3));
# endif
#elif defined GNULIB_POSIXCHECK
# undef symlinkat
# if @REPLACE_UNLINK@
# undef unlink
# define unlink rpl_unlink
-extern int unlink (char const *file);
+extern int unlink (char const *file) _GL_ARG_NONNULL ((1));
# endif
#elif defined GNULIB_POSIXCHECK
# undef unlink
# define unlinkat rpl_unlinkat
# endif
# if !@HAVE_UNLINKAT@ || @REPLACE_UNLINKAT@
-extern int unlinkat (int fd, char const *file, int flag);
+extern int unlinkat (int fd, char const *file, int flag) _GL_ARG_NONNULL ((2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef unlinkat
<http://www.opengroup.org/susv3xsh/write.html>. */
# undef write
# define write rpl_write
-extern ssize_t write (int fd, const void *buf, size_t count);
+extern ssize_t write (int fd, const void *buf, size_t count)
+ _GL_ARG_NONNULL ((2));
#endif
/* Elementary Unicode string functions.
- Copyright (C) 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Decomposed printf argument list.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Decomposed printf argument list.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Parse printf format string.
- Copyright (C) 1999, 2002, 2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005, 2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999-2000, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999-2000, 2002, 2006-2007, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to UTF-16 strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to UTF-16 strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999-2000, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999-2000, 2002, 2006-2007, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to UTF-32 strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to UTF-32 strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999-2000, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999-2000, 2002, 2006-2007, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to UTF-8 strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to UTF-8 strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to a stream.
- Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Formatted output to strings.
- Copyright (C) 1999-2000, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999-2000, 2002, 2006-2007, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2005-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to a stream.
- Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Elementary Unicode string functions.
- Copyright (C) 2001-2002, 2005-2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2005-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
#include "unitypes.h"
+/* Get common macros for C. */
+#include "unused-parameter.h"
+
/* Get bool. */
#include <stdbool.h>
u32_mbtouc_unsafe (ucs4_t *puc, const uint32_t *s, size_t n);
# else
static inline int
-u32_mbtouc_unsafe (ucs4_t *puc, const uint32_t *s, size_t n _UNUSED_PARAMETER_)
+u32_mbtouc_unsafe (ucs4_t *puc,
+ const uint32_t *s, size_t n _GL_UNUSED_PARAMETER)
{
uint32_t c = *s;
u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n);
# else
static inline int
-u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n _UNUSED_PARAMETER_)
+u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n _GL_UNUSED_PARAMETER)
{
uint32_t c = *s;
/* Compare pieces of UTF-8/UTF-16/UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Copy piece of UTF-8/UTF-16/UTF-32 string.
- Copyright (C) 1999, 2002, 2006-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Copy piece of UTF-8/UTF-16/UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Substring test for UTF-8/UTF-16/UTF-32 strings.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Copy piece of UTF-8/UTF-16/UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Fill UTF-8/UTF-16/UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Substring test for UTF-8/UTF-16/UTF-32 strings.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Copy UTF-8/UTF-16/UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Copy UTF-8/UTF-16/UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Concatenate UTF-8/UTF-16/UTF-32 strings.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Compare UTF-8/UTF-16/UTF-32 strings using the collation rules of the current
locale.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Copy UTF-8/UTF-16/UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Search for some characters in UTF-8/UTF-16/UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Copy UTF-8/UTF-16/UTF-32 string.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Determine length of UTF-8/UTF-16/UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Concatenate UTF-8/UTF-16/UTF-32 strings.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Copy UTF-8/UTF-16/UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Determine bounded length of UTF-8/UTF-16/UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Search for some characters in UTF-8/UTF-16/UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Search for some characters in UTF-8/UTF-16/UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Substring test for UTF-8/UTF-16/UTF-32 strings.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Tokenize UTF-8/UTF-16/UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Check UTF-16 string.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Search character in piece of UTF-16 string.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Compare pieces of UTF-16 strings.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Compare pieces of UTF-16 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Copy piece of UTF-16 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Copy piece of UTF-16 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Substring test for UTF-16 strings.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Look at first character in UTF-16 string.
- Copyright (C) 1999-2000, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999-2000, 2002, 2006-2007, 2009-2010 Free Software
+ Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Count characters in UTF-16 string.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify it
/* Conversion UTF-16 to UCS-4.
- Copyright (C) 2001-2002, 2006-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it
/* Conversion UTF-16 to UCS-4.
- Copyright (C) 2001-2002, 2006-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it
/* Look at first character in UTF-16 string.
- Copyright (C) 1999-2002, 2006-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1999-2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it
/* Look at first character in UTF-16 string.
- Copyright (C) 1999-2002, 2006-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1999-2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it
/* Look at first character in UTF-16 string, returning an error code.
- Copyright (C) 1999-2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999-2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it
/* Copy piece of UTF-16 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Iterate over next character in UTF-16 string.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Iterate over previous character in UTF-16 string.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Fill UTF-16 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Substring test for UTF-16 strings.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Copy UTF-16 string.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Copy UTF-16 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Concatenate UTF-16 strings.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Search character in UTF-16 string.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Compare UTF-16 strings.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Compare UTF-16 strings using the collation rules of the current locale.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Copy UTF-16 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Search for some characters in UTF-16 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Copy UTF-16 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Determine length of UTF-16 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Look at first character in UTF-16 string.
- Copyright (C) 1999-2000, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999-2000, 2002, 2006-2007, 2009-2010 Free Software
+ Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Look at first character in UTF-16 string.
- Copyright (C) 1999-2000, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999-2000, 2002, 2006-2007, 2009-2010 Free Software
+ Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Concatenate UTF-16 strings.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Compare UTF-16 strings.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Copy UTF-16 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Determine bounded length of UTF-16 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Search for some characters in UTF-16 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Search character in UTF-16 string.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Search for some characters in UTF-16 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Substring test for UTF-16 strings.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Tokenize UTF-16 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Convert UTF-16 string to UTF-32 string.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Convert UTF-16 string to UTF-8 string.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Conversion UCS-4 to UTF-16.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Store a character in UTF-16 string.
- Copyright (C) 2002, 2005-2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005-2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Check UTF-32 string.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Search character in piece of UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Compare pieces of UTF-32 strings.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Compare pieces of UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Copy piece of UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Copy piece of UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Substring test for UTF-32 strings.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Look at first character in UTF-32 string.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Count characters in UTF-32 string.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify it
/* Look at first character in UTF-32 string.
- Copyright (C) 2002, 2006-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Look at first character in UTF-32 string.
- Copyright (C) 2002, 2006-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Look at first character in UTF-32 string, returning an error code.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Copy piece of UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Iterate over next character in UTF-32 string.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Iterate over previous character in UTF-32 string.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Fill UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Substring test for UTF-32 strings.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Copy UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Copy UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Concatenate UTF-32 strings.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Search character in UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Compare UTF-32 strings.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Compare UTF-32 strings using the collation rules of the current locale.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Copy UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Search for some characters in UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Copy UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Determine length of UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Look at first character in UTF-32 string.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Look at first character in UTF-32 string.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Concatenate UTF-32 strings.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Compare UTF-32 strings.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Copy UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Determine bounded length of UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Search for some characters in UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Search character in UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Search for some characters in UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Substring test for UTF-32 strings.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Tokenize UTF-32 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Convert UTF-32 string to UTF-16 string.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Convert UTF-32 string to UTF-8 string.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Store a character in UTF-32 string.
- Copyright (C) 2002, 2005-2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005-2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Check UTF-8 string.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Search character in piece of UTF-8 string.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Compare pieces of UTF-8 strings.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Compare pieces of UTF-8 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Copy piece of UTF-8 string.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Copy piece of UTF-8 string.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Substring test for UTF-8 strings.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Look at first character in UTF-8 string.
- Copyright (C) 1999-2000, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999-2000, 2002, 2006-2007, 2009-2010 Free Software
+ Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Count characters in UTF-8 string.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify it
/* Conversion UTF-8 to UCS-4.
- Copyright (C) 2001-2002, 2006-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it
/* Conversion UTF-8 to UCS-4.
- Copyright (C) 2001-2002, 2006-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it
/* Look at first character in UTF-8 string.
- Copyright (C) 1999-2002, 2006-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1999-2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it
/* Look at first character in UTF-8 string.
- Copyright (C) 1999-2002, 2006-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1999-2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it
/* Look at first character in UTF-8 string, returning an error code.
- Copyright (C) 1999-2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999-2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify it
/* Copy piece of UTF-8 string.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Iterate over next character in UTF-8 string.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Iterate over previous character in UTF-8 string.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Fill UTF-8 string.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Substring test for UTF-8 strings.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Copy UTF-8 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Copy UTF-8 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Concatenate UTF-8 strings.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Search character in UTF-8 string.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Compare UTF-8 strings.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Compare UTF-8 strings using the collation rules of the current locale.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Copy UTF-8 string.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Search for some characters in UTF-8 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Copy UTF-8 string.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Determine length of UTF-8 string.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Look at first character in UTF-8 string.
- Copyright (C) 1999-2000, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999-2000, 2002, 2006-2007, 2009-2010 Free Software
+ Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Look at first character in UTF-8 string.
- Copyright (C) 1999-2000, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999-2000, 2002, 2006-2007, 2009-2010 Free Software
+ Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Concatenate UTF-8 strings.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Compare UTF-8 strings.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Copy UTF-8 string.
- Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Determine bounded length of UTF-8 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Search for some characters in UTF-8 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Search character in UTF-8 string.
- Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Search for some characters in UTF-8 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Substring test for UTF-8 strings.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Tokenize UTF-8 string.
- Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Convert UTF-8 string to UTF-16 string.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Convert UTF-8 string to UTF-32 string.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Conversion UCS-4 to UTF-8.
- Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Store a character in UTF-8 string.
- Copyright (C) 2002, 2005-2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005-2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Elementary types for the GNU UniString library.
- Copyright (C) 2002, 2005-2006 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005-2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Word breaks in Unicode strings.
- Copyright (C) 2001-2003, 2005-2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2010 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
/* Word breaks in UTF-8/UTF-16/UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Word breaks in UTF-16 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Word breaks in UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Word breaks in UTF-8 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Word breaks in strings.
- Copyright (C) 2001-2003, 2006-2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006-2010 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
/* Line breaking properties of Unicode characters. */
/* Generated automatically by gen-uni-tables for Unicode 5.1.0. */
-/* Copyright (C) 2000-2002, 2004, 2007-2009 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2002, 2004, 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Word break auxiliary table.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Word break auxiliary table.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 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
/* Word break property.
- Copyright (C) 2001-2003, 2006-2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006-2010 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
/* Display width functions.
- Copyright (C) 2001-2002, 2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2005, 2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
/* Test for CJK encoding.
- Copyright (C) 2001-2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2005-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Determine display width of UTF-16 string.
- Copyright (C) 2001-2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Determine display width of UTF-16 string.
- Copyright (C) 2001-2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Determine display width of UTF-32 string.
- Copyright (C) 2001-2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Determine display width of UTF-32 string.
- Copyright (C) 2001-2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Determine display width of UTF-8 string.
- Copyright (C) 2001-2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Determine display width of UTF-8 string.
- Copyright (C) 2001-2002, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Determine display width of Unicode character.
- Copyright (C) 2001-2002, 2006-2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2006-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify it
/* Work around unlink bugs.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Work around unlinkat bugs on Solaris 9.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* unlinkdir.c - determine whether we can unlink directories
- Copyright (C) 2005-2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* unlinkdir.h - determine (and maybe change) whether we can unlink directories
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Prefer faster, non-thread-safe stdio functions if available.
- Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-/* Copyright (C) 1992,1995-1999,2000-2002,2005-2009 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995-2002, 2005-2010 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 <config.h>
+/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
+ optimizes away the name == NULL test below. */
+#define _GL_ARG_NONNULL(params)
+
/* Specification. */
#include <stdlib.h>
/* userspec.c -- Parse a user and group string.
- Copyright (C) 1989-1992, 1997-1998, 2000, 2002-2009 Free Software
+ Copyright (C) 1989-1992, 1997-1998, 2000, 2002-2010 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
/* Pausing execution of the current thread.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
Written by Eric Blake <ebb9@byu.net>, 2009.
This program is free software: you can redistribute it and/or modify
-/* Copyright (C) 1998, 2001, 2002, 2003, 2004, 2006 Free Software
- Foundation, Inc.
+/* Copyright (C) 1998, 2001-2004, 2006, 2009-2010 Free Software Foundation,
+ * Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
/* utimecmp.c -- compare file time stamps
- Copyright (C) 2004, 2005, 2006, 2007, 2009 Free Software
- Foundation, Inc.
+ Copyright (C) 2004-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* utimecmp.h -- compare file time stamps
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Set file access and modification times.
- Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free
- Software Foundation, Inc.
+ Copyright (C) 2003-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
#undef futimens
#undef utimensat
-#if HAVE_UTIMENSAT || HAVE_FUTIMENS
-/* Cache variables for whether the utimensat syscall works; used to
- avoid calling the syscall if we know it will just fail with ENOSYS.
- There are some Linux kernel versions where a flag of 0 passes, but
- not AT_SYMLINK_NOFOLLOW. 0 = unknown, 1 = yes, -1 = no. */
-static int utimensat_works_really;
-static int lutimensat_works_really;
-#endif /* HAVE_UTIMENSAT || HAVE_UTIMENSAT */
-
/* Solaris 9 mistakenly succeeds when given a non-directory with a
trailing slash. Force the use of rpl_stat for a fix. */
#ifndef REPLACE_FUNC_STAT_FILE
# define REPLACE_FUNC_STAT_FILE 0
#endif
+#if HAVE_UTIMENSAT || HAVE_FUTIMENS
+/* Cache variables for whether the utimensat syscall works; used to
+ avoid calling the syscall if we know it will just fail with ENOSYS,
+ and to avoid unnecessary work in massaging timestamps if the
+ syscall will work. Multiple variables are needed, to distinguish
+ between the following scenarios on Linux:
+ utimensat doesn't exist, or is in glibc but kernel 2.6.18 fails with ENOSYS
+ kernel 2.6.22 and earlier rejects AT_SYMLINK_NOFOLLOW
+ kernel 2.6.25 and earlier reject UTIME_NOW/UTIME_OMIT with non-zero tv_sec
+ kernel 2.6.32 used with xfs or ntfs-3g fail to honor UTIME_OMIT
+ utimensat completely works
+ For each cache variable: 0 = unknown, 1 = yes, -1 = no. */
+static int utimensat_works_really;
+static int lutimensat_works_really;
+#endif /* HAVE_UTIMENSAT || HAVE_FUTIMENS */
+
/* Validate the requested timestamps. Return 0 if the resulting
timespec can be used for utimensat (after possibly modifying it to
- work around bugs in utimensat). Return 1 if the timespec needs
- further adjustment based on stat results for utimes or other less
- powerful interfaces. Return -1, with errno set to EINVAL, if
+ work around bugs in utimensat). Return a positive value if the
+ timespec needs further adjustment based on stat results: 1 if any
+ adjustment is needed for utimes, and 2 if any adjustment is needed
+ for Linux utimensat. Return -1, with errno set to EINVAL, if
timespec is out of range. */
static int
validate_timespec (struct timespec timespec[2])
{
int result = 0;
+ int utime_omit_count = 0;
assert (timespec);
if ((timespec[0].tv_nsec != UTIME_NOW
&& timespec[0].tv_nsec != UTIME_OMIT
return -1;
}
/* Work around Linux kernel 2.6.25 bug, where utimensat fails with
- EINVAL if tv_sec is not 0 when using the flag values of
- tv_nsec. */
+ EINVAL if tv_sec is not 0 when using the flag values of tv_nsec.
+ Flag a Linux kernel 2.6.32 bug, where an mtime of UTIME_OMIT
+ fails to bump ctime. */
if (timespec[0].tv_nsec == UTIME_NOW
|| timespec[0].tv_nsec == UTIME_OMIT)
{
timespec[0].tv_sec = 0;
result = 1;
+ if (timespec[0].tv_nsec == UTIME_OMIT)
+ utime_omit_count++;
}
if (timespec[1].tv_nsec == UTIME_NOW
|| timespec[1].tv_nsec == UTIME_OMIT)
{
timespec[1].tv_sec = 0;
result = 1;
+ if (timespec[1].tv_nsec == UTIME_OMIT)
+ utime_omit_count++;
}
- return result;
+ return result + (utime_omit_count == 1);
}
/* Normalize any UTIME_NOW or UTIME_OMIT values in *TS, using stat
struct timespec adjusted_timespec[2];
struct timespec *ts = timespec ? adjusted_timespec : NULL;
int adjustment_needed = 0;
+ struct stat st;
if (ts)
{
#if HAVE_UTIMENSAT || HAVE_FUTIMENS
if (0 <= utimensat_works_really)
{
+ int result;
+# if __linux__
+ /* As recently as Linux kernel 2.6.32 (Dec 2009), several file
+ systems (xfs, ntfs-3g) have bugs with a single UTIME_OMIT,
+ but work if both times are either explicitly specified or
+ UTIME_NOW. Work around it with a preparatory [f]stat prior
+ to calling futimens/utimensat; fortunately, there is not much
+ timing impact due to the extra syscall even on file systems
+ where UTIME_OMIT would have worked. FIXME: Simplify this in
+ 2012, when file system bugs are no longer common. */
+ if (adjustment_needed == 2)
+ {
+ if (fd < 0 ? stat (file, &st) : fstat (fd, &st))
+ return -1;
+ if (ts[0].tv_nsec == UTIME_OMIT)
+ ts[0] = get_stat_atime (&st);
+ else if (ts[1].tv_nsec == UTIME_OMIT)
+ ts[1] = get_stat_mtime (&st);
+ /* Note that st is good, in case utimensat gives ENOSYS. */
+ adjustment_needed++;
+ }
+# endif /* __linux__ */
# if HAVE_UTIMENSAT
if (fd < 0)
{
- int result = utimensat (AT_FDCWD, file, ts, 0);
+ result = utimensat (AT_FDCWD, file, ts, 0);
# ifdef __linux__
/* Work around a kernel bug:
http://bugzilla.redhat.com/442352
# endif /* HAVE_UTIMENSAT */
# if HAVE_FUTIMENS
{
- int result = futimens (fd, ts);
+ result = futimens (fd, ts);
# ifdef __linux__
/* Work around the same bug as above. */
if (0 < result)
if (adjustment_needed || (REPLACE_FUNC_STAT_FILE && fd < 0))
{
- struct stat st;
- if (fd < 0 ? stat (file, &st) : fstat (fd, &st))
+ if (adjustment_needed != 3
+ && (fd < 0 ? stat (file, &st) : fstat (fd, &st)))
return -1;
if (ts && update_timespec (&st, &ts))
return 0;
struct timespec *ts = timespec ? adjusted_timespec : NULL;
int adjustment_needed = 0;
struct stat st;
- int result;
if (ts)
{
#if HAVE_UTIMENSAT
if (0 <= lutimensat_works_really)
{
+ int result;
+# if __linux__
+ /* As recently as Linux kernel 2.6.32 (Dec 2009), several file
+ systems (xfs, ntfs-3g) have bugs with a single UTIME_OMIT,
+ but work if both times are either explicitly specified or
+ UTIME_NOW. Work around it with a preparatory lstat prior to
+ calling utimensat; fortunately, there is not much timing
+ impact due to the extra syscall even on file systems where
+ UTIME_OMIT would have worked. FIXME: Simplify this in 2012,
+ when file system bugs are no longer common. */
+ if (adjustment_needed == 2)
+ {
+ if (lstat (file, &st))
+ return -1;
+ if (ts[0].tv_nsec == UTIME_OMIT)
+ ts[0] = get_stat_atime (&st);
+ else if (ts[1].tv_nsec == UTIME_OMIT)
+ ts[1] = get_stat_mtime (&st);
+ /* Note that st is good, in case utimensat gives ENOSYS. */
+ adjustment_needed++;
+ }
+# endif /* __linux__ */
result = utimensat (AT_FDCWD, file, ts, AT_SYMLINK_NOFOLLOW);
# ifdef __linux__
/* Work around a kernel bug:
if (adjustment_needed || REPLACE_FUNC_STAT_FILE)
{
- if (lstat (file, &st))
+ if (adjustment_needed != 3 && lstat (file, &st))
return -1;
if (ts && update_timespec (&st, &ts))
return 0;
{
struct timeval timeval[2];
struct timeval const *t;
+ int result;
if (ts)
{
timeval[0].tv_sec = ts[0].tv_sec;
/* Set the access and modification time of a file relative to directory fd.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <errno.h>
#include <fcntl.h>
+#include "stat-time.h"
+#include "timespec.h"
#include "utimens.h"
#if HAVE_UTIMENSAT
/* If we have a native utimensat, but are compiling this file, then
utimensat was defined to rpl_utimensat by our replacement
- sys/stat.h. We assume the native version might fail with ENOSYS
- (as is the case when using newer glibc but older Linux kernel). In
- this scenario, rpl_utimensat checks whether the native version is
- usable, and local_utimensat provides the fallback manipulation. */
+ sys/stat.h. We assume the native version might fail with ENOSYS,
+ or succeed without properly affecting ctime (as is the case when
+ using newer glibc but older Linux kernel). In this scenario,
+ rpl_utimensat checks whether the native version is usable, and
+ local_utimensat provides the fallback manipulation. */
static int local_utimensat (int, char const *, struct timespec const[2], int);
# define AT_FUNC_NAME local_utimensat
rpl_utimensat (int fd, char const *file, struct timespec const times[2],
int flag)
{
+ /* See comments in utimens.c for details. */
static int utimensat_works_really; /* 0 = unknown, 1 = yes, -1 = no. */
if (0 <= utimensat_works_really)
{
- int result = utimensat (fd, file, times, flag);
+ int result;
+# ifdef __linux__
+ struct stat st;
+ struct timespec ts[2];
+ /* As recently as Linux kernel 2.6.32 (Dec 2009), several file
+ systems (xfs, ntfs-3g) have bugs with a single UTIME_OMIT,
+ but work if both times are either explicitly specified or
+ UTIME_NOW. Work around it with a preparatory [l]stat prior
+ to calling utimensat; fortunately, there is not much timing
+ impact due to the extra syscall even on file systems where
+ UTIME_OMIT would have worked. FIXME: Simplify this in 2012,
+ when file system bugs are no longer common. */
+ if (times && (times[0].tv_nsec == UTIME_OMIT
+ || times[1].tv_nsec == UTIME_OMIT))
+ {
+ if (fstatat (fd, file, &st, flag))
+ return -1;
+ if (times[0].tv_nsec == UTIME_OMIT && times[1].tv_nsec == UTIME_OMIT)
+ return 0;
+ if (times[0].tv_nsec == UTIME_OMIT)
+ ts[0] = get_stat_atime (&st);
+ else
+ ts[0] = times[0];
+ if (times[1].tv_nsec == UTIME_OMIT)
+ ts[1] = get_stat_mtime (&st);
+ else
+ ts[1] = times[1];
+ times = ts;
+ }
+# endif /* __linux__ */
+ result = utimensat (fd, file, times, flag);
/* Linux kernel 2.6.25 has a bug where it returns EINVAL for
UTIME_NOW or UTIME_OMIT with non-zero tv_sec, which
local_utimensat works around. Meanwhile, EINVAL for a bad
/* vsprintf with automatic memory allocation.
- Copyright (C) 1999, 2002-2009 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
{
/* Use only as many wide characters as needed to produce
at most PRECISION bytes, from the left. */
-# if HAVE_WCRTOMB
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
mbstate_t state;
memset (&state, '\0', sizeof (mbstate_t));
# endif
if (*arg_end == 0)
/* Found the terminating null wide character. */
break;
-# if HAVE_WCRTOMB
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
count = wcrtomb (cbuf, *arg_end, &state);
# else
count = wctomb (cbuf, *arg_end);
{
/* Use the entire string, and count the number of
bytes. */
-# if HAVE_WCRTOMB
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
mbstate_t state;
memset (&state, '\0', sizeof (mbstate_t));
# endif
if (*arg_end == 0)
/* Found the terminating null wide character. */
break;
-# if HAVE_WCRTOMB
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
count = wcrtomb (cbuf, *arg_end, &state);
# else
count = wctomb (cbuf, *arg_end);
{
TCHAR_T *tmpptr = tmpsrc;
size_t remaining;
-# if HAVE_WCRTOMB
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
mbstate_t state;
memset (&state, '\0', sizeof (mbstate_t));
# endif
if (*arg == 0)
abort ();
-# if HAVE_WCRTOMB
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
count = wcrtomb (cbuf, *arg, &state);
# else
count = wctomb (cbuf, *arg);
{
/* We know the number of bytes in advance. */
size_t remaining;
-# if HAVE_WCRTOMB
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
mbstate_t state;
memset (&state, '\0', sizeof (mbstate_t));
# endif
if (*arg == 0)
abort ();
-# if HAVE_WCRTOMB
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
count = wcrtomb (cbuf, *arg, &state);
# else
count = wctomb (cbuf, *arg);
}
else
{
-# if HAVE_WCRTOMB
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
mbstate_t state;
memset (&state, '\0', sizeof (mbstate_t));
# endif
if (*arg == 0)
abort ();
-# if HAVE_WCRTOMB
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
count = wcrtomb (cbuf, *arg, &state);
# else
count = wctomb (cbuf, *arg);
/* vsprintf with automatic memory allocation.
- Copyright (C) 2002-2004, 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2002-2004, 2007-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Formatted output to a file descriptor.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
return -1;
}
+ if (output != buf)
+ free (output);
+
if (len > INT_MAX)
{
errno = EOVERFLOW;
/* Compile-time assert-like macros.
- Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* va_list error handler for noninteractive utilities
- Copyright (C) 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Declaration for va_list error-reporting function
- Copyright (C) 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Variable with FSF copyright information, for version-etc.
- Copyright (C) 1999-2006 Free Software Foundation, Inc.
+ Copyright (C) 1999-2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Print --version and bug-reporting information in a consistent format.
- Copyright (C) 1999-2009 Free Software Foundation, Inc.
+ Copyright (C) 1999-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# define PACKAGE PACKAGE_TARNAME
#endif
-enum { COPYRIGHT_YEAR = 2009 };
+enum { COPYRIGHT_YEAR = 2010 };
/* 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 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2003, 2005, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Formatted output to a stream.
- Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
return -1;
}
+ if (output != buf)
+ free (output);
+
if (len > INT_MAX)
{
errno = EOVERFLOW;
/* Formatted output to a stream.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Formatted output to strings.
- Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006-2010 Free Software Foundation, Inc.
Written by Simon Josefsson and Yoann Vandoorselaere <yoann@prelude-ids.org>.
This program is free software; you can redistribute it and/or modify
/* Formatted output to strings.
- Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* w32sock.h --- internal auxilliary functions for Windows socket functions
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Auxiliary functions for the creation of subprocesses. Native Woe32 API.
- Copyright (C) 2001, 2003, 2004-2009 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
/* Waiting for a subprocess to finish.
- Copyright (C) 2001-2003, 2005-2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2010 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-2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006, 2008-2010 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 ISO C99 <wchar.h>, for platforms that have issues.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* 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>
+ included before <wchar.h>.
+ But avoid namespace pollution on glibc systems. */
+#ifndef __GLIBC__
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+#endif
/* Include the original <wchar.h> if it exists.
Some builds of uClibc lack it. */
/* The definition of GL_LINK_WARNING is copied here. */
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
#ifdef __cplusplus
extern "C" {
#endif
# define mbsrtowcs rpl_mbsrtowcs
# endif
# if !@HAVE_MBSRTOWCS@ || @REPLACE_MBSRTOWCS@
-extern size_t mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps);
+extern size_t mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
+ _GL_ARG_NONNULL ((2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef mbsrtowcs
# define mbsnrtowcs rpl_mbsnrtowcs
# endif
# if !@HAVE_MBSNRTOWCS@ || @REPLACE_MBSNRTOWCS@
-extern size_t mbsnrtowcs (wchar_t *dest, const char **srcp, size_t srclen, size_t len, mbstate_t *ps);
+extern size_t mbsnrtowcs (wchar_t *dest, const char **srcp, size_t srclen, size_t len, mbstate_t *ps)
+ _GL_ARG_NONNULL ((2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef mbsnrtowcs
# define wcsrtombs rpl_wcsrtombs
# endif
# if !@HAVE_WCSRTOMBS@ || @REPLACE_WCSRTOMBS@
-extern size_t wcsrtombs (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps);
+extern size_t wcsrtombs (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)
+ _GL_ARG_NONNULL ((2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef wcsrtombs
# define wcsnrtombs rpl_wcsnrtombs
# endif
# if !@HAVE_WCSNRTOMBS@ || @REPLACE_WCSNRTOMBS@
-extern size_t wcsnrtombs (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps);
+extern size_t wcsnrtombs (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps)
+ _GL_ARG_NONNULL ((2));
# endif
#elif defined GNULIB_POSIXCHECK
# undef wcsnrtombs
/* Convert wide character to multibyte character.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 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 string to string.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 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 string to string.
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 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 string to string.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 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 unibyte character.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 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-2009 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Determine the number of screen columns needed for a character.
- Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Determine whether we can write any file.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* POSIX compatible write() function.
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
/* Report a memory allocation failure and exit.
- Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2006 Free
- Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2006, 2009, 2010
+ Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* xalloc.h -- malloc with out-of-memory checking
- Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2003, 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2003, 2004, 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* vasprintf and asprintf with out-of-memory checking.
- Copyright (C) 1999, 2002-2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002-2004, 2006, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Construct a full filename from a directory and a relative filename.
- Copyright (C) 2001-2004, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
/* a wrapper for frepoen
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* xgetcwd.c -- return current directory with unlimited length
- Copyright (C) 2001, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003-2004, 2006-2007, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* prototype for xgetcwd
- Copyright (C) 1995, 2001, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001, 2003, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* xgetdomainname.c -- Return the NIS domain name, without size limitations.
- Copyright (C) 1992, 1996, 2000-2001, 2003-2004, 2006, 2008 Free Software
- Foundation, Inc.
+ Copyright (C) 1992, 1996, 2000-2001, 2003-2004, 2006, 2008-2010 Free
+ Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* xgetdomainname.h -- Return the NIS domain name, without size limitations.
- Copyright (C) 1992, 1996, 2000, 2001, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1996, 2000, 2001, 2003, 2009, 2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* xgethostname.c -- return current hostname with unlimited length
- Copyright (C) 1992, 1996, 2000, 2001, 2003, 2004, 2005, 2006, 2009
- Free Software Foundation, Inc.
+ Copyright (C) 1992, 1996, 2000-2001, 2003-2006, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* xmalloc.c -- malloc with out of memory checking
- Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2008-2009 Free Software Foundation,
- Inc.
+ Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Safe automatic memory allocation with out of memory checking.
- Copyright (C) 2003, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006-2007, 2009-2010 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 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
/* Locale-specific memory comparison.
- Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002-2004, 2006, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* xmemdup0.c -- copy a block of arbitrary bytes, plus a trailing NUL
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* xmemdup0.h -- copy a block of arbitrary bytes, plus a trailing NUL
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* xnanosleep.c -- a more convenient interface to nanosleep
- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software
- Foundation, Inc.
+ Copyright (C) 2002-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* printf wrappers that fail immediately for non-file-related errors
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* printf wrappers that fail immediately for non-file-related errors
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* xreadlink.c -- readlink wrapper to return the link name in malloc'd storage
- Copyright (C) 2001, 2003-2007 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Reading symbolic links without size limitation.
- Copyright (C) 2001, 2003, 2004, 2007, 2009 Free Software
- Foundation, Inc.
+ Copyright (C) 2001, 2003-2004, 2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* xreadlinkat.c -- readlink wrapper to return the link name in malloc'd storage
- Copyright (C) 2001, 2003-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Setting environment variables, with out-of-memory checking.
- Copyright (C) 2001-2002, 2005-2007 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2005-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Setting environment variables, with out-of-memory checking.
- Copyright (C) 2001-2002, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* xsize.h -- Checked size_t computations.
- Copyright (C) 2003, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Charset conversion with out-of-memory checking.
- Copyright (C) 2001-2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible.
This program is free software: you can redistribute it and/or modify
/* Charset conversion with out-of-memory checking.
- Copyright (C) 2001-2004, 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible and Simon Josefsson.
This program is free software: you can redistribute it and/or modify
/* Charset conversion with out-of-memory checking.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
Written by Bruno Haible.
This program is free software: you can redistribute it and/or modify
/* Charset conversion with out-of-memory checking.
- Copyright (C) 2001-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2001-2007, 2009-2010 Free Software Foundation, Inc.
Written by Bruno Haible and Simon Josefsson.
This program is free software: you can redistribute it and/or modify
/* Duplicate a bounded initial segment of a string, with out-of-memory
checking.
- Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Duplicate a bounded initial segment of a string, with out-of-memory
checking.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* error-checking interface to strtod-like functions
- Copyright (C) 1996, 1999, 2000, 2003, 2004, 2005, 2006 Free
- Software Foundation, Inc.
+ Copyright (C) 1996, 1999-2000, 2003-2006, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Error-checking interface to strtod-like functions.
- Copyright (C) 1996, 1998, 2003, 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1998, 2003-2004, 2006, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* A more useful interface to strtol.
- Copyright (C) 1995, 1996, 1998, 1999, 2001-2004, 2006-2008
- Free Software Foundation, Inc.
+ Copyright (C) 1995-1996, 1998-1999, 2001-2004, 2006-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* A more useful interface to strtol.
- Copyright (C) 1995, 1996, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
- 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1995-1996, 1998-2001, 2003-2007, 2009-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* A more useful interface to strtol.
- Copyright (C) 1995, 1996, 1998, 1999, 2001, 2002, 2003, 2004, 2006, 2007,
- 2008 Free Software Foundation, Inc.
+ Copyright (C) 1995-1996, 1998-1999, 2001-2004, 2006-2010 Free Software
+ Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* xtime -- extended-resolution integer time stamps
- Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* vasprintf and asprintf with out-of-memory checking.
- Copyright (C) 1999, 2002-2004, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002-2004, 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* vasprintf and asprintf with out-of-memory checking.
- Copyright (C) 2002-2004, 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2002-2004, 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* yesno.c -- read a yes/no response from stdin
- Copyright (C) 1990, 1998, 2001, 2003-2008 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1998, 2001, 2003-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* declare yesno
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# 00gnulib.m4 serial 2
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# absolute-header.m4 serial 11
-dnl Copyright (C) 2006-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# accept4.m4 serial 2
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# acl.m4 - check for access control list (ACL) primitives
# serial 9
-# Copyright (C) 2002, 2004-2009 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 10
-# Copyright (C) 1999-2001, 2004, 2008-2009 Free Software Foundation, Inc.
+# Copyright (C) 1999-2001, 2004, 2008-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# alloca.m4 serial 9
-dnl Copyright (C) 2002-2004, 2006, 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2006-2007, 2009-2010 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.
# alphasort.m4 serial 1
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# arcfour.m4 serial 2
-dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# arctwo.m4 serial 2
-dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
#serial 3
-dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# argp.m4 serial 10
-dnl Copyright (C) 2003-2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2007, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Portability macros for glibc argz. -*- Autoconf -*-
#
-# Copyright (C) 2004-2009 Free Software Foundation, Inc.
+# Copyright (C) 2004-2010 Free Software Foundation, Inc.
# Written by Gary V. Vaughan <gary@gnu.org>
#
# This file is free software; the Free Software Foundation gives
-# arpa_inet_h.m4 serial 5
-dnl Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+# arpa_inet_h.m4 serial 6
+dnl Copyright (C) 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
if test $ac_cv_header_arpa_inet_h = yes; then
HAVE_ARPA_INET_H=1
else
- ARPA_INET_H='arpa/inet.h'
HAVE_ARPA_INET_H=0
fi
AC_SUBST([HAVE_ARPA_INET_H])
- dnl Execute this unconditionally, because ARPA_INET_H may be set by other
- dnl modules, after this code is executed.
+ dnl <arpa/inet.h> is always overridden, because of GNULIB_POSIXCHECK.
gl_CHECK_NEXT_HEADERS([arpa/inet.h])
])
dnl Unconditionally enables the replacement of <arpa/inet.h>.
AC_DEFUN([gl_REPLACE_ARPA_INET_H],
[
- AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS])
- ARPA_INET_H='arpa/inet.h'
+ dnl This is a no-op, because <arpa/inet.h> is always overridden.
+ :
])
AC_DEFUN([gl_ARPA_INET_MODULE_INDICATOR],
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_DECL_INET_NTOP=1; AC_SUBST([HAVE_DECL_INET_NTOP])
HAVE_DECL_INET_PTON=1; AC_SUBST([HAVE_DECL_INET_PTON])
- ARPA_INET_H=''; AC_SUBST([ARPA_INET_H])
])
#serial 7
-# Copyright (C) 1998, 1999, 2001, 2004, 2008 Free Software Foundation, Inc.
+# Copyright (C) 1998-1999, 2001, 2004, 2008-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# atexit.m4 serial 3
-dnl Copyright (C) 2002, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# atoll.m4 serial 1
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# autobuild.m4 serial 7
-dnl Copyright (C) 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010 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.
# backupfile.m4 serial 12
-dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# base64.m4 serial 3
-dnl Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# bison-i18n.m4 serial 3
-dnl Copyright (C) 2005-2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 5
-# Copyright (C) 2002, 2005, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2005, 2009, 2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# btowc.m4 serial 4
-dnl Copyright (C) 2008-2009 Free Software Foundation, Inc.
+# btowc.m4 serial 5
+dnl Copyright (C) 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
[
AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+ dnl Check whether <wchar.h> is usable at all, first. Otherwise the test
+ dnl program below may lead to an endless loop. See
+ dnl <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42440>.
+ AC_REQUIRE([gl_WCHAR_H_INLINE_OK])
+
AC_CHECK_FUNCS_ONCE([btowc])
if test $ac_cv_func_btowc = no; then
HAVE_BTOWC=0
# byteswap.m4 serial 3
-dnl Copyright (C) 2005, 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Check prerequisites for compiling lib/c-stack.c.
-# Copyright (C) 2002, 2003, 2004, 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2008, 2009, 2010 Free Software Foundation,
+# Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# c-strtod.m4 serial 11
-# Copyright (C) 2004, 2005, 2006, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2004-2006, 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# calloc.m4 serial 9
-# Copyright (C) 2004-2009 Free Software Foundation, Inc.
+# Copyright (C) 2004-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# canon-host.m4 serial 9
-dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2007, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# canonicalize.m4 serial 16
-dnl Copyright (C) 2003-2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2007, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
# ceil.m4 serial 3
-dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# ceilf.m4 serial 4
-dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# ceill.m4 serial 4
-dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-#serial 10
+#serial 11
# Use Gnulib's robust chdir function.
# It can handle arbitrarily long directory names, which means
# never fails with ENAMETOOLONG.
# Arrange to compile chdir-long.c only on systems that define PATH_MAX.
-dnl Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2007, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_PREREQ_CHDIR_LONG],
[
+ AC_REQUIRE([AC_C_INLINE])
:
])
#serial 4
-dnl Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# check-math-lib.m4 serial 3
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
#serial 2
-dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 22
# Determine whether we need the chown wrapper.
-dnl Copyright (C) 1997-2001, 2003-2005, 2007, 2009
-dnl Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2001, 2003-2005, 2007, 2009-2010 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,
# clock_time.m4 serial 10
-dnl Copyright (C) 2002-2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
#serial 6
-dnl Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
#serial 3
-dnl Copyright (C) 2006-2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2007, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# close.m4 serial 5
-dnl Copyright (C) 2008-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# closein.m4 serial 1
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# closeout.m4 serial 5
-dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2010 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.
# codeset.m4 serial 4 (gettext-0.18)
-dnl Copyright (C) 2000-2002, 2006, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2006, 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# cond.m4 serial 1
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Say that -DHAVE_CONFIG_H is not needed.
-dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# copy-file.m4 serial 3
-dnl Copyright (C) 2003, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# count-one-bits.m4 serial 1
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+# count-one-bits.m4 serial 2
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl We don't need (and can't compile) count_one_bits_ll
dnl unless the type 'unsigned long long int' exists.
AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
+
+ dnl Prerequisites of lib/count-one-bits.h.
+ AC_REQUIRE([AC_C_INLINE])
])
# crc.m4 serial 2
-dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# csharp.m4 serial 3
-dnl Copyright (C) 2004-2005, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2005, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# csharpcomp.m4 serial 8
-dnl Copyright (C) 2003-2005, 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2005, 2007, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# csharpexec.m4 serial 4
-dnl Copyright (C) 2003-2005, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2005, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# ctype_h.m4 serial 1
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+# ctype_h.m4 serial 2
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
GNULIB_ISBLANK=0; AC_SUBST([GNULIB_ISBLANK])
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_ISBLANK=1; AC_SUBST([HAVE_ISBLANK])
- CTYPE_H=''; AC_SUBST([CTYPE_H])
])
#serial 5
-dnl Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl Check whether struct dirent has a member named d_ino.
dnl
-# Copyright (C) 1997, 1999-2001, 2003-2004, 2006-2007, 2009 Free Software
+# Copyright (C) 1997, 1999-2001, 2003-2004, 2006-2007, 2009-2010 Free Software
# Foundation, Inc.
# This file is free software; the Free Software Foundation
dnl Check whether struct dirent has a member named d_type.
dnl
-# Copyright (C) 1997, 1999-2004, 2006, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1999-2004, 2006, 2009-2010 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# des.m4 serial 2
-dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
#serial 1
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# dirent_h.m4 serial 7
-dnl Copyright (C) 2008-2009 Free Software Foundation, Inc.
+# dirent_h.m4 serial 8
+dnl Copyright (C) 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl once only, before all statements that occur in other macros.
AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
- dnl Execute this unconditionally, because DIRENT_H may be set by other
- dnl modules, after this code is executed.
+ dnl <dirent.h> is always overridden, because of GNULIB_POSIXCHECK.
gl_CHECK_NEXT_HEADERS([dirent.h])
])
dnl Unconditionally enables the replacement of <dirent.h>.
AC_DEFUN([gl_REPLACE_DIRENT_H],
[
- AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
- DIRENT_H='dirent.h'
+ dnl This is a no-op, because <dirent.h> is always overridden.
+ :
])
AC_DEFUN([gl_DIRENT_MODULE_INDICATOR],
REPLACE_CLOSEDIR=0; AC_SUBST([REPLACE_CLOSEDIR])
REPLACE_FDOPENDIR=0; AC_SUBST([REPLACE_FDOPENDIR])
REPLACE_OPENDIR=0; AC_SUBST([REPLACE_OPENDIR])
- DIRENT_H=''; AC_SUBST([DIRENT_H])
])
dnl Find out how to get the file descriptor associated with an open DIR*.
-# Copyright (C) 2001-2006, 2008-2009 Free Software Foundation, Inc.
+# Copyright (C) 2001-2006, 2008-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
#serial 8 -*- autoconf -*-
-dnl Copyright (C) 2002-2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Define some macros required for proper operation of code in lib/*.c
# on MSDOS/Windows systems.
-# Copyright (C) 2000, 2001, 2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2004-2006, 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# double-slash-root.m4 serial 4 -*- Autoconf -*-
-dnl Copyright (C) 2006, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# dprintf-posix.m4 serial 2
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# dprintf.m4 serial 1
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
#serial 10
-dnl Copyright (C) 2002, 2005, 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005, 2007, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# dup3.m4 serial 2
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# duplocale.m4 serial 1
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# eaccess.m4 serial 2
-dnl Copyright (C) 2003, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# eealloc.m4 serial 2
-dnl Copyright (C) 2003, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# environ.m4 serial 3
-dnl Copyright (C) 2001-2004, 2006-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2004, 2006-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# errno_h.m4 serial 6
-dnl Copyright (C) 2004, 2006, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
#serial 12
-# Copyright (C) 1996-1998, 2001-2004, 2009 Free Software
-# Foundation, Inc.
+# Copyright (C) 1996-1998, 2001-2004, 2009-2010 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# euidaccess.m4 serial 12
-dnl Copyright (C) 2002-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# exclude.m4 serial 7
-dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2003, 2005, 2006, 2009, 2010 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.
# execute.m4 serial 4
-dnl Copyright (C) 2003, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# exitfail.m4 serial 6
-dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2003, 2005, 2006, 2009, 2010 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.
# exponentd.m4 serial 1
-dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# exponentf.m4 serial 1
-dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# exponentl.m4 serial 2
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# serial 8 -*- Autoconf -*-
+# serial 9 -*- Autoconf -*-
# Enable extensions on systems that normally disable them.
-# Copyright (C) 2003, 2006-2009 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# enough in this area it's likely we'll need to redefine
# AC_USE_SYSTEM_EXTENSIONS for quite some time.
+# If autoconf reports a warning
+# warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
+# or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
+# the fix is
+# 1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked
+# but always AC_REQUIREd,
+# 2) to ensure that for each occurrence of
+# AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+# or
+# AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+# the corresponding gnulib module description has 'extensions' among
+# its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS
+# invocation occurs in gl_EARLY, not in gl_INIT.
+
# AC_USE_SYSTEM_EXTENSIONS
# ------------------------
# Enable extensions on systems that normally disable them,
# serial 3
# See if we need to provide faccessat replacement.
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# fatal-signal.m4 serial 7
-dnl Copyright (C) 2003-2004, 2006, 2008, 2009 Free Software Foundation, Inc.
+# fatal-signal.m4 serial 8
+dnl Copyright (C) 2003-2004, 2006, 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FATAL_SIGNAL],
[
+ AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([gt_TYPE_SIG_ATOMIC_T])
AC_CHECK_HEADERS_ONCE([unistd.h])
gl_PREREQ_SIG_HANDLER_H
# fbufmode.m4 serial 1
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# fchdir.m4 serial 12
-dnl Copyright (C) 2006-2009 Free Software Foundation, Inc.
+# fchdir.m4 serial 13
+dnl Copyright (C) 2006-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
gl_REPLACE_CLOSE
gl_REPLACE_DUP2
dnl dup3 is already unconditionally replaced
+ gl_REPLACE_FCNTL
gl_REPLACE_DIRENT_H
AC_CACHE_CHECK([whether open can visit directories],
[gl_cv_func_open_directory_works],
# fclose.m4 serial 2
-dnl Copyright (C) 2008-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
--- /dev/null
+# fcntl-o.m4 serial 1
+dnl Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Paul Eggert.
+
+# Test whether the flags O_NOATIME and O_NOFOLLOW actually work.
+# Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise.
+# Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise.
+AC_DEFUN([gl_FCNTL_O_FLAGS],
+[
+ dnl Persuade glibc <fcntl.h> to define O_NOATIME and O_NOFOLLOW.
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+ AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+ #ifndef O_NOATIME
+ #define O_NOATIME 0
+ #endif
+ #ifndef O_NOFOLLOW
+ #define O_NOFOLLOW 0
+ #endif
+ static int const constants[] =
+ {
+ O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
+ O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
+ };
+ ]],
+ [[
+ int status = !constants;
+ {
+ static char const sym[] = "conftest.sym";
+ if (symlink (".", sym) != 0
+ || close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0)
+ status |= 32;
+ unlink (sym);
+ }
+ {
+ static char const file[] = "confdefs.h";
+ int fd = open (file, O_RDONLY | O_NOATIME);
+ char c;
+ struct stat st0, st1;
+ if (fd < 0
+ || fstat (fd, &st0) != 0
+ || sleep (1) != 0
+ || read (fd, &c, 1) != 1
+ || close (fd) != 0
+ || stat (file, &st1) != 0
+ || st0.st_atime != st1.st_atime)
+ status |= 64;
+ }
+ return status;]])],
+ [gl_cv_header_working_fcntl_h=yes],
+ [case $? in #(
+ 32) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
+ 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
+ 96) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
+ *) gl_cv_header_working_fcntl_h='no';;
+ esac],
+ [gl_cv_header_working_fcntl_h=cross-compiling])])
+
+ case $gl_cv_header_working_fcntl_h in #(
+ *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
+ *) ac_val=1;;
+ esac
+ AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val],
+ [Define to 1 if O_NOATIME works.])
+
+ case $gl_cv_header_working_fcntl_h in #(
+ *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
+ *) ac_val=1;;
+ esac
+ AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val],
+ [Define to 1 if O_NOFOLLOW works.])
+])
#serial 7
-dnl Copyright (C) 2005-2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
--- /dev/null
+# fcntl.m4 serial 3
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# For now, this module ensures that fcntl()
+# - supports F_DUPFD correctly
+# - supports or emulates F_DUPFD_CLOEXEC
+# - supports F_GETFD
+# Still to be ported to mingw:
+# - F_SETFD
+# - F_GETFL, F_SETFL
+# - F_GETOWN, F_SETOWN
+# - F_GETLK, F_SETLK, F_SETLKW
+AC_DEFUN([gl_FUNC_FCNTL],
+[
+ dnl Persuade glibc to expose F_DUPFD_CLOEXEC.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CHECK_FUNCS_ONCE([fcntl])
+ if test $ac_cv_func_fcntl = no; then
+ gl_REPLACE_FCNTL
+ else
+ dnl cygwin 1.5.x F_DUPFD has wrong errno, and allows negative target
+ 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>
+]], [[return fcntl (0, F_DUPFD, -1) != -1;
+ ]])],
+ [gl_cv_func_fcntl_f_dupfd_works=yes],
+ [gl_cv_func_fcntl_f_dupfd_works=no],
+ [# Guess that it works on glibc systems
+ case $host_os in #((
+ *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
+ *) gl_cv_func_fcntl_f_dupfd_works="guessing no";;
+ esac])])
+ case $gl_cv_func_fcntl_f_dupfd_works in
+ *yes) ;;
+ *) gl_REPLACE_FCNTL
+ AC_DEFINE([FCNTL_DUPFD_BUGGY], [1], [Define this to 1 if F_DUPFD
+ behavior does not match POSIX]) ;;
+ esac
+
+ dnl Many systems lack F_DUPFD_CLOEXEC
+ AC_CACHE_CHECK([whether fcntl understands F_DUPFD_CLOEXEC],
+ [gl_cv_func_fcntl_f_dupfd_cloexec],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <fcntl.h>
+#ifndef F_DUPFD_CLOEXEC
+choke me
+#endif
+ ]])],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifdef __linux__
+/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
+ it to support the semantics on older kernels that failed with EINVAL. */
+choke me
+#endif
+ ]])],
+ [gl_cv_func_fcntl_f_dupfd_cloexec=yes],
+ [gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"])],
+ [gl_cv_func_fcntl_f_dupfd_cloexec=no])])
+ if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
+ gl_REPLACE_FCNTL
+ dnl No witness macro needed for this bug.
+ fi
+ fi
+])
+
+AC_DEFUN([gl_REPLACE_FCNTL],
+[
+ AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([fcntl])
+ if test $ac_cv_func_fcntl = no; then
+ HAVE_FCNTL=0
+ else
+ REPLACE_FCNTL=1
+ fi
+ AC_LIBOBJ([fcntl])
+])
-# serial 6
+# serial 9
# Configure fcntl.h.
-dnl Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
AC_REQUIRE([gl_FCNTL_O_FLAGS])
gl_CHECK_NEXT_HEADERS([fcntl.h])
- FCNTL_H='fcntl.h'
- AC_SUBST([FCNTL_H])
-])
-
-# Test whether the flags O_NOATIME and O_NOFOLLOW actually work.
-# Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise.
-# Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise.
-AC_DEFUN([gl_FCNTL_O_FLAGS],
-[
- dnl Persuade glibc <fcntl.h> to define O_NOATIME and O_NOFOLLOW.
- AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
- AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h],
- [AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <sys/types.h>
- #include <sys/stat.h>
- #include <unistd.h>
- #include <fcntl.h>
- #ifndef O_NOATIME
- #define O_NOATIME 0
- #endif
- #ifndef O_NOFOLLOW
- #define O_NOFOLLOW 0
- #endif
- static int const constants[] =
- {
- O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
- O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
- };
- ]],
- [[
- int status = !constants;
- {
- static char const sym[] = "conftest.sym";
- if (symlink (".", sym) != 0
- || close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0)
- status |= 32;
- unlink (sym);
- }
- {
- static char const file[] = "confdefs.h";
- int fd = open (file, O_RDONLY | O_NOATIME);
- char c;
- struct stat st0, st1;
- if (fd < 0
- || fstat (fd, &st0) != 0
- || sleep (1) != 0
- || read (fd, &c, 1) != 1
- || close (fd) != 0
- || stat (file, &st1) != 0
- || st0.st_atime != st1.st_atime)
- status |= 64;
- }
- return status;]])],
- [gl_cv_header_working_fcntl_h=yes],
- [case $? in #(
- 32) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
- 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
- 96) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
- *) gl_cv_header_working_fcntl_h='no';;
- esac],
- [gl_cv_header_working_fcntl_h=cross-compiling])])
-
- case $gl_cv_header_working_fcntl_h in #(
- *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
- *) ac_val=1;;
- esac
- AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val],
- [Define to 1 if O_NOATIME works.])
-
- case $gl_cv_header_working_fcntl_h in #(
- *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
- *) ac_val=1;;
- esac
- AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val],
- [Define to 1 if O_NOFOLLOW works.])
])
AC_DEFUN([gl_FCNTL_MODULE_INDICATOR],
AC_DEFUN([gl_FCNTL_H_DEFAULTS],
[
+ GNULIB_FCNTL=0; AC_SUBST([GNULIB_FCNTL])
GNULIB_OPEN=0; AC_SUBST([GNULIB_OPEN])
GNULIB_OPENAT=0; AC_SUBST([GNULIB_OPENAT])
dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_FCNTL=1; AC_SUBST([HAVE_FCNTL])
HAVE_OPENAT=1; AC_SUBST([HAVE_OPENAT])
+ REPLACE_FCNTL=0; AC_SUBST([REPLACE_FCNTL])
REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN])
REPLACE_OPENAT=0; AC_SUBST([REPLACE_OPENAT])
])
# serial 2
# See if we need to provide fdopendir.
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# fflush.m4 serial 7
-# Copyright (C) 2007-2009 Free Software Foundation, Inc.
+# Copyright (C) 2007-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# file-type.m4 serial 6
-dnl Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005-2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# fileblocks.m4 serial 5
-dnl Copyright (C) 2002, 2005, 2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005-2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# filemode.m4 serial 7
-dnl Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005-2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# filenamecat.m4 serial 10
-dnl Copyright (C) 2002-2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# findprog.m4 serial 2
-dnl Copyright (C) 2003, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 2
# Check for flexible array member support.
-# Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# float_h.m4 serial 3
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# flock.m4 serial 1
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# floor.m4 serial 3
-dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# floorf.m4 serial 4
-dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# floorl.m4 serial 4
-dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Check for fnmatch - serial 4.
-# Copyright (C) 2000-2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2000-2007, 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# fopen.m4 serial 5
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 15
-# Copyright (C) 2000-2001, 2004-2009 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2004-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# fpieee.m4 serial 1
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# fprintf-posix.m4 serial 14
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
#serial 2
-dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# fpurge.m4 serial 6
-dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# freadable.m4 serial 1
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# freading.m4 serial 1
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Check whether free (NULL) is supposed to work.
-# Copyright (C) 2003, 2004, 2005, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2009, 2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# freopen.m4 serial 2
-dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# frexp.m4 serial 7
-dnl Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# frexpl.m4 serial 9
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# fseek.m4 serial 2
-dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# fseeko.m4 serial 6
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+# fseeko.m4 serial 7
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
]], [fseeko (stdin, 0, 0);])],
[gl_cv_func_fseeko=yes], [gl_cv_func_fseeko=no])
])
- if test $gl_cv_func_fseeko = no; then
- HAVE_FSEEKO=0
- gl_REPLACE_FSEEKO
- elif test $gl_cv_var_stdin_large_offset = no; then
+ if test $gl_cv_func_fseeko = no \
+ || test $gl_cv_var_stdin_large_offset = no; then
gl_REPLACE_FSEEKO
fi
])
dnl If so, define HAVE_STRUCT_STATFS_F_FSTYPENAME.
dnl
-# Copyright (C) 1998, 1999, 2001, 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1998-1999, 2001, 2004, 2006, 2009-2010 Free Software
+# Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 25
# Obtaining file system usage information.
-# Copyright (C) 1997-1998, 2000-2001, 2003-2009 Free Software Foundation, Inc.
+# Copyright (C) 1997-1998, 2000-2001, 2003-2010 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# fsync.m4 serial 1
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# ftell.m4 serial 1
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# ftello.m4 serial 4
-dnl Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+# ftello.m4 serial 5
+dnl Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_TRY_LINK([#include <stdio.h>], [ftello (stdin);],
[gl_cv_func_ftello=yes], [gl_cv_func_ftello=no])
])
- if test $gl_cv_func_ftello = no; then
- HAVE_FTELLO=0
- gl_REPLACE_FTELLO
- elif test $gl_cv_var_stdin_large_offset = no; then
+ if test $gl_cv_func_ftello = no \
+ || test $gl_cv_var_stdin_large_offset = no; then
gl_REPLACE_FTELLO
fi
])
# See if we need to emulate a missing ftruncate function using fcntl or chsize.
-# Copyright (C) 2000, 2001, 2003-2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-#serial 16
-dnl Copyright (C) 2005-2008 Free Software Foundation, Inc.
+#serial 17
+dnl Copyright (C) 2005-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_LIBOBJ([fts])
dnl Prerequisites of lib/fts.c.
+ AC_REQUIRE([AC_C_INLINE])
gl_FUNC_OPENAT
AC_CHECK_FUNCS_ONCE([fstatfs])
# func.m4 serial 2
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# serial 1
+# serial 3
# See if we need to provide futimens replacement.
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
[AC_RUN_IFELSE([AC_LANG_PROGRAM([[
#include <fcntl.h>
#include <sys/stat.h>
+#include <unistd.h>
+]], [[struct timespec ts[2] = { { 1, UTIME_OMIT }, { 1, UTIME_NOW } };
+ int fd = creat ("conftest.file", 0600);
+ struct stat st;
+ if (fd < 0) return 1;
+ if (futimens (AT_FDCWD, NULL)) return 2;
+ if (futimens (fd, ts)) return 3;
+ sleep (1);
+ ts[0].tv_nsec = UTIME_NOW;
+ ts[1].tv_nsec = UTIME_OMIT;
+ if (futimens (fd, ts)) return 4;
+ if (fstat (fd, &st)) return 5;
+ if (st.st_ctime < st.st_atime) return 6;
+ ]])],
+dnl FIXME: simplify this in 2012, when file system bugs are no longer common
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#ifdef __linux__
-/* The Linux kernel added futimens in 2.6.22, but it had bugs until 2.6.26.
- Always replace futimens to support older kernels. */
+/* The Linux kernel added futimens in 2.6.22, but has bugs with UTIME_OMIT
+ in several file systems as recently as 2.6.32. Always replace futimens
+ to support older kernels. */
choke me
#endif
-]], [[struct timespec ts[2] = { { 1, UTIME_OMIT }, { 1, UTIME_OMIT } };
- if (futimens (AT_FDCWD, NULL)) return 1;
- return futimens (open (".", O_RDONLY), ts);]])],
- [gl_cv_func_futimens_works=yes],
- [gl_cv_func_futimens_works="needs runtime check"],
- [gl_cv_func_futimens_works="guessing no"])])
+ ]])],
+ [gl_cv_func_futimens_works=yes],
+ [gl_cv_func_futimens_works="needs runtime check"])],
+ [gl_cv_func_futimens_works=no],
+ [gl_cv_func_futimens_works="guessing no"])
+ rm -f conftest.file])
if test "$gl_cv_func_futimens_works" != yes; then
REPLACE_FUTIMENS=1
AC_LIBOBJ([futimens])
# fwritable.m4 serial 1
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# fwriting.m4 serial 1
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# gc-arcfour.m4 serial 2
-dnl Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# gc-arctwo.m4 serial 2
-dnl Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# gc-camellia.m4 serial 3
-dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# gc-des.m4 serial 2
-dnl Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# gc-hmac-md5.m4 serial 2
-dnl Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# gc-hmac-sha1.m4 serial 2
-dnl Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# gc-md2.m4 serial 2
-dnl Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# gc-md4.m4 serial 2
-dnl Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# gc-md5.m4 serial 2
-dnl Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# gc-pbkdf2-sha1.m4 serial 2
-dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# gc-random.m4 serial 4
-dnl Copyright (C) 2005-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# gc-rijndael.m4 serial 2
-dnl Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# gc-sha1.m4 serial 2
-dnl Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# gc.m4 serial 5
-dnl Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# getaddrinfo.m4 serial 22
-dnl Copyright (C) 2004-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# name is unusually large. Any length between 4k and 16k trigger the bug
# when using glibc-2.4.90-9 or older.
-# Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# I've heard that this is due to a Linux kernel bug, and that it has
# been fixed between 2.4.21-pre3 and 2.4.21-pre4. */
-# Copyright (C) 2003-2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2003-2007, 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# getcwd.m4 - check for working getcwd that is compatible with glibc
-# Copyright (C) 2001, 2003, 2004, 2005, 2006, 2007, 2009 Free Software
+# Copyright (C) 2001, 2003, 2004, 2005, 2006, 2007, 2009, 2010 Free Software
# Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# getdate.m4 serial 16
-dnl Copyright (C) 2002-2006, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# getdelim.m4 serial 5
-dnl Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
dnl
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
# getdomainname.m4 serial 4
-dnl Copyright (C) 2002-2003, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# getdtablesize.m4 serial 1
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl From Jim Meyering.
dnl A wrapper around AC_FUNC_GETGROUPS.
-# Copyright (C) 1996-1997, 1999-2004, 2008-2009 Free Software Foundation, Inc.
+# Copyright (C) 1996-1997, 1999-2004, 2008-2010 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# gethostname.m4 serial 9
-dnl Copyright (C) 2002, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# gethrxtime.m4 serial 9
-dnl Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# getline.m4 serial 20
-dnl Copyright (C) 1998-2003, 2005-2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 1998-2003, 2005-2007, 2009-2010 Free Software Foundation,
+dnl Inc.
dnl
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
# Check for getloadavg.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2002, 2003,
-# 2006, 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1992-1996, 1999-2000, 2002-2003, 2006, 2008-2010 Free Software
+# Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
#serial 4
-# Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# getndelim2.m4 serial 7
-dnl Copyright (C) 2003, 2006, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# getnline.m4 serial 3
-dnl Copyright (C) 2003 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# getopt.m4 serial 24
-dnl Copyright (C) 2002-2006, 2008-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl strings starts with '+' and it's not the first call. Some internal state
dnl is left over from earlier calls, and neither setting optind = 0 nor
dnl setting optreset = 1 get rid of this internal state.
+ dnl POSIX is silent on optind vs. optreset, so we allow either behavior.
if test -z "$gl_replace_getopt"; then
AC_CACHE_CHECK([whether getopt is POSIX compatible],
[gl_cv_func_getopt_posix],
[# Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
# optstring is necessary for programs like m4 that have POSIX-mandated
# semantics for supporting options interspersed with files.
+ # Also, since getopt_long is a GNU extension, we require optind=0.
gl_had_POSIXLY_CORRECT=${POSIXLY_CORRECT:+yes}
POSIXLY_CORRECT=1
export POSIXLY_CORRECT
[AC_LANG_PROGRAM([[#include <getopt.h>
#include <stddef.h>
#include <string.h>
-#if !HAVE_DECL_OPTRESET
-# define OPTIND_MIN 0
-#else
-# define OPTIND_MIN (optreset = 1)
-#endif
]], [[
/* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
/* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
{
char *argv[] = { "program", "foo", "-p", NULL };
- optind = OPTIND_MIN;
+ optind = 0;
if (getopt (3, argv, "-p") != 1)
return 6;
if (getopt (3, argv, "-p") != 'p')
# getpagesize.m4 serial 7
-dnl Copyright (C) 2002, 2004-2005, 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2010 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.
# getpass.m4 serial 11
-dnl Copyright (C) 2002-2003, 2005-2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2010 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.
# getsubopt.m4 serial 4
-dnl Copyright (C) 2004, 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# gettext.m4 serial 62 (gettext-0.18)
-dnl Copyright (C) 1995-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# gettime.m4 serial 7
-dnl Copyright (C) 2002, 2004, 2005, 2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004-2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 12
-# Copyright (C) 2001-2003, 2005, 2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2001-2003, 2005, 2007, 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# getugroups.m4 serial 8
-dnl Copyright (C) 2002, 2003, 2005, 2006, 2009 Free Software
-dnl Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2010 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.
# getusershell.m4 serial 5
-dnl Copyright (C) 2002, 2003, 2006, 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2006, 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# gl_list.m4 serial 2
-dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# glibc2.m4 serial 2
-dnl Copyright (C) 2000-2002, 2004, 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2004, 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# glibc21.m4 serial 4
-dnl Copyright (C) 2000-2002, 2004, 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2004, 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# glob.m4 serial 10
-dnl Copyright (C) 2005-2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Determine whether recent-enough GNU Make is being used.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# gnulib-common.m4 serial 11
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# define __GNUC_STDC_INLINE__ 1
#endif])
AH_VERBATIM([unused_parameter],
-[/* Define as a marker that can be attached to function parameter declarations
- for parameters that are not used. This helps to reduce warnings, such as
- from GCC -Wunused-parameter. */
+[/* Define as a marker that can be attached to declarations that might not
+ be used. This helps to reduce warnings, such as from
+ GCC -Wunused-parameter. */
#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-# define _UNUSED_PARAMETER_ __attribute__ ((__unused__))
+# define _GL_UNUSED __attribute__ ((__unused__))
#else
-# define _UNUSED_PARAMETER_
+# define _GL_UNUSED
#endif
+/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
+ is a misnomer outside of parameter lists. */
+#define _UNUSED_PARAMETER_ _GL_UNUSED
])
])
# gnulib-tool.m4 serial 2
-dnl Copyright (C) 2004-2005 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2005, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 12
-# Copyright (C) 1999-2001, 2003-2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1999-2001, 2003-2007, 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# hard-locale.m4 serial 7
-dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2010 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.
# hash.m4 serial 6
-dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2010 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.
# hmac-md5.m4 serial 2
-dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# hmac-sha1.m4 serial 2
-dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 7
-# Copyright (C) 2001, 2003, 2004, 2006, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003-2004, 2006, 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# hostent.m4 serial 1
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
#serial 10
-dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2010 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.
# serial 1
-dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# iconv.m4 serial AM8 (gettext-0.18)
-dnl Copyright (C) 2000-2002, 2007-2009 Free Software Foundation, Inc.
+# iconv.m4 serial 9 (gettext-0.18)
+dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
])
if test "$am_cv_func_iconv" = yes; then
AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
- dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
+ dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
am_save_LIBS="$LIBS"
if test $am_cv_lib_iconv = yes; then
LIBS="$LIBS $LIBICONV"
return 1;
}
}
+ /* Test against Solaris 10 bug: Failures are not distinguishable from
+ successful returns. */
+ {
+ iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
+ if (cd_ascii_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\263";
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_ascii_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
#if 0 /* This bug could be worked around by the caller. */
/* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
{
# iconv_h.m4 serial 5
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# iconv_open.m4 serial 6
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# idcache.m4 serial 6
-dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2010 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.
# idpriv.m4 serial 1
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# imaxabs.m4 serial 1
-dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# imaxdiv.m4 serial 1
-dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# include_next.m4 serial 14
-dnl Copyright (C) 2006-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# inet_ntop.m4 serial 11
-dnl Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# inet_pton.m4 serial 9
-dnl Copyright (C) 2006, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# inline.m4 serial 4
-dnl Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# intdiv0.m4 serial 3 (gettext-0.18)
-dnl Copyright (C) 2002, 2007-2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# intl.m4 serial 8 (gettext-0.17)
-dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-2007, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# intldir.m4 serial 2 (gettext-0.18)
-dnl Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# intlmacosx.m4 serial 3 (gettext-0.18)
-dnl Copyright (C) 2004-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# intmax.m4 serial 5 (gettext-0.18)
-dnl Copyright (C) 2002-2005, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2005, 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# intmax_t.m4 serial 7
-dnl Copyright (C) 1997-2004, 2006-2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006-2007, 2009-2010 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.
#serial 7
-dnl Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# inttypes-pri.m4 serial 6 (gettext-0.18)
-dnl Copyright (C) 1997-2002, 2006, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2002, 2006, 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# inttypes.m4 serial 14
-dnl Copyright (C) 2006-2009 Free Software Foundation, Inc.
+# inttypes.m4 serial 15
+dnl Copyright (C) 2006-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
fi])
dnl Override <inttypes.h> always, so that the portability warnings work.
- if false && test $gl_cv_header_working_inttypes_h = yes; then
- dnl Use the existing <inttypes.h>.
- INTTYPES_H=''
- else
-
- AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
- gl_CHECK_NEXT_HEADERS([inttypes.h])
+ AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
+ gl_CHECK_NEXT_HEADERS([inttypes.h])
- AC_REQUIRE([gl_MULTIARCH])
+ AC_REQUIRE([gl_MULTIARCH])
- dnl Ensure that <stdint.h> defines the limit macros, since gnulib's
- dnl <inttypes.h> relies on them. This macro is only needed when a
- dnl C++ compiler is in use; it has no effect for a C compiler.
- dnl Also be careful to define __STDC_LIMIT_MACROS only when gnulib's
- dnl <inttypes.h> is going to be created, and to avoid redefinition warnings
- dnl if the __STDC_LIMIT_MACROS is already defined through the CPPFLAGS.
- AC_DEFINE([GL_TRIGGER_STDC_LIMIT_MACROS], [1],
- [Define to make the limit macros in <stdint.h> visible.])
- AH_VERBATIM([__STDC_LIMIT_MACROS_ZZZ],
+ dnl Ensure that <stdint.h> defines the limit macros, since gnulib's
+ dnl <inttypes.h> relies on them. This macro is only needed when a
+ dnl C++ compiler is in use; it has no effect for a C compiler.
+ dnl Also be careful to define __STDC_LIMIT_MACROS only when gnulib's
+ dnl <inttypes.h> is going to be created, and to avoid redefinition warnings
+ dnl if the __STDC_LIMIT_MACROS is already defined through the CPPFLAGS.
+ AC_DEFINE([GL_TRIGGER_STDC_LIMIT_MACROS], [1],
+ [Define to make the limit macros in <stdint.h> visible.])
+ AH_VERBATIM([__STDC_LIMIT_MACROS_ZZZ],
[/* Ensure that <stdint.h> defines the limit macros, since gnulib's
<inttypes.h> relies on them. */
#if defined __cplusplus && !defined __STDC_LIMIT_MACROS && GL_TRIGGER_STDC_LIMIT_MACROS
#endif
])
- PRIPTR_PREFIX=
- if test -n "$STDINT_H"; then
- dnl Using the gnulib <stdint.h>. It always defines intptr_t to 'long'.
- PRIPTR_PREFIX='"l"'
- else
- dnl Using the system's <stdint.h>.
- for glpfx in '' l ll I64; do
- case $glpfx in
- '') gltype1='int';;
- l) gltype1='long int';;
- ll) gltype1='long long int';;
- I64) gltype1='__int64';;
- esac
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[#include <stdint.h>
- extern intptr_t foo;
- extern $gltype1 foo;]])],
- [PRIPTR_PREFIX='"'$glpfx'"'])
- test -n "$PRIPTR_PREFIX" && break
- done
- fi
- AC_SUBST([PRIPTR_PREFIX])
+ PRIPTR_PREFIX=
+ if test -n "$STDINT_H"; then
+ dnl Using the gnulib <stdint.h>. It always defines intptr_t to 'long'.
+ PRIPTR_PREFIX='"l"'
+ else
+ dnl Using the system's <stdint.h>.
+ for glpfx in '' l ll I64; do
+ case $glpfx in
+ '') gltype1='int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ I64) gltype1='__int64';;
+ esac
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <stdint.h>
+ extern intptr_t foo;
+ extern $gltype1 foo;]])],
+ [PRIPTR_PREFIX='"'$glpfx'"'])
+ test -n "$PRIPTR_PREFIX" && break
+ done
+ fi
+ AC_SUBST([PRIPTR_PREFIX])
- if test "$ac_cv_have_decl_imaxabs" = yes; then
- HAVE_DECL_IMAXABS=1
- else
- HAVE_DECL_IMAXABS=0
- fi
+ if test "$ac_cv_have_decl_imaxabs" = yes; then
+ HAVE_DECL_IMAXABS=1
+ else
+ HAVE_DECL_IMAXABS=0
+ fi
- if test "$ac_cv_have_decl_imaxdiv" = yes; then
- HAVE_DECL_IMAXDIV=1
- else
- HAVE_DECL_IMAXDIV=0
- fi
+ if test "$ac_cv_have_decl_imaxdiv" = yes; then
+ HAVE_DECL_IMAXDIV=1
+ else
+ HAVE_DECL_IMAXDIV=0
+ fi
- if test "$ac_cv_have_decl_strtoimax" = yes; then
- HAVE_DECL_STRTOIMAX=1
- else
- HAVE_DECL_STRTOIMAX=0
- fi
+ if test "$ac_cv_have_decl_strtoimax" = yes; then
+ HAVE_DECL_STRTOIMAX=1
+ else
+ HAVE_DECL_STRTOIMAX=0
+ fi
- if test "$ac_cv_have_decl_strtoumax" = yes; then
- HAVE_DECL_STRTOUMAX=1
- else
- HAVE_DECL_STRTOUMAX=0
- fi
+ if test "$ac_cv_have_decl_strtoumax" = yes; then
+ HAVE_DECL_STRTOUMAX=1
+ else
+ HAVE_DECL_STRTOUMAX=0
+ fi
+ gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+ [INT32_MAX_LT_INTMAX_MAX],
+ [defined INT32_MAX && defined INTMAX_MAX],
+ [INT32_MAX < INTMAX_MAX],
+ [sizeof (int) < sizeof (long long int)])
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
- [INT32_MAX_LT_INTMAX_MAX],
- [defined INT32_MAX && defined INTMAX_MAX],
- [INT32_MAX < INTMAX_MAX],
- [sizeof (int) < sizeof (long long int)])
- if test $APPLE_UNIVERSAL_BUILD = 0; then
- gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
- [INT64_MAX_EQ_LONG_MAX],
- [defined INT64_MAX],
- [INT64_MAX == LONG_MAX],
- [sizeof (long long int) == sizeof (long int)])
- else
- INT64_MAX_EQ_LONG_MAX=-1
- fi
+ [INT64_MAX_EQ_LONG_MAX],
+ [defined INT64_MAX],
+ [INT64_MAX == LONG_MAX],
+ [sizeof (long long int) == sizeof (long int)])
+ else
+ INT64_MAX_EQ_LONG_MAX=-1
+ fi
+ gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+ [UINT32_MAX_LT_UINTMAX_MAX],
+ [defined UINT32_MAX && defined UINTMAX_MAX],
+ [UINT32_MAX < UINTMAX_MAX],
+ [sizeof (unsigned int) < sizeof (unsigned long long int)])
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
- [UINT32_MAX_LT_UINTMAX_MAX],
- [defined UINT32_MAX && defined UINTMAX_MAX],
- [UINT32_MAX < UINTMAX_MAX],
- [sizeof (unsigned int) < sizeof (unsigned long long int)])
- if test $APPLE_UNIVERSAL_BUILD = 0; then
- gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
- [UINT64_MAX_EQ_ULONG_MAX],
- [defined UINT64_MAX],
- [UINT64_MAX == ULONG_MAX],
- [sizeof (unsigned long long int) == sizeof (unsigned long int)])
- else
- UINT64_MAX_EQ_ULONG_MAX=-1
- fi
-
- INTTYPES_H='inttypes.h'
+ [UINT64_MAX_EQ_ULONG_MAX],
+ [defined UINT64_MAX],
+ [UINT64_MAX == ULONG_MAX],
+ [sizeof (unsigned long long int) == sizeof (unsigned long int)])
+ else
+ UINT64_MAX_EQ_ULONG_MAX=-1
fi
- AC_SUBST([INTTYPES_H])
])
# Define the symbol $1 to be 1 if the condition is true, 0 otherwise.
# inttypes_h.m4 serial 9
-dnl Copyright (C) 1997-2004, 2006, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006, 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Test whether a file descriptor is a pipe.
-dnl Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
-# isblank.m4 serial 1
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+# isblank.m4 serial 2
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_CHECK_FUNCS_ONCE([isblank])
if test $ac_cv_func_isblank = no; then
HAVE_ISBLANK=0
- CTYPE_H='ctype.h'
AC_LIBOBJ([isblank])
fi
])
+++ /dev/null
-# isdir.m4 serial 2
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_ISDIR],
-[
- dnl Prerequisites of lib/isdir.c.
- AC_REQUIRE([AC_HEADER_STAT])
-])
# isfinite.m4 serial 6
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# isinf.m4 serial 2
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# isnan.m4 serial 2
-dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# isnand.m4 serial 6
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# isnanf.m4 serial 10
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# isnanl.m4 serial 12
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# javacomp.m4 serial 11
-dnl Copyright (C) 2001-2003, 2006-2007, 2009 Free Software Foundation, Inc.
+# javacomp.m4 serial 12
+dnl Copyright (C) 2001-2003, 2006-2007, 2009-2010 Free Software Foundation,
+dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl and the long tr command in opposite direction.
dnl Finally move the position corresponding to \055 to the last position,
dnl to work around a coreutils-5.x bug.
- echo 'xyvw!$!H!C,!)!2+!3!4*!5,!3!6,!7!8)!9)!:"!(LdhdmM"!$EFV"!%Ni_a"!1PdhaQngYakUXYfa"!%gXdh"!8EWPeXoXJfXhcJTmkdhcKFV"!,TinkZaOdfa"!2ZihbmalmoakIeXoX.!*!+)!;.!<!="!<eXoXIljaZdbdZXmdihIoakldih.!>!?)!@.!A!B"!-Zihbmalmoak"!2eXoXJfXhcJRYeaZm"!2eXoXJfXhcJTplmag"!$inm"!7PeXoXJdiJSkdhmTmkaXgK"!-camSkijakmp"!DEPeXoXJfXhcJTmkdhcKFPeXoXJfXhcJTmkdhcK"!5eXoXJdiJSkdhmTmkaXg"!)jkdhmfh"!7EPeXoXJfXhcJTmkdhcKFV!C!(!)!!!!!#!"!*!+!"!,!!!?!"!"!!!&Gt!"q!!!"!-!!!(!"!!!"!+!.!/!"!,!!!E!#!"!!!.r!#4$u!%s!&q!!!"!-!!!,!#!!!$!-!%!"!0!!!#!1' \
+ echo 'yzwx!$!I!D,!)!3+!4!5*!6,!4!7,!8!9)!:)!;"!(MeienN"!$FGW"!%Ojab"!2QeibRohZblVYZgb"!%hYei"!9FXQfYpYKgYidKUnleidLGW"!,Ujol_bPegb"!3_jicnbmnpblJfYpY/!*!+)!</!=!>"!=fYpYJmkb_ece_YnejiJpblmeji/!?!@)!A/!B!C"!._jicnbmnpbl"!3fYpYKgYidKSZfb_n"!3fYpYKgYidKUqmnbh"!$jon"!8QfYpYKejKTleinUnlbYhL"!.dbnTljkblnq"!EFQfYpYKgYidKUnleidLGQfYpYKgYidKUnleidL"!6fYpYKejKTleinUnlbYh"!)kleingi"!8FQfYpYKgYidKUnleidLGW!D!(!)!!!!!#!"!*!+!"!,!!!@!"!"!!!&Hu!"r!!!"!.!!!(!"!!!"!+!/!0!"!,!!!F!#!"!!!/s!#5$v!%t!&r!!!"!.!!!,!#!!!$!.!%!"!1!!!#!2' \
| tr -d '\012\015' \
- | tr '!"#$%&()*+,-./0123456789:;<=>?@ABCDEFGIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyzH' '\000\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\040\041\046\050\051\052\056\057\073\074\076\103\106\114\116\117\120\123\124\126\133\141\142\143\144\145\146\147\151\152\154\155\156\157\160\162\163\164\165\166\171\261\262\266\267\270\272\276\312\376\055' \
+ | tr '!"#$%&()*+,./0123456789:;<=>?@ABCDEFGHJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyzI' '\000\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\040\041\046\050\051\052\056\057\073\074\076\103\106\114\116\117\120\123\124\126\133\141\142\143\144\145\146\147\151\152\154\155\156\157\160\162\163\164\165\166\171\261\262\266\267\270\272\276\312\376\055' \
> conftestver.class
target_version=`{
unset JAVA_HOME
# javaexec.m4 serial 5
-dnl Copyright (C) 2001-2003, 2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2003, 2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 11
-# Copyright (C) 1996, 1999, 2001-2002, 2004, 2006, 2009
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1999, 2001-2002, 2004, 2006, 2009-2010 Free Software
+# Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 7
-# Copyright (C) 1996, 1999, 2001, 2004, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1999, 2001, 2004, 2009-2010 Free Software Foundation,
+# Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
--- /dev/null
+# langinfo_h.m4 serial 2
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_LANGINFO_H],
+[
+ AC_REQUIRE([gl_LANGINFO_H_DEFAULTS])
+
+ dnl Persuade glibc-2.0.6 <langinfo.h> to define CODESET.
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ gl_CHECK_NEXT_HEADERS([langinfo.h])
+
+ dnl Determine whether <langinfo.h> exists. It is missing on mingw and BeOS.
+ HAVE_LANGINFO_CODESET=0
+ HAVE_LANGINFO_ERA=0
+ AC_CHECK_HEADERS_ONCE([langinfo.h])
+ if test $ac_cv_header_langinfo_h = yes; then
+ HAVE_LANGINFO_H=1
+ dnl Determine what <langinfo.h> defines. CODESET and ERA etc. are missing
+ dnl on OpenBSD 3.8.
+ AC_CACHE_CHECK([whether langinfo.h defines CODESET],
+ [gl_cv_header_langinfo_codeset],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <langinfo.h>
+int a = CODESET;
+]])],
+ [gl_cv_header_langinfo_codeset=yes],
+ [gl_cv_header_langinfo_codeset=no])
+ ])
+ if test $gl_cv_header_langinfo_codeset = yes; then
+ HAVE_LANGINFO_CODESET=1
+ fi
+ AC_CACHE_CHECK([whether langinfo.h defines ERA],
+ [gl_cv_header_langinfo_era],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <langinfo.h>
+int a = ERA;
+]])],
+ [gl_cv_header_langinfo_era=yes],
+ [gl_cv_header_langinfo_era=no])
+ ])
+ if test $gl_cv_header_langinfo_era = yes; then
+ HAVE_LANGINFO_ERA=1
+ fi
+ else
+ HAVE_LANGINFO_H=0
+ fi
+ AC_SUBST([HAVE_LANGINFO_H])
+ AC_SUBST([HAVE_LANGINFO_CODESET])
+ AC_SUBST([HAVE_LANGINFO_ERA])
+])
+
+AC_DEFUN([gl_LANGINFO_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_LANGINFO_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_LANGINFO_H_DEFAULTS],
+[
+ GNULIB_NL_LANGINFO=0; AC_SUBST([GNULIB_NL_LANGINFO])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_NL_LANGINFO=1; AC_SUBST([HAVE_NL_LANGINFO])
+ REPLACE_NL_LANGINFO=0; AC_SUBST([REPLACE_NL_LANGINFO])
+])
#serial 3
-dnl Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2006, 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 15
# Determine whether we need the lchown wrapper.
-dnl Copyright (C) 1998, 2001, 2003-2007, 2009 Free Software
-dnl Foundation, Inc.
+dnl Copyright (C) 1998, 2001, 2003-2007, 2009-2010 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,
# lcmessage.m4 serial 6 (gettext-0.18)
-dnl Copyright (C) 1995-2002, 2004-2005, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-2002, 2004-2005, 2008-2010 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.
# ld-output-def.m4 serial 2
-dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# ld-version-script.m4 serial 1
-dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# ldd.m4 serial 1
-dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# ldexpl.m4 serial 4
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# If possible, ignore libraries that are not depended on.
-dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# lib-ld.m4 serial 4 (gettext-0.18)
-dnl Copyright (C) 1996-2003, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# lib-link.m4 serial 20 (gettext-0.18)
-dnl Copyright (C) 2001-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# lib-prefix.m4 serial 7 (gettext-0.18)
-dnl Copyright (C) 2001-2005, 2008-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# libsigsegv.m4 serial 4
-dnl Copyright (C) 2002-2003, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# libunistring.m4 serial 1
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl Run a program to determine whether link(2) follows symlinks.
dnl Set LINK_FOLLOWS_SYMLINKS accordingly.
-# Copyright (C) 1999-2001, 2004-2006, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1999-2001, 2004-2006, 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# link.m4 serial 4
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 2
# See if we need to provide linkat replacement.
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# localcharset.m4 serial 7
-dnl Copyright (C) 2002, 2004, 2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004, 2006, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# locale-fr.m4 serial 11
-dnl Copyright (C) 2003, 2005-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# locale-ja.m4 serial 7
-dnl Copyright (C) 2003, 2005-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# locale-tr.m4 serial 6
-dnl Copyright (C) 2003, 2005-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# locale-zh.m4 serial 6
-dnl Copyright (C) 2003, 2005-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# locale_h.m4 serial 5
-dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+# locale_h.m4 serial 6
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
fi
AC_SUBST([HAVE_XLOCALE_H])
- dnl Execute this unconditionally, because LOCALE_H may be set by other
- dnl modules, after this code is executed.
+ dnl <locale.h> is always overridden, because of GNULIB_POSIXCHECK.
gl_CHECK_NEXT_HEADERS([locale.h])
if test -n "$STDDEF_H" \
dnl Unconditionally enables the replacement of <locale.h>.
AC_DEFUN([gl_REPLACE_LOCALE_H],
[
- AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
- LOCALE_H=locale.h
+ dnl This is a no-op, because <locale.h> is always overridden.
+ :
])
AC_DEFUN([gl_LOCALE_MODULE_INDICATOR],
GNULIB_DUPLOCALE=0; AC_SUBST([GNULIB_DUPLOCALE])
dnl Assume proper GNU behavior unless another module says otherwise.
REPLACE_DUPLOCALE=0; AC_SUBST([REPLACE_DUPLOCALE])
- LOCALE_H=''; AC_SUBST([LOCALE_H])
])
-# localename.m4 serial 1
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+# localename.m4 serial 2
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
[
AC_REQUIRE([gt_LC_MESSAGES])
AC_REQUIRE([gt_INTL_MACOSX])
- AC_CHECK_FUNCS([setlocale])
+ AC_CHECK_FUNCS([setlocale uselocale])
])
# lock.m4 serial 10 (gettext-0.18)
-dnl Copyright (C) 2005-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# long-options.m4 serial 5
-dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2010 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.
# longlong.m4 serial 14
-dnl Copyright (C) 1999-2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 1999-2007, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 28
# How to list mounted file systems.
-# Copyright (C) 1998-2004, 2006, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1998-2004, 2006, 2009-2010 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# lseek.m4 serial 4
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 20
-# Copyright (C) 1997-2001, 2003-2009 Free Software Foundation, Inc.
+# Copyright (C) 1997-2001, 2003-2010 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# malloc.m4 serial 9
-dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# malloca.m4 serial 1
-dnl Copyright (C) 2003-2004, 2006-2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2010 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.
# manywarnings.m4 serial 1
-dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# math_h.m4 serial 14
-dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# mathl.m4 serial 5
-dnl Copyright (c) 2003, 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (c) 2003, 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# mbchar.m4 serial 7
-dnl Copyright (C) 2005-2007 Free Software Foundation, Inc.
+# mbchar.m4 serial 8
+dnl Copyright (C) 2005-2007, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_MBCHAR],
[
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+ AC_REQUIRE([AC_C_INLINE])
])
-# mbfile.m4 serial 4
-dnl Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+# mbfile.m4 serial 5
+dnl Copyright (C) 2005, 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_MBFILE],
[
+ AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([AC_TYPE_MBSTATE_T])
dnl The following line is that so the user can test HAVE_MBRTOWC before
dnl #include "mbfile.h". It can be removed in 2010.
-# mbiter.m4 serial 4
-dnl Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+# mbiter.m4 serial 5
+dnl Copyright (C) 2005, 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_MBITER],
[
+ AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([AC_TYPE_MBSTATE_T])
dnl The following line is that so the user can test HAVE_MBRTOWC before
dnl #include "mbiter.h" or "mbuiter.h". It can be removed in 2010.
# mbrlen.m4 serial 2
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# mbrtowc.m4 serial 16
-dnl Copyright (C) 2001-2002, 2004-2005, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2002, 2004-2005, 2008-2010 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.
# mbsinit.m4 serial 3
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# mbsnrtowcs.m4 serial 1
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# mbsrtowcs.m4 serial 5
-dnl Copyright (C) 2008-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# mbstate_t.m4 serial 12
-dnl Copyright (C) 2000-2002, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# mbswidth.m4 serial 17
-dnl Copyright (C) 2000-2002, 2004, 2006-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2004, 2006-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# md2.m4 serial 2
-dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2010 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.
# md4.m4 serial 4
-dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010 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.
# md5.m4 serial 11
-dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010 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.
#serial 5
-dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# memchr.m4 serial 7
-dnl Copyright (C) 2002, 2003, 2004, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# memcmp.m4 serial 14
-dnl Copyright (C) 2002-2004, 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# memcoll.m4 serial 7
-dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2010 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.
# memcpy.m4 serial 3
-dnl Copyright (C) 2002, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# memmem.m4 serial 14
-dnl Copyright (C) 2002, 2003, 2004, 2007, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2003, 2004, 2007, 2008, 2009, 2010 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.
# memmove.m4 serial 3
-dnl Copyright (C) 2002, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# mempcpy.m4 serial 10
-dnl Copyright (C) 2003-2004, 2006-2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2010 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.
# memrchr.m4 serial 9
-dnl Copyright (C) 2002, 2003, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2010 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.
# memset.m4 serial 3
-dnl Copyright (C) 2002, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# memxor.m4 serial 3
-dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
#serial 4
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# minmax.m4 serial 3
-dnl Copyright (C) 2005, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Make a file's ancestor directories.
-dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# mkdir-p.m4 serial 13
-dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 9
-# Copyright (C) 2001, 2003-2004, 2006, 2008-2009 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003-2004, 2006, 2008-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# mkdtemp.m4 serial 6
-dnl Copyright (C) 2001-2003, 2006-2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2003, 2006-2007, 2009-2010 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.
# serial 1
# See if we need to provide mkfifo replacement.
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 2
# See if we need to provide mkfifoat/mknodat replacement.
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 1
# See if we need to provide mknod replacement.
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# mkostemp.m4 serial 1
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# mkostemps.m4 serial 1
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
#serial 17
-# Copyright (C) 2001, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003-2007, 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# mkstemps.m4 serial 1
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 15
-dnl Copyright (C) 2002-2003, 2005-2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2010 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.
# mmap-anon.m4 serial 8
-dnl Copyright (C) 2005, 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# mode_t.m4 serial 2
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# modechange.m4 serial 6
-dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2010 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.
# serial 10
-dnl Copyright (C) 2002-2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Sort a vector of pointers to data.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# multiarch.m4 serial 5
-dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl If not found, use the supplied replacement.
dnl
-# Copyright (C) 1999-2001, 2003-2009 Free Software Foundation, Inc.
+# Copyright (C) 1999-2001, 2003-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# netdb_h.m4 serial 5
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# netinet_in_h.m4 serial 4
-dnl Copyright (C) 2006-2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
--- /dev/null
+# nl_langinfo.m4 serial 1
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_NL_LANGINFO],
+[
+ AC_REQUIRE([gl_LANGINFO_H_DEFAULTS])
+ AC_REQUIRE([gl_LANGINFO_H])
+ if test $HAVE_LANGINFO_H = 1; then
+ AC_CHECK_FUNCS_ONCE([nl_langinfo])
+ else
+ ac_cv_func_nl_langinfo=no
+ fi
+ if test $ac_cv_func_nl_langinfo = yes; then
+ if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1; then
+ :
+ else
+ REPLACE_NL_LANGINFO=1
+ AC_DEFINE([REPLACE_NL_LANGINFO], [1],
+ [Define if nl_langinfo exists but is overridden by gnulib.])
+ AC_LIBOBJ([nl_langinfo])
+ fi
+ else
+ HAVE_NL_LANGINFO=0
+ AC_LIBOBJ([nl_langinfo])
+ fi
+])
# nls.m4 serial 5 (gettext-0.18)
-dnl Copyright (C) 1995-2003, 2005-2006, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 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.
# no-c++.m4 serial 1
-dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# nocrash.m4 serial 2
-dnl Copyright (C) 2005, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# nproc.m4 serial 4
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# obstack-printf-posix.m4 serial 3
-dnl Copyright (C) 2008-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# obstack-printf.m4 serial 2
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# onceonly.m4 serial 6
-dnl Copyright (C) 2002-2003, 2005-2006, 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2006, 2008-2010 Free Software Foundation,
+dnl Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
# open.m4 serial 8
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# serial 26
+# serial 27
# See if we need to use our replacement for Solaris' openat et al functions.
-dnl Copyright (C) 2004-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_PREREQ_OPENAT],
[
+ AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T])
:
])
# openmp.m4 serial 7
-dnl Copyright (C) 2006-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
#serial 5
-dnl Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# pathmax.m4 serial 8
-dnl Copyright (C) 2002, 2003, 2005, 2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2010 Free Software Foundation,
+dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl From Jim Meyering.
dnl Find a new-enough version of Perl.
-# Copyright (C) 1998-2001, 2003-2004, 2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1998-2001, 2003-2004, 2007, 2009-2010 Free Software Foundation,
+# Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# perror.m4 serial 1
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# physmem.m4 serial 10
-dnl Copyright (C) 2002-2003, 2005-2006, 2008-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2006, 2008-2010 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.
# pipe.m4 serial 4
-dnl Copyright (C) 2004, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# pipe2.m4 serial 2
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# po.m4 serial 17 (gettext-0.18)
-dnl Copyright (C) 1995-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
cat >> "$ac_file.tmp" <<EOF
$frobbedlang.msg: $lang.po
- @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
- \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+ @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
+ \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
EOF
done
fi
frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
cat >> "$ac_file.tmp" <<EOF
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
- @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
- \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+ @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
+ \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
EOF
done
fi
# poll.m4 serial 9
-dnl Copyright (c) 2003, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (c) 2003, 2005, 2006, 2007, 2009, 2010 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.
-# popen.m4 serial 1
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+# popen.m4 serial 2
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Prerequisites of lib/popen.c.
AC_DEFUN([gl_PREREQ_POPEN],
[
- AC_REQUIRE([AC_C_INLINE])
+ :
])
# Find a POSIX-conforming shell.
-# Copyright (C) 2007-2008 Free Software Foundation, Inc.
+# Copyright (C) 2007-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# posix_spawn.m4 serial 4
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# posixtm.m4 serial 7
-dnl Copyright (C) 2002-2003, 2005-2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2010 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.
# posixver.m4 serial 10
-dnl Copyright (C) 2002-2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# pread.m4 serial 1
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# printf-frexp.m4 serial 3
-dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# printf-frexpl.m4 serial 6
-dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# printf-posix-rpl.m4 serial 3
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# printf-posix.m4 serial 5 (gettext-0.18)
-dnl Copyright (C) 2003, 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# printf.m4 serial 33
-dnl Copyright (C) 2003, 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 6
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# progtest.m4 serial 6 (gettext-0.18)
-dnl Copyright (C) 1996-2003, 2005, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 1996-2003, 2005, 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# pthread.m4
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# pty.m4 serial 1
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# putenv.m4 serial 16
-dnl Copyright (C) 2002-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# quote.m4 serial 5
-dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2003, 2005, 2006, 2009, 2010 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.
# quotearg.m4 serial 8
-dnl Copyright (C) 2002, 2004-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 1
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# rawmemchr.m4 serial 1
-dnl Copyright (C) 2003, 2007, 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# read-file.m4 serial 2
-dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2010 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.
# readline.m4 serial 7
-dnl Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# readlink.m4 serial 8
-dnl Copyright (C) 2003, 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# readtokens.m4 serial 5
-dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2010 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.
# readutmp.m4 serial 16
-dnl Copyright (C) 2002-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# realloc.m4 serial 9
-dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# serial 54
+# serial 55
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
AC_DEFUN([gl_PREREQ_REGEX],
[
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+ AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([AC_C_RESTRICT])
AC_REQUIRE([AC_TYPE_MBSTATE_T])
AC_CHECK_HEADERS([libintl.h])
# relocatable-lib.m4 serial 5
-dnl Copyright (C) 2003, 2005-2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2007, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# relocatable.m4 serial 14
-dnl Copyright (C) 2003, 2005-2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2007, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# remove.m4 serial 1
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 21
-# Copyright (C) 2001, 2003, 2005, 2006, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005-2006, 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 2
# See if we need to provide renameat replacement.
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# rijndael.m4 serial 2
-dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 10
-# Copyright (C) 2000, 2001, 2005, 2006, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2005-2006, 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# rmdir.m4 serial 7
-dnl Copyright (C) 2002, 2005, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# round.m4 serial 6
-dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# roundf.m4 serial 7
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# roundl.m4 serial 5
-dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# rpmatch.m4 serial 9
-dnl Copyright (C) 2002-2003, 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# safe-alloc.m4 serial 1
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# safe-read.m4 serial 5
-dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2010 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.
# safe-write.m4 serial 3
-dnl Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005-2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
#serial 8
-dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2010 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.
# serial 9
-dnl Copyright (C) 2002-2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# savedir.m4 serial 9
-dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2010 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.
# Save and restore the working directory, possibly using a child process.
-dnl Copyright (C) 2004 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# scandir.m4 serial 1
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# sched_h.m4 serial 2
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# search_h.m4 serial 3
-dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# select.m4 serial 3
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 1 -*- Autoconf -*-
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2007, 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 3 -*- Autoconf -*-
-# Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2006-2007, 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# servent.m4 serial 1
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# setenv.m4 serial 13
-dnl Copyright (C) 2001-2004, 2006-2009 Free Software Foundation, Inc.
+# setenv.m4 serial 15
+dnl Copyright (C) 2001-2004, 2006-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
#include <stdlib.h>
#include <errno.h>
]], [[
- if (setenv (NULL, "", 0) != -1) return 1;
+ if (setenv ("", "", 0) != -1) return 1;
if (errno != EINVAL) return 2;
if (setenv ("a", "=", 1) != 0) return 3;
if (strcmp (getenv ("a"), "=") != 0) return 4;
#include <stdlib.h>
]], [[
char entry[] = "b=2";
- if (putenv ("a=1")) return 1;
+ if (putenv ((char *) "a=1")) return 1;
if (putenv (entry)) return 2;
entry[0] = 'a';
unsetenv ("a");
# settime.m4 serial 6
-dnl Copyright (C) 2002, 2004, 2005, 2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004-2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# sha1.m4 serial 9
-dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010 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.
# sha256.m4 serial 4
-dnl Copyright (C) 2005, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# sha512.m4 serial 5
-dnl Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 6
-dnl Copyright (C) 2002, 2005, 2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005-2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# sig_atomic_t.m4 serial 2
-dnl Copyright (C) 2003, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# sigaction.m4 serial 5
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# signal_h.m4 serial 7
-dnl Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+# signal_h.m4 serial 8
+dnl Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
[HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0], [[
#include <signal.h>
]])
+ AC_REQUIRE([AC_TYPE_UID_T])
])
AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR],
# signalblocking.m4 serial 10
-dnl Copyright (C) 2001-2002, 2006-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2002, 2006-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# signbit.m4 serial 6
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# sigpipe.m4 serial 2
-dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# size_max.m4 serial 9
-dnl Copyright (C) 2003, 2005-2006, 2008-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2006, 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# sleep.m4 serial 3
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# snprintf-posix.m4 serial 14
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# snprintf.m4 serial 5
-dnl Copyright (C) 2002-2004, 2007-2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# sockets.m4 serial 6
-dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# socklen.m4 serial 7
-dnl Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# sockpfaf.m4 serial 7
-dnl Copyright (C) 2004, 2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# spawn_h.m4 serial 2
-dnl Copyright (C) 2008-2009 Free Software Foundation, Inc.
+# spawn_h.m4 serial 5
+dnl Copyright (C) 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl once only, before all statements that occur in other macros.
AC_REQUIRE([gl_SPAWN_H_DEFAULTS])
- dnl Execute this unconditionally, because SPAWN_H may be set by other
- dnl modules, after this code is executed.
+ dnl <spawn.h> is always overridden, because of GNULIB_POSIXCHECK.
gl_CHECK_NEXT_HEADERS([spawn.h])
AC_CHECK_HEADERS_ONCE([spawn.h])
if test $ac_cv_header_spawn_h = yes; then
HAVE_SPAWN_H=1
+ AC_CHECK_TYPES([posix_spawnattr_t], [], [HAVE_POSIX_SPAWNATTR_T=0], [[
+#include <spawn.h>
+ ]])
+ AC_CHECK_TYPES([posix_spawn_file_actions_t], [],
+ [HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0], [[
+#include <spawn.h>
+ ]])
else
HAVE_SPAWN_H=0
+ HAVE_POSIX_SPAWNATTR_T=0
+ HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
+ gl_REPLACE_SPAWN_H
fi
AC_SUBST([HAVE_SPAWN_H])
dnl Unconditionally enables the replacement of <spawn.h>.
AC_DEFUN([gl_REPLACE_SPAWN_H],
[
- AC_REQUIRE([gl_SPAWN_H_DEFAULTS])
- SPAWN_H='spawn.h'
+ dnl This is a no-op, because <spawn.h> is always overridden.
+ :
])
AC_DEFUN([gl_SPAWN_MODULE_INDICATOR],
GNULIB_POSIX_SPAWNATTR_SETSIGMASK=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_SETSIGMASK])
GNULIB_POSIX_SPAWNATTR_DESTROY=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_DESTROY])
dnl Assume proper GNU behavior unless another module says otherwise.
- HAVE_POSIX_SPAWN=1; AC_SUBST([HAVE_POSIX_SPAWN])
- REPLACE_POSIX_SPAWN=0; AC_SUBST([REPLACE_POSIX_SPAWN])
- SPAWN_H=''; AC_SUBST([SPAWN_H])
+ HAVE_POSIX_SPAWN=1; AC_SUBST([HAVE_POSIX_SPAWN])
+ HAVE_POSIX_SPAWNATTR_T=1; AC_SUBST([HAVE_POSIX_SPAWNATTR_T])
+ HAVE_POSIX_SPAWN_FILE_ACTIONS_T=1;
+ AC_SUBST([HAVE_POSIX_SPAWN_FILE_ACTIONS_T])
+ REPLACE_POSIX_SPAWN=0; AC_SUBST([REPLACE_POSIX_SPAWN])
])
# sprintf-posix.m4 serial 12
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# ssize_t.m4 serial 4 (gettext-0.15)
-dnl Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2003, 2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 6
-# Copyright (C) 1998, 1999, 2001, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1998-1999, 2001, 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
#serial 3
-# Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# Checks for stat-related time functions.
-# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009 Free Software
+# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2010 Free Software
# Foundation, Inc.
# This file is free software; the Free Software Foundation
-# serial 3
+# serial 4
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
esac
if test $REPLACE_STAT = 1; then
AC_LIBOBJ([stat])
+ dnl Prerequisites of lib/stat.c.
+ AC_REQUIRE([AC_C_INLINE])
fi
])
# stdarg.m4 serial 3
-dnl Copyright (C) 2006, 2008-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Check for stdbool.h that conforms to C99.
-dnl Copyright (C) 2002-2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl A placeholder for POSIX 2008 <stddef.h>, for platforms that have issues.
# stddef_h.m4 serial 1
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# stdint.m4 serial 34
-dnl Copyright (C) 2001-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# stdint_h.m4 serial 8
-dnl Copyright (C) 1997-2004, 2006, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006, 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
#serial 12
-dnl Copyright (C) 2002, 2005-2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005-2007, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# stdio_h.m4 serial 21
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+# stdio_h.m4 serial 22
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
HAVE_DECL_SNPRINTF=1; AC_SUBST([HAVE_DECL_SNPRINTF])
HAVE_DECL_VSNPRINTF=1; AC_SUBST([HAVE_DECL_VSNPRINTF])
HAVE_DPRINTF=1; AC_SUBST([HAVE_DPRINTF])
- HAVE_FSEEKO=1; AC_SUBST([HAVE_FSEEKO])
- HAVE_FTELLO=1; AC_SUBST([HAVE_FTELLO])
HAVE_RENAMEAT=1; AC_SUBST([HAVE_RENAMEAT])
HAVE_VASPRINTF=1; AC_SUBST([HAVE_VASPRINTF])
HAVE_VDPRINTF=1; AC_SUBST([HAVE_VDPRINTF])
# stdlib-safer.m4 serial 2
-dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# stdlib_h.m4 serial 21
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# stpcpy.m4 serial 7
-dnl Copyright (C) 2002, 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# stpncpy.m4 serial 10
-dnl Copyright (C) 2002-2003, 2005-2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2010 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.
# strcase.m4 serial 10
-dnl Copyright (C) 2002, 2005-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# strcasestr.m4 serial 13
-dnl Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# strchrnul.m4 serial 7
-dnl Copyright (C) 2003, 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# strcspn.m4 serial 3
-dnl Copyright (C) 2002-2003, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# strdup.m4 serial 11
-dnl Copyright (C) 2002-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
# strerror.m4 serial 9
-dnl Copyright (C) 2002, 2007-2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 32
-# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-# 2006, 2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1996-1997, 1999-2007, 2009-2010 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# Configure a GNU-like replacement for <string.h>.
-# Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# Configure a replacement for <string.h>.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# strndup.m4 serial 17
-dnl Copyright (C) 2002-2003, 2005-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# strnlen.m4 serial 10
-dnl Copyright (C) 2002-2003, 2005-2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2010 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.
# strpbrk.m4 serial 5
-dnl Copyright (C) 2002-2003, 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2007, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# strptime.m4 serial 5
-dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# strsep.m4 serial 9
-dnl Copyright (C) 2002, 2003, 2004, 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2003, 2004, 2007, 2009, 2010 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.
# strsignal.m4 serial 3
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# strstr.m4 serial 7
-dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# strtod.m4 serial 13
-dnl Copyright (C) 2002-2003, 2006-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2006-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# strtoimax.m4 serial 7
-dnl Copyright (C) 2002, 2003, 2004, 2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2003, 2004, 2006, 2009, 2010 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.
# strtok_r.m4 serial 9
-dnl Copyright (C) 2002, 2003, 2004, 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2003, 2004, 2007, 2009, 2010 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.
# strtol.m4 serial 5
-dnl Copyright (C) 2002, 2003, 2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2003, 2006, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# strtoll.m4 serial 6
-dnl Copyright (C) 2002, 2004, 2006, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004, 2006, 2008, 2009, 2010 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.
# strtoul.m4 serial 4
-dnl Copyright (C) 2002, 2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2006, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# strtoull.m4 serial 6
-dnl Copyright (C) 2002, 2004, 2006, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004, 2006, 2008, 2009, 2010 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.
# strtoumax.m4 serial 7
-dnl Copyright (C) 2002, 2003, 2004, 2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2003, 2004, 2006, 2009, 2010 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.
# strverscmp.m4 serial 7
-dnl Copyright (C) 2002, 2005-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 2
# See if we need to provide symlink replacement.
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 3
# See if we need to provide symlinkat/readlinkat replacement.
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Configure a replacement for <sys/file.h>.
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# Written by Richard W.M. Jones.
+# serial 2
+
AC_DEFUN([gl_HEADER_SYS_FILE_H],
[
AC_REQUIRE([gl_HEADER_SYS_FILE_H_DEFAULTS])
AC_CHECK_FUNCS_ONCE([flock])
gl_CHECK_NEXT_HEADERS([sys/file.h])
- SYS_FILE_H='sys/file.h'
- AC_SUBST([SYS_FILE_H])
AC_CHECK_HEADERS_ONCE([sys/file.h])
if test $ac_cv_header_sys_file_h = yes; then
-# sys_ioctl_h.m4 serial 3
-dnl Copyright (C) 2008-2009 Free Software Foundation, Inc.
+# sys_ioctl_h.m4 serial 4
+dnl Copyright (C) 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
[gl_cv_decl_ioctl_in_sys_ioctl_h=yes],
[gl_cv_decl_ioctl_in_sys_ioctl_h=no])
])
- if test $gl_cv_decl_ioctl_in_sys_ioctl_h != yes; then
- SYS_IOCTL_H='sys/ioctl.h'
- fi
else
HAVE_SYS_IOCTL_H=0
- SYS_IOCTL_H='sys/ioctl.h'
fi
AC_SUBST([HAVE_SYS_IOCTL_H])
- dnl Execute this unconditionally, because SYS_IOCTL_H may be set by other
- dnl modules, after this code is executed.
+ dnl <sys/ioctl.h> is always overridden, because of GNULIB_POSIXCHECK.
gl_CHECK_NEXT_HEADERS([sys/ioctl.h])
])
dnl Unconditionally enables the replacement of <sys/ioctl.h>.
AC_DEFUN([gl_REPLACE_SYS_IOCTL_H],
[
- AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])
- SYS_IOCTL_H='sys/ioctl.h'
+ dnl This is a no-op, because <sys/ioctl.h> is always overridden.
+ :
])
AC_DEFUN([gl_SYS_IOCTL_MODULE_INDICATOR],
SYS_IOCTL_H_HAVE_WINSOCK2_H=0; AC_SUBST([SYS_IOCTL_H_HAVE_WINSOCK2_H])
SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
AC_SUBST([SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS])
- SYS_IOCTL_H=''; AC_SUBST([SYS_IOCTL_H])
])
-# sys_select_h.m4 serial 8
-dnl Copyright (C) 2006-2009 Free Software Foundation, Inc.
+# sys_select_h.m4 serial 9
+dnl Copyright (C) 2006-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
])
fi
])
- if test $gl_cv_header_sys_select_h_selfcontained = yes; then
- SYS_SELECT_H=''
+ gl_CHECK_NEXT_HEADERS([sys/select.h])
+ if test $ac_cv_header_sys_select_h = yes; then
+ HAVE_SYS_SELECT_H=1
else
- SYS_SELECT_H='sys/select.h'
- gl_CHECK_NEXT_HEADERS([sys/select.h])
- if test $ac_cv_header_sys_select_h = yes; then
- HAVE_SYS_SELECT_H=1
- else
- HAVE_SYS_SELECT_H=0
- fi
- AC_SUBST([HAVE_SYS_SELECT_H])
+ HAVE_SYS_SELECT_H=0
+ fi
+ AC_SUBST([HAVE_SYS_SELECT_H])
+ if test $gl_cv_header_sys_select_h_selfcontained != yes; then
gl_PREREQ_SYS_H_WINSOCK2
fi
- AC_SUBST([SYS_SELECT_H])
])
AC_DEFUN([gl_SYS_SELECT_MODULE_INDICATOR],
# sys_socket_h.m4 serial 13
-dnl Copyright (C) 2005-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# sys_stat_h.m4 serial 21 -*- Autoconf -*-
-dnl Copyright (C) 2006-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Configure a replacement for <sys/time.h>.
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# Configure a replacement for <sys/times.h>.
+# serial 3
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
[
AC_REQUIRE([gl_SYS_TIMES_H_DEFAULTS])
+ gl_CHECK_NEXT_HEADERS([sys/times.h])
AC_CHECK_HEADERS_ONCE([sys/times.h])
if test $ac_cv_header_sys_times_h = yes; then
- SYS_TIMES_H=
+ HAVE_SYS_TIMES_H=1
+ AC_CHECK_TYPES([struct tms], [], [HAVE_STRUCT_TMS=0], [[
+#include <sys/times.h>
+ ]])
else
- SYS_TIMES_H=sys/times.h
+ HAVE_SYS_TIMES_H=0
+ HAVE_STRUCT_TMS=0
fi
- AC_SUBST([SYS_TIMES_H])
+ AC_SUBST([HAVE_SYS_TIMES_H])
])
AC_DEFUN([gl_SYS_TIMES_MODULE_INDICATOR],
AC_DEFUN([gl_SYS_TIMES_H_DEFAULTS],
[
- GNULIB_TIMES=0; AC_SUBST([GNULIB_TIMES])
+ GNULIB_TIMES=0; AC_SUBST([GNULIB_TIMES])
+ HAVE_STRUCT_TMS=1; AC_SUBST([HAVE_STRUCT_TMS])
+ HAVE_TIMES=1; AC_SUBST([HAVE_TIMES])
])
-# sys_utsname_h.m4 serial 1
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+# sys_utsname_h.m4 serial 3
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl once only, before all statements that occur in other macros.
AC_REQUIRE([gl_SYS_UTSNAME_H_DEFAULTS])
+ gl_CHECK_NEXT_HEADERS([sys/utsname.h])
AC_CHECK_HEADERS_ONCE([sys/utsname.h])
if test $ac_cv_header_sys_utsname_h != yes; then
- SYS_UTSNAME_H='sys/utsname.h'
+ HAVE_SYS_UTSNAME_H=0
+ HAVE_STRUCT_UTSNAME=0
+ else
+ HAVE_SYS_UTSNAME_H=1
+ AC_CHECK_TYPES([struct utsname], [], [HAVE_STRUCT_UTSNAME=0], [[
+#include <sys/utsname.h>
+ ]])
fi
+ AC_SUBST([HAVE_SYS_UTSNAME_H])
])
AC_DEFUN([gl_SYS_UTSNAME_MODULE_INDICATOR],
AC_DEFUN([gl_SYS_UTSNAME_H_DEFAULTS],
[
- GNULIB_UNAME=0; AC_SUBST([GNULIB_UNAME])
+ GNULIB_UNAME=0; AC_SUBST([GNULIB_UNAME])
dnl Assume proper GNU behavior unless another module says otherwise.
- HAVE_UNAME=1; AC_SUBST([HAVE_UNAME])
- SYS_UTSNAME_H=''; AC_SUBST([SYS_UTSNAME_H])
+ HAVE_UNAME=1; AC_SUBST([HAVE_UNAME])
+ HAVE_STRUCT_UTSNAME=1; AC_SUBST([HAVE_STRUCT_UTSNAME])
])
-# sys_wait_h.m4 serial 1
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+# sys_wait_h.m4 serial 2
+dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_REQUIRE([gl_SYS_WAIT_H_DEFAULTS])
gl_CHECK_NEXT_HEADERS([sys/wait.h])
- SYS_WAIT_H='sys/wait.h'
- AC_SUBST([SYS_WAIT_H])
])
AC_DEFUN([gl_SYS_WAIT_MODULE_INDICATOR],
# sysexits.m4 serial 5
-dnl Copyright (C) 2003, 2005, 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
#serial 3
-# Copyright (C) 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2007, 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# thread.m4 serial 2
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# threadlib.m4 serial 4 (gettext-0.18)
-dnl Copyright (C) 2005-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Configure a more-standard replacement for <time.h>.
-# Copyright (C) 2000-2001, 2003-2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
dnl Reentrant time functions like localtime_r.
-dnl Copyright (C) 2003, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 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.
# timegm.m4 serial 6
-dnl Copyright (C) 2003, 2007, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
--- /dev/null
+# times.m4 serial 1
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_TIMES],
+[
+ AC_REQUIRE([gl_SYS_TIMES_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([times])
+ if test $ac_cv_func_times = no; then
+ HAVE_TIMES=0
+ AC_LIBOBJ([times])
+ fi
+])
#serial 14
-# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007 Free Software
-# Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# tls.m4 serial 2 (gettext-0.18)
-dnl Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# tm_gmtoff.m4 serial 3
-dnl Copyright (C) 2002, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# tmpdir.m4 serial 3
-dnl Copyright (C) 2001-2002, 2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2002, 2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Check whether to use a replacement tmpfile() function.
-# Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# trunc.m4 serial 2
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# truncf.m4 serial 1
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# truncl.m4 serial 2
-dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# tsearch.m4 serial 4
-dnl Copyright (C) 2006-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 4
-# Copyright (C) 2003, 2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2007, 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# uintmax_t.m4 serial 12
-dnl Copyright (C) 1997-2004, 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# ulonglong.m4 serial 10
-dnl Copyright (C) 1999-2007 Free Software Foundation, Inc.
+dnl Copyright (C) 1999-2007, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# uname.m4 serial 10
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# ungetc.m4 serial 2
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# unicodeio.m4 serial 2
-dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
#serial 8
-dnl Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005-2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# unistd_h.m4 serial 36
-dnl Copyright (C) 2006-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl HPUX and other systems can't unlink shared text that is being executed.
-# Copyright (C) 2000, 2001, 2004, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2004, 2007, 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# unlink.m4 serial 3
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 6
-# Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2005-2007, 2009-2010 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# unlocked-io.m4 serial 15
-# Copyright (C) 1998-2006, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1998-2006, 2009-2010 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# serial 8
-# Copyright (C) 1996, 1999-2001, 2004, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1999-2001, 2004, 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 10
-dnl Copyright (C) 2002-2006, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# usleep.m4 serial 1
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# serial 9
-# Copyright (C) 1998-2001, 2003-2004, 2007, 2009 Free Software
-# Foundation, Inc.
+# Copyright (C) 1998-2001, 2003-2004, 2007, 2009-2010 Free Software Foundation,
+# Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
dnl From Jim Meyering
dnl Replace the utime function on systems that need it.
-# Copyright (C) 1998, 2000-2001, 2003-2004, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2000-2001, 2003-2004, 2009-2010 Free Software Foundation,
+# Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
#serial 3
-dnl Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2007, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-dnl Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free
-dnl Software Foundation, Inc.
+dnl Copyright (C) 2003-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# serial 1
+# serial 3
# See if we need to provide utimensat replacement.
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
[AC_RUN_IFELSE([AC_LANG_PROGRAM([[
#include <fcntl.h>
#include <sys/stat.h>
+#include <unistd.h>
+]], [[struct timespec ts[2] = { { 1, UTIME_OMIT }, { 1, UTIME_NOW } };
+ struct stat st;
+ const char *f = "conftest.file";
+ if (close (creat (f, 0600))) return 1;
+ if (utimensat (AT_FDCWD, f, NULL, AT_SYMLINK_NOFOLLOW)) return 2;
+ if (utimensat (AT_FDCWD, f, ts, 0)) return 3;
+ sleep (1);
+ ts[0].tv_nsec = UTIME_NOW;
+ ts[1].tv_nsec = UTIME_OMIT;
+ if (utimensat (AT_FDCWD, f, ts, 0)) return 4;
+ if (stat (f, &st)) return 5;
+ if (st.st_ctime < st.st_atime) return 6;]])],
+dnl FIXME: simplify this in 2012, when file system bugs are no longer common
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#ifdef __linux__
-/* The Linux kernel added utimensat in 2.6.22, but it had bugs until 2.6.26.
- Always replace utimensat to support older kernels. */
+/* The Linux kernel added utimensat in 2.6.22, but has bugs with UTIME_OMIT
+ in several file systems as recently as 2.6.32. Always replace utimensat
+ to support older kernels. */
choke me
#endif
-]], [[struct timespec ts[2] = { { 1, UTIME_OMIT }, { 1, UTIME_OMIT } };
- return utimensat (AT_FDCWD, ".", NULL, AT_SYMLINK_NOFOLLOW);]])],
- [gl_cv_func_utimensat_works=yes],
- [gl_cv_func_utimensat_works="needs runtime check"],
+ ]])],
+ [gl_cv_func_utimensat_works=yes],
+ [gl_cv_func_utimensat_works="needs runtime check"])],
+ [gl_cv_func_utimensat_works=no],
[gl_cv_func_utimensat_works="guessing no"])])
if test "$gl_cv_func_utimensat_works" != yes; then
REPLACE_UTIMENSAT=1
# serial 9
-# Copyright (C) 1998-1999, 2001, 2003-2004, 2006, 2009 Free Software
+# Copyright (C) 1998-1999, 2001, 2003-2004, 2006, 2009-2010 Free Software
# Foundation, Inc.
# This file is free software; the Free Software Foundation
# Detect some bugs in glibc's implementation of utimes.
# serial 2
-dnl Copyright (C) 2003, 2004, 2005, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2005, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
--- /dev/null
+# va-args.m4 serial 1
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Test for variadic macro support.
+dnl Define HAVE_VA_ARGS if macros can use __VA_ARGS__.
+AC_DEFUN([gl_VA_ARGS],
+[
+ AC_CACHE_CHECK([whether the preprocessor allows variadic macros],
+ [gl_cv_c_va_args],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <stdio.h>
+ #define a(func, arg, ...) func (arg, __VA_ARGS__)
+ #define b(...) a (__VA_ARGS__)
+ ]], [[b (printf, "%s", "test");]])],
+ [gl_cv_c_va_args=yes], [gl_cv_c_va_args=no])
+ ])
+ if test $gl_cv_c_va_args = yes; then
+ AC_DEFINE([HAVE_VA_ARGS], [1],
+ [Define to 1 if the preprocessor supports variadic macros and
+ __VA_ARGS__.])
+ fi
+])
# From Paul Eggert
-# Copyright (C) 2001, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2009, 2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# vasnprintf-posix.m4 serial 13
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# vasnprintf.m4 serial 29
-dnl Copyright (C) 2002-2004, 2006-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2006-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# vasprintf-posix.m4 serial 13
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# vasprintf.m4 serial 6
-dnl Copyright (C) 2002-2003, 2006-2007 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2006-2007, 2009-2010 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.
# vdprintf-posix.m4 serial 2
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# vdprintf.m4 serial 1
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# version-etc.m4 serial 1
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009-2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# vfprintf-posix.m4 serial 14
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# visibility.m4 serial 2 (gettext-0.18)
-dnl Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# vprintf-posix.m4 serial 3
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# vsnprintf-posix.m4 serial 14
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# vsnprintf.m4 serial 5
-dnl Copyright (C) 2002-2004, 2007-2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# vsprintf-posix.m4 serial 12
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-# wait-process.m4 serial 4
-dnl Copyright (C) 2003, 2008, 2009 Free Software Foundation, Inc.
+# wait-process.m4 serial 5
+dnl Copyright (C) 2003, 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_WAIT_PROCESS],
[
dnl Prerequisites of lib/wait-process.c.
+ AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([gt_TYPE_SIG_ATOMIC_T])
AC_CHECK_FUNCS([waitid])
])
# warnings.m4 serial 2
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
-dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl Written by Eric Blake.
-# wchar.m4 serial 26
+# wchar.m4 serial 28
AC_DEFUN([gl_WCHAR_H],
[
AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+ AC_REQUIRE([gl_WCHAR_H_INLINE_OK])
AC_CACHE_CHECK([whether <wchar.h> is standalone],
[gl_cv_header_wchar_h_standalone],
[AC_COMPILE_IFELSE([[#include <wchar.h>
fi
AC_SUBST([HAVE_WINT_T])
- dnl If <stddef.h> is replaced, then <wchar.h> must also be replaced.
- AC_REQUIRE([gl_STDDEF_H])
-
- if test $gl_cv_header_wchar_h_standalone != yes || test $gt_cv_c_wint_t != yes || test -n "$STDDEF_H"; then
- WCHAR_H=wchar.h
- fi
-
dnl Prepare for creating substitute <wchar.h>.
dnl Do it always: WCHAR_H may be empty here but can be set later.
dnl Check for <wchar.h> (missing in Linux uClibc when built without wide
HAVE_WCHAR_H=0
fi
AC_SUBST([HAVE_WCHAR_H])
- dnl Execute this unconditionally, because WCHAR_H may be set by other
- dnl modules, after this code is executed.
+ dnl <wchar.h> is always overridden, because of GNULIB_POSIXCHECK.
gl_CHECK_NEXT_HEADERS([wchar.h])
])
+dnl Check whether <wchar.h> is usable at all.
+AC_DEFUN([gl_WCHAR_H_INLINE_OK],
+[
+ dnl Test whether <wchar.h> suffers due to the transition from '__inline' to
+ dnl 'gnu_inline'. See <http://sourceware.org/bugzilla/show_bug.cgi?id=4022>
+ dnl and <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42440>. In summary,
+ dnl glibc version 2.5 or older, together with gcc version 4.3 or newer and
+ dnl the option -std=c99 or -std=gnu99, leads to a broken <wchar.h>.
+ AC_CACHE_CHECK([whether <wchar.h> uses 'inline' correctly],
+ [gl_cv_header_wchar_h_correct_inline],
+ [gl_cv_header_wchar_h_correct_inline=yes
+ AC_LANG_CONFTEST([
+ AC_LANG_SOURCE([[#define wcstod renamed_wcstod
+#include <wchar.h>
+extern int zero (void);
+int main () { return zero(); }
+]])])
+ if AC_TRY_EVAL([ac_compile]); then
+ mv conftest.$ac_objext conftest1.$ac_objext
+ AC_LANG_CONFTEST([
+ AC_LANG_SOURCE([[#define wcstod renamed_wcstod
+#include <wchar.h>
+int zero (void) { return 0; }
+]])])
+ if AC_TRY_EVAL([ac_compile]); then
+ mv conftest.$ac_objext conftest2.$ac_objext
+ if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then
+ :
+ else
+ gl_cv_header_wchar_h_correct_inline=no
+ fi
+ fi
+ fi
+ rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
+ ])
+ if test $gl_cv_header_wchar_h_correct_inline = no; then
+ AC_MSG_ERROR([<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
+This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
+C99 mode. You have four options:
+ - Add the flag -fgnu89-inline to CC and reconfigure, or
+ - Fix your include files, using parts of
+ <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
+ - Use a gcc version older than 4.3, or
+ - Don't use the flags -std=c99 or -std=gnu99.
+Configuration aborted.])
+ fi
+])
+
dnl Unconditionally enables the replacement of <wchar.h>.
AC_DEFUN([gl_REPLACE_WCHAR_H],
[
- AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
- WCHAR_H=wchar.h
+ dnl This is a no-op, because <wchar.h> is always overridden.
+ :
])
AC_DEFUN([gl_WCHAR_MODULE_INDICATOR],
REPLACE_WCSRTOMBS=0; AC_SUBST([REPLACE_WCSRTOMBS])
REPLACE_WCSNRTOMBS=0; AC_SUBST([REPLACE_WCSNRTOMBS])
REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH])
- WCHAR_H=''; AC_SUBST([WCHAR_H])
])
# wchar_t.m4 serial 3 (gettext-0.18)
-dnl Copyright (C) 2002-2003, 2008, 2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# wcrtomb.m4 serial 4
-dnl Copyright (C) 2008-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# wcsnrtombs.m4 serial 2
-dnl Copyright (C) 2008-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# wcsrtombs.m4 serial 4
-dnl Copyright (C) 2008-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# wctob.m4 serial 4
-dnl Copyright (C) 2008-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
-dnl Copyright (C) 2006-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# wcwidth.m4 serial 15
-dnl Copyright (C) 2006-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# wint_t.m4 serial 4 (gettext-0.18)
-dnl Copyright (C) 2003, 2007-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Determine whether we can write any file.
-# Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# write.m4 serial 1
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# xalloc.m4 serial 16
-dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2010 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.
#serial 6
-dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
#serial 4
-dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# xsize.m4 serial 4
-dnl Copyright (C) 2003-2004, 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2004, 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# xstrndup.m4 serial 2
-dnl Copyright (C) 2003 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
#serial 6
-dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2010 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.
#serial 10
-dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software
-dnl Foundation, Inc.
+dnl Copyright (C) 2002-2007, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# xvasprintf.m4 serial 1
-dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# yesno.m4 serial 5
-dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2010 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.
# yield.m4 serial 2
-dnl Copyright (C) 2005-2009 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
The following copyright notice applies to each of these
description files.
-Copyright (C) 2002-2009 Free Software Foundation, Inc.
+Copyright (C) 2002-2010 Free Software Foundation, Inc.
This file is free software; the Free Software Foundation
gives unlimited permission to copy and/or distribute it,
with or without modifications, as long as this notice is preserved.
All the files in this directory are distributed under the following copyright:
- Copyright (C) 2002-2009 Free Software Foundation, Inc.
+ Copyright (C) 2002-2010 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
in any medium, are permitted without royalty provided the copyright
notice and this notice are preserved.
Notice:
+Applicability:
+
Files:
Depends-on:
Depends-on:
sys_socket
accept
-fcntl
+fcntl-h
binary-io
+extensions
configure.ac:
gl_FUNC_ACCEPT4
tests/test-set-mode-acl.c
tests/test-copy-acl.c
tests/test-sameacls.c
+tests/macros.h
Depends-on:
progname
"areadlink.h"
License:
-GPL
+LGPLv2+
Maintainer:
Bruno Haible, Jim Meyering
Files:
tests/test-areadlink.h
tests/test-areadlink.c
+tests/macros.h
Depends-on:
stdbool
"areadlink.h"
License:
-GPL
+LGPLv2+
Maintainer:
Jim Meyering
Files:
tests/test-areadlink.h
tests/test-areadlink-with-size.c
+tests/macros.h
Depends-on:
stdbool
Files:
tests/test-areadlink.h
tests/test-areadlinkat.c
+tests/macros.h
Depends-on:
stdbool
Files:
tests/test-areadlink.h
tests/test-areadlinkat-with-size.c
+tests/macros.h
Depends-on:
stdbool
--- /dev/null
+Description:
+A C macro for declaring that specific arguments must not be NULL.
+
+Applicability:
+all
+
+Files:
+build-aux/arg-nonnull.h
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+
+BUILT_SOURCES += arg-nonnull.h
+# The arg-nonnull.h that gets inserted into generated .h files is the same as
+# build-aux/arg-nonnull.h, except that it has the copyright header cut off.
+arg-nonnull.h: $(top_srcdir)/build-aux/arg-nonnull.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/GL_ARG_NONNULL/,$$p' \
+ < $(top_srcdir)/build-aux/arg-nonnull.h \
+ > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t
+
+ARG_NONNULL_H=arg-nonnull.h
+
+Include:
+
+License:
+LGPLv2+
+
+Maintainer:
+Bruno Haible
Files:
tests/test-argmatch.c
+tests/macros.h
Depends-on:
progname
lib/argv-iter.h
Depends-on:
+arg-nonnull
getdelim
stdbool
Files:
tests/test-argv-iter.c
+tests/macros.h
Depends-on:
Depends-on:
include_next
link-warning
+arg-nonnull
sys_socket
configure.ac:
AC_PROG_MKDIR_P
Makefile.am:
-BUILT_SOURCES += $(ARPA_INET_H)
+BUILT_SOURCES += arpa/inet.h
# We need the following in order to create <arpa/inet.h> when the system
# doesn't have one.
-arpa/inet.h: arpa_inet.in.h $(LINK_WARNING_H)
+arpa/inet.h: arpa_inet.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
$(AM_V_at)$(MKDIR_P) arpa
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-e 's|@''HAVE_DECL_INET_NTOP''@|$(HAVE_DECL_INET_NTOP)|g' \
-e 's|@''HAVE_DECL_INET_PTON''@|$(HAVE_DECL_INET_PTON)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/arpa_inet.in.h; \
} > $@-t && \
mv $@-t $@
Makefile.am:
TESTS += test-arpa_inet
check_PROGRAMS += test-arpa_inet
-
-License:
-LGPL
Depends-on:
list
-xalloc
xsize
configure.ac:
Files:
tests/test-array_list.c
+tests/macros.h
Depends-on:
progname
Makefile.am:
TESTS += test-array_list
check_PROGRAMS += test-array_list
-test_array_list_LDADD = $(LDADD) @LIBINTL@
Files:
tests/test-array-mergesort.c
+tests/macros.h
Depends-on:
Depends-on:
oset
-xalloc
xsize
configure.ac:
Files:
tests/test-array_oset.c
+tests/macros.h
Depends-on:
+xlist
array-list
progname
Files:
+tests/signature.h
tests/test-atexit.sh
tests/test-atexit.c
Depends-on:
list
-xalloc
configure.ac:
Files:
tests/test-avltree_list.c
+tests/macros.h
Depends-on:
array-list
Makefile.am:
TESTS += test-avltree_list
check_PROGRAMS += test-avltree_list
-test_avltree_list_LDADD = $(LDADD) @LIBINTL@
Depends-on:
oset
-xalloc
configure.ac:
Files:
tests/test-avltree_oset.c
+tests/macros.h
Depends-on:
array-oset
Makefile.am:
TESTS += test-avltree_oset
check_PROGRAMS += test-avltree_oset
-test_avltree_oset_LDADD = $(LDADD) @LIBINTL@
list
avltree-oset
stdint
-xalloc
xsize
configure.ac:
Files:
tests/test-avltreehash_list.c
+tests/macros.h
Depends-on:
array-list
Makefile.am:
TESTS += test-avltreehash_list
check_PROGRAMS += test-avltreehash_list
-test_avltreehash_list_LDADD = $(LDADD) @LIBINTL@
Files:
tests/test-base64.c
+tests/macros.h
Depends-on:
Files:
tests/test-binary-io.sh
tests/test-binary-io.c
+tests/macros.h
Depends-on:
Files:
tests/test-bitrotate.c
+tests/macros.h
Depends-on:
tests/test-btowc1.sh
tests/test-btowc2.sh
tests/test-btowc.c
+tests/signature.h
+tests/macros.h
m4/locale-fr.m4
m4/codeset.m4
Files:
tests/test-byteswap.c
+tests/macros.h
Depends-on:
Makefile.am:
TESTS += test-byteswap
check_PROGRAMS += test-byteswap
-
-License:
-LGPL
Files:
tests/test-c-ctype.c
+tests/macros.h
Depends-on:
tests/test-c-stack.c
tests/test-c-stack.sh
tests/test-c-stack2.sh
+tests/macros.h
Depends-on:
exitfail
tests/test-c-strcase.sh
tests/test-c-strcasecmp.c
tests/test-c-strncasecmp.c
+tests/macros.h
m4/locale-fr.m4
m4/locale-tr.m4
m4/codeset.m4
Files:
tests/test-c-strcasestr.c
+tests/macros.h
Depends-on:
Files:
tests/test-c-strstr.c
+tests/macros.h
Depends-on:
Depends-on:
extensions
+locale
strdup-posix
configure.ac:
Depends-on:
extensions
+locale
strdup-posix
configure.ac:
Files:
tests/test-canonicalize-lgpl.c
+tests/signature.h
+tests/macros.h
Depends-on:
same-inode
Files:
tests/test-canonicalize.c
+tests/macros.h
Depends-on:
progname
Depends-on:
list
-xalloc
xsize
configure.ac:
Files:
tests/test-carray_list.c
+tests/macros.h
Depends-on:
array-list
Makefile.am:
TESTS += test-carray_list
check_PROGRAMS += test-carray_list
-test_carray_list_LDADD = $(LDADD) @LIBINTL@
tests/test-ceilf1.c
tests/test-ceilf2.c
tests/nan.h
+tests/signature.h
+tests/macros.h
Depends-on:
float
check_PROGRAMS += test-ceilf1 test-ceilf2
test_ceilf1_LDADD = $(LDADD) @CEILF_LIBM@
test_ceilf2_LDADD = $(LDADD) @CEILF_LIBM@
-
-License:
-LGPL
Files:
tests/test-ceill.c
tests/nan.h
+tests/signature.h
+tests/macros.h
Depends-on:
fpucw
TESTS += test-ceill
check_PROGRAMS += test-ceill
test_ceill_LDADD = $(LDADD) @CEILL_LIBM@
-
-License:
-LGPL
Files:
+tests/nap.h
tests/test-chown.h
tests/test-chown.c
+tests/signature.h
+tests/macros.h
Depends-on:
lstat
xalloc
xmalloca
linkedhash-list
+xlist
gettext-h
configure.ac:
Depends-on:
dup2
+fcntl
stdbool
configure.ac:
Files:
tests/test-cloexec.c
+tests/macros.h
Depends-on:
binary-io
Files:
tests/test-copy-file.sh
tests/test-copy-file.c
+tests/macros.h
Depends-on:
acl
m4/count-one-bits.m4
Depends-on:
-inline
verify
configure.ac:
Files:
tests/test-count-one-bits.c
+tests/macros.h
Depends-on:
Makefile.am:
TESTS += test-des
check_PROGRAMS += test-des
-
-License:
-LGPLv2+
Makefile.am:
TESTS += test-gc-arcfour
check_PROGRAMS += test-gc-arcfour
-
-License:
-LGPLv2+
Makefile.am:
TESTS += test-gc-arctwo
check_PROGRAMS += test-gc-arctwo
-
-License:
-LGPLv2+
Makefile.am:
TESTS += test-gc-des
check_PROGRAMS += test-gc-des
-
-License:
-LGPLv2+
Makefile.am:
TESTS += test-gc-hmac-md5
check_PROGRAMS += test-gc-hmac-md5
-
-License:
-LGPLv2+
Makefile.am:
TESTS += test-gc-hmac-sha1
check_PROGRAMS += test-gc-hmac-sha1
-
-License:
-LGPLv2+
Makefile.am:
TESTS += test-gc-md2
check_PROGRAMS += test-gc-md2
-
-License:
-LGPLv2+
Makefile.am:
TESTS += test-gc-md4
check_PROGRAMS += test-gc-md4
-
-License:
-LGPLv2+
Makefile.am:
TESTS += test-gc-md5
check_PROGRAMS += test-gc-md5
-
-License:
-LGPLv2+
Makefile.am:
TESTS += test-gc-pbkdf2-sha1
check_PROGRAMS += test-gc-pbkdf2-sha1
-
-License:
-LGPLv2+
Makefile.am:
TESTS += test-gc-rijndael
check_PROGRAMS += test-gc-rijndael
-
-License:
-LGPLv2+
Makefile.am:
TESTS += test-gc-sha1
check_PROGRAMS += test-gc-sha1
-
-License:
-LGPLv2+
Makefile.am:
TESTS += test-gc
check_PROGRAMS += test-gc
-
-License:
-LGPLv2+
Makefile.am:
TESTS += test-md2
check_PROGRAMS += test-md2
-
-License:
-LGPLv2+
Makefile.am:
TESTS += test-md4
check_PROGRAMS += test-md4
-
-License:
-LGPLv2+
Depends-on:
include_next
+link-warning
configure.ac:
gl_CTYPE_H
Makefile.am:
-BUILT_SOURCES += $(CTYPE_H)
+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
+ctype.h: ctype.in.h $(LINK_WARNING_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|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 '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
< $(srcdir)/ctype.in.h; \
} > $@-t && \
mv $@-t $@
--- /dev/null
+Files:
+tests/test-ctype.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-ctype
+check_PROGRAMS += test-ctype
Depends-on:
include_next
link-warning
+arg-nonnull
configure.ac:
gl_DIRENT_H
Makefile.am:
-BUILT_SOURCES += $(DIRENT_H)
+BUILT_SOURCES += dirent.h
# We need the following in order to create <dirent.h> when the system
# doesn't have one that works with the given compiler.
-dirent.h: dirent.in.h $(LINK_WARNING_H)
+dirent.h: dirent.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''REPLACE_FDOPENDIR''@|$(REPLACE_FDOPENDIR)|g' \
-e 's|@''REPLACE_OPENDIR''@|$(REPLACE_OPENDIR)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/dirent.in.h; \
} > $@-t && \
mv $@-t $@
Files:
tests/test-dirent-safer.c
+tests/macros.h
Depends-on:
dup2
--- /dev/null
+Files:
+tests/test-dirent.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-dirent
+check_PROGRAMS += test-dirent
tests/test-dprintf-posix.sh
tests/test-dprintf-posix.c
tests/test-printf-posix.output
+tests/test-dprintf-posix2.sh
+tests/test-dprintf-posix2.c
+tests/signature.h
+tests/macros.h
Depends-on:
stdint
configure.ac:
+AC_CHECK_FUNCS_ONCE([getrlimit setrlimit])
Makefile.am:
-TESTS += test-dprintf-posix.sh
+TESTS += test-dprintf-posix.sh test-dprintf-posix2.sh
TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' srcdir='$(srcdir)'
-check_PROGRAMS += test-dprintf-posix
+check_PROGRAMS += test-dprintf-posix test-dprintf-posix2
Files:
tests/test-dup2.c
+tests/signature.h
+tests/macros.h
Depends-on:
binary-io
-cloexec
open
configure.ac:
fcntl
binary-io
getdtablesize
+extensions
configure.ac:
gl_FUNC_DUP3
+gl_MODULE_INDICATOR([dup3])
gl_UNISTD_MODULE_INDICATOR([dup3])
Makefile.am:
Files:
tests/test-dup3.c
+tests/signature.h
+tests/macros.h
Depends-on:
open
Files:
tests/test-duplocale.c
+tests/signature.h
+tests/macros.h
Depends-on:
Files:
tests/test-fbufmode.c
+tests/macros.h
Depends-on:
dirent
dirfd
dup2
+fcntl
fcntl-h
include_next
malloc-posix
Files:
tests/test-fchdir.c
+tests/signature.h
+tests/macros.h
Depends-on:
getcwd
Description:
-Placeholder for eventual fcntl() replacement.
+Support for fcntl() action F_DUPFD, F_DUPFD_CLOEXEC, F_GETFD.
Files:
+m4/fcntl.m4
+lib/fcntl.c
Depends-on:
+dup2
fcntl-h
+extensions
configure.ac:
+gl_FUNC_FCNTL
+gl_FCNTL_MODULE_INDICATOR([fcntl])
Makefile.am:
Files:
lib/fcntl.in.h
m4/fcntl_h.m4
+m4/fcntl-o.m4
Depends-on:
include_next
link-warning
+arg-nonnull
unistd
extensions
gl_FCNTL_H
Makefile.am:
-BUILT_SOURCES += $(FCNTL_H)
+BUILT_SOURCES += fcntl.h
# We need the following in order to create <fcntl.h> when the system
# doesn't have one that works with the given compiler.
-fcntl.h: fcntl.in.h $(LINK_WARNING_H)
+fcntl.h: fcntl.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \
+ -e 's|@''GNULIB_FCNTL''@|$(GNULIB_FCNTL)|g' \
-e 's|@''GNULIB_OPEN''@|$(GNULIB_OPEN)|g' \
-e 's|@''GNULIB_OPENAT''@|$(GNULIB_OPENAT)|g' \
+ -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \
+ -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \
+ -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \
-e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \
-e 's|@''REPLACE_OPENAT''@|$(REPLACE_OPENAT)|g' \
- -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/fcntl.in.h; \
} > $@-t && \
mv $@-t $@
Makefile.am:
TESTS += test-fcntl-h
check_PROGRAMS += test-fcntl-h
-
-License:
-LGPL
Files:
tests/test-open.h
tests/test-fcntl-safer.c
+tests/macros.h
Depends-on:
stdbool
--- /dev/null
+Files:
+tests/test-fcntl.c
+tests/signature.h
+tests/macros.h
+
+Depends-on:
+binary-io
+getdtablesize
+stdbool
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-fcntl
+check_PROGRAMS += test-fcntl
--- /dev/null
+Description:
+fd_safer_flag() function: adjust a file descriptor result so that it avoids
+clobbering STD{IN,OUT,ERR}_FILENO, with specific flags.
+
+Files:
+lib/fd-safer-flag.c
+lib/dup-safer-flag.c
+
+Depends-on:
+cloexec
+fcntl
+unistd-safer
+
+configure.ac:
+gl_MODULE_INDICATOR([fd-safer-flag])
+
+Makefile.am:
+lib_SOURCES += fd-safer-flag.c dup-safer-flag.c
+
+Include:
+"unistd-safer.h"
+
+License:
+GPL
+
+Maintainer:
+Eric Blake
Files:
tests/test-fdopendir.c
+tests/signature.h
+tests/macros.h
Depends-on:
open
Depends-on:
futimens
-inline
utimensat
configure.ac:
+AC_REQUIRE([AC_C_INLINE]) dnl because 'inline' is used in lib/utimens.h
gl_MODULE_INDICATOR([fdutimensat])
Makefile.am:
Files:
+tests/nap.h
tests/test-futimens.h
tests/test-lutimens.h
tests/test-utimens.h
tests/test-utimens-common.h
tests/test-fdutimensat.c
+tests/macros.h
Depends-on:
progname
tests/test-fflush.c
tests/test-fflush2.sh
tests/test-fflush2.c
+tests/signature.h
+tests/macros.h
Depends-on:
binary-io
Depends-on:
c-ctype
-inline
stdbool
string
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += filevercmp.c
Files:
tests/test-filevercmp.c
+tests/macros.h
Depends-on:
Files:
tests/test-flock.c
+tests/signature.h
+tests/macros.h
Depends-on:
unistd
tests/test-floorf1.c
tests/test-floorf2.c
tests/nan.h
+tests/signature.h
+tests/macros.h
Depends-on:
float
check_PROGRAMS += test-floorf1 test-floorf2
test_floorf1_LDADD = $(LDADD) @FLOORF_LIBM@
test_floorf2_LDADD = $(LDADD) @FLOORF_LIBM@
-
-License:
-LGPL
Files:
tests/test-floorl.c
tests/nan.h
+tests/signature.h
+tests/macros.h
Depends-on:
fpucw
TESTS += test-floorl
check_PROGRAMS += test-floorl
test_floorl_LDADD = $(LDADD) @FLOORL_LIBM@
-
-License:
-LGPL
m4/fnmatch.m4
Depends-on:
+arg-nonnull
extensions
alloca
stdbool
# We need the following in order to create <fnmatch.h> when the system
# doesn't have one that supports the required API.
-fnmatch.h: fnmatch.in.h
+fnmatch.h: fnmatch.in.h $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- cat $(srcdir)/fnmatch.in.h; \
+ sed -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ < $(srcdir)/fnmatch.in.h; \
} > $@-t && \
mv -f $@-t $@
MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t
Files:
tests/test-fnmatch.c
+tests/signature.h
+tests/macros.h
Makefile.am:
TESTS += test-fnmatch
Files:
tests/test-fopen.h
tests/test-fopen-safer.c
+tests/macros.h
Depends-on:
Files:
tests/test-fopen.h
tests/test-fopen.c
+tests/signature.h
+tests/macros.h
Depends-on:
Files:
tests/test-fpending.c
tests/test-fpending.sh
+tests/macros.h
Depends-on:
tests/test-printf-posix.output
tests/test-fprintf-posix2.sh
tests/test-fprintf-posix2.c
+tests/test-fprintf-posix3.sh
+tests/test-fprintf-posix3.c
+tests/signature.h
+tests/macros.h
Depends-on:
stdint
AC_CHECK_FUNCS_ONCE([getrlimit setrlimit])
Makefile.am:
-TESTS += test-fprintf-posix.sh test-fprintf-posix2.sh
+TESTS += test-fprintf-posix.sh test-fprintf-posix2.sh test-fprintf-posix3.sh
TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' srcdir='$(srcdir)'
-check_PROGRAMS += test-fprintf-posix test-fprintf-posix2
+check_PROGRAMS += test-fprintf-posix test-fprintf-posix2 test-fprintf-posix3
Files:
tests/test-fpurge.c
+tests/macros.h
Depends-on:
fflush
Files:
tests/test-freadable.c
+tests/macros.h
Depends-on:
fflush
Files:
tests/test-freadahead.c
tests/test-freadahead.sh
+tests/macros.h
Depends-on:
lseek
Files:
tests/test-freading.c
+tests/macros.h
Depends-on:
fflush
tests/test-freadptr.sh
tests/test-freadptr2.c
tests/test-freadptr2.sh
+tests/macros.h
Depends-on:
lseek
Files:
tests/test-freadseek.c
tests/test-freadseek.sh
+tests/macros.h
Depends-on:
unistd
Files:
tests/test-freopen-safer.c
+tests/macros.h
Depends-on:
Files:
tests/test-freopen.c
+tests/signature.h
+tests/macros.h
Depends-on:
Files:
tests/test-frexp.c
+tests/signature.h
+tests/macros.h
Depends-on:
isnand-nolibm
TESTS += test-frexp-nolibm
check_PROGRAMS += test-frexp-nolibm
test_frexp_nolibm_SOURCES = test-frexp.c
-
-License:
-LGPL
Files:
tests/test-frexp.c
tests/nan.h
+tests/signature.h
+tests/macros.h
Depends-on:
isnand-nolibm
TESTS += test-frexp
check_PROGRAMS += test-frexp
test_frexp_LDADD = $(LDADD) @FREXP_LIBM@
-
-License:
-LGPL
Files:
tests/test-frexpl.c
+tests/signature.h
+tests/macros.h
Depends-on:
fpucw
TESTS += test-frexpl-nolibm
check_PROGRAMS += test-frexpl-nolibm
test_frexpl_nolibm_SOURCES = test-frexpl.c
-
-License:
-LGPL
Files:
tests/test-frexpl.c
tests/nan.h
+tests/signature.h
+tests/macros.h
Depends-on:
fpucw
TESTS += test-frexpl
check_PROGRAMS += test-frexpl
test_frexpl_LDADD = $(LDADD) @FREXPL_LIBM@
-
-License:
-LGPL
tests/test-fseek.c
tests/test-fseek.sh
tests/test-fseek2.sh
+tests/signature.h
+tests/macros.h
m4/ungetc.m4
Depends-on:
tests/test-fseeko.c
tests/test-fseeko.sh
tests/test-fseeko2.sh
+tests/signature.h
+tests/macros.h
m4/ungetc.m4
Depends-on:
lib/stdio-impl.h
Depends-on:
-dup2
configure.ac:
Files:
tests/test-fstrcmp.c
+tests/macros.h
Depends-on:
stdbool
Files:
tests/test-fsync.c
+tests/signature.h
+tests/macros.h
Depends-on:
tests/test-ftell.c
tests/test-ftell.sh
tests/test-ftell2.sh
+tests/signature.h
+tests/macros.h
m4/ungetc.m4
Depends-on:
tests/test-ftello.c
tests/test-ftello.sh
tests/test-ftello2.sh
+tests/signature.h
+tests/macros.h
m4/ungetc.m4
Depends-on:
Files:
tests/test-func.c
+tests/macros.h
configure.ac:
Depends-on:
sys_stat
utimens
+extensions
configure.ac:
gl_FUNC_FUTIMENS
Files:
+tests/nap.h
tests/test-futimens.h
tests/test-utimens-common.h
tests/test-futimens.c
+tests/signature.h
+tests/macros.h
Depends-on:
timespec
Files:
tests/test-fwritable.c
+tests/macros.h
Depends-on:
fflush
Files:
tests/test-fwriting.c
+tests/macros.h
Depends-on:
fflush
Files:
+tests/signature.h
tests/test-getaddrinfo.c
Depends-on:
TESTS += test-getaddrinfo
check_PROGRAMS += test-getaddrinfo
test_getaddrinfo_LDADD = $(LDADD) @GETADDRINFO_LIB@ @LIBINTL@
-
-License:
-LGPL
Files:
tests/test-getcwd.c
+tests/signature.h
+tests/macros.h
Depends-on:
Files:
tests/test-getdate.c
+tests/macros.h
Depends-on:
progname
Files:
tests/test-getdelim.c
+tests/signature.h
+tests/macros.h
Depends-on:
Files:
tests/test-getdtablesize.c
+tests/signature.h
+tests/macros.h
Depends-on:
Files:
tests/test-getgroups.c
+tests/signature.h
+tests/macros.h
Depends-on:
Files:
+tests/signature.h
tests/test-gethostname.c
Depends-on:
Files:
tests/test-getline.c
+tests/signature.h
+tests/macros.h
Depends-on:
Files:
tests/test-getndelim2.c
+tests/macros.h
Depends-on:
unistd
extensions
include_next
+arg-nonnull
configure.ac:
gl_FUNC_GETOPT_POSIX
# We need the following in order to create <getopt.h> when the system
# doesn't have one that works with the given compiler.
-getopt.h: getopt.in.h $(LINK_WARNING_H)
+getopt.h: getopt.in.h $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \
- -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/getopt.in.h; \
} > $@-t && \
mv -f $@-t $@
Files:
+tests/macros.h
+tests/signature.h
tests/test-getopt.c
tests/test-getopt.h
tests/test-getopt_long.h
Depends-on:
+dup2
setenv
stdbool
unistd
Files:
+tests/signature.h
tests/test-gettimeofday.c
Depends-on:
progname
error
read-file
-list
+xlist
array-list
linkedhash-list
linked-list
Depends-on:
alloca
+arg-nonnull
d-type
dirfd
extensions
# We need the following in order to create <glob.h> when the system
# doesn't have one that works with the given compiler.
-glob.h: glob.in.h
+glob.h: glob.in.h $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/glob.in.h; \
} > $@-t && \
mv -f $@-t $@
Files:
tests/test-glob.c
+tests/signature.h
+tests/macros.h
Makefile.am:
TESTS += test-glob
Files:
tests/test-hash.c
+tests/macros.h
Depends-on:
hash-pjw
Files:
tests/test-i-ring.c
+tests/macros.h
Depends-on:
Files:
tests/test-iconv.c
+tests/signature.h
+tests/macros.h
Depends-on:
Depends-on:
gperf
include_next
+arg-nonnull
iconv
c-ctype
c-strcase
# We need the following in order to create <iconv.h> when the system
# doesn't have one that works with the given compiler.
-iconv.h: iconv.in.h
+iconv.h: iconv.in.h $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''REPLACE_ICONV''@|$(REPLACE_ICONV)|g' \
-e 's|@''REPLACE_ICONV_OPEN''@|$(REPLACE_ICONV_OPEN)|g' \
-e 's|@''REPLACE_ICONV_UTF''@|$(REPLACE_ICONV_UTF)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/iconv.in.h; \
} > $@-t && \
mv $@-t $@
Files:
tests/test-iconv-utf.c
+tests/macros.h
Depends-on:
tests/test-idpriv-drop.sh
tests/test-idpriv-drop.su.sh
tests/test-idpriv-drop.c
+tests/macros.h
Depends-on:
stdbool
tests/test-idpriv-droptemp.sh
tests/test-idpriv-droptemp.su.sh
tests/test-idpriv-droptemp.c
+tests/macros.h
Depends-on:
stdbool
Files:
tests/test-inet_ntop.c
+tests/signature.h
+tests/macros.h
Depends-on:
netinet_in
Files:
tests/test-inet_pton.c
+tests/signature.h
+tests/macros.h
Depends-on:
netinet_in
Description:
-Test for the 'inline' keyword or equivalent.
+Test for the 'inline' keyword or equivalent and whether it is actually
+effective.
Files:
m4/inline.m4
Depends-on:
include_next
link-warning
+arg-nonnull
multiarch
stdint
gl_INTTYPES_H
Makefile.am:
-BUILT_SOURCES += $(INTTYPES_H)
+BUILT_SOURCES += inttypes.h
# We need the following in order to create <inttypes.h> when the system
# doesn't have one that works with the given compiler.
-inttypes.h: inttypes.in.h $(LINK_WARNING_H)
+inttypes.h: inttypes.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
-e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \
-e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/inttypes.in.h; \
} > $@-t && \
mv $@-t $@
Makefile.am:
TESTS += test-inttypes
check_PROGRAMS += test-inttypes
-
-License:
-LGPL
Files:
tests/test-isblank.c
+tests/signature.h
+tests/macros.h
Depends-on:
Files:
lib/isdir.c
-m4/isdir.m4
+lib/isdir.h
Depends-on:
stat
configure.ac:
-gl_ISDIR
Makefile.am:
lib_SOURCES += isdir.c
Files:
tests/test-isfinite.c
+tests/macros.h
Depends-on:
float
TESTS += test-isfinite
check_PROGRAMS += test-isfinite
test_isfinite_LDADD = $(LDADD) @ISFINITE_LIBM@
-
-License:
-GPL
m4/exponentd.m4
m4/exponentl.m4
tests/test-isinf.c
+tests/macros.h
Depends-on:
float
TESTS += test-isinf
check_PROGRAMS += test-isinf
test_isinf_LDADD = $(LDADD) @ISINF_LIBM@
-
-License:
-GPL
Files:
tests/test-isnan.c
tests/nan.h
+tests/macros.h
Depends-on:
float
tests/test-isnand-nolibm.c
tests/test-isnand.h
tests/nan.h
+tests/macros.h
Depends-on:
tests/test-isnand.c
tests/test-isnand.h
tests/nan.h
+tests/macros.h
Depends-on:
tests/test-isnanf-nolibm.c
tests/test-isnanf.h
tests/nan.h
+tests/macros.h
Depends-on:
tests/test-isnanf.c
tests/test-isnanf.h
tests/nan.h
+tests/macros.h
Depends-on:
tests/test-isnanl-nolibm.c
tests/test-isnanl.h
tests/nan.h
+tests/macros.h
Depends-on:
float
tests/test-isnanl.c
tests/test-isnanl.h
tests/nan.h
+tests/macros.h
Depends-on:
float
--- /dev/null
+Description:
+A GNU-like <langinfo.h>.
+
+Files:
+lib/langinfo.in.h
+m4/langinfo_h.m4
+
+Depends-on:
+extensions
+include_next
+link-warning
+
+configure.ac:
+gl_LANGINFO_H
+
+Makefile.am:
+BUILT_SOURCES += langinfo.h
+
+# We need the following in order to create an empty placeholder for
+# <langinfo.h> when the system doesn't have one.
+langinfo.h: langinfo.in.h $(LINK_WARNING_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \
+ -e 's|@''GNULIB_NL_LANGINFO''@|$(GNULIB_NL_LANGINFO)|g' \
+ -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \
+ -e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \
+ -e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \
+ -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \
+ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ < $(srcdir)/langinfo.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += langinfo.h langinfo.h-t
+
+Include:
+<langinfo.h>
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
--- /dev/null
+Files:
+tests/test-langinfo.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-langinfo
+check_PROGRAMS += test-langinfo
Files:
+tests/nap.h
tests/test-lchown.h
tests/test-lchown.c
+tests/signature.h
+tests/macros.h
Depends-on:
mgetgroups
Files:
tests/test-ldexpl.c
tests/nan.h
+tests/signature.h
+tests/macros.h
Depends-on:
fpucw
Makefile.am:
TESTS += test-ldexpl
check_PROGRAMS += test-ldexpl
-
-License:
-LGPL
Files:
tests/test-link.h
tests/test-link.c
+tests/signature.h
+tests/macros.h
Depends-on:
errno
Description:
A C macro for emitting link time warnings.
+Applicability:
+all
+
Files:
build-aux/link-warning.h
configure.ac:
Makefile.am:
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+
BUILT_SOURCES += link-warning.h
# The link-warning.h that gets inserted into generated .h files is the same as
# build-aux/link-warning.h, except that it has the copyright header cut off.
Files:
tests/test-link.h
tests/test-linkat.c
+tests/signature.h
+tests/macros.h
Depends-on:
areadlink-with-size
Depends-on:
list
-xalloc
configure.ac:
Files:
tests/test-linked_list.c
+tests/macros.h
Depends-on:
array-list
Makefile.am:
TESTS += test-linked_list
check_PROGRAMS += test-linked_list
-test_linked_list_LDADD = $(LDADD) @LIBINTL@
Depends-on:
list
stdint
-xalloc
xsize
configure.ac:
Files:
tests/test-linkedhash_list.c
+tests/macros.h
Depends-on:
array-list
Makefile.am:
TESTS += test-linkedhash_list
check_PROGRAMS += test-linkedhash_list
-test_linkedhash_list_LDADD = $(LDADD) @LIBINTL@
lib/ref-add.sin
lib/ref-del.sin
m4/codeset.m4
-m4/fcntl_h.m4
+m4/fcntl-o.m4
m4/glibc21.m4
m4/localcharset.m4
Depends-on:
configmake
+extensions
configure.ac:
gl_LOCALCHARSET
Depends-on:
include_next
+arg-nonnull
extensions
+link-warning
stddef
configure.ac:
gl_LOCALE_H
Makefile.am:
-BUILT_SOURCES += $(LOCALE_H)
+BUILT_SOURCES += locale.h
# We need the following in order to create <locale.h> when the system
# doesn't have one that provides all definitions.
-locale.h: locale.in.h
+locale.h: locale.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''GNULIB_DUPLOCALE''@|$(GNULIB_DUPLOCALE)|g' \
-e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \
-e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \
+ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/locale.in.h; \
} > $@-t && \
mv $@-t $@
Makefile.am:
TESTS += test-locale
check_PROGRAMS += test-locale
-
-License:
-LGPL
Depends-on:
strdup
+lock
configure.ac:
gl_LOCALENAME
Files:
tests/test-localename.c
+tests/macros.h
Depends-on:
locale
setenv
unsetenv
+strdup
configure.ac:
+AC_CHECK_FUNCS_ONCE([newlocale])
Makefile.am:
TESTS += test-localename
Files:
tests/test-lseek.c
tests/test-lseek.sh
+tests/signature.h
+tests/macros.h
Depends-on:
Files:
tests/test-lstat.h
tests/test-lstat.c
+tests/signature.h
+tests/macros.h
Depends-on:
errno
Depends-on:
include_next
link-warning
+arg-nonnull
configure.ac:
gl_MATH_H
# We need the following in order to create <math.h> when the system
# doesn't have one that works with the given compiler.
-math.h: math.in.h $(LINK_WARNING_H)
+math.h: math.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \
-e 's|@''REPLACE_SIGNBIT_USING_GCC''@|$(REPLACE_SIGNBIT_USING_GCC)|g' \
-e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/math.in.h; \
} > $@-t && \
mv $@-t $@
Makefile.am:
TESTS += test-math
check_PROGRAMS += test-math
-
-License:
-LGPL
tests/test-mbmemcasecmp3.sh
tests/test-mbmemcasecmp.c
tests/test-mbmemcasecmp.h
+tests/macros.h
m4/locale-fr.m4
m4/locale-tr.m4
m4/codeset.m4
tests/test-mbmemcasecoll3.sh
tests/test-mbmemcasecoll.c
tests/test-mbmemcasecmp.h
+tests/macros.h
m4/locale-fr.m4
m4/locale-tr.m4
m4/codeset.m4
tests/test-mbrtowc3.sh
tests/test-mbrtowc4.sh
tests/test-mbrtowc.c
+tests/signature.h
+tests/macros.h
m4/locale-fr.m4
m4/locale-ja.m4
m4/locale-zh.m4
Files:
tests/test-mbscasecmp.sh
tests/test-mbscasecmp.c
+tests/macros.h
m4/locale-tr.m4
m4/codeset.m4
tests/test-mbscasestr3.c
tests/test-mbscasestr4.sh
tests/test-mbscasestr4.c
+tests/macros.h
m4/locale-fr.m4
m4/locale-tr.m4
m4/locale-zh.m4
Files:
tests/test-mbschr.sh
tests/test-mbschr.c
+tests/macros.h
m4/locale-zh.m4
m4/codeset.m4
Files:
tests/test-mbscspn.sh
tests/test-mbscspn.c
+tests/macros.h
m4/locale-fr.m4
m4/codeset.m4
Files:
tests/test-mbsinit.sh
tests/test-mbsinit.c
+tests/signature.h
+tests/macros.h
m4/locale-fr.m4
m4/codeset.m4
Files:
tests/test-mbsncasecmp.sh
tests/test-mbsncasecmp.c
+tests/macros.h
m4/locale-tr.m4
m4/codeset.m4
tests/test-mbsnrtowcs3.sh
tests/test-mbsnrtowcs4.sh
tests/test-mbsnrtowcs.c
+tests/signature.h
+tests/macros.h
m4/locale-fr.m4
m4/locale-ja.m4
m4/locale-zh.m4
Files:
tests/test-mbspbrk.sh
tests/test-mbspbrk.c
+tests/macros.h
m4/locale-fr.m4
m4/codeset.m4
Files:
tests/test-mbspcasecmp.sh
tests/test-mbspcasecmp.c
+tests/macros.h
m4/locale-tr.m4
m4/codeset.m4
Files:
tests/test-mbsrchr.sh
tests/test-mbsrchr.c
+tests/macros.h
m4/locale-zh.m4
m4/codeset.m4
tests/test-mbsrtowcs3.sh
tests/test-mbsrtowcs4.sh
tests/test-mbsrtowcs.c
+tests/signature.h
+tests/macros.h
m4/locale-fr.m4
m4/locale-ja.m4
m4/locale-zh.m4
Files:
tests/test-mbsspn.sh
tests/test-mbsspn.c
+tests/macros.h
m4/locale-fr.m4
m4/codeset.m4
tests/test-mbsstr2.c
tests/test-mbsstr3.sh
tests/test-mbsstr3.c
+tests/macros.h
m4/locale-fr.m4
m4/locale-zh.m4
m4/codeset.m4
Files:
tests/test-memchr.c
tests/zerosize-ptr.h
+tests/signature.h
+tests/macros.h
Depends-on:
Files:
tests/test-memchr2.c
tests/zerosize-ptr.h
+tests/macros.h
m4/mmap-anon.m4
Depends-on:
Files:
tests/test-memcmp.c
tests/zerosize-ptr.h
+tests/signature.h
+tests/macros.h
m4/mmap-anon.m4
Depends-on:
Files:
tests/test-memmem.c
tests/zerosize-ptr.h
+tests/signature.h
+tests/macros.h
m4/mmap-anon.m4
Depends-on:
Files:
tests/test-memrchr.c
tests/zerosize-ptr.h
+tests/signature.h
+tests/macros.h
m4/mmap-anon.m4
Depends-on:
Files:
tests/test-mkdir.h
tests/test-mkdir.c
+tests/signature.h
+tests/macros.h
Depends-on:
stdbool
Files:
tests/test-mkfifo.h
tests/test-mkfifo.c
+tests/signature.h
+tests/macros.h
Depends-on:
stdbool
Files:
tests/test-mkfifo.h
tests/test-mkfifoat.c
+tests/signature.h
+tests/macros.h
Depends-on:
symlink
mkfifo
stat
sys_stat
+extensions
configure.ac:
gl_FUNC_MKNOD
Files:
tests/test-mkfifo.h
tests/test-mknod.c
+tests/signature.h
+tests/macros.h
Depends-on:
stdbool
Files:
tests/test-nanosleep.c
+tests/signature.h
+tests/macros.h
Depends-on:
Depends-on:
include_next
+arg-nonnull
sys_socket
configure.ac:
# We need the following in order to create <netdb.h> when the system
# doesn't have one that works with the given compiler.
-netdb.h: netdb.in.h
+netdb.h: netdb.in.h $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''HAVE_DECL_GAI_STRERROR''@|$(HAVE_DECL_GAI_STRERROR)|g' \
-e 's|@''HAVE_DECL_GETADDRINFO''@|$(HAVE_DECL_GETADDRINFO)|g' \
-e 's|@''HAVE_DECL_GETNAMEINFO''@|$(HAVE_DECL_GETNAMEINFO)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/netdb.in.h; \
} > $@-t && \
mv $@-t $@
Makefile.am:
TESTS += test-netdb
check_PROGRAMS += test-netdb
-
-License:
-LGPL
Makefile.am:
TESTS += test-netinet_in
check_PROGRAMS += test-netinet_in
-
-License:
-LGPL
--- /dev/null
+Description:
+nl_langinfo() function: query locale dependent information.
+
+Files:
+lib/nl_langinfo.c
+m4/nl_langinfo.m4
+
+Depends-on:
+langinfo
+
+configure.ac:
+gl_FUNC_NL_LANGINFO
+gl_LANGINFO_MODULE_INDICATOR([nl_langinfo])
+
+Makefile.am:
+
+Include:
+<langinfo.h>
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
--- /dev/null
+Files:
+tests/test-nl_langinfo.sh
+tests/test-nl_langinfo.c
+tests/signature.h
+tests/macros.h
+m4/locale-fr.m4
+
+Depends-on:
+c-strcase
+
+configure.ac:
+gt_LOCALE_FR
+gt_LOCALE_FR_UTF8
+
+Makefile.am:
+TESTS += test-nl_langinfo.sh
+TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
+check_PROGRAMS += test-nl_langinfo
Files:
tests/test-obstack-printf.c
+tests/signature.h
+tests/macros.h
Depends-on:
progname
Files:
tests/test-open.h
tests/test-open.c
+tests/signature.h
+tests/macros.h
Depends-on:
stdbool
fcntl-h
fdopendir
gettext-h
-inline
intprops
lchown
lstat
GPL
Maintainer:
-Jim Meyering
+Jim Meyering, Eric Blake
Files:
tests/test-openat-safer.c
+tests/macros.h
Depends-on:
Files:
+tests/nap.h
tests/test-chown.h
tests/test-lchown.h
tests/test-lstat.h
tests/test-mkdirat.c
tests/test-openat.c
tests/test-unlinkat.c
+tests/signature.h
+tests/macros.h
Depends-on:
mgetgroups
Files:
+tests/signature.h
tests/test-perror.c
tests/test-perror.sh
tests/test-pipe-filter-gi2.sh
tests/test-pipe-filter-gi2-main.c
tests/test-pipe-filter-gi2-child.c
+tests/macros.h
Depends-on:
binary-io
tests/test-pipe-filter-ii2.sh
tests/test-pipe-filter-ii2-main.c
tests/test-pipe-filter-ii2-child.c
+tests/macros.h
Depends-on:
binary-io
Files:
tests/test-pipe.sh
tests/test-pipe.c
+tests/macros.h
Depends-on:
progname
unistd
fcntl-h
binary-io
+extensions
configure.ac:
gl_FUNC_PIPE2
without clobbering std{in,out,err}.
Files:
+lib/pipe2-safer.c
Depends-on:
-cloexec
+fd-safer-flag
pipe2
unistd-safer
gl_MODULE_INDICATOR([pipe2-safer])
Makefile.am:
+lib_SOURCES += pipe2-safer.c
Include:
"unistd-safer.h"
Files:
tests/test-pipe2.c
+tests/signature.h
+tests/macros.h
Depends-on:
stdbool
Files:
+tests/signature.h
tests/test-poll.c
Depends-on:
tests/test-popen.h
tests/test-popen-safer.c
tests/test-popen-safer2.c
+tests/macros.h
Depends-on:
dup2
Files:
tests/test-popen.h
tests/test-popen.c
+tests/signature.h
+tests/macros.h
Depends-on:
dup2
Files:
tests/test-posix_spawn3.c
+tests/signature.h
Depends-on:
posix_spawn_file_actions_init
tests/test-posix_spawn1.in.sh
tests/test-posix_spawn2.c
tests/test-posix_spawn2.in.sh
+tests/signature.h
Depends-on:
posix_spawn_file_actions_init
Files:
tests/test-posixtm.c
+tests/macros.h
Depends-on:
intprops
tests/test-pread.c
tests/test-pread.sh
tests/init.sh
+tests/signature.h
+tests/macros.h
Depends-on:
Files:
tests/test-printf-frexp.c
+tests/macros.h
Depends-on:
Makefile.am:
TESTS += test-printf-frexp
check_PROGRAMS += test-printf-frexp
-
-License:
-LGPL
Files:
tests/test-printf-frexpl.c
+tests/macros.h
Depends-on:
fpucw
Makefile.am:
TESTS += test-printf-frexpl
check_PROGRAMS += test-printf-frexpl
-
-License:
-LGPL
tests/test-printf-posix.output
tests/test-printf-posix2.sh
tests/test-printf-posix2.c
+tests/signature.h
+tests/macros.h
Depends-on:
stdint
Files:
tests/test-priv-set.c
+tests/macros.h
Depends-on:
Makefile.am:
TESTS += test-priv-set
check_PROGRAMS += test-priv-set
-
-License:
-GPL
Files:
+tests/signature.h
tests/test-pty.c
Makefile.am:
Files:
tests/test-quotearg.sh
tests/test-quotearg.c
+tests/macros.h
tests/locale/fr/LC_MESSAGES/test-quotearg.po
tests/locale/fr/LC_MESSAGES/test-quotearg.mo
m4/locale-fr.m4
Files:
tests/test-random_r.c
+tests/signature.h
+tests/macros.h
Depends-on:
Makefile.am:
TESTS += test-random_r
check_PROGRAMS += test-random_r
-
-License:
-LGPL
Files:
tests/test-rawmemchr.c
+tests/signature.h
+tests/macros.h
Depends-on:
Depends-on:
list
-xalloc
configure.ac:
Files:
tests/test-rbtree_list.c
+tests/macros.h
Depends-on:
array-list
Makefile.am:
TESTS += test-rbtree_list
check_PROGRAMS += test-rbtree_list
-test_rbtree_list_LDADD = $(LDADD) @LIBINTL@
Depends-on:
oset
-xalloc
configure.ac:
Files:
tests/test-rbtree_oset.c
+tests/macros.h
Depends-on:
array-oset
Makefile.am:
TESTS += test-rbtree_oset
check_PROGRAMS += test-rbtree_oset
-test_rbtree_oset_LDADD = $(LDADD) @LIBINTL@
list
rbtree-oset
stdint
-xalloc
xsize
configure.ac:
Files:
tests/test-rbtreehash_list.c
+tests/macros.h
Depends-on:
array-list
Makefile.am:
TESTS += test-rbtreehash_list
check_PROGRAMS += test-rbtreehash_list
-test_rbtreehash_list_LDADD = $(LDADD) @LIBINTL@
Files:
tests/test-readlink.h
tests/test-readlink.c
+tests/signature.h
+tests/macros.h
Depends-on:
stdbool
Files:
tests/test-remove.c
+tests/signature.h
+tests/macros.h
Depends-on:
symlink
Files:
tests/test-rename.h
tests/test-rename.c
+tests/signature.h
+tests/macros.h
Depends-on:
errno
Files:
tests/test-rename.h
tests/test-renameat.c
+tests/signature.h
+tests/macros.h
Depends-on:
filenamecat
Files:
tests/test-rmdir.h
tests/test-rmdir.c
+tests/signature.h
+tests/macros.h
Depends-on:
stdbool
tests/test-round1.c
tests/test-round2.c
tests/nan.h
+tests/signature.h
+tests/macros.h
Depends-on:
isnand-nolibm
check_PROGRAMS += test-round1 test-round2
test_round1_LDADD = $(LDADD) @ROUND_LIBM@
test_round2_LDADD = $(LDADD) @ROUND_LIBM@
-
-License:
-LGPL
tests/test-round2.c
tests/test-roundf2.c
tests/nan.h
+tests/signature.h
+tests/macros.h
Depends-on:
ceilf
check_PROGRAMS += test-roundf1 test-roundf2
test_roundf1_LDADD = $(LDADD) @ROUNDF_LIBM@
test_roundf2_LDADD = $(LDADD) @ROUNDF_LIBM@
-
-License:
-LGPL
Files:
tests/test-roundl.c
tests/nan.h
+tests/signature.h
+tests/macros.h
Depends-on:
fpucw
TESTS += test-roundl
check_PROGRAMS += test-roundl
test_roundl_LDADD = $(LDADD) @ROUNDL_LIBM@
-
-License:
-LGPL
Files:
tests/test-safe-alloc.c
+tests/macros.h
Depends-on:
Depends-on:
include_next
link-warning
+arg-nonnull
configure.ac:
gl_SEARCH_H
# We need the following in order to create <search.h> when the system
# doesn't have one that works with the given compiler.
-search.h: search.in.h $(LINK_WARNING_H)
+search.h: search.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''HAVE_SEARCH_H''@|$(HAVE_SEARCH_H)|g' \
-e 's|@''HAVE_TSEARCH''@|$(HAVE_TSEARCH)|g' \
-e 's|@''REPLACE_TSEARCH''@|$(REPLACE_TSEARCH)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/search.in.h; \
} > $@-t && \
mv $@-t $@
Makefile.am:
TESTS += test-search
check_PROGRAMS += test-search
-
-License:
-LGPL
Files:
+tests/signature.h
tests/test-select.c
tests/test-select-fd.c
tests/test-select-in.sh
test_select_LDADD = $(LDADD) @LIBSOCKET@ $(INET_PTON_LIB)
test_select_fd_LDADD = $(LDADD) @LIBSOCKET@
test_select_stdin_LDADD = $(LDADD) @LIBSOCKET@
-
-License:
-LGPL
Depends-on:
errno
+unused-parameter
configure.ac:
gl_HEADERS_SELINUX_SELINUX_H
lib_SOURCES += se-context.in.h se-selinux.in.h
BUILT_SOURCES += selinux/selinux.h
-selinux/selinux.h: se-selinux.in.h
+selinux/selinux.h: se-selinux.in.h $(UNUSED_PARAMETER_H)
$(AM_V_at)$(MKDIR_P) selinux
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''NEXT_SELINUX_SELINUX_H''@|$(NEXT_SELINUX_SELINUX_H)|g' \
+ -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \
< $(srcdir)/se-selinux.in.h; \
} > $@-t && \
chmod a-x $@-t && \
MOSTLYCLEANFILES += selinux/selinux.h selinux/selinux.h-t
BUILT_SOURCES += $(SELINUX_CONTEXT_H)
-selinux/context.h: se-context.in.h
+selinux/context.h: se-context.in.h $(UNUSED_PARAMETER_H)
$(AM_V_at)$(MKDIR_P) selinux
$(AM_V_GEN)rm -f $@-t $@ && \
- cp $(srcdir)/se-context.in.h $@-t && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \
+ < $(srcdir)/se-context.in.h; \
+ } > $@-t && \
chmod a-x $@-t && \
mv $@-t $@
MOSTLYCLEANFILES += selinux/context.h selinux/context.h-t
Files:
tests/test-setenv.c
+tests/signature.h
+tests/macros.h
Depends-on:
Files:
tests/test-sigaction.c
+tests/signature.h
+tests/macros.h
Depends-on:
Depends-on:
include_next
link-warning
+arg-nonnull
configure.ac:
gl_SIGNAL_H
# We need the following in order to create <signal.h> when the system
# doesn't have a complete one.
-signal.h: signal.in.h $(LINK_WARNING_H)
+signal.h: signal.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \
-e 's|@''HAVE_TYPE_VOLATILE_SIG_ATOMIC_T''@|$(HAVE_TYPE_VOLATILE_SIG_ATOMIC_T)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/signal.in.h; \
} > $@-t && \
mv $@-t $@
Makefile.am:
TESTS += test-signal
check_PROGRAMS += test-signal
-
-License:
-LGPL
Files:
tests/test-signbit.c
+tests/macros.h
m4/exponentf.m4
m4/exponentd.m4
m4/exponentl.m4
Files:
tests/test-sleep.c
+tests/signature.h
+tests/macros.h
Depends-on:
tests/test-snprintf-posix.h
tests/test-snprintf.c
tests/nan.h
+tests/signature.h
+tests/macros.h
Depends-on:
stdint
Files:
tests/test-snprintf.c
+tests/signature.h
+tests/macros.h
Depends-on:
Depends-on:
include_next
link-warning
+arg-nonnull
sched
configure.ac:
gl_SPAWN_H
Makefile.am:
-BUILT_SOURCES += $(SPAWN_H)
+BUILT_SOURCES += spawn.h
# We need the following in order to create a replacement for <spawn.h> when
# the system doesn't have one.
-spawn.h: spawn.in.h $(LINK_WARNING_H)
+spawn.h: spawn.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''HAVE_SPAWN_H''@|$(HAVE_SPAWN_H)|g' \
-e 's|@''GNULIB_POSIX_SPAWNATTR_SETSIGMASK''@|$(GNULIB_POSIX_SPAWNATTR_SETSIGMASK)|g' \
-e 's|@''GNULIB_POSIX_SPAWNATTR_DESTROY''@|$(GNULIB_POSIX_SPAWNATTR_DESTROY)|g' \
-e 's|@''HAVE_POSIX_SPAWN''@|$(HAVE_POSIX_SPAWN)|g' \
+ -e 's|@''HAVE_POSIX_SPAWNATTR_T''@|$(HAVE_POSIX_SPAWNATTR_T)|g' \
+ -e 's|@''HAVE_POSIX_SPAWN_FILE_ACTIONS_T''@|$(HAVE_POSIX_SPAWN_FILE_ACTIONS_T)|g' \
-e 's|@''REPLACE_POSIX_SPAWN''@|$(REPLACE_POSIX_SPAWN)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/spawn.in.h; \
} > $@-t && \
mv $@-t $@
--- /dev/null
+Files:
+tests/test-spawn.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-spawn
+check_PROGRAMS += test-spawn
tests/test-sprintf-posix.c
tests/test-sprintf-posix.h
tests/nan.h
+tests/signature.h
+tests/macros.h
Depends-on:
stdint
Files:
tests/test-stat.h
tests/test-stat.c
+tests/signature.h
+tests/macros.h
Depends-on:
pathmax
Depends-on:
time
+extensions
configure.ac:
gl_STAT_TIME
Files:
tests/test-stat-time.c
+tests/macros.h
Depends-on:
time
Makefile.am:
TESTS += test-stdbool
check_PROGRAMS += test-stdbool
-
-License:
-LGPL
Makefile.am:
TESTS += test-stddef
check_PROGRAMS += test-stddef
-
-License:
-LGPL
Makefile.am:
TESTS += test-stdint
check_PROGRAMS += test-stdint
-
-License:
-LGPL
Depends-on:
include_next
link-warning
+arg-nonnull
raise
stddef
# We need the following in order to create <stdio.h> when the system
# doesn't have one that works with the given compiler.
-stdio.h: stdio.in.h $(LINK_WARNING_H)
+stdio.h: stdio.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \
-e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/stdio.in.h; \
} > $@-t && \
mv $@-t $@
Makefile.am:
TESTS += test-stdio
check_PROGRAMS += test-stdio
-
-License:
-LGPL
Depends-on:
include_next
link-warning
+arg-nonnull
unistd
stddef
stdint
# We need the following in order to create <stdlib.h> when the system
# doesn't have one that works with the given compiler.
-stdlib.h: stdlib.in.h $(LINK_WARNING_H)
+stdlib.h: stdlib.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
-e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/stdlib.in.h; \
} > $@-t && \
mv $@-t $@
m4/stdlib-safer.m4
Depends-on:
+fd-safer-flag
mkstemp
stdlib
unistd-safer
Makefile.am:
TESTS += test-stdlib
check_PROGRAMS += test-stdlib
-
-License:
-LGPL
strcase
memchr
memcmp
+extensions
configure.ac:
gl_FUNC_STRCASESTR_SIMPLE
Files:
tests/test-strcasestr.c
+tests/signature.h
+tests/macros.h
Depends-on:
Files:
tests/test-strchrnul.c
+tests/signature.h
+tests/macros.h
Depends-on:
Files:
tests/test-strerror.c
+tests/signature.h
+tests/macros.h
Depends-on:
Files:
tests/test-striconv.c
+tests/macros.h
Depends-on:
Files:
tests/test-striconveh.c
+tests/macros.h
Depends-on:
Files:
tests/test-striconveha.c
+tests/macros.h
Depends-on:
extensions
include_next
link-warning
+arg-nonnull
stddef
configure.ac:
# We need the following in order to create <string.h> when the system
# doesn't have one that works with the given compiler.
-string.h: string.in.h $(LINK_WARNING_H)
+string.h: string.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
-e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/string.in.h; \
} > $@-t && \
mv $@-t $@
Makefile.am:
TESTS += test-string
check_PROGRAMS += test-string
-
-License:
-LGPL
Depends-on:
include_next
link-warning
+arg-nonnull
configure.ac:
gl_HEADER_STRINGS_H
# We need the following in order to create <strings.h> when the system
# doesn't have one that works with the given compiler.
-strings.h: strings.in.h $(LINK_WARNING_H)
+strings.h: strings.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \
-e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/strings.in.h; \
} > $@-t && \
mv $@-t $@
Makefile.am:
TESTS += test-strings
check_PROGRAMS += test-strings
-
-License:
-LGPL
tls
snprintf
memset
+extensions
configure.ac:
gl_FUNC_STRSIGNAL
Files:
tests/test-strsignal.c
+tests/signature.h
+tests/macros.h
Depends-on:
Files:
tests/test-strstr.c
tests/zerosize-ptr.h
+tests/signature.h
+tests/macros.h
m4/mmap-anon.m4
Depends-on:
Files:
tests/test-strtod.c
+tests/signature.h
+tests/macros.h
Depends-on:
float
Files:
tests/test-strverscmp.c
+tests/signature.h
+tests/macros.h
Depends-on:
Depends-on:
list
-xalloc
configure.ac:
Files:
tests/test-symlink.h
tests/test-symlink.c
+tests/signature.h
+tests/macros.h
Depends-on:
stdbool
tests/test-readlink.h
tests/test-symlink.h
tests/test-symlinkat.c
+tests/signature.h
+tests/macros.h
Depends-on:
AC_PROG_MKDIR_P
Makefile.am:
-BUILT_SOURCES += $(SYS_FILE_H)
+BUILT_SOURCES += sys/file.h
# We need the following in order to create <sys/file.h> when the system
# has one that is incomplete.
-sys/file.h: sys_file.in.h
+sys/file.h: sys_file.in.h $(LINK_WARNING_H)
$(AM_V_at)$(MKDIR_P) sys
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-e 's|@''NEXT_SYS_FILE_H''@|$(NEXT_SYS_FILE_H)|g' \
-e 's/@''HAVE_FLOCK''@/$(HAVE_FLOCK)/g' \
-e 's/@''GNULIB_FLOCK''@/$(GNULIB_FLOCK)/g' \
+ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
< $(srcdir)/sys_file.in.h; \
} > $@-t && \
mv $@-t $@
--- /dev/null
+Files:
+tests/test-sys_file.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-sys_file
+check_PROGRAMS += test-sys_file
AC_PROG_MKDIR_P
Makefile.am:
-BUILT_SOURCES += $(SYS_IOCTL_H)
+BUILT_SOURCES += sys/ioctl.h
# We need the following in order to create <sys/ioctl.h> when the system
# does not have a complete one.
--- /dev/null
+Files:
+tests/test-sys_ioctl.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-sys_ioctl
+check_PROGRAMS += test-sys_ioctl
AC_PROG_MKDIR_P
Makefile.am:
-BUILT_SOURCES += $(SYS_SELECT_H)
+BUILT_SOURCES += sys/select.h
# We need the following in order to create <sys/select.h> when the system
# doesn't have one that works with the given compiler.
Makefile.am:
TESTS += test-sys_select
check_PROGRAMS += test-sys_select
-
-License:
-LGPL
Depends-on:
include_next
link-warning
+arg-nonnull
errno
alignof
AC_PROG_MKDIR_P
Makefile.am:
-BUILT_SOURCES += $(SYS_SOCKET_H)
+BUILT_SOURCES += sys/socket.h
# We need the following in order to create <sys/socket.h> when the system
# doesn't have one that works with the given compiler.
-sys/socket.h: sys_socket.in.h $(LINK_WARNING_H)
+sys/socket.h: sys_socket.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
$(AM_V_at)$(MKDIR_P) sys
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-e 's|@''HAVE_SA_FAMILY_T''@|$(HAVE_SA_FAMILY_T)|g' \
-e 's|@''HAVE_ACCEPT4''@|$(HAVE_ACCEPT4)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/sys_socket.in.h; \
} > $@-t && \
mv -f $@-t $@
Makefile.am:
TESTS += test-sys_socket
check_PROGRAMS += test-sys_socket
-
-License:
-LGPL
Depends-on:
include_next
link-warning
+arg-nonnull
time
configure.ac:
# We need the following in order to create <sys/stat.h> when the system
# has one that is incomplete.
-sys/stat.h: sys_stat.in.h $(LINK_WARNING_H)
+sys/stat.h: sys_stat.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
$(AM_V_at)$(MKDIR_P) sys
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \
-e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/sys_stat.in.h; \
} > $@-t && \
mv $@-t $@
Makefile.am:
TESTS += test-sys_stat
check_PROGRAMS += test-sys_stat
-
-License:
-LGPL
Depends-on:
include_next
+arg-nonnull
configure.ac:
gl_HEADER_SYS_TIME_H
# We need the following in order to create <sys/time.h> when the system
# doesn't have one that works with the given compiler.
-sys/time.h: sys_time.in.h
+sys/time.h: sys_time.in.h $(ARG_NONNULL_H)
$(AM_V_at)$(MKDIR_P) sys
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \
-e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \
-e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/sys_time.in.h; \
} > $@-t && \
mv $@-t $@
Makefile.am:
TESTS += test-sys_time
check_PROGRAMS += test-sys_time
-
-License:
-LGPL
m4/sys_times_h.m4
Depends-on:
+arg-nonnull
+include_next
link-warning
configure.ac:
AC_PROG_MKDIR_P
Makefile.am:
-BUILT_SOURCES += $(SYS_TIMES_H)
+BUILT_SOURCES += sys/times.h
# We need the following in order to create <sys/times.h> when the system
# doesn't have one that works with the given compiler.
-sys/times.h: sys_times.in.h $(LINK_WARNING_H)
+sys/times.h: sys_times.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
$(AM_V_at)$(MKDIR_P) sys
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''GNULIB_TIMES''@|$(GNULIB_TIMES)|g' \
+ sed -e 's/@''HAVE_SYS_TIMES_H''@/$(HAVE_SYS_TIMES_H)/g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_SYS_TIMES_H''@|$(NEXT_SYS_TIMES_H)|g' \
+ -e 's|@''GNULIB_TIMES''@|$(GNULIB_TIMES)|g' \
+ -e 's|@''HAVE_STRUCT_TMS''@|$(HAVE_STRUCT_TMS)|g' \
+ -e 's|@''HAVE_TIMES''@|$(HAVE_TIMES)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/sys_times.in.h; \
} > $@-t && \
mv $@-t $@
m4/sys_utsname_h.m4
Depends-on:
+arg-nonnull
+include_next
link-warning
configure.ac:
AC_PROG_MKDIR_P
Makefile.am:
-BUILT_SOURCES += $(SYS_UTSNAME_H)
+BUILT_SOURCES += sys/utsname.h
# We need the following in order to create <sys/utsname.h> when the system
# does not have one.
-sys/utsname.h: sys_utsname.in.h $(LINK_WARNING_H)
+sys/utsname.h: sys_utsname.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
$(AM_V_at)$(MKDIR_P) sys
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's|@''GNULIB_UNAME''@|$(GNULIB_UNAME)|g' \
+ sed -e 's/@''HAVE_SYS_UTSNAME_H''@/$(HAVE_SYS_UTSNAME_H)/g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_SYS_UTSNAME_H''@|$(NEXT_SYS_UTSNAME_H)|g' \
+ -e 's|@''GNULIB_UNAME''@|$(GNULIB_UNAME)|g' \
+ -e 's|@''HAVE_STRUCT_UTSNAME''@|$(HAVE_STRUCT_UTSNAME)|g' \
-e 's|@''HAVE_UNAME''@|$(HAVE_UNAME)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/sys_utsname.in.h; \
} > $@-t && \
mv $@-t $@
Makefile.am:
TESTS += test-sys_utsname
check_PROGRAMS += test-sys_utsname
-
-License:
-LGPL
Depends-on:
include_next
-link-warning
configure.ac:
gl_SYS_WAIT_H
AC_PROG_MKDIR_P
Makefile.am:
-BUILT_SOURCES += $(SYS_WAIT_H)
+BUILT_SOURCES += sys/wait.h
# We need the following in order to create <sys/wait.h> when the system
# has one that is incomplete.
-sys/wait.h: sys_wait.in.h $(LINK_WARNING_H)
+sys/wait.h: sys_wait.in.h
$(AM_V_at)$(MKDIR_P) sys
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''NEXT_SYS_WAIT_H''@|$(NEXT_SYS_WAIT_H)|g' \
- -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
< $(srcdir)/sys_wait.in.h; \
} > $@-t && \
mv $@-t $@
--- /dev/null
+Files:
+tests/test-sys_wait.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-sys_wait
+check_PROGRAMS += test-sys_wait
Makefile.am:
TESTS += test-sysexits
check_PROGRAMS += test-sysexits
-
-License:
-LGPL
Depends-on:
extensions
include_next
+arg-nonnull
stddef
configure.ac:
# We need the following in order to create <time.h> when the system
# doesn't have one that works with the given compiler.
-time.h: time.in.h
+time.h: time.in.h $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|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 '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/time.in.h; \
} > $@-t && \
mv $@-t $@
Makefile.am:
TESTS += test-time
check_PROGRAMS += test-time
-
-License:
-LGPL
Files:
lib/times.c
+m4/times.m4
Depends-on:
sys_times
configure.ac:
-AC_CHECK_FUNCS_ONCE([times])
-if test $ac_cv_func_times = no; then
- AC_LIBOBJ([times])
-fi
+gl_FUNC_TIMES
gl_SYS_TIMES_MODULE_INDICATOR([times])
Makefile.am:
Files:
+tests/signature.h
tests/test-times.c
Makefile.am:
tests/test-trunc1.c
tests/test-trunc2.c
tests/nan.h
+tests/signature.h
+tests/macros.h
Depends-on:
float
check_PROGRAMS += test-trunc1 test-trunc2
test_trunc1_LDADD = $(LDADD) @TRUNC_LIBM@
test_trunc2_LDADD = $(LDADD) @TRUNC_LIBM@
-
-License:
-LGPL
tests/test-truncf1.c
tests/test-truncf2.c
tests/nan.h
+tests/signature.h
+tests/macros.h
Depends-on:
float
check_PROGRAMS += test-truncf1 test-truncf2
test_truncf1_LDADD = $(LDADD) @TRUNCF_LIBM@
test_truncf2_LDADD = $(LDADD) @TRUNCF_LIBM@
-
-License:
-LGPL
Files:
tests/test-truncl.c
tests/nan.h
+tests/signature.h
+tests/macros.h
Depends-on:
fpucw
TESTS += test-truncl
check_PROGRAMS += test-truncl
test_truncl_LDADD = $(LDADD) @TRUNCL_LIBM@
-
-License:
-LGPL
Files:
tests/test-tsearch.sh
tests/test-tsearch.c
+tests/signature.h
Depends-on:
stdint
TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@'
check_PROGRAMS += test-tsearch
test_tsearch_LDADD = $(LDADD) @TEST_TSEARCH_LIBM@
-
-License:
-LGPL
Depends-on:
stdint
+configure.ac:
+AC_REQUIRE([AC_C_INLINE])
+
+Makefile.am:
+
Include:
"u64.h"
Files:
tests/test-uname.c
+tests/signature.h
+tests/macros.h
Depends-on:
Depends-on:
unitypes
stdbool
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unicase/cased.c
tests/unicase/test-cased.c
tests/unicase/test-predicate-part1.h
tests/unicase/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unitypes
stdbool
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unicase/ignorable.c
tests/unicase/test-ignorable.c
tests/unicase/test-predicate-part1.h
tests/unicase/test-predicate-part2.h
+tests/macros.h
Depends-on:
Files:
tests/unicase/test-locale-language.sh
tests/unicase/test-locale-language.c
+tests/macros.h
m4/locale-fr.m4
m4/locale-ja.m4
m4/locale-tr.m4
tests/unicase/test-uc_tolower.c
tests/unicase/test-mapping-part1.h
tests/unicase/test-mapping-part2.h
+tests/macros.h
Depends-on:
tests/unicase/test-uc_totitle.c
tests/unicase/test-mapping-part1.h
tests/unicase/test-mapping-part2.h
+tests/macros.h
Depends-on:
tests/unicase/test-uc_toupper.c
tests/unicase/test-mapping-part1.h
tests/unicase/test-mapping-part2.h
+tests/macros.h
Depends-on:
Files:
tests/unicase/test-u16-casecmp.c
tests/unicase/test-casecmp.h
+tests/macros.h
Depends-on:
uninorm/nfd
Files:
tests/unicase/test-u16-casecoll.c
tests/unicase/test-casecmp.h
+tests/macros.h
Depends-on:
uninorm/nfc
Files:
tests/unicase/test-u16-casefold.c
+tests/macros.h
Depends-on:
unistr/u16-cmp
Files:
tests/unicase/test-u16-is-cased.c
tests/unicase/test-is-cased.h
+tests/macros.h
Depends-on:
Files:
tests/unicase/test-u16-is-casefolded.c
tests/unicase/test-is-casefolded.h
+tests/macros.h
Depends-on:
Files:
tests/unicase/test-u16-is-lowercase.c
tests/unicase/test-is-lowercase.h
+tests/macros.h
Depends-on:
Files:
tests/unicase/test-u16-is-titlecase.c
tests/unicase/test-is-titlecase.h
+tests/macros.h
Depends-on:
Files:
tests/unicase/test-u16-is-uppercase.c
tests/unicase/test-is-uppercase.h
+tests/macros.h
Depends-on:
Files:
tests/unicase/test-u16-tolower.c
+tests/macros.h
Depends-on:
unistr/u16-cmp
Files:
tests/unicase/test-u16-totitle.c
+tests/macros.h
Depends-on:
unistr/u16-cmp
Files:
tests/unicase/test-u16-toupper.c
+tests/macros.h
Depends-on:
unistr/u16-cmp
Files:
tests/unicase/test-u32-casecmp.c
tests/unicase/test-casecmp.h
+tests/macros.h
Depends-on:
uninorm/nfd
Files:
tests/unicase/test-u32-casecoll.c
tests/unicase/test-casecmp.h
+tests/macros.h
Depends-on:
uninorm/nfc
Files:
tests/unicase/test-u32-casefold.c
+tests/macros.h
Depends-on:
unistr/u32-cmp
Files:
tests/unicase/test-u32-is-cased.c
tests/unicase/test-is-cased.h
+tests/macros.h
Depends-on:
Files:
tests/unicase/test-u32-is-casefolded.c
tests/unicase/test-is-casefolded.h
+tests/macros.h
Depends-on:
Files:
tests/unicase/test-u32-is-lowercase.c
tests/unicase/test-is-lowercase.h
+tests/macros.h
Depends-on:
Files:
tests/unicase/test-u32-is-titlecase.c
tests/unicase/test-is-titlecase.h
+tests/macros.h
Depends-on:
Files:
tests/unicase/test-u32-is-uppercase.c
tests/unicase/test-is-uppercase.h
+tests/macros.h
Depends-on:
Files:
tests/unicase/test-u32-tolower.c
+tests/macros.h
Depends-on:
unistr/u32-cmp
Files:
tests/unicase/test-u32-totitle.c
+tests/macros.h
Depends-on:
unistr/u32-cmp
Files:
tests/unicase/test-u32-toupper.c
+tests/macros.h
Depends-on:
unistr/u32-cmp
Files:
tests/unicase/test-u8-casecmp.c
tests/unicase/test-casecmp.h
+tests/macros.h
Depends-on:
uninorm/nfd
Files:
tests/unicase/test-u8-casecoll.c
tests/unicase/test-casecmp.h
+tests/macros.h
Depends-on:
uninorm/nfc
Files:
tests/unicase/test-u8-casefold.c
+tests/macros.h
Depends-on:
unistr/u8-cmp
Files:
tests/unicase/test-u8-is-cased.c
tests/unicase/test-is-cased.h
+tests/macros.h
Depends-on:
Files:
tests/unicase/test-u8-is-casefolded.c
tests/unicase/test-is-casefolded.h
+tests/macros.h
Depends-on:
Files:
tests/unicase/test-u8-is-lowercase.c
tests/unicase/test-is-lowercase.h
+tests/macros.h
Depends-on:
Files:
tests/unicase/test-u8-is-titlecase.c
tests/unicase/test-is-titlecase.h
+tests/macros.h
Depends-on:
Files:
tests/unicase/test-u8-is-uppercase.c
tests/unicase/test-is-uppercase.h
+tests/macros.h
Depends-on:
Files:
tests/unicase/test-u8-tolower.c
+tests/macros.h
Depends-on:
unistr/u8-cmp
Files:
tests/unicase/test-u8-totitle.c
+tests/macros.h
Depends-on:
unistr/u8-cmp
Files:
tests/unicase/test-u8-toupper.c
+tests/macros.h
Depends-on:
unistr/u8-cmp
tests/unicase/test-ulc-casecmp2.sh
tests/unicase/test-ulc-casecmp.c
tests/unicase/test-casecmp.h
+tests/macros.h
m4/locale-fr.m4
m4/codeset.m4
tests/unicase/test-ulc-casecoll2.sh
tests/unicase/test-ulc-casecoll.c
tests/unicase/test-casecmp.h
+tests/macros.h
m4/locale-fr.m4
m4/codeset.m4
Files:
tests/uniconv/test-u16-conv-from-enc.c
+tests/macros.h
Depends-on:
unistr/u16-cmp
Files:
tests/uniconv/test-u16-conv-to-enc.c
+tests/macros.h
Depends-on:
Files:
tests/uniconv/test-u16-strconv-from-enc.c
+tests/macros.h
Depends-on:
unistr/u16-strcmp
Files:
tests/uniconv/test-u16-strconv-to-enc.c
+tests/macros.h
Depends-on:
unistr/u16-strcmp
Files:
tests/uniconv/test-u32-conv-from-enc.c
+tests/macros.h
Depends-on:
unistr/u32-cmp
Files:
tests/uniconv/test-u32-conv-to-enc.c
+tests/macros.h
Depends-on:
Files:
tests/uniconv/test-u32-strconv-from-enc.c
+tests/macros.h
Depends-on:
unistr/u32-strcmp
Files:
tests/uniconv/test-u32-strconv-to-enc.c
+tests/macros.h
Depends-on:
unistr/u32-strcmp
Files:
tests/uniconv/test-u8-conv-from-enc.c
+tests/macros.h
Depends-on:
unistr/u8-strlen
Files:
tests/uniconv/test-u8-conv-to-enc.c
+tests/macros.h
Depends-on:
unistr/u8-strlen
Files:
tests/uniconv/test-u8-strconv-from-enc.c
+tests/macros.h
Depends-on:
unistr/u8-strcmp
Files:
tests/uniconv/test-u8-strconv-to-enc.c
+tests/macros.h
Depends-on:
unistr/u8-strcmp
Files:
tests/unictype/test-bidi_byname.c
+tests/macros.h
Depends-on:
Files:
tests/unictype/test-bidi_name.c
+tests/macros.h
Depends-on:
Files:
tests/unictype/test-bidi_of.c
+tests/macros.h
Depends-on:
Files:
tests/unictype/test-bidi_test.c
+tests/macros.h
Depends-on:
unictype/bidicategory-of
Files:
tests/unictype/test-block_list.c
+tests/macros.h
Depends-on:
Files:
tests/unictype/test-block_of.c
+tests/macros.h
Depends-on:
unictype/block-list
Files:
tests/unictype/test-block_test.c
+tests/macros.h
Depends-on:
tests/unictype/test-categ_C.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Cc.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Cf.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Cn.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Co.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Cs.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_L.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Ll.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Lm.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Lo.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Lt.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Lu.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_M.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Mc.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Me.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Mn.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_N.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Nd.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Nl.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_No.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_P.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Pc.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Pd.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Pe.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Pf.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Pi.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Po.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Ps.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_S.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Sc.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Sk.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Sm.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_So.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Z.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Zl.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Zp.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
tests/unictype/test-categ_Zs.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/category-test
Files:
tests/unictype/test-categ_and_not.c
+tests/macros.h
Depends-on:
unictype/category-or
Files:
tests/unictype/test-categ_and.c
+tests/macros.h
Depends-on:
unictype/category-or
Files:
tests/unictype/test-categ_byname.c
+tests/macros.h
Depends-on:
unictype/category-test
Files:
tests/unictype/test-categ_name.c
+tests/macros.h
Depends-on:
unictype/category-or
Files:
tests/unictype/test-categ_none.c
+tests/macros.h
Depends-on:
unictype/category-test
Depends-on:
unictype/base
unictype/category-none
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/categ_of.c
Files:
tests/unictype/test-categ_of.c
+tests/macros.h
Depends-on:
unictype/category-test
Files:
tests/unictype/test-categ_or.c
+tests/macros.h
Depends-on:
unictype/category-test
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/categ_test.c
Files:
tests/unictype/test-categ_test_withtable.c
+tests/macros.h
Depends-on:
Files:
tests/unictype/test-combining.c
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/ctype_alnum.c
tests/unictype/test-ctype_alnum.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/ctype_alpha.c
tests/unictype/test-ctype_alpha.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/ctype_blank.c
tests/unictype/test-ctype_blank.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/ctype_cntrl.c
tests/unictype/test-ctype_cntrl.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/ctype_digit.c
tests/unictype/test-ctype_digit.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/ctype_graph.c
tests/unictype/test-ctype_graph.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/ctype_lower.c
tests/unictype/test-ctype_lower.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/ctype_print.c
tests/unictype/test-ctype_print.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/ctype_punct.c
tests/unictype/test-ctype_punct.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/ctype_space.c
tests/unictype/test-ctype_space.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/ctype_upper.c
tests/unictype/test-ctype_upper.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/ctype_xdigit.c
tests/unictype/test-ctype_xdigit.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Files:
tests/unictype/test-decdigit.c
tests/unictype/test-decdigit.h
+tests/macros.h
Depends-on:
Files:
tests/unictype/test-digit.c
tests/unictype/test-digit.h
+tests/macros.h
Depends-on:
Files:
tests/unictype/test-mirror.c
+tests/macros.h
Depends-on:
Files:
tests/unictype/test-numeric.c
tests/unictype/test-numeric.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_alphabetic.c
tests/unictype/test-pr_alphabetic.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_ascii_hex_digit.c
tests/unictype/test-pr_ascii_hex_digit.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
unictype/bidicategory-of
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_bidi_arabic_digit.c
tests/unictype/test-pr_bidi_arabic_digit.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
unictype/bidicategory-of
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_bidi_arabic_right_to_left.c
tests/unictype/test-pr_bidi_arabic_right_to_left.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
unictype/bidicategory-of
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_bidi_block_separator.c
tests/unictype/test-pr_bidi_block_separator.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
unictype/bidicategory-of
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_bidi_boundary_neutral.c
tests/unictype/test-pr_bidi_boundary_neutral.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
unictype/bidicategory-of
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_bidi_common_separator.c
tests/unictype/test-pr_bidi_common_separator.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
unictype/bidicategory-of
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_bidi_control.c
tests/unictype/test-pr_bidi_control.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
unictype/bidicategory-of
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_bidi_embedding_or_override.c
tests/unictype/test-pr_bidi_embedding_or_override.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
unictype/bidicategory-of
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_bidi_eur_num_separator.c
tests/unictype/test-pr_bidi_eur_num_separator.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
unictype/bidicategory-of
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_bidi_eur_num_terminator.c
tests/unictype/test-pr_bidi_eur_num_terminator.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
unictype/bidicategory-of
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_bidi_european_digit.c
tests/unictype/test-pr_bidi_european_digit.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
unictype/bidicategory-of
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_bidi_hebrew_right_to_left.c
tests/unictype/test-pr_bidi_hebrew_right_to_left.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
unictype/bidicategory-of
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_bidi_left_to_right.c
tests/unictype/test-pr_bidi_left_to_right.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
unictype/bidicategory-of
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_bidi_non_spacing_mark.c
tests/unictype/test-pr_bidi_non_spacing_mark.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
unictype/bidicategory-of
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_bidi_other_neutral.c
tests/unictype/test-pr_bidi_other_neutral.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
unictype/bidicategory-of
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_bidi_pdf.c
tests/unictype/test-pr_bidi_pdf.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
unictype/bidicategory-of
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_bidi_segment_separator.c
tests/unictype/test-pr_bidi_segment_separator.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
unictype/bidicategory-of
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_bidi_whitespace.c
tests/unictype/test-pr_bidi_whitespace.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Files:
tests/unictype/test-pr_byname.c
+tests/macros.h
Depends-on:
unictype/property-test
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_combining.c
tests/unictype/test-pr_combining.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_composite.c
tests/unictype/test-pr_composite.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/base
unictype/category-test
unictype/category-Sc
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_currency_symbol.c
tests/unictype/test-pr_currency_symbol.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_dash.c
tests/unictype/test-pr_dash.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/base
unictype/category-test
unictype/category-Nd
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_decimal_digit.c
tests/unictype/test-pr_decimal_digit.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_default_ignorable_code_point.c
tests/unictype/test-pr_default_ignorable_code_point.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_deprecated.c
tests/unictype/test-pr_deprecated.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_diacritic.c
tests/unictype/test-pr_diacritic.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_extender.c
tests/unictype/test-pr_extender.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_format_control.c
tests/unictype/test-pr_format_control.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_grapheme_base.c
tests/unictype/test-pr_grapheme_base.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_grapheme_extend.c
tests/unictype/test-pr_grapheme_extend.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_grapheme_link.c
tests/unictype/test-pr_grapheme_link.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_hex_digit.c
tests/unictype/test-pr_hex_digit.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_hyphen.c
tests/unictype/test-pr_hyphen.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_id_continue.c
tests/unictype/test-pr_id_continue.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_id_start.c
tests/unictype/test-pr_id_start.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_ideographic.c
tests/unictype/test-pr_ideographic.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_ids_binary_operator.c
tests/unictype/test-pr_ids_binary_operator.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_ids_trinary_operator.c
tests/unictype/test-pr_ids_trinary_operator.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_ignorable_control.c
tests/unictype/test-pr_ignorable_control.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/base
unictype/category-test
unictype/category-Cc
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_iso_control.c
tests/unictype/test-pr_iso_control.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_join_control.c
tests/unictype/test-pr_join_control.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_left_of_pair.c
tests/unictype/test-pr_left_of_pair.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_line_separator.c
tests/unictype/test-pr_line_separator.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_logical_order_exception.c
tests/unictype/test-pr_logical_order_exception.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_lowercase.c
tests/unictype/test-pr_lowercase.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_math.c
tests/unictype/test-pr_math.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_non_break.c
tests/unictype/test-pr_non_break.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_not_a_character.c
tests/unictype/test-pr_not_a_character.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_numeric.c
tests/unictype/test-pr_numeric.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_other_alphabetic.c
tests/unictype/test-pr_other_alphabetic.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_other_default_ignorable_code_point.c
tests/unictype/test-pr_other_default_ignorable_code_point.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_other_grapheme_extend.c
tests/unictype/test-pr_other_grapheme_extend.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_other_id_continue.c
tests/unictype/test-pr_other_id_continue.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_other_id_start.c
tests/unictype/test-pr_other_id_start.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_other_lowercase.c
tests/unictype/test-pr_other_lowercase.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_other_math.c
tests/unictype/test-pr_other_math.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_other_uppercase.c
tests/unictype/test-pr_other_uppercase.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_paired_punctuation.c
tests/unictype/test-pr_paired_punctuation.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_paragraph_separator.c
tests/unictype/test-pr_paragraph_separator.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_pattern_syntax.c
tests/unictype/test-pr_pattern_syntax.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_pattern_white_space.c
tests/unictype/test-pr_pattern_white_space.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_private_use.c
tests/unictype/test-pr_private_use.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/base
unictype/category-test
unictype/category-P
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_punctuation.c
tests/unictype/test-pr_punctuation.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_quotation_mark.c
tests/unictype/test-pr_quotation_mark.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_radical.c
tests/unictype/test-pr_radical.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_sentence_terminal.c
tests/unictype/test-pr_sentence_terminal.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_soft_dotted.c
tests/unictype/test-pr_soft_dotted.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
unictype/base
unictype/category-test
unictype/category-Zs
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_space.c
tests/unictype/test-pr_space.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_terminal_punctuation.c
tests/unictype/test-pr_terminal_punctuation.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Files:
tests/unictype/test-pr_test.c
+tests/macros.h
Depends-on:
unictype/property-composite
unictype/base
unictype/category-test
unictype/category-Lt
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_titlecase.c
tests/unictype/test-pr_titlecase.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_unassigned_code_value.c
tests/unictype/test-pr_unassigned_code_value.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_unified_ideograph.c
tests/unictype/test-pr_unified_ideograph.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_uppercase.c
tests/unictype/test-pr_uppercase.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_variation_selector.c
tests/unictype/test-pr_variation_selector.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_white_space.c
tests/unictype/test-pr_white_space.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_xid_continue.c
tests/unictype/test-pr_xid_continue.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_xid_start.c
tests/unictype/test-pr_xid_start.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/pr_zero_width.c
tests/unictype/test-pr_zero_width.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Files:
tests/unictype/test-scripts.c
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/sy_c_ident.c
Files:
tests/unictype/test-sy_c_ident.c
+tests/macros.h
Depends-on:
tests/unictype/test-sy_c_whitespace.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Depends-on:
unictype/base
-inline
configure.ac:
+AC_REQUIRE([AC_C_INLINE])
Makefile.am:
lib_SOURCES += unictype/sy_java_ident.c
Files:
tests/unictype/test-sy_java_ident.c
+tests/macros.h
Depends-on:
tests/unictype/test-sy_java_whitespace.c
tests/unictype/test-predicate-part1.h
tests/unictype/test-predicate-part2.h
+tests/macros.h
Depends-on:
Files:
tests/unilbrk/test-u16-possible-linebreaks.c
+tests/macros.h
Depends-on:
Files:
tests/unilbrk/test-u16-width-linebreaks.c
+tests/macros.h
Depends-on:
Files:
tests/unilbrk/test-u32-possible-linebreaks.c
+tests/macros.h
Depends-on:
Files:
tests/unilbrk/test-u32-width-linebreaks.c
+tests/macros.h
Depends-on:
Files:
tests/unilbrk/test-u8-possible-linebreaks.c
+tests/macros.h
Depends-on:
Files:
tests/unilbrk/test-u8-width-linebreaks.c
+tests/macros.h
Depends-on:
Files:
tests/unilbrk/test-ulc-possible-linebreaks.c
+tests/macros.h
Depends-on:
Files:
tests/unilbrk/test-ulc-width-linebreaks.c
+tests/macros.h
Depends-on:
Files:
tests/uninorm/test-canonical-decomposition.c
+tests/macros.h
Depends-on:
Files:
tests/uninorm/test-compat-decomposition.c
+tests/macros.h
Depends-on:
Files:
tests/uninorm/test-composition.c
+tests/macros.h
Depends-on:
Files:
tests/uninorm/test-decomposing-form.c
+tests/macros.h
Depends-on:
uninorm/nfc
Files:
tests/uninorm/test-decomposition.c
+tests/macros.h
Depends-on:
Files:
tests/uninorm/test-uninorm-filter-nfc.c
+tests/macros.h
Depends-on:
unistr/u32-cmp
tests/uninorm/test-u32-normalize-big.h
tests/uninorm/test-u32-normalize-big.c
tests/uninorm/NormalizationTest.txt
+tests/macros.h
Depends-on:
unistr/u8-cmp
tests/uninorm/test-u32-normalize-big.h
tests/uninorm/test-u32-normalize-big.c
tests/uninorm/NormalizationTest.txt
+tests/macros.h
Depends-on:
unistr/u8-cmp
tests/uninorm/test-u32-normalize-big.h
tests/uninorm/test-u32-normalize-big.c
tests/uninorm/NormalizationTest.txt
+tests/macros.h
Depends-on:
unistr/u8-cmp
tests/uninorm/test-u32-normalize-big.h
tests/uninorm/test-u32-normalize-big.c
tests/uninorm/NormalizationTest.txt
+tests/macros.h
Depends-on:
unistr/u8-cmp
Files:
tests/uninorm/test-u16-normcmp.c
tests/uninorm/test-u16-normcmp.h
+tests/macros.h
Depends-on:
uninorm/nfd
Files:
tests/uninorm/test-u16-normcoll.c
tests/uninorm/test-u16-normcmp.h
+tests/macros.h
Depends-on:
uninorm/nfc
Files:
tests/uninorm/test-u32-normcmp.c
tests/uninorm/test-u32-normcmp.h
+tests/macros.h
Depends-on:
uninorm/nfd
Files:
tests/uninorm/test-u32-normcoll.c
tests/uninorm/test-u32-normcmp.h
+tests/macros.h
Depends-on:
uninorm/nfc
Files:
tests/uninorm/test-u8-normcmp.c
tests/uninorm/test-u8-normcmp.h
+tests/macros.h
Depends-on:
uninorm/nfd
Files:
tests/uninorm/test-u8-normcoll.c
tests/uninorm/test-u8-normcmp.h
+tests/macros.h
Depends-on:
uninorm/nfc
Depends-on:
include_next
link-warning
+arg-nonnull
stddef
configure.ac:
# We need the following in order to create an empty placeholder for
# <unistd.h> when the system doesn't have one.
-unistd.h: unistd.in.h $(LINK_WARNING_H)
+unistd.h: unistd.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
-e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \
-e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/unistd.in.h; \
} > $@-t && \
mv $@-t $@
m4/unistd-safer.m4
Depends-on:
+fcntl
unistd
configure.ac:
gl_UNISTD_SAFER
-gl_MODULE_INDICATOR([unistd-safer])
Makefile.am:
Files:
tests/test-dup-safer.c
+tests/macros.h
Depends-on:
binary-io
cloexec
+fd-safer-flag
stdbool
configure.ac:
Makefile.am:
TESTS += test-unistd
check_PROGRAMS += test-unistd
-
-License:
-LGPL
tests/unistdio/test-u16-asnprintf1.c
tests/unistdio/test-u16-asnprintf1.h
tests/unistdio/test-u16-printf1.h
+tests/macros.h
Depends-on:
tests/unistdio/test-u16-vasnprintf2.c
tests/unistdio/test-u16-vasnprintf3.sh
tests/unistdio/test-u16-vasnprintf3.c
+tests/macros.h
m4/locale-fr.m4
m4/codeset.m4
Files:
tests/unistdio/test-u16-vasprintf1.c
tests/unistdio/test-u16-printf1.h
+tests/macros.h
Depends-on:
Files:
tests/unistdio/test-u16-vsnprintf1.c
tests/unistdio/test-u16-printf1.h
+tests/macros.h
Depends-on:
xalloc
Files:
tests/unistdio/test-u16-vsprintf1.c
tests/unistdio/test-u16-printf1.h
+tests/macros.h
Depends-on:
xalloc
tests/unistdio/test-u32-asnprintf1.c
tests/unistdio/test-u32-asnprintf1.h
tests/unistdio/test-u32-printf1.h
+tests/macros.h
Depends-on:
tests/unistdio/test-u32-vasnprintf2.c
tests/unistdio/test-u32-vasnprintf3.sh
tests/unistdio/test-u32-vasnprintf3.c
+tests/macros.h
m4/locale-fr.m4
m4/codeset.m4
Files:
tests/unistdio/test-u32-vasprintf1.c
tests/unistdio/test-u32-printf1.h
+tests/macros.h
Depends-on:
Files:
tests/unistdio/test-u32-vsnprintf1.c
tests/unistdio/test-u32-printf1.h
+tests/macros.h
Depends-on:
xalloc
Files:
tests/unistdio/test-u32-vsprintf1.c
tests/unistdio/test-u32-printf1.h
+tests/macros.h
Depends-on:
xalloc
tests/unistdio/test-u8-asnprintf1.c
tests/unistdio/test-u8-asnprintf1.h
tests/unistdio/test-u8-printf1.h
+tests/macros.h
Depends-on:
tests/unistdio/test-u8-vasnprintf2.c
tests/unistdio/test-u8-vasnprintf3.sh
tests/unistdio/test-u8-vasnprintf3.c
+tests/macros.h
m4/locale-fr.m4
m4/codeset.m4
Files:
tests/unistdio/test-u8-vasprintf1.c
tests/unistdio/test-u8-printf1.h
+tests/macros.h
Depends-on:
Files:
tests/unistdio/test-u8-vsnprintf1.c
tests/unistdio/test-u8-printf1.h
+tests/macros.h
Depends-on:
xalloc
Files:
tests/unistdio/test-u8-vsprintf1.c
tests/unistdio/test-u8-printf1.h
+tests/macros.h
Depends-on:
xalloc
tests/unistdio/test-ulc-asnprintf1.c
tests/unistdio/test-ulc-asnprintf1.h
tests/unistdio/test-ulc-printf1.h
+tests/macros.h
Depends-on:
tests/unistdio/test-ulc-vasnprintf2.c
tests/unistdio/test-ulc-vasnprintf3.sh
tests/unistdio/test-ulc-vasnprintf3.c
+tests/macros.h
m4/locale-fr.m4
m4/codeset.m4
Files:
tests/unistdio/test-ulc-vasprintf1.c
tests/unistdio/test-ulc-printf1.h
+tests/macros.h
Depends-on:
Files:
tests/unistdio/test-ulc-vsnprintf1.c
tests/unistdio/test-ulc-printf1.h
+tests/macros.h
Depends-on:
xalloc
Files:
tests/unistdio/test-ulc-vsprintf1.c
tests/unistdio/test-ulc-printf1.h
+tests/macros.h
Depends-on:
xalloc
Depends-on:
unitypes
+unused-parameter
stdbool
inline
Files:
tests/uniwbrk/test-u16-wordbreaks.c
+tests/macros.h
Depends-on:
Files:
tests/uniwbrk/test-u32-wordbreaks.c
+tests/macros.h
Depends-on:
Files:
tests/uniwbrk/test-u8-wordbreaks.c
+tests/macros.h
Depends-on:
Files:
tests/uniwbrk/test-ulc-wordbreaks.sh
tests/uniwbrk/test-ulc-wordbreaks.c
+tests/macros.h
m4/locale-fr.m4
m4/codeset.m4
Files:
tests/uniwidth/test-u16-strwidth.c
+tests/macros.h
Depends-on:
Files:
tests/uniwidth/test-u16-width.c
+tests/macros.h
Depends-on:
Files:
tests/uniwidth/test-u32-strwidth.c
+tests/macros.h
Depends-on:
Files:
tests/uniwidth/test-u32-width.c
+tests/macros.h
Depends-on:
Files:
tests/uniwidth/test-u8-strwidth.c
+tests/macros.h
Depends-on:
Files:
tests/uniwidth/test-u8-width.c
+tests/macros.h
Depends-on:
tests/uniwidth/test-uc_width.c
tests/uniwidth/test-uc_width2.c
tests/uniwidth/test-uc_width2.sh
+tests/macros.h
Depends-on:
Files:
tests/test-unlink.h
tests/test-unlink.c
+tests/signature.h
+tests/macros.h
Depends-on:
stdbool
Files:
tests/test-unsetenv.c
+tests/signature.h
+tests/macros.h
Depends-on:
putenv
--- /dev/null
+Description:
+A C macro for declaring that specific function parameters are not used.
+
+Applicability:
+all
+
+Files:
+build-aux/unused-parameter.h
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+
+BUILT_SOURCES += unused-parameter.h
+# The unused-parameter.h that gets inserted into generated .h files is the same
+# as build-aux/unused-parameter.h, except that it has the copyright header cut
+# off.
+unused-parameter.h: $(top_srcdir)/build-aux/unused-parameter.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \
+ < $(top_srcdir)/build-aux/unused-parameter.h \
+ > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += unused-parameter.h unused-parameter.h-t
+
+UNUSED_PARAMETER_H=unused-parameter.h
+
+Include:
+
+License:
+LGPLv2+
+
+Maintainer:
+Bruno Haible
Files:
tests/test-usleep.c
+tests/signature.h
+tests/macros.h
Depends-on:
time
Files:
+tests/nap.h
tests/test-futimens.h
tests/test-lutimens.h
tests/test-utimens.h
tests/test-utimens-common.h
tests/test-utimens.c
+tests/macros.h
Depends-on:
symlink
openat
sys_stat
utimens
+extensions
configure.ac:
gl_FUNC_UTIMENSAT
Files:
+tests/nap.h
tests/test-lutimens.h
tests/test-utimens.h
tests/test-utimens-common.h
tests/test-utimensat.c
+tests/signature.h
+tests/macros.h
Depends-on:
progname
--- /dev/null
+Description:
+Detect whether the preprocessor supports C99 variadic macros and __VA_ARGS__.
+
+Files:
+m4/va-args.m4
+
+Depends-on:
+
+configure.ac:
+gl_VA_ARGS
+
+Makefile.am:
+
+Include:
+
+License:
+LGPL
+
+Maintainer:
+Eric Blake
tests/test-vasnprintf-posix2.sh
tests/test-vasnprintf-posix2.c
tests/nan.h
+tests/macros.h
m4/locale-fr.m4
m4/codeset.m4
Files:
tests/test-vasnprintf.c
+tests/macros.h
Depends-on:
Files:
tests/test-vasprintf-posix.c
tests/nan.h
+tests/macros.h
Depends-on:
stdint
Files:
tests/test-vasprintf.c
+tests/signature.h
+tests/macros.h
Depends-on:
tests/test-vdprintf-posix.c
tests/test-fprintf-posix.h
tests/test-printf-posix.output
+tests/signature.h
+tests/macros.h
Depends-on:
stdint
tests/test-vfprintf-posix.c
tests/test-fprintf-posix.h
tests/test-printf-posix.output
+tests/signature.h
+tests/macros.h
Depends-on:
stdint
tests/test-vprintf-posix.c
tests/test-printf-posix.h
tests/test-printf-posix.output
+tests/signature.h
+tests/macros.h
Depends-on:
stdint
tests/test-snprintf-posix.h
tests/test-vsnprintf.c
tests/nan.h
+tests/signature.h
+tests/macros.h
Depends-on:
stdint
Files:
tests/test-vsnprintf.c
+tests/signature.h
+tests/macros.h
Depends-on:
tests/test-vsprintf-posix.c
tests/test-sprintf-posix.h
tests/nan.h
+tests/signature.h
+tests/macros.h
Depends-on:
stdint
Depends-on:
include_next
link-warning
+arg-nonnull
stddef
configure.ac:
gl_WCHAR_H
Makefile.am:
-BUILT_SOURCES += $(WCHAR_H)
+BUILT_SOURCES += wchar.h
# We need the following in order to create <wchar.h> when the system
# version does not work standalone.
-wchar.h: wchar.in.h $(LINK_WARNING_H)
+wchar.h: wchar.in.h $(LINK_WARNING_H) $(ARG_NONNULL_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \
-e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
< $(srcdir)/wchar.in.h; \
} > $@-t && \
mv $@-t $@
Makefile.am:
TESTS += test-wchar
check_PROGRAMS += test-wchar
-
-License:
-LGPL
m4/codeset.m4
Depends-on:
+extensions
wchar
mbsinit
Files:
tests/test-wcrtomb.sh
tests/test-wcrtomb.c
+tests/signature.h
+tests/macros.h
m4/locale-fr.m4
m4/locale-ja.m4
m4/locale-zh.m4
m4/codeset.m4
Depends-on:
+extensions
wchar
wcrtomb
tests/test-wcsnrtombs3.sh
tests/test-wcsnrtombs4.sh
tests/test-wcsnrtombs.c
+tests/signature.h
+tests/macros.h
m4/locale-fr.m4
m4/locale-ja.m4
m4/locale-zh.m4
m4/codeset.m4
Depends-on:
+extensions
wchar
wcrtomb
tests/test-wcsrtombs3.sh
tests/test-wcsrtombs4.sh
tests/test-wcsrtombs.c
+tests/signature.h
+tests/macros.h
m4/locale-fr.m4
m4/locale-ja.m4
m4/locale-zh.m4
Files:
tests/test-wctype.c
+tests/macros.h
Depends-on:
Makefile.am:
TESTS += test-wctype
check_PROGRAMS += test-wctype
-
-License:
-LGPL
Files:
tests/test-wcwidth.c
+tests/signature.h
+tests/macros.h
Depends-on:
localcharset
--- /dev/null
+Description:
+Abstract sequential list data type, with out-of-memory checking.
+
+Files:
+lib/gl_xlist.h
+lib/gl_xlist.c
+m4/gl_list.m4
+
+Depends-on:
+inline
+stdbool
+xalloc-die
+
+configure.ac:
+gl_LIST
+
+Makefile.am:
+lib_SOURCES += gl_xlist.h gl_xlist.c
+
+Include:
+"gl_xlist.h"
+
+License:
+GPL
+
+Maintainer:
+Bruno Haible
Files:
tests/test-xmemdup0.c
+tests/macros.h
Depends-on:
progname
--- /dev/null
+Description:
+Abstract ordered set data type, with out-of-memory checking.
+
+Files:
+lib/gl_xoset.h
+lib/gl_xoset.c
+m4/gl_list.m4
+
+Depends-on:
+inline
+stdbool
+xalloc-die
+
+configure.ac:
+gl_LIST
+
+Makefile.am:
+lib_SOURCES += gl_xoset.h gl_xoset.c
+
+Include:
+"gl_xoset.h"
+
+License:
+GPL
+
+Maintainer:
+Bruno Haible
tests/test-fprintf-posix.h
tests/test-printf-posix.h
tests/test-printf-posix.output
+tests/macros.h
Depends-on:
stdint
--- /dev/null
+Description:
+Sequential list data type backed by another list, with out-of-memory checking.
+
+Files:
+lib/gl_xsublist.h
+lib/gl_xsublist.c
+
+Depends-on:
+sublist
+xalloc-die
+
+configure.ac:
+
+Makefile.am:
+lib_SOURCES += gl_xsublist.h gl_xsublist.c
+
+Include:
+"gl_xsublist.h"
+
+License:
+GPL
+
+Maintainer:
+Bruno Haible
Files:
tests/test-xvasprintf.c
+tests/macros.h
Depends-on:
progname
#!/bin/sh
#
-# Copyright (C) 2002-2008 Free Software Foundation, Inc.
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# source this file; set up for tests
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
--- /dev/null
+/* Common macros used by gnulib tests.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+
+/* This file contains macros that are used by many gnulib tests.
+ Put here only frequently used macros, say, used by 10 tests or more. */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+/* Define ASSERT_STREAM before including this file if ASSERT must
+ target a stream other than stderr. */
+#ifndef ASSERT_STREAM
+# define ASSERT_STREAM stderr
+#endif
+
+/* ASSERT (condition);
+ verifies that the specified condition is fulfilled. If not, a message
+ is printed to ASSERT_STREAM if defined (defaulting to stderr if
+ undefined) and the program is terminated with an error code.
+
+ This macro has the following properties:
+ - The programmer specifies the expected condition, not the failure
+ condition. This simplifies thinking.
+ - The condition is tested always, regardless of compilation flags.
+ (Unlike the macro from <assert.h>.)
+ - On Unix platforms, the tester can debug the test program with a
+ debugger (provided core dumps are enabled: "ulimit -c unlimited").
+ - For the sake of platforms where no debugger is available (such as
+ some mingw systems), an error message is printed on the error
+ stream that includes the source location of the ASSERT invocation.
+ */
+#define ASSERT(expr) \
+ do \
+ { \
+ if (!(expr)) \
+ { \
+ fprintf (ASSERT_STREAM, "%s:%d: assertion failed\n", \
+ __FILE__, __LINE__); \
+ fflush (ASSERT_STREAM); \
+ abort (); \
+ } \
+ } \
+ while (0)
+
+/* SIZEOF (array)
+ returns the number of elements of an array. It works for arrays that are
+ declared outside functions and for local variables of array type. It does
+ *not* work for function parameters of array type, because they are actually
+ parameters of pointer type. */
+#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
/* Macros for not-a-number.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
--- /dev/null
+/* Assist in file system timestamp tests.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#ifndef GLTEST_NAP_H
+# define GLTEST_NAP_H
+
+/* Sleep long enough to notice a timestamp difference on the file
+ system in the current directory. Assumes that BASE is defined,
+ and requires that the test module depends on usleep. */
+static void
+nap (void)
+{
+ static long delay;
+ if (!delay)
+ {
+ /* Initialize only once, by sleeping for 20 milliseconds (needed
+ since xfs has a quantization of about 10 milliseconds, even
+ though it has a granularity of 1 nanosecond, and since NTFS
+ has a default quantization of 15.25 milliseconds, even though
+ it has a granularity of 100 nanoseconds). If the seconds
+ differ, repeat the test one more time (in case we crossed a
+ quantization boundary on a file system with 1 second
+ resolution). If we can't observe a difference in only the
+ nanoseconds, then fall back to 1 second if the time is odd,
+ and 2 seconds (needed for FAT) if time is even. */
+ struct stat st1;
+ struct stat st2;
+ ASSERT (close (creat (BASE "tmp", 0600)) == 0);
+ ASSERT (stat (BASE "tmp", &st1) == 0);
+ ASSERT (unlink (BASE "tmp") == 0);
+ delay = 20000;
+ usleep (delay);
+ ASSERT (close (creat (BASE "tmp", 0600)) == 0);
+ ASSERT (stat (BASE "tmp", &st2) == 0);
+ ASSERT (unlink (BASE "tmp") == 0);
+ if (st1.st_mtime != st2.st_mtime)
+ {
+ /* Seconds differ, give it one more shot. */
+ st1 = st2;
+ usleep (delay);
+ ASSERT (close (creat (BASE "tmp", 0600)) == 0);
+ ASSERT (stat (BASE "tmp", &st2) == 0);
+ ASSERT (unlink (BASE "tmp") == 0);
+ }
+ if (! (st1.st_mtime == st2.st_mtime
+ && get_stat_mtime_ns (&st1) < get_stat_mtime_ns (&st2)))
+ delay = (st1.st_mtime & 1) ? 1000000 : 2000000;
+ }
+ usleep (delay);
+}
+
+#endif /* GLTEST_NAP_H */
--- /dev/null
+/* Macro for checking that a function declaration is compliant.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef SIGNATURE_CHECK
+
+/* Check that the function FN takes the specified arguments ARGS with
+ a return type of RET. This header is designed to be included after
+ <config.h> and the one system header that is supposed to contain
+ the function being checked, but prior to any other system headers
+ that are necessary for the unit test. Therefore, this file does
+ not include any system headers, nor reference anything outside of
+ the macro arguments. For an example, if foo.h should provide:
+
+ extern int foo (char, float);
+
+ then the unit test named test-foo.c would start out with:
+
+ #include <config.h>
+ #include <foo.h>
+ #include "signature.h"
+ SIGNATURE_CHECK (foo, int, (char, float));
+ #include <other.h>
+ ...
+*/
+# define SIGNATURE_CHECK(fn, ret, args) \
+ SIGNATURE_CHECK1 (fn, ret, args, __LINE__)
+
+/* Necessary to allow multiple SIGNATURE_CHECK lines in a unit test.
+ Note that the checks must not occupy the same line. */
+# define SIGNATURE_CHECK1(fn, ret, args, id) \
+ SIGNATURE_CHECK2 (fn, ret, args, id) /* macroexpand line */
+# define SIGNATURE_CHECK2(fn, ret, args, id) \
+ static ret (* _GL_UNUSED signature_check ## id) args = fn
+
+#endif /* SIGNATURE_CHECK */
/* Test of <alignof.h>.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of optional automatic memory allocation.
- Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Tests of areadlink_with_size.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <sys/stat.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-areadlink-with-size.t"
main (void)
{
/* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
return test_areadlink (areadlink_with_size, true);
}
/* Tests of areadlink.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <sys/stat.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-areadlink.t"
/* Wrapper for testing areadlink. */
static char *
-do_areadlink (char const *name, size_t ignored _UNUSED_PARAMETER_)
+do_areadlink (char const *name, size_t ignored _GL_UNUSED)
{
return areadlink (name);
}
main (void)
{
/* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
return test_areadlink (do_areadlink, true);
}
/* Tests of areadlink and friends.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Tests of areadlinkat_with_size.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <sys/stat.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-areadlinkat-with-size.t"
int result;
/* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
/* Basic tests. */
result = test_areadlink (do_areadlinkat_with_size, false);
/* Tests of areadlinkat.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <sys/stat.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-areadlinkat.t"
/* Wrapper for testing areadlinkat. */
static char *
-do_areadlinkat (char const *name, size_t ignored _UNUSED_PARAMETER_)
+do_areadlinkat (char const *name, size_t ignored _GL_UNUSED)
{
return areadlinkat (dfd, name);
}
int result;
/* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
/* Basic tests. */
result = test_areadlink (do_areadlinkat, false);
/* Test of exact or abbreviated match search.
- Copyright (C) 1990, 1998-1999, 2001-2008 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1998-1999, 2001-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "argmatch.h"
-#include <stdio.h>
#include <stdlib.h>
#include "progname.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* Some packages define ARGMATCH_DIE and ARGMATCH_DIE_DECL in <config.h>, and
thus must link with a definition of that function. Provide it here. */
#! /bin/sh
# Test suite for argp.
-# Copyright (C) 2006-2008 Free Software Foundation, Inc.
+# Copyright (C) 2006-2010 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
# Test suite for argp-version-etc.
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 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 suite for argp-version-etc.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 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 suite for argp.
- Copyright (C) 2006-2007 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2010 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 argv iterator
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Written by Jim Meyering. */
#include <config.h>
-#include <stdlib.h>
+
+#include "argv-iter.h"
+
#include <stdio.h>
#include <string.h>
+#include "macros.h"
+
#define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array))
#define STREQ(s1, s2) (strcmp (s1, s2) == 0)
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
-
-#include "argv-iter.h"
static FILE *
write_nul_delimited_argv (char **argv)
/* Test of <arpa/inet.h> substitute.
- Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of stable-sorting of an array using mergesort.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
#define STATIC static
#include "array-mergesort.h"
-#include <stdio.h>
#include <stdlib.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define NMAX 257
static const struct foo data[NMAX] =
/* Test of sequential list data type implementation.
- Copyright (C) 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 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_array_list.h"
-#include <stdio.h>
#include <stdlib.h>
#include "progname.h"
+#include "macros.h"
static const char *objects[15] =
{
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o"
};
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
#define RANDOM(n) (rand () % (n))
#define RANDOM_OBJECT() objects[RANDOM (SIZEOF (objects))]
contents[i] = RANDOM_OBJECT ();
/* Create list1. */
- list1 = gl_list_create (GL_ARRAY_LIST, NULL, NULL, NULL, true,
- initial_size, contents);
+ list1 = gl_list_nx_create (GL_ARRAY_LIST, NULL, NULL, NULL, true,
+ initial_size, contents);
+ ASSERT (list1 != NULL);
/* Create list2. */
- list2 = gl_list_create_empty (GL_ARRAY_LIST, NULL, NULL, NULL, true);
+ list2 = gl_list_nx_create_empty (GL_ARRAY_LIST, NULL, NULL, NULL, true);
+ ASSERT (list2 != NULL);
for (i = 0; i < initial_size; i++)
- gl_list_add_last (list2, contents[i]);
+ ASSERT (gl_list_nx_add_last (list2, contents[i]) != NULL);
check_equals (list1, list2);
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2;
- node1 = gl_list_set_at (list1, index, obj);
+ node1 = gl_list_nx_set_at (list1, index, obj);
+ ASSERT (node1 != NULL);
ASSERT (gl_list_get_at (list1, index) == obj);
ASSERT (gl_list_node_value (list1, node1) == obj);
- node2 = gl_list_set_at (list2, index, obj);
+ node2 = gl_list_nx_set_at (list2, index, obj);
+ ASSERT (node2 != NULL);
ASSERT (gl_list_get_at (list2, index) == obj);
ASSERT (gl_list_node_value (list2, node2) == obj);
{
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2;
- node1 = gl_list_add_first (list1, obj);
- node2 = gl_list_add_first (list2, obj);
+ node1 = gl_list_nx_add_first (list1, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_first (list2, obj);
+ ASSERT (node2 != NULL);
ASSERT (gl_list_node_value (list1, node1) == obj);
ASSERT (gl_list_node_value (list2, node2) == obj);
ASSERT (gl_list_get_at (list1, 0) == obj);
{
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2;
- node1 = gl_list_add_last (list1, obj);
- node2 = gl_list_add_last (list2, obj);
+ node1 = gl_list_nx_add_last (list1, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_last (list2, obj);
+ ASSERT (node2 != NULL);
ASSERT (gl_list_node_value (list1, node1) == obj);
ASSERT (gl_list_node_value (list2, node2) == obj);
ASSERT (gl_list_get_at (list1, gl_list_size (list1) - 1) == obj);
const char *obj1 = RANDOM_OBJECT ();
const char *obj2 = RANDOM_OBJECT ();
gl_list_node_t node1, node2;
- node1 = gl_list_add_first (list1, obj2);
- node1 = gl_list_add_before (list1, node1, obj0);
- node1 = gl_list_add_after (list1, node1, obj1);
- node2 = gl_list_add_first (list2, obj2);
- node2 = gl_list_add_before (list2, node2, obj0);
- node2 = gl_list_add_after (list2, node2, obj1);
+ node1 = gl_list_nx_add_first (list1, obj2);
+ ASSERT (node1 != NULL);
+ node1 = gl_list_nx_add_before (list1, node1, obj0);
+ ASSERT (node1 != NULL);
+ node1 = gl_list_nx_add_after (list1, node1, obj1);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_first (list2, obj2);
+ ASSERT (node2 != NULL);
+ node2 = gl_list_nx_add_before (list2, node2, obj0);
+ ASSERT (node2 != NULL);
+ node2 = gl_list_nx_add_after (list2, node2, obj1);
+ ASSERT (node2 != NULL);
ASSERT (gl_list_node_value (list1, node1) == obj1);
ASSERT (gl_list_node_value (list2, node2) == obj1);
ASSERT (gl_list_get_at (list1, 0) == obj0);
size_t index = RANDOM (gl_list_size (list1) + 1);
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2;
- node1 = gl_list_add_at (list1, index, obj);
- node2 = gl_list_add_at (list2, index, obj);
+ node1 = gl_list_nx_add_at (list1, index, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_at (list2, index, obj);
+ ASSERT (node2 != NULL);
ASSERT (gl_list_get_at (list1, index) == obj);
ASSERT (gl_list_node_value (list1, node1) == obj);
ASSERT (gl_list_get_at (list2, index) == obj);
/* Test of ordered set data type implementation.
- Copyright (C) 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 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_array_oset.h"
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include "gl_xlist.h"
#include "gl_array_list.h"
#include "progname.h"
+#include "macros.h"
static const char *objects[30] =
{
"p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "<", ">", "[", "]"
};
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
#define RANDOM(n) (rand () % (n))
#define RANDOM_OBJECT() objects[RANDOM (SIZEOF (objects))]
unsigned int repeat;
/* Create set1. */
- set1 = gl_oset_create_empty (GL_ARRAY_OSET, (gl_setelement_compar_fn) strcmp, NULL);
+ set1 = gl_oset_nx_create_empty (GL_ARRAY_OSET, (gl_setelement_compar_fn) strcmp, NULL);
+ ASSERT (set1 != NULL);
/* Create set2. */
set2 = gl_list_create_empty (GL_ARRAY_LIST, NULL, NULL, NULL, false);
for (i = 0; i < initial_size; i++)
{
const char *obj = RANDOM_OBJECT ();
- ASSERT (gl_oset_add (set1, obj)
+ ASSERT (gl_oset_nx_add (set1, obj)
== (gl_sortedlist_search (set2, (gl_listelement_compar_fn)strcmp, obj) != NULL
? false
: (gl_sortedlist_add (set2, (gl_listelement_compar_fn)strcmp, obj), true)));
case 1:
{
const char *obj = RANDOM_OBJECT ();
- ASSERT (gl_oset_add (set1, obj)
+ ASSERT (gl_oset_nx_add (set1, obj)
== (gl_sortedlist_search (set2, (gl_listelement_compar_fn)strcmp, obj) != NULL
? false
: (gl_sortedlist_add (set2, (gl_listelement_compar_fn)strcmp, obj), true)));
/* Test of execution of program termination handlers.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
#include <stdlib.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (atexit, int, (void (*) (void)));
+
#include <unistd.h>
#define TEMPFILE "t-atexit.tmp"
/* Test of sequential list data type implementation.
- Copyright (C) 2006-2009 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 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 "gl_avltree_list.h"
-#include <stdio.h>
#include <stdlib.h>
#include "gl_array_list.h"
#include "progname.h"
+#include "macros.h"
extern void gl_avltree_list_check_invariants (gl_list_t list);
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o"
};
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
#define RANDOM(n) (rand () % (n))
#define RANDOM_OBJECT() objects[RANDOM (SIZEOF (objects))]
contents[i] = RANDOM_OBJECT ();
/* Create list1. */
- list1 = gl_list_create (GL_ARRAY_LIST, NULL, NULL, NULL, true,
- initial_size, contents);
+ list1 = gl_list_nx_create (GL_ARRAY_LIST, NULL, NULL, NULL, true,
+ initial_size, contents);
+ ASSERT (list1 != NULL);
/* Create list2. */
- list2 = gl_list_create_empty (GL_AVLTREE_LIST, NULL, NULL, NULL, true);
+ list2 = gl_list_nx_create_empty (GL_AVLTREE_LIST, NULL, NULL, NULL, true);
+ ASSERT (list2 != NULL);
for (i = 0; i < initial_size; i++)
- gl_list_add_last (list2, contents[i]);
+ ASSERT (gl_list_nx_add_last (list2, contents[i]) != NULL);
/* Create list3. */
- list3 = gl_list_create (GL_AVLTREE_LIST, NULL, NULL, NULL, true,
- initial_size, contents);
+ list3 = gl_list_nx_create (GL_AVLTREE_LIST, NULL, NULL, NULL, true,
+ initial_size, contents);
+ ASSERT (list3 != NULL);
check_all (list1, list2, list3);
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_set_at (list1, index, obj);
+ node1 = gl_list_nx_set_at (list1, index, obj);
+ ASSERT (node1 != NULL);
ASSERT (gl_list_get_at (list1, index) == obj);
ASSERT (gl_list_node_value (list1, node1) == obj);
- node2 = gl_list_set_at (list2, index, obj);
+ node2 = gl_list_nx_set_at (list2, index, obj);
+ ASSERT (node2 != NULL);
ASSERT (gl_list_get_at (list2, index) == obj);
ASSERT (gl_list_node_value (list2, node2) == obj);
- node3 = gl_list_set_at (list3, index, obj);
+ node3 = gl_list_nx_set_at (list3, index, obj);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_get_at (list3, index) == obj);
ASSERT (gl_list_node_value (list3, node3) == obj);
{
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_add_first (list1, obj);
- node2 = gl_list_add_first (list2, obj);
- node3 = gl_list_add_first (list3, obj);
+ node1 = gl_list_nx_add_first (list1, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_first (list2, obj);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_first (list3, obj);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_node_value (list1, node1) == obj);
ASSERT (gl_list_node_value (list2, node2) == obj);
ASSERT (gl_list_node_value (list3, node3) == obj);
{
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_add_last (list1, obj);
- node2 = gl_list_add_last (list2, obj);
- node3 = gl_list_add_last (list3, obj);
+ node1 = gl_list_nx_add_last (list1, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_last (list2, obj);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_last (list3, obj);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_node_value (list1, node1) == obj);
ASSERT (gl_list_node_value (list2, node2) == obj);
ASSERT (gl_list_node_value (list3, node3) == obj);
const char *obj1 = RANDOM_OBJECT ();
const char *obj2 = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_add_first (list1, obj2);
- node1 = gl_list_add_before (list1, node1, obj0);
- node1 = gl_list_add_after (list1, node1, obj1);
- node2 = gl_list_add_first (list2, obj2);
- node2 = gl_list_add_before (list2, node2, obj0);
- node2 = gl_list_add_after (list2, node2, obj1);
- node3 = gl_list_add_first (list3, obj2);
- node3 = gl_list_add_before (list3, node3, obj0);
- node3 = gl_list_add_after (list3, node3, obj1);
+ node1 = gl_list_nx_add_first (list1, obj2);
+ ASSERT (node1 != NULL);
+ node1 = gl_list_nx_add_before (list1, node1, obj0);
+ ASSERT (node1 != NULL);
+ node1 = gl_list_nx_add_after (list1, node1, obj1);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_first (list2, obj2);
+ ASSERT (node2 != NULL);
+ node2 = gl_list_nx_add_before (list2, node2, obj0);
+ ASSERT (node2 != NULL);
+ node2 = gl_list_nx_add_after (list2, node2, obj1);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_first (list3, obj2);
+ ASSERT (node3 != NULL);
+ node3 = gl_list_nx_add_before (list3, node3, obj0);
+ ASSERT (node3 != NULL);
+ node3 = gl_list_nx_add_after (list3, node3, obj1);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_node_value (list1, node1) == obj1);
ASSERT (gl_list_node_value (list2, node2) == obj1);
ASSERT (gl_list_node_value (list3, node3) == obj1);
size_t index = RANDOM (gl_list_size (list1) + 1);
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_add_at (list1, index, obj);
- node2 = gl_list_add_at (list2, index, obj);
- node3 = gl_list_add_at (list3, index, obj);
+ node1 = gl_list_nx_add_at (list1, index, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_at (list2, index, obj);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_at (list3, index, obj);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_get_at (list1, index) == obj);
ASSERT (gl_list_node_value (list1, node1) == obj);
ASSERT (gl_list_get_at (list2, index) == obj);
/* Test of ordered set data type implementation.
- Copyright (C) 2006-2009 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 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 "gl_avltree_oset.h"
-#include <stdio.h>
#include <stdlib.h>
#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);
"p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "<", ">", "[", "]"
};
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
#define RANDOM(n) (rand () % (n))
#define RANDOM_OBJECT() objects[RANDOM (SIZEOF (objects))]
unsigned int repeat;
/* Create set1. */
- set1 = gl_oset_create_empty (GL_ARRAY_OSET, (gl_setelement_compar_fn) strcmp, NULL);
+ set1 = gl_oset_nx_create_empty (GL_ARRAY_OSET, (gl_setelement_compar_fn) strcmp, NULL);
+ ASSERT (set1 != NULL);
/* Create set2. */
- set2 = gl_oset_create_empty (GL_AVLTREE_OSET, (gl_setelement_compar_fn) strcmp, NULL);
+ set2 = gl_oset_nx_create_empty (GL_AVLTREE_OSET, (gl_setelement_compar_fn) strcmp, NULL);
+ ASSERT (set2 != NULL);
check_all (set1, set2);
for (i = 0; i < initial_size; i++)
{
const char *obj = RANDOM_OBJECT ();
- ASSERT (gl_oset_add (set1, obj) == gl_oset_add (set2, obj));
+ ASSERT (gl_oset_nx_add (set1, obj) == gl_oset_nx_add (set2, obj));
check_all (set1, set2);
}
case 1:
{
const char *obj = RANDOM_OBJECT ();
- ASSERT (gl_oset_add (set1, obj) == gl_oset_add (set2, obj));
+ ASSERT (gl_oset_nx_add (set1, obj) == gl_oset_nx_add (set2, obj));
}
break;
case 2:
/* Test of sequential list data type implementation.
- Copyright (C) 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 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 "gl_avltreehash_list.h"
#include <limits.h>
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "gl_array_list.h"
#include "progname.h"
+#include "macros.h"
extern void gl_avltreehash_list_check_invariants (gl_list_t list);
return h;
}
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
#define RANDOM(n) (rand () % (n))
#define RANDOM_OBJECT() objects[RANDOM (SIZEOF (objects))]
contents[i] = RANDOM_OBJECT ();
/* Create list1. */
- list1 = gl_list_create (GL_ARRAY_LIST,
- string_equals, string_hash, NULL, true,
- initial_size, contents);
+ list1 = gl_list_nx_create (GL_ARRAY_LIST,
+ string_equals, string_hash, NULL, true,
+ initial_size, contents);
+ ASSERT (list1 != NULL);
/* Create list2. */
- list2 = gl_list_create_empty (GL_AVLTREEHASH_LIST,
- string_equals, string_hash, NULL, true);
+ list2 = gl_list_nx_create_empty (GL_AVLTREEHASH_LIST,
+ string_equals, string_hash, NULL, true);
+ ASSERT (list2 != NULL);
for (i = 0; i < initial_size; i++)
- gl_list_add_last (list2, contents[i]);
+ ASSERT (gl_list_nx_add_last (list2, contents[i]) != NULL);
/* Create list3. */
- list3 = gl_list_create (GL_AVLTREEHASH_LIST,
- string_equals, string_hash, NULL, true,
- initial_size, contents);
+ list3 = gl_list_nx_create (GL_AVLTREEHASH_LIST,
+ string_equals, string_hash, NULL, true,
+ initial_size, contents);
+ ASSERT (list3 != NULL);
check_all (list1, list2, list3);
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_set_at (list1, index, obj);
+ node1 = gl_list_nx_set_at (list1, index, obj);
+ ASSERT (node1 != NULL);
ASSERT (gl_list_get_at (list1, index) == obj);
ASSERT (gl_list_node_value (list1, node1) == obj);
- node2 = gl_list_set_at (list2, index, obj);
+ node2 = gl_list_nx_set_at (list2, index, obj);
+ ASSERT (node2 != NULL);
ASSERT (gl_list_get_at (list2, index) == obj);
ASSERT (gl_list_node_value (list2, node2) == obj);
- node3 = gl_list_set_at (list3, index, obj);
+ node3 = gl_list_nx_set_at (list3, index, obj);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_get_at (list3, index) == obj);
ASSERT (gl_list_node_value (list3, node3) == obj);
{
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_add_first (list1, obj);
- node2 = gl_list_add_first (list2, obj);
- node3 = gl_list_add_first (list3, obj);
+ node1 = gl_list_nx_add_first (list1, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_first (list2, obj);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_first (list3, obj);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_node_value (list1, node1) == obj);
ASSERT (gl_list_node_value (list2, node2) == obj);
ASSERT (gl_list_node_value (list3, node3) == obj);
{
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_add_last (list1, obj);
- node2 = gl_list_add_last (list2, obj);
- node3 = gl_list_add_last (list3, obj);
+ node1 = gl_list_nx_add_last (list1, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_last (list2, obj);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_last (list3, obj);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_node_value (list1, node1) == obj);
ASSERT (gl_list_node_value (list2, node2) == obj);
ASSERT (gl_list_node_value (list3, node3) == obj);
const char *obj1 = RANDOM_OBJECT ();
const char *obj2 = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_add_first (list1, obj2);
- node1 = gl_list_add_before (list1, node1, obj0);
- node1 = gl_list_add_after (list1, node1, obj1);
- node2 = gl_list_add_first (list2, obj2);
- node2 = gl_list_add_before (list2, node2, obj0);
- node2 = gl_list_add_after (list2, node2, obj1);
- node3 = gl_list_add_first (list3, obj2);
- node3 = gl_list_add_before (list3, node3, obj0);
- node3 = gl_list_add_after (list3, node3, obj1);
+ node1 = gl_list_nx_add_first (list1, obj2);
+ ASSERT (node1 != NULL);
+ node1 = gl_list_nx_add_before (list1, node1, obj0);
+ ASSERT (node1 != NULL);
+ node1 = gl_list_nx_add_after (list1, node1, obj1);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_first (list2, obj2);
+ ASSERT (node2 != NULL);
+ node2 = gl_list_nx_add_before (list2, node2, obj0);
+ ASSERT (node2 != NULL);
+ node2 = gl_list_nx_add_after (list2, node2, obj1);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_first (list3, obj2);
+ ASSERT (node3 != NULL);
+ node3 = gl_list_nx_add_before (list3, node3, obj0);
+ ASSERT (node3 != NULL);
+ node3 = gl_list_nx_add_after (list3, node3, obj1);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_node_value (list1, node1) == obj1);
ASSERT (gl_list_node_value (list2, node2) == obj1);
ASSERT (gl_list_node_value (list3, node3) == obj1);
size_t index = RANDOM (gl_list_size (list1) + 1);
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_add_at (list1, index, obj);
- node2 = gl_list_add_at (list2, index, obj);
- node3 = gl_list_add_at (list3, index, obj);
+ node1 = gl_list_nx_add_at (list1, index, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_at (list2, index, obj);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_at (list3, index, obj);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_get_at (list1, index) == obj);
ASSERT (gl_list_node_value (list1, node1) == obj);
ASSERT (gl_list_get_at (list2, index) == obj);
/* Self tests for base64.
- Copyright (C) 2004, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2008, 2009, 2010 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software: you can redistribute it and/or modify
#include <config.h>
+#include "base64.h"
+
#include <stddef.h>
-#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
-#include "base64.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (void)
/* Test of binary mode I/O.
- Copyright (C) 2005, 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdlib.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of <bitrotate.h> substitute.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "bitrotate.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", \
- __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (void)
/* Test of conversion of unibyte character to wide character.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <wchar.h>
+#include "signature.h"
+SIGNATURE_CHECK (btowc, wint_t, (int));
+
#include <locale.h>
#include <stdio.h>
-#include <stdlib.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (int argc, char *argv[])
/* Test of <byteswap.h> substitute.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <byteswap.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of character handling in C locale.
- Copyright (C) 2005, 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "c-ctype.h"
#include <locale.h>
-#include <stdio.h>
-#include <stdlib.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static void
test_all (void)
/* Test of c-stack module.
- Copyright (C) 2002, 2004, 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2006, 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "exitfail.h"
#include <stdio.h>
-#include <stdlib.h>
#if HAVE_SETRLIMIT
/* At least FreeBSD 5.0 needs extra headers before <sys/resource.h>
will compile. */
# include <sys/resource.h>
#endif
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
char *program_name;
/* Test of case-insensitive string comparison function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "c-strcase.h"
#include <locale.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (int argc, char *argv[])
/* Test of case-insensitive searching in a string.
- Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "c-strcasestr.h"
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of case-insensitive string comparison function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "c-strcase.h"
#include <locale.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (int argc, char *argv[])
/* Test of searching in a string.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "c-strstr.h"
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of execution of program termination handlers.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdlib.h>
+#include "signature.h"
+SIGNATURE_CHECK (realpath, char *, (const char *, char *));
+SIGNATURE_CHECK (canonicalize_file_name, char *, (const char *));
+
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
#include "same-inode.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "t-can-lgpl.tmp"
+static void *
+null_ptr (void)
+{
+ return NULL;
+}
+
int
main (void)
{
any leftovers from a previous partial run. */
{
int fd;
- ASSERT (system ("rm -rf " BASE " ise") == 0);
+ system ("rm -rf " BASE " ise");
ASSERT (mkdir (BASE, 0700) == 0);
fd = creat (BASE "/tra", 0600);
ASSERT (0 <= fd);
ASSERT (result == NULL);
ASSERT (errno == ENOENT);
errno = 0;
- result = canonicalize_file_name (NULL);
+ result = canonicalize_file_name (null_ptr ());
ASSERT (result == NULL);
ASSERT (errno == EINVAL);
}
/* Test of execution of file name canonicalization.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <unistd.h>
#include "same-inode.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "t-can.tmp"
+static void *
+null_ptr (void)
+{
+ return NULL;
+}
+
int
main (void)
{
any leftovers from a previous partial run. */
{
int fd;
- ASSERT (system ("rm -rf " BASE " ise") == 0);
+ system ("rm -rf " BASE " ise");
ASSERT (mkdir (BASE, 0700) == 0);
fd = creat (BASE "/tra", 0600);
ASSERT (0 <= fd);
ASSERT (result2 == NULL);
ASSERT (errno == ENOENT);
errno = 0;
- result1 = canonicalize_file_name (NULL);
+ result1 = canonicalize_file_name (null_ptr ());
ASSERT (result1 == NULL);
ASSERT (errno == EINVAL);
errno = 0;
/* Test of sequential list data type implementation.
- Copyright (C) 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 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 "gl_carray_list.h"
-#include <stdio.h>
#include <stdlib.h>
#include "gl_array_list.h"
#include "progname.h"
+#include "macros.h"
static const char *objects[15] =
{
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o"
};
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
#define RANDOM(n) (rand () % (n))
#define RANDOM_OBJECT() objects[RANDOM (SIZEOF (objects))]
contents[i] = RANDOM_OBJECT ();
/* Create list1. */
- list1 = gl_list_create (GL_ARRAY_LIST, NULL, NULL, NULL, true,
- initial_size, contents);
+ list1 = gl_list_nx_create (GL_ARRAY_LIST, NULL, NULL, NULL, true,
+ initial_size, contents);
+ ASSERT (list1 != NULL);
/* Create list2. */
- list2 = gl_list_create_empty (GL_CARRAY_LIST, NULL, NULL, NULL, true);
+ list2 = gl_list_nx_create_empty (GL_CARRAY_LIST, NULL, NULL, NULL, true);
+ ASSERT (list2 != NULL);
for (i = 0; i < initial_size; i++)
- gl_list_add_last (list2, contents[i]);
+ ASSERT (gl_list_nx_add_last (list2, contents[i]) != NULL);
/* Create list3. */
- list3 = gl_list_create (GL_CARRAY_LIST, NULL, NULL, NULL, true,
- initial_size, contents);
+ list3 = gl_list_nx_create (GL_CARRAY_LIST, NULL, NULL, NULL, true,
+ initial_size, contents);
+ ASSERT (list3 != NULL);
check_all (list1, list2, list3);
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_set_at (list1, index, obj);
+ node1 = gl_list_nx_set_at (list1, index, obj);
+ ASSERT (node1 != NULL);
ASSERT (gl_list_get_at (list1, index) == obj);
ASSERT (gl_list_node_value (list1, node1) == obj);
- node2 = gl_list_set_at (list2, index, obj);
+ node2 = gl_list_nx_set_at (list2, index, obj);
+ ASSERT (node2 != NULL);
ASSERT (gl_list_get_at (list2, index) == obj);
ASSERT (gl_list_node_value (list2, node2) == obj);
- node3 = gl_list_set_at (list3, index, obj);
+ node3 = gl_list_nx_set_at (list3, index, obj);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_get_at (list3, index) == obj);
ASSERT (gl_list_node_value (list3, node3) == obj);
{
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_add_first (list1, obj);
- node2 = gl_list_add_first (list2, obj);
- node3 = gl_list_add_first (list3, obj);
+ node1 = gl_list_nx_add_first (list1, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_first (list2, obj);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_first (list3, obj);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_node_value (list1, node1) == obj);
ASSERT (gl_list_node_value (list2, node2) == obj);
ASSERT (gl_list_node_value (list3, node3) == obj);
{
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_add_last (list1, obj);
- node2 = gl_list_add_last (list2, obj);
- node3 = gl_list_add_last (list3, obj);
+ node1 = gl_list_nx_add_last (list1, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_last (list2, obj);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_last (list3, obj);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_node_value (list1, node1) == obj);
ASSERT (gl_list_node_value (list2, node2) == obj);
ASSERT (gl_list_node_value (list3, node3) == obj);
const char *obj1 = RANDOM_OBJECT ();
const char *obj2 = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_add_first (list1, obj2);
- node1 = gl_list_add_before (list1, node1, obj0);
- node1 = gl_list_add_after (list1, node1, obj1);
- node2 = gl_list_add_first (list2, obj2);
- node2 = gl_list_add_before (list2, node2, obj0);
- node2 = gl_list_add_after (list2, node2, obj1);
- node3 = gl_list_add_first (list3, obj2);
- node3 = gl_list_add_before (list3, node3, obj0);
- node3 = gl_list_add_after (list3, node3, obj1);
+ node1 = gl_list_nx_add_first (list1, obj2);
+ ASSERT (node1 != NULL);
+ node1 = gl_list_nx_add_before (list1, node1, obj0);
+ ASSERT (node1 != NULL);
+ node1 = gl_list_nx_add_after (list1, node1, obj1);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_first (list2, obj2);
+ ASSERT (node2 != NULL);
+ node2 = gl_list_nx_add_before (list2, node2, obj0);
+ ASSERT (node2 != NULL);
+ node2 = gl_list_nx_add_after (list2, node2, obj1);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_first (list3, obj2);
+ ASSERT (node3 != NULL);
+ node3 = gl_list_nx_add_before (list3, node3, obj0);
+ ASSERT (node3 != NULL);
+ node3 = gl_list_nx_add_after (list3, node3, obj1);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_node_value (list1, node1) == obj1);
ASSERT (gl_list_node_value (list2, node2) == obj1);
ASSERT (gl_list_node_value (list3, node3) == obj1);
size_t index = RANDOM (gl_list_size (list1) + 1);
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_add_at (list1, index, obj);
- node2 = gl_list_add_at (list2, index, obj);
- node3 = gl_list_add_at (list3, index, obj);
+ node1 = gl_list_nx_add_at (list1, index, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_at (list2, index, obj);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_at (list3, index, obj);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_get_at (list1, index) == obj);
ASSERT (gl_list_node_value (list1, node1) == obj);
ASSERT (gl_list_get_at (list2, index) == obj);
/* Test of rounding towards positive infinity.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include "signature.h"
+SIGNATURE_CHECK (ceilf, float, (float));
#include "isnanf-nolibm.h"
#include "nan.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0f.
So we use -zero instead. */
/* Test of rounding towards positive infinity.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
-#include <stdlib.h>
#include "isnanf-nolibm.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* The reference implementation, taken from lib/ceil.c. */
/* Test of rounding towards positive infinity.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <math.h>
+#include "signature.h"
+SIGNATURE_CHECK (ceill, long double, (long double));
+
#include <float.h>
-#include <stdio.h>
-#include <stdlib.h>
#include "fpucw.h"
#include "isnanl-nolibm.h"
#include "nan.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
So we use minus_zero instead.
/* Tests of chown.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <unistd.h>
+#include "signature.h"
+SIGNATURE_CHECK (chown, int, (char const *, uid_t, gid_t));
+
#include <fcntl.h>
#include <errno.h>
#include <stdbool.h>
#include "mgetgroups.h"
#include "stat-time.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-chown.t"
main (void)
{
/* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
return test_chown (chown, true);
}
/* Tests of chown.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Written by Eric Blake <ebb9@byu.net>, 2009. */
-#define TEST_CHOWN_NAP
-/* Sleep long enough to notice a timestamp difference on the file
- system in the current directory. */
-static void
-nap (void)
-{
- static long delay;
- if (!delay)
- {
- /* Initialize only once, by sleeping for 20 milliseconds (needed
- since xfs has a quantization of about 10 milliseconds, even
- though it has a granularity of 1 nanosecond, and since NTFS
- has a default quantization of 15.25 milliseconds, even though
- it has a granularity of 100 nanoseconds). If the seconds
- differ, repeat the test one more time (in case we crossed a
- quantization boundary on a file system with 1 second
- resolution). If we can't observe a difference in only the
- nanoseconds, then fall back to 1 second if the time is odd,
- and 2 seconds (needed for FAT) if time is even. */
- struct stat st1;
- struct stat st2;
- ASSERT (close (creat (BASE "tmp", 0600)) == 0);
- ASSERT (stat (BASE "tmp", &st1) == 0);
- ASSERT (unlink (BASE "tmp") == 0);
- delay = 20000;
- usleep (delay);
- ASSERT (close (creat (BASE "tmp", 0600)) == 0);
- ASSERT (stat (BASE "tmp", &st2) == 0);
- ASSERT (unlink (BASE "tmp") == 0);
- if (st1.st_mtime != st2.st_mtime)
- {
- /* Seconds differ, give it one more shot. */
- st1 = st2;
- usleep (delay);
- ASSERT (close (creat (BASE "tmp", 0600)) == 0);
- ASSERT (stat (BASE "tmp", &st2) == 0);
- ASSERT (unlink (BASE "tmp") == 0);
- }
- if (! (st1.st_mtime == st2.st_mtime
- && get_stat_mtime_ns (&st1) < get_stat_mtime_ns (&st2)))
- delay = (st1.st_mtime & 1) ? 1000000 : 2000000;
- }
- usleep (delay);
-}
+#include "nap.h"
#if !HAVE_GETEGID
# define getegid() ((gid_t) -1)
/* Test duplicating non-inheritable file descriptors.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <errno.h>
#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <unistd.h>
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
#endif
#include "binary-io.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* Return non-zero if FD is open and inheritable across exec/spawn. */
static int
/* Test of closein module.
- Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of condition variables in multithreaded situations.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of copying of files.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <sys/stat.h>
#include "progname.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (int argc, char *argv[])
/* Test of copying of files.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "copy-file.h"
-#include <stdio.h>
-#include <stdlib.h>
-
#include "progname.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (int argc, char *argv[])
/*
- * Copyright (C) 2007-2008 Free Software Foundation
+ * Copyright (C) 2007-2009 Free Software Foundation
*
* This 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 <limits.h>
#include <stdio.h>
-#include <stdlib.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion \"%s\" failed\n", \
- __FILE__, __LINE__, #expr); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define UINT_BIT (sizeof (unsigned int) * CHAR_BIT)
#define ULONG_BIT (sizeof (unsigned long int) * CHAR_BIT)
--- /dev/null
+/* Test of <ctype.h> substitute.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <ctype.h>
+
+int
+main (void)
+{
+ return 0;
+}
*
* This program is free software; you can 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)
+ * 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,
/* Test that directory streams leave standard fds alone.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
-#include <stdlib.h>
#include <unistd.h>
#include "unistd-safer.h"
duplicate the original stderr. */
#define BACKUP_STDERR_FILENO 10
-static FILE *myerr;
+#define ASSERT_STREAM myerr
+#include "macros.h"
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (myerr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (myerr); \
- abort (); \
- } \
- } \
- while (0)
+static FILE *myerr;
int
main (void)
--- /dev/null
+/* Test of <dirent.h> substitute.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <dirent.h>
+
+/* Check for existence of required types. */
+static DIR *dir _GL_UNUSED;
+static struct dirent d;
+static ino_t i;
+
+int
+main (void)
+{
+ return d.d_name[0] + i;
+}
/* Test the gnulib dirname module.
- Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of POSIX compatible dprintf() function.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdio.h>
+#include "signature.h"
+SIGNATURE_CHECK (dprintf, int, (int, const char *, ...));
+
#include <stddef.h>
#include <stdint.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static void
test_function (int (*my_dprintf) (int, const char *, ...))
--- /dev/null
+/* Test of POSIX compatible dprintf() function.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#if HAVE_GETRLIMIT && HAVE_SETRLIMIT
+
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+
+/* Test against a memory leak in the fprintf replacement. */
+
+/* Number of iterations across the loop. */
+#define NUM_ROUNDS 1000
+
+/* Number of bytes that are allowed to escape per round. */
+#define MAX_ALLOC_ROUND 10000
+
+/* Number of bytes that are allowed to escape in total.
+ This should be at least 10 MB, since it includes the normal memory
+ or address space of the test program. */
+#define MAX_ALLOC_TOTAL (NUM_ROUNDS * MAX_ALLOC_ROUND)
+
+int
+main (int argc, char *argv[])
+{
+ struct rlimit limit;
+ int arg;
+ int repeat;
+
+ /* Limit the amount of malloc()ed memory to MAX_ALLOC_TOTAL or less. */
+
+ /* On BSD systems, malloc() is limited by RLIMIT_DATA. */
+#ifdef RLIMIT_DATA
+ if (getrlimit (RLIMIT_DATA, &limit) < 0)
+ return 77;
+ if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > MAX_ALLOC_TOTAL)
+ limit.rlim_max = MAX_ALLOC_TOTAL;
+ limit.rlim_cur = limit.rlim_max;
+ if (setrlimit (RLIMIT_DATA, &limit) < 0)
+ return 77;
+#endif
+ /* On Linux systems, malloc() is limited by RLIMIT_AS. */
+#ifdef RLIMIT_AS
+ if (getrlimit (RLIMIT_AS, &limit) < 0)
+ return 77;
+ if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > MAX_ALLOC_TOTAL)
+ limit.rlim_max = MAX_ALLOC_TOTAL;
+ limit.rlim_cur = limit.rlim_max;
+ if (setrlimit (RLIMIT_AS, &limit) < 0)
+ return 77;
+#endif
+
+ arg = atoi (argv[1]);
+ if (arg == 0)
+ {
+ void *memory = malloc (MAX_ALLOC_TOTAL);
+ if (memory == NULL)
+ return 1;
+ memset (memory, 17, MAX_ALLOC_TOTAL);
+ return 78;
+ }
+
+ /* Perform the test and test whether it triggers a permanent memory
+ allocation of more than MAX_ALLOC_TOTAL bytes. */
+
+ for (repeat = 0; repeat < NUM_ROUNDS; repeat++)
+ {
+ /* This may produce a temporary memory allocation of 11000 bytes.
+ but should not result in a permanent memory allocation. */
+ if (dprintf (STDOUT_FILENO, "%011000d\n", 17) == -1
+ && errno == ENOMEM)
+ return 1;
+ }
+
+ return 0;
+}
+
+#else
+
+int
+main (int argc, char *argv[])
+{
+ return 77;
+}
+
+#endif
--- /dev/null
+#!/bin/sh
+
+# Test against a memory leak.
+
+(./test-dprintf-posix2${EXEEXT} 0
+ result=$?
+ if test $result != 77 && test $result != 78; then result=1; fi
+ exit $result
+) 2>/dev/null
+malloc_result=$?
+if test $malloc_result = 77; then
+ echo "Skipping test: getrlimit and setrlimit don't work"
+ exit 77
+fi
+
+./test-dprintf-posix2${EXEEXT} 1 > /dev/null
+result=$?
+if test $result = 77; then
+ echo "Skipping test: getrlimit and setrlimit don't work"
+ exit 77
+fi
+if test $result != 0; then
+ exit 1
+fi
+
+if test $malloc_result = 78; then
+ echo "Skipping test: getrlimit and setrlimit don't work"
+ exit 77
+fi
+
+exit 0
/* Test that dup_safer leaves standard fds alone.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
-#include <stdlib.h>
-#include <sys/stat.h>
#include "binary-io.h"
#include "cloexec.h"
duplicate the original stderr. */
#define BACKUP_STDERR_FILENO 10
-static FILE *myerr;
+#define ASSERT_STREAM myerr
+#include "macros.h"
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (myerr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (myerr); \
- abort (); \
- } \
- } \
- while (0)
+static FILE *myerr;
/* Return true if FD is open. */
static bool
/* Test duplicating file descriptors.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <unistd.h>
+#include "signature.h"
+SIGNATURE_CHECK (dup2, int, (int, int));
+
#include <errno.h>
#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
#include "binary-io.h"
-#include "cloexec.h"
+
+#if GNULIB_CLOEXEC
+# include "cloexec.h"
+#endif
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* Get declarations of the Win32 API functions. */
# include <windows.h>
#endif
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* Return non-zero if FD is open. */
static int
#endif
}
+#if GNULIB_CLOEXEC
/* Return non-zero if FD is open and inheritable across exec/spawn. */
static int
is_inheritable (int fd)
{
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* On Win32, the initial state of unassigned standard file
descriptors is that they are open but point to an
INVALID_HANDLE_VALUE, and there is no fcntl. */
if (h == INVALID_HANDLE_VALUE || GetHandleInformation (h, &flags) == 0)
return 0;
return (flags & HANDLE_FLAG_INHERIT) != 0;
-#else
-# ifndef F_GETFD
-# error Please port fcntl to your platform
-# endif
+# else
+# ifndef F_GETFD
+# error Please port fcntl to your platform
+# endif
int i = fcntl (fd, F_GETFD);
return 0 <= i && (i & FD_CLOEXEC) == 0;
-#endif
+# endif
}
+#endif /* GNULIB_CLOEXEC */
#if !O_BINARY
# define setmode(f,m) zero ()
ASSERT (read (fd, buffer, 1) == 1);
ASSERT (*buffer == '2');
+#if GNULIB_CLOEXEC
/* Any new fd created by dup2 must not be cloexec. */
ASSERT (close (fd + 2) == 0);
ASSERT (dup_cloexec (fd) == fd + 1);
ASSERT (!is_inheritable (fd + 1));
ASSERT (dup2 (fd + 1, fd + 2) == fd + 2);
ASSERT (is_inheritable (fd + 2));
+#endif
/* On systems that distinguish between text and binary mode, dup2
reuses the mode of the source. */
/* Test duplicating file descriptors.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <unistd.h>
+#include "signature.h"
+SIGNATURE_CHECK (dup3, int, (int, int, int));
+
#include <errno.h>
#include <fcntl.h>
#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* Get declarations of the Win32 API functions. */
#endif
#include "binary-io.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* Return true if FD is open. */
static bool
/* Test of duplicating a locale object.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#if HAVE_DUPLOCALE
+#include "signature.h"
+SIGNATURE_CHECK (duplocale, locale_t, (locale_t));
+
#include <langinfo.h>
#include <monetary.h>
#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
struct locale_dependent_values
{
/* Test of environ variable.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <errno.h> substitute.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test suite for exclude.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 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
# Test suite for exclude.
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 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
# Test suite for exclude.
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 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
# Test suite for exclude.
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 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
# Test suite for exclude.
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 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
# Test suite for exclude.
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 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
# Test suite for exclude.
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 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
# Test suite for exclude.
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 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 fbufmode() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "fbufmode.h"
#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+
+#include "macros.h"
#define TESTFILE "t-fbufmode.tmp"
/* Test changing to a directory named by a file descriptor.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <unistd.h>
+#include "signature.h"
+SIGNATURE_CHECK (fchdir, int, (int));
+
#include <errno.h>
#include <fcntl.h>
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "cloexec.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (void)
ASSERT (dup_cloexec (fd) == new_fd);
ASSERT (dup2 (new_fd, fd) == fd);
ASSERT (close (new_fd) == 0);
+ ASSERT (fcntl (fd, F_DUPFD_CLOEXEC, new_fd) == new_fd);
+ ASSERT (close (fd) == 0);
+ ASSERT (fcntl (new_fd, F_DUPFD, fd) == fd);
+ ASSERT (close (new_fd) == 0);
+#if GNULIB_DUP3
+ ASSERT (dup3 (fd, new_fd, 0) == new_fd);
+ ASSERT (dup3 (new_fd, fd, 0) == fd);
+ ASSERT (close (new_fd) == 0);
+#endif
}
}
/* Tests of fchownat.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <unistd.h>
+#include "signature.h"
+SIGNATURE_CHECK (fchownat, int, (int, char const *, uid_t, gid_t, int));
+
#include <fcntl.h>
#include <errno.h>
#include <stdbool.h>
#include "mgetgroups.h"
#include "openat.h"
#include "stat-time.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-fchownat.t"
int result2; /* Skip because of no lchown support. */
/* Clean up any trash from prior testsuite runs. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
/* Basic tests. */
result1 = test_chown (do_chown, true);
/* Test of <fcntl.h> substitute.
- Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of opening a file descriptor.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
-#include <stdlib.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-fcntl-safer.t"
--- /dev/null
+/* Test of fcntl(2).
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+/* Specification. */
+#include <fcntl.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fcntl, int, (int, int, ...));
+
+/* Helpers. */
+#include <errno.h>
+#include <stdarg.h>
+#include <stdbool.h>
+#include <unistd.h>
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Get declarations of the Win32 API functions. */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+
+#include "binary-io.h"
+#include "macros.h"
+
+/* Use O_CLOEXEC if available, but test works without it. */
+#ifndef O_CLOEXEC
+# define O_CLOEXEC 0
+#endif
+
+#if !O_BINARY
+# define setmode(f,m) zero ()
+static int zero (void) { return 0; }
+#endif
+
+/* Return true if FD is open. */
+static bool
+is_open (int fd)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* On Win32, the initial state of unassigned standard file
+ descriptors is that they are open but point to an
+ INVALID_HANDLE_VALUE, and there is no fcntl. */
+ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE;
+#else
+# ifndef F_GETFL
+# error Please port fcntl to your platform
+# endif
+ return 0 <= fcntl (fd, F_GETFL);
+#endif
+}
+
+/* Return true if FD is open and inheritable across exec/spawn. */
+static bool
+is_inheritable (int fd)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* On Win32, the initial state of unassigned standard file
+ descriptors is that they are open but point to an
+ INVALID_HANDLE_VALUE, and there is no fcntl. */
+ HANDLE h = (HANDLE) _get_osfhandle (fd);
+ DWORD flags;
+ if (h == INVALID_HANDLE_VALUE || GetHandleInformation (h, &flags) == 0)
+ return false;
+ return (flags & HANDLE_FLAG_INHERIT) != 0;
+#else
+# ifndef F_GETFD
+# error Please port fcntl to your platform
+# endif
+ int i = fcntl (fd, F_GETFD);
+ return 0 <= i && (i & FD_CLOEXEC) == 0;
+#endif
+}
+
+/* Return non-zero if FD is open in the given MODE, which is either
+ O_TEXT or O_BINARY. */
+static bool
+is_mode (int fd, int mode)
+{
+ int value = setmode (fd, O_BINARY);
+ setmode (fd, value);
+ return mode == value;
+}
+
+/* Since native fcntl can have more supported operations than our
+ replacement is aware of, and since various operations assign
+ different types to the vararg argument, a wrapper around fcntl must
+ be able to pass a vararg of unknown type on through to the original
+ fcntl. Make sure that this works properly: func1 behaves like the
+ original fcntl interpreting the vararg as an int or a pointer to a
+ struct, and func2 behaves like rpl_fcntl that doesn't know what
+ type to forward. */
+struct dummy_struct
+{
+ long filler;
+ int value;
+};
+static int
+func1 (int a, ...)
+{
+ va_list arg;
+ int i;
+ va_start (arg, a);
+ if (a < 4)
+ i = va_arg (arg, int);
+ else
+ {
+ struct dummy_struct *s = va_arg (arg, struct dummy_struct *);
+ i = s->value;
+ }
+ va_end (arg);
+ return i;
+}
+static int
+func2 (int a, ...)
+{
+ va_list arg;
+ void *p;
+ va_start (arg, a);
+ p = va_arg (arg, void *);
+ va_end (arg);
+ return func1 (a, p);
+}
+
+/* Ensure that all supported fcntl actions are distinct, and
+ usable in preprocessor expressions. */
+static void
+check_flags (void)
+{
+ switch (0)
+ {
+ case F_DUPFD:
+#if F_DUPFD
+#endif
+
+ case F_DUPFD_CLOEXEC:
+#if F_DUPFD_CLOEXEC
+#endif
+
+ case F_GETFD:
+#if F_GETFD
+#endif
+
+#ifdef F_SETFD
+ case F_SETFD:
+# if F_SETFD
+# endif
+#endif
+
+#ifdef F_GETFL
+ case F_GETFL:
+# if F_GETFL
+# endif
+#endif
+
+#ifdef F_SETFL
+ case F_SETFL:
+# if F_SETFL
+# endif
+#endif
+
+#ifdef F_GETOWN
+ case F_GETOWN:
+# if F_GETOWN
+# endif
+#endif
+
+#ifdef F_SETOWN
+ case F_SETOWN:
+# if F_SETOWN
+# endif
+#endif
+
+#ifdef F_GETLK
+ case F_GETLK:
+# if F_GETLK
+# endif
+#endif
+
+#ifdef F_SETLK
+ case F_SETLK:
+# if F_SETLK
+# endif
+#endif
+
+#ifdef F_SETLKW
+ case F_SETLKW:
+# if F_SETLKW
+# endif
+#endif
+
+ ;
+ }
+}
+
+int
+main (void)
+{
+ const char *file = "test-fcntl.tmp";
+ int fd;
+
+ /* Sanity check that rpl_fcntl is likely to work. */
+ ASSERT (func2 (1, 2) == 2);
+ ASSERT (func2 (2, -2) == -2);
+ ASSERT (func2 (3, 0x80000000) == 0x80000000);
+ {
+ struct dummy_struct s = { 0L, 4 };
+ ASSERT (func2 (4, &s) == 4);
+ }
+ check_flags ();
+
+ /* Assume std descriptors were provided by invoker, and ignore fds
+ that might have been inherited. */
+ fd = creat (file, 0600);
+ ASSERT (STDERR_FILENO < fd);
+ close (fd + 1);
+ close (fd + 2);
+
+ /* For F_DUPFD*, the source must be valid. */
+ errno = 0;
+ ASSERT (fcntl (-1, F_DUPFD, 0) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (fd + 1, F_DUPFD, 0) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (10000000, F_DUPFD, 0) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (-1, F_DUPFD_CLOEXEC, 0) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (fd + 1, F_DUPFD_CLOEXEC, 0) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (10000000, F_DUPFD_CLOEXEC, 0) == -1);
+ ASSERT (errno == EBADF);
+
+ /* For F_DUPFD*, the destination must be valid. */
+ ASSERT (getdtablesize () < 10000000);
+ errno = 0;
+ ASSERT (fcntl (fd, F_DUPFD, -1) == -1);
+ ASSERT (errno == EINVAL);
+ errno = 0;
+ ASSERT (fcntl (fd, F_DUPFD, 10000000) == -1);
+ ASSERT (errno == EINVAL);
+ ASSERT (getdtablesize () < 10000000);
+ errno = 0;
+ ASSERT (fcntl (fd, F_DUPFD_CLOEXEC, -1) == -1);
+ ASSERT (errno == EINVAL);
+ errno = 0;
+ ASSERT (fcntl (fd, F_DUPFD_CLOEXEC, 10000000) == -1);
+ ASSERT (errno == EINVAL);
+
+ /* For F_DUPFD*, check for correct inheritance, as well as
+ preservation of text vs. binary. */
+ setmode (fd, O_BINARY);
+ ASSERT (is_open (fd));
+ ASSERT (!is_open (fd + 1));
+ ASSERT (!is_open (fd + 2));
+ ASSERT (is_inheritable (fd));
+ ASSERT (is_mode (fd, O_BINARY));
+
+ ASSERT (fcntl (fd, F_DUPFD, fd) == fd + 1);
+ ASSERT (is_open (fd));
+ ASSERT (is_open (fd + 1));
+ ASSERT (!is_open (fd + 2));
+ ASSERT (is_inheritable (fd + 1));
+ ASSERT (is_mode (fd, O_BINARY));
+ ASSERT (is_mode (fd + 1, O_BINARY));
+ ASSERT (close (fd + 1) == 0);
+
+ ASSERT (fcntl (fd, F_DUPFD_CLOEXEC, fd + 2) == fd + 2);
+ ASSERT (is_open (fd));
+ ASSERT (!is_open (fd + 1));
+ ASSERT (is_open (fd + 2));
+ ASSERT (is_inheritable (fd));
+ ASSERT (!is_inheritable (fd + 2));
+ ASSERT (is_mode (fd, O_BINARY));
+ ASSERT (is_mode (fd + 2, O_BINARY));
+ ASSERT (close (fd) == 0);
+
+ setmode (fd + 2, O_TEXT);
+ ASSERT (fcntl (fd + 2, F_DUPFD, fd + 1) == fd + 1);
+ ASSERT (!is_open (fd));
+ ASSERT (is_open (fd + 1));
+ ASSERT (is_open (fd + 2));
+ ASSERT (is_inheritable (fd + 1));
+ ASSERT (!is_inheritable (fd + 2));
+ ASSERT (is_mode (fd + 1, O_TEXT));
+ ASSERT (is_mode (fd + 2, O_TEXT));
+ ASSERT (close (fd + 1) == 0);
+
+ ASSERT (fcntl (fd + 2, F_DUPFD_CLOEXEC, 0) == fd);
+ ASSERT (is_open (fd));
+ ASSERT (!is_open (fd + 1));
+ ASSERT (is_open (fd + 2));
+ ASSERT (!is_inheritable (fd));
+ ASSERT (!is_inheritable (fd + 2));
+ ASSERT (is_mode (fd, O_TEXT));
+ ASSERT (is_mode (fd + 2, O_TEXT));
+ ASSERT (close (fd + 2) == 0);
+
+ /* Test F_GETFD. */
+ errno = 0;
+ ASSERT (fcntl (-1, F_GETFD) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (fd + 1, F_GETFD) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (10000000, F_GETFD) == -1);
+ ASSERT (errno == EBADF);
+ {
+ int result = fcntl (fd, F_GETFD);
+ ASSERT (0 <= result);
+ ASSERT ((result & FD_CLOEXEC) == FD_CLOEXEC);
+ ASSERT (dup (fd) == fd + 1);
+ result = fcntl (fd + 1, F_GETFD);
+ ASSERT (0 <= result);
+ ASSERT ((result & FD_CLOEXEC) == 0);
+ ASSERT (close (fd + 1) == 0);
+ }
+
+ /* Cleanup. */
+ ASSERT (close (fd) == 0);
+ ASSERT (unlink (file) == 0);
+
+ return 0;
+}
/* Test opening a directory stream from a file descriptor.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <dirent.h>
+#include "signature.h"
+SIGNATURE_CHECK (fdopendir, DIR *, (int));
+
#include <errno.h>
#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (void)
/* Tests of fdutimensat.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdio.h>
#include <stdlib.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-fdutimensat.t"
int fd;
/* Clean up any trash from prior testsuite runs. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
/* Basic tests. */
result1 = test_utimens (do_utimens, true);
/* Test of POSIX compatible fflush() function.
- Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fflush, int, (FILE *));
+
#include <unistd.h>
int
/* Test of POSIX compatible fflush() function.
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdio.h>
-#include <stdlib.h>
-
#include "binary-io.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (int argc, char **argv)
/* Test for presence of ACL.
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <sys/types.h>
#include <sys/stat.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (int argc, char *argv[])
/* Test of concatenation of two arbitrary file names.
- Copyright (C) 1996-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1996-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "progname.h"
int
-main (int argc _UNUSED_PARAMETER_, char *argv[])
+main (int argc _GL_UNUSED, char *argv[])
{
static char const *const tests[][3] =
{
/* Test of filevercmp() function.
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "filevercmp.h"
-#include <stdio.h>
-#include <stdlib.h>
+#include <stddef.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* set of well sorted examples */
static const char *const examples[] =
/* Test of flock() function.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
#include <config.h>
+#include <sys/file.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (flock, int, (int, int));
+
#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
-#include <sys/file.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed, errno = %d\n", \
- __FILE__, __LINE__, errno); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static void
test_shared (const char *file, int fd)
/* Test of rounding towards negative infinity.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include "signature.h"
+SIGNATURE_CHECK (floorf, float, (float));
#include "isnanf-nolibm.h"
#include "nan.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0f.
So we use -zero instead. */
/* Test of rounding towards negative infinity.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
-#include <stdlib.h>
#include "isnanf-nolibm.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* The reference implementation, taken from lib/floor.c. */
/* Test of rounding towards negative infinity.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <math.h>
+#include "signature.h"
+SIGNATURE_CHECK (floorl, long double, (long double));
+
#include <float.h>
-#include <stdio.h>
-#include <stdlib.h>
#include "fpucw.h"
#include "isnanl-nolibm.h"
#include "nan.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
So we use minus_zero instead.
/* Test of fnmatch string matching function.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <fnmatch.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", \
- __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "signature.h"
+SIGNATURE_CHECK (fnmatch, int, (char const *, char const *, int));
+
+#include "macros.h"
int
main ()
/* Test of opening a file stream.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of opening a file stream.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdio.h>
+#include "signature.h"
+SIGNATURE_CHECK (fopen, FILE *, (char const *, char const *));
+
#define BASE "test-fopen.t"
#include "test-fopen.h"
/* Test of opening a file stream.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Include <config.h> and a form of <stdio.h> first. */
#include <errno.h>
-#include <stdlib.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* Test fopen. Assumes BASE is defined. */
/* Ensure that __fpending works.
- Copyright (C) 2004, 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdio.h>
#include <stdlib.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (void)
/* Test of POSIX compatible fprintf() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdio.h>
+#include "signature.h"
+SIGNATURE_CHECK (fprintf, int, (FILE *, char const *, ...));
+
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-fprintf-posix.h"
/* Test of POSIX compatible vsprintf() and sprintf() functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of POSIX compatible fprintf() function.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
--- /dev/null
+/* Test of POSIX compatible fprintf() function.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#if HAVE_GETRLIMIT && HAVE_SETRLIMIT
+
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <string.h>
+#include <errno.h>
+
+/* Test against a memory leak in the fprintf replacement. */
+
+/* Number of iterations across the loop. */
+#define NUM_ROUNDS 1000
+
+/* Number of bytes that are allowed to escape per round. */
+#define MAX_ALLOC_ROUND 10000
+
+/* Number of bytes that are allowed to escape in total.
+ This should be at least 10 MB, since it includes the normal memory
+ or address space of the test program. */
+#define MAX_ALLOC_TOTAL (NUM_ROUNDS * MAX_ALLOC_ROUND)
+
+int
+main (int argc, char *argv[])
+{
+ struct rlimit limit;
+ int arg;
+ int repeat;
+
+ /* Limit the amount of malloc()ed memory to MAX_ALLOC_TOTAL or less. */
+
+ /* On BSD systems, malloc() is limited by RLIMIT_DATA. */
+#ifdef RLIMIT_DATA
+ if (getrlimit (RLIMIT_DATA, &limit) < 0)
+ return 77;
+ if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > MAX_ALLOC_TOTAL)
+ limit.rlim_max = MAX_ALLOC_TOTAL;
+ limit.rlim_cur = limit.rlim_max;
+ if (setrlimit (RLIMIT_DATA, &limit) < 0)
+ return 77;
+#endif
+ /* On Linux systems, malloc() is limited by RLIMIT_AS. */
+#ifdef RLIMIT_AS
+ if (getrlimit (RLIMIT_AS, &limit) < 0)
+ return 77;
+ if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > MAX_ALLOC_TOTAL)
+ limit.rlim_max = MAX_ALLOC_TOTAL;
+ limit.rlim_cur = limit.rlim_max;
+ if (setrlimit (RLIMIT_AS, &limit) < 0)
+ return 77;
+#endif
+
+ arg = atoi (argv[1]);
+ if (arg == 0)
+ {
+ void *memory = malloc (MAX_ALLOC_TOTAL);
+ if (memory == NULL)
+ return 1;
+ memset (memory, 17, MAX_ALLOC_TOTAL);
+ return 78;
+ }
+
+ /* Perform the test and test whether it triggers a permanent memory
+ allocation of more than MAX_ALLOC_TOTAL bytes. */
+
+ for (repeat = 0; repeat < NUM_ROUNDS; repeat++)
+ {
+ /* This may produce a temporary memory allocation of 11000 bytes.
+ but should not result in a permanent memory allocation. */
+ if (fprintf (stdout, "%011000d\n", 17) == -1
+ && errno == ENOMEM)
+ return 1;
+ }
+
+ return 0;
+}
+
+#else
+
+int
+main (int argc, char *argv[])
+{
+ return 77;
+}
+
+#endif
--- /dev/null
+#!/bin/sh
+
+# Test against a memory leak.
+
+(./test-fprintf-posix3${EXEEXT} 0
+ result=$?
+ if test $result != 77 && test $result != 78; then result=1; fi
+ exit $result
+) 2>/dev/null
+malloc_result=$?
+if test $malloc_result = 77; then
+ echo "Skipping test: getrlimit and setrlimit don't work"
+ exit 77
+fi
+
+./test-fprintf-posix3${EXEEXT} 1 > /dev/null
+result=$?
+if test $result = 77; then
+ echo "Skipping test: getrlimit and setrlimit don't work"
+ exit 77
+fi
+if test $result != 0; then
+ exit 1
+fi
+
+if test $malloc_result = 78; then
+ echo "Skipping test: getrlimit and setrlimit don't work"
+ exit 77
+fi
+
+exit 0
/* Test of fpurge() function.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
+#include "macros.h"
+
/* None of the files accessed by this test are large, so disable the
fseek link warning if we are not using the gnulib fseek module. */
#if !GNULIB_FSEEK
# undef fseek
#endif
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
-
#define TESTFILE "t-fpurge.tmp"
int
/* Test of freadable() function.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "freadable.h"
#include <stdio.h>
-#include <stdlib.h>
+
+#include "macros.h"
/* None of the files accessed by this test are large, so disable the
fseek link warning if we are not using the gnulib fseek module. */
# undef fseek
#endif
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
-
#define TESTFILE "t-freadable.tmp"
int
/* Test of freadahead() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "freadahead.h"
-#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (int argc, char **argv)
/* Test of freading() function.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "freading.h"
#include <stdio.h>
-#include <stdlib.h>
+
+#include "macros.h"
/* None of the files accessed by this test are large, so disable the
fseek link warning if we are not using the gnulib fseek module. */
# undef fseek
#endif
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
-
#define TESTFILE "t-freading.tmp"
int
/* Test of freadptr() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "freadptr.h"
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (int argc, char **argv)
/* Test of freadptr() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdlib.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static int
freadptrbufsize (FILE *fp)
/* Test of freadseek() function.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <string.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (int argc, char **argv)
/* Test of reopening a stream.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "stdio--.h"
/* Helpers. */
-#include <stdlib.h>
#include <unistd.h>
/* This test intentionally closes stderr. So, we arrange to have fd 10
duplicate the original stderr. */
#define BACKUP_STDERR_FILENO 10
-static FILE *myerr;
+#define ASSERT_STREAM myerr
+#include "macros.h"
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (myerr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (myerr); \
- abort (); \
- } \
- } \
- while (0)
+static FILE *myerr;
int
-main (int argc, char **argv)
+main (void)
{
FILE *fp;
/* Test of opening a file stream.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+
+#include "signature.h"
+SIGNATURE_CHECK (freopen, FILE *, (char const *, char const *, FILE *));
+
+#include "macros.h"
int
main ()
/* Test of splitting a double into fraction and mantissa.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <math.h>
+#include "signature.h"
+SIGNATURE_CHECK (frexp, double, (double, int *));
+
#include <float.h>
-#include <stdio.h>
-#include <stdlib.h>
#include "isnand-nolibm.h"
#include "nan.h"
+#include "macros.h"
/* Avoid some warnings from "gcc -Wshadow".
This file doesn't use the exp() function. */
#undef exp
#define exp exponent
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
-
/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
So we use -zero instead. */
double zero = 0.0;
/* Test of splitting a 'long double' into fraction and mantissa.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <math.h>
+#include "signature.h"
+SIGNATURE_CHECK (frexpl, long double, (long double, int *));
+
#include <float.h>
-#include <stdio.h>
-#include <stdlib.h>
#include "fpucw.h"
#include "isnanl-nolibm.h"
#include "nan.h"
+#include "macros.h"
/* Avoid some warnings from "gcc -Wshadow".
This file doesn't use the exp() function. */
#undef exp
#define exp exponent
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
-
/* On MIPS IRIX machines, LDBL_MIN_EXP is -1021, but the smallest reliable
exponent for 'long double' is -964. Similarly, on PowerPC machines,
LDBL_MIN_EXP is -1021, but the smallest reliable exponent for 'long double'
/* Test of fseek() function.
- Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
#include <stdio.h>
-#include <stdlib.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "signature.h"
+SIGNATURE_CHECK (fseek, int, (FILE *, long, int));
+
+#include "macros.h"
#ifndef FUNC_UNGETC_BROKEN
# define FUNC_UNGETC_BROKEN 0
/* Test of fseeko() function.
- Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#endif
#include <stdio.h>
-#include <stdlib.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "signature.h"
+SIGNATURE_CHECK (fseeko, int, (FILE *, off_t, int));
+
+
+#include "macros.h"
#ifndef FUNC_UNGETC_BROKEN
# define FUNC_UNGETC_BROKEN 0
#endif
int
-main (int argc, char **argv)
+main (int argc, char **argv _GL_UNUSED)
{
/* Assume stdin is non-empty, seekable, and starts with '#!/bin/sh'
iff argc > 1. */
/* Test setting the error indicator of a stream.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Tests of fstatat.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <sys/stat.h>
+#include "signature.h"
+SIGNATURE_CHECK (fstatat, int, (int, char const *, struct stat *, int));
+
#include <fcntl.h>
#include <errno.h>
#include <stdbool.h>
#include "openat.h"
#include "pathmax.h"
#include "same-inode.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-fstatat.t"
main (void)
{
int result;
+
+ /* Remove any leftovers from a previous partial run. */
+ system ("rm -rf " BASE "*");
+
result = test_stat_func (do_stat, false);
ASSERT (test_lstat_func (do_lstat, false) == result);
dfd = open (".", O_RDONLY);
/* Test of fuzzy string comparison.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "fstrcmp.h"
#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
#include "progname.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static bool
check_fstrcmp (const char *string1, const char *string2, double expected)
/* Test of fsync() function.
- Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
#include <config.h>
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fsync, int, (int));
+
#include <errno.h>
-#include <stdio.h>
#include <fcntl.h>
-#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (void)
/* Test of ftell() function.
- Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
#include <stdio.h>
-#include <stdlib.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (ftell, long, (FILE *));
#include "binary-io.h"
+#include "macros.h"
/* None of the files accessed by this test are large, so disable the
fseek link warning if we are not using the gnulib fseek module. */
# undef fseek
#endif
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
-
#ifndef FUNC_UNGETC_BROKEN
# define FUNC_UNGETC_BROKEN 0
#endif
/* Test of ftello() function.
- Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
#include <stdio.h>
-#include <stdlib.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (ftello, off_t, (FILE *));
#include "binary-io.h"
+#include "macros.h"
/* None of the files accessed by this test are large, so disable the
fseek link warning if we are not using the gnulib fseek module. */
# undef fseek
#endif
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
-
#ifndef FUNC_UNGETC_BROKEN
# define FUNC_UNGETC_BROKEN 0
#endif
int
-main (int argc, char **argv)
+main (int argc, char **argv _GL_UNUSED)
{
int ch;
/* Assume stdin is seekable iff argc > 1. */
/* Test whether __func__ is available
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+
+#include "macros.h"
int
main ()
/* Tests of futimens.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <sys/stat.h>
+#include "signature.h"
+SIGNATURE_CHECK (futimens, int, (int, struct timespec const[2]));
+
#include <fcntl.h>
#include <errno.h>
#include <stdbool.h>
#include "stat-time.h"
#include "timespec.h"
#include "utimecmp.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-futimens.t"
main (void)
{
/* Clean up any trash from prior testsuite runs. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
return test_futimens (futimens, true);
}
/* Test of file timestamp modification functions.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
UTIMECMP_TRUNCATE_SOURCE to compensate, with st1 as the
source. */
ASSERT (0 <= utimecmp (BASE "file", &st2, &st1, UTIMECMP_TRUNCATE_SOURCE));
+ if (check_ctime)
+ ASSERT (st1.st_ctime < st2.st_ctime
+ || (st1.st_ctime == st2.st_ctime
+ && get_stat_ctime_ns (&st1) < get_stat_ctime_ns (&st2)));
{
/* On some NFS systems, the 'now' timestamp of creat or a NULL
timespec is determined by the server, but the 'now' timestamp
ASSERT (st2.st_mtime == Y2K);
ASSERT (0 <= get_stat_mtime_ns (&st2));
ASSERT (get_stat_mtime_ns (&st2) < BILLION);
+ if (check_ctime)
+ ASSERT (st1.st_ctime < st2.st_ctime
+ || (st1.st_ctime == st2.st_ctime
+ && get_stat_ctime_ns (&st1) < get_stat_ctime_ns (&st2)));
}
/* Play with UTIME_OMIT, UTIME_NOW. */
{
+ struct stat st3;
struct timespec ts[2] = { { BILLION, UTIME_OMIT }, { 0, UTIME_NOW } };
+ nap ();
+ ASSERT (func (fd, ts) == 0);
+ ASSERT (fstat (fd, &st3) == 0);
+ ASSERT (st3.st_atime == Y2K);
+ ASSERT (0 <= get_stat_atime_ns (&st3));
+ ASSERT (get_stat_atime_ns (&st3) <= BILLION / 2);
+ ASSERT (utimecmp (BASE "file", &st1, &st3, 0) <= 0);
+ if (check_ctime)
+ ASSERT (st2.st_ctime < st3.st_ctime
+ || (st2.st_ctime == st3.st_ctime
+ && get_stat_ctime_ns (&st2) < get_stat_ctime_ns (&st3)));
+ nap ();
+ ts[0].tv_nsec = 0;
+ ts[1].tv_nsec = UTIME_OMIT;
ASSERT (func (fd, ts) == 0);
ASSERT (fstat (fd, &st2) == 0);
- ASSERT (st2.st_atime == Y2K);
- ASSERT (0 <= get_stat_atime_ns (&st2));
- ASSERT (get_stat_atime_ns (&st2) <= BILLION / 2);
- ASSERT (utimecmp (BASE "file", &st1, &st2, 0) <= 0);
+ ASSERT (st2.st_atime == BILLION);
+ ASSERT (get_stat_atime_ns (&st2) == 0);
+ ASSERT (st3.st_mtime == st2.st_mtime);
+ ASSERT (get_stat_mtime_ns (&st3) == get_stat_mtime_ns (&st2));
+ if (check_ctime)
+ ASSERT (st3.st_ctime < st2.st_ctime
+ || (st3.st_ctime == st2.st_ctime
+ && get_stat_ctime_ns (&st3) < get_stat_ctime_ns (&st2)));
}
/* Cleanup. */
/* Test of fwritable() function.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "fwritable.h"
#include <stdio.h>
-#include <stdlib.h>
+
+#include "macros.h"
/* None of the files accessed by this test are large, so disable the
fseek link warning if we are not using the gnulib fseek module. */
# undef fseek
#endif
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
-
#define TESTFILE "t-fwritable.tmp"
int
/* Test of fwriting() function.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "fwriting.h"
#include <stdio.h>
-#include <stdlib.h>
+
+#include "macros.h"
/* None of the files accessed by this test are large, so disable the
fseek link warning if we are not using the gnulib fseek module. */
# undef fseek
#endif
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
-
#define TESTFILE "t-fwriting.tmp"
int
*
* This program is free software; you can 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)
+ * 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,
*
* This program is free software; you can 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)
+ * 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,
*
* This program is free software; you can 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)
+ * 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,
*
* This program is free software; you can 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)
+ * 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,
*
* This program is free software; you can 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)
+ * 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,
*
* This program is free software; you can 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)
+ * 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,
*
* This program is free software; you can 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)
+ * 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,
*
* This program is free software; you can 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)
+ * 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,
*
* This program is free software; you can 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)
+ * 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,
*
* This program is free software; you can 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)
+ * 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,
*
* This program is free software; you can 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)
+ * 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,
*
* This program is free software; you can 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)
+ * 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,
/* Test the getaddrinfo module.
- Copyright (C) 2006-2009 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Written by Simon Josefsson. */
#include <config.h>
+
#include <netdb.h>
+#include "signature.h"
+SIGNATURE_CHECK (freeaddrinfo, void, (struct addrinfo *));
+SIGNATURE_CHECK (gai_strerror, char const *, (int));
+SIGNATURE_CHECK (getaddrinfo, int, (char const *, char const *,
+ struct addrinfo const *,
+ struct addrinfo **));
+
#include <arpa/inet.h>
#include <errno.h>
#include <netinet/in.h>
/* Test of getcwd() function.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
#include <unistd.h>
+#include "signature.h"
+SIGNATURE_CHECK (getcwd, char *, (char *, size_t));
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (int argc, char **argv)
/* Test of getdate() function.
- Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
+#include "getdate.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "progname.h"
-
-#include "getdate.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", \
- __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#ifdef DEBUG
#define LOG(str, now, res) \
};
int
-main (int argc _UNUSED_PARAMETER_, char **argv)
+main (int argc _GL_UNUSED, char **argv)
{
struct timespec result;
struct timespec result2;
/* Test of getdelim() function.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (getdelim, ssize_t, (char **, size_t *, int, FILE *));
+
#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (void)
/* Test of getdtablesize() function.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "signature.h"
+SIGNATURE_CHECK (getdtablesize, int, (void));
+
+#include "macros.h"
int
main (int argc, char *argv[])
/* Tests of getgroups.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <unistd.h>
+#include "signature.h"
+SIGNATURE_CHECK (getgroups, int, (int, gid_t[]));
+
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
-main (int argc, char **argv _UNUSED_PARAMETER_)
+main (int argc, char **argv _GL_UNUSED)
{
int result;
gid_t *groups;
/* Get gethostname() declaration. */
#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (gethostname, int, (char *, size_t));
+
/* Get HOST_NAME_MAX definition. */
#include <limits.h>
#define NOHOSTNAME "magic-gnulib-test-string"
int
-main (int argc, char *argv[] _UNUSED_PARAMETER_)
+main (int argc, char *argv[] _GL_UNUSED)
{
char buf[HOST_NAME_MAX];
int rc;
/* Test of getline() function.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (getline, ssize_t, (char **, size_t *, FILE *));
+
#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (void)
/* Test of getndelim2() function.
- Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
+#include "getndelim2.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "getndelim2.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (void)
/* Test of command line argument processing.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#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. */
+#if !GNULIB_FTELL
+# undef GL_LINK_WARNING
+# define GL_LINK_WARNING(ignored) ((void) 0)
+#endif
+
#if GNULIB_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>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
-
-/* The glibc/gnulib implementation of getopt supports setting optind = 0,
- but other implementations don't. */
-#if defined __GETOPT_PREFIX || (__GLIBC__ >= 2)
-# define OPTIND_MIN 0
-#else
-# define OPTIND_MIN 1
-#endif
+/* This test intentionally remaps stderr. So, we arrange to have fd 10
+ (outside the range of interesting fd's during the test) set up to
+ duplicate the original stderr. */
+
+#define BACKUP_STDERR_FILENO 10
+#define ASSERT_STREAM myerr
+#include "macros.h"
+
+static FILE *myerr;
#include "test-getopt.h"
#if GNULIB_GETOPT_GNU
int
main (void)
{
+ /* This test validates that stderr is used correctly, so move the
+ original into fd 10. */
+ if (dup2 (STDERR_FILENO, BACKUP_STDERR_FILENO) != BACKUP_STDERR_FILENO
+ || (myerr = fdopen (BACKUP_STDERR_FILENO, "w")) == NULL)
+ return 2;
+
+ ASSERT (freopen ("test-getopt.tmp", "w", stderr) == stderr);
+
+ /* These default values are required by POSIX. */
+ ASSERT (optind == 1);
+ ASSERT (opterr != 0);
+
setenv ("POSIXLY_CORRECT", "1", 1);
test_getopt ();
#if GNULIB_GETOPT_GNU
test_getopt_long ();
+ test_getopt_long_only ();
#endif
+ ASSERT (fclose (stderr) == 0);
+ ASSERT (remove ("test-getopt.tmp") == 0);
+
return 0;
}
/* Test of command line argument processing.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdbool.h>
+/* The glibc/gnulib implementation of getopt supports setting optind =
+ 0, but not all other implementations do. This matters for getopt.
+ But for getopt_long, we require GNU compatibility. */
+#if defined __GETOPT_PREFIX || (__GLIBC__ >= 2)
+# define OPTIND_MIN 0
+#elif HAVE_DECL_OPTRESET
+# define OPTIND_MIN (optreset = 1)
+#else
+# define OPTIND_MIN 1
+#endif
+
static void
getopt_loop (int argc, const char **argv,
const char *options,
int *a_seen, int *b_seen,
const char **p_value, const char **q_value,
int *non_options_count, const char **non_options,
- int *unrecognized)
+ int *unrecognized, bool *message_issued)
{
int c;
+ int pos = ftell (stderr);
- opterr = 0;
while ((c = getopt (argc, (char **) argv, options)) != -1)
{
switch (c)
ASSERT (options[0] == '-');
non_options[(*non_options_count)++] = optarg;
break;
+ case ':':
+ /* Must only happen with option ':' at the beginning. */
+ ASSERT (options[0] == ':'
+ || ((options[0] == '-' || options[0] == '+')
+ && options[1] == ':'));
+ /* fall through */
case '?':
*unrecognized = optopt;
break;
break;
}
}
+
+ *message_issued = pos < ftell (stderr);
}
static void
int non_options_count = 0;
const char *non_options[10];
int unrecognized = 0;
+ bool output;
int argc = 0;
const char *argv[10];
argv[argc++] = "bar";
argv[argc] = NULL;
optind = start;
+ opterr = 1;
getopt_loop (argc, argv, "ab",
&a_seen, &b_seen, &p_value, &q_value,
- &non_options_count, non_options, &unrecognized);
+ &non_options_count, non_options, &unrecognized, &output);
ASSERT (a_seen == 1);
ASSERT (b_seen == 0);
ASSERT (p_value == NULL);
ASSERT (non_options_count == 0);
ASSERT (unrecognized == 0);
ASSERT (optind == 2);
+ ASSERT (!output);
}
for (start = OPTIND_MIN; start <= 1; start++)
{
int non_options_count = 0;
const char *non_options[10];
int unrecognized = 0;
+ bool output;
int argc = 0;
const char *argv[10];
argv[argc++] = "bar";
argv[argc] = NULL;
optind = start;
+ opterr = 1;
getopt_loop (argc, argv, "ab",
&a_seen, &b_seen, &p_value, &q_value,
- &non_options_count, non_options, &unrecognized);
+ &non_options_count, non_options, &unrecognized, &output);
ASSERT (a_seen == 1);
ASSERT (b_seen == 1);
ASSERT (p_value == NULL);
ASSERT (non_options_count == 0);
ASSERT (unrecognized == 0);
ASSERT (optind == 3);
+ ASSERT (!output);
}
for (start = OPTIND_MIN; start <= 1; start++)
{
int non_options_count = 0;
const char *non_options[10];
int unrecognized = 0;
+ bool output;
int argc = 0;
const char *argv[10];
argv[argc++] = "bar";
argv[argc] = NULL;
optind = start;
+ opterr = 1;
getopt_loop (argc, argv, "ab",
&a_seen, &b_seen, &p_value, &q_value,
- &non_options_count, non_options, &unrecognized);
+ &non_options_count, non_options, &unrecognized, &output);
ASSERT (a_seen == 1);
ASSERT (b_seen == 1);
ASSERT (p_value == NULL);
ASSERT (non_options_count == 0);
ASSERT (unrecognized == 0);
ASSERT (optind == 2);
+ ASSERT (!output);
}
for (start = OPTIND_MIN; start <= 1; start++)
{
int non_options_count = 0;
const char *non_options[10];
int unrecognized = 0;
+ bool output;
int argc = 0;
const char *argv[10];
argv[argc++] = "bar";
argv[argc] = NULL;
optind = start;
+ opterr = 1;
getopt_loop (argc, argv, "ab",
&a_seen, &b_seen, &p_value, &q_value,
- &non_options_count, non_options, &unrecognized);
+ &non_options_count, non_options, &unrecognized, &output);
ASSERT (a_seen == 2);
ASSERT (b_seen == 1);
ASSERT (p_value == NULL);
ASSERT (non_options_count == 0);
ASSERT (unrecognized == 0);
ASSERT (optind == 3);
+ ASSERT (!output);
}
/* Test processing of options with arguments. */
int non_options_count = 0;
const char *non_options[10];
int unrecognized = 0;
+ bool output;
int argc = 0;
const char *argv[10];
argv[argc++] = "bar";
argv[argc] = NULL;
optind = start;
+ opterr = 1;
getopt_loop (argc, argv, "p:q:",
&a_seen, &b_seen, &p_value, &q_value,
- &non_options_count, non_options, &unrecognized);
+ &non_options_count, non_options, &unrecognized, &output);
ASSERT (a_seen == 0);
ASSERT (b_seen == 0);
ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
ASSERT (non_options_count == 0);
ASSERT (unrecognized == 0);
ASSERT (optind == 2);
+ ASSERT (!output);
}
for (start = OPTIND_MIN; start <= 1; start++)
{
int non_options_count = 0;
const char *non_options[10];
int unrecognized = 0;
+ bool output;
int argc = 0;
const char *argv[10];
argv[argc++] = "bar";
argv[argc] = NULL;
optind = start;
+ opterr = 1;
getopt_loop (argc, argv, "p:q:",
&a_seen, &b_seen, &p_value, &q_value,
- &non_options_count, non_options, &unrecognized);
+ &non_options_count, non_options, &unrecognized, &output);
ASSERT (a_seen == 0);
ASSERT (b_seen == 0);
ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
ASSERT (non_options_count == 0);
ASSERT (unrecognized == 0);
ASSERT (optind == 3);
+ ASSERT (!output);
}
for (start = OPTIND_MIN; start <= 1; start++)
{
int non_options_count = 0;
const char *non_options[10];
int unrecognized = 0;
+ bool output;
int argc = 0;
const char *argv[10];
argv[argc++] = "bar";
argv[argc] = NULL;
optind = start;
+ opterr = 1;
getopt_loop (argc, argv, "abp:q:",
&a_seen, &b_seen, &p_value, &q_value,
- &non_options_count, non_options, &unrecognized);
+ &non_options_count, non_options, &unrecognized, &output);
ASSERT (a_seen == 1);
ASSERT (b_seen == 1);
ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
ASSERT (non_options_count == 0);
ASSERT (unrecognized == 0);
ASSERT (optind == 5);
+ ASSERT (!output);
}
#if GNULIB_GETOPT_GNU
int non_options_count = 0;
const char *non_options[10];
int unrecognized = 0;
+ bool output;
int argc = 0;
const char *argv[10];
argv[argc++] = "bar";
argv[argc] = NULL;
optind = start;
+ opterr = 1;
getopt_loop (argc, argv, "p::q::",
&a_seen, &b_seen, &p_value, &q_value,
- &non_options_count, non_options, &unrecognized);
+ &non_options_count, non_options, &unrecognized, &output);
ASSERT (a_seen == 0);
ASSERT (b_seen == 0);
ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
ASSERT (non_options_count == 0);
ASSERT (unrecognized == 0);
ASSERT (optind == 2);
+ ASSERT (!output);
}
for (start = OPTIND_MIN; start <= 1; start++)
{
int non_options_count = 0;
const char *non_options[10];
int unrecognized = 0;
+ bool output;
int argc = 0;
const char *argv[10];
argv[argc++] = "bar";
argv[argc] = NULL;
optind = start;
+ opterr = 1;
getopt_loop (argc, argv, "p::q::",
&a_seen, &b_seen, &p_value, &q_value,
- &non_options_count, non_options, &unrecognized);
+ &non_options_count, non_options, &unrecognized, &output);
ASSERT (a_seen == 0);
ASSERT (b_seen == 0);
ASSERT (p_value == NULL);
ASSERT (non_options_count == 0);
ASSERT (unrecognized == 0);
ASSERT (optind == 2);
+ ASSERT (!output);
}
for (start = OPTIND_MIN; start <= 1; start++)
{
int non_options_count = 0;
const char *non_options[10];
int unrecognized = 0;
+ bool output;
int argc = 0;
const char *argv[10];
argv[argc++] = "bar";
argv[argc] = NULL;
optind = start;
+ opterr = 1;
getopt_loop (argc, argv, "abp::q::",
&a_seen, &b_seen, &p_value, &q_value,
- &non_options_count, non_options, &unrecognized);
+ &non_options_count, non_options, &unrecognized, &output);
ASSERT (a_seen == 1);
ASSERT (b_seen == 0);
ASSERT (p_value == NULL);
ASSERT (non_options_count == 0);
ASSERT (unrecognized == 0);
ASSERT (optind == 3);
+ ASSERT (!output);
}
#endif
- /* Check that invalid options are recognized. */
+ /* Check that invalid options are recognized; and that both opterr
+ and leading ':' can silence output. */
for (start = OPTIND_MIN; start <= 1; start++)
{
int a_seen = 0;
int non_options_count = 0;
const char *non_options[10];
int unrecognized = 0;
+ bool output;
int argc = 0;
const char *argv[10];
argv[argc++] = "bar";
argv[argc] = NULL;
optind = start;
+ opterr = 42;
getopt_loop (argc, argv, "abp:q:",
&a_seen, &b_seen, &p_value, &q_value,
- &non_options_count, non_options, &unrecognized);
+ &non_options_count, non_options, &unrecognized, &output);
ASSERT (a_seen == 1);
ASSERT (b_seen == 0);
ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
ASSERT (non_options_count == 0);
ASSERT (unrecognized == 'x');
ASSERT (optind == 5);
+ ASSERT (output);
+ }
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-p";
+ argv[argc++] = "foo";
+ argv[argc++] = "-x";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 0;
+ getopt_loop (argc, argv, "abp:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 'x');
+ ASSERT (optind == 5);
+ ASSERT (!output);
+ }
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-p";
+ argv[argc++] = "foo";
+ argv[argc++] = "-x";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ getopt_loop (argc, argv, ":abp:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 'x');
+ ASSERT (optind == 5);
+ ASSERT (!output);
+ }
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-p";
+ argv[argc++] = "foo";
+ argv[argc++] = "-:";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 42;
+ getopt_loop (argc, argv, "abp:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == ':');
+ ASSERT (optind == 5);
+ ASSERT (output);
+ }
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-p";
+ argv[argc++] = "foo";
+ argv[argc++] = "-:";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 0;
+ getopt_loop (argc, argv, "abp:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == ':');
+ ASSERT (optind == 5);
+ ASSERT (!output);
+ }
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-p";
+ argv[argc++] = "foo";
+ argv[argc++] = "-:";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ getopt_loop (argc, argv, ":abp:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == ':');
+ ASSERT (optind == 5);
+ ASSERT (!output);
+ }
+
+ /* Check for missing argument behavior. */
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-ap";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ getopt_loop (argc, argv, "abp:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 'p');
+ ASSERT (optind == 2);
+ ASSERT (output);
+ }
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-ap";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 0;
+ getopt_loop (argc, argv, "abp:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 'p');
+ ASSERT (optind == 2);
+ ASSERT (!output);
+ }
+ for (start = OPTIND_MIN; start <= 1; start++)
+ {
+ int a_seen = 0;
+ int b_seen = 0;
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ bool output;
+ int argc = 0;
+ const char *argv[10];
+
+ argv[argc++] = "program";
+ argv[argc++] = "-ap";
+ argv[argc] = NULL;
+ optind = start;
+ opterr = 1;
+ getopt_loop (argc, argv, ":abp:q:",
+ &a_seen, &b_seen, &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized, &output);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 'p');
+ ASSERT (optind == 2);
+ ASSERT (!output);
}
/* Check that by default, non-options arguments are moved to the end. */
int non_options_count = 0;
const char *non_options[10];
int unrecognized = 0;
+ bool output;
int argc = 0;
const char *argv[10];
argv[argc++] = "bar";
argv[argc] = NULL;
optind = start;
+ opterr = 1;
getopt_loop (argc, argv, "abp:q:",
&a_seen, &b_seen, &p_value, &q_value,
- &non_options_count, non_options, &unrecognized);
+ &non_options_count, non_options, &unrecognized, &output);
if (posixly)
{
ASSERT (strcmp (argv[0], "program") == 0);
ASSERT (non_options_count == 0);
ASSERT (unrecognized == 0);
ASSERT (optind == 1);
+ ASSERT (!output);
}
else
{
ASSERT (non_options_count == 0);
ASSERT (unrecognized == 0);
ASSERT (optind == 4);
+ ASSERT (!output);
}
}
int non_options_count = 0;
const char *non_options[10];
int unrecognized = 0;
+ bool output;
int argc = 0;
const char *argv[20];
argv[argc++] = "bar";
argv[argc] = NULL;
optind = start;
+ opterr = 1;
getopt_loop (argc, argv, "abp:q:",
&a_seen, &b_seen, &p_value, &q_value,
- &non_options_count, non_options, &unrecognized);
+ &non_options_count, non_options, &unrecognized, &output);
if (posixly)
{
ASSERT (strcmp (argv[0], "program") == 0);
ASSERT (non_options_count == 0);
ASSERT (unrecognized == 0);
ASSERT (optind == 1);
+ ASSERT (!output);
}
else
{
ASSERT (non_options_count == 0);
ASSERT (unrecognized == 0);
ASSERT (optind == 5);
+ ASSERT (!output);
}
}
int non_options_count = 0;
const char *non_options[10];
int unrecognized = 0;
+ bool output;
int argc = 0;
const char *argv[10];
argv[argc++] = "bar";
argv[argc] = NULL;
optind = start;
+ opterr = 1;
getopt_loop (argc, argv, "-abp:q:",
&a_seen, &b_seen, &p_value, &q_value,
- &non_options_count, non_options, &unrecognized);
+ &non_options_count, non_options, &unrecognized, &output);
ASSERT (strcmp (argv[0], "program") == 0);
ASSERT (strcmp (argv[1], "donald") == 0);
ASSERT (strcmp (argv[2], "-p") == 0);
ASSERT (strcmp (non_options[2], "bar") == 0);
ASSERT (unrecognized == 0);
ASSERT (optind == 7);
+ ASSERT (!output);
}
/* Check that '--' ends the argument processing. */
int non_options_count = 0;
const char *non_options[10];
int unrecognized = 0;
+ bool output;
int argc = 0;
const char *argv[20];
argv[argc++] = "bar";
argv[argc] = NULL;
optind = start;
+ opterr = 1;
getopt_loop (argc, argv, "-abp:q:",
&a_seen, &b_seen, &p_value, &q_value,
- &non_options_count, non_options, &unrecognized);
+ &non_options_count, non_options, &unrecognized, &output);
ASSERT (strcmp (argv[0], "program") == 0);
ASSERT (strcmp (argv[1], "donald") == 0);
ASSERT (strcmp (argv[2], "-p") == 0);
ASSERT (b_seen == 0);
ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0);
ASSERT (q_value == NULL);
+ ASSERT (!output);
if (non_options_count == 2)
{
/* glibc behaviour. */
int non_options_count = 0;
const char *non_options[10];
int unrecognized = 0;
+ bool output;
int argc = 0;
const char *argv[10];
argv[argc++] = "bar";
argv[argc] = NULL;
optind = start;
+ opterr = 1;
getopt_loop (argc, argv, "abp:q:-",
&a_seen, &b_seen, &p_value, &q_value,
- &non_options_count, non_options, &unrecognized);
+ &non_options_count, non_options, &unrecognized, &output);
if (posixly)
{
ASSERT (strcmp (argv[0], "program") == 0);
ASSERT (non_options_count == 0);
ASSERT (unrecognized == 0);
ASSERT (optind == 1);
+ ASSERT (!output);
}
else
{
ASSERT (non_options_count == 0);
ASSERT (unrecognized == 0);
ASSERT (optind == 4);
+ ASSERT (!output);
}
}
int non_options_count = 0;
const char *non_options[10];
int unrecognized = 0;
+ bool output;
int argc = 0;
const char *argv[10];
argv[argc++] = "bar";
argv[argc] = NULL;
optind = start;
+ opterr = 1;
getopt_loop (argc, argv, "+abp:q:",
&a_seen, &b_seen, &p_value, &q_value,
- &non_options_count, non_options, &unrecognized);
+ &non_options_count, non_options, &unrecognized, &output);
ASSERT (strcmp (argv[0], "program") == 0);
ASSERT (strcmp (argv[1], "donald") == 0);
ASSERT (strcmp (argv[2], "-p") == 0);
ASSERT (non_options_count == 0);
ASSERT (unrecognized == 0);
ASSERT (optind == 1);
+ ASSERT (!output);
}
for (start = OPTIND_MIN; start <= 1; start++)
{
int non_options_count = 0;
const char *non_options[10];
int unrecognized = 0;
+ bool output;
int argc = 0;
const char *argv[10];
argv[argc++] = "-+";
argv[argc] = NULL;
optind = start;
+ /* Suppress output, since glibc is inconsistent on whether this
+ prints a message:
+ http://sources.redhat.com/bugzilla/show_bug.cgi?id=11039 */
+ opterr = 0;
getopt_loop (argc, argv, "+abp:q:",
&a_seen, &b_seen, &p_value, &q_value,
- &non_options_count, non_options, &unrecognized);
+ &non_options_count, non_options, &unrecognized, &output);
ASSERT (a_seen == 0);
ASSERT (b_seen == 0);
ASSERT (p_value == NULL);
ASSERT (non_options_count == 0);
ASSERT (unrecognized == '+');
ASSERT (optind == 2);
+ ASSERT (!output);
}
/* Check that '--' ends the argument processing. */
int non_options_count = 0;
const char *non_options[10];
int unrecognized = 0;
+ bool output;
int argc = 0;
const char *argv[20];
argv[argc++] = "bar";
argv[argc] = NULL;
optind = start;
+ opterr = 1;
getopt_loop (argc, argv, "+abp:q:",
&a_seen, &b_seen, &p_value, &q_value,
- &non_options_count, non_options, &unrecognized);
+ &non_options_count, non_options, &unrecognized, &output);
ASSERT (strcmp (argv[0], "program") == 0);
ASSERT (strcmp (argv[1], "donald") == 0);
ASSERT (strcmp (argv[2], "-p") == 0);
ASSERT (non_options_count == 0);
ASSERT (unrecognized == 0);
ASSERT (optind = 1);
+ ASSERT (!output);
}
/* Check that the '+' flag has to come first. */
int non_options_count = 0;
const char *non_options[10];
int unrecognized = 0;
+ bool output;
int argc = 0;
const char *argv[10];
argv[argc++] = "bar";
argv[argc] = NULL;
optind = start;
+ opterr = 1;
getopt_loop (argc, argv, "abp:q:+",
&a_seen, &b_seen, &p_value, &q_value,
- &non_options_count, non_options, &unrecognized);
+ &non_options_count, non_options, &unrecognized, &output);
if (posixly)
{
ASSERT (strcmp (argv[0], "program") == 0);
ASSERT (non_options_count == 0);
ASSERT (unrecognized == 0);
ASSERT (optind == 1);
+ ASSERT (!output);
}
else
{
ASSERT (non_options_count == 0);
ASSERT (unrecognized == 0);
ASSERT (optind == 4);
+ ASSERT (!output);
}
}
+
+ /* No tests of "-:..." or "+:...", due to glibc bug:
+ http://sources.redhat.com/bugzilla/show_bug.cgi?id=11039 */
}
/* Test of command line argument processing.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
static int a_seen;
static int b_seen;
+static int q_seen;
static const struct option long_options_required[] =
{
{ "alpha", no_argument, NULL, 'a' },
{ "beta", no_argument, &b_seen, 1 },
{ "prune", required_argument, NULL, 'p' },
- { "quetsche", required_argument, NULL, 'q' },
+ { "quetsche", required_argument, &q_seen, 1 },
+ { "xtremely-",no_argument, NULL, 1003 },
{ "xtra", no_argument, NULL, 1001 },
{ "xtreme", no_argument, NULL, 1002 },
{ "xtremely", no_argument, NULL, 1003 },
{ "alpha", no_argument, NULL, 'a' },
{ "beta", no_argument, &b_seen, 1 },
{ "prune", optional_argument, NULL, 'p' },
- { "quetsche", optional_argument, NULL, 'q' },
+ { "quetsche", optional_argument, &q_seen, 1 },
{ NULL, 0, NULL, 0 }
};
int *non_options_count, const char **non_options,
int *unrecognized)
{
- int option_index;
+ int option_index = -1;
int c;
opterr = 0;
+ q_seen = 0;
while ((c = getopt_long (argc, (char **) argv, options, long_options,
&option_index))
!= -1)
{
case 0:
/* An option with a non-NULL flag pointer was processed. */
+ if (q_seen)
+ *q_value = optarg;
break;
case 'a':
a_seen++;
ASSERT (options[0] == '-');
non_options[(*non_options_count)++] = optarg;
break;
+ case ':':
+ /* Must only happen with option ':' at the beginning. */
+ ASSERT (options[0] == ':'
+ || ((options[0] == '-' || options[0] == '+')
+ && options[1] == ':'));
+ /* fall through */
case '?':
*unrecognized = optopt;
break;
ASSERT (c == 1003);
}
- /* Test processing of boolean options. */
- for (start = OPTIND_MIN; start <= 1; start++)
+ /* Check that -W handles unknown options. */
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-W";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long (argc, argv, "W;", long_options_required, &option_index);
+ ASSERT (c == '?');
+ ASSERT (optopt == 'W');
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-Wunknown";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long (argc, argv, "W;", long_options_required, &option_index);
+ /* glibc and BSD behave differently here, but for now, we allow
+ both behaviors since W support is not frequently used. */
+ if (c == '?')
+ {
+ ASSERT (optopt == 0);
+ ASSERT (optarg == NULL);
+ }
+ else
+ {
+ ASSERT (c == 'W');
+ ASSERT (strcmp (optarg, "unknown") == 0);
+ }
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-W";
+ argv[argc++] = "unknown";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long (argc, argv, "W;", long_options_required, &option_index);
+ /* glibc and BSD behave differently here, but for now, we allow
+ both behaviors since W support is not frequently used. */
+ if (c == '?')
+ {
+ ASSERT (optopt == 0);
+ ASSERT (optarg == NULL);
+ }
+ else
+ {
+ ASSERT (c == 'W');
+ ASSERT (strcmp (optarg, "unknown") == 0);
+ }
+ }
+
+ /* Test processing of boolean short options. */
+ for (start = 0; start <= 1; start++)
{
const char *p_value = NULL;
const char *q_value = NULL;
ASSERT (unrecognized == 0);
ASSERT (optind == 2);
}
- for (start = OPTIND_MIN; start <= 1; start++)
+ for (start = 0; start <= 1; start++)
{
const char *p_value = NULL;
const char *q_value = NULL;
ASSERT (unrecognized == 0);
ASSERT (optind == 3);
}
- for (start = OPTIND_MIN; start <= 1; start++)
+ for (start = 0; start <= 1; start++)
{
const char *p_value = NULL;
const char *q_value = NULL;
ASSERT (unrecognized == 0);
ASSERT (optind == 2);
}
- for (start = OPTIND_MIN; start <= 1; start++)
+ for (start = 0; start <= 1; start++)
{
const char *p_value = NULL;
const char *q_value = NULL;
ASSERT (optind == 3);
}
- /* Test processing of options with arguments. */
- for (start = OPTIND_MIN; start <= 1; start++)
+ /* Test processing of boolean long options. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--alpha";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "ab", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--beta";
+ argv[argc++] = "--alpha";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "ab", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 1);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 3);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--alpha";
+ argv[argc++] = "--beta";
+ argv[argc++] = "--alpha";
+ argv[argc++] = "--beta";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "ab", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 2);
+ ASSERT (b_seen == 1);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 5);
+ }
+
+ /* Test processing of boolean long options via -W. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-Walpha";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "abW;", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-W";
+ argv[argc++] = "beta";
+ argv[argc++] = "-W";
+ argv[argc++] = "alpha";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "aW;b", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 1);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 5);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-Walpha";
+ argv[argc++] = "-Wbeta";
+ argv[argc++] = "-Walpha";
+ argv[argc++] = "-Wbeta";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "W;ab", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 2);
+ ASSERT (b_seen == 1);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 5);
+ }
+
+ /* Test processing of short options with arguments. */
+ for (start = 0; start <= 1; start++)
{
const char *p_value = NULL;
const char *q_value = NULL;
&non_options_count, non_options, &unrecognized);
ASSERT (a_seen == 0);
ASSERT (b_seen == 0);
- ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-p";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "p:q:", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 3);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-ab";
+ argv[argc++] = "-q";
+ argv[argc++] = "baz";
+ argv[argc++] = "-pfoo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "abp:q:", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 1);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value != NULL && strcmp (q_value, "baz") == 0);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 5);
+ }
+
+ /* Test processing of long options with arguments. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--p=foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "p:q:", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--p";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "p:q:", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 3);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-ab";
+ argv[argc++] = "--q";
+ argv[argc++] = "baz";
+ argv[argc++] = "--p=foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "abp:q:", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 1);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value != NULL && strcmp (q_value, "baz") == 0);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 5);
+ }
+
+ /* Test processing of long options with arguments via -W. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-Wp=foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "p:q:W;", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-W";
+ argv[argc++] = "p";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "p:W;q:", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 4);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-ab";
+ argv[argc++] = "-Wq";
+ argv[argc++] = "baz";
+ argv[argc++] = "-W";
+ argv[argc++] = "p=foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "W;abp:q:", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 1);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value != NULL && strcmp (q_value, "baz") == 0);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 6);
+ }
+
+ /* Test processing of short options with optional arguments. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-pfoo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "p::q::", long_options_optional,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-p";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "p::q::", long_options_optional,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-p";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "abp::q::", long_options_optional,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 3);
+ }
+
+ /* Test processing of long options with optional arguments. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--p=foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "p::q::", long_options_optional,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--p";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "p::q::", long_options_optional,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--p=";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "p::q::", long_options_optional,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && *p_value == '\0');
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--p";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "abp::q::", long_options_optional,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 1);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 3);
+ }
+
+ /* Test processing of long options with optional arguments via -W. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-Wp=foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "p::q::W;", long_options_optional,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-Wp";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "p::q::W;", long_options_optional,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ /* glibc bug http://sources.redhat.com/bugzilla/show_bug.cgi?id=11041 */
+ /* ASSERT (p_value == NULL); */
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 2);
+ }
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-Wp=";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "W;p::q::", long_options_optional,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value != NULL && *p_value == '\0');
ASSERT (q_value == NULL);
ASSERT (non_options_count == 0);
ASSERT (unrecognized == 0);
ASSERT (optind == 2);
}
- for (start = OPTIND_MIN; start <= 1; start++)
+ for (start = 0; start <= 1; start++)
{
const char *p_value = NULL;
const char *q_value = NULL;
b_seen = 0;
argv[argc++] = "program";
- argv[argc++] = "-p";
+ argv[argc++] = "-W";
+ argv[argc++] = "p=";
argv[argc++] = "foo";
argv[argc++] = "bar";
argv[argc] = NULL;
optind = start;
- getopt_long_loop (argc, argv, "p:q:", long_options_required,
+ getopt_long_loop (argc, argv, "W;p::q::", long_options_optional,
&p_value, &q_value,
&non_options_count, non_options, &unrecognized);
ASSERT (a_seen == 0);
ASSERT (b_seen == 0);
- ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
+ ASSERT (p_value != NULL && *p_value == '\0');
ASSERT (q_value == NULL);
ASSERT (non_options_count == 0);
ASSERT (unrecognized == 0);
ASSERT (optind == 3);
}
- for (start = OPTIND_MIN; start <= 1; start++)
+ for (start = 0; start <= 1; start++)
{
const char *p_value = NULL;
const char *q_value = NULL;
b_seen = 0;
argv[argc++] = "program";
- argv[argc++] = "-ab";
- argv[argc++] = "-q";
- argv[argc++] = "baz";
- argv[argc++] = "-pfoo";
+ argv[argc++] = "-W";
+ argv[argc++] = "p";
+ argv[argc++] = "-a";
argv[argc++] = "bar";
argv[argc] = NULL;
optind = start;
- getopt_long_loop (argc, argv, "abp:q:", long_options_required,
+ getopt_long_loop (argc, argv, "W;abp::q::", long_options_optional,
&p_value, &q_value,
&non_options_count, non_options, &unrecognized);
ASSERT (a_seen == 1);
- ASSERT (b_seen == 1);
- ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
- ASSERT (q_value != NULL && strcmp (q_value, "baz") == 0);
+ ASSERT (b_seen == 0);
+ /* ASSERT (p_value == NULL); */
+ ASSERT (q_value == NULL);
ASSERT (non_options_count == 0);
ASSERT (unrecognized == 0);
- ASSERT (optind == 5);
+ ASSERT (optind == 4);
}
- /* Test processing of options with optional arguments. */
- for (start = OPTIND_MIN; start <= 1; start++)
+ /* Check that invalid options are recognized. */
+ for (start = 0; start <= 1; start++)
{
const char *p_value = NULL;
const char *q_value = NULL;
b_seen = 0;
argv[argc++] = "program";
- argv[argc++] = "-pfoo";
+ argv[argc++] = "-p";
+ argv[argc++] = "foo";
+ argv[argc++] = "-x";
+ argv[argc++] = "-a";
argv[argc++] = "bar";
argv[argc] = NULL;
optind = start;
- getopt_long_loop (argc, argv, "p::q::", long_options_optional,
+ getopt_long_loop (argc, argv, "abp:q:", long_options_required,
&p_value, &q_value,
&non_options_count, non_options, &unrecognized);
- ASSERT (a_seen == 0);
+ ASSERT (a_seen == 1);
ASSERT (b_seen == 0);
ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
ASSERT (q_value == NULL);
ASSERT (non_options_count == 0);
- ASSERT (unrecognized == 0);
- ASSERT (optind == 2);
+ ASSERT (unrecognized == 'x');
+ ASSERT (optind == 5);
}
- for (start = OPTIND_MIN; start <= 1; start++)
+ for (start = 0; start <= 1; start++)
{
const char *p_value = NULL;
const char *q_value = NULL;
argv[argc++] = "program";
argv[argc++] = "-p";
argv[argc++] = "foo";
+ argv[argc++] = "-:";
+ argv[argc++] = "-a";
argv[argc++] = "bar";
argv[argc] = NULL;
optind = start;
- getopt_long_loop (argc, argv, "p::q::", long_options_optional,
+ getopt_long_loop (argc, argv, "abp:q:", long_options_required,
&p_value, &q_value,
&non_options_count, non_options, &unrecognized);
- ASSERT (a_seen == 0);
+ ASSERT (a_seen == 1);
ASSERT (b_seen == 0);
- ASSERT (p_value == NULL);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
ASSERT (q_value == NULL);
ASSERT (non_options_count == 0);
- ASSERT (unrecognized == 0);
- ASSERT (optind == 2);
+ ASSERT (unrecognized == ':');
+ ASSERT (optind == 5);
}
- for (start = OPTIND_MIN; start <= 1; start++)
+
+ /* Check that unexpected arguments are recognized. */
+ for (start = 0; start <= 1; start++)
{
const char *p_value = NULL;
const char *q_value = NULL;
argv[argc++] = "program";
argv[argc++] = "-p";
- argv[argc++] = "-a";
+ argv[argc++] = "foo";
+ argv[argc++] = "--a=";
argv[argc++] = "bar";
argv[argc] = NULL;
optind = start;
- getopt_long_loop (argc, argv, "abp::q::", long_options_optional,
+ getopt_long_loop (argc, argv, "abp:q:", long_options_required,
&p_value, &q_value,
&non_options_count, non_options, &unrecognized);
- ASSERT (a_seen == 1);
+ ASSERT (a_seen == 0);
ASSERT (b_seen == 0);
- ASSERT (p_value == NULL);
+ ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
ASSERT (q_value == NULL);
ASSERT (non_options_count == 0);
- ASSERT (unrecognized == 0);
- ASSERT (optind == 3);
+ ASSERT (unrecognized == 'a');
+ ASSERT (optind == 4);
}
-
- /* Check that invalid options are recognized. */
- for (start = OPTIND_MIN; start <= 1; start++)
+ for (start = 0; start <= 1; start++)
{
const char *p_value = NULL;
const char *q_value = NULL;
argv[argc++] = "program";
argv[argc++] = "-p";
argv[argc++] = "foo";
- argv[argc++] = "-x";
- argv[argc++] = "-a";
+ argv[argc++] = "--b=";
argv[argc++] = "bar";
argv[argc] = NULL;
optind = start;
getopt_long_loop (argc, argv, "abp:q:", long_options_required,
&p_value, &q_value,
&non_options_count, non_options, &unrecognized);
- ASSERT (a_seen == 1);
+ ASSERT (a_seen == 0);
ASSERT (b_seen == 0);
ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0);
ASSERT (q_value == NULL);
ASSERT (non_options_count == 0);
- ASSERT (unrecognized == 'x');
- ASSERT (optind == 5);
+ /* When flag is non-zero, glibc sets optopt anyway, but BSD
+ leaves optopt unchanged. */
+ ASSERT (unrecognized == 1 || unrecognized == 0);
+ ASSERT (optind == 4);
}
/* Check that by default, non-options arguments are moved to the end. */
- for (start = OPTIND_MIN; start <= 1; start++)
+ for (start = 0; start <= 1; start++)
{
const char *p_value = NULL;
const char *q_value = NULL;
}
/* Check that '--' ends the argument processing. */
- for (start = OPTIND_MIN; start <= 1; start++)
+ for (start = 0; start <= 1; start++)
{
const char *p_value = NULL;
const char *q_value = NULL;
}
/* Check that the '-' flag causes non-options to be returned in order. */
- for (start = OPTIND_MIN; start <= 1; start++)
+ for (start = 0; start <= 1; start++)
{
const char *p_value = NULL;
const char *q_value = NULL;
}
/* Check that '--' ends the argument processing. */
- for (start = OPTIND_MIN; start <= 1; start++)
+ for (start = 0; start <= 1; start++)
{
const char *p_value = NULL;
const char *q_value = NULL;
}
/* Check that the '-' flag has to come first. */
- for (start = OPTIND_MIN; start <= 1; start++)
+ for (start = 0; start <= 1; start++)
{
const char *p_value = NULL;
const char *q_value = NULL;
/* Check that the '+' flag causes the first non-option to terminate the
loop. */
- for (start = OPTIND_MIN; start <= 1; start++)
+ for (start = 0; start <= 1; start++)
{
const char *p_value = NULL;
const char *q_value = NULL;
ASSERT (unrecognized == 0);
ASSERT (optind == 1);
}
- for (start = OPTIND_MIN; start <= 1; start++)
+ for (start = 0; start <= 1; start++)
{
const char *p_value = NULL;
const char *q_value = NULL;
}
/* Check that '--' ends the argument processing. */
- for (start = OPTIND_MIN; start <= 1; start++)
+ for (start = 0; start <= 1; start++)
{
const char *p_value = NULL;
const char *q_value = NULL;
}
/* Check that the '+' flag has to come first. */
- for (start = OPTIND_MIN; start <= 1; start++)
+ for (start = 0; start <= 1; start++)
{
const char *p_value = NULL;
const char *q_value = NULL;
{
int start;
+ /* Check that POSIXLY_CORRECT stops parsing the same as leading '+'. */
+ for (start = 0; start <= 1; start++)
+ {
+ const char *p_value = NULL;
+ const char *q_value = NULL;
+ int non_options_count = 0;
+ const char *non_options[10];
+ int unrecognized = 0;
+ int argc = 0;
+ const char *argv[10];
+ a_seen = 0;
+ b_seen = 0;
+
+ argv[argc++] = "program";
+ argv[argc++] = "donald";
+ argv[argc++] = "-p";
+ argv[argc++] = "billy";
+ argv[argc++] = "duck";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = start;
+ getopt_long_loop (argc, argv, "abp:q:", long_options_required,
+ &p_value, &q_value,
+ &non_options_count, non_options, &unrecognized);
+ ASSERT (strcmp (argv[0], "program") == 0);
+ ASSERT (strcmp (argv[1], "donald") == 0);
+ ASSERT (strcmp (argv[2], "-p") == 0);
+ ASSERT (strcmp (argv[3], "billy") == 0);
+ ASSERT (strcmp (argv[4], "duck") == 0);
+ ASSERT (strcmp (argv[5], "-a") == 0);
+ ASSERT (strcmp (argv[6], "bar") == 0);
+ ASSERT (argv[7] == NULL);
+ ASSERT (a_seen == 0);
+ ASSERT (b_seen == 0);
+ ASSERT (p_value == NULL);
+ ASSERT (q_value == NULL);
+ ASSERT (non_options_count == 0);
+ ASSERT (unrecognized == 0);
+ ASSERT (optind == 1);
+ }
+
/* Check that POSIXLY_CORRECT doesn't change optional arguments. */
- for (start = OPTIND_MIN; start <= 1; start++)
+ for (start = 0; start <= 1; start++)
{
const char *p_value = NULL;
const char *q_value = NULL;
}
/* Check that leading - still sees options after non-options. */
- for (start = OPTIND_MIN; start <= 1; start++)
+ for (start = 0; start <= 1; start++)
{
const char *p_value = NULL;
const char *q_value = NULL;
ASSERT (optind == 4);
}
}
+
+/* Reduce casting, so we can use string literals elsewhere.
+ getopt_long_only takes an array of char*, but luckily does not
+ modify those elements, so we can pass const char*. */
+static int
+do_getopt_long_only (int argc, const char **argv, const char *shortopts,
+ const struct option *longopts, int *longind)
+{
+ return getopt_long_only (argc, (char **) argv, shortopts, longopts, longind);
+}
+
+static void
+test_getopt_long_only (void)
+{
+ /* Test disambiguation of options. */
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-x";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long_only (argc, argv, "ab", long_options_required,
+ &option_index);
+ ASSERT (c == '?');
+ ASSERT (optopt == 0);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-x";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long_only (argc, argv, "abx", long_options_required,
+ &option_index);
+ ASSERT (c == 'x');
+ ASSERT (optopt == 0);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--x";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long_only (argc, argv, "abx", long_options_required,
+ &option_index);
+ ASSERT (c == '?');
+ ASSERT (optopt == 0);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-b";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ b_seen = 0;
+ c = do_getopt_long_only (argc, argv, "abx", long_options_required,
+ &option_index);
+ ASSERT (c == 'b');
+ ASSERT (b_seen == 0);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "--b";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ b_seen = 0;
+ c = do_getopt_long_only (argc, argv, "abx", long_options_required,
+ &option_index);
+ ASSERT (c == 0);
+ ASSERT (b_seen == 1);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-xt";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long_only (argc, argv, "ab", long_options_required,
+ &option_index);
+ ASSERT (c == '?');
+ ASSERT (optopt == 0);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-xt";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long_only (argc, argv, "abx", long_options_required,
+ &option_index);
+ ASSERT (c == '?');
+ ASSERT (optopt == 0);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-xtra";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long_only (argc, argv, "ab", long_options_required,
+ &option_index);
+ ASSERT (c == 1001);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-xtreme";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long_only (argc, argv, "abx:", long_options_required,
+ &option_index);
+ ASSERT (c == 1002);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-xtremel";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long_only (argc, argv, "ab", long_options_required,
+ &option_index);
+ /* glibc bug http://sources.redhat.com/bugzilla/show_bug.cgi?id=11041 */
+ /* ASSERT (c == 1003); */
+ ASSERT (optind == 2);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-xtremel";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long_only (argc, argv, "abx::", long_options_required,
+ &option_index);
+ /* glibc bug http://sources.redhat.com/bugzilla/show_bug.cgi?id=11041 */
+ /* ASSERT (c == 1003); */
+ ASSERT (optind == 2);
+ ASSERT (optarg == NULL);
+ }
+ {
+ int argc = 0;
+ const char *argv[10];
+ int option_index;
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-xtras";
+ argv[argc] = NULL;
+ optind = 1;
+ opterr = 0;
+ c = do_getopt_long_only (argc, argv, "abx::", long_options_required,
+ &option_index);
+ ASSERT (c == 'x');
+ ASSERT (strcmp (optarg, "tras") == 0);
+ }
+}
/* Test getpass implementation.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software: you can redistribute it and/or modify
#include <config.h>
#include <sys/time.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (gettimeofday, int, (struct timeval *, void *));
+
#include <time.h>
#include <stdio.h>
/* Test of glob/globfree functions.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <glob.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include "signature.h"
+SIGNATURE_CHECK (glob, int, (char const *, int, int (*) (char const *, int),
+ glob_t *));
+SIGNATURE_CHECK (globfree, void, (glob_t *));
+
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", \
- __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define GL_NO_SUCH_FILE "/gnulib-magic-does-not-exist"
#include <string.h>
#include <unistd.h>
+#include "macros.h"
+
#define STREQ(a, b) (strcmp (a, b) == 0)
#define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
-
static bool
hash_compare_strings (void const *x, void const *y)
{
/* Test the simple ring buffer.
- Copyright (C) 2006-2009 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "i-ring.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (void)
/* Test of character set conversion.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#endif
#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of character set conversion.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#if HAVE_ICONV
# include <iconv.h>
+
+# ifndef ICONV_CONST
+# define ICONV_CONST /* empty */
+# endif
+
+#include "signature.h"
+SIGNATURE_CHECK (iconv, size_t, (iconv_t, ICONV_CONST char **, size_t *,
+ char **, size_t *));
+SIGNATURE_CHECK (iconv_close, int, (iconv_t x));
+SIGNATURE_CHECK (iconv_open, iconv_t, (char const *, char const *));
+
#endif
#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Recode strings between character sets, using iconv.
- Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2009, 2010 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software: you can redistribute it and/or modify
/* Test of dropping uid/gid privileges of the current process permanently.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <string.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static void
show_uids ()
/* Test of dropping uid/gid privileges of the current process temporarily.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <string.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static void
show_uids ()
/* Test of inet_ntop function.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <arpa/inet.h>
+#include "signature.h"
+SIGNATURE_CHECK (inet_ntop, char const *, (int, void const *, char *,
+ socklen_t));
+
#include <netinet/in.h>
#include <sys/socket.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (void)
/* Test of inet_pton function.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <arpa/inet.h>
+#include "signature.h"
+SIGNATURE_CHECK (inet_pton, int, (int, const char *, void *));
+
#include <netinet/in.h>
#include <sys/socket.h>
-#include <stdio.h>
-#include <stdlib.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (void)
/* Test of <inttypes.h> substitute.
- Copyright (C) 2006-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of isblank() function.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <ctype.h>
+#include "signature.h"
+SIGNATURE_CHECK (isblank, int, (int));
+
#include <limits.h>
#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+
+#include "macros.h"
int
main (int argc, char *argv[])
/* Test of isfinite() substitute.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
+#include <math.h>
+
+/* isfinite must be a macro. */
+#ifndef isfinite
+# error missing declaration
+#endif
+
#include <float.h>
#include <limits.h>
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
float zerof = 0.0f;
double zerod = 0.0;
/* Test of isinf() substitute.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
+#include <math.h>
+
+/* isinf must be a macro. */
+#ifndef isinf
+# error missing declaration
+#endif
+
#include <float.h>
#include <limits.h>
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
float zerof = 0.0f;
double zerod = 0.0;
/* Test of isnand() substitute.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <math.h>
+/* isnan must be a macro. */
+#ifndef isnan
+# error missing declaration
+#endif
+
#include <float.h>
#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
#include "nan.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0f.
So we use -zero instead. */
/* Test of isnand() substitute.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of isnand() substitute.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of isnand() substitute.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
#include "nan.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
So we use -zero instead. */
/* Test of isnanf() substitute.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of isnanf() substitute.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of isnanf() substitute.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
#include "nan.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0f.
So we use -zero instead. */
/* Test of isnanl() substitute.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of isnanl() substitute.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of isnanl() substitute.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <float.h>
#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
#include "nan.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
So we use minus_zero instead.
--- /dev/null
+/* Test of <langinfo.h> substitute.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
+
+#include <config.h>
+
+#include <langinfo.h>
+
+/* Check that all the nl_item values are defined. */
+int items[] =
+ {
+ /* nl_langinfo items of the LC_CTYPE category */
+ CODESET,
+ /* nl_langinfo items of the LC_NUMERIC category */
+ RADIXCHAR,
+ THOUSEP,
+ /* nl_langinfo items of the LC_TIME category */
+ D_T_FMT,
+ D_FMT,
+ T_FMT,
+ T_FMT_AMPM,
+ AM_STR,
+ PM_STR,
+ DAY_1,
+ DAY_2,
+ DAY_3,
+ DAY_4,
+ DAY_5,
+ DAY_6,
+ DAY_7,
+ ABDAY_1,
+ ABDAY_2,
+ ABDAY_3,
+ ABDAY_4,
+ ABDAY_5,
+ ABDAY_6,
+ ABDAY_7,
+ MON_1,
+ MON_2,
+ MON_3,
+ MON_4,
+ MON_5,
+ MON_6,
+ MON_7,
+ MON_8,
+ MON_9,
+ MON_10,
+ MON_11,
+ MON_12,
+ ABMON_1,
+ ABMON_2,
+ ABMON_3,
+ ABMON_4,
+ ABMON_5,
+ ABMON_6,
+ ABMON_7,
+ ABMON_8,
+ ABMON_9,
+ ABMON_10,
+ ABMON_11,
+ ABMON_12,
+ ERA,
+ ERA_D_FMT,
+ ERA_D_T_FMT,
+ ERA_T_FMT,
+ ALT_DIGITS,
+ /* nl_langinfo items of the LC_MONETARY category */
+ CRNCYSTR,
+ /* nl_langinfo items of the LC_MESSAGES category */
+ YESEXPR,
+ NOEXPR
+ };
+
+int
+main (void)
+{
+ return 0;
+}
/* Tests of lchown.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <unistd.h>
+#include "signature.h"
+SIGNATURE_CHECK (lchown, int, (char const *, uid_t, gid_t));
+
#include <fcntl.h>
#include <errno.h>
#include <stdbool.h>
#include "mgetgroups.h"
#include "stat-time.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-lchown.t"
main (void)
{
/* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
return test_lchown (lchown, true);
}
/* Tests of lchown.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Written by Eric Blake <ebb9@byu.net>, 2009. */
-#ifndef TEST_CHOWN_NAP
-/* Sleep long enough to notice a timestamp difference on the file
- system in the current directory. */
-static void
-nap (void)
-{
- static long delay;
- if (!delay)
- {
- /* Initialize only once, by sleeping for 20 milliseconds (needed
- since xfs has a quantization of about 10 milliseconds, even
- though it has a granularity of 1 nanosecond, and since NTFS
- has a default quantization of 15.25 milliseconds, even though
- it has a granularity of 100 nanoseconds). If the seconds
- differ, repeat the test one more time (in case we crossed a
- quantization boundary on a file system with 1 second
- resolution). If we can't observe a difference in only the
- nanoseconds, then fall back to 1 second if the time is odd,
- and 2 seconds (needed for FAT) if time is even. */
- struct stat st1;
- struct stat st2;
- ASSERT (close (creat (BASE "tmp", 0600)) == 0);
- ASSERT (stat (BASE "tmp", &st1) == 0);
- ASSERT (unlink (BASE "tmp") == 0);
- delay = 20000;
- usleep (delay);
- ASSERT (close (creat (BASE "tmp", 0600)) == 0);
- ASSERT (stat (BASE "tmp", &st2) == 0);
- ASSERT (unlink (BASE "tmp") == 0);
- if (st1.st_mtime != st2.st_mtime)
- {
- /* Seconds differ, give it one more shot. */
- st1 = st2;
- usleep (delay);
- ASSERT (close (creat (BASE "tmp", 0600)) == 0);
- ASSERT (stat (BASE "tmp", &st2) == 0);
- ASSERT (unlink (BASE "tmp") == 0);
- }
- if (! (st1.st_mtime == st2.st_mtime
- && get_stat_mtime_ns (&st1) < get_stat_mtime_ns (&st2)))
- delay = (st1.st_mtime & 1) ? 1000000 : 2000000;
- }
- usleep (delay);
-}
-#endif /* !TEST_CHOWN_NAP */
+#include "nap.h"
#if !HAVE_GETEGID
# define getegid() ((gid_t) -1)
/* Test of multiplying a 'long double' by a power of 2.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <math.h>
+#include "signature.h"
+SIGNATURE_CHECK (ldexpl, long double, (long double, int));
+
#include <float.h>
-#include <stdio.h>
-#include <stdlib.h>
#include "fpucw.h"
#include "isnanl-nolibm.h"
#include "nan.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
So we use minus_zero instead.
/* Test of link() function.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
#include <unistd.h>
+#include "signature.h"
+SIGNATURE_CHECK (link, int, (char const *, char const *));
+
#include <errno.h>
#include <fcntl.h>
#include <stdbool.h>
#include <sys/stat.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-link.t"
main (void)
{
/* Remove any garbage left from previous partial runs. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
return test_link (link, true);
}
/* Test of link() function.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
/* Tests of linkat.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <unistd.h>
+#include "signature.h"
+SIGNATURE_CHECK (linkat, int, (int, char const *, int, char const *, int));
+
#include <fcntl.h>
#include <errno.h>
#include <stdbool.h>
#include "filenamecat.h"
#include "same-inode.h"
#include "xgetcwd.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-linkat.t"
int result;
/* Clean up any trash from prior testsuite runs. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
/* Test basic link functionality, without mentioning symlinks. */
result = test_link (do_link, true);
/* Test of sequential list data type implementation.
- Copyright (C) 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 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 "gl_linked_list.h"
-#include <stdio.h>
#include <stdlib.h>
#include "gl_array_list.h"
#include "progname.h"
+#include "macros.h"
static const char *objects[15] =
{
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o"
};
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
#define RANDOM(n) (rand () % (n))
#define RANDOM_OBJECT() objects[RANDOM (SIZEOF (objects))]
contents[i] = RANDOM_OBJECT ();
/* Create list1. */
- list1 = gl_list_create (GL_ARRAY_LIST, NULL, NULL, NULL, true,
- initial_size, contents);
+ list1 = gl_list_nx_create (GL_ARRAY_LIST, NULL, NULL, NULL, true,
+ initial_size, contents);
+ ASSERT (list1 != NULL);
/* Create list2. */
- list2 = gl_list_create_empty (GL_LINKED_LIST, NULL, NULL, NULL, true);
+ list2 = gl_list_nx_create_empty (GL_LINKED_LIST, NULL, NULL, NULL, true);
+ ASSERT (list2 != NULL);
for (i = 0; i < initial_size; i++)
- gl_list_add_last (list2, contents[i]);
+ ASSERT (gl_list_nx_add_last (list2, contents[i]) != NULL);
/* Create list3. */
- list3 = gl_list_create (GL_LINKED_LIST, NULL, NULL, NULL, true,
- initial_size, contents);
+ list3 = gl_list_nx_create (GL_LINKED_LIST, NULL, NULL, NULL, true,
+ initial_size, contents);
+ ASSERT (list3 != NULL);
check_all (list1, list2, list3);
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_set_at (list1, index, obj);
+ node1 = gl_list_nx_set_at (list1, index, obj);
+ ASSERT (node1 != NULL);
ASSERT (gl_list_get_at (list1, index) == obj);
ASSERT (gl_list_node_value (list1, node1) == obj);
- node2 = gl_list_set_at (list2, index, obj);
+ node2 = gl_list_nx_set_at (list2, index, obj);
+ ASSERT (node2 != NULL);
ASSERT (gl_list_get_at (list2, index) == obj);
ASSERT (gl_list_node_value (list2, node2) == obj);
- node3 = gl_list_set_at (list3, index, obj);
+ node3 = gl_list_nx_set_at (list3, index, obj);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_get_at (list3, index) == obj);
ASSERT (gl_list_node_value (list3, node3) == obj);
{
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_add_first (list1, obj);
- node2 = gl_list_add_first (list2, obj);
- node3 = gl_list_add_first (list3, obj);
+ node1 = gl_list_nx_add_first (list1, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_first (list2, obj);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_first (list3, obj);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_node_value (list1, node1) == obj);
ASSERT (gl_list_node_value (list2, node2) == obj);
ASSERT (gl_list_node_value (list3, node3) == obj);
{
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_add_last (list1, obj);
- node2 = gl_list_add_last (list2, obj);
- node3 = gl_list_add_last (list3, obj);
+ node1 = gl_list_nx_add_last (list1, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_last (list2, obj);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_last (list3, obj);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_node_value (list1, node1) == obj);
ASSERT (gl_list_node_value (list2, node2) == obj);
ASSERT (gl_list_node_value (list3, node3) == obj);
const char *obj1 = RANDOM_OBJECT ();
const char *obj2 = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_add_first (list1, obj2);
- node1 = gl_list_add_before (list1, node1, obj0);
- node1 = gl_list_add_after (list1, node1, obj1);
- node2 = gl_list_add_first (list2, obj2);
- node2 = gl_list_add_before (list2, node2, obj0);
- node2 = gl_list_add_after (list2, node2, obj1);
- node3 = gl_list_add_first (list3, obj2);
- node3 = gl_list_add_before (list3, node3, obj0);
- node3 = gl_list_add_after (list3, node3, obj1);
+ node1 = gl_list_nx_add_first (list1, obj2);
+ ASSERT (node1 != NULL);
+ node1 = gl_list_nx_add_before (list1, node1, obj0);
+ ASSERT (node1 != NULL);
+ node1 = gl_list_nx_add_after (list1, node1, obj1);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_first (list2, obj2);
+ ASSERT (node2 != NULL);
+ node2 = gl_list_nx_add_before (list2, node2, obj0);
+ ASSERT (node2 != NULL);
+ node2 = gl_list_nx_add_after (list2, node2, obj1);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_first (list3, obj2);
+ ASSERT (node3 != NULL);
+ node3 = gl_list_nx_add_before (list3, node3, obj0);
+ ASSERT (node3 != NULL);
+ node3 = gl_list_nx_add_after (list3, node3, obj1);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_node_value (list1, node1) == obj1);
ASSERT (gl_list_node_value (list2, node2) == obj1);
ASSERT (gl_list_node_value (list3, node3) == obj1);
size_t index = RANDOM (gl_list_size (list1) + 1);
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_add_at (list1, index, obj);
- node2 = gl_list_add_at (list2, index, obj);
- node3 = gl_list_add_at (list3, index, obj);
+ node1 = gl_list_nx_add_at (list1, index, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_at (list2, index, obj);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_at (list3, index, obj);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_get_at (list1, index) == obj);
ASSERT (gl_list_node_value (list1, node1) == obj);
ASSERT (gl_list_get_at (list2, index) == obj);
/* Test of sequential list data type implementation.
- Copyright (C) 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 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 "gl_linkedhash_list.h"
#include <limits.h>
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "gl_array_list.h"
#include "progname.h"
+#include "macros.h"
static const char *objects[15] =
{
return h;
}
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
#define RANDOM(n) (rand () % (n))
#define RANDOM_OBJECT() objects[RANDOM (SIZEOF (objects))]
contents[i] = RANDOM_OBJECT ();
/* Create list1. */
- list1 = gl_list_create (GL_ARRAY_LIST,
- string_equals, string_hash, NULL, true,
- initial_size, contents);
+ list1 = gl_list_nx_create (GL_ARRAY_LIST,
+ string_equals, string_hash, NULL, true,
+ initial_size, contents);
+ ASSERT (list1 != NULL);
/* Create list2. */
- list2 = gl_list_create_empty (GL_LINKEDHASH_LIST,
- string_equals, string_hash, NULL, true);
+ list2 = gl_list_nx_create_empty (GL_LINKEDHASH_LIST,
+ string_equals, string_hash, NULL, true);
+ ASSERT (list2 != NULL);
for (i = 0; i < initial_size; i++)
- gl_list_add_last (list2, contents[i]);
+ ASSERT (gl_list_nx_add_last (list2, contents[i]) != NULL);
/* Create list3. */
- list3 = gl_list_create (GL_LINKEDHASH_LIST,
- string_equals, string_hash, NULL, true,
- initial_size, contents);
+ list3 = gl_list_nx_create (GL_LINKEDHASH_LIST,
+ string_equals, string_hash, NULL, true,
+ initial_size, contents);
+ ASSERT (list3 != NULL);
check_all (list1, list2, list3);
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_set_at (list1, index, obj);
+ node1 = gl_list_nx_set_at (list1, index, obj);
+ ASSERT (node1 != NULL);
ASSERT (gl_list_get_at (list1, index) == obj);
ASSERT (gl_list_node_value (list1, node1) == obj);
- node2 = gl_list_set_at (list2, index, obj);
+ node2 = gl_list_nx_set_at (list2, index, obj);
+ ASSERT (node2 != NULL);
ASSERT (gl_list_get_at (list2, index) == obj);
ASSERT (gl_list_node_value (list2, node2) == obj);
- node3 = gl_list_set_at (list3, index, obj);
+ node3 = gl_list_nx_set_at (list3, index, obj);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_get_at (list3, index) == obj);
ASSERT (gl_list_node_value (list3, node3) == obj);
{
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_add_first (list1, obj);
- node2 = gl_list_add_first (list2, obj);
- node3 = gl_list_add_first (list3, obj);
+ node1 = gl_list_nx_add_first (list1, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_first (list2, obj);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_first (list3, obj);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_node_value (list1, node1) == obj);
ASSERT (gl_list_node_value (list2, node2) == obj);
ASSERT (gl_list_node_value (list3, node3) == obj);
{
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_add_last (list1, obj);
- node2 = gl_list_add_last (list2, obj);
- node3 = gl_list_add_last (list3, obj);
+ node1 = gl_list_nx_add_last (list1, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_last (list2, obj);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_last (list3, obj);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_node_value (list1, node1) == obj);
ASSERT (gl_list_node_value (list2, node2) == obj);
ASSERT (gl_list_node_value (list3, node3) == obj);
const char *obj1 = RANDOM_OBJECT ();
const char *obj2 = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_add_first (list1, obj2);
- node1 = gl_list_add_before (list1, node1, obj0);
- node1 = gl_list_add_after (list1, node1, obj1);
- node2 = gl_list_add_first (list2, obj2);
- node2 = gl_list_add_before (list2, node2, obj0);
- node2 = gl_list_add_after (list2, node2, obj1);
- node3 = gl_list_add_first (list3, obj2);
- node3 = gl_list_add_before (list3, node3, obj0);
- node3 = gl_list_add_after (list3, node3, obj1);
+ node1 = gl_list_nx_add_first (list1, obj2);
+ ASSERT (node1 != NULL);
+ node1 = gl_list_nx_add_before (list1, node1, obj0);
+ ASSERT (node1 != NULL);
+ node1 = gl_list_nx_add_after (list1, node1, obj1);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_first (list2, obj2);
+ ASSERT (node2 != NULL);
+ node2 = gl_list_nx_add_before (list2, node2, obj0);
+ ASSERT (node2 != NULL);
+ node2 = gl_list_nx_add_after (list2, node2, obj1);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_first (list3, obj2);
+ ASSERT (node3 != NULL);
+ node3 = gl_list_nx_add_before (list3, node3, obj0);
+ ASSERT (node3 != NULL);
+ node3 = gl_list_nx_add_after (list3, node3, obj1);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_node_value (list1, node1) == obj1);
ASSERT (gl_list_node_value (list2, node2) == obj1);
ASSERT (gl_list_node_value (list3, node3) == obj1);
size_t index = RANDOM (gl_list_size (list1) + 1);
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_add_at (list1, index, obj);
- node2 = gl_list_add_at (list2, index, obj);
- node3 = gl_list_add_at (list3, index, obj);
+ node1 = gl_list_nx_add_at (list1, index, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_at (list2, index, obj);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_at (list3, index, obj);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_get_at (list1, index) == obj);
ASSERT (gl_list_node_value (list1, node1) == obj);
ASSERT (gl_list_get_at (list2, index) == obj);
/* Test of <locale.h> substitute.
- Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-/* Test of gl_locale_name function.
- Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+/* Test of gl_locale_name function and its variants.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "localename.h"
#include <locale.h>
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
-int
-main ()
+
+#if HAVE_NEWLOCALE
+
+static struct { int cat; int mask; const char *string; } const categories[] =
+ {
+ { LC_CTYPE, LC_CTYPE_MASK, "LC_CTYPE" },
+ { LC_NUMERIC, LC_NUMERIC_MASK, "LC_NUMERIC" },
+ { LC_TIME, LC_TIME_MASK, "LC_TIME" },
+ { LC_COLLATE, LC_COLLATE_MASK, "LC_COLLATE" },
+ { LC_MONETARY, LC_MONETARY_MASK, "LC_MONETARY" },
+ { LC_MESSAGES, LC_MESSAGES_MASK, "LC_MESSAGES" }
+# ifdef LC_PAPER
+ , { LC_PAPER, LC_PAPER_MASK, "LC_PAPER" }
+# endif
+# ifdef LC_NAME
+ , { LC_NAME, LC_NAME_MASK, "LC_NAME" }
+# endif
+# ifdef LC_ADDRESS
+ , { LC_ADDRESS, LC_ADDRESS_MASK, "LC_ADDRESS" }
+# endif
+# ifdef LC_TELEPHONE
+ , { LC_TELEPHONE, LC_TELEPHONE_MASK, "LC_TELEPHONE" }
+# endif
+# ifdef LC_MEASUREMENT
+ , { LC_MEASUREMENT, LC_MEASUREMENT_MASK, "LC_MEASUREMENT" }
+# endif
+# ifdef LC_IDENTIFICATION
+ , { LC_IDENTIFICATION, LC_IDENTIFICATION_MASK, "LC_IDENTIFICATION" }
+# endif
+ };
+
+#endif
+
+/* Test the gl_locale_name() function. */
+static void
+test_locale_name (void)
{
+ const char *name;
+
/* Check that gl_locale_name returns non-NULL. */
ASSERT (gl_locale_name (LC_MESSAGES, "LC_MESSAGES") != NULL);
+ /* Get into a defined state, */
+ setlocale (LC_ALL, "en_US.UTF-8");
+#if HAVE_NEWLOCALE
+ uselocale (LC_GLOBAL_LOCALE);
+#endif
+
/* Check that when all environment variables are unset,
- gl_locale_name_posix returns NULL. */
+ gl_locale_name returns the default locale. */
unsetenv ("LC_ALL");
unsetenv ("LC_CTYPE");
unsetenv ("LC_MESSAGES");
unsetenv ("LC_MESSAGES");
unsetenv ("LANG");
setlocale (LC_ALL, "");
- ASSERT (strcmp (gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES"), "C") == 0);
ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"), "C") == 0);
unsetenv ("LC_ALL");
setenv ("LC_MESSAGES", "C", 1);
unsetenv ("LANG");
setlocale (LC_ALL, "");
- ASSERT (strcmp (gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES"), "C") == 0);
ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"), "C") == 0);
unsetenv ("LC_ALL");
unsetenv ("LC_MESSAGES");
setenv ("LANG", "C", 1);
setlocale (LC_ALL, "");
- ASSERT (strcmp (gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES"), "C") == 0);
ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"), "C") == 0);
+ /* Check mixed situations. */
+
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1);
+ setenv ("LANG", "de_DE.UTF-8", 1);
+ if (setlocale (LC_ALL, "") != NULL)
+ {
+ name = gl_locale_name (LC_CTYPE, "LC_CTYPE");
+ ASSERT (strcmp (name, "de_DE.UTF-8") == 0);
+ name = gl_locale_name (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+ }
+
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1);
+ unsetenv ("LANG");
+ if (setlocale (LC_ALL, "") != NULL)
+ {
+ name = gl_locale_name (LC_CTYPE, "LC_CTYPE");
+ ASSERT (strcmp (name, gl_locale_name_default ()) == 0);
+ name = gl_locale_name (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+ }
+
+#if HAVE_NEWLOCALE
+ /* Check that gl_locale_name considers the thread locale. */
+ {
+ locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
+ if (locale != NULL)
+ {
+ uselocale (locale);
+ name = gl_locale_name (LC_CTYPE, "LC_CTYPE");
+ ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+ name = gl_locale_name (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+ }
+ }
+
+ /* Check that gl_locale_name distinguishes different categories of the
+ thread locale, and that the name is the right one for each. */
+ {
+ unsigned int i;
+
+ for (i = 0; i < SIZEOF (categories); i++)
+ {
+ int category_mask = categories[i].mask;
+ locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
+ if (locale != NULL)
+ {
+ locale = newlocale (category_mask, "de_DE.UTF-8", locale);
+ if (locale != NULL)
+ {
+ unsigned int j;
+
+ uselocale (locale);
+ for (j = 0; j < SIZEOF (categories); j++)
+ {
+ const char *name_j =
+ gl_locale_name (categories[j].cat, categories[j].string);
+ if (j == i)
+ ASSERT (strcmp (name_j, "de_DE.UTF-8") == 0);
+ else
+ ASSERT (strcmp (name_j, "fr_FR.UTF-8") == 0);
+ }
+ }
+ }
+ }
+ }
+#endif
+}
+
+/* Test the gl_locale_name_thread() function. */
+static void
+test_locale_name_thread (void)
+{
+ /* Get into a defined state, */
+ setlocale (LC_ALL, "en_US.UTF-8");
+
+#if HAVE_NEWLOCALE
+ /* Check that gl_locale_name_thread returns NULL when no thread locale is
+ set. */
+ uselocale (LC_GLOBAL_LOCALE);
+ ASSERT (gl_locale_name_thread (LC_CTYPE, "LC_CTYPE") == NULL);
+ ASSERT (gl_locale_name_thread (LC_MESSAGES, "LC_MESSAGES") == NULL);
+
+ /* Check that gl_locale_name_thread considers the thread locale. */
+ {
+ locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
+ if (locale != NULL)
+ {
+ const char *name;
+
+ uselocale (locale);
+ name = gl_locale_name_thread (LC_CTYPE, "LC_CTYPE");
+ ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+ name = gl_locale_name_thread (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+ }
+ }
+
+ /* Check that gl_locale_name_thread distinguishes different categories of the
+ thread locale, and that the name is the right one for each. */
+ {
+ unsigned int i;
+
+ for (i = 0; i < SIZEOF (categories); i++)
+ {
+ int category_mask = categories[i].mask;
+ locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
+ if (locale != NULL)
+ {
+ locale = newlocale (category_mask, "de_DE.UTF-8", locale);
+ if (locale != NULL)
+ {
+ unsigned int j;
+
+ uselocale (locale);
+ for (j = 0; j < SIZEOF (categories); j++)
+ {
+ const char *name_j =
+ gl_locale_name_thread (categories[j].cat,
+ categories[j].string);
+ if (j == i)
+ ASSERT (strcmp (name_j, "de_DE.UTF-8") == 0);
+ else
+ ASSERT (strcmp (name_j, "fr_FR.UTF-8") == 0);
+ }
+ }
+ }
+ }
+ }
+
+ /* Check that gl_locale_name_thread returns a string that is allocated with
+ indefinite extent. */
+ {
+ /* Try many locale names in turn, in order to defeat possible caches. */
+ static const char * const choices[] =
+ {
+ "C",
+ "POSIX",
+ "af_ZA",
+ "af_ZA.UTF-8",
+ "am_ET",
+ "am_ET.UTF-8",
+ "be_BY",
+ "be_BY.UTF-8",
+ "bg_BG",
+ "bg_BG.UTF-8",
+ "ca_ES",
+ "ca_ES.UTF-8",
+ "cs_CZ",
+ "cs_CZ.UTF-8",
+ "da_DK",
+ "da_DK.UTF-8",
+ "de_AT",
+ "de_AT.UTF-8",
+ "de_CH",
+ "de_CH.UTF-8",
+ "de_DE",
+ "de_DE.UTF-8",
+ "el_GR",
+ "el_GR.UTF-8",
+ "en_AU",
+ "en_AU.UTF-8",
+ "en_CA",
+ "en_CA.UTF-8",
+ "en_GB",
+ "en_GB.UTF-8",
+ "en_IE",
+ "en_IE.UTF-8",
+ "en_NZ",
+ "en_NZ.UTF-8",
+ "en_US",
+ "en_US.UTF-8",
+ "es_ES",
+ "es_ES.UTF-8",
+ "et_EE",
+ "et_EE.UTF-8",
+ "eu_ES",
+ "eu_ES.UTF-8",
+ "fi_FI",
+ "fi_FI.UTF-8",
+ "fr_BE",
+ "fr_BE.UTF-8",
+ "fr_CA",
+ "fr_CA.UTF-8",
+ "fr_CH",
+ "fr_CH.UTF-8",
+ "fr_FR",
+ "fr_FR.UTF-8",
+ "he_IL",
+ "he_IL.UTF-8",
+ "hr_HR",
+ "hr_HR.UTF-8",
+ "hu_HU",
+ "hu_HU.UTF-8",
+ "hy_AM",
+ "is_IS",
+ "is_IS.UTF-8",
+ "it_CH",
+ "it_CH.UTF-8",
+ "it_IT",
+ "it_IT.UTF-8",
+ "ja_JP.UTF-8",
+ "kk_KZ",
+ "kk_KZ.UTF-8",
+ "ko_KR.UTF-8",
+ "lt_LT",
+ "lt_LT.UTF-8",
+ "nl_BE",
+ "nl_BE.UTF-8",
+ "nl_NL",
+ "nl_NL.UTF-8",
+ "no_NO",
+ "no_NO.UTF-8",
+ "pl_PL",
+ "pl_PL.UTF-8",
+ "pt_BR",
+ "pt_BR.UTF-8",
+ "pt_PT",
+ "pt_PT.UTF-8",
+ "ro_RO",
+ "ro_RO.UTF-8",
+ "ru_RU",
+ "ru_RU.UTF-8",
+ "sk_SK",
+ "sk_SK.UTF-8",
+ "sl_SI",
+ "sl_SI.UTF-8",
+ "sv_SE",
+ "sv_SE.UTF-8",
+ "tr_TR",
+ "tr_TR.UTF-8",
+ "uk_UA",
+ "uk_UA.UTF-8",
+ "zh_CN",
+ "zh_CN.UTF-8",
+ "zh_HK",
+ "zh_HK.UTF-8",
+ "zh_TW",
+ "zh_TW.UTF-8"
+ };
+ /* Remember which locales are available. */
+ unsigned char /* bool */ available[SIZEOF (choices)];
+ /* Array of remembered results of gl_locale_name_thread. */
+ const char *unsaved_names[SIZEOF (choices)][SIZEOF (categories)];
+ /* Array of remembered results of gl_locale_name_thread, stored in safe
+ memory. */
+ char *saved_names[SIZEOF (choices)][SIZEOF (categories)];
+ unsigned int j;
+
+ for (j = 0; j < SIZEOF (choices); j++)
+ {
+ locale_t locale = newlocale (LC_ALL_MASK, choices[j], NULL);
+ available[j] = (locale != NULL);
+ if (locale != NULL)
+ {
+ unsigned int i;
+
+ uselocale (locale);
+ for (i = 0; i < SIZEOF (categories); i++)
+ {
+ unsaved_names[j][i] = gl_locale_name_thread (categories[i].cat, categories[i].string);
+ saved_names[j][i] = strdup (unsaved_names[j][i]);
+ }
+ uselocale (LC_GLOBAL_LOCALE);
+ freelocale (locale);
+ }
+ }
+ /* Verify the unsaved_names are still valid. */
+ for (j = 0; j < SIZEOF (choices); j++)
+ if (available[j])
+ {
+ unsigned int i;
+
+ for (i = 0; i < SIZEOF (categories); i++)
+ ASSERT (strcmp (unsaved_names[j][i], saved_names[j][i]) == 0);
+ }
+ /* Allocate many locales, without freeing them. This is an attempt at
+ overwriting as much of the previously allocated memory as possible. */
+ for (j = SIZEOF (choices); j > 0; )
+ {
+ j--;
+ if (available[j])
+ {
+ locale_t locale = newlocale (LC_ALL_MASK, choices[j], NULL);
+ unsigned int i;
+
+ ASSERT (locale != NULL);
+ uselocale (locale);
+ for (i = 0; i < SIZEOF (categories); i++)
+ {
+ const char *name = gl_locale_name_thread (categories[i].cat, categories[i].string);
+ ASSERT (strcmp (unsaved_names[j][i], name) == 0);
+ }
+ uselocale (LC_GLOBAL_LOCALE);
+ }
+ }
+ /* Verify the unsaved_names are still valid. */
+ for (j = 0; j < SIZEOF (choices); j++)
+ if (available[j])
+ {
+ unsigned int i;
+
+ for (i = 0; i < SIZEOF (categories); i++)
+ ASSERT (strcmp (unsaved_names[j][i], saved_names[j][i]) == 0);
+ }
+ }
+#else
+ /* Check that gl_locale_name_thread always returns NULL. */
+ ASSERT (gl_locale_name_thread (LC_CTYPE, "LC_CTYPE") == NULL);
+ ASSERT (gl_locale_name_thread (LC_MESSAGES, "LC_MESSAGES") == NULL);
+#endif
+}
+
+/* Test the gl_locale_name_posix() function. */
+static void
+test_locale_name_posix (void)
+{
+ const char *name;
+
+ /* Get into a defined state, */
+ setlocale (LC_ALL, "en_US.UTF-8");
+#if HAVE_NEWLOCALE
+ uselocale (LC_GLOBAL_LOCALE);
+#endif
+
+ /* Check that when all environment variables are unset,
+ gl_locale_name_posix returns either NULL or the default locale. */
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ unsetenv ("LC_NUMERIC");
+ unsetenv ("LANG");
+ setlocale (LC_ALL, "");
+ name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0);
+ name = gl_locale_name_posix (LC_NUMERIC, "LC_NUMERIC");
+ ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0);
+
+ /* Check that an empty environment variable is treated like an unset
+ environment variable. */
+
+ setenv ("LC_ALL", "", 1);
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ unsetenv ("LANG");
+ setlocale (LC_ALL, "");
+ name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0);
+
+ unsetenv ("LC_ALL");
+ setenv ("LC_CTYPE", "", 1);
+ unsetenv ("LC_MESSAGES");
+ unsetenv ("LANG");
+ setlocale (LC_ALL, "");
+ name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0);
+
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ setenv ("LC_MESSAGES", "", 1);
+ unsetenv ("LANG");
+ setlocale (LC_ALL, "");
+ name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0);
+
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ setenv ("LANG", "", 1);
+ setlocale (LC_ALL, "");
+ name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0);
+
+ /* Check that LC_ALL overrides the others, and LANG is overridden by the
+ others. */
+
+ setenv ("LC_ALL", "C", 1);
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ unsetenv ("LANG");
+ setlocale (LC_ALL, "");
+ name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "C") == 0);
+
+ unsetenv ("LC_ALL");
+ setenv ("LC_CTYPE", "C", 1);
+ setenv ("LC_MESSAGES", "C", 1);
+ unsetenv ("LANG");
+ setlocale (LC_ALL, "");
+ name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "C") == 0);
+
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ setenv ("LANG", "C", 1);
+ setlocale (LC_ALL, "");
+ name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "C") == 0);
+
+ /* Check mixed situations. */
+
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1);
+ setenv ("LANG", "de_DE.UTF-8", 1);
+ if (setlocale (LC_ALL, "") != NULL)
+ {
+ name = gl_locale_name_posix (LC_CTYPE, "LC_CTYPE");
+ ASSERT (strcmp (name, "de_DE.UTF-8") == 0);
+ name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+ }
+
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1);
+ unsetenv ("LANG");
+ if (setlocale (LC_ALL, "") != NULL)
+ {
+ name = gl_locale_name_posix (LC_CTYPE, "LC_CTYPE");
+ ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0);
+ name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+ }
+
+#if HAVE_NEWLOCALE
+ /* Check that gl_locale_name_posix ignores the thread locale. */
+ {
+ locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
+ if (locale != NULL)
+ {
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ setenv ("LANG", "C", 1);
+ setlocale (LC_ALL, "");
+ uselocale (locale);
+ name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "C") == 0);
+ }
+ }
+#endif
+}
+
+/* Test the gl_locale_name_environ() function. */
+static void
+test_locale_name_environ (void)
+{
+ const char *name;
+
+ /* Get into a defined state, */
+ setlocale (LC_ALL, "en_US.UTF-8");
+#if HAVE_NEWLOCALE
+ uselocale (LC_GLOBAL_LOCALE);
+#endif
+
+ /* Check that when all environment variables are unset,
+ gl_locale_name_environ returns NULL. */
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ unsetenv ("LC_NUMERIC");
+ unsetenv ("LANG");
+ ASSERT (gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES") == NULL);
+ ASSERT (gl_locale_name_environ (LC_NUMERIC, "LC_NUMERIC") == NULL);
+
+ /* Check that an empty environment variable is treated like an unset
+ environment variable. */
+
+ setenv ("LC_ALL", "", 1);
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ unsetenv ("LANG");
+ ASSERT (gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES") == NULL);
+
+ unsetenv ("LC_ALL");
+ setenv ("LC_CTYPE", "", 1);
+ unsetenv ("LC_MESSAGES");
+ unsetenv ("LANG");
+ ASSERT (gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES") == NULL);
+
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ setenv ("LC_MESSAGES", "", 1);
+ unsetenv ("LANG");
+ ASSERT (gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES") == NULL);
+
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ setenv ("LANG", "", 1);
+ ASSERT (gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES") == NULL);
+
+ /* Check that LC_ALL overrides the others, and LANG is overridden by the
+ others. */
+
+ setenv ("LC_ALL", "C", 1);
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ unsetenv ("LANG");
+ name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "C") == 0);
+
+ unsetenv ("LC_ALL");
+ setenv ("LC_CTYPE", "C", 1);
+ setenv ("LC_MESSAGES", "C", 1);
+ unsetenv ("LANG");
+ name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "C") == 0);
+
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ setenv ("LANG", "C", 1);
+ name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "C") == 0);
+
+ /* Check mixed situations. */
+
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1);
+ setenv ("LANG", "de_DE.UTF-8", 1);
+ name = gl_locale_name_environ (LC_CTYPE, "LC_CTYPE");
+ ASSERT (strcmp (name, "de_DE.UTF-8") == 0);
+ name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1);
+ unsetenv ("LANG");
+ name = gl_locale_name_environ (LC_CTYPE, "LC_CTYPE");
+ ASSERT (name == NULL);
+ name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
+
+#if HAVE_NEWLOCALE
+ /* Check that gl_locale_name_environ ignores the thread locale. */
+ {
+ locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
+ if (locale != NULL)
+ {
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LC_MESSAGES");
+ setenv ("LANG", "C", 1);
+ setlocale (LC_ALL, "");
+ uselocale (locale);
+ name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES");
+ ASSERT (strcmp (name, "C") == 0);
+ }
+ }
+#endif
+}
+
+/* Test the gl_locale_name_default() function. */
+static void
+test_locale_name_default (void)
+{
+ const char *name = gl_locale_name_default ();
+
+ ASSERT (name != NULL);
+
+ /* Only MacOS X and Windows have a facility for the user to set the default
+ locale. */
+#if !((defined __APPLE__ && defined __MACH__) || (defined _WIN32 || defined __WIN32__ || defined __CYGWIN__))
+ ASSERT (strcmp (name, "C") == 0);
+#endif
+
+#if HAVE_NEWLOCALE
+ /* Check that gl_locale_name_default ignores the thread locale. */
+ {
+ locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
+ if (locale != NULL)
+ {
+ uselocale (locale);
+ ASSERT (strcmp (gl_locale_name_default (), name) == 0);
+ }
+ }
+#endif
+}
+
+int
+main ()
+{
+ test_locale_name ();
+ test_locale_name_thread ();
+ test_locale_name_posix ();
+ test_locale_name_environ ();
+ test_locale_name_default ();
+
return 0;
}
/* Test of locking in multithreaded situations.
- Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of lseek() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
-#include <errno.h>
-#include <stdio.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "signature.h"
+SIGNATURE_CHECK (lseek, off_t, (int, off_t, int));
+
+#include <errno.h>
+
+#include "macros.h"
/* ARGC must be 2; *ARGV[1] is '0' if stdin and stdout are files, '1'
if they are pipes, and '2' if they are closed. Check for proper
/* Test of lstat() function.
- Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <sys/stat.h>
+/* Caution: lstat may be a function-like macro. Although this
+ signature check must pass, it may be the signature of the real (and
+ broken) lstat rather than rpl_lstat. Most code should not use the
+ address of lstat. */
+#include "signature.h"
+SIGNATURE_CHECK (lstat, int, (char const *, struct stat *));
+
#include <fcntl.h>
#include <errno.h>
#include <stdbool.h>
#include <unistd.h>
#include "same-inode.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-lstat.t"
int
main (void)
{
+ /* Remove any leftovers from a previous partial run. */
+ system ("rm -rf " BASE "*");
+
return test_lstat_func (do_lstat, true);
}
/* Test of lstat() function.
- Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
struct stat st1;
struct stat st2;
- /* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
-
/* Test for common directories. */
ASSERT (func (".", &st1) == 0);
ASSERT (func ("./", &st2) == 0);
/* Test of file timestamp modification functions.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
}
{
struct timespec ts[2] = { { Y2K, 0 }, { Y2K, 0 } };
+ nap ();
ASSERT (func (BASE "file", ts) == 0);
}
- ASSERT (stat (BASE "file", &st1) == 0);
- ASSERT (st1.st_atime == Y2K);
- ASSERT (st1.st_mtime == Y2K);
+ ASSERT (stat (BASE "file", &st2) == 0);
+ ASSERT (st2.st_atime == Y2K);
+ ASSERT (st2.st_mtime == Y2K);
+ if (check_ctime)
+ ASSERT (st1.st_ctime < st2.st_ctime
+ || (st1.st_ctime == st2.st_ctime
+ && get_stat_ctime_ns (&st1) < get_stat_ctime_ns (&st2)));
/* Play with symlink timestamps. */
if (symlink (BASE "file", BASE "link"))
if (st1.st_atime != st2.st_atime
|| get_stat_atime_ns (&st1) != get_stat_atime_ns (&st2))
atime_supported = false;
+ ASSERT (st1.st_ctime == st2.st_ctime);
+ ASSERT (get_stat_ctime_ns (&st1) == get_stat_ctime_ns (&st2));
/* Invalid arguments. */
{
/* Set both times. */
{
struct timespec ts[2] = { { Y2K, BILLION / 2 - 1 }, { Y2K, BILLION - 1 } };
+ nap ();
ASSERT (func (BASE "link", ts) == 0);
ASSERT (lstat (BASE "link", &st2) == 0);
if (atime_supported)
ASSERT (st2.st_mtime == Y2K);
ASSERT (0 <= get_stat_mtime_ns (&st2));
ASSERT (get_stat_mtime_ns (&st2) < BILLION);
+ if (check_ctime)
+ ASSERT (st1.st_ctime < st2.st_ctime
+ || (st1.st_ctime == st2.st_ctime
+ && get_stat_ctime_ns (&st1) < get_stat_ctime_ns (&st2)));
}
/* Play with UTIME_OMIT, UTIME_NOW. */
{
+ struct stat st3;
struct timespec ts[2] = { { BILLION, UTIME_OMIT }, { 0, UTIME_NOW } };
+ nap ();
+ ASSERT (func (BASE "link", ts) == 0);
+ ASSERT (lstat (BASE "link", &st3) == 0);
+ if (atime_supported)
+ {
+ ASSERT (st3.st_atime == Y2K);
+ ASSERT (0 <= get_stat_atime_ns (&st3));
+ ASSERT (get_stat_atime_ns (&st3) < BILLION / 2);
+ }
+ ASSERT (utimecmp (BASE "link", &st1, &st3, 0) <= 0);
+ if (check_ctime)
+ ASSERT (st2.st_ctime < st3.st_ctime
+ || (st2.st_ctime == st3.st_ctime
+ && get_stat_ctime_ns (&st2) < get_stat_ctime_ns (&st3)));
+ nap ();
+ ts[0].tv_nsec = 0;
+ ts[1].tv_nsec = UTIME_OMIT;
ASSERT (func (BASE "link", ts) == 0);
ASSERT (lstat (BASE "link", &st2) == 0);
if (atime_supported)
{
- ASSERT (st2.st_atime == Y2K);
- ASSERT (0 <= get_stat_atime_ns (&st2));
- ASSERT (get_stat_atime_ns (&st2) < BILLION / 2);
+ ASSERT (st2.st_atime == BILLION);
+ ASSERT (get_stat_atime_ns (&st2) == 0);
}
- ASSERT (utimecmp (BASE "link", &st1, &st2, 0) <= 0);
+ ASSERT (st3.st_mtime == st2.st_mtime);
+ ASSERT (get_stat_mtime_ns (&st3) == get_stat_mtime_ns (&st2));
+ if (check_ctime)
+ ASSERT (st3.st_ctime < st2.st_ctime
+ || (st3.st_ctime == st2.st_ctime
+ && get_stat_ctime_ns (&st3) < get_stat_ctime_ns (&st2)));
}
/* Symlink to directory. */
/* Test of safe automatic memory allocation.
- Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <math.h> substitute.
- Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of case-insensitive memory area comparison function.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <locale.h>
#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-mbmemcasecmp.h"
/* Test of case-insensitive memory area comparison function.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of case-insensitive memory area comparison function.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <locale.h>
#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-mbmemcasecmp.h"
/* Test of conversion of multibyte character to wide character.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <wchar.h>
+#include "signature.h"
+SIGNATURE_CHECK (mbrtowc, size_t, (wchar_t *, char const *, size_t,
+ mbstate_t *));
+
#include <locale.h>
#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (int argc, char *argv[])
/* Test of case-insensitive string comparison function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <string.h>
#include <locale.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+
+#include "macros.h"
int
main ()
/* Test of case-insensitive searching in a string.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <string.h>
-#include <stdio.h>
#include <stdlib.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of searching in a string.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <string.h>
#include <locale.h>
-#include <stdio.h>
#include <stdlib.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of case-insensitive searching in a string.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <string.h>
#include <locale.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+
+#include "macros.h"
int
main ()
/* Test of case-insensitive searching in a string.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <string.h>
#include <locale.h>
-#include <stdio.h>
-#include <stdlib.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of searching a string for a character.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <string.h>
#include <locale.h>
-#include <stdio.h>
-#include <stdlib.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of searching a string for a character among a given set of characters.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <string.h>
#include <locale.h>
-#include <stdio.h>
-#include <stdlib.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of test for initial conversion state.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <wchar.h>
+#include "signature.h"
+SIGNATURE_CHECK (mbsinit, int, (const mbstate_t *));
+
#include <locale.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+
+#include "macros.h"
int
main (int argc, char *argv[])
/* Test of case-insensitive string comparison function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <string.h>
#include <locale.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+
+#include "macros.h"
int
main ()
/* Test of conversion of string to wide string.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <wchar.h>
+#include "signature.h"
+SIGNATURE_CHECK (mbsnrtowcs, size_t, (wchar_t *, char const **, size_t, size_t,
+ mbstate_t *));
+
#include <locale.h>
#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (int argc, char *argv[])
/* Test of searching a string for a character among a given set of characters.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <string.h>
#include <locale.h>
-#include <stdio.h>
-#include <stdlib.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of case-insensitive string comparison function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <string.h>
#include <locale.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+
+#include "macros.h"
int
main ()
/* Test of searching a string for the last occurrence of a character.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <string.h>
#include <locale.h>
-#include <stdio.h>
-#include <stdlib.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of conversion of string to wide string.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <wchar.h>
+#include "signature.h"
+SIGNATURE_CHECK (mbsrtowcs, size_t, (wchar_t *, char const **, size_t,
+ mbstate_t *));
+
#include <locale.h>
#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (int argc, char *argv[])
/* Test of searching a string for a character outside a given set of characters.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <string.h>
#include <locale.h>
-#include <stdio.h>
-#include <stdlib.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of searching in a string.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <string.h>
-#include <stdio.h>
#include <stdlib.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of searching in a string.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <string.h>
#include <locale.h>
-#include <stdio.h>
#include <stdlib.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of searching in a string.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <string.h>
#include <locale.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+
+#include "macros.h"
int
main ()
*
* This program is free software; you can 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)
+ * 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,
*
* This program is free software; you can 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)
+ * 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,
#include <string.h>
-#include <stdio.h>
+#include "signature.h"
+SIGNATURE_CHECK (memchr, void *, (void const *, int, size_t));
+
#include <stdlib.h>
#include "zerosize-ptr.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* Calculating void * + int is not portable, so this wrapper converts
to char * to make the tests easier to write. */
#include "memchr2.h"
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "zerosize-ptr.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* Calculating void * + int is not portable, so this wrapper converts
to char * to make the tests easier to write. */
#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include "signature.h"
+SIGNATURE_CHECK (memcmp, int, (void const *, void const *, size_t));
#include "zerosize-ptr.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (void)
#include <string.h>
+#include "signature.h"
+SIGNATURE_CHECK (memmem, void *, (void const *, size_t, void const *, size_t));
+
#include <signal.h>
-#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "zerosize-ptr.h"
+#include "macros.h"
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+static void *
+null_ptr (void)
+{
+ return NULL;
+}
int
main (int argc, char *argv[])
{
const char input[] = "foo";
- const char *result = memmem (input, strlen (input), NULL, 0);
+ const char *result = memmem (input, strlen (input), null_ptr (), 0);
ASSERT (result == input);
}
#include <string.h>
-#include <stdio.h>
+#include "signature.h"
+SIGNATURE_CHECK (memrchr, void *, (void const *, int, size_t));
+
#include <stdlib.h>
#include "zerosize-ptr.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* Calculating void * + int is not portable, so this wrapper converts
to char * to make the tests easier to write. */
/* Tests of mkdir.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <sys/stat.h>
+#include "signature.h"
+SIGNATURE_CHECK (mkdir, int, (char const *, mode_t));
+
#include <fcntl.h>
#include <errno.h>
#include <stdbool.h>
#include <stdlib.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-mkdir.t"
main (void)
{
/* Clean up any trash from prior testsuite runs. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
return test_mkdir (mkdir, true);
}
/* Test of mkdir() function.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
/* Tests of mkdirat.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <sys/stat.h>
+#include "signature.h"
+SIGNATURE_CHECK (mkdirat, int, (int, char const *, mode_t));
+
#include <fcntl.h>
#include <errno.h>
#include <stdbool.h>
#include <stdlib.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-mkdirat.t"
int result;
/* Clean up any trash from prior testsuite runs. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
/* Test basic mkdir functionality. */
result = test_mkdir (do_mkdir, false);
/* Tests of mkfifo.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <sys/stat.h>
+#include "signature.h"
+SIGNATURE_CHECK (mkfifo, int, (char const *, mode_t));
+
#include <fcntl.h>
#include <errno.h>
#include <stdbool.h>
#include <stdlib.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-mkfifo.t"
main (void)
{
/* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
return test_mkfifo (mkfifo, true);
}
/* Tests of mkfifo and friends.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Tests of mkfifoat and mknodat.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <sys/stat.h>
+#include "signature.h"
+SIGNATURE_CHECK (mkfifoat, int, (int, char const *, mode_t));
+SIGNATURE_CHECK (mknodat, int, (int, char const *, mode_t, dev_t));
+
#include <fcntl.h>
#include <errno.h>
#include <stdbool.h>
#include <string.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-mkfifoat.t"
int result;
/* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
/* Basic tests. */
result = test_mkfifo (do_mkfifoat, true);
/* Tests of mknod.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <sys/stat.h>
+#include "signature.h"
+SIGNATURE_CHECK (mknod, int, (char const *, mode_t, dev_t));
+
#include <fcntl.h>
#include <errno.h>
#include <stdbool.h>
#include <stdlib.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-mknod.t"
main (void)
{
/* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
/* We can only portably test creation of fifos. Anything else
requires root privileges and knowledge of device numbers. */
/* Test of nanosleep() function.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <time.h>
+#include "signature.h"
+SIGNATURE_CHECK (nanosleep, int, (struct timespec const *, struct timespec *));
+
#include <errno.h>
#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <unistd.h>
#include "intprops.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#if HAVE_DECL_ALARM
static void
#endif
int
-main()
+main (void)
{
struct timespec ts;
/* Test of <netdb.h> substitute.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <netinet/in.h> substitute.
- Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
--- /dev/null
+/* Test of nl_langinfo replacement.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
+
+#include <config.h>
+
+#include <langinfo.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (nl_langinfo, char *, (nl_item));
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "c-strcase.h"
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+ int pass = atoi (argv[1]);
+ /* pass locale
+ 0 C
+ 1 traditional French locale
+ 2 French UTF-8 locale
+ */
+
+ setlocale (LC_ALL, "");
+
+ /* nl_langinfo items of the LC_CTYPE category */
+ ASSERT (strlen (nl_langinfo (CODESET)) > 0);
+ if (pass == 2)
+ {
+ const char *codeset = nl_langinfo (CODESET);
+ ASSERT (c_strcasecmp (codeset, "UTF-8") == 0 || c_strcasecmp (codeset, "UTF8") == 0);
+ }
+ /* nl_langinfo items of the LC_NUMERIC category */
+ ASSERT (strlen (nl_langinfo (RADIXCHAR)) > 0);
+ ASSERT (strlen (nl_langinfo (THOUSEP)) >= 0);
+ /* nl_langinfo items of the LC_TIME category */
+ ASSERT (strlen (nl_langinfo (D_T_FMT)) > 0);
+ ASSERT (strlen (nl_langinfo (D_FMT)) > 0);
+ ASSERT (strlen (nl_langinfo (T_FMT)) > 0);
+ ASSERT (strlen (nl_langinfo (T_FMT_AMPM)) >= (pass == 0 ? 1 : 0));
+ ASSERT (strlen (nl_langinfo (AM_STR)) >= (pass == 0 ? 1 : 0));
+ ASSERT (strlen (nl_langinfo (PM_STR)) >= (pass == 0 ? 1 : 0));
+ ASSERT (strlen (nl_langinfo (DAY_1)) > 0);
+ ASSERT (strlen (nl_langinfo (DAY_2)) > 0);
+ ASSERT (strlen (nl_langinfo (DAY_3)) > 0);
+ ASSERT (strlen (nl_langinfo (DAY_4)) > 0);
+ ASSERT (strlen (nl_langinfo (DAY_5)) > 0);
+ ASSERT (strlen (nl_langinfo (DAY_6)) > 0);
+ ASSERT (strlen (nl_langinfo (DAY_7)) > 0);
+ ASSERT (strlen (nl_langinfo (ABDAY_1)) > 0);
+ ASSERT (strlen (nl_langinfo (ABDAY_2)) > 0);
+ ASSERT (strlen (nl_langinfo (ABDAY_3)) > 0);
+ ASSERT (strlen (nl_langinfo (ABDAY_4)) > 0);
+ ASSERT (strlen (nl_langinfo (ABDAY_5)) > 0);
+ ASSERT (strlen (nl_langinfo (ABDAY_6)) > 0);
+ ASSERT (strlen (nl_langinfo (ABDAY_7)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_1)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_2)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_3)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_4)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_5)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_6)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_7)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_8)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_9)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_10)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_11)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_12)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_1)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_2)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_3)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_4)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_5)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_6)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_7)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_8)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_9)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_10)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_11)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_12)) > 0);
+ ASSERT (strlen (nl_langinfo (ERA)) >= 0);
+ ASSERT (strlen (nl_langinfo (ERA_D_FMT)) >= 0);
+ ASSERT (strlen (nl_langinfo (ERA_D_T_FMT)) >= 0);
+ ASSERT (strlen (nl_langinfo (ERA_T_FMT)) >= 0);
+ ASSERT (nl_langinfo (ALT_DIGITS) != NULL);
+ /* nl_langinfo items of the LC_MONETARY category */
+ {
+ const char *currency = nl_langinfo (CRNCYSTR);
+ ASSERT (strlen (currency) >= (pass > 0 ? 1 : 0));
+ }
+ /* nl_langinfo items of the LC_MESSAGES category */
+ ASSERT (strlen (nl_langinfo (YESEXPR)) > 0);
+ ASSERT (strlen (nl_langinfo (NOEXPR)) > 0);
+
+ return 0;
+}
--- /dev/null
+#!/bin/sh
+
+LC_ALL=C ./test-nl_langinfo${EXEEXT} 0 || exit 1
+
+# Test whether a specific traditional locale is installed.
+: ${LOCALE_FR=fr_FR}
+if test $LOCALE_FR != none; then
+ LC_ALL=$LOCALE_FR ./test-nl_langinfo${EXEEXT} 1 || exit 1
+fi
+
+# Test whether a specific UTF-8 locale is installed.
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR_UTF8 != none; then
+ LC_ALL=$LOCALE_FR_UTF8 ./test-nl_langinfo${EXEEXT} 2 || exit 1
+fi
+
+exit 0
/* Test of obstack_printf() and obstack_vprintf() functions.
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdio.h>
+#include "signature.h"
+SIGNATURE_CHECK (obstack_printf, int, (struct obstack *, char const *, ...));
+SIGNATURE_CHECK (obstack_vprintf, int, (struct obstack *, char const *,
+ va_list));
+
#include "obstack.h"
#include "xalloc.h"
#include <string.h>
#include "progname.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
/* Test of opening a file descriptor.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <fcntl.h>
+#include "signature.h"
+SIGNATURE_CHECK (open, int, (char const *, int, ...));
+
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
-#include <stdlib.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-open.t"
/* Test of opening a file descriptor.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test that openat_safer leave standard fds alone.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <errno.h>
#include <stdio.h>
-#include <stdlib.h>
#include <sys/stat.h>
#include <unistd.h>
duplicate the original stderr. */
#define BACKUP_STDERR_FILENO 10
-static FILE *myerr;
+#define ASSERT_STREAM myerr
+#include "macros.h"
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (myerr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (myerr); \
- abort (); \
- } \
- } \
- while (0)
+static FILE *myerr;
#define witness "test-openat-safer.txt"
/* Test that openat works.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <fcntl.h>
+#include "signature.h"
+SIGNATURE_CHECK (openat, int, (int, char const *, int, ...));
+
#include <errno.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
-#include <stdlib.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-openat.t"
/* Test of parsing durations.
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of perror() function.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdio.h>
+#include "signature.h"
+SIGNATURE_CHECK (perror, void, (char const *));
+
#include <errno.h>
int
/* Test of filtering of data through a subprocess.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2009.
This program is free software: you can redistribute it and/or modify
#include "pipe-filter.h"
-#include <stdio.h>
-#include <stdlib.h>
-
#include "binary-io.h"
#include "c-ctype.h"
#include "read-file.h"
#include "progname.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* Pipe a text file through 'tr a-z A-Z', which converts ASCII characters from
/* Child program invoked by test-pipe-filter-gi2-main.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
Written by Paolo Bonzini <bonzini@gnu.org>, 2009.
This program is free software: you can redistribute it and/or modify
/* Test harness for pipe-filter-gi.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
Written by Paolo Bonzini <bonzini@gnu.org>, 2009.
This program is free software: you can redistribute it and/or modify
#include "full-write.h"
#include "progname.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* 0.1 sec pause */
static void
# pipe-filter test driver.
#
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
# Written by Paolo Bonzini <bonzini@gnu.org>, 2009.
#
# This program is free software: you can redistribute it and/or modify
/* Test of filtering of data through a subprocess.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2009.
This program is free software: you can redistribute it and/or modify
#include "pipe-filter.h"
-#include <stdio.h>
-#include <stdlib.h>
-
#include "binary-io.h"
#include "c-ctype.h"
#include "read-file.h"
#include "progname.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* Pipe a text file through 'tr a-z A-Z', which converts ASCII characters from
/* Child program invoked by test-pipe-filter-ii2-main.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
Written by Paolo Bonzini <bonzini@gnu.org>, 2009.
This program is free software: you can redistribute it and/or modify
/* Test harness for pipe-filter-ii.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
Written by Paolo Bonzini <bonzini@gnu.org>, 2009.
This program is free software: you can redistribute it and/or modify
#include "full-write.h"
#include "progname.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
struct locals
{
# pipe-filter test driver.
#
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
# Written by Paolo Bonzini <bonzini@gnu.org>, 2009.
#
# This program is free software: you can redistribute it and/or modify
/* Test of create_pipe_bidi/wait_subprocess.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
duplicate the original stderr. */
#define BACKUP_STDERR_FILENO 10
-static FILE *myerr;
+#define ASSERT_STREAM myerr
+#include "macros.h"
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (myerr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (myerr); \
- abort (); \
- } \
- } \
- while (0)
+static FILE *myerr;
/* Code executed by the child process. argv[1] = "child". */
static int
/* Test of pipe2.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <unistd.h>
+#include "signature.h"
+SIGNATURE_CHECK (pipe2, int, (int[2], int));
+
#include <fcntl.h>
#include <stdbool.h>
#endif
#include "binary-io.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* Return true if FD is open. */
static bool
/* Test of poll() function.
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
+#include <poll.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (poll, int, (struct pollfd[], nfds_t, int));
+
#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-#include <poll.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdbool.h>
/* Test of opening a subcommand stream.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "stdio--.h"
/* Helpers. */
-#include <stdlib.h>
#include <sys/wait.h>
#include <unistd.h>
duplicate the original stderr. */
#define BACKUP_STDERR_FILENO 10
-static FILE *myerr;
+#define ASSERT_STREAM myerr
+#include "macros.h"
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (myerr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (myerr); \
- abort (); \
- } \
- } \
- while (0)
+static FILE *myerr;
int
main (int argc, char **argv)
/* Test of opening a subcommand stream.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of opening a subcommand stream.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Specification. */
#include <stdio.h>
+#include "signature.h"
+SIGNATURE_CHECK (popen, FILE *, (char const *, char const *));
+SIGNATURE_CHECK (pclose, int, (FILE *));
+
#include "test-popen.h"
/* Test of opening a subcommand stream.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <sys/wait.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (int argc, char **argv)
/* Test of posix_spawn() function.
- Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <spawn.h>
+#include "signature.h"
+SIGNATURE_CHECK (posix_spawnp, int, (pid_t *, char const *,
+ posix_spawn_file_actions_t const *,
+ posix_spawnattr_t const *,
+ char *const[], char *const[]));
+SIGNATURE_CHECK (posix_spawnattr_init, int, (posix_spawnattr_t *));
+SIGNATURE_CHECK (posix_spawnattr_destroy, int, (posix_spawnattr_t *));
+SIGNATURE_CHECK (posix_spawnattr_setsigmask, int, (posix_spawnattr_t *,
+ sigset_t const *));
+SIGNATURE_CHECK (posix_spawnattr_setflags, int, (posix_spawnattr_t *, short));
+SIGNATURE_CHECK (posix_spawn_file_actions_init, int,
+ (posix_spawn_file_actions_t *));
+SIGNATURE_CHECK (posix_spawn_file_actions_destroy, int,
+ (posix_spawn_file_actions_t *));
+SIGNATURE_CHECK (posix_spawn_file_actions_addclose, int,
+ (posix_spawn_file_actions_t *, int));
+SIGNATURE_CHECK (posix_spawn_file_actions_addopen, int,
+ (posix_spawn_file_actions_t *, int, char const *, int,
+ mode_t));
+SIGNATURE_CHECK (posix_spawn_file_actions_adddup2, int,
+ (posix_spawn_file_actions_t *, int, int));
+
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
/* Test of posix_spawn() function.
- Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of posix_spawn() function.
- Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <spawn.h>
+#include "signature.h"
+SIGNATURE_CHECK (posix_spawn, int, (pid_t *, char const *,
+ posix_spawn_file_actions_t const *,
+ posix_spawnattr_t const *,
+ char *const[], char *const[]));
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
/* Test that posixtime works as required.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <time.h>
#include "intprops.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
struct posixtm_test
{
/* Test the pread function.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include "signature.h"
+SIGNATURE_CHECK (pread, ssize_t, (int, void *, size_t, off_t));
+
#include <sys/types.h>
#include <fcntl.h>
#include <errno.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define N (sizeof buf - 1)
/* Test of splitting a double into fraction and mantissa.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "printf-frexp.h"
#include <float.h>
-#include <stdio.h>
-#include <stdlib.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static double
my_ldexp (double x, int d)
/* Test of splitting a 'long double' into fraction and mantissa.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "printf-frexpl.h"
#include <float.h>
-#include <stdio.h>
-#include <stdlib.h>
#include "fpucw.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* On MIPS IRIX machines, LDBL_MIN_EXP is -1021, but the smallest reliable
exponent for 'long double' is -964. Similarly, on PowerPC machines,
/* Test of POSIX compatible printf() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdio.h>
+#include "signature.h"
+SIGNATURE_CHECK (printf, int, (char const *, ...));
+
#include <stddef.h>
#include <stdint.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-printf-posix.h"
/* Test of POSIX compatible vsprintf() and sprintf() functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of POSIX compatible printf() function.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test the priv-set module.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Written by David Bartley <dtbartle@csclub.uwaterloo.ca>, 2007. */
#include <config.h>
+
#include "priv-set.h"
#if HAVE_GETPPRIV
# include <priv.h>
#endif
#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <errno.h>
#include <sys/types.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (void)
/* Test of pty.h and openpty/forkpty functions.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <pty.h>
+#include "signature.h"
+SIGNATURE_CHECK (forkpty, int, (int *, char *, struct termios *,
+ struct winsize *));
+SIGNATURE_CHECK (openpty, int, (int *, int *, char *, struct termios *,
+ struct winsize *));
+
#include <stdio.h>
int
/* Test of quotearg family of functions.
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <locale.h>
#include <stdbool.h>
#include <stdint.h>
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "progname.h"
#include "gettext.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
struct result_strings {
char const *str1; /* Translation of "". */
}
int
-main (int argc _UNUSED_PARAMETER_, char *argv[])
+main (int argc _GL_UNUSED, char *argv[])
{
int i;
bool ascii_only = MB_CUR_MAX == 1 && !isprint ((unsigned char) LQ[0]);
/* Test random_r.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
+
#include <stdlib.h>
-#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (srandom_r, int, (unsigned int, struct random_data *));
+SIGNATURE_CHECK (initstate_r, int, (unsigned int, char *, size_t,
+ struct random_data *));
+SIGNATURE_CHECK (setstate_r, int, (char *, struct random_data *));
+SIGNATURE_CHECK (random_r, int, (struct random_data *, int32_t *));
+
#include <time.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
#include <string.h>
-#include <stdio.h>
+#include "signature.h"
+SIGNATURE_CHECK (rawmemchr, void *, (void const *, int));
+
#include <stdlib.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* Calculating void * + int is not portable, so this wrapper converts
to char * to make the tests easier to write. */
/* Test of sequential list data type implementation.
- Copyright (C) 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 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 "gl_rbtree_list.h"
-#include <stdio.h>
#include <stdlib.h>
#include "gl_array_list.h"
#include "progname.h"
+#include "macros.h"
extern void gl_rbtree_list_check_invariants (gl_list_t list);
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o"
};
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
#define RANDOM(n) (rand () % (n))
#define RANDOM_OBJECT() objects[RANDOM (SIZEOF (objects))]
contents[i] = RANDOM_OBJECT ();
/* Create list1. */
- list1 = gl_list_create (GL_ARRAY_LIST, NULL, NULL, NULL, true,
- initial_size, contents);
+ list1 = gl_list_nx_create (GL_ARRAY_LIST, NULL, NULL, NULL, true,
+ initial_size, contents);
+ ASSERT (list1 != NULL);
/* Create list2. */
- list2 = gl_list_create_empty (GL_RBTREE_LIST, NULL, NULL, NULL, true);
+ list2 = gl_list_nx_create_empty (GL_RBTREE_LIST, NULL, NULL, NULL, true);
+ ASSERT (list2 != NULL);
for (i = 0; i < initial_size; i++)
- gl_list_add_last (list2, contents[i]);
+ ASSERT (gl_list_nx_add_last (list2, contents[i]) != NULL);
/* Create list3. */
- list3 = gl_list_create (GL_RBTREE_LIST, NULL, NULL, NULL, true,
- initial_size, contents);
+ list3 = gl_list_nx_create (GL_RBTREE_LIST, NULL, NULL, NULL, true,
+ initial_size, contents);
+ ASSERT (list3 != NULL);
check_all (list1, list2, list3);
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_set_at (list1, index, obj);
+ node1 = gl_list_nx_set_at (list1, index, obj);
+ ASSERT (node1 != NULL);
ASSERT (gl_list_get_at (list1, index) == obj);
ASSERT (gl_list_node_value (list1, node1) == obj);
- node2 = gl_list_set_at (list2, index, obj);
+ node2 = gl_list_nx_set_at (list2, index, obj);
+ ASSERT (node2 != NULL);
ASSERT (gl_list_get_at (list2, index) == obj);
ASSERT (gl_list_node_value (list2, node2) == obj);
- node3 = gl_list_set_at (list3, index, obj);
+ node3 = gl_list_nx_set_at (list3, index, obj);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_get_at (list3, index) == obj);
ASSERT (gl_list_node_value (list3, node3) == obj);
{
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_add_first (list1, obj);
- node2 = gl_list_add_first (list2, obj);
- node3 = gl_list_add_first (list3, obj);
+ node1 = gl_list_nx_add_first (list1, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_first (list2, obj);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_first (list3, obj);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_node_value (list1, node1) == obj);
ASSERT (gl_list_node_value (list2, node2) == obj);
ASSERT (gl_list_node_value (list3, node3) == obj);
{
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_add_last (list1, obj);
- node2 = gl_list_add_last (list2, obj);
- node3 = gl_list_add_last (list3, obj);
+ node1 = gl_list_nx_add_last (list1, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_last (list2, obj);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_last (list3, obj);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_node_value (list1, node1) == obj);
ASSERT (gl_list_node_value (list2, node2) == obj);
ASSERT (gl_list_node_value (list3, node3) == obj);
const char *obj1 = RANDOM_OBJECT ();
const char *obj2 = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_add_first (list1, obj2);
- node1 = gl_list_add_before (list1, node1, obj0);
- node1 = gl_list_add_after (list1, node1, obj1);
- node2 = gl_list_add_first (list2, obj2);
- node2 = gl_list_add_before (list2, node2, obj0);
- node2 = gl_list_add_after (list2, node2, obj1);
- node3 = gl_list_add_first (list3, obj2);
- node3 = gl_list_add_before (list3, node3, obj0);
- node3 = gl_list_add_after (list3, node3, obj1);
+ node1 = gl_list_nx_add_first (list1, obj2);
+ ASSERT (node1 != NULL);
+ node1 = gl_list_nx_add_before (list1, node1, obj0);
+ ASSERT (node1 != NULL);
+ node1 = gl_list_nx_add_after (list1, node1, obj1);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_first (list2, obj2);
+ ASSERT (node2 != NULL);
+ node2 = gl_list_nx_add_before (list2, node2, obj0);
+ ASSERT (node2 != NULL);
+ node2 = gl_list_nx_add_after (list2, node2, obj1);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_first (list3, obj2);
+ ASSERT (node3 != NULL);
+ node3 = gl_list_nx_add_before (list3, node3, obj0);
+ ASSERT (node3 != NULL);
+ node3 = gl_list_nx_add_after (list3, node3, obj1);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_node_value (list1, node1) == obj1);
ASSERT (gl_list_node_value (list2, node2) == obj1);
ASSERT (gl_list_node_value (list3, node3) == obj1);
size_t index = RANDOM (gl_list_size (list1) + 1);
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_add_at (list1, index, obj);
- node2 = gl_list_add_at (list2, index, obj);
- node3 = gl_list_add_at (list3, index, obj);
+ node1 = gl_list_nx_add_at (list1, index, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_at (list2, index, obj);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_at (list3, index, obj);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_get_at (list1, index) == obj);
ASSERT (gl_list_node_value (list1, node1) == obj);
ASSERT (gl_list_get_at (list2, index) == obj);
/* Test of ordered set data type implementation.
- Copyright (C) 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 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 "gl_rbtree_oset.h"
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "gl_array_oset.h"
#include "progname.h"
+#include "macros.h"
extern void gl_rbtree_oset_check_invariants (gl_oset_t set);
"p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "<", ">", "[", "]"
};
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
#define RANDOM(n) (rand () % (n))
#define RANDOM_OBJECT() objects[RANDOM (SIZEOF (objects))]
unsigned int repeat;
/* Create set1. */
- set1 = gl_oset_create_empty (GL_ARRAY_OSET, (gl_setelement_compar_fn) strcmp, NULL);
+ set1 = gl_oset_nx_create_empty (GL_ARRAY_OSET, (gl_setelement_compar_fn) strcmp, NULL);
+ ASSERT (set1 != NULL);
/* Create set2. */
- set2 = gl_oset_create_empty (GL_RBTREE_OSET, (gl_setelement_compar_fn) strcmp, NULL);
+ set2 = gl_oset_nx_create_empty (GL_RBTREE_OSET, (gl_setelement_compar_fn) strcmp, NULL);
+ ASSERT (set2 != NULL);
check_all (set1, set2);
for (i = 0; i < initial_size; i++)
{
const char *obj = RANDOM_OBJECT ();
- ASSERT (gl_oset_add (set1, obj) == gl_oset_add (set2, obj));
+ ASSERT (gl_oset_nx_add (set1, obj) == gl_oset_nx_add (set2, obj));
check_all (set1, set2);
}
case 1:
{
const char *obj = RANDOM_OBJECT ();
- ASSERT (gl_oset_add (set1, obj) == gl_oset_add (set2, obj));
+ ASSERT (gl_oset_nx_add (set1, obj) == gl_oset_nx_add (set2, obj));
}
break;
case 2:
/* Test of sequential list data type implementation.
- Copyright (C) 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 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 "gl_rbtreehash_list.h"
#include <limits.h>
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "gl_array_list.h"
#include "progname.h"
+#include "macros.h"
extern void gl_rbtreehash_list_check_invariants (gl_list_t list);
return h;
}
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
#define RANDOM(n) (rand () % (n))
#define RANDOM_OBJECT() objects[RANDOM (SIZEOF (objects))]
contents[i] = RANDOM_OBJECT ();
/* Create list1. */
- list1 = gl_list_create (GL_ARRAY_LIST,
- string_equals, string_hash, NULL, true,
- initial_size, contents);
+ list1 = gl_list_nx_create (GL_ARRAY_LIST,
+ string_equals, string_hash, NULL, true,
+ initial_size, contents);
+ ASSERT (list1 != NULL);
/* Create list2. */
- list2 = gl_list_create_empty (GL_RBTREEHASH_LIST,
- string_equals, string_hash, NULL, true);
+ list2 = gl_list_nx_create_empty (GL_RBTREEHASH_LIST,
+ string_equals, string_hash, NULL, true);
+ ASSERT (list2 != NULL);
for (i = 0; i < initial_size; i++)
- gl_list_add_last (list2, contents[i]);
+ ASSERT (gl_list_nx_add_last (list2, contents[i]) != NULL);
/* Create list3. */
- list3 = gl_list_create (GL_RBTREEHASH_LIST,
- string_equals, string_hash, NULL, true,
- initial_size, contents);
+ list3 = gl_list_nx_create (GL_RBTREEHASH_LIST,
+ string_equals, string_hash, NULL, true,
+ initial_size, contents);
+ ASSERT (list3 != NULL);
check_all (list1, list2, list3);
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_set_at (list1, index, obj);
+ node1 = gl_list_nx_set_at (list1, index, obj);
+ ASSERT (node1 != NULL);
ASSERT (gl_list_get_at (list1, index) == obj);
ASSERT (gl_list_node_value (list1, node1) == obj);
- node2 = gl_list_set_at (list2, index, obj);
+ node2 = gl_list_nx_set_at (list2, index, obj);
+ ASSERT (node2 != NULL);
ASSERT (gl_list_get_at (list2, index) == obj);
ASSERT (gl_list_node_value (list2, node2) == obj);
- node3 = gl_list_set_at (list3, index, obj);
+ node3 = gl_list_nx_set_at (list3, index, obj);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_get_at (list3, index) == obj);
ASSERT (gl_list_node_value (list3, node3) == obj);
{
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_add_first (list1, obj);
- node2 = gl_list_add_first (list2, obj);
- node3 = gl_list_add_first (list3, obj);
+ node1 = gl_list_nx_add_first (list1, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_first (list2, obj);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_first (list3, obj);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_node_value (list1, node1) == obj);
ASSERT (gl_list_node_value (list2, node2) == obj);
ASSERT (gl_list_node_value (list3, node3) == obj);
{
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_add_last (list1, obj);
- node2 = gl_list_add_last (list2, obj);
- node3 = gl_list_add_last (list3, obj);
+ node1 = gl_list_nx_add_last (list1, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_last (list2, obj);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_last (list3, obj);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_node_value (list1, node1) == obj);
ASSERT (gl_list_node_value (list2, node2) == obj);
ASSERT (gl_list_node_value (list3, node3) == obj);
const char *obj1 = RANDOM_OBJECT ();
const char *obj2 = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_add_first (list1, obj2);
- node1 = gl_list_add_before (list1, node1, obj0);
- node1 = gl_list_add_after (list1, node1, obj1);
- node2 = gl_list_add_first (list2, obj2);
- node2 = gl_list_add_before (list2, node2, obj0);
- node2 = gl_list_add_after (list2, node2, obj1);
- node3 = gl_list_add_first (list3, obj2);
- node3 = gl_list_add_before (list3, node3, obj0);
- node3 = gl_list_add_after (list3, node3, obj1);
+ node1 = gl_list_nx_add_first (list1, obj2);
+ ASSERT (node1 != NULL);
+ node1 = gl_list_nx_add_before (list1, node1, obj0);
+ ASSERT (node1 != NULL);
+ node1 = gl_list_nx_add_after (list1, node1, obj1);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_first (list2, obj2);
+ ASSERT (node2 != NULL);
+ node2 = gl_list_nx_add_before (list2, node2, obj0);
+ ASSERT (node2 != NULL);
+ node2 = gl_list_nx_add_after (list2, node2, obj1);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_first (list3, obj2);
+ ASSERT (node3 != NULL);
+ node3 = gl_list_nx_add_before (list3, node3, obj0);
+ ASSERT (node3 != NULL);
+ node3 = gl_list_nx_add_after (list3, node3, obj1);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_node_value (list1, node1) == obj1);
ASSERT (gl_list_node_value (list2, node2) == obj1);
ASSERT (gl_list_node_value (list3, node3) == obj1);
size_t index = RANDOM (gl_list_size (list1) + 1);
const char *obj = RANDOM_OBJECT ();
gl_list_node_t node1, node2, node3;
- node1 = gl_list_add_at (list1, index, obj);
- node2 = gl_list_add_at (list2, index, obj);
- node3 = gl_list_add_at (list3, index, obj);
+ node1 = gl_list_nx_add_at (list1, index, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_at (list2, index, obj);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_at (list3, index, obj);
+ ASSERT (node3 != NULL);
ASSERT (gl_list_get_at (list1, index) == obj);
ASSERT (gl_list_node_value (list1, node1) == obj);
ASSERT (gl_list_get_at (list2, index) == obj);
/* Tests of readlink.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <unistd.h>
+#include "signature.h"
+SIGNATURE_CHECK (readlink, ssize_t, (char const *, char *, size_t));
+
#include <fcntl.h>
#include <errno.h>
#include <stdbool.h>
#include <string.h>
#include <sys/stat.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-readlink.t"
main (void)
{
/* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
return test_readlink (readlink, true);
}
/* Tests of readlink.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Tests of remove.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdio.h>
+#include "signature.h"
+SIGNATURE_CHECK (remove, int, (char const *));
+
#include <fcntl.h>
#include <errno.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-remove.t"
main (void)
{
/* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
/* Setup. */
ASSERT (mkdir (BASE "dir", 0700) == 0);
/* Test of rename() function.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
#include <config.h>
-#include <unistd.h>
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (rename, int, (char const *, char const *));
#include <errno.h>
#include <fcntl.h>
#include <stdbool.h>
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-rename.t"
main (void)
{
/* Remove any garbage left from previous partial runs. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
return test_rename (rename, true);
}
/* Test of rename() function.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
/* Tests of renameat.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdio.h>
+#include "signature.h"
+SIGNATURE_CHECK (renameat, int, (int, char const *, int, char const *));
+
#include <fcntl.h>
#include <errno.h>
#include <stdbool.h>
#include "filenamecat.h"
#include "xgetcwd.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-renameat.t"
int result;
/* Clean up any trash from prior testsuite runs. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
/* Test basic rename functionality, using current directory. */
result = test_rename (do_rename, false);
/* Tests of rmdir.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <unistd.h>
+#include "signature.h"
+SIGNATURE_CHECK (rmdir, int, (char const *));
+
#include <fcntl.h>
#include <errno.h>
#include <stdbool.h>
#include <stdlib.h>
#include <sys/stat.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-rmdir.t"
int
main (void)
{
+ /* Remove any leftovers from a previous partial run. */
+ system ("rm -rf " BASE "*");
+
return test_rmdir_func (rmdir, true);
}
/* Tests of rmdir.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
static int
test_rmdir_func (int (*func) (char const *name), bool print)
{
- /* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
-
/* Setup. */
ASSERT (mkdir (BASE "dir", 0700) == 0);
ASSERT (close (creat (BASE "dir/file", 0600)) == 0);
/* Test of rounding to nearest, breaking ties away from zero.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include "signature.h"
+SIGNATURE_CHECK (round, double, (double));
#include "isnand-nolibm.h"
#include "nan.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
So we use -zero instead. */
/* Test of rounding to nearest, breaking ties away from zero.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of rounding to nearest, breaking ties away from zero.
- Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include "signature.h"
+SIGNATURE_CHECK (roundf, float, (float));
#include "isnanf-nolibm.h"
#include "nan.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0f.
So we use -zero instead. */
/* Test of rounding to nearest, breaking ties away from zero.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <math.h>
+#include "signature.h"
+SIGNATURE_CHECK (roundl, long double, (long double));
+
#include <float.h>
-#include <stdio.h>
-#include <stdlib.h>
#include "fpucw.h"
#include "isnanl-nolibm.h"
#include "nan.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
So we use minus_zero instead.
/*
* Test the safe-alloc macros
*
- * Copyright (C) 2009 Free Software Foundation, Inc.
+ * Copyright (C) 2009, 2010 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
+ * version 3.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
#include "safe-alloc.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test whether two files have the same ACLs.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "progname.h"
#include "read-file.h"
#include "xalloc.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (int argc, char *argv[])
/* Test of <sched.h> substitute.
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <search.h> substitute.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of select() substitute, reading or writing from a given file descriptor.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of select() substitute, reading from stdin.
- Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of select() substitute.
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <sys/select.h>
+#include "signature.h"
+SIGNATURE_CHECK (select, int, (int, fd_set *, fd_set *, fd_set *,
+ struct timeval *));
+/* The following may be macros without underlying functions, so only
+ check signature if they are not macros. */
+#ifndef FD_CLR
+SIGNATURE_CHECK (FD_CLR, void, (int, fd_set *));
+#endif
+#ifndef FD_ISSET
+SIGNATURE_CHECK (FD_ISSET, void, (int, fd_set *));
+#endif
+#ifndef FD_SET
+SIGNATURE_CHECK (FD_SET, int, (int, fd_set *));
+#endif
+#ifndef FD_ZERO
+SIGNATURE_CHECK (FD_ZERO, void, (fd_set *));
+#endif
+
#include <stdio.h>
#include <string.h>
#include <netinet/in.h>
/* Test of setting an ACL equivalent to a mode.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "acl.h"
-#include <stdio.h>
#include <stdlib.h>
#include "progname.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (int argc, char *argv[])
/* Tests of setenv.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdlib.h>
+#include "signature.h"
+SIGNATURE_CHECK (setenv, int, (char const *, char const *, int));
+
#include <errno.h>
-#include <stdio.h>
#include <string.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (void)
errno = 0;
ASSERT (setenv ("a=b", "", 0) == -1);
ASSERT (errno == EINVAL);
+#if 0
+ /* glibc and gnulib's implementation guarantee this, but POSIX no
+ longer requires it: http://austingroupbugs.net/view.php?id=185 */
errno = 0;
ASSERT (setenv (NULL, "", 0) == -1);
ASSERT (errno == EINVAL);
+#endif
return 0;
}
/*
- * Copyright (C) 2005, 2008, 2009 Free Software Foundation, Inc.
+ * Copyright (C) 2005, 2008, 2009, 2010 Free Software Foundation, Inc.
* Written by Simon Josefsson
*
* This program is free software: you can redistribute it and/or modify
/* Test of sigaction() function.
- Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- signal (SIGABRT, SIG_DFL); \
- abort (); \
- } \
- } \
- while (0)
+#include "signature.h"
+SIGNATURE_CHECK (sigaction, int, (int, struct sigaction const *,
+ struct sigaction *));
+
+#include <stddef.h>
+
+#include "macros.h"
#ifndef SA_NOCLDSTOP
# define SA_NOCLDSTOP 0
/* Test of <signal.h> substitute.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <signal.h>
-volatile sig_atomic_t s;
+/* Check for required types. */
+struct
+{
+ size_t a;
+ uid_t b;
+ volatile sig_atomic_t c;
+ sigset_t d;
+ pid_t e;
+#if 0
+ /* Not guaranteed by gnulib. */
+ pthread_t f;
+ struct timespec g;
+#endif
+} s;
int
main (void)
{
- return s;
+ switch (0)
+ {
+ /* The following are guaranteed by C. */
+ case 0:
+ case SIGABRT:
+ case SIGFPE:
+ case SIGILL:
+ case SIGINT:
+ case SIGSEGV:
+ case SIGTERM:
+ /* The following is guaranteed by gnulib. */
+#if GNULIB_SIGPIPE || defined SIGPIPE
+ case SIGPIPE:
+#endif
+ /* Ensure no conflict with other standardized names. */
+#ifdef SIGALRM
+ case SIGALRM:
+#endif
+#ifdef SIGBUS
+ case SIGBUS:
+#endif
+#ifdef SIGCHLD
+ case SIGCHLD:
+#endif
+#ifdef SIGCONT
+ case SIGCONT:
+#endif
+#ifdef SIGHUP
+ case SIGHUP:
+#endif
+#ifdef SIGKILL
+ case SIGKILL:
+#endif
+#ifdef SIGQUIT
+ case SIGQUIT:
+#endif
+#ifdef SIGSTOP
+ case SIGSTOP:
+#endif
+#ifdef SIGTSTP
+ case SIGTSTP:
+#endif
+#ifdef SIGTTIN
+ case SIGTTIN:
+#endif
+#ifdef SIGTTOU
+ case SIGTTOU:
+#endif
+#ifdef SIGUSR1
+ case SIGUSR1:
+#endif
+#ifdef SIGUSR2
+ case SIGUSR2:
+#endif
+#ifdef SIGSYS
+ case SIGSYS:
+#endif
+#ifdef SIGTRAP
+ case SIGTRAP:
+#endif
+#ifdef SIGURG
+ case SIGURG:
+#endif
+#ifdef SIGVTALRM
+ case SIGVTALRM:
+#endif
+#ifdef SIGXCPU
+ case SIGXCPU:
+#endif
+#ifdef SIGXFSZ
+ case SIGXFSZ:
+#endif
+ /* SIGRTMIN and SIGRTMAX need not be compile-time constants. */
+#if 0
+# ifdef SIGRTMIN
+ case SIGRTMIN:
+# endif
+# ifdef SIGRTMAX
+ case SIGRTMAX:
+# endif
+#endif
+ ;
+ }
+ return s.a + s.b + s.c + s.e;
}
/* Test of signbit() substitute.
- Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <math.h>
+/* signbit must be a macro. */
+#ifndef signbit
+# error missing declaration
+#endif
+
#include <float.h>
#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+
+#include "macros.h"
float zerof = 0.0f;
double zerod = 0.0;
/* Test of SIGPIPE handling.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of sleep() function.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <unistd.h>
+#include "signature.h"
+SIGNATURE_CHECK (sleep, unsigned int, (unsigned int));
+
#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#if HAVE_DECL_ALARM
static void
#endif
int
-main()
+main (void)
{
ASSERT (sleep (1) <= 1);
/* Test of POSIX compatible snprintf() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdlib.h>
#include <string.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-snprintf-posix.h"
/* Test of POSIX compatible vsnprintf() and snprintf() functions.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of snprintf() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdio.h>
-#include <stdlib.h>
+#include "signature.h"
+SIGNATURE_CHECK (snprintf, int, (char *, size_t, char const *, ...));
+
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (int argc, char *argv[])
--- /dev/null
+/* Test of <spawn.h> substitute.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <spawn.h>
+
+/* Check for existence of required types. */
+struct check
+{
+ posix_spawnattr_t a;
+ posix_spawn_file_actions_t b;
+ mode_t c;
+ pid_t d;
+ sigset_t e;
+} s;
+
+/* struct sched_param is allowed to be an incomplete type without
+ <sched.h>, but must have a forward declaration to avoid a
+ compilation error in the following usage. */
+extern void f (struct sched_param *g);
+#include <sched.h>
+extern void f (struct sched_param *g);
+
+int
+main (void)
+{
+ switch (0)
+ {
+ case POSIX_SPAWN_RESETIDS:
+ case POSIX_SPAWN_SETPGROUP:
+ case POSIX_SPAWN_SETSIGDEF:
+ case POSIX_SPAWN_SETSIGMASK:
+ case POSIX_SPAWN_SETSCHEDPARAM:
+ case POSIX_SPAWN_SETSCHEDULER:
+ ;
+ }
+ return s.c + s.d;
+}
/* Test of POSIX compatible sprintf() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdio.h>
+#include "signature.h"
+SIGNATURE_CHECK (sprintf, int, (char *, char const *, ...));
+
#include <float.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-sprintf-posix.h"
/* Test of POSIX compatible vsprintf() and sprintf() functions.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <stat-time.h>.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <fcntl.h>
#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <sys/stat.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
enum { NFILES = 4 };
/* Tests of stat.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <sys/stat.h>
+/* Caution: stat may be a function-like macro. Although this
+ signature check must pass, it may be the signature of the real (and
+ broken) stat rather than rpl_stat. Most code should not use the
+ address of stat. */
+#include "signature.h"
+SIGNATURE_CHECK (stat, int, (char const *, struct stat *));
+
#include <fcntl.h>
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
-#include <stdlib.h>
#include <unistd.h>
#include "pathmax.h"
#include "same-inode.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-stat.t"
/* Tests of stat.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <stdbool.h> substitute.
- Copyright (C) 2002-2007 Free Software Foundation, Inc.
+ Copyright (C) 2002-2007, 2009-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <stddef.h> substitute.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <stdint.h> substitute.
- Copyright (C) 2006-2009 Free Software Foundation, Inc.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <stdio.h> substitute.
- Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <stdlib.h> substitute.
- Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test the system defined function stpncpy().
- Copyright (C) 2003, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
#include <string.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (stpncpy, char *, (char *, char const *, size_t));
+
#include <stdio.h>
int
/* Test of case-insensitive searching in a string.
- Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <string.h>
+#include "signature.h"
+SIGNATURE_CHECK (strcasestr, char *, (char const *, char const *));
+
#include <signal.h>
-#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
#include <string.h>
-#include <stdio.h>
+#include "signature.h"
+SIGNATURE_CHECK (strchrnul, char *, (char const *, int));
+
#include <stdlib.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (void)
/* Test of strerror() function.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "signature.h"
+SIGNATURE_CHECK (strerror, char *, (int));
+
+#include <errno.h>
+
+#include "macros.h"
int
main (void)
/* Test of character set conversion.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#endif
#include <errno.h>
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of character set conversion with error handling.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#endif
#include <errno.h>
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* Magic number for detecting bounds violations. */
#define MAGIC 0x1983EFF1
/* Test of character set conversion with error handling and autodetection.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#endif
#include <errno.h>
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* Magic number for detecting bounds violations. */
#define MAGIC 0x1983EFF1
/* Test of <string.h> substitute.
- Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <strings.h> substitute.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of strsignal() function.
- Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "signature.h"
+SIGNATURE_CHECK (strsignal, char *, (int));
+
+#include <signal.h>
+
+#include "macros.h"
#if HAVE_DECL_SYS_SIGLIST
# define ASSERT_DESCRIPTION(got, expect)
#include <string.h>
+#include "signature.h"
+SIGNATURE_CHECK (strstr, char *, (char const *, char const *));
+
#include <signal.h>
-#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "zerosize-ptr.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (int argc, char *argv[])
#include <stdlib.h>
+#include "signature.h"
+SIGNATURE_CHECK (strtod, double, (char const *, char **));
+
#include <errno.h>
#include <float.h>
#include <math.h>
-#include <stdio.h>
#include <string.h>
#include "isnand-nolibm.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- /* FIXME abort ();*/status = 1; \
- } \
- } \
- while (0)
+#include "macros.h"
/* Avoid requiring -lm just for fabs. */
#define FABS(d) ((d) < 0.0 ? -(d) : (d))
/* Test of strverscmp() function.
- Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "signature.h"
+SIGNATURE_CHECK (strverscmp, int, (const char *, const char *));
+
+#include "macros.h"
int
main (void)
/* Tests of symlink.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <unistd.h>
+#include "signature.h"
+SIGNATURE_CHECK (symlink, int, (char const *, char const *));
+
#include <fcntl.h>
#include <errno.h>
#include <stdbool.h>
#include <stdlib.h>
#include <sys/stat.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-symlink.t"
main (void)
{
/* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
return test_symlink (symlink, true);
}
/* Tests of symlink.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Tests of symlinkat and readlinkat.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <unistd.h>
+#include "signature.h"
+SIGNATURE_CHECK (symlinkat, int, (char const *, int, char const *));
+SIGNATURE_CHECK (readlinkat, ssize_t, (int, char const *, char *, size_t));
+
#include <fcntl.h>
#include <errno.h>
#include <stdbool.h>
#include <string.h>
#include <sys/stat.h>
+#include "macros.h"
+
#ifndef HAVE_SYMLINK
# define HAVE_SYMLINK 0
#endif
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
-
#define BASE "test-symlinkat.t"
#include "test-readlink.h"
int result;
/* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
/* Perform same checks as counterpart functions. */
result = test_readlink (do_readlink, false);
--- /dev/null
+/* Test of <sys/file.h> substitute.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <sys/file.h>
+
+int
+main (void)
+{
+ switch (0)
+ {
+ case LOCK_SH:
+ case LOCK_EX:
+ case LOCK_NB:
+ case LOCK_UN:
+ ;
+ }
+ return 0;
+}
--- /dev/null
+/* Test of <sys/ioctl.h> substitute.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <sys/ioctl.h>
+
+int
+main (void)
+{
+ return 0;
+}
/* Test of <sys/select.h> substitute.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <sys/socket.h> substitute.
- Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <sys/stat.h> substitute.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <sys/time.h> substitute.
- Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <sys/times.h> substitute.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <sys/times.h>
-struct tms tms;
+static struct tms tms;
int
main (void)
{
- return 0;
+ clock_t t = tms.tms_utime + tms.tms_stime + tms.tms_cutime + tms.tms_cstime;
+ return t;
}
/* Test of <sys/utsname.h> substitute.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
--- /dev/null
+/* Test of <sys/wait.h> substitute.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <sys/wait.h>
+
+/* Check for existence of required types. */
+static pid_t a;
+
+int
+main (void)
+{
+ return a;
+}
/* Test of <sysexits.h> substitute.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of <time.h> substitute.
- Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of times function.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
#include <sys/times.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (times, clock_t, (struct tms *));
+
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
/* Test of thread-local storage in multithreaded situations.
- Copyright (C) 2005, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of rounding towards zero.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include "signature.h"
+SIGNATURE_CHECK (trunc, double, (double));
#include "isnand-nolibm.h"
#include "nan.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
So we use -zero instead. */
/* Test of rounding towards zero.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
-#include <stdlib.h>
#include "isnand-nolibm.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* The reference implementation, taken from lib/trunc.c. */
/* Test of rounding towards zero.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include "signature.h"
+SIGNATURE_CHECK (truncf, float, (float));
#include "isnanf-nolibm.h"
#include "nan.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0f.
So we use -zero instead. */
/* Test of rounding towards zero.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
-#include <stdlib.h>
#include "isnanf-nolibm.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* The reference implementation, taken from lib/trunc.c. */
/* Test of rounding towards zero.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <math.h>
+#include "signature.h"
+SIGNATURE_CHECK (truncl, long double, (long double));
+
#include <float.h>
-#include <stdio.h>
-#include <stdlib.h>
#include "fpucw.h"
#include "isnanl-nolibm.h"
#include "nan.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
So we use minus_zero instead.
/* Test program for tsearch et al.
- Copyright (C) 1997, 2000-2001, 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000-2001, 2007-2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software: you can redistribute it and/or
#include <search.h>
+#include "signature.h"
+SIGNATURE_CHECK (tdelete, void *, (void const *, void **,
+ int (*) (void const *, void const *)));
+SIGNATURE_CHECK (tfind, void *, (void const *, void * const *,
+ int (*) (void const *, void const *)));
+SIGNATURE_CHECK (tsearch, void *, (void const *, void **,
+ int (*) (void const *, void const *)));
+SIGNATURE_CHECK (twalk, void, (void const *,
+ void (*) (void const *, VISIT, int)));
+
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
/* Test of <u64.h>
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of system information.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <sys/utsname.h>
+#include "signature.h"
+SIGNATURE_CHECK (uname, int, (struct utsname *));
+
#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* This program can be called with no arguments, then it performs a unit
/* Test of <unistd.h> substitute.
- Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Tests of unlink.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <unistd.h>
+#include "signature.h"
+SIGNATURE_CHECK (unlink, int, (char const *));
+
#include <fcntl.h>
#include <errno.h>
#include <stdbool.h>
#include <sys/stat.h>
#include "unlinkdir.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-unlink.t"
int
main (void)
{
+ /* Remove any leftovers from a previous partial run. */
+ system ("rm -rf " BASE "*");
+
return test_unlink_func (unlink, true);
}
/* Tests of unlink.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
static int
test_unlink_func (int (*func) (char const *name), bool print)
{
- /* Remove any leftovers from a previous partial run. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
-
/* Setup. */
ASSERT (mkdir (BASE "dir", 0700) == 0);
ASSERT (close (creat (BASE "dir/file", 0600)) == 0);
/* Tests of unlinkat.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <unistd.h>
+#include "signature.h"
+SIGNATURE_CHECK (unlinkat, int, (int, char const *, int));
+
#include <fcntl.h>
#include <errno.h>
#include <stdbool.h>
#include <sys/stat.h>
#include "unlinkdir.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-unlinkat.t"
/* FIXME: Add tests of fd other than ".". */
int result1;
int result2;
+
+ /* Remove any leftovers from a previous partial run. */
+ system ("rm -rf " BASE "*");
+
result1 = test_rmdir_func (rmdirat, false);
result2 = test_unlink_func (unlinker, false);
ASSERT (result1 == result2);
/* Tests of unsetenv.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdlib.h>
+#include "signature.h"
+SIGNATURE_CHECK (unsetenv, int, (char const *));
+
#include <errno.h>
-#include <stdio.h>
#include <string.h>
#include <unistd.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (void)
char entry[] = "b=2";
/* Test removal when multiple entries present. */
- ASSERT (putenv ("a=1") == 0);
+ ASSERT (putenv ((char *) "a=1") == 0);
ASSERT (putenv (entry) == 0);
entry[0] = 'a'; /* Unspecified what getenv("a") would be at this point. */
ASSERT (unsetenv ("a") == 0); /* Both entries will be removed. */
errno = 0;
ASSERT (unsetenv ("a=b") == -1);
ASSERT (errno == EINVAL);
+#if 0
+ /* glibc and gnulib's implementation guarantee this, but POSIX no
+ longer requires it: http://austingroupbugs.net/view.php?id=185 */
errno = 0;
ASSERT (unsetenv (NULL) == -1);
ASSERT (errno == EINVAL);
+#endif
return 0;
}
#!/bin/sh
# Test suite for update-copyright.
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009-2010 Free Software Foundation, Inc.
# This file is part of the GNUlib Library.
#
# This program is free software: you can redistribute it and/or modify
exit 77
}
+# Do not let a different envvar setting perturb results.
+UPDATE_COPYRIGHT_MAX_LINE_LENGTH=72
+export UPDATE_COPYRIGHT_MAX_LINE_LENGTH
+
## ----------------------------- ##
## Examples from documentation. ##
## ----------------------------- ##
/* Test of usleep() function.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include "signature.h"
+SIGNATURE_CHECK (usleep, int, (useconds_t));
+
#include <time.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main(void)
/* Test of file timestamp modification functions.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
#ifndef GL_TEST_UTIMENS_COMMON
# define GL_TEST_UTIMENS_COMMON
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
+# include <fcntl.h>
+# include <errno.h>
+# include <string.h>
+# include <unistd.h>
-#include "stat-time.h"
-#include "timespec.h"
-#include "utimecmp.h"
+/* Gnulib modules. */
+# include "stat-time.h"
+# include "timespec.h"
+# include "utimecmp.h"
+
+/* Gnulib test header. */
+# include "nap.h"
enum {
BILLION = 1000 * 1000 * 1000,
: 0)
};
-/* Sleep long enough to cross a timestamp quantization boundary on
- most known systems with subsecond timestamp resolution. For
- example, ext4 has a quantization of 10 milliseconds, but a
- resolution of 1 nanosecond. Likewise, NTFS has a quantization as
- slow as 15.25 milliseconds, but a resolution of 100 nanoseconds.
- This is necessary on systems where creat or utimens with NULL
- rounds down to the quantization boundary, but where gettime and
- hence utimensat can inject timestamps between quantization
- boundaries. By ensuring we cross a boundary, we are less likely to
- confuse utimecmp for two times that would round to the same
- quantization boundary but are distinct based on resolution. */
-static void
-nap (void)
-{
- /* Systems that lack usleep also lack subsecond timestamps, and have
- a quantization boundary equal to the resolution. Our usage of
- utimecmp allows equality, so no need to waste 980 milliseconds
- if the replacement usleep rounds to 1 second. */
-#if HAVE_USLEEP
- usleep (20 * 1000); /* 20 milliseconds. */
-#endif
-}
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+/* Skip ctime tests on native Windows, since it is either a copy of
+ mtime or birth time (depending on the file system), rather than a
+ properly tracked change time. */
+# define check_ctime 0
+# else
+# define check_ctime 1
+# endif
#endif /* GL_TEST_UTIMENS_COMMON */
/* Tests of utimens.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdio.h>
#include <stdlib.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-utimens.t"
int result3; /* Skip because of no lutimens support. */
/* Clean up any trash from prior testsuite runs. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
result1 = test_utimens (utimens, true);
ASSERT (test_utimens (do_fdutimens, false) == result1);
/* Test of file timestamp modification functions.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
ASSERT (func (BASE "file", NULL) == 0);
ASSERT (stat (BASE "file", &st2) == 0);
ASSERT (0 <= utimecmp (BASE "file", &st2, &st1, UTIMECMP_TRUNCATE_SOURCE));
+ if (check_ctime)
+ ASSERT (st1.st_ctime < st2.st_ctime
+ || (st1.st_ctime == st2.st_ctime
+ && get_stat_ctime_ns (&st1) < get_stat_ctime_ns (&st2)));
{
/* On some NFS systems, the 'now' timestamp of creat or a NULL
timespec is determined by the server, but the 'now' timestamp
ASSERT (st2.st_mtime == Y2K);
ASSERT (0 <= get_stat_mtime_ns (&st2));
ASSERT (get_stat_mtime_ns (&st2) < BILLION);
+ if (check_ctime)
+ ASSERT (st1.st_ctime < st2.st_ctime
+ || (st1.st_ctime == st2.st_ctime
+ && get_stat_ctime_ns (&st1) < get_stat_ctime_ns (&st2)));
}
/* Play with UTIME_OMIT, UTIME_NOW. */
{
+ struct stat st3;
struct timespec ts[2] = { { BILLION, UTIME_OMIT }, { 0, UTIME_NOW } };
+ nap ();
ASSERT (func (BASE "file", ts) == 0);
- ASSERT (stat (BASE "file", &st2) == 0);
- ASSERT (st2.st_atime == Y2K);
- ASSERT (0 <= get_stat_atime_ns (&st2));
- ASSERT (get_stat_atime_ns (&st2) < BILLION / 2);
+ ASSERT (stat (BASE "file", &st3) == 0);
+ ASSERT (st3.st_atime == Y2K);
+ ASSERT (0 <= get_stat_atime_ns (&st3));
+ ASSERT (get_stat_atime_ns (&st3) < BILLION / 2);
/* See comment above about this utimecmp call. */
- ASSERT (0 <= utimecmp (BASE "file", &st2, &st1, UTIMECMP_TRUNCATE_SOURCE));
+ ASSERT (0 <= utimecmp (BASE "file", &st3, &st1, UTIMECMP_TRUNCATE_SOURCE));
+ if (check_ctime)
+ ASSERT (st2.st_ctime < st3.st_ctime
+ || (st2.st_ctime == st3.st_ctime
+ && get_stat_ctime_ns (&st2) < get_stat_ctime_ns (&st3)));
+ nap ();
+ ts[0].tv_nsec = 0;
+ ts[1].tv_nsec = UTIME_OMIT;
+ ASSERT (func (BASE "file", ts) == 0);
+ ASSERT (stat (BASE "file", &st2) == 0);
+ ASSERT (st2.st_atime == BILLION);
+ ASSERT (get_stat_atime_ns (&st2) == 0);
+ ASSERT (st3.st_mtime == st2.st_mtime);
+ ASSERT (get_stat_mtime_ns (&st3) == get_stat_mtime_ns (&st2));
+ if (check_ctime)
+ ASSERT (st3.st_ctime < st2.st_ctime
+ || (st3.st_ctime == st2.st_ctime
+ && get_stat_ctime_ns (&st3) < get_stat_ctime_ns (&st2)));
}
/* Make sure this dereferences symlinks. */
if (symlink (BASE "file", BASE "link"))
{
- ASSERT (unlink (BASE "file") == 0);
+ ASSERT (unlink (BASE "file") == 0);
if (print)
fputs ("skipping test: symlinks not supported on this file system\n",
stderr);
/* Tests of utimensat.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <sys/stat.h>
+#include "signature.h"
+SIGNATURE_CHECK (utimensat, int, (int, char const *, struct timespec const[2],
+ int));
+
#include <fcntl.h>
#include <errno.h>
#include <stdbool.h>
#include "stat-time.h"
#include "timespec.h"
#include "utimecmp.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define BASE "test-utimensat.t"
int fd;
/* Clean up any trash from prior testsuite runs. */
- ASSERT (system ("rm -rf " BASE "*") == 0);
+ system ("rm -rf " BASE "*");
/* Basic tests. */
result1 = test_utimens (do_utimensat, true);
/* Test of POSIX compatible vasnprintf() and asnprintf() functions.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <float.h>
#include <stdarg.h>
#include <stddef.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
+#include "macros.h"
#include "nan.h"
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
-
/* The SGI MIPS floating-point format does not distinguish 0.0 and -0.0. */
static int
have_minus_zero ()
/* Test of POSIX compatible vasnprintf() and asnprintf() functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "vasnprintf.h"
#include <locale.h>
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (int argc, char *argv[])
/* Test of vasnprintf() and asnprintf() functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "vasnprintf.h"
#include <stdarg.h>
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static char *
my_asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
/* Test of POSIX compatible vasprintf() and asprintf() functions.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdlib.h>
#include <string.h>
+#include "macros.h"
#include "nan.h"
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
-
/* The SGI MIPS floating-point format does not distinguish 0.0 and -0.0. */
static int
have_minus_zero ()
/* Test of vasprintf() and asprintf() functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdio.h>
+#include "signature.h"
+SIGNATURE_CHECK (asprintf, int, (char **, char const *, ...));
+SIGNATURE_CHECK (vasprintf, int, (char **, char const *, va_list));
+
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static int
my_asprintf (char **result, const char *format, ...)
#!/bin/sh
# Unit tests for vc-list-files
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010 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, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010 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 POSIX compatible vdprintf() function.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdio.h>
+#include "signature.h"
+SIGNATURE_CHECK (vdprintf, int, (int, char const *, va_list));
+
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-fprintf-posix.h"
/* Test the "verify" module.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test suite for version-etc.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNUlib Library.
This program is free software: you can redistribute it and/or modify
#define AUTHORS "Sergey Poznyakoff", "Eric Blake"
int
-main (int argc _UNUSED_PARAMETER_, char **argv)
+main (int argc _GL_UNUSED, char **argv)
{
set_program_name (argv[0]);
version_etc (stdout, "test-version-etc", "dummy", "0", AUTHORS,
#! /bin/sh
# Test suite for version-etc.
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 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 POSIX compatible vfprintf() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdio.h>
+#include "signature.h"
+SIGNATURE_CHECK (vfprintf, int, (FILE *, char const *, va_list));
+
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-fprintf-posix.h"
/* Test of POSIX compatible vfprintf() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdio.h>
+#include "signature.h"
+SIGNATURE_CHECK (vprintf, int, (char const *, va_list));
+
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-printf-posix.h"
/* Test of POSIX compatible vsnprintf() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdlib.h>
#include <string.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-snprintf-posix.h"
/* Test of vsnprintf() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdio.h>
+#include "signature.h"
+SIGNATURE_CHECK (vsnprintf, int, (char *, size_t, char const *, va_list));
+
#include <stdarg.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static int
my_snprintf (char *buf, int size, const char *format, ...)
/* Test of POSIX compatible vsprintf() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdio.h>
+#include "signature.h"
+SIGNATURE_CHECK (vsprintf, int, (char *, char const *, va_list));
+
#include <float.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-sprintf-posix.h"
/* Test of <wchar.h> substitute.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of conversion of wide character to multibyte character.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <wchar.h>
+#include "signature.h"
+SIGNATURE_CHECK (wcrtomb, size_t, (char *, wchar_t, mbstate_t *));
+
#include <locale.h>
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* Check the multibyte character s[0..n-1]. */
static void
/* Test of conversion of wide string to string.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <wchar.h>
+#include "signature.h"
+SIGNATURE_CHECK (wcsnrtombs, size_t, (char *, wchar_t const **, size_t, size_t,
+ mbstate_t *));
+
#include <locale.h>
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (int argc, char *argv[])
/* Test of conversion of wide string to string.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <wchar.h>
+#include "signature.h"
+SIGNATURE_CHECK (wcsrtombs, size_t, (char *, wchar_t const **, size_t,
+ mbstate_t *));
+
#include <locale.h>
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (int argc, char *argv[])
/* Test of <wctype.h> substitute.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <wctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* Check that the type wint_t is defined. */
wint_t a = 'x';
/* Test of wcwidth() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <wchar.h>
+#include "signature.h"
+SIGNATURE_CHECK (wcwidth, int, (wchar_t));
+
#include <locale.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
#include "localcharset.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of xalloc_die() function.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "progname.h"
int
-main (int argc, char **argv)
+main (int argc _GL_UNUSED, char **argv)
{
set_program_name (argv[0]);
xalloc_die ();
#!/bin/sh
# Test suite for xalloc_die.
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 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 error-checking xfprintf() function with POSIX compatible formatting.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdarg.h>
#include <stddef.h>
-#include <stdio.h>
#include <stdint.h>
-#include <stdlib.h>
#include <string.h>
#include "progname.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-fprintf-posix.h"
int
-main (int argc _UNUSED_PARAMETER_, char *argv[])
+main (int argc _GL_UNUSED, char *argv[])
{
set_program_name (argv[0]);
/* Test of xmemdup0() function.
- Copyright (C) 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "xmemdup0.h"
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "progname.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (int argc, char **argv)
/* Test of error-checking xprintf() function with POSIX compatible formatting.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "xprintf.h"
#include <stddef.h>
-#include <stdio.h>
#include <stdint.h>
-#include <stdlib.h>
#include <string.h>
#include "progname.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-printf-posix.h"
int
-main (int argc _UNUSED_PARAMETER_, char *argv[])
+main (int argc _GL_UNUSED, char *argv[])
{
set_program_name (argv[0]);
/* Test of xstrtol module.
- Copyright (C) 1995, 1996, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
- 2006, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of xvasprintf() and xasprintf() functions.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "xvasprintf.h"
#include <stdarg.h>
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "progname.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static char *
my_xasprintf (const char *format, ...)
}
int
-main (int argc _UNUSED_PARAMETER_, char *argv[])
+main (int argc _GL_UNUSED, char *argv[])
{
set_program_name (argv[0]);
/* Test of yesno module.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of case and normalization insensitive comparison of Unicode strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Test the Unicode character type functions.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Test the Unicode character type functions.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of test whether case matters for a Unicode string.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of test whether a Unicode string is already case-folded.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of test whether a Unicode string is entirely lower case.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of test whether a Unicode string is entirely title case.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of test whether a Unicode string is entirely upper case.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of language code determination.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
#include <locale.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main (int argc, char *argv[])
/* Test of single character case mapping functions.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed for c = 0x%04X\n", \
- __FILE__, __LINE__, c); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
-#define SIZEOF(a) (sizeof(a) / sizeof(a[0]))
+#include "macros.h"
/* Pair of Unicode characters. */
typedef struct { ucs4_t ch; ucs4_t value; } pair_t;
/* Test of single character case mapping functions.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test the Unicode character type functions.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase/caseprop.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed for c = 0x%04X\n", \
- __FILE__, __LINE__, c); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
-#define SIZEOF(a) (sizeof(a) / sizeof(a[0]))
+#include "macros.h"
/* Interval of Unicode characters. */
typedef struct { ucs4_t start; ucs4_t end; } interval_t;
/* Test the Unicode character type functions.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of case and normalization insensitive comparison of UTF-16 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
-#include <stdlib.h>
-
#include "uninorm.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define UNIT uint16_t
#include "test-casecmp.h"
/* Test of locale dependent, case and normalization insensitive comparison of
UTF-16 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
-#include <stdlib.h>
-
#include "uninorm.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define UNIT uint16_t
#include "test-casecmp.h"
/* Test of casefolding mapping for UTF-16 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
#include <stdlib.h>
#include "unistr.h"
#include "uninorm.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static int
check (const uint16_t *input, size_t input_length,
/* Test of test whether case matters for an UTF-16 string.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
-#include <stdlib.h>
-
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define UNIT uint16_t
#include "test-is-cased.h"
/* Test of test whether an UTF-16 string is already case-folded.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
-#include <stdlib.h>
-
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define UNIT uint16_t
#include "test-is-casefolded.h"
/* Test of test whether an UTF-16 string is entirely lower case.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
-#include <stdlib.h>
-
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define UNIT uint16_t
#include "test-is-lowercase.h"
/* Test of test whether an UTF-16 string is entirely title case.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
-#include <stdlib.h>
-
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define UNIT uint16_t
#include "test-is-titlecase.h"
/* Test of test whether an UTF-16 string is entirely upper case.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
-#include <stdlib.h>
-
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define UNIT uint16_t
#include "test-is-uppercase.h"
/* Test of lowercase mapping for UTF-16 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
#include <stdlib.h>
#include "unistr.h"
#include "uninorm.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static int
check (const uint16_t *input, size_t input_length,
/* Test of titlecase mapping for UTF-16 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
#include <stdlib.h>
#include "unistr.h"
#include "uninorm.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static int
check (const uint16_t *input, size_t input_length,
/* Test of uppercase mapping for UTF-16 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
#include <stdlib.h>
#include "unistr.h"
#include "uninorm.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static int
check (const uint16_t *input, size_t input_length,
/* Test of case and normalization insensitive comparison of UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
-#include <stdlib.h>
-
#include "uninorm.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define UNIT uint32_t
#include "test-casecmp.h"
/* Test of locale dependent, case and normalization insensitive comparison of
UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
-#include <stdlib.h>
-
#include "uninorm.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define UNIT uint32_t
#include "test-casecmp.h"
/* Test of casefolding mapping for UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
#include <stdlib.h>
#include "unistr.h"
#include "uninorm.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static int
check (const uint32_t *input, size_t input_length,
/* Test of test whether case matters for an UTF-32 string.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
-#include <stdlib.h>
-
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define UNIT uint32_t
#include "test-is-cased.h"
/* Test of test whether an UTF-32 string is already case-folded.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
-#include <stdlib.h>
-
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define UNIT uint32_t
#include "test-is-casefolded.h"
/* Test of test whether an UTF-32 string is entirely lower case.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
-#include <stdlib.h>
-
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define UNIT uint32_t
#include "test-is-lowercase.h"
/* Test of test whether an UTF-32 string is entirely title case.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
-#include <stdlib.h>
-
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define UNIT uint32_t
#include "test-is-titlecase.h"
/* Test of test whether an UTF-32 string is entirely upper case.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
-#include <stdlib.h>
-
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define UNIT uint32_t
#include "test-is-uppercase.h"
/* Test of lowercase mapping for UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
#include <stdlib.h>
#include "unistr.h"
#include "uninorm.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static int
check (const uint32_t *input, size_t input_length,
/* Test of titlecase mapping for UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
#include <stdlib.h>
#include "unistr.h"
#include "uninorm.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static int
check (const uint32_t *input, size_t input_length,
/* Test of uppercase mapping for UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
#include <stdlib.h>
#include "unistr.h"
#include "uninorm.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static int
check (const uint32_t *input, size_t input_length,
/* Test of case and normalization insensitive comparison of UTF-8 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
-#include <stdlib.h>
-
#include "uninorm.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define UNIT uint8_t
#include "test-casecmp.h"
/* Test of locale dependent, case and normalization insensitive comparison of
UTF-8 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
-#include <stdlib.h>
-
#include "uninorm.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define UNIT uint8_t
#include "test-casecmp.h"
/* Test of casefolding mapping for UTF-8 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
#include <stdlib.h>
#include "unistr.h"
#include "uninorm.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static int
check (const uint8_t *input, size_t input_length,
/* Test of test whether case matters for an UTF-8 string.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
-#include <stdlib.h>
-
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define UNIT uint8_t
#include "test-is-cased.h"
/* Test of test whether an UTF-8 string is already case-folded.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
-#include <stdlib.h>
-
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define UNIT uint8_t
#include "test-is-casefolded.h"
/* Test of test whether an UTF-8 string is entirely lower case.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
-#include <stdlib.h>
-
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define UNIT uint8_t
#include "test-is-lowercase.h"
/* Test of test whether an UTF-8 string is entirely title case.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
-#include <stdlib.h>
-
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define UNIT uint8_t
#include "test-is-titlecase.h"
/* Test of test whether an UTF-8 string is entirely upper case.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
-#include <stdlib.h>
-
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define UNIT uint8_t
#include "test-is-uppercase.h"
/* Test of lowercase mapping for UTF-8 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
#include <stdlib.h>
#include "unistr.h"
#include "uninorm.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static int
check (const uint8_t *input, size_t input_length,
/* Test of titlecase mapping for UTF-8 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
#include <stdlib.h>
#include "unistr.h"
#include "uninorm.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static int
check (const uint8_t *input, size_t input_length,
/* Test of uppercase mapping for UTF-8 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
-#include <stdio.h>
#include <stdlib.h>
#include "unistr.h"
#include "uninorm.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static int
check (const uint8_t *input, size_t input_length,
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Test the Unicode character mapping functions.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Test the Unicode character mapping functions.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Test the Unicode character mapping functions.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of case and normalization insensitive comparison of strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
#include <locale.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define UNIT char
#include "test-casecmp.h"
/* Test of locale dependent, case and normalization insensitive comparison of
strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unicase.h"
#include <locale.h>
-#include <stdio.h>
-#include <stdlib.h>
#include "uninorm.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define UNIT char
#include "test-casecmp.h"
/* Test of conversion to UTF-16 from legacy encodings.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uniconv.h"
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* Magic number for detecting bounds violations. */
#define MAGIC 0x1983EFF1
/* Test of conversion from UTF-16 to legacy encodings.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uniconv.h"
#include <errno.h>
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* Magic number for detecting bounds violations. */
#define MAGIC 0x1983EFF1
/* Test of conversion to UTF-16 from legacy encodings.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uniconv.h"
-#include <stdio.h>
#include <stdlib.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of conversion from UTF-16 to legacy encodings.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uniconv.h"
#include <errno.h>
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of conversion to UTF-32 from legacy encodings.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uniconv.h"
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* Magic number for detecting bounds violations. */
#define MAGIC 0x1983EFF1
/* Test of conversion from UTF-32 to legacy encodings.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uniconv.h"
#include <errno.h>
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* Magic number for detecting bounds violations. */
#define MAGIC 0x1983EFF1
/* Test of conversion to UTF-32 from legacy encodings.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uniconv.h"
-#include <stdio.h>
#include <stdlib.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of conversion from UTF-32 to legacy encodings.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uniconv.h"
#include <errno.h>
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of conversion to UTF-8 from legacy encodings.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uniconv.h"
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* Magic number for detecting bounds violations. */
#define MAGIC 0x1983EFF1
/* Test of conversion from UTF-8 to legacy encodings.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uniconv.h"
#include <errno.h>
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* Magic number for detecting bounds violations. */
#define MAGIC 0x1983EFF1
/* Test of conversion to UTF-8 from legacy encodings.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uniconv.h"
-#include <stdio.h>
#include <stdlib.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of conversion from UTF-8 to legacy encodings.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uniconv.h"
#include <errno.h>
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test the Unicode character type functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
This 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 "unictype.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test the Unicode character type functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
This 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 "unictype.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test the Unicode character type functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
This 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 "unictype.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test the Unicode character type functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
This 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 "unictype.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test the Unicode character type functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
This 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 "unictype.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test the Unicode character type functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
This 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 "unictype.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test the Unicode character type functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
This 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 "unictype.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test the Unicode character type functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
This 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 "unictype.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test the Unicode character type functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
This 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 "unictype.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test the Unicode character type functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
This 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 "unictype.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test the Unicode character type functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
This 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 "unictype.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test the Unicode character type functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
This 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 "unictype.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test the Unicode character type functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
This 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 "unictype.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test the Unicode character type functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
This 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 "unictype.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test the Unicode character type functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
This 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 "unictype.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test the Unicode character type functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
This 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 "unictype.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test the Unicode character type functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
This 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 "unictype.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
-#define SIZEOF(a) (sizeof(a) / sizeof(a[0]))
+#include "macros.h"
static const struct { unsigned int ch; int value; } mapping[] =
{
/* Test the Unicode character type functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
This 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 "unictype.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
-#define SIZEOF(a) (sizeof(a) / sizeof(a[0]))
+#include "macros.h"
static const struct { unsigned int ch; int value; } mapping[] =
{
/* Test the Unicode character type functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
This 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 "unictype.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test the Unicode character type functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
This 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 "unictype.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
-#define SIZEOF(a) (sizeof(a) / sizeof(a[0]))
+#include "macros.h"
static const struct { unsigned int ch; int numerator; int denominator; }
mapping[] =
#include "unictype.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test the Unicode character type functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
This 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 "unictype.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test the Unicode character type functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
This 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 "unictype.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed for c = 0x%04X\n", \
- __FILE__, __LINE__, c); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
-#define SIZEOF(a) (sizeof(a) / sizeof(a[0]))
+#include "macros.h"
/* Interval of Unicode characters. */
typedef struct { ucs4_t start; ucs4_t end; } interval_t;
/* Test the Unicode character type functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
This 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 "unictype.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test the Unicode character type functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
This 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 "unictype.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test the Unicode character type functions.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
This 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 "unictype.h"
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of line breaking of UTF-16 strings.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unilbrk.h"
-#include <stdio.h>
#include <stdlib.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of line breaking of UTF-16 strings.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unilbrk.h"
-#include <stdio.h>
#include <stdlib.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of line breaking of UTF-32 strings.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unilbrk.h"
-#include <stdio.h>
#include <stdlib.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of line breaking of UTF-32 strings.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unilbrk.h"
-#include <stdio.h>
#include <stdlib.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of line breaking of UTF-8 strings.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unilbrk.h"
-#include <stdio.h>
#include <stdlib.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of line breaking of UTF-8 strings.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unilbrk.h"
-#include <stdio.h>
#include <stdlib.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of line breaking of strings.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unilbrk.h"
-#include <stdio.h>
#include <stdlib.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of line breaking of strings.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "unilbrk.h"
-#include <stdio.h>
#include <stdlib.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test the Unicode character name functions.
- Copyright (C) 2000-2003, 2005, 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2000-2003, 2005, 2007, 2009-2010 Free Software Foundation,
+ Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of canonical decomposition of Unicode characters.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uninorm.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of compatibility decomposition of Unicode characters.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uninorm/decompose-internal.h"
-#include <stdio.h>
-#include <stdlib.h>
-
#include "uninorm.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of canonical composition of Unicode characters.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uninorm.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of decomposing variant of a normalization form.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uninorm.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of decomposition of Unicode characters.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uninorm.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of canonical normalization of Unicode strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of canonical decomposition of Unicode strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of compatibility normalization of Unicode strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of compatibility decomposition of Unicode strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of canonical normalization of UTF-16 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uninorm.h"
#include <signal.h>
-#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static int
check (const uint16_t *input, size_t input_length,
/* Test of canonical decomposition of UTF-16 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uninorm.h"
#include <signal.h>
-#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static int
check (const uint16_t *input, size_t input_length,
/* Test of compatibility normalization of UTF-16 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uninorm.h"
#include <signal.h>
-#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static int
check (const uint16_t *input, size_t input_length,
/* Test of compatibility decomposition of UTF-16 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uninorm.h"
#include <signal.h>
-#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static int
check (const uint16_t *input, size_t input_length,
/* Test of normalization insensitive comparison of UTF-16 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uninorm.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-u16-normcmp.h"
/* Test of normalization insensitive comparison of UTF-16 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of locale dependent, normalization insensitive comparison of
UTF-16 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uninorm.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-u16-normcmp.h"
int
/* Test of Unicode compliance of canonical normalization of UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of canonical normalization of UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uninorm.h"
#include <signal.h>
-#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static int
check (const uint32_t *input, size_t input_length,
/* Test of Unicode compliance of canonical decomposition of UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of canonical decomposition of UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uninorm.h"
#include <signal.h>
-#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static int
check (const uint32_t *input, size_t input_length,
/* Test of Unicode compliance of compatibility normalization of UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of compatibility normalization of UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uninorm.h"
#include <signal.h>
-#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static int
check (const uint32_t *input, size_t input_length,
/* Test of Unicode compliance of compatibility decomposition of UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of compatibility decomposition of UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uninorm.h"
#include <signal.h>
-#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static int
check (const uint32_t *input, size_t input_length,
/* Test of Unicode compliance of normalization of UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "xalloc.h"
#include "unistr.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#define ASSERT_WITH_LINE(expr, file, line) \
do \
/* Test of Unicode compliance of normalization of UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of normalization insensitive comparison of UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uninorm.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-u32-normcmp.h"
/* Test of normalization insensitive comparison of UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of locale dependent, normalization insensitive comparison of
UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uninorm.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-u32-normcmp.h"
int
/* Test of canonical normalization of UTF-8 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uninorm.h"
#include <signal.h>
-#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static int
check (const uint8_t *input, size_t input_length,
/* Test of canonical decomposition of UTF-8 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uninorm.h"
#include <signal.h>
-#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static int
check (const uint8_t *input, size_t input_length,
/* Test of compatibility normalization of UTF-8 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uninorm.h"
#include <signal.h>
-#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static int
check (const uint8_t *input, size_t input_length,
/* Test of compatibility decomposition of UTF-8 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uninorm.h"
#include <signal.h>
-#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static int
check (const uint8_t *input, size_t input_length,
/* Test of normalization insensitive comparison of UTF-8 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uninorm.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-u8-normcmp.h"
/* Test of normalization insensitive comparison of UTF-8 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of locale dependent, normalization insensitive comparison of
UTF-8 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uninorm.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-u8-normcmp.h"
int
/* Test of canonical normalization of streams.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uninorm.h"
-#include <stdio.h>
#include <stdlib.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* A stream of Unicode characters that simply accumulates the contents. */
/* Test of u16_asnprintf() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <errno.h>
#include <stdarg.h>
#include <stddef.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-u16-asnprintf1.h"
/* Test of u16_[v]asnprintf() function.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of u16_v[a]s[n]printf() function.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of u16_vasnprintf() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <errno.h>
#include <stdarg.h>
#include <stddef.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-u16-asnprintf1.h"
#include "test-u16-printf1.h"
/* Test of u16_vasnprintf() function in an ISO-8859-1 locale.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <locale.h>
#include <stdarg.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static void
test_function (uint16_t * (*my_asnprintf) (uint16_t *, size_t *, const char *, ...))
/* Test of u16_vasnprintf() function in an UTF-8 locale.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <locale.h>
#include <stdarg.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static void
test_function (uint16_t * (*my_asnprintf) (uint16_t *, size_t *, const char *, ...))
/* Test of u16_vasprintf() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <errno.h>
#include <stdarg.h>
#include <stddef.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-u16-printf1.h"
/* Test of u16_vsnprintf() function.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <errno.h>
#include <stdarg.h>
#include <stddef.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "unistr.h"
#include "xalloc.h"
#include "progname.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-u16-printf1.h"
/* Test of u16_vsprintf() function.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <errno.h>
#include <stdarg.h>
#include <stddef.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "unistr.h"
#include "xalloc.h"
#include "progname.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-u16-printf1.h"
/* Test of u32_asnprintf() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <errno.h>
#include <stdarg.h>
#include <stddef.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-u32-asnprintf1.h"
/* Test of u32_[v]asnprintf() function.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of u32_v[a]s[n]printf() function.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of u32_vasnprintf() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <errno.h>
#include <stdarg.h>
#include <stddef.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-u32-asnprintf1.h"
#include "test-u32-printf1.h"
/* Test of u32_vasnprintf() function in an ISO-8859-1 locale.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <locale.h>
#include <stdarg.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static void
test_function (uint32_t * (*my_asnprintf) (uint32_t *, size_t *, const char *, ...))
/* Test of u32_vasnprintf() function in an UTF-8 locale.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <locale.h>
#include <stdarg.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static void
test_function (uint32_t * (*my_asnprintf) (uint32_t *, size_t *, const char *, ...))
/* Test of u32_vasprintf() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <errno.h>
#include <stdarg.h>
#include <stddef.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-u32-printf1.h"
/* Test of u32_vsnprintf() function.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <errno.h>
#include <stdarg.h>
#include <stddef.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "unistr.h"
#include "xalloc.h"
#include "progname.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-u32-printf1.h"
/* Test of u32_vsprintf() function.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <errno.h>
#include <stdarg.h>
#include <stddef.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "unistr.h"
#include "xalloc.h"
#include "progname.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-u32-printf1.h"
/* Test of u8_asnprintf() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <errno.h>
#include <stdarg.h>
#include <stddef.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-u8-asnprintf1.h"
/* Test of u8_[v]asnprintf() function.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of u8_v[a]s[n]printf() function.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of u8_vasnprintf() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <errno.h>
#include <stdarg.h>
#include <stddef.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-u8-asnprintf1.h"
#include "test-u8-printf1.h"
/* Test of u8_vasnprintf() function in an ISO-8859-1 locale.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <locale.h>
#include <stdarg.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static void
test_function (uint8_t * (*my_asnprintf) (uint8_t *, size_t *, const char *, ...))
/* Test of u8_vasnprintf() function in an UTF-8 locale.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <locale.h>
#include <stdarg.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static void
test_function (uint8_t * (*my_asnprintf) (uint8_t *, size_t *, const char *, ...))
/* Test of u8_vasprintf() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <errno.h>
#include <stdarg.h>
#include <stddef.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "unistr.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-u8-printf1.h"
/* Test of u8_vsnprintf() function.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <errno.h>
#include <stdarg.h>
#include <stddef.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "unistr.h"
#include "xalloc.h"
#include "progname.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-u8-printf1.h"
/* Test of u8_vsprintf() function.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <errno.h>
#include <stdarg.h>
#include <stddef.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "unistr.h"
#include "xalloc.h"
#include "progname.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-u8-printf1.h"
/* Test of ulc_asnprintf() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdarg.h>
#include <stddef.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-ulc-asnprintf1.h"
/* Test of ulc_[v]asnprintf() functions.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of ulc_v[a]s[n]printf() functions.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* Test of ulc_vasnprintf() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdarg.h>
#include <stddef.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-ulc-asnprintf1.h"
#include "test-ulc-printf1.h"
/* Test of ulc_vasnprintf() function in an ISO-8859-1 locale.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <locale.h>
#include <stdarg.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static void
test_function (char * (*my_asnprintf) (char *, size_t *, const char *, ...))
/* Test of ulc_vasnprintf() function in an UTF-8 locale.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <locale.h>
#include <stdarg.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
static void
test_function (char * (*my_asnprintf) (char *, size_t *, const char *, ...))
/* Test of ulc_vasprintf() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdarg.h>
#include <stddef.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-ulc-printf1.h"
/* Test of ulc_vsnprintf() function.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdarg.h>
#include <stddef.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "xalloc.h"
#include "progname.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-ulc-printf1.h"
/* Test of ulc_vsprintf() function.
- Copyright (C) 2007-2009 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdarg.h>
#include <stddef.h>
-#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "xalloc.h"
#include "progname.h"
-
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
#include "test-ulc-printf1.h"
/* Test of word breaks in UTF-16 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uniwbrk.h"
-#include <stdio.h>
#include <stdlib.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of word breaks in UTF-32 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uniwbrk.h"
-#include <stdio.h>
#include <stdlib.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of word breaks in UTF-8 strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uniwbrk.h"
-#include <stdio.h>
#include <stdlib.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of word breaks in strings.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uniwbrk.h"
#include <locale.h>
-#include <stdio.h>
#include <stdlib.h>
-#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of u16_strwidth() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uniwidth.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of u16_width() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uniwidth.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of u32_strwidth() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uniwidth.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of u32_width() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uniwidth.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of u8_strwidth() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uniwidth.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of u8_width() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uniwidth.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of uc_width() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uniwidth.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
/* Test of uc_width() function.
- Copyright (C) 2007-2008 Free Software Foundation, Inc.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "uniwidth.h"
#include <stdio.h>
-#include <stdlib.h>
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
/* One of 0, '0', '1', 'A', '2'. */
static char current_width;
/* Return a pointer to a zero-size object in memory.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# It is necessary if you want to build targets usually of interest
# only to the maintainer.
-# Copyright (C) 2001, 2003, 2006-2009 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2006-2010 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# This Makefile fragment tries to be general-purpose enough to be
# used by many projects via the gnulib maintainer-makefile module.
-## Copyright (C) 2001-2009 Free Software Foundation, Inc.
+## Copyright (C) 2001-2010 Free Software Foundation, Inc.
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
$(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null && echo --rsyncable)
GZIP_ENV = '--no-name --best $(gzip_rsyncable)'
-# cfg.mk must define the gpg_key_ID used by this package.
GIT = git
VC = $(GIT)
VC-tag = git tag -s -m '$(VERSION)' -u '$(gpg_key_ID)'
rm vc-diffs; \
fi
-# Use this to make sure we don't run these programs when building
-# from a virgin tgz file, below.
-null_AM_MAKEFLAGS = \
- ACLOCAL=false \
- AUTOCONF=false \
- AUTOMAKE=false \
- AUTOHEADER=false \
- MAKEINFO=false
-
-built_programs = $$(cd src && MAKEFLAGS= $(MAKE) -s built_programs.list)
-
rel-files = $(DIST_ARCHIVES)
gnulib_dir ?= $(srcdir)/gnulib
gnulib-version = $$(cd $(gnulib_dir) && git describe)
bootstrap-tools ?= autoconf,automake,gnulib
+# If it's not already specified, derive the GPG key ID from
+# the signed tag we've just applied to mark this release.
+gpg_key_ID ?= \
+ $$(git cat-file tag v$(VERSION) > .ann-sig \
+ && gpgv .ann-sig - < /dev/null 2>&1 \
+ | sed -n '/.*key ID \([0-9A-F]*\)/s//\1/p'; rm -f .ann-sig)
+
announcement: NEWS ChangeLog $(rel-files)
@$(build_aux)/announce-gen \
--release-type=$(RELEASE_TYPE) \
@echo "$(build_aux)/gnupload $(GNUPLOADFLAGS) \\"
@echo " --to $(gnu_rel_host):$(PACKAGE) \\"
@echo " $(rel-files)"
- @echo '# send the /tmp/announcement e-mail'
+ @echo '# send the ~/announce-$(my_distdir) e-mail'
@echo =====================================
@echo =====================================
$(MAKE) news-check
$(MAKE) distcheck
$(MAKE) dist XZ_OPT=-9ev
- $(MAKE) -s announcement RELEASE_TYPE=$@ > /tmp/announce-$(my_distdir)
+ $(MAKE) $(release-prep-hook) RELEASE_TYPE=$@
+ $(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
+
+# Override this in cfg.mk if you follow different procedures.
+release-prep-hook ?= release-prep
+
+.PHONY: release-prep
+release-prep:
+ case $$RELEASE_TYPE in alpha|beta|stable) ;; \
+ *) echo "invalid RELEASE_TYPE: $$RELEASE_TYPE" 1>&2; exit 1;; esac
+ $(MAKE) -s announcement > ~/announce-$(my_distdir)
if test -d $(release_archive_dir); then \
ln $(rel-files) $(release_archive_dir); \
chmod a-w $(rel-files); \
fi
- $(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
echo $(VERSION) > $(prev_version_file)
$(MAKE) update-NEWS-hash
perl -pi -e '$$. == 3 and print "$(noteworthy)\n\n\n"' NEWS
$(emit-commit-log) > .ci-msg
$(VC) commit -F .ci-msg -a
+ rm .ci-msg
.PHONY: web-manual
web-manual:
-----
-Copyright (C) 2006-2008 Free Software Foundation, Inc.
+Copyright (C) 2006-2010 Free Software Foundation, Inc.
This file is free documentation; the Free Software Foundation
gives unlimited permission to copy and/or distribute it,