From 42a3f51f0a9a4200b96fbd4342a8840ad9ecd606 Mon Sep 17 00:00:00 2001 From: cxl Date: Mon, 6 Mar 2017 11:07:01 +0000 Subject: [PATCH] bazaar: plugin/gdal fixed for POSIX git-svn-id: svn://ultimatepp.org/upp/trunk@10902 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- bazaar/plugin/gdal/alg/gdaldither.cpp | 2 +- bazaar/plugin/gdal/cpl_config.h | 19 +++++++++++++------ bazaar/plugin/gdal/import.ext | 6 ++++++ 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/bazaar/plugin/gdal/alg/gdaldither.cpp b/bazaar/plugin/gdal/alg/gdaldither.cpp index e7ff8d844..e34204fd5 100644 --- a/bazaar/plugin/gdal/alg/gdaldither.cpp +++ b/bazaar/plugin/gdal/alg/gdaldither.cpp @@ -60,7 +60,7 @@ #include #define CAST_PCT(x) ((GByte*)x) -#define ALIGN_INT_ARRAY_ON_16_BYTE(x) ( (((GPtrDiff_t)(x) % 16) != 0 ) ? (int*)((GByte*)(x) + 16 - ((GPtrDiff_t)(x) % 16)) : (x) ) +#define ALIGN_INT_ARRAY_ON_16_BYTE(x) ( (((GPtrDiff_t)(uintptr_t)(x) % 16) != 0 ) ? (int*)((GByte*)(x) + 16 - ((GPtrDiff_t)(uintptr_t)(x) % 16)) : (x) ) #else diff --git a/bazaar/plugin/gdal/cpl_config.h b/bazaar/plugin/gdal/cpl_config.h index a1d9b0e4d..c361e2b5c 100644 --- a/bazaar/plugin/gdal/cpl_config.h +++ b/bazaar/plugin/gdal/cpl_config.h @@ -1,3 +1,5 @@ +#include // we want PLATFORM and COMPILER defines + #define CPL_DISABLE_DLL #define DISABLE_CPLID // ALLOW BLITZ @@ -28,9 +30,11 @@ declare STDCALL interfaces even if an application is built against it using MinGW */ +#ifdef PLATFORM_WIN32 #ifndef CPL_DISABLE_STDCALL # define CPL_STDCALL __stdcall #endif +#endif #define HAVE_LIBZ 1 @@ -49,10 +53,13 @@ #endif #define HAVE_GETCWD 1 + +#ifndef PLATFORM_POSIX /* gmt_notunix.h from GMT project also redefines getcwd. See #3138 */ #ifndef getcwd #define getcwd _getcwd #endif +#endif /* Define if you have the ANSI C header files. */ #ifndef STDC_HEADERS @@ -86,7 +93,7 @@ #define HAVE_SEARCH_H 1 /* Define to 1 if you have the header file. */ -#define HAVE_DIRECT_H +// #define HAVE_DIRECT_H /* Define to 1 if you have the `localtime_r' function. */ #undef HAVE_LOCALTIME_R @@ -129,12 +136,12 @@ #define lfind _lfind -#if defined(_MSC_VER) && (_MSC_VER < 1310) -# define VSI_STAT64 _stat -# define VSI_STAT64_T _stat +#ifdef PLATFORM_POSIX +#define VSI_STAT64 stat64 +#define VSI_STAT64_T stat64 #else -# define VSI_STAT64 _stat64 -# define VSI_STAT64_T __stat64 +#define VSI_STAT64 _stat64 +#define VSI_STAT64_T __stat64 #endif /* VC6 doesn't known intptr_t */ diff --git a/bazaar/plugin/gdal/import.ext b/bazaar/plugin/gdal/import.ext index 9d3941dc6..b72e02cf9 100644 --- a/bazaar/plugin/gdal/import.ext +++ b/bazaar/plugin/gdal/import.ext @@ -36,8 +36,14 @@ exclude */ods/* */gpkg/* */osm/* + */pgeo/* + */geomedia/* + */mssqlspatial/* + */walk/* + */odbc/* port/cpl_vsil_simple.cpp port/cpl_win32ce_api.cpp + port/cpl_odbc.cpp frmts/bgp/* frmts/dds/* frmts/ecw/*