autoconf
[Top][All Lists]
Advanced

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

Re[2]: double underscores in autoconf-defined symbol names


From: Vadim Zeitlin
Subject: Re[2]: double underscores in autoconf-defined symbol names
Date: Tue, 10 Jan 2006 13:56:17 +0100

On Mon, 09 Jan 2006 14:14:11 -0800 Paul Eggert <address@hidden> wrote:

PE> Vadim Zeitlin <address@hidden> writes:
PE> 
PE> > 1. What do the others do? Just ignore this problem (hoping that HAVE__XXX
PE> >    is not really reserved) or is there something better?
PE> 
PE> Yes, I think that's what pretty much everybody does right now.  Have you
PE> run into a real problem, or is this just a theoretical one right now?

 It's a theoretical problem but not as stupid as one might think because in
fact it's detected by an automatic precommit check in the project I'm
working on and so it currently triggers a warning on each commit which is
annoying to say the least. Of course, the check could be changed to ignore
configure.ac but not the C++ sources using HAVE__SNPRINTF. And even if this
one is harmless we'd like the check to pass without warnings even though,
once again, I don't expect to have any problems with this particular symbol
in practice.

 
PE> > 3. Is it worth looking into patching autoconf to change AC_CHECK_FUNCS to
PE> >    not generate reserved symbols for such functions or if such patch would
PE> >    not be accepted anyhow (e.g. because of backwards compatibility)?
PE> 
PE> I think it'd be a reasonable patch, but only for C++ of course, since
PE> C doesn't have the restriction.

 Yes, I always wondered why C++ has chosen to needlessly break C
compatibility in this respect. It's the only occurence of such behaviour
I can think of in fact.


PE> Or perhaps it should be an option for AC_CHECK_FUNCS, since it is a
PE> real change?

 Maybe the most logical would be to have AC_CXX_CHECK_FUNCS then? It could
also do the check using C++ language which is often necessary as many
functions are found by AC_CHECK_FUNCS but can't be used in C++ code because 
of missing declarations. In fact, alhtough I didn't think at all about it
when I asked this question, I now become more and more enthusiastic at the
thought of adding AC_CXX_CHECK_FUNCS. What do you think about it?

 Thanks,
VZ





reply via email to

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