diff options
author | David Schleef <ds@schleef.org> | 2009-03-03 17:19:05 -0800 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2009-03-03 17:19:05 -0800 |
commit | c4980e4d498c48fa30553d4a5d5b0bc53cbd0c1c (patch) | |
tree | 4853a74d0577b225f5bb574f7dc55ff3fe17a5c3 /orc/orcutils.h | |
parent | fdcc43172e4c37ac306eb10154621f58a82ebb32 (diff) | |
download | orc-c4980e4d498c48fa30553d4a5d5b0bc53cbd0c1c.tar.gz |
Various fixes to execute all the new code
Diffstat (limited to 'orc/orcutils.h')
-rw-r--r-- | orc/orcutils.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/orc/orcutils.h b/orc/orcutils.h index 661053a..3114e4b 100644 --- a/orc/orcutils.h +++ b/orc/orcutils.h @@ -59,6 +59,21 @@ typedef unsigned int orc_bool; #define ROUND_UP_8(x) ROUND_UP_POW2(x,3) #define ROUND_SHIFT(x,y) (((x) + (1<<((y)-1)))>>(y)) +#define ORC_READ_UINT32_LE(ptr) \ + ((uint32_t)( \ + ((uint8_t *)(ptr))[0] | \ + (((uint8_t *)(ptr))[1]<<8) | \ + (((uint8_t *)(ptr))[2]<<16) | \ + (((uint8_t *)(ptr))[3]<<24))) + +#define ORC_WRITE_UINT32_LE(ptr,val) \ + do { \ + ((uint8_t *)ptr)[0] = ((val)>>0)&0xff; \ + ((uint8_t *)ptr)[1] = ((val)>>8)&0xff; \ + ((uint8_t *)ptr)[2] = ((val)>>16)&0xff; \ + ((uint8_t *)ptr)[3] = ((val)>>24)&0xff; \ + } while(0) + #endif #if defined(__GNUC__) && defined(__GNUC_MINOR__) |