Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita76e98f

Browse files
author
Michael Meskes
committed
Fixed test for output_filename == stdout.
1 parentf06b760 commita76e98f

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

‎src/interfaces/ecpg/preproc/ecpg.header

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.header,v 1.1 2008/11/1410:03:33 meskes Exp $ */
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.header,v 1.2 2008/11/1416:25:34 meskes Exp $ */
22

33
/* Copyright comment */
44
%{
@@ -94,7 +94,8 @@ mmerror(int error_code, enum errortype type, char * error, ...)
9494
fclose(yyin);
9595
if (yyout)
9696
fclose(yyout);
97-
if (unlink(output_filename) != 0 && *output_filename != '-')
97+
98+
if (strcmp(output_filename, "-") != 0 && unlink(output_filename) != 0)
9899
fprintf(stderr, _("could not remove output file \"%s\"\n"), output_filename);
99100
exit(error_code);
100101
}

‎src/interfaces/ecpg/preproc/preproc.y

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* header*/
2-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.383 2008/11/13 11:54:39 meskes Exp $*/
2+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.384 2008/11/14 16:25:34 meskes Exp $*/
33

44
/* Copyright comment*/
55
%{
@@ -95,7 +95,8 @@ mmerror(int error_code, enum errortype type, char * error, ...)
9595
fclose(yyin);
9696
if (yyout)
9797
fclose(yyout);
98-
if (unlink(output_filename) !=0 && *output_filename !='-')
98+
99+
if (strcmp(output_filename,"-") !=0 &&unlink(output_filename) !=0)
99100
fprintf(stderr,_("could not remove output file\"%s\"\n"), output_filename);
100101
exit(error_code);
101102
}
@@ -390,7 +391,7 @@ add_typedef(char *name, char * dimension, char * length, enum ECPGttype type_enu
390391
structprepprep;
391392
}
392393
/* tokens*/
393-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.383 2008/11/13 11:54:39 meskes Exp $*/
394+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.384 2008/11/14 16:25:34 meskes Exp $*/
394395
/* special embedded SQL token*/
395396
%tokenSQL_ALLOCATESQL_AUTOCOMMITSQL_BOOLSQL_BREAK
396397
SQL_CALLSQL_CARDINALITYSQL_CONNECT
@@ -847,7 +848,7 @@ add_typedef(char *name, char * dimension, char * length, enum ECPGttype type_enu
847848
%type<str>reserved_keyword
848849
%type<str>SpecialRuleRelation
849850
/* ecpgtype*/
850-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.383 2008/11/13 11:54:39 meskes Exp $*/
851+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.384 2008/11/14 16:25:34 meskes Exp $*/
851852
%type<str>ECPGAllocateDescr
852853
%type<str>ECPGCKeywords
853854
%type<str>ECPGColId
@@ -9343,6 +9344,8 @@ mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to backend\
93439344

93449345

93459346
/* trailer*/
9347+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.384 2008/11/14 16:25:34 meskes Exp $*/
9348+
93469349
statements:/*EMPTY*/
93479350
|statementsstatement
93489351
;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp