summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Remove unneeded code left from testingache1998-01-021-13/+2
|
* 1) Redo internal interface to be more latest ncurses-likeache1998-01-023-73/+82
| | | | | | 2) Fix winsdel called in last line of the window (nothing happens in old variant) 3) Add range checks to wscrl() and internal soft scroll function
* Fix another problem with clearing the last line of thesteve1998-01-011-1/+1
| | | | | | display. Submitted by: Kouichi Hirabayashi <kh@mogami-wire.co.jp>
* 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
|
* Handle the condition where BS is typed while the cursor issteve1997-12-291-1/+3
| | | | | | | | | at the first position on either of the last two lines of the screen. Ie. append contents of current line to the previous line and scroll the next line's contents up. PR: 5392 Submitted by: Kouichi Hirabayashi <kh@mogami-wire.co.jp>
* 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
* Changed pthread_detach to conform to POSIX, i.e. the single argumentalex1997-12-253-30/+9
| | | | | | | | | provided is of type pthread_t instead of pthread_t *. PR: 4320 Return EINVAL instead of ESRCH if attempting to detach an already detached thread.
* 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.
* Change errno usage as a field in a structure and as an argument to ajb1997-12-202-28/+28
| | | | | function from 'errno' to 'error' so that there is no conflict with the thread-safe definition of errno in errno.h.
* Fixed the termcap 3.0 hacks. They were very broken in my configurationbde1997-12-191-10/+11
| | | | | | | where shared libraries are in /lib and almost everything is linked shared. First, they removed the old shared library before installing the new one. Second, they attemped a cross-device link from /lib to /usr/lib/compat.
* Comment that long double is poorly implemented, not that it is unimplemented.bde1997-12-191-2/+3
|
* Put the .PATH statement first as in all other libc Makefile.inc's.bde1997-12-191-3/+2
|
* Format the MLINKS statement the same as in most other libc Makefile.inc's.bde1997-12-191-2/+3
|
* Fix recursion problem which occurs when a signal is received duringjb1997-12-151-3/+12
| | | | | | | a malloc. The signal handler creates a thread which requires a malloc... For now, the only thing to do is to block signals. When we move user pthreads to use the kernel threads, mutexes will be implemented in kernel space and then malloc can revert.
* Delete "typedef ... date" (see style(9)).helbig1997-12-134-43/+51
| | | | | | | In the man page Use ".Pp" instead of blank lines, adopt English and stress that the Julian->Gregorian switch took place at different dates in different countries. Suggested by: Garrett.
* Added easterog() and easteroj() which compute orthodox easter forhelbig1997-12-074-25/+55
| | | | | Gregorian and Julian Calendar. Suggested by: Andrey
* Add libcalendar.helbig1997-12-041-2/+2
|
* This commit was generated by cvs2svn to compensate for changes in r31529,helbig1997-12-045-0/+650
|\ | | | | | | which included commits to RCS files with non-trunk default branches.
| * Provides date of easter and other calendar related arithmetic.helbig1997-12-045-0/+650
|
* "un-bump" the major number for libtermcap.so. This brings -current backpeter1997-12-021-2/+13
| | | | | | | | | | | | to the same version numbers as 2.2.x. The problem with the way things were was: - if you took a 2.2.x binary, it either wouldn't run on -current or if you had the old -current version of libtermcap.so.2.1 then it could potentially be a security problem. - the alternative is to start a compat22 tree dist for -current with a uuencoded binary. This makefile hack is less cost. libtermcap.so.3.0 is provided via /usr/lib/compat to avoid transition problems.
* s/geteid/geteuid/ - it's lucky I have a large supply of left-over pointypeter1997-11-291-1/+1
| | | | hats from Tristan's last birthday party. :-]
* Work around the problems caused by calling issetugid() in libtermcap inpeter1997-11-291-2/+41
| | | | | | | | a similar way to libc. Sigh. This is not pretty but seems to work. Somthing like this was needed in preference to bogusly bumping the major library number here. The syscall(SYS_issetugid) idea is originally Bruce's.
* Upgrade minor versionpst1997-11-271-2/+2
|
* Modify the return values to comply with POSIX. Previously thesealex1997-11-2527-231/+114
| | | | | | functions would return -1 and set errno to indicate the specific error. POSIX requires that the functions return the error code as the return value of the function instead.
* Added missing source file uthread_sigwait.c.alex1997-11-243-3/+6
| | | | Submitted by: Daniel M. Eischen <deischen@iworks.InterWorks.org>
* Correct the return value from pthread_cond_timedwait when a timeoutalex1997-11-233-3/+3
| | | | | | occurs (was EAGAIN, is now ETIMEDOUT). Submitted by: Daniel M. Eischen <deischen@iworks.InterWorks.org>
* Fixed spelling of EACCES.bde1997-11-235-12/+19
|
* Fixed long double formats. They were mostly not implemented exceptbde1997-11-231-4/+7
| | | | | | | | | | | on systems where long doubles are just doubles. FreeBSD hasn't been such a system since it started using gcc-2.5 many years ago. The fix is of low quality. It loses precision. scanf() of long doubles doesn't seem to be used much, but gdb-4.16 uses %Lg format in its expression parser if it thinks that the system supports printf'ing of long doubles. The symptom was that floating point literals were usually interpreted to be 0.0.
* const correctness for dl*()brian1997-11-223-15/+15
|
* Fix bit-twiddling in sigismember(3).jraynard1997-11-211-1/+1
| | | | | | | | Note this ONLY affects the function version - the macro version is always used unless for some reason you put #undef sigismember in your code before calling it. PR: 3615 Submitted by: Nanbor Wang <nw1@cs.wustl.edu> (slightly amended patch)
* Don't check for the unlikely case of useconds == 0 here. The kernelbde1997-11-201-7/+4
| | | | | | checks it. Fixed a style bug.
OpenPOWER on IntegriCloud