You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@corinthia.apache.org by ja...@apache.org on 2015/03/11 00:15:20 UTC

incubator-corinthia git commit: First part of 64bit support

Repository: incubator-corinthia
Updated Branches:
  refs/heads/master 9bb460de4 -> 6ee0514cd


First part of 64bit support

Stepped cmake up to version 3.1 (removed local version check, only needed in master cmake file)
With version 3.1 is is now possible to do (in build)
cmake -G "Visual Studio 12" -A x64 ..
if the -A parameter is omitted, 32bit is assumed.
All CMake files and a couple of compiler warnings has been changed.
It does NOT link in 64bit, there is a minizip library (for second part).


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/6ee0514c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/6ee0514c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/6ee0514c

Branch: refs/heads/master
Commit: 6ee0514cd9b06b1572b7f5d70e087eeeec34c534
Parents: 9bb460d
Author: jani <ja...@apache.org>
Authored: Wed Mar 11 00:10:59 2015 +0100
Committer: jani <ja...@apache.org>
Committed: Wed Mar 11 00:10:59 2015 +0100

----------------------------------------------------------------------
 CMakeLists.txt                                 | 8 ++++++--
 DocFormats/CMakeLists.txt                      | 1 -
 DocFormats/core/src/lib/DFString.c             | 2 +-
 DocFormats/core/src/xml/DFXML.c                | 2 +-
 DocFormats/filters/ooxml/src/word/WordStyles.c | 2 +-
 DocFormats/headers/DFPlatform.h                | 4 ++--
 DocFormats/platform/src/Linux.c                | 2 +-
 DocFormats/platform/src/Unix.c                 | 2 +-
 consumers/corinthia/src/CMakeLists.txt         | 1 -
 consumers/dfconvert/src/CMakeLists.txt         | 1 -
 consumers/dftest/src/CMakeLists.txt            | 1 -
 consumers/dfutil/src/CMakeLists.txt            | 1 -
 12 files changed, 13 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/6ee0514c/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d6dde54..598b9b6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,7 +16,7 @@
 ###
 ## global definitions
 ###
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 3.1)
 project(Corinthia)
 
 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
@@ -46,7 +46,11 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
     set(LIB_DIRS
 	${PROJECT_SOURCE_DIR}/external/download/lib)
     set(LIBS ${LIBS} libxml2 zdll iconv SDL2 SDL2_image)
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4090 /wd4996")
+    if(${CMAKE_GENERATOR_PLATFORM} MATCHES "x64")
+        set(CMAKE_C_FLAGS "/DWIN64 /D_WINDOWS /W3 /wd4090 /wd4996")
+    else(${CMAKE_GENERATOR_PLATFORM} MATCHES "x64")
+        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4090 /wd4996")
+    endif(${CMAKE_GENERATOR_PLATFORM} MATCHES "x64")
 endif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
 
 

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/6ee0514c/DocFormats/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/DocFormats/CMakeLists.txt b/DocFormats/CMakeLists.txt
index c21a05f..b371c09 100644
--- a/DocFormats/CMakeLists.txt
+++ b/DocFormats/CMakeLists.txt
@@ -16,7 +16,6 @@
 ###
 ## global definitions
 ###
-cmake_minimum_required(VERSION 2.8)
 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
 
 

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/6ee0514c/DocFormats/core/src/lib/DFString.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/lib/DFString.c b/DocFormats/core/src/lib/DFString.c
index f6a70fe..243439a 100644
--- a/DocFormats/core/src/lib/DFString.c
+++ b/DocFormats/core/src/lib/DFString.c
@@ -53,7 +53,7 @@ static void DFArrayBuilderAdd(DFArrayBuilder *builder, const char *str, size_t s
     }
 
     builder->pointerIndex += 1;
-    builder->storageIndex += toklen + 1;
+    builder->storageIndex += (int)(toklen + 1);
 }
 
 static void DFArrayBuilderAllocate(DFArrayBuilder *builder)

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/6ee0514c/DocFormats/core/src/xml/DFXML.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/xml/DFXML.c b/DocFormats/core/src/xml/DFXML.c
index 97f2f95..449f2e1 100644
--- a/DocFormats/core/src/xml/DFXML.c
+++ b/DocFormats/core/src/xml/DFXML.c
@@ -139,7 +139,7 @@ static void SAXStartElementNS(void *ctx, const xmlChar *localname,
         const xmlChar *attrURI = attributes[i*5+2];
         const xmlChar *attrValueStart = attributes[i*5+3];
         const xmlChar *attrValueEnd = attributes[i*5+4];
-        unsigned long attrValueLen = attrValueEnd - attrValueStart;
+        unsigned long attrValueLen = (unsigned long)(attrValueEnd - attrValueStart);
 
         Tag attrTag = DFNameMapTagForName(parser->document->map,(const char *)attrURI,(const char *)attrLocalName);
         const TagDecl *attrTagDecl = DFNameMapNameForTag(parser->document->map,attrTag);

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/6ee0514c/DocFormats/filters/ooxml/src/word/WordStyles.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/WordStyles.c b/DocFormats/filters/ooxml/src/word/WordStyles.c
index 6006564..5358d6d 100644
--- a/DocFormats/filters/ooxml/src/word/WordStyles.c
+++ b/DocFormats/filters/ooxml/src/word/WordStyles.c
@@ -485,7 +485,7 @@ static void WordPutSectPr(DFNode *concrete, CSSSheet *styleSheet, WordSection *s
         }
     }
     replaceChildrenFromArray(concrete,children,WordSectPr_Children);
