diff options
author | David Hill <dhill@conformal.com> | 2013-06-14 11:41:26 -0400 |
---|---|---|
committer | David Hill <dhill@conformal.com> | 2013-06-16 18:21:53 -0400 |
commit | d45b6ceced65e0bc4ba688925903152203348bd9 (patch) | |
tree | d5cd410a946cb37642479162db5fb38b7c019d11 /netbsd/netbsd.c | |
parent | a8e2264b6a8aefc5f4b06ff30274143b2e85b2bc (diff) | |
download | xombrero-d45b6ceced65e0bc4ba688925903152203348bd9.tar.gz |
fix build on NetBSD. From Arnaud Degroote
Diffstat (limited to 'netbsd/netbsd.c')
-rw-r--r-- | netbsd/netbsd.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/netbsd/netbsd.c b/netbsd/netbsd.c index 93c41e0..387d886 100644 --- a/netbsd/netbsd.c +++ b/netbsd/netbsd.c @@ -77,7 +77,8 @@ scan_scaled(char *scaled, long long *result) long long scale_fact = 1, whole = 0, fpart = 0; /* Skip leading whitespace */ - while (isascii(*p) && isspace(*p)) + while (isascii((unsigned char)*p) && + isspace((unsigned char)*p)) ++p; /* Then at most one leading + or - */ @@ -104,7 +105,8 @@ scan_scaled(char *scaled, long long *result) * (but note that E for Exa might look like e to some!). * Advance 'p' to end, to get scale factor. */ - for (; isascii(*p) && (isdigit(*p) || *p=='.'); ++p) { + for (; isascii((unsigned char)*p) && + (isdigit((unsigned char)*p) || *p=='.'); ++p) { if (*p == '.') { if (fract_digits > 0) { /* oops, more than one '.' */ errno = EINVAL; @@ -148,10 +150,10 @@ scan_scaled(char *scaled, long long *result) /* Are we there yet? */ if (*p == scale_chars[i] || - *p == tolower(scale_chars[i])) { + *p == tolower((unsigned char)scale_chars[i])) { /* If it ends with alphanumerics after the scale char, bad. */ - if (isalnum(*(p+1))) { + if (isalnum((unsigned char)*(p+1))) { errno = EINVAL; return -1; } |