2010-06-03 22:46:59 +00:00
|
|
|
/* this header file comes from libowfat, http://www.fefe.de/libowfat/ */
|
2001-02-02 17:54:47 +00:00
|
|
|
#ifndef UINT64_H
|
|
|
|
#define UINT64_H
|
|
|
|
|
2007-06-28 13:38:08 +00:00
|
|
|
#include <inttypes.h>
|
|
|
|
|
2012-02-07 17:02:40 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2007-06-28 13:38:08 +00:00
|
|
|
typedef uint64_t uint64;
|
|
|
|
typedef int64_t int64;
|
2001-02-02 17:54:47 +00:00
|
|
|
|
2008-01-13 21:40:24 +00:00
|
|
|
#if (defined(__i386__) || defined(__x86_64__)) && !defined(NO_UINT64_MACROS)
|
|
|
|
#define uint64_pack(out,in) (*(uint64*)(out)=(in))
|
|
|
|
#define uint64_unpack(in,out) (*(out)=*(uint64*)(in))
|
|
|
|
#define uint64_read(in) (*(uint64*)(in))
|
|
|
|
void uint64_pack_big(char *out,uint64 in);
|
|
|
|
void uint64_unpack_big(const char *in,uint64* out);
|
|
|
|
uint64 uint64_read_big(const char *in);
|
|
|
|
#else
|
|
|
|
|
|
|
|
void uint64_pack(char *out,uint64 in);
|
|
|
|
void uint64_pack_big(char *out,uint64 in);
|
|
|
|
void uint64_unpack(const char *in,uint64* out);
|
|
|
|
void uint64_unpack_big(const char *in,uint64* out);
|
|
|
|
uint64 uint64_read(const char *in);
|
|
|
|
uint64 uint64_read_big(const char *in);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2012-02-07 17:02:40 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2001-02-02 17:54:47 +00:00
|
|
|
#endif
|