summaryrefslogtreecommitdiff
path: root/storage/connect/tabdos.cpp
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2015-05-27 16:23:38 +0200
committerOlivier Bertrand <bertrandop@gmail.com>2015-05-27 16:23:38 +0200
commitb6a56370d6e833f8033169ebb4e91cdce4d911aa (patch)
tree84f758dc0afbfc7882727e0d43d88666ee55d648 /storage/connect/tabdos.cpp
parentfb98632930cd320c55a8664f601c4082b3e14628 (diff)
downloadmariadb-git-b6a56370d6e833f8033169ebb4e91cdce4d911aa.tar.gz
Change all preprocessor compiler directives to use __WIN__ as the mean of
specifying Windows or not Windows compile. This is what MariaDB does. modified: storage/connect/array.cpp modified: storage/connect/blkfil.cpp modified: storage/connect/block.h modified: storage/connect/colblk.cpp modified: storage/connect/domdoc.cpp modified: storage/connect/filamap.cpp modified: storage/connect/filamdbf.cpp modified: storage/connect/filamfix.cpp modified: storage/connect/filamtxt.cpp modified: storage/connect/filamvct.cpp modified: storage/connect/filamzip.cpp modified: storage/connect/filter.cpp modified: storage/connect/filter.h modified: storage/connect/fmdlex.c modified: storage/connect/global.h modified: storage/connect/ha_connect.cc modified: storage/connect/json.cpp modified: storage/connect/macutil.cpp modified: storage/connect/macutil.h modified: storage/connect/maputil.cpp modified: storage/connect/mycat.cc modified: storage/connect/myconn.cpp modified: storage/connect/myconn.h modified: storage/connect/myutil.cpp modified: storage/connect/odbconn.cpp modified: storage/connect/odbconn.h modified: storage/connect/os.h modified: storage/connect/osutil.c modified: storage/connect/plgdbsem.h modified: storage/connect/plgdbutl.cpp modified: storage/connect/plugutil.c modified: storage/connect/rcmsg.c modified: storage/connect/reldef.cpp modified: storage/connect/reldef.h modified: storage/connect/tabdos.cpp modified: storage/connect/tabfix.cpp modified: storage/connect/tabfmt.cpp modified: storage/connect/tabjson.cpp modified: storage/connect/tabmac.cpp modified: storage/connect/tabmac.h modified: storage/connect/tabmul.cpp modified: storage/connect/tabmul.h modified: storage/connect/tabmysql.cpp modified: storage/connect/taboccur.cpp modified: storage/connect/tabodbc.cpp modified: storage/connect/tabpivot.cpp modified: storage/connect/tabsys.cpp modified: storage/connect/tabtbl.cpp modified: storage/connect/tabutil.cpp modified: storage/connect/tabvct.cpp modified: storage/connect/tabwmi.cpp modified: storage/connect/tabxcl.cpp modified: storage/connect/tabxml.cpp modified: storage/connect/valblk.cpp modified: storage/connect/value.cpp modified: storage/connect/xindex.cpp modified: storage/connect/xindex.h
Diffstat (limited to 'storage/connect/tabdos.cpp')
-rw-r--r--storage/connect/tabdos.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/storage/connect/tabdos.cpp b/storage/connect/tabdos.cpp
index bee56e31886..a1e58ab3344 100644
--- a/storage/connect/tabdos.cpp
+++ b/storage/connect/tabdos.cpp
@@ -17,7 +17,7 @@
/* Include relevant sections of the System header files. */
/***********************************************************************/
#include "my_global.h"
-#if defined(WIN32)
+#if defined(__WIN__)
#include <io.h>
#include <sys\timeb.h> // For testing only
#include <fcntl.h>
@@ -26,7 +26,7 @@
#define __MFC_COMPAT__ // To define min/max as macro
#endif // __BORLANDC__
//#include <windows.h>
-#else // !WIN32
+#else // !__WIN__
#if defined(UNIX)
#include <errno.h>
#include <unistd.h>
@@ -34,7 +34,7 @@
#include <io.h>
#endif // !UNIX
#include <fcntl.h>
-#endif // !WIN32
+#endif // !__WIN__
/***********************************************************************/
/* Include application header files: */
@@ -208,11 +208,11 @@ void DOSDEF::RemoveOptValues(PGLOBAL g)
// Delete any eventually ill formed non matching optimization file
if (!GetOptFileName(g, filename))
-#if defined(WIN32)
+#if defined(__WIN__)
DeleteFile(filename);
#else // UNIX
remove(filename);
-#endif // WIN32
+#endif // __WIN__
Optimized = 0;
} // end of RemoveOptValues
@@ -253,7 +253,7 @@ bool DOSDEF::DeleteIndexFile(PGLOBAL g, PIXDEF pxdf)
/*********************************************************************/
if (sep) {
// Indexes are save in separate files
-#if !defined(UNIX)
+#if defined(__WIN__)
char drive[_MAX_DRIVE];
#else
char *drive = NULL;
@@ -270,7 +270,7 @@ bool DOSDEF::DeleteIndexFile(PGLOBAL g, PIXDEF pxdf)
strcat(strcat(fname, "_"), pxdf->GetName());
_makepath(filename, drive, direc, fname, ftype);
PlugSetPath(filename, filename, GetPath());
-#if defined(WIN32)
+#if defined(__WIN__)
if (!DeleteFile(filename))
rc |= (GetLastError() != ERROR_FILE_NOT_FOUND);
#else // UNIX
@@ -287,7 +287,7 @@ bool DOSDEF::DeleteIndexFile(PGLOBAL g, PIXDEF pxdf)
// Drop all indexes, delete the common file
PlugSetPath(filename, Ofn, GetPath());
strcat(PlugRemoveType(filename, filename), ftype);
-#if defined(WIN32)
+#if defined(__WIN__)
if (!DeleteFile(filename))
rc = (GetLastError() != ERROR_FILE_NOT_FOUND);
#else // UNIX
@@ -956,7 +956,7 @@ bool TDBDOS::GetBlockValues(PGLOBAL g)
#if 0
if (Mode == MODE_INSERT && Txfp->GetAmType() == TYPE_AM_DOS)
return false;
-#endif // WIN32
+#endif // __WIN__
if (defp->Optimized)
return false; // Already done or to be redone