diff options
| author | Paul Eggert | 2024-09-17 00:32:39 -0700 |
|---|---|---|
| committer | Paul Eggert | 2024-09-17 00:35:03 -0700 |
| commit | 73427887d63c086fb88449dce79bf2f8e58183fa (patch) | |
| tree | c7727bc8d59a91ca37fe1ea4931742fb6d540496 | |
| parent | cbe8683410a117698606b929532d4a3e692729d7 (diff) | |
| download | emacs-73427887d63c086fb88449dce79bf2f8e58183fa.tar.gz emacs-73427887d63c086fb88449dce79bf2f8e58183fa.zip | |
Update from Gnulib by running admin/merge-gnulib
| -rw-r--r-- | lib/c++defs.h | 27 | ||||
| -rw-r--r-- | lib/faccessat.c | 8 | ||||
| -rw-r--r-- | lib/fcntl.in.h | 4 | ||||
| -rw-r--r-- | lib/inttypes.in.h | 8 | ||||
| -rw-r--r-- | lib/signal.in.h | 20 | ||||
| -rw-r--r-- | lib/stdbit.in.h | 2 | ||||
| -rw-r--r-- | lib/stdio.in.h | 12 | ||||
| -rw-r--r-- | lib/stdlib.in.h | 42 | ||||
| -rw-r--r-- | lib/string.in.h | 20 | ||||
| -rw-r--r-- | lib/sys_select.in.h | 6 | ||||
| -rw-r--r-- | lib/sys_stat.in.h | 8 | ||||
| -rw-r--r-- | lib/time.in.h | 8 | ||||
| -rw-r--r-- | lib/unistd.in.h | 54 | ||||
| -rw-r--r-- | lib/utimens.c | 4 | ||||
| -rw-r--r-- | lib/utimens.h | 8 | ||||
| -rw-r--r-- | m4/std-gnu11.m4 | 19 | ||||
| -rw-r--r-- | m4/utimens.m4 | 3 |
17 files changed, 141 insertions, 112 deletions
diff --git a/lib/c++defs.h b/lib/c++defs.h index 7082af3fc28..7843359caa8 100644 --- a/lib/c++defs.h +++ b/lib/c++defs.h | |||
| @@ -104,10 +104,15 @@ | |||
| 104 | # define _GL_EXTERN_C_FUNC | 104 | # define _GL_EXTERN_C_FUNC |
| 105 | #endif | 105 | #endif |
| 106 | 106 | ||
| 107 | /* _GL_FUNCDECL_RPL (func, rettype, parameters[, attributes]); | 107 | /* _GL_FUNCDECL_RPL (func, rettype, parameters, [attributes]); |
| 108 | declares a replacement function, named rpl_func, with the given prototype, | 108 | declares a replacement function, named rpl_func, with the given prototype, |
| 109 | consisting of return type, parameters, and attributes. | 109 | consisting of return type, parameters, and attributes. |
| 110 | Example: | 110 | Although attributes are optional, the comma before them is required |
| 111 | for portability to C17 and earlier. The attribute _GL_ATTRIBUTE_NOTHROW, | ||
| 112 | if needed, must be placed after the _GL_FUNCDECL_RPL invocation, | ||
| 113 | at the end of the declaration. | ||
| 114 | Examples: | ||
| 115 | _GL_FUNCDECL_RPL (free, void, (void *ptr), ) _GL_ATTRIBUTE_NOTHROW; | ||
| 111 | _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...), | 116 | _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...), |
| 112 | _GL_ARG_NONNULL ((1))); | 117 | _GL_ARG_NONNULL ((1))); |
| 113 | 118 | ||
| @@ -116,24 +121,22 @@ | |||
| 116 | because | 121 | because |
| 117 | [[...]] extern "C" <declaration>; | 122 | [[...]] extern "C" <declaration>; |
| 118 | is invalid syntax in C++.) | 123 | is invalid syntax in C++.) |
| 119 | |||
| 120 | Note: The attribute _GL_ATTRIBUTE_NOTHROW, if needed, must be placed outside | ||
| 121 | of the _GL_FUNCDECL_RPL invocation, at the end of the declaration. | ||
| 122 | */ | 124 | */ |
| 123 | #define _GL_FUNCDECL_RPL(func,rettype,parameters,...) \ | 125 | #define _GL_FUNCDECL_RPL(func,rettype,parameters,...) \ |
| 124 | _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters, __VA_ARGS__) | 126 | _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters, __VA_ARGS__) |
| 125 | #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ | 127 | #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ |
| 126 | _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters | 128 | _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters |
| 127 | 129 | ||
| 128 | /* _GL_FUNCDECL_SYS (func, rettype, parameters[, attributes]); | 130 | /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); |
| 129 | declares the system function, named func, with the given prototype, | 131 | declares the system function, named func, with the given prototype, |
| 130 | consisting of return type, parameters, and attributes. | 132 | consisting of return type, parameters, and attributes. |
| 131 | Example: | 133 | Although attributes are optional, the comma before them is required |
| 132 | _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...), | 134 | for portability to C17 and earlier. The attribute _GL_ATTRIBUTE_NOTHROW, |
| 133 | _GL_ARG_NONNULL ((1))); | 135 | if needed, must be placed after the _GL_FUNCDECL_RPL invocation, |
| 134 | 136 | at the end of the declaration. | |
| 135 | Note: The attribute _GL_ATTRIBUTE_NOTHROW, if needed, must be placed outside | 137 | Examples: |
| 136 | of the _GL_FUNCDECL_SYS invocation, at the end of the declaration. | 138 | _GL_FUNCDECL_SYS (getumask, mode_t, (void), ) _GL_ATTRIBUTE_NOTHROW; |
| 139 | _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); | ||
| 137 | */ | 140 | */ |
| 138 | #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ | 141 | #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ |
| 139 | _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters | 142 | _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters |
diff --git a/lib/faccessat.c b/lib/faccessat.c index 8178ca8632e..6eed1b642a6 100644 --- a/lib/faccessat.c +++ b/lib/faccessat.c | |||
| @@ -63,15 +63,17 @@ rpl_faccessat (int fd, char const *file, int mode, int flag) | |||
| 63 | { | 63 | { |
| 64 | int result = orig_faccessat (fd, file, mode, flag); | 64 | int result = orig_faccessat (fd, file, mode, flag); |
| 65 | 65 | ||
| 66 | if (result == 0 && file[strlen (file) - 1] == '/') | 66 | if (file[strlen (file) - 1] == '/') |
| 67 | { | 67 | { |
| 68 | struct stat st; | 68 | struct stat st; |
| 69 | result = fstatat (fd, file, &st, 0); | 69 | int ret = fstatat (fd, file, &st, 0); |
| 70 | if (result == 0 && !S_ISDIR (st.st_mode)) | 70 | if (ret == 0 && !S_ISDIR (st.st_mode)) |
| 71 | { | 71 | { |
| 72 | errno = ENOTDIR; | 72 | errno = ENOTDIR; |
| 73 | return -1; | 73 | return -1; |
| 74 | } | 74 | } |
| 75 | if (result == 0) | ||
| 76 | result = ret; | ||
| 75 | } | 77 | } |
| 76 | 78 | ||
| 77 | return result; | 79 | return result; |
diff --git a/lib/fcntl.in.h b/lib/fcntl.in.h index 8b8274295a5..fc65d40bc06 100644 --- a/lib/fcntl.in.h +++ b/lib/fcntl.in.h | |||
| @@ -141,14 +141,14 @@ _GL_CXXALIASWARN (creat); | |||
| 141 | # undef fcntl | 141 | # undef fcntl |
| 142 | # define fcntl rpl_fcntl | 142 | # define fcntl rpl_fcntl |
| 143 | # endif | 143 | # endif |
| 144 | _GL_FUNCDECL_RPL (fcntl, int, (int fd, int action, ...)); | 144 | _GL_FUNCDECL_RPL (fcntl, int, (int fd, int action, ...), ); |
| 145 | _GL_CXXALIAS_RPL (fcntl, int, (int fd, int action, ...)); | 145 | _GL_CXXALIAS_RPL (fcntl, int, (int fd, int action, ...)); |
| 146 | # if !GNULIB_defined_rpl_fcntl | 146 | # if !GNULIB_defined_rpl_fcntl |
| 147 | # define GNULIB_defined_rpl_fcntl 1 | 147 | # define GNULIB_defined_rpl_fcntl 1 |
| 148 | # endif | 148 | # endif |
| 149 | # else | 149 | # else |
| 150 | # if !@HAVE_FCNTL@ | 150 | # if !@HAVE_FCNTL@ |
| 151 | _GL_FUNCDECL_SYS (fcntl, int, (int fd, int action, ...)); | 151 | _GL_FUNCDECL_SYS (fcntl, int, (int fd, int action, ...), ); |
| 152 | # if !GNULIB_defined_fcntl | 152 | # if !GNULIB_defined_fcntl |
| 153 | # define GNULIB_defined_fcntl 1 | 153 | # define GNULIB_defined_fcntl 1 |
| 154 | # endif | 154 | # endif |
diff --git a/lib/inttypes.in.h b/lib/inttypes.in.h index e9c80f3dca5..747f1bb787c 100644 --- a/lib/inttypes.in.h +++ b/lib/inttypes.in.h | |||
| @@ -913,11 +913,11 @@ extern "C" { | |||
| 913 | # undef imaxabs | 913 | # undef imaxabs |
| 914 | # define imaxabs rpl_imaxabs | 914 | # define imaxabs rpl_imaxabs |
| 915 | # endif | 915 | # endif |
| 916 | _GL_FUNCDECL_RPL (imaxabs, intmax_t, (intmax_t x)); | 916 | _GL_FUNCDECL_RPL (imaxabs, intmax_t, (intmax_t x), ); |
| 917 | _GL_CXXALIAS_RPL (imaxabs, intmax_t, (intmax_t x)); | 917 | _GL_CXXALIAS_RPL (imaxabs, intmax_t, (intmax_t x)); |
| 918 | # else | 918 | # else |
| 919 | # if !@HAVE_DECL_IMAXABS@ | 919 | # if !@HAVE_DECL_IMAXABS@ |
| 920 | _GL_FUNCDECL_SYS (imaxabs, intmax_t, (intmax_t x)); | 920 | _GL_FUNCDECL_SYS (imaxabs, intmax_t, (intmax_t x), ); |
| 921 | # endif | 921 | # endif |
| 922 | _GL_CXXALIAS_SYS (imaxabs, intmax_t, (intmax_t x)); | 922 | _GL_CXXALIAS_SYS (imaxabs, intmax_t, (intmax_t x)); |
| 923 | # endif | 923 | # endif |
| @@ -944,11 +944,11 @@ typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t; | |||
| 944 | # undef imaxdiv | 944 | # undef imaxdiv |
| 945 | # define imaxdiv rpl_imaxdiv | 945 | # define imaxdiv rpl_imaxdiv |
| 946 | # endif | 946 | # endif |
| 947 | _GL_FUNCDECL_RPL (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); | 947 | _GL_FUNCDECL_RPL (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom), ); |
| 948 | _GL_CXXALIAS_RPL (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); | 948 | _GL_CXXALIAS_RPL (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); |
| 949 | # else | 949 | # else |
| 950 | # if !@HAVE_DECL_IMAXDIV@ | 950 | # if !@HAVE_DECL_IMAXDIV@ |
| 951 | _GL_FUNCDECL_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); | 951 | _GL_FUNCDECL_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom), ); |
| 952 | # endif | 952 | # endif |
| 953 | _GL_CXXALIAS_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); | 953 | _GL_CXXALIAS_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom)); |
| 954 | # endif | 954 | # endif |
diff --git a/lib/signal.in.h b/lib/signal.in.h index a0effa21ba1..6239b90adf3 100644 --- a/lib/signal.in.h +++ b/lib/signal.in.h | |||
| @@ -149,7 +149,7 @@ typedef void (*sighandler_t) (int); | |||
| 149 | 149 | ||
| 150 | #if @GNULIB_SIG2STR@ | 150 | #if @GNULIB_SIG2STR@ |
| 151 | # if !@HAVE_SIG2STR@ | 151 | # if !@HAVE_SIG2STR@ |
| 152 | _GL_FUNCDECL_SYS (sig2str, int, (int signo, char *str)); | 152 | _GL_FUNCDECL_SYS (sig2str, int, (int signo, char *str), ); |
| 153 | # endif | 153 | # endif |
| 154 | _GL_CXXALIAS_SYS (sig2str, int, (int signo, char *str)); | 154 | _GL_CXXALIAS_SYS (sig2str, int, (int signo, char *str)); |
| 155 | # if __GLIBC__ >= 2 | 155 | # if __GLIBC__ >= 2 |
| @@ -165,7 +165,7 @@ _GL_WARN_ON_USE (sig2str, "sig2str is not portable - " | |||
| 165 | 165 | ||
| 166 | #if @GNULIB_SIG2STR@ | 166 | #if @GNULIB_SIG2STR@ |
| 167 | # if !@HAVE_STR2SIG@ | 167 | # if !@HAVE_STR2SIG@ |
| 168 | _GL_FUNCDECL_SYS (str2sig, int, (char const *str, int *signo_p)); | 168 | _GL_FUNCDECL_SYS (str2sig, int, (char const *str, int *signo_p), ); |
| 169 | # endif | 169 | # endif |
| 170 | _GL_CXXALIAS_SYS (str2sig, int, (char const *str, int *signo_p)); | 170 | _GL_CXXALIAS_SYS (str2sig, int, (char const *str, int *signo_p)); |
| 171 | # if __GLIBC__ >= 2 | 171 | # if __GLIBC__ >= 2 |
| @@ -189,7 +189,7 @@ _GL_WARN_ON_USE (str2sig, "str2sig is not portable - " | |||
| 189 | _GL_FUNCDECL_RPL (pthread_sigmask, int, | 189 | _GL_FUNCDECL_RPL (pthread_sigmask, int, |
| 190 | (int how, | 190 | (int how, |
| 191 | const sigset_t *restrict new_mask, | 191 | const sigset_t *restrict new_mask, |
| 192 | sigset_t *restrict old_mask)); | 192 | sigset_t *restrict old_mask), ); |
| 193 | _GL_CXXALIAS_RPL (pthread_sigmask, int, | 193 | _GL_CXXALIAS_RPL (pthread_sigmask, int, |
| 194 | (int how, | 194 | (int how, |
| 195 | const sigset_t *restrict new_mask, | 195 | const sigset_t *restrict new_mask, |
| @@ -199,7 +199,7 @@ _GL_CXXALIAS_RPL (pthread_sigmask, int, | |||
| 199 | _GL_FUNCDECL_SYS (pthread_sigmask, int, | 199 | _GL_FUNCDECL_SYS (pthread_sigmask, int, |
| 200 | (int how, | 200 | (int how, |
| 201 | const sigset_t *restrict new_mask, | 201 | const sigset_t *restrict new_mask, |
| 202 | sigset_t *restrict old_mask)); | 202 | sigset_t *restrict old_mask), ); |
| 203 | # endif | 203 | # endif |
| 204 | _GL_CXXALIAS_SYS (pthread_sigmask, int, | 204 | _GL_CXXALIAS_SYS (pthread_sigmask, int, |
| 205 | (int how, | 205 | (int how, |
| @@ -224,11 +224,11 @@ _GL_WARN_ON_USE (pthread_sigmask, "pthread_sigmask is not portable - " | |||
| 224 | # undef raise | 224 | # undef raise |
| 225 | # define raise rpl_raise | 225 | # define raise rpl_raise |
| 226 | # endif | 226 | # endif |
| 227 | _GL_FUNCDECL_RPL (raise, int, (int sig)); | 227 | _GL_FUNCDECL_RPL (raise, int, (int sig), ); |
| 228 | _GL_CXXALIAS_RPL (raise, int, (int sig)); | 228 | _GL_CXXALIAS_RPL (raise, int, (int sig)); |
| 229 | # else | 229 | # else |
| 230 | # if !@HAVE_RAISE@ | 230 | # if !@HAVE_RAISE@ |
| 231 | _GL_FUNCDECL_SYS (raise, int, (int sig)); | 231 | _GL_FUNCDECL_SYS (raise, int, (int sig), ); |
| 232 | # endif | 232 | # endif |
| 233 | _GL_CXXALIAS_SYS (raise, int, (int sig)); | 233 | _GL_CXXALIAS_SYS (raise, int, (int sig)); |
| 234 | # endif | 234 | # endif |
| @@ -359,7 +359,7 @@ _GL_CXXALIASWARN (sigpending); | |||
| 359 | _GL_FUNCDECL_SYS (sigprocmask, int, | 359 | _GL_FUNCDECL_SYS (sigprocmask, int, |
| 360 | (int operation, | 360 | (int operation, |
| 361 | const sigset_t *restrict set, | 361 | const sigset_t *restrict set, |
| 362 | sigset_t *restrict old_set)); | 362 | sigset_t *restrict old_set), ); |
| 363 | # endif | 363 | # endif |
| 364 | _GL_CXXALIAS_SYS (sigprocmask, int, | 364 | _GL_CXXALIAS_SYS (sigprocmask, int, |
| 365 | (int operation, | 365 | (int operation, |
| @@ -384,7 +384,7 @@ typedef void (*_gl_function_taking_int_returning_void_t) (int); | |||
| 384 | # define signal rpl_signal | 384 | # define signal rpl_signal |
| 385 | # endif | 385 | # endif |
| 386 | _GL_FUNCDECL_RPL (signal, _gl_function_taking_int_returning_void_t, | 386 | _GL_FUNCDECL_RPL (signal, _gl_function_taking_int_returning_void_t, |
| 387 | (int sig, _gl_function_taking_int_returning_void_t func)); | 387 | (int sig, _gl_function_taking_int_returning_void_t func), ); |
| 388 | _GL_CXXALIAS_RPL (signal, _gl_function_taking_int_returning_void_t, | 388 | _GL_CXXALIAS_RPL (signal, _gl_function_taking_int_returning_void_t, |
| 389 | (int sig, _gl_function_taking_int_returning_void_t func)); | 389 | (int sig, _gl_function_taking_int_returning_void_t func)); |
| 390 | # else | 390 | # else |
| @@ -392,7 +392,7 @@ _GL_CXXALIAS_RPL (signal, _gl_function_taking_int_returning_void_t, | |||
| 392 | because it occurs in <sys/signal.h>, not <signal.h> directly. */ | 392 | because it occurs in <sys/signal.h>, not <signal.h> directly. */ |
| 393 | # if defined __OpenBSD__ | 393 | # if defined __OpenBSD__ |
| 394 | _GL_FUNCDECL_SYS (signal, _gl_function_taking_int_returning_void_t, | 394 | _GL_FUNCDECL_SYS (signal, _gl_function_taking_int_returning_void_t, |
| 395 | (int sig, _gl_function_taking_int_returning_void_t func)); | 395 | (int sig, _gl_function_taking_int_returning_void_t func), ); |
| 396 | # endif | 396 | # endif |
| 397 | _GL_CXXALIAS_SYS (signal, _gl_function_taking_int_returning_void_t, | 397 | _GL_CXXALIAS_SYS (signal, _gl_function_taking_int_returning_void_t, |
| 398 | (int sig, _gl_function_taking_int_returning_void_t func)); | 398 | (int sig, _gl_function_taking_int_returning_void_t func)); |
| @@ -510,7 +510,7 @@ struct sigaction | |||
| 510 | # endif | 510 | # endif |
| 511 | 511 | ||
| 512 | _GL_FUNCDECL_SYS (sigaction, int, (int, const struct sigaction *restrict, | 512 | _GL_FUNCDECL_SYS (sigaction, int, (int, const struct sigaction *restrict, |
| 513 | struct sigaction *restrict)); | 513 | struct sigaction *restrict), ); |
| 514 | 514 | ||
| 515 | # elif !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@ | 515 | # elif !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@ |
| 516 | 516 | ||
diff --git a/lib/stdbit.in.h b/lib/stdbit.in.h index 9f9e60a5d38..20b9f4f4662 100644 --- a/lib/stdbit.in.h +++ b/lib/stdbit.in.h | |||
| @@ -308,7 +308,7 @@ __gl_stdbit_popcount_wide (unsigned long long int n) | |||
| 308 | x333333 = max / (1 << 2 | 1), /* 0x333333... */ | 308 | x333333 = max / (1 << 2 | 1), /* 0x333333... */ |
| 309 | x0f0f0f = max / (1 << 4 | 1), /* 0x0f0f0f... */ | 309 | x0f0f0f = max / (1 << 4 | 1), /* 0x0f0f0f... */ |
| 310 | x010101 = max / ((1 << 8) - 1), /* 0x010101... */ | 310 | x010101 = max / ((1 << 8) - 1), /* 0x010101... */ |
| 311 | x000_7f = max / 0xffffffffffffffff * 0x7f; /* 0x000000000000007f... */ | 311 | x000_7f = max / 0xffffffffffffffffLL * 0x7f; /* 0x000000000000007f... */ |
| 312 | n -= (n >> 1) & x555555; | 312 | n -= (n >> 1) & x555555; |
| 313 | n = (n & x333333) + ((n >> 2) & x333333); | 313 | n = (n & x333333) + ((n >> 2) & x333333); |
| 314 | n = (n + (n >> 4)) & x0f0f0f; | 314 | n = (n + (n >> 4)) & x0f0f0f; |
diff --git a/lib/stdio.in.h b/lib/stdio.in.h index 36fd6a72ceb..e77798d9b25 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h | |||
| @@ -461,7 +461,7 @@ _GL_CXXALIASWARN (fdopen); | |||
| 461 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 461 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 462 | # define fflush rpl_fflush | 462 | # define fflush rpl_fflush |
| 463 | # endif | 463 | # endif |
| 464 | _GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream)); | 464 | _GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream), ); |
| 465 | _GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); | 465 | _GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); |
| 466 | # else | 466 | # else |
| 467 | _GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); | 467 | _GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); |
| @@ -994,7 +994,7 @@ _GL_CXXALIASWARN (getc); | |||
| 994 | # undef getchar | 994 | # undef getchar |
| 995 | # define getchar rpl_getchar | 995 | # define getchar rpl_getchar |
| 996 | # endif | 996 | # endif |
| 997 | _GL_FUNCDECL_RPL (getchar, int, (void)); | 997 | _GL_FUNCDECL_RPL (getchar, int, (void), ); |
| 998 | _GL_CXXALIAS_RPL (getchar, int, (void)); | 998 | _GL_CXXALIAS_RPL (getchar, int, (void)); |
| 999 | # else | 999 | # else |
| 1000 | _GL_CXXALIAS_SYS (getchar, int, (void)); | 1000 | _GL_CXXALIAS_SYS (getchar, int, (void)); |
| @@ -1112,7 +1112,7 @@ _GL_CXXALIAS_MDA (getw, int, (FILE *restrict stream)); | |||
| 1112 | # if @HAVE_DECL_GETW@ | 1112 | # if @HAVE_DECL_GETW@ |
| 1113 | # if defined __APPLE__ && defined __MACH__ | 1113 | # if defined __APPLE__ && defined __MACH__ |
| 1114 | /* The presence of the declaration depends on _POSIX_C_SOURCE. */ | 1114 | /* The presence of the declaration depends on _POSIX_C_SOURCE. */ |
| 1115 | _GL_FUNCDECL_SYS (getw, int, (FILE *restrict stream)); | 1115 | _GL_FUNCDECL_SYS (getw, int, (FILE *restrict stream), ); |
| 1116 | # endif | 1116 | # endif |
| 1117 | _GL_CXXALIAS_SYS (getw, int, (FILE *restrict stream)); | 1117 | _GL_CXXALIAS_SYS (getw, int, (FILE *restrict stream)); |
| 1118 | # endif | 1118 | # endif |
| @@ -1221,7 +1221,7 @@ _GL_WARN_ON_USE (pclose, "pclose is unportable - " | |||
| 1221 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 1221 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1222 | # define perror rpl_perror | 1222 | # define perror rpl_perror |
| 1223 | # endif | 1223 | # endif |
| 1224 | _GL_FUNCDECL_RPL (perror, void, (const char *string)); | 1224 | _GL_FUNCDECL_RPL (perror, void, (const char *string), ); |
| 1225 | _GL_CXXALIAS_RPL (perror, void, (const char *string)); | 1225 | _GL_CXXALIAS_RPL (perror, void, (const char *string)); |
| 1226 | # else | 1226 | # else |
| 1227 | _GL_CXXALIAS_SYS (perror, void, (const char *string)); | 1227 | _GL_CXXALIAS_SYS (perror, void, (const char *string)); |
| @@ -1366,7 +1366,7 @@ _GL_CXXALIASWARN (putc); | |||
| 1366 | # undef putchar | 1366 | # undef putchar |
| 1367 | # define putchar rpl_putchar | 1367 | # define putchar rpl_putchar |
| 1368 | # endif | 1368 | # endif |
| 1369 | _GL_FUNCDECL_RPL (putchar, int, (int c)); | 1369 | _GL_FUNCDECL_RPL (putchar, int, (int c), ); |
| 1370 | _GL_CXXALIAS_RPL (putchar, int, (int c)); | 1370 | _GL_CXXALIAS_RPL (putchar, int, (int c)); |
| 1371 | # else | 1371 | # else |
| 1372 | _GL_CXXALIAS_SYS (putchar, int, (int c)); | 1372 | _GL_CXXALIAS_SYS (putchar, int, (int c)); |
| @@ -1406,7 +1406,7 @@ _GL_CXXALIAS_MDA (putw, int, (int w, FILE *restrict stream)); | |||
| 1406 | # if @HAVE_DECL_PUTW@ | 1406 | # if @HAVE_DECL_PUTW@ |
| 1407 | # if defined __APPLE__ && defined __MACH__ | 1407 | # if defined __APPLE__ && defined __MACH__ |
| 1408 | /* The presence of the declaration depends on _POSIX_C_SOURCE. */ | 1408 | /* The presence of the declaration depends on _POSIX_C_SOURCE. */ |
| 1409 | _GL_FUNCDECL_SYS (putw, int, (int w, FILE *restrict stream)); | 1409 | _GL_FUNCDECL_SYS (putw, int, (int w, FILE *restrict stream), ); |
| 1410 | # endif | 1410 | # endif |
| 1411 | _GL_CXXALIAS_SYS (putw, int, (int w, FILE *restrict stream)); | 1411 | _GL_CXXALIAS_SYS (putw, int, (int w, FILE *restrict stream)); |
| 1412 | # endif | 1412 | # endif |
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index 1ec96c8b249..6667f426ad9 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h | |||
| @@ -20,7 +20,9 @@ | |||
| 20 | #endif | 20 | #endif |
| 21 | @PRAGMA_COLUMNS@ | 21 | @PRAGMA_COLUMNS@ |
| 22 | 22 | ||
| 23 | #if (defined __need_system_stdlib_h && !defined _GLIBCXX_STDLIB_H) || defined __need_malloc_and_calloc | 23 | #if ((defined __need_system_stdlib_h && !defined _GLIBCXX_STDLIB_H) \ |
| 24 | || defined __need_malloc_and_calloc) \ | ||
| 25 | && !defined __SUNPRO_CC | ||
| 24 | /* Special invocation conventions inside some gnulib header files, | 26 | /* Special invocation conventions inside some gnulib header files, |
| 25 | and inside some glibc header files, respectively. | 27 | and inside some glibc header files, respectively. |
| 26 | Do not recognize this special invocation convention when GCC's | 28 | Do not recognize this special invocation convention when GCC's |
| @@ -220,11 +222,11 @@ struct random_data | |||
| 220 | # undef _Exit | 222 | # undef _Exit |
| 221 | # define _Exit rpl__Exit | 223 | # define _Exit rpl__Exit |
| 222 | # endif | 224 | # endif |
| 223 | _GL_FUNCDECL_RPL (_Exit, _Noreturn void, (int status)); | 225 | _GL_FUNCDECL_RPL (_Exit, _Noreturn void, (int status), ); |
| 224 | _GL_CXXALIAS_RPL (_Exit, void, (int status)); | 226 | _GL_CXXALIAS_RPL (_Exit, void, (int status)); |
| 225 | # else | 227 | # else |
| 226 | # if !@HAVE__EXIT@ | 228 | # if !@HAVE__EXIT@ |
| 227 | _GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status)); | 229 | _GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status), ); |
| 228 | # endif | 230 | # endif |
| 229 | _GL_CXXALIAS_SYS (_Exit, void, (int status)); | 231 | _GL_CXXALIAS_SYS (_Exit, void, (int status)); |
| 230 | # endif | 232 | # endif |
| @@ -249,7 +251,7 @@ _GL_WARN_ON_USE (_Exit, "_Exit is unportable - " | |||
| 249 | # undef abort | 251 | # undef abort |
| 250 | # define abort rpl_abort | 252 | # define abort rpl_abort |
| 251 | # endif | 253 | # endif |
| 252 | _GL_FUNCDECL_RPL (abort, _Noreturn void, (void)); | 254 | _GL_FUNCDECL_RPL (abort, _Noreturn void, (void), ); |
| 253 | _GL_CXXALIAS_RPL (abort, void, (void)); | 255 | _GL_CXXALIAS_RPL (abort, void, (void)); |
| 254 | # else | 256 | # else |
| 255 | _GL_CXXALIAS_SYS (abort, void, (void)); | 257 | _GL_CXXALIAS_SYS (abort, void, (void)); |
| @@ -267,9 +269,9 @@ _GL_CXXALIASWARN (abort); | |||
| 267 | # define free rpl_free | 269 | # define free rpl_free |
| 268 | # endif | 270 | # endif |
| 269 | # if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) | 271 | # if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) |
| 270 | _GL_FUNCDECL_RPL (free, void, (void *ptr)) _GL_ATTRIBUTE_NOTHROW; | 272 | _GL_FUNCDECL_RPL (free, void, (void *ptr), ) _GL_ATTRIBUTE_NOTHROW; |
| 271 | # else | 273 | # else |
| 272 | _GL_FUNCDECL_RPL (free, void, (void *ptr)); | 274 | _GL_FUNCDECL_RPL (free, void, (void *ptr), ); |
| 273 | # endif | 275 | # endif |
| 274 | _GL_CXXALIAS_RPL (free, void, (void *ptr)); | 276 | _GL_CXXALIAS_RPL (free, void, (void *ptr)); |
| 275 | # else | 277 | # else |
| @@ -592,7 +594,7 @@ _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " | |||
| 592 | # if @HAVE_DECL_PROGRAM_INVOCATION_NAME@ | 594 | # if @HAVE_DECL_PROGRAM_INVOCATION_NAME@ |
| 593 | _GL_FUNCDECL_RPL (getprogname, const char *, (void), _GL_ATTRIBUTE_PURE); | 595 | _GL_FUNCDECL_RPL (getprogname, const char *, (void), _GL_ATTRIBUTE_PURE); |
| 594 | # else | 596 | # else |
| 595 | _GL_FUNCDECL_RPL (getprogname, const char *, (void)); | 597 | _GL_FUNCDECL_RPL (getprogname, const char *, (void), ); |
| 596 | # endif | 598 | # endif |
| 597 | _GL_CXXALIAS_RPL (getprogname, const char *, (void)); | 599 | _GL_CXXALIAS_RPL (getprogname, const char *, (void)); |
| 598 | # else | 600 | # else |
| @@ -600,7 +602,7 @@ _GL_CXXALIAS_RPL (getprogname, const char *, (void)); | |||
| 600 | # if @HAVE_DECL_PROGRAM_INVOCATION_NAME@ | 602 | # if @HAVE_DECL_PROGRAM_INVOCATION_NAME@ |
| 601 | _GL_FUNCDECL_SYS (getprogname, const char *, (void), _GL_ATTRIBUTE_PURE); | 603 | _GL_FUNCDECL_SYS (getprogname, const char *, (void), _GL_ATTRIBUTE_PURE); |
| 602 | # else | 604 | # else |
| 603 | _GL_FUNCDECL_SYS (getprogname, const char *, (void)); | 605 | _GL_FUNCDECL_SYS (getprogname, const char *, (void), ); |
| 604 | # endif | 606 | # endif |
| 605 | # endif | 607 | # endif |
| 606 | _GL_CXXALIAS_SYS (getprogname, const char *, (void)); | 608 | _GL_CXXALIAS_SYS (getprogname, const char *, (void)); |
| @@ -662,7 +664,7 @@ _GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - " | |||
| 662 | /* Change the ownership and access permission of the slave side of the | 664 | /* Change the ownership and access permission of the slave side of the |
| 663 | pseudo-terminal whose master side is specified by FD. */ | 665 | pseudo-terminal whose master side is specified by FD. */ |
| 664 | # if !@HAVE_GRANTPT@ | 666 | # if !@HAVE_GRANTPT@ |
| 665 | _GL_FUNCDECL_SYS (grantpt, int, (int fd)); | 667 | _GL_FUNCDECL_SYS (grantpt, int, (int fd), ); |
| 666 | # endif | 668 | # endif |
| 667 | _GL_CXXALIAS_SYS (grantpt, int, (int fd)); | 669 | _GL_CXXALIAS_SYS (grantpt, int, (int fd)); |
| 668 | _GL_CXXALIASWARN (grantpt); | 670 | _GL_CXXALIASWARN (grantpt); |
| @@ -788,13 +790,13 @@ _GL_WARN_ON_USE (mbstowcs, "mbstowcs is unportable - " | |||
| 788 | # define mbtowc rpl_mbtowc | 790 | # define mbtowc rpl_mbtowc |
| 789 | # endif | 791 | # endif |
| 790 | _GL_FUNCDECL_RPL (mbtowc, int, | 792 | _GL_FUNCDECL_RPL (mbtowc, int, |
| 791 | (wchar_t *restrict pwc, const char *restrict s, size_t n)); | 793 | (wchar_t *restrict pwc, const char *restrict s, size_t n), ); |
| 792 | _GL_CXXALIAS_RPL (mbtowc, int, | 794 | _GL_CXXALIAS_RPL (mbtowc, int, |
| 793 | (wchar_t *restrict pwc, const char *restrict s, size_t n)); | 795 | (wchar_t *restrict pwc, const char *restrict s, size_t n)); |
| 794 | # else | 796 | # else |
| 795 | # if !@HAVE_MBTOWC@ | 797 | # if !@HAVE_MBTOWC@ |
| 796 | _GL_FUNCDECL_SYS (mbtowc, int, | 798 | _GL_FUNCDECL_SYS (mbtowc, int, |
| 797 | (wchar_t *restrict pwc, const char *restrict s, size_t n)); | 799 | (wchar_t *restrict pwc, const char *restrict s, size_t n), ); |
| 798 | # endif | 800 | # endif |
| 799 | _GL_CXXALIAS_SYS (mbtowc, int, | 801 | _GL_CXXALIAS_SYS (mbtowc, int, |
| 800 | (wchar_t *restrict pwc, const char *restrict s, size_t n)); | 802 | (wchar_t *restrict pwc, const char *restrict s, size_t n)); |
| @@ -1078,11 +1080,11 @@ _GL_WARN_ON_USE (ptsname, "ptsname is not portable - " | |||
| 1078 | # undef ptsname_r | 1080 | # undef ptsname_r |
| 1079 | # define ptsname_r rpl_ptsname_r | 1081 | # define ptsname_r rpl_ptsname_r |
| 1080 | # endif | 1082 | # endif |
| 1081 | _GL_FUNCDECL_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); | 1083 | _GL_FUNCDECL_RPL (ptsname_r, int, (int fd, char *buf, size_t len), ); |
| 1082 | _GL_CXXALIAS_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); | 1084 | _GL_CXXALIAS_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); |
| 1083 | # else | 1085 | # else |
| 1084 | # if !@HAVE_PTSNAME_R@ | 1086 | # if !@HAVE_PTSNAME_R@ |
| 1085 | _GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); | 1087 | _GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len), ); |
| 1086 | # endif | 1088 | # endif |
| 1087 | _GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); | 1089 | _GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); |
| 1088 | # endif | 1090 | # endif |
| @@ -1204,7 +1206,7 @@ _GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - " | |||
| 1204 | # undef rand | 1206 | # undef rand |
| 1205 | # define rand rpl_rand | 1207 | # define rand rpl_rand |
| 1206 | # endif | 1208 | # endif |
| 1207 | _GL_FUNCDECL_RPL (rand, int, (void)); | 1209 | _GL_FUNCDECL_RPL (rand, int, (void), ); |
| 1208 | _GL_CXXALIAS_RPL (rand, int, (void)); | 1210 | _GL_CXXALIAS_RPL (rand, int, (void)); |
| 1209 | # else | 1211 | # else |
| 1210 | _GL_CXXALIAS_SYS (rand, int, (void)); | 1212 | _GL_CXXALIAS_SYS (rand, int, (void)); |
| @@ -1221,11 +1223,11 @@ _GL_CXXALIASWARN (rand); | |||
| 1221 | # undef random | 1223 | # undef random |
| 1222 | # define random rpl_random | 1224 | # define random rpl_random |
| 1223 | # endif | 1225 | # endif |
| 1224 | _GL_FUNCDECL_RPL (random, long, (void)); | 1226 | _GL_FUNCDECL_RPL (random, long, (void), ); |
| 1225 | _GL_CXXALIAS_RPL (random, long, (void)); | 1227 | _GL_CXXALIAS_RPL (random, long, (void)); |
| 1226 | # else | 1228 | # else |
| 1227 | # if !@HAVE_RANDOM@ | 1229 | # if !@HAVE_RANDOM@ |
| 1228 | _GL_FUNCDECL_SYS (random, long, (void)); | 1230 | _GL_FUNCDECL_SYS (random, long, (void), ); |
| 1229 | # endif | 1231 | # endif |
| 1230 | /* Need to cast, because on Haiku, the return type is | 1232 | /* Need to cast, because on Haiku, the return type is |
| 1231 | int. */ | 1233 | int. */ |
| @@ -1248,11 +1250,11 @@ _GL_WARN_ON_USE (random, "random is unportable - " | |||
| 1248 | # undef srandom | 1250 | # undef srandom |
| 1249 | # define srandom rpl_srandom | 1251 | # define srandom rpl_srandom |
| 1250 | # endif | 1252 | # endif |
| 1251 | _GL_FUNCDECL_RPL (srandom, void, (unsigned int seed)); | 1253 | _GL_FUNCDECL_RPL (srandom, void, (unsigned int seed), ); |
| 1252 | _GL_CXXALIAS_RPL (srandom, void, (unsigned int seed)); | 1254 | _GL_CXXALIAS_RPL (srandom, void, (unsigned int seed)); |
| 1253 | # else | 1255 | # else |
| 1254 | # if !@HAVE_RANDOM@ | 1256 | # if !@HAVE_RANDOM@ |
| 1255 | _GL_FUNCDECL_SYS (srandom, void, (unsigned int seed)); | 1257 | _GL_FUNCDECL_SYS (srandom, void, (unsigned int seed), ); |
| 1256 | # endif | 1258 | # endif |
| 1257 | /* Need to cast, because on FreeBSD, the first parameter is | 1259 | /* Need to cast, because on FreeBSD, the first parameter is |
| 1258 | unsigned long seed. */ | 1260 | unsigned long seed. */ |
| @@ -1910,7 +1912,7 @@ _GL_WARN_ON_USE (strtoull, "strtoull is unportable - " | |||
| 1910 | /* Unlock the slave side of the pseudo-terminal whose master side is specified | 1912 | /* Unlock the slave side of the pseudo-terminal whose master side is specified |
| 1911 | by FD, so that it can be opened. */ | 1913 | by FD, so that it can be opened. */ |
| 1912 | # if !@HAVE_UNLOCKPT@ | 1914 | # if !@HAVE_UNLOCKPT@ |
| 1913 | _GL_FUNCDECL_SYS (unlockpt, int, (int fd)); | 1915 | _GL_FUNCDECL_SYS (unlockpt, int, (int fd), ); |
| 1914 | # endif | 1916 | # endif |
| 1915 | _GL_CXXALIAS_SYS (unlockpt, int, (int fd)); | 1917 | _GL_CXXALIAS_SYS (unlockpt, int, (int fd)); |
| 1916 | _GL_CXXALIASWARN (unlockpt); | 1918 | _GL_CXXALIASWARN (unlockpt); |
| @@ -1955,7 +1957,7 @@ _GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - " | |||
| 1955 | # undef wctomb | 1957 | # undef wctomb |
| 1956 | # define wctomb rpl_wctomb | 1958 | # define wctomb rpl_wctomb |
| 1957 | # endif | 1959 | # endif |
| 1958 | _GL_FUNCDECL_RPL (wctomb, int, (char *s, wchar_t wc)); | 1960 | _GL_FUNCDECL_RPL (wctomb, int, (char *s, wchar_t wc), ); |
| 1959 | _GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc)); | 1961 | _GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc)); |
| 1960 | # else | 1962 | # else |
| 1961 | _GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc)); | 1963 | _GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc)); |
diff --git a/lib/string.in.h b/lib/string.in.h index a588e7e2c26..f5a6d8b3267 100644 --- a/lib/string.in.h +++ b/lib/string.in.h | |||
| @@ -213,7 +213,7 @@ _GL_WARN_ON_USE (explicit_bzero, "explicit_bzero is unportable - " | |||
| 213 | /* Find the index of the least-significant set bit. */ | 213 | /* Find the index of the least-significant set bit. */ |
| 214 | #if @GNULIB_FFSL@ | 214 | #if @GNULIB_FFSL@ |
| 215 | # if !@HAVE_FFSL@ | 215 | # if !@HAVE_FFSL@ |
| 216 | _GL_FUNCDECL_SYS (ffsl, int, (long int i)); | 216 | _GL_FUNCDECL_SYS (ffsl, int, (long int i), ); |
| 217 | # endif | 217 | # endif |
| 218 | _GL_CXXALIAS_SYS (ffsl, int, (long int i)); | 218 | _GL_CXXALIAS_SYS (ffsl, int, (long int i)); |
| 219 | _GL_CXXALIASWARN (ffsl); | 219 | _GL_CXXALIASWARN (ffsl); |
| @@ -231,11 +231,11 @@ _GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module"); | |||
| 231 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 231 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 232 | # define ffsll rpl_ffsll | 232 | # define ffsll rpl_ffsll |
| 233 | # endif | 233 | # endif |
| 234 | _GL_FUNCDECL_RPL (ffsll, int, (long long int i)); | 234 | _GL_FUNCDECL_RPL (ffsll, int, (long long int i), ); |
| 235 | _GL_CXXALIAS_RPL (ffsll, int, (long long int i)); | 235 | _GL_CXXALIAS_RPL (ffsll, int, (long long int i)); |
| 236 | # else | 236 | # else |
| 237 | # if !@HAVE_FFSLL@ | 237 | # if !@HAVE_FFSLL@ |
| 238 | _GL_FUNCDECL_SYS (ffsll, int, (long long int i)); | 238 | _GL_FUNCDECL_SYS (ffsll, int, (long long int i), ); |
| 239 | # endif | 239 | # endif |
| 240 | _GL_CXXALIAS_SYS (ffsll, int, (long long int i)); | 240 | _GL_CXXALIAS_SYS (ffsll, int, (long long int i)); |
| 241 | # endif | 241 | # endif |
| @@ -1308,7 +1308,7 @@ _GL_EXTERN_C char * mbstok_r (char *restrict string, const char *delim, | |||
| 1308 | # undef strerror | 1308 | # undef strerror |
| 1309 | # define strerror rpl_strerror | 1309 | # define strerror rpl_strerror |
| 1310 | # endif | 1310 | # endif |
| 1311 | _GL_FUNCDECL_RPL (strerror, char *, (int)); | 1311 | _GL_FUNCDECL_RPL (strerror, char *, (int), ); |
| 1312 | _GL_CXXALIAS_RPL (strerror, char *, (int)); | 1312 | _GL_CXXALIAS_RPL (strerror, char *, (int)); |
| 1313 | # else | 1313 | # else |
| 1314 | _GL_CXXALIAS_SYS (strerror, char *, (int)); | 1314 | _GL_CXXALIAS_SYS (strerror, char *, (int)); |
| @@ -1359,11 +1359,11 @@ _GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - " | |||
| 1359 | # undef strerrorname_np | 1359 | # undef strerrorname_np |
| 1360 | # define strerrorname_np rpl_strerrorname_np | 1360 | # define strerrorname_np rpl_strerrorname_np |
| 1361 | # endif | 1361 | # endif |
| 1362 | _GL_FUNCDECL_RPL (strerrorname_np, const char *, (int errnum)); | 1362 | _GL_FUNCDECL_RPL (strerrorname_np, const char *, (int errnum), ); |
| 1363 | _GL_CXXALIAS_RPL (strerrorname_np, const char *, (int errnum)); | 1363 | _GL_CXXALIAS_RPL (strerrorname_np, const char *, (int errnum)); |
| 1364 | # else | 1364 | # else |
| 1365 | # if !@HAVE_STRERRORNAME_NP@ | 1365 | # if !@HAVE_STRERRORNAME_NP@ |
| 1366 | _GL_FUNCDECL_SYS (strerrorname_np, const char *, (int errnum)); | 1366 | _GL_FUNCDECL_SYS (strerrorname_np, const char *, (int errnum), ); |
| 1367 | # endif | 1367 | # endif |
| 1368 | _GL_CXXALIAS_SYS (strerrorname_np, const char *, (int errnum)); | 1368 | _GL_CXXALIAS_SYS (strerrorname_np, const char *, (int errnum)); |
| 1369 | # endif | 1369 | # endif |
| @@ -1379,7 +1379,7 @@ _GL_WARN_ON_USE (strerrorname_np, "strerrorname_np is unportable - " | |||
| 1379 | /* Return an abbreviation string for the signal number SIG. */ | 1379 | /* Return an abbreviation string for the signal number SIG. */ |
| 1380 | #if @GNULIB_SIGABBREV_NP@ | 1380 | #if @GNULIB_SIGABBREV_NP@ |
| 1381 | # if ! @HAVE_SIGABBREV_NP@ | 1381 | # if ! @HAVE_SIGABBREV_NP@ |
| 1382 | _GL_FUNCDECL_SYS (sigabbrev_np, const char *, (int sig)); | 1382 | _GL_FUNCDECL_SYS (sigabbrev_np, const char *, (int sig), ); |
| 1383 | # endif | 1383 | # endif |
| 1384 | _GL_CXXALIAS_SYS (sigabbrev_np, const char *, (int sig)); | 1384 | _GL_CXXALIAS_SYS (sigabbrev_np, const char *, (int sig)); |
| 1385 | _GL_CXXALIASWARN (sigabbrev_np); | 1385 | _GL_CXXALIASWARN (sigabbrev_np); |
| @@ -1394,7 +1394,7 @@ _GL_WARN_ON_USE (sigabbrev_np, "sigabbrev_np is unportable - " | |||
| 1394 | /* Return an English description string for the signal number SIG. */ | 1394 | /* Return an English description string for the signal number SIG. */ |
| 1395 | #if @GNULIB_SIGDESCR_NP@ | 1395 | #if @GNULIB_SIGDESCR_NP@ |
| 1396 | # if ! @HAVE_SIGDESCR_NP@ | 1396 | # if ! @HAVE_SIGDESCR_NP@ |
| 1397 | _GL_FUNCDECL_SYS (sigdescr_np, const char *, (int sig)); | 1397 | _GL_FUNCDECL_SYS (sigdescr_np, const char *, (int sig), ); |
| 1398 | # endif | 1398 | # endif |
| 1399 | _GL_CXXALIAS_SYS (sigdescr_np, const char *, (int sig)); | 1399 | _GL_CXXALIAS_SYS (sigdescr_np, const char *, (int sig)); |
| 1400 | _GL_CXXALIASWARN (sigdescr_np); | 1400 | _GL_CXXALIASWARN (sigdescr_np); |
| @@ -1411,11 +1411,11 @@ _GL_WARN_ON_USE (sigdescr_np, "sigdescr_np is unportable - " | |||
| 1411 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 1411 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1412 | # define strsignal rpl_strsignal | 1412 | # define strsignal rpl_strsignal |
| 1413 | # endif | 1413 | # endif |
| 1414 | _GL_FUNCDECL_RPL (strsignal, char *, (int __sig)); | 1414 | _GL_FUNCDECL_RPL (strsignal, char *, (int __sig), ); |
| 1415 | _GL_CXXALIAS_RPL (strsignal, char *, (int __sig)); | 1415 | _GL_CXXALIAS_RPL (strsignal, char *, (int __sig)); |
| 1416 | # else | 1416 | # else |
| 1417 | # if ! @HAVE_DECL_STRSIGNAL@ | 1417 | # if ! @HAVE_DECL_STRSIGNAL@ |
| 1418 | _GL_FUNCDECL_SYS (strsignal, char *, (int __sig)); | 1418 | _GL_FUNCDECL_SYS (strsignal, char *, (int __sig), ); |
| 1419 | # endif | 1419 | # endif |
| 1420 | /* Need to cast, because on Cygwin 1.5.x systems, the return type is | 1420 | /* Need to cast, because on Cygwin 1.5.x systems, the return type is |
| 1421 | 'const char *'. */ | 1421 | 'const char *'. */ |
diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h index 0d5ddd16783..9bfb2283857 100644 --- a/lib/sys_select.in.h +++ b/lib/sys_select.in.h | |||
| @@ -282,7 +282,7 @@ rpl_fd_isset (SOCKET fd, fd_set * set) | |||
| 282 | # endif | 282 | # endif |
| 283 | _GL_FUNCDECL_RPL (pselect, int, | 283 | _GL_FUNCDECL_RPL (pselect, int, |
| 284 | (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, | 284 | (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, |
| 285 | struct timespec const *restrict, const sigset_t *restrict)); | 285 | struct timespec const *restrict, const sigset_t *restrict), ); |
| 286 | _GL_CXXALIAS_RPL (pselect, int, | 286 | _GL_CXXALIAS_RPL (pselect, int, |
| 287 | (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, | 287 | (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, |
| 288 | struct timespec const *restrict, const sigset_t *restrict)); | 288 | struct timespec const *restrict, const sigset_t *restrict)); |
| @@ -290,7 +290,7 @@ _GL_CXXALIAS_RPL (pselect, int, | |||
| 290 | # if !@HAVE_PSELECT@ | 290 | # if !@HAVE_PSELECT@ |
| 291 | _GL_FUNCDECL_SYS (pselect, int, | 291 | _GL_FUNCDECL_SYS (pselect, int, |
| 292 | (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, | 292 | (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, |
| 293 | struct timespec const *restrict, const sigset_t *restrict)); | 293 | struct timespec const *restrict, const sigset_t *restrict), ); |
| 294 | # endif | 294 | # endif |
| 295 | /* Need to cast, because on AIX 7, the second, third, fourth argument may be | 295 | /* Need to cast, because on AIX 7, the second, third, fourth argument may be |
| 296 | void *restrict, void *restrict, void *restrict. */ | 296 | void *restrict, void *restrict, void *restrict. */ |
| @@ -319,7 +319,7 @@ _GL_WARN_ON_USE (pselect, "pselect is not portable - " | |||
| 319 | # endif | 319 | # endif |
| 320 | _GL_FUNCDECL_RPL (select, int, | 320 | _GL_FUNCDECL_RPL (select, int, |
| 321 | (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, | 321 | (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, |
| 322 | struct timeval *restrict)); | 322 | struct timeval *restrict), ); |
| 323 | _GL_CXXALIAS_RPL (select, int, | 323 | _GL_CXXALIAS_RPL (select, int, |
| 324 | (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, | 324 | (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, |
| 325 | timeval *restrict)); | 325 | timeval *restrict)); |
diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h index d2ecdb9da96..81138bce251 100644 --- a/lib/sys_stat.in.h +++ b/lib/sys_stat.in.h | |||
| @@ -585,11 +585,11 @@ _GL_WARN_ON_USE (fstatat, "fstatat is not portable - " | |||
| 585 | # undef futimens | 585 | # undef futimens |
| 586 | # define futimens rpl_futimens | 586 | # define futimens rpl_futimens |
| 587 | # endif | 587 | # endif |
| 588 | _GL_FUNCDECL_RPL (futimens, int, (int fd, struct timespec const times[2])); | 588 | _GL_FUNCDECL_RPL (futimens, int, (int fd, struct timespec const times[2]), ); |
| 589 | _GL_CXXALIAS_RPL (futimens, int, (int fd, struct timespec const times[2])); | 589 | _GL_CXXALIAS_RPL (futimens, int, (int fd, struct timespec const times[2])); |
| 590 | # else | 590 | # else |
| 591 | # if !@HAVE_FUTIMENS@ | 591 | # if !@HAVE_FUTIMENS@ |
| 592 | _GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2])); | 592 | _GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2]), ); |
| 593 | # endif | 593 | # endif |
| 594 | _GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2])); | 594 | _GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2])); |
| 595 | # endif | 595 | # endif |
| @@ -608,9 +608,9 @@ _GL_WARN_ON_USE (futimens, "futimens is not portable - " | |||
| 608 | #if @GNULIB_GETUMASK@ | 608 | #if @GNULIB_GETUMASK@ |
| 609 | # if !@HAVE_GETUMASK@ | 609 | # if !@HAVE_GETUMASK@ |
| 610 | # if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 | 610 | # if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 |
| 611 | _GL_FUNCDECL_SYS (getumask, mode_t, (void)) _GL_ATTRIBUTE_NOTHROW; | 611 | _GL_FUNCDECL_SYS (getumask, mode_t, (void), ) _GL_ATTRIBUTE_NOTHROW; |
| 612 | # else | 612 | # else |
| 613 | _GL_FUNCDECL_SYS (getumask, mode_t, (void)); | 613 | _GL_FUNCDECL_SYS (getumask, mode_t, (void), ); |
| 614 | # endif | 614 | # endif |
| 615 | # endif | 615 | # endif |
| 616 | _GL_CXXALIAS_SYS (getumask, mode_t, (void)); | 616 | _GL_CXXALIAS_SYS (getumask, mode_t, (void)); |
diff --git a/lib/time.in.h b/lib/time.in.h index 097c509d3cc..5dc03c892a4 100644 --- a/lib/time.in.h +++ b/lib/time.in.h | |||
| @@ -201,7 +201,7 @@ _GL_WARN_ON_USE (timespec_getres, "timespec_getres is unportable - " | |||
| 201 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 201 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 202 | # define time rpl_time | 202 | # define time rpl_time |
| 203 | # endif | 203 | # endif |
| 204 | _GL_FUNCDECL_RPL (time, time_t, (time_t *__tp)); | 204 | _GL_FUNCDECL_RPL (time, time_t, (time_t *__tp), ); |
| 205 | _GL_CXXALIAS_RPL (time, time_t, (time_t *__tp)); | 205 | _GL_CXXALIAS_RPL (time, time_t, (time_t *__tp)); |
| 206 | # else | 206 | # else |
| 207 | _GL_CXXALIAS_SYS (time, time_t, (time_t *__tp)); | 207 | _GL_CXXALIAS_SYS (time, time_t, (time_t *__tp)); |
| @@ -255,7 +255,7 @@ _GL_WARN_ON_USE (nanosleep, "nanosleep is unportable - " | |||
| 255 | # undef tzset | 255 | # undef tzset |
| 256 | # define tzset rpl_tzset | 256 | # define tzset rpl_tzset |
| 257 | # endif | 257 | # endif |
| 258 | _GL_FUNCDECL_RPL (tzset, void, (void)); | 258 | _GL_FUNCDECL_RPL (tzset, void, (void), ); |
| 259 | _GL_CXXALIAS_RPL (tzset, void, (void)); | 259 | _GL_CXXALIAS_RPL (tzset, void, (void)); |
| 260 | # elif defined _WIN32 && !defined __CYGWIN__ | 260 | # elif defined _WIN32 && !defined __CYGWIN__ |
| 261 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 261 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| @@ -516,7 +516,7 @@ typedef struct tm_zone *rpl_timezone_t; | |||
| 516 | May return NULL if NAME is invalid (this is platform dependent) or | 516 | May return NULL if NAME is invalid (this is platform dependent) or |
| 517 | upon memory allocation failure. */ | 517 | upon memory allocation failure. */ |
| 518 | # if !@HAVE_TZALLOC@ | 518 | # if !@HAVE_TZALLOC@ |
| 519 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); | 519 | _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name), ); |
| 520 | _GL_CXXALIAS_SYS (tzalloc, timezone_t, (char const *__name)); | 520 | _GL_CXXALIAS_SYS (tzalloc, timezone_t, (char const *__name)); |
| 521 | # endif | 521 | # endif |
| 522 | 522 | ||
| @@ -524,7 +524,7 @@ _GL_CXXALIAS_SYS (tzalloc, timezone_t, (char const *__name)); | |||
| 524 | Frees a time zone object. | 524 | Frees a time zone object. |
| 525 | The argument must have been returned by tzalloc(). */ | 525 | The argument must have been returned by tzalloc(). */ |
| 526 | # if !@HAVE_TZALLOC@ | 526 | # if !@HAVE_TZALLOC@ |
| 527 | _GL_FUNCDECL_SYS (tzfree, void, (timezone_t __tz)); | 527 | _GL_FUNCDECL_SYS (tzfree, void, (timezone_t __tz), ); |
| 528 | _GL_CXXALIAS_SYS (tzfree, void, (timezone_t __tz)); | 528 | _GL_CXXALIAS_SYS (tzfree, void, (timezone_t __tz)); |
| 529 | # endif | 529 | # endif |
| 530 | 530 | ||
diff --git a/lib/unistd.in.h b/lib/unistd.in.h index 3222f5a568f..20b1356fd38 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h | |||
| @@ -399,7 +399,7 @@ _GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and " | |||
| 399 | # undef close | 399 | # undef close |
| 400 | # define close rpl_close | 400 | # define close rpl_close |
| 401 | # endif | 401 | # endif |
| 402 | _GL_FUNCDECL_RPL (close, int, (int fd)); | 402 | _GL_FUNCDECL_RPL (close, int, (int fd), ); |
| 403 | _GL_CXXALIAS_RPL (close, int, (int fd)); | 403 | _GL_CXXALIAS_RPL (close, int, (int fd)); |
| 404 | # elif defined _WIN32 && !defined __CYGWIN__ | 404 | # elif defined _WIN32 && !defined __CYGWIN__ |
| 405 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 405 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| @@ -446,7 +446,7 @@ _GL_CXXALIASWARN (close); | |||
| 446 | # endif | 446 | # endif |
| 447 | _GL_FUNCDECL_RPL (copy_file_range, ssize_t, (int ifd, off_t *ipos, | 447 | _GL_FUNCDECL_RPL (copy_file_range, ssize_t, (int ifd, off_t *ipos, |
| 448 | int ofd, off_t *opos, | 448 | int ofd, off_t *opos, |
| 449 | size_t len, unsigned flags)); | 449 | size_t len, unsigned flags), ); |
| 450 | _GL_CXXALIAS_RPL (copy_file_range, ssize_t, (int ifd, off_t *ipos, | 450 | _GL_CXXALIAS_RPL (copy_file_range, ssize_t, (int ifd, off_t *ipos, |
| 451 | int ofd, off_t *opos, | 451 | int ofd, off_t *opos, |
| 452 | size_t len, unsigned flags)); | 452 | size_t len, unsigned flags)); |
| @@ -454,7 +454,7 @@ _GL_CXXALIAS_RPL (copy_file_range, ssize_t, (int ifd, off_t *ipos, | |||
| 454 | # if !@HAVE_COPY_FILE_RANGE@ | 454 | # if !@HAVE_COPY_FILE_RANGE@ |
| 455 | _GL_FUNCDECL_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos, | 455 | _GL_FUNCDECL_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos, |
| 456 | int ofd, off_t *opos, | 456 | int ofd, off_t *opos, |
| 457 | size_t len, unsigned flags)); | 457 | size_t len, unsigned flags), ); |
| 458 | # endif | 458 | # endif |
| 459 | _GL_CXXALIAS_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos, | 459 | _GL_CXXALIAS_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos, |
| 460 | int ofd, off_t *opos, | 460 | int ofd, off_t *opos, |
| @@ -521,7 +521,7 @@ _GL_CXXALIASWARN (dup); | |||
| 521 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 521 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 522 | # define dup2 rpl_dup2 | 522 | # define dup2 rpl_dup2 |
| 523 | # endif | 523 | # endif |
| 524 | _GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd)); | 524 | _GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd), ); |
| 525 | _GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd)); | 525 | _GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd)); |
| 526 | # elif defined _WIN32 && !defined __CYGWIN__ | 526 | # elif defined _WIN32 && !defined __CYGWIN__ |
| 527 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 527 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| @@ -570,11 +570,11 @@ _GL_CXXALIASWARN (dup2); | |||
| 570 | # undef dup3 | 570 | # undef dup3 |
| 571 | # define dup3 rpl_dup3 | 571 | # define dup3 rpl_dup3 |
| 572 | # endif | 572 | # endif |
| 573 | _GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags)); | 573 | _GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags), ); |
| 574 | _GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags)); | 574 | _GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags)); |
| 575 | # else | 575 | # else |
| 576 | # if !@HAVE_DUP3@ | 576 | # if !@HAVE_DUP3@ |
| 577 | _GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags)); | 577 | _GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags), ); |
| 578 | # endif | 578 | # endif |
| 579 | _GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags)); | 579 | _GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags)); |
| 580 | # endif | 580 | # endif |
| @@ -1045,11 +1045,11 @@ _GL_WARN_ON_USE (fchownat, "fchownat is not portable - " | |||
| 1045 | # undef fdatasync | 1045 | # undef fdatasync |
| 1046 | # define fdatasync rpl_fdatasync | 1046 | # define fdatasync rpl_fdatasync |
| 1047 | # endif | 1047 | # endif |
| 1048 | _GL_FUNCDECL_RPL (fdatasync, int, (int fd)); | 1048 | _GL_FUNCDECL_RPL (fdatasync, int, (int fd), ); |
| 1049 | _GL_CXXALIAS_RPL (fdatasync, int, (int fd)); | 1049 | _GL_CXXALIAS_RPL (fdatasync, int, (int fd)); |
| 1050 | # else | 1050 | # else |
| 1051 | # if !@HAVE_FDATASYNC@|| !@HAVE_DECL_FDATASYNC@ | 1051 | # if !@HAVE_FDATASYNC@|| !@HAVE_DECL_FDATASYNC@ |
| 1052 | _GL_FUNCDECL_SYS (fdatasync, int, (int fd)); | 1052 | _GL_FUNCDECL_SYS (fdatasync, int, (int fd), ); |
| 1053 | # endif | 1053 | # endif |
| 1054 | _GL_CXXALIAS_SYS (fdatasync, int, (int fd)); | 1054 | _GL_CXXALIAS_SYS (fdatasync, int, (int fd)); |
| 1055 | # endif | 1055 | # endif |
| @@ -1071,7 +1071,7 @@ _GL_WARN_ON_USE (fdatasync, "fdatasync is unportable - " | |||
| 1071 | See POSIX:2008 specification | 1071 | See POSIX:2008 specification |
| 1072 | <https://pubs.opengroup.org/onlinepubs/9699919799/functions/fsync.html>. */ | 1072 | <https://pubs.opengroup.org/onlinepubs/9699919799/functions/fsync.html>. */ |
| 1073 | # if !@HAVE_FSYNC@ | 1073 | # if !@HAVE_FSYNC@ |
| 1074 | _GL_FUNCDECL_SYS (fsync, int, (int fd)); | 1074 | _GL_FUNCDECL_SYS (fsync, int, (int fd), ); |
| 1075 | # endif | 1075 | # endif |
| 1076 | _GL_CXXALIAS_SYS (fsync, int, (int fd)); | 1076 | _GL_CXXALIAS_SYS (fsync, int, (int fd)); |
| 1077 | _GL_CXXALIASWARN (fsync); | 1077 | _GL_CXXALIASWARN (fsync); |
| @@ -1223,11 +1223,11 @@ _GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - " | |||
| 1223 | # undef getdtablesize | 1223 | # undef getdtablesize |
| 1224 | # define getdtablesize rpl_getdtablesize | 1224 | # define getdtablesize rpl_getdtablesize |
| 1225 | # endif | 1225 | # endif |
| 1226 | _GL_FUNCDECL_RPL (getdtablesize, int, (void)); | 1226 | _GL_FUNCDECL_RPL (getdtablesize, int, (void), ); |
| 1227 | _GL_CXXALIAS_RPL (getdtablesize, int, (void)); | 1227 | _GL_CXXALIAS_RPL (getdtablesize, int, (void)); |
| 1228 | # else | 1228 | # else |
| 1229 | # if !@HAVE_GETDTABLESIZE@ | 1229 | # if !@HAVE_GETDTABLESIZE@ |
| 1230 | _GL_FUNCDECL_SYS (getdtablesize, int, (void)); | 1230 | _GL_FUNCDECL_SYS (getdtablesize, int, (void), ); |
| 1231 | # endif | 1231 | # endif |
| 1232 | /* Need to cast, because on AIX, the parameter list is | 1232 | /* Need to cast, because on AIX, the parameter list is |
| 1233 | (...). */ | 1233 | (...). */ |
| @@ -1360,7 +1360,7 @@ _GL_WARN_ON_USE (gethostname, "gethostname is unportable - " | |||
| 1360 | $USERNAME on native Windows platforms. | 1360 | $USERNAME on native Windows platforms. |
| 1361 | */ | 1361 | */ |
| 1362 | # if !@HAVE_DECL_GETLOGIN@ | 1362 | # if !@HAVE_DECL_GETLOGIN@ |
| 1363 | _GL_FUNCDECL_SYS (getlogin, char *, (void)); | 1363 | _GL_FUNCDECL_SYS (getlogin, char *, (void), ); |
| 1364 | # endif | 1364 | # endif |
| 1365 | _GL_CXXALIAS_SYS (getlogin, char *, (void)); | 1365 | _GL_CXXALIAS_SYS (getlogin, char *, (void)); |
| 1366 | _GL_CXXALIASWARN (getlogin); | 1366 | _GL_CXXALIASWARN (getlogin); |
| @@ -1421,13 +1421,13 @@ _GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - " | |||
| 1421 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 1421 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1422 | # define getpagesize rpl_getpagesize | 1422 | # define getpagesize rpl_getpagesize |
| 1423 | # endif | 1423 | # endif |
| 1424 | _GL_FUNCDECL_RPL (getpagesize, int, (void)); | 1424 | _GL_FUNCDECL_RPL (getpagesize, int, (void), ); |
| 1425 | _GL_CXXALIAS_RPL (getpagesize, int, (void)); | 1425 | _GL_CXXALIAS_RPL (getpagesize, int, (void)); |
| 1426 | # else | 1426 | # else |
| 1427 | /* On HP-UX, getpagesize exists, but it is not declared in <unistd.h> even if | 1427 | /* On HP-UX, getpagesize exists, but it is not declared in <unistd.h> even if |
| 1428 | the compiler options -D_HPUX_SOURCE -D_XOPEN_SOURCE=600 are used. */ | 1428 | the compiler options -D_HPUX_SOURCE -D_XOPEN_SOURCE=600 are used. */ |
| 1429 | # if defined __hpux | 1429 | # if defined __hpux |
| 1430 | _GL_FUNCDECL_SYS (getpagesize, int, (void)); | 1430 | _GL_FUNCDECL_SYS (getpagesize, int, (void), ); |
| 1431 | # endif | 1431 | # endif |
| 1432 | # if !@HAVE_GETPAGESIZE@ | 1432 | # if !@HAVE_GETPAGESIZE@ |
| 1433 | # if !defined getpagesize | 1433 | # if !defined getpagesize |
| @@ -1559,11 +1559,11 @@ _GL_CXXALIASWARN (getpid); | |||
| 1559 | # undef getusershell | 1559 | # undef getusershell |
| 1560 | # define getusershell rpl_getusershell | 1560 | # define getusershell rpl_getusershell |
| 1561 | # endif | 1561 | # endif |
| 1562 | _GL_FUNCDECL_RPL (getusershell, char *, (void)); | 1562 | _GL_FUNCDECL_RPL (getusershell, char *, (void), ); |
| 1563 | _GL_CXXALIAS_RPL (getusershell, char *, (void)); | 1563 | _GL_CXXALIAS_RPL (getusershell, char *, (void)); |
| 1564 | # else | 1564 | # else |
| 1565 | # if !@HAVE_DECL_GETUSERSHELL@ | 1565 | # if !@HAVE_DECL_GETUSERSHELL@ |
| 1566 | _GL_FUNCDECL_SYS (getusershell, char *, (void)); | 1566 | _GL_FUNCDECL_SYS (getusershell, char *, (void), ); |
| 1567 | # endif | 1567 | # endif |
| 1568 | _GL_CXXALIAS_SYS (getusershell, char *, (void)); | 1568 | _GL_CXXALIAS_SYS (getusershell, char *, (void)); |
| 1569 | # endif | 1569 | # endif |
| @@ -1583,11 +1583,11 @@ _GL_WARN_ON_USE (getusershell, "getusershell is unportable - " | |||
| 1583 | # undef setusershell | 1583 | # undef setusershell |
| 1584 | # define setusershell rpl_setusershell | 1584 | # define setusershell rpl_setusershell |
| 1585 | # endif | 1585 | # endif |
| 1586 | _GL_FUNCDECL_RPL (setusershell, void, (void)); | 1586 | _GL_FUNCDECL_RPL (setusershell, void, (void), ); |
| 1587 | _GL_CXXALIAS_RPL (setusershell, void, (void)); | 1587 | _GL_CXXALIAS_RPL (setusershell, void, (void)); |
| 1588 | # else | 1588 | # else |
| 1589 | # if !@HAVE_DECL_GETUSERSHELL@ | 1589 | # if !@HAVE_DECL_GETUSERSHELL@ |
| 1590 | _GL_FUNCDECL_SYS (setusershell, void, (void)); | 1590 | _GL_FUNCDECL_SYS (setusershell, void, (void), ); |
| 1591 | # endif | 1591 | # endif |
| 1592 | _GL_CXXALIAS_SYS (setusershell, void, (void)); | 1592 | _GL_CXXALIAS_SYS (setusershell, void, (void)); |
| 1593 | # endif | 1593 | # endif |
| @@ -1608,11 +1608,11 @@ _GL_WARN_ON_USE (setusershell, "setusershell is unportable - " | |||
| 1608 | # undef endusershell | 1608 | # undef endusershell |
| 1609 | # define endusershell rpl_endusershell | 1609 | # define endusershell rpl_endusershell |
| 1610 | # endif | 1610 | # endif |
| 1611 | _GL_FUNCDECL_RPL (endusershell, void, (void)); | 1611 | _GL_FUNCDECL_RPL (endusershell, void, (void), ); |
| 1612 | _GL_CXXALIAS_RPL (endusershell, void, (void)); | 1612 | _GL_CXXALIAS_RPL (endusershell, void, (void)); |
| 1613 | # else | 1613 | # else |
| 1614 | # if !@HAVE_DECL_GETUSERSHELL@ | 1614 | # if !@HAVE_DECL_GETUSERSHELL@ |
| 1615 | _GL_FUNCDECL_SYS (endusershell, void, (void)); | 1615 | _GL_FUNCDECL_SYS (endusershell, void, (void), ); |
| 1616 | # endif | 1616 | # endif |
| 1617 | _GL_CXXALIAS_SYS (endusershell, void, (void)); | 1617 | _GL_CXXALIAS_SYS (endusershell, void, (void)); |
| 1618 | # endif | 1618 | # endif |
| @@ -1629,7 +1629,7 @@ _GL_WARN_ON_USE (endusershell, "endusershell is unportable - " | |||
| 1629 | #if @GNULIB_GROUP_MEMBER@ | 1629 | #if @GNULIB_GROUP_MEMBER@ |
| 1630 | /* Determine whether group id is in calling user's group list. */ | 1630 | /* Determine whether group id is in calling user's group list. */ |
| 1631 | # if !@HAVE_GROUP_MEMBER@ | 1631 | # if !@HAVE_GROUP_MEMBER@ |
| 1632 | _GL_FUNCDECL_SYS (group_member, int, (gid_t gid)); | 1632 | _GL_FUNCDECL_SYS (group_member, int, (gid_t gid), ); |
| 1633 | # endif | 1633 | # endif |
| 1634 | _GL_CXXALIAS_SYS (group_member, int, (gid_t gid)); | 1634 | _GL_CXXALIAS_SYS (group_member, int, (gid_t gid)); |
| 1635 | _GL_CXXALIASWARN (group_member); | 1635 | _GL_CXXALIASWARN (group_member); |
| @@ -1649,7 +1649,7 @@ _GL_WARN_ON_USE (group_member, "group_member is unportable - " | |||
| 1649 | # define isatty rpl_isatty | 1649 | # define isatty rpl_isatty |
| 1650 | # endif | 1650 | # endif |
| 1651 | # define GNULIB_defined_isatty 1 | 1651 | # define GNULIB_defined_isatty 1 |
| 1652 | _GL_FUNCDECL_RPL (isatty, int, (int fd)); | 1652 | _GL_FUNCDECL_RPL (isatty, int, (int fd), ); |
| 1653 | _GL_CXXALIAS_RPL (isatty, int, (int fd)); | 1653 | _GL_CXXALIAS_RPL (isatty, int, (int fd)); |
| 1654 | # elif defined _WIN32 && !defined __CYGWIN__ | 1654 | # elif defined _WIN32 && !defined __CYGWIN__ |
| 1655 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 1655 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| @@ -1792,7 +1792,7 @@ _GL_WARN_ON_USE (linkat, "linkat is unportable - " | |||
| 1792 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 1792 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1793 | # define lseek rpl_lseek | 1793 | # define lseek rpl_lseek |
| 1794 | # endif | 1794 | # endif |
| 1795 | _GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence)); | 1795 | _GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence), ); |
| 1796 | _GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence)); | 1796 | _GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence)); |
| 1797 | # elif defined _WIN32 && !defined __CYGWIN__ | 1797 | # elif defined _WIN32 && !defined __CYGWIN__ |
| 1798 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 1798 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| @@ -2161,11 +2161,11 @@ _GL_WARN_ON_USE (sethostname, "sethostname is unportable - " | |||
| 2161 | # undef sleep | 2161 | # undef sleep |
| 2162 | # define sleep rpl_sleep | 2162 | # define sleep rpl_sleep |
| 2163 | # endif | 2163 | # endif |
| 2164 | _GL_FUNCDECL_RPL (sleep, unsigned int, (unsigned int n)); | 2164 | _GL_FUNCDECL_RPL (sleep, unsigned int, (unsigned int n), ); |
| 2165 | _GL_CXXALIAS_RPL (sleep, unsigned int, (unsigned int n)); | 2165 | _GL_CXXALIAS_RPL (sleep, unsigned int, (unsigned int n)); |
| 2166 | # else | 2166 | # else |
| 2167 | # if !@HAVE_SLEEP@ | 2167 | # if !@HAVE_SLEEP@ |
| 2168 | _GL_FUNCDECL_SYS (sleep, unsigned int, (unsigned int n)); | 2168 | _GL_FUNCDECL_SYS (sleep, unsigned int, (unsigned int n), ); |
| 2169 | # endif | 2169 | # endif |
| 2170 | _GL_CXXALIAS_SYS (sleep, unsigned int, (unsigned int n)); | 2170 | _GL_CXXALIAS_SYS (sleep, unsigned int, (unsigned int n)); |
| 2171 | # endif | 2171 | # endif |
| @@ -2409,11 +2409,11 @@ _GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - " | |||
| 2409 | # undef usleep | 2409 | # undef usleep |
| 2410 | # define usleep rpl_usleep | 2410 | # define usleep rpl_usleep |
| 2411 | # endif | 2411 | # endif |
| 2412 | _GL_FUNCDECL_RPL (usleep, int, (useconds_t n)); | 2412 | _GL_FUNCDECL_RPL (usleep, int, (useconds_t n), ); |
| 2413 | _GL_CXXALIAS_RPL (usleep, int, (useconds_t n)); | 2413 | _GL_CXXALIAS_RPL (usleep, int, (useconds_t n)); |
| 2414 | # else | 2414 | # else |
| 2415 | # if !@HAVE_USLEEP@ | 2415 | # if !@HAVE_USLEEP@ |
| 2416 | _GL_FUNCDECL_SYS (usleep, int, (useconds_t n)); | 2416 | _GL_FUNCDECL_SYS (usleep, int, (useconds_t n), ); |
| 2417 | # endif | 2417 | # endif |
| 2418 | /* Need to cast, because on Haiku, the first parameter is | 2418 | /* Need to cast, because on Haiku, the first parameter is |
| 2419 | unsigned int n. */ | 2419 | unsigned int n. */ |
diff --git a/lib/utimens.c b/lib/utimens.c index 6b9f62a53c1..cd86a44ea76 100644 --- a/lib/utimens.c +++ b/lib/utimens.c | |||
| @@ -516,6 +516,7 @@ fdutimens (int fd, char const *file, struct timespec const timespec[2]) | |||
| 516 | } | 516 | } |
| 517 | } | 517 | } |
| 518 | 518 | ||
| 519 | #if !HAVE_UTIMENS | ||
| 519 | /* Set the access and modification timestamps of FILE to be | 520 | /* Set the access and modification timestamps of FILE to be |
| 520 | TIMESPEC[0] and TIMESPEC[1], respectively. */ | 521 | TIMESPEC[0] and TIMESPEC[1], respectively. */ |
| 521 | int | 522 | int |
| @@ -523,7 +524,9 @@ utimens (char const *file, struct timespec const timespec[2]) | |||
| 523 | { | 524 | { |
| 524 | return fdutimens (-1, file, timespec); | 525 | return fdutimens (-1, file, timespec); |
| 525 | } | 526 | } |
| 527 | #endif | ||
| 526 | 528 | ||
| 529 | #if !HAVE_LUTIMENS | ||
| 527 | /* Set the access and modification timestamps of FILE to be | 530 | /* Set the access and modification timestamps of FILE to be |
| 528 | TIMESPEC[0] and TIMESPEC[1], respectively, without dereferencing | 531 | TIMESPEC[0] and TIMESPEC[1], respectively, without dereferencing |
| 529 | symlinks. Fail with ENOSYS if the platform does not support | 532 | symlinks. Fail with ENOSYS if the platform does not support |
| @@ -646,3 +649,4 @@ lutimens (char const *file, struct timespec const timespec[2]) | |||
| 646 | errno = ENOSYS; | 649 | errno = ENOSYS; |
| 647 | return -1; | 650 | return -1; |
| 648 | } | 651 | } |
| 652 | #endif | ||
diff --git a/lib/utimens.h b/lib/utimens.h index b20d4f4f7ee..e85477b8493 100644 --- a/lib/utimens.h +++ b/lib/utimens.h | |||
| @@ -24,13 +24,21 @@ | |||
| 24 | 24 | ||
| 25 | #include <time.h> | 25 | #include <time.h> |
| 26 | 26 | ||
| 27 | #if HAVE_UTIMENS || HAVE_LUTIMENS | ||
| 28 | # include <sys/time.h> | ||
| 29 | #endif | ||
| 30 | |||
| 27 | #ifdef __cplusplus | 31 | #ifdef __cplusplus |
| 28 | extern "C" { | 32 | extern "C" { |
| 29 | #endif | 33 | #endif |
| 30 | 34 | ||
| 31 | int fdutimens (int, char const *, struct timespec const [2]); | 35 | int fdutimens (int, char const *, struct timespec const [2]); |
| 36 | #if !HAVE_UTIMENS | ||
| 32 | int utimens (char const *, struct timespec const [2]); | 37 | int utimens (char const *, struct timespec const [2]); |
| 38 | #endif | ||
| 39 | #if !HAVE_LUTIMENS | ||
| 33 | int lutimens (char const *, struct timespec const [2]); | 40 | int lutimens (char const *, struct timespec const [2]); |
| 41 | #endif | ||
| 34 | 42 | ||
| 35 | #ifdef __cplusplus | 43 | #ifdef __cplusplus |
| 36 | } | 44 | } |
diff --git a/m4/std-gnu11.m4 b/m4/std-gnu11.m4 index e8d5de7a1e1..d61d694297d 100644 --- a/m4/std-gnu11.m4 +++ b/m4/std-gnu11.m4 | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | # std-gnu11.m4 | 1 | # std-gnu11.m4 |
| 2 | # serial 2 | 2 | # serial 3 |
| 3 | 3 | ||
| 4 | # Prefer GNU C11 and C++11 to earlier versions. -*- coding: utf-8 -*- | 4 | # Prefer GNU C11 and C++11 to earlier versions. -*- coding: utf-8 -*- |
| 5 | 5 | ||
| @@ -9,6 +9,7 @@ m4_ifndef([_AC_C_C23_OPTIONS], [ | |||
| 9 | # This implementation is taken from GNU Autoconf lib/autoconf/c.m4 | 9 | # This implementation is taken from GNU Autoconf lib/autoconf/c.m4 |
| 10 | # commit 017d5ddd82854911f0119691d91ea8a1438824d6 | 10 | # commit 017d5ddd82854911f0119691d91ea8a1438824d6 |
| 11 | # dated Sun Apr 3 13:57:17 2016 -0700 | 11 | # dated Sun Apr 3 13:57:17 2016 -0700 |
| 12 | # with minor changes to commentary. | ||
| 12 | # This implementation will be obsolete once we can assume Autoconf 2.70 | 13 | # This implementation will be obsolete once we can assume Autoconf 2.70 |
| 13 | # or later is installed everywhere a Gnulib program might be developed. | 14 | # or later is installed everywhere a Gnulib program might be developed. |
| 14 | 15 | ||
| @@ -17,9 +18,10 @@ m4_version_prereq([2.70], [], [ | |||
| 17 | 18 | ||
| 18 | # Copyright (C) 2001-2024 Free Software Foundation, Inc. | 19 | # Copyright (C) 2001-2024 Free Software Foundation, Inc. |
| 19 | 20 | ||
| 20 | # This program is free software; you can redistribute it and/or modify | 21 | # This file is part of Autoconf. This program is free |
| 21 | # it under the terms of the GNU General Public License as published by | 22 | # software; you can redistribute it and/or modify it under the |
| 22 | # the Free Software Foundation, either version 3 of the License, or | 23 | # terms of the GNU General Public License as published by the |
| 24 | # Free Software Foundation, either version 3 of the License, or | ||
| 23 | # (at your option) any later version. | 25 | # (at your option) any later version. |
| 24 | # | 26 | # |
| 25 | # This program is distributed in the hope that it will be useful, | 27 | # This program is distributed in the hope that it will be useful, |
| @@ -27,8 +29,15 @@ m4_version_prereq([2.70], [], [ | |||
| 27 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 29 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 28 | # GNU General Public License for more details. | 30 | # GNU General Public License for more details. |
| 29 | # | 31 | # |
| 32 | # Under Section 7 of GPL version 3, you are granted additional | ||
| 33 | # permissions described in the Autoconf Configure Script Exception, | ||
| 34 | # version 3.0, as published by the Free Software Foundation. | ||
| 35 | # | ||
| 30 | # You should have received a copy of the GNU General Public License | 36 | # You should have received a copy of the GNU General Public License |
| 31 | # along with this program. If not, see <https://www.gnu.org/licenses/>. | 37 | # and a copy of the Autoconf Configure Script Exception along with |
| 38 | # this program; see the files COPYINGv3 and COPYING.EXCEPTION | ||
| 39 | # respectively. If not, see <https://www.gnu.org/licenses/> and | ||
| 40 | # <https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=blob_plain;f=COPYING.EXCEPTION>. | ||
| 32 | 41 | ||
| 33 | # Written by David MacKenzie, with help from | 42 | # Written by David MacKenzie, with help from |
| 34 | # Akim Demaille, Paul Eggert, | 43 | # Akim Demaille, Paul Eggert, |
diff --git a/m4/utimens.m4 b/m4/utimens.m4 index 9996e3ef336..b8200deaa25 100644 --- a/m4/utimens.m4 +++ b/m4/utimens.m4 | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | # utimens.m4 | 1 | # utimens.m4 |
| 2 | # serial 16 | 2 | # serial 17 |
| 3 | dnl Copyright (C) 2003-2024 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2003-2024 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -16,6 +16,7 @@ AC_DEFUN([gl_UTIMENS], | |||
| 16 | gl_CHECK_FUNCS_ANDROID([lutimes], [[#include <sys/time.h>]]) | 16 | gl_CHECK_FUNCS_ANDROID([lutimes], [[#include <sys/time.h>]]) |
| 17 | gl_CHECK_FUNCS_ANDROID([futimens], [[#include <sys/stat.h>]]) | 17 | gl_CHECK_FUNCS_ANDROID([futimens], [[#include <sys/stat.h>]]) |
| 18 | gl_CHECK_FUNCS_ANDROID([utimensat], [[#include <sys/stat.h>]]) | 18 | gl_CHECK_FUNCS_ANDROID([utimensat], [[#include <sys/stat.h>]]) |
| 19 | AC_CHECK_FUNCS_ONCE([utimens lutimens]) | ||
| 19 | 20 | ||
| 20 | if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then | 21 | if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then |
| 21 | dnl FreeBSD 8.0-rc2 mishandles futimesat(fd,NULL,time). It is not | 22 | dnl FreeBSD 8.0-rc2 mishandles futimesat(fd,NULL,time). It is not |