From e2cd49f4085d21f53d45dc64dc99b8d6f4586166 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Mon, 9 Feb 2015 10:30:24 +0000 Subject: [PATCH] win32 --- H/YapHandles.h | 2 ++ H/YapTerm.h | 6 +++++- H/pl-shared.h | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/H/YapHandles.h b/H/YapHandles.h index da23c6dc2..e63d594a2 100755 --- a/H/YapHandles.h +++ b/H/YapHandles.h @@ -114,7 +114,9 @@ Yap_PutInSlot(yhandle_t slot, Term t USES_REGS) LOCAL_SlotBase[slot] = t; } +#ifndef max #define max(X,Y) ( X > Y ? X : Y ) +#endif static inline void ensure_slots(int N USES_REGS) diff --git a/H/YapTerm.h b/H/YapTerm.h index 81ccfc66f..10934ddf0 100644 --- a/H/YapTerm.h +++ b/H/YapTerm.h @@ -54,9 +54,13 @@ typedef uintptr_t UInt; /* typedef long int Int;*/ /* typedef unsigned long int UInt; */ +#if _WIN32 +#define Int_FORMAT "%d" +#define UInt_FORMAT "%u" +#else #define Int_FORMAT "%ld" #define UInt_FORMAT "%lu" - +#endif #else #error Yap require integer types of the same size as a pointer #endif diff --git a/H/pl-shared.h b/H/pl-shared.h index 14c400b20..43a5a91b6 100755 --- a/H/pl-shared.h +++ b/H/pl-shared.h @@ -77,9 +77,11 @@ typedef uintptr_t term_t; #if _WIN32 #ifndef THREADS +#ifndef WIN_PTHREADS_H typedef int pthread_t; #endif #endif +#endif typedef uintptr_t word; /* Anonymous 4 byte object */