>   (2) Should LINUX_STDIO be autodetected by configure?  A simple check
>       would be something like:
> 
>         if uname -s | grep -i linux > /dev/null 2>&1; then
>         AC_DEFINE(LINUX_STDIO)
>       fi
> 
>       It's not perfect by any means, but it will (a) be right most of the
>       time, and (b) will generally err on the side of caution.

If you're going to do that, it would be better to use
AC_CANONICAL_HOST. (Which could also be used to kludge around most of
the other OS-specific stuff in config.h too.)

But that's icky. What you really want is something like:

AC_TRY_COMPILE([#include <stdio.h>],[FILE *test; test->_IO_read_ptr],
               AC_DEFINE(LINUX_STDIO))

(That's totally untested, btw.)

-- Dan

Reply via email to