in mingw32 last version.
the struct
struct timeval {
long tv_sec;
long tv_usec;
};
is not defined in time.h, but stay in winsock.h and
winsock2.h
all need to compile this is (only put definition.)
==========================================
#ifdef __MINGW32__
#include <sys/timeb.h>
struct timeval {
long tv_sec;
long tv_usec;
};
void gettimeofday(struct timeval *t,void *timezone)
{ struct timeb timebuffer;
ftime( &timebuffer );
t->tv_sec=timebuffer.time;
t->tv_usec=1000*timebuffer.millitm;
}
#define MISSING_USLEEP
#define sleep(t) _sleep(1000*t);
#endif
==========================================
maybe a verification in ./configure for mingw needed...
to do this automactic