From 75654eee803efe8bf930f640b029ced0e7ec9b89 Mon Sep 17 00:00:00 2001 From: Stelian Pop Date: Tue, 27 Jan 2004 10:15:36 +0000 Subject: [PATCH] Fixed some compile warnings on Fedora (new glibc) --- CHANGES | 5 ++++- compat/include/bsdcompat.h | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index bf54202..d75a065 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -$Id: CHANGES,v 1.236 2004/01/04 10:48:34 stelian Exp $ +$Id: CHANGES,v 1.237 2004/01/27 10:15:36 stelian Exp $ Changes between versions 0.4b35 and 0.4b36 (released ?????????????????) ======================================================================= @@ -6,6 +6,9 @@ Changes between versions 0.4b35 and 0.4b36 (released ?????????????????) 1. Fixed dump compilation with old gcc versions. Thanks to Mike Castle for the patch. +2. Fixed some warnings (howmany, roundup, powerof2 redefined) + when compiling against a recent glibc version. + Changes between versions 0.4b34 and 0.4b35 (released December 21, 2003) ======================================================================= 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))) -- 2.39.5