Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

28 lines
746 B

  1. #ifndef UINT32_H
  2. #define UINT32_H
  3. #include <inttypes.h>
  4. typedef uint32_t uint32;
  5. typedef int32_t int32;
  6. #if (defined(__i386__) || defined(__x86_64__)) && !defined(NO_UINT32_MACROS)
  7. #define uint32_pack(out,in) (*(uint32*)(out)=(in))
  8. #define uint32_unpack(in,out) (*(out)=*(uint32*)(in))
  9. #define uint32_read(in) (*(uint32*)(in))
  10. void uint32_pack_big(char *out,uint32 in);
  11. void uint32_unpack_big(const char *in,uint32* out);
  12. uint32 uint32_read_big(const char *in);
  13. #else
  14. void uint32_pack(char *out,uint32 in);
  15. void uint32_pack_big(char *out,uint32 in);
  16. void uint32_unpack(const char *in,uint32* out);
  17. void uint32_unpack_big(const char *in,uint32* out);
  18. uint32 uint32_read(const char *in);
  19. uint32 uint32_read_big(const char *in);
  20. #endif
  21. #endif