summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2010-08-05The UTF-8 decoder should not accept byte sequences which decode to unicodeStefan Sperling
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
2010-08-05Regenerate files that were affected by changes to asn1_compile that werePhilip Guenthe
made years ago. ok deraadt@
2010-08-03When the target pointer 'pwcs' passed to mbsrtowcs() is NULL, mbsrtowcs()Stefan Sperling
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
2010-08-01add missing header needed by strcmp()Charles Longeau
add missing prototype ok stsp@
2010-07-29Remove stray newline, fix $OpenBSD$; ok deraadtStefan Sperling
2010-07-28Sync hcreate(3) with NetBSD, adding some caveats.Ray Lai
OK jmc
2010-07-27Remove a stray space. No binary change.Marco Peereboom
2010-07-27Replace the single-byte placeholders for the multi-byte/wide-characterStefan Sperling
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
2010-07-27fix some spacing issues; noted by kristapsJason McIntyre
2010-07-27Properly handle the size field in pflog link headerCan Erkin Acar
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@
2010-07-26Correct the links between threads, processes, pgrps, and sessions,Philip Guenthe
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
2010-07-24Add a newline to the input we feed to cpp to get rid of its 'no newlinePhilip Guenthe
at end of file' warnings. Simplify the shell quoting to make it easier to read while we're at it "looks allright" beck@
2010-07-22getopt_long.c replaced getopt.c 6+ years ago; we can retireBret Lambert
the REPLACE_GETOPT macro, at long last ok millert@
2010-07-21remove unnecessary ``return 0'' statements,Alexandre Ratchov
from Remco <remco at d-compu.dyndns.org>, thanks!
2010-07-19Add barebones manual pages for cimag(3), conj(3) and cproj(3)Todd C. Miller
OK kettenis@ jmc@
2010-07-19Fix the cproj family to not return garbage on finite arguments.Philip Guenthe
ok millert@
2010-07-18Use crealf() and cimagf() instead of creal() and cimag() when thePhilip Guenthe
argument is a float. Eliminate a cast rendered superfluous as a result. ok kettenis@, millert@
2010-07-17Move some macros in <msdosfs/denode.h> to outside the #ifdef _KERNELPhilip Guenthe
so that libkvm doesn't need to define that, thereby avoiding some warnings. ok miod@
2010-07-17Correct the #includes to avoid warnings in <rpc/svc.h>Philip Guenthe
ok miod@
2010-07-17add missing header needed by event_warn()Charles Longeau
ok nicm@
2010-07-15More delimiters that need quoting inside macros, hunted down by jmc@,Ingo Schwarze
who asked me to commit because he is just running out of the door.
2010-07-15add two new members to structs audio_encoding and audio_prinfo.Jacob Meuser
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
2010-07-13update our recommended hash function to sha256 and note md5 is broken.Ted Unangst
ok deraadt jmc millert sobrado
2010-07-13no more rmd160(1);Jason McIntyre
2010-07-13Fix PR 6417: if we're starting a thread and there's no other threadsPhilip Guenthe
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@
2010-07-13Fix PR 6376: restore more thread library state if execve fails,Philip Guenthe
including the scheduling timer, sigmask, fd nonblocking status, and handling of the signals used by the thread library. ok marc@, additional testing by ajacoutot@
2010-07-12Update to 1.4.14b.Nicholas Marriott
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
2010-07-12After forking, clear the 'thread joining this one' pointer in the child,Philip Guenthe
as the child only has the one thread remaining. ok marc@
2010-07-08Switch hppa, i386 and powerpc to gcc4. Bump libc major to handle ABI cornerMark Kettenis
cases fixed in gcc4.
2010-07-06Document new unsetenv() error returns.Christian Weisgerber
From Nicolas Legrand <nlegrand@ethelred.fr>; ok jmc@
2010-07-06Handle all streams the same way because there's no actualAlexandre Ratchov
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
2010-07-03Fix the naming of interfaces and variables for rdomains and rtablesPhilip Guenthe
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
2010-07-02Constipate init_hash() to eliminate a warning and remove a cast that isPhilip Guenthe
thereby rendered superfluous ok blambert@
2010-07-01sort SEE ALSO;Jason McIntyre
2010-07-01getpeereid() can now be a library routine using getsockopt() withTheo de Raadt
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
2010-07-01oops. Missed this from my aes-ni commit.Thordur I. Bjornsson
2010-07-01import OpenSSL-1.0.1cThordur I. Bjornsson
2010-07-01AES-NI engine support for OpenSSL.Thordur I. Bjornsson
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)
2010-07-01zap trailing whitespace;Jason McIntyre
2010-07-01libkeynote development has been paused for a while. ok deraadtTed Unangst
2010-06-30Add getsockopt SOL_SOCKET SO_PEERCRED support. This behaves similar toTheo de Raadt
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
2010-06-30Use __attribute__ ((aligned (16)), to make sure the FPU state is alignedMark Kettenis
on a 128-bit boundary like we do on amd64. The padding within the struct made sure the state was properly aligned *within* the struct, but since the alignment restriction on the struct itself was only 64-bit, the required alignment was not guaranteed. We just got lucky. ok oga@, guenther@
2010-06-30there's no tcsh page in base, so don;t bother xr'ing it;Jason McIntyre
2010-06-30tweak previous;Jason McIntyre
2010-06-30Update libedit to bring it into sync with the latest version from NetBSD.Nicholas Marriott
ok deraadt
2010-06-29use a union to align the dns answer buffer until gcc4 is fixedTheo de Raadt
2010-06-29RTHREADS option is gone, now it's a sysctl. spotted by jmcTed Unangst
2010-06-29briefly document kern.rthreadsTed Unangst
2010-06-29Fail instead of lying if a process asks sysctl()'s KERN_PROC2 orPhilip Guenthe
KERN_FILE2 (or their libkvm wrappers) for more information than the running implementation knows how to provide. ok millert@ deraadt@
2010-06-29use a union to align the dns answer buffer until gcc4 is fixedTheo de Raadt