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

Commit7955f98

Browse files
author
Michael Meskes
committed
Include sqlca.h automatically.
1 parent7a0672b commit7955f98

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

‎src/interfaces/ecpg/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,5 +1192,9 @@ Mon Jan 7 12:18:01 CET 2002
11921192
Tue Jan 8 15:16:37 CET 2002
11931193

11941194
- Fixed array pointers, no longer using void *.
1195+
1196+
Thu Jan 10 11:12:14 CET 2002
1197+
1198+
- Include sqlca.h automatically.
11951199
- Set ecpg version to 2.9.0.
11961200
- Set library version to 3.3.0.

‎src/interfaces/ecpg/preproc/ecpg.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.52 2002/01/1001:11:45 tgl Exp $ */
1+
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.53 2002/01/1010:42:54 meskes Exp $ */
22

33
/* New main for ecpg, the PostgreSQL embedded SQL precompiler. */
44
/* (C) Michael Meskes <meskes@postgresql.org> Feb 5th, 1998 */
@@ -296,8 +296,8 @@ main(int argc, char *const argv[])
296296
/* initialize lex */
297297
lex_init();
298298

299-
/* we needtwo includes */
300-
fprintf(yyout,"/* Processed by ecpg (%d.%d.%d) */\n/* These three include files are added by the preprocessor */\n#include <ecpgtype.h>\n#include <ecpglib.h>\n#include <ecpgerrno.h>\n#line 1 \"%s\"\n",MAJOR_VERSION,MINOR_VERSION,PATCHLEVEL,input_filename);
299+
/* we needseveral includes */
300+
fprintf(yyout,"/* Processed by ecpg (%d.%d.%d) */\n/* These three include files are added by the preprocessor */\n#include <ecpgtype.h>\n#include <ecpglib.h>\n#include <ecpgerrno.h>\n#include <sqlca.h>\n#line 1 \"%s\"\n",MAJOR_VERSION,MINOR_VERSION,PATCHLEVEL,input_filename);
301301

302302
/* and parse the source */
303303
yyparse();

‎src/interfaces/ecpg/preproc/pgc.l

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*
1313
*
1414
* IDENTIFICATION
15-
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.83 2001/12/23 12:17:41 meskes Exp $
15+
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.84 2002/01/10 10:42:54 meskes Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -824,6 +824,11 @@ cppline{space}*#(.*\\{space})*.*
824824
{}
825825
yytext[i+1] ='\0';
826826

827+
/* since version 2.9.0 sqlca.h is included
828+
automatically */
829+
if (strcmp(yytext,"sqlca") ==0)
830+
mmerror(PARSE_ERROR, ET_NOTICE,"sqlca.h is included automatically.");
831+
827832
yyin =NULL;
828833
for (ip = include_paths; yyin ==NULL && ip !=NULL; ip = ip->next)
829834
{
@@ -846,8 +851,8 @@ cppline{space}*#(.*\\{space})*.*
846851
}
847852
if (!yyin)
848853
{
849-
fprintf(stderr,"Error:Cannot open include file %s in line %d\n", yytext, yylineno);
850-
exit(NO_INCLUDE_FILE);
854+
sprintf(errortext,"Cannot open include file %s in line %d\n", yytext, yylineno);
855+
mmerror(NO_INCLUDE_FILE, ET_FATAL, errortext);
851856
}
852857

853858
input_filename =mm_strdup(inc_file);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp