summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* use reallocarray, and avoid this << 1 ugliness.deraadt2014-10-111-3/+3
| | | | ok doug
* obvious reallocarray(); ok dougderaadt2014-10-081-2/+2
|
* provide section numbers for xrs;jmc2014-08-312-4/+4
|
* Add additional userland interfaces for setting close-on-exec on fdsguenther2014-08-317-63/+231
| | | | | | | | | | | | | when creating them: mkostemp(), mkostemps(), the 'e' mode letter for fopen(), freopen(), fdopen(), and popen(). The close-on-exec flag will be cleared by the action created by posix_spawn_file_actions_adddup2(). Also, add support for the C11 'x' mode letter for fopen() and freopen(), setting O_EXCL when possibly creating files. Note: this requires kernel support for pipe2() and dup3()! ok millert@
* rework some fflush text, as requestedjmc2014-07-031-4/+3
| | | | | | From: Edward tweaks From: Tim van der Molen
* Remove assigned but unused local variables and macro from vfwprintf().stsp2014-06-041-7/+1
| | | | | Found by Elliott @ google ok mpi@
* for non-valid combinations with `#', instead of trying to list them all,jmc2014-05-132-19/+6
| | | | | | simply say all other combinations are behaviour undefined; ok guenther, who reminded me to change these too;
* when demonstrating the correct "double-check" idiom, provide aderaadt2014-05-091-3/+3
| | | | reminder that the return value is int...
* We don't really need uniform distribution for mktemp(3) so usemillert2014-05-061-6/+19
| | | | | | | arc4random_buf() to avoid lots of arc4random() calls with a getpid() syscall for each one. We fetch 32 bytes of random data at a time which can handle up to 16 Xs. 16 Xs should be enough for anyone. Requested and OK deraadt@
* Add #ifndef NO_PRINTF_PERCENT_N. Since we are fully standardized, wederaadt2014-05-032-2/+10
| | | | | | | don't use disable %n ourselves. But Google's Android libc is based on our libc.... Giving them an easy knob to disable this dangerous feature easily make their job easier without making our job any harder. Request from Elliott @ google
* Extend fread() and fwrite() to check for integer overflow, in which casederaadt2014-05-013-4/+40
| | | | | errno EOVERFLOW is returned and error is set on the FILE. ok kettenis miod beck
* add closing parenthesis.sobrado2014-04-221-3/+3
| | | | ok millert@
* need to escape %U, since it is used in Re/Rs blocks;jmc2014-04-191-2/+2
|
* Demonstrate correct usage of snprintf (regarding overflow detection)deraadt2014-04-191-3/+5
| | | | ok guenther
* no getstedu2014-03-251-3/+2
|
* c11 compliance: remove gets()tedu2014-03-233-117/+12
|
* It's still safe to assumed 'signed' existsguenther2014-03-194-12/+12
|
* Fix unsigned comparision.gerhard2014-03-061-3/+3
| | | | ok mpi@
* obvious .Pa fixes; found with mandocdb(8)schwarze2014-01-212-7/+7
|
* f_prealloc() goes away. Comment from the original source file:deraadt2013-12-171-24/+1
| | | | | * XXX. Force immediate allocation of internal memory. Not used by stdio, * but documented historically for certain applications. Bad applications.
* express final disapproval of the interfaces in libcompat, such asderaadt2013-12-041-3/+2
| | | | | | | | | them ftime(), gtty(), stty(), re_comp(), cuserid() and others. Discussion and ongoing work to fix the ports tree from many, especially naddy. ok naddy [There is a bit more cleanup possible after that, but this is considered the current safe step]
* Use iswupper() for wide characters, not isupper(); ok deraadtstsp2013-11-251-3/+2
|
* oops should not be staticderaadt2013-11-131-2/+2
|
* a __fputwc_unlock() prototype was available in fvwrite.h, so use thatderaadt2013-11-124-8/+7
|
* both files contain a function which should only be static.deraadt2013-11-122-4/+4
| | | | not cranking libc over this (unless an issue is found in ports)
* Pull in gdtoa.h instead of declaring __dtoa() and __freedtoa() directlyguenther2013-11-012-6/+4
| | | | ok deraadt@
* Use PATH_MAX, NAME_MAX and LOGIN_NAME_MAX not MAXPATHNAMELEN,millert2013-09-301-12/+12
| | | | MAXNAMLEN or MAXLOGNAME where possible. OK deraadt@
* HISTORY; tweaks and ok sobrado@ jmc@schwarze2013-07-183-9/+33
|
* more library historyschwarze2013-07-1710-21/+96
| | | | | facts checked by sobrado@ style tweaks and ok jmc@
* do not use Sx for sections outwith the page;jmc2013-06-291-4/+3
| | | | man4 still to go...
* Use the fancy .In macro for includes. From Jan Klemkow. ok jmc schwarzetedu2013-06-0522-69/+69
|
* add some prototypes, casts, includes, parenthesis, and whatnot totedu2013-04-174-5/+10
| | | | silence some warnings.
* Set the stream orientation in open_{,w}memstream().guenther2013-04-032-2/+4
| | | | | | Check it in the regress test ok mpi@
* When there are multiple groups of functions with their own #includesguenther2013-04-011-2/+3
| | | | | | | | listed, the #includes in each group are independent, so that users don't need to guess at possible carry-over. general idea ok otto@ millert@ actual diff ok jmc@ schwarze@
* Enable fmemopen(3) and open_{w,}memstream(3)eric2013-03-281-12/+13
| | | | commiting on behalf of mpi@
* Correct version numbermpi2013-03-282-6/+6
|
* Add an open_wmemstream(3) implementation and fix various issues formpi2013-03-273-55/+211
| | | | | | fmemopen(3) and open_memstream(3). With inputs from millert@, stsp@, guenther@, tedu@ and matthew@
* Return EINVAL if there are fewer than six template Xs in the path.guenther2013-03-122-24/+30
| | | | ok deraadt@ millert@
* tweak wording of scanf return value; prompted by Jan Stary; ok jmc@otto2013-03-051-4/+5
|
* Update STANDARDS section as appropriate for C99.brad2013-03-042-7/+9
| | | | ok guenther@
* Fix the combination of 'j' format flag and the XPG "<num>$" modifier.guenther2013-03-021-2/+11
| | | | ok deraadt@ kettenis@ millert@
* Add a bunch of missing functions.brad2013-01-311-2/+19
| | | | ok millert@
* Add support for POSIX.1-2008 functions dprintf(3) and vdprintf(3).brad2013-01-305-8/+155
| | | | | Feedback from millert@ guenther@ OK guenther@ man page bits OK jmc@
* some small cleanup;jmc2013-01-032-13/+14
|
* Add an implementation based on tedu@'s design of fmemopen(3) andmpi2013-01-014-0/+655
| | | | | | | | open_memstream(3) so they can be polished in-tree. One of the manpages comes from NetBSD with some tweaks. Prodded by espie@, krw@, guenther@
* Remove excessive sys/cdefs.h inclusionderaadt2012-12-057-16/+7
| | | | ok guenther millert kettenis
* tweak text for consistency; from artturi almjmc2012-10-031-3/+4
|
* tmpname -> tempnam; from Artturi Almjmc2012-09-071-3/+3
|
* sync comment with reality.fgsch2012-09-011-2/+2
|
* Use nl_langinfo(RADIXCHAR) instead of localeconv()->decimal_point inmatthew2012-06-262-4/+10
| | | | | | | | | | | | | | | | printf() and avoid calling it unless needed (i.e., when we have a floating point value to print). This isn't a big concern currently due to our limited locale support and current localeconv() implementation, but it's still technically a data race and implementing POSIX 2008 per-thread locales is likely to make it worse. nl_langinfo() isn't guaranteed by POSIX to be thread-safe either, but at least our current implementation is thread-safe and it's a simpler interface to keep that way. Printing floating point values isn't async-signal-safe anyway due to gdtoa()'s use of malloc(), so that's not an issue. ok deraadt, stsp, millert