diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-10-25 11:04:17 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-10-25 11:04:17 +0000 |
commit | f955a4cba7784f97ef1dd978158e98176e03baf0 (patch) | |
tree | b24f4529ec5aaa642b94d730e98a68d8d50dd33a /src/cairo-wideint-private.h | |
parent | c701d7813b6d116c9db53f63f791928a407499c7 (diff) |
wideint: Protect 64_32_div for non-HAVE_UINT16_T systems
Peter Clifton spotted that we failed to properly wrap
_cairo_int64_32_div() for systems without a native 64 bit type.
Diffstat (limited to 'src/cairo-wideint-private.h')
-rw-r--r-- | src/cairo-wideint-private.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cairo-wideint-private.h b/src/cairo-wideint-private.h index d3b01cb0..d1322e34 100644 --- a/src/cairo-wideint-private.h +++ b/src/cairo-wideint-private.h @@ -187,7 +187,12 @@ _cairo_int64_divrem (cairo_int64_t num, cairo_int64_t den) static inline int32_t _cairo_int64_32_div (cairo_int64_t num, int32_t den) { +#if !HAVE_UINT64_T + return _cairo_int64_to_int32 + (_cairo_int64_divrem (num, _cairo_int32_to_int64 (den)).quo); +#else return num / den; +#endif } /* |