Windows 32-bit fio fixes
authorBruce Cran <BCran@fusionio.com>
Fri, 8 Jun 2012 06:12:20 +0000 (08:12 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 8 Jun 2012 06:12:20 +0000 (08:12 +0200)
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>
Makefile
os/windows/install.wxs
os/windows/posix.c

index f72bf8e2562f6d941bc18a5984c0bab21a2c6f6e..6a41710ba66b3218711e80ef4243bd48181039d6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -61,6 +61,7 @@ ifneq (,$(findstring CYGWIN,$(UNAME)))
   LIBS  += -lpthread -lpsapi -lws2_32
   CFLAGS += -DPSAPI_VERSION=1 -Ios/windows/posix/include -Wno-format
   CC     = x86_64-w64-mingw32-gcc
   LIBS  += -lpthread -lpsapi -lws2_32
   CFLAGS += -DPSAPI_VERSION=1 -Ios/windows/posix/include -Wno-format
   CC     = x86_64-w64-mingw32-gcc
+  #CC    = i686-w64-mingw32-gcc
 endif
 
 OBJS = $(SOURCE:.c=.o)
 endif
 
 OBJS = $(SOURCE:.c=.o)
index 5bea45c5ccb3898223ee772d7c6985544dc10834..f8da8fc0246c58f8ec07eb8c597306e9f3b86ed7 100755 (executable)
@@ -7,7 +7,7 @@
                <?define ProgramDirectory = ProgramFiles64Folder ?>\r
        <?endif?>\r
 \r
                <?define ProgramDirectory = ProgramFiles64Folder ?>\r
        <?endif?>\r
 \r
-       <Product Id="CCE88492-8C5A-4EAF-8B82-E22A90CEC47B"\r
+       <Product Id="2BA394F9-0D9E-4597-BB9D-6B18097D64BB"\r
          Codepage="1252" Language="1033"\r
          Manufacturer="fio" Name="fio"\r
          UpgradeCode="2338A332-5511-43cf-b9BD-5C60496CCFCC" Version="2.0.8">\r
          Codepage="1252" Language="1033"\r
          Manufacturer="fio" Name="fio"\r
          UpgradeCode="2338A332-5511-43cf-b9BD-5C60496CCFCC" Version="2.0.8">\r
index 9ef369e1d313af14440e7f38618afddafb8322a2..41bcb2d4e50a8fd3d0f4db3b93d3c0dff5b163f7 100755 (executable)
@@ -393,7 +393,9 @@ HANDLE fileMappings[1024];
 int shmget(key_t key, size_t size, int shmflg)
 {
        int mapid = -1;
 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;
        if (hMapping != NULL) {
                fileMappings[nFileMappings] = hMapping;
                mapid = nFileMappings;