summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Oops, the previous log message should have been:bde1999-04-101-1/+1
| | | | | | | | Include <machine/ansi.h> so that this file is self-sufficient again. Rev.1.6 doesn't do this as claimed unless <nlist.h> has nonstandard pollution. Cleaned up includes.
* Various language and style concerns fixed.imp1999-04-091-11/+18
| | | | Noted by: bde
* Declare mkstemps().bde1999-04-091-4/+5
|
* Fixed missing include in synopsis.bde1999-04-096-21/+13
| | | | Fixed some mdoc usage errors.
* Ugh. I didn't know this Makefile was reaching over into the dynamicjdp1999-04-091-2/+4
| | | | | linker sources for some of its header files. Add a -I flag to pick up a new directory over there.
* If given host.domain:nn[.nn], trimdomain() now reduces it tobrian1999-04-092-10/+54
| | | | host:nn[.nn] (if the domain is the same as the local one).
* bcopy -> memmovebrian1999-04-081-2/+2
| | | | Suggested by: archie
* Tidy up trimdomain() and document it.brian1999-04-073-12/+76
| | | | Don't truncate one byte short of the passed length.
* Add aout to the links also.jhay1999-04-071-2/+3
| | | | Reviewed by: peter
* Handle hostnames up to MAXHOSTNAMELEN-1 in length.brian1999-04-071-10/+9
| | | | | | Use bcopy() instead of strcpy() to handle potentially overlapping regions. Un-obscure/complicate some code.
* Put parenthesis around sizeof args.brian1999-04-071-6/+6
| | | | | | Allow for host names up to MAXHOSTNAMELEN - 1 in length. Prompted by: bde
* Add manpage link for dlversion(3).jdp1999-04-071-2/+3
|
* Add a new function dlversion() which returns the version number ofjdp1999-04-072-2/+34
| | | | | | the dynamic linker in the same form as __FreeBSD_version. This is mainly intended for checking the dynamic linker version during a make world.
* Add realhostname() - a function to correctly lookupbrian1999-04-064-3/+190
| | | | | a name by address and ensure that the name resolves back to the original address.
* Fix bug that prevented accounts with empty passwords from loggingjdp1999-04-061-1/+1
| | | | | | in. Submitted by: Paul Traina <pst@juniper.net>
* Install these compat libs to /usr/lib/compat/aout. I think this will workpeter1999-04-063-6/+6
| | | | with the release builds.
* Fixed disordering in previous 2 commits. Fixed an English error.bde1999-04-051-5/+6
|
* Add wrappers for pread and pwrite syscalls.dt1999-04-046-11/+119
|
* Add mkstemps to the man page, and create a link for it.imp1999-04-042-2/+14
| | | | | Obtained from: OpenBSD Poked in the eye about committing new functions without a manpage: obrien
* Add mkstemps from OpenBSD. This has been in my tree for months andimp1999-04-041-7/+24
| | | | | | hasn't caused any problems until the egcs import. This fix breaks the world build, but my very next commit will remove mkstemps from the egcs build.
* Manpages for the KLD system calls.dfr1999-04-047-1/+450
| | | | | PR: docs/10412 Submitted by: Chris Costello <chris@calldei.com>
* Fix a macro name typo that made a word disappear.jdp1999-04-031-1/+1
|
* Add data storage for two application-provided variables.ache1999-04-032-2/+4
| | | | | GNU configure goes very mad when sensing anything with -lwrap since those two vars are missing
* 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
OpenPOWER on IntegriCloud