guile-devel
[Top][All Lists]
Advanced

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

Re: libguile-1.8.5 fails to compile under mingw+msys


From: Neil Jerram
Subject: Re: libguile-1.8.5 fails to compile under mingw+msys
Date: Mon, 21 Jul 2008 13:33:32 +0100

Hi Carlo,

Thanks for your email...

2008/7/18 carlo.bramix <address@hidden>:
> Hello,
> I got the sources of libguile-1.8.5 and I tried to compile them under 
> mingw+msys.
> The compilation failed because of this error:
>
> ../../guile-1.8.5/libguile/threads.c: In function 
> `scm_timed_wait_condition_variable':
> ../../guile-1.8.5/libguile/threads.c:1277: error: storage size of 'waittime' 
> isn't known
> ../../guile-1.8.5/libguile/threads.c:1277: warning: unused variable `waittime'
> make[3]: *** [libguile_la-threads.lo] Error 1
>
> After a quick test I discovered what has happened.
> The configure script tries to check the presence of timespec structure under 
> pthread include files.
> If the script founds the structure, it defines HAVE_STRUCT_TIMESPEC into 
> config.h.

So you are saying here that configure DOES find the timespec struct, correct?

> But this define is a disaster for the pthread-win32, because pthread.h checks 
> HAVE_STRUCT_TIMESPEC too for not defining timespec structure twice.
> The result is that the structure is never defined because of the above macro 
> and the compilation fails with that error.
>
> I think it is a bad idea to do the test on timespec structure in that manner, 
> at least for mingw.
> The timespec structure does not exist under Win32.

Now I'm confused.  If it does not exist, how did configure find it?

> This is the point we are all sure about.
> So you should not do assumptions about the content of pthread.h

That (i.e. not to make assumptions) is exactly the purpose of
configure.  If possible, it is nicer to have a feature-based test that
works on all platforms, than OS-specific checks (#ifdef WIN32 ...).

Regards,
       Neil




reply via email to

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