This commit is contained in:
Max Lv
2015-02-28 23:28:21 +08:00
parent 57120d70ae
commit 434a10b512
3 changed files with 1 additions and 11 deletions
-4
View File
@@ -37,11 +37,7 @@ static char *to_string(const json_value *value)
if (value->type == json_string) {
return ss_strndup(value->u.string.ptr, value->u.string.length);
} else if (value->type == json_integer) {
#ifdef __MINGW32__
return strdup(ss_itoa(value->u.integer));
#else
return strdup(itoa(value->u.integer));
#endif
} else if (value->type == json_null) {
return "null";
} else {
-4
View File
@@ -61,11 +61,7 @@ void ERROR(const char *s)
}
#endif
#ifdef __MINGW32__
char *ss_itoa(int i)
#else
char *itoa(int i)
#endif
{
/* Room for INT_DIGITS digits, - and '\0' */
static char buf[INT_DIGITS + 2];
+1 -3
View File
@@ -164,15 +164,13 @@ extern int use_syslog;
#endif
#define ERROR(s) ss_error(s)
char *ss_itoa(int i);
#else
void ERROR(const char *s);
char *itoa(int i);
#endif
char *ss_itoa(int i);
int run_as(const char *user);
void FATAL(const char *msg);
void usage(void);