summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio
Commit message (Collapse)AuthorAgeFilesLines
* While comparing this with OpenBSD (ie: trying to figure out what mkstemps()peter1999-12-111-2/+2
| | | | | | | | is good for... :-)), I discovered that part of the change when mkstemps() was brought in was missed - it was missing the termination case to make sure it doesn't walk into the suffix. This isn't the same code OpenBSD has, I think this is a little better as we terminate the loop in a better spot.
* Make __sfp() even more thread-safe.dt1999-11-211-1/+1
|
* Add (FILE *) locking.dt1999-11-201-0/+9
|
* Make __sfp() (FILE allocator) thread-safe: added locking like in malloc().dt1999-11-201-0/+11
|
* Fix HISTORY - the copyright header on the file of the GCC version wasobrien1999-11-201-4/+4
| | | | | | misleading. Submitted by: Theo de Raadt <deraadt@cvs.openbsd.org>
* Add to the HISTORY.obrien1999-11-191-1/+9
|
* Add unsigned char cast to isdigitache1999-11-041-1/+1
|
* Remove UNSAFE_WARN ifdef for mktemp warning (never defined)ache1999-10-243-6/+6
| | | | Use _mktemp internally
* $Id$ -> $FreeBSD$peter1999-08-2879-79/+79
|
* Add warnings, ala mktemp, to tempnam and tmpnam as a reminder thatimp1999-08-212-3/+13
| | | | | | these are inherently unsafe interfaces. Do not allow TMPDIR to override path for setuid/setgid programs.
* Treat an attempt to read from a write-only stream more consistently.rnordier1999-08-101-1/+2
| | | | | Submitted by: Anton Berezin <tobez@plab.ku.dk> PR : 12852
* Fixed missing "G" in the list item for the main description of %g andbde1999-08-081-2/+2
| | | | %G formats.
* asprintf() does use realloc() internally, but saying so in the manpage can behoek1999-07-251-4/+2
| | | | | misinterpreted to mean that the pointer passed to asprintf() must be suitable for passing to realloc() as-is (ie. either a NULL pointer or a valid pointer).
* Add $Id$, to make it simpler for members of the translation teams tonik1999-07-1219-0/+19
| | | | | | | | | | | | | | | | | track. The $Id$ line is normally at the bottom of the main comment block in the man page, separated from the rest of the manpage by an empty comment, like so; .\" $Id$ .\" If the immediately preceding comment is a @(#) format ID marker than the the $Id$ will line up underneath it with no intervening blank lines. Otherwise, an additional blank line is inserted. Approved by: bde
* Add a note that when a stream opened via fdopen() is closed via fclose(),archie1999-05-171-0/+4
| | | | | the underlying file descriptor is also closed. To me at least this wasn't immediately obvious.
* Various language and style concerns fixed.imp1999-04-091-11/+18
| | | | Noted by: bde
* Add mkstemps to the man page, and create a link for it.imp1999-04-042-2/+14
| | | | | Obtained from: OpenBSD Poked in the eye about committing new functions without a manpage: obrien
* Add mkstemps from OpenBSD. This has been in my tree for months andimp1999-04-041-7/+24
| | | | | | hasn't caused any problems until the egcs import. This fix breaks the world build, but my very next commit will remove mkstemps from the egcs build.
* Add support for long long modifier (e.g. %llx, %lld).dfr1999-03-111-3/+9
| | | | Reviewed by: bde
* Fixed disordering and incoinsistent style in previous commit.bde1999-03-051-3/+3
|
* The pseudocode in the synopsis didn't come close to actuallybde1999-03-051-4/+6
| | | | | | | | | compiling, since <stdio.h> correctly doesn't declare off_t although the pseudo-prototypes for the new fseeko() and ftello() functions use it. Handle this like the corresponding problem for va_list versus the vprintf() family. Fixed some English errors.
* Decapitalize function name by prepending with word "The".hoek1999-02-261-3/+6
| | | | PR: docs/10247
* Added functions fseeko() and ftello() (from susv2).dt1999-02-086-15/+83
| | | | | | | Fixed fgetpos() and fsetpos() for offsets > 2GB. PR: 8637 Submitted by: Dan Nelson <dnelson@emsphone.com> (adjusted by me a little)
* Note that dying on NULL is an implementation detail.eivind1998-12-171-5/+7
|
* Check for a zero-length as well as a NULL string argument.rnordier1998-10-291-1/+1
|
* Revert last change. mkstemp() wasn't to blame, it's nvi. However,peter1998-10-201-21/+5
| | | | mkstemp() is not behaving as documented.
* Stop mk*temp() from being pathologically stupid in the face of a umask(0);peter1998-10-201-5/+21
| | | | | | | There are other ways to fix this than wrapping _gettemp(), but this was the most convenient. Discovered by: bde
* Remove the description of EBADF (that's an implementation detail if Ieivind1998-10-101-11/+6
| | | | | | | | ever saw one), and move the description of NULL behaviour out to a 'NOTES' section, with an extra note that programs should not rely up on it. Kinda-approve-by: bde (by not replying to the mail with the diff)
* program written under FreeBSD -> programs written under FreeBSDeivind1998-10-031-2/+2
| | | | Noticed by: Alex Nash <nash@mcs.net>
* Document that we will core-dump on getting a NULL pointer.eivind1998-09-281-0/+4
|
* Apply patch to properly sscanf(3) when there is whitespace in the formatobrien1998-09-251-7/+2
| | | | | | | | | | | | | string. From the submitted patch: Credit for patch: Chris Torek <torek@bsdi.com> Tod Miller <millert@openbsd.org> This makes us in line with SunOS 4.1.3_U1, Solaris 2.6, OpenBSD 2.3, HP-UX 10.20, Irix 5.3. The previous behavior was in line with Ultrix 4.4. PR: bin/7970 Submitted by: Niall Smart nialls@euristix.ie
* Replace memory leaking instances of realloc with non-leaking reallocf.imp1998-09-164-8/+8
| | | | | | | | | | | 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...
* Replace my original asprintf() and vasprintf() hacks with somethingpeter1998-07-084-142/+99
| | | | | | | | more cleanly integrated with stdio. This should be faster and cleaner since it doesn't memcpy() the data into a seperate buffer. This lets stdio allocate and manage the buffer and then hand it over to the user. Obtained from: Todd Miller <Todd.Miller@courtesan.com> via OpenBSD
* Spelling corrections.jkoshy1998-06-061-1/+1
| | | | | PR: 6868 Submitted by: Josh Gilliam <josh@quick.net>
* Remote the NetBSD kludge for vfprintf.cjb1998-05-081-9/+2
|
* Don't assign the va_list variable 'ap' directly to the argtable becausejb1998-05-081-19/+18
| | | | | va_list is not a pointer on alpha. Instead, use the va_arg() macro to return the address that is stored in the argtable.
* Remove leading underscores for the functions (weak symbols here) thatjb1998-05-051-4/+7
| | | | POSIX defines.
* Fix a nasty flaw as a result of using the arc4random() pre-seeding ofpeter1998-04-141-2/+4
| | | | | | | | leading XXX's. It could wrap an uppercase character through chars like: [ \ ] ^ _ ` in between Z and a. The backslash and back tick might be particularly nasty in a shell script context. Also, since we've been using upper-case generated values for a while now, go with the flow and use them in the pathname search rotation.
* Add FILE locking stubs for libc.jb1998-04-1128-337/+211
| | | | | | | | Change the FILE locking to support kernel threads when linked with libpthread (which you haven't see yet). This requires that libc become thread-safe and thread-aware, testing __isthreaded before attempting to do lock/unlock calls. The impact on non-threaded programs is minor. This change works with libc_r, so it's the best compromise.
* Fixed disordering and inconsistent style in previous commit.bde1998-03-121-3/+2
|
* Added #include <string.h> to get prototypes.jb1998-03-092-1/+3
|
* Fixed a few ancient typos, added a little missing stuff, and updatedmckay1998-03-081-20/+23
| | | | | | references to abort() in light of POSIX mandated behaviour. I'm still not 100% happy with much of the wording, but it's better than it was.
* Fixed uninitialized pointer in previous commit. mktemp() was broken.bde1998-03-031-5/+6
| | | | | | I noticed cvs core dumps and uncleaned cvs temporary files in /tmp. Fixed ANSIisms.
* Many security improvements from OpenBSD:imp1998-02-133-35/+113
| | | | | | | | | | | implement mkdtemp improve man page for mk*temp use arc4random to seed extra XXX's randomly Optionally warn of unsafe mktemp uses From various commits by theo de raadt and Todd Miller. Obtained from: OpenBSD This should go into 2.2 after a testing period.
* size_t -> unsignedache1998-01-041-3/+3
| | | | | in arguments length INT_MAX overflow check Suggested-by: bde
* 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
* 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.
OpenPOWER on IntegriCloud