summaryrefslogtreecommitdiff
path: root/storage/connect/xindex.cpp
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-04-24 11:18:59 +0200
committerSergei Golubchik <serg@mariadb.org>2016-04-24 18:15:20 +0200
commitce38adddfa91949b30956abd0e4cab201effcdef (patch)
tree42337144be11133176c8f0ef8f06f9bac5d9395e /storage/connect/xindex.cpp
parent7b58fd5ef0c1ecdc7c6d6d3347110620e67313c2 (diff)
downloadmariadb-git-ce38adddfa91949b30956abd0e4cab201effcdef.tar.gz
MDEV-9617 solaris sparc build fails on 10.0
Spider: SunPro only supports array declarations with constant size. Spider already has a workaround for that, inside #ifdef _MSC_VER. Enable this code also for __SUNPRO_CC Connect: Don't use anonymous union. Cast for mmap. Don't pass gcc-ish -W... options to SunPro
Diffstat (limited to 'storage/connect/xindex.cpp')
-rwxr-xr-xstorage/connect/xindex.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/storage/connect/xindex.cpp b/storage/connect/xindex.cpp
index a2d75cec8ab..69aa7e2c20e 100755
--- a/storage/connect/xindex.cpp
+++ b/storage/connect/xindex.cpp
@@ -1279,7 +1279,7 @@ bool XINDEX::MapInit(PGLOBAL g)
IOFF *noff = (IOFF*)mbase;
// Position the memory base at the offset of this index
- mbase += noff[id].Low;
+ mbase += noff[id].v.Low;
} // endif id
// Now start the mapping process.
@@ -2347,10 +2347,10 @@ bool XFILE::Open(PGLOBAL g, char *filename, int id, MODE mode)
return true;
} // endif
- NewOff.Low = (int)ftell(Xfile);
+ NewOff.v.Low = (int)ftell(Xfile);
if (trace)
- htrc("XFILE Open: NewOff.Low=%d\n", NewOff.Low);
+ htrc("XFILE Open: NewOff.v.Low=%d\n", NewOff.v.Low);
} else if (mode == MODE_WRITE) {
if (id >= 0) {
@@ -2358,10 +2358,10 @@ bool XFILE::Open(PGLOBAL g, char *filename, int id, MODE mode)
memset(noff, 0, sizeof(noff));
Write(g, noff, sizeof(IOFF), MAX_INDX, rc);
fseek(Xfile, 0, SEEK_END);
- NewOff.Low = (int)ftell(Xfile);
+ NewOff.v.Low = (int)ftell(Xfile);
if (trace)
- htrc("XFILE Open: NewOff.Low=%d\n", NewOff.Low);
+ htrc("XFILE Open: NewOff.v.Low=%d\n", NewOff.v.Low);
} // endif id
@@ -2373,10 +2373,10 @@ bool XFILE::Open(PGLOBAL g, char *filename, int id, MODE mode)
} // endif MAX_INDX
if (trace)
- htrc("XFILE Open: noff[%d].Low=%d\n", id, noff[id].Low);
+ htrc("XFILE Open: noff[%d].v.Low=%d\n", id, noff[id].v.Low);
// Position the cursor at the offset of this index
- if (fseek(Xfile, noff[id].Low, SEEK_SET)) {
+ if (fseek(Xfile, noff[id].v.Low, SEEK_SET)) {
sprintf(g->Message, MSG(FUNC_ERRNO), errno, "Xseek");
return true;
} // endif
@@ -2566,14 +2566,14 @@ bool XHUGE::Open(PGLOBAL g, char *filename, int id, MODE mode)
return true;
} // endif
- NewOff.Low = (int)rc;
- NewOff.High = (int)high;
+ NewOff.v.Low = (int)rc;
+ NewOff.v.High = (int)high;
} else if (mode == MODE_WRITE) {
if (id >= 0) {
// New not sep index file. Write the header.
memset(noff, 0, sizeof(noff));
rc = WriteFile(Hfile, noff, sizeof(noff), &drc, NULL);
- NewOff.Low = (int)drc;
+ NewOff.v.Low = (int)drc;
} // endif id
} else if (mode == MODE_READ && id >= 0) {
@@ -2586,8 +2586,8 @@ bool XHUGE::Open(PGLOBAL g, char *filename, int id, MODE mode)
} // endif rc
// Position the cursor at the offset of this index
- rc = SetFilePointer(Hfile, noff[id].Low,
- (PLONG)&noff[id].High, FILE_BEGIN);
+ rc = SetFilePointer(Hfile, noff[id].v.Low,
+ (PLONG)&noff[id].v.High, FILE_BEGIN);
if (rc == INVALID_SET_FILE_POINTER) {
sprintf(g->Message, MSG(FUNC_ERRNO), GetLastError(), "SetFilePointer");
@@ -2649,7 +2649,7 @@ bool XHUGE::Open(PGLOBAL g, char *filename, int id, MODE mode)
if (id >= 0) {
// New not sep index file. Write the header.
memset(noff, 0, sizeof(noff));
- NewOff.Low = write(Hfile, &noff, sizeof(noff));
+ NewOff.v.Low = write(Hfile, &noff, sizeof(noff));
} // endif id
if (trace)