autoconf
[Top][All Lists]
Advanced

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

Re: double underscores in autoconf-defined symbol names


From: Keith MARSHALL
Subject: Re: double underscores in autoconf-defined symbol names
Date: Tue, 10 Jan 2006 10:02:47 +0000

Vadim Zeitlin wrote:
> I'd like to know if there is any standard way of dealing with a
> problem which arises when you use AC_CHECK_FUNCS with a function
> whose name begins with an underscore (e.g. _snprintf) and then use
> the result of the test in C++ code. To be precise, the problem is
> that AC_CHECK_FUNCS would define a symbol HAVE__SNPRINTF which,
> according to 17.4.3.1.2 of the ISO C++ standard, is a reserved
> symbol in C++ program and so can't be used.

>From your example, it appears that you are searching for functions
using their "uglified" Microsoft names.

The MinGW port of GCC for Win32 defines aliases for most of these
ugly function names, with the leading underscore removed; I think
Microsoft's own compiler does likewise, (but don't know for sure).
You could try just checking for the "unuglified" name, (snprintf
in your example, resulting in a define for HAVE_SNPRINTF).

Of course, without knowing the details of your requirement, this
advice may not be appropriate.

HTH.
Keith.




reply via email to

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