From 9bd11221d7b948d9e4487e0e6634f541d619e927 Mon Sep 17 00:00:00 2001 From: Howard Butler Date: Mon, 16 Feb 2015 17:49:22 +0000 Subject: apply patch for #237 to fix initialization ordering around setlocale git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2604 4e78687f-474d-0410-85f9-8d5e500ac6b2 --- ChangeLog | 4 ++++ src/pj_init.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 97d14fd6..9ad3a1aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2015-02-16 Howard Butler + * src/pj_init.c: Fix #237 warning about initialization + ordering due to setlocale + 2015-02-16 Howard Butler * nad/Makefile.am nad/Makefile.in and others in nad/: Fix #247 to allow out-of-tree autoconf builds diff --git a/src/pj_init.c b/src/pj_init.c index 9d9c2265..bea4f86c 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -405,8 +405,8 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { old_locale = setlocale(LC_NUMERIC, NULL); if (old_locale != NULL) { if (strcmp(old_locale,"C") != 0) { - setlocale(LC_NUMERIC,"C"); old_locale = strdup(old_locale); + setlocale(LC_NUMERIC,"C"); }else old_locale = NULL; } -- cgit v1.2.3