aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert2024-09-17 00:32:39 -0700
committerPaul Eggert2024-09-17 00:35:03 -0700
commit73427887d63c086fb88449dce79bf2f8e58183fa (patch)
treec7727bc8d59a91ca37fe1ea4931742fb6d540496 /lib
parentcbe8683410a117698606b929532d4a3e692729d7 (diff)
downloademacs-73427887d63c086fb88449dce79bf2f8e58183fa.tar.gz
emacs-73427887d63c086fb88449dce79bf2f8e58183fa.zip
Update from Gnulib by running admin/merge-gnulib
Diffstat (limited to 'lib')
-rw-r--r--lib/c++defs.h27
-rw-r--r--lib/faccessat.c8
-rw-r--r--lib/fcntl.in.h4
-rw-r--r--lib/inttypes.in.h8
-rw-r--r--lib/signal.in.h20
-rw-r--r--lib/stdbit.in.h2
-rw-r--r--lib/stdio.in.h12
-rw-r--r--lib/stdlib.in.h42
-rw-r--r--lib/string.in.h20
-rw-r--r--lib/sys_select.in.h6
-rw-r--r--lib/sys_stat.in.h8
-rw-r--r--lib/time.in.h8
-rw-r--r--lib/unistd.in.h54
-rw-r--r--lib/utimens.c4
-rw-r--r--lib/utimens.h8
15 files changed, 125 insertions, 106 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. */
521int 522int
@@ -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
28extern "C" { 32extern "C" {
29#endif 33#endif
30 34
31int fdutimens (int, char const *, struct timespec const [2]); 35int fdutimens (int, char const *, struct timespec const [2]);
36#if !HAVE_UTIMENS
32int utimens (char const *, struct timespec const [2]); 37int utimens (char const *, struct timespec const [2]);
38#endif
39#if !HAVE_LUTIMENS
33int lutimens (char const *, struct timespec const [2]); 40int lutimens (char const *, struct timespec const [2]);
41#endif
34 42
35#ifdef __cplusplus 43#ifdef __cplusplus
36} 44}