On Wed, Jun 8, 2011 at 1:43 AM, Paul Eggert wrote:
>> Depends-on:
>> +sys_stat
>> +stdint
>
> We can break the dependency on the stdint module
> by using (size_t) -1 instead of SIZE_MAX.
Thanks for the tip.
> Why does stat-macros need to depend on sys_stat?
Because ST_NBLOCKS uses S_ISREG, for
Paul Eggert wrote:
> It'd be good to add something like this, thanks.
Thanks, James.
I like your idea, too.
Those definitions are duplicated in far too many packages.
> A few comments:
>
> The time-related stat macros are already broken out into
> stat-time.h. Perhaps these size-related macros
It'd be good to add something like this, thanks.
A few comments:
The time-related stat macros are already broken out into
stat-time.h. Perhaps these size-related macros should
be broken out into stat-size.h? That way, we could
leave stat-macros.h alone. Many programs that need
CHMOD_MODE_BITS
* lib/stat-macros.h: Insert part of coreutils' system.h, which
defines DEV_BSIZE, ST_BLKSIZE, ST_NBLOCKS and ST_NBLOCKSIZE.
* modules/stat-macros: Depend on sys_stat (because now
stat-macros.h includes sys/stat.h) and stdint (because we need
SIZE_MAX). Since the file is now substantially composed