Problem with mingw time.h gettimeofday in newer mingw-runtime

Mark Moriarty mfmori@hotmail.com
Tue Nov 21 04:36:00 GMT 2006


As of mingw-runtime 3.10, and again with 3.11, I seem to be having a problem 
with time.h's gettimeofday.

I mean the /usr/include/mingw/sys/time.h gettimeofday function.
Following is a sample output, generated when compiling the libdvdnav 
library.  The same package compiles fine with the older 3.9 version of the 
mingw-runtime:

gcc -mno-cygwin -isystem /usr/include/mingw -DHAVE_CONFIG_H -I. -I. -I../.. 
-I.
./.. -DDVDNAV_COMPILE -I../../src -I../../src/dvdread 
-I/home/mfm/vlc-trunk/extr
as/contrib/include -mno-cygwin -isystem /usr/include/mingw -mno-cygwin 
-isystem
/usr/include/mingw -I/include -Dssize_t=long -O3 -Wall 
-D_FILE_OFFSET_BITS=64 -D
_LARGEFILE64_SOURCE -I/home/mfm/vlc-trunk/extras/contrib/include -mno-cygwin 
-is
ystem /usr/include/mingw -mno-cygwin -isystem /usr/include/mingw -I/include 
-c d
ecoder.c -o decoder.o
In file included from ./decoder.h:29,
                 from ../../src/dvdnav_internal.h:80,
                 from decoder.c:35:
/usr/include/mingw/sys/time.h:39: error: parse error before '(' token
/usr/include/mingw/sys/time.h:39: error: parse error before "void"
make[6]: *** [decoder.lo] Error 1
make[6]: Leaving directory 
`/home/mfm/vlc-trunk/extras/contrib/src/libdvdnav/src
/vm'

I run into the same error message compiling other libraries that invoke 
sys/time.h.

Time.h lines 39/40 are:
int __cdecl gettimeofday(struct timeval *__restrict__,
			 void *__restrict__  /*	tzp (unused) */);

Has anyone else seen this?  A fix?

I've tried searching on the Web, plus the mail list archives, haven't seen 
this pop up other than multiple years ago on another OS.

Thanks.

_________________________________________________________________
Get FREE company branded e-mail accounts and business Web site from 
Microsoft Office Live 
http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list