collect2.c (main): Unlock the stdio streams.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Sun, 24 Apr 2005 22:11:55 +0000 (22:11 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Sun, 24 Apr 2005 22:11:55 +0000 (22:11 +0000)
* collect2.c (main): Unlock the stdio streams.
* gcc.c (main): Likewise.
* gcov-dump.c (main): Likewise.
* gcov.c (main): Likewise.
* gen-protos.c (main): Likewise.
* gensupport.c (init_md_reader_args_cb): Likewise.
* protoize.c (main): Likewise.
* toplev.c (general_init): Likewise.

java:
* gjavah.c (main): Unlock the stdio streams.
* jcf-dump.c (main): Likewise.
* jv-scan.c (main): Likewise.
* jvgenmain.c (main): Likewise.

From-SVN: r98676

14 files changed:
gcc/ChangeLog
gcc/collect2.c
gcc/gcc.c
gcc/gcov-dump.c
gcc/gcov.c
gcc/gen-protos.c
gcc/gensupport.c
gcc/java/ChangeLog
gcc/java/gjavah.c
gcc/java/jcf-dump.c
gcc/java/jv-scan.c
gcc/java/jvgenmain.c
gcc/protoize.c
gcc/toplev.c

index b392d668df39dd69f5da5eca492eda09c75f1d47..0c4c36faf96b8dd44abd11ac3bdd7d945f4d8e1c 100644 (file)
@@ -1,3 +1,14 @@
+2005-04-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * collect2.c (main): Unlock the stdio streams.
+       * gcc.c (main): Likewise.
+       * gcov-dump.c (main): Likewise.
+       * gcov.c (main): Likewise.
+       * gen-protos.c (main): Likewise.
+       * gensupport.c (init_md_reader_args_cb): Likewise.
+       * protoize.c (main): Likewise.
+       * toplev.c (general_init): Likewise.
+
 2005-04-24  Jakub Jelinek  <jakub@redhat.com>
 
        PR middle-end/20991
index f95fe4dbbf4776c285393e9de1a2b8c9911f914e..9dfaf62c9eda27282691886a4bf9a7ef59aeb5b4 100644 (file)
@@ -831,6 +831,11 @@ main (int argc, char **argv)
   signal (SIGCHLD, SIG_DFL);
 #endif
 
+  /* Unlock the stdio streams.  */
+  unlock_stream (stdin);
+  unlock_stream (stdout);
+  unlock_stream (stderr);
+
   gcc_init_libintl ();
 
   /* Do not invoke xcalloc before this point, since locale needs to be
index 373b6179bde7d9fc61773255f9f1793e630794b5..d3a0ecff05db4263e82e7a2962b7d9e0f015ed9f 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -5995,6 +5995,11 @@ main (int argc, const char **argv)
   GCC_DRIVER_HOST_INITIALIZATION;
 #endif
 
+  /* Unlock the stdio streams.  */
+  unlock_stream (stdin);
+  unlock_stream (stdout);
+  unlock_stream (stderr);
+
   gcc_init_libintl ();
 
   if (signal (SIGINT, SIG_IGN) != SIG_IGN)
index 859fdb7331048f957b313c29bfa8aff41c736a41..514004e771a832653baf8d0e0acdcf442b97c884 100644 (file)
@@ -77,6 +77,11 @@ main (int argc ATTRIBUTE_UNUSED, char **argv)
 {
   int opt;
 
+  /* Unlock the stdio streams.  */
+  unlock_stream (stdin);
+  unlock_stream (stdout);
+  unlock_stream (stderr);
+
   while ((opt = getopt_long (argc, argv, "hlpv", options, NULL)) != -1)
     {
       switch (opt)
index 66aa742fdd629fb09b22a324b0749744f054931a..6b8f3370c39519725246c976453b23e4cefc19f0 100644 (file)
@@ -347,6 +347,11 @@ main (int argc, char **argv)
 {
   int argno;
 
+  /* Unlock the stdio streams.  */
+  unlock_stream (stdin);
+  unlock_stream (stdout);
+  unlock_stream (stderr);
+
   gcc_init_libintl ();
 
   argno = process_args (argc, argv);
index b8fa31bfe1c37933ab9e294c394346563aa56c03..d60a2098d06245b2c765c18cc501ed5a5834d1c0 100644 (file)
@@ -139,6 +139,11 @@ main (int argc ATTRIBUTE_UNUSED, char **argv)
   while (i > 0 && argv[0][i-1] != '/') --i;
   progname = &argv[0][i];
 
+  /* Unlock the stdio streams.  */
+  unlock_stream (stdin);
+  unlock_stream (stdout);
+  unlock_stream (stderr);
+
   INIT_SSTRING (&linebuf);
 
   fprintf (outf, "struct fn_decl std_protos[] = {\n");
index dbf0aab69227bf70dbfae3b04c34632e8447d94b..8c65a3e7a14e1849a9a02e37df13621317bec323 100644 (file)
@@ -906,6 +906,11 @@ init_md_reader_args_cb (int argc, char **argv, bool (*parse_opt)(const char *))
   char *lastsl;
   rtx desc;
 
+  /* Unlock the stdio streams.  */
+  unlock_stream (stdin);
+  unlock_stream (stdout);
+  unlock_stream (stderr);
+
   for (i = 1; i < argc; i++)
     {
       if (argv[i][0] != '-')
index 251b8b56379027f66d42e29e0638d4ca31e1b32a..6a719d4c6aabd0aa13a2342134d07ef05b32f157 100644 (file)
@@ -1,3 +1,10 @@
+2005-04-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * gjavah.c (main): Unlock the stdio streams.
+       * jcf-dump.c (main): Likewise.
+       * jv-scan.c (main): Likewise.
+       * jvgenmain.c (main): Likewise.
+
 2005-04-23  DJ Delorie  <dj@redhat.com>
 
        * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
index ca38b9e92f970b2ac25f113897f8720fd10a7964..98d20355ed10b8900aa76ee562184fd1424c1c71 100644 (file)
@@ -2388,6 +2388,11 @@ main (int argc, char** argv)
   int emit_dependencies = 0, suppress_output = 0;
   int opt;
 
+  /* Unlock the stdio streams.  */
+  unlock_stream (stdin);
+  unlock_stream (stdout);
+  unlock_stream (stderr);
+
   gcc_init_libintl ();
 
   if (argc <= 1)
index 9bd7650b6619c3ac488d3b4601ad3c0f93edbb9e..cd6f709fbb03114d7e94e1fcceb1c8529661846c 100644 (file)
@@ -940,6 +940,11 @@ main (int argc, char** argv)
   JCF jcf[1];
   int argi, opt;
 
+  /* Unlock the stdio streams.  */
+  unlock_stream (stdin);
+  unlock_stream (stdout);
+  unlock_stream (stderr);
+
   gcc_init_libintl ();
 
   if (argc <= 1)
index fa02c593eae016baa7482d78e8b0a7b05f19a86e..a7522840589a11aff6f83304a2206cb8e4cae8b3 100644 (file)
@@ -147,6 +147,11 @@ main (int argc, char **argv)
   /* Default for output */
   out = stdout;
 
+  /* Unlock the stdio streams.  */
+  unlock_stream (stdin);
+  unlock_stream (stdout);
+  unlock_stream (stderr);
+
   gcc_init_libintl ();
 
   /* Process options first.  We use getopt_long and not
index 1e228a16191d17b0b0eb51136de2b892d5b64c0d..5c651b4164acc224dc450775c498506e306b4f02 100644 (file)
@@ -58,6 +58,11 @@ main (int argc, char **argv)
   const char *mangled_classname;
   int i, last_arg;
 
+  /* Unlock the stdio streams.  */
+  unlock_stream (stdin);
+  unlock_stream (stdout);
+  unlock_stream (stderr);
+
   gcc_init_libintl ();
 
   if (argc < 2)
index b9e100c7fc7fe4a72920090a7e77c1c0e2d5ea9d..bb0420138fb17c13c638e479bee8641a2754eb4f 100644 (file)
@@ -4391,6 +4391,11 @@ main (int argc, char **const argv)
   signal (SIGCHLD, SIG_DFL);
 #endif
 
+  /* Unlock the stdio streams.  */
+  unlock_stream (stdin);
+  unlock_stream (stdout);
+  unlock_stream (stderr);
+
   gcc_init_libintl ();
 
   cwd_buffer = getpwd ();
index 19411e148a0279e21ec70d95272ec5d67f73be23..cea3bb470f33a0bae30f5da840f78226f848f1fa 100644 (file)
@@ -1618,6 +1618,11 @@ general_init (const char *argv0)
 
   hex_init ();
 
+  /* Unlock the stdio streams.  */
+  unlock_stream (stdin);
+  unlock_stream (stdout);
+  unlock_stream (stderr);
+
   gcc_init_libintl ();
 
   /* Initialize the diagnostics reporting machinery, so option parsing