summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Don't forget to free() currency_symbol and asciivalue when multipleru2008-04-191-0/+4
| | | | | | | | conversion specifiers for them are present. Submitted by: Maxim Dounin <mdounin@mdounin.ru> Obtained from: NetBSD (partially) MFC after: 3 days
* Better strfmon(3) conversion specifiers sanity checking.ru2008-04-191-1/+8
| | | | | | | | | | There were no checks for left and right precisions at all, and a check for field width had integer overflow bug. Reported by: Maksymilian Arciemowicz Security: http://securityreason.com/achievement_securityalert/53 Submitted by: Maxim Dounin <mdounin@mdounin.ru> MFC after: 3 days
* Next stage of stdio cleanup: Retire __sFILEX and merge the fields back intojhb2008-04-1726-143/+72
| | | | | | | | | | | | | | | | | | | __sFILE. This was supposed to be done in 6.0. Some notes: - Where possible I restored the various lines to their pre-__sFILEX state. - Retire INITEXTRA() and just initialize the wchar bits (orientation and mbstate) explicitly instead. The various places that used INITEXTRA didn't need the locking fields or _up initialized. (Some places needed _up to exist and not be off the end of a NULL or garbage pointer, but they didn't require it to be initialized to a specific value.) - For now, stdio.h "knows" that pthread_t is a 'struct pthread *' to avoid namespace pollution of including all the pthread types in stdio.h. Once we remove all the inlines and make __sFILE private it can go back to using pthread_t, etc. - This does not remove any of the inlines currently and does not change any of the public ABI of 'FILE'. MFC after: 1 month Reviewed by: peter
* Implement fdopendir(3) by splitting __opendir2() into two parts, the upper partdelphij2008-04-164-6/+71
| | | | | | deals with the usual __opendir2() calls, and the rest part with an interface translator to expose fdopendir(3) functionality. Manual page was obtained from kib@'s work for *at(2) system calls.
* Style fixes to opendir.c:delphij2008-04-161-6/+3
| | | | | - Use /*- for copyright block; - ANSIfy.
* Sort MAN and MLINKS.ru2008-04-161-25/+26
|
* Connect newly added manpages to the build.ru2008-04-161-5/+15
| | | | Submitted by: kib
* Man pages for the openat(2), fexecve(2) and related syscalls.kib2008-04-1615-40/+1098
| | | | Reviewed by: ru
* Doh! Extra mips in the path. Remove these and wait until tomorrowimp2008-04-1611-600/+0
| | | | when I have more brain cells to try again.
* Turns out the machine/asm.h isn't needed here, since SYS.h alreadyimp2008-04-1610-12/+1
| | | | included it.
* FreeBSD/mips libc support. Merged from perforce mips2-jnpr branch.imp2008-04-1611-0/+611
|
* _vfork is not in libthr, remove the reference.davidxu2008-04-161-1/+0
|
* Fix one-byte buffer overflow: NUL gets written to the buffer, but isn'tcperciva2008-04-151-1/+1
| | | | | | | | | | | counted in the width specification in scanf. This is not a security problem, since this function is only used to parse a user's configuration file. Submitted by: Joerg Sonnenberger Obtained from: dragonflybsd MFC after: 1 week
* Implement POSIX function tcgetsid() which returns session id.davidxu2008-04-154-1/+84
| | | | PR: stand/107561
* don't include pthread_np.h, it is not used.davidxu2008-04-141-1/+0
|
* Use calloc() instaed of zeroing memory ourselves.delphij2008-04-131-2/+1
|
* Unbreak the build for arm and powerpc.das2008-04-122-0/+3
| | | | Pointy hat to yours truly.
* Updates for changes in the way printf() handles hex floating pointdas2008-04-121-4/+5
| | | | numbers.
* Make several changes to the way printf handles hex floating point (%a):das2008-04-123-207/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | 1. Previously, printing the number 1.0 could produce 0x1p+0, 0x2p-1, 0x4p-2, or 0x8p-3, depending on what happened to be convenient. This meant that printing a value as a double and printing the same value as a long double could produce different (but equivalent) results. The change is to always make the leading digit a 1, unless the number is 0. This solves the aforementioned problem and has several other advantages. 2. Use the FPU to do rounding. This is far simpler and more portable than manipulating the bits, and it fixes an obsure round-to-even bug. It also raises the exceptions now required by IEEE 754R. The drawbacks are that it is usually slightly slower, and it makes printf less effective as a debugging tool when the FPU is hosed (e.g., due to a buggy softfloat implementation). 3. On i386, twiddle the rounding precision so that (2) works properly for long doubles. 4. Make several simplifications that are now possible due to (2). 5. Split __hldtoa() into a separate file. Thanks to remko for access to a sparc64 box for testing.
* Fix some bugs that caused sparc64's quad precision sqrt to getdas2008-04-121-5/+5
| | | | | | the wrong answer for virtually all inputs. Thanks to remko for access to a sparc64 box for testing.
* Make the software emulator for long doubles set the FPU exceptiondas2008-04-121-0/+15
| | | | | | | flags appropriately. The next step is to make it raise a SIGFPE if any exceptions are unmasked. Thanks to remko for access to a sparc64 box for testing.
* Add memrchr(3).delphij2008-04-104-4/+74
| | | | Obtained from: OpenBSD
* Move the cpuset functions from FBSD_1.0 to FBSD_1.1. All symbols addeddeischen2008-04-071-5/+5
| | | | to 8.0 belong in the FBSD_1.1 symbol namespace.
* On i386, don't try to do network-type stuff if the device name is'nt pxeN.dfr2008-04-051-0/+7
|
* Add some compatibility code so that software which is built to use the newdfr2008-04-043-1/+92
| | | | | | | struct flock with l_sysid member can work properly on an an old kernel which doesn't support l_sysid. Sponsored by: Isilon Systems
* Minor style(9) nit: move to using ANSI definition of functions.imp2008-04-031-19/+5
|
* Fix descriptions of "struct msqid_ds and "struct ipc_perm" to matchru2008-04-031-11/+11
| | | | harsh reality.
* Fix some corner cases:das2008-04-032-10/+20
| | | | | | | | | - fma(x, y, z) returns z, not NaN, if z is infinite, x and y are finite, x*y overflows, and x*y and z have opposite signs. - fma(x, y, z) doesn't generate an overflow, underflow, or inexact exception if z is NaN or infinite, as per IEEE 754R. - If the rounding mode is set to FE_DOWNWARD, fma(1.0, 0.0, -0.0) is -0.0, not +0.0.
* put THR_CRITICAL_LEAVE into do .. while statement.davidxu2008-04-031-2/+4
|
* style(9) cleanupkevlo2008-04-032-2/+2
|
* add __hidden suffix to _umtx_op_err, this eliminates PLT.davidxu2008-04-031-1/+1
|
* Non-portable functions are in pthread_np.h, fix compiling problem.davidxu2008-04-021-1/+1
|
* Add pthread_setaffinity_np and pthread_getaffinity_np to libc namespace.davidxu2008-04-023-2/+4
|
* Remove unused functions.davidxu2008-04-022-55/+0
|
* Replace function _umtx_op with _umtx_op_err, the later function directlydavidxu2008-04-029-51/+112
| | | | | | returns errno, because errno can be mucked by user's signal handler and most of pthread api heavily depends on errno to be correct, this change should improve stability of the thread library.
* Replace userland rwlock with a pure kernel based rwlock, the newdavidxu2008-04-024-223/+199
| | | | | | implementation does not switch pointers when it resumes waiters. Asked by: jeff
* Normally, we are often reading local time rather than setting time zone,davidxu2008-04-011-22/+63
| | | | | replace mutex with rwlock, this should eliminate lock contention in most cases.
* Restore normal pthread_cond_signal path to avoid some obscure races.davidxu2008-04-011-2/+3
|
* return EAGAIN early rather than running bunch of code later, micro optimizedavidxu2008-04-011-1/+3
| | | | static branch prediction.
* Remove a (bogus) remnant of debugging this on sparc64.das2008-03-311-1/+1
|
* Add the libc glue and headers definitions for the *at() syscalls.kib2008-03-311-0/+18
| | | | | | | Based on the submission by rdivacky, sponsored by Google Summer of Code 2007 Reviewed by: rwatson, rdivacky Tested by: pho
* Include an extra byte for the trailing NUL. <sigh>kientzle2008-03-311-1/+1
| | | | Pointy hat: Me
* Rewrite rwlock to user atomic operations to change rwlock state, thisdavidxu2008-03-313-141/+281
| | | | | | | eliminates internal mutex lock contention when most rwlock operations are read. Orignal patch provided by: jeff
* Add assembly versions of remquol() and remainderl().das2008-03-306-4/+228
|
* Hook remquol() and remainderl() up to the build.das2008-03-304-12/+33
|
* Implement remainderl() as a wrapper around remquol(). The extra workdas2008-03-302-0/+44
| | | | remquol() performs to compute the quotient is negligible.
* Implement remquol() based on remquo().das2008-03-302-0/+183
|
* Implement csqrtl().das2008-03-305-13/+135
|
* Hook hypotl() and cabsl() up to the build.das2008-03-303-6/+7
|
* Document hypotl().das2008-03-301-12/+17
| | | | Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu>
OpenPOWER on IntegriCloud