summaryrefslogtreecommitdiff
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* add destination address selection support for getipnodebyname(3).Hajimu UMEMOTO2004-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. Notes: svn path=/head/; revision=126052
* Unbreak the upgrade path from 4.9 after removal of GNU getopt andRuslan Ermilov2004-02-201-2/+0
| | | | | | | <gnuregex.h>. Notes: svn path=/head/; revision=126039
* Document dependence of mktemp(3) on the non-reentrant arc4random(3).Brian Feldman2004-02-201-0/+7
| | | | Notes: svn path=/head/; revision=126034
* Remove the code and an associated comment for gcc 1.x compatibilityDavid Schultz2004-02-161-9/+1
| | | | | | | and fix a typo in the !__GNUC__ case. Notes: svn path=/head/; revision=125867
* Fix a typo in the !__GNUC__ case and remove an obsolete comment.David Schultz2004-02-161-3/+1
| | | | Notes: svn path=/head/; revision=125866
* Fix some aliasing problems.David Schultz2004-02-166-52/+94
| | | | Notes: svn path=/head/; revision=125865
* Add forgotten IEEE functions. The Perl 5.8 port now compiles.Peter Grehan2004-02-129-2/+428
| | | | | | | | Submitted by: Suleiman Souhlal <refugee@segfaulted.com> Obtained from: NetBSD Notes: svn path=/head/; revision=125733
* style cleanup: Remove duplicate $FreeBSD$ tags.Colin Percival2004-02-103-6/+0
| | | | | | | | | | | These files had tags after teh copyright notice, inside the comment block (incorrect, removed), and outside the comment block (correct). Approved by: rwatson (mentor) Notes: svn path=/head/; revision=125669
* style cleanup: Remove duplicate $FreeBSD$ tags.Colin Percival2004-02-102-5/+1
| | | | | | | | | | | These files had tags after the copyright notice, inside the comment block (incorrect, removed), and outside the comment block (correct). Approved by: rwatson (mentor) Notes: svn path=/head/; revision=125668
* style cleanup: Remove duplicate $FreeBSD$ tags.Colin Percival2004-02-103-4/+0
| | | | | | | | | | | These files had tags at the start of the file (incorrect, removed), and after the copyright notices (correct). Approved by: rwatson (mentor) Notes: svn path=/head/; revision=125667
* Rewrite fabs.S to use pure SSE2 operations. I got the clues how to doPeter Wemm2004-02-081-10/+35
| | | | | | | this from looking at code generated by gcc. Notes: svn path=/head/; revision=125600
* Update the documentation for setpgrp(2) to reflect the access controlDavid Schultz2004-02-081-7/+21
| | | | | | | | | | checks that the code actually performs. Judging from the 4.2BSD release notes, the docs have only been out of date for 20 years. PR: 29844 Notes: svn path=/head/; revision=125592
* Document the SF_NODISKIO flag, and fix a small typo.Mike Silbersack2004-02-081-2/+10
| | | | Notes: svn path=/head/; revision=125587
* Unbreak world.Ruslan Ermilov2004-02-071-2/+2
| | | | Notes: svn path=/head/; revision=125562
* getnetbyname fixes:Diomidis Spinellis2004-02-071-22/+67
| | | | | | | | | | Do not choke on malformed network addresses. Return n_name in static space, not on the function's stack. MFC after: 1 week Notes: svn path=/head/; revision=125555
* Prevent memory leak on sem_destroy() by destroying the semaphore'sDaniel Eischen2004-02-061-1/+4
| | | | | | | internal mutex and CV. Notes: svn path=/head/; revision=125521
* Only allow the semaphore to be taken when the value is positive.Daniel Eischen2004-02-061-2/+1
| | | | | | | | | Don't decrement it twice when it is taken. Reported by: kris Notes: svn path=/head/; revision=125518
* Correct check for invalid semaphore on sem_destroy() (s/==/!=/).Daniel Eischen2004-02-051-1/+1
| | | | | | | Reported by: kris Notes: svn path=/head/; revision=125509
* Correct the weak reference for sem_unlink.Daniel Eischen2004-02-051-1/+1
| | | | Notes: svn path=/head/; revision=125502
* Allow libc's version of sem_trywait() to work for non-pshared mutexes.Daniel Eischen2004-02-041-2/+17
| | | | Notes: svn path=/head/; revision=125446
* Modify the implementation of libc semaphores so that they can beDaniel Eischen2004-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). Notes: svn path=/head/; revision=125372
* Merge vfscanf.c,v 1.35.David Schultz2004-01-311-4/+10
| | | | Notes: svn path=/head/; revision=125283
* Fix the handling of negative hexadecimal numbers in integer formats.David Schultz2004-01-311-3/+9
| | | | | | | | | | Note that this bug is unrelated to recent work in this area; it seems to have been present since revision 1.1. Obtained from: NetBSD Notes: svn path=/head/; revision=125282
* LC_ALL not always take priority over other LC_*Andrey A. Chernov2004-01-311-22/+35
| | | | | | | | Obtained from: NetBSD PR: 62047 Notes: svn path=/head/; revision=125274
* Add reference to environ(7)Andrey A. Chernov2004-01-291-1/+2
| | | | Notes: svn path=/head/; revision=125190
* Xref kqueue and pollEivind Eklund2004-01-261-0/+2
| | | | Notes: svn path=/head/; revision=125039
* Xref kqueueEivind Eklund2004-01-261-0/+1
| | | | Notes: svn path=/head/; revision=125038
* Describe EOVERFLOW caseAndrey A. Chernov2004-01-251-0/+9
| | | | Notes: svn path=/head/; revision=124952
* When writing/reading longs use explicit 32bit temporary values.Martin Blapp2004-01-241-3/+4
| | | | | | | | | | | MFNetBSD rev. 1.15 + rev 1.16 PR: bin/60901 Submitted by: Logan Gabriel <gersh@sonn.com> Obtained from: NetBSD Notes: svn path=/head/; revision=124897
* Merge vfprintf.c, v1.61 and 1.62. For compatibility with __hdtoa()David Schultz2004-01-231-19/+25
| | | | | | | | | | and to reduce diffs between vfprintf.c and vfwprintf.c, declare xdigs* to be char arrays rather than wchar_t arrays. In collaboration with: tjr Notes: svn path=/head/; revision=124887
* Include <stdlib.h> to get abort() prototype.Peter Grehan2004-01-211-0/+2
| | | | Notes: svn path=/head/; revision=124769
* Updated manh shift constant type to 'ULL' for PPC to fixPeter Grehan2004-01-211-1/+1
| | | | | | | | | shift-too-large compile error reviewed by: das Notes: svn path=/head/; revision=124767
* Discard the first 1024 bytes of output as suggested byDavid Schultz2004-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> Notes: svn path=/head/; revision=124741
* Use 'uint32_t' instead of 'long' when a 32-bit integer is intended.David Schultz2004-01-201-31/+32
| | | | | | | | | | | | This results in no functional change, aside from fixing a data corruption bug on LP64 platforms. The code here could still use a significant amount of cleanup. PR: 56502 Submitted by: hrs (earlier version) Notes: svn path=/head/; revision=124738
* Simplify mpool_get() and mpool_write() by using pread() and pwrite()David Schultz2004-01-201-6/+3
| | | | | | | | | | instead of lseek()/_read() and lseek()/_write(). PR: bin/54276 Submitted by: <dnelson@allantgroup.com> Notes: svn path=/head/; revision=124735
* libc is now WARNS=2 clean with the exception of the gdtoa bits (whichJacques Vidrine2004-01-191-1/+1
| | | | | | | are now not built with warnings enabled at all). Notes: svn path=/head/; revision=124723
* Add prototypes for the three syscall stubs that are invoked here,Jacques Vidrine2004-01-191-0/+4
| | | | | | | in order to quiet warnings. Notes: svn path=/head/; revision=124722
* add cross-reference to clock_gettime(2)Poul-Henning Kamp2004-01-191-0/+1
| | | | Notes: svn path=/head/; revision=124712
* Bring the *printf(3) documentation up to date with the code:David Schultz2004-01-191-37/+24
| | | | | | | | | | | | | | | | | | | | | | - Update and improve the documentation for %[aA] o Like %[eE], %[aA] may round the result if a precision is specified. o Grammar police: Fix a split infinitive. o The FreeBSD implementation does better than the minimum required by C99 (literal translation of the mantissa). The digit before the hexadecimal-point is never 0 unless the number itself is 0. o Clarify that the exponent field represents a decimal exponent of 2. o Discuss the fact that multiple valid representations are possible. o Remove the entry in the BUGS section claiming that %[aA] is not implemented. - Remove the entry in the BUGS section claiming that the ' flag for printing thousands separators is unimplemented for floating-point. - Remove the entry in the BUGS section claiming that the L modifier reduces the precision to "double" before conversion. Notes: svn path=/head/; revision=124710
* add missing endusershell() call. Original version was incorrect.Philippe Charnier2004-01-181-1/+3
| | | | | | | | PR: bin/2442 Reviewed by: Friedemann Becker <zxmxy33@mail.uni-tuebingen.de> Notes: svn path=/head/; revision=124690
* Implement __hdtoa() and __hldtoa() and enable printf() support for %aDavid Schultz2004-01-183-6/+435
| | | | | | | and %A, which print floating-point numbers in hexadecimal. Notes: svn path=/head/; revision=124667
* Prototype __hdtoa() and __hldtoa().David Schultz2004-01-181-0/+2
| | | | Notes: svn path=/head/; revision=124658
* Fix some bugs affecting the %a and %A format specifiers. SinceDavid Schultz2004-01-181-6/+16
| | | | | | | | | | | | | | | | these are not fully implemented and ifdef'd out, the bugs have never manifested themselves. Specifically: - Fix a memory leak in the case where %a follows another floating-point format. - Make the %a/%A code behave like %e/%E with respect to precision. - It is no longer valid to assume that '-' and '0x' are mutually exclusive. - Address other minor issues. Notes: svn path=/head/; revision=124657
* Add a delta accidentally omitted from the previous commit:David Schultz2004-01-181-0/+3
| | | | | | | | Define DBL_MANH_SIZE and DBL_MANL_SIZE to be the sizes of the high and low words of the mantissa in bits, respectively. Notes: svn path=/head/; revision=124655
* Define LDBL_MANH_SIZE and LDBL_MANL_SIZE to be the sizes of theDavid Schultz2004-01-186-0/+18
| | | | | | | high and low words of the mantissa in bits, respectively. Notes: svn path=/head/; revision=124653
* Fix a bug that caused long double subnormals to be printedDavid Schultz2004-01-181-0/+3
| | | | | | | | incorrectly on architectures without an explicit normalization bit (sparc64, powerpc). Notes: svn path=/head/; revision=124652
* Backout revision 1.6, because some stub functions not in libc, andDavid Xu2004-01-171-18/+2
| | | | | | | | non-threaded won't build. The cancellation point support should be further discussed. Notes: svn path=/head/; revision=124614
* Enable cancellation point in sem_wait, it is required by POSIX.David Xu2004-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. Notes: svn path=/head/; revision=124605
* Fixed style of previous commit.Ruslan Ermilov2004-01-151-3/+2
| | | | | | | Submitted by: bde Notes: svn path=/head/; revision=124568
* The libc_r/man/sigwait.3 manpage has been repocopied to libc/sys/sigwait.2.Ruslan Ermilov2004-01-142-6/+7
| | | | | | | | Reviewed by: deischen Repocopy by: markm Notes: svn path=/head/; revision=124533