summaryrefslogtreecommitdiff
path: root/lib/libc/stdio
AgeCommit message (Collapse)Author
2003-12-30Add support for scanf "hh" format modifiers - we use it in int_fmtio.hmartin
for SCNd8 and friends - so we should support it properly (and not only by pure luck on alignment blind little endian archs - it used the "h" code path, storing a 16bit int via a byte pointer). This makes sparc64 pass regress/lib/libc/int_fmtio.
2003-12-14remove superfluous assignmentlukem
2003-12-09simplify a sentencegrant
2003-12-05Spaces.uebayasi
2003-10-30"The fgets() and functions gets() do not..." ->grant
"The fgets() and gets() functions do not..."
2003-10-27Overhaul how `build.sh tools' are used:lukem
* Rename "config.h" to "nbtool_config.h" and HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H. This makes in more obvious in the source when we're using tools/compat/config.h versus "standard autoconf" config.h * Consistently move the inclusion of nbtool_config.h to before <sys/cdefs.h> so that the former can provide __RCSID() (et al), and there's no need to protect those macros any more. These changes should make it easier to "tool-ify" a program by adding: #if HAVE_NBTOOL_CONFIG_H #include "nbtool_config.h" #endif to the top of the source files (for the general case).
2003-10-23Move include for reentrant.h inside CONFIG_H test so this works correctlyjmc
with tools/compat. Fixes PR#21344
2003-10-15Make the plural of `X' `X's instead of `Xs'.wiz
Following a suggestion from jmc@openbsd.
2003-10-14PR/23158: Johan Danielsson: Portable usage of the mk*temp() functions requireschristos
six `X's.
2003-10-10Remove another unneeded cast to size_t.simonb
Pointed out by Anil Madhavapeddy in private email.
2003-10-09No need to cast "len" to a size_t now that "len" is a size_t.simonb
2003-10-08avoid signed->unsigned assignment. openbsd PR 1709itojun
2003-09-08Use St -isoC-9X instead of St -isoC9X, to be in sync with groff.wiz
2003-08-27plural "characters" for ret of {v}snprintfheas
2003-08-07Move UCB-licensed code from 4-clause to 3-clause licence.agc
Patches provided by Joel Baker in PR 22280, verified by myself.
2003-07-22Disable cancellation on the first lock, too, not just on internalnathanw
recursive locks (Duh). Disable cancellation around the cond_wait() call, since that's also a cancellation point. Arguably, that would be better handled with pthread_cleanup_*(), but stubbing those for libc is difficult, and the current non-exception-based implementation of cleanup handlers is probably no faster than disabling and reenabling cancellation. Finally, it only happens in the slow path where the thread is going to sleep anyway...
2003-07-21Set the _LOCKINTERNAL() count on initial locking as well as subsequentnathanw
recursive locks.
2003-07-19Use threadlib stub rather than pthread_setcancelstate() directly.nathanw
2003-07-18#include "local.h" to get __flockfile_internal() prototype.nathanw
2003-07-18Move guts of flockfile()/funlockfile() to __flockfile_internal(), whichnathanw
takes an additional argument indicating whether this is an internal caller taking the lock or an external (application) caller. When making an internal lock, save the current thread cancellation state and disable cancellation until the matching unlock. This should prevent canccelled threads from exiting inside of stdio while holding a file lock and potentially leaving other parts of the FILE structure in an inconsistent state.
2003-07-18Add fields to struct __sfileext to track how many times the lock has beennathanw
taken by internal stdio functions, and what the cancellation state was when the first such lock was taken.
2003-05-27Fix handing of -ve hexadecimal numbers in the %i format. Fixesthorpej
PR lib/21691. Patch from Simon Burge.
2003-05-11Drop trailing space.wiz
2003-05-11Oops, typo in previous.kleink
2003-05-11As prompted by Thomas Klausner, add a RETURN VALUES section.kleink
2003-05-03Misc. fixes from jmc@openbsd.wiz
2003-04-16Usewiz
.In header.h instead of .Fd #include \*[Lt]header.h\*[Gt] Much easier to read and write, and supported by groff for ages. Okayed by ross.
2003-03-28avoid using multiple different ways of saying the same thingpooka
2003-03-07add fgetws() and fputws() (lib/20576).tshiozak
Note: fgetws.c, fgetws.3, fputws.c and fputws.3 are obtained from FreeBSD, and fitted by sigsegv@infoseek.jp and me.
2003-02-16Use strlcpy, not strcpy, in one more place. From deraadt.wiz
2003-02-01Revert the conversion to libpthread's recursive mutexes. Too muchnathanw
trouble is caused by the memory allocation in the mutex initialization, and uncontested mutexes and condition variables have become faster in the meantime.
2003-01-28a, b, and c.wiz
2003-01-28Add a manual page for flockfile(3) etc.; while here, also add *_unlocked()kleink
to stdio(3) overview documentation. Fixes PR lib/20096 from Jason Thorpe.
2003-01-21Use recursive mutexes from libpthread rather than implementingnathanw
our own with normal mutexes and condition variables.
2003-01-18Merge the nathanw_sa branch.thorpej
2003-01-05Fix two bugs:kristerw
1. snprintf(foo, 0. "XXX") is guaranteed not to write in foo by the standard (ISO/IEC 9899 7.19.6.5) but our implementation handles this as if the buffer has a size of (size_t)-1. 2. snprintf(NULL, 0, "XXX") leaks memory since cantwrite() allocates memory if _bf._base == NULL, and this buffer is never freed (PR 16483).
2003-01-03Fix typos (from PR 19650)mjl
2002-11-30- Migrate fparseln(3) from libutil to libc, where it should have been inlukem
the first place... - Bump libutil major (to 7.0) and libc minor (to 12.91).
2002-11-11Document that the *printf() functions can return a negative value undersimonb
output error conditions.
2002-10-01New sentence, new line. From Robert Elz.wiz
2002-09-14Allow mktemp to be built as a host tool.thorpej
2002-08-20Drop superfluous Ns and fix a formatting glitch.wiz
2002-08-10- add description of the race.yamt
- fix typo. from OpenBSD.
2002-08-10use more Xs for filename templates.yamt
from OpenBSD.
2002-08-10if the path is directory, remove(3) behaves as rmdir instead of unlink.yamt
from OpenBSD.
2002-08-10bring in EXAMPLES and BUGS from openbsd.yamt
2002-07-21Correct wrong comparison in example.mjl
2002-07-10import CAVEATS sections from OpenBSD.yamt
with little tweak by me.
2002-06-12Add Xr to fileno(3).wiz
2002-05-26__STDC__ is always defined on NetBSD.wiz