summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* version-etc: new yearEric Blake2014-01-012-1/+6
| | | | | | * lib/version-etc.c (COPYRIGHT_YEAR): Bump to 2014. Signed-off-by: Eric Blake <eblake@redhat.com>
* autoupdateKarl Berry2013-12-251-192/+145
|
* passfd: give nicer error for recvfd at eofEric Blake2013-12-243-3/+19
| | | | | | | | | | | | | I noticed that recvfd() fails with errno set to EACCES if the other end of the socket has closed (such as if it calls _exit()); but "Permission denied" as the strerror() message doesn't read very well. This improves things to give the nicer message: "Transport endpoint is not connected". * lib/passfd.c (recvfd): Fake ENOTCONN if other end closes early. * tests/test-passfd.c (main): Enhance test to cover this. Signed-off-by: Eric Blake <eblake@redhat.com>
* autoupdateKarl Berry2013-12-172-5/+12
|
* gettimeofday: port recent C++ fix to EmacsPaul Eggert2013-12-175-35/+51
| | | | | | | | | | | | | | | | | | | Without this further patch, Emacs won't build due to the portcheck failing. Also, this simplifies the patch a bit. * lib/time.in.h (localtime, gmtime): Don't replace unless GNULIB_GETTIMEOFDAY. Treat them more like mktime. * lib/time.in.h (localtime, gmtime): * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): * modules/time (time.h): Don't worry about about the possibility of localtime and gmtime being absent; they're present in all C libraries we know about. * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Don't assume sys_time is present and has been initialized. Instead, use a hack that should work even if it hasn't been. Don't use a portcheck for gmtime or localtime; this supports the hack. * modules/time (time.h): Substitute GNULIB_GETTIMEOFDAY.
* gettimeofday: fix C++ crosscompilationJohn W. Eaton2013-12-175-4/+69
| | | | | | | | | | | | | | | Never replace gmtime and localtime by macros when compiling with C++, this prevents <ctime> from being included. * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Do not define gmtime and localtime as preprocessor macros. Instead define some HAVE_GMTIME, HAVE_LOCALTIME, REPLACE_GMTIME, and REPLACE_LOCALTIME substitutions. * lib/time.in.h: Declare gmtime and localtime when needed. * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): AC_SUBST HAVE_GMTIME, HAVE_LOCALTIME, REPLACE_GMTIME, and REPLACE_LOCALTIME. * modules/time: Depend on gettimeofday, and substitute the above variables in time.h.
* qacl: port to Windows betterPaul Eggert2013-12-172-5/+15
| | | | | | | | See Eli Zaretskii in <http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00593.html>. * lib/file-has-acl.c (acl_access_nontrivial): Return -1 and set errno if !HAVE_ACL_FIRST_ENTRY && !HAVE_ACL_TO_SHORT_TEXT && !HAVE_ACL_FREE_TEXT.
* md5, sha1, sha256, sha512: fix compile error in c++ modeAlexander V. Lukyanov2013-12-122-3/+8
| | | | * lib/gl_openssl.h: Cast void pointers to a specific type.
* open-tests: fix build failure with -Werror=old-style-declarationPádraig Brady2013-12-092-1/+6
| | | | * tests/test-open.h: Reorder the inline to avoid the issue.
* md5, sha1, sha256, sha512: fix link error with partial libcryptoPádraig Brady2013-12-093-2/+12
| | | | | | | * m4/gl-openssl.m4 (gl_CRYPTO_CHECK): Only clear LIB_CRYPTO at init time, so that if early checks find crypto routines, while the last does not, then @LIB_CRYPTO@ is replaced correctly, avoiding link failures.
* md5, sha1, sha256, sha512: add gl_SET_CRYPTO_CHECK_DEFAULTPaul Eggert2013-12-072-3/+19
| | | | | | | | | | This provides a new way to specify the default for gl_CRYPTO_CHECK, one that is reflected in the --help message. Emacs uses this, as well as the old way. This attempts to implement a suggestion by Pádraig Brady in <http://lists.gnu.org/archive/html/coreutils/2013-12/msg00080.html>. * m4/gl-openssl.m4(gl_SET_CRYPTO_CHECK_DEFAULT): New macro. (gl_CRYPTO_CHECK): Use it. Mention the default in --help output.
* md5, sha1, sha256, sha512: add 'auto', and a way to specify defaultPaul Eggert2013-12-072-7/+19
| | | | | | | | * m4/gl-openssl.m4 (gl_CRYPTO_CHECK): Add support for a new option, --with-openssl=auto, which causes the library to be used if available and silently ignored if not. Add support to allow allow configure.ac to specify its own default, by setting with_openssl_default before invoking gl_INIT.
* autoupdateKarl Berry2013-12-061-17/+23
|
* bootstrap: warn about BSD toolchain snafuEric Blake2013-12-051-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | With my help on IRC, Roman Bogorodskiy identified a bug where the BSD autoconf wrapper script eats stdin[1], which in turn causes autopoint from gettext 0.18.3 to fail to find AM_GNU_GETTEXT_VERSION out of configure.ac[2], with this error: ./bootstrap: autopoint --force autopoint: *** Missing version: please specify in configure.ac through a line 'AM_GNU_GETTEXT_VERSION(x.yy.zz)' the gettext version the package is using [1] http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/184479 [2] http://git.sv.gnu.org/cgit/gettext.git/commit/gettext-tools/misc/autopoint.in?id=eea2dddde The workaround would be painful to automate (because gettext hardcodes the use of autom4te rather than honoring ${AUTOM4TE}, we'd have to create a temporary wrapper earlier in $PATH that forwards to the real autom4te-x.yz - basically, repeating the logic of what a wrapper script was supposed to do). Further, while the broken autom4te definitely hurts gettext 0.18.3, it tends to have no issues with gettext 0.18.2; and since the problem has been identified, it will not be long before fixed autom4te and/or improved gettext that is not so stubborn about using exactly 'autom4te' will be available. Therefore, for now we just warn about the situation. * build-aux/bootstrap: Alert users to a broken autom4te. Signed-off-by: Eric Blake <eblake@redhat.com>
* open-tests: port to glibc with _FORTIFY_SOURCE and -O1Paul Eggert2013-12-052-1/+19
| | | | | | | | Problem reported by Daiki Ueno in: http://lists.gnu.org/archive/html/bug-gnulib/2013-06/msg00052.html * tests/test-open.h (__always_inline): New macro, if not already defined. (test_open): Use it.
* include_next: minimize code duplicationEric Blake2013-12-043-50/+11
| | | | | | | | | | | | I noticed some code duplication while trying to resolve a bug originally reported by Rhys Ulerich: https://lists.gnu.org/archive/html/bug-gnulib/2013-10/msg00049.html * modules/include_next (Depends-on): Add absolute-header. * m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Reuse gl_ABSOLUTE_HEADER_ONE instead of open-coding it. Signed-off-by: Eric Blake <eblake@redhat.com>
* getcwd: fix compile error in configure checkPádraig Brady2013-12-042-0/+6
| | | | | | Introduced in commit ca369c8d, 2013-02-03 * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): Include errno.h
* regex: suppress core dumps from detection codePádraig Brady2013-12-042-3/+19
| | | | | | | * m4/regex.m4 (gl_REGEX): Catch the SIGABRT and convert to SIGTERM to suppress core dumps that may well occur on glibc systems. These core dumps might not be cleaned up automatically, or could trigger some system core dump handling logic.
* md5, sha1, sha256, sha512: support mandating use of opensslPádraig Brady2013-12-042-3/+17
| | | | | | | | | | * m4/gl-openssl.m4 (gl_CRYPTO_CHECK): Adjust the --with-openssl description, to list the now 3 separate options. Also don't mention the default=no, since this is implicit given the option is described as --with-openssl rather than --without-openssl. If projects change the default they're free to document that. With --with-openssl[=yes] we now error out when the specified hash algorithm is not available in libcrypto.
* test-xvasprintf: disable some -Wformat-security diagnosticsIvailo2013-12-032-0/+13
| | | | | * tests/test-xvasprintf.c: Disable -Wformat-zero-length and -Wformat-nonliteral checks, as these edge cases are part of the test.
* regex: avoid glibc deadlock during configureEric Blake2013-12-032-2/+19
| | | | | | | | | | | | | | | | | | glibc has a known bug where certain corruptions of the heap can cause malloc to default to printing a debug message that includes a backtrace, but the act of getting the backtrace uses dlopen which in turn calls into malloc, causing a recursive lock ending in deadlock. Thus, when configure is probing for a known glibc heap corruption bug, the overall configure would hang. The solution suggested by glibc developers is to force malloc to quit printing debug messages, which avoids recursive malloc. * m4/regex.m4 (gl_REGEX): Avoid recursive malloc deadlock when glibc bug 15078 in turn triggers bug 16159. Reported by Michal Privoznik. Signed-off-by: Eric Blake <eblake@redhat.com>
* md5, sha1, sha256, sha512: use openssl routines if availablePádraig Brady2013-12-0335-38/+350
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --with-openssl the libcrypto md5, sha1, sha224, sha256, sha384, sha256 routines will be used if available, requiring apps to link @LIB_CRYPTO@ * lib/gl_openssl.h: Provide wrappers for specified openssl hash. * m4/gl-openssl.m4 (gl_CRYPTO_CHECK): New function to lookup libcrypto in the standard system location. * m4/sha1.m4: Call gl_CRYPTO_CHECK() for SHA1. * m4/sha256.m4: Likewise with SHA256. * m4/sha512.m4: Likewise with SHA512. * m4/md5.m4: Likewise with MD5. * m4/gc.m4: Ensure @LIB_CRYPTO@ set for tests. * lib/sha1.h: Include wrappers if HAVE_OPENSSL_SHA1. * lib/sha256.h: Likewise with SHA256. * lib/sha512.h: Likewise with SHA512. * lib/md5.h: Likewise with MD5. * lib/sha1.c: Exlude functionality if HAVE_OPENSSL_SHA1. * lib/sha256.c: Likewise with SHA256. * lib/sha512.c: Likewise with SHA512. * lib/md5.c: Likewise with MD5. * modules/crypto/sha1 (Link:): Add the new optional lib. (Depends-on:): Add dependency on extern-inline. * modules/crypto/sha256: Likewise. * modules/crypto/sha512: Likewise. * modules/crypto/md5: Likewise. * modules/crypto/sha1-tests: Reference the lib here too. * modules/crypto/md5-tests: Likewise. * modules/crypto/gc-des-tests: Likewise. * modules/crypto/gc-hmac-md5-tests: Likewise. * modules/crypto/gc-hmac-sha1-tests: Likewise. * modules/crypto/gc-hmac-sha256-tests: Likewise. * modules/crypto/gc-hmac-sha512-tests: Likewise. * modules/crypto/gc-md5-tests: Likewise. * modules/crypto/gc-pbkdf2-sha1-tests: Likewise. * modules/crypto/gc-sha1-tests: Likewise. * modules/crypto/gc-tests: Likewise. * modules/crypto/hmac-md5-tests: Likewise. * modules/crypto/hmac-sha1-tests: Likewise. * modules/crypto/hmac-sha256-tests: Likewise. * modules/crypto/hmac-sha512-tests: Likewise.
* base64: fix recent compilation regression on some compilersRV9712013-11-292-1/+10
| | | | | | | | | | This fixes a compile failure with "Sun C 5.8 Patch 121015-05 2007/08/01" which returns: "base64.c", line 99: void function cannot return value * lib/base64.c: Don't return the void function, instead split to a separate return statement.
* autoupdateKarl Berry2013-11-281-19/+19
|
* autoupdateKarl Berry2013-11-281-11/+21
|
* ignore-value: revert previous code changePaul Eggert2013-11-282-4/+14
| | | | | | | * lib/ignore-value.h (ignore_value): Use __extension__ and __typeof__ only for GCC 3.4 and later. Reported by Eric Blake in <http://lists.gnu.org/archive/html/bug-gnulib/2013-11/msg00102.html>. Change the comment to try to explain this better.
* selinux-h: improve stub types and add more stub functionsPádraig Brady2013-11-283-1/+23
| | | | | | | | | * lib/se-selinux.in.h: Change security_context_t to a typedef rather than a define, as it's a pointer type and so is better as a typedef to avoid issues declaring multiple variables with the comma operator. Also add stub for string_to_security_class(). * lib/se-context.in.h: Add stub functions for context_{type,range,role,user}_get().
* ignore-value: prefer GCC version back through 2.0Paul Eggert2013-11-272-4/+13
| | | | | | | | The code didn't match the comments, so I did a bit of software archaeology. GCC 2.0 seems to support __extension__ and __typeof__, so fix both code and comments to use 2.0. * lib/ignore-value.h (ignore_value): Use __extension__ and __typeof__ for GCC 2.0 through 3.3, too.
* pty: Activate the signature wrapper of forkpty.Mats Erik Andersson2013-11-272-1/+13
| | | | | | | | | The intended preprocessor macro HAVE_FORKPTY is never defined, yet `lib/forkpty.c' depends on it. * m4/pty.m4 (gl_FUNC_FORKPTY): At completed analysis, apply AC_DEFINE_UNQUOTED to HAVE_FORKPTY with value $HAVE_FORKPTY for access to wrapper in `lib/forkpty.c'.
* maint: fix gendocs.sh permissionsEric Blake2013-11-271-0/+0
| | | | | | * build-aux/gendocs.sh: Restore executable bit. Signed-off-by: Eric Blake <eblake@redhat.com>
* autoupdateKarl Berry2013-11-261-1/+2
|
* quotearg: don't attempt to store 1 << 31 into an "int"Jim Meyering2013-11-222-1/+13
| | | | | | | | | | | * lib/quotearg.c (quotearg_buffer_restyled): Building coreutils with gcc's new -fsanitize=undefined and running its tests triggered some new test failures due to undefined behavior, all with this diagnostic: lib/quotearg.c:629:62: runtime error: left shift of 1 by 31 places \ cannot be represented in type int Rather than shifting "1" left to form a mask, shift the bits right and simply use "1" as the mask. Co-authored-by: Paul Eggert <eggert@cs.ucla.edu>
* error: depend on stdioPaul Eggert2013-11-212-0/+8
| | | | | | Problem reported by Nikos Mavrogiannopoulos in <http://lists.gnu.org/archive/html/bug-gnulib/2013-11/msg00084.html> * modules/error (Depends-on): Add stdio.
* doc: Improve wording in relocatable-maint.texi.Ben Pfaff2013-11-182-1/+7
| | | | Reported by Reuben Thomas <rrt@sc3d.org>.
* Fix indentation in previous patch.Paul Eggert2013-11-131-3/+3
|
* * lib/getgroups.c (posix_getgroups, getgroups) [__APPLE__]:Paul Eggert2013-11-132-0/+21
| | | | | New function and macro, to work around _DARWIN_C_SOURCE problem. Reported by Jack Howarth in <http://bugs.gnu.org/14463>.
* base64: provide a fast path for encoding well sized buffersPádraig Brady2013-11-112-6/+45
| | | | | | | | | | | | | | | | | | Avoid conditionals in the base64 encoding loop, which was seen to give a 60% throughput improvement with the base64 utility from coreutils: $ truncate -s100MiB file.in $ time base64-old -w0 < file.in >/dev/null real 0m0.302s $ time base64-new -w0 < file.in >/dev/null real 0m0.182s * lib/base64.c (base64_encode_fast): A new function to be called when we don't want to NUL terminate, and we have enough space in the output to encode the given input. (base64_encode): Call the _fast() version when appropriate. Also remove a redundant mask with 0x3F on the first encoded byte.
* extern-inline: port better to OS X 10.9Paul Eggert2013-11-082-7/+19
| | | | | | | * m4/extern-inline.m4: Omit serial number; this file doesn't use them. (gl_EXTERN_INLINE): Do not suppress the use of extern inline on OS X 10.9, except for g++ where the bug is still present. See <http://trac.macports.org/ticket/41033>.
* fpending: fix typoEric Blake2013-11-081-1/+1
| | | | | | | | Use correct witness macro name (reported by Paul Eggert). * lib/fpending.h (__fpending): s/DECL_FPENDING/DECL___FPENDING/. Signed-off-by: Eric Blake <eblake@redhat.com>
* fpending: fix regression on DragonFly BSDEric Blake2013-11-083-8/+20
| | | | | | | | | | | | Commit 3f5bf99e claimed that it is safe to declare __fpending twice, but in reality this caused a regression on Dragonfly BSD. Reported by GW in <https://lists.gnu.org/archive/html/bug-m4/2013-11/msg00000.html>, <https://lists.gnu.org/archive/html/bug-gnulib/2013-11/msg00022.html>. * m4/fpending.m4 (gl_FUNC_FPENDING): Check for declaration. * lib/fpending.h (__fpending): Don't declare twice. Signed-off-by: Eric Blake <eblake@redhat.com>
* hash: relax license to LGPLv2+, for libguestfsJim Meyering2013-11-052-1/+6
| | | | * modules/hash (License): Change from GPL to LGPLv2+.
* intprops: port to Oracle Studio c99Paul Eggert2013-11-032-1/+8
| | | | | * lib/intprops.h (_GL_HAVE___TYPEOF__) [__SUNPRO_C && __STDC__]: Define to 0, to avoid diagnostics when Oracle Studio is pedantic.
* obstack: pacify HP CPaul Eggert2013-10-312-13/+23
| | | | | | | | | * lib/obstack.h (obstack_free) [!__GNUC__]: Rewrite to avoid warning "conversion from pointer to smaller integer" from HP C-ANSI-C - cc version B9007AA/B3910B A.06.26. It's safe to assume C89 or later nowadays, so cast to void instead of int. Privately reported by H.Merijn Brand. Also, change header to match glibc's, to make checking against glibc easier.
* maint.mk: prefer gpgv2 over gpgvJim Meyering2013-10-312-1/+9
| | | | | | * top/maint.mk (gpgv): Use gpgv2 if present, else gpgv. (gpg_key_ID): Use $(gpgv), rather than hard-coding "gpgv". Reported by Gary Vaughan.
* isnan: port to VAXPaul Eggert2013-10-302-3/+23
| | | | | | | Reported by John Klos for NetBSD-5/VAX in <http://lists.gnu.org/archive/html/bug-gnulib/2013-10/msg00133.html>. * lib/isnan.c (IEEE_FLOATING_POINT): New macro, stolen from Emacs. (FUNC): Use it.
* gnulib-tool: protect against CDPATHJim Meyering2013-10-282-0/+10
| | | | | | | | * gnulib-tool: Many "cd" built-in functions print a directory name to stdout when CDPATH is set, e.g., $ bash -c 'CDPATH=/; cd tmp' /tmp Unset it, when possible. Prompted by a comment from Bruce Korb.
* maint.mk: restore functionality removed by recent changev0.1Jim Meyering2013-10-282-1/+17
| | | | | | | | | | | | | | Sunday's change, v0.0-8062-g6b24f60, may have appeared correct from the context of a shallow-cloned gnulib repository: "git describe" would fail in such a directory. However, that change made it so the reported gnulib revision no longer includes the version number or a commit count, even when run from a full clone. * top/maint.mk (gnulib-version): Use the full "git describe" output when possible, e.g., the form above, rather than the abbreviated, no-tag, no-commit-count string, and fall back to using a 10-byte hash, rather than the default minimal-length hash prefix, since while the minimal-length one may be fine today, it is likely not to be unique for very long.
* Revert "error: make the module depend on vfprintf-posix"Eric Blake2013-10-282-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 88e5b4d4641f294d8f824d770c9c55a1abe49768. The GPL 'error' module is used by some of the gnulib testsuites; and for some projects that use LGPL 'vasnprintf' in their lib/ directory, having 'error' depend on GPL 'vfprintf-posix' meant that compilation breaks for those projects: autoreconf: running: aclocal -I m4 --force -I m4 missing file gnulib/tests/vasnprintf.c configure.ac:135: error: expected source file, required through AC_LIBSOURCES, not found m4/gnulib-comp.m4:518: gl_INIT is expanded from... configure.ac:135: the top level autom4te: /usr/bin/m4 failed with exit status: 1 I suspect that the problem encountered on OS/x was a warning from gcc complaining about inconsistent use of __attribute__((__format__ __printf__)) vs. ((__format__ __gnu_printf__)); so perhaps the real fix is to teach error.h to copy the extra care taken by stdio.h with regards to whether merely system or full GNU printf specifiers are being handled. But without actually reproducing that situation myself, the easiest action for now is to just revert the dependency that violates the 'Comment' section of vfprintf-posix.
* maint.mk: fix "release" target to build _versionJim Meyering2013-10-262-0/+12
| | | | | | | | | | This fixes a bug in README-release whereby following the outlined steps, one would publish a tarball whose programs would report --version output not consistent with the package version number. This bug caused grep-2.15 to produce a grep program whose --version option made it print 2.14.56-1e3d rather than 2.15. * top/maint.mk (release): Making this target build "_version" ensures that the new version number is reflected in configure.
* maint.mk: get current gnulib revision correctly.Gary V. Vaughan2013-10-271-1/+1
| | | | | | | * top/maint.mk (gnulib-version): Use git rev-parse to get the current HEAD revision. Signed-off-by: Gary V. Vaughan <gary@gnu.org>