summaryrefslogtreecommitdiff
path: root/os/utils.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2007-06-19 17:20:52 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2007-06-19 17:20:52 +0930
commit1f97a7647606226cde61d6ad7a94f2b0b571a06c (patch)
tree63959752648b4f3bcfe4ac271d0a714dfcd93280 /os/utils.c
parent5dee64fc99f34e091abce65d47c4b6f026ab4849 (diff)
parent2e7fef7d0837939e822c40b6ac77e7f0e66d57bd (diff)
Merge branch 'master' into mpx
Conflicts: dix/devices.c hw/xfree86/common/xf86Xinput.c hw/xfree86/loader/xf86sym.c mi/mieq.c
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 e45edd17f..94061801d 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
@@ -529,6 +531,13 @@ GiveUp(int sig)
errno = olderrno;
}
+#if defined WIN32 && defined __MINGW32__
+_X_EXPORT CARD32
+GetTimeInMillis (void)
+{
+ return GetTickCount ();
+}
+#else
_X_EXPORT CARD32
GetTimeInMillis(void)
{
@@ -543,6 +552,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)
@@ -800,11 +810,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)
{