summaryrefslogtreecommitdiff
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Fixed incomplete or wrong lists of prerequisite #includes related toBruce Evans1996-05-012-2/+4
| | | | | | | <sys/types.h>. Notes: svn path=/head/; revision=15489
* Fixed incomplete or wrong lists of prerequisite #includes related toBruce Evans1996-05-012-2/+4
| | | | | | | <sys/types.h>. Notes: svn path=/head/; revision=15488
* Fixed a wrong prerequisite #include and a missing function-arg type.Bruce Evans1996-05-011-3/+3
| | | | Notes: svn path=/head/; revision=15487
* Fixed misformatted #include (.Ft -> .Fd).Bruce Evans1996-05-011-1/+1
| | | | Notes: svn path=/head/; revision=15486
* Fixed longstanding namespace convolution involving rune_t vs wchar_t.Bruce Evans1996-05-013-9/+5
| | | | | | | | | | | | | | If _ANSI_SOURCE or _POSIX_SOURCE is defined, then <ctype.h> had to be included before <stddef.h> or <stdlib.h> to get rune_t declared. Now rune_t is declared perfectly bogusly in all cases when <ctype.h> is included. This change breaks similar (but more convoluted) convolutions in the stddef.h in gcc distributions. Ports of gcc should avoid using the gcc headers. Notes: svn path=/head/; revision=15483
* Very minor tweak:Bill Paul1996-04-291-1/+1
| | | | | | | | | | | | | | | In __initdb(), a failure to open the local password database is supposed to result in a warning message being syslog()ed. This warning is only supposed to be generated as long as the 'warned' flag hasn't been yet; once the warning is generated, the flag should be set so that the message is only syslog()ed once. However, while the state of the flag is checked properly, the flag's state is never changed, so you always get multiple warnings instead of just one. Pointed out by: Peter Wemm Notes: svn path=/head/; revision=15446
* Removed bogus includes of <sys/types.h> from synopses.Bruce Evans1996-04-195-6/+1
| | | | | | | | | This commit covers the man pages for most of the ANSI library functions. A few others such as strtol.3 have to mention <sys/types.h> because they mix ANSI interfaces with less well designed extensions. Notes: svn path=/head/; revision=15313
* Don't include <sys/types.h> when it isn't used.Bruce Evans1996-04-194-7/+2
| | | | | | | | This commit covers most of the ANSI library functions. Many others only need <sys/types.h> because they use u_xxx. Notes: svn path=/head/; revision=15312
* Added `const' to types of sys_siglist and sys_signame.Bruce Evans1996-04-191-2/+2
| | | | Notes: svn path=/head/; revision=15308
* Added `const' to types of sys_errlist and sys_nerr.Bruce Evans1996-04-191-5/+10
| | | | | | | | | | Use .Va instead of .Fa to describe these variables. Say a little about inconsistent declarations of sys_errlist in the BUGS section. Notes: svn path=/head/; revision=15307
* Fix the man page to reflect the recent addition of RFNOWAIT and the removal ofSujal Patel1996-04-181-4/+5
| | | | | | | Plan9 specific flags. Notes: svn path=/head/; revision=15303
* Fix error in wcstombs: byte count not countedAndrey A. Chernov1996-04-181-3/+4
| | | | | | | | Remove unneded casts in sgetrune/sputrune Submitted by: wcstombs fix by Mihoko Tanaka <m_tonaka@pa.yokogawa.co.jp> Notes: svn path=/head/; revision=15286
* Document the possible EPERM return.Joerg Wunsch1996-04-171-0/+2
| | | | | | | Submitted by: imp@village.org (Warner Losh) Notes: svn path=/head/; revision=15278
* NIS cleanups and fixes, the next generation.Bill Paul1996-04-162-260/+260
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | getnetgrent.c: - Catch one bogon that snuck by: in _listmatch(), check for '\0' rather than '\n'; strings returned from yp_match() are terminated with a nul, not a newline. getpwent.c: - Rip out all of the +inclusion/-exclusion stuff from before and replace it with something a little less grotty. The main problem with the old mechanism was that it wasted many cycles processing NIS entries even after it already knew they were to be exlcuded (or not included, depending on your pointof view). The highlights of these changes include: o Uses an in-memory hash database table to keep track of all the -@netgroup, -user, and -@group exclusions. o Tries harder to duplicate the behavior normally obtained when using NIS inclusions/exclusions on a flat /etc/passwd file (meaning things come out in much the same order). o Uses seperate methods for handling getpwent() and getpwnam()/getpwuid() operations instead of trying to do everything with one general function, which didn't work as well as I thought it would. o Uses both getnetgrent() and innetgr() to try to save time where possible. o Use only one special token in the local password database (_PW_KEYYPBYNUM) instead of seperate tokens to mark + and - entries (and stop using the counter tokens too). If this new token doesn't exist, the code will make due with the standard _PW_KEYBYNUM token in order to support older databases that won't have the new token in them. All this is an attempt to make this stuff work better in environments with large NIS passwd databases. Notes: svn path=/head/; revision=15267
* Fix a few NIS-related bogons:Bill Paul1996-04-151-11/+14
| | | | | | | | | | | | | | | - Clear the _yp_innetgr flag immediately after calling setnetgrent() from innetgr(). We only need the flag set to temporarily alter setnetgrent()'s behavior. Previously, it was being cleared too late. - When in NIS-only mode, innetgr() was wasting time doing unecessary extra processing after it had already found a match. - Remember to free memory allocated by the NIS functions during innetgr() searches. Notes: svn path=/head/; revision=15264
* Update the description of strncat to accurately describe how manyMike Pritchard1996-04-091-1/+4
| | | | | | | | | bytes are copied to the destination string. Closes PR#1000. Submitted by: Dave Glowacki <dglo@ssec.wisc.edu> Notes: svn path=/head/; revision=15165
* Correct a minor typo. Fixes part of PR#1000.Mike Pritchard1996-04-091-1/+1
| | | | | | | Submitted by: Dave Glowacki <dglo@ssec.wisc.edu> Notes: svn path=/head/; revision=15164
* Do not install the now unsupported netns and netisoMike Pritchard1996-04-082-4/+7
| | | | | | | | related man pages. Comment out cross references to those man pages from other man pages. Notes: svn path=/head/; revision=15136
* Correct some man page xrefs, and some other minor changes to bring someMike Pritchard1996-04-083-5/+5
| | | | | | | | | man pages up to mdoc guidelines and fix some minor formatting glitches. Also fixed a number of man pages to not abuse the .Xr macro to display functions and path names and a lot of other junk. Notes: svn path=/head/; revision=15135
* Correct some man page cross references and file location references.Mike Pritchard1996-04-072-3/+3
| | | | Notes: svn path=/head/; revision=15082
* Mention other possible errors that could be caused by the F_[GS]ETOWNJoerg Wunsch1996-04-061-1/+19
| | | | | | | commands. Notes: svn path=/head/; revision=15074
* Xref clocks(7).Joerg Wunsch1996-04-057-6/+13
| | | | Notes: svn path=/head/; revision=15049
* Added a note about the return value. Its been so long I can'tJoshua Peck Macdonald1996-04-051-0/+19
| | | | | | | remember who suggested the 'caveat' section. Sorry. Notes: svn path=/head/; revision=15047
* Remove outdated (and never quite correct anyway) reference to thePeter Wemm1996-04-031-4/+0
| | | | | | | "fact" that pipes were implemented as calls to socketpair(). Notes: svn path=/head/; revision=15017
* Xref sysexits(3).Joerg Wunsch1996-03-311-1/+7
| | | | Notes: svn path=/head/; revision=14964
* stat() before open() because opening of special files may be harmful.Bruce Evans1996-03-291-0/+10
| | | | Notes: svn path=/head/; revision=14910
* Back out one of my previous changes: don't clear PARODD,Andrey A. Chernov1996-03-281-1/+1
| | | | | | | so return to absolute minimum of changed flags now Notes: svn path=/head/; revision=14870
* cfmakeraw:Andrey A. Chernov1996-03-271-2/+2
| | | | | | | | | clear PARODD bit too, help user program to set its own parity via | Set CREAD bit, it is 99% case Notes: svn path=/head/; revision=14858
* Added missing section numbers to a bunch of .Xr macros, orMike Pritchard1996-03-2732-64/+69
| | | | | | | | converted them into .Fn macros where appropriate. Also fixed up some minor formatting problems. Notes: svn path=/head/; revision=14855
* Removed now-bogus casts that were to hide the inconsistency between theBruce Evans1996-03-271-4/+4
| | | | | | | | | | nonstandard normal version and the standard threaded version. Removed a bogus L in a constant. fpos_t's aren't longs, and casting to fpos_t would be verbose. Notes: svn path=/head/; revision=14840
* Fixed bogus cross references.Bruce Evans1996-03-272-5/+5
| | | | | | | Reviewed by: mpp Notes: svn path=/head/; revision=14839
* Say what happens to the buffer when fgets() returns NULL.Bruce Evans1996-03-271-6/+11
| | | | | | | Fixed bogus cross references and a misordered line. Notes: svn path=/head/; revision=14838
* 8bit clean fixesAndrey A. Chernov1996-03-251-3/+5
| | | | Notes: svn path=/head/; revision=14815
* Convert int to uchar range for ctypeAndrey A. Chernov1996-03-251-0/+1
| | | | Notes: svn path=/head/; revision=14814
* Remove half-dancing solution for signed chars to help findingAndrey A. Chernov1996-03-252-20/+6
| | | | | | | POSIXly-incorrect programs. Notes: svn path=/head/; revision=14812
* Remove half-dancing solution for signed chars to help findingAndrey A. Chernov1996-03-251-10/+2
| | | | | | | POSIXly-incorrect programs. Notes: svn path=/head/; revision=14811
* Since n is int now, sanity check must be n <= 0, not simple n == 0Andrey A. Chernov1996-03-251-1/+1
| | | | Notes: svn path=/head/; revision=14810
* Fix incorrect parameter types.Paul Richards1996-03-242-2/+2
| | | | Notes: svn path=/head/; revision=14790
* Don't bother trying to flock() /var/run/ypbind.lock; this breaks whenBill Paul1996-03-231-21/+14
| | | | | | | | | | | | | | | | | | | | | /var/run resides on an NFS filesystem (flock() always returns 0 in this case, so we falsely assume that ypbind is dead and bail out). Settle instead for better failure checking when using clnttcp_create() and clnt_call() to interact with ypbind. We still try to flock() /var/yp/binding/$DOMAINNAME.2, but if this doesn't work, we drop into the code that retrieves the binding information from ypbind directly. If that also fails, then we're toast. On NFS filesystems, this means we'll be ignoring the binding file for no reason and always talking to ypbind even though we don't have to, but at least things will work. (I could just replace the flock(/var/run/ypbind.lock) check with an RPC call to ypbind's NULLPROC procedure, but if the flock() of the binding file doesn't pan out we're going to try to talk to ypbind later anyway. *sigh* Is NFS file locking ever going to work?) Notes: svn path=/head/; revision=14776
* Fix other half of problem reported in PR #1079: _getnetbynisaddr() isBill Paul1996-03-231-12/+41
| | | | | | | | | | | | | | | | | | | | broken. The translation from network number to ASCII string was not working correctly (you would sometimes get things like 0.244.0.0 instead of 244.0.0). Also copied results of yp_match() to a static buffer for consistency with gethostbynis.c. Note: _getnetbynisaddr() chops off trailing .0's, i.e. 244.0.0 is truncated to 244. By contrast, getnetbyht.c code (for local /etc/networks lookups) leaves the traling .0's in place. This means that the NIS and local file lookups will match different things when looking up the same network number. I'm not sure which is the correct behavior. (I think the DNS lookup code tries all combinations -- should the NIS and local host lookup routines do that too?) Notes: svn path=/head/; revision=14775
* The 4.4-lite vfprintf counted the %# hex prefix and the sign inBill Fenner1996-03-201-8/+6
| | | | | | | | | | | the precision; ANSI X3J11 is not crystal clear but certainly says that the precision specifies the number of /digits/, and signs and "0x" aren't really digits. NetBSD already has a similar patch. Notes: svn path=/head/; revision=14727
* Fix yp_all() so that it doesn't bogusly return YP_NOMORE at the endBill Paul1996-03-191-4/+5
| | | | | | | | | | | | | | | | | | | of a successful map retrieval. (This has to do with a previous change to xdr_ypresp_all_seq() and ypxfr_get_map(); originally, yp_all() would look for a return value of YP_FALSE to signal success, but now it should be looking for YP_NOMORE. It should not be passing YP_NOMORE back up to the caller though.) Noticed by: <aagero@aage.priv.no> There is also another small bug here, which is that the call to xdr_free() that happens immediately after the clnt_call() in yp_all() clobbers the return status value. I've worked around this for now, but I think the xdr_free() is actually bogus and should be removed. I want to check some more before I do that though. Notes: svn path=/head/; revision=14719
* alarm -> ualarm.Bruce Evans1996-03-191-2/+3
| | | | Notes: svn path=/head/; revision=14699
* Updated a type to match Lite2's fixed-width type changes.Bruce Evans1996-03-191-2/+6
| | | | | | | | | Added $Id$. Obtained from: 4.4BSD-Lite2 Notes: svn path=/head/; revision=14698
* Work around a bug in the Sun rpc code. This fixes a problem whereGuido van Rooij1996-03-171-4/+12
| | | | | | | | | | a machine with aliase ip addresses on the same subnet of an interfaces' `real' ip addresses would generate <n> duplicate broadcasts in clnt_broadcast(). Basically, this fix does a purge on the list of bradcast addresses. Notes: svn path=/head/; revision=14659
* gethostbynis.c:Bill Paul1996-03-162-8/+19
| | | | | | | | | | | | | | | | | | | | | - Fix problem described in PR #1079: _gethostbynisaddr() doesn't work. Make it accept the same arguments as all the other gethostby*addr() functions and properly convert the supplied IP address into a text string so that yp_match() can find it in the hosts.byaddr map. - Also fix potential memory leak: copy the results of yp_match() to a static buffer and free the result (yp_match() returns dynamically allocated memory). ether_addr.c: - Since I was in the neighborhood, fix ether_ntohost() and ether_hostton() so that they don't bogusly for a free(result) when yp_match() fails. Notes: svn path=/head/; revision=14639
* From Lite2: rename fs to vfs.Jeffrey Hsu1996-03-111-1/+1
| | | | Notes: svn path=/head/; revision=14517
* From Lite2: rename fs to vfs.Jeffrey Hsu1996-03-112-2/+2
| | | | Notes: svn path=/head/; revision=14516
* Implemented negative caching on uid/gid lookup failures. This won'tDavid Greenman1996-03-051-14/+20
| | | | | | | | | matter much on some systems, but on ftp servers (like wcarchive) where you run with special stripped group and pwd.db files in the anonymous ftp /etc, this can be a major speedup for ls(1). Notes: svn path=/head/; revision=14389
* Update the current sigaction(2) man page to current reality..Peter Wemm1996-03-031-5/+19
| | | | | | | | | * sigstack(2) -> sigaltstack(2). * Document the SA_NODEFER flag * Document the SA_RESETHAND flag Notes: svn path=/head/; revision=14356