From 579c13da43d5b40ac6d6c1436399fbc1d8dfd054 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 25 May 2004 13:57:39 +0000 Subject: r873: converted samba4 to use real 64 bit integers instead of structures. This was suggested by metze recently. I checked on the build farm and all the machines we have support 64 bit ints, and support the LL suffix for 64 bit constants. I suspect some won't support strtoll() and related functions, so we will probably need replacements for those. (This used to be commit 9a9244a1c66654c12abe4379661cba83a73c4c21) --- source4/include/byteorder.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/include/byteorder.h') diff --git a/source4/include/byteorder.h b/source4/include/byteorder.h index 94a346f89d..48b4cb8127 100644 --- a/source4/include/byteorder.h +++ b/source4/include/byteorder.h @@ -172,4 +172,8 @@ it also defines lots of intermediate macros, just ignore those :-) /* macros for accessing SMB protocol elements */ #define VWV(vwv) ((vwv)*2) +/* 64 bit macros */ +#define SBVAL(p, ofs, v) (SIVAL(p,ofs,(v)&0xFFFFFFFF), SIVAL(p,(ofs)+4,(v)>>32)) +#define BVAL(p, ofs) (IVAL(p,ofs) | (((uint64_t)IVAL(p,(ofs)+4)) << 32)) + #endif /* _BYTEORDER_H */ -- cgit