aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2008-01-13 11:53:16 +0000
committerMichael Meskes <meskes@postgresql.org>2008-01-13 11:53:16 +0000
commit149db6b6b78101717e61a4325c52abe7e45d3137 (patch)
treec1b826ca6839ae489813c2b0ffa139f0c6d1bf17 /src
parent9f2a20b66d789f4eee01e3cb92f15251826c2a2b (diff)
downloadpostgresql-149db6b6b78101717e61a4325c52abe7e45d3137.tar.gz
postgresql-149db6b6b78101717e61a4325c52abe7e45d3137.zip
Changed prototype for ECPGdo because some compilers don't like int/enum aliasing in there.
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/ecpg/ChangeLog5
-rw-r--r--src/interfaces/ecpg/ecpglib/execute.c6
-rw-r--r--src/interfaces/ecpg/include/ecpglib.h4
3 files changed, 10 insertions, 5 deletions
diff --git a/src/interfaces/ecpg/ChangeLog b/src/interfaces/ecpg/ChangeLog
index 8876c566430..73327a7bc2d 100644
--- a/src/interfaces/ecpg/ChangeLog
+++ b/src/interfaces/ecpg/ChangeLog
@@ -2283,6 +2283,11 @@ Fri, 28 Dec 2007 12:15:38 +0100
Fri, 11 Jan 2008 16:16:24 +0100
- Fixed lexer to correctly parse C quotes.
+
+Sun, 13 Jan 2008 12:52:15 +0100
+
+ - Changed prototype for ECPGdo because some compilers don't like
+ int/enum aliasing in there.
- Set pgtypes library version to 3.0.
- Set compat library version to 3.0.
- Set ecpg library version to 6.0.
diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c
index 689421a9c0a..1b1f47217b2 100644
--- a/src/interfaces/ecpg/ecpglib/execute.c
+++ b/src/interfaces/ecpg/ecpglib/execute.c
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.73 2007/11/15 21:14:45 momjian Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.74 2008/01/13 11:53:16 meskes Exp $ */
/*
* The aim is to get a simpler inteface to the database routines.
@@ -1430,7 +1430,7 @@ ecpg_execute(struct statement * stmt)
}
bool
-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,...)
+ECPGdo(const int lineno, const int compat, const int force_indicator, const char *connection_name, const bool questionmarks, const int st, const char *query,...)
{
va_list args;
struct statement *stmt;
@@ -1439,7 +1439,7 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char
char *oldlocale;
enum ECPGttype type;
struct variable **list;
- enum ECPG_statement_type statement_type = st;
+ enum ECPG_statement_type statement_type = (enum ECPG_statement_type) st;
char *prepname;
if (!query)
diff --git a/src/interfaces/ecpg/include/ecpglib.h b/src/interfaces/ecpg/include/ecpglib.h
index ac7cd4f19e6..18cab5029e9 100644
--- a/src/interfaces/ecpg/include/ecpglib.h
+++ b/src/interfaces/ecpg/include/ecpglib.h
@@ -1,7 +1,7 @@
/*
* this is a small part of c.h since we don't want to leak all postgres
* definitions into ecpg programs
- * $PostgreSQL: pgsql/src/interfaces/ecpg/include/ecpglib.h,v 1.73 2007/10/03 11:11:12 meskes Exp $
+ * $PostgreSQL: pgsql/src/interfaces/ecpg/include/ecpglib.h,v 1.74 2008/01/13 11:53:16 meskes Exp $
*/
#ifndef _ECPGLIB_H
@@ -43,7 +43,7 @@ bool ECPGstatus(int, const char *);
bool ECPGsetcommit(int, const char *, const char *);
bool ECPGsetconn(int, const char *);
bool ECPGconnect(int, int, const char *, const char *, const char *, const char *, int);
-bool ECPGdo(const int, const int, const int, const char *, const char, const enum ECPG_statement_type, const char *,...);
+bool ECPGdo(const int, const int, const int, const char *, const bool, const int, const char *,...);
bool ECPGtrans(int, const char *, const char *);
bool ECPGdisconnect(int, const char *);
bool ECPGprepare(int, const char *, const int, const char *, const char *);