mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-13 02:22:57 +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
|
||||
|
||||
#if defined(_GNU_SOURCE) || defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE < 200112L)
|
||||
#define json_error_s(json, err) char errbuf[1024] = { 0 }; \
|
||||
json_error(json, "%s", strerror_r(err, errbuf, sizeof(errbuf)));
|
||||
#else
|
||||
#define json_error_s(json, err) char errbuf[1024] = { 0 }; \
|
||||
strerror_r(err, errbuf, sizeof(errbuf)); \
|
||||
json_error(json, "%s", errbuf);
|
||||
#endif
|
||||
static void json_error_s(json_stream *json, int err)
|
||||
{
|
||||
char errbuf[1024] = {0};
|
||||
strerror_r(err, errbuf, sizeof(errbuf));
|
||||
json_error(json, "%s", errbuf);
|
||||
}
|
||||
|
||||
#define STACK_INC 4
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user