diff options
| author | Paul Eggert | 2020-02-23 01:24:21 -0800 |
|---|---|---|
| committer | Paul Eggert | 2020-02-23 01:27:19 -0800 |
| commit | b6be1ce644a07b6dc30eaa24dec082effd7add40 (patch) | |
| tree | 02de8983f45751bf5da9b2f409758f2934306746 /lib/sys_stat.in.h | |
| parent | bce17355ac9f6a6f8ed778bd310f3baaea514270 (diff) | |
| download | emacs-b6be1ce644a07b6dc30eaa24dec082effd7add40.tar.gz emacs-b6be1ce644a07b6dc30eaa24dec082effd7add40.zip | |
Update from Gnulib
This incorporates:
2020-02-22 fchmodat, lchmod: simplify
2020-02-22 lchmod: fix link error on Solaris 10
2020-02-22 use 'restrict' in all POSIX function declarations
2020-02-22 chmodat, chownat: new modules
* lib/gnulib.mk.in: Regenerate.
* lib/inttypes.in.h, lib/openat.h, lib/signal.in.h:
* lib/stdio.in.h, lib/stdlib.in.h, lib/string.in.h:
* lib/sys_stat.in.h, lib/time.in.h, lib/unistd.in.h, m4/inttypes.m4:
* m4/signal_h.m4, m4/stdio_h.m4, m4/stdlib_h.m4, m4/string_h.m4:
* m4/sys_socket_h.m4, m4/sys_stat_h.m4, m4/time_h.m4:
* m4/unistd_h.m4: Copy from Gnulib.
Diffstat (limited to 'lib/sys_stat.in.h')
| -rw-r--r-- | lib/sys_stat.in.h | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h index e3ab3153fbf..44946072795 100644 --- a/lib/sys_stat.in.h +++ b/lib/sys_stat.in.h | |||
| @@ -455,18 +455,22 @@ _GL_WARN_ON_USE (fstat, "fstat has portability problems - " | |||
| 455 | # define fstatat rpl_fstatat | 455 | # define fstatat rpl_fstatat |
| 456 | # endif | 456 | # endif |
| 457 | _GL_FUNCDECL_RPL (fstatat, int, | 457 | _GL_FUNCDECL_RPL (fstatat, int, |
| 458 | (int fd, char const *name, struct stat *st, int flags) | 458 | (int fd, char const *restrict name, struct stat *restrict st, |
| 459 | int flags) | ||
| 459 | _GL_ARG_NONNULL ((2, 3))); | 460 | _GL_ARG_NONNULL ((2, 3))); |
| 460 | _GL_CXXALIAS_RPL (fstatat, int, | 461 | _GL_CXXALIAS_RPL (fstatat, int, |
| 461 | (int fd, char const *name, struct stat *st, int flags)); | 462 | (int fd, char const *restrict name, struct stat *restrict st, |
| 463 | int flags)); | ||
| 462 | # else | 464 | # else |
| 463 | # if !@HAVE_FSTATAT@ | 465 | # if !@HAVE_FSTATAT@ |
| 464 | _GL_FUNCDECL_SYS (fstatat, int, | 466 | _GL_FUNCDECL_SYS (fstatat, int, |
| 465 | (int fd, char const *name, struct stat *st, int flags) | 467 | (int fd, char const *restrict name, struct stat *restrict st, |
| 468 | int flags) | ||
| 466 | _GL_ARG_NONNULL ((2, 3))); | 469 | _GL_ARG_NONNULL ((2, 3))); |
| 467 | # endif | 470 | # endif |
| 468 | _GL_CXXALIAS_SYS (fstatat, int, | 471 | _GL_CXXALIAS_SYS (fstatat, int, |
| 469 | (int fd, char const *name, struct stat *st, int flags)); | 472 | (int fd, char const *restrict name, struct stat *restrict st, |
| 473 | int flags)); | ||
| 470 | # endif | 474 | # endif |
| 471 | _GL_CXXALIASWARN (fstatat); | 475 | _GL_CXXALIASWARN (fstatat); |
| 472 | #elif @GNULIB_OVERRIDES_STRUCT_STAT@ | 476 | #elif @GNULIB_OVERRIDES_STRUCT_STAT@ |
| @@ -514,23 +518,11 @@ _GL_WARN_ON_USE (futimens, "futimens is not portable - " | |||
| 514 | #if @GNULIB_LCHMOD@ | 518 | #if @GNULIB_LCHMOD@ |
| 515 | /* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME | 519 | /* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME |
| 516 | denotes a symbolic link. */ | 520 | denotes a symbolic link. */ |
| 517 | # if @REPLACE_LCHMOD@ | 521 | # if !@HAVE_LCHMOD@ || defined __hpux |
| 518 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
| 519 | # undef lchmod | ||
| 520 | # define lchmod rpl_lchmod | ||
| 521 | # endif | ||
| 522 | _GL_FUNCDECL_RPL (lchmod, int, | ||
| 523 | (char const *filename, mode_t mode) | ||
| 524 | _GL_ARG_NONNULL ((1))); | ||
| 525 | _GL_CXXALIAS_RPL (lchmod, int, | ||
| 526 | (char const *filename, mode_t mode)); | ||
| 527 | # else | ||
| 528 | # if !@HAVE_LCHMOD@ || defined __hpux | ||
| 529 | _GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode) | 522 | _GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode) |
| 530 | _GL_ARG_NONNULL ((1))); | 523 | _GL_ARG_NONNULL ((1))); |
| 531 | # endif | ||
| 532 | _GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode)); | ||
| 533 | # endif | 524 | # endif |
| 525 | _GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode)); | ||
| 534 | _GL_CXXALIASWARN (lchmod); | 526 | _GL_CXXALIASWARN (lchmod); |
| 535 | #elif defined GNULIB_POSIXCHECK | 527 | #elif defined GNULIB_POSIXCHECK |
| 536 | # undef lchmod | 528 | # undef lchmod |
| @@ -548,17 +540,21 @@ _GL_WARN_ON_USE (lchmod, "lchmod is unportable - " | |||
| 548 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 540 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 549 | # define lstat stat | 541 | # define lstat stat |
| 550 | # endif | 542 | # endif |
| 551 | _GL_CXXALIAS_RPL_1 (lstat, stat, int, (const char *name, struct stat *buf)); | 543 | _GL_CXXALIAS_RPL_1 (lstat, stat, int, |
| 544 | (const char *restrict name, struct stat *restrict buf)); | ||
| 552 | # elif @REPLACE_LSTAT@ | 545 | # elif @REPLACE_LSTAT@ |
| 553 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 546 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 554 | # undef lstat | 547 | # undef lstat |
| 555 | # define lstat rpl_lstat | 548 | # define lstat rpl_lstat |
| 556 | # endif | 549 | # endif |
| 557 | _GL_FUNCDECL_RPL (lstat, int, (const char *name, struct stat *buf) | 550 | _GL_FUNCDECL_RPL (lstat, int, |
| 558 | _GL_ARG_NONNULL ((1, 2))); | 551 | (const char *restrict name, struct stat *restrict buf) |
| 559 | _GL_CXXALIAS_RPL (lstat, int, (const char *name, struct stat *buf)); | 552 | _GL_ARG_NONNULL ((1, 2))); |
| 553 | _GL_CXXALIAS_RPL (lstat, int, | ||
| 554 | (const char *restrict name, struct stat *restrict buf)); | ||
| 560 | # else | 555 | # else |
| 561 | _GL_CXXALIAS_SYS (lstat, int, (const char *name, struct stat *buf)); | 556 | _GL_CXXALIAS_SYS (lstat, int, |
| 557 | (const char *restrict name, struct stat *restrict buf)); | ||
| 562 | # endif | 558 | # endif |
| 563 | # if @HAVE_LSTAT@ | 559 | # if @HAVE_LSTAT@ |
| 564 | _GL_CXXALIASWARN (lstat); | 560 | _GL_CXXALIASWARN (lstat); |
| @@ -771,7 +767,7 @@ _GL_WARN_ON_USE (mknodat, "mknodat is not portable - " | |||
| 771 | # define stat(name, st) rpl_stat (name, st) | 767 | # define stat(name, st) rpl_stat (name, st) |
| 772 | # endif /* !_LARGE_FILES */ | 768 | # endif /* !_LARGE_FILES */ |
| 773 | # endif /* !@GNULIB_OVERRIDES_STRUCT_STAT@ */ | 769 | # endif /* !@GNULIB_OVERRIDES_STRUCT_STAT@ */ |
| 774 | _GL_EXTERN_C int stat (const char *name, struct stat *buf) | 770 | _GL_EXTERN_C int stat (const char *restrict name, struct stat *restrict buf) |
| 775 | _GL_ARG_NONNULL ((1, 2)); | 771 | _GL_ARG_NONNULL ((1, 2)); |
| 776 | # endif | 772 | # endif |
| 777 | #elif @GNULIB_OVERRIDES_STRUCT_STAT@ | 773 | #elif @GNULIB_OVERRIDES_STRUCT_STAT@ |