diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2015-07-07 18:46:36 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2015-07-07 18:46:36 +0200 |
| commit | 2b5b97942016c2f18a0992b934d1b6b460391dac (patch) | |
| tree | 46cffbdad4a652422cc94f6077e3ab3955e6dc0f /src/proj_api.h | |
| parent | 396afc3312243ff4a8e95c3b9398d56c5582e30d (diff) | |
| download | PROJ-2b5b97942016c2f18a0992b934d1b6b460391dac.tar.gz PROJ-2b5b97942016c2f18a0992b934d1b6b460391dac.zip | |
Make pj_init() locale safe and no longer modify locale (#226)
Remove setlocale() use in pj_init_ctx(), and replace uses of atof() &
strtod() by their locale safe variants pj_atof() and pj_strtod().
Proj versions from now advertize #define PJ_LOCALE_SAFE 1 in proj_api.h
and export pj_atof() & pj_strtod()
Diffstat (limited to 'src/proj_api.h')
| -rw-r--r-- | src/proj_api.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/proj_api.h b/src/proj_api.h index 0c4be974..ed11d6a4 100644 --- a/src/proj_api.h +++ b/src/proj_api.h @@ -40,6 +40,10 @@ extern "C" { /* Try to update this every version! */ #define PJ_VERSION 491 +/* pj_init() and similar functions can be used with a non-C locale */ +/* Can be detected too at runtime if the symbol pj_atof exists */ +#define PJ_LOCALE_SAFE 1 + extern char const pj_release[]; /* global release id string */ #define RAD_TO_DEG 57.29577951308232 |
