[spatialite] 01/06: Imported Upstream version 4.3.0~rc1

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Sat Jun 27 14:04:24 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch experimental
in repository spatialite.

commit 0056820b566188aad824229edffd50c568e669e6
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sat Jun 27 15:16:09 2015 +0200

    Imported Upstream version 4.3.0~rc1
---
 Makefile.am                             |   2 +-
 Makefile.in                             |   2 +-
 config-msvc.h                           |  31 ++---
 configure                               |  20 +--
 configure.ac                            |   2 +-
 makefile.vc                             |   7 +-
 spatialite.pc.in                        |   2 +-
 src/Makefile.am                         |   8 +-
 src/Makefile.in                         |   8 +-
 src/gaiaaux/gg_sqlaux.c                 | 212 ++++++++++++++++----------------
 src/gaiageo/gg_wkb.c                    |   2 +
 src/shapefiles/shapefiles.c             |   6 +-
 src/shapefiles/validator.c              |   5 +
 src/spatialite/se_helpers.c             |   8 +-
 src/spatialite/spatialite.c             |   4 +-
 src/spatialite/table_cloner.c           |   1 +
 src/spatialite/virtualelementary.c      |   2 +-
 src/srsinit/epsg_inlined_00.c           |   4 +
 src/srsinit/epsg_inlined_01.c           |   4 +
 src/srsinit/epsg_inlined_02.c           |   4 +
 src/srsinit/epsg_inlined_03.c           |   4 +
 src/srsinit/epsg_inlined_04.c           |   4 +
 src/srsinit/epsg_inlined_05.c           |   4 +
 src/srsinit/epsg_inlined_06.c           |   4 +
 src/srsinit/epsg_inlined_07.c           |   4 +
 src/srsinit/epsg_inlined_08.c           |   4 +
 src/srsinit/epsg_inlined_09.c           |   4 +
 src/srsinit/epsg_inlined_10.c           |   4 +
 src/srsinit/epsg_inlined_11.c           |   4 +
 src/srsinit/epsg_inlined_12.c           |   4 +
 src/srsinit/epsg_inlined_13.c           |   4 +
 src/srsinit/epsg_inlined_14.c           |   4 +
 src/srsinit/epsg_inlined_15.c           |   4 +
 src/srsinit/epsg_inlined_16.c           |   4 +
 src/srsinit/epsg_inlined_17.c           |   4 +
 src/srsinit/epsg_inlined_18.c           |   4 +
 src/srsinit/epsg_inlined_19.c           |   4 +
 src/srsinit/epsg_inlined_20.c           |   4 +
 src/srsinit/epsg_inlined_21.c           |   4 +
 src/srsinit/epsg_inlined_22.c           |   4 +
 src/srsinit/epsg_inlined_23.c           |   4 +
 src/srsinit/epsg_inlined_24.c           |   4 +
 src/srsinit/epsg_inlined_25.c           |   4 +
 src/srsinit/epsg_inlined_26.c           |   4 +
 src/srsinit/epsg_inlined_27.c           |   4 +
 src/srsinit/epsg_inlined_28.c           |   4 +
 src/srsinit/epsg_inlined_29.c           |   4 +
 src/srsinit/epsg_inlined_30.c           |   4 +
 src/srsinit/epsg_inlined_31.c           |   4 +
 src/srsinit/epsg_inlined_32.c           |   4 +
 src/srsinit/epsg_inlined_33.c           |   4 +
 src/srsinit/epsg_inlined_34.c           |   4 +
 src/srsinit/epsg_inlined_35.c           |   4 +
 src/srsinit/epsg_inlined_36.c           |   4 +
 src/srsinit/epsg_inlined_37.c           |   4 +
 src/srsinit/epsg_inlined_38.c           |   4 +
 src/srsinit/epsg_inlined_39.c           |   4 +
 src/srsinit/epsg_inlined_40.c           |   4 +
 src/srsinit/epsg_inlined_41.c           |   4 +
 src/srsinit/epsg_inlined_42.c           |   4 +
 src/srsinit/epsg_inlined_43.c           |   4 +
 src/srsinit/epsg_inlined_44.c           |   4 +
 src/srsinit/epsg_inlined_45.c           |   4 +
 src/srsinit/epsg_inlined_46.c           |   4 +
 src/srsinit/epsg_inlined_extra.c        |   4 +
 src/srsinit/epsg_inlined_prussian.c     |   4 +
 src/srsinit/epsg_inlined_wgs84_00.c     |   4 +
 src/srsinit/epsg_inlined_wgs84_01.c     |   4 +
 src/srsinit/epsg_update/auto_epsg_ext.c |  28 +++--
 test/Makefile.am                        |   7 +-
 test/Makefile.in                        |   3 +-
 71 files changed, 395 insertions(+), 169 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 68ed270..95a9c98 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
 ACLOCAL_AMFLAGS = -I m4
 
-AUTOMAKE_OPTIONS = dist-zip
+AUTOMAKE_OPTIONS = dist-zip foreign
 
 EXTRA_DIST = makefile.vc nmake.opt Android.mk Android_4.3.0.mk \
 	spatialite-4.3.0.mk mainpage.doxy README.coverage \
diff --git a/Makefile.in b/Makefile.in
index d21b8c1..f8e89b2 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -366,7 +366,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 ACLOCAL_AMFLAGS = -I m4
-AUTOMAKE_OPTIONS = dist-zip
+AUTOMAKE_OPTIONS = dist-zip foreign
 EXTRA_DIST = makefile.vc nmake.opt Android.mk Android_4.3.0.mk \
 	spatialite-4.3.0.mk mainpage.doxy README.coverage \
 	spatialite-sql-latest.html config-msvc.h
diff --git a/config-msvc.h b/config-msvc.h
index b95d9a6..725db60 100644
--- a/config-msvc.h
+++ b/config-msvc.h
@@ -5,6 +5,9 @@
 /         using the OsGeo4W libraries
 */
 
+/* Should be defined in order to enable GCP support. */
+/* #undef ENABLE_GCP */
+
 /* Should be defined in order to enable GeoPackage support. */
 /* #undef ENABLE_GEOPACKAGE */
 
@@ -21,13 +24,13 @@
 /* #undef GEOS_TRUNK */
 
 /* Define to 1 if you have the <dlfcn.h> header file. */
