GnuPG 1.4.4 build error on mingw/msys when using
mingw-runtime-3.10
Joe Vender
jvender at owensboro.net
Tue Jun 27 05:27:24 CEST 2006
Alphax wrote:
> Sorry, I should have been more specific. The random.c change occured in
> 2003; something in mingw-runtime-3.10 is breaking _WIN32.
>
Apparently, the reason that the compilation of GnuPG started failing on
windows mingw/msys when migrating to mingw-runtime-3.10 from
mingw-runtime-3.9 is that the "gettimeofday" prototype wasn't available
prior to mingw-runtime-3.10. Since it wasn't available before that,
HAVE_GETTIMEOFDAY wasn't being defined prior to mingw-runtime-3.10 and
#ifdef HAVE_GETTIMEOFDAY
#include <sys/times.h>
#endif
caused
#include <sys/times.h>
to be passed over, so the problem didn't show up. The include wasn't
being attempted, so it wasn't finding that <sys/times.h> didn't exist on
the system.
>> It is just that sys/time.h is not always available in Windows tool
>> kits.
>>
>
> sys/time.h is in at least mingw-runtime-3.9, and according to the OP has
> changed in mingw-runtime-3.10 - could you post the new version here?
Yes, changed by addition of "gettimeofday" prototype, among other
things. The addition of the new prototype in mingw-runtime-3.10 causes
the code in GnuPG to break on mingw/msys because it is trying to include
a file that doesn't exist on the system (times.h). For the mingw/msys
build environment on windows, HAVE_GETTIMEOFDAY will only be defined if
using mingw-runtime-3.10 or later, the #include should point to
<sys/time.h> not <sys/times.h>
More information about the Gnupg-devel
mailing list