@crossbind/port-spatialite-wasi 2.0.0-beta.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +35 -0
- package/README.md +11 -0
- package/config.guess +1823 -0
- package/config.sub +1885 -0
- package/crossbind.build.js +1 -0
- package/crossbind.config.js +11 -0
- package/dist/prebuilt/CMakeLists.txt +57 -0
- package/dist/prebuilt/wasi-wasm32-st-release/crossbind-emccflags.fingerprint +1 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/control_points.h +259 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/debug.h +77 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gaia_network.h +627 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gaia_topology.h +1221 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gaiaaux.h +540 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gaiaconfig-msvc.h +56 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gaiaconfig-msvc.h.in +55 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gaiaconfig.h +68 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gaiaconfig.h.in +67 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gaiaexif.h +669 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gaiageo.h +77 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gaiamatrix.h +277 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/geojson.h +586 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/geopackage.h +198 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gg_advanced.h +5184 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gg_const.h +606 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gg_core.h +2294 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gg_dxf.h +993 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gg_dynamic.h +416 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gg_formats.h +2056 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gg_mbr.h +606 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gg_sequence.h +173 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gg_structs.h +880 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gg_wfs.h +581 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/gg_xml.h +818 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/spatialite_ext.h +64 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/sqlite.h +70 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite/stored_procedures.h +641 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/spatialite.h +2098 -0
- package/dist/prebuilt/wasi-wasm32-st-release/lib/libspatialite.a +0 -0
- package/dist/prebuilt/wasi-wasm32-st-release/lib/libspatialite.la +41 -0
- package/dist/prebuilt/wasi-wasm32-st-release/lib/mod_spatialite.a +0 -0
- package/dist/prebuilt/wasi-wasm32-st-release/lib/mod_spatialite.la +41 -0
- package/dist/prebuilt/wasi-wasm32-st-release/lib/pkgconfig/spatialite.pc +12 -0
- package/e2e/main.c +38 -0
- package/e2e/run.mjs +89 -0
- package/package.json +40 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '@crossbind/port-spatialite/build.mjs';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import mergeConfig from '@crossbind/port-spatialite/mergeConfig.mjs';
|
|
2
|
+
import geosWasi from '@crossbind/port-geos-wasi/crossbind.config.js';
|
|
3
|
+
import projWasi from '@crossbind/port-proj-wasi/crossbind.config.js';
|
|
4
|
+
import sqlite3Wasi from '@crossbind/port-sqlite3-wasi/crossbind.config.js';
|
|
5
|
+
import zlibWasi from '@crossbind/port-zlib-wasi/crossbind.config.js';
|
|
6
|
+
import iconvWasi from '@crossbind/port-iconv-wasi/crossbind.config.js';
|
|
7
|
+
|
|
8
|
+
export default mergeConfig({
|
|
9
|
+
dependencies: [geosWasi, projWasi, sqlite3Wasi, zlibWasi, iconvWasi],
|
|
10
|
+
paths: { config: import.meta.url },
|
|
11
|
+
});
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
set(MY_LIST "wasi-wasm32-st-release")
|
|
2
|
+
LIST(FIND MY_LIST "${PROJECT_TARGET_HOST}" PACKAGE_HOST_INDEX)
|
|
3
|
+
if(PACKAGE_HOST_INDEX EQUAL -1)
|
|
4
|
+
set(PROJECT_TARGET_HOST "${PROJECT_TARGET_HOST_RELEASE}")
|
|
5
|
+
endif()
|
|
6
|
+
LIST(FIND MY_LIST "${PROJECT_TARGET_HOST}" PACKAGE_HOST_INDEX)
|
|
7
|
+
|
|
8
|
+
if(NOT PACKAGE_HOST_INDEX EQUAL -1)
|
|
9
|
+
cmake_minimum_required(VERSION 3.28)
|
|
10
|
+
set(CMAKE_CXX_STANDARD 11)
|
|
11
|
+
set(PROJECT_NAME "spatialite")
|
|
12
|
+
set(PROJECT_LIBS "spatialite")
|
|
13
|
+
project("${PROJECT_NAME}")
|
|
14
|
+
|
|
15
|
+
if (APPLE AND CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
|
16
|
+
set(PACKAGE_DIR "${PROJECT_SOURCE_DIR}/../..")
|
|
17
|
+
else()
|
|
18
|
+
set(PACKAGE_DIR "${PROJECT_SOURCE_DIR}/${PROJECT_TARGET_HOST}/lib")
|
|
19
|
+
endif()
|
|
20
|
+
|
|
21
|
+
set(PROJECT_LIBS_DIR)
|
|
22
|
+
foreach(L IN LISTS PROJECT_LIBS)
|
|
23
|
+
SET(FOUND_LIB "FOUND_LIB-NOTFOUND")
|
|
24
|
+
find_library(FOUND_LIB
|
|
25
|
+
NAMES "${L}"
|
|
26
|
+
PATHS "${PACKAGE_DIR}"
|
|
27
|
+
NO_CACHE
|
|
28
|
+
NO_DEFAULT_PATH
|
|
29
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
30
|
+
REQUIRED
|
|
31
|
+
)
|
|
32
|
+
LIST(APPEND PROJECT_LIBS_DIR ${FOUND_LIB})
|
|
33
|
+
endforeach()
|
|
34
|
+
|
|
35
|
+
add_library("${PROJECT_NAME}" INTERFACE)
|
|
36
|
+
# Cargo producers register through an init-array constructor nothing references. KEEP pins the
|
|
37
|
+
# generated keep symbol (--undefined) so only the registration object is pulled - never the
|
|
38
|
+
# whole archive, because each Rust staticlib bundles libstd and fully loading two of them
|
|
39
|
+
# duplicates thousands of std symbols. FORCE (manual-bindings crates, no keep symbol) falls
|
|
40
|
+
# back to whole-archive - safe only as the app's single loaded Rust archive. (Apple consumers
|
|
41
|
+
# get the equivalent flags from the generated podspec instead.)
|
|
42
|
+
set(PROJECT_RUST_LINK "")
|
|
43
|
+
if(PROJECT_RUST_LINK STREQUAL "KEEP" AND NOT APPLE)
|
|
44
|
+
target_link_libraries("${PROJECT_NAME}" INTERFACE "${PROJECT_LIBS_DIR}")
|
|
45
|
+
foreach(L IN LISTS PROJECT_LIBS)
|
|
46
|
+
target_link_options("${PROJECT_NAME}" INTERFACE "-Wl,--undefined=crossbind_keep_${L}")
|
|
47
|
+
endforeach()
|
|
48
|
+
elseif(PROJECT_RUST_LINK STREQUAL "FORCE" AND NOT APPLE)
|
|
49
|
+
target_link_libraries("${PROJECT_NAME}" INTERFACE "$<LINK_LIBRARY:WHOLE_ARCHIVE,${PROJECT_LIBS_DIR}>")
|
|
50
|
+
else()
|
|
51
|
+
target_link_libraries("${PROJECT_NAME}" INTERFACE "${PROJECT_LIBS_DIR}")
|
|
52
|
+
endif()
|
|
53
|
+
|
|
54
|
+
if(NOT APPLE)
|
|
55
|
+
target_include_directories("${PROJECT_NAME}" INTERFACE "${PROJECT_SOURCE_DIR}/${PROJECT_TARGET_HOST}/include")
|
|
56
|
+
endif()
|
|
57
|
+
endif()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
/*
|
|
2
|
+
control_points.h -- Gaia implementation of RMSE and TPS Control Points
|
|
3
|
+
|
|
4
|
+
version 5.1.0, 2023 August 4
|
|
5
|
+
|
|
6
|
+
Author: Sandro Furieri a.furieri@lqt.it
|
|
7
|
+
|
|
8
|
+
------------------------------------------------------------------------------
|
|
9
|
+
|
|
10
|
+
Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
11
|
+
|
|
12
|
+
The contents of this file are subject to the Mozilla Public License Version
|
|
13
|
+
1.1 (the "License"); you may not use this file except in compliance with
|
|
14
|
+
the License. You may obtain a copy of the License at
|
|
15
|
+
http://www.mozilla.org/MPL/
|
|
16
|
+
|
|
17
|
+
Software distributed under the License is distributed on an "AS IS" basis,
|
|
18
|
+
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
19
|
+
for the specific language governing rights and limitations under the
|
|
20
|
+
License.
|
|
21
|
+
|
|
22
|
+
The Original Code is the SpatiaLite library
|
|
23
|
+
|
|
24
|
+
The Initial Developer of the Original Code is Alessandro Furieri
|
|
25
|
+
|
|
26
|
+
Portions created by the Initial Developer are Copyright (C) 2008-2023
|
|
27
|
+
the Initial Developer. All Rights Reserved.
|
|
28
|
+
|
|
29
|
+
Contributor(s):
|
|
30
|
+
|
|
31
|
+
Alternatively, the contents of this file may be used under the terms of
|
|
32
|
+
either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
33
|
+
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
34
|
+
in which case the provisions of the GPL or the LGPL are applicable instead
|
|
35
|
+
of those above. If you wish to allow use of your version of this file only
|
|
36
|
+
under the terms of either the GPL or the LGPL, and not to allow others to
|
|
37
|
+
use your version of this file under the terms of the MPL, indicate your
|
|
38
|
+
decision by deleting the provisions above and replace them with the notice
|
|
39
|
+
and other provisions required by the GPL or the LGPL. If you do not delete
|
|
40
|
+
the provisions above, a recipient may use your version of this file under
|
|
41
|
+
the terms of any one of the MPL, the GPL or the LGPL.
|
|
42
|
+
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
\file control_points.h
|
|
47
|
+
|
|
48
|
+
Auxiliary/helper functions
|
|
49
|
+
*/
|
|
50
|
+
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
|
51
|
+
#ifdef DLL_EXPORT
|
|
52
|
+
#define GAIACP_DECLARE __declspec(dllexport)
|
|
53
|
+
#else
|
|
54
|
+
#define GAIACP_DECLARE extern
|
|
55
|
+
#endif
|
|
56
|
+
#endif
|
|
57
|
+
|
|
58
|
+
#ifndef _GAIACP_H
|
|
59
|
+
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
|
60
|
+
#define _GAIACP_H
|
|
61
|
+
#endif
|
|
62
|
+
|
|
63
|
+
#ifdef __cplusplus
|
|
64
|
+
extern "C"
|
|
65
|
+
{
|
|
66
|
+
#endif
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
Typedef for GaiaControPoints object (opaque, hidden)
|
|
70
|
+
|
|
71
|
+
\sa GaiaControlPointsPtr
|
|
72
|
+
*/
|
|
73
|
+
typedef struct opaque_control_points GaiaControlPoints;
|
|
74
|
+
/**
|
|
75
|
+
Typedef for GaiaControPointsPtr object pointer (opaque, hidden)
|
|
76
|
+
|
|
77
|
+
\sa GaiaControlPoints
|
|
78
|
+
*/
|
|
79
|
+
typedef GaiaControlPoints *GaiaControlPointsPtr;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
Typedef for GaiaPolynomialCoeffs object (opaque, hidden)
|
|
83
|
+
|
|
84
|
+
\sa GaiaPolynomialCoeffsPtr
|
|
85
|
+
*/
|
|
86
|
+
typedef struct priv_polynomial_coeffs GaiaPolynomialCoeffs;
|
|
87
|
+
/**
|
|
88
|
+
Typedef for GaiaPolynomialCoeffsPtr object pointer (opaque, hidden)
|
|
89
|
+
|
|
90
|
+
\sa GaiaPolynomialCoeffs
|
|
91
|
+
*/
|
|
92
|
+
typedef GaiaPolynomialCoeffs *GaiaPolynomialCoeffsPtr;
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
/* function prototypes */
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
Creates a Control Points container (opaque object)
|
|
99
|
+
|
|
100
|
+
\param allocation_incr how many Control Points should be allocated
|
|
101
|
+
every time that necessity arises to increment the internal storage
|
|
102
|
+
\param has3d true if the Control Points are all expected to be 3D
|
|
103
|
+
\param order polynomial order: 1 or 2 or 3
|
|
104
|
+
\param tps true if the solution method must be Thin Plate Spline
|
|
105
|
+
|
|
106
|
+
\return the handle of the container object, or NULL on failure
|
|
107
|
+
|
|
108
|
+
\sa gaiaFreeControlPoints, gaiaAddControlPoint3D, gaiaAddControlPoint2D,
|
|
109
|
+
gaiaAffineFromControlPoints
|
|
110
|
+
|
|
111
|
+
\note you must properly destroy the container object when it
|
|
112
|
+
isn't any longer used.
|
|
113
|
+
*/
|
|
114
|
+
GAIACP_DECLARE GaiaControlPointsPtr gaiaCreateControlPoints (int
|
|
115
|
+
allocation_incr,
|
|
116
|
+
int has3d,
|
|
117
|
+
int order,
|
|
118
|
+
int tps);
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
Destroys a Control Points container (opaque object)
|
|
122
|
+
|
|
123
|
+
\param cp_handle the handle identifying the container object
|
|
124
|
+
(returned by a previous call to gaiaCreateControlPoints).
|
|
125
|
+
|
|
126
|
+
\sa gaiaCreateControlPoints
|
|
127
|
+
*/
|
|
128
|
+
GAIACP_DECLARE void gaiaFreeControlPoints (GaiaControlPointsPtr cp_handle);
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
Add a further Control Point 3D to the container (opaque object)
|
|
132
|
+
|
|
133
|
+
\param cp_handle the handle identifying the container object
|
|
134
|
+
(returned by a previous call to gaiaCreateControlPoints).
|
|
135
|
+
\param x0 X coordinate of the first Point.
|
|
136
|
+
\param y0 Y coordinate of the first Point.
|
|
137
|
+
\param z0 Z coordinate of the first Point.
|
|
138
|
+
\param x1 X coordinate of the second Point.
|
|
139
|
+
\param y1 Y coordinate of the second Point.
|
|
140
|
+
\param z1 Z coordinate of the second Point.
|
|
141
|
+
|
|
142
|
+
\return 0 on failure: any other different value on success.
|
|
143
|
+
|
|
144
|
+
\sa gaiaCreateControlPoints, gaiaAddControlPoint2D
|
|
145
|
+
*/
|
|
146
|
+
GAIACP_DECLARE int gaiaAddControlPoint3D (GaiaControlPointsPtr cp_handle,
|
|
147
|
+
double x0, double y0, double z0,
|
|
148
|
+
double x1, double y1, double z1);
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
Add a further Control Point 2D to the container (opaque object)
|
|
152
|
+
|
|
153
|
+
\param cp_handle the handle identifying the container object
|
|
154
|
+
(returned by a previous call to gaiaCreateControlPoints).
|
|
155
|
+
\param x0 X coordinate of the first Point.
|
|
156
|
+
\param y0 Y coordinate of the first Point.
|
|
157
|
+
\param x1 X coordinate of the second Point.
|
|
158
|
+
\param y1 Y coordinate of the second Point.
|
|
159
|
+
|
|
160
|
+
\return 0 on failure: any other different value on success.
|
|
161
|
+
|
|
162
|
+
\sa gaiaCreateControlPoints, gaiaAddControlPoint3D
|
|
163
|
+
*/
|
|
164
|
+
GAIACP_DECLARE int gaiaAddControlPoint2D (GaiaControlPointsPtr cp_handle,
|
|
165
|
+
double x0, double y0, double x1,
|
|
166
|
+
double y1);
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
Resolves a Control Point set by computing an Affine Transform Matrix
|
|
170
|
+
|
|
171
|
+
\param cp_handle the handle identifying the container object
|
|
172
|
+
(returned by a previous call to gaiaCreateControlPoints).
|
|
173
|
+
\param blob on completion this variable will contain a BLOB-encoded
|
|
174
|
+
Polynomial coeffs object
|
|
175
|
+
\param blob_sz on completion this variable will contain the BLOB's size
|
|
176
|
+
(in bytes)
|
|
177
|
+
|
|
178
|
+
\return 0 on failure: any other different value on success.
|
|
179
|
+
|
|
180
|
+
\sa gaiaCreateControlPoints, gaiaPolynomialIsValid, gaiaPolynomialAsText,
|
|
181
|
+
gaiaPolynomialTransformGeometry
|
|
182
|
+
*/
|
|
183
|
+
GAIACP_DECLARE int gaiaCreatePolynomialCoeffs (GaiaControlPointsPtr
|
|
184
|
+
cp_handle,
|
|
185
|
+
unsigned char **blob,
|
|
186
|
+
int *blob_sz);
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
Testing a BLOB-Polynomial for validity
|
|
190
|
+
\param blob pointer to a BLOB-encoded Polynomial coeffs object
|
|
191
|
+
\param blob_sz BLOB's size (in bytes)
|
|
192
|
+
|
|
193
|
+
\return TRUE if the BLOB really is of the BLOB-Polynomial type; FALSE if not.
|
|
194
|
+
|
|
195
|
+
\sa gaiaCreatePolynomialCoeffs, gaiaPolynomialAsText
|
|
196
|
+
*/
|
|
197
|
+
GAIACP_DECLARE int gaiaPolynomialIsValid (const unsigned char *blob,
|
|
198
|
+
int blob_sz);
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
Printing a textual represention from a BLOB-Matrix
|
|
202
|
+
\param blob pointer to a BLOB-encoded Polynomial coeffs object
|
|
203
|
+
\param blob_sz BLOB's size (in bytes)
|
|
204
|
+
|
|
205
|
+
\return a text string; NULL on failure.
|
|
206
|
+
|
|
207
|
+
\sa gaiaCreateControlPoints, gaiaPolynomialIsValid,
|
|
208
|
+
gaiaPolynomialTransformGeometry
|
|
209
|
+
|
|
210
|
+
\note you are responsible to destroy (before or after) any text
|
|
211
|
+
string returned by this function by calling sqlite3_free().
|
|
212
|
+
*/
|
|
213
|
+
GAIACP_DECLARE char *gaiaPolynomialAsText (const unsigned char *blob,
|
|
214
|
+
int blob_sz);
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
Transforming a Geometry accordingly to an Affine Transform Matrix
|
|
218
|
+
\param geom the input Geometry
|
|
219
|
+
\param blob pointer to a BLOB-encoded Polynomial coeffs object
|
|
220
|
+
\param blob_sz BLOB's size (in bytes)
|
|
221
|
+
|
|
222
|
+
\return 0 pointer to the transformed Geometry or NULL on failure.
|
|
223
|
+
|
|
224
|
+
\sa gaiaCreateControlPoints, gaiaPolynomialIsValid,
|
|
225
|
+
gaiaPolynomialAsText
|
|
226
|
+
|
|
227
|
+
\note you are responsible to destroy (before or after) any Geometry
|
|
228
|
+
returned by this function.
|
|
229
|
+
*/
|
|
230
|
+
GAIACP_DECLARE gaiaGeomCollPtr
|
|
231
|
+
gaiaPolynomialTransformGeometry (gaiaGeomCollPtr geom,
|
|
232
|
+
const unsigned char *blob,
|
|
233
|
+
int blob_sz);
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
Converts a Polynomial coeffs object into an Affine Transsform Matrix
|
|
237
|
+
|
|
238
|
+
\param iblob pointer to a BLOB-encoded Polynomial coeffs object
|
|
239
|
+
\param iblob_sz BLOB's size (in bytes)
|
|
240
|
+
\param oblob on completion this variable will contain a BLOB-encoded
|
|
241
|
+
Affine Transform Matrix object
|
|
242
|
+
\param oblob_sz on completion this variable will contain the BLOB's size
|
|
243
|
+
(in bytes)
|
|
244
|
+
|
|
245
|
+
\return 0 on failure: any other different value on success.
|
|
246
|
+
|
|
247
|
+
\sa gaiaCreateControlPoints, gaiaPolynomialIsValid, gaiaPolynomialAsText,
|
|
248
|
+
gaiaPolynomialTransformGeometry, gaiaPolynomialToMatrix
|
|
249
|
+
*/
|
|
250
|
+
GAIACP_DECLARE int gaiaPolynomialToMatrix (const unsigned char *iblob,
|
|
251
|
+
int iblob_sz,
|
|
252
|
+
unsigned char **oblob,
|
|
253
|
+
int *oblob_sz);
|
|
254
|
+
|
|
255
|
+
#ifdef __cplusplus
|
|
256
|
+
}
|
|
257
|
+
#endif
|
|
258
|
+
|
|
259
|
+
#endif /* _GAIACP_H */
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/*
|
|
2
|
+
debug.h -- abstract defs for standard output functions
|
|
3
|
+
|
|
4
|
+
version 5.1.0, 2023 August 4
|
|
5
|
+
|
|
6
|
+
Author: Sandro Furieri a.furieri@lqt.it
|
|
7
|
+
|
|
8
|
+
------------------------------------------------------------------------------
|
|
9
|
+
|
|
10
|
+
Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
11
|
+
|
|
12
|
+
The contents of this file are subject to the Mozilla Public License Version
|
|
13
|
+
1.1 (the "License"); you may not use this file except in compliance with
|
|
14
|
+
the License. You may obtain a copy of the License at
|
|
15
|
+
http://www.mozilla.org/MPL/
|
|
16
|
+
|
|
17
|
+
Software distributed under the License is distributed on an "AS IS" basis,
|
|
18
|
+
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
19
|
+
for the specific language governing rights and limitations under the
|
|
20
|
+
License.
|
|
21
|
+
|
|
22
|
+
The Original Code is the SpatiaLite library
|
|
23
|
+
|
|
24
|
+
The Initial Developer of the Original Code is Alessandro Furieri
|
|
25
|
+
|
|
26
|
+
Portions created by the Initial Developer are Copyright (C) 2012-2023
|
|
27
|
+
the Initial Developer. All Rights Reserved.
|
|
28
|
+
|
|
29
|
+
Contributor(s):
|
|
30
|
+
Pepijn Van Eeckhoudt <pepijnvaneeckhoudt@luciad.com>
|
|
31
|
+
|
|
32
|
+
Alternatively, the contents of this file may be used under the terms of
|
|
33
|
+
either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
34
|
+
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
35
|
+
in which case the provisions of the GPL or the LGPL are applicable instead
|
|
36
|
+
of those above. If you wish to allow use of your version of this file only
|
|
37
|
+
under the terms of either the GPL or the LGPL, and not to allow others to
|
|
38
|
+
use your version of this file under the terms of the MPL, indicate your
|
|
39
|
+
decision by deleting the provisions above and replace them with the notice
|
|
40
|
+
and other provisions required by the GPL or the LGPL. If you do not delete
|
|
41
|
+
the provisions above, a recipient may use your version of this file under
|
|
42
|
+
the terms of any one of the MPL, the GPL or the LGPL.
|
|
43
|
+
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
#ifndef SPATIALITE_DEBUG_H
|
|
47
|
+
#define SPATIALITE_DEBUG_H
|
|
48
|
+
|
|
49
|
+
#ifdef __ANDROID__ /* Android specific */
|
|
50
|
+
|
|
51
|
+
#include <android/log.h>
|
|
52
|
+
|
|
53
|
+
#ifdef DEBUG
|
|
54
|
+
#define spatialite_d(...)
|
|
55
|
+
#else
|
|
56
|
+
#define spatialite_d(...) __android_log_print(ANDROID_LOG_DEBUG, "Spatialite", __VA_ARGS__)
|
|
57
|
+
#endif
|
|
58
|
+
|
|
59
|
+
#define spatialite_i(...) __android_log_print(ANDROID_LOG_INFO, "Spatialite", __VA_ARGS__)
|
|
60
|
+
#define spatialite_e(...) __android_log_print(ANDROID_LOG_ERROR, "Spatialite", __VA_ARGS__)
|
|
61
|
+
|
|
62
|
+
#else /* any other standard platform (Win, Linux, Mac) */
|
|
63
|
+
|
|
64
|
+
#include <stdio.h>
|
|
65
|
+
|
|
66
|
+
#ifdef DEBUG
|
|
67
|
+
#define spatialite_d(...)
|
|
68
|
+
#else
|
|
69
|
+
#define spatialite_d(...) fprintf(stdout, __VA_ARGS__)
|
|
70
|
+
#endif
|
|
71
|
+
|
|
72
|
+
#define spatialite_i(...) fprintf(stdout, __VA_ARGS__)
|
|
73
|
+
#define spatialite_e(...) fprintf(stderr, __VA_ARGS__)
|
|
74
|
+
|
|
75
|
+
#endif /* platform specific */
|
|
76
|
+
|
|
77
|
+
#endif
|