aboutsummaryrefslogtreecommitdiff
path: root/src/projects.h
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2017-11-28 10:23:08 +0100
committerEven Rouault <even.rouault@spatialys.com>2017-11-28 10:23:08 +0100
commitb693f2cf7cc745d77242b6132eeb35ea8fd6a843 (patch)
treec12745c563fcc4da45348b42c99cc67b4101a593 /src/projects.h
parent3ca8752d7226b441df5c98a2e489f913a01b6273 (diff)
parent3175dce5fcec54fef6299cc8b595d84db5b29cf4 (diff)
downloadPROJ-b693f2cf7cc745d77242b6132eeb35ea8fd6a843.tar.gz
PROJ-b693f2cf7cc745d77242b6132eeb35ea8fd6a843.zip
Merge remote-tracking branch 'aaronpuchert/static-assert'
Diffstat (limited to 'src/projects.h')
-rw-r--r--src/projects.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/projects.h b/src/projects.h
index 99df0e3e..8c0f81fa 100644
--- a/src/projects.h
+++ b/src/projects.h
@@ -43,6 +43,7 @@
#endif
/* standard inclusions */
+#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
@@ -78,6 +79,14 @@ extern "C" {
# define ABS(x) ((x<0) ? (-1*(x)) : x)
#endif
+#if INT_MAX == 2147483647
+typedef int pj_int32;
+#elif LONG_MAX == 2147483647
+typedef long pj_int32;
+#else
+#warning It seems no 32-bit integer type is available
+#endif
+
/* maximum path/filename */
#ifndef MAX_PATH_FILENAME
#define MAX_PATH_FILENAME 1024
@@ -618,7 +627,7 @@ PJ *pj_projection_specific_setup_##name (PJ *P)
#define MAX_TAB_ID 80
typedef struct { float lam, phi; } FLP;
-typedef struct { int lam, phi; } ILP;
+typedef struct { pj_int32 lam, phi; } ILP;
struct CTABLE {
char id[MAX_TAB_ID]; /* ascii info */