apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: config tests
Date Sun, 07 Jan 2001 12:49:58 GMT
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/

Mime
View raw message