Commit 272b3977 authored by Olivier Bertrand's avatar Olivier Bertrand

- Re-trying to fix Linux compile on DWORD.

  modified:   storage/connect/odbconn.cpp
  modified:   storage/connect/plgdbutl.cpp
parent 7947121e
...@@ -55,6 +55,7 @@ extern "C" HINSTANCE s_hModule; // Saved module handle ...@@ -55,6 +55,7 @@ extern "C" HINSTANCE s_hModule; // Saved module handle
TYPCONV GetTypeConv(); TYPCONV GetTypeConv();
int GetConvSize(); int GetConvSize();
void OdbcClose(PGLOBAL g, PFBLOCK fp);
/***********************************************************************/ /***********************************************************************/
/* Some macro's (should be defined elsewhere to be more accessible) */ /* Some macro's (should be defined elsewhere to be more accessible) */
...@@ -301,6 +302,13 @@ static void ResetNullValues(CATPARM *cap) ...@@ -301,6 +302,13 @@ static void ResetNullValues(CATPARM *cap)
} // end of ResetNullValues } // end of ResetNullValues
#endif #endif
/***********************************************************************/
/* Close an ODBC table after a thrown error (called by PlugCloseFile) */
/***********************************************************************/
void OdbcClose(PGLOBAL g, PFBLOCK fp) {
((ODBConn*)fp->File)->Close();
} // end of OdbcClose
/***********************************************************************/ /***********************************************************************/
/* ODBCColumns: constructs the result blocks containing all columns */ /* ODBCColumns: constructs the result blocks containing all columns */
/* of an ODBC table that will be retrieved by GetData commands. */ /* of an ODBC table that will be retrieved by GetData commands. */
......
...@@ -44,8 +44,6 @@ ...@@ -44,8 +44,6 @@
#include <errno.h> #include <errno.h>
#define BIGMEM 1048576 // 1 Megabyte #define BIGMEM 1048576 // 1 Megabyte
#else // !__WIN__ #else // !__WIN__
// See comment in os.h
#define NODW
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
//#if defined(THREAD) //#if defined(THREAD)
...@@ -70,11 +68,6 @@ ...@@ -70,11 +68,6 @@
#include "tabcol.h" // header of XTAB and COLUMN classes #include "tabcol.h" // header of XTAB and COLUMN classes
#include "valblk.h" #include "valblk.h"
#include "rcmsg.h" #include "rcmsg.h"
#if defined(ODBC_SUPPORT)
#include "tabext.h"
#include "odbccat.h"
#include "tabodbc.h"
#endif // ODBC_SUPPORT
#ifdef ZIP_SUPPORT #ifdef ZIP_SUPPORT
#include "filamzip.h" #include "filamzip.h"
#endif // ZIP_SUPPORT #endif // ZIP_SUPPORT
...@@ -121,6 +114,9 @@ void CloseXMLFile(PGLOBAL, PFBLOCK, bool); ...@@ -121,6 +114,9 @@ void CloseXMLFile(PGLOBAL, PFBLOCK, bool);
#include "libdoc.h" #include "libdoc.h"
#endif // LIBXML2_SUPPORT #endif // LIBXML2_SUPPORT
#ifdef ODBC_SUPPORT
void OdbcClose(PGLOBAL g, PFBLOCK fp);
#endif // ODBC_SUPPORT
/***********************************************************************/ /***********************************************************************/
/* Routines for file IO with error reporting to g->Message */ /* Routines for file IO with error reporting to g->Message */
...@@ -887,7 +883,7 @@ FILE *PlugReopenFile(PGLOBAL g, PFBLOCK fp, LPCSTR md) ...@@ -887,7 +883,7 @@ FILE *PlugReopenFile(PGLOBAL g, PFBLOCK fp, LPCSTR md)
/* Close file routine: the purpose of this routine is to avoid */ /* Close file routine: the purpose of this routine is to avoid */
/* double closing that freeze the system on some Unix platforms. */ /* double closing that freeze the system on some Unix platforms. */
/***********************************************************************/ /***********************************************************************/
int PlugCloseFile(PGLOBAL g __attribute__((unused)), PFBLOCK fp, bool all) int PlugCloseFile(PGLOBAL g, PFBLOCK fp, bool all)
{ {
int rc = 0; int rc = 0;
...@@ -938,7 +934,7 @@ int PlugCloseFile(PGLOBAL g __attribute__((unused)), PFBLOCK fp, bool all) ...@@ -938,7 +934,7 @@ int PlugCloseFile(PGLOBAL g __attribute__((unused)), PFBLOCK fp, bool all)
#endif // LIBXML2_SUPPORT #endif // LIBXML2_SUPPORT
#ifdef ODBC_SUPPORT #ifdef ODBC_SUPPORT
case TYPE_FB_ODBC: case TYPE_FB_ODBC:
((ODBConn*)fp->File)->Close(); OdbcClose(g, fp);
fp->Count = 0; fp->Count = 0;
fp->File = NULL; fp->File = NULL;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment