C99 update: freopen(3) with NULL 'path' argument so that it opens the
authorHiten Pandya <hmp@dragonflybsd.org>
Tue, 8 Jun 2004 00:45:00 +0000 (00:45 +0000)
committerHiten Pandya <hmp@dragonflybsd.org>
Tue, 8 Jun 2004 00:45:00 +0000 (00:45 +0000)
commit7248adbe0c885762738a771f128b7bb291aa9098
treeef9cdeef95a5e6365873f29cdc28f90f7b0f3d66
parent9820e071e1d16af9328bc52b946870460c0bd9f6
C99 update: freopen(3) with NULL 'path' argument so that it opens the
same file with a different mode.

At the moment, we just recycle the old file descriptor instead of storing
it somewhere and using that to reopen the file, as the standard seems to
require.  Strictly conforming C99 applications would probably not be able
to tell the difference but POSIX ones can.

While I am there, update the manual page about the new functionality and
correct nearby mdoc(7) markup errors.

Original-work-by: Tim J. Robbins <tjr@freebsd.org>
Additional-work-by: Hiten Pandya <hmp@backplane.com>
lib/libc/stdio/fopen.3
lib/libc/stdio/freopen.c