diff options
author | Bruce Momjian | 1998-03-20 03:08:11 +0000 |
---|---|---|
committer | Bruce Momjian | 1998-03-20 03:08:11 +0000 |
commit | 80f7c4138859543e447b5358623eb63bca1bbd68 (patch) | |
tree | 03fc37441dbd3f31f2ecfe4ee15aa803f652c9a0 /src/interfaces/ecpg/include | |
parent | 561aead3f163549bfd8fa86c8cf98a38a9bb6981 (diff) |
Here's my next patch to bring ecpg to version 1.1. It now correctly
handles all transaction commands and the exec sql include command.
Michael Meskes
Diffstat (limited to 'src/interfaces/ecpg/include')
-rw-r--r-- | src/interfaces/ecpg/include/ecpglib.h | 16 | ||||
-rw-r--r-- | src/interfaces/ecpg/include/ecpgtype.h | 8 | ||||
-rw-r--r-- | src/interfaces/ecpg/include/sqlca.h | 9 |
3 files changed, 31 insertions, 2 deletions
diff --git a/src/interfaces/ecpg/include/ecpglib.h b/src/interfaces/ecpg/include/ecpglib.h index b506908ebc6..6dd2f92aebf 100644 --- a/src/interfaces/ecpg/include/ecpglib.h +++ b/src/interfaces/ecpg/include/ecpglib.h @@ -1,15 +1,23 @@ #include <c.h> +#ifdef __cplusplus +extern "C" { +#endif + void ECPGdebug(int, FILE *); bool ECPGconnect(const char *dbname); bool ECPGdo(int, char *,...); -bool ECPGcommit(int); -bool ECPGrollback(int); +bool ECPGtrans(int, const char *); bool ECPGfinish(void); bool ECPGstatus(void); void ECPGlog(const char *format,...); +/* These functions are only kept for compatibility reasons. */ +/* Use ECPGtrans instead. */ +bool ECPGcommit(int); +bool ECPGrollback(int); + #ifdef LIBPQ_FE_H bool ECPGsetdb(PGconn *); @@ -32,3 +40,7 @@ void sqlprint(void); /* define this for simplicity as well as compatibility */ #define SQLCODE sqlca.sqlcode + +#ifdef __cplusplus +} +#endif diff --git a/src/interfaces/ecpg/include/ecpgtype.h b/src/interfaces/ecpg/include/ecpgtype.h index 5cecc9e2e12..30b1f557138 100644 --- a/src/interfaces/ecpg/include/ecpgtype.h +++ b/src/interfaces/ecpg/include/ecpgtype.h @@ -29,6 +29,10 @@ */ #include <stdio.h> +#ifdef __cplusplus +extern "C" { +#endif + enum ECPGttype { ECPGt_char = 1, ECPGt_unsigned_char, ECPGt_short, ECPGt_unsigned_short, @@ -45,3 +49,7 @@ enum ECPGttype #define IS_SIMPLE_TYPE(type) ((type) >= ECPGt_char && (type) <= ECPGt_varchar2) const char * ECPGtype_name(enum ECPGttype); + +#ifdef __cplusplus +} +#endif diff --git a/src/interfaces/ecpg/include/sqlca.h b/src/interfaces/ecpg/include/sqlca.h index 454eba22018..e493e46bb5d 100644 --- a/src/interfaces/ecpg/include/sqlca.h +++ b/src/interfaces/ecpg/include/sqlca.h @@ -1,6 +1,10 @@ #ifndef POSTGRES_SQLCA_H #define POSTGRES_SQLCA_H +#ifdef __cplusplus +extern "C" { +#endif + struct sqlca { int sqlcode; @@ -12,3 +16,8 @@ struct sqlca } sqlca; #endif + +#ifdef __cplusplus +} +#endif + |