summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #includes in the synopsis and in an example. <sys/socket.h>bde1998-01-201-1/+1
| | | | | | isn't a prerequisite, since it isn't required for the prototypes and isn't always needed to call the functions (the address family might be a variable).
* Moved most of the (source-level) compatibility hacks for the vfsconfbde1998-01-201-2/+4
| | | | | interface from sys/mount.h to libc/getvfsent.c The new interface is now the default.
* Added cross references to mincore(2) and minherit(2).alex1998-01-201-0/+3
| | | | Obtained from: OpenBSD
* Added #include <sys/types.h> to synopsis.alex1998-01-202-1/+4
| | | | Obtained from: OpenBSD
* Started getting rid of the compatibility cruft for the Lite1 mount()bde1998-01-171-0/+2
| | | | | | | | and the pre-Lite2 vfsconf interfaces. For getvfsent.c, just define _OLD_VFSCONF. This will give the current default macro hacks in <sys/mount.h> when the default is reversed. This is an intermediate step.
* Fixed missing #include in synopsis.bde1998-01-161-0/+2
|
* Fixed wrong prototype for clock_getres().bde1998-01-161-2/+2
|
* Fixed wrong prototypes. Most of the prototypes had missing return types,bde1998-01-161-9/+19
| | | | or missing const's or `short *' instead of `[ug]id_t *' in argument types.
* Fixed missing return type in a prototype.bde1998-01-161-0/+1
|
* Return the correct errno from getcwd() even if free() or closedir()mckay1998-01-151-0/+4
| | | | | | overwrites it. This actually showed up when running under an old kernel when free() called the madvise() stub which set errno, causing getcwd() to return EOPNOTSUPP instead of ERANGE.
* Add #ifndef __NETBSD_SYSCALLS around calls to issetugid() whichjb1998-01-153-6/+18
| | | | do not exist in NetBSD 1.3.
* Typo fix.alex1998-01-151-2/+12
| | | | | | | Added EOPNOTSUPP and EMLINK to errors section. Added symlink(2) xref. Obtained from: OpenBSD
* Include string.h for memcpy function prototype.jb1998-01-141-0/+1
|
* Consistently reference init as .Xr init 8.alex1998-01-131-2/+2
| | | | Obtained from: OpenBSD
* Return type and argument to sleep are unsigned int.alex1998-01-131-2/+3
|
* Dump the constant NGROUPS in favor of the POSIX way:alex1998-01-131-9/+6
| | | | | | sysconf(_SC_NGROUPS_MAX). Submitted by: bde
* Use .Fn for sysconf(_SC_CLOCK_TCK) reference.alex1998-01-131-1/+3
| | | | Added $Id$.
* Formatting fix & improved comment for struct timeval.alex1998-01-111-1/+3
| | | | Obtained from: OpenBSD
* Fixed brk(2) xref.alex1998-01-111-1/+2
| | | | Obtained from: OpenBSD
* Added sys/types.h to synopsis as per POSIX.alex1998-01-111-1/+2
| | | | Obtained from: OpenBSD
* Replace sys/param.h with sys/types.h as per POSIX.alex1998-01-111-1/+9
| | | | | | Document the special case of gidsetlen == 0. Partially obtained from: OpenBSD
* Document that arg max is controllable via sysctl.alex1998-01-111-5/+7
|
* Formatting fix.alex1998-01-111-1/+2
| | | | Obtained from: OpenBSD
* Added EMFILE and ENFILE to errors section.alex1998-01-111-0/+5
| | | | Obtained from: OpenBSD
* .Xr sigvec --> sigactionalex1998-01-111-2/+2
| | | | Obtained from: OpenBSD
* Add <sys/types.h> to synopsis.alex1998-01-111-1/+4
| | | | | | | Correct a grammatical error. Add cross-reference to setrlimit(2). Obtained from: OpenBSD
* Make a couple of the stat flags dependent on the sys/stat.h header filejb1998-01-093-3/+27
| | | | | | | | | | | that this source is compiled against. This source is referenced by install which is needed as a build tool and must be able to compile against NetBSD headers and libraries if we have a hope of supporting another architecture. With this change, that's two working programs down and 3945 (?) to go. The other one was make, but that didn't need any changes to work under FreeBSD/Alpha. 8-)
* handle long usernames more carefullyimp1998-01-071-5/+8
| | | | | Reviewed by: guido Obtained from: OpenBSD (Theo de Raadt)
* Convert to mdoc format.charnier1998-01-051-248/+146
|
* size_t -> unsignedache1998-01-041-3/+3
| | | | | in arguments length INT_MAX overflow check Suggested-by: bde
* Expanded cross references.alex1998-01-029-8/+20
|
* 1. EOF was returned when the buffer size was larger than INT_MAX. Thisache1998-01-012-10/+10
| | | | | | | | | | case has very little to do with the output size being larger than INT_MAX. 2. The new #include of <limits.h> was disordered. 3. The new declaration of `on' was disordered (integer types go together). 4. Testing an unsigned value for > 0 was fishy. Submitted by: bde
* Drop the use of caddr_t in conjunction with mmap(2).alex1997-12-311-4/+4
|
* Convert caddr_t --> void * for sys/mman.h functions.alex1997-12-319-16/+16
| | | | | | | | | | | | | | | | mlock, mmap, mprotect, msync, munlock, and munmap are defined by POSIX as taking void *. The const modifier has been added to mlock, munlock, and mprotect as the standard dictates. minherit comes from OpenBSD and has been updated to conform with their recent change to void *. madvise and mincore are not defined by POSIX, but their arguments have been modified to be consistent with the POSIX-defined functions. mincore takes a const pointer, but madvise does not due to the MADV_FREE case. Discussed with: bde
* Fixed formatting of the MADV_FREE flag description.alex1997-12-301-3/+3
| | | | Pointed out by: bde
* Typo fix.alex1997-12-301-2/+2
|
* Document MS_SYNC.alex1997-12-301-0/+1
|
* The terminating character in strings is `NUL', not `NULL'.wosch1997-12-282-2/+2
|
* fork() checks RLIMIT_NPROC, not RLIMIT_NOFILE.hoek1997-12-261-1/+1
| | | | | pr: docs/5260 submitted-by: Niall Smart [3]njs3@doc.ic.ac.uk
* Removed unnecessary initialization of hp in gethostbyaddr_r.alex1997-12-251-3/+3
|
* Add overflow checks: if output size becomes bigger than INT_MAX,ache1997-12-251-2/+13
| | | | just return EOF
* Correct type of stored argument place (from previous fix)ache1997-12-242-4/+4
|
* 1) Restore back comment about snprintf()ache1997-12-241-7/+10
| | | | | 2) Optimize string buffer copy to call memcpy() and update pointers only for count > 0, it makes snprintf(NULL, 0, ...) more efficient
* Return back to BSD snprintf semantics which recent C9x standard adoptsache1997-12-243-21/+23
| | | | | | | | | | instead of Singe Unix, thanx Bruce for explaining, I am not realize standards war was there. But now, fix n == 0 case to not return error and fix check for too big n. Things left to do: check for overflow in arguments.
* 1) Oops! Insert again if (n == 0) return 0.ache1997-12-242-10/+10
| | | | | | | | | | | | | | | | | | | Final word is Bruce's quote: C9x specifies the BSD4.4-Lite behaviour: [#3] ... Thus, the null-terminated output has been completely written if and only if the returned value is less than n. It means that if we not have any null-terminated output as for n == 0 we can't return value less than n, so we forced to return value equal to n i.e. 0 The next good thing is glibc compatibility, of course. 2) Do check for too big n in machine-independent way. 3) Minor optimization assuming EOF is < 0
* Back out part related to "return 0 if n == 0" and return EOF as before.ache1997-12-242-6/+2
| | | | | | | | | | | The main argument is that it is impossible to determine if %n evaluated or not when snprintf return 0, because it can happens for both n == 0 and n == 1. Although EOF here is good indication of the end of process, if n is decreased in the loop... Since it is already supposed in many places that EOF *is* negative, f.e. from Single Unix specs for snprintf "return ... a negative value if an output error was encountered" this not makes situation worse.
* Fix snprintf(...%n...)ache1997-12-241-5/+9
| | | | | | to pass not more than buffer size to %n agrument, old variant always assume infinite buffer. %n is for actually transmitted characters, not for planned ones.
* Remove wrong comment about snprintf:ache1997-12-241-5/+4
| | | | | | | | | "return the number of bytes needed, rather the number used" According to Single Unix specs: Upon successful completion, these functions return the number of bytes transmitted excluding the terminating null
* snprintf return value fixes to conform Single Unix specs:ache1997-12-242-6/+16
| | | | | | | | | | | | | | | | | | | | 1) if buffer size is smaller than arguments size, return buffer size, not arguments size as before. 2) if buffer size is 0, return 0, not EOF as before. (now it is compatible with Linux and Apache implementations too). NOTE: Single Unix specs says: If the value of n {buffer size} is zero on a call to snprintf(), an unspecified value less than 1 is returned. It means we can't return EOF since EOF can take *any* value in general not especially < 1. Better variant will be return -1 (it is less then 1 and different with n == 1 case) but -1 value is already occuped by EOF in our implementation, so we can't distinguish true IO error in that case. So 0 here is only possible case still conforming to Single Unix specs.
* Comment that long double is poorly implemented, not that it is unimplemented.bde1997-12-191-2/+3
|
OpenPOWER on IntegriCloud