emacs-devel
[Top][All Lists]
Advanced

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

Re: windows build failure


From: Eli Zaretskii
Subject: Re: windows build failure
Date: Fri, 20 Sep 2013 10:28:39 +0300

> From: Sean Sieger <address@hidden>
> Date: Thu, 19 Sep 2013 16:25:01 -0400
> 
> Eli Zaretskii <address@hidden> writes:
> 
>     > From: Sean Sieger <address@hidden>
>     > Date: Thu, 19 Sep 2013 13:33:36 -0400
>     > 
>     > m4/gettimeofday.m4:
>     > 
>     >   if test $REPLACE_STRUCT_TIMEVAL = 1; then
>     >     REPLACE_GETTIMEOFDAY=1
>     >   fi
>     > 
>     > config.log:
>     > 
>     >   REPLACE_STRUCT_TIMEVAL='1'
> 
>     Could be.  What does your config.log say for this test:
> 
>       checking for wide-enough struct timeval.tv_sec member
> 
>     If the test fails, please show the test program and the error
>     messages.
> 
> 
> configure:19854: checking for wide-enough struct timeval.tv_sec member
> configure:19881: gcc -I /c/trunk/nt/inc -std=gnu99 -c -g3 -O2 -gdwarf-2 
> -mtune=pentium4   conftest.c >&5
> conftest.c: In function 'main':
> conftest.c:137:27: error: size of array 'verify_tv_sec_type' is negative
>                typedef int verify_tv_sec_type[
>                            ^
> configure:19881: $? = 1

Yes, that's it, thanks.  This happens because MinGW runtime 4.x
switched to a 64-bit time_t type by default, but 'struct timeval'
defined in winsock2.h and sys/time.h still uses 'long tv_sec'.  This
causes the gnulib tests to decide we need to replace 'struct timeval'
with a Posix-compliant definition, and also replace gettimeofday.

This particular problem for Emacs build should now be fixed: I forced
the configure script to accept the MinGW definition of 'struct
timeval' without testing.

Btw, the switch to 64-bit time_t (or, more accurately, the
corresponding switch to 64-bit time functions) is one of the few
changes in MinGW 4.x that cause binary incompatibility with previous
versions.  So my recommendation not to use MinGW 4.x, especially if
you are running Emacs on XP, still stands.



reply via email to

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