summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Improve documentation for fgetpos() and fsetpos(), and discouragetjr2004-03-201-13/+21
| | | | users from assuming that fpos_t is an integral type.
* Shave-off troff cycles by invoking .Fa only once.dds2004-03-191-3/+1
| | | | | Submitted by: ru MFC after: 1 week
* Do not redundantly set the stream orientation in getc(), putc(), andtjr2004-03-196-6/+12
| | | | related functions - __sgetc() and __sputc() will set it when necessary.
* Update list of macros defined in <stdio.h>.tjr2004-03-171-1/+17
|
* Re-add description of putc() macro (back out rev. 1.13.)tjr2004-03-171-2/+8
|
* Re-add text that says getc() is a macro (back out rev. 1.16.)tjr2004-03-171-1/+2
|
* Re-add macro versions of getc(), getchar(), putc(), putchar(), feof(),tjr2004-03-176-34/+12
| | | | | | | ferror(), fileno() and clearerr(), using the value of __isthreaded to decide between the fast inline single-threaded code and the more general function equivalent. This gives most of the performance benefits of the old unsafe macros while preserving thread safety.
* Use unions to avoid violating C99 strict aliasing rules.des2004-03-166-43/+50
|
* Refer to "wide characters" instead of "wide-characters".tjr2004-03-163-15/+15
|
* Sort MLINKS.tjr2004-03-161-1/+1
| | | | Noticed by: ru
* Add fairly minimal documentation for the nmount() syscall.tjr2004-03-162-3/+35
|
* Don't try to pass off a struct sockaddr as a struct sockaddr_in when itdes2004-03-151-2/+2
| | | | | | | may in fact very well be a struct sockaddr_in6. Just use plain struct sockaddr. This brings us yet another step closer to a clean -O2 build.
* Document additional reasons that sysctl(3) can return ENOMEM (due totruckman2004-03-151-0/+11
| | | | vslock() failure).
* Make this compile with -O2. A proper fix would use a struct to representdes2004-03-151-22/+22
| | | | | vectors, instead of requiring the caller to keep track of element size and count and pass them in by reference.
* Whitespace nits.des2004-03-151-4/+4
|
* Set stream orientation in ungetc() instead of __ungetc(). This avoidstjr2004-03-101-2/+1
| | | | | setting it redundantly when called from ungetwc(), vfscanf() etc., which already set the orientation.
* Remove duplicate check for EOF from ungetc(); __ungetc() already checks.tjr2004-03-101-2/+0
|
* Call __sputc() directly in fputc() instead of taking an expensivetjr2004-03-101-1/+1
| | | | detour through putc().
* Call __sgetc() directly in getchar() instead of taking an expensivetjr2004-03-101-1/+1
| | | | detour through getc().
* Set the stream orientation explicitly in fgetln() instead of relying ontjr2004-03-101-0/+1
| | | | __srefill() to do it.
* Set stream orientation in puts().tjr2004-03-101-0/+2
|
* Backout the previous revision due to objections.jb2004-03-092-10/+4
|
* On 4.X it was possible for an application to initialise a local FILEjb2004-03-092-4/+10
| | | | | | | | | structure and call stdio functions. In 5.X this was broken when FILE locking was introduced into libc. This change makes most (relevant) stdio functions work again when the _extra file in FILE isn't initialised (and can't be without a libc function to do it since the __sFILEX structure is private to libc).
* Rearrange (centralize) initialization of mallocs internals to always bephk2004-03-071-19/+13
| | | | | | done before the first call, even if this is a malloc(0) call. PR: 62859
* Merge some fixes from NetBSD's getopt.3 v1.31:ache2004-03-061-43/+88
| | | | cleanup, add more sections, better explanation, declaration
* Merge some fixes from NetBSD's getopt.c v1.26:ache2004-03-061-26/+43
| | | | | | | | cleanups, handling 'ls -l-', handling '--*' Note this is in the same time back out of our v1.3 "Don't print an error message if the bad option is '?'" because it directly violates POSIX.
* Fix typo, was 'W'; instead of `W;'ache2004-03-061-1/+1
|
* Make GNU-compatible following case:ache2004-03-062-23/+27
| | | | single '-' in command line and '-' (non-first) in options
* Make NULL a (void*)0 whereever possible, and fix the warnings(-Werror)markm2004-03-054-8/+8
| | | | | | | | | | | | | | | that this provokes. "Wherever possible" means "In the kernel OR NOT C++" (implying C). There are places where (void *) pointers are not valid, such as for function pointers, but in the special case of (void *)0, agreement settles on it being OK. Most of the fixes were NULL where an integer zero was needed; many of the fixes were NULL where ascii <nul> ('\0') was needed, and a few were just "other". Tested on: i386 sparc64
* Document missing EFAULT errno value.dds2004-03-031-0/+8
| | | | MFC after: 2 weeks
* Make return code in noarg case GNU-compatibleache2004-03-032-20/+24
|
* Be more GNU-compatible in diagnosticsache2004-03-031-11/+61
|
* If handed a file pointer we can't write to, set errno properly to EBADFjkh2004-03-021-1/+4
| | | | | | | in order to get SUSv2 conformant behavior in higher level calls like fputs() and puts(). Reviewed by: bde
* makecontext lib call.grehan2004-03-023-3/+167
| | | | Submitted by: Suleiman Souhlal <refugee@segfaulted.com>
* Improve GNU compatibility in several places, use internal GNU_COMPATIBLEache2004-03-012-29/+49
| | | | | | | define for it. Don't catch POSIXLY_CORRECT env. into static variable, it can be changed on the fly by program. Use P1003.2 standartized illoptchar[]
* Comment out things related to getopt() replacement we not useache2004-03-011-36/+36
|
* Change "-"-started options when POSIX_CORRECTLY is set handlingache2004-03-011-17/+17
| | | | | in favour of GNU instead of NetBSD, because configure's use us and expect GNU.
* Change "-"-started options when POSIX_CORRECTLY is set handlingache2004-03-011-1/+5
| | | | | in favour of GNU instead of NetBSD, because configure's use us and expect GNU.
* Make consistent with the better written wcsrtombs function:dds2004-02-271-4/+5
| | | | | | - Fix syntax - Remove the (slightly wrong) duplicate explanation of the error condition - Change reference to invalid multibyte character into invalid wide character
* Make the resolver(3) and many associated interfaces much more reentrant.green2004-02-2513-52/+280
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The getaddrinfo(3), getipnodebyname(3) and resolver(3) can coincide now with what should be totally reentrant, and h_errno values will now be preserved correctly, but this does not affect interfaces such as gethostbyname(3) which are still mostly non-reentrant. In all of these relevant functions, the thread-safety has been pushed down as far as it seems possible right now. This means that operations that are selected via nsdispatch(3) (i.e. files, yp, dns) are protected still under global locks that getaddrinfo(3) defines, but where possible the locking is greatly reduced. The most noticeable improvement is that multiple DNS lookups can now be run at the same time, and this shows major improvement in performance of DNS-lookup threaded programs, and solves the "Mozilla tab serialization" problem. No single-threaded applications need to be recompiled. Multi-threaded applications that reference "_res" to change resolver(3) options will need to be recompiled, and ones which reference "h_errno" will also if they desire the correct h_errno values. If the applications already understood that _res and h_errno were not thread-safe and had their own locking, they will see no performance improvement but will not actually break in any way. Please note that when NSS modules are used, or when nsdispatch(3) defaults to adding any lookups of its own to the individual libc _nsdispatch() calls, those MUST be reentrant as well.
* Add getopt_long_only() from OpenBSD and other OpenBSD cleanupsache2004-02-243-299/+459
| | | | | PR: 63173 Submitted by: Marius Strobl <marius@alchemy.franken.de>
* Apply style(9).green2004-02-231-2/+6
| | | | | Submitted by: "Christian S.J. Peron" <maneo@bsdpro.com> PR: bin/63283
* Add signal numbers to signal(3).josef2004-02-231-33/+36
| | | | | | | Approved by: simon(mentor) Reviewed by: ru Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at> PR: docs/60044
* Add optarg, optind, opterr, optopt, optreset to SYNOPSYSache2004-02-231-0/+5
|
* POSIX clearly states that getsubopt() should be declared in <stdlib.h>ache2004-02-231-1/+1
| | | | not in <unistd.h>
* Remove unneccessary <unistd.h>ache2004-02-231-1/+0
|
* Change the syscall stub branch orders so that the static branch predictionpeter2004-02-224-12/+51
| | | | will assume that syscalls will succeed rather than fail.
* Remove the triplicity in the public functions by vectoring them allphk2004-02-211-70/+49
| | | | | | | | | | through a realloc like function. Make the malloc_active variable a local static to this new function. Don't warn about recursion more than once per base call. constify malloc_func.
* Move the check for sensitive processes to the point where the exceptionphk2004-02-211-14/+7
| | | | | | | | | has been hit, this makes it cover more cases. Call the message function directly rather than fiddle with flag-saving when we find an unknown character in our options. The 'A' flag should not trigger on legal out of memory conditions.
* add destination address selection support for getipnodebyname(3).ume2004-02-201-1/+225
| | | | | though getipnodebyname(3) is obsoleted api, some major applications such as Mozilla are still using it. so, it will help ipv4 users.
OpenPOWER on IntegriCloud