| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
* tests/test-getcwd.c (test_abort_bug): Exit nonzero for any problem,
not just the glibc/abort one that getcwd-abort-bug.m4 detects.
This also adds an additional test for an unlikely chdir("..") failure.
* m4/getcwd-abort-bug.m4: Update this now-duplicated code to match,
and adjust the code that sets gl_cv_func_getcwd_abort_bug accordingly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On mingw, getcwd(NULL,1) succeeds, even though glibc documents that
with a non-zero size, the allocation will not exceed that many bytes.
On mingw, getcwd has the wrong signature. However, we don't have
to check for this if anything else triggers the replacement.
Also, fix a type bug that crept into the original getcwd-lgpl commit.
* m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Detect one mingw bug.
* doc/posix-functions/getcwd.texi (getcwd): Document the problems.
* lib/getcwd-lgpl.c (rpl_getcwd): Fix return type.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
| |
* m4/mkstemp.m4 (gl_FUNC_MKSTEMP): When cross-compiling, qualify the
result as a guess.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
* m4/getcwd-abort-bug.m4: Fix comments.
* m4/getcwd-path-max.m4: Likewise.
* m4/getcwd.m4: Likewise.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
|
|
|
| |
* m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Add test for non-owner
read/write mode bits set in file created by mkstemp.
* doc/posix-functions/mkstemp.texi (mkstemp): Document the fix.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
| |
* m4/inttypes.m4 (gl_INTTYPES_H_DEFAULTS): Also provide default values
for INT32_MAX_LT_INTMAX_MAX and for UINT32_MAX_LT_UINTMAX_MAX.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* m4/inttypes.m4 (gl_INTTYPES_H): Do not check for strtoimax and
strtoumax decls; gl_FUNC_STRTOIMAX and gl_FUNC_STRTOUMAX now do this.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This supports apps that need pointers to strtoimax and strtoumax,
and ports to HP-UX 11.00 64.bit, which has macros that expand to
nonexistent functions. See
<http://lists.gnu.org/archive/html/bug-gnulib/2011-04/msg00241.html>
et seq.
* lib/inttypes.in.h (strtoimax, strtoumax): #undef before declaring.
* m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Don't check whether it's
a macro.
* m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* m4/imaxdiv.m4 (gl_FUNC_IMAXDIV): Require gl_INTTYPES_H_DEFAULTS
instead of gl_INTTYPES_H. Check for imaxdiv decl here.
* m4/inttypes.m4 (gl_INTTYPES_H): Don't check for imaxdiv decl here.
|
|
|
|
|
|
| |
* m4/imaxabs.m4 (gl_FUNC_IMAXABS): Require gl_INTTYPES_H_DEFAULTS
instead of gl_INTTYPES_H. Check for imaxabs decl here.
* m4/inttypes.m4 (gl_INTTYPES_H): Don't check for imaxabs decl here.
|
|
|
|
|
| |
* m4/inttypes.m4 (gl_INTTYPES_H): Remove determination of
gl_cv_header_working_inttypes_h.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
| |
* doc/glibc-functions/strchrnul.texi: Add more details about Cygwin
bug.
* lib/string.in.h (strchrnul): Use same arguments in _GL_FUNCDECL_RPL
as in _GL_FUNCDECL_SYS.
* m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Invoke gl_PREREQ_STRCHRNUL after
AC_LIBOBJ. When cross-compiling, say "guessing yes" not "yes".
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
* m4/stdio_h.m4 (gl_STDIO_H): Move the AC_LIBOBJ back into the m4_ifdef
invocation.
Reported by Rob Vermaas <rob.vermaas@gmail.com>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* m4/gethostname.m4: s/is is/it is/
* m4/getdomainname.m4: Likewise.
|
|
|
|
|
| |
* m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): When testing for sa_len,
include <sys/types.h> before <sys/socket.h>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* m4/gnulib-common.m4 (gl_ASSERT_NO_GNULIB_POSIXCHECK): Hide the
gl_WARN_ON_USE_PREPARE definition from 'aclocal'.
Reported by Simon Josefsson <simon@josefsson.org>.
|
|
|
|
|
|
|
|
|
|
| |
* m4/afunix.m4 (gl_SOCKET_AFUNIX): Drop check for something that
can be learned at compile time.
* lib/passfd.c (MSG_CMSG_CLOEXEC): Reduce number of in-function
ifdefs.
(passfd, recvfd): Follow gnulib code conventions.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
|
| |
* m4/valgrind-tests.m4: Add `--error-exitcode=1 --leak-check=full'
to VALGRIND.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While trying to modify Emacs to use gnulib's socklen module,
I discovered a circular dependency: socklen depends on sys_socket
and vice versa. Emacs can use socklen, but it does not need
sys_socket because it has its own substitute for sys/socket.h.
* m4/socklen.m4 (gl_SOCKET_HEADERS): New macro, extracted from
gl_TYPE_SOCKLEN_T.
(gl_CHECK_SOCKET_HEADERS): New macro, taken from parts of
gl_PREREQ_SYS_H_SOCKET.
(gl_TYPE_SOCKLEN_T): Require it instead of requiring
gl_PREREQ_SYS_H_SOCKET.
* m4/sys_socket_h.m4 (gl_PREREQ_SYS_H_SOCKET): Require
gl_CHECK_SOCKET_HEADERS instead of doing its work ourselves.
* modules/socklen (Depends-on): Do not depend on sys_socket.
(Include): Adjust to match the code used in gl_SOCKET_HEADERS.
|
|
|
|
| |
* m4/socklen.m4: Update comment about platforms.
|
|
|
|
| |
* m4/afunix.m4 (gl_SOCKET_AFUNIX): Define _LINUX_SOURCE_COMPAT.
|
|
|
|
|
|
| |
* lib/sys_socket.in.h: Include <stddef.h>.
* m4/afunix.m4 (gl_SOCKET_AFUNIX): Include <stddef.h> before using
CMSG_FIRSTHDR. Remove unused variable.
|
|
|
|
|
|
|
|
|
|
| |
* lib/passfd.h (recvfd): Add a flags argument.
* lib/passfd.c: Include <fcntl.h>, cloexec.h.
(recvfd): Add a flags argument.
* m4/afunix.m4 (gl_SOCKET_AFUNIX): Test whether MSG_CMSG_CLOEXEC
exists.
* modules/passfd (Depends-on): Add cloexec.
Suggested by Eric Blake.
|
|
|
|
|
|
|
| |
* m4/afunix.m4 (gl_SOCKET_AFUNIX): Update AC_REQUIRE invocation.
Improve indentation. Improve AC_MSG_CHECKING messages.
* m4/sockpfaf.m4 (gl_SOCKET_FAMILY_UNIX): New macro, extracted from
gl_SOCKET_FAMILIES.
|
|
|
|
|
|
| |
* m4/afunix.m4: New file.
* m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Also test for UNIX domain
sockets.
|
|
|
|
|
|
| |
* m4/openmp.m4 (AC_OPENMP): Sync from Autoconf.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* m4/stdio_h.m4 (gl_STDIO_H): Do not require gl_ASM_SYMBOL_PREFIX,
since this symbol is needed only if printf is replaced.
* m4/printf-posix-rpl.m4 (gl_REPLACE_PRINTF):
Require gl_ASM_SYMBOL_PREFIX.
* modules/printf-posix (Files): Add m4/asm-underscore.m4.
* modules/sigpipe (Files): Likewise. Also, add m4/stdio-write.c.
(Depends-on): Add 'raise'.
(configure.ac): Require gl_ASM_SYMBOL_PREFIX.
* modules/stdio (Files): Remove lib/stdio-write.c,
m4/asm-underscore.m4.
(Depends-on): Remove 'raise'.
|
|
|
|
|
|
| |
* m4/fseeko.m4 (gl_STDIN_LARGE_OFFSET): Moved here, from ...
* m4/stdio_h.m4 (gl_STDIN_LARGE_OFFSET): ... here, because
* modules/ftello (Files): Add m4/fseeko.m4, for gl_STDIN_LARGE_OFFSET.
|
|
|
|
|
|
|
|
|
| |
* m4/openmp.m4 (_AC_LANG_OPENMP(Fortran 77)): Use '!$'
OpenMP-conditional compilation construct, to force compile
failure with missing OpenMP flag.
(AC_OPENMP): Add flags for Cray CCE and NEC SX compilers.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
m4/dos.m4 needs to go. It laboriously invokes the C compiler, and
extracts symbols from it, puts them into config.h; but it's much
easier to use the symbols directly. filename.h already does this,
but it disagrees with dos.m4 in some respects. This patch
introduces a different include file dosname.h that packages up
dos.m4, and then later we can work on merging filename.h and
dosname.h. Applications that need only the easy-to-configure
symbols should consider including dosname.h rather than dirname.h.
* NEWS: Mention incompatible changes.
* m4/dos.m4: Remove.
* lib/dosname.h, modules/dosname: New files.
* lib/dirname.h (ISSLASH, FILE_SYSTEM_PREFIX_LEN):
(FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE):
(IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): Move to lib/dosname.h.
* lib/at-func.c, lib/at-func2.c, lib/openat.c, lib/savewd.c:
Include dosname.h, not dirname.h.
* lib/rmdir.c, lib/stat.c, lib/unlink.c, lib/unlinkat.c:
Include dosname.h, for definitions of symbols like ISSLASH
that used to be in config.h.
* m4/dirname.m4 (gl_DIRNAME_LGPL): Do not require gl_AC_DOS.
* m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise.
* m4/stat.m4 (gl_FUNC_STAT): Likewise.
* m4/unlink.m4 (gl_FUNC_UNLINK): Likewise.
* modules/dirname-lgpl (Files): Omit m4/dos.m4.
* modules/rmdir (Files): Likewise.
* modules/stat (Files): Likewise.
* modules/unlink (Files): Likewise.
* modules/dirname-lgpl (Depends-on): Add dosname.
* modules/lstat (Depends-on): Likewise.
* modules/openat (Depends-on): Likewise.
* modules/rmdir (Depends-on): Likewise.
* modules/savewd (Depends-on): Likewise.
* modules/stat (Depends-on): Likewise.
* modules/unlink (Depends-on): Likewise.
* modules/openat (Depends-on): Remove dirname-lgpl.
* modules/savewd (Depends-on): Likewise.
* tests/test-dirname.c: Do not use removed symbols like
FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR. Instead, use
the remaining symbols, e.g., ISSLASH ('\\').
|
|
|
|
|
| |
* m4/remove.m4 (gl_FUNC_REMOVE): Don't require gl_AC_DOS; not needed.
* modules/remove (FILES): Remove m4/dos.m4.
|
|
|
|
|
|
|
|
|
| |
* m4/backupfile.m4 (gl_BACKUPFILE): Don't require gl_AC_DOS; none
of its symbols are used by the backupfile code. backupfile.c does
use a symbol HAVE_DOS_FILE_NAMES, but that symbol is meant only
for the rare case of programs that want all their backup file
names to live within 8+3 limits, and dos.m4 doesn't address that.
* modules/backupfile (Files): Remove m4/dos.m4.
|