aboutsummaryrefslogtreecommitdiff
path: root/src/projects.h
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2018-02-09 19:35:48 +0100
committerGitHub <noreply@github.com>2018-02-09 19:35:48 +0100
commit34764badb47d7e600e64fe738fd7f0e694f10c07 (patch)
tree82e2b81b622f0e91da0857a8bb09277ea8c2c7ec /src/projects.h
parent19331312fb9f653162dcaec2348af03a6741b160 (diff)
parent9c75d794177276189d0a2809bc462291e1a070d3 (diff)
downloadPROJ-34764badb47d7e600e64fe738fd7f0e694f10c07.tar.gz
PROJ-34764badb47d7e600e64fe738fd7f0e694f10c07.zip
Merge pull request #781 from kbevers/PJ_prefixes
Avoid XY, LP and UV datatype clashes with other libraries.
Diffstat (limited to 'src/projects.h')
-rw-r--r--src/projects.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/projects.h b/src/projects.h
index 60bac8a1..bfbe08cb 100644
--- a/src/projects.h
+++ b/src/projects.h
@@ -157,10 +157,6 @@ typedef struct { double u, v, w; } projUVW;
#define XYZ projUVW
#define LPZ projUVW
-/* Yes, this is ridiculous, but a consequence of an old and bad decision about implicit type-punning through preprocessor abuse */
-typedef struct { double u, v; } UV;
-typedef struct { double u, v, w; } UVW;
-
#else
typedef struct { double x, y; } XY;
typedef struct { double x, y, z; } XYZ;
@@ -169,6 +165,15 @@ typedef struct { double lam, phi, z; } LPZ;
typedef struct { double u, v; } UV;
typedef struct { double u, v, w; } UVW;
#endif /* ndef PJ_LIB__ */
+
+#else
+typedef PJ_XY XY;
+typedef PJ_LP LP;
+typedef PJ_UV UV;
+typedef PJ_XYZ XYZ;
+typedef PJ_LPZ LPZ;
+typedef PJ_UVW UVW;
+
#endif /* ndef PROJ_H */