Menu

#3 tools/cpuinfo.c (patch)

open
nobody
other (1)
5
2003-10-02
2003-10-02
No

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

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.