NetBSD/lib/libc/stdio
lukem fa11ebb133 apparently ansi c only required fread(3) to return 0 if size or nmembs == 0.
however, susv2 adds the same to fwrite(3), so add the explicit check.
document this for both fread & fwrite. move diagassert for buf!=NULL to after
the (size * nmembs) == 0 check.

this has the helpful side effect of preventing the _DIAGASSERT()ion in
fwrite() being triggered by lots of 3rdparty code that calls fwrite() with
buf=NULL count=0
2001-01-25 02:06:25 +00:00
..
_fseeko.c
_ftello.c
asprintf.c
clrerr.c
fclose.3
fclose.c
fdopen.c This is for completeness only (to make fdopen symmetric with fopen and freopen) 2000-11-29 15:36:42 +00:00
feof.c
ferror.3
ferror.c
fflush.3
fflush.c
fgetc.c
fgetln.3 Sprinkle some __restrict into stdio. 2000-12-29 15:22:48 +00:00
fgetln.c
fgetpos.c In fgetpos() and fsetpos(), use ftello() and fseeko(), respectively, to avoid 2000-07-08 13:51:27 +00:00
fgets.3 Sprinkle some __restrict into stdio. 2000-12-29 15:22:48 +00:00
fgets.c
fileno.c
findfp.c
flags.c
floatio.h
fopen.3 Sprinkle some __restrict into stdio. 2000-12-29 15:22:48 +00:00
fopen.c make sure we preserve errno. 2000-11-29 15:30:20 +00:00
fprintf.c
fpurge.c
fputc.c
fputs.3 Sprinkle some __restrict into stdio. 2000-12-29 15:22:48 +00:00
fputs.c
fread.3 apparently ansi c only required fread(3) to return 0 if size or nmembs == 0. 2001-01-25 02:06:25 +00:00
fread.c apparently ansi c only required fread(3) to return 0 if size or nmembs == 0. 2001-01-25 02:06:25 +00:00
freopen.c Add checks for O_NDELAY [which indicates that we only want plain files], 2000-11-29 15:31:10 +00:00
fscanf.c
fseek.3 Sprinkle some __restrict into stdio. 2000-12-29 15:22:48 +00:00
fseek.c
fseeko.c Oops, forgot to define weak aliases for public names. 2000-07-26 08:52:57 +00:00
fsetpos.c In fgetpos() and fsetpos(), use ftello() and fseeko(), respectively, to avoid 2000-07-08 13:51:27 +00:00
ftell.c
ftello.c Oops, forgot to define weak aliases for public names. 2000-07-26 08:52:57 +00:00
funopen.3
funopen.c
fvwrite.c
fvwrite.h
fwalk.c
fwrite.c apparently ansi c only required fread(3) to return 0 if size or nmembs == 0. 2001-01-25 02:06:25 +00:00
getc.3
getc.c
getchar.c
gets.c
gettemp.c
getw.c
glue.h fix duplicate declaration of __glue. 2000-12-10 04:17:28 +00:00
local.h
makebuf.c
Makefile.inc
mkdtemp.c
mkstemp.c
mktemp.3
mktemp.c
perror.3
perror.c
printf.3 Sprinkle some __restrict into stdio. 2000-12-29 15:22:48 +00:00
printf.c
putc.3
putc.c
putchar.c
puts.c
putw.c
refill.c
remove.3
remove.c
rewind.c
rget.c
scanf.3 Sprinkle some __restrict into stdio. 2000-12-29 15:22:48 +00:00
scanf.c
setbuf.3 Sprinkle some __restrict into stdio. 2000-12-29 15:22:48 +00:00
setbuf.c
setbuffer.c
setvbuf.c
snprintf.c Actually EINVAL fits the circumstances better. 2000-10-19 09:47:43 +00:00
sprintf.c
sscanf.c
stdio.3
stdio.c
tempnam.c
tmpfile.c
tmpnam.3
tmpnam.c
ungetc.3
ungetc.c
vasprintf.c
vfprintf.c initialize mbstate_t properly. 2000-12-30 04:13:25 +00:00
vfscanf.c
vprintf.c
vscanf.c
vsnprintf.c Actually EINVAL fits the circumstances better. 2000-10-19 09:47:43 +00:00
vsprintf.c
vsscanf.c
wbuf.c
wsetup.c