7935849214923d0793f9d5aae8cb2827227a40b3
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / jsoncpp / 0001-Revert-Use-std-namespace-for-snprintf.patch
1 From 29bfb6ac06b7304d326e3b70fc0209a702b89d83 Mon Sep 17 00:00:00 2001
2 From: Baruch Siach <baruch@tkos.co.il>
3 Subject: [PATCH] Revert "Use std namespace for snprintf."
4
5 This reverts commit 1c58876185d2a4ed87dac4a54b82f607e74f55fd.
6
7 std::snprintf() is only available in C++11, which is not provided by
8 all compilers. Since the C library snprintf() can easily be used as a
9 replacement on Linux systems, this patch changes jsoncpp to use the C
10 library snprintf() instead of C++11 std::snprintf(), fixing the build error
11 below:
12
13 src/lib_json/json_writer.cpp:33:18: error: 'snprintf' is not a member of 'std'
14
15 Upstream status: sent upstream
16 package/jsoncpp/0001-Revert-Use-std-namespace-for-snprintf.patch
17
18 Signed-off-by: Baruch Siach <baruch@tkos.co.il>
19 ---
20
21  src/lib_json/json_writer.cpp | 2 --
22  1 file changed, 2 deletions(-)
23
24 diff --git a/src/lib_json/json_writer.cpp b/src/lib_json/json_writer.cpp
25 index 83102fd2bb86..f7ad1e21bbc0 100644
26 --- a/src/lib_json/json_writer.cpp
27 +++ b/src/lib_json/json_writer.cpp
28 @@ -29,8 +29,6 @@
29  
30  #if defined(_MSC_VER) && _MSC_VER < 1500 // VC++ 8.0 and below
31  #define snprintf _snprintf
32 -#elif __cplusplus >= 201103L
33 -#define snprintf std::snprintf
34  #endif
35  
36  #if defined(_MSC_VER) && _MSC_VER >= 1400 // VC++ 8.0
37 -- 
38 2.1.4
39