diff options
| author | Paul Eggert | 2024-07-15 19:03:17 -0700 |
|---|---|---|
| committer | Paul Eggert | 2024-07-16 15:37:18 -0700 |
| commit | f5dbdedcc53d2c57b9ddecbe9248c90ef0fa08d6 (patch) | |
| tree | f839c5fb8a24a52ffb3eca7c80cffb0d8579aa43 /lib/stdlib.in.h | |
| parent | fd8bdedde9655f04c03eb04af09f73ee77600f53 (diff) | |
| download | emacs-f5dbdedcc53d2c57b9ddecbe9248c90ef0fa08d6.tar.gz emacs-f5dbdedcc53d2c57b9ddecbe9248c90ef0fa08d6.zip | |
Update from Gnulib by running admin/merge-gnulib
Diffstat (limited to 'lib/stdlib.in.h')
| -rw-r--r-- | lib/stdlib.in.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index cfc69d0a506..e42368eef27 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h | |||
| @@ -20,9 +20,18 @@ | |||
| 20 | #endif | 20 | #endif |
| 21 | @PRAGMA_COLUMNS@ | 21 | @PRAGMA_COLUMNS@ |
| 22 | 22 | ||
| 23 | #if defined __need_system_stdlib_h || defined __need_malloc_and_calloc | 23 | #if (defined __need_system_stdlib_h && !defined _GLIBCXX_STDLIB_H) || defined __need_malloc_and_calloc |
| 24 | /* Special invocation conventions inside some gnulib header files, | 24 | /* Special invocation conventions inside some gnulib header files, |
| 25 | and inside some glibc header files, respectively. */ | 25 | and inside some glibc header files, respectively. |
| 26 | Do not recognize this special invocation convention when GCC's | ||
| 27 | c++/11/stdlib.h is being included or has been included. This is needed | ||
| 28 | to support the use of clang+llvm binaries on Ubuntu 22.04 with | ||
| 29 | CXX="$clangdir/bin/clang++ -I/usr/include/c++/11 \ | ||
| 30 | -I/usr/include/x86_64-linux-gnu/c++/11 | ||
| 31 | -L/usr/lib/gcc/x86_64-linux-gnu/11 | ||
| 32 | -Wl,-rpath,$clangdir/lib" | ||
| 33 | because in this case /usr/include/c++/11/stdlib.h (which does not support | ||
| 34 | the convention) is seen before the gnulib-generated stdlib.h. */ | ||
| 26 | 35 | ||
| 27 | #@INCLUDE_NEXT@ @NEXT_STDLIB_H@ | 36 | #@INCLUDE_NEXT@ @NEXT_STDLIB_H@ |
| 28 | 37 | ||
| @@ -108,6 +117,17 @@ struct random_data | |||
| 108 | # include <unistd.h> | 117 | # include <unistd.h> |
| 109 | #endif | 118 | #endif |
| 110 | 119 | ||
| 120 | #if ((@GNULIB_STRTOL@ && @REPLACE_STRTOL@) || (@GNULIB_STRTOLL@ && @REPLACE_STRTOLL@) || (@GNULIB_STRTOUL@ && @REPLACE_STRTOUL@) || (@GNULIB_STRTOULL@ && @REPLACE_STRTOULL@)) && defined __cplusplus && !defined GNULIB_NAMESPACE && defined __GNUG__ && !defined __clang__ && defined __sun | ||
| 121 | /* When strtol, strtoll, strtoul, or strtoull is going to be defined as a macro | ||
| 122 | below, this may cause compilation errors later in the libstdc++ header files | ||
| 123 | (that are part of GCC), such as: | ||
| 124 | error: 'rpl_strtol' is not a member of 'std' | ||
| 125 | To avoid this, include the relevant header files here, before these symbols | ||
| 126 | get defined as macros. But do so only on Solaris 11 (where it is needed), | ||
| 127 | not on mingw (where it would cause other compilation errors). */ | ||
| 128 | # include <string> | ||
| 129 | #endif | ||
| 130 | |||
| 111 | /* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers | 131 | /* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers |
| 112 | that can be freed by passing them as the Ith argument to the | 132 | that can be freed by passing them as the Ith argument to the |
| 113 | function F. */ | 133 | function F. */ |