summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen
Commit message (Collapse)AuthorAgeFilesLines
* When *printf() and *scanf() are compiled without floating-pointdas2004-05-021-0/+4
| | | | | support, fmtcheck() should not accept format strings that contain floating-point formats.
* Markup nit.ru2004-04-271-1/+1
|
* Fix a bug that could result in getpw*() incorrectly returning NULL when NISjon2004-04-211-0/+1
| | | | | | | adjunct maps are used. One symtom of this bug is sshd saying: login_get_lastlog: Cannot find account for uid X when logging in. The problem here is caused by an incorrect reuse of the rv variable when previous values are needed later.
* Belatedly remove the getvfsent(3) API. All the consumers have beenmux2004-04-113-342/+2
| | | | | updated to use getvfsbyname(3) or the vfs.conflist sysctl since a long time, except mount_smbfs(8) which has just been fixed.
* Terminate execl()'s argument list with a null pointer instead of atjr2004-04-091-1/+1
| | | | | | | null pointer constant. (The latter may be an integer constant, which is not correct here.) Submitted by: Stefan Farfeleder
* 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
|
* Document additional reasons that sysctl(3) can return ENOMEM (due totruckman2004-03-151-0/+11
| | | | vslock() failure).
* Make NULL a (void*)0 whereever possible, and fix the warnings(-Werror)markm2004-03-052-2/+2
| | | | | | | | | | | | | | | 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
* 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
* style cleanup: Remove duplicate $FreeBSD$ tags.cperciva2004-02-101-2/+0
| | | | | | | | These files had tags at the start of the file (incorrect, removed), and after the copyright notices (correct). Approved by: rwatson (mentor)
* Prevent memory leak on sem_destroy() by destroying the semaphore'sdeischen2004-02-061-1/+4
| | | | internal mutex and CV.
* Only allow the semaphore to be taken when the value is positive.deischen2004-02-061-2/+1
| | | | | | Don't decrement it twice when it is taken. Reported by: kris
* Correct check for invalid semaphore on sem_destroy() (s/==/!=/).deischen2004-02-051-1/+1
| | | | Reported by: kris
* Correct the weak reference for sem_unlink.deischen2004-02-051-1/+1
|
* Allow libc's version of sem_trywait() to work for non-pshared mutexes.deischen2004-02-041-2/+17
|
* Modify the implementation of libc semaphores so that they can bedeischen2004-02-031-146/+132
| | | | | | | | | | | | overridden by the threads library to provide a userland version of non-pshared semaphores and cancellation points. Also add a sem_timedwait(). The libc version of semaphores always uses kernel semaphores regardless of whether pshared is set or not. When threads are not present, it is difficult to get sem_wait() or sem_timedwait() to do the right thing (since pthread_cond_timedwait() and pthread_cond_wait() are stubs in libc and just return immediately).
* Discard the first 1024 bytes of output as suggested bydas2004-01-201-1/+13
| | | | | | | | http://citeseer.nj.nec.com/fluhrer01weaknesses.html and http://citeseer.nj.nec.com/531224.html . PR: 61126 Submitted by: Jeff Ito <jeffi@rcn.com>
* add missing endusershell() call. Original version was incorrect.charnier2004-01-181-1/+3
| | | | | PR: bin/2442 Reviewed by: Friedemann Becker <zxmxy33@mail.uni-tuebingen.de>
* Backout revision 1.6, because some stub functions not in libc, anddavidxu2004-01-171-18/+2
| | | | | non-threaded won't build. The cancellation point support should be further discussed.
* Enable cancellation point in sem_wait, it is required by POSIX.davidxu2004-01-171-2/+18
| | | | | | For pshared semaphore, this commit still does not enable cancellation point, I think there should be a pthread_enter_cancellation_point_np for libc to implement a safe cancellation point.
* Fixed style of previous commit.ru2004-01-151-3/+2
| | | | Submitted by: bde
* - libc/sys/sem.c was repocopied to libc/gen/sem.c.ru2004-01-147-8/+13
| | | | | | | - sem_*(3) manpages were repocopied from libc_r. Reviewed by: deischen Repocopy by: markm
* Kill whitespace at end of lines.nectar2004-01-121-9/+9
|
* Fix a bug that could result in a null pointer dereference innectar2004-01-121-1/+1
| | | | | | | | | | | getpwent(3) or getpwuid(3) when using NIS adjunct maps. The bug was present in the internal `nis_passwd' function. The lookup in the adjunct map used the name passed into `nis_passwd', however no name was of course supplied by getpwent or getpwuid. Correctly use the name from the `struct pwd' that was found instead. PR: bin/59962 Submitted by: Gabriel Gomez <ggomez@fing.edu.uy>
* Remove unused variables and function declarations. Add missing headers.nectar2004-01-061-3/+0
|
* Make sure we initialise dirp->dd_size if we aren't reading a unionfsdfr2003-12-261-0/+1
| | | | | | directory. Special thanks to: valgrind
* Back out previous commit due to incorrect content.trhodes2003-12-231-128/+62
| | | | Noticed by: wollman
* Document many of the missing posix.1b options.trhodes2003-12-231-62/+128
| | | | | | PR: 20528 Submitted by: bms (original version) Requested by: mike (awhile ago)
* Fix problem where initgroups would silently truncate groups withdds2003-11-191-2/+7
| | | | | | | more than NGROUP elements without providing the opportunity to setgroups to fail and correctly return error and set errno. MFC after: 2 weeks
* Remove ',' accidentally added after ".Xr fork 2".ghelmer2003-11-101-1/+1
|
* Prevent abnormal termination of a child daemon process when createdghelmer2003-11-102-3/+35
| | | | | | | | | | by a parent that is a session leader (e.g., login shell) by ignoring SIGHUP in before calling fork(2) and then restoring SIGHUP's action after setsid(3). Based on the patch by Martin Kammerhofer <mkamm@gmx.net>. PR: bin/25462 Reviewed by: bde, alex.neyman@auriga.ru
* Rephrase .Nd description to contain the keykientzle2003-11-061-1/+1
| | | | | | | words "pattern" and "test"; this should make it easier to find with "man -k" Approved by: gordon (mentor)
* Add '#' to the characters VIS_GLOB encodes. This fixes a bug in mtree.phk2003-10-302-2/+3
|
* Add a new flag to vis(3): VIS_GLOB which encodes the glob(3) magicphk2003-10-302-2/+7
| | | | characters '*', '?' and '['.
* Remove incomplete support for running FreeBSD userland on old NetBSD kernelstjr2003-10-294-14/+1
| | | | lacking the issetugid() and utrace() syscalls.
* mdoc(7): Fix common mistakes made in the SEE ALSO section.ru2003-09-121-1/+1
|
* mdoc(7): Properly mark C headers.ru2003-09-104-5/+5
|
* mdoc(7): Use the new feature of the .In macro.ru2003-09-0817-30/+30
|
* Update the kern.osreldate documentation to document the present formateivind2003-09-011-2/+17
| | | | | | used, and refer to <osreldate.h> to get userland date. Submitted by: ru
* Add a kluge suggested by Marcel to paper over the difference betweenwollman2003-08-191-0/+3
| | | | | | | | | | | | gethostname()'s old and new signatures without requiring a library bump. Note that programs which called gethostname() with a negative argument were already broken, since the same type conversion was done by the old implementation. Add a note in the Makefile so that whoever next bumps the libc revision will delete the kluge at the same time (as it will no longer be necessary). This is only operative on 64-bit platforms. Submitted by: marcel
* Change gethostname() to set errno to ENAMETOOLONG instead of ENOMEMwollman2003-08-192-18/+51
| | | | | | | | | | | | | | | | | | | | | | | | | when the buffer is not long enough to hold the current host name. POSIX does not standardize error returns for gethostname(), so it doesn't matter which one we use, but ENAMETOOLONG is at least a little more intuitive, and mi suggests the existence of prior art. I've been running with this change for a while on my home machine with no effect. At the same time, I've updated the prototype for gethostname() to use the correct standard type (size_t) for the namelen argument. All of the in-tree callers fall into one of the following categories: 1) Call perror() or equivalent when gethostname() fails. 2) Ignore gethostname()'s return value entirely, potentially resulting in data corruption if the buffer is too small. 3) Fall back to a (possibly sensible) default value if gethostname() fails. Many of the callers I examined shows signs of confusion about the correct sizing of the host name buffer. gethostname(3) now has more information about this, as well as updated standards information. PR: 48114 Submitted by: mi (in part)
* Add the POSIX 1003.1-2001 posix_madvise() interface.bms2003-08-092-3/+4
| | | | | | PR: standards/54634 Reviewed by: das Approved by: jake (mentor)
* The upper end of the range of arc4random(3) is 2**32-1, not 2**31-1.das2003-07-311-2/+4
|
* Make raise and _raise as weak symbols, so they can be overriden bydavidxu2003-07-191-1/+4
| | | | | | thread library. Reviewed by: deischen
* Rewrite to reflect slight change in semantics for C99, and note a bugwollman2003-07-191-22/+39
| | | | in the standard. Defer to gettimeofday(2) for error indications.
* C99 compliance: time() always sets its return value in both placeswollman2003-07-191-4/+7
| | | | | | (if present), even on error. Pointed out by: Wojtek Lerch, on the Austin Group mailing-list
OpenPOWER on IntegriCloud