summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Stubs are required in libc so that it can be used with libpthreadjb1998-04-291-1/+5
| | | | | (and kernel threads), but weak symbols and non-weak symbols of the same name built into libc_r result in unpredictable linking.
* Oops, revert part of a diff that wasn't supposed to have been committed.dg1998-04-281-2/+2
|
* Cache the results of the ps_strings sysctl so that it doesn't have to bedg1998-04-281-10/+12
| | | | redone for every call of setproctitle().
* `sigprocmask()' man page references `sigmask()' in synopsis.phk1998-04-261-1/+0
| | | | | | | | | Note odd `sigmask()' line in synopsis. `sigsetops(3)' is better suited for `sigprocmask' and is already referenced from the manual page. (`sigmask()' is useful for the older (& deprecated) `sigsetmask()' API). PR: 6395 Reviewed by: phk Submitted by: Joseph Koshy <koshy@india.hp.com>
* Make asctime_r static if !_THREAD_SAFE to prevent namespace pollution andache1998-04-251-0/+7
| | | | prototype mismatch
* Improve description.rnordier1998-04-221-5/+6
| | | | Submitted by: Arne Henrik Juul <arnej@imf.unit.no>
* indentdima1998-04-201-1/+1
|
* Add a #ifdef _THREAD_SAFE around ctime_rphk1998-04-201-0/+2
|
* Describe timegm()ache1998-04-202-5/+16
|
* Backed out lseek changes.des1998-04-191-1/+1
|
* ctime_r and asctime_r are not implemented.phk1998-04-192-3/+21
| | | | | | | | prototypes in time.h do not match POSIX. PR: 6345 Reviewed by: phk Submitted by: Dmitry Khrustalev <dima@xyzzy.machaon.ru>
* Return EINVAL and do not changefile pointer if resulting offset is negative.des1998-04-181-2/+2
| | | | PR: kern/6184
* Typo policebrian1998-04-171-1/+1
|
* Fix a nasty flaw as a result of using the arc4random() pre-seeding ofpeter1998-04-141-2/+4
| | | | | | | | leading XXX's. It could wrap an uppercase character through chars like: [ \ ] ^ _ ` in between Z and a. The backslash and back tick might be particularly nasty in a shell script context. Also, since we've been using upper-case generated values for a while now, go with the flow and use them in the pathname search rotation.
* Add FILE locking stubs for libc.jb1998-04-1128-337/+211
| | | | | | | | Change the FILE locking to support kernel threads when linked with libpthread (which you haven't see yet). This requires that libc become thread-safe and thread-aware, testing __isthreaded before attempting to do lock/unlock calls. The impact on non-threaded programs is minor. This change works with libc_r, so it's the best compromise.
* Remove a nolonger implented "BUGS" description.phk1998-04-111-14/+0
| | | | | | PR: 6240 Reviewed by: phk Submitted by: Niall Smart rotel@indigo.ie
* Add a global variable called __isthreaded that can be tested throughoutjb1998-04-111-0/+9
| | | | | | | | libc to determine if locking is required. This is needed in libc for use with kernel threads, but until a thread is created, we don't really want to bother locking things. The variable was added here because the crt code calls exit(main()) so all programs will get the variable.
* Add a private header file for libc/libc_r/libpthread to containjb1998-04-111-0/+66
| | | | definitions for things like locking etc.
* Change in name of the static initializer define.jb1998-04-043-7/+7
|
* Finish _POSIX_PRIORITY_SCHEDULING. Needs P1003_1B anddufault1998-03-286-54/+586
| | | | | | | | | | | | | | | | _KPOSIX_PRIORITY_SCHEDULING options to work. Changes: Change all "posix4" to "p1003_1b". Misnamed files are left as "posix4" until I'm told if I can simply delete them and add new ones; Add _POSIX_PRIORITY_SCHEDULING system calls for FreeBSD and Linux; Add man pages for _POSIX_PRIORITY_SCHEDULING system calls; Add options to LINT; Minor fixes to P1003_1B code during testing.
* For 1.3, NetBSD replaced the swapon() syscall with swapctl() and movedjb1998-03-232-2/+46
| | | | | the only call to compat_12 which isn't there by default. Provide a wrapper.
* (Ab)use .Vt instead of .Fd for a variable declaration.bde1998-03-231-2/+2
|
* Fixed bitrot in synopsis. Didn't fix bitrot elsewhere.bde1998-03-231-6/+7
|
* For 1.3, NetBSD walloped the msync syscall and replaced it withjb1998-03-232-2/+59
| | | | | | __msync13. The old one got moved to compat_12. Wrap __msync13 up to look like FreeBSD's msync and be careful to respect the fact that MS_SYNC is 0x0000 on FreeBSD, but 0x0004 on NetBSD.
* .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aqcharnier1998-03-198-28/+32
|
* <sys/errno.h> -> <errno.h>eivind1998-03-161-1/+1
|
* Fixed disordering and inconsistent style in previous commit.bde1998-03-121-3/+2
|
* Nearly missed this one.jb1998-03-092-2/+40
| | | | | | | List non-default asm sources in MDASM so that they replace the defaults. For funny or incomplete syscalls, list them in NOASM to stop them from getting built as defaults.
* Add #include <unistd.h> to get the prototype for __syscall().jb1998-03-091-1/+2
| | | | Cast to long before casting to a void ptr to shut up gcc.
* Yikes, this is the worst of the lot. Bruce suggested doing this (!).jb1998-03-091-58/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | Include the architecture specific sys makefile like previously, but what this contains differs. It defines MDASM which list architecture specific asm code that *replaces* syscalls of the same name defined in MIASM (which gets defined by the syscall.mk or netbsd_syscall.mk dependent of NETBSD_SYSCALLS being defined). If a syscall has a C source implementation or something funny done to it, or just doesn't need default asm source generated for it, then it is listed in NOASM. syscall.mk is generated by makesyscalls.sh with other syscall files. netbsd_syscall.mk is a hand-generated equivalent. So if a new syscall is added and no other makefiles are edited, it will automatically have the default asm source generated for it (whether you want it or not). Anything listed in MDASM gets added to SRCS and gets built. For each syscall name in MIASM, if it doesn't exist in MDASM or NOASM, it gets added to the ASM or ASMR lists to have code generated for it. If the syscall name was listed in HIDDEN_SYSCALLS (intended for use by libc_r, not libc which has it defined, but empty), then the name is added to the ASMR list and gets renamed before being built; otherwise it is added to the ASM list and gets built with the same name. I wonder if this is too complicated. But it works on both i386 and alpha.
* Function to return a pointer to the non-threaded errno. This is declaredjb1998-03-091-0/+47
| | | | | with a weak symbol so that it won't be linked when linking against libc_r or libpthread.
* Compatibility functions for use when __NETBSD_SYSCALLS is defined.jb1998-03-092-0/+222
|
* Oops, we don't need NetBSD's malloc 'cause we can turn off utracejb1998-03-092-438/+2
| | | | in phk's malloc.
* NetBSD doesn't have a utrace syscall, so don't define that ifjb1998-03-091-2/+4
| | | | __NETBSD_SYSCALLS is defined.
* Added #include <string.h> to get prototypes.jb1998-03-092-1/+3
|
* Change MACHINE to MACHINE_ARCH.jb1998-03-091-12/+4
| | | | | | Add _spinlock.c (stubs) to sources. Nuke tahoe and vax.
* Stub functions for thread locking with weak symbols so that they arejb1998-03-091-0/+60
| | | | only linked when not linking an application against libc_r or libpthread.
* This commit was generated by cvs2svn to compensate for changes in r34375,jb1998-03-0952-0/+3391
|\ | | | | | | which included commits to RCS files with non-trunk default branches.
| * Import sources from NetBSD, tweaked for building in FreeBSD.jb1998-03-0952-0/+3391
| |
| * This commit was manufactured by cvs2svn to create branch 'JB'.cvs2svn1998-01-10989-184756/+0
| |
* | MACHINE -> MACHINE_ARCHjb1998-03-091-2/+2
| |
* | Define empty variables in case no names are added to them. This avoidsjb1998-03-091-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | substitution errors for variables that don't exist. If a machine architecture dependent makefile exists, include it to discover if libc or libc_r is being built with NetBSD syscalls instead of FreeBSD ones. Put a NO_QUAD thingy around the quad makefile so that 64-bit architectures can ignore that sh*t. In the test for MDSRCS being empty, add all MISRCS to SRCS, rather than just ignoring them.
* | Add an include path to private linc/libc_r/libpthread header files.jb1998-03-091-2/+7
| | | | | | | | | | | | | | | | | | Define the HIDDEN_SYSCALLS macro as empty because libc doesn't have renamed syscalls. This avoids an undefined macro error when libc/sys/Makefile.inc goes to look though it. HIDDEN_SYSCALLS is used by the equivalent makefile to this one in lib/libc_r to list those syscalls that it needs to rename so that libc_r can provide replacement functions.
* | Add a private (to libc, libc_r and libpthread) header file containingjb1998-03-091-0/+52
| | | | | | | | | | | | prototypes for the spinlock functions that will be used for thread locks. libc will have stubs declared with weak symbols. libpthread and libc_r will have functions that really do something.
* | These files are very specific to FreeBSD kernels, so silently compilejb1998-03-092-1/+6
| | | | | | | | no code when building a library with __NETBSD_SYSCALLS defined.
* | NetBSD implements semctl using a __semctl syscall instead of thejb1998-03-091-0/+4
| | | | | | | | | | semsys syscall that FreeBSD kernels use. Grumble. So make the call dependent on if __NETBSD_SYSCALLS is defined.
* | getvfsbyname() doesn't existing NetBSD, so return ENOSYS if compiledjb1998-03-091-1/+5
| | | | | | | | into a library with __NETBSD_SYSCALLS defined.
* | Change a variable to type size_t to suit the sysctl prototype.jb1998-03-091-2/+4
| | | | | | | | Add #include <string.h> to get prototypes.
* | Cast pointer to a long instead of an int to keep a 64-bit compilerjb1998-03-091-1/+1
| | | | | | | | happy. The code works either way, but I like a clean compile.
* | Reviewed by: bdedufault1998-03-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes to support building with _POSIX_SOURCE set to 199309L: 1. Add sys/_posix.h to handle those preprocessor defs that POSIX says have effects when defined before including any header files; 2. Change POSIX4_VISIBLE back to _POSIX4_VISIBLE 3. Add _POSIX4_VISIBLE_HISTORICALLY for pre-existing BSD features now defined in POSIX. These show up when: _POSIX_SOURCE and _POSIX_C_SOURCE are not set or _POSIX_C_SOURCE is set >= 199309L and vanish when: _POSIX_SOURCE is set or _POSIX_C_SOURCE is < 199309L. 4. Explain these in man 9 posix4; 5. Include _posix.h and conditionalize on new feature test.
OpenPOWER on IntegriCloud