summaryrefslogtreecommitdiff
path: root/os/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/utils.c')
-rw-r--r--os/utils.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/os/utils.c b/os/utils.c
index 5058285e8..dd5acd34b 100644
--- a/os/utils.c
+++ b/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)
{