diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2015-09-10 10:02:00 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-09-10 10:02:00 +0200 |
commit | 47d4be12c3997343e436c6cca89aefbbbeb70863 (patch) | |
tree | a4edcff0049477f2a63a375f29263f4d222d8696 /vl.c | |
parent | 9fd1a94888cd6a559f95c3596ec1ac28b74838c1 (diff) |
cutils: work around platform differences in strto{l,ul,ll,ull}
Linux returns 0 if no conversion was made, while OS X and presumably
the BSDs return EINVAL. The OS X convention rejects more invalid
inputs, so convert to it and adjust the test case.
Windows returns 1 from strtoul and strtoull (instead of -1) for
negative out-of-range input; fix it up.
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'vl.c')
0 files changed, 0 insertions, 0 deletions