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

fixes for win64

parent c6243f06
No related branches found
No related tags found
No related merge requests found
......@@ -370,6 +370,7 @@ if(ENABLE_FLTK)
endif(FLTK_PNG)
endif(FLTK_FOUND)
endif(NOT HAVE_FLTK)
if(HAVE_FLTK)
if(ENABLE_NATIVE_FILE_CHOOSER)
if(NOT FLTK_VERSION OR FLTK_VERSION EQUAL 1.1)
add_subdirectory(contrib/NativeFileChooser)
......@@ -385,6 +386,7 @@ if(ENABLE_FLTK)
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)
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