Print the prog name in errorBelch() even if prog_argv is not set yet
authorSimon Marlow <marlowsd@gmail.com>
Thu, 19 Nov 2009 13:52:30 +0000 (13:52 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Thu, 19 Nov 2009 13:52:30 +0000 (13:52 +0000)
This means we get the prog name in error messages from the flag parser

rts/RtsMessages.c

index ef5c5a2..e2a30a6 100644 (file)
@@ -187,7 +187,7 @@ rtsErrorMsgFn(const char *s, va_list ap)
 #endif
   {
      /* don't fflush(stdout); WORKAROUND bug in Linux glibc */
 #endif
   {
      /* don't fflush(stdout); WORKAROUND bug in Linux glibc */
-     if (prog_argv != NULL && prog_name != NULL) {
+     if (prog_name != NULL) {
        fprintf(stderr, "%s: ", prog_name);
      }
      vfprintf(stderr, s, ap);
        fprintf(stderr, "%s: ", prog_name);
      }
      vfprintf(stderr, s, ap);