summaryrefslogtreecommitdiffstats
path: root/lib (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix the handle locking in stdio to use flockfile/funlockfileguenther2009-10-2147-139/+283
| | | | | | | | | | | | internally when and where required. Macros in <stdio.h> are updated to automatically call the underlying functions when the process is threaded to obtain the necessary locking. A private mutex is added to protect __sglue, the internal list of FILE handles, and another to protect the one-time initialization. Some routines in libc that use getc() change to use getc_unlocked() as they're either protected by their own lock or aren't thread-safe routines anyway. ok kurt@, earlier version tested by sthen@ and jj@
* After forking, the child is single threaded, so tell libc that. Thisguenther2009-10-212-2/+8
| | | | | | is needed to avoid deadlocks in popen() on FILE locking. ok kurt@
* Check mmap return value against MAP_FAILED not NULL.pirofti2009-10-201-2/+2
| | | | Okay deraadt@, otto@.
* terminfo supports the use= capability (tc= in termcap), to allow onenicm2009-10-181-18/+73
| | | | | | | | | | | | | | | | | | | | description to reference another. If this is used, any capabilities in the parent terminal description should override those pulled in by use=. When cap_mkdb is building terminfo.db, it concatenates any use= references together so each description is self-contained. However, the ncurses terminfo implementation doesn't expect this - it assumes it will have to resolve use= itself, and picks the last entry in the description created by cap_mkdb rather than the first. read_bsd_terminfo.c already makes some transformations to make ncurses happy with the format in the database. So, extend this to trim out duplicate entries, leaving only the first. (Interestingly, ncurses already has code to correctly handle merged tc= capabilities in termcap.db (used if terminfo.db is missing).) "go ahead" deraadt@
* Add version number to aucat protocol. It's not used yet,ratchov2009-10-171-1/+2
| | | | | | | but later, it will permit aucat to reject connections from clients statically linked to a unsupported version of libsndio. idea from kittenis, otto and sthen
* teach gdtoa & its subroutines that malloc can fail; in which casemartynas2009-10-1646-2989/+408
| | | | | | ecvt, fcvt, gcvt, *printf, strtof, strtod, strtold act per ieee 1003.1. after these massive changes, remove unused files which would not work now. reported by Maksymilian Arciemowicz; ok theo
* In evbuffer_readline, do not lose data upon malloc failure. From mainstream:jacekm2009-10-131-2/+1
| | | | | http://levent.svn.sourceforge.net/viewvc/levent?view=rev&revision=1436 ok gilles@
* another cert that makes godaddy.com and launchpad.net (among others) happy.fgsch2009-10-121-0/+51
| | | | | found by Guillaume Protet (guillaume dot protet at mortheres dot info) while testing bzr update. deraadt@ ok
* rewrite the history section, prompted by Paul Stoeber; ok deraadt@ jmc@otto2009-10-101-25/+28
|
* when setting parameters of sun devices, check that selected encodingratchov2009-10-101-4/+23
| | | | is actually linear
* at initialization of sun devices, use sio_setpar(3) instead ofratchov2009-10-101-11/+10
| | | | | AUDIO_SETINFO() to set the initial parameters, since AUDIO_SETINFO() can fail.
* since AUDIO_INITINFO() may set parameters to whatever is supportedratchov2009-10-101-24/+59
| | | | | | | | by the device, we may end up with different recording and playback parameters, which will break almost all full duplex apps on such devices. For instance, this should fix full-duplex apps not working on devices that can record at any sample rate but can play at 48kHz only.
* Add (again) support for divert sockets. They allow you to:michele2009-10-041-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | - queue packets from pf(4) to a userspace application - reinject packets from the application into the kernel stack. The divert socket can be bound to a special "divert port" and will receive every packet diverted to that port by pf(4). The pf syntax is pretty simple, e.g.: pass on em0 inet proto tcp from any to any port 80 divert-packet port 1 A lot of discussion have happened since my last commit that resulted in many changes and improvements. I would *really* like to thank everyone who took part in the discussion especially canacar@ who spotted out which are the limitations of this approach. OpenBSD divert(4) is meant to be compatible with software running on top of FreeBSD's divert sockets even though they are pretty different and will become even more with time. discusses with many, but mainly reyk@ canacar@ deraadt@ dlg@ claudio@ beck@ tested by reyk@ and myself ok reyk@ claudio@ beck@ manpage help and ok by jmc@
* Do not `return' in void functions.miod2009-10-011-4/+4
| | | | Amazingly, compiler does not complain (lint does).
* remove unsupported LIBRARY section; from Alan R. S. Buenojmc2009-09-291-4/+2
|
* rfork_thread() lacked PIC handling for CERROR, resulting in a text relocationguenther2009-09-271-1/+8
| | | | pointed out by brad, ok djm@
* Minor bump for safety, due to the mips cachectl() addition.miod2009-09-271-1/+1
|
* Add an implementation of IRIX-compatible cacheflush() routine to mips ports,miod2009-09-275-3/+135
| | | | | | | needed for gcc -ftrampoline operation as well as by some third-party software. Although the implementation uses the sysarch() sysctl, the wrapper is added to libc as it was a direct system call (which it is on IRIX).
* Test for MACHINE_ARCH to decide whether to build stuff in libarch/arm, insteadmiod2009-09-241-2/+2
| | | | of an incomplete MACHINE list.
* rfork_thread() lacked PIC handling for CERROR, resulting in a text relocationguenther2009-09-241-1/+6
| | | | ok kettenis@, art@
* Zero out IPv6 mask before using it. This fixes expressions likebluhm2009-09-181-1/+2
| | | | | | 'net 2002::/16', which were previously non-deterministic based on the previous contents of memory. from upstream; ok claudio@
* cvs log message from ed@freebsd, revision 197045:jmc2009-09-101-3/+3
| | | | | | | | | | | Make the description of `b' a little better. If you have a one-byte sequence, `w', `b' is the second character. Not the third. Submitted by: Christoph Mallon checked by otto
* Palm: Integration into the treemarex2009-09-091-2/+2
| | | | OK deraadt@
* maxzis -> maxsize; from Han Boetesjmc2009-09-091-3/+3
|
* I had not enough oks to commit this diff.michele2009-09-081-7/+1
| | | | Sorry.
* Add support for divert sockets. They allow you to:michele2009-09-081-2/+8
| | | | | | | | | | | | | | | | - queue packets from pf(4) to a userspace application - reinject packets from the application into the kernel stack. The divert socket can be bound to a special "divert port" and will receive every packet diverted to that port by pf(4). The pf syntax is pretty simple, e.g.: pass on em0 inet proto tcp from any to any port 80 divert-packet port 8000 test, bugfix and ok by reyk@ manpage help and ok by jmc@ no objections from many others.
* make getaddrinfo(3) accept numeric servname when ai_socktype is notfgsch2009-09-021-4/+2
| | | | | specified in hint or hints is NULL. claudio@ ok
* Change cap_mkdb and curses to be a better about reformatting terminfo entriesnicm2009-08-281-9/+18
| | | | | | | | | | | into the cap database format and back: rather than replacing all colons with commas, only touch real separators (skip those with a leading \ or ^) and replace an unadorned colon with a literal "\072". Fixes problems with quite a few caps including acsc in "screen" (:s instead of ,s) and setab/initc in "xterm-256color" (wrongly concatenated together). ok millert
* don't consider calling sio_close() without calling sio_stop() firstratchov2009-08-282-6/+4
| | | | | as a programming error. At any stage the program should be alble to cleanly free resources and close the device.
* when using aucat backend, wait for the server to drop the connectionratchov2009-08-281-2/+7
| | | | on sio_close()
* add a new AMSG_BYE, sent by the client to requst the server toratchov2009-08-282-2/+12
| | | | | | free resources and drop the connection. This allows the client to ensuire that at any time it's using only one connection, thus only one MIDI control channel.
* Don't stop traversing a directory hierarchy if we reach SHRT_MAX,millert2009-08-272-14/+27
| | | | | | | | just stop updating fts_level so we don't overflow it. This allows rm, find, etc to operate on very deep hierarchies. Consumers of fts(3) do need to be aware that the actual level may be larger than fts_level. During the next libc major bump we will make fts_level an int instead of a short. OK deraadt@
* handle incoming AMSG_SETVOL messages, allows the client to be notifiedratchov2009-08-261-1/+7
| | | | of volume changes
* make aucat(1) expose a MIDI device to control server behaviour inratchov2009-08-214-20/+50
| | | | | | realtime. For now only the playback volume of individual streams can be changed/monitored. To each stream is assigned a MIDI channel; the volume is changed/monitored using the standard controller number 7.
* add SF_ARCHIVED. ok millert@, tedu@martynas2009-08-201-4/+5
|
* We do not do vm86 mode on amd64deraadt2009-08-132-158/+0
| | | | ok kettenis
* various MLINK fixes from Alan R. S. Bueno;jmc2009-08-135-15/+18
|
* function is named int des_string_to_2key, not int des_string_to_2keys;jmc2009-08-131-1/+1
| | | | from Alan R. S. Bueno
* remove expired certificates and add startcom ltd.fgsch2009-08-081-839/+148
| | | | beck@ ok
* define substitution in some cases might happen after prototypes aremartynas2009-08-071-39/+39
| | | | | already pulled; so manually substitute protos ensuring they will always be right; ok millert@
* pull string for memcpy; ok hshoexer@martynas2009-08-072-2/+4
|
* use random; ok millert@martynas2009-08-031-1/+1
|
* remove, or replace Xr of ieee to either ilogb, nextafter or scalbnmartynas2009-08-039-29/+27
| | | | where appropriate. pointed out by jmc@
* Use STD*_FILENO instead of 0-2. OK henning@ djm@ gilles@ dhill@millert2009-08-011-5/+5
|
* honor non-blocking flag in mio_open_rmidi(), fixes programsratchov2009-08-011-3/+4
| | | | | eating 100% CPU while trying to use blocking i/o. ok jakemsr
* now that the pages are split and we track separate HISTORY:martynas2009-07-294-13/+32
| | | | | | | double => 4.3BSD float => NetBSD 1.1 long double => OpenBSD 4.5 scalbln, scalblnf, scalblnl => OpenBSD 4.7
* ieee, and ieeef aren't real, and the amount of functions it documentsmartynas2009-07-295-90/+240
| | | | | is getting ridiculous. split them into groups of copysign, ilogb, nextafter, scalbn. discussed long ago with millert@
* ieee_test isn't real; rename header to logb, toomartynas2009-07-291-3/+3
|
* document scalbln, scalblnf, scalblnlmartynas2009-07-282-8/+30
|
* this is happier if it pulls in a few more includesderaadt2009-07-281-1/+4
|