summaryrefslogtreecommitdiff
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Fix unbalanced #endif introduced by yesterday's change.Garrett Wollman1995-01-191-1/+1
| | | | Notes: svn path=/head/; revision=5714
* Fix handling of 'e' format floating point so that it prints trailing zerosDoug Rabson1995-01-191-1/+0
| | | | | | | correctly. Notes: svn path=/head/; revision=5707
* Prevent sites from shooting themselves in the foot while enabling/disablingGarrett Wollman1995-01-171-1/+1
| | | | | | | | | | YP by disallowing `+' entries as logins in all cases. (This handles the case of a `+' entry in the password file but YP not running, which should never happen but is easy enough to check for so we'll apply some prophylaxis.) Notes: svn path=/head/; revision=5703
* Add the sys/types.h include to the necessary documented includes for theAndreas Schulz1994-12-311-0/+1
| | | | | | | getrusage call. Notes: svn path=/head/; revision=5324
* fixunsdfsi.S:Bruce Evans1994-12-271-37/+22
| | | | | | | | | Embalm. Rewrite to do things much the same as gcc-2: use fistpq for speed and elegance, and mishandle overflow consistently. __fixunsdfsi() is no longer called by gcc. Notes: svn path=/head/; revision=5246
* sigsetjmp.S:Bruce Evans1994-12-272-6/+4
| | | | | | | Remove unnecessary .text statement. Notes: svn path=/head/; revision=5245
* Remove unnecessary .align statement.Bruce Evans1994-12-274-4/+0
| | | | Notes: svn path=/head/; revision=5244
* Fix a spelling error and add a comment about possible improvements.Bruce Evans1994-12-271-3/+17
| | | | Notes: svn path=/head/; revision=5243
* Fix the bug reported by Torbjorn Granlund <tege@cygnus.com>:Bruce Evans1994-12-251-5/+5
| | | | | | | | | The documentation for mrand48 and lrand48 is mixed up. mrand48 returns a full 32 bit number, while lrand48 only returns 31 bits. Notes: svn path=/head/; revision=5228
* Add missing getdomainname manual page.Guido van Rooij1994-12-182-3/+103
| | | | | | | | | Reviewed by: Submitted by: Obtained from: 1.1.5.1 with a few modifictaions. Notes: svn path=/head/; revision=5152
* Obtained from: 1.1.5Bruce Evans1994-12-121-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | getcwd() has two off-by-one bugs in FreeBSD-2.0: 1. getcwd(buf, size) fails when the size is just large enough. 2. getcwd(buf + 1, 1) incorrectly succeeds when the current directory is "/". buf[0] and buf[2] are clobbered. (I modified Bruce's original patch to return the proper error code [ERANGE] in the case of #2, but otherwise... -DG) This program demonstrates the bug: --- #include <stdlib.h> #include <string.h> #include <stdio.h> #include <unistd.h> int main(void) { char buf[5]; int errors; errors = 0; if (chdir("/tmp") != 0) { perror("chdir"); abort(); } if (getcwd(buf, 5) == NULL) { perror("oops, getcwd failed for buffer size = size required"); ++errors; } if (chdir("/") != 0) { perror("chdir"); abort(); } buf[0] = 0; buf[2] = 1; if (getcwd(buf + 1, 1) != NULL) { fprintf(stderr, "oops, getcwd succeeded for buffer size = one too small\n"); ++errors; } if (buf[0] != 0) { fprintf(stderr, "oops, getcwd scribbled on memory before start of buffer\n"); ++errors; } if (buf[2] != 1) { fprintf(stderr, "oops, getcwd scribbled on memory after end of buffer\n"); ++errors; } exit(errors == 0 ? 0 : 1); } Notes: svn path=/head/; revision=5072
* Obtained from: 386BSD-0.1 patchkit; also fixed in 1.1.5Bruce Evans1994-12-121-2/+3
| | | | | | | | | Compare unsigned chars. Return the place after where the character was found and not the start of the string. Notes: svn path=/head/; revision=5071
* Fix execl[e]. Multiple execle's failed because of bogus caching of theBruce Evans1994-12-121-16/+14
| | | | | | | | | | | pointer returned by realloc(). All callers free the pointer if the execve fails. Nuke the caching. This essentially restores buildargv() to the 1.1.5 version. Also fix a memory leak if realloc() fails. Also nuke similar but non-broken caching in execvp(). malloc() should be efficient enough. Notes: svn path=/head/; revision=5070
* Comment out the man page of rstat.1 from Makefile.inc. There is no rstatAndreas Schulz1994-12-114-5/+5
| | | | | | | | | | command available yet. Changed an entry in getprcent.3 from rpcinfo(8C) to rpcinfo(8). Changed an entry in getrpcport.3 from 3R to 3. Changed two entries in rpc.3 from 3N to 3. Notes: svn path=/head/; revision=5049
* Added the mpool.3 manpage to the installed manpages. It is referred from theAndreas Schulz1994-12-111-0/+1
| | | | | | | other manpages and there is no conflict. Notes: svn path=/head/; revision=5048
* In _gethostbydnsaddr(), force RES_RECURSE into _res.options. This isGarrett Wollman1994-12-011-1/+4
| | | | | | | | | incredibly obnoxious, but also makes inverse mappings work when the local resolver is in a cache-only configuration. (Maybe this is actually a bug in BIND?) Notes: svn path=/head/; revision=4892
* Go back to Bruce's fix with a minor change that will allow a NULL stringDavid Greenman1994-11-251-4/+3
| | | | | | | | | pointer if len is 0. I should have looked at the revision history - I would have found that Bruce already fixed the bug with len=0 over a month ago. Whoever said that the bug was in 2.0 was wrong. Notes: svn path=/head/; revision=4811
* Fixed bugs related to returning NULL if length is zero.David Greenman1994-11-251-3/+4
| | | | Notes: svn path=/head/; revision=4809
* Added sysarch system call which is used my i386_get/set_ltd.c and is neededDoug Rabson1994-11-171-1/+1
| | | | | | | | | | for Wine support. The current snapshot of wine works fine with this. This should go into the beta as the code which it calls in the kernel is already there, and works fine. Notes: svn path=/head/; revision=4545
* Added routines to read the canonical UNIX configuration file. This willPoul-Henning Kamp1994-11-133-4/+267
| | | | | | | | | | | | | | later be applied to a number of programs (inetd for instance) to clean out the bogus code doing the same thing, modulus all the bugs. If you need to read a '#'-is-a-comment-file, please use these routines. I realize that the shlib# should be bumped (for the non-US world: increased by something), but will defer this until something significant happens. Notes: svn path=/head/; revision=4441
* Date: Wed, 26 Oct 1994 15:44:49 -0600Nate Williams1994-11-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | From: Chris Torek <torek@bsdi.com> Here is a semi-official patch (apply to /usr/src/lib/libc/stdio/fseek.c, rebuild libc, install). The current code fails when the seek: - is optimized, and - is to just past the end of the block currently in the buffer, and - is followed by another seek with no intervening read operation, and - the destination of subsequent seek is within the block left in the buffer (seeking to the beginning of a block does not force a read, so the buffer still contains the previous block) so it is indeed rather obscure. I may have a different `final' fix, as this one `loses' the buffer contents on a seek that goes just past the end of the current block. [Footnote: seeks are optimized only on read-only opens of regular files that are buffered by the file's optimal I/O size. This is what you get with fopen(path, "r") and no call to setvbuf().] Obtained from: [ BSDI mailing list ] Notes: svn path=/head/; revision=4169
* >Description:Rodney W. Grimes1994-10-272-1/+2
| | | | | | | | | | | | | | | | | While trying to figure out why rlogind wasn't working right for root, I noticed that man wouldn't come back with a man page for iruserok, but it would for ruserok. Checking the lib/net directory's Makefile.inc file shows that the link to the rcmd man page just isn't getting created. >How-To-Repeat: Do a 'man iruserok' and notihing will come back, where a 'man ruserok' will. Submitted by: Brian Moore <ziff@houdini.eecs.umich.edu> Obtained from: NetBSD-bugs mailing list Notes: svn path=/head/; revision=3932
* Fix memchr(p, 0, 0) to return NULL instead of p.Bruce Evans1994-10-271-3/+3
| | | | Notes: svn path=/head/; revision=3929
* Reenable sigsetjmp.S. Preserve the FP state. Rearrange offsetsBruce Evans1994-10-254-14/+50
| | | | | | | to match setjmp.S. Notes: svn path=/head/; revision=3851
* Nuke sigsetjmp.c. sigsetjmp() can't be implemented as a C functionBruce Evans1994-10-251-2/+2
| | | | | | | | that calls setjmp(), since returning from the function usually clobbers the saved environment. Notes: svn path=/head/; revision=3850
* cfmakeraw(): set IGNBRK, clear IXOFF, INPCK per Bruce suggestionAndrey A. Chernov1994-10-221-2/+3
| | | | | | | Set IGNPAR, clear NOFLSH, PENDIN, TOSTOP, ECHOE, ECHOK Notes: svn path=/head/; revision=3799
* makeraw(): forget to clear IMAXBEL, set VMIN/VTIMEAndrey A. Chernov1994-10-221-2/+3
| | | | Notes: svn path=/head/; revision=3760
* Remove CPU_COLORDISP, GIO_COLOR now existsAndrey A. Chernov1994-10-181-1/+0
| | | | Notes: svn path=/head/; revision=3682
* Add new machdep variablesAndrey A. Chernov1994-10-171-0/+3
| | | | Notes: svn path=/head/; revision=3667
* sysctl(3) can return an error (setting errno to ENOMEM) when theGarrett Wollman1994-10-132-28/+90
| | | | | | | | fields in the utsname structure are too small to hold their corresponding MIB variables. Don't return an error in this case. Notes: svn path=/head/; revision=3565
* Sync with ctype.h (remove EOF handling)Andrey A. Chernov1994-10-091-9/+0
| | | | Notes: svn path=/head/; revision=3457
* Sync with ctype.h (EOF, sign extention fixes)Andrey A. Chernov1994-10-081-0/+17
| | | | Notes: svn path=/head/; revision=3434
* Use same configuration file, /etc/host.conf, for both gethost* andGarrett Wollman1994-09-261-7/+9
| | | | | | | | | getnet* configuration. (It's highly unlikely that you'd want to do something different, and network lookups aren't common enough to justify their own configuration file.) Notes: svn path=/head/; revision=3136
* Fixed YP networks map support.Garrett Wollman1994-09-261-7/+24
| | | | Notes: svn path=/head/; revision=3108
* remove need for -DDEBUG from resolver code (conflict with db/hash)Paul Traina1994-09-257-77/+38
| | | | Notes: svn path=/head/; revision=3094
* get* rework and new bind codePaul Traina1994-09-2515-1090/+2785
| | | | Notes: svn path=/head/; revision=3070
* Document getvfsent() and kin.Garrett Wollman1994-09-252-2/+232
| | | | Notes: svn path=/head/; revision=3062
* Fix so that people who don't have LKMs compiled in their kernels don'tGarrett Wollman1994-09-251-0/+8
| | | | | | | | get hosed: vfsisloadable() always returns false if /dev/lkm cannot be opened for writing. Notes: svn path=/head/; revision=3061
* Make not-so-space-eaten locale version:Andrey A. Chernov1994-09-2412-290/+525
| | | | | | | | split modules to bring only neccessary functions, eliminate sprintf, make reduced startup_locale version. Notes: svn path=/head/; revision=3050
* Added $Id$David Greenman1994-09-243-0/+6
| | | | Notes: svn path=/head/; revision=3044
* If sysctl() fails, return "/kernel" so as not to screw people who haven'tGarrett Wollman1994-09-241-2/+2
| | | | | | | updated their kernels yet. Notes: svn path=/head/; revision=3042
* Added getbootfile(3), for an easy C interface to the kern.bootfile MIBGarrett Wollman1994-09-233-13/+140
| | | | | | | variable. This one's even documented! Notes: svn path=/head/; revision=3040
* Added *ran48 functions, and put them in the correct place this time.Garrett Wollman1994-09-2313-2/+476
| | | | | | | Obtained from: 1.1.5 Notes: svn path=/head/; revision=3016
* Pass -q and -u flags to modload so that it shuts up and doesn't leaveGarrett Wollman1994-09-221-1/+1
| | | | | | | modules lying around. Notes: svn path=/head/; revision=3001
* Make iso_addr's output conform to modern conventions for NSAPPaul Traina1994-09-221-18/+16
| | | | | | | | representation. Original code by pst but ported in as part of enhancements to BIND 4.9.2 and returned to Vixie. Notes: svn path=/head/; revision=2978
* Fix stupid memory-allocation error.Garrett Wollman1994-09-221-3/+9
| | | | Notes: svn path=/head/; revision=2970
* Added VFS functions: getvfsvbyname, getvfsbytype, getvfsent, setvfsent,Garrett Wollman1994-09-222-1/+235
| | | | | | | | endvfsent, vfsisloadable, vfsload. Someday these will even be documented. Notes: svn path=/head/; revision=2963
* Document YP support.Garrett Wollman1994-09-202-29/+51
| | | | Notes: svn path=/head/; revision=2937
* My implementation of YP group file support, modeled after theGarrett Wollman1994-09-201-6/+210
| | | | | | | password file support done yesterday. Notes: svn path=/head/; revision=2936
* Second half of YP security hole fix. Needs updated passwordGarrett Wollman1994-09-201-5/+12
| | | | | | | database in order to operate. Notes: svn path=/head/; revision=2935