Commit Graph

8 Commits (master)

Author SHA1 Message Date
Chen Qi 91f04685bf Fix cross compilation problem in parse-types.sh
The checking of types in parse-types.sh doesn't make much sense in a
cross-compilation environment, because the generated binary is
executed on build machine.

So even if asm_types.h has got correct statements for types, it's
possible that the generated binary will report an error, because these
types are for the target machine.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2014-05-07 10:51:50 -04:00
Andreas Dilger 3a941bef3b 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>
2013-12-15 22:10:09 -05:00
Andreas Dilger b55705e0ba build: quiet build warnings for "gcc -Wall"
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-01-27 22:29:01 -05:00
Eric Whitney da489dd2f3 config: silence printf format warnings
The printfs in the asm_types.c code contained within parse-types.sh
expect sizeof to return an int.  Fix this for architectures where this
isn't true (x86_64, etc.) so we don't see warning messages while
running the configure script.

Signed-off-by: Eric Whitney <enwlinux@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2013-01-08 21:04:03 -05:00
Theodore Ts'o f56aa6e6ee Don't assume that /bin/true is always in /bin
... because it isn't on MacOS X

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-07-14 17:47:52 -04:00
Theodore Ts'o 318824c1bb Fix Solaris shell script portability issues
Solaris ships with a pathetically ancient shell in /bin/sh,
so fix various shell scripts to accomodate.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-07-13 16:06:56 -04:00
Theodore Ts'o 29a5deed21 Improve the config/parse_types.sh helper script
Fix a potential security problem if e2fsprogs is built as root (as
Gentoo does!).  In addition fix the script and how it is called from
the configure script so that it does the right thing when
cross-compiling.

Fixes-Gentoo-bug: #146903

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-07-04 19:55:03 -04:00
Theodore Ts'o 4ea7ea007b Fix asm_types.h type conflicts
This caused FTBFS bugs on AMD64 platforms, since it uses a different
64-bit type when compared with IA64, so we need to make our
autoconfiguration system more intelligent.

Addresses Debian Bugs: #360661, #360317

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2006-04-09 08:41:55 -04:00