From 723a2f090ff3fea7bb214699acd8eed432ace225 Mon Sep 17 00:00:00 2001 From: rpj Date: Wed, 14 Feb 2001 04:57:48 +0000 Subject: Add Win64 portability. --- Makefile | 4 ++++ private.c | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ac8a718..5df74ef 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,10 @@ VCEFLAGS = /GX /TP /DPtW32NoCatchWarn #Structured Exceptions VSEFLAGS = +# For Win64 +#CFLAGS = /Bd /WX /W3 /MT /nologo /Yd /Zi /I. /D_WIN32_WINNT=0x400 /DPTW32_BUILD + +# For Win32 CFLAGS = /W3 /MT /nologo /Yd /Zi /I. /D_WIN32_WINNT=0x400 /DPTW32_BUILD OBJ=attr.obj \ diff --git a/private.c b/private.c index 4f3bb80..88d7b1f 100644 --- a/private.c +++ b/private.c @@ -848,7 +848,7 @@ ptw32_sem_timedwait (sem_t * sem, const struct timespec * abstime) /* * subtract current system time from abstime */ - milliseconds = (abstime->tv_sec - currSysTime.time) * MILLISEC_PER_SEC; + milliseconds = (DWORD)(abstime->tv_sec - currSysTime.time) * MILLISEC_PER_SEC; milliseconds += ((abstime->tv_nsec + (NANOSEC_PER_MILLISEC/2)) / NANOSEC_PER_MILLISEC) - currSysTime.millitm; @@ -910,7 +910,11 @@ ptw32_throw(DWORD exception) { #if defined(_MSC_VER) && !defined(__cplusplus) +#ifdef _WIN64 + ULONG_PTR exceptionInformation[3]; +#else DWORD exceptionInformation[3]; +#endif #endif -- cgit v1.2.3