diff options
author | josh.macdonald <jmacd@users.noreply.github.com> | 2007-12-14 06:35:43 +0000 |
---|---|---|
committer | josh.macdonald <jmacd@users.noreply.github.com> | 2007-12-14 06:35:43 +0000 |
commit | a528d2e869b8d910afbfc09d86b233684424a9c5 (patch) | |
tree | 74f20b7d3d8335fdd700575d01e1b592b10a8046 /xdelta3/xdelta3.h | |
parent | 1887f152a7ab3e043ffae6d54a9bff3e58db0d3e (diff) |
Implement UNALIGNED_OK for xd3_small_cksum_update, hoping to fix
test failure on Xscale/ARM platform.
Diffstat (limited to 'xdelta3/xdelta3.h')
-rw-r--r-- | xdelta3/xdelta3.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/xdelta3/xdelta3.h b/xdelta3/xdelta3.h index 9b02980..b19feeb 100644 --- a/xdelta3/xdelta3.h +++ b/xdelta3/xdelta3.h | |||
@@ -135,8 +135,20 @@ typedef uint32_t xoff_t; | |||
135 | #define Q | 135 | #define Q |
136 | #endif | 136 | #endif |
137 | 137 | ||
138 | #define USE_UINT32 (SIZEOF_USIZE_T == 4 || SIZEOF_XOFF_T == 4 || REGRESSION_TEST) | 138 | #define USE_UINT32 (SIZEOF_USIZE_T == 4 || \ |
139 | #define USE_UINT64 (SIZEOF_USIZE_T == 8 || SIZEOF_XOFF_T == 8 || REGRESSION_TEST) | 139 | SIZEOF_XOFF_T == 4 || REGRESSION_TEST) |
140 | #define USE_UINT64 (SIZEOF_USIZE_T == 8 || \ | ||
141 | SIZEOF_XOFF_T == 8 || REGRESSION_TEST) | ||
142 | |||
143 | /* TODO: probably should do something better here. */ | ||
144 | #ifndef UNALIGNED_OK | ||
145 | #if defined(__i386__) || defined(__i486__) || defined(__i586__) || \ | ||
146 | defined(__i686__) || defined(_X86_) || defined(__x86_64__) | ||
147 | #define UNALIGNED_OK 1 | ||
148 | #else | ||
149 | #define UNALIGNED_OK 0 | ||
150 | #endif | ||
151 | #endif | ||
140 | 152 | ||
141 | /**********************************************************************/ | 153 | /**********************************************************************/ |
142 | 154 | ||
@@ -198,10 +210,6 @@ typedef uint32_t xoff_t; | |||
198 | #include <stdio.h> | 210 | #include <stdio.h> |
199 | #endif | 211 | #endif |
200 | 212 | ||
201 | #ifndef UNALIGNED_OK | ||
202 | #define UNALIGNED_OK 1 | ||
203 | #endif | ||
204 | |||
205 | /* XPRINT. Debug output and VCDIFF_TOOLS functions report to stderr. | 213 | /* XPRINT. Debug output and VCDIFF_TOOLS functions report to stderr. |
206 | * I have used an irregular style to abbreviate [fprintf(stderr, "] as | 214 | * I have used an irregular style to abbreviate [fprintf(stderr, "] as |
207 | * [DP(RINT "]. */ | 215 | * [DP(RINT "]. */ |