-/* #undef HAVE_DLFCN_H */
+#define HAVE_DLFCN_H 1
 
 /* Define to 1 if you have the <fcntl.h> header file. */
 #define HAVE_FCNTL_H 1
 
 /* Define to 1 if you have the `fdatasync' function. */
-/* #undef HAVE_FDATASYNC */
+#define HAVE_FDATASYNC 1
 
 /* Define to 1 if you have the <float.h> header file. */
 #define HAVE_FLOAT_H 1
@@ -54,7 +57,7 @@
 #define HAVE_INTTYPES_H 1
 
 /* Define to 1 if you have the <liblwgeom.h> header file. */
-#define HAVE_LIBLWGEOM_H 1
+/* #undef HAVE_LIBLWGEOM_H */
 
 /* Define to 1 if you have the `sqlite3' library (-lsqlite3). */
 #define HAVE_LIBSQLITE3 1
@@ -63,11 +66,11 @@
 #define HAVE_LIBZ 1
 
 /* Define to 1 if you have the `localtime_r' function. */
-/* #undef HAVE_LOCALTIME_R */
+#define HAVE_LOCALTIME_R 1
 
 /* Define to 1 if `lstat' has the bug that it succeeds when given the
    zero-length file name argument. */
-#define HAVE_LSTAT_EMPTY_STRING_BUG 1
+/* #undef HAVE_LSTAT_EMPTY_STRING_BUG */
 
 /* Define to 1 if you have the <math.h> header file. */
 #define HAVE_MATH_H 1
@@ -91,7 +94,7 @@
 #define HAVE_SQLITE3_H 1
 
 /* Define to 1 if you have the `sqrt' function. */
-#define HAVE_SQRT 1
+/* #undef HAVE_SQRT */
 
 /* Define to 1 if `stat' has the bug that it succeeds when given the
    zero-length file name argument. */
@@ -110,7 +113,7 @@
 #define HAVE_STDLIB_H 1
 
 /* Define to 1 if you have the `strcasecmp' function. */
-/* #undef HAVE_STRCASECMP */
+#define HAVE_STRCASECMP 1
 
 /* Define to 1 if you have the `strerror' function. */
 #define HAVE_STRERROR 1
@@ -125,7 +128,7 @@
 #define HAVE_STRING_H 1
 
 /* Define to 1 if you have the `strncasecmp' function. */
-/* #undef HAVE_STRNCASECMP */
+#define HAVE_STRNCASECMP 1
 
 /* Define to 1 if you have the `strstr' function. */
 #define HAVE_STRSTR 1
@@ -147,7 +150,7 @@
 
 /* Define to 1 if `lstat' dereferences a symlink specified with a trailing
    slash. */
-/* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */
+#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
 
 /* Define to the sub-directory in which libtool stores uninstalled libraries.
    */
@@ -187,7 +190,7 @@
 #define PACKAGE_NAME "libspatialite"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "libspatialite 4.2.0"
+#define PACKAGE_STRING "libspatialite 4.3.0-RC1"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "libspatialite"
@@ -196,16 +199,16 @@
 #define PACKAGE_URL ""
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "4.2.0"
+#define PACKAGE_VERSION "4.3.0-RC1"
 
 /* Should be defined when linking liblwgeom from PostGIS 2.1 (or later). */
-/* #undef POSTGIS_2_1 1 */
+/* #undefine POSTGIS_2_1 */
 
 /* Define to 1 if you have the ANSI C header files. */
 #define STDC_HEADERS 1
 
 /* Should contain a text-string describing the intended target CPU */
-#define TARGET_CPU "msvc-32"
+#define TARGET_CPU "Win32"
 
 /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
 #define TIME_WITH_SYS_TIME 1
@@ -214,7 +217,7 @@
 /* #undef TM_IN_SYS_TIME */
 
 /* Version number of package */
-#define VERSION "4.2.0-rc2"
+#define VERSION "4.3.0-RC1"
 
 /* Must be =64 in order to enable huge-file support. */
 #define _FILE_OFFSET_BITS 64
diff --git a/configure b/configure
index 637e96c..2239dd6 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libspatialite 4.3.0-RC0.
+# Generated by GNU Autoconf 2.69 for libspatialite 4.3.0-RC1.
 #
 # Report bugs to <a.furieri at lqt.it>.
 #
@@ -590,8 +590,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='libspatialite'
 PACKAGE_TARNAME='libspatialite'
-PACKAGE_VERSION='4.3.0-RC0'
-PACKAGE_STRING='libspatialite 4.3.0-RC0'
+PACKAGE_VERSION='4.3.0-RC1'
+PACKAGE_STRING='libspatialite 4.3.0-RC1'
 PACKAGE_BUGREPORT='a.furieri at lqt.it'
 PACKAGE_URL=''
 
