diff options
| author | Paul Eggert | 2024-12-23 13:55:59 -0800 |
|---|---|---|
| committer | Paul Eggert | 2024-12-26 16:29:02 -0800 |
| commit | cf5e58a14dedabd65dee297ee2a2abb05cd4449d (patch) | |
| tree | 0774997184ada06fafff9e9a0033215d3eb725b4 /lib | |
| parent | 85ca91ff912da7c3a672e4bfe6ce103a23ddec73 (diff) | |
| download | emacs-cf5e58a14dedabd65dee297ee2a2abb05cd4449d.tar.gz emacs-cf5e58a14dedabd65dee297ee2a2abb05cd4449d.zip | |
Update from Gnulib by running admin/merge-gnulib
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/endian.c | 2 | ||||
| -rw-r--r-- | lib/intprops-internal.h | 9 | ||||
| -rw-r--r-- | lib/limits.in.h | 6 | ||||
| -rw-r--r-- | lib/signal.in.h | 6 | ||||
| -rw-r--r-- | lib/stdbit.c | 2 | ||||
| -rw-r--r-- | lib/stdbit.in.h | 3 | ||||
| -rw-r--r-- | lib/stdio.in.h | 6 | ||||
| -rw-r--r-- | lib/stdlib.c | 2 | ||||
| -rw-r--r-- | lib/stdlib.in.h | 9 | ||||
| -rw-r--r-- | lib/string.in.h | 6 | ||||
| -rw-r--r-- | lib/unistd.c | 2 |
11 files changed, 30 insertions, 23 deletions
diff --git a/lib/endian.c b/lib/endian.c index 3e7e56f523d..089f5f7825e 100644 --- a/lib/endian.c +++ b/lib/endian.c | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | 17 | ||
| 18 | /* Written by Collin Funk. */ | 18 | /* Written by Collin Funk. */ |
| 19 | 19 | ||
| 20 | #define _GL_ENDIAN_INLINE _GL_EXTERN_INLINE | ||
| 20 | #include <config.h> | 21 | #include <config.h> |
| 21 | 22 | ||
| 22 | #define _GL_ENDIAN_INLINE _GL_EXTERN_INLINE | ||
| 23 | #include <endian.h> | 23 | #include <endian.h> |
diff --git a/lib/intprops-internal.h b/lib/intprops-internal.h index c8cc0e20194..0b7e1f539aa 100644 --- a/lib/intprops-internal.h +++ b/lib/intprops-internal.h | |||
| @@ -77,10 +77,11 @@ | |||
| 77 | 77 | ||
| 78 | /* Does the __typeof__ keyword work? This could be done by | 78 | /* Does the __typeof__ keyword work? This could be done by |
| 79 | 'configure', but for now it's easier to do it by hand. */ | 79 | 'configure', but for now it's easier to do it by hand. */ |
| 80 | #if (2 <= __GNUC__ \ | 80 | #if ((defined __GNUC__ && 2 <= __GNUC__) \ |
| 81 | || (4 <= __clang_major__) \ | 81 | || (defined __clang_major__ && 4 <= __clang_major__) \ |
| 82 | || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \ | 82 | || (defined __IBMC__ && 1210 <= __IBMC__ && defined __IBM__TYPEOF__) \ |
| 83 | || (0x5110 <= __SUNPRO_C && !__STDC__)) | 83 | || (defined __SUNPRO_C && 0x5110 <= __SUNPRO_C && !__STDC__) \ |
| 84 | || (defined _MSC_VER && 1939 <= _MSC_VER)) | ||
| 84 | # define _GL_HAVE___TYPEOF__ 1 | 85 | # define _GL_HAVE___TYPEOF__ 1 |
| 85 | #else | 86 | #else |
| 86 | # define _GL_HAVE___TYPEOF__ 0 | 87 | # define _GL_HAVE___TYPEOF__ 0 |
diff --git a/lib/limits.in.h b/lib/limits.in.h index c65eb4c1cfe..3347e369fb5 100644 --- a/lib/limits.in.h +++ b/lib/limits.in.h | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | #endif | 20 | #endif |
| 21 | @PRAGMA_COLUMNS@ | 21 | @PRAGMA_COLUMNS@ |
| 22 | 22 | ||
| 23 | #if defined _GL_ALREADY_INCLUDING_LIMITS_H | 23 | #if defined _@GUARD_PREFIX@_ALREADY_INCLUDING_LIMITS_H |
| 24 | /* Special invocation convention: | 24 | /* Special invocation convention: |
| 25 | On Haiku/x86_64, we have a sequence of nested includes | 25 | On Haiku/x86_64, we have a sequence of nested includes |
| 26 | <limits.h> -> <syslimits.h> -> <limits.h>. | 26 | <limits.h> -> <syslimits.h> -> <limits.h>. |
| @@ -34,12 +34,12 @@ | |||
| 34 | 34 | ||
| 35 | #ifndef _@GUARD_PREFIX@_LIMITS_H | 35 | #ifndef _@GUARD_PREFIX@_LIMITS_H |
| 36 | 36 | ||
| 37 | # define _GL_ALREADY_INCLUDING_LIMITS_H | 37 | # define _@GUARD_PREFIX@_ALREADY_INCLUDING_LIMITS_H |
| 38 | 38 | ||
| 39 | /* The include_next requires a split double-inclusion guard. */ | 39 | /* The include_next requires a split double-inclusion guard. */ |
| 40 | # @INCLUDE_NEXT@ @NEXT_LIMITS_H@ | 40 | # @INCLUDE_NEXT@ @NEXT_LIMITS_H@ |
| 41 | 41 | ||
| 42 | # undef _GL_ALREADY_INCLUDING_LIMITS_H | 42 | # undef _@GUARD_PREFIX@_ALREADY_INCLUDING_LIMITS_H |
| 43 | 43 | ||
| 44 | #ifndef _@GUARD_PREFIX@_LIMITS_H | 44 | #ifndef _@GUARD_PREFIX@_LIMITS_H |
| 45 | #define _@GUARD_PREFIX@_LIMITS_H | 45 | #define _@GUARD_PREFIX@_LIMITS_H |
diff --git a/lib/signal.in.h b/lib/signal.in.h index 6239b90adf3..18c88f0c1d7 100644 --- a/lib/signal.in.h +++ b/lib/signal.in.h | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | #endif | 20 | #endif |
| 21 | @PRAGMA_COLUMNS@ | 21 | @PRAGMA_COLUMNS@ |
| 22 | 22 | ||
| 23 | #if defined __need_sig_atomic_t || defined __need_sigset_t || defined _GL_ALREADY_INCLUDING_SIGNAL_H || (defined _SIGNAL_H && !defined __SIZEOF_PTHREAD_MUTEX_T) | 23 | #if defined __need_sig_atomic_t || defined __need_sigset_t || defined _@GUARD_PREFIX@_ALREADY_INCLUDING_SIGNAL_H || (defined _SIGNAL_H && !defined __SIZEOF_PTHREAD_MUTEX_T) |
| 24 | /* Special invocation convention: | 24 | /* Special invocation convention: |
| 25 | - Inside glibc header files. | 25 | - Inside glibc header files. |
| 26 | - On glibc systems we have a sequence of nested includes | 26 | - On glibc systems we have a sequence of nested includes |
| @@ -39,7 +39,7 @@ | |||
| 39 | 39 | ||
| 40 | #ifndef _@GUARD_PREFIX@_SIGNAL_H | 40 | #ifndef _@GUARD_PREFIX@_SIGNAL_H |
| 41 | 41 | ||
| 42 | #define _GL_ALREADY_INCLUDING_SIGNAL_H | 42 | #define _@GUARD_PREFIX@_ALREADY_INCLUDING_SIGNAL_H |
| 43 | 43 | ||
| 44 | /* Define pid_t, uid_t. | 44 | /* Define pid_t, uid_t. |
| 45 | Also, mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. | 45 | Also, mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. |
| @@ -50,7 +50,7 @@ | |||
| 50 | /* The include_next requires a split double-inclusion guard. */ | 50 | /* The include_next requires a split double-inclusion guard. */ |
| 51 | #@INCLUDE_NEXT@ @NEXT_SIGNAL_H@ | 51 | #@INCLUDE_NEXT@ @NEXT_SIGNAL_H@ |
| 52 | 52 | ||
| 53 | #undef _GL_ALREADY_INCLUDING_SIGNAL_H | 53 | #undef _@GUARD_PREFIX@_ALREADY_INCLUDING_SIGNAL_H |
| 54 | 54 | ||
| 55 | #ifndef _@GUARD_PREFIX@_SIGNAL_H | 55 | #ifndef _@GUARD_PREFIX@_SIGNAL_H |
| 56 | #define _@GUARD_PREFIX@_SIGNAL_H | 56 | #define _@GUARD_PREFIX@_SIGNAL_H |
diff --git a/lib/stdbit.c b/lib/stdbit.c index 4801e74d281..b9c52698e91 100644 --- a/lib/stdbit.c +++ b/lib/stdbit.c | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | 17 | ||
| 18 | /* Written by Paul Eggert. */ | 18 | /* Written by Paul Eggert. */ |
| 19 | 19 | ||
| 20 | #define _GL_STDBIT_INLINE _GL_EXTERN_INLINE | ||
| 20 | #include <config.h> | 21 | #include <config.h> |
| 21 | 22 | ||
| 22 | #define _GL_STDBIT_INLINE _GL_EXTERN_INLINE | ||
| 23 | #include <stdbit.h> | 23 | #include <stdbit.h> |
diff --git a/lib/stdbit.in.h b/lib/stdbit.in.h index 20b9f4f4662..91d237d7ad0 100644 --- a/lib/stdbit.in.h +++ b/lib/stdbit.in.h | |||
| @@ -77,7 +77,8 @@ _GL_INLINE_HEADER_BEGIN | |||
| 77 | #if ((defined __GNUC__ && 2 <= __GNUC__) \ | 77 | #if ((defined __GNUC__ && 2 <= __GNUC__) \ |
| 78 | || (defined __clang_major__ && 4 <= __clang_major__) \ | 78 | || (defined __clang_major__ && 4 <= __clang_major__) \ |
| 79 | || (defined __IBMC__ && 1210 <= __IBMC__ && defined __IBM__TYPEOF__) \ | 79 | || (defined __IBMC__ && 1210 <= __IBMC__ && defined __IBM__TYPEOF__) \ |
| 80 | || (defined __SUNPRO_C && 0x5110 <= __SUNPRO_C && !__STDC__)) | 80 | || (defined __SUNPRO_C && 0x5110 <= __SUNPRO_C && !__STDC__) \ |
| 81 | || (defined _MSC_VER && 1939 <= _MSC_VER)) | ||
| 81 | # define _GL_STDBIT_TYPEOF_CAST(a, b) ((__typeof__ (a)) (b)) | 82 | # define _GL_STDBIT_TYPEOF_CAST(a, b) ((__typeof__ (a)) (b)) |
| 82 | #elif 202311 <= __STDC_VERSION__ | 83 | #elif 202311 <= __STDC_VERSION__ |
| 83 | # define _GL_STDBIT_TYPEOF_CAST(a, b) ((typeof (a)) (b)) | 84 | # define _GL_STDBIT_TYPEOF_CAST(a, b) ((typeof (a)) (b)) |
diff --git a/lib/stdio.in.h b/lib/stdio.in.h index e77798d9b25..ed260d308b0 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | #endif | 20 | #endif |
| 21 | @PRAGMA_COLUMNS@ | 21 | @PRAGMA_COLUMNS@ |
| 22 | 22 | ||
| 23 | #if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H | 23 | #if defined __need_FILE || defined __need___FILE || defined _@GUARD_PREFIX@_ALREADY_INCLUDING_STDIO_H || defined _GL_SKIP_GNULIB_STDIO_H |
| 24 | /* Special invocation convention: | 24 | /* Special invocation convention: |
| 25 | - Inside glibc header files. | 25 | - Inside glibc header files. |
| 26 | - On OSF/1 5.1 we have a sequence of nested includes | 26 | - On OSF/1 5.1 we have a sequence of nested includes |
| @@ -48,12 +48,12 @@ | |||
| 48 | # endif | 48 | # endif |
| 49 | #endif | 49 | #endif |
| 50 | 50 | ||
| 51 | #define _GL_ALREADY_INCLUDING_STDIO_H | 51 | #define _@GUARD_PREFIX@_ALREADY_INCLUDING_STDIO_H |
| 52 | 52 | ||
| 53 | /* The include_next requires a split double-inclusion guard. */ | 53 | /* The include_next requires a split double-inclusion guard. */ |
| 54 | #@INCLUDE_NEXT@ @NEXT_STDIO_H@ | 54 | #@INCLUDE_NEXT@ @NEXT_STDIO_H@ |
| 55 | 55 | ||
| 56 | #undef _GL_ALREADY_INCLUDING_STDIO_H | 56 | #undef _@GUARD_PREFIX@_ALREADY_INCLUDING_STDIO_H |
| 57 | 57 | ||
| 58 | #ifdef _GL_DEFINED__POSIX_C_SOURCE | 58 | #ifdef _GL_DEFINED__POSIX_C_SOURCE |
| 59 | # undef _GL_DEFINED__POSIX_C_SOURCE | 59 | # undef _GL_DEFINED__POSIX_C_SOURCE |
diff --git a/lib/stdlib.c b/lib/stdlib.c index 521d64627dc..6f70fa4bbda 100644 --- a/lib/stdlib.c +++ b/lib/stdlib.c | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | You should have received a copy of the GNU Lesser General Public License | 15 | You should have received a copy of the GNU Lesser General Public License |
| 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
| 17 | 17 | ||
| 18 | #define _GL_STDLIB_INLINE _GL_EXTERN_INLINE | ||
| 18 | #include <config.h> | 19 | #include <config.h> |
| 19 | 20 | ||
| 20 | #define _GL_STDLIB_INLINE _GL_EXTERN_INLINE | ||
| 21 | #include <stdlib.h> | 21 | #include <stdlib.h> |
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index adbef69131b..14f45cc21e5 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h | |||
| @@ -746,15 +746,20 @@ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " | |||
| 746 | # endif | 746 | # endif |
| 747 | #endif | 747 | #endif |
| 748 | 748 | ||
| 749 | /* Return maximum number of bytes of a multibyte character. */ | 749 | /* Return maximum number of bytes in a multibyte character in the |
| 750 | current locale. */ | ||
| 750 | #if @REPLACE_MB_CUR_MAX@ | 751 | #if @REPLACE_MB_CUR_MAX@ |
| 751 | # if !GNULIB_defined_MB_CUR_MAX | 752 | # if !GNULIB_defined_MB_CUR_MAX |
| 752 | _GL_STDLIB_INLINE int | 753 | _GL_STDLIB_INLINE size_t |
| 753 | gl_MB_CUR_MAX (void) | 754 | gl_MB_CUR_MAX (void) |
| 754 | { | 755 | { |
| 756 | # if 0 < @REPLACE_MB_CUR_MAX@ | ||
| 757 | return @REPLACE_MB_CUR_MAX@; | ||
| 758 | # else | ||
| 755 | /* Turn the value 3 to the value 4, as needed for the UTF-8 encoding. */ | 759 | /* Turn the value 3 to the value 4, as needed for the UTF-8 encoding. */ |
| 756 | int gl_mb_cur_max = MB_CUR_MAX; | 760 | int gl_mb_cur_max = MB_CUR_MAX; |
| 757 | return gl_mb_cur_max == 3 ? 4 : gl_mb_cur_max; | 761 | return gl_mb_cur_max == 3 ? 4 : gl_mb_cur_max; |
| 762 | # endif | ||
| 758 | } | 763 | } |
| 759 | # undef MB_CUR_MAX | 764 | # undef MB_CUR_MAX |
| 760 | # define MB_CUR_MAX gl_MB_CUR_MAX () | 765 | # define MB_CUR_MAX gl_MB_CUR_MAX () |
diff --git a/lib/string.in.h b/lib/string.in.h index f5a6d8b3267..72cd7566e65 100644 --- a/lib/string.in.h +++ b/lib/string.in.h | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | #endif | 20 | #endif |
| 21 | @PRAGMA_COLUMNS@ | 21 | @PRAGMA_COLUMNS@ |
| 22 | 22 | ||
| 23 | #if defined _GL_ALREADY_INCLUDING_STRING_H | 23 | #if defined _@GUARD_PREFIX@_ALREADY_INCLUDING_STRING_H |
| 24 | /* Special invocation convention: | 24 | /* Special invocation convention: |
| 25 | - On OS X/NetBSD we have a sequence of nested includes | 25 | - On OS X/NetBSD we have a sequence of nested includes |
| 26 | <string.h> -> <strings.h> -> "string.h" | 26 | <string.h> -> <strings.h> -> "string.h" |
| @@ -34,12 +34,12 @@ | |||
| 34 | 34 | ||
| 35 | #ifndef _@GUARD_PREFIX@_STRING_H | 35 | #ifndef _@GUARD_PREFIX@_STRING_H |
| 36 | 36 | ||
| 37 | #define _GL_ALREADY_INCLUDING_STRING_H | 37 | #define _@GUARD_PREFIX@_ALREADY_INCLUDING_STRING_H |
| 38 | 38 | ||
| 39 | /* The include_next requires a split double-inclusion guard. */ | 39 | /* The include_next requires a split double-inclusion guard. */ |
| 40 | #@INCLUDE_NEXT@ @NEXT_STRING_H@ | 40 | #@INCLUDE_NEXT@ @NEXT_STRING_H@ |
| 41 | 41 | ||
| 42 | #undef _GL_ALREADY_INCLUDING_STRING_H | 42 | #undef _@GUARD_PREFIX@_ALREADY_INCLUDING_STRING_H |
| 43 | 43 | ||
| 44 | #ifndef _@GUARD_PREFIX@_STRING_H | 44 | #ifndef _@GUARD_PREFIX@_STRING_H |
| 45 | #define _@GUARD_PREFIX@_STRING_H | 45 | #define _@GUARD_PREFIX@_STRING_H |
diff --git a/lib/unistd.c b/lib/unistd.c index f3b3f7bd2fe..b25112eb91e 100644 --- a/lib/unistd.c +++ b/lib/unistd.c | |||
| @@ -15,8 +15,8 @@ | |||
| 15 | You should have received a copy of the GNU Lesser General Public License | 15 | You should have received a copy of the GNU Lesser General Public License |
| 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
| 17 | 17 | ||
| 18 | #define _GL_UNISTD_INLINE _GL_EXTERN_INLINE | ||
| 18 | #include <config.h> | 19 | #include <config.h> |
| 19 | 20 | ||
| 20 | #define _GL_UNISTD_INLINE _GL_EXTERN_INLINE | ||
| 21 | #include <unistd.h> | 21 | #include <unistd.h> |
| 22 | typedef int dummy; | 22 | typedef int dummy; |