diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2018-02-09 13:43:22 +0100 |
|---|---|---|
| committer | Kristian Evers <kristianevers@gmail.com> | 2018-02-09 13:43:22 +0100 |
| commit | 9c75d794177276189d0a2809bc462291e1a070d3 (patch) | |
| tree | 503732fdd531b219e255be37cd32793f7efddfb3 /src/projects.h | |
| parent | 47758e367f8414019365173691e6456411ee8a57 (diff) | |
| download | PROJ-9c75d794177276189d0a2809bc462291e1a070d3.tar.gz PROJ-9c75d794177276189d0a2809bc462291e1a070d3.zip | |
Avoid XY, LP and UV datatype clashes with other libraries.
Remove unnecessary definitions of UV and UVW from project.h that collides with
external libraries. To prevent similar problems in the future the
datatypes XY, LP, UV, XYZ, LPZ and UVW has been prefixed by PJ_ in
proj.h and proj_internal.h
Diffstat (limited to 'src/projects.h')
| -rw-r--r-- | src/projects.h | 13 |
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 */ |
