#include <wchar.h>
+#include <wctype.h>
#include <stdlib.h>
#include <inttypes.h>
#include <errno.h>
/* Convert to normal char string so we can use strtoumax */
buf[0] = sign;
- if (wcstombs(buf+!!sign, s, sizeof buf-1) < 0) return 0;
+ if (wcstombs(buf+!!sign, s, sizeof buf-1) == -1) return 0;
buf[sizeof buf-1]=0;
/* Compute final position */