Hi Bruno,
On Tue, 9 Oct 2007, Bruno Haible wrote:
Martin Koeppe wrote:
Is seq segfaulting on mingw and BeOS, too?
I just tested snapshot 316 and it unfortunately doesn't work on
Interix, i.e. seq is still wrong.
Can you find out why?
Now found out, that GNULIB_SPRINTF_POSIX and REPLACE_SPRINTF are set
to 0 by configure, seems to be the default value, and apparently
nowhere else get touched during configure (I only see 2 occurences of
these 2 variables in the whole configure), so stay 0 and sprintf(),
which seq uses, isn't properly replaced.
At least the generated lib/stdio.h:197-199 reads:
#if 0
# if 0
# define sprintf rpl_sprintf
Corresponding lib/stdio.in.h:168-170 is:
#if @GNULIB_SPRINTF_POSIX@
# if @REPLACE_SPRINTF@
# define sprintf rpl_sprintf
Interix has _ before C symbols, all the following are asm symbols. The
Interix libc has __vfprintf which __printf seems to use. While _printf
is a weak alias for __printf, this __printf seems to call (according
to nm output of libc.a) the strong __vfprintf directly, rather than
its weak alias _vfprintf. So it wouldn't even suffice to (re-)define
_vfprintf.
I don't think this is relevant. gnulib overrides are implemented at the
preprocessor level (#define, #undef), not at the linker level (asm("...")),
and the names that gnulib chooses (rpl_vfprintf etc.) certainly don't
collide with the ones in any libc.
Oh, yes. Thank you. Now I understood it. It's #defined in stdio.in.h
and has nothing to do with libc.
Martin