Skip to content
Snippets Groups Projects
Commit b555ae96 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fixes for win64

parent c6243f06
Branches
Tags
No related merge requests found
......@@ -370,21 +370,23 @@ if(ENABLE_FLTK)
endif(FLTK_PNG)
endif(FLTK_FOUND)
endif(NOT HAVE_FLTK)
if(ENABLE_NATIVE_FILE_CHOOSER)
if(NOT FLTK_VERSION OR FLTK_VERSION EQUAL 1.1)
add_subdirectory(contrib/NativeFileChooser)
include_directories(contrib/NativeFileChooser)
add_definitions(-DFLTK1)
endif(NOT FLTK_VERSION OR FLTK_VERSION EQUAL 1.1)
set_config_option(HAVE_NATIVE_FILE_CHOOSER "NativeFileChooser")
endif(ENABLE_NATIVE_FILE_CHOOSER)
if(ENABLE_FL_TREE)
if(NOT FLTK_VERSION OR FLTK_VERSION EQUAL 1.1)
add_subdirectory(contrib/Fl_Tree)
include_directories(contrib/Fl_Tree)
endif(NOT FLTK_VERSION OR FLTK_VERSION EQUAL 1.1)
set_config_option(HAVE_FL_TREE "FlTree")
endif(ENABLE_FL_TREE)
if(HAVE_FLTK)
if(ENABLE_NATIVE_FILE_CHOOSER)
if(NOT FLTK_VERSION OR FLTK_VERSION EQUAL 1.1)
add_subdirectory(contrib/NativeFileChooser)
include_directories(contrib/NativeFileChooser)
add_definitions(-DFLTK1)
endif(NOT FLTK_VERSION OR FLTK_VERSION EQUAL 1.1)
set_config_option(HAVE_NATIVE_FILE_CHOOSER "NativeFileChooser")
endif(ENABLE_NATIVE_FILE_CHOOSER)
if(ENABLE_FL_TREE)
if(NOT FLTK_VERSION OR FLTK_VERSION EQUAL 1.1)
add_subdirectory(contrib/Fl_Tree)
include_directories(contrib/Fl_Tree)
endif(NOT FLTK_VERSION OR FLTK_VERSION EQUAL 1.1)
set_config_option(HAVE_FL_TREE "FlTree")
endif(ENABLE_FL_TREE)
endif(HAVE_FLTK)
elseif(ENABLE_QT)
find_package(Qt4)
set(QT_USE_QTOPENGL TRUE)
......@@ -900,8 +902,13 @@ target_link_libraries(gmsh_dynamic shared)
# linking of system libraries with cygwin/mingw (to ease distribution
# andspeed up app startup time)
if(WIN32 AND NOT MSVC)
set_target_properties(gmsh PROPERTIES LINK_FLAGS
"-Wl,--stack,16777216 ${CMAKE_CURRENT_SOURCE_DIR}/Fltk/Win32Icon.res -mwindows -static")
if(HAVE_64BIT_SIZE_T)
set_target_properties(gmsh PROPERTIES LINK_FLAGS
"-Wl,--stack,16777216 -mwindows -static")
else(HAVE_64BIT_SIZE_T)
set_target_properties(gmsh PROPERTIES LINK_FLAGS
"-Wl,--stack,16777216 ${CMAKE_CURRENT_SOURCE_DIR}/Fltk/Win32Icon.res -mwindows -static")
endif(HAVE_64BIT_SIZE_T)
# remove stupid -Wl,-Bdynamic flags
set(CMAKE_EXE_LINK_DYNAMIC_C_FLAGS)
set(CMAKE_EXE_LINK_DYNAMIC_CXX_FLAGS)
......
......@@ -12,6 +12,7 @@
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <inttypes.h>
#include "MallocUtils.h"
#include "ListUtils.h"
#include "TreeUtils.h"
......@@ -198,7 +199,7 @@ int List_PSuppress(List_T * liste, int index)
return (0);
liste->n--;
len = liste->n - (((long)ptr - (long)liste->array) / liste->size);
len = liste->n - (((intptr_t)ptr - (intptr_t)liste->array) / liste->size);
if(len > 0)
memmove(ptr, ptr + liste->size, len * liste->size);
return (1);
......
......@@ -26,6 +26,7 @@
// Modified for Gmsh (C++ and 64 bit compatibility)
#include <stdio.h>
#include <inttypes.h>
#include "avl.h"
#include "MallocUtils.h"
......@@ -43,7 +44,7 @@
#define COMPARE(key, nodekey, compare) \
((compare == avl_numcmp) ? \
(long int) key - (long int) nodekey : \
(intptr_t) key - (intptr_t) nodekey : \
(*compare)(key, nodekey))
static void avl_record_gen_forward(avl_node *node, avl_generator *gen);
......@@ -353,9 +354,10 @@ static avl_node *new_node(void *key, void *value)
newn->left = newn->right = NIL(avl_node);
return newn;
}
int avl_numcmp(const void *x, const void*y)
{
return (long int) x - (long int) y;
return (intptr_t) x - (intptr_t) y;
}
int avl_check_tree(avl_tree *tree)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment