diff options
-rw-r--r-- | etc/PROBLEMS | 7 | ||||
-rw-r--r-- | lib/gnulib.mk.in | 1 | ||||
-rw-r--r-- | lib/limits.in.h | 11 | ||||
-rw-r--r-- | lib/stat-time.h | 8 | ||||
-rw-r--r-- | lib/stdalign.in.h | 2 | ||||
-rw-r--r-- | lib/stdint.in.h | 43 | ||||
-rw-r--r-- | lib/timespec.h | 8 | ||||
-rw-r--r-- | m4/flexmember.m4 | 7 | ||||
-rw-r--r-- | m4/gnulib-comp.m4 | 7 | ||||
-rw-r--r-- | m4/stdalign.m4 | 4 |
10 files changed, 67 insertions, 31 deletions
diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 145dd140093..e415887a4d8 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -1959,13 +1959,6 @@ EOF This is a bug in HPUX; HPUX patch PHKL_16260 is said to fix it. -*** HP-UX 11.31 cc: Emacs does not build. - -HP-UX 11.31 cc has bugs in its implementation of flexible array -members, a C99 feature that Emacs relies on. To work around the -problem, install GCC and use it to build Emacs. For details, see: -http://lists.gnu.org/archive/html/bug-gnulib/2017-03/msg00066.html - ** AIX *** AIX: Trouble using ptys. diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in index badfe3207b7..2c0b689e710 100644 --- a/lib/gnulib.mk.in +++ b/lib/gnulib.mk.in @@ -927,6 +927,7 @@ standardlisppath = @standardlisppath@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ version = @version@ +with_mailutils = @with_mailutils@ x_default_search_path = @x_default_search_path@ # End of GNU Make output. diff --git a/lib/limits.in.h b/lib/limits.in.h index a7e307f5c66..08d3c328c4a 100644 --- a/lib/limits.in.h +++ b/lib/limits.in.h @@ -28,6 +28,17 @@ #ifndef _@GUARD_PREFIX@_LIMITS_H #define _@GUARD_PREFIX@_LIMITS_H +/* For HP-UX 11.31. */ +#if defined LONG_LONG_MIN && !defined LLONG_MIN +# define LLONG_MIN LONG_LONG_MIN +#endif +#if defined LONG_LONG_MAX && !defined LLONG_MAX +# define LLONG_MAX LONG_LONG_MAX +#endif +#if defined ULONG_LONG_MAX && !defined ULLONG_MAX +# define ULLONG_MAX ULONG_LONG_MAX +#endif + /* The number of usable bits in an unsigned or signed integer type with minimum value MIN and maximum value MAX, as an int expression suitable in #if. Cover all known practical hosts. This diff --git a/lib/stat-time.h b/lib/stat-time.h index 9402b3fc1c0..47469892ee2 100644 --- a/lib/stat-time.h +++ b/lib/stat-time.h @@ -31,6 +31,10 @@ _GL_INLINE_HEADER_BEGIN # define _GL_STAT_TIME_INLINE _GL_INLINE #endif +#ifdef __cplusplus +extern "C" { +#endif + /* STAT_TIMESPEC (ST, ST_XTIM) is the ST_XTIM member for *ST of type struct timespec, if available. If not, then STAT_TIMESPEC_NS (ST, ST_XTIM) is the nanosecond component of the ST_XTIM member for *ST, @@ -194,6 +198,10 @@ get_stat_birthtime (struct stat const *st) return t; } +#ifdef __cplusplus +} +#endif + _GL_INLINE_HEADER_END #endif diff --git a/lib/stdalign.in.h b/lib/stdalign.in.h index 5f56eeefd3f..ea248231701 100644 --- a/lib/stdalign.in.h +++ b/lib/stdalign.in.h @@ -103,7 +103,7 @@ # elif ((defined __APPLE__ && defined __MACH__ \ ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ : __GNUC__) \ - || 061200 <= __HP_cc || 061200 <= __HP_aCC \ + || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \ || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__) # define _Alignas(a) __attribute__ ((__aligned__ (a))) # elif 1300 <= _MSC_VER diff --git a/lib/stdint.in.h b/lib/stdint.in.h index d899c1e034e..5fbec34310f 100644 --- a/lib/stdint.in.h +++ b/lib/stdint.in.h @@ -128,8 +128,13 @@ Return an unspecified value if BITS == 0, adding a check to pacify picky compilers. */ -# define _STDINT_MIN(signed, bits, zero) \ - ((signed) ? ~ _STDINT_MAX (signed, bits, zero) : (zero)) +/* These are separate macros, because if you try to merge these macros into + a single one, HP-UX cc rejects the resulting expression in constant + expressions. */ +# define _STDINT_UNSIGNED_MIN(bits, zero) \ + (zero) +# define _STDINT_SIGNED_MIN(bits, zero) \ + (~ _STDINT_MAX (1, bits, zero)) # define _STDINT_MAX(signed, bits, zero) \ (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) @@ -512,15 +517,15 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) # undef PTRDIFF_MAX # if @APPLE_UNIVERSAL_BUILD@ # ifdef _LP64 -# define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l) +# define PTRDIFF_MIN _STDINT_SIGNED_MIN (64, 0l) # define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) # else -# define PTRDIFF_MIN _STDINT_MIN (1, 32, 0) +# define PTRDIFF_MIN _STDINT_SIGNED_MIN (32, 0) # define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) # endif # else # define PTRDIFF_MIN \ - _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) + _STDINT_SIGNED_MIN (@BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) # define PTRDIFF_MAX \ _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) # endif @@ -528,9 +533,13 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) /* sig_atomic_t limits */ # undef SIG_ATOMIC_MIN # undef SIG_ATOMIC_MAX -# define SIG_ATOMIC_MIN \ - _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ - 0@SIG_ATOMIC_T_SUFFIX@) +# if @HAVE_SIGNED_SIG_ATOMIC_T@ +# define SIG_ATOMIC_MIN \ + _STDINT_SIGNED_MIN (@BITSIZEOF_SIG_ATOMIC_T@, 0@SIG_ATOMIC_T_SUFFIX@) +# else +# define SIG_ATOMIC_MIN \ + _STDINT_UNSIGNED_MIN (@BITSIZEOF_SIG_ATOMIC_T@, 0@SIG_ATOMIC_T_SUFFIX@) +# endif # define SIG_ATOMIC_MAX \ _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ 0@SIG_ATOMIC_T_SUFFIX@) @@ -566,16 +575,26 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) # endif # undef WCHAR_MIN # undef WCHAR_MAX -# define WCHAR_MIN \ - _STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) +# if @HAVE_SIGNED_WCHAR_T@ +# define WCHAR_MIN \ + _STDINT_SIGNED_MIN (@BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) +# else +# define WCHAR_MIN \ + _STDINT_UNSIGNED_MIN (@BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) +# endif # define WCHAR_MAX \ _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) /* wint_t limits */ # undef WINT_MIN # undef WINT_MAX -# define WINT_MIN \ - _STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) +# if @HAVE_SIGNED_WINT_T@ +# define WINT_MIN \ + _STDINT_SIGNED_MIN (@BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) +# else +# define WINT_MIN \ + _STDINT_UNSIGNED_MIN (@BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) +# endif # define WINT_MAX \ _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) diff --git a/lib/timespec.h b/lib/timespec.h index a5eca797ce3..f5d823aefe9 100644 --- a/lib/timespec.h +++ b/lib/timespec.h @@ -29,6 +29,10 @@ _GL_INLINE_HEADER_BEGIN # define _GL_TIMESPEC_INLINE _GL_INLINE #endif +#ifdef __cplusplus +extern "C" { +#endif + /* Resolution of timespec timestamps (in units per second), and log base 10 of the resolution. */ @@ -107,6 +111,10 @@ timespectod (struct timespec a) void gettime (struct timespec *); int settime (struct timespec const *); +#ifdef __cplusplus +} +#endif + _GL_INLINE_HEADER_END #endif diff --git a/m4/flexmember.m4 b/m4/flexmember.m4 index 35580ac27c4..9d3b50d1575 100644 --- a/m4/flexmember.m4 +++ b/m4/flexmember.m4 @@ -1,4 +1,4 @@ -# serial 4 +# serial 5 # Check for flexible array member support. # Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc. @@ -17,12 +17,15 @@ AC_DEFUN([AC_C_FLEXIBLE_ARRAY_MEMBER], [[#include <stdlib.h> #include <stdio.h> #include <stddef.h> - struct s { int n; double d[]; };]], + struct m { struct m *next, **list; char name[]; }; + struct s { struct s *p; struct m *m; int n; double d[]; };]], [[int m = getchar (); size_t nbytes = offsetof (struct s, d) + m * sizeof (double); nbytes += sizeof (struct s) - 1; nbytes -= nbytes % sizeof (struct s); struct s *p = malloc (nbytes); + p->p = p; + p->m = NULL; p->d[0] = 0.0; return p->d != (double *) NULL;]])], [ac_cv_c_flexmember=yes], diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 index bf7afa51bf6..e613490f1a4 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 @@ -787,8 +787,6 @@ changequote([, ])dnl AC_SUBST([LIBGNU_LIBDEPS]) LIBGNU_LTLIBDEPS="$gl_ltlibdeps" AC_SUBST([LIBGNU_LTLIBDEPS]) - LIBTESTS_LIBDEPS="$gltests_libdeps" - AC_SUBST([LIBTESTS_LIBDEPS]) ]) # Like AC_LIBOBJ, except that the module name goes @@ -1106,9 +1104,4 @@ AC_DEFUN([gl_FILE_LIST], [ m4/warnings.m4 m4/wchar_t.m4 m4/wint_t.m4 - tests=lib/_Noreturn.h - tests=lib/arg-nonnull.h - tests=lib/c++defs.h - tests=lib/dummy.c - tests=lib/warn-on-use.h ]) diff --git a/m4/stdalign.m4 b/m4/stdalign.m4 index 3a1265824e5..0652a1e4af5 100644 --- a/m4/stdalign.m4 +++ b/m4/stdalign.m4 @@ -35,8 +35,8 @@ AC_DEFUN([gl_STDALIGN_H], || (defined __APPLE__ && defined __MACH__ \ ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ : __GNUC__) \ - || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \ - || __ICC || 0x5110 <= __SUNPRO_C \ + || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \ + || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \ || 1300 <= _MSC_VER) struct alignas_test { char c; char alignas (8) alignas_8; }; char test_alignas[offsetof (struct alignas_test, alignas_8) == 8 |