From: Chris Hanson Date: Wed, 25 Sep 1991 20:36:47 +0000 (+0000) Subject: Fix casting bug in __INT_TO_PTR. X-Git-Tag: 20090517-FFI~10185 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=668112a61712eeeaedcbafc85d5741ecd7bb827a;p=mit-scheme.git Fix casting bug in __INT_TO_PTR. --- diff --git a/v7/src/microcode/obstack.h b/v7/src/microcode/obstack.h index 0ab906063..be5e42109 100644 --- a/v7/src/microcode/obstack.h +++ b/v7/src/microcode/obstack.h @@ -103,6 +103,8 @@ Summary: #ifndef __OBSTACKS__ #define __OBSTACKS__ +#include "ansidecl.h" + /* We use subtraction of (char *)0 instead of casting to int because on word-addressable machines a simple cast to int may ignore the byte-within-word field of the pointer. */ @@ -112,7 +114,7 @@ Summary: #endif #ifndef __INT_TO_PTR -#define __INT_TO_PTR(P) ((P) + (char *)0) +#define __INT_TO_PTR(P) ((PTR) ((P) + (char *)0)) #endif struct _obstack_chunk /* Lives at front of each chunk. */