summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Make NULL a (void*)0 whereever possible, and fix the warnings(-Werror)markm2004-03-058-11/+12
| | | | | | | | | | | | | | | that this provokes. "Wherever possible" means "In the kernel OR NOT C++" (implying C). There are places where (void *) pointers are not valid, such as for function pointers, but in the special case of (void *)0, agreement settles on it being OK. Most of the fixes were NULL where an integer zero was needed; many of the fixes were NULL where ascii <nul> ('\0') was needed, and a few were just "other". Tested on: i386 sparc64
* Correctly read SCHILY.nlink from pax-format archives.kientzle2004-03-051-0/+2
| | | | | In particular, -tv output for pax-format archives now lists everything that ls -l does.
* Document missing EFAULT errno value.dds2004-03-031-0/+8
| | | | MFC after: 2 weeks
* Make return code in noarg case GNU-compatibleache2004-03-032-20/+24
|
* Be more GNU-compatible in diagnosticsache2004-03-031-11/+61
|
* If handed a file pointer we can't write to, set errno properly to EBADFjkh2004-03-021-1/+4
| | | | | | | in order to get SUSv2 conformant behavior in higher level calls like fputs() and puts(). Reviewed by: bde
* Hook libthr to the build for PowerPCgrehan2004-03-021-1/+1
|
* libthr powerpc support.grehan2004-03-022-0/+63
| | | | | Submitted by: Suleiman Souhlal <refugee@segfaulted.com> Tested with: most libpthread tests, Apache 'worker' MDM
* makecontext lib call.grehan2004-03-023-3/+167
| | | | Submitted by: Suleiman Souhlal <refugee@segfaulted.com>
* Improve GNU compatibility in several places, use internal GNU_COMPATIBLEache2004-03-012-29/+49
| | | | | | | define for it. Don't catch POSIXLY_CORRECT env. into static variable, it can be changed on the fly by program. Use P1003.2 standartized illoptchar[]
* Comment out things related to getopt() replacement we not useache2004-03-011-36/+36
|
* Change "-"-started options when POSIX_CORRECTLY is set handlingache2004-03-011-17/+17
| | | | | in favour of GNU instead of NetBSD, because configure's use us and expect GNU.
* Change "-"-started options when POSIX_CORRECTLY is set handlingache2004-03-011-1/+5
| | | | | in favour of GNU instead of NetBSD, because configure's use us and expect GNU.
* Back out the "clean_environment()" function from libutil.kientzle2004-02-293-211/+4
| | | | | | | Further contemplation has convinced me that this was not going to really solve the problem of environment-poisoning without raising serious administrative headaches. There must be a better way...
* Make consistent with the better written wcsrtombs function:dds2004-02-271-4/+5
| | | | | | - Fix syntax - Remove the (slightly wrong) duplicate explanation of the error condition - Change reference to invalid multibyte character into invalid wide character
* Add the clean_environment call to libutil.h also.kientzle2004-02-261-0/+2
| | | | MFC after: 2 weeks
* Add a clean_environment call to libutil.kientzle2004-02-263-4/+211
| | | | | | | | | | | | | | | | | This function removes all environment variables except the ones listed on a "whitelist." The function accepts two whitelist arguments. If the first is NULL, a built-in default list will be used. This allows callers to get a variety of behaviors: * Default screening: provide NULL for both lists * Custom screening: provide a custom list for the first argument * Modified default screening: provide NULL for first arg, list of additional variables to preserve in the second arg Idea from: Jacques Vidrine MFC after: 2 weeks
* Add extra sanity check for SDP packets in libsdp(3)emax2004-02-261-0/+1
| | | | Fix yet another endianess bug in sdpd(8)
* Backed out rev.1.6 and subsequent copying of it (bogus addition ofbde2004-02-261-6/+6
| | | | | | | | | | | | | -static to CFLAGS). It just turned rev.1.5 into an obfuscated no-op. As explained in the log for rev.1.5, testing should be done in the host environment but there is a problem in cross-compilation environments. As not explained in the log for rev.1.6, there was apparently a practical problem with cross-compiling (makeworld should have set -static in LDFLAGS but apparently didn't). Cross-compilation was especially complicated because the relevant programs are test programs that were run at beforeinstall time -- dynamic libraries might or might not exist depending on the build options. The complications became moot in rev.1.8 when beforeinstall was renamed "test".
* Make the resolver(3) and many associated interfaces much more reentrant.green2004-02-2513-52/+280
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The getaddrinfo(3), getipnodebyname(3) and resolver(3) can coincide now with what should be totally reentrant, and h_errno values will now be preserved correctly, but this does not affect interfaces such as gethostbyname(3) which are still mostly non-reentrant. In all of these relevant functions, the thread-safety has been pushed down as far as it seems possible right now. This means that operations that are selected via nsdispatch(3) (i.e. files, yp, dns) are protected still under global locks that getaddrinfo(3) defines, but where possible the locking is greatly reduced. The most noticeable improvement is that multiple DNS lookups can now be run at the same time, and this shows major improvement in performance of DNS-lookup threaded programs, and solves the "Mozilla tab serialization" problem. No single-threaded applications need to be recompiled. Multi-threaded applications that reference "_res" to change resolver(3) options will need to be recompiled, and ones which reference "h_errno" will also if they desire the correct h_errno values. If the applications already understood that _res and h_errno were not thread-safe and had their own locking, they will see no performance improvement but will not actually break in any way. Please note that when NSS modules are used, or when nsdispatch(3) defaults to adding any lookups of its own to the individual libc _nsdispatch() calls, those MUST be reentrant as well.
* Add bsde_add_rule(), which is similar to bsde_set_rule() except thatrwatson2004-02-255-4/+79
| | | | | | | | the caller does not specify the rule number -- instead, the kernel module is probed for the next available rule, which is then used. Obtained from: TrustedBSD Project Sponsored by: DARPA, McAfee Research
* No reason to disable this test on powerpc.grehan2004-02-251-2/+0
|
* Use signed char cast to avoid out-of-range error on PowerPC (which hasgrehan2004-02-251-4/+5
| | | | | | unsigned char by default). This is a no-op on all other current arches. Tested by: md5 sum before/after same on i386
* Add getopt_long_only() from OpenBSD and other OpenBSD cleanupsache2004-02-243-299/+459
| | | | | PR: 63173 Submitted by: Marius Strobl <marius@alchemy.franken.de>
* Apply style(9).green2004-02-231-2/+6
| | | | | Submitted by: "Christian S.J. Peron" <maneo@bsdpro.com> PR: bin/63283
* style.Makefile:johan2004-02-232-2/+2
| | | | Use WARNS?= instead of WARNS=.
* Add signal numbers to signal(3).josef2004-02-231-33/+36
| | | | | | | Approved by: simon(mentor) Reviewed by: ru Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at> PR: docs/60044
* Add optarg, optind, opterr, optopt, optreset to SYNOPSYSache2004-02-231-0/+5
|
* POSIX clearly states that getsubopt() should be declared in <stdlib.h>ache2004-02-231-1/+1
| | | | not in <unistd.h>
* Remove unneccessary <unistd.h>ache2004-02-231-1/+0
|
* Update man page to reflect additional flag to allow selection of threads.deischen2004-02-221-0/+3
|
* Teach kvm_getprocs() to recognize a sysctl flag for including threads.deischen2004-02-221-5/+8
|
* Change the syscall stub branch orders so that the static branch predictionpeter2004-02-224-12/+51
| | | | will assume that syscalls will succeed rather than fail.
* Fix a couple of potential buffer overflows.harti2004-02-212-12/+10
| | | | Submitted by: christer.oberg@texonet.com
* Remove the triplicity in the public functions by vectoring them allphk2004-02-211-70/+49
| | | | | | | | | | through a realloc like function. Make the malloc_active variable a local static to this new function. Don't warn about recursion more than once per base call. constify malloc_func.
* Move the check for sensitive processes to the point where the exceptionphk2004-02-211-14/+7
| | | | | | | | | has been hit, this makes it cover more cases. Call the message function directly rather than fiddle with flag-saving when we find an unknown character in our options. The 'A' flag should not trigger on legal out of memory conditions.
* add destination address selection support for getipnodebyname(3).ume2004-02-201-1/+225
| | | | | though getipnodebyname(3) is obsoleted api, some major applications such as Mozilla are still using it. so, it will help ipv4 users.
* Unbreak the upgrade path from 4.9 after removal of GNU getopt andru2004-02-201-2/+0
| | | | <gnuregex.h>.
* Document dependence of mktemp(3) on the non-reentrant arc4random(3).green2004-02-201-0/+7
|
* Moving forward, there's no reason to exclude libpthread on sparc64.marcel2004-02-201-1/+1
|
* Implement PThreads barriers and barrier attributes.mtm2004-02-196-1/+236
|
* Don't wake up the thread after the signal handlermtm2004-02-191-1/+1
| | | | | | | | has been executed. On return from the signal handler the call will either be restarted or EINTR will be returned, but it will not go back to its previous state. So, it is sufficient to simply change the state to 'running' without actually trying to wake up the thread.
* Remove thr_getschedparam.c since it's contents have been moved intomtm2004-02-181-1/+0
| | | | thr_setschedparam.c
* There are consumers of rwlocks, inluding our own libc, that depend onmtm2004-02-181-96/+24
| | | | | | | | | | a PTHREAD_RWLOCK_INITIALIZER to do for rwlocks what a similarly named symbol does for statically initialized mutexes. This symbol was dropped in The Open Group Base Specifications Issue 6 and does not exist in IEEE Std 1003.1, 2003, but it should still be supported for backwards compatibility. Pointy hat: mtm
* o Catch up with the mutex priority protocol fixes.mtm2004-02-182-121/+65
| | | | | o Move pthread_getschedparam() into the same file with it's pthread_set* counterpart. Copyright on both files is identical.
* o Stylemtm2004-02-182-48/+39
| | | | | | o Instead of checking both the passed in pointer and its value for NULL, only check the latter. Any caller that passes in a NULL pointer is obviously wrong.
* o Refactor and, among other things, get rid of insane nesting levels.mtm2004-02-182-811/+305
| | | | | | | o Fix mutex priority protocols. Keep separate counts of priority inheritance and protection mutexes to make things easier. This will not have much affect since this is only the userland side, and the rest involves kernel scheduling.
* Move the initialization of thread priority to a common function.mtm2004-02-182-6/+3
|
* Move the weak references to the top of the file to conformmtm2004-02-181-43/+22
| | | | to the format of other similar files in libthr.
* Remove the code and an associated comment for gcc 1.x compatibilitydas2004-02-161-9/+1
| | | | and fix a typo in the !__GNUC__ case.
OpenPOWER on IntegriCloud