On Sat, Nov 02, 2013 at 05:43:50PM +0000, John Spencer wrote:
> on a 64 bit linux system, with musl libc (off_t is long long), the 
> following happens:
> 
> configure:6234: checking for long long off_t
> conftest.c:42:6: error: size of array 'a' is negative
> 
> | #include <sys/types.h>
> | char a[(sizeof (off_t) == sizeof (long long) &&
> |         sizeof (off_t) > sizeof (long)) - 1];
> |
> 
> configure:6254: result: no
> 
> the problem is the second part of the check, which is completely bogus 
> on a 64bit system, where sizeof long long == sizeof long.

This is expected behaviour.  AC_OFF_T_IS_LONG_LONG checks whether long type
has enough room for off_t, or long long type is required instead.  It has
nothing to do with the way how off_t is actually defined in the system.
AC_OFF_T_IS_LONG_LONG was added to strace 12.5 years ago so the name
of this macro might be slightly misleading nowadays.

By the way, starting with commit v4.8~83, strace no longer uses
HAVE_LONG_LONG_OFF_T so the check could be safely removed.

> btw, while you're at it please consider merging this compatibility patch:
> http://git.alpinelinux.org/cgit/aports/plain/main/strace/strace-musl.patch
> (author is Timo Teräs <[email protected]>)

That patch is not obvious to say the least.  Could you or the author
clarify the meaning of each change, please?


-- 
ldv

Attachment: pgpxOMg0qI4ey.pgp
Description: PGP signature

------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to