wrong configure check for off_t == long long

Dmitry V. Levin ldv at altlinux.org
Thu Nov 14 00:02:13 UTC 2013


On Sun, Nov 03, 2013 at 01:19:08AM +0000, John Spencer wrote:
[...]
> -		execl(_PATH_BSHELL, "sh", "-c", command, NULL);
> +		execl(_PATH_BSHELL, "sh", "-c", command, (void*) 0);
> NULL is not a valid sentinel for execl.

It seems to be a valid sentinel if defined as "(void*) 0" like glibc does.
At least, gcc doesn't complain about it.

> execl expects char* parameters, not (void*) 0, (char) 0, 0L, 0LL, (enum 
> foobar) 0 or whatever the C standard allows it to be.
> citation of the C standard is available here: http://ewontfix.com/11/

musl defines NULL as 0L, which might meet weak standard requirements, but
the idea to implement yet another unnecessary incompatibility with glibc
(like musl did wrt NULL) does not seem wise to me.

> -#if defined(AARCH64)
> -# include <asm/ptrace.h>
> -#endif
> -
> -#if defined(XTENSA)
> -# include <asm/ptrace.h>
> -#endif
> +#include <asm/ptrace.h>
> seems asm/ptrace.h is required anyway to not get a build error.
> and on glibc/uclibc, including it unconditionally doesnt hurt as well.

These asm/ptrace.h files vary from arch to arch, they might conflict with
sys/reg.h, so I'd like to avoid including <asm/ptrace.h> unnecessarily and
without wide arch testing.

I've pushed some commits to HEAD based on your comments.  They are
expected to fix build with musl without breaking build with glibc.
Please check whether it passes "make check" in your environment.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20131114/0a75cafe/attachment.bin>


More information about the Strace-devel mailing list