mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-22 10:25:50 +01:00
change json_error_s into function
This commit is contained in:
parent
94ef939f93
commit
18c3ed3941
@ -36,14 +36,12 @@
|
|||||||
|
|
||||||
#endif // POCO_MSVS_VERSION
|
#endif // POCO_MSVS_VERSION
|
||||||
|
|
||||||
#if defined(_GNU_SOURCE) || defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE < 200112L)
|
static void json_error_s(json_stream *json, int err)
|
||||||
#define json_error_s(json, err) char errbuf[1024] = { 0 }; \
|
{
|
||||||
json_error(json, "%s", strerror_r(err, errbuf, sizeof(errbuf)));
|
char errbuf[1024] = {0};
|
||||||
#else
|
strerror_r(err, errbuf, sizeof(errbuf));
|
||||||
#define json_error_s(json, err) char errbuf[1024] = { 0 }; \
|
json_error(json, "%s", errbuf);
|
||||||
strerror_r(err, errbuf, sizeof(errbuf)); \
|
}
|
||||||
json_error(json, "%s", errbuf);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define STACK_INC 4
|
#define STACK_INC 4
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user