aboutsummaryrefslogtreecommitdiff
path: root/malloc/obstack.h
diff options
context:
space:
mode:
Diffstat (limited to 'malloc/obstack.h')
-rw-r--r--malloc/obstack.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/malloc/obstack.h b/malloc/obstack.h
index 2a708c53a9..a44224443f 100644
--- a/malloc/obstack.h
+++ b/malloc/obstack.h
@@ -119,8 +119,12 @@ extern "C" {
#endif
#ifndef __INT_TO_PTR
+#if defined __STDC__ && __STDC__
+# define __INT_TO_PTR(P) ((void *) ((P) + (char *) 0))
+#else
# define __INT_TO_PTR(P) ((P) + (char *) 0)
#endif
+#endif
/* We need the type of the resulting object. If __PTRDIFF_TYPE__ is
defined, as with GNU C, use that; that way we don't pollute the