[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: utmp group proposal



miquels@cistron.nl (Miquel van Smoorenburg) wrote:
>Zack Weinberg  <zack@rabi.columbia.edu> wrote:
>>
>>Joel Klecker wrote:
>>>The main problem is that 2.0 kernels do not support sigaltstack(),
>>>this causes such things as m4 to fail when run on a Linux 2.0 system
>>>if it was compiled on a glibc 2.1 system using 2.2 kernel headers.
>>
>>*sigh* This is a bug in any program that assumes sigaltstack() works
>>just because it exists in the library.  m4, etc. should be fixed to
>>test it at runtime and fall back to some other behavior if it doesn't
>>work.
>>
>>This is in the libc FAQ as of 2.1.1-5:
>>#3.21.   Autoconf's AC_CHECK_FUNC macro reports that a function exists, but
>>#        when I try to use it, it always returns -1 and sets errno to ENOSYS.
>          
>That only says that ./configure should try to actually use it, not that
>the resulting binary should do that at runtime.

You miss the point.  sigaltstack() is implemented in kernel 2.2 and
not in 2.0.  If your binary checks at runtime whether it's
implemented, the same binary will work on both kernels.  If you do the
check at compile time, you'll need to recompile when you upgrade.

Besides, it is impossible for autoconf to test a function like that:
it doesn't know what the function is supposed to do, and it might not
even be able to run a compiled executable (what if you're
cross-compiling?)

zw


Reply to: