summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Change the signature of ftok from (const char *, char) to (const char *, int)tjr2004-06-011-1/+1
| | | | Obtained from: NetBSD (christos)
* Honor NOINET6 and disable IPv6 support in libmilter and sendmail if itgshapiro2004-06-012-2/+10
| | | | | | is set. MFC after: 4 days
* 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
* Add implementations for cimag{,f,l}, creal{,f,l} and conj{,f,l}. They arestefanf2004-05-3010-0/+319
| | | | | | | needed for cases where GCC's builtin functions cannot be used and for compilers that don't know about them. Approved by: das (mentor)
* Connect libarchive decompress support to the build.kientzle2004-05-273-2/+7
| | | | | Also, add it to archive_read_support_compression_all() so that typical clients get it pulled in by default.
* 'gnutar' is now handled by the 'tar' reader, sokientzle2004-05-271-2/+1
| | | | | | | there's no need to enable support for it separately from 'tar.' (The call to enable gnutar support is now just an alias for the tar support, left in to avoid API breakage.)
* 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.
* Previously, restoring an archive with hardlinked files that hadkientzle2004-05-272-95/+149
| | | | | | | | | | | | certain flags set (e.g., schg or uappend) would fail because the flags were restored before the hardlink was created. To address this, I've generalized the existing machinery for deferring directory timestamp/mode restoration and used it to defer the restoration of highly-restrictive flags to the end of the extraction, after any links have been created. Pointed out by: Pawel Jakub Dawidek (pjd@)
* Document support for reading .Z compressed archives.kientzle2004-05-272-17/+15
| | | | Correct a few other minor nits.
* GC some no-longer-used constants.kientzle2004-05-271-2/+0
|
* Add prototypes for .Z compression support.kientzle2004-05-272-0/+4
|
* Add read-only support for .Z compressed archives.kientzle2004-05-271-0/+471
|
* 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
* Humanize_number(3) is a part of libutil.pjd2004-05-251-0/+2
|
* You want to include libutil.h, not util.h.trhodes2004-05-251-4/+7
| | | | Some minor sentence tweaking.
* 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.
* Add humanize_number(3) to libutil for formating numbers into a humanpjd2004-05-244-4/+312
| | | | | | readable form. Obtained from: NetBSD
* Don't declare spectHex() inside a function, use a real prototype.stefanf2004-05-241-1/+2
| | | | Approved by: das (mentor)
* Include <stdlib.h> for exit() and add a prototype for yyparse().stefanf2004-05-241-0/+4
| | | | Approved by: das (mentor)
* 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.
* Correct parsing of Solaris default ACLs.kientzle2004-05-211-4/+6
|
* Update the document date.alc2004-05-201-1/+1
| | | | Reminded by: ru@
* Make libthr async-signal-safe without costly signal masking. The guidlines Imtm2004-05-2015-622/+320
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | followed are: Only 3 functions (pthread_cancel, pthread_setcancelstate, pthread_setcanceltype) are required to be async-signal-safe by POSIX. None of the rest of the pthread api is required to be async-signal-safe. This means that only the three mentioned functions are safe to use from inside signal handlers. However, there are certain system/libc calls that are cancellation points that a caller may call from within a signal handler, and since they are cancellation points calls have to be made into libthr to test for cancellation and exit the thread if necessary. So, the cancellation test and thread exit code paths must be async-signal-safe as well. A summary of the changes follows: o Almost all of the code paths that masked signals, as well as locking the pthread structure now lock only the pthread structure. o Signals are masked (and left that way) as soon as a thread enters pthread_exit(). o The active and dead threads locks now explicitly require that signals are masked. o Access to the isdead field of the pthread structure is protected by both the active and dead list locks for writing. Either one is sufficient for reading. o The thread state and type fields have been combined into one three-state switch to make it easier to read without requiring a lock. It doesn't need a lock for writing (and therefore for reading either) because only the current thread can write to it and it is an integer value. o The thread state field of the pthread structure has been eliminated. It was an unnecessary field that mostly duplicated the flags field, but required additional locking that would make a lot more code paths require signal masking. Any truly unique values (such as PS_DEAD) have been reborn as separate members of the pthread structure. o Since the mutex and condvar pthread functions are not async-signal-safe there is no need to muck about with the wait queues when handling a signal ... o ... which also removes the need for wrapping signal handlers and sigaction(2). o The condvar and mutex async-cancellation code had to be revised as a result of some of these changes, which resulted in semi-unrelated changes which would have been difficult to work on as a separate commit, so they are included as well. The only part of the changes I am worried about is related to locking for the pthread joining fields. But, I will take a closer look at them once this mega-patch is committed.
* q§mtm2004-05-201-7/+5
|
* Nits fixed.kientzle2004-05-201-4/+4
| | | | Pointed out by: Daniel Harris
* More research, more shuffling and clarification.kientzle2004-05-201-119/+149
|
* Implement crashdump decoding for AMD64 as well, now that I have finallypeter2004-05-191-28/+63
| | | | got a sample to test against.
* When combining ustar prefix and name fields, check before adding a '/'kientzle2004-05-191-8/+8
| | | | | | | | character, as some tar implementations incorrectly include a '/' with the prefix. Thanks to: Divacky Roman for the UnixWare 7 tarfile that demonstrated this issue.
* I've recently been looking at the Seventh Edition sourcekientzle2004-05-191-78/+80
| | | | | | | | | | code available at tuhs.org, and found out that my chronology is a bit off. In particular, Seventh Edition already used the "linkflag" and "linkname" fields. Also, it appears that there was no tar in Sixth Edition, contrary to what an earlier tar.1 manpage claimed. A few mdoc fixes also crept in here.
* Refine the heuristic used to determine whether or not to obeykientzle2004-05-191-9/+20
| | | | | | | | | the size field for a hardlink entry. Specifically, ensure that we do obey the size field for archives that we know are pax interchange format archives, as required by POSIX. Also, clarify the comment explaining why this is necessary and explain the (very unusual) conditions under which it might fail.
* 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.
* Be smarter about hardlink sizes: some tar programs writekientzle2004-05-181-2/+18
| | | | | | a non-zero size but no body, some write a non-zero size and include a body. To distinguish these cases, look for a valid tar header immediately following a hardlink header with non-zero size.
* Don't depend on NULL's expansion being a pointer, cast it before it is passedstefanf2004-05-181-3/+4
| | | | | | to variadic functions. Approved by: das (mentor)
* Clarify an error message.kientzle2004-05-182-2/+4
|
* 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
|
* Remove some kludges designed to ensure that the compiler didn't rounddas2004-05-172-87/+10
| | | | | | | | | | constants the wrong way on the VAX. Instead, use C99 hexadecimal floating-point constants, which are guaranteed to be exact on binary IEEE machines. (The correct hexadecimal values were already provided in the source, but not used.) Also, convert the constants to lowercase to work around a gcc bug that wasn't fixed until gcc 3.4.0. Prompted by: stefanf
* Remove spurious semicolons. Outside of functions they are actually errors butstefanf2004-05-161-1/+1
| | | | | | | | GCC doesn't warn about them without -pedantic. Approved by: das (mentor) PR: 56649 Reviewed by: md5
* Style fixes:bde2004-05-141-11/+5
| | | | | | | | Main ones: mostly use conditional expressions in ifdefs instead of a mixture of conditional expressions and nested ifdefs. Nearby ones: - don't do less than echo the code in the comment about libc_r - fixed some internal insertion sort errors and indentation errors.
* Fixed some insertion sort errors (external ones only).bde2004-05-141-25/+25
|
* Use a simpler, faster buffering scheme for partial characters in mbrtowc().tjr2004-05-141-21/+27
|
OpenPOWER on IntegriCloud