Home | History | Annotate | Download | only in stdio
History log of /src/lib/libc/stdio/fvwrite.c
RevisionDateAuthorComments
 1.31  29-Mar-2024  christos From enh at google dot com in tech-userlevel. Don't limit writes to BUFSIZ,
change the limit to INT_MAX; improves performance dramatically. From:
https://github.com/apple-oss-distributions/Libc/commit/\
c5a3293354e22262702a3add5b2dfc9bb0b93b85\
#diff-3b844a19cfb0aab1a23f7fbc457d3bce7453513730c489a72f66ff89d6557ff3
 1.30  22-Jul-2021  christos branches: 1.30.2;
revert changes to fflush.c (1.18) and fvwrite.c (1.25) until we investigate
collateral damage. Breaks h_intr.c test. Requested by RVP.
 1.29  19-Jul-2021  christos There's no need to adjust `iov' in the error path.
Returning the amount written is all that's needed.
from RVP
 1.28  16-Jul-2021  christos When fflush fails, adjust pointers and the io vectors. From RVP. Fixes
core-dump at cvs(1) exit(3).
 1.27  08-Jul-2021  christos Obey EINTR and return immediately adjusting for unwritten. From RVP
 1.26  06-Jul-2021  christos Handle EINTR, from RVP.
 1.25  27-Mar-2012  christos - widen the internal read and write calls to match the syscalls
- add funopen2() which provides access to flush() and the wider calls.
- make use of the new flush call in fmemopen()
 1.24  15-Mar-2012  christos - ansify, knf.
- no functional changes
 1.23  13-Mar-2012  christos PR/45989: Martin Husemann: lint invocation does include -w only on i386

- turn lint -w for all the platforms after fixing the lint warnings.
- add _DIAGASSERTS() for casts that would assign values to types that
would not fit.
- change types, add casts
- change into ansii prototypes
- turn on _DIAGNOSTIC for libc (during current, to be eliminated for release
builds)

approved by core@
 1.22  24-Mar-2011  dholland branches: 1.22.4;
Eliminate dead store. From Henning Petersen in PR 42776. Doesn't change
the output .o file.
 1.21  25-Oct-2009  christos revert some of dsl's changes to make things build on i386; he can undo what
he wants when he comes back.
 1.20  25-Oct-2009  dsl Lint is differentially far too picky...
Remove some warnings that only appear on i386 (not on amd64) and that
for some reason best known to others are deemed fatal for i386.
Making this code 'pass lint' does absolutely nothing for its readability (etc).
 1.19  24-Oct-2009  dsl Remove a load of pointless casts - one that even lint doesn't bleat about.
 1.18  11-Feb-2009  lukem Fix sign-compare issues.
Ensure provided uio_resid >= 0; negative sizes have "interesting"
semantics elsewhere in stdio, so it's better to avoid them.
 1.17  02-Feb-2007  christos branches: 1.17.22;
Instead of abusing stdio to get a signal-safe version of sprintf, provide one.
 1.16  27-Oct-2006  christos branches: 1.16.2;
Add signal-safe versions of snprintf and vsnprintf
 1.15  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.14  18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.13  20-Sep-1999  lukem branches: 1.13.10;
back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.
_DIAGASSERT() is still retained.
 1.12  16-Sep-1999  lukem * use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.

the first two items result in the addition of code similar to the
following in various functions:

_DIAGASSERT(path != NULL)
#ifdef _DIAGNOSTIC
if (path == NULL) {
errno = EFAULT;
return (-1);
}
#endif
 1.11  15-Nov-1998  christos delint
 1.10  15-Oct-1998  mycroft Allocate space exponentially, not linearly.
 1.9  28-Aug-1998  perry add asprintf and vasprintf, originally written by Todd Miller for OpenBSD
 1.8  03-Feb-1998  perry remove obsolete register declarations
 1.7  13-Jul-1997  christos Fix RCSID's
Fix gcc warnings.
Add prototypes for functions that were declared in more than one place
to local.h or extern.h and use that instead.
 1.6  03-May-1997  kleink Upon an attempt to write to a stream that can't be written to, set errno
to EBADF.
 1.5  29-Mar-1996  jtc Add explict function return types
 1.4  02-Feb-1995  jtc Merged with 4.4lite.
Changed to conform to NetBSD's new RCS Id convention.
 1.3  26-Aug-1993  jtc Declare rcsid strings so they are stored in text segment.
 1.2  01-Aug-1993  mycroft Add RCS identifiers.
 1.1  21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2  02-Feb-1995  jtc imported from 44lite
 1.1.1.1  21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.13.10.1  06-Feb-2002  nathanw #include "reentrant.h" before "local.h" so that the thread types used
