Fix os/utils.c compile with mingw.
This commit is contained in:
parent
1f48995d66
commit
0b98845046
14
os/utils.c
14
os/utils.c
|
@ -64,8 +64,10 @@ OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <X11/Xos.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#if !defined(WIN32) || !defined(__MINGW32__)
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
#include "misc.h"
|
||||
#include <X11/X.h>
|
||||
#define XSERV_t
|
||||
|
@ -527,6 +529,13 @@ GiveUp(int sig)
|
|||
errno = olderrno;
|
||||
}
|
||||
|
||||
#if defined WIN32 && defined __MINGW32__
|
||||
_X_EXPORT CARD32
|
||||
GetTimeInMillis (void)
|
||||
{
|
||||
return GetTickCount ();
|
||||
}
|
||||
#else
|
||||
_X_EXPORT CARD32
|
||||
GetTimeInMillis(void)
|
||||
{
|
||||
|
@ -541,6 +550,7 @@ GetTimeInMillis(void)
|
|||
X_GETTIMEOFDAY(&tv);
|
||||
return(tv.tv_sec * 1000) + (tv.tv_usec / 1000);
|
||||
}
|
||||
#endif
|
||||
|
||||
_X_EXPORT void
|
||||
AdjustWaitForDelay (pointer waitTime, unsigned long newdelay)
|
||||
|
@ -798,11 +808,13 @@ ProcessCommandLine(int argc, char *argv[])
|
|||
}
|
||||
else if ( strcmp( argv[i], "-core") == 0)
|
||||
{
|
||||
struct rlimit core_limit;
|
||||
CoreDump = TRUE;
|
||||
#if !defined(WIN32) || !defined(__MINGW32__)
|
||||
struct rlimit core_limit;
|
||||
getrlimit (RLIMIT_CORE, &core_limit);
|
||||
core_limit.rlim_cur = core_limit.rlim_max;
|
||||
setrlimit (RLIMIT_CORE, &core_limit);
|
||||
#endif
|
||||
}
|
||||
else if ( strcmp( argv[i], "-dpi") == 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue