summaryrefslogtreecommitdiffstats
path: root/lib/libc (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* dispense with some wacky escape sequences;jmc2010-03-264-14/+14
|
* Modify example not to use an assignment in the if statement. We shouldn'tkettenis2010-03-241-3/+4
| | | | | | teach people bad habits! ok krw@, jmc@, dlg@, thib@
* Fix glob(3) to correctly return an error when its buffer space isnicm2010-03-231-13/+11
| | | | | | | | | | exhausted and GLOB_BRACE is given. globexp2() was ignoring errors returned from lower levels. While here, change globexp2() to return its return value normally rather putting it in a int pointer then always returning 0. ok otto
* Various improvements, mainly regarding ERRORS.schwarze2010-03-221-40/+39
| | | | | | | | | | | | | * Document EINVAL and EEXIST. * Neither mkstemp nor mkdtemp use lstat, but mktemp does. * Documenting ENOTDIR is useless, it is documented in lstat(2), mkdir(2) and open(2), and it's just one thing out of several that could go wrong. * Refer to lstat(2) instead of stat(2), which is actually used here. * State that two of these functions are standardized in the XPG. * Move the sentence about mkdtemp and mkstemps to the new STANDARDS section. * Get rid of the ugly ".So Li X Sc Ns s", just use "Xs" (suggested by jmc@). tweaks and ok jmc@ millert@
* When all tried file names already existed, mktemp(3) returned withoutschwarze2010-03-211-1/+3
| | | | | | setting errno(2). Behaviour unchanged for mkstemp[s] and mkdtemp. ok guenther deraadt
* document PF_KEY; from sthen and myselfjmc2010-03-121-3/+17
| | | | | | issue reported by Toni Mueller ok markus
* It's unsetenv() that doesn't like `=' in the argument, not putenv().kili2010-03-101-3/+3
| | | | ok millert@
* explain KERN_NOSUIDCOREDUMP with less words and more precisionschwarze2010-03-011-6/+9
| | | | ok jmc@ deraadt@ guenther@
* Do not attempt to silently continue text for the last column of tablesschwarze2010-02-253-15/+9
| | | | | | | | | | | | | generated by .Bl -column .It <tab> on following lines. This is a workaround; fixing it properly in a way compatible with our old groff would require .Xo support for .Bl -column phrases in mandoc(1), which is too much work right now just to fix exactly this one place in our tree. ok jmc@ This commit fixes the last issue i'm aware of which prevented building our whole tree with mandoc. Not all pages format nicely yet, but none kill the build any more.
* fix the description of _SC_GETPW_R_SIZE_MAX; from Tim van der Molenjmc2010-02-221-4/+4
|
* Every .Bl requires .It, even when using -column.schwarze2010-02-181-13/+13
| | | | | | | Found by and unbreaking the build with mandoc(1). While here, properly escape blanks inside columns and use "backslash" instead of "back slash". OK jmc@
* typo; ok ogajmc2010-02-121-3/+3
| | | | (sorry, i can't actually find where this started....)
* The previous commit didn't use the first X in the template if theguenther2010-02-111-3/+2
| | | | | | | entire template was Xs. Test suite written now to keep this from happening again. Problem caught by Vadim Zhukov again. ok millert@
* Don't underrun the buffer when the template is all X's.guenther2010-02-081-7/+2
| | | | | | | Also, remove a duplicate preconditions check. Based on a suggestion by Vadim Zhukov (persgray <at> gmail.com) ok millert@
* Use size_t in appropriate places; fixes sorting of big arrays;otto2010-02-081-9/+10
| | | | | after the diff was written, I made it similar to the freebsd fix of the same code; pr6287 ok millert@ guenther@
* use size_t to index arrays; avoids big array bugs; ok millert@ guenther@otto2010-02-081-1/+1
|
* Use MACHINE_CPU instead of MACHINE_ARCH to pick the correct machine dependentmiod2010-02-0313-63/+63
| | | | | | | files or directories when applicable. The inspiration and name of MACHINE_CPU come from NetBSD, although the way to provide it to Makefiles is completely different. ok kettenis@
* Update translations: fix EREMOTE and add a bunch of error codes too.guenther2010-01-281-1/+25
| | | | From Vadim Zhukov (persgray at gmail.com)
* stucture -> structure;jmc2010-01-251-3/+3
|
* Give little-endian fp on mips a change to be handled correctly.miod2010-01-231-0/+4
|
* Better ERRORS section info; from Tim van der Molen. POSIX documentsmillert2010-01-191-7/+54
| | | | | other common errno values for opendir() whereas we just point the user to open() et al. OK jmc@
* Leave errno as-is if fstat(2) fails instead of masking the realmillert2010-01-191-3/+7
| | | | errno with ENOTDIR. From Tim van der Molen.
* Add support to sysconf(3) for the variables _SC_NPROCESSORS_CONF andsthen2010-01-153-4/+22
| | | | | | | _SC_NPROCESSORS_ONLN, implemented by AIX/Tru64/Solaris/Linux/SCO/FreeBSD/NetBSD. Bump libc minor. From Brad, ok deraadt@ guenther@
* Document hw.ncpufound and HW_NCPUFOUND.guenther2010-01-141-3/+22
| | | | | | | | Document the interpretation of the third and fourth levels of KERN_FILE2. Document that KERN_FILE and KERN_PROC are deprecated in favor of KERN_FILE2 and KERN_PROC2. ok and tweaks jmc@
* New options 'S', as a shorthand for the options most suitable as anotto2010-01-132-3/+9
| | | | extra safeguard (FGJ). Idea from deraadt@; ok deraadt@ dlg@
* If a process receives two different signals while in readpassphrase, onlydtucker2010-01-131-13/+19
| | | | | | | the most recent one will be stored for later re-delivery. When the signal handlers are restored, all except the most recent signal will be lost. Replace the single variable with an array so signals are not lost. ok deraadt@
* encourage use of setreseuid(), and warn there are other privs; ok henningderaadt2010-01-111-5/+5
|
* plug a file descriptor leak in HASHFileChunk().oga2010-01-081-2/+4
| | | | | | From Igor Zinovik; thanks! ok millert@
* Neither .Pp nor unqualified text are allowed at the top level of .Bl;schwarze2010-01-031-3/+2
| | | | | | | | instead, .It is required. Thus, move .Pp and text before the .Bl, and remove the .Pp altogether where it is not needed. Syntax errors found by mandoc(1), also required to fix the mandoc build; feedback and ok jmc@, and sobrado@ also supports the direction.
* .Bl always requires .It, even in .Bl -column;schwarze2010-01-031-67/+67
| | | | | syntax errors found by mandoc(1), also required to fix the mandoc build; feedback and ok jmc@ and sobrado@
* blank lines not allowed outside literal context;schwarze2010-01-031-4/+4
| | | | | syntax errors found by mandoc(1), also required to fix the mandoc build; ok jmc@
* Document ESPIPE and make EFAULT cover all functions.fgsch2009-12-302-16/+34
| | | | jmc@ deraadt@ ok
* move this file to Attic; the swapon(2) system call cannot be accessedsobrado2009-12-291-111/+0
| | | | | | | | | | | | from userland since April 2003 and, of course, the manual page is not built either. see miod@'s change in r1.66 of src/lib/libc/sys/Makefile.inc. i would like to acknowledge the excellent advice from jmc@ and fgsch@ with relation to this change. ok miod@
* add missing paragraph break (.Pp) macro.sobrado2009-12-291-2/+3
|
* replace a few remaining UNIX terms with .Ux macros; this diffsobrado2009-12-296-30/+35
| | | | completes the changes from Oct 22.
* Implement proper error handling for getgrent(3), getgrnam(3) and getgrgid(3).schwarze2009-12-191-27/+43
| | | | | | | | | | | | | | | | | | | 1) Distinguish normal end of data (like eof, YPERR_NOMORE, YPERR_KEY) from error conditions. 2) Save errno(2) and restore it in case of success, as suggested by deraadt@ and beck@. While this code is touched, * move the common code for the yp_first and yp_next calls after the respective if/else-block; note that free(data) is not needed in case of failure and that __ypcurrent = NULL does no harm after failing yp_first. * return 0, not NULL: the return value of grscan is int, not a pointer. This is the last part of the work done on getgrent.c during c2k9, heavily relying on the other improvements done at that time. This has been rotting in my tree far too long. "get it in" deraadt@; also lightly tested by simon@ some time ago
* save calls to arc4random() by using a nibble at a time; not becauseotto2009-12-161-24/+27
| | | | | arc4random() is slow, but it induces getpid() calls; also saves a bit on stirring efforts
* Update the list of async-signal-safe functionsguenther2009-12-162-174/+208
| | | | | | | | | | Document that snprintf/vsnprintf/syslog_r() aren't async-signal-safe for floating-point Provide cursory documentation of SIGTHR Eliminate the NOTE section of the sigaction(2) manpage by merging the good bits into the STANDARDS section ok deraadt@
* No point in refreshing the pid from inside arc4_stir() when thatguenther2009-12-151-6/+15
| | | | | | | | | doesn't test it, so factor out the two places that test it into a routine and do the refreshing there. With this, arch4random_buf() doesn't trigger superfluous calls to getpid() when filling large buffers. ok deraadt@, "looks nicer indeed" otto@
* Keep all bits of __svc_fdset up to date, not just those beyond FD_SETSIZE.schwarze2009-12-141-3/+3
| | | | | | | Bug found while auditing the same complaint by parfait, see the previous commit; still not shutting parfait up. "wow, that's nasty" deraadt@
* sleep(3) is supposed to return zero when it sleeps the entire amountguenther2009-12-141-3/+3
| | | | ok deraadt@
* __svc_fdsetsize is counted in bits, not in array elementsschwarze2009-12-111-2/+2
| | | | | | | | | | When exceeding fd 1024, this bug cleared flag bits for all file descriptors except those <= 64. Found while auditing a (false positive) complaint by parfait. This bugfix does not shut parfait up, though. OK millert@ deraadt@
* More changes to avoid truncating 64 bit pointers to 32 bits and sign-extendingmiod2009-12-118-69/+69
| | | | them; allows userland with stack beyond 2GB to run.
* getcwd() is posix, not ansi; from Thomas Pfaffjmc2009-12-101-3/+3
| | | | ok millert
* Make userland malloc use __LDPGSZ granularity on mips, regardless of themiod2009-12-071-1/+3
| | | | actual kernel page size.
* missing word;jmc2009-12-051-3/+3
| | | | from trhodes@freebsd, r200095;
* wrap Nd in quotes, since it has >9 args;jmc2009-11-271-2/+2
|
* Correct description of physically vs logically; spotted by Nickotto2009-11-271-4/+7
| | | | Guenther; ok jmc
* Switch the chunk_info lists to doubly-linked lists and use the queueotto2009-11-271-51/+34
| | | | | | macros for them. Avoids walking the lists and greatly enhances speed of freeing chunks in reverse or random order at the cost of a little space. Suggested by Fabien Romano and Jonathan Armani; ok djm@
* Add setrdomain() and getrdomain() system calls. Committing now toguenther2009-11-272-3/+67
| | | | | | | | catch the libc major bump per request from deraadt@ Diff by reyk. ok guenther@