summaryrefslogtreecommitdiff
path: root/lib/libc/stdio
AgeCommit message (Collapse)Author
2009-07-12fwrite() should also return 0 if either size or nmemb are 0.Todd C. Miller
Adapted from FreeBSD. OK deraadt@
2009-06-02Set errno to EINVAL when fgets is given a non-positive size.Ray Lai
OK millert otto
2009-04-05accept %F, which actually behaves the same as %f. per C99Martynas Venckus
ok millert@
2009-03-20Return -1 from mktemp_internal() on EINVAL like we used to.Todd C. Miller
OK oga@ thib@
2009-03-01Update to match mktemp.c changesTodd C. Miller
2009-03-01New mktemp(3) based on the one from portable mktemp(1). Now includesTodd C. Miller
digits (in addition to letters) in the random file name. Instead of looping forever, mktemp(3) will terminate when it has tried 2 * N^62 times where N is the number of X's. This is effectively forever for lots of X's.
2009-02-17when the template is entirely XXX characters, would crashTheo de Raadt
from Vadim Zhukov <persgray@gmail ok millert
2009-01-29from Yoshihiko Sarumaru, freebsd pr #76333: fseek(3) can clear EOF too;Jason McIntyre
ok millert
2009-01-10The process number is longer used to replace trailing 'Xs'.Tobias Stoeckmann
ok jmc, millert
2008-10-21use decimal point from locale. ok millert@Martynas Venckus
2008-09-15add missing header needed by strlen().Charles Longeau
ok millert@
2008-09-15- describe how printf(1) and printf(3) %e, %E, %g, %G, %a, %A behaveMartynas Venckus
when the argument is infinity/not-a-number ok millert@, jmc@
2008-09-14describe %a/%A. from freebsdMartynas Venckus
tweaks/ok millert@, jmc@
2008-09-07- replace dtoa w/ David's gdtoa, version 2008-03-15Martynas Venckus
- provide proper dtoa locks - use the real strtof implementation - add strtold, __hdtoa, __hldtoa - add %a/%A support - don't lose precision in printf, don't round to double anymore - implement extended-precision versions of libc functions: fpclassify, isnan, isinf, signbit, isnormal, isfinite, now that the ieee.h is fixed - separate vax versions of strtof, and __hdtoa - add complex math support. added functions: cacos, casin, catan, ccos, csin, ctan, cacosh, casinh, catanh, ccosh, csinh, ctanh, cexp, clog, cabs, cpow, csqrt, carg, cimag, conj, cproj, creal, cacosf, casinf, catanf, ccosf, csinf, ctanf, cacoshf, casinhf, catanhf, ccoshf, csinhf, ctanhf, cexpf, clogf, cabsf, cpowf, csqrtf, cargf, cimagf, conjf, cprojf, crealf - add fdim, fmax, fmin - add log2. (adapted implementation e_log.c. could be more acruate & faster, but it's good enough for now) - remove wrappers & cruft in libm, supposed to work-around mistakes in SVID, etc.; use ieee versions. fixes issues in python 2.6 for djm@ - make _digittoint static - proper definitions for i386, and amd64 in ieee.h - sh, powerpc don't really have extended-precision - add missing definitions for mips64 (quad), m{6,8}k (96-bit) float.h for LDBL_* - merge lead to frac for m{6,8}k, for gdtoa to work properly - add FRAC*BITS & EXT_TO_ARRAY32 definitions in ieee.h, for hdtoa&ldtoa to use - add EXT_IMPLICIT_NBIT definition, which indicates implicit normalization bit - add regression tests for libc: fpclassify and printf - arith.h & gd_qnan.h definitions - update ieee.h: hppa doesn't have quad-precision, hppa64 does - add missing prototypes to gdtoaimp - on 64-bit platforms make sure gdtoa doesn't use a long when it really wants an int - etc., what i may have forgotten... - bump libm major, due to removed&changed symbols - no libc bump, since this is riding on djm's libc major crank from a day ago discussed with / requested by / testing theo, sthen@, djm@, jsg@, merdely@, jsing@, tedu@, brad@, jakemsr@, and others. looks good to millert@ parts of the diff ok kettenis@ this commit does not include: - man page changes
2008-08-27comment fixesMartynas Venckus
2008-08-26- add FMartynas Venckus
- make inf INF nan NAN comply to standards (eEfFgG) - extend man page bits ok millert@. w/ a man page tweak and ok jmc@
2008-08-26don't zero-pad special values. ok millert@Martynas Venckus
2008-08-22Replace the old algorithm that included the process id as part of theTodd C. Miller
temporary file name with one that only uses random data. OK deraadt@
2008-08-21Remove useless code, the kernel will set errno appropriately if anTodd C. Miller
element in the path does not exist. OK deraadt@ pvalchev@
2008-07-22use arc4random_uniform(); ok djm millertTheo de Raadt
2008-07-10- handle sign of negative zero. use sign dtoa setsMartynas Venckus
- remove 'value < 0' cruft, dtoa already clears sign bit for us discussed with, and tested by phessler@ ok millert@, who noticed to remove now-unused variable, and phessler@
2008-05-16Fix ssize_t vs. size_t mismatchTodd C. Miller
2008-05-16C99 says that for each va_copy() there must be a matching va_end().Todd C. Miller
Replace the non-portable hackery in __find_arguments() with a union. From FreeBSD.
2008-05-13Don't forget to va_end() the va_list we get from va_copy(). From FreeBSD.Todd C. Miller
2008-05-05add missing header for getpagesizeCharles Longeau
ok espie@
2008-05-03add missing header for closeCharles Longeau
ok otto@ espie@ millert@
2008-04-21_file is only a short, so prevent truncation if we happen to hitOtto Moerbeek
upon a fd > SHRT_MAX. From freebsd via Jan Schaumann; ok deraadt@ millert@ espie@
2007-11-28%hhd was being printed as if %hd was specifiedTheo de Raadt
ok millert tedu
2007-10-21Comment fix about time consumption of _gettemp.Tobias Stoeckmann
FreeBSD did this in revision 1.20. OK deraadt@, krw@
2007-09-21Add some more truncation checks for path construction in tmpnam(3).Moritz Jodeit
ok ray@
2007-09-17Prevent out-of-bounds memory access in tempnam(3), if the environmentMoritz Jodeit
variable TMPDIR or the argument `dir' is an empty string. With and ok millert@ ray@
2007-09-07Say NUL when referring to \0Chad Loder
2007-08-08Show how to use strcspn(3) to trim newlines.Ray Lai
OK jmc and millert.
2007-06-21The `len' argument is guaranteed to be > 0 upon successful completion.Moritz Jodeit
ok jmc@ ray@ millert@
2007-05-31convert to new .Dd format;Jason McIntyre
2007-05-12Document errno usage. From Tobias Stoeckmann.Ray Lai
Earlier diff OK jmc@, with nit by otto@.
2007-05-10grammar,Marc Espie
okay jmc@
2007-04-01clarify return values, prompted by moritz; ok moritz jmcTheo de Raadt
2007-01-30Remove and simplify an impossible case (if *p = memchr(cp, 0, prec),Ray Lai
p - cp cannot be greater than prec). Prevent an integer overflow when printing a string with length greater than INT_MAX. Initial diff from millert@. OK millert@, beck@, and otto@.
2007-01-29add an ENVIRONMENT section for TMPDIR;Jason McIntyre
from freebsd pr# 108346, from Anton Yuzhaninov much tweaked by otto and myself;
2007-01-16Fix potential int overflow for printf(3) when passing in very largeTodd C. Miller
values for the field width. Adapted from a diff by Christian Biere.
2006-11-26try first mmap() allocation at pagesize, no need to re-mmap at every powerTheo de Raadt
of 2 from 16 to pagesize(); ok otto
2006-10-30suceed -> succeed; from chad doughertyJason McIntyre
2006-10-29make __dtoa & strtod() thread-safe useing the same method as newer gdtoaTheo de Raadt
codebase. tested mostly by ckuethe and myself. __dtoa() use now requires a call to __freedtoa()
2006-10-15mark up `>';Jason McIntyre
2006-10-14Add a CAVEAT section that describes how to properly trim a newline fromChad Loder
a string, being careful to deal with 0-length strings. Help and input from jmc, ok deraadt
2006-10-14Make fgets description much clearer with respect to its exact behavior.Chad Loder
OK and input from deraadt, jmc, millert.
2006-04-29check mmap for failure. the helper functions using it return -1, butTed Unangst
callers do not yet check since printf() for example is not documented to return an error. some formatting cleanups. mostly ok deraadt millert
2006-03-19Remove extraneous cast to malloc call in fgetln example.Ray Lai
OK otto@
2006-01-13Pull in inttypes.h, not stdint.h so we get the prototypes forTodd C. Miller
strtoimax/strtoumax.