summaryrefslogtreecommitdiff
path: root/os/windows
diff options
context:
space:
mode:
authorBruce Cran <BCran@fusionio.com>2012-06-08 08:12:20 +0200
committerJens Axboe <axboe@kernel.dk>2012-06-08 08:12:20 +0200
commitd39879467ccb7f136815be0ba7fd283524c2dafb (patch)
tree42636bd685e5fab4605c0b90df7323469b4b79ad /os/windows
parent47ea504af7710960e4019254cb910f69a32cb242 (diff)
downloadfio-d39879467ccb7f136815be0ba7fd283524c2dafb.tar.gz
fio-d39879467ccb7f136815be0ba7fd283524c2dafb.tar.bz2
Windows 32-bit fio fixes
Fix no-op shift in shmget by casting to 64-bit. Generate a new Product GUID for fio 2.0.8. Add the 32-bit MinGW-w64 compiler executable name in Makefile. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'os/windows')
-rwxr-xr-xos/windows/install.wxs2
-rwxr-xr-xos/windows/posix.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/os/windows/install.wxs b/os/windows/install.wxs
index 5bea45c5..f8da8fc0 100755
--- a/os/windows/install.wxs
+++ b/os/windows/install.wxs
@@ -7,7 +7,7 @@
<?define ProgramDirectory = ProgramFiles64Folder ?>
<?endif?>
- <Product Id="CCE88492-8C5A-4EAF-8B82-E22A90CEC47B"
+ <Product Id="2BA394F9-0D9E-4597-BB9D-6B18097D64BB"
Codepage="1252" Language="1033"
Manufacturer="fio" Name="fio"
UpgradeCode="2338A332-5511-43cf-b9BD-5C60496CCFCC" Version="2.0.8">
diff --git a/os/windows/posix.c b/os/windows/posix.c
index 9ef369e1..41bcb2d4 100755
--- a/os/windows/posix.c
+++ b/os/windows/posix.c
@@ -393,7 +393,9 @@ HANDLE fileMappings[1024];
int shmget(key_t key, size_t size, int shmflg)
{
int mapid = -1;
- HANDLE hMapping = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, (PAGE_EXECUTE_READWRITE | SEC_RESERVE), size >> 32, size & 0xFFFFFFFF, NULL);
+ uint32_t size_low = size & 0xFFFFFFFF;
+ uint32_t size_high = ((uint64_t)size) >> 32;
+ HANDLE hMapping = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, (PAGE_EXECUTE_READWRITE | SEC_RESERVE), size_high, size_low, NULL);
if (hMapping != NULL) {
fileMappings[nFileMappings] = hMapping;
mapid = nFileMappings;