Anonymous | Login | Signup for a new account | 11-10-2008 11:02 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0000875 | [uClibc] Architecture Specific | block | always | 05-18-06 17:23 | 05-25-06 18:34 | ||||
Reporter | bengtsjolen | View Status | public | ||||||
Assigned To | uClibc | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 0.9.28 | ||||||
Summary | 0000875: uClibc/utils/bswap.h has swapped bswap_16/bswap_32 funcs | ||||||||
Description |
bswap_32 swaps 16-bits and bswap_16 swaps 32 bits: |
||||||||
Additional Information |
current part of bswap.h in uClibc/utils/bswap.h in svn repository: static inline uint32_t bswap_32(uint32_t x) { return ((((x) & 0xff00) >> 8) | \ (((x) & 0x00ff) << 8)); } static inline uint16_t bswap_16(uint16_t x) { return ((((x) & 0xff000000) >> 24) | \ (((x) & 0x00ff0000) >> 8) | \ (((x) & 0x0000ff00) << 8) | \ (((x) & 0x000000ff) << 24)); } should of course be: static inline uint32_t bswap_32(uint32_t x) { return ((((x) & 0xff000000) >> 24) | \ (((x) & 0x00ff0000) >> 8) | \ (((x) & 0x0000ff00) << 8) | \ (((x) & 0x000000ff) << 24)); } static inline uint16_t bswap_16(uint16_t x) { return ((((x) & 0xff00) >> 8) | \ (((x) & 0x00ff) << 8)); } |
||||||||
Attached Files | |||||||||
|
Notes | |
(0001371) psm 05-18-06 19:32 |
instead of that header byteswap.h could be used |
(0001382) vapier 05-25-06 18:34 |
swapped func names in svn not a big deal considering every supported system is Linux |
Copyright © 2000 - 2006 Mantis Group |