in fileext.h are avaliable.
 1.16.2.1  07-May-2007  pavel Pull up following revision(s) (requested by manu in ticket #607):
lib/libc/arch/i386/gen/isnanl.c: revision 1.6
lib/libc/gdtoa/gdtoa.c: revision 1.2-1.3
lib/libc/arch/x86_64/gen/isnanl.c: revision 1.6
lib/libc/gdtoa/gdtoaimp.h: revision 1.6
sys/arch/m68k/include/ieee.h: revision 1.13
usr.bin/xlint/lint1/scan.l: revision 1.36-1.37
lib/libc/stdio/snprintf_ss.c: revision 1.4
lib/libc/arch/i386/gen/isfinitel.c: revision 1.2
lib/libc/stdio/vfscanf.c: revision 1.38
sys/arch/sparc/include/ieee.h: revision 1.11-1.12
lib/libc/gdtoa/dtoa.c: revision 1.4
lib/libc/stdio/Makefile.inc: revision 1.35
lib/libc/stdio/fvwrite.c: revision 1.17
lib/libc/arch/m68k/gen/fpclassifyl.c: revision 1.2
lib/libc/arch/i386/gen/isinfl.c: revision 1.6
lib/libc/arch/x86_64/gen/isinfl.c: revision 1.6
lib/libc/arch/x86_64/gen/isfinitel.c: revision 1.2
lib/libc/stdio/vfprintf.c: revision 1.55-1.57
lib/libc/stdio/vsnprintf_ss.c: revision 1.3
lib/libc/stdio/vfwprintf.c: revision 1.10
sys/arch/x86/include/ieee.h: revision 1.10
lib/libc/gdtoa/dmisc.c: revision 1.3
lib/libc/gdtoa/Makefile.inc: revision 1.5
sys/arch/hppa/include/ieee.h: revision 1.10
lib/libc/arch/x86_64/gen/fpclassifyl.c: revision 1.3
lib/libc/arch/i386/gen/fpclassifyl.c: revision 1.2
sys/sys/ieee754.h: revision 1.7
lib/libc/gdtoa/gdtoa.h: revision 1.7
include/stdio.h: revision 1.67-1.68
lib/libc/gdtoa/hdtoa.c: revision 1.1-1.4
lib/libc/gdtoa/ldtoa.c: revision 1.1-1.4
defined(_NETBSD_SOURCE) is equivalent to (!defined(_ANSI_SOURCE) &&
!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)), so there's no
need to check both of them.
Fix for issue reported in PR lib/35401 as well as related overflow bugs.
deal with hex doubles.
Instead of abusing stdio to get a signal-safe version of sprintf, provide one.
remove __SAFE
add long double and hex double support from freebsd.
make this compile.
add new prototypes.
add the new files to the build. Note I am not bumping libc now, because
these are not used yet.
Merge the int bit with the high fraction bit. Add constants/macros
needed by gdtoa.
add constants used by gdtoa
since the int bit is merged, do the explicit math.
ext_int bit is no more.
ext_int bit is no more.
- merge change from freebsd
- add support for building as vfprintf.c
- XXX: we strdup to simplify the freeing logic. This should be fixed for
efficiency in the vfprintf case.
use vfwprintf.c
enable wide doubles.
some int -> size_t
deal with sparc64 that has 112 bits of mantissa.
make extended precision gdtoa friendly.
int/size_t changes
make this gdtoa friendly.
remove dup definition
use dtoa() instead of returning empty when we don't have extended precision
information.
Fix previous, add forgotten pointer dereference in the call to dtoa().
Add a cheesy workaround marked XXX for the situation where the
strtod() implementation available in the environment does not
handle hex floats.
Discussed with and suggested by christos
From Christos: gdtoa fixes for m68k. M68k ports should build now, but
printing extended precision is a little off.
vax does not have <machine/ieee.h> or long double
It would be nice if the compiler provided something like __IEEE_MATH__
bring in FreeBSD's vfscanf() to gain multi-byte/collation support.
Unfortunately it is too difficult to make vfwscanf and this share
the same code like I did with printf, because for string parsing
the code is too different.
 1.17.22.1  13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.22.4.1  17-Apr-2012  yamt sync with head
 1.30.2.1  20-Jul-2024  martin Pull up following revision(s) (requested by rin in ticket #754):

lib/libc/stdio/fvwrite.c: revision 1.31

From enh at google dot com in tech-userlevel. Don't limit writes to
BUFSIZ, change the limit to INT_MAX; improves performance dramatically. From:
https://github.com/apple-oss-distributions/Libc/commit/c5a3293354e22262702a3add5b2dfc9bb0b93b85#diff-3b844a19cfb0aab1a23f7fbc457d3bce7453513730c489a72f66ff89d6557ff3

RSS XML Feed