@@ -1363,7 +1363,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures libspatialite 4.3.0-RC0 to adapt to many kinds of systems.
+\`configure' configures libspatialite 4.3.0-RC1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1433,7 +1433,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libspatialite 4.3.0-RC0:";;
+     short | recursive ) echo "Configuration of libspatialite 4.3.0-RC1:";;
    esac
   cat <<\_ACEOF
 
@@ -1568,7 +1568,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libspatialite configure 4.3.0-RC0
+libspatialite configure 4.3.0-RC1
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2112,7 +2112,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libspatialite $as_me 4.3.0-RC0, which was
+It was created by libspatialite $as_me 4.3.0-RC1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2983,7 +2983,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='libspatialite'
- VERSION='4.3.0-RC0'
+ VERSION='4.3.0-RC1'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -19178,7 +19178,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by libspatialite $as_me 4.3.0-RC0, which was
+This file was extended by libspatialite $as_me 4.3.0-RC1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -19244,7 +19244,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-libspatialite config.status 4.3.0-RC0
+libspatialite config.status 4.3.0-RC1
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index 8ae229a..95e17dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.61)
-AC_INIT(libspatialite, 4.3.0-RC0, a.furieri at lqt.it)
+AC_INIT(libspatialite, 4.3.0-RC1, a.furieri at lqt.it)
 AC_LANG(C)
 AC_CONFIG_MACRO_DIR([m4])
 
diff --git a/makefile.vc b/makefile.vc
index 208f460..9b9e8ee 100644
--- a/makefile.vc
+++ b/makefile.vc
@@ -14,6 +14,7 @@ LIBOBJ = src\gaiaaux\gg_sqlaux.obj src\gaiaaux\gg_utf8.obj \
 	src\gaiageo\gg_transform.obj src\gaiageo\gg_vanuatu.obj \
 	src\gaiageo\gg_wkb.obj src\gaiageo\gg_wkt.obj \
 	src\gaiageo\gg_extras.obj src\gaiageo\gg_xml.obj \
+	src\gaiageo\gg_voronoj.obj src\gaiageo\gg_matrix.obj \
 	src\gaiageo\gg_relations_ext.obj src/connection_cache/alloc_cache.obj \
 	src\spatialite\mbrcache.obj src\shapefiles\shapefiles.obj \
 	src\spatialite\spatialite.obj src\spatialite\virtualdbf.obj \
@@ -22,7 +23,9 @@ LIBOBJ = src\gaiaaux\gg_sqlaux.obj src\gaiaaux\gg_utf8.obj \
 	src\spatialite\statistics.obj src\spatialite\metatables.obj \
 	src\spatialite\virtualXL.obj src\spatialite\extra_tables.obj \
 	src\spatialite\virtualxpath.obj src\spatialite\virtualbbox.obj \
-	src\spatialite\spatialite_init.obj src\gaiageo\gg_voronoj.obj \
+	src\spatialite\spatialite_init.obj src\spatialite\se_helpers.obj \
+	src\spatialite\srid_aux.obj src\spatialite\table_cloner.obj \
+	src\spatialite\virtualelementary.obj \
 	src\wfs\wfs_in.obj src\srsinit\srs_init.obj \
 	src\dxf\dxf_parser.obj src\dxf\dxf_loader.obj src\dxf\dxf_writer.obj \
 	src\dxf\dxf_load_distinct.obj src\dxf\dxf_load_mixed.obj \
@@ -50,7 +53,7 @@ LIBOBJ = src\gaiaaux\gg_sqlaux.obj src\gaiaaux\gg_utf8.obj \
 	src\srsinit\epsg_inlined_40.obj src\srsinit\epsg_inlined_41.obj \
 	src\srsinit\epsg_inlined_42.obj src\srsinit\epsg_inlined_43.obj \
 	src\srsinit\epsg_inlined_44.obj src\srsinit\epsg_inlined_45.obj \
-	src\srsinit\epsg_inlined_extra.obj \
+	src\srsinit\epsg_inlined_46.obj src\srsinit\epsg_inlined_extra.obj \
 	src\srsinit\epsg_inlined_prussian.obj \
 	src\srsinit\epsg_inlined_wgs84_00.obj src\srsinit\epsg_inlined_wgs84_01.obj \
 	src\versioninfo\version.obj src\virtualtext\virtualtext.obj
diff --git a/spatialite.pc.in b/spatialite.pc.in
index 63d9e36..2e27b12 100644
--- a/spatialite.pc.in
+++ b/spatialite.pc.in
@@ -8,5 +8,5 @@ includedir=@includedir@
 Name: spatialite
 Description: Spatial SQL database engine based on SQLite
 Version: @VERSION@
-Libs: -L${libdir} -lspatialite -lsqlite3 -lm -lz 
+Libs: -L${libdir} -lspatialite
 Cflags: -I${includedir}
diff --git a/src/Makefile.am b/src/Makefile.am
index 610cf78..41ed3c4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -42,10 +42,10 @@ libspatialite_la_LDFLAGS = -version-info 4:3:0 -no-undefined
 libspatialite_la_LIBADD += -lm
 else 
 if ANDROID
-libspatialite_la_LDFLAGS = version-info 8:0:1
+libspatialite_la_LDFLAGS = -version-info 8:0:1
 libspatialite_la_LIBADD += -ldl -lm
 else
-libspatialite_la_LDFLAGS = version-info 8:0:1
+libspatialite_la_LDFLAGS = -version-info 8:0:1
 libspatialite_la_LIBADD += -lpthread -ldl -lm
 endif
 endif
@@ -76,10 +76,10 @@ mod_spatialite_la_LDFLAGS = -module -avoid-version -no-undefined
 mod_spatialite_la_LIBADD += -lm
 else 
 if ANDROID
-mod_spatialite_la_LDFLAGS = -module version-info 8:0:1
+mod_spatialite_la_LDFLAGS = -module -version-info 8:0:1
 mod_spatialite_la_LIBADD += -ldl -lm
 else
-mod_spatialite_la_LDFLAGS = -module version-info 8:0:1
+mod_spatialite_la_LDFLAGS = -module -version-info 8:0:1
 mod_spatialite_la_LIBADD += -lpthread -ldl -lm
 endif
 endif
diff --git a/src/Makefile.in b/src/Makefile.in
index 161133e..fe72ed6 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -434,8 +434,8 @@ libspatialite_la_LIBADD = ./gaiaaux/libgaiaaux.la \
 	./connection_cache/libconnection_cache.la \
 	./virtualtext/libvirtualtext.la ./wfs/libwfs.la @LIBXML2_LIBS@ \
 	$(am__append_1) $(am__append_2) $(am__append_3)
- at ANDROID_FALSE@@MINGW_FALSE at libspatialite_la_LDFLAGS = version-info 8:0:1
- at ANDROID_TRUE@@MINGW_FALSE at libspatialite_la_LDFLAGS = version-info 8:0:1
+ at ANDROID_FALSE@@MINGW_FALSE at libspatialite_la_LDFLAGS = -version-info 8:0:1
+ at ANDROID_TRUE@@MINGW_FALSE at libspatialite_la_LDFLAGS = -version-info 8:0:1
 @MINGW_TRUE at libspatialite_la_LDFLAGS = -version-info 4:3:0 -no-undefined
 mod_spatialite_la_SOURCES = versioninfo/version.c
 mod_spatialite_la_LIBADD = ./gaiaaux/gaiaaux.la ./gaiaexif/gaiaexif.la \
@@ -448,8 +448,8 @@ mod_spatialite_la_LIBADD = ./gaiaaux/gaiaaux.la ./gaiaexif/gaiaexif.la \
 mod_spatialite_la_CPPFLAGS = @CFLAGS@ -I$(top_srcdir)/src/headers -I. \
 	-DLOADABLE_EXTENSION
 mod_spatialite_la_LIBTOOLFLAGS = --tag=disable-static
- at ANDROID_FALSE@@MINGW_FALSE at mod_spatialite_la_LDFLAGS = -module version-info 8:0:1
- at ANDROID_TRUE@@MINGW_FALSE at mod_spatialite_la_LDFLAGS = -module version-info 8:0:1
+ at ANDROID_FALSE@@MINGW_FALSE at mod_spatialite_la_LDFLAGS = -module -version-info 8:0:1
+ at ANDROID_TRUE@@MINGW_FALSE at mod_spatialite_la_LDFLAGS = -module -version-info 8:0:1
 @MINGW_TRUE at mod_spatialite_la_LDFLAGS = -module -avoid-version -no-undefined
 MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
 all: all-recursive
diff --git a/src/gaiaaux/gg_sqlaux.c b/src/gaiaaux/gg_sqlaux.c
index 5d18243..c98c419 100644
--- a/src/gaiaaux/gg_sqlaux.c
+++ b/src/gaiaaux/gg_sqlaux.c
@@ -1175,18 +1175,18 @@ gaiaConvertToDMS (double longitude, double latitude)
 	  lat_prefix = 'S';
 	  latitude *= -1.0;
       }
-    long_d = floor (longitude);
+    long_d = (int) floor (longitude);
     val = 60.0 * (longitude - (double) long_d);
-    long_m = floor (val);
+    long_m = (int) floor (val);
     val = 60.0 * (val - (double) long_m);
-    long_s = floor (val);
+    long_s = (int) floor (val);
     if ((val - (double) long_s) > 0.5)
 	long_s++;
-    lat_d = floor (latitude);
+    lat_d = (int) floor (latitude);
     val = 60.0 * (latitude - (double) lat_d);
-    lat_m = floor (val);
+    lat_m = (int) floor (val);
     val = 60.0 * (val - (double) lat_m);
-    lat_s = floor (val);
+    lat_s = (int) floor (val);
     if ((val - (double) lat_s) > 0.5)
 	lat_s++;
     dms0 =
@@ -1302,136 +1302,136 @@ GAIAAUX_DECLARE char *
 gaiaDirNameFromPath (const char *path)
 {
 /* extracting the DirName (if any) from a Path */
-	const char *in = path;
-	const char *last = NULL;
-	int len = 0;
-	int dirlen;
-	char *name;
-	
-	if (path == NULL)
+    const char *in = path;
+    const char *last = NULL;
+    int len = 0;
+    int dirlen;
+    char *name;
+
+    if (path == NULL)
 	return NULL;
-	
-	while (*in != '\0')
-	{
-	/* parsing the Path */
-		len++;
-		if (*in == '/' || *in == '\\')
-		{
-			last = in;
-			dirlen = len;
-		}
-		in++;
-	}
-	if (last == NULL)
-	return NULL;	/* there is no Dir component */
-	
+
+    while (*in != '\0')
+      {
+	  /* parsing the Path */
+	  len++;
+	  if (*in == '/' || *in == '\\')
+	    {
+		last = in;
+		dirlen = len;
+	    }
+	  in++;
+      }
+    if (last == NULL)
+	return NULL;		/* there is no Dir component */
+
 /* allocating the DirName  to be returned */
-	name = malloc(dirlen+1);
-	memcpy(name, path, dirlen);
-	*(name+dirlen) = '\0';
-	return name;
+    name = malloc (dirlen + 1);
+    memcpy (name, path, dirlen);
+    *(name + dirlen) = '\0';
+    return name;
 }
 
 GAIAAUX_DECLARE char *
 gaiaFullFileNameFromPath (const char *path)
 {
 /* extracting the FullFileName (including Extension) from a Path */
-	const char *in = path;
-	const char *last = path - 1;
-	int len;
-	char *name;
-	
-	if (path == NULL)
+    const char *in = path;
+    const char *last = path - 1;
+    int len;
+    char *name;
+
+    if (path == NULL)
 	return NULL;
-	
-	while (*in != '\0')
-	{
-	/* parsing the Path */
-		if (*in == '/' || *in == '\\')
-			last = in;
-		in++;
-	}
-	len = strlen(last+1);
-	if (len == 0)
+
+    while (*in != '\0')
+      {
+	  /* parsing the Path */
+	  if (*in == '/' || *in == '\\')
+	      last = in;
+	  in++;
+      }
+    len = strlen (last + 1);
+    if (len == 0)
 	return NULL;
-	
+
 /* allocating the FullFileName to be returned */
-	name = malloc(len+1);
-	strcpy(name, last+1);
-	return name;
+    name = malloc (len + 1);
+    strcpy (name, last + 1);
+    return name;
 }
 
 GAIAAUX_DECLARE char *
 gaiaFileNameFromPath (const char *path)
 {
 /* extracting the FileName (excluding Extension) from a Path */
-	const char *in = path;
-	const char *last = path - 1;
-	int len;
-	char *name;
-	int i;
-	
-	if (path == NULL)
+    const char *in = path;
+    const char *last = path - 1;
+    int len;
+    char *name;
+    int i;
+
+    if (path == NULL)
 	return NULL;
-	
-	while (*in != '\0')
-	{
-	/* parsing the Path */
-		if (*in == '/' || *in == '\\')
-			last = in;
-		in++;
-	}
-	len = strlen(last+1);
-	if (len == 0)
+
+    while (*in != '\0')
+      {
+	  /* parsing the Path */
+	  if (*in == '/' || *in == '\\')
+	      last = in;
+	  in++;
+      }
+    len = strlen (last + 1);
+    if (len == 0)
 	return NULL;
-	
+
 /* allocating the FullFileName to be returned */
-	name = malloc(len+1);
-	strcpy(name, last+1);
-	for (i = len - 1; i > 0; i--)
-	{
-		if (*(name+i) == '.')
-		{
+    name = malloc (len + 1);
+    strcpy (name, last + 1);
+    for (i = len - 1; i > 0; i--)
+      {
+	  if (*(name + i) == '.')
+	    {
 		/* stripping out the extension */
-			*(name+i) = '\0';
-			break;
-		}
-	}
-	return name;
+		*(name + i) = '\0';
+		break;
+	    }
+      }
+    return name;
 }
 
 GAIAAUX_DECLARE char *
 gaiaFileExtFromPath (const char *path)
 {
 /* extracting the FileExtension (if any) from a Path */
-	int len;
-	char *name;
-	int i;
-	int pos = -1;
-	
-	if (path == NULL)
+    int len;
+    char *name;
+    int i;
+    int pos = -1;
+
+    if (path == NULL)
 	return NULL;
-	
-	len = strlen(path);
-	for (i = len - 1; i > 0; i--)
-	{
-		if (*(path+i) == '/' || *(path+i) == '\\')
-		break;
-		if (*(path+i) == '.')
-		{
+
+    len = strlen (path);
+    for (i = len - 1; i > 0; i--)
+      {
+	  if (*(path + i) == '/' || *(path + i) == '\\')
+	      break;
+	  if (*(path + i) == '.')
+	    {
 		/* found an extension */
-			pos = i;
-			break;
-		}
-	}
-	if (pos <= 0)
+		pos = i;
+		break;
+	    }
+      }
+    if (pos <= 0)
 	return NULL;
-	
+
 /* allocating the FileExtension to be returned */
-	len = strlen(path + pos + 1);
-	if (len == 0)
+    len = strlen (path + pos + 1);
+    if (len == 0)
 	return NULL;
-	name = malloc(len+1);
-	strcpy(name, path + pos + 1);
-	return name;
+    name = malloc (len + 1);
+    strcpy (name, path + pos + 1);
+    return name;
 }
diff --git a/src/gaiageo/gg_wkb.c b/src/gaiageo/gg_wkb.c
index fc1c504..159e185 100644
--- a/src/gaiageo/gg_wkb.c
+++ b/src/gaiageo/gg_wkb.c
@@ -1388,8 +1388,10 @@ gaiaToSpatiaLiteBlobWkbEx (gaiaGeomCollPtr geom, unsigned char **result,
 
     if (gpkg_mode)
       {
+#ifdef ENABLE_GEOPACKAGE	/* only if GeoPackage support is enabled */
 	  /* GeoPackage Mode enabled */
 	  gaiaToGPB (geom, result, size);
+#endif /* end GEOPACKAGE conditional */
 	  return;
       }
 
diff --git a/src/shapefiles/shapefiles.c b/src/shapefiles/shapefiles.c
index f1287e8..41a9ada 100644
--- a/src/shapefiles/shapefiles.c
+++ b/src/shapefiles/shapefiles.c
@@ -1608,9 +1608,9 @@ compute_max_dbl_length (double min, double max)
     int neg_len = 1;
     sqlite3_int64 value;
     if (max >= 0.0)
-	value = floor (max);
+	value = (sqlite3_int64) floor (max);
     else
-	value = ceil (max);
+	value = (sqlite3_int64) ceil (max);
     while (value != 0)
       {
 	  pos_len++;
@@ -1618,7 +1618,7 @@ compute_max_dbl_length (double min, double max)
       }
     if (min >= 0.0)
 	return pos_len + 7;
-    value = ceil (min);
+    value = (sqlite3_int64) ceil (min);
     while (value != 0)
       {
 	  neg_len++;
diff --git a/src/shapefiles/validator.c b/src/shapefiles/validator.c
index 0990a53..f9c5e3f 100644
--- a/src/shapefiles/validator.c
+++ b/src/shapefiles/validator.c
@@ -1675,6 +1675,8 @@ sanitize_geometry_column_common (const void *p_cache, sqlite3 * sqlite,
 				 int *n_discarded, int *n_failures,
 				 char **err_msg)
 {
+#ifdef ENABLE_LWGEOM		/* omly if LWGEOM is enabled */
+
 /* attempts to repair invalid Geometries from a Geometry Column */
     char *sql;
     char *xtable;
@@ -2407,6 +2409,9 @@ sanitize_geometry_column_common (const void *p_cache, sqlite3 * sqlite,
     free_sanitize_report (report);
     if (out)
 	fclose (out);
+	
+#endif /* end LWGEOM conditional */
+    
     return 0;
 }
 
diff --git a/src/spatialite/se_helpers.c b/src/spatialite/se_helpers.c
index a9da5dd..68308a0 100644
--- a/src/spatialite/se_helpers.c
+++ b/src/spatialite/se_helpers.c
@@ -539,7 +539,7 @@ check_vector_style_refs_by_name (sqlite3 * sqlite, const char *style_name,
       }
     sqlite3_reset (stmt);
     sqlite3_clear_bindings (stmt);
-    sqlite3_bind_int (stmt, 1, *id);
+    sqlite3_bind_int64 (stmt, 1, *id);
     while (1)
       {
 	  /* scrolling the result set rows */
@@ -1204,7 +1204,7 @@ check_raster_style_refs_by_name (sqlite3 * sqlite, const char *style_name,
       }
     sqlite3_reset (stmt);
     sqlite3_clear_bindings (stmt);
-    sqlite3_bind_int (stmt, 1, *id);
+    sqlite3_bind_int64 (stmt, 1, *id);
     while (1)
       {
 	  /* scrolling the result set rows */
@@ -2623,7 +2623,7 @@ check_group_style_refs_by_name (sqlite3 * sqlite, const char *style_name,
       }
     sqlite3_reset (stmt);
     sqlite3_clear_bindings (stmt);
-    sqlite3_bind_int (stmt, 1, *id);
+    sqlite3_bind_int64 (stmt, 1, *id);
     while (1)
       {
 	  /* scrolling the result set rows */
@@ -5402,7 +5402,7 @@ register_iso_metadata (void *p_sqlite, const char *scope,
 	  /* update */
 	  sqlite3_bind_text (stmt, 1, scope, strlen (scope), SQLITE_STATIC);
 	  sqlite3_bind_blob (stmt, 2, p_blob, n_bytes, SQLITE_STATIC);
-	  sqlite3_bind_int (stmt, 3, id);
+	  sqlite3_bind_int64 (stmt, 3, id);
       }
     else
       {
diff --git a/src/spatialite/spatialite.c b/src/spatialite/spatialite.c
index b45fdb7..a6d732b 100644
--- a/src/spatialite/spatialite.c
+++ b/src/spatialite/spatialite.c
@@ -28871,7 +28871,7 @@ scan_dxf_dir (sqlite3 * db_handle, struct splite_internal_cache *cache,
 		if ((c_file.attrib & _A_RDONLY) == _A_RDONLY
 		    || (c_file.attrib & _A_NORMAL) == _A_NORMAL)
 		  {
-		      if (is_dxf_file (entry->d_name))
+		      if (is_dxf_file (c_file.name))
 			{
 			    filepath =
 				sqlite3_mprintf ("%s/%s", dir_path,
@@ -28887,7 +28887,7 @@ scan_dxf_dir (sqlite3 * db_handle, struct splite_internal_cache *cache,
 		    break;
 	    };
 	  _findclose (hFile);
-      re}
+      }
 #else
 /* not Visual Studio .NET */
     struct dirent *entry;
diff --git a/src/spatialite/table_cloner.c b/src/spatialite/table_cloner.c
index f46ba9f..93c8a0c 100644
--- a/src/spatialite/table_cloner.c
+++ b/src/spatialite/table_cloner.c
@@ -62,6 +62,7 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 #ifdef _WIN32
 #define strcasecmp	_stricmp
+#define strncasecmp	_strnicmp
 #endif /* not WIN32 */
 
 struct aux_geometry
diff --git a/src/spatialite/virtualelementary.c b/src/spatialite/virtualelementary.c
index 78f117f..95d0988 100644
--- a/src/spatialite/virtualelementary.c
+++ b/src/spatialite/virtualelementary.c
@@ -785,7 +785,7 @@ velem_filter (sqlite3_vtab_cursor * pCursor, int idxNum, const char *idxStr,
     if (ret != SQLITE_OK)
 	goto stop;
 /* binding stmt params [ROWID] */
-    sqlite3_bind_double (stmt, 1, rowid_value);
+    sqlite3_bind_int64 (stmt, 1, rowid_value);
     velem_reset_cache (cursor);
     cursor->eof = 0;
 /* caching the ResultSet */
diff --git a/src/srsinit/epsg_inlined_00.c b/src/srsinit/epsg_inlined_00.c
index 8444bf5..f818bb1 100644
--- a/src/srsinit/epsg_inlined_00.c
+++ b/src/srsinit/epsg_inlined_00.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_01.c b/src/srsinit/epsg_inlined_01.c
index 62dde0f..49cdccc 100644
--- a/src/srsinit/epsg_inlined_01.c
+++ b/src/srsinit/epsg_inlined_01.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_02.c b/src/srsinit/epsg_inlined_02.c
index 16eb383..8d86067 100644
--- a/src/srsinit/epsg_inlined_02.c
+++ b/src/srsinit/epsg_inlined_02.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_03.c b/src/srsinit/epsg_inlined_03.c
index a350862..0039f81 100644
--- a/src/srsinit/epsg_inlined_03.c
+++ b/src/srsinit/epsg_inlined_03.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_04.c b/src/srsinit/epsg_inlined_04.c
index 113f218..0e7befd 100644
--- a/src/srsinit/epsg_inlined_04.c
+++ b/src/srsinit/epsg_inlined_04.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_05.c b/src/srsinit/epsg_inlined_05.c
index 25d6bd2..69d0d23 100644
--- a/src/srsinit/epsg_inlined_05.c
+++ b/src/srsinit/epsg_inlined_05.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_06.c b/src/srsinit/epsg_inlined_06.c
index 19ec259..3f9513c 100644
--- a/src/srsinit/epsg_inlined_06.c
+++ b/src/srsinit/epsg_inlined_06.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_07.c b/src/srsinit/epsg_inlined_07.c
index e4b6de1..b303fb3 100644
--- a/src/srsinit/epsg_inlined_07.c
+++ b/src/srsinit/epsg_inlined_07.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_08.c b/src/srsinit/epsg_inlined_08.c
index 06ab28c..62f6b8e 100644
--- a/src/srsinit/epsg_inlined_08.c
+++ b/src/srsinit/epsg_inlined_08.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_09.c b/src/srsinit/epsg_inlined_09.c
index 3d80485..e9c1ded 100644
--- a/src/srsinit/epsg_inlined_09.c
+++ b/src/srsinit/epsg_inlined_09.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_10.c b/src/srsinit/epsg_inlined_10.c
index 5ab538c..c5d917d 100644
--- a/src/srsinit/epsg_inlined_10.c
+++ b/src/srsinit/epsg_inlined_10.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_11.c b/src/srsinit/epsg_inlined_11.c
index 5edbae7..51fa5a7 100644
--- a/src/srsinit/epsg_inlined_11.c
+++ b/src/srsinit/epsg_inlined_11.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_12.c b/src/srsinit/epsg_inlined_12.c
index bf22da8..80e4b87 100644
--- a/src/srsinit/epsg_inlined_12.c
+++ b/src/srsinit/epsg_inlined_12.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_13.c b/src/srsinit/epsg_inlined_13.c
index 19c0c5e..b0f94f7 100644
--- a/src/srsinit/epsg_inlined_13.c
+++ b/src/srsinit/epsg_inlined_13.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_14.c b/src/srsinit/epsg_inlined_14.c
index 103cc5e..3606c8c 100644
--- a/src/srsinit/epsg_inlined_14.c
+++ b/src/srsinit/epsg_inlined_14.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_15.c b/src/srsinit/epsg_inlined_15.c
index 9cfdb14..9e38324 100644
--- a/src/srsinit/epsg_inlined_15.c
+++ b/src/srsinit/epsg_inlined_15.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_16.c b/src/srsinit/epsg_inlined_16.c
index a8c0e16..233dbe7 100644
--- a/src/srsinit/epsg_inlined_16.c
+++ b/src/srsinit/epsg_inlined_16.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_17.c b/src/srsinit/epsg_inlined_17.c
index 3934515..87764d1 100644
--- a/src/srsinit/epsg_inlined_17.c
+++ b/src/srsinit/epsg_inlined_17.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_18.c b/src/srsinit/epsg_inlined_18.c
index fe91485..fdde89f 100644
--- a/src/srsinit/epsg_inlined_18.c
+++ b/src/srsinit/epsg_inlined_18.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_19.c b/src/srsinit/epsg_inlined_19.c
index dcd8e07..d97d8f2 100644
--- a/src/srsinit/epsg_inlined_19.c
+++ b/src/srsinit/epsg_inlined_19.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_20.c b/src/srsinit/epsg_inlined_20.c
index 49b898e..f5396f4 100644
--- a/src/srsinit/epsg_inlined_20.c
+++ b/src/srsinit/epsg_inlined_20.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_21.c b/src/srsinit/epsg_inlined_21.c
index 766b272..0fabc37 100644
--- a/src/srsinit/epsg_inlined_21.c
+++ b/src/srsinit/epsg_inlined_21.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_22.c b/src/srsinit/epsg_inlined_22.c
index 7c3a849..eef23c6 100644
--- a/src/srsinit/epsg_inlined_22.c
+++ b/src/srsinit/epsg_inlined_22.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_23.c b/src/srsinit/epsg_inlined_23.c
index ffe5558..dcad3f2 100644
--- a/src/srsinit/epsg_inlined_23.c
+++ b/src/srsinit/epsg_inlined_23.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_24.c b/src/srsinit/epsg_inlined_24.c
index 739bc21..959ae19 100644
--- a/src/srsinit/epsg_inlined_24.c
+++ b/src/srsinit/epsg_inlined_24.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_25.c b/src/srsinit/epsg_inlined_25.c
index 70866b9..85e29a3 100644
--- a/src/srsinit/epsg_inlined_25.c
+++ b/src/srsinit/epsg_inlined_25.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_26.c b/src/srsinit/epsg_inlined_26.c
index 4498ef7..f819390 100644
--- a/src/srsinit/epsg_inlined_26.c
+++ b/src/srsinit/epsg_inlined_26.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_27.c b/src/srsinit/epsg_inlined_27.c
index 2e38b2a..8e3d8a9 100644
--- a/src/srsinit/epsg_inlined_27.c
+++ b/src/srsinit/epsg_inlined_27.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_28.c b/src/srsinit/epsg_inlined_28.c
index afd45bd..f1301e8 100644
--- a/src/srsinit/epsg_inlined_28.c
+++ b/src/srsinit/epsg_inlined_28.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_29.c b/src/srsinit/epsg_inlined_29.c
index 59c6aac..ca4fdfa 100644
--- a/src/srsinit/epsg_inlined_29.c
+++ b/src/srsinit/epsg_inlined_29.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_30.c b/src/srsinit/epsg_inlined_30.c
index bf21a3d..ed08c9e 100644
--- a/src/srsinit/epsg_inlined_30.c
+++ b/src/srsinit/epsg_inlined_30.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_31.c b/src/srsinit/epsg_inlined_31.c
index 4bfa80d..2616dbd 100644
--- a/src/srsinit/epsg_inlined_31.c
+++ b/src/srsinit/epsg_inlined_31.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_32.c b/src/srsinit/epsg_inlined_32.c
index c729685..7f28045 100644
--- a/src/srsinit/epsg_inlined_32.c
+++ b/src/srsinit/epsg_inlined_32.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_33.c b/src/srsinit/epsg_inlined_33.c
index 5c32e64..58efa0b 100644
--- a/src/srsinit/epsg_inlined_33.c
+++ b/src/srsinit/epsg_inlined_33.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_34.c b/src/srsinit/epsg_inlined_34.c
index f6672ce..36eed09 100644
--- a/src/srsinit/epsg_inlined_34.c
+++ b/src/srsinit/epsg_inlined_34.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_35.c b/src/srsinit/epsg_inlined_35.c
index cec49ce..6c780b3 100644
--- a/src/srsinit/epsg_inlined_35.c
+++ b/src/srsinit/epsg_inlined_35.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_36.c b/src/srsinit/epsg_inlined_36.c
index dabfeef..baa609b 100644
--- a/src/srsinit/epsg_inlined_36.c
+++ b/src/srsinit/epsg_inlined_36.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_37.c b/src/srsinit/epsg_inlined_37.c
index 6a5c245..ba6088f 100644
--- a/src/srsinit/epsg_inlined_37.c
+++ b/src/srsinit/epsg_inlined_37.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_38.c b/src/srsinit/epsg_inlined_38.c
index ca1af57..0a72069 100644
--- a/src/srsinit/epsg_inlined_38.c
+++ b/src/srsinit/epsg_inlined_38.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_39.c b/src/srsinit/epsg_inlined_39.c
index 6bd05bd..b9d3320 100644
--- a/src/srsinit/epsg_inlined_39.c
+++ b/src/srsinit/epsg_inlined_39.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_40.c b/src/srsinit/epsg_inlined_40.c
index efc74e7..5f264a0 100644
--- a/src/srsinit/epsg_inlined_40.c
+++ b/src/srsinit/epsg_inlined_40.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_41.c b/src/srsinit/epsg_inlined_41.c
index 314c12c..919275c 100644
--- a/src/srsinit/epsg_inlined_41.c
+++ b/src/srsinit/epsg_inlined_41.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_42.c b/src/srsinit/epsg_inlined_42.c
index c9ef479..d2ca4c6 100644
--- a/src/srsinit/epsg_inlined_42.c
+++ b/src/srsinit/epsg_inlined_42.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_43.c b/src/srsinit/epsg_inlined_43.c
index 98d348f..cca17bd 100644
--- a/src/srsinit/epsg_inlined_43.c
+++ b/src/srsinit/epsg_inlined_43.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_44.c b/src/srsinit/epsg_inlined_44.c
index 3f609c6..c318980 100644
--- a/src/srsinit/epsg_inlined_44.c
+++ b/src/srsinit/epsg_inlined_44.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_45.c b/src/srsinit/epsg_inlined_45.c
index 52b250f..3b8d148 100644
--- a/src/srsinit/epsg_inlined_45.c
+++ b/src/srsinit/epsg_inlined_45.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_46.c b/src/srsinit/epsg_inlined_46.c
index 6a523f2..9c208bb 100644
--- a/src/srsinit/epsg_inlined_46.c
+++ b/src/srsinit/epsg_inlined_46.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_extra.c b/src/srsinit/epsg_inlined_extra.c
index c4c42cd..d461787 100644
--- a/src/srsinit/epsg_inlined_extra.c
+++ b/src/srsinit/epsg_inlined_extra.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_prussian.c b/src/srsinit/epsg_inlined_prussian.c
index d082cb3..de0631b 100644
--- a/src/srsinit/epsg_inlined_prussian.c
+++ b/src/srsinit/epsg_inlined_prussian.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_wgs84_00.c b/src/srsinit/epsg_inlined_wgs84_00.c
index 6f68286..9ab359c 100644
--- a/src/srsinit/epsg_inlined_wgs84_00.c
+++ b/src/srsinit/epsg_inlined_wgs84_00.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_inlined_wgs84_01.c b/src/srsinit/epsg_inlined_wgs84_01.c
index b5bf9be..e1b25b1 100644
--- a/src/srsinit/epsg_inlined_wgs84_01.c
+++ b/src/srsinit/epsg_inlined_wgs84_01.c
@@ -43,7 +43,11 @@ the terms of any one of the MPL, the GPL or the LGPL.
 
 */
 
+#if defined(_WIN32) && !defined(__MINGW32__)
+#include "config-msvc.h"
+#else
 #include "config.h"
+#endif
 
 #include <spatialite_private.h>
 
diff --git a/src/srsinit/epsg_update/auto_epsg_ext.c b/src/srsinit/epsg_update/auto_epsg_ext.c
index e339478..4c57153 100644
--- a/src/srsinit/epsg_update/auto_epsg_ext.c
+++ b/src/srsinit/epsg_update/auto_epsg_ext.c
@@ -72,8 +72,8 @@ free_epsg_entry (struct epsg_entry *p)
 	free (p->srtext);
     if (p->spheroid)
 	free (p->spheroid);
-	if (p->prime_meridian)
-	free(p->prime_meridian);
+    if (p->prime_meridian)
+	free (p->prime_meridian);
     if (p->datum)
 	free (p->datum);
     if (p->projection)
@@ -112,7 +112,8 @@ static void
 epsg_insert (struct epsg_dict *epsg, int srid, int is_geographic,
 	     int flipped_axes, const char *unit, const char *axis_1,
 	     const char *orientation_1, const char *axis_2,
-	     const char *orientation_2, const char *spheroid, const char *prime_meridian, const char *datum,
+	     const char *orientation_2, const char *spheroid,
+	     const char *prime_meridian, const char *datum,
 	     const char *projection, const char *name, const char *proj4text,
 	     const char *srtext)
 {
@@ -149,9 +150,9 @@ epsg_insert (struct epsg_dict *epsg, int srid, int is_geographic,
     len = strlen (spheroid);
     p->spheroid = malloc (len + 1);
     strcpy (p->spheroid, spheroid);
-    len = strlen(prime_meridian);
-    p->prime_meridian = malloc(len + 1);
-    strcpy(p->prime_meridian, prime_meridian);
+    len = strlen (prime_meridian);
+    p->prime_meridian = malloc (len + 1);
+    strcpy (p->prime_meridian, prime_meridian);
     len = strlen (datum);
     p->datum = malloc (len + 1);
     strcpy (p->datum, datum);
@@ -260,8 +261,9 @@ parse_epsg (FILE * fl_epsg, struct epsg_dict *epsg)
 		if (!err)
 		    epsg_insert (epsg, atoi (srid), atoi (is_geographic),
 				 atoi (flipped_axes), unit, axis_1,
-				 orientation_1, axis_2, orientation_2, spheroid, prime_meridian,
-				 datum, projection, name, proj4text, srtext);
+				 orientation_1, axis_2, orientation_2, spheroid,
+				 prime_meridian, datum, projection, name,
+				 proj4text, srtext);
 		row_no++;
 		*srid = '\0';
 		*is_geographic = '\0';
@@ -1853,7 +1855,9 @@ do_header (FILE * out, int macro)
 	     "the provisions above, a recipient may use your version of this file under\n");
     fprintf (out,
 	     "the terms of any one of the MPL, the GPL or the LGPL.\n\n*/\n\n");
-    fprintf (out, "#include \"config.h\"\n\n");
+    fprintf (out, "#if defined(_WIN32) && !defined(__MINGW32__)\n");
+    fprintf (out, "#include \"config-msvc.h\"\n#else\n");
+    fprintf (out, "#include \"config.h\"\n#endif\n\n");
     fprintf (out, "#include <spatialite_private.h>\n\n");
 
     if (macro)
@@ -1936,8 +1940,7 @@ output_c_code (FILE * out, struct epsg_dict *epsg)
 		   "        \"%s\", %d, %d,\n",
 		   p->ref_sys_name, p->is_geographic, p->flipped_axes);
 	  fprintf (out,
-		   "        \"%s\", \"%s\",\n",
-		   p->spheroid, p->prime_meridian);
+		   "        \"%s\", \"%s\",\n", p->spheroid, p->prime_meridian);
 	  fprintf (out,
 		   "        \"%s\", \"%s\", \"%s\",\n",
 		   p->datum, p->projection, p->unit);
@@ -2071,8 +2074,7 @@ output_c_code (FILE * out, struct epsg_dict *epsg)
 		   "        \"%s\", %d, %d,\n",
 		   p->ref_sys_name, p->is_geographic, p->flipped_axes);
 	  fprintf (out,
-		   "        \"%s\", \"%s\",\n",
-		   p->spheroid, p->prime_meridian);
+		   "        \"%s\", \"%s\",\n", p->spheroid, p->prime_meridian);
 	  fprintf (out,
 		   "        \"%s\", \"%s\", \"%s\",\n",
 		   p->datum, p->projection, p->unit);
diff --git a/test/Makefile.am b/test/Makefile.am
index cb28c6e..012a9a8 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -89,7 +89,12 @@ check_PROGRAMS += \
 endif
 
 AM_CFLAGS = -I at srcdir@/../src/headers -I at srcdir@
-AM_LDFLAGS = -L../src -lspatialite -lm $(GCOV_FLAGS)
+
+if MINGW
+AM_LDFLAGS = -L../src -lspatialite -lm -lxml2 $(GCOV_FLAGS)
+else 
+AM_LDFLAGS = -L../src -lpthread -lspatialite -lm -lxml2 $(GCOV_FLAGS)
+endif
 
 TESTS = $(check_PROGRAMS)
 
diff --git a/test/Makefile.in b/test/Makefile.in
index 01e112a..dff11c9 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -996,7 +996,8 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AM_CPPFLAGS = @CFLAGS@ @GEOS_CFLAGS@ @LIBXML2_CFLAGS@
 AM_CFLAGS = -I at srcdir@/../src/headers -I at srcdir@
-AM_LDFLAGS = -L../src -lspatialite -lm $(GCOV_FLAGS)
+ at MINGW_FALSE@AM_LDFLAGS = -L../src -lpthread -lspatialite -lm -lxml2 $(GCOV_FLAGS)
+ at MINGW_TRUE@AM_LDFLAGS = -L../src -lspatialite -lm -lxml2 $(GCOV_FLAGS)
 TESTS = $(check_PROGRAMS)
 MOSTLYCLEANFILES = *.gcna *.gcno *.gcda
 EXTRA_DIST = asprintf4win.h \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/spatialite.git



More information about the Pkg-grass-devel mailing list