diff options
author | Ron Yorston <rmy@pobox.com> | 2013-02-07 14:25:54 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2013-02-07 14:25:54 +0000 |
commit | b604585914e032b28bef3e337a978e56a9069cda (patch) | |
tree | b2ee0a3fb38d10397c602d0fe215ea3bbbf334c0 /include/platform.h | |
parent | 0eda07c7ff8cf1fc11bc1bda5383f884d7adf031 (diff) | |
parent | ba76b7a40b929878833731f76306b1c977cc8650 (diff) | |
download | busybox-w32-b604585914e032b28bef3e337a978e56a9069cda.tar.gz busybox-w32-b604585914e032b28bef3e337a978e56a9069cda.tar.bz2 busybox-w32-b604585914e032b28bef3e337a978e56a9069cda.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'include/platform.h')
-rw-r--r-- | include/platform.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/platform.h b/include/platform.h index 78d42fed9..b3eee55ee 100644 --- a/include/platform.h +++ b/include/platform.h | |||
@@ -222,6 +222,7 @@ | |||
222 | 222 | ||
223 | #include <stdint.h> | 223 | #include <stdint.h> |
224 | typedef int bb__aliased_int FIX_ALIASING; | 224 | typedef int bb__aliased_int FIX_ALIASING; |
225 | typedef long bb__aliased_long FIX_ALIASING; | ||
225 | typedef uint16_t bb__aliased_uint16_t FIX_ALIASING; | 226 | typedef uint16_t bb__aliased_uint16_t FIX_ALIASING; |
226 | typedef uint32_t bb__aliased_uint32_t FIX_ALIASING; | 227 | typedef uint32_t bb__aliased_uint32_t FIX_ALIASING; |
227 | 228 | ||
@@ -229,7 +230,8 @@ typedef uint32_t bb__aliased_uint32_t FIX_ALIASING; | |||
229 | * a lvalue. This makes it more likely to not swap them by mistake | 230 | * a lvalue. This makes it more likely to not swap them by mistake |
230 | */ | 231 | */ |
231 | #if defined(i386) || defined(__x86_64__) || defined(__powerpc__) | 232 | #if defined(i386) || defined(__x86_64__) || defined(__powerpc__) |
232 | # define move_from_unaligned_int(v, intp) ((v) = *(bb__aliased_int*)(intp)) | 233 | # define move_from_unaligned_int(v, intp) ((v) = *(bb__aliased_int*)(intp)) |
234 | # define move_from_unaligned_long(v, longp) ((v) = *(bb__aliased_long*)(longp)) | ||
233 | # define move_from_unaligned16(v, u16p) ((v) = *(bb__aliased_uint16_t*)(u16p)) | 235 | # define move_from_unaligned16(v, u16p) ((v) = *(bb__aliased_uint16_t*)(u16p)) |
234 | # define move_from_unaligned32(v, u32p) ((v) = *(bb__aliased_uint32_t*)(u32p)) | 236 | # define move_from_unaligned32(v, u32p) ((v) = *(bb__aliased_uint32_t*)(u32p)) |
235 | # define move_to_unaligned16(u16p, v) (*(bb__aliased_uint16_t*)(u16p) = (v)) | 237 | # define move_to_unaligned16(u16p, v) (*(bb__aliased_uint16_t*)(u16p) = (v)) |
@@ -238,6 +240,7 @@ typedef uint32_t bb__aliased_uint32_t FIX_ALIASING; | |||
238 | #else | 240 | #else |
239 | /* performs reasonably well (gcc usually inlines memcpy here) */ | 241 | /* performs reasonably well (gcc usually inlines memcpy here) */ |
240 | # define move_from_unaligned_int(v, intp) (memcpy(&(v), (intp), sizeof(int))) | 242 | # define move_from_unaligned_int(v, intp) (memcpy(&(v), (intp), sizeof(int))) |
243 | # define move_from_unaligned_long(v, longp) (memcpy(&(v), (longp), sizeof(long))) | ||
241 | # define move_from_unaligned16(v, u16p) (memcpy(&(v), (u16p), 2)) | 244 | # define move_from_unaligned16(v, u16p) (memcpy(&(v), (u16p), 2)) |
242 | # define move_from_unaligned32(v, u32p) (memcpy(&(v), (u32p), 4)) | 245 | # define move_from_unaligned32(v, u32p) (memcpy(&(v), (u32p), 4)) |
243 | # define move_to_unaligned16(u16p, v) do { \ | 246 | # define move_to_unaligned16(u16p, v) do { \ |