summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Shutup warning for DNAME RR.ume2009-02-082-2/+3
| | | | | | PR: bin/127591 Submitted by: "Eugene M. Kim" <20080111.freebsd.org__at__ab.ote.we.lv> MFC after: 1 week
* Fix language on atol(3) manpage. Add a COMPATIBILITY sectionkeramida2009-02-081-3/+32
| | | | | | | | | | stating that in FreeBSD the atol() and atoll() functions affect errno in the same way as strtol() and stroll(). PR: docs/126487 Submitted by: edwin Reviewed by: trhodes, gabor MFC after: 1 week
* Make sure the comparison is done with an unsigned char.imp2009-02-071-1/+1
|
* Standardize the various prison_foo_ip[46] functions and prison_if tojamie2009-02-051-2/+2
| | | | | | | | | | | | | | | return zero on success and an error code otherwise. The possible errors are EADDRNOTAVAIL if an address being checked for doesn't match the prison, and EAFNOSUPPORT if the prison doesn't have any addresses in that address family. For most callers of these functions, use the returned error code instead of e.g. a hard-coded EADDRNOTAVAIL or EINVAL. Always include a jailed() check in these functions, where a non-jailed cred always returns success (and makes no changes). Remove the explicit jailed() checks that preceded many of the function calls. Approved by: bz (mentor)
* Fix the functions to match prototypes. The K&R definitions differimp2009-02-033-3/+3
| | | | from the ANSI-C prototype due to the 'int promotion' rule.
* - ANSIfy function definitionsdanger2009-02-0333-110/+41
| | | | | | - use nul when we are looking for a terminating character where appropriate Approved by: imp
* Provide a type for the argument.rdivacky2009-02-021-1/+1
| | | | Approved by: kib (mentor)
* - Remove superfluous commentgabor2009-01-301-2/+0
| | | | | PR: docs/129400 Submitted by: Gavin Atkinson <gavin@freebsd.org>
* Update the description of KERN_PROC.trhodes2009-01-281-5/+3
| | | | | PR: 100242 Reviewed by: jhb
* Better wording for clearing EOF indicator.trhodes2009-01-281-0/+4
| | | | Submitted by: keramida and jhb
* Remove another comment about clearing EOF indicator.trhodes2009-01-281-4/+1
| | | | Noticed by: bde
* Update the manpage to reflect r145172.das2009-01-281-2/+1
|
* Remove comment about clearerr() being the only method of clearingtrhodes2009-01-281-3/+1
| | | | | | | | | the EOF indicator, fseek() may also be used for this. Bump document date. PR: 76333 Submitted by: Yoshihiko Sarumaru <mistral@imasy.or.jp>
* - Fix grammar. [1]delphij2009-01-261-3/+3
| | | | | | | | - Use the correct term 'long mode'. [2] - style(9) for return value. [3] Submitted by: Ben Kaduk <minimarmot gmail com> [1], obrien [2], scf [3]
* Rewrite of MI strlen(3) in a way that can better utilize modern hardware bydelphij2009-01-251-15/+78
| | | | | | | | | reducing branches and doing word-sized operation. The idea is taken from J.T. Conklin's x86_64 optimized version of strlen(3) for NetBSD, and reimplemented in C by me. Discussed on: -arch@
* Add support for multibyte thousands_sep encodings, e.g., U+066C.das2009-01-223-173/+225
| | | | | | | | The integer thousands' separator code is rewritten in order to avoid having to preallocate a buffer for the largest possible digit string with the most possible instances of the longest possible multibyte thousands' separator. The new version inserts thousands' separators for integers using the same code as floating point.
* - Add support for multibyte decimal_point encodings, e.g., U+066B.das2009-01-192-23/+49
| | | | | A forthcoming gdtoa import is needed to make this fully work. - Improve the way "nan(...)" is parsed.
* Add support for multibyte decimal_point encodings, e.g., U+066B.das2009-01-192-23/+35
|
* When f[w]printf() is called on an unbuffered file like stdout, itdas2009-01-172-14/+23
| | | | | | | | | | | | | | | | sets up a fake buffered FILE and then effectively calls itself recursively. Unfortunately, gcc doesn't know how to do tail call elimination in this case, and actually makes things worse by inlining __sbprintf(). This means that f[w]printf() to stderr was allocating about 5k of stack on 64-bit platforms, much of which was never used. I've reorganized things to eliminate the waste. In addition to saving some stack space, this improves performance in my tests by anywhere from 5% to 17% (depending on the test) when -fstack-protector is enabled. I found no statistically significant performance difference when stack protection is turned off. (The tests redirected stderr to /dev/null.)
* Simplify printf's inlined output buffering routines. On amd64, thisdas2009-01-171-18/+18
| | | | reduces the code size by about 10% and improves performance slightly.
* Change dstp to be const and remove bogus cast.rdivacky2009-01-151-2/+3
| | | | | Submitted by: christoph.mallon at gmx.de Approved by: kib (mentor)
* Introduce a local variable and use it instead of passed in parameterrdivacky2009-01-155-6/+16
| | | | | | | | to get rid of restrict qualifier discarding. This lets libc compile cleanly in gnu99 mode. Suggested by: kib, christoph.mallon at gmx.de Approved by: kib (mentor)
* Reduce code duplication by moving functions that are identical in bothdas2009-01-153-427/+216
| | | | | vfprintf.c and vfwprintf.c (except for char/wchar_t differences) to a common header file.
* Convert the insidious macros that handle printf()'s buffering intodas2009-01-153-86/+204
| | | | | | | | | | | slightly less evil inline functions, and move the buffering state into a struct. This will make it possible for helper routines to produce output for printf() directly, making it possible to untangle the code somewhat. In wprintf(), use the same buffering mechanism to reduce diffs to printf(). This has the side-effect of causing wprintf() to catch write errors that it previously ignored.
* Document that ffsll(3) and flsll(3) functions first appeared inkib2009-01-131-1/+1
| | | | | | | FreeBSD 7.1 Submitted by: Jan Henrik Sylvester <me janh de> MFC after: 3 days
* - add missing includedanger2009-01-121-2/+3
| | | | | | | | - fix struct memeber's name [1] PR: docs/130413 [1] Submitted by: Thomas Mueller <tmueller@sysgo.com> [1] MFC after: 3 days
* o Language improvements from OpenBSD;delphij2009-01-121-17/+17
| | | | | | o Use an ISC-style license as did by the author. Obtained from: OpenBSD
* o ANSIfy.delphij2009-01-121-29/+12
| | | | | | o Use ISC style copyright as did by the author. Obtained from: OpenBSD
* Sort MLINKS.ru2009-01-091-21/+32
|
* Set the error indicator on an attempt to write to a read-only stream.das2009-01-081-0/+1
| | | | | PR: 127335 MFC after: 2 weeks
* Document the special loopback address behaviour of jails.bz2009-01-061-1/+7
| | | | | | | PR: kern/103464 Submitted by: brueffer (correct markup) Reviewed by: brueffer MFC after: 2 weeks
* - forgot to bump a datedanger2009-01-061-1/+1
|
* catch up wtih r175955 by ume:danger2009-01-061-53/+2
| | | | - the support of AI_ALL and AI_V4MAPPED has been completely removed.
* Note that the protocol argument can be set to 0.trhodes2009-01-051-1/+6
| | | | | PR: 127890 Reviewed by: rwatson
* Document that kldunloadf can return EINVAL.trhodes2008-12-251-1/+5
| | | | PR: 125639
* Add support for the FPA floating-point format on ARM. Themarcel2008-12-233-3/+23
| | | | | | | | | FPA floating-point format is identical to the VFP format, but is always stored in big-endian. Introduce _IEEE_WORD_ORDER to describe the byte-order of the FP representation. Obtained from: Juniper Networks, Inc
* Add an ENVIRONMENT section to note that the RSH variable can be set tomurray2008-12-141-0/+7
| | | | | | | | override the use of the rsh(1) program in rcmd(3). PR: docs/51133 Obtained from: NetBSD, partially MFC after: 3 weeks
* Merge the resolver part of BIND 9.4.3 into HEAD.ume2008-12-147-28/+182
| | | | | | | | | | It includes the following fix: 2426. [bug] libbind: inet_net_pton() can sometimes return the wrong value if excessively large netmasks are supplied. [RT #18512] Reported by: Maksymilian Arciemowicz <cxib__at__securityreason.com>
* Consolidate some variable initializations. No substantive change.das2008-12-112-13/+13
|
* Move the xprintf hook to where it belongs; it shouldn't be in thedas2008-12-101-6/+4
| | | | middle of vfprintf's variable declarations.
* o Use full month name in .Dd macro.maxim2008-12-091-1/+1
|
* Import the strndup(3) function.kib2008-12-064-3/+75
| | | | | | | | Copyright attribution is kept the same as in original NetBSD source. Submitted by: Florian Smeets <flo kasimir com> Obtained from: NetBSD MFC after: 2 weeks
* Order the str*.c files mostly alphabetical.kib2008-12-061-3/+3
| | | | | Submitted by: Florian Smeets <flo kasimir com> MFC after: 2 weeks
* Add an easier example.pjd2008-12-051-1/+16
| | | | Reviewed by: trasz
* The times(3) function returns the number of CLK_TCKs since thekeramida2008-12-011-4/+9
| | | | | | | | startup time of FreeBSD, not since the UNIX Epoch. PR: docs/122359 Submitted by: Viktor &#352;tujber MFC after: 1 week
* Fix fread() to return a correct value on platforms where sizeof(int) !=ru2008-12-011-1/+1
| | | | | | | sizeof(size_t), i.e. on all 64-bit platforms. Reported by: Andrey V. Elsukov MFC after: 3 days
* Fix a lock order reversal bug that could cause deadlock during fork(2).jasone2008-12-011-11/+37
| | | | Reported by: kib
* It's silly to claim recv(2) is to be removed in favour of recvfrom(2)ivoras2008-11-301-1/+0
| | | | | | (at least at this time :) ). Approved by: gnn (mentor)
* Adjust an assertion to handle the case where a lock is contested, butjasone2008-11-301-1/+1
| | | | | | spinning is avoided due to running on a single-CPU system. Reported by: stefanf
* Do not spin when trying to lock on a single-CPU system.jasone2008-11-301-11/+13
| | | | Reported by: davidxu
OpenPOWER on IntegriCloud