diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/gnulib.mk.in | 32 | ||||
| -rw-r--r-- | lib/qcopy-acl.c | 21 | ||||
| -rw-r--r-- | lib/stdio.in.h | 147 | ||||
| -rw-r--r-- | lib/stdlib.in.h | 24 |
4 files changed, 194 insertions, 30 deletions
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in index 948269e744d..cebde64d117 100644 --- a/lib/gnulib.mk.in +++ b/lib/gnulib.mk.in | |||
| @@ -386,6 +386,7 @@ GL_GNULIB_DPRINTF = @GL_GNULIB_DPRINTF@ | |||
| 386 | GL_GNULIB_DUP = @GL_GNULIB_DUP@ | 386 | GL_GNULIB_DUP = @GL_GNULIB_DUP@ |
| 387 | GL_GNULIB_DUP2 = @GL_GNULIB_DUP2@ | 387 | GL_GNULIB_DUP2 = @GL_GNULIB_DUP2@ |
| 388 | GL_GNULIB_DUP3 = @GL_GNULIB_DUP3@ | 388 | GL_GNULIB_DUP3 = @GL_GNULIB_DUP3@ |
| 389 | GL_GNULIB_DZPRINTF = @GL_GNULIB_DZPRINTF@ | ||
| 389 | GL_GNULIB_ENVIRON = @GL_GNULIB_ENVIRON@ | 390 | GL_GNULIB_ENVIRON = @GL_GNULIB_ENVIRON@ |
| 390 | GL_GNULIB_EUIDACCESS = @GL_GNULIB_EUIDACCESS@ | 391 | GL_GNULIB_EUIDACCESS = @GL_GNULIB_EUIDACCESS@ |
| 391 | GL_GNULIB_EXECL = @GL_GNULIB_EXECL@ | 392 | GL_GNULIB_EXECL = @GL_GNULIB_EXECL@ |
| @@ -431,6 +432,7 @@ GL_GNULIB_FTELLO = @GL_GNULIB_FTELLO@ | |||
| 431 | GL_GNULIB_FTRUNCATE = @GL_GNULIB_FTRUNCATE@ | 432 | GL_GNULIB_FTRUNCATE = @GL_GNULIB_FTRUNCATE@ |
| 432 | GL_GNULIB_FUTIMENS = @GL_GNULIB_FUTIMENS@ | 433 | GL_GNULIB_FUTIMENS = @GL_GNULIB_FUTIMENS@ |
| 433 | GL_GNULIB_FWRITE = @GL_GNULIB_FWRITE@ | 434 | GL_GNULIB_FWRITE = @GL_GNULIB_FWRITE@ |
| 435 | GL_GNULIB_FZPRINTF = @GL_GNULIB_FZPRINTF@ | ||
| 434 | GL_GNULIB_GETC = @GL_GNULIB_GETC@ | 436 | GL_GNULIB_GETC = @GL_GNULIB_GETC@ |
| 435 | GL_GNULIB_GETCHAR = @GL_GNULIB_GETCHAR@ | 437 | GL_GNULIB_GETCHAR = @GL_GNULIB_GETCHAR@ |
| 436 | GL_GNULIB_GETCWD = @GL_GNULIB_GETCWD@ | 438 | GL_GNULIB_GETCWD = @GL_GNULIB_GETCWD@ |
| @@ -602,6 +604,7 @@ GL_GNULIB_SIGNAL_H_SIGPIPE = @GL_GNULIB_SIGNAL_H_SIGPIPE@ | |||
| 602 | GL_GNULIB_SIGPROCMASK = @GL_GNULIB_SIGPROCMASK@ | 604 | GL_GNULIB_SIGPROCMASK = @GL_GNULIB_SIGPROCMASK@ |
| 603 | GL_GNULIB_SLEEP = @GL_GNULIB_SLEEP@ | 605 | GL_GNULIB_SLEEP = @GL_GNULIB_SLEEP@ |
| 604 | GL_GNULIB_SNPRINTF = @GL_GNULIB_SNPRINTF@ | 606 | GL_GNULIB_SNPRINTF = @GL_GNULIB_SNPRINTF@ |
| 607 | GL_GNULIB_SNZPRINTF = @GL_GNULIB_SNZPRINTF@ | ||
| 605 | GL_GNULIB_SPRINTF_POSIX = @GL_GNULIB_SPRINTF_POSIX@ | 608 | GL_GNULIB_SPRINTF_POSIX = @GL_GNULIB_SPRINTF_POSIX@ |
| 606 | GL_GNULIB_STAT = @GL_GNULIB_STAT@ | 609 | GL_GNULIB_STAT = @GL_GNULIB_STAT@ |
| 607 | GL_GNULIB_STDIO_H_NONBLOCKING = @GL_GNULIB_STDIO_H_NONBLOCKING@ | 610 | GL_GNULIB_STDIO_H_NONBLOCKING = @GL_GNULIB_STDIO_H_NONBLOCKING@ |
| @@ -637,6 +640,7 @@ GL_GNULIB_STRVERSCMP = @GL_GNULIB_STRVERSCMP@ | |||
| 637 | GL_GNULIB_SYMLINK = @GL_GNULIB_SYMLINK@ | 640 | GL_GNULIB_SYMLINK = @GL_GNULIB_SYMLINK@ |
| 638 | GL_GNULIB_SYMLINKAT = @GL_GNULIB_SYMLINKAT@ | 641 | GL_GNULIB_SYMLINKAT = @GL_GNULIB_SYMLINKAT@ |
| 639 | GL_GNULIB_SYSTEM_POSIX = @GL_GNULIB_SYSTEM_POSIX@ | 642 | GL_GNULIB_SYSTEM_POSIX = @GL_GNULIB_SYSTEM_POSIX@ |
| 643 | GL_GNULIB_SZPRINTF = @GL_GNULIB_SZPRINTF@ | ||
| 640 | GL_GNULIB_TIME = @GL_GNULIB_TIME@ | 644 | GL_GNULIB_TIME = @GL_GNULIB_TIME@ |
| 641 | GL_GNULIB_TIMEGM = @GL_GNULIB_TIMEGM@ | 645 | GL_GNULIB_TIMEGM = @GL_GNULIB_TIMEGM@ |
| 642 | GL_GNULIB_TIMESPEC_GET = @GL_GNULIB_TIMESPEC_GET@ | 646 | GL_GNULIB_TIMESPEC_GET = @GL_GNULIB_TIMESPEC_GET@ |
| @@ -658,22 +662,24 @@ GL_GNULIB_UNSETENV = @GL_GNULIB_UNSETENV@ | |||
| 658 | GL_GNULIB_USLEEP = @GL_GNULIB_USLEEP@ | 662 | GL_GNULIB_USLEEP = @GL_GNULIB_USLEEP@ |
| 659 | GL_GNULIB_UTIMENSAT = @GL_GNULIB_UTIMENSAT@ | 663 | GL_GNULIB_UTIMENSAT = @GL_GNULIB_UTIMENSAT@ |
| 660 | GL_GNULIB_VASPRINTF = @GL_GNULIB_VASPRINTF@ | 664 | GL_GNULIB_VASPRINTF = @GL_GNULIB_VASPRINTF@ |
| 661 | GL_GNULIB_VAZSPRINTF = @GL_GNULIB_VAZSPRINTF@ | 665 | GL_GNULIB_VASZPRINTF = @GL_GNULIB_VASZPRINTF@ |
| 662 | GL_GNULIB_VDPRINTF = @GL_GNULIB_VDPRINTF@ | 666 | GL_GNULIB_VDPRINTF = @GL_GNULIB_VDPRINTF@ |
| 667 | GL_GNULIB_VDZPRINTF = @GL_GNULIB_VDZPRINTF@ | ||
| 663 | GL_GNULIB_VFPRINTF = @GL_GNULIB_VFPRINTF@ | 668 | GL_GNULIB_VFPRINTF = @GL_GNULIB_VFPRINTF@ |
| 664 | GL_GNULIB_VFPRINTF_POSIX = @GL_GNULIB_VFPRINTF_POSIX@ | 669 | GL_GNULIB_VFPRINTF_POSIX = @GL_GNULIB_VFPRINTF_POSIX@ |
| 665 | GL_GNULIB_VFSCANF = @GL_GNULIB_VFSCANF@ | 670 | GL_GNULIB_VFSCANF = @GL_GNULIB_VFSCANF@ |
| 671 | GL_GNULIB_VFZPRINTF = @GL_GNULIB_VFZPRINTF@ | ||
| 666 | GL_GNULIB_VPRINTF = @GL_GNULIB_VPRINTF@ | 672 | GL_GNULIB_VPRINTF = @GL_GNULIB_VPRINTF@ |
| 667 | GL_GNULIB_VPRINTF_POSIX = @GL_GNULIB_VPRINTF_POSIX@ | 673 | GL_GNULIB_VPRINTF_POSIX = @GL_GNULIB_VPRINTF_POSIX@ |
| 668 | GL_GNULIB_VSCANF = @GL_GNULIB_VSCANF@ | 674 | GL_GNULIB_VSCANF = @GL_GNULIB_VSCANF@ |
| 669 | GL_GNULIB_VSNPRINTF = @GL_GNULIB_VSNPRINTF@ | 675 | GL_GNULIB_VSNPRINTF = @GL_GNULIB_VSNPRINTF@ |
| 676 | GL_GNULIB_VSNZPRINTF = @GL_GNULIB_VSNZPRINTF@ | ||
| 670 | GL_GNULIB_VSPRINTF_POSIX = @GL_GNULIB_VSPRINTF_POSIX@ | 677 | GL_GNULIB_VSPRINTF_POSIX = @GL_GNULIB_VSPRINTF_POSIX@ |
| 671 | GL_GNULIB_VZSNPRINTF = @GL_GNULIB_VZSNPRINTF@ | 678 | GL_GNULIB_VSZPRINTF = @GL_GNULIB_VSZPRINTF@ |
| 672 | GL_GNULIB_VZSPRINTF = @GL_GNULIB_VZSPRINTF@ | 679 | GL_GNULIB_VZPRINTF = @GL_GNULIB_VZPRINTF@ |
| 673 | GL_GNULIB_WCTOMB = @GL_GNULIB_WCTOMB@ | 680 | GL_GNULIB_WCTOMB = @GL_GNULIB_WCTOMB@ |
| 674 | GL_GNULIB_WRITE = @GL_GNULIB_WRITE@ | 681 | GL_GNULIB_WRITE = @GL_GNULIB_WRITE@ |
| 675 | GL_GNULIB_ZSNPRINTF = @GL_GNULIB_ZSNPRINTF@ | 682 | GL_GNULIB_ZPRINTF = @GL_GNULIB_ZPRINTF@ |
| 676 | GL_GNULIB_ZSPRINTF = @GL_GNULIB_ZSPRINTF@ | ||
| 677 | GL_GNULIB__EXIT = @GL_GNULIB__EXIT@ | 683 | GL_GNULIB__EXIT = @GL_GNULIB__EXIT@ |
| 678 | GL_STDC_BIT_CEIL = @GL_STDC_BIT_CEIL@ | 684 | GL_STDC_BIT_CEIL = @GL_STDC_BIT_CEIL@ |
| 679 | GL_STDC_BIT_FLOOR = @GL_STDC_BIT_FLOOR@ | 685 | GL_STDC_BIT_FLOOR = @GL_STDC_BIT_FLOOR@ |
| @@ -3285,6 +3291,7 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) | |||
| 3285 | -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ | 3291 | -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ |
| 3286 | -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ | 3292 | -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ |
| 3287 | -e 's/@''GNULIB_DPRINTF''@/$(GL_GNULIB_DPRINTF)/g' \ | 3293 | -e 's/@''GNULIB_DPRINTF''@/$(GL_GNULIB_DPRINTF)/g' \ |
| 3294 | -e 's/@''GNULIB_DZPRINTF''@/$(GL_GNULIB_DZPRINTF)/g' \ | ||
| 3288 | -e 's/@''GNULIB_FCLOSE''@/$(GL_GNULIB_FCLOSE)/g' \ | 3295 | -e 's/@''GNULIB_FCLOSE''@/$(GL_GNULIB_FCLOSE)/g' \ |
| 3289 | -e 's/@''GNULIB_FDOPEN''@/$(GL_GNULIB_FDOPEN)/g' \ | 3296 | -e 's/@''GNULIB_FDOPEN''@/$(GL_GNULIB_FDOPEN)/g' \ |
| 3290 | -e 's/@''GNULIB_FFLUSH''@/$(GL_GNULIB_FFLUSH)/g' \ | 3297 | -e 's/@''GNULIB_FFLUSH''@/$(GL_GNULIB_FFLUSH)/g' \ |
| @@ -3305,6 +3312,7 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) | |||
| 3305 | -e 's/@''GNULIB_FTELL''@/$(GL_GNULIB_FTELL)/g' \ | 3312 | -e 's/@''GNULIB_FTELL''@/$(GL_GNULIB_FTELL)/g' \ |
| 3306 | -e 's/@''GNULIB_FTELLO''@/$(GL_GNULIB_FTELLO)/g' \ | 3313 | -e 's/@''GNULIB_FTELLO''@/$(GL_GNULIB_FTELLO)/g' \ |
| 3307 | -e 's/@''GNULIB_FWRITE''@/$(GL_GNULIB_FWRITE)/g' \ | 3314 | -e 's/@''GNULIB_FWRITE''@/$(GL_GNULIB_FWRITE)/g' \ |
| 3315 | -e 's/@''GNULIB_FZPRINTF''@/$(GL_GNULIB_FZPRINTF)/g' \ | ||
| 3308 | -e 's/@''GNULIB_GETC''@/$(GL_GNULIB_GETC)/g' \ | 3316 | -e 's/@''GNULIB_GETC''@/$(GL_GNULIB_GETC)/g' \ |
| 3309 | -e 's/@''GNULIB_GETCHAR''@/$(GL_GNULIB_GETCHAR)/g' \ | 3317 | -e 's/@''GNULIB_GETCHAR''@/$(GL_GNULIB_GETCHAR)/g' \ |
| 3310 | -e 's/@''GNULIB_GETDELIM''@/$(GL_GNULIB_GETDELIM)/g' \ | 3318 | -e 's/@''GNULIB_GETDELIM''@/$(GL_GNULIB_GETDELIM)/g' \ |
| @@ -3325,25 +3333,29 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) | |||
| 3325 | -e 's/@''GNULIB_RENAMEAT''@/$(GL_GNULIB_RENAMEAT)/g' \ | 3333 | -e 's/@''GNULIB_RENAMEAT''@/$(GL_GNULIB_RENAMEAT)/g' \ |
| 3326 | -e 's/@''GNULIB_SCANF''@/$(GL_GNULIB_SCANF)/g' \ | 3334 | -e 's/@''GNULIB_SCANF''@/$(GL_GNULIB_SCANF)/g' \ |
| 3327 | -e 's/@''GNULIB_SNPRINTF''@/$(GL_GNULIB_SNPRINTF)/g' \ | 3335 | -e 's/@''GNULIB_SNPRINTF''@/$(GL_GNULIB_SNPRINTF)/g' \ |
| 3336 | -e 's/@''GNULIB_SNZPRINTF''@/$(GL_GNULIB_SNZPRINTF)/g' \ | ||
| 3328 | -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GL_GNULIB_SPRINTF_POSIX)/g' \ | 3337 | -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GL_GNULIB_SPRINTF_POSIX)/g' \ |
| 3329 | -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GL_GNULIB_STDIO_H_NONBLOCKING)/g' \ | 3338 | -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GL_GNULIB_STDIO_H_NONBLOCKING)/g' \ |
| 3330 | -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GL_GNULIB_STDIO_H_SIGPIPE)/g' \ | 3339 | -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GL_GNULIB_STDIO_H_SIGPIPE)/g' \ |
| 3340 | -e 's/@''GNULIB_SZPRINTF''@/$(GL_GNULIB_SZPRINTF)/g' \ | ||
| 3331 | -e 's/@''GNULIB_TMPFILE''@/$(GL_GNULIB_TMPFILE)/g' \ | 3341 | -e 's/@''GNULIB_TMPFILE''@/$(GL_GNULIB_TMPFILE)/g' \ |
| 3332 | -e 's/@''GNULIB_VASPRINTF''@/$(GL_GNULIB_VASPRINTF)/g' \ | 3342 | -e 's/@''GNULIB_VASPRINTF''@/$(GL_GNULIB_VASPRINTF)/g' \ |
| 3333 | -e 's/@''GNULIB_VAZSPRINTF''@/$(GL_GNULIB_VAZSPRINTF)/g' \ | 3343 | -e 's/@''GNULIB_VASZPRINTF''@/$(GL_GNULIB_VASZPRINTF)/g' \ |
| 3334 | -e 's/@''GNULIB_VDPRINTF''@/$(GL_GNULIB_VDPRINTF)/g' \ | 3344 | -e 's/@''GNULIB_VDPRINTF''@/$(GL_GNULIB_VDPRINTF)/g' \ |
| 3345 | -e 's/@''GNULIB_VDZPRINTF''@/$(GL_GNULIB_VDZPRINTF)/g' \ | ||
| 3335 | -e 's/@''GNULIB_VFPRINTF''@/$(GL_GNULIB_VFPRINTF)/g' \ | 3346 | -e 's/@''GNULIB_VFPRINTF''@/$(GL_GNULIB_VFPRINTF)/g' \ |
| 3336 | -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GL_GNULIB_VFPRINTF_POSIX)/g' \ | 3347 | -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GL_GNULIB_VFPRINTF_POSIX)/g' \ |
| 3348 | -e 's/@''GNULIB_VFZPRINTF''@/$(GL_GNULIB_VFZPRINTF)/g' \ | ||
| 3337 | -e 's/@''GNULIB_VFSCANF''@/$(GL_GNULIB_VFSCANF)/g' \ | 3349 | -e 's/@''GNULIB_VFSCANF''@/$(GL_GNULIB_VFSCANF)/g' \ |
| 3338 | -e 's/@''GNULIB_VSCANF''@/$(GL_GNULIB_VSCANF)/g' \ | 3350 | -e 's/@''GNULIB_VSCANF''@/$(GL_GNULIB_VSCANF)/g' \ |
| 3339 | -e 's/@''GNULIB_VPRINTF''@/$(GL_GNULIB_VPRINTF)/g' \ | 3351 | -e 's/@''GNULIB_VPRINTF''@/$(GL_GNULIB_VPRINTF)/g' \ |
| 3340 | -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GL_GNULIB_VPRINTF_POSIX)/g' \ | 3352 | -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GL_GNULIB_VPRINTF_POSIX)/g' \ |
| 3341 | -e 's/@''GNULIB_VSNPRINTF''@/$(GL_GNULIB_VSNPRINTF)/g' \ | 3353 | -e 's/@''GNULIB_VSNPRINTF''@/$(GL_GNULIB_VSNPRINTF)/g' \ |
| 3354 | -e 's/@''GNULIB_VSNZPRINTF''@/$(GL_GNULIB_VSNZPRINTF)/g' \ | ||
| 3342 | -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GL_GNULIB_VSPRINTF_POSIX)/g' \ | 3355 | -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GL_GNULIB_VSPRINTF_POSIX)/g' \ |
| 3343 | -e 's/@''GNULIB_VZSNPRINTF''@/$(GL_GNULIB_VZSNPRINTF)/g' \ | 3356 | -e 's/@''GNULIB_VSZPRINTF''@/$(GL_GNULIB_VSZPRINTF)/g' \ |
| 3344 | -e 's/@''GNULIB_VZSPRINTF''@/$(GL_GNULIB_VZSPRINTF)/g' \ | 3357 | -e 's/@''GNULIB_VZPRINTF''@/$(GL_GNULIB_VZPRINTF)/g' \ |
| 3345 | -e 's/@''GNULIB_ZSNPRINTF''@/$(GL_GNULIB_ZSNPRINTF)/g' \ | 3358 | -e 's/@''GNULIB_ZPRINTF''@/$(GL_GNULIB_ZPRINTF)/g' \ |
| 3346 | -e 's/@''GNULIB_ZSPRINTF''@/$(GL_GNULIB_ZSPRINTF)/g' \ | ||
| 3347 | -e 's/@''GNULIB_MDA_FCLOSEALL''@/$(GL_GNULIB_MDA_FCLOSEALL)/g' \ | 3359 | -e 's/@''GNULIB_MDA_FCLOSEALL''@/$(GL_GNULIB_MDA_FCLOSEALL)/g' \ |
| 3348 | -e 's/@''GNULIB_MDA_FDOPEN''@/$(GL_GNULIB_MDA_FDOPEN)/g' \ | 3360 | -e 's/@''GNULIB_MDA_FDOPEN''@/$(GL_GNULIB_MDA_FDOPEN)/g' \ |
| 3349 | -e 's/@''GNULIB_MDA_FILENO''@/$(GL_GNULIB_MDA_FILENO)/g' \ | 3361 | -e 's/@''GNULIB_MDA_FILENO''@/$(GL_GNULIB_MDA_FILENO)/g' \ |
diff --git a/lib/qcopy-acl.c b/lib/qcopy-acl.c index dfc39cead05..877f42588b7 100644 --- a/lib/qcopy-acl.c +++ b/lib/qcopy-acl.c | |||
| @@ -26,6 +26,20 @@ | |||
| 26 | #if USE_XATTR | 26 | #if USE_XATTR |
| 27 | 27 | ||
| 28 | # include <attr/libattr.h> | 28 | # include <attr/libattr.h> |
| 29 | # include <string.h> | ||
| 30 | |||
| 31 | # if HAVE_LINUX_XATTR_H | ||
| 32 | # include <linux/xattr.h> | ||
| 33 | # endif | ||
| 34 | # ifndef XATTR_NAME_NFSV4_ACL | ||
| 35 | # define XATTR_NAME_NFSV4_ACL "system.nfs4_acl" | ||
| 36 | # endif | ||
| 37 | # ifndef XATTR_NAME_POSIX_ACL_ACCESS | ||
| 38 | # define XATTR_NAME_POSIX_ACL_ACCESS "system.posix_acl_access" | ||
| 39 | # endif | ||
| 40 | # ifndef XATTR_NAME_POSIX_ACL_DEFAULT | ||
| 41 | # define XATTR_NAME_POSIX_ACL_DEFAULT "system.posix_acl_default" | ||
| 42 | # endif | ||
| 29 | 43 | ||
| 30 | /* Returns 1 if NAME is the name of an extended attribute that is related | 44 | /* Returns 1 if NAME is the name of an extended attribute that is related |
| 31 | to permissions, i.e. ACLs. Returns 0 otherwise. */ | 45 | to permissions, i.e. ACLs. Returns 0 otherwise. */ |
| @@ -33,7 +47,12 @@ | |||
| 33 | static int | 47 | static int |
| 34 | is_attr_permissions (const char *name, struct error_context *ctx) | 48 | is_attr_permissions (const char *name, struct error_context *ctx) |
| 35 | { | 49 | { |
| 36 | return attr_copy_action (name, ctx) == ATTR_ACTION_PERMISSIONS; | 50 | /* We need to explicitly test for the known extended attribute names, |
| 51 | because at least on CentOS 7, attr_copy_action does not do it. */ | ||
| 52 | return strcmp (name, XATTR_NAME_POSIX_ACL_ACCESS) == 0 | ||
| 53 | || strcmp (name, XATTR_NAME_POSIX_ACL_DEFAULT) == 0 | ||
| 54 | || strcmp (name, XATTR_NAME_NFSV4_ACL) == 0 | ||
| 55 | || attr_copy_action (name, ctx) == ATTR_ACTION_PERMISSIONS; | ||
| 37 | } | 56 | } |
| 38 | 57 | ||
| 39 | #endif /* USE_XATTR */ | 58 | #endif /* USE_XATTR */ |
diff --git a/lib/stdio.in.h b/lib/stdio.in.h index cf2d8c999bc..38572382d46 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h | |||
| @@ -280,7 +280,26 @@ | |||
| 280 | #endif | 280 | #endif |
| 281 | 281 | ||
| 282 | 282 | ||
| 283 | #if @GNULIB_DZPRINTF@ | ||
| 284 | /* Prints formatted output to file descriptor FD. | ||
| 285 | Returns the number of bytes written to the file descriptor. Upon | ||
| 286 | failure, returns -1 with errno set. | ||
| 287 | Failure code EOVERFLOW can only occur when a width > INT_MAX is used. | ||
| 288 | Therefore, if the format string is valid and does not use %ls/%lc | ||
| 289 | directives nor widths, the only possible failure codes are ENOMEM | ||
| 290 | and the possible failure codes from write(), excluding EINTR. */ | ||
| 291 | _GL_FUNCDECL_SYS (dzprintf, off64_t, | ||
| 292 | (int fd, const char *restrict format, ...) | ||
| 293 | _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) | ||
| 294 | _GL_ARG_NONNULL ((2))); | ||
| 295 | _GL_CXXALIAS_SYS (dzprintf, off64_t, | ||
| 296 | (int fd, const char *restrict format, ...)); | ||
| 297 | #endif | ||
| 298 | |||
| 283 | #if @GNULIB_DPRINTF@ | 299 | #if @GNULIB_DPRINTF@ |
| 300 | /* Prints formatted output to file descriptor FD. | ||
| 301 | Returns the number of bytes written to the file descriptor. Upon | ||
| 302 | failure, returns a negative value. */ | ||
| 284 | # if @REPLACE_DPRINTF@ | 303 | # if @REPLACE_DPRINTF@ |
| 285 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 304 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 286 | # define dprintf rpl_dprintf | 305 | # define dprintf rpl_dprintf |
| @@ -547,7 +566,26 @@ _GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX complian | |||
| 547 | # endif | 566 | # endif |
| 548 | #endif | 567 | #endif |
| 549 | 568 | ||
| 569 | #if @GNULIB_FZPRINTF@ | ||
| 570 | /* Prints formatted output to stream FP. | ||
| 571 | Returns the number of bytes written to the stream. Upon failure, | ||
| 572 | returns -1 with the stream's error indicator set. | ||
| 573 | Failure cause EOVERFLOW can only occur when a width > INT_MAX is used. | ||
| 574 | Therefore, if the format string is valid and does not use %ls/%lc | ||
| 575 | directives nor widths, the only possible failure causes are ENOMEM | ||
| 576 | and the possible failure causes from fwrite(). */ | ||
| 577 | _GL_FUNCDECL_SYS (fzprintf, off64_t, | ||
| 578 | (FILE *restrict fp, const char *restrict format, ...) | ||
| 579 | _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) | ||
| 580 | _GL_ARG_NONNULL ((1, 2))); | ||
| 581 | _GL_CXXALIAS_SYS (fzprintf, off64_t, | ||
| 582 | (FILE *restrict fp, const char *restrict format, ...)); | ||
| 583 | #endif | ||
| 584 | |||
| 550 | #if @GNULIB_FPRINTF_POSIX@ || @GNULIB_FPRINTF@ | 585 | #if @GNULIB_FPRINTF_POSIX@ || @GNULIB_FPRINTF@ |
| 586 | /* Prints formatted output to stream FP. | ||
| 587 | Returns the number of bytes written to the stream. Upon failure, | ||
| 588 | returns a negative value with the stream's error indicator set. */ | ||
| 551 | # if (@GNULIB_FPRINTF_POSIX@ && @REPLACE_FPRINTF@) \ | 589 | # if (@GNULIB_FPRINTF_POSIX@ && @REPLACE_FPRINTF@) \ |
| 552 | || (@GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) | 590 | || (@GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) |
| 553 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 591 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| @@ -1227,7 +1265,24 @@ _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " | |||
| 1227 | # endif | 1265 | # endif |
| 1228 | #endif | 1266 | #endif |
| 1229 | 1267 | ||
| 1268 | #if @GNULIB_ZPRINTF@ | ||
| 1269 | /* Prints formatted output to standard output. | ||
| 1270 | Returns the number of bytes written to standard output. Upon failure, | ||
| 1271 | returns -1 with stdout's error indicator set. | ||
| 1272 | Failure cause EOVERFLOW can only occur when a width > INT_MAX is used. | ||
| 1273 | Therefore, if the format string is valid and does not use %ls/%lc | ||
| 1274 | directives nor widths, the only possible failure causes are ENOMEM | ||
| 1275 | and the possible failure causes from fwrite(). */ | ||
| 1276 | _GL_FUNCDECL_SYS (zprintf, off64_t, (const char *restrict format, ...) | ||
| 1277 | _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 2) | ||
| 1278 | _GL_ARG_NONNULL ((1))); | ||
| 1279 | _GL_CXXALIAS_SYS (zprintf, off64_t, (const char *restrict format, ...)); | ||
| 1280 | #endif | ||
| 1281 | |||
| 1230 | #if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@ | 1282 | #if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@ |
| 1283 | /* Prints formatted output to standard output. | ||
| 1284 | Returns the number of bytes written to standard output. Upon failure, | ||
| 1285 | returns a negative value with stdout's error indicator set. */ | ||
| 1231 | # if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \ | 1286 | # if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \ |
| 1232 | || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) | 1287 | || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) |
| 1233 | # if defined __GNUC__ || defined __clang__ | 1288 | # if defined __GNUC__ || defined __clang__ |
| @@ -1459,7 +1514,7 @@ _GL_CXXALIASWARN (scanf); | |||
| 1459 | # endif | 1514 | # endif |
| 1460 | #endif | 1515 | #endif |
| 1461 | 1516 | ||
| 1462 | #if @GNULIB_ZSNPRINTF@ | 1517 | #if @GNULIB_SNZPRINTF@ |
| 1463 | /* Prints formatted output to string STR. Similar to sprintf, but the | 1518 | /* Prints formatted output to string STR. Similar to sprintf, but the |
| 1464 | additional parameter SIZE limits how much is written into STR. | 1519 | additional parameter SIZE limits how much is written into STR. |
| 1465 | STR may be NULL, in which case nothing will be written. | 1520 | STR may be NULL, in which case nothing will be written. |
| @@ -1468,12 +1523,12 @@ _GL_CXXALIASWARN (scanf); | |||
| 1468 | Failure code EOVERFLOW can only occur when a width > INT_MAX is used. | 1523 | Failure code EOVERFLOW can only occur when a width > INT_MAX is used. |
| 1469 | Therefore, if the format string is valid and does not use %ls/%lc | 1524 | Therefore, if the format string is valid and does not use %ls/%lc |
| 1470 | directives nor widths, the only possible failure code is ENOMEM. */ | 1525 | directives nor widths, the only possible failure code is ENOMEM. */ |
| 1471 | _GL_FUNCDECL_SYS (zsnprintf, ptrdiff_t, | 1526 | _GL_FUNCDECL_SYS (snzprintf, ptrdiff_t, |
| 1472 | (char *restrict str, size_t size, | 1527 | (char *restrict str, size_t size, |
| 1473 | const char *restrict format, ...) | 1528 | const char *restrict format, ...) |
| 1474 | _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 4) | 1529 | _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 4) |
| 1475 | _GL_ARG_NONNULL ((3))); | 1530 | _GL_ARG_NONNULL ((3))); |
| 1476 | _GL_CXXALIAS_SYS (zsnprintf, ptrdiff_t, | 1531 | _GL_CXXALIAS_SYS (snzprintf, ptrdiff_t, |
| 1477 | (char *restrict str, size_t size, | 1532 | (char *restrict str, size_t size, |
| 1478 | const char *restrict format, ...)); | 1533 | const char *restrict format, ...)); |
| 1479 | #endif | 1534 | #endif |
| @@ -1520,19 +1575,19 @@ _GL_WARN_ON_USE (snprintf, "snprintf is unportable - " | |||
| 1520 | # endif | 1575 | # endif |
| 1521 | #endif | 1576 | #endif |
| 1522 | 1577 | ||
| 1523 | #if @GNULIB_ZSPRINTF@ | 1578 | #if @GNULIB_SZPRINTF@ |
| 1524 | /* Prints formatted output to string STR. | 1579 | /* Prints formatted output to string STR. |
| 1525 | Returns the string length of the formatted string. Upon failure, | 1580 | Returns the string length of the formatted string. Upon failure, |
| 1526 | returns -1 with errno set. | 1581 | returns -1 with errno set. |
| 1527 | Failure code EOVERFLOW can only occur when a width > INT_MAX is used. | 1582 | Failure code EOVERFLOW can only occur when a width > INT_MAX is used. |
| 1528 | Therefore, if the format string is valid and does not use %ls/%lc | 1583 | Therefore, if the format string is valid and does not use %ls/%lc |
| 1529 | directives nor widths, the only possible failure code is ENOMEM. */ | 1584 | directives nor widths, the only possible failure code is ENOMEM. */ |
| 1530 | _GL_FUNCDECL_SYS (zsprintf, ptrdiff_t, | 1585 | _GL_FUNCDECL_SYS (szprintf, ptrdiff_t, |
| 1531 | (char *restrict str, | 1586 | (char *restrict str, |
| 1532 | const char *restrict format, ...) | 1587 | const char *restrict format, ...) |
| 1533 | _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) | 1588 | _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) |
| 1534 | _GL_ARG_NONNULL ((1, 2))); | 1589 | _GL_ARG_NONNULL ((1, 2))); |
| 1535 | _GL_CXXALIAS_SYS (zsprintf, ptrdiff_t, | 1590 | _GL_CXXALIAS_SYS (szprintf, ptrdiff_t, |
| 1536 | (char *restrict str, | 1591 | (char *restrict str, |
| 1537 | const char *restrict format, ...)); | 1592 | const char *restrict format, ...)); |
| 1538 | #endif | 1593 | #endif |
| @@ -1629,7 +1684,7 @@ _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " | |||
| 1629 | # endif | 1684 | # endif |
| 1630 | #endif | 1685 | #endif |
| 1631 | 1686 | ||
| 1632 | #if @GNULIB_VAZSPRINTF@ | 1687 | #if @GNULIB_VASZPRINTF@ |
| 1633 | /* Prints formatted output to a string dynamically allocated with malloc(). | 1688 | /* Prints formatted output to a string dynamically allocated with malloc(). |
| 1634 | If the memory allocation succeeds, it stores the address of the string in | 1689 | If the memory allocation succeeds, it stores the address of the string in |
| 1635 | *RESULT and returns the number of resulting bytes, excluding the trailing | 1690 | *RESULT and returns the number of resulting bytes, excluding the trailing |
| @@ -1638,17 +1693,17 @@ _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " | |||
| 1638 | Failure code EOVERFLOW can only occur when a width > INT_MAX is used. | 1693 | Failure code EOVERFLOW can only occur when a width > INT_MAX is used. |
| 1639 | Therefore, if the format string is valid and does not use %ls/%lc | 1694 | Therefore, if the format string is valid and does not use %ls/%lc |
| 1640 | directives nor widths, the only possible failure code is ENOMEM. */ | 1695 | directives nor widths, the only possible failure code is ENOMEM. */ |
| 1641 | _GL_FUNCDECL_SYS (azsprintf, ptrdiff_t, | 1696 | _GL_FUNCDECL_SYS (aszprintf, ptrdiff_t, |
| 1642 | (char **result, const char *format, ...) | 1697 | (char **result, const char *format, ...) |
| 1643 | _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) | 1698 | _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) |
| 1644 | _GL_ARG_NONNULL ((1, 2))); | 1699 | _GL_ARG_NONNULL ((1, 2))); |
| 1645 | _GL_CXXALIAS_SYS (azsprintf, ptrdiff_t, | 1700 | _GL_CXXALIAS_SYS (aszprintf, ptrdiff_t, |
| 1646 | (char **result, const char *format, ...)); | 1701 | (char **result, const char *format, ...)); |
| 1647 | _GL_FUNCDECL_SYS (vazsprintf, ptrdiff_t, | 1702 | _GL_FUNCDECL_SYS (vaszprintf, ptrdiff_t, |
| 1648 | (char **result, const char *format, va_list args) | 1703 | (char **result, const char *format, va_list args) |
| 1649 | _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) | 1704 | _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) |
| 1650 | _GL_ARG_NONNULL ((1, 2))); | 1705 | _GL_ARG_NONNULL ((1, 2))); |
| 1651 | _GL_CXXALIAS_SYS (vazsprintf, ptrdiff_t, | 1706 | _GL_CXXALIAS_SYS (vaszprintf, ptrdiff_t, |
| 1652 | (char **result, const char *format, va_list args)); | 1707 | (char **result, const char *format, va_list args)); |
| 1653 | #endif | 1708 | #endif |
| 1654 | 1709 | ||
| @@ -1703,7 +1758,26 @@ _GL_CXXALIAS_SYS (vasprintf, int, | |||
| 1703 | _GL_CXXALIASWARN (vasprintf); | 1758 | _GL_CXXALIASWARN (vasprintf); |
| 1704 | #endif | 1759 | #endif |
| 1705 | 1760 | ||
| 1761 | #if @GNULIB_VDZPRINTF@ | ||
| 1762 | /* Prints formatted output to file descriptor FD. | ||
| 1763 | Returns the number of bytes written to the file descriptor. Upon | ||
| 1764 | failure, returns -1 with errno set. | ||
| 1765 | Failure code EOVERFLOW can only occur when a width > INT_MAX is used. | ||
| 1766 | Therefore, if the format string is valid and does not use %ls/%lc | ||
| 1767 | directives nor widths, the only possible failure codes are ENOMEM | ||
| 1768 | and the possible failure codes from write(), excluding EINTR. */ | ||
| 1769 | _GL_FUNCDECL_SYS (vdzprintf, off64_t, | ||
| 1770 | (int fd, const char *restrict format, va_list args) | ||
| 1771 | _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) | ||
| 1772 | _GL_ARG_NONNULL ((2))); | ||
| 1773 | _GL_CXXALIAS_SYS (vdzprintf, off64_t, | ||
| 1774 | (int fd, const char *restrict format, va_list args)); | ||
| 1775 | #endif | ||
| 1776 | |||
| 1706 | #if @GNULIB_VDPRINTF@ | 1777 | #if @GNULIB_VDPRINTF@ |
| 1778 | /* Prints formatted output to file descriptor FD. | ||
| 1779 | Returns the number of bytes written to the file descriptor. Upon | ||
| 1780 | failure, returns a negative value. */ | ||
| 1707 | # if @REPLACE_VDPRINTF@ | 1781 | # if @REPLACE_VDPRINTF@ |
| 1708 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 1782 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1709 | # define vdprintf rpl_vdprintf | 1783 | # define vdprintf rpl_vdprintf |
| @@ -1737,7 +1811,28 @@ _GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " | |||
| 1737 | # endif | 1811 | # endif |
| 1738 | #endif | 1812 | #endif |
| 1739 | 1813 | ||
| 1814 | #if @GNULIB_VFZPRINTF@ | ||
| 1815 | /* Prints formatted output to stream FP. | ||
| 1816 | Returns the number of bytes written to the stream. Upon failure, | ||
| 1817 | returns -1 with the stream's error indicator set. | ||
| 1818 | Failure cause EOVERFLOW can only occur when a width > INT_MAX is used. | ||
| 1819 | Therefore, if the format string is valid and does not use %ls/%lc | ||
| 1820 | directives nor widths, the only possible failure causes are ENOMEM | ||
| 1821 | and the possible failure causes from fwrite(). */ | ||
| 1822 | _GL_FUNCDECL_SYS (vfzprintf, off64_t, | ||
| 1823 | (FILE *restrict fp, | ||
| 1824 | const char *restrict format, va_list args) | ||
| 1825 | _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) | ||
| 1826 | _GL_ARG_NONNULL ((1, 2))); | ||
| 1827 | _GL_CXXALIAS_SYS (vfzprintf, off64_t, | ||
| 1828 | (FILE *restrict fp, | ||
| 1829 | const char *restrict format, va_list args)); | ||
| 1830 | #endif | ||
| 1831 | |||
| 1740 | #if @GNULIB_VFPRINTF_POSIX@ || @GNULIB_VFPRINTF@ | 1832 | #if @GNULIB_VFPRINTF_POSIX@ || @GNULIB_VFPRINTF@ |
| 1833 | /* Prints formatted output to stream FP. | ||
| 1834 | Returns the number of bytes written to the stream. Upon failure, | ||
| 1835 | returns a negative value with the stream's error indicator set. */ | ||
| 1741 | # if (@GNULIB_VFPRINTF_POSIX@ && @REPLACE_VFPRINTF@) \ | 1836 | # if (@GNULIB_VFPRINTF_POSIX@ && @REPLACE_VFPRINTF@) \ |
| 1742 | || (@GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) | 1837 | || (@GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) |
| 1743 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 1838 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| @@ -1806,7 +1901,25 @@ _GL_CXXALIASWARN (vfscanf); | |||
| 1806 | # endif | 1901 | # endif |
| 1807 | #endif | 1902 | #endif |
| 1808 | 1903 | ||
| 1904 | #if @GNULIB_VZPRINTF@ | ||
| 1905 | /* Prints formatted output to standard output. | ||
| 1906 | Returns the number of bytes written to standard output. Upon failure, | ||
| 1907 | returns -1 with stdout's error indicator set. | ||
| 1908 | Failure cause EOVERFLOW can only occur when a width > INT_MAX is used. | ||
| 1909 | Therefore, if the format string is valid and does not use %ls/%lc | ||
| 1910 | directives nor widths, the only possible failure causes are ENOMEM | ||
| 1911 | and the possible failure causes from fwrite(). */ | ||
| 1912 | _GL_FUNCDECL_SYS (vzprintf, off64_t, (const char *restrict format, va_list args) | ||
| 1913 | _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 0) | ||
| 1914 | _GL_ARG_NONNULL ((1))); | ||
| 1915 | _GL_CXXALIAS_SYS (vzprintf, off64_t, | ||
| 1916 | (const char *restrict format, va_list args)); | ||
| 1917 | #endif | ||
| 1918 | |||
| 1809 | #if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VPRINTF@ | 1919 | #if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VPRINTF@ |
| 1920 | /* Prints formatted output to standard output. | ||
| 1921 | Returns the number of bytes written to standard output. Upon failure, | ||
| 1922 | returns a negative value with stdout's error indicator set. */ | ||
| 1810 | # if (@GNULIB_VPRINTF_POSIX@ && @REPLACE_VPRINTF@) \ | 1923 | # if (@GNULIB_VPRINTF_POSIX@ && @REPLACE_VPRINTF@) \ |
| 1811 | || (@GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) | 1924 | || (@GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) |
| 1812 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 1925 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| @@ -1862,7 +1975,7 @@ _GL_CXXALIASWARN (vscanf); | |||
| 1862 | # endif | 1975 | # endif |
| 1863 | #endif | 1976 | #endif |
| 1864 | 1977 | ||
| 1865 | #if @GNULIB_VZSNPRINTF@ | 1978 | #if @GNULIB_VSNZPRINTF@ |
| 1866 | /* Prints formatted output to string STR. Similar to sprintf, but the | 1979 | /* Prints formatted output to string STR. Similar to sprintf, but the |
| 1867 | additional parameter SIZE limits how much is written into STR. | 1980 | additional parameter SIZE limits how much is written into STR. |
| 1868 | STR may be NULL, in which case nothing will be written. | 1981 | STR may be NULL, in which case nothing will be written. |
| @@ -1871,12 +1984,12 @@ _GL_CXXALIASWARN (vscanf); | |||
| 1871 | Failure code EOVERFLOW can only occur when a width > INT_MAX is used. | 1984 | Failure code EOVERFLOW can only occur when a width > INT_MAX is used. |
| 1872 | Therefore, if the format string is valid and does not use %ls/%lc | 1985 | Therefore, if the format string is valid and does not use %ls/%lc |
| 1873 | directives nor widths, the only possible failure code is ENOMEM. */ | 1986 | directives nor widths, the only possible failure code is ENOMEM. */ |
| 1874 | _GL_FUNCDECL_SYS (vzsnprintf, ptrdiff_t, | 1987 | _GL_FUNCDECL_SYS (vsnzprintf, ptrdiff_t, |
| 1875 | (char *restrict str, size_t size, | 1988 | (char *restrict str, size_t size, |
| 1876 | const char *restrict format, va_list args) | 1989 | const char *restrict format, va_list args) |
| 1877 | _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 0) | 1990 | _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 0) |
| 1878 | _GL_ARG_NONNULL ((3))); | 1991 | _GL_ARG_NONNULL ((3))); |
| 1879 | _GL_CXXALIAS_SYS (vzsnprintf, ptrdiff_t, | 1992 | _GL_CXXALIAS_SYS (vsnzprintf, ptrdiff_t, |
| 1880 | (char *restrict str, size_t size, | 1993 | (char *restrict str, size_t size, |
| 1881 | const char *restrict format, va_list args)); | 1994 | const char *restrict format, va_list args)); |
| 1882 | #endif | 1995 | #endif |
| @@ -1923,19 +2036,19 @@ _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " | |||
| 1923 | # endif | 2036 | # endif |
| 1924 | #endif | 2037 | #endif |
| 1925 | 2038 | ||
| 1926 | #if @GNULIB_VZSPRINTF@ | 2039 | #if @GNULIB_VSZPRINTF@ |
| 1927 | /* Prints formatted output to string STR. | 2040 | /* Prints formatted output to string STR. |
| 1928 | Returns the string length of the formatted string. Upon failure, | 2041 | Returns the string length of the formatted string. Upon failure, |
| 1929 | returns -1 with errno set. | 2042 | returns -1 with errno set. |
| 1930 | Failure code EOVERFLOW can only occur when a width > INT_MAX is used. | 2043 | Failure code EOVERFLOW can only occur when a width > INT_MAX is used. |
| 1931 | Therefore, if the format string is valid and does not use %ls/%lc | 2044 | Therefore, if the format string is valid and does not use %ls/%lc |
| 1932 | directives nor widths, the only possible failure code is ENOMEM. */ | 2045 | directives nor widths, the only possible failure code is ENOMEM. */ |
| 1933 | _GL_FUNCDECL_SYS (vzsprintf, ptrdiff_t, | 2046 | _GL_FUNCDECL_SYS (vszprintf, ptrdiff_t, |
| 1934 | (char *restrict str, | 2047 | (char *restrict str, |
| 1935 | const char *restrict format, va_list args) | 2048 | const char *restrict format, va_list args) |
| 1936 | _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) | 2049 | _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) |
| 1937 | _GL_ARG_NONNULL ((1, 2))); | 2050 | _GL_ARG_NONNULL ((1, 2))); |
| 1938 | _GL_CXXALIAS_SYS (vzsprintf, ptrdiff_t, | 2051 | _GL_CXXALIAS_SYS (vszprintf, ptrdiff_t, |
| 1939 | (char *restrict str, | 2052 | (char *restrict str, |
| 1940 | const char *restrict format, va_list args)); | 2053 | const char *restrict format, va_list args)); |
| 1941 | #endif | 2054 | #endif |
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index cfc69d0a506..e42368eef27 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h | |||
| @@ -20,9 +20,18 @@ | |||
| 20 | #endif | 20 | #endif |
| 21 | @PRAGMA_COLUMNS@ | 21 | @PRAGMA_COLUMNS@ |
| 22 | 22 | ||
| 23 | #if defined __need_system_stdlib_h || defined __need_malloc_and_calloc | 23 | #if (defined __need_system_stdlib_h && !defined _GLIBCXX_STDLIB_H) || defined __need_malloc_and_calloc |
| 24 | /* Special invocation conventions inside some gnulib header files, | 24 | /* Special invocation conventions inside some gnulib header files, |
| 25 | and inside some glibc header files, respectively. */ | 25 | and inside some glibc header files, respectively. |
| 26 | Do not recognize this special invocation convention when GCC's | ||
| 27 | c++/11/stdlib.h is being included or has been included. This is needed | ||
| 28 | to support the use of clang+llvm binaries on Ubuntu 22.04 with | ||
| 29 | CXX="$clangdir/bin/clang++ -I/usr/include/c++/11 \ | ||
| 30 | -I/usr/include/x86_64-linux-gnu/c++/11 | ||
| 31 | -L/usr/lib/gcc/x86_64-linux-gnu/11 | ||
| 32 | -Wl,-rpath,$clangdir/lib" | ||
| 33 | because in this case /usr/include/c++/11/stdlib.h (which does not support | ||
| 34 | the convention) is seen before the gnulib-generated stdlib.h. */ | ||
| 26 | 35 | ||
| 27 | #@INCLUDE_NEXT@ @NEXT_STDLIB_H@ | 36 | #@INCLUDE_NEXT@ @NEXT_STDLIB_H@ |
| 28 | 37 | ||
| @@ -108,6 +117,17 @@ struct random_data | |||
| 108 | # include <unistd.h> | 117 | # include <unistd.h> |
| 109 | #endif | 118 | #endif |
| 110 | 119 | ||
| 120 | #if ((@GNULIB_STRTOL@ && @REPLACE_STRTOL@) || (@GNULIB_STRTOLL@ && @REPLACE_STRTOLL@) || (@GNULIB_STRTOUL@ && @REPLACE_STRTOUL@) || (@GNULIB_STRTOULL@ && @REPLACE_STRTOULL@)) && defined __cplusplus && !defined GNULIB_NAMESPACE && defined __GNUG__ && !defined __clang__ && defined __sun | ||
| 121 | /* When strtol, strtoll, strtoul, or strtoull is going to be defined as a macro | ||
| 122 | below, this may cause compilation errors later in the libstdc++ header files | ||
| 123 | (that are part of GCC), such as: | ||
| 124 | error: 'rpl_strtol' is not a member of 'std' | ||
| 125 | To avoid this, include the relevant header files here, before these symbols | ||
| 126 | get defined as macros. But do so only on Solaris 11 (where it is needed), | ||
| 127 | not on mingw (where it would cause other compilation errors). */ | ||
| 128 | # include <string> | ||
| 129 | #endif | ||
| 130 | |||
| 111 | /* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers | 131 | /* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers |
| 112 | that can be freed by passing them as the Ith argument to the | 132 | that can be freed by passing them as the Ith argument to the |
| 113 | function F. */ | 133 | function F. */ |