summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Cause PORT commands to use the high IP port range. This makes fetchnsayer1999-03-301-2/+11
| | | | | | | (and its friends) more firewall friendly. PR: 10580 Submitted by: nsayer
* Disable the "Hint" option in phkmalloc as default. Recent VM systemphk1999-03-282-4/+4
| | | | | | | | | | | | changes have made this too expensive. This gains about 1.25% on worldstone on my SMP machine. Swap-less machines, for instance PicoBSDs, and machines which experience page-out trafic, check with top(1), will probably want to reenable this with: ln -s H /etc/malloc.conf Suggested by: alc (&dyson ?)
* Partial fix for the forking problem: if we can't access the master maps,des1999-03-271-4/+11
| | | | | | try again with the unrestricted map. PR: bin/10821
* Rename when building libc_r.dfr1999-03-251-2/+2
|
* PacketAliasProxyRule takes a const char *brian1999-03-251-1/+1
| | | | Reminded by: bde
* Add a ``const'' and remove some inconsistent prototype args.brian1999-03-243-4/+4
|
* Fix a (relatively harmless) braino. I confused myself over the for() looppeter1999-03-241-3/+2
| | | | | | | | | that counted the number of elements in argv. The counter is incremented in the next-iteration section of the loop, not the body, so at termination it's already "counted" the element that failed the continuation test - in this case the NULL argv terminator. Noted by: bde
* Remove duplicate line.billf1999-03-231-1/+0
| | | | Reviewed by: eivind
* Remove last remaining references to malloc/realloc and functions thatpeter1999-03-231-50/+40
| | | | | | | | | | | | | | | | | | | | | | | call them. All the execX() libc functions should be vfork() safe now. Specifically: - execlp() does the argument count-and-build into a vector from alloca (like the others) - buildargv() is no longer used (and gone). - execvp() uses alloca/strcpy rather than strdup(). - the ENOEXEC handler uses alloca rather than malloc. - a couple of free() calls removed - alloca works on the local stack and the allocations are freed on function exit (which is why buildargv wasn't useful - it's alloca() context would disappear on return). Along the way: - If alloca() fails (can it?), set errno = ENOMEM explicitly. - The ENOEXEC recovery routine that trys again with /bin/sh appeared to not be terminating the new argv[] array for /bin/sh, allowing it to walk off the end of the list. I dithered a bit about using alloca() even more as it's most commonly associated with gcc. However, standalone portable (using malloc) and machine-specific assembler alloca implementations appear to be available on just about all the architectures we're likely to want to port to. alloca will be the least of our problems if ever going to another compiler.
* Add a sysctl variable which can help stop chroot(2) escapes.phk1999-03-231-2/+29
| | | | | | | | | | | | | | | kern.chroot_allow_open_directories = 0 chroot(2) fails if there are open directories. kern.chroot_allow_open_directories = 1 (default) chroot(2) fails if there are open directories and the process is subject of a previous chroot(2). kern.chroot_allow_open_directories = anything else filedescriptors are not checked. (old behaviour). I'm very interested in reports about software which breaks when running with the default setting.
* [ The author's description... ]jb1999-03-23115-2006/+9492
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Runnable threads are now maintained in priority queues. The implementation requires two things: 1.) The priority queues must be protected during insertion and removal of threads. Since the kernel scheduler must modify the priority queues, a spinlock for protection cannot be used. The functions _thread_kern_sched_defer() and _thread_kern_sched_undefer() were added to {un}defer kernel scheduler activation. 2.) A thread (active) priority change can be performed only when the thread is removed from the priority queue. The implementation uses a threads active priority when inserting it into the queue. A by-product is that thread switches are much faster. A separate queue is used for waiting and/or blocked threads, and it is searched at most 2 times in the kernel scheduler when there are active threads. It should be possible to reduce this to once by combining polling of threads waiting on I/O with the loop that looks for timed out threads and the minimum timeout value. o Functions to defer kernel scheduler activation were added. These are _thread_kern_sched_defer() and _thread_kern_sched_undefer() and may be called recursively. These routines do not block the scheduling signal, but latch its occurrence. The signal handler will not call the kernel scheduler when the running thread has deferred scheduling, but it will be called when running thread undefers scheduling. o Added support for _POSIX_THREAD_PRIORITY_SCHEDULING. All the POSIX routines required by this should now be implemented. One note, SCHED_OTHER, SCHED_FIFO, and SCHED_RR are required to be defined by including pthread.h. These defines are currently in sched.h. I modified pthread.h to include sched.h but don't know if this is the proper thing to do. o Added support for priority protection and inheritence mutexes. This allows definition of _POSIX_THREAD_PRIO_PROTECT and _POSIX_THREAD_PRIO_INHERIT. o Added additional error checks required by POSIX for mutexes and condition variables. o Provided a wrapper for sigpending which is marked as a hidden syscall. o Added a non-portable function as a debugging aid to allow an application to monitor thread context switches. An application can install a routine that gets called everytime a thread (explicitly created by the application) gets context switched. The routine gets passed the pthread IDs of the threads that are being switched in and out. Submitted by: Dan Eischen <eischen@vigrid.com> Changes by me: o Added a PS_SPINBLOCK state to deal with the priority inversion problem most often (I think) seen by threads calling malloc/free/realloc. o Dispatch signals to the running thread directly rather than at a context switch to avoid the situation where the switch never occurs.
* Typo fix.jkoshy1999-03-231-1/+1
| | | | | PR: docs/10733 Submitted by: Steve Coltrin <spcoltri@io.com>
* Simplified using new SYMLINKS macro, mainly to test this macro. Thebde1999-03-231-26/+15
| | | | | | | | | | ifdefs are too ugly for this to be much of a simplification. The existence tests are even uglier now. Note that the previous commit was not submitted by me. It missed the point and just added a second layer of unused removals. Fixed hard-coded "libcrypt"s. The LCRYPTBASE macro mainly makes things hard to read, but use it while we have it.
* Typo fix (set --> get).alex1999-03-222-6/+6
| | | | Obtained from: OpenBSD (David Leonard)
* Address our users in a civilized manner. (They may know better, but probablyphk1999-03-221-11/+5
| | | | just forgot it, it is certainly no reason to don't insult them.)
* Don't be so selective about which errors cause us to continue andimp1999-03-211-7/+2
| | | | | | | | which ones cause us to fail. Now all open errors on the databse file will cause the next file in the list to be tried. Submitted by: Arne Henrik Juul <arnej@math.ntnu.no> PR: 4585
* Add "-fkeep-inline-functions" to CFLAGS so that higher optimizationjdp1999-03-152-6/+4
| | | | | | | | levels (-O3 and above) won't remove essential code. Many thanks to Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru> for pointing out that it was the optimizer's removal of this code that caused make world with -O3 to break. With this change, make buildworld now completes.
* EACESS -> EACCESalex1999-03-153-5/+5
|
* Build libwrap - the core to tcp_wrappers.markm1999-03-142-2/+31
|
* Reverse the order of processing object files within an executable orjdp1999-03-132-6/+6
| | | | | | | | | | | | | shared library when invoking global constructors and destructors. For constructors, the object files used to be processed from first to last; now they're done from last to first. (Destructors are done in the opposite order, as required by the C++ standard.) This makes us consistent with standard gcc and egcs compilers. It also eliminates ordering differences between dynamic and static executables. Bump the value of __FreeBSD_version to 400002 to reflect this change.
* Move the code for the ".init" and ".fini" sections outside of ajdp1999-03-126-30/+30
| | | | | | | | | C function so the compiler won't try to emit line numbers for it with "-g", breaking the build. This has the nice side-effect of making crtbegin.o and crtbeginS.o a little bit smaller. Remove "-Wno-unused" from the Makefile. Replace it with "__unused" on particular function and variable declarations.
* make libkvm capable of dealing with a crashdump on alphasgallatin1999-03-121-50/+65
| | | | Reviewed by: Doug Rabson <dfr@nlsystems.com>
* Add support for long long modifier (e.g. %llx, %lld).dfr1999-03-111-3/+9
| | | | Reviewed by: bde
* Get the pid right if a stale lock file exists.brian1999-03-111-4/+4
| | | | | PR: 10531 Submitted by: Lawrence D. Lopez <lopez@cisco.com>
* PID_MAX is now 99999.roberto1999-03-101-1/+1
| | | | | PR: docs/10530 Submitted by: Ben Smithurst <ben@scientia.demon.co.uk>
* Remove all diagnostics to stdout/stderr with #ifdef DEBUGbrian1999-03-094-22/+54
| | | | Statify functions in alias_nbt.c
* Explain ENXIO error status with respect to fifos.ghelmer1999-03-071-0/+4
| | | | PR: docs/8559
* Document PacketAliasPptp() and allow it to be disabledbrian1999-03-072-2/+31
| | | | by passing INADDR_NONE.
* Remove unused function stubs.brian1999-03-071-77/+0
|
* Mention that PacketAliasProxyRule() doesn't accept host names,brian1999-03-071-1/+3
| | | | just IP numbers.
* Document PacketAliasProxyRule() and fix a typo.brian1999-03-061-1/+88
|
* Fixed prototype for fetchParseURL().bde1999-03-051-2/+2
|
* Fixed bitrot in synopsis (some const poisoning hadn't reached here).bde1999-03-052-4/+4
|
* Don't use u_long in the synopsis, since u_long is not part of the kvmbde1999-03-051-2/+2
| | | | interface.
* Fixed missing header in synopsis (<devstat.h> unfortunately depends onbde1999-03-051-1/+2
| | | | <sys/dkstat.h>).
* Fixed missing header in synopsis (<camlib.h> includes half the universebde1999-03-052-2/+4
| | | | but not <stdio.h>).
* Fixed bitrot in synopsis (some const poisoning had not reached here).bde1999-03-052-4/+4
|
* Fixed bitrot in synopsis (some const poisoning hadn't reached here).bde1999-03-051-2/+2
|
* Don't bogotify the synopsis by attempting to describe err_set_file() there.bde1999-03-051-11/+19
| | | | Fixed some disorder.
* Fixed references to unmount(2) specified as umount.alex1999-03-051-4/+4
| | | | | Submitted by: Markus Friedl <markus.friedl@informatik.uni-erlangen.de> via OpenBSD
* Fixed disordering and incoinsistent style in previous commit.bde1999-03-051-3/+3
|
* The pseudocode in the synopsis didn't come close to actuallybde1999-03-051-4/+6
| | | | | | | | | compiling, since <stdio.h> correctly doesn't declare off_t although the pseudo-prototypes for the new fseeko() and ftello() functions use it. Handle this like the corresponding problem for va_list versus the vprintf() family. Fixed some English errors.
* Don't use undocumented markup "{}". Use 32767 instead of LINK_MAX tobde1999-03-051-4/+3
| | | | give bug for bug compatibility with intro.2.
* Backed out most of rev.1.4. I didn't submit it; I only submitted abde1999-03-051-7/+8
| | | | | | | | | request for it something like it. It was poorly worded and too far from both POSIX wording and normal (mal)practice by referring to sysconf(_SC_NGROUPS_MAX) instead of {NGROUPS_MAX} or NGROUPS. POSIX.1 uses curly braces to mark up "symbolic constants or limits [that may be] defined in certain headers". Since we don't document this markup, don't use it. Just use NGROUPS_MAX.
* Use sysctlbyname() instead of sysctl().phk1999-03-051-6/+2
|
* Forgot to add $Id$ and change date in previous commit.bde1999-03-051-1/+2
|
* Changed the type of quotactl()'s 4th arg from `char *' to `void *'bde1999-03-051-1/+1
| | | | | | | | | so that non-sloppy applications can call it without using disgusting casts to avoid warnings. The 4th arg is sort of varargs -- it must sometimes represent a filename, sometimes a struct pointer, and is sometimes unused. The arg type is still caddr_t in the kernel. Obtained from: mostly from NetBSD
* These were missing from the previous commit.imp1999-03-0312-0/+12
|
* Bring in initial libc support for mips. These files were taken fromimp1999-03-0348-0/+2684
| | | | | the OpenBSD tree and should be considered preliminary. They are here to facilitate building of the tree.
* add more MLINKSache1999-03-021-1/+8
|
OpenPOWER on IntegriCloud