summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen
Commit message (Collapse)AuthorAgeFilesLines
* Unbreak alpha: On alpha a long double is the same as a double andmarcel2004-07-101-0/+4
| | | | | | consequently the exponent is only 11 bits. Testing whether the exponent equals 32767 in that case only effects to compiler warnings and thus build breakage.
* Bump document date for recent changes.das2004-07-091-1/+1
| | | | Prodded by: ru
* Document these functions as being in libm, not libc. Some of themdas2004-07-091-4/+1
| | | | | | | *are* in libc for historical reasons, but programmers should not rely on that fact. Also remove a BUGS section that is not relevant here.
* Implement the classification macros isfinite(), isinf(), isnan(), anddas2004-07-093-1/+134
| | | | | | | | | | | | | | | | | | | | | isnormal() the hard way, rather than relying on fpclassify(). This is a lose in the sense that we need a total of 12 functions, but it is necessary for binary compatibility because we have never bumped libm's major version number. In particular, isinf(), isnan(), and isnanf() were BSD libc functions before they were C99 macros, so we can't reimplement them in terms of fpclassify() without adding a dependency on libc.so.5. I have tried to arrange things so that programs that could be compiled in FreeBSD 4.X will generate the same external references when compiled in 5.X. At the same time, the new macros should remain C99-compliant. The isinf() and isnan() functions remain in libc for historical reasons; however, I have moved the functions that implement the macros isfinite() and isnormal() to libm where they belong. Moreover, half a dozen MD versions of isinf() and isnan() have been replaced with MI versions that work equally well. Prodded by: kris
* Fixed markup.ru2004-07-071-16/+22
|
* Add implementations of ftw(3) and nftw(3) and the corresponding headerdas2004-07-052-2/+211
| | | | | | | | ftw.h. This is the implementation written by Joel Baker <fenton@debian.org> for inclusion in NetBSD, but with several bugfixes. Obtained from: Debian
* Documentation for ftw(3) and nftw(3).das2004-07-051-0/+210
| | | | Obtained from: OpenBSD
* Fix the NAME section making whatis(1) happy in particular.ru2004-07-052-7/+6
|
* Eliminate double whitespace.ru2004-07-0310-17/+20
|
* Mechanically kill hard sentence breaks.ru2004-07-0227-124/+237
|
* Removed trailing whitespace.ru2004-07-021-1/+1
|
* Markup tidying.ru2004-07-026-16/+37
|
* Markup, grammar, and spelling fixes.ru2004-06-301-2/+8
|
* Fix typo: WRDE_DOOFS -> WRDE_DOOFFS.tjr2004-06-302-5/+5
| | | | Noticed by: Stoned Elipot
* Spelling fixes.mpp2004-06-212-3/+3
|
* In fts_build(), if we try to chdir and fail (e.g. due to lack of searchdas2004-06-082-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | permission), try to continue in FTS_DONTCHDIR mode. Of course this won't work for long paths, but we can't descend more than one pathname component beyond the directory anyway if we lack search permission. Here is a transcript demonstrating the change, where oldls is ls(1) linked with the old fts(3): das@VARK:~> mkdir t && touch t/{a,b,c} && chmod u-x t das@VARK:~> oldls t a b c das@VARK:~> oldls -l t das@VARK:~> \ls t a b c das@VARK:~> \ls -l t ls: a: Permission denied ls: b: Permission denied ls: c: Permission denied I had forgotten about this patch until bde reminded me. He reports using it without problems for over a year. PR: 45723
* Finally document the option to avoid zombie creationyar2004-06-071-1/+22
| | | | through ignoring SIGCHLD.
* Fix the ordering in the description of the dlsym() lookup procedure toroam2004-06-031-4/+4
| | | | | | | | reflect src/libexec/rtld-elf/rtld.c rev. 1.68 - the globally-loaded objects (RTLD_GLOBAL) are searched before the local object's DAG's. PR: 62770 Submitted by: Kimura Fuyuki <fuyuki@nigredo.org>
* Change the signature of ftok from (const char *, char) to (const char *, int)tjr2004-06-011-1/+1
| | | | Obtained from: NetBSD (christos)
* Clarify and extend paragraphs on interoperationyar2004-05-171-2/+14
| | | | | | | | | of fcntl(2), flock(2), and lockf(3) advisory locks. Add such a paragraph to the flock(2) manpage for the sake of consistency. Reviewed by: Cyrille Lefevre and Kirk McKusick on -arch MFC after: 2 weeks
* getgrent() and friends should set errno if there is an error.kientzle2004-05-172-1/+8
| | | | | | Also, clarify the manpage description of when errno is set and explain that clients should set errno=0 first if they want useful error information.
* POSIX prohibits any library function from setting errno to 0.kientzle2004-05-172-2/+6
| | | | | | | | Correct my previous commit and add a comment to the manpage indicating that the user must set errno to 0 if they wish to distinguish "no such user" from "error". Pointed out by: Jacques Vidrine (nectar@)
* If getpwent/getpwuid/getpwnam return NULL, they must also set errno.kientzle2004-05-171-0/+3
|
* Fixed some minor style bugs.bde2004-05-132-14/+20
|
* Fix some^Wseveral style bugs from last commit.peadar2004-05-123-45/+38
| | | | | | | | | | Remove "sys/types.h" as "sys/param.h" is already included Use cast rather than back-pointer to convert from public to private version of FTS data, and so avoid littering fts.h with any of the details. Pointed out By: bde, kientzle
* Remove a trailing newline, to behave as documented in syslog(3):dds2004-05-101-0/+4
| | | | | | | | | | | | | "A trailing newline is added if none is present." The code in syslogd, stderr, and console output always adds a newline at the EOL. However, the existing code never actually removed a trailing newline, and apparently relied on syslogd to convert it into a space character. Thus, the existing newline was converted to a trailing space at the EOL by syslogd, while stderr, and console output resulted in an empty line. MFC after: 2 weeks
* Fixed style bugs in previous commit (bogus forward declaration andbde2004-05-101-3/+1
| | | | inconsistent capitalization in comments).
* o fix a sentence to match with the synopsis [1]brueffer2004-05-091-3/+3
| | | | | | | | | o fix grammar nit PR: 66289 [1] Submitted by: Michel Lavondès <fox@vader.aacc.cc.md.us> Obtained from: OpenBSD [1] MFC after: 3 days
* The FTS_NOSTAT option is an optimisation that reduces the numberpeadar2004-05-083-6/+153
| | | | | | | | | | | | | | | | | | | of stat(2) calls by keeping an eye of the number of links a directory has. It assumes that each subdirectory will have a hard link to its parent, to represent the ".." node, and stops calling stat(2) when all links are accounted for in a given directory. This assumption is really only valid for UNIX-like filesystems: A concrete example is NTFS. The NTFS "i-node" does contain a link count, but most/all directories have a link count between 0 and 2 inclusive. The end result is that find on an NTFS volume won't actually traverse the entire hierarchy of the directories passed to it. (Those with a link count of two are not traversed at all) The fix checks the "UFSness" of the filesystem before enabling the optimisation. Reviewed By: Tim Kientzle (kientzle@)
* A minor refactoring to simplify portability: assign the filenamekientzle2004-05-052-10/+14
| | | | | length to a separate variable so that it will be easier to adapt to systems that don't have d_namlen in struct dirent.
* 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).
OpenPOWER on IntegriCloud