diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2020-07-30 13:58:58 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2020-07-30 14:01:49 -0700 |
commit | 5d89a9c2846d32b4726faaf5c8652f3f23dc7d73 (patch) | |
tree | 9a27cdda7b90665cb8e953885ccfa9f4b6f7456a /m4/gnulib-common.m4 | |
parent | 88b4516cf8c3ff39803430452b8adbb86a73642a (diff) | |
download | emacs-5d89a9c2846d32b4726faaf5c8652f3f23dc7d73.tar.gz |
Update from Gnulib
This incorporates:
2020-07-30 work around some Oracle Studio attribute bugs
2020-07-29 fsusage, regex, stat-size: remove Cray support
2020-07-26 inttypes: remove support for AIX 4
2020-07-26 gettimeofday: remove workaround for Mac OS X 10.0
2020-07-26 don't require gl_LOCALTIME_BUFFER_DEFAULTS
2020-07-26 alloca: remove Cray-2 and Cray Y-MP support
2020-07-26 libgmp: remove dependency on havelib
2020-07-26 libgmp: remove HAVE_GMP, LIB_GMP
2020-07-25 multiarch: prepare for x86_64+arm64 universal in macOS 11
2020-07-25 sigprocmask: small autoconf macro improvement
2020-07-25 small autoconf macro improvements
2020-07-24 timespec: remove dependence on ‘verify’
2020-07-24 optimize a few more three-valued comparisons
2020-07-24 fix _GL_CMP parenthesization typo
2020-07-23 optimize three-valued comparison between integers
2020-07-24 doc: update for Mac OS X 10.13
2020-07-23 fchmodat, lchmod: use /proc on Cygwin
2020-07-21 inttypes: fix PRI*PTR and SCN*PTR on 64-bit native Windows
2020-07-12 libgmp: avoid warning when --without-libgmp is used
2020-07-12 libgmp: link to the correct shared library
* lib/mini-gmp-gnulib.c: Ignore -Wsuggest-attribute=malloc only for
* build-aux/config.guess, build-aux/config.sub:
* build-aux/install-sh, doc/misc/texinfo.tex, lib/c-strcasecmp.c:
* lib/c-strncasecmp.c, lib/fchmodat.c, lib/fsusage.c:
* lib/gettimeofday.c, lib/inttypes.in.h, lib/lchmod.c:
* lib/mini-gmp-gnulib.c, lib/nstrftime.c, lib/regex.h, lib/timespec.h:
* m4/alloca.m4, m4/getgroups.m4, m4/gettimeofday.m4:
* m4/gnulib-common.m4, m4/inttypes.m4, m4/libgmp.m4, m4/mktime.m4:
* m4/multiarch.m4:
Copy from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* src/Makefile.in, test/Makefile.in (LIBGMP):
Rename from LIB_GMP for compatibility with Gnulib.
All uses changed.
Diffstat (limited to 'm4/gnulib-common.m4')
-rw-r--r-- | m4/gnulib-common.m4 | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index f4ba5e3a00d..57f3a780118 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 @@ -1,4 +1,4 @@ -# gnulib-common.m4 serial 50 +# gnulib-common.m4 serial 52 dnl Copyright (C) 2007-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -120,9 +120,14 @@ AC_DEFUN([gl_COMMON_BODY], [ #endif /* Avoid __attribute__ ((cold)) on MinGW; see thread starting at - <https://lists.gnu.org/r/emacs-devel/2019-04/msg01152.html>. */ + <https://lists.gnu.org/r/emacs-devel/2019-04/msg01152.html>. + Also, Oracle Studio 12.6 requires 'cold' not '__cold__'. */ #if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__ -# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__)) +# ifndef __SUNPRO_C +# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__)) +# else +# define _GL_ATTRIBUTE_COLD __attribute__ ((cold)) +# endif #else # define _GL_ATTRIBUTE_COLD #endif @@ -176,7 +181,8 @@ AC_DEFUN([gl_COMMON_BODY], [ # define _GL_ATTRIBUTE_LEAF #endif -#if _GL_HAS_ATTRIBUTE (may_alias) +/* Oracle Studio 12.6 mishandles may_alias despite __has_attribute OK. */ +#if _GL_HAS_ATTRIBUTE (may_alias) && !defined __SUNPRO_C # define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__)) #else # define _GL_ATTRIBUTE_MAY_ALIAS @@ -293,6 +299,20 @@ AC_DEFUN([gl_COMMON_BODY], [ errno. */ #define _GL_ASYNC_SAFE ]) + AH_VERBATIM([micro_optimizations], +[/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2. + It returns + 1 if n1 > n2 + 0 if n1 == n2 + -1 if n1 < n2 + The naïve code (n1 > n2 ? 1 : n1 < n2 ? -1 : 0) produces a conditional + jump with nearly all GCC versions up to GCC 10. + This variant (n1 < n2 ? -1 : n1 > n2) produces a conditional with many + GCC versions up to GCC 9. + The better code (n1 > n2) - (n1 < n2) from Hacker's Delight § 2-9 + avoids conditional jumps in all GCC versions >= 3.4. */ +#define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2))) +]) dnl Hint which direction to take regarding cross-compilation guesses: dnl When a user installs a program on a platform they are not intimately dnl familiar with, --enable-cross-guesses=conservative is the appropriate @@ -612,6 +632,15 @@ AC_DEFUN([gl_BIGENDIAN], AC_C_BIGENDIAN ]) +# gl_SILENT(command) +# executes command, but without the normal configure output. +AC_DEFUN([gl_SILENT], +[ + { + $1 + } AS_MESSAGE_FD>/dev/null +]) + # gl_CACHE_VAL_SILENT(cache-id, command-to-set-it) # is like AC_CACHE_VAL(cache-id, command-to-set-it), except that it does not # output a spurious "(cached)" mark in the midst of other configure output. |