From 0bd8d427d0ebe324ee40dfd18970a336b4740079 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 13 Oct 2004 13:27:52 +0000 Subject: r2951: fixed the intptr_t test for discard_const() (This used to be commit 3318cf2722597e57d1731152b2607f6b167e45b9) --- source4/include/includes.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/include/includes.h') diff --git a/source4/include/includes.h b/source4/include/includes.h index 94d15eff3f..86ddc81e57 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -1089,7 +1089,11 @@ time_t timegm(struct tm *tm); Also, please call this via the discard_const_p() macro interface, as that makes the return type safe. */ +#ifdef HAVE_INTPTR_T #define discard_const(ptr) ((void *)((intptr_t)(ptr))) +#else +#define discard_const(ptr) ((void *)(ptr)) +#endif #define discard_const_p(type, ptr) ((type *)discard_const(ptr)) #endif /* _INCLUDES_H */ -- cgit