summaryrefslogtreecommitdiff
path: root/lib/libc
AgeCommit message (Collapse)Author
2011-04-15Remove wrong check.Ariane van der Steldt
HPPA longjmp tests that the env parameter < the current stack pointer. The test relies on the stack being at the end of the memory space. This test is wrong for a couple of reasons: - the main stack is at 0x78000000-0x80000000, but allocations between 0x80000000-0xc0000000 are available to the program, - pthread stacks may be at any place in the address space, allowing a heap-allocated env parameter to fail the check. ok deraadt@, kettenis@, guenther@ at least
2011-04-15wcwidth() must return -1 if the character is not printable.Stefan Sperling
Diff from Alexander Polakov. OK phessler@
2011-04-11document MAP_TRYFIXED. short version: don't use it. prodded by deraadt.Ted Unangst
2011-04-09On the a.out architectures, WEAK_ALIAS does an implicit _C_LABEL()Theo de Raadt
ok miod
2011-04-08a_syms is an int, not a pointer; ok miodTheo de Raadt
2011-04-05Fix the previous commit: define ___cerror, no __cerrorPhilip Guenthe
tested by otto@; ok miod@
2011-04-05Add AI_FQDN flag to getaddrinfo(3). Prompted by discussions with djm@Matthew Dempsky
about cert checking in OpenSSH. Man page wording tweaks thanks to jmc@. ok henning@, jmc@; positive feedback from djm@, ajacoutat@ Committing now to reuse guenther@'s libc minor bump instead of cranking it again, as suggested by deraadt@.
2011-04-04Add a wcswidth man page (based on FreeBSD), and fix the implementationStefan Sperling
to return -1 in case of an unprintable character. ok nicm jmc
2011-04-04Move __cerror to ___cerror with a weak alias so that rthreads can override it.Philip Guenthe
On mips64, also correct the name called from plain cerror to __cerror. "looks correct" miod@
2011-04-03Don't fill the ctype tab with Latin-1 information in UTF-8 locales.Stefan Sperling
Single byte sequences other than ASCII are not valid UTF-8, so they should test false in single-byte ctype functions like isprint(). Remove some dead #ifdef'd code while here. ok phessler nicm mikeb
2011-04-03Add wcwidth(3) man page. ok nicmStefan Sperling
2011-03-21tweak for clarity, ok millert@, jmc@Marc Espie
2011-03-16nl_types.h doesn't need to be #included to use nl_langinfo(). PointedPhilip Guenthe
out by Andres Perera (andres.p at zoho.com)
2011-03-15Remove evaluation of PATH_LOCALE environment variable because it can beStefan Sperling
abused to cause an integer overflow and serves no real purpose. Found by Alexander Schrijver. ok millert deraadt
2011-03-14try to document these functions betterTheo de Raadt
discussed with millert and guenther ok guenther
2011-03-13Fix handling of VIS_ALL: in vis(), actually encode all charactersPhilip Guenthe
as requested and give a correct estimate when they don't all fit, and in unvis() decode them instead of erroring ok nicm@, deraadt@
2011-03-13Sync ctype definitions for the UTF-8 locale to FreeBSD, fixing width ofStefan Sperling
various zero-width characters (e.g. diacritical marks). Also fix runetype mask definitions so that mklocale interprets zero width properly. Diff from Alexander Polakov. Character definition changes checked against Unicode 5.2 by me. ok matthew nicm
2011-03-12In the original sparc V7 book (and in the v8 book), the divrem leaf code usedTheo de Raadt
local registers for a few temporaries. This was changed to use two global registers. Maybe to permit use in-kernel without conflicting with the register V7 register window handlers. (Was this done by Chris Torek? Is this related to Gordon Irlam's work? Or was it in NetBSD? Hard to tell because NetBSD removed their original cvs tree.) In V8 the ABI was tightened; more global registers became offlimits in different ways. We started supporting sun4m, and did not consider this. As a result, the global registers chosen are the wrong choice. In particular, %g7 is a poor choice for upcoming TLS work. It looks like it is safer to use %g5 and %g6 since these functions are "system software". All re-entrant parts of the system save it. On sparc64 these functions are in libc per ABI requirement, but are unused. On sparc, they occur in bootblocks (no reentrancy), kernel (reentrancy saves globals; kernel is not ABI compliant), userland libc (signal handlers save globals), and ld.so (symbol binding is not re-entrant on its own). Discussed rather extensively with guenther, kettenis, miod and drahn.
2011-03-12Replace the old, broken KERN_PROC ABI and its matching functionsPhilip Guenthe
in libkvm with the stable-ABI versions that are currently named KERN_PROC2, kvm_get{proc,argv,envv}2(). The latter names and symbols will continue to be supported for a few releases. Committing now that they ports people have had a couple releases to update pkgs that usd the old functions
2011-03-09Stilistic improvement: use clean mdoc(7) .Qq enclosures rather thanIngo Schwarze
(correct, but ugly) low-level roff(7) quoting of quote characters. As a side effect, this avoids ugly formatting caused by a nasty mandoc(1) bug with roff(7) quoting in mdoc(7) documents. Of course, that bug will ultimately get fixed as well, but that can't be done quickly. Reported by Tim van der Molen <tbvdm at xs4all dot nl> ok jmc@
2011-03-08Add a kernel man page sosplice(9) for the socket splicing implementation.Alexander Bluhm
ok jmc@
2011-03-06wrong type for variable; spotted by christian.siebert@cs.tu-chemnitz.deTheo de Raadt
ok guenther
2011-03-05Fix PR 6267: recheck POSIXLY_CORRECT each time getopt_long() starts a newPhilip Guenthe
argv and don't suppress the handling of leading '-' in optstring when POSIXLY_CORRECT is set. Based on patch from Eric Blake. ok and manpage update from millert@, manpage ok jmc@
2011-03-02Fix __cxa_finalize() so that calling __cxa_finalize(NULL) properlyMatthew Dempsky
invokes handlers registered with __cxa_atexit(). "seems right" deraadt@
2011-02-24SOCK_SEQPACKET is only valid for the AF_BLUETOOTH now, andMike Belopuhov
SOCK_RDM is a dead SysV compatibility option that is not described anywhere in the man page so don't reference it. ok claudio
2011-02-18An attempt to open an append-only file without O_APPEND results in EPERM.Todd C. Miller
OK jmc@ guenther@
2011-02-11Fix typo, setreseuid -> setresuidPaul de Weerd
ok otto@, jmc@
2011-02-10Put a limit on recursion during matching, and reject input of size greaterStefan Sperling
or equal PATH_MAX. Based on similar fix made in NetBSD. ok miod@ millert@
2011-02-02Update after fix for kernel/6547. SETVAL and SETALL can return ERANGE now.Federico G. Schwindt
jmc@ ok.
2011-01-31Document the kernel option SOCKET_SPLICE and the socket optionAlexander Bluhm
SO_SPLICE for zero-copy socket splicing. ok jmc@
2011-01-24Correctly escape a literal colon in an enclosure;Ingo Schwarze
the \: roff escape is an optional line break.
2011-01-21over written -> overwrittenlum
ok jmc@
2011-01-19Fix typo, %F pattern corresponds to %Y-%m-%d (the ISO 8601 date format),Landry Breuil
not %Y/%m/%d. Found while debugging geo/gpx-viewer. ok millert@ jasper@
2011-01-19- missing leading '.' before 'It'.Jasper Lievisse Adriaanse
spotted by landry@
2011-01-14superceded -> superseded;Jason McIntyre
2011-01-12avoid some integer overflows mostly with GLOB_APPEND and GLOB_DOOFFSDamien Miller
and sanity check arguments (these will be unnecessary when we switch struct glob members from being type into to size_t in the future); "looks ok" tedu@ feedback guenther@
2011-01-10tweak previous; ok millertJason McIntyre
2011-01-10mkdtemp() is present in POSIX 1003.1-2008Todd C. Miller
Add a warning about using less than 6 Xs causing an error on some systems
2011-01-07mktemp(3) can be used, but not where mkstemp(3) is an alternative. AlsoNicholas Marriott
trim an inaccurate comment about its future removal. ok deraadt
2010-12-31Make this compile with llvm-clang; problem pointed out by Amit KulkarniPhilip Guenthe
2010-12-27mktemp(3) (and thus mktemp(1)) no longer use the process ID whenTodd C. Miller
replacing the Xs, it is now purely random. Also replace a use of .Fn that should be .Xr. OK jmc@
2010-12-22Fix out of date comment; no code changeTodd C. Miller
2010-12-22remove comment that hasn't been true for quite a while now;Otto Moerbeek
ok deraadt@ djm@
2010-12-16avoid pointer arithmetic on void *David Hill
tested for a while by me. ok otto@
2010-12-05Rewrite the mbrtowc(3) man page so we can make sense of this function.Stefan Sperling
tweaks from jmc, help from uwe, "We are going to have to trust you :-)" deraadt
2010-11-30involes -> involves; from Carlos Alberto Pereira GomesJason McIntyre
2010-11-30replace a large stack buffer with a malloc call, with help from matthew.Ted Unangst
ok deraadt [passed upstream to the tz list as well]
2010-11-21the posix regex mistake is here to stay. ok deraadtTed Unangst
2010-11-20Add CAVEATS section documenting error handling caveats.Stefan Sperling
tweak and ok jmc, tedu
2010-11-19Make KERN_CPTIME return an avarage number of ticks across all CPUsMike Belopuhov
tedu agreed with an idea, tested by Luis Useche and me; ok deraadt