bug-commoncpp
[Top][All Lists]
Advanced

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

Re: Suggestion regarding header files...


From: Federico Montesino Pouzols
Subject: Re: Suggestion regarding header files...
Date: Sat, 2 Nov 2002 16:02:48 +0100
User-agent: Mutt/1.4i

        Currently, the autoconf stuff defines two symbols:
COMMON_XML_PARSING (A) and HAVE_LIBXML (B). Only B is used for the
#ifdefs. Using both A and B we could do things like this:

#if defined(A) && defined(B)
        // libxml based stuff as it is currently defined.
#if defined(A) && !defined(B)
        // at present, #error "libxml not installed"
        // in the future, check another HAVE_... alternative xml lib.
#if !defined(A)
        // put in xml.cpp something like #warning "XML support is not
        // being compiled, are you sure?". And put in xml.h #error
        // "XML support not available"
        

On Sat, Nov 02, 2002 at 09:34:00AM -0500, David Sugar wrote:
> 
> I find usually when I choose not to build Common C++ with "XML support"  
> (there is a configure option to do this implicitly), I also only link with
> ccgnu rather than with ccext, so, in a sense it is a "build requirement"  
> to have XML support, but certainly not a runtime requirement if one builds
> small footprint applications that only link with ccgnu.  It would also be
> interesting if we could alternately use other xml parsers into the Common
> C++ XML classes.  If no XML support is present at build time, however, 
> should that be an error or a warning?  I think it should be at least a 
> warning, which it isn't now.
> 
> On Sat, 2 Nov 2002, Federico Montesino Pouzols wrote:
> 
> > 
> >     I see. your solution seems much better. We will also have to
> > put the '#include <xml.h>' in common.h inside an #ifdef. And we should
> > also apply the #error idea to ftp.h and piostream, which are optional
> > too.
> > 
> >     If there is no objection, this will be done within a few days.
> > 
> > On Fri, Nov 01, 2002 at 07:39:17PM -0600, Ari Johnson wrote:
> > > 
> > > If you compiled without XML support, but you try to include cc++/xml.h,
> > > you should be informed that you're trying to use a part of the library
> > > that you didn't install.  I think that xml.h is a good place to put this,
> > > and also that it should be an #error (just like trying to start a car
> > > without an engine is an error and not something that can be ignored as a
> > > warning).
> > >  -- Ari Johnson
> > > 
> > 
> > 
> > _______________________________________________
> > Bug-commoncpp mailing list
> > address@hidden
> > http://mail.gnu.org/mailman/listinfo/bug-commoncpp
> > 
> 
> 
> 
> _______________________________________________
> Bug-commoncpp mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-commoncpp




reply via email to

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