OSDN Git Service

PR objc/21641
[pf3gnuchains/gcc-fork.git] / gcc / java / jv-scan.c
index a3726fd..a283328 100644 (file)
@@ -42,7 +42,8 @@ Boston, MA 02111-1307, USA.  */
 
 extern void fatal_error (const char *msgid, ...)
      ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
-void warning (const char *msgid, ...) ATTRIBUTE_PRINTF_1;
+void warning (int opt, const char *msgid, ...) ATTRIBUTE_PRINTF_2;
+void warning0 (const char *msgid, ...) ATTRIBUTE_PRINTF_1;
 void report (void);
 
 static void usage (void) ATTRIBUTE_NORETURN;
@@ -146,6 +147,9 @@ main (int argc, char **argv)
   /* Default for output */
   out = stdout;
 
+  /* Unlock the stdio streams.  */
+  unlock_std_streams ();
+
   gcc_init_libintl ();
 
   /* Process options first.  We use getopt_long and not
@@ -256,7 +260,18 @@ fatal_error (const char *msgid, ...)
 }
 
 void
-warning (const char *msgid, ...)
+warning (int opt ATTRIBUTE_UNUSED, const char *msgid, ...)
+{
+  va_list ap;
+  va_start (ap, msgid);
+  fprintf (stderr, _("%s: warning: "), exec_name);
+  vfprintf (stderr, _(msgid), ap);
+  fputc ('\n', stderr);
+  va_end (ap);
+}
+
+void
+warning0 (const char *msgid, ...)
 {
   va_list ap;
   va_start (ap, msgid);