[64bit] autoconf test for GetConsoleScreenBufferInfo
Corinna Vinschen
corinna-cygwin@cygwin.com
Wed May 15 08:24:00 GMT 2013
On May 14 20:19, Charles Wilson wrote:
> On 5/14/2013 3:05 PM, Corinna Vinschen wrote:
> >I fear you might not like my answer: The problem here is NOT that the
> >linking works, the problem is that, if the configure test is used to
> >find out if we're running on Windows or not, it's simply not feasible
> >anymore when taking x86_64 Cygwin into account. This has to be solved
> >differently, for instance by not performing this test if configure
> >already knows the target is Cygwin.
>
> cygutils uses a similar check in its configury to figure out if it
> should build the windows-only getclip/putclip programs...
>
> AC_CHECK_STDCALL_FUNC([OpenClipboard],[void *])
> AM_CONDITIONAL(WITH_WINDOWS_PROGRAMS, test
> "$ac_cv_func_OpenClipboard" = yes)
>
> But this still works for both 32- and 64- bit cygwin because those
> lines are *preceded* by
>
> AC_CHECK_HEADERS([... windows.h])
>
> which insures that future test programs have #include <windows.h> in
> them (assuming the header is found), so the proper
> declaration/decorations are present for OpenClipboard.
Yes, this usage is fine, of course. What I meant above was, if the
configury uses a link test to figure out if it should compile Windows or
UNIX code, then such a test is kind of borderline. The link failed on
32 bit more or less haphazardly. The function *is* available, the link
only failed because the compiler didn't know about the required symbol
decoration, which is only added for *one* of multiple supported
platforms.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
More information about the Cygwin-apps
mailing list