summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Remove incomplete support for multi-character collating elements. Removetjr2004-07-112-262/+8
| | | | unused character category calculations.
* Correct a brain-o in extract_dir: mkdirpath() and mkdir(2) arekientzle2004-07-101-2/+4
| | | | not interchangable.
* Unbreak alpha: On alpha a long double is the same as a double andmarcel2004-07-101-0/+4
| | | | | | consequently the exponent is only 11 bits. Testing whether the exponent equals 32767 in that case only effects to compiler warnings and thus build breakage.
* Add fast paths for conversion of plain ASCII characters.tjr2004-07-091-0/+13
|
* Slightly reorganize and simplify.tjr2004-07-091-24/+11
|
* Remove the declaration of isnan() from this file. It is no longerdas2004-07-092-6/+0
| | | | needed as of math.h v1.40, and its prototype is incorrect here.
* Bump document date for recent changes.das2004-07-091-1/+1
| | | | Prodded by: ru
* Document these functions as being in libm, not libc. Some of themdas2004-07-091-4/+1
| | | | | | | *are* in libc for historical reasons, but programmers should not rely on that fact. Also remove a BUGS section that is not relevant here.
* Implement the classification macros isfinite(), isinf(), isnan(), anddas2004-07-0921-508/+287
| | | | | | | | | | | | | | | | | | | | | isnormal() the hard way, rather than relying on fpclassify(). This is a lose in the sense that we need a total of 12 functions, but it is necessary for binary compatibility because we have never bumped libm's major version number. In particular, isinf(), isnan(), and isnanf() were BSD libc functions before they were C99 macros, so we can't reimplement them in terms of fpclassify() without adding a dependency on libc.so.5. I have tried to arrange things so that programs that could be compiled in FreeBSD 4.X will generate the same external references when compiled in 5.X. At the same time, the new macros should remain C99-compliant. The isinf() and isnan() functions remain in libc for historical reasons; however, I have moved the functions that implement the macros isfinite() and isnormal() to libm where they belong. Moreover, half a dozen MD versions of isinf() and isnan() have been replaced with MI versions that work equally well. Prodded by: kris
* Define the following macros in terms of [gi]cc builtins when thedas2004-07-091-0/+29
| | | | | | | | | | | | | | | | | | builtins are available: HUGE_VAL, HUGE_VALF, HUGE_VALL, INFINITY, and NAN. These macros now expand to floating-point constant expressions rather than external references, as required by C99. Other compilers will retain the historical behavior. Note that it is not possible say, e.g. #define HUGE_VAL 1.0e9999 because the above may result in diagnostics at translation time and spurious exceptions at runtime. Hence the need for compiler support for these features. Also use builtins to implement the macros isgreater(), isgreaterequal(), isless(), islessequal(), islessgreater(), and isunordered() when such builtins are available. Although the old macros are correct, the builtin versions are much faster, and they avoid double-expansion problems.
* Eliminate some magic numbers and correct description of _PC_NO_TRUNC.wollman2004-07-082-20/+45
| | | | | Slight emendation to _PC_CHOWN_RESTRICTED, which is in a very similar boat.
* Add the new call control layer to the library and install the man pageharti2004-07-081-5/+11
| | | | for the service access point (SAP) stuff now that it is really available.
* Add a function to iterate over all characters in a particular charactertjr2004-07-083-2/+150
| | | | | | class. This is necessary in order to implement tr(1) efficiently in multibyte locales, since the brute force method of finding all characters in a class is infeasible with a 32-bit (or wider) wchar_t.
* I think this is my fourth complete rewrite of the dir-creationkientzle2004-07-081-139/+213
| | | | | | | | | | | | | | | code. <whew!> This version handles all of the following edge cases: * Restoring explicit dirs with 000 permissions (star fails this test) * Restore of implicit or explicit dirs when umask=777 (gtar and star both fail this test) * Restoring dir paths containing "." and ".." components This version initially creates all dirs with permission 700 (ignoring umask), then does a post-extract "fixup" pass to set the correct permissions (which may or may not depend on umask, depending on the restore flags and whether it's an explicit or implicit dir). Permissions are restored depth-first so that permissions within non-writable dirs can be correctly restored. (The depth-sorting does correctly account for dirs with ".." components.)
* Make bluetooth compile on all platformsemax2004-07-071-1/+2
| | | | Reviewed by: imp, ru
* there's no such define as KERN_NAME_MAX, change to _POSIX_NAME_MAX.alfred2004-07-071-1/+1
|
* Markup fixes.ru2004-07-071-16/+24
|
* Markup nits.ru2004-07-071-2/+4
|
* Fixed markup.ru2004-07-071-16/+22
|
* mdoc(7) fixes.ru2004-07-071-2/+3
|
* Move the return value information about the getenv(3) library functionhmp2004-07-061-4/+10
| | | | | | | | | under the RETURN VALUES section so it is consistent with others. Cleanup the return value text for getenv(3) a little while I am here. PR: docs/58033 MFC after: 3 days
* Keep it sync with OpenBSD:ache2004-07-061-3/+4
| | | | | | | An optional argument cannot start with '-', even if permutation is disabled. Obtained from: OpenBSD getopt_long.c v1.17
* Push WARNS back up to 6, but define NO_WERROR; I want the warts out in thedes2004-07-061-1/+2
| | | | open where people can see them and hopefully fix them.
* Introduce inline {ip,udp,tcp}_next() functions which take a pointer to andes2004-07-0612-52/+77
| | | | | | | {ip,udp,tcp} header and return a void * pointing to the payload (i.e. the first byte past the end of the header and any required padding). Use them consistently throughout libalias to a) reduce code duplication, b) improve code legibility, c) get rid of a bunch of alignment warnings.
* Rewrite twowords() to access its argument through a char pointer and notdes2004-07-061-3/+10
| | | | | | a short pointer. The previous implementation seems to be in a gray zone of the C standard, and GCC generates incorrect code for it at -O2 or higher on some platforms.
* Document incorrect handling of multibyte characters.tjr2004-07-061-1/+3
|
* Temporarily lower WARNS to 3 while I figure out the alignment issues ondes2004-07-061-1/+1
| | | | alpha.
* Add C99's nearbyint{,f}() functions as wrappers around rint().das2004-07-064-6/+94
| | | | | | | These trivial implementations are about 25 times slower than rint{,f}() on x86 due to the FP environment save/restore. They should eventually be redone in terms of fegetround() and bit fiddling.
* Add implementations of ftw(3) and nftw(3) and the corresponding headerdas2004-07-052-2/+211
| | | | | | | | ftw.h. This is the implementation written by Joel Baker <fenton@debian.org> for inclusion in NetBSD, but with several bugfixes. Obtained from: Debian
* Documentation for ftw(3) and nftw(3).das2004-07-051-0/+210
| | | | Obtained from: OpenBSD
* Minor wordsmithing; remove a controversial colon.kientzle2004-07-051-3/+2
|
* Add convenience functions to retrieve the atime fields directly,kientzle2004-07-053-0/+20
| | | | without having to first pull the stat structure.
* ru@'s ambitious sweep through the manpages is mostly a good thing,kientzle2004-07-051-1/+1
| | | | but some colons are supposed to be followed by uppercase letters.
* Make whatis(1) happy about the NAME section.ru2004-07-051-57/+60
| | | | Slightly fix markup and grammar.
* Fix the NAME section making whatis(1) happy in particular.ru2004-07-057-68/+65
|
* Unbreak a whatis(1) entry by fixing the NAME section.ru2004-07-051-14/+10
| | | | Minor markup and grammar nits.
* Make libalias WARNS?=6-clean. This mostly involves renaming variablesdes2004-07-0515-676/+721
| | | | | | | | | named link, foo_link or link_foo to lnk, foo_lnk or lnk_foo, fixing signed / unsigned comparisons, and shoving unused function arguments under the carpet. I was hoping WARNS?=6 might reveal more serious problems, and perhaps the source of the -O2 breakage, but found no smoking gun.
* Parenthesize return values.des2004-07-056-120/+120
|
* Mechanical whitespace cleanup.des2004-07-056-126/+126
|
* Markup fixes.ru2004-07-053-128/+180
|
* Markup fixes.ru2004-07-051-22/+28
|
* Markup fixes.ru2004-07-055-31/+31
|
* Markup nits.ru2004-07-0514-72/+93
|
* Fixed cross-references in SEE ALSO.ru2004-07-046-20/+28
| | | | Emininated double space and hard sentence breaks.
* Sort SEE ALSO references (in dictionary order, ignoring case).ru2004-07-0410-11/+11
|
* Add commentary explaining why we return EBADF upon attempts to fflush() acperciva2004-07-041-0/+12
| | | | | | read-only file. Discussed on: -current
* Record the offset of thr_id in the thread structure. Required formarcel2004-07-041-0/+1
| | | | debugging.
* Yet another pointy hat: When restoring file flags, it's okay to use thekientzle2004-07-041-1/+1
| | | | | shared stat buffer, but don't try to access it through an uninitialized pointer.
* Consistently use __inline instead of __inline__ as the former is an empty macrostefanf2004-07-041-3/+3
| | | | in <sys/cdefs.h> for compilers without support for inline.
* Add LibAliasOutTry() which checks a packet for a hit in the tables, butphk2004-07-042-16/+29
| | | | does not create a new entry if none is found.
OpenPOWER on IntegriCloud