Skip to content

Commit 149db6b

Browse files
author
Michael Meskes
committed
Changed prototype for ECPGdo because some compilers don't like int/enum aliasing in there.
1 parent 9f2a20b commit 149db6b

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

src/interfaces/ecpg/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2283,6 +2283,11 @@ Fri, 28 Dec 2007 12:15:38 +0100
22832283
Fri, 11 Jan 2008 16:16:24 +0100
22842284

22852285
- Fixed lexer to correctly parse C quotes.
2286+
2287+
Sun, 13 Jan 2008 12:52:15 +0100
2288+
2289+
- Changed prototype for ECPGdo because some compilers don't like
2290+
int/enum aliasing in there.
22862291
- Set pgtypes library version to 3.0.
22872292
- Set compat library version to 3.0.
22882293
- Set ecpg library version to 6.0.

src/interfaces/ecpg/ecpglib/execute.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.73 2007/11/15 21:14:45 momjian Exp $ */
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.74 2008/01/13 11:53:16 meskes Exp $ */
22

33
/*
44
* The aim is to get a simpler inteface to the database routines.
@@ -1430,7 +1430,7 @@ ecpg_execute(struct statement * stmt)
14301430
}
14311431

14321432
bool
1433-
ECPGdo(const int lineno, const int compat, const int force_indicator, const char *connection_name, const bool questionmarks, const enum ECPG_statement_type st, const char *query,...)
1433+
ECPGdo(const int lineno, const int compat, const int force_indicator, const char *connection_name, const bool questionmarks, const int st, const char *query,...)
14341434
{
14351435
va_list args;
14361436
struct statement *stmt;
@@ -1439,7 +1439,7 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char
14391439
char *oldlocale;
14401440
enum ECPGttype type;
14411441
struct variable **list;
1442-
enum ECPG_statement_type statement_type = st;
1442+
enum ECPG_statement_type statement_type = (enum ECPG_statement_type) st;
14431443
char *prepname;
14441444

14451445
if (!query)

src/interfaces/ecpg/include/ecpglib.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* this is a small part of c.h since we don't want to leak all postgres
33
* definitions into ecpg programs
4-
* $PostgreSQL: pgsql/src/interfaces/ecpg/include/ecpglib.h,v 1.73 2007/10/03 11:11:12 meskes Exp $
4+
* $PostgreSQL: pgsql/src/interfaces/ecpg/include/ecpglib.h,v 1.74 2008/01/13 11:53:16 meskes Exp $
55
*/
66

77
#ifndef _ECPGLIB_H
@@ -43,7 +43,7 @@ bool ECPGstatus(int, const char *);
4343
bool ECPGsetcommit(int, const char *, const char *);
4444
bool ECPGsetconn(int, const char *);
4545
bool ECPGconnect(int, int, const char *, const char *, const char *, const char *, int);
46-
bool ECPGdo(const int, const int, const int, const char *, const char, const enum ECPG_statement_type, const char *,...);
46+
bool ECPGdo(const int, const int, const int, const char *, const bool, const int, const char *,...);
4747
bool ECPGtrans(int, const char *, const char *);
4848
bool ECPGdisconnect(int, const char *);
4949
bool ECPGprepare(int, const char *, const int, const char *, const char *);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy