about summary refs log tree commit diff
path: root/posix/unistd.h
Commit message (Collapse)AuthorAgeFilesLines
* 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-1/+6
| | | | | The semantics are based on the Linux system call, but a very close emulation in user space is provided.
* getopt: eliminate __need_getopt by splitting up getopt.h.Zack Weinberg2017-04-071-2/+1
| | | | | | | | | | | | | | | | | | | | | | __need_getopt is misnamed; what it really means is "we want only the getopt features specified in POSIX, not the GNU extensions". Because this code is shared with gnulib, it winds up being cleanest to split getopt.h into *four* headers. getopt_core.h and getopt_ext.h will be shared with gnulib, getopt_posix.h will be just for glibc, and each project will have its own copy of getopt.h. * posix/bits/getopt_core.h, posix/bits/getopt_ext.h: New files, intended to be shared with gnulib. * posix/bits/getopt_posix.h: New file, not intended to be shared with gnulib. * posix/getopt.h: Now just includes features.h, bits/getopt_core.h, and bits/getopt_ext.h. Will no longer be shared with gnulib. * include/bits/getopt_core.h, include/bits/getopt_ext.h * include/bits/getopt_posix.h: New wrappers. * posix/Makefile: Install new headers. * posix/unistd.h, libio/stdio.h: Include bits/getopt_posix.h instead of getopt.h.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2017-01-011-1/+1
|
* getentropy: Declare it in <unistd.h> for __USE_MISC [BZ #17252]Florian Weimer2016-12-311-1/+1
|
* Declare getentropy in <unistd.h> [BZ #17252]Florian Weimer2016-12-271-0/+5
|
* Make _REENTRANT and _THREAD_SAFE aliases for _POSIX_C_SOURCE=199506L.Zack Weinberg2016-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | For many years, the only effect of these macros has been to make unistd.h declare getlogin_r. _POSIX_C_SOURCE >= 199506L also causes this function to be declared. However, people who don't carefully read all the headers might be confused into thinking they need to define _REENTRANT for any threaded code (as was indeed the case a long time ago). Therefore, remove __USE_REENTRANT, and make _REENTRANT and _THREAD_SAFE into synonyms for _POSIX_C_SOURCE=199506L. This will only affect programs that don't select a higher conformance level some other way. For instance, -std=c89 -D_REENTRANT will see a change in visible declarations, but -std=c99 -D_POSIX_C_SOURCE=200809L -D_REENTRANT won't, and -D_REENTRANT all by itself also won't, because _DEFAULT_SOURCE implies _POSIX_C_SOURCE > 199506. * include/features.h: Remove __USE_REENTRANT. Treat _REENTRANT and _THREAD_SAFE the same as _POSIX_C_SOURCE=199506L, if a higher POSIX conformance level has not been selected by other macros. * NEWS, manual/creature.texi: Document this change. * posix/unistd.h, posix/bits/unistd.h: Don't check __USE_REENTRANT. * include/libc-symbols.h: Don't define _REENTRANT. * scripts/check-installed-headers.sh: Don't undefine _REENTRANT.
* Correct ttyslot header declaration conditions (bug 20051).Joseph Myers2016-05-171-2/+1
| | | | | | | | | | | | | | | | | | | | | | | UNIX98 and XPG4 have ttyslot in <stdlib.h>. glibc, however, has it in <unistd.h>, for __USE_MISC || (__USE_XOPEN_EXTENDED && !__USE_UNIX98), but no supported standard has it in <unistd.h>. This patch adds a properly conditioned declaration to <stdlib.h> (only enabled for the relevant standards, not for __USE_MISC or __USE_GNU). The <unistd.h> declaration is restricted to __USE_MISC. Some relevant XFAILs are removed. Tested for x86_64 and x86 (testsuite, and that installed stripped shared libraries are unchanged by the patch). [BZ #20051] * posix/unistd.h [__USE_XOPEN_EXTENDED && !__USE_UNIX98] (ttyslot): Do not declare. * stdlib/stdlib.h [__USE_XOPEN_EXTENDED && !__USE_XOPEN2K] (ttyslot): New prototype. * conform/Makefile (test-xfail-XPG4/unistd.h/conform): Remove variable. (test-xfail-UNIX98/stdlib.h/conform): Likewise.
* Declare gethostname for XPG4 (bug 20054).Joseph Myers2016-05-121-1/+1
| | | | | | | | | | | | | | | | unistd.h declares gethostname for __USE_UNIX98 || __USE_XOPEN2K. But it's also in XPG4 (XNS volume - C438 - not the main definitions of system interfaces and headers in C435). This patch corrects the condition. Tested for x86_64 and x86 (testsuite, and that installed stripped shared libraries are unchanged by the patch). [BZ #20054] * posix/unistd.h (gethostname): Declare if [__USE_XOPEN_EXTENDED], not [__USE_UNIX98]. * conform/data/unistd.h-data (gethostname): Do not expect for [XPG3].
* Declare pthread_atfork in unistd.h for UNIX98 (bug 20044).Joseph Myers2016-05-101-0/+9
| | | | | | | | | | | | | | For UNIX98 (only), unistd.h should declare pthread_atfork, but that declaration is missing. This patch adds it. Tested for x86_64 and x86 (testsuite, and that installed stripped shared libraries are unchanged by the patch). [BZ #20044] * posix/unistd.h [__USE_UNIX98 && !__USE_XOPEN2K] (pthread_atfork): New prototype. * conform/Makefile (test-xfail-UNIX98/unistd.h/conform): Remove variable.
* Declare cuserid in unistd.h for UNIX98 and before (bug 20043).Joseph Myers2016-05-101-2/+6
| | | | | | | | | | | | | For UNIX98 and older X/Open standards, unistd.h should have a declaration of the legacy cuserid function, but such a declaration is missing. This patch adds that missing declaration. Tested for x86_64 and x86 (testsuite, and that installed stripped shared libraries are unchanged by the patch). [BZ #20043] * posix/unistd.h [__USE_XOPEN && !__USE_XOPEN2K] (cuserid): New prototype.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2016-01-041-1/+1
|
* Restore _POSIX2_C_VERSION definition (bug 438).Joseph Myers2015-05-221-0/+3
| | | | | | | | | | | | | | | | | | | My review of conformtest expectations for POSIX showed up that the _POSIX2_C_VERSION macro, required by POSIX and XPG standards before 2001, was missing in unistd.h, having been removed on 2003-04-03 despite those standards still being supported. This patch adds it back. As it's in the implementation namespace, there's no need for it to be conditional, and other such macros aren't conditional in this header either. Tested for x86_64 and x86 (testsuite). Note that this *does* change the installed libraries, because it affects the sysconf support (present all along) for _SC_2_C_VERSION. [BZ #438] * posix/unistd.h (_POSIX2_C_VERSION): New macro. * conform/Makefile (test-xfail-POSIX/unistd.h/conform): Remove variable.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2015-01-021-1/+1
|
* Remove excess declarations from unistd.h for XPG3/XPG4 (bug 17665).Joseph Myers2014-12-021-2/+2
| | | | | | | | | | | | | | | | | | For XPG3/XPG4 (defined __USE_XOPEN && !defined __USE_UNIX98), unistd.h declares many functions that should only be declared for __USE_MISC (none of them are in XPG3/XPG4): sethostname sethostid getdomainname setdomainname vhangup revoke profil acct getusershell endusershell setusershell daemon. The whole block with the [__USE_MISC || (__USE_XOPEN && !__USE_UNIX98)] conditional contains only functions that are not in XPG3/XPG4, so this patch simply changes the conditional. Tested for x86_64 (testsuite, and that installed stripped shared libraries are unchanged by this patch). [BZ #17665] * posix/unistd.h [__USE_MISC || (__USE_XOPEN && !__USE_UNIX98)]: Change conditional to [__USE_MISC].
* Complete _BSD_SOURCE / _SVID_source followup cleanup.Joseph Myers2014-02-211-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch completes the headers cleanup consequent on removal of _BSD_SOURCE and _SVID_SOURCE (apart from any subsequent deprecations): * #endif conditionals that referred to BSD or SVID are updated. * Redundant __USE_* tests in cases involving __USE_MISC are removed. This includes cases such as __USE_MISC || __USE_ISOC99, where __USE_MISC is redundant (because __USE_MISC is only ever defined in the default / _DEFAULT_SOURCE / _GNU_SOURCE case, when __USE_ISOC99 is also defined; the same applies to the non-XSI-extended POSIX versions), and cases involving __USE_GNU, where __USE_GNU is redundant (because if __USE_GNU is defined, so are the other __USE_* macros). There may well be other cases of __USE_FOO || __USE_BAR tests that could be simplified because one macro implies the other; this patch only addresses cases involving __USE_MISC. Tested x86_64. * bits/fcntl.h [__USE_MISC]: Remove redundant conditionals. * bits/sigaction.h [__USE_MISC]: Likewise. * bits/waitstatus.h: Update #endif comments. * ctype/ctype.h: Likewise. * dirent/dirent.h: Likewise. [__USE_MISC]: Remove redundant conditionals. * grp/grp.h: Update #endif comments. [__USE_GNU]: Remove redundant conditionals. [__USE_MISC]: Likewise. * inet/netinet/in.h [__USE_GNU]: Likewise. * io/sys/stat.h [__USE_MISC]: Likewise. * libio/bits/stdio-ldbl.h [__USE_MISC]: Likewise. * libio/bits/stdio.h: Update #endif comments. [__USE_MISC]: Remove redundant conditionals. * libio/bits/stdio2.h [__USE_MISC]: Likewise. * libio/stdio.h: Update #endif comments. [__USE_MISC]: Remove redundant conditionals. * math/bits/math-finite.h [__USE_MISC]: Likewise. * math/bits/mathcalls.h [__USE_MISC]: Likewise. * math/math.h: Update #else and #endif comments. [__USE_MISC]: Remove redundant conditionals. * misc/sys/uio.h: Update #endif comments. * posix/bits/unistd.h [__USE_MISC]: Remove redundant conditionals. * posix/glob.h [__USE_MISC]: Likewise. * posix/sys/types.h: Update #endif comments. [__USE_MISC]: Remove redundant conditionals. * posix/sys/wait.h: Update #endif comments. [__USE_MISC]: Remove redundant conditionals. * posix/unistd.h: Update #endif comments. [__USE_MISC]: Remove redundant conditionals. * pwd/pwd.h [__USE_GNU]: Likewise. [__USE_MISC]: Likewise. * resolv/netdb.h [__USE_GNU]: Likewise. * signal/signal.h: Update #endif comments. [__USE_MISC]: Remove redundant conditionals. * stdlib/stdlib.h: Update #else and #endif comments. [__USE_MISC]: Remove redundant conditionals. [__USE_GNU]: Likewise. * string/bits/string2.h [__USE_MISC]: Likewise. * string/string.h: Update #endif comments. [__USE_MISC]: Remove redundant conditionals. * sysdeps/m68k/m680x0/fpu/bits/mathinline.h [__USE_MISC]: Likewise. * sysdeps/mach/hurd/bits/fcntl.h [__USE_MISC]: Likewise. * sysdeps/mach/hurd/bits/stat.h [__USE_MISC]: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/sigaction.h [__USE_MISC]: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/stat.h [__USE_MISC]: Likewise. * sysdeps/unix/sysv/linux/bits/fcntl-linux.h: Update #endif comments. [__USE_MISC]: Remove redundant conditionals. * sysdeps/unix/sysv/linux/bits/in.h [__USE_GNU]: Likewise. * sysdeps/unix/sysv/linux/bits/sigaction.h [__USE_MISC]: Likewise. * sysdeps/unix/sysv/linux/bits/socket.h [__USE_GNU]: Likewise. * sysdeps/unix/sysv/linux/bits/stat.h [__USE_MISC]: Likewise. * sysdeps/unix/sysv/linux/ia64/bits/sigaction.h [__USE_MISC]: Likewise. * sysdeps/unix/sysv/linux/m68k/bits/stat.h [__USE_MISC]: Likewise. * sysdeps/unix/sysv/linux/mips/bits/sigaction.h [__USE_MISC]: Likewise. * sysdeps/unix/sysv/linux/mips/bits/stat.h [__USE_MISC]: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/stat.h [__USE_MISC]: Likewise. * sysdeps/unix/sysv/linux/s390/bits/sigaction.h [__USE_MISC]: Likewise. * sysdeps/unix/sysv/linux/s390/bits/stat.h [__USE_MISC]: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/sigaction.h [__USE_MISC]: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/stat.h [__USE_MISC]: Likewise. * sysdeps/unix/sysv/linux/x86/bits/stat.h [__USE_MISC]: Likewise. * sysdeps/x86/bits/string.h: Update #endif comments. * sysdeps/x86/fpu/bits/mathinline.h [__USE_MISC]: Remove redundant conditionals. * time/sys/time.h: Update #endif comments. * time/time.h: Likewise. [__USE_MISC]: Remove redundant conditionals.
* Clean up trivially redundant __USE_MISC conditionals.Joseph Myers2014-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch cleans up cases of __USE_MISC that are trivially redundant after the recent substitution of __USE_MISC for __USE_BSD and __USE_SVID: either in constructs such as "defined __USE_MISC || defined __USE_MISC", or else (in the bits/mman.h case) a conditional on __USE_MISC nested inside another __USE_MISC conditional. (The cleanups remaining after this patch are still quite large, but it seems a reasonable piece to separate out.) Tested x86_64. * bits/mman.h [__USE_MISC]: Remove redundant conditionals. * ctype/ctype.h [__USE_MISC]: Likewise. * dirent/dirent.h [__USE_MISC]: Likewise. * grp/grp.h [__USE_MISC]: Likewise. * io/fcntl.h [__USE_MISC]: Likewise. * io/sys/stat.h [__USE_MISC]: Likewise. * libio/stdio.h [__USE_MISC]: Likewise. * posix/unistd.h [__USE_MISC]: Likewise. * pwd/pwd.h [__USE_MISC]: Likewise. * stdlib.h [__USE_MISC]: Likewise. * string/bits/string2.h [__USE_MISC]: Likewise. * string/string.h [__USE_MISC]: Likewise. * time/time.h [__USE_MISC]: Likewise.
* Combine __USE_BSD and __USE_SVID into __USE_MISC.Joseph Myers2014-02-121-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch cleans up following the obsoletion of _BSD_SOURCE and _SVID_SOURCE by combining __USE_BSD and __USE_SVID into __USE_MISC. The only non-mechanical part of this patch is the changes to features.h; everything else is simple substitution of __USE_MISC for the old macros. Thus, this patch leaves obviously redundant conditionals such as "defined __USE_MISC || defined __USE_MISC", and does not update #endif comments where they referred to BSD or SVID in words instead of the literal macro name. This is intended to facilitate patch review by separating the less mechanical changes from these purely mechanical changes into a separate patch. (I do intend to integrate all the changes from <https://sourceware.org/ml/libc-alpha/2013-12/msg00226.html>, which I believe includes all the trailing comment updates, in subsequent patches.) Tested x86_64. * include/features.h (__USE_BSD): Remove macro definitions. (__USE_SVID): Likewise. (_BSD_SOURCE): Likewise. (_SVID_SOURCE): Likewise. [!defined _BSD_SOURCE && !defined _SVID_SOURCE]: Remove condition from definition of _DEFAULT_SOURCE. [_BSD_SOURCE || _SVID_SOURCE]: Change condition to [_DEFAULT_SOURCE]. * bits/fcntl.h [__USE_BSD]: Change condition to [__USE_MISC]. * bits/mman.h [__USE_BSD]: Likewise. * bits/termios.h [__USE_BSD]: Likewise. * bits/waitstatus.h [__USE_BSD]: Likewise. * ctype/ctype.h [__USE_SVID]: Likewise. * dirent/dirent.h [__USE_BSD]: Likewise. * grp/grp.h [__USE_SVID]: Likewise. [__USE_BSD]: Likewise. * inet/netinet/igmp.h [__USE_BSD]: Likewise. * io/fcntl.h [__USE_BSD]: Likewise. * io/ftw.h [__USE_BSD]: Likewise. * io/sys/stat.h [__USE_BSD]: Likewise. * libio/bits/stdio-ldbl.h [__USE_BSD]: Likewise. * libio/bits/stdio2.h [__USE_BSD]: Likewise. * libio/stdio.h [__USE_SVID]: Likewise. [__USE_BSD]: Likewise. * math/math.h [__USE_SVID]: Likewise. [__USE_BSD]: Likewise. * misc/bits/syslog-ldbl.h [__USE_BSD]: Likewise. * misc/bits/syslog.h [__USE_BSD]: Likewise. * misc/search.h [__USE_SVID]: Likewise. * misc/sys/mman.h [__USE_BSD]: Likewise. * misc/sys/syslog.h [__USE_BSD]: Likewise. * misc/sys/uio.h [__USE_BSD]: Likewise. * posix/bits/unistd.h [__USE_BSD]: Likewise. * posix/glob.h [__USE_BSD]: Likewise. * posix/regex.h [__USE_BSD]: Likewise. * posix/sys/types.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * posix/sys/utsname.h [__USE_SVID]: Likewise. * posix/sys/wait.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * posix/unistd.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * pwd/pwd.h [__USE_SVID]: Likewise. * resolv/netdb.h [__USE_BSD]: Likewise. * setjmp/setjmp.h [__USE_BSD]: Likewise. * signal/signal.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * socket/sys/socket.h [__USE_BSD]: Likewise. * stdlib/fmtmsg.h [__USE_SVID]: Likewise. * stdlib/stdlib.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * string/bits/string2.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * string/bits/string3.h [__USE_BSD]: Likewise. * string/endian.h [__USE_BSD]: Likewise. * string/string.h [__USE_SVID]: Likewise. [__USE_BSD]: Likewise. * string/strings.h [__USE_BSD]: Likewise. * sysdeps/generic/netinet/ip.h [__USE_BSD]: Likewise. * sysdeps/gnu/netinet/ip_icmp.h [__USE_BSD]: Likewise. * sysdeps/mach/hurd/bits/fcntl.h [__USE_BSD]: Likewise. * sysdeps/mach/hurd/bits/stat.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/mman.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/termios.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/bits/fcntl-linux.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/bits/mman-linux.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/bits/sys_errlist.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/bits/termios.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/mips/bits/termios.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/netinet/if_ether.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/netinet/if_fddi.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/netinet/if_tr.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/termios.h [__USE_BSD]: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/termios.h [__USE_BSD]: Likewise. * sysdeps/x86/bits/string.h [__USE_BSD]: Likewise. * sysvipc/sys/ipc.h [__USE_SVID]: Likewise. * termios/termios.h [__USE_BSD]: Likewise. * time/sys/time.h [__USE_BSD]: Likewise. * time/time.h [__USE_BSD]: Likewise. [__USE_SVID]: Likewise. * sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_BSD]: Change condition to [__USE_MISC].
* Update copyright notices with scripts/update-copyrightsAllan McRae2014-01-011-1/+1
|
* Remove __FAVOR_BSD.Joseph Myers2013-12-171-24/+2
|
* Use __glibc_block in public headers.Meador Inge2013-11-211-1/+2
| | | | | | | | | | | | As detailed in PR11157, the use of '__block' is known to interfere with keywords in some environments, such as the Clang -fblocks extension. Recently a similar issue was raised concerning the use of '__unused' and a '__glibc' prefix was proposed to create a glibc implementation namespace for these sorts of issues [1]. This patches takes that approach. [1] https://sourceware.org/ml/libc-alpha/2012-02/msg00047.html [2] http://lists.debian.org/debian-glibc/2013/11/msg00020.html
* Update copyright notices with scripts/update-copyrights.Joseph Myers2013-01-021-1/+1
|
* * posix/unistd.h (setuid, setreuid, seteuid, setresuid):Florian Weimer2012-08-011-8/+8
| | | | | | | | Declare with warn_unused_result. (setgid, setregid, setegid, setresgid): Likewise. * sysdeps/unix/sysv/linux/sys/fsuid.h (setfsuid, setfsgid): Likewise. * WUR-REPORT: Remove set*id functions.
* Fix attributes for fortify functions.Marek Polacek2012-04-291-1/+1
|
* Add first fixes for conformtest for POSIX2008Ulrich Drepper2012-02-261-1/+1
|
* Fix up POSIX testing in conformtestUlrich Drepper2012-02-261-4/+3
|
* Replace FSF snail mail address with URLs.Paul Eggert2012-02-091-3/+2
|
* Remove pre-ISO C supportUlrich Drepper2012-01-071-47/+47
| | | | No more __const.
* Don't mark memory synchronisation functions as leafAndreas Schwab2011-10-271-1/+1
|
* Define SEEK_DATA and SEEK_HOLEUlrich Drepper2011-07-231-0/+4
|
* Add syncfs syscall.Andreas Schwab2011-04-011-0/+7
|
* Fix typos in comments.Ulrich Drepper2011-04-011-3/+3
|
* Undo feature selection for ftruncate.Ulrich Drepper2010-09-211-0/+3
|
* Relax conditions in unistd.h.Ulrich Drepper2010-01-141-9/+9
|
* Relax visibility of some more declaration.Ulrich Drepper2010-01-141-2/+2
|
* Declare getpagesize in _GNU_SOURCE mode again.Ulrich Drepper2010-01-141-2/+2
|
* Fix handling symbols removed in XPG7.Ulrich Drepper2010-01-111-6/+6
|
* Fix up unistd.h for XPG7.Ulrich Drepper2010-01-111-16/+23
|
* Add more warnings to exec functions.Bruno Haible2009-12-091-8/+8
|
* Also correct _POSIX2_* constants in case older standards are selected.Ulrich Drepper2009-08-231-5/+19
|
* Define _POSIX_VERSION correctly when older POSIX versions are selected.Ulrich Drepper2009-08-231-1/+15
|
* Implement execvpe.Ulrich Drepper2009-06-021-0/+8
| | | | | There is some existing practice in other OSes and it's trivial to implement giving the existing code. Fixes BZ #10221.
* * posix/unistd.h (_POSIX_VERSION, _POSIX2_VERSION, _POSIX2_C_BIND,Ulrich Drepper2009-03-101-8/+10
| | | | | | | | | _POSIX2_C_DEV, _POSIX2_SW_DEV, _POSIX2_LOCALEDEF): Define to 200809L instead of 200112L. (_XOPEN_VERSION): For __USE_XOPEN2K8 define to 700. * posix/tst-sysconf.c (STDVER): Define to 200809L instead of 200112L. 2009-03-10 Jakub Jelinek <jakub@redhat.com>
* * wctype/wctype.h: The *_l functions are in POSIX 2008.Ulrich Drepper2009-02-261-2/+2
| | | | | | | | | | | | | | | | | | | | * wcsmbs/wchar.h: mbsnrtowcs, open_wmemstream, wcpcpy, wcpncpy, wcscasecmp, wcsdup, wcsncasecmp, wcsnlen, wcsnrtombs, wcscasecmp_l, wcsncasecmp_l, wcscoll_l, and wcsxfrm_l. * sysdeps/mach/hurd/bits/posix_opt.h: Reset value of macros from 200112L to 200809L. * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise. * posix/getconf.c (vars): Add _SC_THREAD_ROBUST_PRIO_INHERIT and _SC_THREAD_ROBUST_PRIO_PROTECT entries. * bits/confname.h: Add _SC_THREAD_ROBUST_PRIO_INHERIT and _SC_THREAD_ROBUST_PRIO_PROTECT. * posix/unistd.h: fexecve is in POSIX 2008. * time/time.h: strftime_l is in POSIX 2008. * io/sys/stat.h: futimens is in POSIX 2008. * string/strings.h: strcasecmp_l and strncasecmp_l are in POSIX 2008. * string/string.h: stpcpy, stpncpy, strndup, strnlen, strsignal, strcoll_l, strerror_l, and strxfrm_l are in POSIX 2008. * stdlib/stdlib.h: mkdtemp is in POSIX 2008.
* * Versions.def (glibc): Add GLIBC_2.9.Ulrich Drepper2008-07-251-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * io/Makefile (routines): Add dup3 and pipe2. * io/Versions [glibc] (GLIBC_2.9): Add dup3 and pipe2. * io/dup3.c: New file. * io/pipe2.c: New file. * posix/unistd.h: Declare dup3 and pipe2. * socket/Makefile (routines): Add paccept. * socket/Versions [glibc] (GLIBC_2.9): Add paccept. * socket/paccept.c: New file. * socket/sys/socket.h: Declare paccept. * sysdeps/unix/syscalls.list: Add entry for dup3. * sysdeps/unix/sysv/linux/Versions [glibc] (GLIBC_2.9): Add epoll_create2 and inotify_init1. * sysdeps/unix/sysv/linux/eventfd.c: Use eventfd1 syscall if possible. * sysdeps/unix/sysv/linux/paccept.c: New file. * sysdeps/unix/sysv/linux/signalfd.c: Use signalfd4 syscall if possible. * sysdeps/unix/sysv/linux/socketcall.h: Add SOCKOP_paccept. * sysdeps/unix/sysv/linux/syscalls.list: Add epoll_create2, inotify_init1, and pipe2 entries. * sysdeps/unix/sysv/linux/alpha/sys/epoll.h: New file. * sysdeps/unix/sysv/linux/alpha/sys/eventfd.h: New file. * sysdeps/unix/sysv/linux/alpha/sys/inotify.h: New file. * sysdeps/unix/sysv/linux/alpha/sys/signalfd.h: New file. * sysdeps/unix/sysv/linux/alpha/sys/timerfd.h: New file. * sysdeps/unix/sysv/linux/bits/socket.h: Define SOCK_CLOEXEC and SOCK_NONBLOCK. * sysdeps/unix/sysv/linux/i386/paccept.S: New file. * sysdeps/unix/sysv/linux/sparc/sys/epoll.h: New file. * sysdeps/unix/sysv/linux/sparc/sys/eventfd.h: New file. * sysdeps/unix/sysv/linux/sparc/sys/inotify.h: New file. * sysdeps/unix/sysv/linux/sparc/sys/signalfd.h: New file. * sysdeps/unix/sysv/linux/sparc/sys/timerfd.h: New file. * sysdeps/unix/sysv/linux/sparc/bits/socket.h: New file. * sysdeps/unix/sysv/linux/sys/epoll.h: Define EPOLL_CLOEXEC and EPOLL_NONBLOCK. Declare epoll_create2. * sysdeps/unix/sysv/linux/sys/eventfd.h: Define EFD_CLOEXEC and EFD_NONBLOCK. * sysdeps/unix/sysv/linux/sys/inotify.h: Define IN_CLOEXEC and IN_NONBLOCK. Declare inotify_init1. * sysdeps/unix/sysv/linux/sys/signalfd.h: Define SFD_CLOEXEC and SFD_NONBLOCK. * sysdeps/unix/sysv/linux/sys/timerfd.h: Define TFD_CLOEXEC and TFD_NONBLOCK.
* * posix/unistd.h: Declare fsync also for __USE_XOPEN2K.Ulrich Drepper2007-11-261-1/+1
|
* Declare fsync also for Unix98.Ulrich Drepper2007-11-261-2/+2
| | | | | | 2007-11-26 Ulrich Drepper <drepper@redhat.com> * posix/unistd.h: Declare fsync also for Unix98.
* * misc/sys/cdefs.h (__va_arg_pack): Define for GCC 4.3+.Ulrich Drepper2007-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * misc/bits/syslog.h (syslog): When __va_arg_pack is defined, implement as __extern_always_inline function. (vsyslog): Define as __extern_always_inline function unconditionally. * libio/bits/stdio2.h (sprintf, snprintf, printf, fprintf): When __va_arg_pack is defined, implement as __extern_always_inline functions. (vsprintf, vsnprintf, vprintf, vfprintf): Define as __extern_always_inline functions unconditionally. * libio/bits/stdio.h (vprintf): Ifdef out the inline when bits/stdio2.h will be included. * wcsmbs/bits/wchar2.h (__swprintf_alias): New redirect. (swprintf, wprintf, fwprintf): When __va_arg_pack is defined, implement as __extern_always_inline functions. (vswprintf, vwprintf, vfwprintf): Define as __extern_always_inline functions unconditionally. * debug/tst-chk1.c (do_test): Enable remaining tests for C++. 2007-09-03 Jakub Jelinek <jakub@redhat.com> * misc/sys/cdefs.h (__extern_inline, __extern_always_inline): Only define in C++ for GCC 4.3+, in C++ always use __gnu_inline__ attribute. * include/features.h (__USE_EXTERN_INLINES): Define only when __extern_inline is defined. * stdlib/stdlib.h: Include bits/stdlib.h when __extern_always_inline is defined instead of when not __cplusplus. * misc/sys/syslog.h: Include bits/syslog.h when __extern_always_inline is defined instead of when not __cplusplus. * socket/sys/socket.h: Include bits/socket2.h when __extern_always_inline is defined instead of when not __cplusplus. * libio/stdio.h: Include bits/stdio2.h when __extern_always_inline is defined instead of when not __cplusplus. * posix/unistd.h: Include bits/unistd.h when __extern_always_inline is defined instead of when not __cplusplus. * string/string.h: Include bits/string3.h when __extern_always_inline is defined instead of when not __cplusplus. * wcsmbs/wchar.h: Include bits/wchar2.h when __extern_always_inline is defined instead of when not __cplusplus. (btowc, wctob): Don't guard the inlines with ifndef __cplusplus. * io/fcntl.h: Don't include bits/fcntl2.h if __extern_always_inline is not defined. * misc/bits/syslog-ldbl.h: Guard *_chk stuff with defined __extern_always_inline instead of !defined __cplusplus. * libio/bits/stdio-ldbl.h: Likewise. * wcsmbs/bits/wchar-ldbl.h: Likewise. * misc/bits/syslog.h (syslog): Don't define for C++. (vsyslog): Use __extern_always_inline function for C++ instead of a macro. * libio/bits/stdio.h (__STDIO_INLINE): Define to __extern_inline whenever that macro is defined. (vprintf): Don't provide the inline for C++. (fread_unlocked, fwrite_unlocked): Don't define the macros for C++. * libio/bits/stdio2.h (sprintf, snprintf, printf, fprintf): Don't define the macros for C++. (vsprintf, vsnprintf, vprintf, vfprintf): Define as __extern_always_inline functions for C++. * io/sys/stat.h (stat, lstat, fstat, fstatat, mknod, mknodat, stat64, lstat64, fstat64, fstatat64): Don't define if not __USE_EXTERN_INLINES. * wcsmbs/bits/wchar2.h: Fix #error message. (swprintf, wprintf, fwprintf): Don't define the macros for C++. (vswprintf, vwprintf, vfwprintf): Define using __extern_always_inline functions for C++. * string/bits/string3.h: Don't #undef macros if __cplusplus. (memcpy, memmove, mempcpy, memset, bcopy, bzero, strcpy, stpcpy, strncpy, strcat, strncat): Define as __extern_always_inline functions instead of macros for C++. * math/bits/cmathcalls.h: Guard __extern_inline routines with defined __extern_inline. * sysdeps/alpha/fpu/bits/mathinline.h (__MATH_INLINE): Define to __extern_inline whenever that macro is defined. * sysdeps/ia64/fpu/bits/mathinline.h (__MATH_INLINE): Likewise. * sysdeps/i386/fpu/bits/mathinline.h (__MATH_INLINE): Likewise. * sysdeps/i386/i486/bits/string.h (__STRING_INLINE): Likewise. * sysdeps/s390/bits/string.h (__STRING_INLINE): Likewise. * sysdeps/s390/fpu/bits/mathinline.h (__MATH_INLINE): Likewise. * sysdeps/powerpc/fpu/bits/mathinline.h (__MATH_INLINE): Likewise. * sysdeps/x86_64/fpu/bits/mathinline.h (__MATH_INLINE): Likewise. * sysdeps/sparc/fpu/bits/mathinline.h (__MATH_INLINE): Likewise. * sysdeps/unix/sysv/linux/sys/sysmacros.h (gnu_dev_major, gnu_dev_minor, gnu_dev_makedev): Remove __extern_inline from prototypes. Only provide __extern_inline routines if __USE_EXTERN_INLINES. * debug/Makefile: Add rules to build and run tst-{,lfs}chk{4,5,6} tests. * debug/tst-chk1.c (do_prepare, do_test): Allow compilation as C++. For now avoid some *printf tests in C++. Skip all testing if __USE_FORTIFY_LEVEL is defined, but __extern_always_inline macro is not. * debug/tst-chk4.cc: New file. * debug/tst-chk5.cc: New file. * debug/tst-chk6.cc: New file. * debug/tst-lfschk4.cc: New file. * debug/tst-lfschk5.cc: New file. * debug/tst-lfschk6.cc: New file. * include/wchar.h (__vfwprintf_chk, __vswprintf_chk): Avoid prototypes in C++. * include/stdio.h (__sprintf_chk, __snprintf_chk, __vsprintf_chk, __vsnprintf_chk, __printf_chk, __fprintf_chk, __vprintf_chk, __vfprintf_chk, __fgets_unlocked_chk, __fgets_chk): Likewise.
* * posix/unistd.h: Remove __THROW from fdatasync.Ulrich Drepper2007-05-071-1/+1
|
* [BZ #4364] cvs/fedora-glibc-20070416T2350Ulrich Drepper2007-04-161-2/+4
| | | | | | 2007-04-16 Ulrich Drepper <drepper@redhat.com> [BZ #4364] * posix/unistd.h (_XOPEN_VERSION): Define appropriately for SUSv3.