summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
...
* The previous commit changed the behavior of nsdispatch() in thenectar2004-04-011-3/+1
| | | | | | | | | | | | | | case where an /etc/nsswitch.conf file was present, but could not be opened (e.g. due to permissions). Previously, the open failure condition was suppressed, and the built-in defaults were used. In revision 1.11, however, propagated the open failure causing all nsdispatch() invocations to return NS_UNAVAIL, and thus many APIs including getpwnam and gethostbyname unconditionally failed. This commit restores the previous behavior. Pointy hat: nectar (+1 for obstinance; ache had to use clue bat) Reported by: ache
* Fix Yet Another 16 byte stack alignment bug. Thankfully, this one ispeter2004-03-312-10/+10
| | | | | | | | | | | solved by a simple 'make world'. The signalcontext function was going to the trouble of generating an even 16 byte alignment, but in fact it needed to be odd aligned to simulate the 8-byte return address having been pushed by the caller. This fixes yet another group of crashes in applications using libpthread. And yet again, it was my fault all along. While here, rename the duplicate internal ctx_wrapper() functions to makectx_wrapper() and sigctx_wrapper() so that traces aren't ambiguous.
* When a dynamic NSS module is built and linked against a threadnectar2004-03-303-23/+43
| | | | | | | | | | | | | library, it may pull in that thread library at run time. If the process started out single-threaded, this could cause attempts to release locks that do not exist. Guard against this possibility by checking __isthreaded before invoking thread primitives. A similar problem remains if the process is linked against one thread library, but the NSS module is linked against another. This can only be avoided by careful design of the NSS module. Submitted by: Sean McNeil <sean@mcneil.com> (mostly; bugs are mine)
* Add cross-references to isideogram(3), isphonogram(3), isrune(3),tjr2004-03-301-1/+6
| | | | isspecial(3) and wctype(3).
* Add basic manual pages for isideogram(), isphonogram(), isrune()tjr2004-03-305-1/+235
| | | | and isspecial().
* Trim cross-references.tjr2004-03-301-15/+2
|
* Document the isnumber() and ishexnumber() functions, and explain how theytjr2004-03-302-13/+34
| | | | differ (at least in theory) from isdigit() and isxdigit().
* Remove duplicate MLINK.tjr2004-03-291-1/+1
|
* Recognize the "rune" character class in wctype().tjr2004-03-272-6/+8
|
* Document the existence of NET_RT_IFMALIST.bms2004-03-251-0/+7
| | | | Reviewed by: ru
* [troff] removed the unnecessary use of \_ escapes.ru2004-03-251-96/+96
|
* Add locking so that arc4random(3) functions are all reentrant forgreen2004-03-241-10/+54
| | | | | | pthreads. Submitted by: Christian S.J. Peron <maneo@bsdpro.com>
* Document incorrect handling of multibyte characters.tjr2004-03-211-1/+7
|
* Mention that funopen() uses fpos_t incorrectly in the BUGS section.tjr2004-03-201-1/+9
|
* 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
|
OpenPOWER on IntegriCloud