From 38c7eb9bd22e05ef32998858b178edaf8269cbab Mon Sep 17 00:00:00 2001 From: rsc Date: Sun, 21 May 2006 18:24:59 +0000 Subject: plan 9 import --- src/cmd/tapefs/tapefs.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/cmd/tapefs/tapefs.h') diff --git a/src/cmd/tapefs/tapefs.h b/src/cmd/tapefs/tapefs.h index a76cf383..13c8cd2b 100644 --- a/src/cmd/tapefs/tapefs.h +++ b/src/cmd/tapefs/tapefs.h @@ -3,7 +3,10 @@ #define g2byte(x) (((x)[1]<<8) + (x)[0]) /* little-endian */ #define g3byte(x) (((x)[2]<<16) + ((x)[1]<<8) + (x)[0]) #define g4byte(x) (((x)[3]<<24) + ((x)[2]<<16) + ((x)[1]<<8) + (x)[0]) -#define g8byte(x) (((vlong)g4byte(x)<<32) | (u32int)g4byte(x+4)) + +/* big endian */ +#define b4byte(x) (((x)[0]<<24) + ((x)[1]<<16) + ((x)[2]<<8) + (x)[3]) +#define b8byte(x) (((vlong)b4byte(x)<<32) | (u32int)b4byte((x)+4)) enum { @@ -78,6 +81,7 @@ extern char *user; extern Idmap *uidmap; extern Idmap *gidmap; extern int replete; +extern int blocksize; void error(char*); void *erealloc(void*, ulong); void *emalloc(ulong); -- cgit v1.2.3