summaryrefslogtreecommitdiff
path: root/lib/libc/gen/getcap.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix SCM ID's.David E. O'Brien2002-02-011-21/+21
| | | | Notes: svn path=/head/; revision=90039
* Remove _THREAD_SAFE and make libc thread-safe by default byDaniel Eischen2001-01-241-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adding (weak definitions to) stubs for some of the pthread functions. If the threads library is linked in, the real pthread functions will pulled in. Use the following convention for system calls wrapped by the threads library: __sys_foo - actual system call _foo - weak definition to __sys_foo foo - weak definition to __sys_foo Change all libc uses of system calls wrapped by the threads library from foo to _foo. In order to define the prototypes for _foo(), we introduce namespace.h and un-namespace.h (suggested by bde). All files that need to reference these system calls, should include namespace.h before any standard includes, then include un-namespace.h after the standard includes and before any local includes. <db.h> is an exception and shouldn't be included in between namespace.h and un-namespace.h namespace.h will define foo to _foo, and un-namespace.h will undefine foo. Try to eliminate some of the recursive calls to MT-safe functions in libc/stdio in preparation for adding a mutex to FILE. We have recursive mutexes, but would like to avoid using them if possible. Remove uneeded includes of <errno.h> from a few files. Add $FreeBSD$ to a few files in order to pass commitprep. Approved by: -arch Notes: svn path=/head/; revision=71579
* Fix some error-handling logic so that ferror is called before fclose,Garance A Drosehn2000-12-021-7/+21
| | | | | | | | | | | | instead of immediately after the fclose. The previous logic did work on freebsd, but is somewhat risky practice (and causes trouble when porting to other OS's). PR: bin/22965 Reviewed by: Garrett Wollman Notes: svn path=/head/; revision=69502
* Fix a memory leak in getent() that occurred when the requested entryTim Vanderhoek2000-05-211-1/+3
| | | | | | | | | could not be found. PR: bin/17084 Notes: svn path=/head/; revision=60747
* Simplify sytem call renaming. Instead of _foo() <-- _libc_foo <-- foo(),Jason Evans2000-01-271-7/+7
| | | | | | | | | | | | | | | | | | | | just use _foo() <-- foo(). In the case of a libpthread that doesn't do call conversion (such as linuxthreads and our upcoming libpthread), this is adequate. In the case of libc_r, we still need three names, which are now _thread_sys_foo() <-- _foo() <-- foo(). Convert all internal libc usage of: aio_suspend(), close(), fsync(), msync(), nanosleep(), open(), fcntl(), read(), and write() to _foo() instead of foo(). Remove all internal libc usage of: creat(), pause(), sleep(), system(), tcdrain(), wait(), and waitpid(). Make thread cancellation fully POSIX-compliant. Suggested by: deischen Notes: svn path=/head/; revision=56698
* Add three-tier symbol naming in support of POSIX thread cancellationJason Evans2000-01-121-7/+7
| | | | | | | | | points. For library functions, the pattern is __sleep() <-- _libc_sleep() <-- sleep(). The arrows represent weak aliases. For system calls, the pattern is _read() <-- _libc_read() <-- read(). Notes: svn path=/head/; revision=55837
* Add unsigned char cast to isspace argAndrey A. Chernov1999-11-041-1/+3
| | | | Notes: svn path=/head/; revision=52856
* Don't be so selective about which errors cause us to continue andWarner Losh1999-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 Notes: svn path=/head/; revision=44921
* Replace memory leaking instances of realloc with non-leaking reallocf.Warner Losh1998-09-161-7/+7
| | | | | | | | | | | | | | In some cases replace if (a == null) a = malloc(x); else a = realloc(a, x); with simple reallocf(a, x). Per ANSI-C, this is guaranteed to be the same thing. I've been running these on my system here w/o ill effects for some time. However, the CTM-express is at part 6 of 34 for the CAM changes, so I've not been able to do a build world with the CAM in the tree with these changes. Shouldn't impact anything, but... Notes: svn path=/head/; revision=39327
* Change L_SET to SEEK_SET for POSIX compliance.John Polstra1997-10-261-1/+1
| | | | | | | Submitted by: Dean Gaudet <dgaudet@arctic.org> Notes: svn path=/head/; revision=30713
* Many places in the code NULL is used in integer context, wherePoul-Henning Kamp1997-09-181-1/+1
| | | | | | | | | | | | plain 0 should be used. This happens to work because we #define NULL to 0, but is stylistically wrong and can cause problems for people trying to port bits of code to other environments. PR: 2752 Submitted by: Arne Henrik Juul <arnej@imf.unit.no> Notes: svn path=/head/; revision=29574
* Minor cleanup, mostly unused vars and missing #includes.Poul-Henning Kamp1995-10-221-3/+0
| | | | Notes: svn path=/head/; revision=11659
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-27/+27
| | | | Notes: svn path=/head/; revision=8870
* Parse ^? now, our termcap use it and some termcaps from otherAndrey A. Chernov1995-05-141-1/+5
| | | | | | | systems use it too Notes: svn path=/head/; revision=8522
* BSD 4.4 Lite Lib SourcesRodney W. Grimes1994-05-271-0/+1048
Notes: svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=1573