summaryrefslogtreecommitdiff
path: root/src/lib/libc (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* fix comment, the bitmap is an array of u_short nowotto2011-05-121-2/+2
|
* Introduce leak detection code for MALLOC_STATSotto2011-05-121-25/+165
|
* Move MALLOC_STATS code to bottom of file, so the real stuff is more at the top.otto2011-05-081-137/+141
|
* Up until now, malloc scanned the bits of the chunk bitmap fromotto2011-05-051-32/+24
| | | | | | | | | | | | | | | | | | position zero, skipping a random number of free slots and then picking the next free one. This slowed things down, especially if the number of full slots increases. This changes the scannning to start at a random position in the bitmap and then taking the first available free slot, wrapping if the end of the bitmap is reached. Of course we'll still scan more if the bitmap becomes more full, but the extra iterations skipping free slots and then some full slots are avoided. The random number is derived from a global, which is incremented by a few random bits every time a chunk is needed (with a small optimization if only one free slot is left). Thanks to the testers!
* Now that we use an array of u_short for the chunk bitmap change a fewotto2011-04-301-5/+5
| | | | 1UL to 1U.
* More efficient scanning for free chunks while not losing any randomization;otto2011-04-301-21/+25
| | | | thanks to all testers.
* Tweak the description of the optional parts around =. Found this in myotto2011-04-271-5/+7
| | | | tree, no idea where it came from; ok millert@ jmc@
* Fix spacing nit.matthew2011-04-191-3/+3
| | | | ok jmc@
* Add AI_FQDN flag to getaddrinfo(3). Prompted by discussions with djm@matthew2011-04-052-22/+46
| | | | | | | | | | about cert checking in OpenSSH. Man page wording tweaks thanks to jmc@. ok henning@, jmc@; positive feedback from djm@, ajacoutat@ Committing now to reuse guenther@'s libc minor bump instead of cranking it again, as suggested by deraadt@.
* Add a wcswidth man page (based on FreeBSD), and fix the implementationstsp2011-04-043-5/+68
| | | | | to return -1 in case of an unprintable character. ok nicm jmc
* tweak for clarity, ok millert@, jmc@espie2011-03-211-4/+4
|
* wrong type for variable; spotted by christian.siebert@cs.tu-chemnitz.dederaadt2011-03-061-3/+3
| | | | ok guenther
* Fix PR 6267: recheck POSIXLY_CORRECT each time getopt_long() starts a newguenther2011-03-053-44/+16
| | | | | | | | argv and don't suppress the handling of leading '-' in optstring when POSIXLY_CORRECT is set. Based on patch from Eric Blake. ok and manpage update from millert@, manpage ok jmc@
* Fix __cxa_finalize() so that calling __cxa_finalize(NULL) properlymatthew2011-03-021-2/+2
| | | | | | invokes handlers registered with __cxa_atexit(). "seems right" deraadt@
* Correctly escape a literal colon in an enclosure;schwarze2011-01-241-3/+3
| | | | the \: roff escape is an optional line break.
* superceded -> superseded;jmc2011-01-141-3/+3
|
* remove comment that hasn't been true for quite a while now;otto2010-12-221-6/+1
| | | | ok deraadt@ djm@
* avoid pointer arithmetic on void *dhill2010-12-161-5/+5
| | | | | | tested for a while by me. ok otto@
* involes -> involves; from Carlos Alberto Pereira Gomesjmc2010-11-301-1/+1
|
* remove skipjack and cast from the libc; ok deraadtmikeb2010-10-283-1053/+2
|
* print the pointer value that caused the error (if available); okotto2010-10-211-47/+54
| | | | deraadt@ nicm@ (on an earlier version)
* Make gcvt() better match printf("%g") behavior, it now passes regress.millert2010-09-251-11/+23
| | | | OK deraadt@
* Add timingsafe_bcmp(3) to libc, mention that it's already in thematthew2010-09-243-5/+62
| | | | | | kernel in kern(9), and remove it from OpenSSH. ok deraadt@, djm@
* Implement if_freenameindex() as a real function as required by posix.claudio2010-09-241-1/+7
| | | | OK deraadt@, millert@
* more wacky macro fixing;jmc2010-09-191-37/+37
|
* observe the following spelling:jmc2010-09-102-9/+9
| | | | | | | | | - wide character (noun) - wide-character (adjective) this is the "fix of least resistance", and appears to be in line with posix style; a tiny fix still needed for curses, but i'll mail that upstream;
* Check for duplicate variables in the environment when setting a valuemillert2010-08-232-11/+24
| | | | via setenv() or putenv(). OK miod@
* Sync hcreate(3) with NetBSD, adding some caveats.ray2010-07-281-12/+67
| | | | OK jmc
* getopt_long.c replaced getopt.c 6+ years ago; we can retireblambert2010-07-221-7/+1
| | | | | | the REPLACE_GETOPT macro, at long last ok millert@
* Document new unsetenv() error returns.naddy2010-07-061-2/+8
| | | | From Nicolas Legrand <nlegrand@ethelred.fr>; ok jmc@
* getpeereid() can now be a library routine using getsockopt() withderaadt2010-07-013-3/+158
| | | | | | | SOL_SOCKET and SO_PEERCRED, only issue being that it cannot return EFAULT for a page fault. The kernel code will soon be put into compat, and then in 10 years or so tedu will delete it. ok guenther millert
* use a union to align the dns answer buffer until gcc4 is fixedderaadt2010-06-291-5/+8
|
* use a union to align the dns answer buffer until gcc4 is fixedderaadt2010-06-291-5/+8
|
* Make unsetenv(NULL) and unsetenv("") give EINVAL, per POSIX. ok deraadt@naddy2010-06-291-1/+5
|
* Avoid using and end pointer since strnlen(string, -1) is legalmillert2010-06-021-4/+3
| | | | | and would otherwise result in overflowing the end pointer and cause strnlen() to return 0. OK sthen@
* oops - forgot to check for trailing whitespace;jmc2010-05-261-2/+2
|
* reword the 'D' dump bit to make it clear that the malloc.out file needsthib2010-05-261-4/+5
| | | | | | | to exist before exit for malloc to dump stats in it. tweaks from jmc@ ok otto@,jmc@
* Add HISTORY section, mostly for strnlen() but include strlen() formillert2010-05-241-2/+11
| | | | completeness (verified).
* remove unused variable.chl2010-05-211-2/+1
| | | | ok millert@ tedu@
* tweak previous;jmc2010-05-193-15/+13
|
* add posix_madvise, posix_memalign, strndup, and strnlen. mostly fromtedu2010-05-189-17/+270
| | | | | brad and millert, with hints from guenther, jmc, and otto I think. ok previous.
* Do not return success when the IPv6 address has a :: and 8 hex sections.claudio2010-05-061-3/+4
| | | | | | ::1:2:3:4:5:6:7:8 for example. PR 6277, fix by Jun KAWAI (kwj at vlax net) OK henning, gilles, jsing (who also reminded me to remove the now wrong comment about superfluous ::)
* - nuke some unneeded Pp; from kristapsjmc2010-04-071-6/+3
| | | | - small tweak while here
* WARNINGS -> CAVEATS, and a little neccessary cleanup;jmc2010-04-012-24/+24
|
* Modify example not to use an assignment in the if statement. We shouldn'tkettenis2010-03-241-3/+4
| | | | | | teach people bad habits! ok krw@, jmc@, dlg@, thib@
* It's unsetenv() that doesn't like `=' in the argument, not putenv().kili2010-03-101-3/+3
| | | | ok millert@
* Use size_t in appropriate places; fixes sorting of big arrays;otto2010-02-081-9/+10
| | | | | after the diff was written, I made it similar to the freebsd fix of the same code; pr6287 ok millert@ guenther@
* use size_t to index arrays; avoids big array bugs; ok millert@ guenther@otto2010-02-081-1/+1
|
* Use MACHINE_CPU instead of MACHINE_ARCH to pick the correct machine dependentmiod2010-02-034-17/+17
| | | | | | | files or directories when applicable. The inspiration and name of MACHINE_CPU come from NetBSD, although the way to provide it to Makefiles is completely different. ok kettenis@
* stucture -> structure;jmc2010-01-251-3/+3
|