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 UINT64_H
  2. #define UINT64_H
  3. #include <inttypes.h>
  4. typedef uint64_t uint64;
  5. typedef int64_t int64;
  6. #if (defined(__i386__) || defined(__x86_64__)) && !defined(NO_UINT64_MACROS)
  7. #define uint64_pack(out,in) (*(uint64*)(out)=(in))
  8. #define uint64_unpack(in,out) (*(out)=*(uint64*)(in))
  9. #define uint64_read(in) (*(uint64*)(in))
  10. void uint64_pack_big(char *out,uint64 in);
  11. void uint64_unpack_big(const char *in,uint64* out);
  12. uint64 uint64_read_big(const char *in);
  13. #else
  14. void uint64_pack(char *out,uint64 in);
  15. void uint64_pack_big(char *out,uint64 in);
  16. void uint64_unpack(const char *in,uint64* out);
  17. void uint64_unpack_big(const char *in,uint64* out);
  18. uint64 uint64_read(const char *in);
  19. uint64 uint64_read_big(const char *in);
  20. #endif
  21. #endif