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
TYPCONV GetTypeConv();
int GetConvSize();
void OdbcClose(PGLOBAL g, PFBLOCK fp);
/***********************************************************************/
/* Some macro's (should be defined elsewhere to be more accessible) */
......@@ -301,6 +302,13 @@ static void ResetNullValues(CATPARM *cap)
} // end of ResetNullValues
#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 */
/* of an ODBC table that will be retrieved by GetData commands. */
......
......@@ -44,8 +44,6 @@
#include <errno.h>
#define BIGMEM 1048576 // 1 Megabyte
#else // !__WIN__
// See comment in os.h
#define NODW
#include <unistd.h>
#include <fcntl.h>
//#if defined(THREAD)
......@@ -70,11 +68,6 @@
#include "tabcol.h" // header of XTAB and COLUMN classes
#include "valblk.h"
#include "rcmsg.h"
#if defined(ODBC_SUPPORT)
#include "tabext.h"
#include "odbccat.h"
#include "tabodbc.h"
#endif // ODBC_SUPPORT
#ifdef ZIP_SUPPORT
#include "filamzip.h"
#endif // ZIP_SUPPORT
......@@ -121,6 +114,9 @@ void CloseXMLFile(PGLOBAL, PFBLOCK, bool);
#include "libdoc.h"
#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 */
......@@ -887,7 +883,7 @@ FILE *PlugReopenFile(PGLOBAL g, PFBLOCK fp, LPCSTR md)
/* Close file routine: the purpose of this routine is to avoid */
/* 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;
......@@ -938,7 +934,7 @@ int PlugCloseFile(PGLOBAL g __attribute__((unused)), PFBLOCK fp, bool all)
#endif // LIBXML2_SUPPORT
#ifdef ODBC_SUPPORT
case TYPE_FB_ODBC:
((ODBConn*)fp->File)->Close();
OdbcClose(g, fp);
fp->Count = 0;
fp->File = NULL;
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