diff options
| author | Andreas Dilger <adilger@dilger.ca> | 2013-12-15 22:09:24 -0500 |
|---|---|---|
| committer | Theodore Ts'o <tytso@mit.edu> | 2013-12-15 22:10:09 -0500 |
| commit | 3a941bef3b9036ca3db9d510c71bcae801ea4dd1 (patch) | |
| tree | 0316a15c1a7011f8c2e79009bdaa6aac4422ead0 /lib/blkid | |
| parent | 66457fcb842300e757a69c49c2eb4d8e335be34c (diff) | |
| download | android_external_e2fsprogs-3a941bef3b9036ca3db9d510c71bcae801ea4dd1.tar.gz android_external_e2fsprogs-3a941bef3b9036ca3db9d510c71bcae801ea4dd1.tar.bz2 android_external_e2fsprogs-3a941bef3b9036ca3db9d510c71bcae801ea4dd1.zip | |
build: use long long for __u64 by default
Don't print a verbose configure error in parse-types.h if
<asm/types.h> missing and __[SU]*_TYPEDEF is unset. This is
always the case for non-Linux builds.
The printf formatting strings all use "%llu" for printing 64-bit
values and this it produces a large number of warnings if __u64
is defined as "unsigned long". If __U64_TYPEDEF isn't set use
"unsigned long long" for __u64 in ext2-types.h and blkid-types.h
by default instead of using "unsigned long".
Fix a few places where "%d" or "%u" or "%Lu" were used to print a
64-bit value, by converting them to use "%lld" or "%llu" instead.
Fix a few places where "%lu" was used to print .tv_usec, by casting
the variable to "(long)" since .tv_usec is "int" on some systems.
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'lib/blkid')
| -rw-r--r-- | lib/blkid/blkid_types.h.in | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/blkid/blkid_types.h.in b/lib/blkid/blkid_types.h.in index cb5b10d5..2edc0dad 100644 --- a/lib/blkid/blkid_types.h.in +++ b/lib/blkid/blkid_types.h.in @@ -92,13 +92,13 @@ typedef __U64_TYPEDEF __u64; #if (@SIZEOF_INT@ == 8) typedef unsigned int __u64; #else -#if (@SIZEOF_LONG@ == 8) -typedef unsigned long __u64; -#else #if (@SIZEOF_LONG_LONG@ == 8) typedef unsigned long long __u64; -#endif /* SIZEOF_LONG_LONG == 8 */ +#else +#if (@SIZEOF_LONG@ == 8) +typedef unsigned long __u64; #endif /* SIZEOF_LONG == 8 */ +#endif /* SIZEOF_LONG_LONG == 8 */ #endif /* SIZEOF_INT == 8 */ #endif /* __U64_TYPEDEF */ @@ -108,17 +108,17 @@ typedef __S64_TYPEDEF __s64; #if (@SIZEOF_INT@ == 8) typedef int __s64; #else -#if (@SIZEOF_LONG@ == 8) -typedef long __s64; -#else #if (@SIZEOF_LONG_LONG@ == 8) #if defined(__GNUC__) typedef __signed__ long long __s64; #else typedef signed long long __s64; #endif /* __GNUC__ */ -#endif /* SIZEOF_LONG_LONG == 8 */ +#else +#if (@SIZEOF_LONG@ == 8) +typedef long __s64; #endif /* SIZEOF_LONG == 8 */ +#endif /* SIZEOF_LONG_LONG == 8 */ #endif /* SIZEOF_INT == 8 */ #endif /* __S64_TYPEDEF */ |
