autoconf
[Top][All Lists]
Advanced

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

Re: inttypes.h incompatibility with iostream [#5060]


From: Keith Bostic
Subject: Re: inttypes.h incompatibility with iostream [#5060]
Date: Sun, 9 Dec 2001 19:14:18 -0500 (EST)

Paul, Michael will be pursuing the questions you asked, but I
wanted to discuss a related issue that occurred to me.

Maybe there should be a way to specify the "Default Includes"
for autoconf.  The problem is the following:

        + Write a program that uses the u_int type, and include
          <sys/types.h> in the program's source.

        + Use AC_CHECK_TYPE(u_int) to figure out if you need
          to declare your own local typedef for u_int.

        + Autoconf finds a typedef for u_int in some header file
          other than <sys/types.h>, say, <stddef.h>.

        + Autoconf returns that the u_int typedef exists on the system,
          so the autoconf scripts do not create a private typedef for
          u_int.

        + The compile fails, because the program does not include
          <stddef.h> when it compiles.

Perhaps the autoconf documentation should note that a program
should include the entire list of "Default Includes" include
files, in EVERY object file built based on the autoconf run?
I think that's the only safe thing to do.

My (Berkeley DB) problem is worse -- I'm building an include
file for application programmers to use, based on what I find
when they run autoconf.  I don't think I can load 15 additional
include files for the application, just because they loaded my
include file.

Further, even were I willing to include the "Default Includes"
autoconf uses, it's a nasty problem every time I upgrade.  I
don't have any way to automatically upgrade my program's list
of includes, so if I use a different version of autoconf, my
program's list of includes may suddenly differ from autoconf's
list, and then my program may not build.

So, there should probably be a macro that dumps out the list
of include files that autoconf used, so that changing versions
of autoconf doesn't result in an out-of-date list of includes
in the program.

I'd sure be interested in any suggestions you have, or places
where my analysis is wrong!

Regards,
--keith

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Keith Bostic
Sleepycat Software Inc.         address@hidden
118 Tower Rd.                   +1-781-259-3139
Lincoln, MA 01773               http://www.sleepycat.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]