summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2012-07-07rename function to avoid symbol clashEric Faurot
2012-07-07remove bogus include of bsd.lib.mkEric Faurot
2012-07-07unbreak, pointed out by theoJasper Lievisse Adriaanse
2012-07-07actually, make this identical to what upstream expat ships nowadays by addingJasper Lievisse Adriaanse
a URL field and removing the empty Requires.
2012-07-07add expat.pcJasper Lievisse Adriaanse
based on a diff by brad ok sthen@
2012-07-03adapt the NetBSD code to make sigpending work on shJonathan Gray
ok miod@ kettenis@
2012-07-01The kernel returns the pending set; this stub has to save it throughPhilip Guenthe
the pointer ok miod@ kettenis@
2012-07-01make this actually workMark Kettenis
ok miod@
2012-06-28librthread has eaten libpthread, so build includes via the former insteadPhilip Guenthe
of the latter. Permits the misleading lib/libpthread/Makefile to be removed discussed with deraadt@
2012-06-26after a talk with ariane, use MAP_FIXED for mquery to avoid the cost ofTed Unangst
scanning for free space if the hint isn't available. also, on further inspection, this will prevent pmap_prefer from "improving" our hint.
2012-06-26simplify a little of the posix standards talk. ok deraadt guenther jmcTed Unangst
2012-06-26Use nl_langinfo(RADIXCHAR) instead of localeconv()->decimal_point inMatthew Dempsky
printf() and avoid calling it unless needed (i.e., when we have a floating point value to print). This isn't a big concern currently due to our limited locale support and current localeconv() implementation, but it's still technically a data race and implementing POSIX 2008 per-thread locales is likely to make it worse. nl_langinfo() isn't guaranteed by POSIX to be thread-safe either, but at least our current implementation is thread-safe and it's a simpler interface to keep that way. Printing floating point values isn't async-signal-safe anyway due to gdtoa()'s use of malloc(), so that's not an issue. ok deraadt, stsp, millert
2012-06-25Do not use <machine/float.h>, that is an deformed BSD-ism.Theo de Raadt
It turns out <float.h> is the right file to pull in. ok millert
2012-06-24In sysconf(), don't bother querying the kernel for userspace-onlyMatthew Dempsky
values or features that POSIX now requires to always be provided. From Brad; ok guenther and me; incorporates feedback from millert too
2012-06-24Change arc4random_uniform() to calculate ``2**32 % upper_bound'' asMatthew Dempsky
``-upper_bound % upper_bound''. Simplifies the code and makes it the same on both ILP32 and LP64 architectures, and also slightly faster on LP64 architectures by using a 32-bit remainder instead of a 64-bit remainder. Pointed out by Jorden Verwer on tech@ ok deraadt; no objections from djm or otto
2012-06-24- document newly imported AF_INET6 support to net_inet_{pton,ntop}Gilles Chehade
diff from Florian Obser, ok jmc@
2012-06-22add support for AF_INET6 to inet_net_pton() and inet_net_ntop()Gilles Chehade
using inet_pton() and inet_ntop() as suggested by claudio ok claudio@
2012-06-22synch build after importMarc Espie
2012-06-22import 3.7.13Marc Espie
okay jasper@
2012-06-22two changes which should improve realloc. first, fix zapcacheregion toTed Unangst
clear out the entire requested area, not just a perfect fit. second, use mquery to check for room to avoid getting an address we don't like and having to send it back.
2012-06-21A piece of this is still neededTheo de Raadt
2012-06-21Update to reflect API changesPhilip Guenthe
2012-06-21For now... libpthread is just a container directory, since all the newTheo de Raadt
goop is in librthread. As a result, the top-level Makefile and shlib_version here are simply very confusing and tell lies. Remove them, and update the instructions in libc to not make my mistake again. ok guenther
2012-06-21__tfork() needs to set the stack address of the new thread in the kernel,Philip Guenthe
so that it can't get a signal while still running on the parent thread's stack. Also, pass in sizeof(struct __tfork) to provide forward compat when more members are added. This is an ABI change, so switch syscall numbers and bump lib majors this time. ok deraadt@ matthew@
2012-06-20two small fixes to free page cache. first, we need two nibbles of randomTed Unangst
in order to span the the entire cache. second, on free use the same offset to put things in the cache instead of always starting at zero. ok otto
2012-06-19oops, forgot to install getdtablecount(2); noted by teduTheo de Raadt
2012-06-18Support larger-than-page-alignment requests in posix_memalign() byMatthew Dempsky
overallocating and then releasing unneeded memory pages. ok otto
2012-06-15update return values for ibuf_write and msgbuf_writeJonathan Matthew
ok gilles@
2012-06-15Fix typos.Matthew Dempsky
ok pig(6)
2012-06-07Document mbsnrtowcs() and wcsnrtombs().Matthew Dempsky
ok jmc
2012-06-06Add support for mbsnrtowcs() and wcsnrtombs() to libc.Matthew Dempsky
Bulk build test by naddy.
2012-06-04stop editing header by hand, expose script I'm going to use for next versionsMarc Espie
2012-06-04fix autodetection, somehow I managed to lose that commit earlier ?Marc Espie
(brad reminded me we have strerror_r too).
2012-06-04finish synching libraryMarc Espie
2012-06-04minor update to 3.7.12.1Marc Espie
2012-06-04crank minor, since a symbol was addedTheo de Raadt
2012-06-02in imsg_read() avoid calling recvmsg() if we detect that we will be shortGilles Chehade
on descriptors, this can be achieved thanks to the new getdtablecount() system call. application may provide a reserve count to ensure that the recvmsg() call is not called when they don't have enough descriptors to work properly. change the API so that transient errors that can be retried immediately are retried within the function right away, whereas transient errors for which the application may want to take action will set errno to EAGAIN. ok deraadt@ and henning@
2012-06-02Committed the wrong version (an earlier try) of the KERN_FILE2 vsPhilip Guenthe
rthreads fix. Update to the correct one.
2012-06-02Update STANDARDS section for a few <stdlib.h> functionsPhilip Guenthe
Update SYNOPSIS for setkey() to show it's in <stdlib.h> ok jmc@, millert@
2012-06-01Fix document titles.Lawrence Teo
ok haesbaert jmc henning
2012-06-01Improve standards conformance: ecvt(), fcvt(), gcvt(), mktemp(), ttyslot(),Philip Guenthe
and valloc() are not in the current version, while posix_memalign() mkstemp(), and mkdtemp() are, and setstate()'s argument has lost a bogus 'const'. ok millert@ jmc@ espie@ kettenis@; ports build testing by naddy@
2012-05-25tweak previous; ok sthen lteoJason McIntyre
2012-05-25Import a number of core functions from libpcap-1.2.0 while preservingLawrence Teo
local changes: strncpy() -> strlcpy(), malloc(x * y) -> calloc(x, y), exclude cross-platform cruft, etc. The new functions are pcap_create(), pcap_set_snaplen(), pcap_set_promisc(), pcap_can_set_rfmon(), pcap_set_rfmon(), pcap_set_timeout(), pcap_set_buffer_size(), pcap_activate(), and pcap_statustostr(). This diff was tested on amd64, i386, macppc, and sparc64, where regression tests were done on various pcap-based ports (especially amd64 and i386 where regression tests were run on all pcap-based ports). Testers also tried running pcap-based ports that they are familiar with to ensure that there is no behavioral change. tcpdump and pflogd in base were also tested by different testers. The new pcap_* functions were tested with a proof-of-concept Snort 2.9 port for many months. Thank you to everyone who helped test this diff and provided feedback: haesbaert@, sthen@, matthew@, gonzalo@, brett@, Rodolfo Gouveia, Aaron Bieber, Markus Lude, and Ray Percival. ok haesbaert sthen henning
2012-05-24some symbols actually changed.Marc Espie
visible interface, not "officially" published, but still... technically visible. Better safe than sorry: major bump. as prodded/discussed with deraadt@
2012-05-24fuck, forgot we still have !C99 compilersMarc Espie
reminded by deraadt@
2012-05-23Make the "default" string a valid device name that has the same effectAlexandre Ratchov
as NULL has. This will (hopefully) simplify ports where the user passes the device string.
2012-05-22Don't misleadingly suggest that fpos_t only needs to be a complex typeMatthew Dempsky
on non-UNIX systems: it's a complex type on Linux, and to be C99 compliant we'll probably need it to be a complex type too.
2012-05-22Document that ftell() may return EOVERFLOW.Matthew Dempsky
Diff from Tim van der Molen.
2012-05-22those no longer belong, they've been move to the test/ directory upstreamMarc Espie
2012-05-22lemon bug: checking lines is not enough, we have to be sure we're at theMarc Espie
end of file to make sure the include file hasn't been altered. problem reported by landry@, deraadt@