aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/odbc
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/odbc')
-rw-r--r--src/interfaces/odbc/bind.c5
-rw-r--r--src/interfaces/odbc/columninfo.c1
-rw-r--r--src/interfaces/odbc/connection.c5
-rw-r--r--src/interfaces/odbc/connection.h8
-rw-r--r--src/interfaces/odbc/convert.c7
-rw-r--r--src/interfaces/odbc/convert.h2
-rw-r--r--src/interfaces/odbc/dlg_specific.c4
-rw-r--r--src/interfaces/odbc/dlg_specific.h4
-rw-r--r--src/interfaces/odbc/drvconn.c5
-rw-r--r--src/interfaces/odbc/environ.c1
-rw-r--r--src/interfaces/odbc/environ.h4
-rw-r--r--src/interfaces/odbc/execute.c4
-rw-r--r--src/interfaces/odbc/gpps.c11
-rw-r--r--src/interfaces/odbc/gpps.h4
-rw-r--r--src/interfaces/odbc/info.c5
-rw-r--r--src/interfaces/odbc/misc.c8
-rw-r--r--src/interfaces/odbc/misc.h4
-rw-r--r--src/interfaces/odbc/multibyte.c2
-rw-r--r--src/interfaces/odbc/multibyte.h1
-rw-r--r--src/interfaces/odbc/odbcapi.c4
-rw-r--r--src/interfaces/odbc/odbcapi30.c4
-rw-r--r--src/interfaces/odbc/options.c4
-rw-r--r--src/interfaces/odbc/parse.c4
-rw-r--r--src/interfaces/odbc/pgapifunc.h3
-rw-r--r--src/interfaces/odbc/pgtypes.c6
-rw-r--r--src/interfaces/odbc/psqlodbc.c4
-rw-r--r--src/interfaces/odbc/psqlodbc.h4
-rw-r--r--src/interfaces/odbc/qresult.h3
-rw-r--r--src/interfaces/odbc/results.c5
-rw-r--r--src/interfaces/odbc/socket.c4
-rw-r--r--src/interfaces/odbc/socket.h4
-rw-r--r--src/interfaces/odbc/statement.c4
-rw-r--r--src/interfaces/odbc/statement.h4
-rw-r--r--src/interfaces/odbc/tuplelist.c2
34 files changed, 31 insertions, 113 deletions
diff --git a/src/interfaces/odbc/bind.c b/src/interfaces/odbc/bind.c
index 469edb6c2ce..2fc340907a3 100644
--- a/src/interfaces/odbc/bind.c
+++ b/src/interfaces/odbc/bind.c
@@ -13,11 +13,8 @@
*-------
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#include "bind.h"
+
#include "environ.h"
#include "statement.h"
#include "qresult.h"
diff --git a/src/interfaces/odbc/columninfo.c b/src/interfaces/odbc/columninfo.c
index 1c635945074..d9a22a163a1 100644
--- a/src/interfaces/odbc/columninfo.c
+++ b/src/interfaces/odbc/columninfo.c
@@ -13,6 +13,7 @@
*/
#include "columninfo.h"
+
#include "connection.h"
#include "socket.h"
#include <stdlib.h>
diff --git a/src/interfaces/odbc/connection.c b/src/interfaces/odbc/connection.c
index 54e448892bb..3e6c89863ce 100644
--- a/src/interfaces/odbc/connection.c
+++ b/src/interfaces/odbc/connection.c
@@ -14,12 +14,9 @@
*/
/* Multibyte support Eiji Tokuya 2001-03-15 */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include "connection.h"
#include "environ.h"
-#include "connection.h"
#include "socket.h"
#include "statement.h"
#include "qresult.h"
diff --git a/src/interfaces/odbc/connection.h b/src/interfaces/odbc/connection.h
index 11379e4f2ff..4da6a7b7a85 100644
--- a/src/interfaces/odbc/connection.h
+++ b/src/interfaces/odbc/connection.h
@@ -9,15 +9,11 @@
#ifndef __CONNECTION_H__
#define __CONNECTION_H__
+#include "psqlodbc.h"
+
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "psqlodbc.h"
-
#ifndef WIN32
#include "iodbc.h"
#include "isql.h"
diff --git a/src/interfaces/odbc/convert.c b/src/interfaces/odbc/convert.c
index 12d5ddf1b8a..59dffbdcf9e 100644
--- a/src/interfaces/odbc/convert.c
+++ b/src/interfaces/odbc/convert.c
@@ -17,16 +17,12 @@
*/
/* Multibyte support Eiji Tokuya 2001-03-15 */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include "convert.h"
#include <stdio.h>
#include <string.h>
#include <ctype.h>
-#include "psqlodbc.h"
-
#ifdef MULTIBYTE
#include "multibyte.h"
#endif
@@ -44,7 +40,6 @@
#include <time.h>
#include <math.h>
#include <stdlib.h>
-#include "convert.h"
#include "statement.h"
#include "qresult.h"
#include "bind.h"
diff --git a/src/interfaces/odbc/convert.h b/src/interfaces/odbc/convert.h
index fed2239e3b1..4a142db3d5c 100644
--- a/src/interfaces/odbc/convert.h
+++ b/src/interfaces/odbc/convert.h
@@ -11,6 +11,8 @@
#include "psqlodbc.h"
+#include "isql.h"
+
/* copy_and_convert results */
#define COPY_OK 0
#define COPY_UNSUPPORTED_TYPE 1
diff --git a/src/interfaces/odbc/dlg_specific.c b/src/interfaces/odbc/dlg_specific.c
index c465f3fc280..d28fcf966c4 100644
--- a/src/interfaces/odbc/dlg_specific.c
+++ b/src/interfaces/odbc/dlg_specific.c
@@ -17,9 +17,7 @@
*/
/* Multibyte support Eiji Tokuya 2001-03-15 */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include "psqlodbc.h"
#ifndef WIN32
#include <string.h>
diff --git a/src/interfaces/odbc/dlg_specific.h b/src/interfaces/odbc/dlg_specific.h
index 884fe2e85ce..67f99449754 100644
--- a/src/interfaces/odbc/dlg_specific.h
+++ b/src/interfaces/odbc/dlg_specific.h
@@ -9,10 +9,6 @@
#ifndef __DLG_SPECIFIC_H__
#define __DLG_SPECIFIC_H__
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#include "psqlodbc.h"
#include "connection.h"
diff --git a/src/interfaces/odbc/drvconn.c b/src/interfaces/odbc/drvconn.c
index 6a8c563fafb..e224cbda5e7 100644
--- a/src/interfaces/odbc/drvconn.c
+++ b/src/interfaces/odbc/drvconn.c
@@ -12,14 +12,11 @@
*-------
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include "psqlodbc.h"
#include <stdio.h>
#include <stdlib.h>
-#include "psqlodbc.h"
#include "connection.h"
#ifndef WIN32
diff --git a/src/interfaces/odbc/environ.c b/src/interfaces/odbc/environ.c
index 2ea5f28ef45..d21c0540cac 100644
--- a/src/interfaces/odbc/environ.c
+++ b/src/interfaces/odbc/environ.c
@@ -14,6 +14,7 @@
*/
#include "environ.h"
+
#include "connection.h"
#include "dlg_specific.h"
#include "statement.h"
diff --git a/src/interfaces/odbc/environ.h b/src/interfaces/odbc/environ.h
index cc7950ae5ee..6d50fa6b48f 100644
--- a/src/interfaces/odbc/environ.h
+++ b/src/interfaces/odbc/environ.h
@@ -9,10 +9,6 @@
#ifndef __ENVIRON_H__
#define __ENVIRON_H__
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#include "psqlodbc.h"
#ifndef WIN32
diff --git a/src/interfaces/odbc/execute.c b/src/interfaces/odbc/execute.c
index 38eabfea6eb..374d700193d 100644
--- a/src/interfaces/odbc/execute.c
+++ b/src/interfaces/odbc/execute.c
@@ -13,10 +13,6 @@
*-------
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#include "psqlodbc.h"
#include <stdio.h>
#include <string.h>
diff --git a/src/interfaces/odbc/gpps.c b/src/interfaces/odbc/gpps.c
index 248f8e0fcd3..4b13fbe62e5 100644
--- a/src/interfaces/odbc/gpps.c
+++ b/src/interfaces/odbc/gpps.c
@@ -21,9 +21,7 @@
#ifndef WIN32
-#if HAVE_CONFIG_H
-#include "config.h" /* produced by configure */
-#endif
+#include "gpps.h"
#include <stdio.h>
#include <unistd.h>
@@ -36,7 +34,6 @@
#include <sys/types.h>
#include <string.h>
#include "misc.h"
-#include "gpps.h"
#include "dlg_specific.h"
#ifndef TRUE
@@ -286,7 +283,7 @@ WritePrivateProfileString(char *theSection, /* section name */
}
-#if 0
+#if NOT_USED
/*
* Ok. What the hell's the default behaviour for a null input buffer, and null
* section name. For now if either are null I ignore the request, until
@@ -449,7 +446,7 @@ if (!keyFound)
return aReturnLength > 0 ? aReturnLength - 1 : 0;
}
-#endif
+#endif /* NOT_USED */
-#endif
+#endif /* not WIN32 */
diff --git a/src/interfaces/odbc/gpps.h b/src/interfaces/odbc/gpps.h
index 5bbe10374b2..9dc9d64210a 100644
--- a/src/interfaces/odbc/gpps.h
+++ b/src/interfaces/odbc/gpps.h
@@ -4,9 +4,7 @@
#ifndef GPPS_H
#define GPPS_H
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include "psqlodbc.h"
#ifndef WIN32
#include <sys/types.h>
diff --git a/src/interfaces/odbc/info.c b/src/interfaces/odbc/info.c
index 79854d6cd2e..1bc96ac888c 100644
--- a/src/interfaces/odbc/info.c
+++ b/src/interfaces/odbc/info.c
@@ -16,13 +16,10 @@
*--------
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include "psqlodbc.h"
#include <string.h>
#include <stdio.h>
-#include "psqlodbc.h"
#ifndef WIN32
#include "iodbc.h"
diff --git a/src/interfaces/odbc/misc.c b/src/interfaces/odbc/misc.c
index ae75320bb53..1bfb877cbf7 100644
--- a/src/interfaces/odbc/misc.c
+++ b/src/interfaces/odbc/misc.c
@@ -12,12 +12,12 @@
*-------
*/
+#include "psqlodbc.h"
+
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
-#include "psqlodbc.h"
-
#ifndef WIN32
#if HAVE_PWD_H
#include <pwd.h>
@@ -120,10 +120,6 @@ qlog(char *fmt,...)
/* Undefine these because windows.h will redefine and cause a warning */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#ifdef WIN32
#undef va_start
#undef va_end
diff --git a/src/interfaces/odbc/misc.h b/src/interfaces/odbc/misc.h
index 5172e491f5d..dc2ef0d5bea 100644
--- a/src/interfaces/odbc/misc.h
+++ b/src/interfaces/odbc/misc.h
@@ -9,9 +9,7 @@
#ifndef __MISC_H__
#define __MISC_H__
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include "psqlodbc.h"
#ifndef WIN32
#include "gpps.h"
diff --git a/src/interfaces/odbc/multibyte.c b/src/interfaces/odbc/multibyte.c
index 4d25c0bb1ad..a9c9c2f83bb 100644
--- a/src/interfaces/odbc/multibyte.c
+++ b/src/interfaces/odbc/multibyte.c
@@ -7,8 +7,8 @@
*--------
*/
-#include <string.h>
#include "multibyte.h"
+#include <string.h>
int multibyte_client_encoding; /* Multibyte Client Encoding. */
int multibyte_status; /* Multibyte Odds and ends character. */
diff --git a/src/interfaces/odbc/multibyte.h b/src/interfaces/odbc/multibyte.h
index c7d8b20d951..43870458e0d 100644
--- a/src/interfaces/odbc/multibyte.h
+++ b/src/interfaces/odbc/multibyte.h
@@ -3,6 +3,7 @@
* Multibyte library header ( psqlODBC Only )
*
*/
+#include "psqlodbc.h"
/* PostgreSQL client encoding */
#define SQL_ASCII 0 /* SQL/ASCII */
diff --git a/src/interfaces/odbc/odbcapi.c b/src/interfaces/odbc/odbcapi.c
index a69c3d1a944..60205c011b6 100644
--- a/src/interfaces/odbc/odbcapi.c
+++ b/src/interfaces/odbc/odbcapi.c
@@ -26,10 +26,6 @@
*-------
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#include "psqlodbc.h"
#ifdef WIN32
#undef ODBCVER
diff --git a/src/interfaces/odbc/odbcapi30.c b/src/interfaces/odbc/odbcapi30.c
index 9902be746df..cee57934df2 100644
--- a/src/interfaces/odbc/odbcapi30.c
+++ b/src/interfaces/odbc/odbcapi30.c
@@ -18,10 +18,6 @@
*-------
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#include "psqlodbc.h"
#undef ODBCVER
#define ODBCVER 0x0300
diff --git a/src/interfaces/odbc/options.c b/src/interfaces/odbc/options.c
index 82b651cdc58..77421b63ebd 100644
--- a/src/interfaces/odbc/options.c
+++ b/src/interfaces/odbc/options.c
@@ -13,10 +13,6 @@
*--------
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#include "psqlodbc.h"
#include <string.h>
diff --git a/src/interfaces/odbc/parse.c b/src/interfaces/odbc/parse.c
index 8916db2072d..eb0589e4c4b 100644
--- a/src/interfaces/odbc/parse.c
+++ b/src/interfaces/odbc/parse.c
@@ -22,9 +22,7 @@
*/
/* Multibyte support Eiji Tokuya 2001-03-15 */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include "psqlodbc.h"
#include <stdio.h>
#include <string.h>
diff --git a/src/interfaces/odbc/pgapifunc.h b/src/interfaces/odbc/pgapifunc.h
index fda018f61f9..a4aca5f323d 100644
--- a/src/interfaces/odbc/pgapifunc.h
+++ b/src/interfaces/odbc/pgapifunc.h
@@ -5,9 +5,6 @@
*/
#ifndef _PG_API_FUNC_H__
#define _PG_API_FUNC_H__
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
#include "psqlodbc.h"
#include <stdio.h>
diff --git a/src/interfaces/odbc/pgtypes.c b/src/interfaces/odbc/pgtypes.c
index ff640776f8b..fdc38d62a19 100644
--- a/src/interfaces/odbc/pgtypes.c
+++ b/src/interfaces/odbc/pgtypes.c
@@ -16,13 +16,9 @@
*--------
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include "pgtypes.h"
-#include "psqlodbc.h"
#include "dlg_specific.h"
-#include "pgtypes.h"
#include "statement.h"
#include "connection.h"
#include "qresult.h"
diff --git a/src/interfaces/odbc/psqlodbc.c b/src/interfaces/odbc/psqlodbc.c
index 4eabeae5ff3..9851af2ee66 100644
--- a/src/interfaces/odbc/psqlodbc.c
+++ b/src/interfaces/odbc/psqlodbc.c
@@ -13,10 +13,6 @@
*--------
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#include "psqlodbc.h"
#include "dlg_specific.h"
diff --git a/src/interfaces/odbc/psqlodbc.h b/src/interfaces/odbc/psqlodbc.h
index df077106512..542fe7ff596 100644
--- a/src/interfaces/odbc/psqlodbc.h
+++ b/src/interfaces/odbc/psqlodbc.h
@@ -5,7 +5,7 @@
*
* Comments: See "notice.txt" for copyright and license information.
*
- * $Id: psqlodbc.h,v 1.45 2001/08/18 04:30:47 inoue Exp $
+ * $Id: psqlodbc.h,v 1.46 2001/08/24 14:07:50 petere Exp $
*
*/
@@ -13,7 +13,7 @@
#define __PSQLODBC_H__
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include "pg_config.h"
#endif
#include <stdio.h> /* for FILE* pointers: see GLOBAL_VALUES */
diff --git a/src/interfaces/odbc/qresult.h b/src/interfaces/odbc/qresult.h
index 7da2a0201ec..29e171bad80 100644
--- a/src/interfaces/odbc/qresult.h
+++ b/src/interfaces/odbc/qresult.h
@@ -9,11 +9,12 @@
#ifndef __QRESULT_H__
#define __QRESULT_H__
+#include "psqlodbc.h"
+
#include "connection.h"
#include "socket.h"
#include "columninfo.h"
#include "tuplelist.h"
-#include "psqlodbc.h"
#include "tuple.h"
enum QueryResultCode_
diff --git a/src/interfaces/odbc/results.c b/src/interfaces/odbc/results.c
index 098c5581d62..bb1f2975df6 100644
--- a/src/interfaces/odbc/results.c
+++ b/src/interfaces/odbc/results.c
@@ -15,12 +15,9 @@
*-------
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include "psqlodbc.h"
#include <string.h>
-#include "psqlodbc.h"
#include "dlg_specific.h"
#include "environ.h"
#include "connection.h"
diff --git a/src/interfaces/odbc/socket.c b/src/interfaces/odbc/socket.c
index 243df4a5014..ed3fd2913c6 100644
--- a/src/interfaces/odbc/socket.c
+++ b/src/interfaces/odbc/socket.c
@@ -12,10 +12,6 @@
*-------
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#include "socket.h"
#ifndef WIN32
diff --git a/src/interfaces/odbc/socket.h b/src/interfaces/odbc/socket.h
index b4a55e57db6..b24be9504d4 100644
--- a/src/interfaces/odbc/socket.h
+++ b/src/interfaces/odbc/socket.h
@@ -9,9 +9,7 @@
#ifndef __SOCKET_H__
#define __SOCKET_H__
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include "psqlodbc.h"
#ifndef WIN32
#include <sys/types.h>
diff --git a/src/interfaces/odbc/statement.c b/src/interfaces/odbc/statement.c
index 3ab683d4a04..891f47df831 100644
--- a/src/interfaces/odbc/statement.c
+++ b/src/interfaces/odbc/statement.c
@@ -12,10 +12,6 @@
*-------
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#include "statement.h"
#include "bind.h"
#include "connection.h"
diff --git a/src/interfaces/odbc/statement.h b/src/interfaces/odbc/statement.h
index 6250a934a5a..571d13edaca 100644
--- a/src/interfaces/odbc/statement.h
+++ b/src/interfaces/odbc/statement.h
@@ -9,10 +9,6 @@
#ifndef __STATEMENT_H__
#define __STATEMENT_H__
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#include "psqlodbc.h"
#include "bind.h"
diff --git a/src/interfaces/odbc/tuplelist.c b/src/interfaces/odbc/tuplelist.c
index 06fd2d44ff8..284ee8ed440 100644
--- a/src/interfaces/odbc/tuplelist.c
+++ b/src/interfaces/odbc/tuplelist.c
@@ -13,8 +13,8 @@
*--------
*/
-#include <stdlib.h>
#include "tuplelist.h"
+#include <stdlib.h>
#include "tuple.h"