summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorAlfred Perlstein <alfred@FreeBSD.org>2002-11-02 19:47:53 +0000
committerAlfred Perlstein <alfred@FreeBSD.org>2002-11-02 19:47:53 +0000
commit0fc25b925d376ebf41effd6c682a5f9e1c97e2be (patch)
tree62e5769f488bc6c9881b890a7671c4811b4c3f5f /lib/libc
parentb95b5e06d055b5eb532248c00d97454343d39d35 (diff)
Notes
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/stdio/Makefile.inc4
-rw-r--r--lib/libc/stdio/findfp.c6
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/libc/stdio/Makefile.inc b/lib/libc/stdio/Makefile.inc
index 7ab0337938ae..3841cfc15e3f 100644
--- a/lib/libc/stdio/Makefile.inc
+++ b/lib/libc/stdio/Makefile.inc
@@ -4,6 +4,10 @@
# stdio sources
.PATH: ${.CURDIR}/../libc/stdio
+.if WANT_COMPAT4_STDIO
+CFLAGS+=-DCOMPAT4_STDIO
+.endif
+
SRCS+= _flock_stub.c asprintf.c clrerr.c fclose.c fdopen.c feof.c ferror.c \
fflush.c fgetc.c fgetln.c fgetpos.c fgets.c fgetwc.c fgetws.c \
fileno.c findfp.c flags.c fopen.c fprintf.c fpurge.c fputc.c fputs.c \
diff --git a/lib/libc/stdio/findfp.c b/lib/libc/stdio/findfp.c
index 5538a57260bc..283ff5ca3bc4 100644
--- a/lib/libc/stdio/findfp.c
+++ b/lib/libc/stdio/findfp.c
@@ -69,12 +69,16 @@ static struct glue uglue = { NULL, FOPEN_MAX - 3, usual };
static struct __sFILEX __sFX[3];
-static FILE __sF[3] = {
+#ifndef COMPAT4_STDIO
+static
+#endif
+FILE __sF[3] = {
std(__SRD, STDIN_FILENO),
std(__SWR, STDOUT_FILENO),
std(__SWR|__SNBF, STDERR_FILENO)
};
+
/*
* The following kludge is done to ensure enough binary compatibility
* with future versions of libc. Or rather it allows us to work with