Message ID | 20200126113541.787884-5-hch@lst.de (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [1/5] xfsprogs: remove the ENABLE_GETTEXT substitution in platform_defs.h.in | expand |
On Sun, Jan 26, 2020 at 12:35:40PM +0100, Christoph Hellwig wrote: > BITS_PER_LONG is now only checked in C expressions, so we can simply > define it based on sizeof(long). > > Signed-off-by: Christoph Hellwig <hch@lst.de> Looks ok, Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> --D > --- > include/platform_defs.h.in | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/include/platform_defs.h.in b/include/platform_defs.h.in > index ff0a6a4e..36006cbf 100644 > --- a/include/platform_defs.h.in > +++ b/include/platform_defs.h.in > @@ -26,9 +26,7 @@ > > typedef struct filldir filldir_t; > > -/* long and pointer must be either 32 bit or 64 bit */ > -#undef SIZEOF_LONG > -#define BITS_PER_LONG (SIZEOF_LONG * CHAR_BIT) > +#define BITS_PER_LONG (sizeof(long) * CHAR_BIT) > > /* Check whether to define umode_t ourselves. */ > #ifndef HAVE_UMODE_T > -- > 2.24.1 >
diff --git a/include/platform_defs.h.in b/include/platform_defs.h.in index ff0a6a4e..36006cbf 100644 --- a/include/platform_defs.h.in +++ b/include/platform_defs.h.in @@ -26,9 +26,7 @@ typedef struct filldir filldir_t; -/* long and pointer must be either 32 bit or 64 bit */ -#undef SIZEOF_LONG -#define BITS_PER_LONG (SIZEOF_LONG * CHAR_BIT) +#define BITS_PER_LONG (sizeof(long) * CHAR_BIT) /* Check whether to define umode_t ourselves. */ #ifndef HAVE_UMODE_T
BITS_PER_LONG is now only checked in C expressions, so we can simply define it based on sizeof(long). Signed-off-by: Christoph Hellwig <hch@lst.de> --- include/platform_defs.h.in | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)