summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Return -1 instead of 0 upon reaching EOF. This is somewhat ill-adviseddas2009-04-062-4/+6
| | | | | | | | because it means getdelim() returns -1 for both error and EOF, and never returns 0. However, this is what the original GNU implementation does, and POSIX inherited the bug. Reported by: marcus@
* Allow the NULL, RTLD_SELF and RTLD_NEXT handles to work with dlfunc(3).kib2009-04-033-31/+9
| | | | | | | | | | | | | | | | dlfunc() called dlsym() to do the work, and dlsym() determines the dso that originating the call by the return address. Due to this, dlfunc() operated as if the caller is always the libc. To fix this, move the dlfunc() to rtld, where it can call the internal implementation of dlsym, and still correctly fetch return address. Provide usual weak stub for the symbol from libc for static binaries. dlfunc is put to FBSD_1.0 symver namespace in the ld.so export to override dlfunc@FBSD_1.0 weak symbol, exported by libc. Reported, analyzed and tested by: Tijl Coosemans <tijl ulyssis org> PR: standards/133339 Reviewed by: kan
* Properly handle malloc() failures.delphij2009-04-021-5/+7
| | | | PR: bin/83338
* Remove a warning which is supposed to have been removed on 20030301.delphij2009-04-021-12/+0
|
* Properly update the shm_open/shm_unlink symbol versioning metadata afterjhb2009-04-022-2/+6
| | | | | | | these functions were moved into the kernel: - Move the version entries from gen/ to sys/. Since the ABI of the actual routines did not change, I'm still exporting them as FBSD 1.0 on purpose. - Add FBSD-private versions for the _ and __sys_ variants.
* Unconditionally build wrappers for i386_get_ioperm(), i386_set_ioperm(),kib2009-04-011-4/+3
| | | | | | | i386_get_ldt() and i386_set_ldt(). In collaboration with: pho Reviewed by: jhb
* Document RTLD_NODELETE, -z nodelete and -z origin support.kib2009-04-011-2/+9
|
* Query DNS only once per an address family.ume2009-03-291-86/+170
| | | | | Obtained from: KAME MFC after: 2 weeks
* Add some casts to silence compiler warning about signedness.delphij2009-03-282-3/+3
|
* Minor changes from Berkeley DB 1.86 and further improvements from OpenBSD.delphij2009-03-2810-115/+214
| | | | | | | | | | This does not include the new hash routines since they will cause problems when reading old hash files. Since mpool(3) has been changed, provide a compatibility shim for older binaries. Obtained from: OpenBSD
* Allow O_SYNC and O_NOFOLLOW flags in dbopen().delphij2009-03-281-2/+2
| | | | Obtained from: OpenBSD
* Plug memory leaks and a potential NULL dereference.delphij2009-03-281-4/+12
| | | | Obtained from: OpenBSD
* Simplify the logic when determining whether to zero out a db file to afterdelphij2009-03-281-15/+5
| | | | | | | | open(). The previous logic only initializes the database when O_CREAT is set, but as long as we can open and write the database, and the database is empty, we should initialize it anyway. Obtained from: OpenBSD
* - If (keysize+datasize)%(bsize=14)==0, insertion of a `big key' would causedelphij2009-03-281-6/+18
| | | | | | | | | | | | | | | an invariant (actually, an ugly hack) to fail, and all Hell would break loose. When deleting a big key, the offset of an empty page should be bsize, not bsize-1; otherwise an insertion into the empty page will cause the new key to be elongated by 1 byte. Make the packing more dense in a couple of cases. - fix NULL dereference exposed on big bsize values; Obtained from: NetBSD via OpenBSD
* Avoid NULL deference which causes DEBUG1 to crash, not to print usefuldelphij2009-03-281-1/+1
| | | | | | information. Obtained from: OpenBSD
* - Avoid overwriting the cursor page when the cursor page becomes thedelphij2009-03-281-1/+21
| | | | | | | LRU page. - Fix for sequential retrieval failure when using large key/data pairs. Obtained from: OpenBSD
* Fix a crash when iterating over a hash and removing its elements.delphij2009-03-282-11/+21
| | | | Obtained from: OpenBSD
* Only squeeze a short key/value pair onto a page with other complete key/valuedelphij2009-03-281-3/+9
| | | | | | pairs, not onto a page containing the end of a big pair. Obtained from: NetBSD via OpenBSD
* Diff reduce against OpenBSD, no functional change.delphij2009-03-282-12/+6
|
* Return meaningful errno in overflow case; print error message to stderrdelphij2009-03-281-1/+7
| | | | | | in one more case. Obtained from: NetBSD via OpenBSD
* Use pread(2) and pwrite(2) instead of lseek(2) + read(2) / write(2).delphij2009-03-282-6/+3
| | | | Obtained from: NetBSD via OpenBSD
* db/btree/bt_open.c: check return value of snprintf() and return valuedelphij2009-03-282-6/+21
| | | | | | | | | if the result is truncated. db/hash/hash_page.c: use the same way to create temporary file as bt_open.c; check snprintf() return value. Obtained from: OpenBSD
* Several signed/unsigned warning fixes.delphij2009-03-288-16/+18
|
* When allocating memory, zero out them if we don't intend to overwrite themdelphij2009-03-285-28/+11
| | | | | | | | | | | | all; before freeing memory, zero out them before we release it as free heap. This will eliminate some potential information leak issue. While there, remove the PURIFY option. There is a slight difference between the new behavior and the old -DPURIFY behavior, with the latter initializes memory with 0xff's. The difference between old and new approach does not generate observable difference. Obtained from: OpenBSD (partly).
* Document missing requests.dds2009-03-271-2/+18
|
* Add support for SCTP to getaddrinfo(3).ume2009-03-251-7/+20
| | | | | | | | | | | | | Now, getaddrinfo(3) returns two SOCK_STREAMs, IPPROTO_TCP and IPPROTO_SCTP. It confuses some programs. If getaddrinfo(3) returns IPPROTO_SCTP when SOCK_STREAM is specified by hints.ai_socktype, at least Apache doesn't work. So, I made getaddrinfo(3) to return IPPROTO_SCTP with SOCK_STREAM only when IPPROTO_SCTP is specified explicitly by hints.ai_protocol. PR: bin/128167 Submitted by: Bruce Cran <bruce__at__cran.org.uk> (partly) MFC after: 2 week
* Improve the German translation.netchild2009-03-251-6/+6
| | | | | | Some parts (ERANGE, ETXTBSY) triggered by Christoph Mallon. Discussed with: brueffer, gabor (previous version)
* - Add Belarusian cataloggabor2009-03-242-0/+250
| | | | | PR: conf/133004 Submitted by: Tatsiana Elavaya <t.elavaya@gmail.com>
* getaddrinfo(3) should accept numeric when ai_socktype is notume2009-03-241-1/+11
| | | | | | | | specified in hint or hints is NULL. PR: bin/51827 Submitted by: Mark Andrews <marka__at__isc.org> MFC after: 1 week
* Save errno before calling _close(), which may clear it.delphij2009-03-231-2/+4
| | | | Obtained from: OpenBSD
* use more proper format string.delphij2009-03-232-11/+11
| | | | Obtained from: NetBSD via OpenBSD
* 7.2 will be the first release where strndup() appears.kib2009-03-221-1/+1
| | | | | Submitted by: Florian Smeets <flo kasimir com> MFC after: 3 days
* o Spell.maxim2009-03-211-4/+4
|
* - Add Ukranian cataloggabor2009-03-202-0/+250
| | | | Submitted by: Alex Kozlov <spam@rm-rf.kiev.ua> (via private mail)
* - Fix typogabor2009-03-181-1/+1
| | | | | | PR: kern/132773 Reported by: Alan R. S. Bueno <alan.bsd@gmail.com> Submitted by: Murilo Opsfelder <mopsfelder@gmail.com>
* - Add Brazilian Portuguese catalog [1]gabor2009-03-163-41/+273
| | | | | | | | - Fixes for German catalog [2] PR: kern/132694 [1], conf/80504 [2] Submitted by: Murilo Opsfelder <mopsfelder@gmail.com> [1], brueffer [2]
* - Create the buildworld object directories with mtree instead of variousgabor2009-03-151-6/+0
| | | | | | mkdir calls - Remove the ugly workaroung from libc NLS, which was to create some of these directories
* - Fix object directory creation when running threaded buildworldgabor2009-03-131-1/+1
|
* - Reenable Native Language Support in libc. This feature was disabled duegabor2009-03-1315-0/+3270
| | | | | | | | | | | | | | | | | | | | | | | | | to possible breakages in the catalog handling code. Since then, that code has been replaced by the secure code from NetBSD but NLS in libc remained turned off. Tests have shown that the feature is stable and working so we can now turn it on again. - Add several new catalog files: - ca_ES.ISO8859-1 - de_DE.ISO8859-1 - el_GR.ISO8859-7 (by manolis@ and keramida@) - es_ES.ISO8859-1 (kern/123179, by carvay@) - fi_FI.ISO8859-1 - fr_FR.ISO8859-1 (kern/78756, by thierry@) - hu_HU.ISO8859-2 (by gabor@) - it_IT.ISO8859-15 - nl_NL.ISO8859-1 (corrections by rene@) - no_NO.ISO8859-1 - mn_MN.UTF-8 (by ganbold@) - sk_SK.ISO8859-2 - sv_SE.ISO8859-1 (The catalogs without explicit source has been obtained from NetBSD.) Approved by: attilio
* Reflect license change from NetBSD.delphij2009-03-106-48/+6
| | | | Obtained from: NetBSD
* Hopefully, improve the grammar and wording in the changes to shmctl(2)kib2009-03-051-4/+5
| | | | | | | manpage and UPDATING entry 20090302. UPDATING changes suggested by bf2006a yahoo com. man page corrections by bde.
* Our realloc(3) and reallocf(3) can handle NULL, which turns it into adelphij2009-03-054-21/+8
| | | | | | malloc(3) call, so don't test if a pointer is NULL. Obtained from: OpenBSD (in spirit)
* Add wcpcpy(3) and wcpncpy(3).das2009-03-045-3/+108
|
* Add dprintf() and vdprintf() from POSIX.1-2008. Like getline(),das2009-03-046-32/+198
| | | | | | dprintf() is a simple wrapper around another function, so we may as well implement it. But also like getline(), we can't prototype it by default right now because it would break too many ports.
* Fix a file descriptor leak in fts_child().das2009-03-041-1/+3
| | | | Obtained from: NetBSD
* Considerably improve the wording of this man page.bms2009-03-041-20/+77
|
* Update copyright.bms2009-03-041-16/+13
|
* Explicitly specify bit width for on-disk data structure.delphij2009-03-041-17/+17
| | | | Obtained from: OpenBSD
* Sync license changes.delphij2009-03-042-20/+3
| | | | Obtained from: NetBSD
* Style changes (including additional casts to shut up warnings). Thisdelphij2009-03-0415-36/+35
| | | | commit does not affect MD5 of object file.
OpenPOWER on IntegriCloud