summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* In fts_build(), if we try to chdir and fail (e.g. due to lack of searchdas2004-06-082-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | permission), try to continue in FTS_DONTCHDIR mode. Of course this won't work for long paths, but we can't descend more than one pathname component beyond the directory anyway if we lack search permission. Here is a transcript demonstrating the change, where oldls is ls(1) linked with the old fts(3): das@VARK:~> mkdir t && touch t/{a,b,c} && chmod u-x t das@VARK:~> oldls t a b c das@VARK:~> oldls -l t das@VARK:~> \ls t a b c das@VARK:~> \ls -l t ls: a: Permission denied ls: b: Permission denied ls: c: Permission denied I had forgotten about this patch until bde reminded me. He reports using it without problems for over a year. PR: 45723
* Rename cantwrite() to prepwrite(). The latter is less confusing,das2004-06-081-4/+1
| | | | | | since the macro isn't really a predicate, and it has side-effects. Also, don't set errno if prepwrite() fails, since this is done in prepwrite() now.
* Rename cantwrite() to prepwrite(). The latter is less confusing,das2004-06-084-5/+6
| | | | since the macro isn't really a predicate, and it has side-effects.
* Set errno to EBADF on attempts to write to a stream that is notdas2004-06-081-2/+5
| | | | | | | | | writable. Affected callers include fwrite(), put?(), and *printf(). The issue of whether this is the right errno for funopened streams is unresolved, but that's an obscure case, and some errno is better than no errno. Discussed with: bde, jkh
* Use ".In" to mark up C include file names.yar2004-06-071-2/+4
|
* Each sentence should begin on a new line.yar2004-06-071-10/+16
|
* Extend and improve the mdoc(7) markup of this page.yar2004-06-071-32/+60
| | | | Reviewed by: ru
* Finally document the option to avoid zombie creationyar2004-06-073-2/+41
| | | | through ignoring SIGCHLD.
* Fix the ordering in the description of the dlsym() lookup procedure toroam2004-06-031-4/+4
| | | | | | | | reflect src/libexec/rtld-elf/rtld.c rev. 1.68 - the globally-loaded objects (RTLD_GLOBAL) are searched before the local object's DAG's. PR: 62770 Submitted by: Kimura Fuyuki <fuyuki@nigredo.org>
* use source address as a hint to determine destination addressume2004-06-021-50/+361
| | | | by getipnodebyname().
* Add Aerospace Corporation copyrights to EUI64 support files.brooks2004-06-012-0/+52
| | | | Suggested by: marcel, imp
* Change the signature of ftok from (const char *, char) to (const char *, int)tjr2004-06-011-1/+1
| | | | Obtained from: NetBSD (christos)
* Treat IPv4 private address as global scope rather than site scope.ume2004-05-311-1/+1
| | | | | Though it breaks RFC 3484, without this change, dest addr selection doesn't work well under NAT environment.
* use source address as a hint to determine destination address.ume2004-05-311-0/+111
| | | | Obtained from: KAME
* Buffer partial wide characters more efficiently: instead of storing thetjr2004-05-271-31/+46
| | | | | | multibyte representation in conversion state objects, store the accumulated wide character, set number and number of bytes remaining to avoid having to derive them every time mbrtowc() is called.
* Add support for an /etc/eui64 file modeled on /etc/ethers. The API isbrooks2004-05-263-2/+492
| | | | | | modeled on ethers(3) except that all functions are thread-safe. Reviewed by: simokawa
* Scan the source string for invalid wide characters in wcsrtombs()tjr2004-05-251-2/+9
| | | | in the dst == NULL case.
* Provide trivial macro implementations of getwc(), getwchar(), putwc() andtjr2004-05-254-0/+8
| | | | putwchar() to reduce function call overhead.
* Grab all the information we need about a character with one call totjr2004-05-231-7/+5
| | | | __maskrune() instead of one direct call and one through iswprint().
* Perform conversions straight from the stream buffer instead of scanningtjr2004-05-221-18/+19
| | | | | | | through byte by byte with mbrtowc(). In the usual case (buffer is big enough to contain the multibyte character, character does not straddle buffer boundary) this results in only one call to mbrtowc() for each wide character read.
* Associate a multibyte conversion state object with each stream. Reset ittjr2004-05-227-42/+24
| | | | | | | | | to the initial state when a stream is opened or seeked upon. Use the stream's conversion state object instead of a freshly-zeroed one in fgetwc(), fputwc() and ungetwc(). This is only a performance improvement for now, but it would also be required in order to support state-dependent encodings.
* Update the document date.alc2004-05-201-1/+1
| | | | Reminded by: ru@
* Remove a long obsolete paragraph from the BUGS section.alc2004-05-191-10/+0
|
* For amd64, explicitly compile mcount.po, rather than copying mcount.o. Wepeter2004-05-181-0/+6
| | | | | need to compile it with -fno-omit-frame-pointers since the mcount code depends on that, and by default it omits them without -pg.
* Clarify and extend paragraphs on interoperationyar2004-05-173-6/+55
| | | | | | | | | of fcntl(2), flock(2), and lockf(3) advisory locks. Add such a paragraph to the flock(2) manpage for the sake of consistency. Reviewed by: Cyrille Lefevre and Kirk McKusick on -arch MFC after: 2 weeks
* getgrent() and friends should set errno if there is an error.kientzle2004-05-172-1/+8
| | | | | | Also, clarify the manpage description of when errno is set and explain that clients should set errno=0 first if they want useful error information.
* POSIX prohibits any library function from setting errno to 0.kientzle2004-05-172-2/+6
| | | | | | | | Correct my previous commit and add a comment to the manpage indicating that the user must set errno to 0 if they wish to distinguish "no such user" from "error". Pointed out by: Jacques Vidrine (nectar@)
* Use conversion state objects to store the accumulated wide character,tjr2004-05-171-63/+67
| | | | | | low bound, and the number of bytes remaining instead of storing the raw byte sequence and deriving them every time mbrtowc() is called. This is much faster -- about twice as fast in some crude benchmarks.
* Use a simpler and faster buffering scheme for partial multibyte characters.tjr2004-05-172-52/+80
|
* If getpwent/getpwuid/getpwnam return NULL, they must also set errno.kientzle2004-05-171-0/+3
|
* Use a simpler, faster buffering scheme for partial characters in mbrtowc().tjr2004-05-141-21/+27
|
* Import the softfloat emulation library, needed for FreeBSD/arm right now.cognet2004-05-1439-0/+14975
| | | | | It should become useless when gcc 3.4 will be imported, as libgcc from gcc 3.4 contains this bits for arm.
* Import the FreeBSD/arm libc bits.cognet2004-05-1453-0/+6228
| | | | Obtained from: NetBSD
* We use __arm__, not __arm32__.cognet2004-05-141-1/+1
|
* Define malloc_pageshift and malloc_minsize for arm.cognet2004-05-141-0/+4
|
* Fixed some minor style bugs.bde2004-05-132-14/+20
|
* Allow encoding modules to override the default implementations oftjr2004-05-138-9/+113
| | | | | mbsrtowcs() and wcsrtombs(). Provide a fast implementation for the trivial "NONE" encoding.
* Fix braino in previous: check that the second byte in the charactertjr2004-05-132-2/+2
| | | | | buffer is non-null when the character is two bytes long, not when the buffer is two bytes long.
* Fix some^Wseveral style bugs from last commit.peadar2004-05-123-45/+38
| | | | | | | | | | Remove "sys/types.h" as "sys/param.h" is already included Use cast rather than back-pointer to convert from public to private version of FTS data, and so avoid littering fts.h with any of the details. Pointed out By: bde, kientzle
* Fix typo.josef2004-05-121-1/+1
| | | | | Submitted by: Michel Lavondes <fox@vader.aacc.cc.md.us> PR: docs/66576
* Reduce overhead by calling internal versions of the multibyte conversiontjr2004-05-128-11/+19
| | | | functions directly wherever possible.
* Move prototypes of various encoding-related functions into a new headertjr2004-05-1216-71/+72
| | | | file to avoid extern'ing them all over the place.
* Link radixsort(3) to sradixsort(3), make the latter appear inru2004-05-122-1/+2
| | | | the whatis(1) output.
* Document the fact that in a jailed environment, sendto(2) could failcsjp2004-05-111-0/+4
| | | | | | | returning EPERM if the source address specified in the IP header did not match the address bound to the prison. Approved by: bmilekic (mentor)
* In the absence of proper validation, at least check that null bytestjr2004-05-114-1/+19
| | | | do not appear as anything but the first byte of a multibyte character.
* Remove a trailing newline, to behave as documented in syslog(3):dds2004-05-101-0/+4
| | | | | | | | | | | | | "A trailing newline is added if none is present." The code in syslogd, stderr, and console output always adds a newline at the EOL. However, the existing code never actually removed a trailing newline, and apparently relied on syslogd to convert it into a space character. Thus, the existing newline was converted to a trailing space at the EOL by syslogd, while stderr, and console output resulted in an empty line. MFC after: 2 weeks
* Fixed style bugs in previous commit (bogus forward declaration andbde2004-05-101-3/+1
| | | | inconsistent capitalization in comments).
* Use a binary search to find the range containing a character intjr2004-05-093-20/+34
| | | | | | RuneRange arrays. This is much faster when there are hundreds of ranges (as is the case in UTF-8 locales) and was inspired by a similar change made by Apple in Darwin.
* o fix a sentence to match with the synopsis [1]brueffer2004-05-091-3/+3
| | | | | | | | | o fix grammar nit PR: 66289 [1] Submitted by: Michel Lavondès <fox@vader.aacc.cc.md.us> Obtained from: OpenBSD [1] MFC after: 3 days
* The FTS_NOSTAT option is an optimisation that reduces the numberpeadar2004-05-083-6/+153
| | | | | | | | | | | | | | | | | | | of stat(2) calls by keeping an eye of the number of links a directory has. It assumes that each subdirectory will have a hard link to its parent, to represent the ".." node, and stops calling stat(2) when all links are accounted for in a given directory. This assumption is really only valid for UNIX-like filesystems: A concrete example is NTFS. The NTFS "i-node" does contain a link count, but most/all directories have a link count between 0 and 2 inclusive. The end result is that find on an NTFS volume won't actually traverse the entire hierarchy of the directories passed to it. (Those with a link count of two are not traversed at all) The fix checks the "UFSness" of the filesystem before enabling the optimisation. Reviewed By: Tim Kientzle (kientzle@)
OpenPOWER on IntegriCloud