Re: double underscores in autoconf-defined symbol names

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

 



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.


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux