summaryrefslogtreecommitdiff
path: root/lib/libc
AgeCommit message (Collapse)Author
2010-09-07do not use .B, which is man(7), not mdoc(7); and stop .Tn abuseIngo Schwarze
feedback and ok jmc@, ok millert@
2010-09-07- O_NOFOLLOW is no longer non-posix; from thomas klausnerJason McIntyre
- bump posix revision and remove xpg; from millert ok millert
2010-09-01Oracle has re-licensed sunrpc under a three-clause BSD license.Todd C. Miller
Update our sources appropriately. OK deraadt@ jsg@
2010-08-24backout VIS_HEX. guenther@ points out that the C89 \xff encodingDamien Miller
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.
2010-08-23update to tzcode2010k from elsie.nci.nih.gov; OK miod@Todd C. Miller
2010-08-23Check for duplicate variables in the environment when setting a valueTodd C. Miller
via setenv() or putenv(). OK miod@
2010-08-21Two new flags: VIS_ALL - encode all characters, not just invisible onesDamien Miller
and VIS_HEX - use C89 \xff style hexadecimal encoding. Teach unvis(3) how to deal with the hex encoding. feedback and ok millert@ chl@
2010-08-19Introduce an MI kern.consdev sysctl that will replace the MDMark Kettenis
machdep.console_device that's only implemented on a few architectures. ok deraadt@, miod@
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-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-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-17Correct the #includes to avoid warnings in <rpc/svc.h>Philip Guenthe
ok miod@
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-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-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-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-01zap trailing whitespace;Jason McIntyre
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-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-29use a union to align the dns answer buffer until gcc4 is fixedTheo de Raadt
2010-06-29Make unsetenv(NULL) and unsetenv("") give EINVAL, per POSIX. ok deraadt@Christian Weisgerber
2010-06-02Avoid using and end pointer since strnlen(string, -1) is legalTodd C. Miller
and would otherwise result in overflowing the end pointer and cause strnlen() to return 0. OK sthen@
2010-05-26Switch amd64 and sparc64 over to gcc4; bump libc major to deal with the ABIMark Kettenis
corner cases that were fixed in gcc4, and changes in libgcc that we may have missed. ok kettenis@
2010-05-26oops - forgot to check for trailing whitespace;Jason McIntyre
2010-05-26reword the 'D' dump bit to make it clear that the malloc.out file needsThordur I. Bjornsson
to exist before exit for malloc to dump stats in it. tweaks from jmc@ ok otto@,jmc@
2010-05-24Add HISTORY section, mostly for strnlen() but include strlen() forTodd C. Miller
completeness (verified).
2010-05-21remove unused variable.Charles Longeau
ok millert@ tedu@
2010-05-19remove unused variableCharles Longeau
ok nicm@
2010-05-19tweak previous;Jason McIntyre
2010-05-18add posix_madvise, posix_memalign, strndup, and strnlen. mostly fromTed Unangst
brad and millert, with hints from guenther, jmc, and otto I think. ok previous.
2010-05-14Defer installing signal handlers until echo is disabled so that weTodd C. Miller
get suspended normally when not the foreground process. Fix potential infinite loop when restoring terminal settings if process is in the background when restore occurs. OK miod@
2010-05-09Mark _MCOUNT_DECL as __used to prevent gcc4 from optimizing it away when itMark Kettenis
is only referenced from inline asm. ok jsg@
2010-05-06Do not return success when the IPv6 address has a :: and 8 hex sections.Claudio Jeker
::1:2:3:4:5:6:7:8 for example. PR 6277, fix by Jun KAWAI (kwj at vlax net) OK henning, gilles, jsing (who also reminded me to remove the now wrong comment about superfluous ::)
2010-04-23Recycle unused disklabel fields in order to create a disklabel uniqueJoel Sing
identifier, allowing the disk to be identified without relying on the device name. ok deraadt@ krw@ beck@ marco@ todd@
2010-04-20Get rid of MAXSENSORDEVICES. Gaps in sensordev lists are now handledTheo de Raadt
by returning ENXIO instead of ENOENT, to essentially indicate hotplug sensor that has gone away. Accessing beyond the end of the sensordev list still returns ENOENT, so that you can see there are no further devices. ok kettenis oga
2010-04-14Mention that kern.somaxconn is the real upper limit to the listenTodd C. Miller
queue depth. OK deraadt@ kettenis@