Skip to content

Commit 5a82131

Browse files
committed
Rename NO_LOCALE_SUPPORT to JSONCPP_NO_LOCALE_SUPPORT
1 parent 1839f2d commit 5a82131

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/lib_json/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ endif()
3434

3535
if(NOT (HAVE_CLOCALE AND HAVE_LCONV_SIZE AND HAVE_DECIMAL_POINT AND HAVE_LOCALECONV))
3636
message(WARNING "Locale functionality is not supported")
37-
add_definitions(-DNO_LOCALE_SUPPORT)
37+
add_definitions(-DJSONCPP_NO_LOCALE_SUPPORT)
3838
endif()
3939

4040
SET( JSONCPP_INCLUDE_DIR ../../include )

src/lib_json/json_tool.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66
#ifndef LIB_JSONCPP_JSON_TOOL_H_INCLUDED
77
#define LIB_JSONCPP_JSON_TOOL_H_INCLUDED
88

9-
#ifndef NO_LOCALE_SUPPORT
9+
10+
// Also support old flag NO_LOCALE_SUPPORT
11+
#ifdef NO_LOCALE_SUPPORT
12+
#define JSONCPP_NO_LOCALE_SUPPORT
13+
#endif
14+
15+
#ifndef JSONCPP_NO_LOCALE_SUPPORT
1016
#include <clocale>
1117
#endif
1218

@@ -18,7 +24,7 @@
1824

1925
namespace Json {
2026
static char getDecimalPoint() {
21-
#ifdef NO_LOCALE_SUPPORT
27+
#ifdef JSONCPP_NO_LOCALE_SUPPORT
2228
return '\0';
2329
#else
2430
struct lconv* lc = localeconv();

0 commit comments

Comments
 (0)