Commit 2d5ba414 authored by Rafaël Carré's avatar Rafaël Carré
Browse files

gettimeofday() doesn't exist in windows, but recent mingw32 runtime

include a replacement that clashes with mingw32's one.
This patch will check for it in and define the private
function only if gettimeofday() is not defined.

parent fa6af23c
......@@ -129,6 +129,17 @@ AC_TYPE_SIZE_T
dnl AC_CHECK_TYPES([ptrdiff_t])
dnl -------------------------------------------------------------
dnl Check for basic *nix fonction that we may emulate on windows.
dnl -------------------------------------------------------------
case $host in
*mingw32* | *cygwin*)
dnl ---------------------------------------------
dnl dynamic linker
dnl ---------------------------------------------
......@@ -34,6 +34,7 @@
/* misc win32 helpers */
#ifdef WIN32
/* replacement gettimeofday implementation */
#include <sys/timeb.h>
static inline int _private_gettimeofday( struct timeval *tv, void *tz )
......@@ -45,6 +46,7 @@ static inline int _private_gettimeofday( struct timeval *tv, void *tz )
return 0;
#define gettimeofday(TV, TZ) _private_gettimeofday((TV), (TZ))
#include <io.h> /* read() */
#define lseek64 _lseeki64
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment