summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Perform conversions straight from the stream buffer instead of scanningTim J. Robbins2004-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. Notes: svn path=/head/; revision=129584
* Associate a multibyte conversion state object with each stream. Reset itTim J. Robbins2004-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. Notes: svn path=/head/; revision=129583
* Correct parsing of Solaris default ACLs.Tim Kientzle2004-05-211-4/+6
| | | | Notes: svn path=/head/; revision=129540
* Update the document date.Alan Cox2004-05-201-1/+1
| | | | | | | Reminded by: ru@ Notes: svn path=/head/; revision=129508
* Make libthr async-signal-safe without costly signal masking. The guidlines IMike Makonnen2004-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. Notes: svn path=/head/; revision=129484
* q§Mike Makonnen2004-05-201-7/+5
| | | | Notes: svn path=/head/; revision=129482
* Nits fixed.Tim Kientzle2004-05-201-4/+4
| | | | | | | Pointed out by: Daniel Harris Notes: svn path=/head/; revision=129464
* More research, more shuffling and clarification.Tim Kientzle2004-05-201-119/+149
| | | | Notes: svn path=/head/; revision=129461
* Implement crashdump decoding for AMD64 as well, now that I have finallyPeter Wemm2004-05-191-28/+63
| | | | | | | got a sample to test against. Notes: svn path=/head/; revision=129452
* When combining ustar prefix and name fields, check before adding a '/'Tim 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. Notes: svn path=/head/; revision=129447
* I've recently been looking at the Seventh Edition sourceTim Kientzle2004-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. Notes: svn path=/head/; revision=129422
* Refine the heuristic used to determine whether or not to obeyTim Kientzle2004-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. Notes: svn path=/head/; revision=129421
* Remove a long obsolete paragraph from the BUGS section.Alan Cox2004-05-191-10/+0
| | | | Notes: svn path=/head/; revision=129414
* For amd64, explicitly compile mcount.po, rather than copying mcount.o. WePeter Wemm2004-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. Notes: svn path=/head/; revision=129407
* Be smarter about hardlink sizes: some tar programs writeTim Kientzle2004-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. Notes: svn path=/head/; revision=129399
* Don't depend on NULL's expansion being a pointer, cast it before it is passedStefan Farfeleder2004-05-181-3/+4
| | | | | | | | | to variadic functions. Approved by: das (mentor) Notes: svn path=/head/; revision=129392
* Clarify an error message.Tim Kientzle2004-05-182-2/+4
| | | | Notes: svn path=/head/; revision=129370
* Clarify and extend paragraphs on interoperationYaroslav Tykhiy2004-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 Notes: svn path=/head/; revision=129369
* getgrent() and friends should set errno if there is an error.Tim 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. Notes: svn path=/head/; revision=129367
* POSIX prohibits any library function from setting errno to 0.Tim 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@) Notes: svn path=/head/; revision=129349
* Use conversion state objects to store the accumulated wide character,Tim J. Robbins2004-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. Notes: svn path=/head/; revision=129336
* Use a simpler and faster buffering scheme for partial multibyte characters.Tim J. Robbins2004-05-172-52/+80
| | | | Notes: svn path=/head/; revision=129334
* If getpwent/getpwuid/getpwnam return NULL, they must also set errno.Tim Kientzle2004-05-171-0/+3
| | | | Notes: svn path=/head/; revision=129319
* Remove some kludges designed to ensure that the compiler didn't roundDavid Schultz2004-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 Notes: svn path=/head/; revision=129312
* Remove spurious semicolons. Outside of functions they are actually errors butStefan Farfeleder2004-05-161-1/+1
| | | | | | | | | | | GCC doesn't warn about them without -pedantic. Approved by: das (mentor) PR: 56649 Reviewed by: md5 Notes: svn path=/head/; revision=129302
* Style fixes:Bruce Evans2004-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. Notes: svn path=/head/; revision=129237
* Fixed some insertion sort errors (external ones only).Bruce Evans2004-05-141-25/+25
| | | | Notes: svn path=/head/; revision=129236
* Use a simpler, faster buffering scheme for partial characters in mbrtowc().Tim J. Robbins2004-05-141-21/+27
| | | | Notes: svn path=/head/; revision=129229
* Do not attempt to build libdisk, libthr and libc_r for arm.Olivier Houchard2004-05-141-3/+8
| | | | Notes: svn path=/head/; revision=129225
* Define iaddr_t and saddr_t for arm.Olivier Houchard2004-05-141-1/+4
| | | | Notes: svn path=/head/; revision=129216
* Use WARNS?=3 for these in the arm case for now, due to toolchain issues.Olivier Houchard2004-05-143-0/+13
| | | | Notes: svn path=/head/; revision=129215
* Import _setjmp.S for arm in libstand.Olivier Houchard2004-05-141-0/+106
| | | | Notes: svn path=/head/; revision=129208
* Import libkvm MD file for arm.Olivier Houchard2004-05-141-0/+103
| | | | Notes: svn path=/head/; revision=129207
* Arm bits for libpthread. It has no chances to work and should be consideredOlivier Houchard2004-05-1410-0/+942
| | | | | | | as stubs. Notes: svn path=/head/; revision=129206
* C runtime support for FreeBSD/arm.Olivier Houchard2004-05-144-0/+169
| | | | Notes: svn path=/head/; revision=129205
* Import the softfloat emulation library, needed for FreeBSD/arm right now.Olivier Houchard2004-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. Notes: svn path=/head/; revision=129203
* Import the FreeBSD/arm libc bits.Olivier Houchard2004-05-1453-0/+6228
| | | | | | | Obtained from: NetBSD Notes: svn path=/head/; revision=129202
* We use __arm__, not __arm32__.Olivier Houchard2004-05-141-1/+1
| | | | Notes: svn path=/head/; revision=129201
* Define malloc_pageshift and malloc_minsize for arm.Olivier Houchard2004-05-141-0/+4
| | | | Notes: svn path=/head/; revision=129200
* Fixed some minor style bugs.Bruce Evans2004-05-132-14/+20
| | | | Notes: svn path=/head/; revision=129184
* Allow encoding modules to override the default implementations ofTim J. Robbins2004-05-138-9/+113
| | | | | | | | mbsrtowcs() and wcsrtombs(). Provide a fast implementation for the trivial "NONE" encoding. Notes: svn path=/head/; revision=129179
* Update raw byte count statistic correctly.Tim Kientzle2004-05-131-1/+1
| | | | Notes: svn path=/head/; revision=129173
* Add MLINK for newly-added archive_read_extract_set_progress_callback(3).Tim Kientzle2004-05-132-0/+2
| | | | Notes: svn path=/head/; revision=129172
* Add hook for a client-provided progress callback to be invokedTim Kientzle2004-05-136-2/+34
| | | | | | | during lengthy extract operations. Notes: svn path=/head/; revision=129171
* Fix braino in previous: check that the second byte in the characterTim J. Robbins2004-05-132-2/+2
| | | | | | | | buffer is non-null when the character is two bytes long, not when the buffer is two bytes long. Notes: svn path=/head/; revision=129166
* Fix some^Wseveral style bugs from last commit.Peter Edwards2004-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 Notes: svn path=/head/; revision=129161
* Fix typo.Josef El-Rayes2004-05-121-1/+1
| | | | | | | | Submitted by: Michel Lavondes <fox@vader.aacc.cc.md.us> PR: docs/66576 Notes: svn path=/head/; revision=129160
* Fix typo.Josef El-Rayes2004-05-121-1/+1
| | | | | | | | Submitted by: Michel Lavondès <fox@vader.aacc.cc.md.us> PR: docs/66538 Notes: svn path=/head/; revision=129159
* Reduce overhead by calling internal versions of the multibyte conversionTim J. Robbins2004-05-128-11/+19
| | | | | | | functions directly wherever possible. Notes: svn path=/head/; revision=129154
* Move prototypes of various encoding-related functions into a new headerTim J. Robbins2004-05-1216-71/+72
| | | | | | | file to avoid extern'ing them all over the place. Notes: svn path=/head/; revision=129153