Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/stdio only provide compatibility i/o functions to t...
details: https://anonhg.NetBSD.org/src/rev/0f66544138ba
branches: trunk
changeset: 778471:0f66544138ba
user: christos <christos%NetBSD.org@localhost>
date: Wed Mar 28 15:21:11 2012 +0000
description:
only provide compatibility i/o functions to the ones provided by the caller.
diffstat:
lib/libc/stdio/funopen.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diffs (32 lines):
diff -r d6460244e58b -r 0f66544138ba lib/libc/stdio/funopen.c
--- a/lib/libc/stdio/funopen.c Wed Mar 28 14:55:22 2012 +0000
+++ b/lib/libc/stdio/funopen.c Wed Mar 28 15:21:11 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: funopen.c,v 1.13 2012/03/27 15:05:42 christos Exp $ */
+/* $NetBSD: funopen.c,v 1.14 2012/03/28 15:21:11 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)funopen.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: funopen.c,v 1.13 2012/03/27 15:05:42 christos Exp $");
+__RCSID("$NetBSD: funopen.c,v 1.14 2012/03/28 15:21:11 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -159,7 +159,12 @@
d->writefn = writefn;
d->seekfn = seekfn;
d->closefn = closefn;
- fp = funopen2(d, creadfn, cwritefn, cseekfn, NULL, cclosefn);
+ fp = funopen2(d,
+ d->readfn ? creadfn : NULL,
+ d->writefn ? cwritefn : NULL,
+ d->seekfn ? cseekfn : NULL,
+ NULL,
+ d->closefn ? cclosefn : NULL);
if (fp != NULL)
return fp;
free(d);
Home |
Main Index |
Thread Index |
Old Index