aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-12-02 18:56:49 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-12-02 18:56:50 +0000
commit152e978f73fc6cd37d0d82de69f1cf8134b34b90 (patch)
treef644a9cbc704892a6ce50de016baef2e7801cf55
parente5477f83b0a639b86d8cbe710f25d9808a8f72af (diff)
parent111461aaaec2b7d9ffa5f3baabb1bd019d2e0c1d (diff)
downloadbionic-152e978f73fc6cd37d0d82de69f1cf8134b34b90.tar.gz
Merge "Put stdin/stdout/stderr symbols in place." into lmp-mr1-dev
-rw-r--r--libc/stdio/findfp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libc/stdio/findfp.c b/libc/stdio/findfp.c
index 0c2ee7cee..cfbb66bb8 100644
--- a/libc/stdio/findfp.c
+++ b/libc/stdio/findfp.c
@@ -44,6 +44,10 @@
#define ALIGNBYTES (sizeof(uintptr_t) - 1)
#define ALIGN(p) (((uintptr_t)(p) + ALIGNBYTES) &~ ALIGNBYTES)
+#undef stdin
+#undef stdout
+#undef stderr
+
int __sdidinit;
#define NDYNAMIC 10 /* add ten more whenever necessary */
@@ -65,6 +69,9 @@ FILE __sF[3] = {
std(__SWR, STDOUT_FILENO), /* stdout */
std(__SWR|__SNBF, STDERR_FILENO) /* stderr */
};
+FILE* stdin = &__sF[0];
+FILE* stdout = &__sF[1];
+FILE* stderr = &__sF[2];
struct glue __sglue = { &uglue, 3, __sF };
static struct glue *