diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2018-12-26 12:51:24 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2018-12-30 17:37:56 +0100 |
| commit | 9bb2d68766c5cc064352cc89045447949e090508 (patch) | |
| tree | fdd3050fc9b005041b32228114934c6a117d7aef /src | |
| parent | a2fd4206924fedc96c3fd12607fb61e84c4841c0 (diff) | |
| download | PROJ-9bb2d68766c5cc064352cc89045447949e090508.tar.gz PROJ-9bb2d68766c5cc064352cc89045447949e090508.zip | |
projects.h: remove #ifdef __cpluplus test since it must now be included from C++ file due to C++ objects in struct PJconsts
Diffstat (limited to 'src')
| -rw-r--r-- | src/apply_gridshift.cpp | 1 | ||||
| -rw-r--r-- | src/datum_set.cpp | 1 | ||||
| -rw-r--r-- | src/deriv.cpp | 1 | ||||
| -rw-r--r-- | src/gridcatalog.cpp | 1 | ||||
| -rw-r--r-- | src/nad_cvt.cpp | 1 | ||||
| -rw-r--r-- | src/nad_intr.cpp | 1 | ||||
| -rw-r--r-- | src/projects.h | 18 |
7 files changed, 11 insertions, 13 deletions
diff --git a/src/apply_gridshift.cpp b/src/apply_gridshift.cpp index 4c8115cc..da02b6b2 100644 --- a/src/apply_gridshift.cpp +++ b/src/apply_gridshift.cpp @@ -35,6 +35,7 @@ #include <string.h> #include "proj_internal.h" +#include "proj.h" #include "projects.h" /************************************************************************/ diff --git a/src/datum_set.cpp b/src/datum_set.cpp index c9dfdb80..7fca783f 100644 --- a/src/datum_set.cpp +++ b/src/datum_set.cpp @@ -28,6 +28,7 @@ #include <errno.h> #include <string.h> +#include "proj.h" #include "projects.h" /* SEC_TO_RAD = Pi/180/3600 */ diff --git a/src/deriv.cpp b/src/deriv.cpp index 0e285265..72a69440 100644 --- a/src/deriv.cpp +++ b/src/deriv.cpp @@ -3,6 +3,7 @@ #include <math.h> +#include "proj.h" #include "projects.h" int pj_deriv(LP lp, double h, const PJ *P, struct DERIVS *der) { diff --git a/src/gridcatalog.cpp b/src/gridcatalog.cpp index fef2df56..8fb90efa 100644 --- a/src/gridcatalog.cpp +++ b/src/gridcatalog.cpp @@ -32,6 +32,7 @@ #include <stdlib.h> #include <string.h> +#include "proj.h" #include "projects.h" static PJ_GridCatalog *grid_catalog_list = nullptr; diff --git a/src/nad_cvt.cpp b/src/nad_cvt.cpp index ec4a2b47..c0e67943 100644 --- a/src/nad_cvt.cpp +++ b/src/nad_cvt.cpp @@ -3,6 +3,7 @@ #include <stdio.h> #include <stdlib.h> +#include "proj.h" #include "projects.h" #include "proj_math.h" diff --git a/src/nad_intr.cpp b/src/nad_intr.cpp index 1f9d1e0c..b5f61db7 100644 --- a/src/nad_intr.cpp +++ b/src/nad_intr.cpp @@ -2,6 +2,7 @@ #define PJ_LIB__ #include "proj_internal.h" #include "proj_math.h" +#include "proj.h" #include "projects.h" LP diff --git a/src/projects.h b/src/projects.h index 4be56d8a..768b1c1d 100644 --- a/src/projects.h +++ b/src/projects.h @@ -29,6 +29,10 @@ #ifndef PROJECTS_H #define PROJECTS_H +#ifndef __cplusplus +#error "projects.h can only be included from a C++ file" +#endif + #ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H #define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H #endif @@ -74,14 +78,8 @@ #endif #endif -#ifdef __cplusplus #define C_NAMESPACE extern "C" #define C_NAMESPACE_VAR extern "C" -extern "C" { -#else -#define C_NAMESPACE extern -#define C_NAMESPACE_VAR -#endif #ifndef NULL # define NULL 0 @@ -630,7 +628,7 @@ struct projCtx_t { /* Generate pj_list external or make list from include file */ #ifndef PJ_DATUMS__ -extern struct PJ_DATUMS pj_datums[]; +C_NAMESPACE_VAR struct PJ_DATUMS pj_datums[]; #endif @@ -846,8 +844,6 @@ void *pj_gauss_ini(double, double, double *,double *); LP pj_gauss(projCtx, LP, const void *); LP pj_inv_gauss(projCtx, LP, const void *); -extern char const PROJ_DLL pj_release[]; - struct PJ_DATUMS PROJ_DLL *pj_get_datums_ref( void ); PJ *pj_new(void); @@ -859,10 +855,6 @@ void pj_freeup_plain (PJ *P); projPJ pj_init_ctx_with_allow_init_epsg( projCtx ctx, int argc, char **argv, int allow_init_epsg ); -#ifdef __cplusplus -} -#endif - #ifndef PROJECTS_H_ATEND #define PROJECTS_H_ATEND #endif |
