summaryrefslogtreecommitdiff
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* 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
* - libc/sys/sem.c was repocopied to libc/gen/sem.c.Ruslan Ermilov2004-01-149-366/+14
| | | | | | | | | | - sem_*(3) manpages were repocopied from libc_r. Reviewed by: deischen Repocopy by: markm Notes: svn path=/head/; revision=124530
* Translate from GNU C to ISO C.Dag-Erling Smørgrav2004-01-144-4/+4
| | | | Notes: svn path=/head/; revision=124514
* Add and document ffsl(), fls() and flsl().Dag-Erling Smørgrav2004-01-137-12/+201
| | | | Notes: svn path=/head/; revision=124483
* Kill whitespace at end of lines.Jacques Vidrine2004-01-121-9/+9
| | | | Notes: svn path=/head/; revision=124432
* Fix a bug that could result in a null pointer dereference inJacques Vidrine2004-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> Notes: svn path=/head/; revision=124431
* XDR sources are handled by ../xdr/Makefile.inc.Ruslan Ermilov2004-01-111-4/+0
| | | | Notes: svn path=/head/; revision=124379
* Replaced an ugly hack to selectively disable warningsRuslan Ermilov2004-01-112-3/+3
| | | | | | | | | | in contributed sources with just a hack made possible by bsd.sys.mk,v 1.33. This is better because it just nulls out the warning flags rather than adding gcc(1) specific -w option to CFLAGS. Notes: svn path=/head/; revision=124374
* Add an ulgy hack so that warnings added by non-zero WARNS values won't beDavid E. O'Brien2004-01-101-0/+3
| | | | | | | | | used with the contrib/ gdtoa sources as they aren't WARNS-clean. Submitted by: ru Notes: svn path=/head/; revision=124354
* Clarify the behavior of ptrace(2) a little bit: the tracing processRobert Watson2004-01-101-0/+24
| | | | | | | | | | | | | | | | | | must first attach to the traced process. If the tracing process exits without detaching, the traced process will be killed rather than continued. For the duration of the tracing session, the traced process is reparented to the tracing process (with resulting expected behaviors). It is permissible to trace more than one other process at a time. When using waitpid() to monitor the behavior of the traced process, signals are intercepted: they may optionally then be forwarded using ptrace(). Signals are generated normally by and for the process, but also by the tracing facility (SIGTRAP). Product of: Suffering Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=124346
* We need to discard `const'ness explicitly when invoking sysarch.Jacques Vidrine2004-01-101-1/+1
| | | | | | | Reported by: sparc64 tinderbox via bde Notes: svn path=/head/; revision=124342