<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1476" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Seems MinGW doens't have function 
gettimeofday</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Any suggestion??</FONT></DIV>
<DIV>----------------------------------------------------------------<BR>TECHER 
Jean David<BR>Responsable Informatique 01MAP<BR>e-mail: <A 
href="mailto:davidtecher@yahoo.fr">davidtecher@yahoo.fr</A><BR>site perso : <A 
href="http://techer.pascal.free.fr/postgis/">http://techer.pascal.free.fr/postgis/</A><BR>site 
pro: <A 
href="http://www.01map.com/download/">http://www.01map.com/download/</A><BR>K-S:"The 
greatest trick the devil pulled off was convincing people he didn't 
exist"<BR>------------------------------------------------------------</DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=davidtecher@yahoo.fr href="mailto:davidtecher@yahoo.fr">TECHER Jean 
  David</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A 
  title=postgis-users@postgis.refractions.net 
  href="mailto:postgis-users@postgis.refractions.net">PostGIS Users 
  Discussion</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, November 29, 2004 11:10 
  AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [postgis-users] Error compiling 
  geos 2.1.0 on Windows/MinGW</DIV>
  <DIV><BR></DIV>
  <DIV><FONT face=Arial size=2>
  <DIV><FONT face=Arial size=2>Hi </FONT></DIV>
  <DIV> </DIV>
  <DIV><FONT face=Arial size=2>I tried to compil geos 2.1.0 on Windows XP 
  using MinGW</FONT></DIV>
  <DIV> </DIV>
  <DIV><FONT face=Arial size=2>I got this error</FONT> </DIV>
  <DIV><FONT face=Arial size=2></FONT> </DIV>
  <DIV><FONT face=Arial size=2></FONT> </DIV>
  <DIV><FONT face=Arial size=2>g++ -DHAVE_CONFIG_H -I. -I. 
  -I../../source/headers -I../../source/headers/geos -I../../source/headers 
  -DGEOS_VERSION=2.1.0 -g -O2 -MT Profiler.lo -MD -MP -MF .deps/Profiler.Tpo -c 
  ../util/Profiler.cpp  -DDLL_EXPORT -DPIC -o 
  .libs/Profiler.o<BR>../util/Profiler.cpp: In member function `void 
  geos::Profile::start()':<BR>../util/Profiler.cpp:36: `gettimeofday' undeclared 
  (first use this function)<BR>../util/Profiler.cpp:36: (Each undeclared 
  identifier is reported only once for <BR>   each function it appears 
  in.)<BR>make[2]: *** [Profiler.lo] Error 1<BR>make[2]: Leaving directory 
  `/home/src-2004-11-26/geos-2.1.0/source/geom'<BR>make[1]: *** [all-recursive] 
  Error 1<BR>make[1]: Leaving directory 
  `/home/src-2004-11-26/geos-2.1.0/source'<BR>make: *** [all-recursive] Error 
  1<BR></FONT></DIV>
  <DIV><FONT face=Arial size=2>As I'm not a great C++ programer I saw that 
  gettimeofday'  is not in my sources from MinGW</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT> </DIV>
  <DIV><FONT face=Arial size=2>On the Web , I found this code but not sure for 
  his need </FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT> </DIV>
  <DIV><FONT face=Arial size=2>typedef struct _FILETIME 
  {<BR>        unsigned long 
  dwLowDateTime;<BR>        unsigned long 
  dwHighDateTime;<BR>   } FILETIME;<BR>   void __stdcall 
  GetSystemTimeAsFileTime(FILETIME*);<BR>   <BR>   void 
  gettimeofday(struct timeval* p, void* tz /* IGNORED */);</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT> </DIV>
  <DIV><FONT face=Arial size=2>   void gettimeofday(struct timeval* p, 
  void* tz /* IGNORED */){<BR>     union 
  {<BR>       long long ns100; /*time since 1 Jan 
  1601 in 100ns units */<BR>       FILETIME 
  ft;<BR>     } _now;</FONT></DIV>
  <DIV> </DIV>
  <DIV><FONT face=Arial size=2>     GetSystemTimeAsFileTime( 
  &(_now.ft) );<BR>     p->tv_usec=(long)((_now.ns100 
  / 10LL) % 1000000LL );<BR>     p->tv_sec= 
  (long)((_now.ns100-(116444736000000000LL))/10000000LL);<BR>     
  return;<BR>   }</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT> </DIV>
  <DIV><FONT face=Arial size=2>Putting it on Profiler.cpp work but make stopped 
  for XMLTester.exe</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT> </DIV>
  <DIV><FONT face=Arial size=2>Any Ideas???</DIV></FONT>
  <DIV><FONT face=Arial 
  size=2>----------------------------------------------------------------<BR>TECHER 
  Jean David<BR>Responsable Informatique 01MAP<BR>e-mail: <A 
  href="mailto:davidtecher@yahoo.fr">davidtecher@yahoo.fr</A><BR>site perso : <A 
  href="http://techer.pascal.free.fr/postgis/">http://techer.pascal.free.fr/postgis/</A><BR>site 
  pro: <A 
  href="http://www.01map.com/download/">http://www.01map.com/download/</A><BR>K-S:"The 
  greatest trick the devil pulled off was convincing people he didn't 
  exist"<BR>------------------------------------------------------------</FONT></DIV>
  <P></P><BR></FONT></DIV>
  <DIV><FONT face=Arial size=2><BR></FONT> </DIV>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>postgis-users 
  mailing 
  list<BR>postgis-users@postgis.refractions.net<BR>http://postgis.refractions.net/mailman/listinfo/postgis-users<BR></BLOCKQUOTE></BODY></HTML>