<div dir="ltr">Hi all,<br><br>recently, I proposed a patch to fix a definition collision for "struct timeval" in src/c/time.d. While this fixed the build problem for the default settings in msvc/Makefile, apparently it broke the ECL_THREADS build - sorry for this!<br>
<br>src/h/ecl.h includes windows.h as follows:<br><br>#ifdef ECL_THREADS<br># if defined(_MSC_VER) || defined(mingw32)<br>#  define WIN32_LEAN_AND_MEAN 1 /* Do not include winsock.h */<br>#  include <windows.h><br>...<br>
<br>WIN32_LEAN_AND_MEAN is set to prevent windows.h from including WinSock.h. WinSock.h contains, among many other things, the declaration for "struct timeval". src/c/time.d needs this definition, and therefore includes windows.h, which in turn includes WinSock.h - but not if WIN32_LEAN_AND_MEAN is set! Hence, "struct timeval" is never defined, and time.d won't compile.<br>
<br>Setting WIN32_LEAN_AND_MEAN generally is a good idea because it reduces build times. Therefore, I didn't change ecl.h, but instead applied a local fix in src/c/time.d:<br><br>===================================================================<br>
RCS file: /cvsroot/ecls/ecl/src/c/time.d,v<br>retrieving revision 1.36<br>diff -c -r1.36 time.d<br>*** src/c/time.d        19 Sep 2008 17:23:30 -0000      1.36<br>--- src/c/time.d        25 Sep 2008 20:21:32 -0000<br>***************<br>
*** 36,42 ****<br>  #endif<br>  #include <ecl/internal.h><br>  #if defined(mingw32) || defined(_MSC_VER)<br>! #include <windows.h><br>  #endif<br><br>  #ifdef darwin<br>--- 36,43 ----<br>  #endif<br>  #include <ecl/internal.h><br>
  #if defined(mingw32) || defined(_MSC_VER)<br>! # include <windows.h><br>! # include <WinSock.h><br>  #endif<br><br><br>---<br><br>Claus<br><br><a href="http://www.clausbrod.de/Blog">http://www.clausbrod.de/Blog</a><br>
<br><br></div>