diff options
Diffstat (limited to 'storage/connect/xindex.cpp')
-rw-r--r-- | storage/connect/xindex.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/storage/connect/xindex.cpp b/storage/connect/xindex.cpp index 1b3534b4f1b..6ed70f21a85 100644 --- a/storage/connect/xindex.cpp +++ b/storage/connect/xindex.cpp @@ -10,12 +10,12 @@ /* Include relevant sections of the System header files. */ /***********************************************************************/ #include "my_global.h" -#if defined(__WIN__) +#if defined(_WIN32) #include <io.h> #include <fcntl.h> #include <errno.h> //#include <windows.h> -#else // !__WIN__ +#else // !_WIN32 #if defined(UNIX) #include <sys/types.h> #include <sys/stat.h> @@ -25,7 +25,7 @@ #include <io.h> #endif // !UNIX #include <fcntl.h> -#endif // !__WIN__ +#endif // !_WIN32 /***********************************************************************/ /* Include required application header files */ @@ -848,7 +848,7 @@ bool XINDEX::SaveIndex(PGLOBAL g, PIXDEF sxp) if ((sep = defp->GetBoolCatInfo("SepIndex", false))) { // Index is saved in a separate file -#if defined(__WIN__) +#if defined(_WIN32) char drive[_MAX_DRIVE]; #else char *drive = NULL; @@ -1002,7 +1002,7 @@ bool XINDEX::Init(PGLOBAL g) if (defp->SepIndex()) { // Index was saved in a separate file -#if defined(__WIN__) +#if defined(_WIN32) char drive[_MAX_DRIVE]; #else char *drive = NULL; @@ -1255,7 +1255,7 @@ bool XINDEX::MapInit(PGLOBAL g) if (defp->SepIndex()) { // Index was save in a separate file -#if defined(__WIN__) +#if defined(_WIN32) char drive[_MAX_DRIVE]; #else char *drive = NULL; @@ -1470,7 +1470,7 @@ bool XINDEX::GetAllSizes(PGLOBAL g,/* int &ndif,*/ int &numk) if (defp->SepIndex()) { // Index was saved in a separate file -#if defined(__WIN__) +#if defined(_WIN32) char drive[_MAX_DRIVE]; #else char *drive = NULL; @@ -2519,7 +2519,7 @@ bool XHUGE::Open(PGLOBAL g, char *filename, int id, MODE mode) if (trace(1)) htrc(" Xopen: filename=%s id=%d mode=%d\n", filename, id, mode); -#if defined(__WIN__) +#if defined(_WIN32) LONG high = 0; DWORD rc, drc, access, share, creation; @@ -2695,7 +2695,7 @@ bool XHUGE::Open(PGLOBAL g, char *filename, int id, MODE mode) /***********************************************************************/ bool XHUGE::Seek(PGLOBAL g, int low, int high, int origin) { -#if defined(__WIN__) +#if defined(_WIN32) LONG hi = high; DWORD rc = SetFilePointer(Hfile, low, &hi, origin); @@ -2731,7 +2731,7 @@ bool XHUGE::Read(PGLOBAL g, void *buf, int n, int size) { bool rc = false; -#if defined(__WIN__) +#if defined(_WIN32) bool brc; DWORD nbr, count = (DWORD)(n * size); @@ -2777,7 +2777,7 @@ bool XHUGE::Read(PGLOBAL g, void *buf, int n, int size) /***********************************************************************/ int XHUGE::Write(PGLOBAL g, void *buf, int n, int size, bool& rc) { -#if defined(__WIN__) +#if defined(_WIN32) bool brc; DWORD nbw, count = (DWORD)n * (DWORD) size; @@ -2819,7 +2819,7 @@ void XHUGE::Close(char *fn, int id) if (trace(1)) htrc("XHUGE::Close: fn=%s id=%d NewOff=%lld\n", fn, id, NewOff.Val); -#if defined(__WIN__) +#if defined(_WIN32) if (id >= 0 && fn) { CloseFileHandle(Hfile); Hfile = CreateFile(fn, GENERIC_READ | GENERIC_WRITE, 0, NULL, @@ -2834,7 +2834,7 @@ void XHUGE::Close(char *fn, int id) } // endif SetFilePointer } // endif id -#else // !__WIN__ +#else // !_WIN32 if (id >= 0 && fn) { if (Hfile != INVALID_HANDLE_VALUE) { if (lseek64(Hfile, id * sizeof(IOFF), SEEK_SET) >= 0) { @@ -2850,7 +2850,7 @@ void XHUGE::Close(char *fn, int id) htrc("(XHUGE)error reopening %s: %s\n", fn, strerror(errno)); } // endif id -#endif // !__WIN__ +#endif // !_WIN32 XLOAD::Close(); } // end of Close |