Fixed test for output_filename == stdout.
authorMichael Meskes <meskes@postgresql.org>
Fri, 14 Nov 2008 16:25:34 +0000 (16:25 +0000)
committerMichael Meskes <meskes@postgresql.org>
Fri, 14 Nov 2008 16:25:34 +0000 (16:25 +0000)
src/interfaces/ecpg/preproc/ecpg.header
src/interfaces/ecpg/preproc/preproc.y

index 95cca4b5cc53b3e7cde44c686319450e03602de6..78aca9afdc4b246b10656358ade313da6e3b25af 100644 (file)
@@ -94,7 +94,8 @@ mmerror(int error_code, enum errortype type, char * error, ...)
                                fclose(yyin);
                        if (yyout)
                                fclose(yyout);
-                       if (unlink(output_filename) != 0 && *output_filename != '-')
+                       
+                       if (strcmp(output_filename, "-") != 0 && unlink(output_filename) != 0)
                                fprintf(stderr, _("could not remove output file \"%s\"\n"), output_filename);
                        exit(error_code);
        }
index 9cb91678f8609fbe6385577268992eb41a48ec56..399ac420048ddb5c55c57662a46b3ff2d27acd2e 100644 (file)
@@ -95,7 +95,8 @@ mmerror(int error_code, enum errortype type, char * error, ...)
                                fclose(yyin);
                        if (yyout)
                                fclose(yyout);
-                       if (unlink(output_filename) != 0 && *output_filename != '-')
+                       
+                       if (strcmp(output_filename, "-") != 0 && unlink(output_filename) != 0)
                                fprintf(stderr, _("could not remove output file \"%s\"\n"), output_filename);
                        exit(error_code);
        }
@@ -9343,6 +9344,8 @@ mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to backend\
 
 
 /* trailer */
+/* $PostgreSQL$ */
+
 statements: /*EMPTY*/
                 | statements statement
                 ;