diff options
| author | Paul Eggert | 2017-03-19 13:07:03 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-03-19 13:09:31 -0700 |
| commit | fa90c5e86e2b11e89c6a1d709e25003a60656f0d (patch) | |
| tree | 278612addfeefebe9318afd6d052f54accacb108 /lib | |
| parent | 20ccaa63dbf20c0a64e0df360800ee61423252b7 (diff) | |
| download | emacs-fa90c5e86e2b11e89c6a1d709e25003a60656f0d.tar.gz emacs-fa90c5e86e2b11e89c6a1d709e25003a60656f0d.zip | |
Merge from gnulib
This gets Emacs working again with HP-UX Itanium cc.
It incorporates:
2017-03-19 stdalign: tweak version# and test for HP-UX IA64
2017-03-18 stdalign: restore previous behavior for HP-UX IA64
2017-03-17 stat-time, timespec: Support header files in C++ mode
2017-03-17 stdalign: Make it work with HP-UX cc
2017-03-17 flexmember: try to detect HP-UX 11.31 cc bug
2017-03-16 stdint: Fix test compilation failure with HP-UX 11 cc.
2017-03-14 gnulib-tool: don't produce tests with only snippets
2017-03-14 limits-h: Make it work with HP-UX cc.
* etc/PROBLEMS: Remove now-obsolete entry for HP-UX 11.31.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/limits.in.h, lib/stat-time.h, lib/stdalign.in.h:
* lib/stdint.in.h, lib/timespec.h, m4/flexmember.m4, m4/stdalign.m4:
Copy from gnulib.
Diffstat (limited to 'lib')
| -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 |
6 files changed, 60 insertions, 13 deletions
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@ | |||
| 927 | sysconfdir = @sysconfdir@ | 927 | sysconfdir = @sysconfdir@ |
| 928 | target_alias = @target_alias@ | 928 | target_alias = @target_alias@ |
| 929 | version = @version@ | 929 | version = @version@ |
| 930 | with_mailutils = @with_mailutils@ | ||
| 930 | x_default_search_path = @x_default_search_path@ | 931 | x_default_search_path = @x_default_search_path@ |
| 931 | # End of GNU Make output. | 932 | # End of GNU Make output. |
| 932 | 933 | ||
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 @@ | |||
| 28 | #ifndef _@GUARD_PREFIX@_LIMITS_H | 28 | #ifndef _@GUARD_PREFIX@_LIMITS_H |
| 29 | #define _@GUARD_PREFIX@_LIMITS_H | 29 | #define _@GUARD_PREFIX@_LIMITS_H |
| 30 | 30 | ||
| 31 | /* For HP-UX 11.31. */ | ||
| 32 | #if defined LONG_LONG_MIN && !defined LLONG_MIN | ||
| 33 | # define LLONG_MIN LONG_LONG_MIN | ||
| 34 | #endif | ||
| 35 | #if defined LONG_LONG_MAX && !defined LLONG_MAX | ||
| 36 | # define LLONG_MAX LONG_LONG_MAX | ||
| 37 | #endif | ||
| 38 | #if defined ULONG_LONG_MAX && !defined ULLONG_MAX | ||
| 39 | # define ULLONG_MAX ULONG_LONG_MAX | ||
| 40 | #endif | ||
| 41 | |||
| 31 | /* The number of usable bits in an unsigned or signed integer type | 42 | /* The number of usable bits in an unsigned or signed integer type |
| 32 | with minimum value MIN and maximum value MAX, as an int expression | 43 | with minimum value MIN and maximum value MAX, as an int expression |
| 33 | suitable in #if. Cover all known practical hosts. This | 44 | 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 | |||
| 31 | # define _GL_STAT_TIME_INLINE _GL_INLINE | 31 | # define _GL_STAT_TIME_INLINE _GL_INLINE |
| 32 | #endif | 32 | #endif |
| 33 | 33 | ||
| 34 | #ifdef __cplusplus | ||
| 35 | extern "C" { | ||
| 36 | #endif | ||
| 37 | |||
| 34 | /* STAT_TIMESPEC (ST, ST_XTIM) is the ST_XTIM member for *ST of type | 38 | /* STAT_TIMESPEC (ST, ST_XTIM) is the ST_XTIM member for *ST of type |
| 35 | struct timespec, if available. If not, then STAT_TIMESPEC_NS (ST, | 39 | struct timespec, if available. If not, then STAT_TIMESPEC_NS (ST, |
| 36 | ST_XTIM) is the nanosecond component of the ST_XTIM member for *ST, | 40 | ST_XTIM) is the nanosecond component of the ST_XTIM member for *ST, |
| @@ -194,6 +198,10 @@ get_stat_birthtime (struct stat const *st) | |||
| 194 | return t; | 198 | return t; |
| 195 | } | 199 | } |
| 196 | 200 | ||
| 201 | #ifdef __cplusplus | ||
| 202 | } | ||
| 203 | #endif | ||
| 204 | |||
| 197 | _GL_INLINE_HEADER_END | 205 | _GL_INLINE_HEADER_END |
| 198 | 206 | ||
| 199 | #endif | 207 | #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 @@ | |||
| 103 | # elif ((defined __APPLE__ && defined __MACH__ \ | 103 | # elif ((defined __APPLE__ && defined __MACH__ \ |
| 104 | ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ | 104 | ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ |
| 105 | : __GNUC__) \ | 105 | : __GNUC__) \ |
| 106 | || 061200 <= __HP_cc || 061200 <= __HP_aCC \ | 106 | || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \ |
| 107 | || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__) | 107 | || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__) |
| 108 | # define _Alignas(a) __attribute__ ((__aligned__ (a))) | 108 | # define _Alignas(a) __attribute__ ((__aligned__ (a))) |
| 109 | # elif 1300 <= _MSC_VER | 109 | # 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 @@ | |||
| 128 | Return an unspecified value if BITS == 0, adding a check to pacify | 128 | Return an unspecified value if BITS == 0, adding a check to pacify |
| 129 | picky compilers. */ | 129 | picky compilers. */ |
| 130 | 130 | ||
| 131 | # define _STDINT_MIN(signed, bits, zero) \ | 131 | /* These are separate macros, because if you try to merge these macros into |
| 132 | ((signed) ? ~ _STDINT_MAX (signed, bits, zero) : (zero)) | 132 | a single one, HP-UX cc rejects the resulting expression in constant |
| 133 | expressions. */ | ||
| 134 | # define _STDINT_UNSIGNED_MIN(bits, zero) \ | ||
| 135 | (zero) | ||
| 136 | # define _STDINT_SIGNED_MIN(bits, zero) \ | ||
| 137 | (~ _STDINT_MAX (1, bits, zero)) | ||
| 133 | 138 | ||
| 134 | # define _STDINT_MAX(signed, bits, zero) \ | 139 | # define _STDINT_MAX(signed, bits, zero) \ |
| 135 | (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) | 140 | (((((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) | |||
| 512 | # undef PTRDIFF_MAX | 517 | # undef PTRDIFF_MAX |
| 513 | # if @APPLE_UNIVERSAL_BUILD@ | 518 | # if @APPLE_UNIVERSAL_BUILD@ |
| 514 | # ifdef _LP64 | 519 | # ifdef _LP64 |
| 515 | # define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l) | 520 | # define PTRDIFF_MIN _STDINT_SIGNED_MIN (64, 0l) |
| 516 | # define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) | 521 | # define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) |
| 517 | # else | 522 | # else |
| 518 | # define PTRDIFF_MIN _STDINT_MIN (1, 32, 0) | 523 | # define PTRDIFF_MIN _STDINT_SIGNED_MIN (32, 0) |
| 519 | # define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) | 524 | # define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) |
| 520 | # endif | 525 | # endif |
| 521 | # else | 526 | # else |
| 522 | # define PTRDIFF_MIN \ | 527 | # define PTRDIFF_MIN \ |
| 523 | _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) | 528 | _STDINT_SIGNED_MIN (@BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) |
| 524 | # define PTRDIFF_MAX \ | 529 | # define PTRDIFF_MAX \ |
| 525 | _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) | 530 | _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) |
| 526 | # endif | 531 | # endif |
| @@ -528,9 +533,13 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) | |||
| 528 | /* sig_atomic_t limits */ | 533 | /* sig_atomic_t limits */ |
| 529 | # undef SIG_ATOMIC_MIN | 534 | # undef SIG_ATOMIC_MIN |
| 530 | # undef SIG_ATOMIC_MAX | 535 | # undef SIG_ATOMIC_MAX |
| 531 | # define SIG_ATOMIC_MIN \ | 536 | # if @HAVE_SIGNED_SIG_ATOMIC_T@ |
| 532 | _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ | 537 | # define SIG_ATOMIC_MIN \ |
| 533 | 0@SIG_ATOMIC_T_SUFFIX@) | 538 | _STDINT_SIGNED_MIN (@BITSIZEOF_SIG_ATOMIC_T@, 0@SIG_ATOMIC_T_SUFFIX@) |
| 539 | # else | ||
| 540 | # define SIG_ATOMIC_MIN \ | ||
| 541 | _STDINT_UNSIGNED_MIN (@BITSIZEOF_SIG_ATOMIC_T@, 0@SIG_ATOMIC_T_SUFFIX@) | ||
| 542 | # endif | ||
| 534 | # define SIG_ATOMIC_MAX \ | 543 | # define SIG_ATOMIC_MAX \ |
| 535 | _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ | 544 | _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ |
| 536 | 0@SIG_ATOMIC_T_SUFFIX@) | 545 | 0@SIG_ATOMIC_T_SUFFIX@) |
| @@ -566,16 +575,26 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) | |||
| 566 | # endif | 575 | # endif |
| 567 | # undef WCHAR_MIN | 576 | # undef WCHAR_MIN |
| 568 | # undef WCHAR_MAX | 577 | # undef WCHAR_MAX |
| 569 | # define WCHAR_MIN \ | 578 | # if @HAVE_SIGNED_WCHAR_T@ |
| 570 | _STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) | 579 | # define WCHAR_MIN \ |
| 580 | _STDINT_SIGNED_MIN (@BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) | ||
| 581 | # else | ||
| 582 | # define WCHAR_MIN \ | ||
| 583 | _STDINT_UNSIGNED_MIN (@BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) | ||
| 584 | # endif | ||
| 571 | # define WCHAR_MAX \ | 585 | # define WCHAR_MAX \ |
| 572 | _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) | 586 | _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) |
| 573 | 587 | ||
| 574 | /* wint_t limits */ | 588 | /* wint_t limits */ |
| 575 | # undef WINT_MIN | 589 | # undef WINT_MIN |
| 576 | # undef WINT_MAX | 590 | # undef WINT_MAX |
| 577 | # define WINT_MIN \ | 591 | # if @HAVE_SIGNED_WINT_T@ |
| 578 | _STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) | 592 | # define WINT_MIN \ |
| 593 | _STDINT_SIGNED_MIN (@BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) | ||
| 594 | # else | ||
| 595 | # define WINT_MIN \ | ||
| 596 | _STDINT_UNSIGNED_MIN (@BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) | ||
| 597 | # endif | ||
| 579 | # define WINT_MAX \ | 598 | # define WINT_MAX \ |
| 580 | _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) | 599 | _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) |
| 581 | 600 | ||
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 | |||
| 29 | # define _GL_TIMESPEC_INLINE _GL_INLINE | 29 | # define _GL_TIMESPEC_INLINE _GL_INLINE |
| 30 | #endif | 30 | #endif |
| 31 | 31 | ||
| 32 | #ifdef __cplusplus | ||
| 33 | extern "C" { | ||
| 34 | #endif | ||
| 35 | |||
| 32 | /* Resolution of timespec timestamps (in units per second), and log | 36 | /* Resolution of timespec timestamps (in units per second), and log |
| 33 | base 10 of the resolution. */ | 37 | base 10 of the resolution. */ |
| 34 | 38 | ||
| @@ -107,6 +111,10 @@ timespectod (struct timespec a) | |||
| 107 | void gettime (struct timespec *); | 111 | void gettime (struct timespec *); |
| 108 | int settime (struct timespec const *); | 112 | int settime (struct timespec const *); |
| 109 | 113 | ||
| 114 | #ifdef __cplusplus | ||
| 115 | } | ||
| 116 | #endif | ||
| 117 | |||
| 110 | _GL_INLINE_HEADER_END | 118 | _GL_INLINE_HEADER_END |
| 111 | 119 | ||
| 112 | #endif | 120 | #endif |