bug-autoconf
[Top][All Lists]
Advanced

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

Re: Intrinsic functions fails AC_CHECK_FUNCS test


From: Ralf Wildenhues
Subject: Re: Intrinsic functions fails AC_CHECK_FUNCS test
Date: Sat, 25 Aug 2007 08:17:05 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

Hello Jerker,

Thanks for your work and the scripts.

* Jerker Bäck wrote on Fri, Aug 24, 2007 at 02:51:17PM CEST:
> 
> > Yep.  Fixing this inside Autoconf isn't trivial either, though
> > (at least insofar noone has put forth a good suggestion yet).
> AN_FUNCTION - what is it? Could it not be used as some sort of a filter with
> some conditionalis before the function is sent to the test?

The AN_* set of macros implements functionality needed for autoscan.
I'm not sure what you're trying to achieve, but a similar issue
with compiler intrinsics exists not only for MSVC on w32, but
also for some other compilers on some other systems (and with
some compiler settings).  The set of intrinsics varies, though.

> Anyway, I may have a simple solution for the intrinsic functions, like this:
> 
> c.m4(262)
> 
> + #if defined _MSC_VER
> + #pragma push_macro(" $1 ")
> + #endif
> 
> #undef $1

What does push_macro do?

[ from other mail: ]
> + #if defined _MSC_VER
> + #pragma warning(disable : 4163 4391 4392)
> + char $1 ();
> + #pragma function( $1 )
> + #else
> char $1 ();
> + #endif

Is it portable to all MSVC versions, on w32, w64, on all MS Windows
versions?  Is there a difference between MSVC on Interix and, say,
"native" as run from MSYS, and if yes, is it portable to both, too?

Note that many users use older MSVC versions, e.g., because they also
use older w32 versions.

Note that there is also the chance that completely unrelated compilers
warn or even error out on about the above, even if they do not define
_MSC_VER.  The few I've tried so far on GNU/Linux don't.

> Needed to be tested a bit more though (e.g. compiler versions, intel
> compiler). If it turns out well, what are the chances that it will make it
> into autoconf?

Well, if we need to add code like above for different compilers,
different versions, different compile options, on different systems,
then this kind of approach will quickly grow unmaintainable.  However,
if one snippet works for all w32/MSVC, and causes no other regressions,
chances may be a bit better.

> Thanks Erik/Jerker
> 
> > Hello Erik, Jerker, however you call yourself ;-)
> Aeeh, confusing right ... Jerker = old Nordic name for Erik

Yeah, I kinda figured that; interesting.

Cheers,
Ralf




reply via email to

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