about summary refs log tree commit diff
path: root/support/xunistd.h
Commit message (Collapse)AuthorAgeFilesLines
* Always define __USE_TIME_BITS64 when 64 bit time_t is usedAdhemerval Zanella2024-04-021-1/+1
| | | | | | | | | | | | | | | | | | | | It was raised on libc-help [1] that some Linux kernel interfaces expect the libc to define __USE_TIME_BITS64 to indicate the time_t size for the kABI. Different than defined by the initial y2038 design document [2], the __USE_TIME_BITS64 is only defined for ABIs that support more than one time_t size (by defining the _TIME_BITS for each module). The 64 bit time_t redirects are now enabled using a different internal define (__USE_TIME64_REDIRECTS). There is no expected change in semantic or code generation. Checked on x86_64-linux-gnu, i686-linux-gnu, aarch64-linux-gnu, and arm-linux-gnueabi [1] https://sourceware.org/pipermail/libc-help/2024-January/006557.html [2] https://sourceware.org/glibc/wiki/Y2038ProofnessDesign Reviewed-by: DJ Delorie <dj@redhat.com>
* Update copyright dates with scripts/update-copyrightsPaul Eggert2024-01-011-1/+1
|
* tests: replace read by xreadFrédéric Bérat2023-06-191-0/+3
| | | | | | | | | | | | | | | With fortification enabled, read calls return result needs to be checked, has it gets the __wur macro enabled. Note on read call removal from sysdeps/pthread/tst-cancel20.c and sysdeps/pthread/tst-cancel21.c: It is assumed that this second read call was there to overcome the race condition between pipe closure and thread cancellation that could happen in the original code. Since this race condition got fixed by d0e3ffb7a58854248f1d5e737610d50cd0a60f46 the second call seems superfluous. Hence, instead of checking for the return value of read, it looks reasonable to simply remove it. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Update copyright dates with scripts/update-copyrightsJoseph Myers2023-01-061-1/+1
|
* support: Add xmkfifoAdhemerval Zanella2022-04-151-0/+1
| | | | Wrapper support mkfifo.
* Update copyright dates with scripts/update-copyrightsPaul Eggert2022-01-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | I used these shell commands: ../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright (cd ../glibc && git commit -am"[this commit message]") and then ignored the output, which consisted lines saying "FOO: warning: copyright statement not found" for each of 7061 files FOO. I then removed trailing white space from math/tgmath.h, support/tst-support-open-dev-null-range.c, and sysdeps/x86_64/multiarch/strlen-vec.S, to work around the following obscure pre-commit check failure diagnostics from Savannah. I don't know why I run into these diagnostics whereas others evidently do not. remote: *** 912-#endif remote: *** 913: remote: *** 914- remote: *** error: lines with trailing whitespace found ... remote: *** error: sysdeps/unix/sysv/linux/statx_cp.c: trailing lines
* libsupport: Add 64-bit time_t support for stat functionsAdhemerval Zanella2021-06-151-0/+13
| | | | | | | | | The patch adds redirections for xstat, xlstat, and xfstat when _TIME_BITS=64 is defined. Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* support: Add xchmod wrapperAdhemerval Zanella2021-01-111-0/+1
| | | | Checked on x86_64-linux-gnu.
* Add xfchmod to libsupportAlexandra Hájková2021-01-101-0/+1
|
* Add xchdir to libsupport.Alexandra Hájková2021-01-091-0/+1
|
* Update copyright dates with scripts/update-copyrightsPaul Eggert2021-01-021-1/+1
| | | | | | | | | | | | | | | | I used these shell commands: ../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright (cd ../glibc && git commit -am"[this commit message]") and then ignored the output, which consisted lines saying "FOO: warning: copyright statement not found" for each of 6694 files FOO. I then removed trailing white space from benchtests/bench-pthread-locks.c and iconvdata/tst-iconv-big5-hkscs-to-2ucs4.c, to work around this diagnostic from Savannah: remote: *** pre-commit check failed ... remote: *** error: lines with trailing whitespace found remote: error: hook declined to update refs/heads/master
* support: Add the xlstat functionFlorian Weimer2020-02-091-0/+1
|
* Update copyright dates with scripts/update-copyrights.Joseph Myers2020-01-011-1/+1
|
* Prefer https to http for gnu.org and fsf.org URLsPaul Eggert2019-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, change sources.redhat.com to sourceware.org. This patch was automatically generated by running the following shell script, which uses GNU sed, and which avoids modifying files imported from upstream: sed -ri ' s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g ' \ $(find $(git ls-files) -prune -type f \ ! -name '*.po' \ ! -name 'ChangeLog*' \ ! -path COPYING ! -path COPYING.LIB \ ! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \ ! -path manual/texinfo.tex ! -path scripts/config.guess \ ! -path scripts/config.sub ! -path scripts/install-sh \ ! -path scripts/mkinstalldirs ! -path scripts/move-if-change \ ! -path INSTALL ! -path locale/programs/charmap-kw.h \ ! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \ ! '(' -name configure \ -execdir test -f configure.ac -o -f configure.in ';' ')' \ ! '(' -name preconfigure \ -execdir test -f preconfigure.ac ';' ')' \ -print) and then by running 'make dist-prepare' to regenerate files built from the altered files, and then executing the following to cleanup: chmod a+x sysdeps/unix/sysv/linux/riscv/configure # Omit irrelevant whitespace and comment-only changes, # perhaps from a slightly-different Autoconf version. git checkout -f \ sysdeps/csky/configure \ sysdeps/hppa/configure \ sysdeps/riscv/configure \ sysdeps/unix/sysv/linux/csky/configure # Omit changes that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines git checkout -f \ sysdeps/powerpc/powerpc64/ppc-mcount.S \ sysdeps/unix/sysv/linux/s390/s390-64/syscall.S # Omit change that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
* Update copyright dates with scripts/update-copyrights.Joseph Myers2019-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* test-container: Use xcopy_file_range for cross-device copy [BZ #23597]H.J. Lu2018-08-311-0/+3
| | | | | | | | | | | | | | | | | | | | copy_file_range can't be used to copy a file from glibc source directory to glibc build directory since they may be on different filesystems. This patch adds xcopy_file_range for cross-device copy. Reviewed-by: Carlos O'Donell <carlos@redhat.com> [BZ #23597] * support/Makefile (libsupport-routines): Add support_copy_file_range and xcopy_file_range. * support/support.h: Include <sys/types.h>. (support_copy_file_range): New prototype. * support/support_copy_file_range.c: New file. Copied and modified from io/copy_file_range-compat.c. * support/test-container.c (copy_one_file): Call xcopy_file_rang instead of copy_file_range. * support/xcopy_file_range.c: New file. * support/xunistd.h (xcopy_file_range): New prototype.
* Add test-in-container infrastructure.DJ Delorie2018-08-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | * Makefile (testroot.pristine): New rules to initialize the test-in-container "testroot". * Makerules (all-testsuite): Add tests-container. * Rules (tests-expected): Add tests-container. (binaries-all-tests): Likewise. (tests-container): New, run these tests in the testroot container. * support/Makefile (others): Add *-container, support_paths.c, xmkdirp, and links-dso-program. * support/links-dso-program-c.c: New. * support/links-dso-program.cc: New. * support/test-container.c: New. * support/shell-container.c: New. * support/echo-container.c: New. * support/true-container.c: New. * support/xmkdirp.c: New. * support/xsymlink.c: New. * support/support_paths.c: New. * support/support.h: Add support paths prototypes. * support/xunistd.h: Add xmkdirp () and xsymlink (). * nss/tst-nss-test3.c: Convert to test-in-container. * nss/tst-nss-test3.root/: New.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2018-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* copy_file_range: New function to copy file dataFlorian Weimer2017-12-221-0/+3
| | | | | The semantics are based on the Linux system call, but a very close emulation in user space is provided.
* Linux: Implement interfaces for memory protection keysFlorian Weimer2017-12-051-0/+1
| | | | | | | | | | | | | | | | This adds system call wrappers for pkey_alloc, pkey_free, pkey_mprotect, and x86-64 implementations of pkey_get and pkey_set, which abstract over the PKRU CPU register and hide the actual number of memory protection keys supported by the CPU. pkey_mprotect with a -1 key is implemented using mprotect, so it will work even if the kernel does not support the pkey_mprotect system call. The system call wrapers use unsigned int instead of unsigned long for parameters, so that no special treatment for x32 is needed. The flags argument is currently unused, and the access rights bit mask is limited to two bits by the current PKRU register layout anyway. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* support: Add xstrndup, xunlink, xreadlink, support_create_temp_directoryFlorian Weimer2017-11-121-0/+5
|
* __inet_pton_length: Implement new internal helper functionFlorian Weimer2017-06-211-1/+1
|
* resolv: Tests for various versions of res_initFlorian Weimer2017-06-021-1/+8
|
* Add internal facility for dynamic array handlingFlorian Weimer2017-06-021-0/+2
| | | | | | This is intended as a type-safe alternative to obstacks and hand-written realloc constructs. The implementation avoids writing function pointers to the heap.
* support: Add error checking to close system calls [BZ #21244]Florian Weimer2017-03-151-0/+4
|
* nptl: Add tst-robust-forkFlorian Weimer2017-01-271-0/+5
|
* Update copyright dates with scripts/update-copyrights.Joseph Myers2017-01-011-1/+1
|
* resolv: Add beginnings of a libresolv test suiteFlorian Weimer2016-12-311-0/+3
|
* support: Add support for delayed test failure reportingFlorian Weimer2016-12-281-0/+35
The new functions support_record_failure records a test failure, but does not terminate the process. The macros TEST_VERIFY and TEST_VERIFY_EXIT check that a condition is true.