-    for (long i = DFArrayCount(extra)-1; i >= 0; i--) {
+    for (long i = (long)(DFArrayCount(extra)-1); i >= 0; i--) {
         DFNode *child = DFArrayItemAt(extra,i);
         DFInsertBefore(concrete,child,concrete->first);
     }

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/6ee0514c/DocFormats/headers/DFPlatform.h
----------------------------------------------------------------------
diff --git a/DocFormats/headers/DFPlatform.h b/DocFormats/headers/DFPlatform.h
index e181966..70e4591 100755
--- a/DocFormats/headers/DFPlatform.h
+++ b/DocFormats/headers/DFPlatform.h
@@ -18,7 +18,7 @@
 #ifndef DocFormats_DFPlatform_h
 #define DocFormats_DFPlatform_h
 
-#ifdef WIN32
+#ifdef _WINDOWS
 #include <direct.h>
 
 #define _CRT_SECURE_NO_WARNINGS
@@ -34,7 +34,7 @@
 
 #else
 #include <unistd.h>
-#endif // WIN32
+#endif // _WINDOWS
 
 #ifndef ATTRIBUTE_FORMAT
 #ifdef _MSC_VER

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/6ee0514c/DocFormats/platform/src/Linux.c
----------------------------------------------------------------------
diff --git a/DocFormats/platform/src/Linux.c b/DocFormats/platform/src/Linux.c
index a324504..bba6658 100644
--- a/DocFormats/platform/src/Linux.c
+++ b/DocFormats/platform/src/Linux.c
@@ -19,7 +19,7 @@
 
 // This file contains functions that are applicable to Linux (or more generally, any non-Apple Unix platform)
 
-#ifndef WIN32
+#ifndef _WINDOWS
 #ifndef __APPLE__
 
 #include <SDL2/SDL_image.h>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/6ee0514c/DocFormats/platform/src/Unix.c
----------------------------------------------------------------------
diff --git a/DocFormats/platform/src/Unix.c b/DocFormats/platform/src/Unix.c
index 7c854f3..c318548 100644
--- a/DocFormats/platform/src/Unix.c
+++ b/DocFormats/platform/src/Unix.c
@@ -24,7 +24,7 @@
 
 // This file contains functions that are applicable to all Unix-based platforms, including Linux, iOS, and OS X
 
-#ifndef WIN32
+#ifndef _WINDOWS
 
 #include <pthread.h>
 #include <dirent.h>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/6ee0514c/consumers/corinthia/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/consumers/corinthia/src/CMakeLists.txt b/consumers/corinthia/src/CMakeLists.txt
index 61dbc47..2f56fce 100644
--- a/consumers/corinthia/src/CMakeLists.txt
+++ b/consumers/corinthia/src/CMakeLists.txt
@@ -16,7 +16,6 @@
 ###
 ## global definitions
 ###
-cmake_minimum_required(VERSION 2.8)
 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
 
 

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/6ee0514c/consumers/dfconvert/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/consumers/dfconvert/src/CMakeLists.txt b/consumers/dfconvert/src/CMakeLists.txt
index 8b18959..595fe21 100644
--- a/consumers/dfconvert/src/CMakeLists.txt
+++ b/consumers/dfconvert/src/CMakeLists.txt
@@ -16,7 +16,6 @@
 ###
 ## global definitions
 ###
-cmake_minimum_required(VERSION 2.8)
 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
 
 

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/6ee0514c/consumers/dftest/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/consumers/dftest/src/CMakeLists.txt b/consumers/dftest/src/CMakeLists.txt
index 4a2a58c..738e9b1 100644
--- a/consumers/dftest/src/CMakeLists.txt
+++ b/consumers/dftest/src/CMakeLists.txt
@@ -16,7 +16,6 @@
 ###
 ## global definitions
 ###
-cmake_minimum_required(VERSION 2.8)
 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
 
 

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/6ee0514c/consumers/dfutil/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/consumers/dfutil/src/CMakeLists.txt b/consumers/dfutil/src/CMakeLists.txt
index 6847569..0ed75db 100644
--- a/consumers/dfutil/src/CMakeLists.txt
+++ b/consumers/dfutil/src/CMakeLists.txt
@@ -16,7 +16,6 @@
 ###
 ## global definitions
 ###
-cmake_minimum_required(VERSION 2.8)
 set_property(GLOBAL PROPERTY USE_FOLDERS ON)