modules


Log

Author Commit Date CI Message
Bruno Haible 864eeee5 2011-05-06T00:34:34 fclose, fflush: Respect rules for use of AC_LIBOBJ. * m4/fflush.m4 (gl_FUNC_FFLUSH): Don't invoke gl_REPLACE_FCLOSE. * m4/fclose.m4 (gl_FUNC_FCLOSE): Invoke gl_FUNC_FFLUSH_STDIN and gl_REPLACE_FCLOSE here. * modules/fflush (Depends-on): Remove fclose. * doc/posix-functions/fclose.texi: Mention module 'fflush' only in combination with module 'fclose'.
Bruno Haible 9dba31e1 2011-05-05T19:37:01 tzset: Relicense under LGPL. * modules/tzset (License): Change to LGPL. No agreement needed; it's a no-op.
Bruno Haible bddbd5db 2011-05-05T19:31:30 strtoimax, strtoumax: Relicense under LGPL. * modules/strtoimax (License): Change to LGPL. * modules/strtoumax (License): Likewise. With permission from Jim Meyering, Paul Eggert: <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00124.html> <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00109.html>
Bruno Haible a3196765 2011-05-05T19:29:48 getgroups: Relicense under LGPL. * modules/getgroups (License): Change to LGPL. With permission from Jim Meyering, Paul Eggert, Eric Blake: <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00111.html> <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00148.html> <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00138.html>
Bruno Haible fba50604 2011-05-05T19:28:21 nanosleep: Relicense under LGPL. * modules/nanosleep (License): Change to LGPL. With permission from Jim Meyering, Paul Eggert, Eric Blake, Bruno Haible: <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00111.html> <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00148.html> <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00138.html> <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00131.html>
Bruno Haible dc3b3340 2011-05-05T19:26:25 futimens: Relicense under LGPL. * modules/futimens (License): Change to LGPL. With permission from Eric Blake: <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00138.html>
Bruno Haible 80acb773 2011-05-05T19:25:17 fflush: Relicense under LGPL. * modules/fflush (License): Change to LGPL. With permission from Eric Blake, Bruno Haible, Jim Meyering: <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00138.html> <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00131.html> <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00133.html>
Bruno Haible 6fec4099 2011-05-05T19:23:54 tmpfile: Relicense under LGPL. * modules/tmpfile (License): Change to LGPL. With permission from Ben Pfaff: <http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00185.html>
Bruno Haible 0593b1a5 2011-05-05T19:22:52 isfinite: Relicense under LGPL. * modules/isfinite (License): Change to LGPL. With permission from Ben Pfaff, Bruno Haible: <http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00185.html> <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00130.html>
Bruno Haible 62261406 2011-05-05T19:20:07 acosl..tanl: Relicense under LGPL. * modules/acosl (License): Change to LGPL. * modules/asinl (License): Likewise. * modules/atanl (License): Likewise. * modules/cosl (License): Likewise. * modules/expl (License): Likewise. * modules/logl (License): Likewise. * modules/sinl (License): Likewise. * modules/sqrtl (License): Likewise. * modules/tanl (License): Likewise. Source code originally from glibc and Paolo Bonzini. Agreements: <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00137.html> <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00128.html>
Bruno Haible fa6f0000 2011-05-05T19:03:57 signal: Define sighandler_t. * lib/signal.in.h (sighandler_t): New type. * m4/signal_h.m4 (gl_SIGNAL_H): Require AC_USE_SYSTEM_EXTENSIONS. Test whether sighandler_t is defined. (gl_SIGNAL_H_DEFAULTS): Initialize HAVE_SIGHANDLER_T. * modules/signal (Depends-on): Add extensions. (Makefile.am): Substitute HAVE_SIGHANDLER_T. * doc/posix-headers/signal.texi: Mention the problem with sighandler_t. Suggested by Markus Steinborn <gnugv_maintainer@yahoo.de>.
Eric Blake e5c4538a 2011-05-04T14:26:56 maint: remove useless REPLACE_*_H macros There are still a few modules, like iconv_h.m4, that still use older paradigms where GNULIB_POSIXCHECK is unsupported and where gl_REPLACE_<HEADER>_H is still essential. But since we are moving away from that style, I see no reason to keep the idiom for the modules that don't need it. * m4/arpa_inet_h.m4 (gl_REPLACE_ARPA_INET_H): Delete. * m4/dirent_h.m4 (gl_REPLACE_DIRENT_H): Likewise. * m4/locale_h.m4 (gl_REPLACE_LOCALE_H): Likewise. * m4/poll_h.m4 (gl_REPLACE_POLL_H): Likewise. * m4/spawn_h.m4 (gl_REPLACE_SPAWN_H): Likewise. * m4/sys_ioctl_h.m4 (gl_REPLACE_SYS_IOCTL_H): Likewise. * m4/wchar_h.m4 (gl_REPLACE_WCHAR_H): Likewise. * m4/btowc.m4: Update callers. * m4/dirfd.m4: Likewise. * m4/duplocale.m4: Likewise. * m4/fchdir.m4: Likewise. * m4/fdopendir.m4: Likewise. * m4/inet_ntop.m4: Likewise. * m4/inet_pton.m4: Likewise. * m4/ioctl.m4: Likewise. * m4/mbrlen.m4: Likewise. * m4/mbrtowc.m4: Likewise. * m4/mbsinit.m4: Likewise. * m4/mbsnrtowcs.m4: Likewise. * m4/mbsrtowcs.m4: Likewise. * m4/poll.m4: Likewise. * m4/setlocale.m4: Likewise. * m4/wcrtomb.m4: Likewise. * m4/wcsnrtombs.m4: Likewise. * m4/wcsrtombs.m4: Likewise. * m4/wctob.m4: Likewise. * m4/wcwidth.m4: Likewise. * modules/posix_spawn: Likewise. * modules/posix_spawn_file_actions_addclose: Likewise. * modules/posix_spawn_file_actions_adddup2: Likewise. * modules/posix_spawn_file_actions_addopen: Likewise. * modules/posix_spawn_file_actions_destroy: Likewise. * modules/posix_spawn_file_actions_init: Likewise. * modules/posix_spawnattr_destroy: Likewise. * modules/posix_spawnattr_getflags: Likewise. * modules/posix_spawnattr_getpgroup: Likewise. * modules/posix_spawnattr_getschedparam: Likewise. * modules/posix_spawnattr_getschedpolicy: Likewise. * modules/posix_spawnattr_getsigdefault: Likewise. * modules/posix_spawnattr_getsigmask: Likewise. * modules/posix_spawnattr_init: Likewise. * modules/posix_spawnattr_setflags: Likewise. * modules/posix_spawnattr_setpgroup: Likewise. * modules/posix_spawnattr_setschedparam: Likewise. * modules/posix_spawnattr_setschedpolicy: Likewise. * modules/posix_spawnattr_setsigdefault: Likewise. * modules/posix_spawnattr_setsigmask: Likewise. * modules/posix_spawnp: Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
Bruno Haible 7cbbd8a3 2011-05-03T23:36:43 Avoid unnecessary compilation units, through conditional dependencies. * modules/accept (Depends-on): Add conditions to the dependencies. * modules/acosl (Depends-on): Likewise. * modules/argz (Depends-on): Likewise. * modules/asinl (Depends-on): Likewise. * modules/atanl (Depends-on): Likewise. * modules/atoll (Depends-on): Likewise. * modules/bind (Depends-on): Likewise. * modules/btowc (Depends-on): Likewise. * modules/canonicalize-lgpl (Depends-on): Likewise. * modules/ceil (Depends-on): Likewise. * modules/ceilf (Depends-on): Likewise. * modules/ceill (Depends-on): Likewise. * modules/chdir-long (Depends-on): Likewise. * modules/chown (Depends-on): Likewise. * modules/close (Depends-on): Likewise. * modules/connect (Depends-on): Likewise. * modules/cosl (Depends-on): Likewise. * modules/dirfd (Depends-on): Likewise. * modules/dprintf (Depends-on): Likewise. * modules/dprintf-posix (Depends-on): Likewise. * modules/error (Depends-on): Likewise. * modules/euidaccess (Depends-on): Likewise. * modules/expl (Depends-on): Likewise. * modules/faccessat (Depends-on): Likewise. * modules/fchdir (Depends-on): Likewise. * modules/fclose (Depends-on): Likewise. * modules/fcntl (Depends-on): Likewise. * modules/fdopendir (Depends-on): Likewise. * modules/fflush (Depends-on): Likewise. * modules/floor (Depends-on): Likewise. * modules/floorf (Depends-on): Likewise. * modules/floorl (Depends-on): Likewise. * modules/fnmatch (Depends-on): Likewise. * modules/fopen (Depends-on): Likewise. * modules/fprintf-posix (Depends-on): Likewise. * modules/frexp (Depends-on): Likewise. * modules/frexp-nolibm (Depends-on): Likewise. * modules/frexpl (Depends-on): Likewise. * modules/frexpl-nolibm (Depends-on): Likewise. * modules/fseek (Depends-on): Likewise. * modules/fsusage (Depends-on): Likewise. * modules/ftell (Depends-on): Likewise. * modules/ftello (Depends-on): Likewise. * modules/futimens (Depends-on): Likewise. * modules/getcwd (Depends-on): Likewise. * modules/getcwd-lgpl (Depends-on): Likewise. * modules/getdelim (Depends-on): Likewise. * modules/getdomainname (Depends-on): Likewise. * modules/getgroups (Depends-on): Likewise. * modules/gethostname (Depends-on): Likewise. * modules/getline (Depends-on): Likewise. * modules/getlogin_r (Depends-on): Likewise. * modules/getopt-posix (Depends-on): Likewise. * modules/getpeername (Depends-on): Likewise. * modules/getsockname (Depends-on): Likewise. * modules/getsockopt (Depends-on): Likewise. * modules/getsubopt (Depends-on): Likewise. * modules/getusershell (Depends-on): Likewise. * modules/glob (Depends-on): Likewise. * modules/grantpt (Depends-on): Likewise. * modules/iconv_open (Depends-on): Likewise. * modules/iconv_open-utf (Depends-on): Likewise. * modules/inet_ntop (Depends-on): Likewise. * modules/inet_pton (Depends-on): Likewise. * modules/ioctl (Depends-on): Likewise. * modules/isapipe (Depends-on): Likewise. * modules/isfinite (Depends-on): Likewise. * modules/isinf (Depends-on): Likewise. * modules/lchown (Depends-on): Likewise. * modules/ldexpl (Depends-on): Likewise. * modules/link (Depends-on): Likewise. * modules/linkat (Depends-on): Likewise. * modules/listen (Depends-on): Likewise. * modules/logl (Depends-on): Likewise. * modules/lstat (Depends-on): Likewise. * modules/mbrlen (Depends-on): Likewise. * modules/mbrtowc (Depends-on): Likewise. * modules/mbsinit (Depends-on): Likewise. * modules/mbsnrtowcs (Depends-on): Likewise. * modules/mbsrtowcs (Depends-on): Likewise. * modules/mbtowc (Depends-on): Likewise. * modules/memcmp (Depends-on): Likewise. * modules/mkdir (Depends-on): Likewise. * modules/mkdtemp (Depends-on): Likewise. * modules/mkfifo (Depends-on): Likewise. * modules/mkfifoat (Depends-on): Likewise. * modules/mknod (Depends-on): Likewise. * modules/mkostemp (Depends-on): Likewise. * modules/mkostemps (Depends-on): Likewise. * modules/mkstemp (Depends-on): Likewise. * modules/mkstemps (Depends-on): Likewise. * modules/mktime (Depends-on): Likewise. * modules/nanosleep (Depends-on): Likewise. * modules/open (Depends-on): Likewise. * modules/openat (Depends-on): Likewise. * modules/perror (Depends-on): Likewise. * modules/poll (Depends-on): Likewise. * modules/popen (Depends-on): Likewise. * modules/posix_spawn (Depends-on): Likewise. * modules/posix_spawn_file_actions_addclose (Depends-on): Likewise. * modules/posix_spawn_file_actions_adddup2 (Depends-on): Likewise. * modules/posix_spawn_file_actions_addopen (Depends-on): Likewise. * modules/posix_spawnp (Depends-on): Likewise. * modules/pread (Depends-on): Likewise. * modules/printf-posix (Depends-on): Likewise. * modules/ptsname (Depends-on): Likewise. * modules/putenv (Depends-on): Likewise. * modules/pwrite (Depends-on): Likewise. * modules/readline (Depends-on): Likewise. * modules/readlink (Depends-on): Likewise. * modules/readlinkat (Depends-on): Likewise. * modules/recv (Depends-on): Likewise. * modules/recvfrom (Depends-on): Likewise. * modules/regex (Depends-on): Likewise. * modules/remove (Depends-on): Likewise. * modules/rename (Depends-on): Likewise. * modules/renameat (Depends-on): Likewise. * modules/rmdir (Depends-on): Likewise. * modules/round (Depends-on): Likewise. * modules/roundf (Depends-on): Likewise. * modules/roundl (Depends-on): Likewise. * modules/rpmatch (Depends-on): Likewise. * modules/select (Depends-on): Likewise. * modules/send (Depends-on): Likewise. * modules/sendto (Depends-on): Likewise. * modules/setenv (Depends-on): Likewise. * modules/setlocale (Depends-on): Likewise. * modules/setsockopt (Depends-on): Likewise. * modules/shutdown (Depends-on): Likewise. * modules/sigaction (Depends-on): Likewise. * modules/signbit (Depends-on): Likewise. * modules/sigprocmask (Depends-on): Likewise. * modules/sinl (Depends-on): Likewise. * modules/sleep (Depends-on): Likewise. * modules/snprintf (Depends-on): Likewise. * modules/snprintf-posix (Depends-on): Likewise. * modules/socket (Depends-on): Likewise. * modules/sprintf-posix (Depends-on): Likewise. * modules/sqrtl (Depends-on): Likewise. * modules/stat (Depends-on): Likewise. * modules/strchrnul (Depends-on): Likewise. * modules/strdup-posix (Depends-on): Likewise. * modules/strerror (Depends-on): Likewise. * modules/strerror_r-posix (Depends-on): Likewise. * modules/strndup (Depends-on): Likewise. * modules/strnlen (Depends-on): Likewise. * modules/strptime (Depends-on): Likewise. * modules/strsep (Depends-on): Likewise. * modules/strsignal (Depends-on): Likewise. * modules/strstr-simple (Depends-on): Likewise. * modules/strtod (Depends-on): Likewise. * modules/strtoimax (Depends-on): Likewise. * modules/strtok_r (Depends-on): Likewise. * modules/strtoumax (Depends-on): Likewise. * modules/symlink (Depends-on): Likewise. * modules/symlinkat (Depends-on): Likewise. * modules/tanl (Depends-on): Likewise. * modules/tcgetsid (Depends-on): Likewise. * modules/tmpfile (Depends-on): Likewise. * modules/trunc (Depends-on): Likewise. * modules/truncf (Depends-on): Likewise. * modules/truncl (Depends-on): Likewise. * modules/uname (Depends-on): Likewise. * modules/unlink (Depends-on): Likewise. * modules/unlockpt (Depends-on): Likewise. * modules/unsetenv (Depends-on): Likewise. * modules/usleep (Depends-on): Likewise. * modules/utimensat (Depends-on): Likewise. * modules/vasprintf (Depends-on): Likewise. * modules/vdprintf (Depends-on): Likewise. * modules/vdprintf-posix (Depends-on): Likewise. * modules/vfprintf-posix (Depends-on): Likewise. * modules/vprintf-posix (Depends-on): Likewise. * modules/vsnprintf (Depends-on): Likewise. * modules/vsnprintf-posix (Depends-on): Likewise. * modules/vsprintf-posix (Depends-on): Likewise. * modules/wcrtomb (Depends-on): Likewise. * modules/wcscasecmp (Depends-on): Likewise. * modules/wcscspn (Depends-on): Likewise. * modules/wcsdup (Depends-on): Likewise. * modules/wcsncasecmp (Depends-on): Likewise. * modules/wcsnrtombs (Depends-on): Likewise. * modules/wcspbrk (Depends-on): Likewise. * modules/wcsrtombs (Depends-on): Likewise. * modules/wcsspn (Depends-on): Likewise. * modules/wcsstr (Depends-on): Likewise. * modules/wcstok (Depends-on): Likewise. * modules/wcswidth (Depends-on): Likewise. * modules/wctob (Depends-on): Likewise. * modules/wctomb (Depends-on): Likewise. * modules/wctype (Depends-on): Likewise. * modules/wcwidth (Depends-on): Likewise. * modules/write (Depends-on): Likewise.
Reuben Thomas 850e984b 2011-05-03T07:58:45 readme-release: new module with release instructions * modules/readme-release: New module. * top/README-release: New file, from coreutils, grep, diffutils. * MODULES.html.sh (Support for maintaining and releasing): Add it.
Eric Blake bcbcf0c5 2011-05-02T15:00:50 fflush: also replace fclose when fixing fflush This fixes the fclose failures detected in the previous patch, but only when the GPL fflush module is also in use. That is because the need for behavior of resetting seekable input streams is much less common, and the fix more complex. The LGPLv2+ test for fclose() in isolation is relaxed to pass if fflush is not being replaced to cater to input streams. * modules/fflush (Depends-on): Add fclose. * m4/fflush.m4 (gl_FUNC_FFLUSH): Also replace fclose. * lib/fclose.c (rpl_fclose): Don't cause spurious failures on memstreams with no backing fd. * doc/posix-functions/fclose.texi (fclose): Document the use of fflush module to fix the bug. * tests/test-fclose.c (main): Relax test when fclose is used in isolation. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake 1fc3525d 2011-05-02T13:38:23 fclose: add some tests POSIX requires that fclose() on seekable input streams rewind back to the next byte not actually given to the application. Glibc fails this test. See: http://sourceware.org/bugzilla/show_bug.cgi?id=3746 http://sourceware.org/bugzilla/show_bug.cgi?id=12724 Likewise for FreeBSD. Cygwin 1.7.9 and Solaris 10 pass, however. * modules/fclose-tests: New test module. * tests/test-fclose.c: New file. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake 001e7d63 2011-05-02T11:41:12 fclose: reduce dependencies In an LGPLv2+ project, the last change to fclose dragged in inappropriate modules. * modules/fclose (Depends-on): Switch from fflush/fseeko to simpler lseek. * lib/fclose.c (rpl_fclose): Likewise. Reported by Simon Josefsson. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake 0fc0aa38 2011-05-02T11:59:00 exit: drop remaining clients Anyone using EXIT_FAILURE needs to depend on stdlib, now that the exit module is gone. * modules/argmatch (Depends-on): Replace exit with stdlib. * modules/copy-file (Depends-on): Likewise. * modules/execute (Depends-on): Likewise. * modules/exitfail (Depends-on): Likewise. * modules/obstack (Depends-on): Likewise. * modules/pagealign_alloc (Depends-on): Likewise. * modules/pipe-filter-gi (Depends-on): Likewise. * modules/pipe-filter-ii (Depends-on): Likewise. * modules/savewd (Depends-on): Likewise. * modules/spawn-pipe (Depends-on): Likewise. * modules/wait-process (Depends-on): Likewise. * modules/xsetenv (Depends-on): Likewise. * modules/chdir-long (Depends-on): Add stdlib, for EXIT_FAILURE. * modules/git-merge-changelog (Depends-on): Likewise. * modules/long-options (Depends-on): Likewise. * modules/pt_chown (Depends-on): Likewise. * modules/sysexits (Depends-on): Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake 575476d9 2011-05-02T11:23:11 freading: relax license from LGPLv3+ to LGPLv2+ Agreed to in http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00055.html * modules/freading (License): Relax LGPL version. Signed-off-by: Eric Blake <eblake@redhat.com>
Bruno Haible a73baf11 2011-05-02T18:59:21 fchdir: Remove unused dependencies. * modules/fchdir (Depends-on): Remove include_next.
Simon Josefsson dffb59b4 2011-05-02T08:45:02 exit: Remove module. * NEWS: Document removal of 'exit'. * modules/exit: Remove file.
Eric Blake 096d7e1c 2011-04-30T15:40:00 fclose: don't fail on non-seekable input stream On mingw, for a project that uses both sockets and streams, then fclose(stdin) when getting input from a terminal or pipe was spuriously failing. * modules/fclose (Depends-on): Add freading, fflush, fseeko. * lib/fclose.c (rpl_fclose): Skip fflush for non-seekable input, since fflush is allowed to fail in that case. Signed-off-by: Eric Blake <eblake@redhat.com>
Bruno Haible 0576d587 2011-04-30T15:00:45 netdb: Make it work in C++ mode. * lib/netdb.in.h (struct addrinfo): In C++, define as a C struct. (getaddrinfo, freeaddrinfo, getnameinfo): Use macros from c++defs module. * m4/netdb_h.m4 (gl_NETDB_MODULE_INDICATOR): Invoke gl_MODULE_INDICATOR_FOR_TESTS. * modules/netdb-tests (Depends-on): Add netdb-c++-tests. * modules/netdb-c++-tests: New file. * tests/test-netdb-c++.cc: New file.
Bruno Haible 9d916bc0 2011-04-30T14:53:35 New modules 'vfscanf', 'vscanf'. * modules/vfscanf: New file. * modules/vscanf: New file. * m4/stdio_h.m4 (gl_STDIO_H): Don't set GNULIB_VFSCANF, GNULIB_VSCANF here. * doc/posix-functions/vfscanf.texi: Mention module 'vfscanf'. * doc/posix-functions/vscanf.texi: Mention module 'vscanf'.
Bruno Haible 3864a297 2011-04-29T14:09:15 netdb: fix gai_strerror replacements * lib/netdb.in.h: Add _GL_FUNCDECL_RPL definitions. * modules/netdb: Substitute it.
Eric Blake 74175b90 2011-04-28T16:46:16 getaddrinfo: fix gai_strerror signature Several platforms declare gai_strerror to return char* rather than const char*. Worse, on mingw, if UNICODE is defined, it is defined to return WCHAR*, which means the result is in unicode but an application expecting bytes for characters will only see a one-byte answer. * m4/getaddrinfo.m4 (gl_GETADDRINFO): Detect broken signatures, and work around mingw with UNICODE defined. (gl_PREREQ_GETADDRINFO): Drop redundant decl check. * m4/netdb_h.m4 (gl_NETDB_H_DEFAULTS): Add witness. * modules/netdb (Makefile.am): Substitute it. * lib/netdb.in.h (gai_strerror): Declare replacement. * lib/gai_strerror.c (rpl_gai_strerror): Fix signature. * doc/posix-functions/gai_strerror.texi (gai_strerror): Document the fix. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake d6d01fdd 2011-04-27T16:38:05 tests: drop unused link dependency Ever since commit 2392b18099, openat and fdopendir no longer drag in xalloc-die through indirect dependencies, so these tests no longer need $(LIBINTL). * modules/areadlinkat-tests (Makefile.am): Drop stale LDADD. * modules/dirent-safer-tests (Makefile.am): Likewise. * modules/fdopendir-tests (Makefile.am): Likewise. * modules/mkfifoat-tests (Makefile.am): Likewise. * modules/openat-safer-tests (Makefile.am): Likewise. * modules/openat-tests (Makefile.am): Likewise. * modules/readlinkat-tests (Makefile.am): Likewise. * modules/symlinkat-tests (Makefile.am): Likewise. * modules/linkat-tests (Makefile.am): Likewise. (Depends-on): Switch to filenamecat-lgpl. * modules/fdutimensat-tests (test_fdutimensat_LDADD): Drop unused LIBINTL. * modules/utimensat-tests (test_utimensat_LDADD): Likewise. * tests/test-linkat.c (main): Don't require xalloc. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake 83b1d641 2011-04-27T16:23:45 hash, mgetgroups: drop xalloc dependency Rely on the new xalloc-oversized module to avoid requiring xalloc-die for functions documented as returning NULL on potential allocation overflow. * lib/hash.c (includes): Adjust includes. * lib/mgetgroups.c (includes): Likewise. (xgetgroups): Move... * lib/xgetgroups.c: ...to new file. * modules/xgetgroups: New file, split from... * modules/mgetgroups: ...here. (Depends-on): Add xalloc-oversized. * modules/hash (Depends-on): Likewise. * modules/hash-tests (Depends-on): Drop xalloc. (test_hash_LDADD): Drop unused library. * tests/test-hash.c (main): Break xalloc dependency. (includes): Drop unused include. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake bf18c9b4 2011-04-27T15:54:30 xalloc-oversized: new module Due to inline functions, mere inclusion of xalloc.h can result in a link dependency on xalloc_die() on some platforms. However, there are several modules that want to use just xalloc_oversized in order to short-circuit the potential to call xalloc_die. Splitting the macro into a new header and module makes this easy. * modules/xalloc-oversized: New module. * modules/xalloc (Depends-on): Add it. * lib/xalloc.h (xalloc_oversized): Move... * lib/xalloc-oversized.h: ...into new file. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake 7cbc494f 2011-04-27T15:41:54 utimecmp: drop dependency on xmalloc utimecmp's only use of malloc was for a cache; we can always bypass the cache in low memory, and thus avoid dragging in xalloc-die. * lib/utimecmp.c (utimecmp): Work even if hash table cache fails due to memory pressure. * modules/utimecmp (Depends-on): Drop xalloc. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake 825499de 2011-04-26T15:58:03 fchdir: avoid extra chdir and fix test On Linux, with a forced ac_cv_func_fchdir=no, the test failed because dup2 was not replaced, all because the shell variable ac_cv_func_dup2 had not been set yet. Meanwhile, computing the canonical pathname of a directory on mingw was rather expensive -- multiple chdir()! -- but nothing cared whether the name was canonical, just that it was absolute. * modules/fchdir (Depends-on): Add dosname, filenamecat-lgpl, getcwd-lgpl. * lib/fchdir.c (get_name): Any absolute name will do; it does not have to be canonical. * m4/dup2.m4 (gl_REPLACE_DUP2): Ensure dup2 is replaced. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake 59680ace 2011-04-26T15:53:35 filenamecat-lgpl: fix licence http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00299.html talked about splitting out LGPLv2+ portions of existing modules. * modules/filenamecat-lgpl (License): Mark as LGPLv2+, as intended when it was first created. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake cb6acd4a 2011-04-26T15:31:21 linkat, renameat: add missing dependency * modules/linkat (Depends-on): Require getcwd-lgpl. * modules/renameat (Depends-on): Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake a2772ebc 2011-04-26T15:23:23 tests: reduce dependencies We can assume that tests won't be run from a directory with an absolute name longer than native getcwd limits. * tests/test-linkat.c (main): Use lighter-weight getcwd. * tests/test-renameat.c (main): Likewise. * modules/linkat-tests (Depends-on): Relax dependency. * modules/renameat-tests (Depends-on): Likewise. * modules/fchdir-tests (Depends-on): Likewise. Also make cloexec dependency explicit. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake 0c631b51 2011-04-26T15:07:07 save-cwd: reduce default dependency save-cwd generally needs only a working fchdir or a working getcwd(NULL,0). If you are not worried about directories whose absolute name is longer than PATH_MAX, then reducing the default dependencies reduces the bulk for this module. However, there are cases where neither function works on Linux (an unreadable but searchable directory can be opened by O_SEARCH, except that Linux doesn't implement that yet; and Linux getcwd() has issues with long absolute names which glibc does not work around but which the full-blown getcwd module does). So someone desiring a truly robust solution needs to import the 'getcwd' module at the same time as 'save-cwd'. * modules/save-cwd (Depends-on): Use getcwd-lgpl. * lib/save-cwd.c: Update comments. * NEWS: Document the semantic change. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake 02923aad 2011-04-26T14:51:24 getcwd: enhance tests The existing getcwd was weak, and only tested things guaranteed by the new getcwd-lgpl. Move those tests into a new file and strengthen them slightly (such as guaranteeing the ERANGE error for a non-zero but too-small size). Then copy the m4 tests for PATH_MAX failures into the GPL getcwd tests, to prove that our replacement really is fixing the things that cause us to reject the system getcwd as non-robust. * tests/test-getcwd-lgpl.c: New file, taken from... * tests/test-getcwd.c: ...old contents. Rewrite this file to repeat long path stress tests from m4 probe. * modules/getcwd-lgpl-tests: New module. * modules/getcwd-tests (Depends-on): Depend on lgpl tests. * m4/getcwd-abort-bug.m4: Update comment. * m4/getcwd-path-max.m4: Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake 043be67a 2011-04-26T14:40:58 getcwd-lgpl: new module For programs that aren't worried about being invoked from an current working directory longer than PATH_MAX (perhaps because the program always does chdir to a sane location first), the getcwd module is overkill, given that all modern portability targets have a getcwd that works on short names. * modules/getcwd-lgpl: New module. * lib/getcwd-lgpl.c: New file. * doc/posix-functions/getcwd.texi (getcwd): Document it. * MODULES.html.sh (lacking POSIX:2008): Likewise. * modules/getcwd (configure.ac): Set C witness. * m4/getcwd.m4 (gl_FUNC_GETCWD_LGPL): New macro. Signed-off-by: Eric Blake <eblake@redhat.com>
Paul Eggert 0d1cca61 2011-04-25T19:47:18 strtoumax: remove dependency on strtoimax This is like the strtoull change of yesterday. * modules/strtoumax (Files): Add lib/strtoimax.c. (Depends-on): Remove strtoimax and add verify.
Paul Eggert 23e09df4 2011-04-25T19:33:14 inttypes-incomplete: new module * m4/inttypes.m4 (gl_INTTYPES_INCOMPLETE): New macro, containing all but the PRI* and SCN* parts of gl_INTTYPES_H. (gl_INTTYPES_PRI_SCN): New macro, containing the PRI* and SCN* parts of gl_INTTYPES_H. (gl_INTTYPES_H): Rewrite in terms of these new macros. (gl_INTTYPES_H_DEFAULTS): Provide defaults for the PRI* and SCN* parts, in case gl_INTTYPE_PRI_SCN is not invoked. * modules/imaxabs, modules/imaxdiv, modules/strtoimax (Depends-on): * modules/strtoumax, modules/xstrtol (Depends-on): Depend on inttypes-incomplete, not inttypes. * modules/inttypes-incomplete: New module, containing the contents of the old modules/inttypes module, except that the Files: section omits m4/inttypes-pri.m4, and the configure.ac section invokes gl_INTTYPES_INCOMPLETE rather than gl_INTTYPES_H. * modules/inttypes (Files): Remove lib/inttypes.in.h, m4/inttypes.m4. (Depends-on): Depend only on inttypes-incomplete. (Makefile.am): Remove everything; this is now in inttypes-incomplete.
Simon Josefsson 7d06b326 2011-04-25T21:03:02 gnumakefile: Replace TAB with SPCs. * modules/gnumakefile (configure.ac): Replace TAB with SPCs.
Bruno Haible 7ff13537 2011-04-25T20:55:15 strtol, strtoul: Mark modules as obsolete. * modules/strtol (Status, Notice): New sections. * modules/strtoul (Status, Notice): New sections.
Bruno Haible b9453f8c 2011-04-25T20:53:41 strtod: Remove check for strtod, unless supporting old platforms. * modules/strtod-obsolete: New file. * m4/strtod-obsolete.m4: New file. * m4/strtod.m4 (gl_FUNC_STRTOD): Don't check whether strtod is declared if gl_FUNC_STRTOD_OBSOLETE is not also defined. * modules/strtod (Depends-on): Add strtod-obsolete. * doc/posix-functions/strtod.texi: Mention module strtod-obsolete.
Bruno Haible fca1c5cc 2011-04-25T19:46:27 strcase: Make module obsolete. * modules/strcase (Status, Notice): New sections.
Bruno Haible 4a2a66e4 2011-04-25T19:45:09 dup2: Remove check for dup2, unless supporting old obsolete platforms. * modules/dup2-obsolete: New file. * m4/dup2-obsolete.m4: New file. * m4/dup2.m4 (gl_FUNC_DUP2): Don't check whether dup2 exists if gl_FUNC_DUP2_OBSOLETE is not also defined. * modules/dup2 (Depends-on): Add dup2-obsolete. * doc/posix-functions/dup2.texi: Mention module dup2-obsolete.
Bruno Haible e3a7a9fd 2011-04-25T19:43:59 strnlen: Avoid memchr related link error on old obsolete platforms. * modules/memchr-obsolete: New file. * m4/memchr-obsolete.m4: New file. * m4/memchr.m4 (gl_FUNC_MEMCHR): Don't check whether memchr exists if gl_FUNC_MEMCHR_OBSOLETE is not also defined. * modules/memchr (Depends-on): Add memchr-obsolete. * modules/strnlen (Depends-on): Likewise. * doc/posix-functions/memchr.texi: Mention module memchr-obsolete.
Paul Eggert d35ef05d 2011-04-24T23:29:28 strtoul: remove dependency on strtol This is so that 'configure' need not check for strtol merely because the application needs strtoul. * modules/strtoul (Files): Add lib/strtol.c. (Depends-on): Remove strtol.
Paul Eggert e1cbfb6b 2011-04-24T23:28:39 strtoull: remove dependency on strtoul This is like the strtoll change. * modules/strtoull (Files): Add lib/strtol.c, lib/strtoul.c. (Depends-on): Remove strtoul.
Paul Eggert e8764024 2011-04-24T23:27:44 strtoll: remove dependency on strtol This is so that 'configure' need not check for strtol merely because the application needs strtoll. * modules/strtoll (Files): Add lib/strtol.c. (Depends-on): Remove strtol.
Paul Eggert fadc2ed4 2011-04-22T02:57:43 * modules/strnlen (Depends-on): Remove memchr. The strnlen implementation doesn't need the memchr module's fixes; see <http://lists.gnu.org/archive/html/bug-gnulib/2011-04/msg00237.html>.
Paul Eggert 46380c37 2011-04-22T00:45:04 strtol: remove dependency on wchar * lib/strtol.c: Include <wchar.h> only if USE_WIDE_CHAR is defined. * modules/strtol (Depends-on): Remove wchar.
Eric Blake 5a9e46ab 2011-04-21T14:53:49 passfd: fix test regression on Linux * modules/passfd-tests (configure.ac): Correct socketpair check. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake e5535531 2011-04-21T11:48:22 passfd: speed up configure and drop unused code Ultimately, it would be nice to provide a sendmsg and recvmsg module, and have those provide a replacement struct msghdr and silently convert msg_accrights into the replacement struct's msg_control, when targeting older BSD. But until that point in time, this is a nice cleanup. SCM_RIGHTS really only works on Unix sockets; however, there is nothing in passfd.c that needs to be hard-coded to this (rather, the hard-coding of the address family is done externally when the socket or socketpair is created). * m4/afunix.m4 (gl_SOCKET_AFUNIX): Rename... * m4/passfd.m4 (gl_PASSFD): ...to something more fitting of its use. Drop test for setting unused HAVE_UNIXSOCKET_SCM_RIGHTS. Instead of probing at configure for unix_scm_rights_bsd44_way, instead probe for CMSG_FIRSTHDR at compile time. Simplify BSD 4.3 check to a struct member probe. * lib/passfd.c (includes): Nothing here requires <sys/un.h>. (sendfd, recvfd): Update preprocessor checks. * modules/passfd (Files): Reflect rename, and drop unused file. (Depends-on): Drop unused dependency. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake 06d76f63 2011-04-21T07:16:20 passfd: allow compilation on mingw The passfd module now skips on mingw, rather than failing to compile. It may be nice to add a sendmsg and recvmsg module in the future, but for now passfd is the only client that cares. * modules/sys_socket (Depends-on): Add sys_uio. * lib/sys_socket.in.h [!@HAVE_SYS_SOCKET_H@]: Use it for struct iovec and a minimal struct msghdr. * tests/test-sys_socket.c (main): Enhance test. * m4/afunix.m4 (gl_SOCKET_AFUNIX): Detect recvmsg/sendmsg. * lib/passfd.c (include): Drop <sys/uio.h>; <sys/sockets.h> is guaranteed to provide what we need. (sendmsg, recvmsg): Declare fallbacks if we lack sendmsg. * modules/passfd-tests (Depends-on): Add sys_wait. * tests/test-passfd.c (main): Skip test on mingw, for now. * doc/posix-headers/sys_socket.texi (sys/socket.h): Document the partial 'struct msghdr' implementation. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake 753425d5 2011-04-21T08:51:12 sys_uio: new module For now, just provide the types used by sys/socket. We could add readv() and writev() later, if desired. * modules/sys_uio: New module. * modules/sys_uio-tests: Likewise. * lib/sys_uio.in.h: New file. * m4/sys_uio_h.m4: Likewise. * tests/test-sys_uio.c: Likewise. * doc/posix-headers/sys_uio.texi (sys/uio.h): Document it. * MODULES.html.sh (systems lacking POSIX:2008): Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
Bruno Haible 6110d07d 2011-04-18T02:34:47 ioctl: Remove link dependency on native Windows. * lib/fd-hook.h: Renamed from lib/close-hook.h. (gl_close_fn, gl_ioctl_fn): New types. (struct fd_hook): Renamed from struct close_hook. Change type of private_close_fn field. Add private_ioctl_fn field. (close_hook_fn): Add parameter for primary close method. (execute_close_hooks, execute_all_close_hooks): Likewise. (ioctl_hook_fn): New type. (execute_ioctl_hooks, execute_all_ioctl_hooks): New declarations. (register_fd_hook): Renamed from register_close_hook. Add ioctl_hook argument. (unregister_fd_hook): Renamed from unregister_close_hook. * lib/fd-hook.c: Renamed from lib/close-hook.c. Don't include <unistd.h>. (close): Remove undef. (anchor): Update. (execute_close_hooks): Add argument for primary close method. (execute_all_close_hooks): Likewise. (execute_ioctl_hooks, execute_all_ioctl_hooks): New functions. (register_fd_hook): Renamed from register_close_hook. Add ioctl_hook argument. Allow each argument to be NULL. (unregister_fd_hook): Renamed from unregister_close_hook. * lib/close.c (rpl_close): Pass 'close' function pointer to execute_all_close_hooks. * lib/ioctl.c: Include <errno.h>, fd-hook.h. (primary_ioctl): New function. (ioctl): Don't call ioctlsocket here. Instead, call execute_all_ioctl_hooks. * lib/sockets.c (close_fd_maybe_socket): Add argument for primary close method. (ioctl_fd_maybe_socket): New function, with code from lib/ioctl.c. (fd_sockets_hook): Renamed from close_sockets_hook. (gl_sockets_startup, gl_sockets_cleanup): Update. * modules/fd-hook: Renamed from modules/close-hook. Update. * modules/close (Depends-on): Add fd-hook, remove close-hook. * modules/sockets (Depends-on): Likewise. * modules/ioctl (Depends-on): Add fd-hook. * tests/test-nonblocking.c (main): Use GNULIB_TEST_SOCKET, not GNULIB_SOCKET.
Bruno Haible 12856373 2011-04-19T10:38:30 Move the support of O_NONBLOCK in open() to the 'open' module. * modules/nonblocking (Depends-on): Remove 'open'. * m4/nonblocking.m4 (gl_NONBLOCKING_IO_BODY): Set gl_cv_have_open_O_NONBLOCK. * m4/open.m4 (gl_FUNC_OPEN): Replace open() also when required for O_NONBLOCK support. * doc/posix-functions/open.texi: Document support for O_NONBLOCK.
Bruno Haible bce9d2f2 2011-04-17T19:50:10 nonblocking: Add tests for sockets. * tests/test-nonblocking-socket.sh: New file. * tests/test-nonblocking-socket-main.c: New file. * tests/test-nonblocking-socket-child.c: New file. * tests/test-nonblocking-socket.h: New file. * tests/socket-server.h: New file. * tests/socket-client.h: New file. * modules/nonblocking-socket-tests: New file. * modules/nonblocking-tests (Depends-on): Add nonblocking-socket-tests.
Bruno Haible 8a0661a8 2011-04-17T19:27:28 nonblocking: Add tests for pipes. * tests/test-nonblocking-pipe.sh: New file. * tests/test-nonblocking-pipe-main.c: New file. * tests/test-nonblocking-pipe-child.c: New file. * tests/test-nonblocking-pipe.h: New file. * tests/test-nonblocking-writer.h: New file. * tests/test-nonblocking-reader.h: New file. * tests/test-nonblocking-misc.h: New file. * modules/nonblocking-pipe-tests: New file. * modules/nonblocking-tests (Depends-on): Add nonblocking-pipe-tests.
Bruno Haible 93479f73 2011-04-16T12:14:42 gettext: Clarify the needed programmer actions. * modules/gettext (Notice): New field. Suggested by Ben Pfaff <blp@cs.stanford.edu>.
Eric Blake 2aa729ac 2011-04-15T13:53:50 strchrnul: work around cygwin bug A misplaced * means that cygwin 1.7.9 dereferences NULL rather than returning the location of the trailing NUL byte. * doc/glibc-functions/strchrnul.texi (strchrnul): Document bug. * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Detect it. * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New witness. * modules/string (Makefile.am): Substitute it. * lib/string.in.h (strchrnul): Use it. Signed-off-by: Eric Blake <eblake@redhat.com>
Bruno Haible acc203f3 2011-04-15T01:02:13 Support non-blocking pipe I/O in read() on native Windows. * lib/unistd.in.h: Include <sys/types.h> also for 'read'. (read): New declaration. * lib/read.c: New file. * lib/stdio.in.h (_GL_ATTRIBUTE_FORMAT_SCANF, _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM): New macros. (fgetc, fgets, fread, fscanf, getc, getchar, gets, scanf, vfscanf, vscanf): New declarations. * lib/stdio-read.c: New file. * m4/read.m4: New file. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_READ, REPLACE_READ. * m4/stdio_h.m4 (gl_STDIO_H): Set GNULIB_FGETC, GNULIB_FGETS, GNULIB_FREAD, GNULIB_FSCANF, GNULIB_GETC, GNULIB_GETCHAR, GNULIB_GETS, GNULIB_SCANF, GNULIB_VFSCANF, GNULIB_VSCANF. In non-blocking I/O is desired and needs workarounds, set REPLACE_STDIO_READ_FUNCS. (gl_STDIO_H_DEFAULTS): Initialize GNULIB_FGETC, GNULIB_FGETS, GNULIB_FREAD, GNULIB_FSCANF, GNULIB_GETC, GNULIB_GETCHAR, GNULIB_GETS, GNULIB_SCANF, GNULIB_VFSCANF, GNULIB_VSCANF, REPLACE_STDIO_READ_FUNCS. * modules/read: New file. * modules/nonblocking (Files): Add lib/stdio-read.c. * modules/unistd (Makefile.am): Substitute GNULIB_READ, REPLACE_READ. * modules/stdio (Makefile.am): Substitute GNULIB_FGETC, GNULIB_FGETS, GNULIB_FREAD, GNULIB_FSCANF, GNULIB_GETC, GNULIB_GETCHAR, GNULIB_GETS, GNULIB_SCANF, GNULIB_VFSCANF, GNULIB_VSCANF, REPLACE_STDIO_READ_FUNCS. * modules/pread (Depends-on): Add read. * modules/safe-read (Depends-on): Likewise. * tests/test-stdio-c++.cc (fgetc, fgets, fread, fscanf, getc, getchar, gets, scanf, vfscanf, vscanf): Verify signatures. * doc/posix-functions/read.texi: Mention 'nonblocking' module and problem with non-blocking pipes. * doc/posix-functions/fgetc.texi: Likewise. * doc/posix-functions/fgets.texi: Likewise. * doc/posix-functions/fread.texi: Likewise. * doc/posix-functions/fscanf.texi: Likewise. * doc/posix-functions/getc.texi: Likewise. * doc/posix-functions/getchar.texi: Likewise. * doc/posix-functions/gets.texi: Likewise. * doc/posix-functions/scanf.texi: Likewise. * doc/posix-functions/vfscanf.texi: Likewise. * doc/posix-functions/vscanf.texi: Likewise.
Bruno Haible 3586d4e5 2011-04-14T02:25:28 safe-write, full-read: Avoid unnecessary compilation units. * modules/safe-write (Files): Add lib/safe-read.c, m4/safe-read.m4. (Depends-on): Remove safe-read. Add ssize_t. * modules/full-read (Files): Add lib/full-write.c. (Depends-on): Add full-write.
Bruno Haible bedd70b8 2011-04-14T02:14:45 Support non-blocking pipe I/O and SIGPIPE in pwrite(). * modules/pwrite (Depends-on): Add 'write'.
Bruno Haible 836e0457 2011-04-13T12:15:43 Support non-blocking pipe I/O in write() on native Windows. * lib/unistd.in.h (write): Enable replacement also if GNULIB_UNISTD_H_NONBLOCKING is 1. * lib/write.c: Enable replacement also if GNULIB_NONBLOCKING. (rpl_write): When failing to write on a non-blocking pipe, change errno from ENOSPC to EAGAIN. * lib/stdio.in.h (fprintf, fputc, fputs, fwrite, printf, putc, putchar, puts, vfprintf, vprintf): Enable replacement also if GNULIB_STDIO_H_NONBLOCKING is 1. * lib/stdio-write.c: Enable replacements also if GNULIB_NONBLOCKING. (CLEAR_ERRNO, HANDLE_ENOSPC): New macros. (CLEAR_LastError, HANDLE_ERROR_NO_DATA): New macros, extracted from CALL_WITH_SIGPIPE_EMULATION. (CALL_WITH_SIGPIPE_EMULATION): Use them. * m4/nonblocking.m4: New file. * m4/write.m4 (gl_FUNC_WRITE): Enable REPLACE_WRITE also if required for non-blocking I/O support. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_UNISTD_H_NONBLOCKING. * m4/stdio_h.m4 (gl_STDIO_H): Enable REPLACE_STDIO_WRITE_FUNCS also if required for non-blocking I/O support. (gl_STDIO_H_DEFAULTS): Initialize GNULIB_STDIO_H_NONBLOCKING. * modules/nonblocking (Files): Add m4/nonblocking.m4, lib/stdio-write.c, m4/asm-underscore.m4. (Depends-on): Add stdio, unistd. (configure.ac): Invoke gl_NONBLOCKING_IO. Define GNULIB_NONBLOCKING. Set GNULIB_STDIO_H_NONBLOCKING, GNULIB_UNISTD_H_NONBLOCKING. * modules/unistd (Makefile.am): Substitute GNULIB_UNISTD_H_NONBLOCKING. * modules/stdio (Makefile.am): Substitute GNULIB_STDIO_H_NONBLOCKING. * doc/posix-functions/fprintf.texi: Mention 'nonblocking' module and problem with non-blocking pipes. * doc/posix-functions/fputc.texi: Likewise. * doc/posix-functions/fputs.texi: Likewise. * doc/posix-functions/fwrite.texi: Likewise. * doc/posix-functions/printf.texi: Likewise. * doc/posix-functions/putc.texi: Likewise. * doc/posix-functions/putchar.texi: Likewise. * doc/posix-functions/puts.texi: Likewise. * doc/posix-functions/vfprintf.texi: Likewise. * doc/posix-functions/vprintf.texi: Likewise. * doc/posix-functions/write.texi: Likewise.
Bruno Haible eff4c036 2011-04-11T02:27:15 stdint test: Fix compilation failure on OSF/1 with DTK compiler. * modules/stdint-tests (Depends-on): Add wchar.
Bruno Haible de128af7 2011-04-09T18:28:09 areadlinkat: Avoid link error on many platforms. * modules/areadlinkat (Depends-on): Add areadlink.
Bruno Haible d14f18bd 2011-04-09T18:05:54 relocatable-prog-wrapper: Update after module 'areadlink' changed. * lib/relocwrapper.c: Update dependencies hierarchy. * modules/relocatable-prog-wrapper (Files): Add lib/careadlinkat.[hc], lib/allocator.[hc].
Eric Blake ea9ff45f 2011-04-08T20:10:13 strftime: silence gnulib-tool warning gnulib-tool: warning: module strftime-tests has duplicated dependencies: strftime * modules/strftime-tests (Depends-on): Drop automatic dependency. Signed-off-by: Eric Blake <eblake@redhat.com>
Paul Eggert cb4ce863 2011-04-08T13:22:51 allocator: New module. * modules/allocator, lib/allocator.c: New files. * lib/allocator.h (stdlib_allocator): New decl. * lib/careadlinkat.c (_GL_USE_STDLIB_ALLOC, standard_allocator): Remove. Do not include <stdlib.h>. (careadlinkat): Use stdlib_allocator instead of rolling our own. * modules/careadlinkat (Files): Remove lib/allocator.h. (Depends-on): Add allocator.
Eric Blake 4a1579d7 2011-04-08T11:51:45 nonblocking: reduce dependency No need to make nonblocking drag in sockets just for a test; test them if they are present and skip them otherwise. * tests/test-nonblocking.c: Only test sockets when in use. * modules/nonblocking-tests (Depends-on): Drop socket. (Makefile.am): Link even if sockets are not present. * modules/pipe2-tests (Makefile.am): Likewise. * lib/ioctl.c (ioctl) [WIN32]: Fail if sockets are not also in use. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake 0568a6e8 2011-04-08T10:52:55 pipe2: fix O_NONBLOCK support on mingw * modules/pipe2 (Depends-on): Add nonblocking. * lib/pipe2.c (pipe2) [WIN32]: Add O_NONBLOCK support. * tests/test-pipe2.c (is_nonblocking): Adjust test accordingly. * tests/test-nonblocking.c (main): Likewise. * modules/pipe2-tests (Makefile.am): Avoid link failure. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake e7f37a21 2011-04-08T10:44:53 pipe-filter: drop O_NONBLOCK workarounds * modules/pipe-filter-gi (Depends-on): Add fcntl-h. * modules/pipe-filter-ii (Depends-on): Likewise. * lib/pipe-filter-aux.h (O_NONBLOCK): Delete workaround. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake 70a72e0f 2011-04-08T10:15:54 nonblocking: provide O_NONBLOCK for mingw Mingw is the only known platform that lacks O_NONBLOCK (possibly via the alternate spelling O_NDELAY). But mingw also lacks any files where open() needs to enforce non-blocking behavior, and lacks openat(), so it is relatively simple to provide a non-zero flag. A future patches will make use of O_NONBLOCK for pipe2. * modules/nonblocking (Depends-on): Add open. (configure.ac): Set new witness macro. * m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Provide default for it. * modules/fcntl-h (Makefile.am): Substitute it. * lib/fcntl.in.h (O_NONBLOCK): Guarantee non-zero definition when nonblocking module is in use. * lib/nonblocking.c: Adjust portability test. * lib/open.c (open): Don't let native open see gnulib flag. * tests/test-fcntl-h.c (main): Enhance test. * tests/test-open.h (test_open): Likewise. * doc/posix-headers/fcntl.texi (fcntl.h): Document the replacement. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake bd5d1e62 2011-04-06T14:33:24 binary-io: relicense under LGPLv2+ * modules/binary-io (License): Relax to LGPLv2+. Requested for libvirt, and required by pipe2. Signed-off-by: Eric Blake <eblake@redhat.com>
Bruno Haible 76d82d2d 2011-04-06T01:55:16 Remove leftover generated .h files after config.status changed. * m4/alloca.m4 (gl_FUNC_ALLOCA): New automake conditional GL_GENERATE_ALLOCA_H. * modules/alloca-opt (Makefile.am): Remove alloca.h if GL_GENERATE_ALLOCA_H evaluates to false. * m4/argz.m4 (gl_FUNC_ARGZ): New automake conditional GL_GENERATE_ARGZ_H. * modules/argz (Makefile.am): Remove argz.h if GL_GENERATE_ARGZ_H evaluates to false. * m4/byteswap.m4 (gl_BYTESWAP): New automake conditional GL_GENERATE_BYTESWAP_H. * modules/byteswap (Makefile.am): Remove byteswap.h if GL_GENERATE_BYTESWAP_H evaluates to false. * m4/errno_h.m4 (gl_HEADER_ERRNO_H): New automake conditional GL_GENERATE_ERRNO_H. * modules/errno (Makefile.am): Remove errno.h if GL_GENERATE_ERRNO_H evaluates to false. * m4/float_h.m4 (gl_FLOAT_H): New automake conditional GL_GENERATE_FLOAT_H. * modules/float (Makefile.am): Remove float.h if GL_GENERATE_FLOAT_H evaluates to false. * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): New automake conditional GL_GENERATE_FNMATCH_H. * modules/fnmatch (Makefile.am): Remove fnmatch.h if GL_GENERATE_FNMATCH_H evaluates to false. * m4/glob.m4 (gl_GLOB_SUBSTITUTE, gl_GLOB): New automake conditional GL_GENERATE_GLOB_H. * modules/glob (Makefile.am): Remove glob.h if GL_GENERATE_GLOB_H evaluates to false. * m4/iconv_h.m4 (gl_REPLACE_ICONV_H, gl_ICONV_H_DEFAULTS): New automake conditional GL_GENERATE_ICONV_H. * modules/iconv-h (Makefile.am): Remove iconv.h if GL_GENERATE_ICONV_H evaluates to false. * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): New automake conditional GL_GENERATE_NETINET_IN_H. * modules/netinet_in (Makefile.am): Remove netinet/in.h if GL_GENERATE_NETINET_IN_H evaluates to false. * m4/pthread.m4 (gl_PTHREAD_CHECK): Set PTHREAD_H here. New automake conditional GL_GENERATE_PTHREAD_H. (gl_PTHREAD_DEFAULTS): Don't set PTHREAD_H here. * modules/pthread (Makefile.am): Remove pthread.h if GL_GENERATE_PTHREAD_H evaluates to false. * m4/sched_h.m4 (gl_SCHED_H): New automake conditional GL_GENERATE_SCHED_H. * modules/sched (Makefile.am): Remove sched.h if GL_GENERATE_SCHED_H evaluates to false. * m4/selinux-context-h.m4 (gl_HEADERS_SELINUX_CONTEXT_H): New automake conditional GL_GENERATE_SELINUX_CONTEXT_H. * modules/selinux-h (Makefile.am): Remove selinux/context.h if GL_GENERATE_SELINUX_CONTEXT_H evaluates to false. * m4/stdarg.m4 (gl_STDARG_H): New automake conditional GL_GENERATE_STDARG_H. * modules/stdarg (Makefile.am): Remove stdarg.h if GL_GENERATE_STDARG_H evaluates to false. * m4/stdbool.m4 (AM_STDBOOL_H): New automake conditional GL_GENERATE_STDBOOL_H. * modules/stdbool (Makefile.am): Remove stdbool.h if GL_GENERATE_STDBOOL_H evaluates to false. * m4/stddef_h.m4 (gl_STDDEF_H): Set STDDEF_H here. New automake conditional GL_GENERATE_STDDEF_H. (gl_STDDEF_H_DEFAULTS): Don't set STDDEF_H here. * modules/stddef (Makefile.am): Remove stddef.h if GL_GENERATE_STDDEF_H evaluates to false. * m4/stdint.m4 (gl_STDINT_H): New automake conditional GL_GENERATE_STDINT_H. * modules/stdint (Makefile.am): Remove stdint.h if GL_GENERATE_STDINT_H evaluates to false. * m4/sysexits.m4 (gl_SYSEXITS): New automake conditional GL_GENERATE_SYSEXITS_H. * modules/sysexits (Makefile.am): Remove sysexits.h if GL_GENERATE_SYSEXITS_H evaluates to false. Reported by Karl Berry and Ralf Wildenhues.
Bruno Haible b4b63910 2011-04-03T23:07:25 Ensure to rebuild generated .h files when config.status has changed. * modules/arpa_inet (Makefile.am): Add dependency from .h file to config.status. * modules/ctype (Makefile.am): Likewise. * modules/dirent (Makefile.am): Likewise. * modules/errno (Makefile.am): Likewise. * modules/fcntl-h (Makefile.am): Likewise. * modules/float (Makefile.am): Likewise. * modules/getopt-posix (Makefile.am): Likewise. * modules/glob (Makefile.am): Likewise. * modules/iconv-h (Makefile.am): Likewise. * modules/inttypes (Makefile.am): Likewise. * modules/langinfo (Makefile.am): Likewise. * modules/locale (Makefile.am): Likewise. * modules/math (Makefile.am): Likewise. * modules/netdb (Makefile.am): Likewise. * modules/netinet_in (Makefile.am): Likewise. * modules/poll-h (Makefile.am): Likewise. * modules/pthread (Makefile.am): Likewise. * modules/pty (Makefile.am): Likewise. * modules/sched (Makefile.am): Likewise. * modules/search (Makefile.am): Likewise. * modules/selinux-h (Makefile.am): Likewise. * modules/signal (Makefile.am): Likewise. * modules/spawn (Makefile.am): Likewise. * modules/stdarg (Makefile.am): Likewise. * modules/stdbool (Makefile.am): Likewise. * modules/stddef (Makefile.am): Likewise. * modules/stdint (Makefile.am): Likewise. * modules/stdio (Makefile.am): Likewise. * modules/stdlib (Makefile.am): Likewise. * modules/string (Makefile.am): Likewise. * modules/strings (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_stat (Makefile.am): Likewise. * modules/sys_time (Makefile.am): Likewise. * modules/sys_times (Makefile.am): Likewise. * modules/sys_utsname (Makefile.am): Likewise. * modules/sys_wait (Makefile.am): Likewise. * modules/sysexits (Makefile.am): Likewise. * modules/termios (Makefile.am): Likewise. * modules/time (Makefile.am): Likewise. * modules/unistd (Makefile.am): Likewise. * modules/wchar (Makefile.am): Likewise. * modules/wctype-h (Makefile.am): Likewise. Reported by Karl Berry, Eric Blake, and Ralf Wildenhues.
Bruno Haible 31c38909 2011-04-06T01:46:12 pipe2: Relicense under LGPLv2+. * modules/pipe2 (License): Change to LGPLv2+. Requested by Eric Blake, for libvirt.
Paul Eggert 4266051a 2011-04-05T09:52:32 areadlink, areadlinkat: rewrite in terms of careadlinkat * lib/areadlink.c, lib/areadlinkat.c: Include careadlinkat.h instead of errno.h, limits.h, stdint.h, stdlib.h, string.h, unistd.h. (SSIZE_MAX, INITIAL_BUF_SIZE): Remove. (malloc, realloc): Remove #undefs. (areadlink, areadlinkat): Rewrite in terms of careadlinkat. * modules/areadlink (Depends-on): Add careadlinkat. Remove readlink, ssize_t, stdint, unistd. * modules/areadlinkat (Depends-on): Add careadlinkat. Remove areadlink, stdint. careadlinkat: new module * lib/allocator.h, lib/careadlinkat.h, lib/careadlinkat.c: * modules/careadlinkat: New files, written by me with a review and feedback from Ben Pfaff in <http://lists.gnu.org/archive/html/bug-gnulib/2011-04/msg00008.html>.
Bruno Haible b64c50cf 2011-04-01T23:23:34 wcpcpy, wcpncpy: Ensure declaration on glibc >= 2.13 systems. * m4/wcpcpy.m4 (gl_FUNC_WCPCPY): Require AC_USE_SYSTEM_EXTENSIONS. * m4/wcpncpy.m4 (gl_FUNC_WCPNCPY): Likewise. * modules/wcpcpy (Depends-on): Add extensions. * modules/wcpncpy (Depends-on): Likewise. * doc/posix-functions/wcpcpy.texi: Mention missing declaration on glibc systems. * doc/posix-functions/wcpncpy.texi: Likewise. * doc/posix-functions/wcwidth.texi: Likewise.
Eric Blake dec34757 2011-03-31T15:28:37 nonblocking: fix mingw test failures Actually testing on mingw uncovered a few more problems. * lib/nonblocking.c (set_nonblocking_flag): Succeed when clearing non-blocking flag on regular file. (get_nonblocking_flag): Set errno on invalid fd. * tests/test-nonblocking.c (main): Avoid test failure on directories if fchdir is not active. * modules/nonblocking-tests (Depends-on): Drop unused dependency. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake 111a4bf8 2011-03-30T22:07:20 nonblocking: new module * modules/nonblocking: New module. * modules/nonblocking-tests: Likewise. * lib/nonblocking.h: New file. * lib/nonblocking.c: Likewise. * tests/test-nonblocking.c: New test. * lib/ioctl.c (ioctl) [mingw]: Update comment. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake f607f2cd 2011-03-30T14:46:02 passfd: fix incorrect sendmsg arguments The unit test hung on NetBSD, which pointed out a couple of bugs. * lib/passfd.c (sendfd): Avoid uninitialized msg_flags field, and incorrect msg_controllen value. * modules/passfd-tests (Depends-on): Check for alarm. * tests/test-passfd.c (main) [HAVE_DECL_ALARM]: Avoid hanging test. Reported by Bastien ROUCARIES. Signed-off-by: Eric Blake <eblake@redhat.com>
Bruno Haible b40633e6 2011-03-31T01:38:14 c-strcasestr: Relicense under LGPLv2+. * modules/c-strcasestr (License): Change to LGPLv2+. Requested by Eric Blake, for libvirt.
Bruno Haible 0e91303b 2011-03-30T01:42:23 Relicense some modules under LGPLv2+, for libidn2. * modules/array-mergesort (License): Change to LGPLv2+. * modules/c-strcaseeq (License): Likewise. * modules/striconveh (License): Likewise. * modules/striconveha (License): Likewise. * modules/uniconv/base (License): Likewise. * modules/uniconv/u8-conv-from-enc (License): Likewise. * modules/uniconv/u8-strconv-from-enc (License): Likewise. * modules/uniconv/u8-strconv-from-locale (License): Likewise. * modules/unictype/base (License): Likewise. * modules/unictype/bidiclass-of (License): Likewise. * modules/unictype/category-M (License): Likewise. * modules/unictype/category-none (License): Likewise. * modules/unictype/category-of (License): Likewise. * modules/unictype/category-test (License): Likewise. * modules/unictype/category-test-withtable (License): Likewise. * modules/unictype/combining-class (License): Likewise. * modules/unictype/joiningtype-of (License): Likewise. * modules/unictype/scripts (License): Likewise. * modules/uninorm/base (License): Likewise. * modules/uninorm/canonical-decomposition (License): Likewise. * modules/uninorm/composition (License): Likewise. * modules/uninorm/decompose-internal (License): Likewise. * modules/uninorm/decomposition-table (License): Likewise. * modules/uninorm/nfc (License): Likewise. * modules/uninorm/nfd (License): Likewise. * modules/uninorm/u32-normalize (License): Likewise. * modules/unistr/base (License): Likewise. * modules/unistr/u32-cpy (License): Likewise. * modules/unistr/u32-mbtouc-unsafe (License): Likewise. * modules/unistr/u32-to-u8 (License): Likewise. * modules/unistr/u32-uctomb (License): Likewise. * modules/unistr/u8-check (License): Likewise. * modules/unistr/u8-mblen (License): Likewise. * modules/unistr/u8-mbtouc (License): Likewise. * modules/unistr/u8-mbtouc-unsafe (License): Likewise. * modules/unistr/u8-mbtoucr (License): Likewise. * modules/unistr/u8-prev (License): Likewise. * modules/unistr/u8-strlen (License): Likewise. * modules/unistr/u8-to-u32 (License): Likewise. * modules/unistr/u8-uctomb (License): Likewise. * modules/unitypes (License): Likewise. Requested by Simon Josefsson.
Simon Josefsson c208524a 2011-03-29T20:58:49 lib-symbol-visibility: Add a notice. * modules/lib-symbol-visibility (Notice): New field.
Bruno Haible 81aea5d9 2011-03-26T13:38:00 unictype/joiningtype-byname: Recognize long names as well. * lib/unictype.in.h (uc_joiningtype_class_byname): Allow argument to be a long name. * lib/unictype/joiningtype_byname.c: Include <string.h>, unictype/joiningtype_byname.h. (uc_joiningtype_class_byname): Use uc_joining_type_lookup. * lib/unictype/joiningtype_byname.gperf: New file. * modules/unictype/joiningtype-byname (Files): Add lib/unictype/joiningtype_byname.gperf. (Depends-on): Add gperf. (Makefile.am): Add rule for generating unictype/joiningtype_byname.h. * tests/unictype/test-joiningtype_byname.c (main): Test the recognition of long names.
Bruno Haible 69c14219 2011-03-26T13:21:08 Tests for module 'unictype/joiningtype-longname'. * modules/unictype/joiningtype-longname-tests: New file. * tests/unictype/test-joiningtype_longname.c: New file.
Bruno Haible 0f7c8434 2011-03-26T13:18:10 New module 'unictype/joiningtype-longname'. * lib/unictype.in.h (uc_joiningtype_class_long_name): New declaration. * lib/unictype/joiningtype_longname.c: New file. * modules/unictype/joiningtype-longname: New file. * modules/unictype/joiningtype-all (Depends-on): Add unictype/joiningtype-longname.
Bruno Haible ef51234c 2011-03-26T12:49:04 unictype/bidiclass-byname: Recognize long names as well. * lib/unictype.in.h (uc_bidi_class_byname): Allow argument to be a long name. * lib/unictype/bidi_byname.c: Include <string.h>, unictype/bidi_byname.h. (uc_bidi_class_byname): Use uc_bidi_class_lookup. * lib/unictype/bidi_byname.gperf: New file. * modules/unictype/bidiclass-byname (Files): Add lib/unictype/bidi_byname.gperf. (Depends-on): Add gperf. (Makefile.am): Add rule for generating unictype/bidi_byname.h. * tests/unictype/test-bidi_byname.c (main): Test the recognition of long names.
Bruno Haible f2aa6111 2011-03-26T12:21:17 Tests for module 'unictype/bidiclass-longname'. * modules/unictype/bidiclass-longname-tests: New file. * tests/unictype/test-bidi_longname.c: New file.
Bruno Haible 71d7e98c 2011-03-26T12:20:22 New module 'unictype/bidiclass-longname'. * lib/unictype.in.h (uc_bidi_class_long_name): New declaration. * lib/unictype/bidi_longname.c: New file. * modules/unictype/bidiclass-longname: New file. * modules/unictype/bidiclass-all (Depends-on): Add unictype/bidiclass-longname.
Bruno Haible 990a76ac 2011-03-26T12:16:22 unictype/bidi*: Rename modules, part 2.
Bruno Haible 8e7198f2 2011-03-26T11:51:52 unictype/bidi*: Rename modules. * modules/unictype/bidiclass-all: Renamed from modules/unictype/bidicategory-all. * modules/unictype/bidiclass-name: Renamed from modules/unictype/bidiclass-name. (Description): Update. * modules/unictype/bidiclass-name-tests: Renamed from modules/unictype/bidicategory-name-tests. * modules/unictype/bidiclass-byname: Renamed from modules/unictype/bidicategory-byname. (Description): Update. * modules/unictype/bidiclass-byname-tests: Renamed from modules/unictype/bidicategory-byname-tests. * modules/unictype/bidiclass-of: Renamed from modules/unictype/bidicategory-of. (Description): Update. * modules/unictype/bidiclass-of-tests: Renamed from modules/unictype/bidicategory-of-tests. * modules/unictype/bidiclass-test: Renamed from modules/unictype/bidicategory-test. (Description): Update. * modules/unictype/bidiclass-test-tests: Renamed from modules/unictype/bidicategory-test-tests. * modules/unictype/bidicategory-all: New file, a simple redirection. * modules/unictype/bidicategory-name: Likewise. * modules/unictype/bidicategory-byname: Likewise. * modules/unictype/bidicategory-of: Likewise. * modules/unictype/bidicategory-test: Likewise. * modules/unictype/property-bidi-* (Dependencies): Update. * lib/unictype/bidi_*.c: Update comment.
Bruno Haible c3d77b98 2011-03-26T11:37:18 unictype/bidi*: Rename functions, part 2. * modules/unictype/bidicategory-name (configure.ac): Update required libunistring version. * modules/unictype/bidicategory-byname (configure.ac): Likewise.
Bruno Haible aaae82c6 2011-03-26T02:44:57 New module 'unictype/combining-class-all'. * modules/unictype/combining-class-all: New file.
Bruno Haible b41ff9f5 2011-03-26T02:40:42 Tests for module 'unictype/combining-class-byname'. * modules/unictype/combining-class-byname-tests: New file. * tests/unictype/test-combiningclass_byname.c: New file.
Bruno Haible 8fd3c4c1 2011-03-26T02:39:24 New module 'unictype/combining-class-byname'. * lib/unictype.in.h (uc_combining_class_byname): New declaration. * lib/unictype/combiningclass_byname.c: New file. * lib/unictype/combiningclass_byname.gperf: New file. * modules/unictype/combining-class-byname: New file.
Bruno Haible ef99c1d8 2011-03-26T01:10:26 Tests for module 'unictype/combining-class-longname'. * modules/unictype/combining-class-longname-tests: New file. * tests/unictype/test-combiningclass_longname.c: New file.
Bruno Haible 1cb79657 2011-03-26T01:03:10 New module 'unictype/combining-class-longname'. * lib/unictype.in.h (uc_combining_class_long_name): New declaration. * lib/unictype/combiningclass_longname.c: New file. * modules/unictype/combining-class-longname: New file.
Bruno Haible 92c4eca2 2011-03-26T00:54:11 Tests for module 'unictype/combining-class-name'. * modules/unictype/combining-class-name-tests: New file. * tests/unictype/test-combiningclass_name.c: New file.