Changed prototype for ECPGdo because some compilers don't like int/enum aliasing...
authorMichael Meskes <meskes@postgresql.org>
Sun, 13 Jan 2008 11:53:16 +0000 (11:53 +0000)
committerMichael Meskes <meskes@postgresql.org>
Sun, 13 Jan 2008 11:53:16 +0000 (11:53 +0000)
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ecpglib/execute.c
src/interfaces/ecpg/include/ecpglib.h

index 8876c56643083f9ca5346745a4bfd5e88744914d..73327a7bc2df472dc4af23a821a10545d576868d 100644 (file)
@@ -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.
index a4a21c0d5a57b483e85178de7ca037de136f11a2..d5504fb5e3ded7fd11d50ba2f2297969d2274704 100644 (file)
@@ -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)
index 3fd9a3ec33d4e4c72925a0f1243947611f36356d..684348e71c080d6ced828d51622c5f9dab2d7655 100644 (file)
@@ -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 *);