modules


Log

Author Commit Date CI Message
Eric Blake 587f0eda 2009-09-09T21:34:32 strndup: fix improper m4 caching * m4/strndup.m4 (gl_FUNC_STRNDUP): Rework to avoid side effects inside AC_CACHE_CHECK. Use REPLACE_STRNDUP, not HAVE_STRNDUP. (gl_PREREQ_STRNDUP): Delete. * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Update default. * modules/string (Makefile.am): Substitute it. * lib/string.in.h (strndup): Modernize prototype. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake e2b8816f 2009-09-09T20:52:26 getcwd: port to mingw * m4/getcwd.m4 (gl_FUNC_GETCWD): Mingw directories are very different from the POSIX assumptions made throughout the getcwd module; fortunately, the mingw getcwd does not need replacement. (gl_FUNC_GETCWD_NULL): Skip test on mingw. * modules/getcwd-tests: New test. * tests/test-getcwd.c: Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake 2d9360ff 2009-09-09T15:25:26 link: fix platform bugs * m4/link.m4 (gl_FUNC_LINK): Detect Solaris and Cygwin bugs. * lib/link.c (link): Work around them. Fix related mingw bug. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add REPLACE_LINK. * modules/unistd (Makefile.am): Substitute it. * lib/unistd.in.h (link): Declare replacement. * doc/posix-functions/link.texi (link): Document this. * modules/link (Depends-on): Add strdup-posix, sys_stat. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake 5ed5df8e 2009-09-09T11:06:44 test-link: consolidate into single C program, test more cases * tests/test-link.sh: Delete. * tests/test-link.c: Test more error conditions. Exposes bugs on at least Cygwin and Solaris. * modules/link-tests (Files): Remove unused file. (Depends-on): Add errno, sys_stat. (Makefile.am): Simplify. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake 5a21606b 2009-09-08T06:34:54 rawmemchr: relax license * modules/rawmemchr (License): Derived from glibc, so LGPLv2+ is okay. Reported by Jim Meyering. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake f4aa44ff 2009-09-07T05:38:18 mkfifoat: new module * modules/mkfifoat: New file. * lib/mkfifoat.c: Likewise. * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Likewise. * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Add witnesses. * modules/sys_stat (Makefile.am): Use them. * lib/sys_stat.in.h (mkfifoat, mknodat): Declare them. * MODULES.html.sh (File system functions): Mention module. * doc/posix-functions/mkfifoat.texi (mkfifoat): Likewise. * doc/posix-functions/mknodat.texi (mknodat): Likewise. * modules/mkfifoat-tests: New test. * tests/test-mkfifoat.c: Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake 909779fb 2009-09-08T05:59:53 strchrnul: relax license * modules/strchrnul (License): Derived from glibc, so LGPLv2+ is okay. Reported by Jim Meyering. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake c5c46dcc 2009-09-07T11:27:05 rename: modernize replacement * modules/rename (Depends-on): Add stdio. (configure.ac): Declare witness. * m4/rename.m4 (gl_FUNC_RENAME): Ensure dependency order, and let stdio take care of replacement. * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add new defaults. * modules/stdio (Makefile.am): Substitute them. * lib/stdio.in.h (rename): Declare replacement. * lib/rename.c (includes): Allow cross-compilation to non-windows machines. * doc/posix-functions/rename.texi (rename): Improve documentation. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake 1132a93b 2009-09-07T10:16:42 stdio: sort witness names * modules/stdio (Makefile.am): Sort replacements. * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise. * lib/stdio.in.h: Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake 370fec14 2009-09-07T05:28:13 openat: provide more convenience names * modules/faccessat (configure.ac): Add C witness. * lib/unistd.in.h (readlinkat): Fix typo. * lib/openat.h (statat, lstatat, accessat, euidaccessat): New convenience wrappers. * top/maint.mk (sc_prohibit_openat_without_use): Allow these wrappers in syntax checks. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake aa686284 2009-09-06T20:53:59 faccessat, symlinkat: continue cleanup of previous patch * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Ensure dependency order. * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Likewise. * modules/unistd (Makefile.am): Substitute GNULIB_READLINKAT. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Offer GNULIB_READLINKAT. * modules/symlinkat (configure.ac): Set GNULIB_READLINKAT. * lib/unistd.in.h (readlinkat): Declare if GNULIB_READLINKAT is set. Signed-off-by: Eric Blake <ebb9@byu.net>
Bruno Haible 1e2ae3ac 2009-09-07T01:33:12 Remove dependency from unistd_h.m4, sys_stat_h.m4, fcntl_h.m4 to openat.m4.
Bruno Haible 25fe3af3 2009-09-06T23:23:29 Remove unneeded gl_MODULE_INDICATOR invocation.
Bruno Haible dd62ffcd 2009-09-06T22:36:55 Set errno to ENOSYS when a function is entirely unsupported.
Ben Pfaff 59858051 2009-09-06T17:17:41 Work around a glibc bug in strtok_r.
Eric Blake ac181274 2009-09-05T11:49:15 symlinkat: new module * modules/symlinkat: New file. * lib/symlinkat.c: Likewise. * m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Likewise. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witnesses. * modules/unistd (Makefile.am): Use them. * lib/unistd.in.h (symlinkat, readlinkat): Declare them. (faccessat) [GNULIB_POSIXCHECK]: Fix typo. * lib/at-func.c (FUNC_RESULT): New macro, defaulting to int. * MODULES.html.sh (File system functions): Mention module. * doc/posix-functions/symlinkat.texi (symlinkat): Likewise. * doc/posix-functions/readlinkat.texi (readlinkat): Likewise. * modules/symlinkat-tests: New test. * tests/test-symlinkat.c: Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake ee67d8ea 2009-09-04T11:49:02 link-follow: accomodate mingw and cross-compilation * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Rename... (gl_FUNC_LINK_FOLLOWS_SYMLINK): ...to this. Change cross-compilation results to -1, to make linkat easier to implement when cross-compiling. Trivially support mingw. * modules/link-follow (configure.ac): Call new name. * NEWS: Mention this. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake 973333dc 2009-09-03T13:41:18 faccessat: new module * modules/faccessat: New file. * lib/faccessat.m4: Likewise. * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Likewise. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness. * modules/unistd (Makefile.am): Use it. * lib/unistd.in.h (faccessat): Declare it. (F_OK, X_OK, W_OK, R_OK): Provide definitions. * lib/fcntl.in.h (AT_SYMLINK_FOLLOW, AT_EACCESS): Likewise. * MODULES.html.sh (File system functions): Mention it. * doc/posix-functions/faccessat.texi (faccessat): Likewise. * doc/posix-headers/fcntl.texi (fcntl.h): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake 52c658e9 2009-09-02T17:14:26 openat: declare in POSIX headers * NEWS: Mention this. * modules/openat (configure.ac): Declare witnesses. (Depends-on): Add fcntl-h, sys_stat, unistd. (Include): Mention correct headers. * modules/fcntl-h (Depends-on): Add link-warning. (Files): Add openat.m4. (Makefile.am): Substitute witnesses. * modules/sys_stat (Files, Makefile.am): Likewise. * modules/unistd (Files, Makefile.am): Likewise. * m4/openat.m4 (gl_FUNC_OPENAT, gl_FUNC_FCHOWNAT): Set witnesses. (gl_OPENAT_DEFAULTS): New macro. * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Use it. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Likewise. * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Likewise. (SYS_STAT_H): Remove unused variable. * doc/posix-headers/fcntl.texi (fcntl.h): Update content. * lib/fcntl--.h (includes): Remove unneeded header. * lib/openat-safer.c (includes): Likewise. * lib/openat.h (AT_FDCWD, AT_SYMLINK_NOFOLLOW, AT_REMOVEDIR) (openat, fstatat, unlinkat, mkdirat, fchmodat, fchownat): Move to appropriate headers. (__OPENAT_PREFIX): Delete. * lib/fcntl.in.h (openat): Provide declaration. (AT_FDCWD): Fix Solaris bug. (AT_SYMLINK_NOFOLLOW, AT_REMOVEDIR): Provide macros. * lib/sys_stat.in.h (fstatat, mkdirat): Provide declaration. * lib/fchmodat.c (includes): Adjust to find declaration. * lib/fchownat.c (includes): Likewise. * lib/mkdirat.c (includes): Likewise. * lib/fstatat.c (includes): Likewise. Ensure original fstatat is still visible. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake 9de26050 2009-09-02T17:06:43 errno: use consistently * lib/c-stack.c (ENOTSUP): <errno.h> guarantees a definition. * lib/canonicalize-lgpl.c (ENAMETOOLONG): Likewise. * lib/canonicalize.c (ELOOP): Likewise. * lib/inet_ntop.c (EAFNOSUPPORT): Likewise. * lib/inet_pton.c (EAFNOSUPPORT): Likewise. * lib/lchown.c (EOPNOTSUPP): Likewise. * lib/openat-priv.h (ENOSYS, EOPNOTSUPP): Likewise. * lib/savewd.c (ESTALE): Likewise. * lib/settime.c (ENOSYS): Likewise. * lib/utimens.c (ENOSYS): Likewise. * lib/xgethostname.c (ENAMETOOLONG): Likewise. * lib/chdir-safer.c (ELOOP): Likewise. (chdir_no_follow): Use HAVE_READLINK, not ELOOP, as witness. * modules/c-stack (Depends-on): Add errno. * modules/canonicalize (Depends-on): Likewise. * modules/chdir-safer (Depends-on): Likewise. * modules/fdopendir (Depends-on): Likewise. * modules/inet_ntop (Depends-on): Likewise. * modules/inet_pton (Depends-on): Likewise. * modules/lchown (Depends-on): Likewise. * modules/openat (Depends-on): Likewise. * modules/savewd (Depends-on): Likewise. * modules/settime (Depends-on): Likewise. * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Check for readlink. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake cd98e9db 2009-09-02T14:44:51 fts: avoid leaking fds * modules/fts (Depends-on): Add cloexec. * lib/fts.c (opendirat, diropen, fts_build): Set close-on-exec flag. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake fc333501 2009-09-01T12:25:01 backupfile, chdir-long, fts, savedir: make safer * lib/backupfile.c (includes): Use "dirent--.h", since numbered_backup can write to stderr during readdir. * lib/savedir.c (includes): Likewise. * lib/chdir-long.c (includes): Use "fcntl--.h", since openat emulation can write to stderr on failure. * lib/fts.c (includes) [!_LIBC]: Likewise for opendir and openat. * lib/getcwd.c: Document why opendir_safer is unused. * lib/glob.c: Likewise. * lib/scandir.c: Likewise. * lib/openat-proc.c: Likewise, for open_safer. * modules/backupfile (Depends-on): Add dirent-safer. * modules/savedir (Depends-on): Likewise. * modules/fts (Depends-on): Add dirent-safer and openat-safer. * modules/chdir-long (Depends-on): Add openat-safer. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake 02fd4eb4 2009-09-02T06:07:54 openat-safer: new module * modules/openat-safer: New file. * lib/openat-safer.c: Likewise. * m4/fcntl-safer.m4 (gl_OPENAT_SAFER): New macro. * lib/fcntl-safer.h (openat_safer): Declare. * lib/fcntl--.h (openat): Override. * MODULES.html.sh (File descriptor based I/O): Mention it. * lib/openat.h: Add double-inclusion guards. * lib/openat.c (includes): Only include "fcntl-safer.h", not "fcntl--.h", so we can implement openat. * modules/openat-safer-tests: New test. * tests/test-openat-safer.c: New file. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake 4f1227bd 2009-09-01T07:41:28 dirent-safer: new module * modules/dirent-safer: New file. * lib/dirent--.h: Likewise. * lib/dirent-safer.h: Likewise. * lib/opendir-safer.c: Likewise. * m4/dirent-safer.m4: Likewise. * MODULES.html.sh (Enhancements for POSIX:2008): Mention it. * modules/dirent-safer-tests: New test. * tests/test-dirent-safer.c: New file. * lib/fdopendir.c (includes): Ensure fdopendir is also safe. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake d1aa3e40 2009-08-31T20:37:59 fdopendir: split into its own module * lib/openat.c (fdopendir): Move... * lib/fdopendir.c: ...into new file. * modules/fdopendir: New module. * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): New file. * modules/openat (Depends-on): Add fdopendir. * m4/openat.m4 (gl_FUNC_OPENAT): No longer need to check for fdopendir here. * modules/savedir (Depends-on): Only need fdopendir, not full openat. * lib/savedir.c (include): Use <dirent.h>, not "openat.h". * lib/openat.h (fdopendir): Drop prototype. * lib/dirent.in.h (fdopendir): Provide prototype. * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): Add replacements. * modules/dirent (Makefile.am): Substitute them. * MODULES.html.sh (File system functions): Mention it. * doc/posix-functions/fdopendir.texi (fdopendir): Likewise. * modules/fdopendir-tests: New file. * tests/test-fdopendir.c: Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake dd66a62c 2009-09-01T09:18:16 fchdir: use more consistent macro convention * lib/fcntl.in.h (_gl_register_fd): Move declaration to unistd. * lib/sys_stat.in.h (rpl_fstat): Declare via make-time REPLACE_FCHDIR, rather than relying on config.h macros. * lib/unistd.in.h (fchdir): Move all fchdir internal declarations inside a single make-time REPLACE_FCHDIR block, rather than using the config.h FCHDIR_REPLACEMENT. * m4/fchdir.m4 (gl_FUNC_FCHDIR): REPLACE_FCHDIR was already AC_SUBST'd, also AC_DEFINE it. Don't define FCHDIR_REPLACEMENT. Manage fstat replacement. * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Pick up REPLACE_FCHDIR. * modules/sys_stat (Files): Add m4/unistd_h.m4. (Makefile.am): Substitute REPLACE_FCHDIR. * lib/close.c (rpl_close): Use REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. * lib/dup-safer.c (dup_safer): Likewise. * lib/dup2.c (rpl_dup2): Likewise. * lib/dup3.c (rpl_dup3): Likewise. * lib/open.c (rpl_open): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake 4475e25b 2009-08-31T14:20:03 fchdir: simplify error handling, and support dup3 * modules/fchdir (Depends-on): Use strdup-posix, not strdup. Add stdbool, malloc-posix, realloc-posix. * lib/fchdir.c (struct dir_info_t): Delete saved_errno. (ensure_dirs_slot): Return false on allocation failure. (rpl_dup2): Delete. (_gl_register_dup): New function. (_gl_unregister_fd, rpl_opendir, rpl_dup): Update callers. (_gl_register_fd): Close fd on allocation failure. * lib/fcntl.in.h (_gl_register_fd): Update signature. * lib/unistd.in.h (_gl_register_dup) [FCHDIR_REPLACEMENT]: New prototype. (rpl_dup2_fchdir): Delete prototype. * lib/open.c (open): Update caller. * lib/dup2.c (dup2): Track fchdir metadata. * lib/dup3.c (dup3): Likewise. * m4/dup2.m4 (gl_REPLACE_DUP2): New macro. * m4/fchdir.m4 (gl_FUNC_FCHDIR): Use it. Signed-off-by: Eric Blake <ebb9@byu.net>
Bruno Haible ca90d29c 2009-09-02T22:43:05 Relicense mkdtemp under LGPLv2+.
Simon Josefsson f87db1aa 2009-09-01T14:25:07 Use $(MKDIR_P) instead of @MKDIR_P@.
Eric Blake 8fc864a0 2009-08-31T06:09:08 fchdir: port to mingw * m4/fchdir.m4 (gl_FUNC_FCHDIR): Check for mingw bug. * lib/open.c (open) [FCHDIR_REPLACEMENT]: If directories can't be opened, then use a substitute. * lib/sys_stat.in.h (fstat) [REPLACE_OPEN_DIRECTORY]: Declare replacement. * lib/fchdir.c (fstat) [REPLACE_OPEN_DIRECTORY]: Implement it. (_gl_register_fd): No need to check stat if open already filters all directories. (fchdir): Fix error condition to match POSIX. * modules/fchdir (Depends-on): Add sys_stat. * doc/posix-functions/open.texi (open): Document the limitation. * modules/fchdir-tests: New file. * tests/test-fchdir.c: Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake a01c968e 2009-08-31T09:12:30 canonicalize: allow cross-testing from cygwin to mingw * modules/canonicalize-tests (configure.ac): Define HAVE_SYMLINK. (Makefile.am): Pass it through TESTS_ENVIRONMENT. * modules/canonicalize-lgpl-tests (configure.ac, Makefile.am): Likewise. * tests/test-canonicalize.sh: Also skip test if 'ln -s' works, but target does not support symlinks. * tests/test-canonicalize-lgpl.sh: Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake d6127191 2009-08-31T09:00:45 chown: avoid compilation warning on mingw * m4/chown.m4 (gl_FUNC_CHOWN): Recognize missing chown. * lib/chown.c (rpl_chown) [!HAVE_CHOWN]: Always return failure on mingw. * lib/lchown.c (lchown) [!HAVE_CHOWN]: Likewise. * modules/chown (Depends-on): Add errno. Signed-off-by: Eric Blake <ebb9@byu.net>
Bruno Haible 0b833478 2009-08-30T16:27:11 New module 'xstriconveh'.
Bruno Haible 555629c0 2009-08-30T14:29:34 Work around iconv_open problem on Solaris.
Bruno Haible 27d2db55 2009-08-25T02:26:18 Tolerate declared but missing accept4 syscall.
Bruno Haible e8c71d94 2009-08-25T02:17:09 New module 'accept4'.
Jim Meyering 9cedf3e1 2009-08-25T01:02:32 progname: also set global program_invocation_name, when possible. Before this change, a libtool-enabled program that calls glibc's error function would report the program name as "/abs/dir/.libs/lt-program_name" rather than the desired program_name. * modules/progname (configure.ac): Check for a declaration of program_invocation_name. * lib/progname.c: Include <errno.h>. (set_program_name) [HAVE_DECL_PROGRAM_INVOCATION_NAME]: Set program_invocation_name.
Bruno Haible 49e5954e 2009-08-24T00:56:31 Tolerate declared but missing dup3 syscall.
Bruno Haible b23a8463 2009-08-24T00:42:22 Tolerate declared but missing pipe2 syscall.
Bruno Haible b6dfa79f 2009-08-24T00:19:10 Tests for module 'dup3'.
Bruno Haible c2462636 2009-08-24T00:17:47 New module 'dup3'.
Bruno Haible 3fc40328 2009-08-23T23:00:36 Avoid test link errors when the modules getopt-gnu, gettext are used.
Bruno Haible 0aa929ca 2009-08-23T14:11:27 New module 'mkostemp'.
Bruno Haible 802f6fc3 2009-08-23T10:18:14 Update module dependencies.
Eric Blake 1786a415 2009-08-21T08:26:40 fcntl-h: rename from fcntl, in preparation for fcntl(2) * modules/fcntl: Move <fcntl.h> header replacement... * modules/fcntl-h: ...to new name, so as not to collide with like-named function. * tests/test-fcntl.c: Rename... * tests/test-fcntl-h.c: ...to this. Test FD_CLOEXEC. * modules/fcntl-tests: Rename... * modules/fcntl-h-tests: ...to this. Update test file name. * modules/chdir-long (Depends-on): Update clients. * modules/chdir-safer (Depends-on): Likewise. * modules/fcntl-safer (Depends-on): Likewise. * modules/fts (Depends-on): Likewise. * modules/mkancesdirs (Depends-on): Likewise. * modules/mkdir-p (Depends-on): Likewise. * modules/open (Depends-on): Likewise. * modules/savewd (Depends-on): Likewise. * MODULES.html.sh (systems lacking POSIX:2008): Update name. * doc/posix-headers/fcntl.texi (fcntl.h): Update documentation. Signed-off-by: Eric Blake <ebb9@byu.net>
Bruno Haible 6397686e 2009-08-23T02:43:53 Relicense under LGPL.
Bruno Haible c7054c79 2009-08-22T18:58:09 Use module pipe2.
Bruno Haible d72a5819 2009-08-22T18:48:19 Tests for module 'pipe2'.
Bruno Haible 7988d730 2009-08-22T18:46:44 New module 'pipe2'.
Jim Meyering 47a8dd64 2009-08-22T11:28:08 annotate automake snippets with $(AM_V_GEN) and $(AM_V_at) This makes it so packages using automake-1.11's silent-rules option can print e.g., a single "GEN configmake.h" line, rather than the 30+ statements that perform the job. If you want to see the actual commands, you can still run "make V=1". Improved-by: Bruno Haible <bruno@clisp.org> * modules/alloca-opt: Add $(AM_V_GEN) and $(AM_V_at) prefixes so that make output is abbreviated when those variables are defined appropriately. * modules/argz: Likewise. * modules/arpa_inet: Likewise. * modules/byteswap: Likewise. * modules/configmake: Likewise. * modules/dirent: Likewise. * modules/errno: Likewise. * modules/fcntl: Likewise. * modules/float: Likewise. * modules/fnmatch: Likewise. * modules/getopt-posix: Likewise. * modules/glob: Likewise. * modules/iconv_open: Likewise. * modules/inttypes: Likewise. * modules/localcharset: Likewise. * modules/locale: Likewise. * modules/math: Likewise. * modules/netdb: Likewise. * modules/netinet_in: Likewise. * modules/poll: Likewise. * modules/posix_spawnp-tests: Likewise. * modules/sched: Likewise. * modules/search: Likewise. * modules/selinux-h: Likewise. * modules/signal: Likewise. * modules/spawn: Likewise. * modules/stdarg: Likewise. * modules/stdbool: Likewise. * modules/stddef: Likewise. * modules/stdint: Likewise. * modules/stdio: Likewise. * modules/stdlib: Likewise. * modules/string: Likewise. * modules/strings: Likewise. * modules/sys_file: Likewise. * modules/sys_ioctl: Likewise. * modules/sys_select: Likewise. * modules/sys_socket: Likewise. * modules/sys_stat: Likewise. * modules/sys_time: Likewise. * modules/sys_times: Likewise. * modules/sys_utsname: Likewise. * modules/sys_wait: Likewise. * modules/sysexits: Likewise. * modules/time: Likewise. * modules/unistd: Likewise. * modules/wchar: Likewise. * modules/wctype: Likewise.
Eric Blake 9076085f 2009-08-21T07:22:12 test-popen-safer: split from test-popen * tests/test-popen.c (main): Move... * tests/test-popen.h: ...into new file. * tests/test-popen-safer2.c: New file. * modules/popen-tests (Files): Add test-popen.h. * modules/popen-safer-tests (Files): Add test-popen-safer2.c. Suggested by Bruno Haible. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake 45b8409f 2009-08-21T07:18:10 test-fcntl-safer: split from test-open * tests/test-open.c (main): Move... * tests/test-open.h: ...into new file. * tests/test-fcntl-safer.c: New file. * modules/open-tests (Files): Add test-open.h. * modules/fcntl-safer-tests: New file. Suggested by Bruno Haible. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake 41fc74b9 2009-08-20T23:19:20 test-fopen-safer: split from test-fopen * tests/test-fopen.c (main): Move... * tests/test-fopen.h: ...into new file. * tests/test-fopen-safer.c: New file. * modules/fopen-tests (Files): Add test-fopen.h. * modules/fopen-safer-tests: New file. Suggested by Bruno Haible. Signed-off-by: Eric Blake <ebb9@byu.net>
Jim Meyering bd8cfad4 2009-08-21T10:56:58 consistently remove $@-t before redirecting to it * modules/argz: Remove $@-t and $@ before redirecting to the former. * modules/alloca-opt: Likewise. * modules/byteswap: Likewise. * modules/fnmatch: Likewise. * modules/getopt-posix: Likewise. * modules/glob: Likewise. * modules/poll: Likewise. * modules/posix_spawnp-tests: Likewise. * modules/sys_socket: Likewise. * modules/sysexits: Likewise.
Eric Blake ccb9c679 2009-08-19T10:02:19 popen-safer: prevent popen from clobbering std descriptors * modules/popen-safer: New file. * lib/popen-safer.c: Likewise. * m4/stdio-safer.m4 (gl_POPEN_SAFER): New macro. * lib/stdio--.h (popen): Provide override. * lib/stdio-safer.h (popen_safer): Provide declaration. * tests/test-popen.c (includes): Partially test this. * modules/popen-safer-tests: New file, for more tests. * tests/test-popen-safer.c: Likewise. * MODULES.html.sh (file stream based Input/Output): Mention it. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake fb8c836a 2009-08-19T09:54:54 tests: test some of the *-safer modules * modules/fopen-safer (Depends-on): Add fopen. * modules/fcntl-safer (Depends-on): Add fcntl. * modules/stdlib-safer (Depends-on): Add stdlib. (configure.ac): Set indicator. * modules/unistd-safer (configure.ac): Likewise. * modules/tmpfile-safer (configure.ac): Likewise. (Depends-on): Add tmpfile. * lib/stdio--.h (fopen, tmpfile): Don't override unless module is active. * tests/test-fopen.c (includes): Test safer versions when they are in use. * tests/test-open.c (includes): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake a8f637e3 2009-08-19T07:15:54 popen: fix cygwin 1.5 bug when stdin closed * doc/posix-functions/popen.texi (popen): Document cygwin bugs. * modules/popen: New file. * modules/popen-tests: Likewise. * tests/test-popen.c: Likewise. * m4/popen.m4: Likewise. * lib/popen.c: Likewise. * lib/stdio.in.h (popen): New declaration. * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add popen. * modules/stdio (Makefile.am): Likewise. * MODULES.html.sh (systems lacking POSIX:2008): Mention it. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake c3f50f57 2009-08-16T08:59:54 fpurge: fix previous commits * modules/fpurge (Makefile.am): Make replacement conditional, partially reverting 2007-04-29 change; missed in previous attempt. * m4/fpurge.m4 (gl_FUNC_FPURGE): Also compile fpurge.c when fpurge is missing. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake 2f5181b1 2009-08-12T10:23:03 stddef: fix NetBSD 5.0 NULL bug, rather than working around it * tests/test-locale.c: Revert previous patch related to NULL. * tests/test-stdio.c: Likewise. * tests/test-stdlib.c: Likewise. * tests/test-string.c: Likewise. * tests/test-unistd.c: Likewise. * modules/time-tests (Depends-on): Add verify. * modules/wchar-tests (Depends-on): Likewise. * tests/test-time.c: Test for NULL compliance. * tests/test-wchar.c: Likewise. * modules/locale (Depends-on): Add stddef. * modules/stdio (Depends-on): Likewise. * modules/stdlib (Depends-on): Likewise. * modules/string (Depends-on): Likewise. * modules/time (Depends-on): Likewise. * modules/unistd (Depends-on): Likewise. * modules/wchar (Depends-on): Likewise. * lib/locale.in.h (includes): Use <stddef.h> to fix NULL. * lib/stdlib.in.h (includes): Likewise. * lib/string.in.h (includes): Likewise. * lib/time.in.h (includes): Likewise. * lib/unistd.in.h (includes): Likewise. * m4/locale_h.m4 (gl_LOCALE_H): Replace locale.h if stddef.h was replaced. * m4/wchar.m4 (gl_WCHAR_H): Likewise. * m4/stddef_h.m4: New file. * modules/stddef: Likewise. * lib/stddef.in.h: Likewise. * modules/stddef-tests: Likewise. * tests/test-stddef.c: Likewise. * MODULES.html.sh (Basic types <stddef.h>): Mention new module. * doc/posix-headers/stddef.texi (stddef.h): Document the bug. * doc/posix-headers/locale.texi (locale.h): Likewise. * doc/posix-headers/stdio.texi (stdio.h): Likewise. * doc/posix-headers/stdlib.texi (stdlib.h): Likewise. * doc/posix-headers/string.texi (string.h): Likewise. * doc/posix-headers/time.texi (time.h): Likewise. * doc/posix-headers/unistd.texi (unistd.h): Likewise. * doc/posix-headers/wchar.texi (wchar.h): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake 012cb3be 2009-08-13T11:42:00 getopt: update client modules * modules/argp (Depends-on): Use getopt-gnu. * modules/git-merge-changelog (Depends-on): Likewise. * modules/long-options (Depends-on): Likewise. * modules/xstrtol (Depends-on): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
Bruno Haible ae2e7ad5 2009-08-13T01:25:48 Tests for modules 'getopt-posix', 'getopt-gnu'.
Bruno Haible 1dff1a67 2009-08-13T01:23:35 New modules 'getopt-posix', 'getopt-gnu'.
Bruno Haible 0e63c644 2009-08-13T01:09:50 Ensure that optarg etc. get declared by <unistd.h>.
Bruno Haible b49ab1d9 2009-08-12T23:34:12 Avoid test link errors.
Sergey Poznyakoff f28a2482 2009-08-12T19:03:07 Optimize exclude: use hash tables for non-wildcard patterns. * lib/exclude.c: Include hash.h and mbuiter.h (struct exclude_pattern, exclude_segment): New data types. (struct exclude): Rewrite. (fnmatch_pattern_has_wildcards): New function. (new_exclude_segment, free_exclude_segment): New functions. (excluded_file_pattern_p, excluded_file_name_p): New functions. (excluded_file_name, add_exclude): Rewrite using new struct exclude. * lib/exclude.h (is_fnmatch_pattern): New prototype. * modules/exclude: Depend on hash and mbuiter. * modules/exclude-tests: New file. * tests/test-exclude.c: New file. * tests/test-exclude1.sh: New file. * tests/test-exclude2.sh: New file. * tests/test-exclude3.sh: New file. * tests/test-exclude4.sh: New file. * tests/test-exclude5.sh: New file. * tests/test-exclude6.sh: New file. * tests/test-exclude7.sh: New file.
Bruno Haible b8d582b5 2009-08-12T17:25:09 Ensure that getopt() gets declared by <unistd.h>.
Bruno Haible a49cfc24 2009-08-11T12:52:19 Most tests don't need module 'close' any more.
Bruno Haible 7f8441f9 2009-08-10T23:00:13 Make it possible to use module 'gethostname' without module 'close' or 'ioctl'.
Bruno Haible 6c99c5d1 2009-08-10T22:53:54 Add comment.
Bruno Haible 76ce1327 2009-08-09T19:58:07 Avoid warnings from 'aclocal' when AM_XGETTEXT_OPTION is not defined.
Jim Meyering 733e7c24 2009-08-07T10:57:17 selinux-at: remove redundant m4 code, add documentation * modules/selinux-at (configure.ac): Remove redundant code. LIB_SELINUX is already set via the dependent module, selinux-h. (Include): Add quotes around selinux-at.h. * lib/selinux-at.h: Add documentation. Reported by Bruno Haible in http://marc.info/?l=gnulib-bug&m=124958988300749
Jim Meyering 27aa2305 2009-08-06T14:15:23 selinux-at: new module Initially written for coreutils, this module will soon be used by findutils, too. * MODULES.html.sh [Misc]: Add selinux-at. * lib/selinux-at.h: New file, from coreutils. * lib/selinux-at.c: Likewise. * modules/selinux-at: Likewise. (License): Change from LGPL to GPL, since it depends on the GPL'd openat module.
Joel E. Denny 48145b34 2009-08-03T20:05:50 update-copyright: fix bug for 2-digit last year and add tests * build-aux/update-copyright: Fix bug. Use UPDATE_COPYRIGHT_YEAR from environment as current year if specified. * modules/update-copyright-tests: New * tests/test-update-copyright.sh: New.
Bruno Haible 8e3dabe7 2009-08-02T16:52:37 Tests for module 'uname'.
Bruno Haible 94d27ef5 2009-08-02T16:51:49 New module 'uname'.
Bruno Haible 4e15fe9e 2009-08-02T16:50:32 Tests for module 'sys_utsname'.
Bruno Haible 1233d271 2009-08-02T16:49:23 New module 'sys_utsname'.
Bruno Haible 7525ec92 2009-08-02T16:43:55 Implicitly initialize the sockets library.
Bruno Haible 8ae6a07d 2009-08-02T23:53:25 Tests for module 'pipe-filter-gi'.
Bruno Haible b015db27 2009-08-02T23:52:05 New module 'pipe-filter-gi'.
Bruno Haible 948b2bc1 2009-08-02T23:50:47 Tests for module 'pipe-filter-ii'.
Bruno Haible a54fe4af 2009-08-02T23:46:44 New module 'pipe-filter-ii'.
Simon Josefsson 33bcc047 2009-08-02T11:54:52 Implement gethostname correctly for native Windows.
Jim Meyering 8dc0e5d6 2009-07-29T16:22:21 update-copyright: new module * modules/update-copyright: New file. * build-aux/update-copyright: New file. * MODULES.html.sh (maint+release support): Add update-copyright.
Bruno Haible ab3390df 2009-07-28T21:01:16 Fix compilation error when <ctime> is used and mktime is replaced. * lib/time.in.h (mktime): New declaration. * m4/mktime.m4 (gl_FUNC_MKTIME): Require gl_HEADER_TIME_H_DEFAULTS. Set REPLACE_MKTIME instead of defining mktime in config.h. * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize REPLACE_MKTIME. * modules/time (Makefile.am): Substitute REPLACE_MKTIME. Reported by Ross McFarland <rwmcfa1@neces.com>.
Eric Blake b8017606 2009-07-21T06:48:56 dup2-tests: test previous patch * modules/dup2-tests: New file. * tests/test-dup2.c: Likewise. * tests/test-open.c (main): Avoid unspecified behavior. * tests/test-pipe.c (child_main): Use dup2 semantics to simplify test. Signed-off-by: Eric Blake <ebb9@byu.net>
Eric Blake ddd625dd 2009-07-21T06:48:26 dup2: work around mingw and cygwin 1.5 bug * m4/dup2.m4 (gl_FUNC_DUP2): Detect mingw bug. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witness. * modules/unistd (Makefile.am): Substitute it. * lib/unistd.in.h (dup2): Declare the replacement. * lib/dup2.c (dup2) [REPLACE_DUP2]: Implement it. * doc/posix-functions/dup2.texi (dup2): Document the bugs. * lib/fchdir.c (rpl_dup2): Don't collide with mingw replacement. * modules/execute (Depends-on): Add dup2. * modules/fseterr (Depends-on): Likewise. * modules/pipe (Depends-on): Likewise. * modules/posix_spawn-internal (Depends-on): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
Bruno Haible 77ef6283 2009-07-21T10:13:16 Don't let "git push" reject trailing blank lines in modules files.
Bruno Haible d626b70f 2009-07-19T17:16:51 Fix build error on mingw with the modules sys_select and unistd.
Bruno Haible 77462a90 2009-07-18T17:13:00 Fix typo.
Eric Blake fdccb1c3 2009-07-17T12:00:07 pipe: be robust in face of closed fds * lib/pipe.c (create_pipe): Closed standard descriptors in parent should cause child to misbehave. * modules/pipe-tests: New module. * tests/test-pipe.c: New file. * tests/test-pipe.sh: New file. Reported by Akim Demaille. Signed-off-by: Eric Blake <ebb9@byu.net>
Jim Meyering 675fbd30 2009-07-04T16:44:19 argv-iter: new module * MODULES.html.sh: Add argv-iter. * lib/argv-iter.c, lib/argv-iter.h: New files. * modules/argv-iter: New file. * modules/argv-iter-tests: New file. * tests/test-argv-iter.c: Test it.
Bruno Haible e43d5834 2009-07-01T01:49:33 Reduce the number of uc_is_cased calls.
Bruno Haible a64cbf78 2009-07-01T01:11:25 Tests for module 'unicase/ignorable'.
Bruno Haible 96e29f20 2009-07-01T01:10:07 Tests for module 'unicase/cased'.
Bruno Haible 84c23b94 2009-07-01T01:06:50 Fix evaluation of "Before C" condition of FINAL_SIGMA.
Bruno Haible 2bab1f82 2009-06-30T00:19:21 Define u32_casefold as a wrapper around u32_ct_casefold.
Bruno Haible 62748048 2009-06-30T00:18:49 Define u16_casefold as a wrapper around u16_ct_casefold.
Bruno Haible ef8405aa 2009-06-30T00:17:58 Define u8_casefold as a wrapper around u8_ct_casefold.
Bruno Haible 3f977793 2009-06-30T00:15:28 Define u32_totitle as a wrapper around u32_ct_totitle.