On Sat, 2007-09-01 at 02:15 +0100, Mark Cave-Ayland wrote:

> Well I don't have GEOS commit privileges, but since it works for you
> then I'll test on my older MingW tomorrow. If this works then I'd say go
> ahead and commit.
> 
> 
> ATB,
> 
> Mark.

Okay I tested this on my MingW-cross environment and I had to add some
extra definitions to profiler.h since the relevant exports in time.h are
marked as STRICT_ANSI. The attached seems to work for me on MingW
cross/Linux gcc - does it work for your version of MingW and Visual C?


ATB,

Mark.

-- 
ILande - Open Source Consultancy
http://www.ilande.co.uk

*** configure.in.patch	2007-08-31 07:05:41.000000000 +0100
--- configure.in	2007-08-31 07:08:15.000000000 +0100
***************
*** 55,61 ****
  AC_CHECK_HEADERS(unistd.h)
  AC_CHECK_HEADERS(ieeefp.h)
  AC_CHECK_HEADERS(sys/file.h)
! AC_CHECK_FUNCS(strchr memcpy)
  AC_HEADER_STAT
  AC_STRUCT_TM
  AC_TYPE_SIZE_T
--- 55,62 ----
  AC_CHECK_HEADERS(unistd.h)
  AC_CHECK_HEADERS(ieeefp.h)
  AC_CHECK_HEADERS(sys/file.h)
! AC_CHECK_HEADERS(sys/time.h)
! AC_CHECK_FUNCS(strchr memcpy gettimeofday)
  AC_HEADER_STAT
  AC_STRUCT_TM
  AC_TYPE_SIZE_T
*** source/headers/geos/profiler.h.orig	2007-09-01 11:17:03.000000000 +0100
--- source/headers/geos/profiler.h	2007-09-01 11:14:30.000000000 +0100
***************
*** 16,26 ****
  #ifndef GEOS_PROFILER_H
  #define GEOS_PROFILER_H
  
! #ifdef _MSC_VER
  #include <geos/timeval.h>
  #else
  #include <sys/time.h>
  #endif
  #include <map>
  #include <memory>
  #include <iostream>
--- 16,41 ----
  #ifndef GEOS_PROFILER_H
  #define GEOS_PROFILER_H
  
! /* Allow us to check for presence of gettimeofday in MingW */ 
! #include <config.h>
! 
! // For MingW builds with __STRICT_ANSI__ (-ansi)
! #if defined(__MINGW32__)
! #include <sys/time.h>
! extern "C" {
! extern _CRTIMP void __cdecl	_tzset (void);
! __MINGW_IMPORT int	_daylight;
! __MINGW_IMPORT long	_timezone;
! __MINGW_IMPORT char 	*_tzname[2];
! }
! #endif
! 
! #if defined(_MSC_VER) || defined(__MINGW32__) && !defined(HAVE_GETTIMEOFDAY)
  #include <geos/timeval.h>
  #else
  #include <sys/time.h>
  #endif
+ 
  #include <map>
  #include <memory>
  #include <iostream>
_______________________________________________
geos-devel mailing list
geos-devel@geos.refractions.net
http://geos.refractions.net/mailman/listinfo/geos-devel

Reply via email to