summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/findfp.c
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2002-11-02 19:47:53 +0000
committeralfred <alfred@FreeBSD.org>2002-11-02 19:47:53 +0000
commitc9d42873f814538c3526f78acc28ded9ad8b9e37 (patch)
tree62e5769f488bc6c9881b890a7671c4811b4c3f5f /lib/libc/stdio/findfp.c
parent75d151bac0879faba47d6ae4a519adb9fbb66022 (diff)
downloadFreeBSD-src-c9d42873f814538c3526f78acc28ded9ad8b9e37.zip
FreeBSD-src-c9d42873f814538c3526f78acc28ded9ad8b9e37.tar.gz
Provide a hook to make __sF visible outside of libc for commercial apps
if WANT_COMPAT4_STDIO is defined when compiling libc. Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu>
Diffstat (limited to 'lib/libc/stdio/findfp.c')
-rw-r--r--lib/libc/stdio/findfp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libc/stdio/findfp.c b/lib/libc/stdio/findfp.c
index 5538a57..283ff5c 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
OpenPOWER on IntegriCloud