aboutsummaryrefslogtreecommitdiff
path: root/src/projects.h
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2018-12-26 12:51:24 +0100
committerEven Rouault <even.rouault@spatialys.com>2018-12-30 17:37:56 +0100
commit9bb2d68766c5cc064352cc89045447949e090508 (patch)
treefdd3050fc9b005041b32228114934c6a117d7aef /src/projects.h
parenta2fd4206924fedc96c3fd12607fb61e84c4841c0 (diff)
downloadPROJ-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/projects.h')
-rw-r--r--src/projects.h18
1 files changed, 5 insertions, 13 deletions
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