summaryrefslogtreecommitdiffstats
path: root/lib (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Enable wide character support in ncurses. It is built into libcurses,nicm2010-09-0642-26/+3700
| | | | | | | | | | | | libform, libmenu, libpanel and each library is also linked to a corresponding "w" version. This is a major bump for all four libraries. Thanks to landry, stsp, sthen, naddy, oga, Martin Pieuchot, and anyone else I've forgotten for testing. ok naddy krw deraadt
* Oracle has re-licensed sunrpc under a three-clause BSD license.millert2010-09-0158-1613/+1653
| | | | Update our sources appropriately. OK deraadt@ jsg@
* Fix from upstream to make all backends reinit on event_reinit(). Thisnicm2010-08-301-2/+7
| | | | | | | | | | was not being done for poll and select, so after fork they would remain using the same socketpair for signal notification, leading to a race between the two processes to read from it and hangs. Problem originally reported by kili@. ok gilles
* backout VIS_HEX. guenther@ points out that the C89 \xff encodingdjm2010-08-243-73/+10
| | | | | | | | | idiotically accepts more then two hex digits following the \x, even on platforms where a char has 8 bits. It is therefore dangerous to have an almost-bit-not-quite compatible format in vis(3). The VIS_ALL (encode all characters) option introduced in the same commit remains.
* update to tzcode2010k from elsie.nci.nih.gov; OK miod@millert2010-08-2316-105/+233
|
* Check for duplicate variables in the environment when setting a valuemillert2010-08-232-11/+24
| | | | via setenv() or putenv(). OK miod@
* Two new flags: VIS_ALL - encode all characters, not just invisible onesdjm2010-08-213-12/+77
| | | | | | | | and VIS_HEX - use C89 \xff style hexadecimal encoding. Teach unvis(3) how to deal with the hex encoding. feedback and ok millert@ chl@
* polish the code: remove few unused #includes, add missing ones,ratchov2010-08-201-2/+5
| | | | fix NULL vs 0, etc. No behaviour change.
* Introduce an MI kern.consdev sysctl that will replace the MDkettenis2010-08-191-2/+5
| | | | | | machdep.console_device that's only implemented on a few architectures. ok deraadt@, miod@
* If audio interrupts are missed (as this happens on some MP systemsratchov2010-08-061-18/+22
| | | | | | | | | | | | | | | now), play and record directons may be out of sync, and since the play direction is used as clock source, we may end up with data ariving _before_ the time it was recorded. This breaks the sndio ``device model'' and most full-duplex apps relying on it, starting with aucat in its default mode. Workaround this by using the direction that's ahead as clock source, ensuring that recorded data never arrives before the clock tick it was recorded. This prevents apps from crashing but won't fix stuttering caused by missed interrupts. ok deraadt@
* The UTF-8 decoder should not accept byte sequences which decode to unicodestsp2010-08-051-1/+9
| | | | | | | | | code positions U+D800 to U+DFFF (UTF-16 surrogates), U+FFFE, and U+FFFF. http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 http://unicode.org/faq/utf_bom.html#utf8-4 ok phessler, millert, miod, deraadt
* Regenerate files that were affected by changes to asn1_compile that wereguenther2010-08-0517-39/+33
| | | | | | made years ago. ok deraadt@
* When the target pointer 'pwcs' passed to mbsrtowcs() is NULL, mbsrtowcs()stsp2010-08-031-15/+9
| | | | | | | | | | | | | | | | | | | | | is supposed to ignore the 'n' parameter and return the number of wide characters needed to represent the given multi-byte character sequence. However, in the special case where 'pwcs' is NULL and 'n' is zero, our mbsrtowcs() implementation for single-byte locales mistakenly returned zero. Before the UTF-8 locale was added, this bug was invisible to callers of mbstowcs() because mbstowcs() handled this special case itself. But our new mbstowcs() implementation simply forwards to the locale-specific mbsrtowcs() implementation and expects it to do the right thing. The "awesome" window manager's "Run:" command prompt uses mbstowcs() to measure how many (possibly multi-byte) characters a user has typed, and due to this bug would always be tricked into thinking the user had entered zero characters when a single-byte locale was used. Found after prodding by dcoppa. ok deraadt sthen espie
* add missing header needed by strcmp()chl2010-08-012-2/+6
| | | | | | add missing prototype ok stsp@
* Remove stray newline, fix $OpenBSD$; ok deraadtstsp2010-07-292-3/+2
|
* Sync hcreate(3) with NetBSD, adding some caveats.ray2010-07-281-12/+67
| | | | OK jmc
* Remove a stray space. No binary change.marco2010-07-271-2/+2
|
* Replace the single-byte placeholders for the multi-byte/wide-characterstsp2010-07-2724-155/+1259
| | | | | | | | | | | | | | | | | | | | | | | | | | | conversion interfaces of libc (mbrtowc(3) and friends) with new implementations that internally call an API based on NetBSD's citrus. This allows us to support locales with multi-byte character encodings. Provide two implementations of the citrus-based API: one based on the old single-byte placeholders for use with our existing single-byte character locales (C, ISO8859-*, KOI8, CP1251, etc.), and one that provides support for UTF-8 encoded characters (code based on FreeBSD's implementation). Install the en_US.UTF-8 ctype locale support file, and allow the UTF-8 ctype locale to be enabled via setlocale(3) (export LC_CTYPE='en_US.UTF-8'). A lot of programs, especially from ports, will now start using UTF-8 if the UTF-8 locale is enabled. Use at your own risk, and please report any breakage. Note that ncurses-based programs cannot display UTF-8 right now, this is being worked on. To prevent install media growth, add vfprintf(3) and mbrtowc(3) to libstubs. The mbrtowc stub was copied unchanged from its old single-byte placeholder. vfprintf.c doesn't need to be copied, just put in .PATH (hint by fgsch@). Testing by myself, naddy, sthen, nicm, espie, armani, Dmitrij D. Czarkoff. ok matthieu espie millert sthen nicm deraadt
* fix some spacing issues; noted by kristapsjmc2010-07-271-7/+6
|
* Properly handle the size field in pflog link headercanacar2010-07-271-45/+236
| | | | | | | | | when generating the filter. This will allow the pflog header to be extended without adding a new link type. No change to generated code for other link types. ok henning@
* Correct the links between threads, processes, pgrps, and sessions,guenther2010-07-262-20/+34
| | | | | | | | | so that the process-level stuff is to/from struct process and not struct proc. This fixes a bunch of problem cases in rthreads. Based on earlier work by blambert and myself, but mostly written at c2k10. Tested by many: deraadt, sthen, krw, ray, and in snapshots
* Add a newline to the input we feed to cpp to get rid of its 'no newlineguenther2010-07-241-3/+3
| | | | | | | at end of file' warnings. Simplify the shell quoting to make it easier to read while we're at it "looks allright" beck@
* 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@
* remove unnecessary ``return 0'' statements,ratchov2010-07-213-6/+3
| | | | from Remco <remco at d-compu.dyndns.org>, thanks!
* Add barebones manual pages for cimag(3), conj(3) and cproj(3)millert2010-07-194-2/+168
| | | | OK kettenis@ jmc@
* Fix the cproj family to not return garbage on finite arguments.guenther2010-07-194-4/+12
| | | | ok millert@
* Use crealf() and cimagf() instead of creal() and cimag() when theguenther2010-07-1811-34/+34
| | | | | | argument is a float. Eliminate a cast rendered superfluous as a result. ok kettenis@, millert@
* Move some macros in <msdosfs/denode.h> to outside the #ifdef _KERNELguenther2010-07-171-3/+1
| | | | | | so that libkvm doesn't need to define that, thereby avoiding some warnings. ok miod@
* Correct the #includes to avoid warnings in <rpc/svc.h>guenther2010-07-171-2/+3
| | | | ok miod@
* add missing header needed by event_warn()chl2010-07-171-1/+2
| | | | ok nicm@
* More delimiters that need quoting inside macros, hunted down by jmc@,schwarze2010-07-152-10/+10
| | | | who asked me to commit because he is just running out of the door.
* add two new members to structs audio_encoding and audio_prinfo.jakemsr2010-07-151-7/+7
| | | | | | | | | | for both structs, the new members are 'bps' and 'msb', which describe the number of bytes per sample and data alignment in the sample, respectively. drivers must properly set these fields in the 'query_encoding', 'set_parameters' and 'get_default_params' hardware interface methods. discussed with ratchov, deraadt
* update our recommended hash function to sha256 and note md5 is broken.tedu2010-07-131-9/+4
| | | | ok deraadt jmc millert sobrado
* no more rmd160(1);jmc2010-07-131-3/+2
|
* Fix PR 6417: if we're starting a thread and there's no other threadsguenther2010-07-131-2/+3
| | | | | | | running, then we need to start a gc thread...except when this is the very call to start a gc thread! "This works for me" marc@
* Fix PR 6376: restore more thread library state if execve fails,guenther2010-07-133-46/+55
| | | | | | | including the scheduling timer, sigmask, fd nonblocking status, and handling of the signals used by the thread library. ok marc@, additional testing by ajacoutot@
* Update to 1.4.14b.nicm2010-07-126-23/+67
| | | | | | | | | | | | | | From their change log: o Fix memory-leak of signal handler array with kqueue. [backport] o Make evutil_make_socket_nonblocking() leave any other flags alone. o Adjusted fcntl() retval comparison on evutil_make_socket_nonblocking(). o Re-add event_siglcb; some old code _was_ still using it. :( o Fix a free(NULL) in min_heap.h o Clean up properly when adding a signal handler fails. Also a local change to use an int rather than a long for fcntl(). ok guenther deraadt
* After forking, clear the 'thread joining this one' pointer in the child,guenther2010-07-121-1/+4
| | | | | | as the child only has the one thread remaining. ok marc@
* Switch hppa, i386 and powerpc to gcc4. Bump libc major to handle ABI cornerkettenis2010-07-081-1/+1
| | | | cases fixed in gcc4.
* Document new unsetenv() error returns.naddy2010-07-061-2/+8
| | | | From Nicolas Legrand <nlegrand@ethelred.fr>; ok jmc@
* Handle all streams the same way because there's no actualratchov2010-07-061-4/+18
| | | | | | | | | | | | difference between audio files and client connections. Clean up the way command line options are handled and clarify this in the manual page: stream parameters (-Ccehjmrtvx) must precede stream definitions (-ios) and per-device parameters (-abz) and stream definitions (-ios) must precede device definitions (-f). Since there's no ``server'' and ``non-server'' modes anymore, make the -l option just detach the process. ok and help from jakemsr and jmc
* Fix the naming of interfaces and variables for rdomains and rtablesguenther2010-07-033-20/+21
| | | | | | | | | | | | and make it possible to bind sockets (including listening sockets!) to rtables and not just rdomains. This changes the name of the system calls, socket option, and ioctl. After building with this you should remove the files /usr/share/man/cat2/[gs]etrdomain.0. Since this removes the existing [gs]etrdomain() system calls, the libc major is bumped. Written by claudio@, criticized^Wcritiqued by me
* Constipate init_hash() to eliminate a warning and remove a cast that isguenther2010-07-021-4/+4
| | | | | thereby rendered superfluous ok blambert@
* sort SEE ALSO;jmc2010-07-012-6/+6
|
* getpeereid() can now be a library routine using getsockopt() withderaadt2010-07-016-22/+52
| | | | | | | 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
* oops. Missed this from my aes-ni commit.thib2010-07-011-3/+4
|
* AES-NI engine support for OpenSSL.thib2010-07-0120-6/+3322
| | | | | | | | | | This is code mostly picked up from upstream OpenSSL, or to be more exact a diff from David Woodhouse <dwmw2 at infradead dot org>. Remember to make includes before doing a build! no objections from djm@ OK deraadt@, reyk@ (AES is about 4.25x faster on his x201 now)
* zap trailing whitespace;jmc2010-07-011-3/+3
|
* libkeynote development has been paused for a while. ok deraadttedu2010-07-011-10/+0
|
* Add getsockopt SOL_SOCKET SO_PEERCRED support. This behaves similar toderaadt2010-06-301-7/+16
| | | | | | | getpeereid(2), but also supplies the remote pid. This is supplied in a 'struct sockpeercred' (unlike Linux -- they showed how little they know about real unix by calling theirs 'struct ucred'). ok guenther ajacoutot