X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=blobdiff_plain;f=compat%2Finclude%2Fbsdcompat.h;fp=compat%2Finclude%2Fbsdcompat.h;h=3e9895b57c65a15eb44e818e7b21f83bf687fc88;hp=ce7d6538544999f99e5b8a8285908f107adc3851;hb=75654eee803efe8bf930f640b029ced0e7ec9b89;hpb=e0267986934b9cf6f6c130a7779c999dff096804 diff --git a/compat/include/bsdcompat.h b/compat/include/bsdcompat.h index ce7d653..3e9895b 100644 --- a/compat/include/bsdcompat.h +++ b/compat/include/bsdcompat.h @@ -5,7 +5,7 @@ * Stelian Pop , 1999-2000 * Stelian Pop - AlcĂ´ve , 2000-2002 * - * $Id: bsdcompat.h,v 1.21 2003/11/22 16:52:16 stelian Exp $ + * $Id: bsdcompat.h,v 1.22 2004/01/27 10:15:37 stelian Exp $ */ #include @@ -37,9 +37,15 @@ #define UF_NODUMP EXT2_NODUMP_FL #endif +#ifndef howmany #define howmany(x,y) (((x)+((y)-1))/(y)) +#endif +#ifndef roundup #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) +#endif +#ifndef powerof2 #define powerof2(x) ((((x)-1)&(x))==0) +#endif #define fsbtodb(sb,b) ((int)(((long long)(b) * EXT2_BLOCK_SIZE((sb)->super)) / DEV_BSIZE)) #define dbtofsb(sb,b) ((int)(((long long)(b) * DEV_BSIZE) / EXT2_BLOCK_SIZE((sb)->super)))