You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Greg Stein <gs...@lyra.org> on 2001/01/07 13:49:58 UTC

Re: config tests

On Thu, Dec 28, 2000 at 06:27:43AM -0800, rbb@covalent.net wrote:
> 
> > My suggestion though... let's follow the ansi/posix/unix spec and simply
> > #define WANT_APR_STDIO_H before including apr... e.g. we know what the
> > offical stdio.h should have, so if it's a matter of including stdio plus
> > stdlib plus conio on win32, then that's what the win32 port does.
> 
> The problem is that it isn't just Win32.  Different Unixes put different
> functions in different header files.

Exactly. And saying "WANT_APR_STDIO_H" is completely the opposite direction
of what the apr_want.h stuff is trying to do. We want *FEATURE* inclusion,
not something to say "include stdio.h for me, please". Bah. The caller can
just do that themselves.

The program enumerates the *features*, then apr_want.h gets those features
from wherever they are.

Yes, we'll probably have one called APR_WANT_STDIO meaning the "standard
I/O" features. If the platform doesn't have stdio.h, then we can punt with a
#error (cuz we certainly can't continue without the FILE type defined).

If using #error isn't sufficient, and bits of (needed) stdio can be found in
other headers, then we may need to refine the WANT symbols. e.g. WANT_PRINTF
or WANT_FILE_TYPE or whatever; then we go find those specific features.

Whatever... but APR_WANT_STDIO_H is the wrong direction.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/