Commit 98a3dad4 by Kaveh R. Ghazi Committed by Kaveh Ghazi

collect2.c (main): Unlock the stdio streams.

	* 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
parent 8634c649
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> 2005-04-24 Jakub Jelinek <jakub@redhat.com>
PR middle-end/20991 PR middle-end/20991
......
...@@ -831,6 +831,11 @@ main (int argc, char **argv) ...@@ -831,6 +831,11 @@ main (int argc, char **argv)
signal (SIGCHLD, SIG_DFL); signal (SIGCHLD, SIG_DFL);
#endif #endif
/* Unlock the stdio streams. */
unlock_stream (stdin);
unlock_stream (stdout);
unlock_stream (stderr);
gcc_init_libintl (); gcc_init_libintl ();
/* Do not invoke xcalloc before this point, since locale needs to be /* Do not invoke xcalloc before this point, since locale needs to be
......
...@@ -5995,6 +5995,11 @@ main (int argc, const char **argv) ...@@ -5995,6 +5995,11 @@ main (int argc, const char **argv)
GCC_DRIVER_HOST_INITIALIZATION; GCC_DRIVER_HOST_INITIALIZATION;
#endif #endif
/* Unlock the stdio streams. */
unlock_stream (stdin);
unlock_stream (stdout);
unlock_stream (stderr);
gcc_init_libintl (); gcc_init_libintl ();
if (signal (SIGINT, SIG_IGN) != SIG_IGN) if (signal (SIGINT, SIG_IGN) != SIG_IGN)
......
...@@ -77,6 +77,11 @@ main (int argc ATTRIBUTE_UNUSED, char **argv) ...@@ -77,6 +77,11 @@ main (int argc ATTRIBUTE_UNUSED, char **argv)
{ {
int opt; 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) while ((opt = getopt_long (argc, argv, "hlpv", options, NULL)) != -1)
{ {
switch (opt) switch (opt)
......
...@@ -347,6 +347,11 @@ main (int argc, char **argv) ...@@ -347,6 +347,11 @@ main (int argc, char **argv)
{ {
int argno; int argno;
/* Unlock the stdio streams. */
unlock_stream (stdin);
unlock_stream (stdout);
unlock_stream (stderr);
gcc_init_libintl (); gcc_init_libintl ();
argno = process_args (argc, argv); argno = process_args (argc, argv);
......
...@@ -139,6 +139,11 @@ main (int argc ATTRIBUTE_UNUSED, char **argv) ...@@ -139,6 +139,11 @@ main (int argc ATTRIBUTE_UNUSED, char **argv)
while (i > 0 && argv[0][i-1] != '/') --i; while (i > 0 && argv[0][i-1] != '/') --i;
progname = &argv[0][i]; progname = &argv[0][i];
/* Unlock the stdio streams. */
unlock_stream (stdin);
unlock_stream (stdout);
unlock_stream (stderr);
INIT_SSTRING (&linebuf); INIT_SSTRING (&linebuf);
fprintf (outf, "struct fn_decl std_protos[] = {\n"); fprintf (outf, "struct fn_decl std_protos[] = {\n");
......
...@@ -906,6 +906,11 @@ init_md_reader_args_cb (int argc, char **argv, bool (*parse_opt)(const char *)) ...@@ -906,6 +906,11 @@ init_md_reader_args_cb (int argc, char **argv, bool (*parse_opt)(const char *))
char *lastsl; char *lastsl;
rtx desc; rtx desc;
/* Unlock the stdio streams. */
unlock_stream (stdin);
unlock_stream (stdout);
unlock_stream (stderr);
for (i = 1; i < argc; i++) for (i = 1; i < argc; i++)
{ {
if (argv[i][0] != '-') if (argv[i][0] != '-')
......
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> 2005-04-23 DJ Delorie <dj@redhat.com>
* class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c, * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
......
...@@ -2388,6 +2388,11 @@ main (int argc, char** argv) ...@@ -2388,6 +2388,11 @@ main (int argc, char** argv)
int emit_dependencies = 0, suppress_output = 0; int emit_dependencies = 0, suppress_output = 0;
int opt; int opt;
/* Unlock the stdio streams. */
unlock_stream (stdin);
unlock_stream (stdout);
unlock_stream (stderr);
gcc_init_libintl (); gcc_init_libintl ();
if (argc <= 1) if (argc <= 1)
......
...@@ -940,6 +940,11 @@ main (int argc, char** argv) ...@@ -940,6 +940,11 @@ main (int argc, char** argv)
JCF jcf[1]; JCF jcf[1];
int argi, opt; int argi, opt;
/* Unlock the stdio streams. */
unlock_stream (stdin);
unlock_stream (stdout);
unlock_stream (stderr);
gcc_init_libintl (); gcc_init_libintl ();
if (argc <= 1) if (argc <= 1)
......
...@@ -147,6 +147,11 @@ main (int argc, char **argv) ...@@ -147,6 +147,11 @@ main (int argc, char **argv)
/* Default for output */ /* Default for output */
out = stdout; out = stdout;
/* Unlock the stdio streams. */
unlock_stream (stdin);
unlock_stream (stdout);
unlock_stream (stderr);
gcc_init_libintl (); gcc_init_libintl ();
/* Process options first. We use getopt_long and not /* Process options first. We use getopt_long and not
......
...@@ -58,6 +58,11 @@ main (int argc, char **argv) ...@@ -58,6 +58,11 @@ main (int argc, char **argv)
const char *mangled_classname; const char *mangled_classname;
int i, last_arg; int i, last_arg;
/* Unlock the stdio streams. */
unlock_stream (stdin);
unlock_stream (stdout);
unlock_stream (stderr);
gcc_init_libintl (); gcc_init_libintl ();
if (argc < 2) if (argc < 2)
......
...@@ -4391,6 +4391,11 @@ main (int argc, char **const argv) ...@@ -4391,6 +4391,11 @@ main (int argc, char **const argv)
signal (SIGCHLD, SIG_DFL); signal (SIGCHLD, SIG_DFL);
#endif #endif
/* Unlock the stdio streams. */
unlock_stream (stdin);
unlock_stream (stdout);
unlock_stream (stderr);
gcc_init_libintl (); gcc_init_libintl ();
cwd_buffer = getpwd (); cwd_buffer = getpwd ();
......
...@@ -1618,6 +1618,11 @@ general_init (const char *argv0) ...@@ -1618,6 +1618,11 @@ general_init (const char *argv0)
hex_init (); hex_init ();
/* Unlock the stdio streams. */
unlock_stream (stdin);
unlock_stream (stdout);
unlock_stream (stderr);
gcc_init_libintl (); gcc_init_libintl ();
/* Initialize the diagnostics reporting machinery, so option parsing /* Initialize the diagnostics reporting machinery, so option parsing
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment