[PATCH v3 2/2] Define __STATFS_MATCHES_STATFS64

Joseph Myers joseph@codesourcery.com
Thu Oct 3 20:03:00 GMT 2019


On Thu, 3 Oct 2019, Alistair Francis wrote:

> Add a new macro __STATFS_MATCHES_STATFS64 that specifies if fsblkcnt_t
> matches fsblkcnt64_t and if fsfilcnt_t matches fsfilcnt64_t.

As a new macro it would be better to use the 0/1 convention (always 
defined, at least for linux/generic configurations that need it) rather 
than undefined / defined.  A default definition can go in bits/typesizes.h 
with a comment.

> -#if defined __USE_FILE_OFFSET64
> +#if defined __USE_FILE_OFFSET64 || defined __STATFS_MATCHES_STATFS64
>  # define __field64(type, type64, name) type64 name
>  #elif __WORDSIZE == 64

As in the stat case, I think it would be best to put the "|| defined 
__STATFS_MATCHES_STATFS64" in the __WORDSIZE == 64 case not the 
__USE_FILE_OFFSET64 case.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list