This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3 2/2] Define __STATFS_MATCHES_STATFS64


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]