diff packages/language/c/libc/stdio/current/src/common/stdin.cxx @ 134:d2f49caf9e38 ecos-sw-2000-11-03

Merge from eCos master repository on 2000-11-03-09:00:49-GMT
author jlarmour
date Fri, 03 Nov 2000 21:17:40 +0000
parents 6ed91473a1cd
children e0c0827131d1
line wrap: on
line diff
--- a/packages/language/c/libc/stdio/current/src/common/stdin.cxx
+++ b/packages/language/c/libc/stdio/current/src/common/stdin.cxx
@@ -64,10 +64,15 @@
 #include <cyg/libc/stdio/stdiofiles.hxx>  // C library files
 #include <cyg/libc/stdio/stdiosupp.hxx>   // Cyg_libc_stdio_find_filename()
 
+// CONSTANTS
+
+// Use default libc priority to allow it to be the fd 0 if necessary
+#define PRIO (CYG_INIT_LIBC)
+
 // STATICS
 
 Cyg_StdioStream
-cyg_libc_stdio_stdin CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_LIBC) = Cyg_StdioStream( 
+cyg_libc_stdio_stdin CYGBLD_ATTRIB_INIT_PRI(PRIO) = Cyg_StdioStream( 
     Cyg_libc_stdio_find_filename(CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE,
                                  Cyg_StdioStream::CYG_STREAM_READ, false, false),
     Cyg_StdioStream::CYG_STREAM_READ, false, false, _IOLBF );
@@ -87,5 +92,10 @@ public:
 
 // And here's an instance of the class just to make the code run
 static cyg_libc_dummy_stdin_init_class cyg_libc_dummy_stdin_init
-                                         CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_LIBC);
+                                         CYGBLD_ATTRIB_INIT_PRI(PRIO);
+
+// and finally stdin itself
+__externC Cyg_StdioStream * const stdin;
+Cyg_StdioStream * const stdin=&cyg_libc_stdio_stdin;
+
 // EOF stdin.cxx