svn commit: samba r4472 - in branches/SAMBA_4_0/source/lib: .
tridge at samba.org
tridge at samba.org
Sun Jan 2 04:21:32 GMT 2005
Author: tridge
Date: 2005-01-02 04:21:32 +0000 (Sun, 02 Jan 2005)
New Revision: 4472
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4472
Log:
improve the discard_const() macro for standalone build of talloc
Modified:
branches/SAMBA_4_0/source/lib/talloc.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/talloc.c
===================================================================
--- branches/SAMBA_4_0/source/lib/talloc.c 2005-01-02 03:24:57 UTC (rev 4471)
+++ branches/SAMBA_4_0/source/lib/talloc.c 2005-01-02 04:21:32 UTC (rev 4472)
@@ -34,6 +34,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
+#include <stdint.h>
#include "talloc.h"
#endif
@@ -54,8 +55,12 @@
#endif
#ifndef discard_const_p
-#define discard_const_p(type, ptr) ((type *)(ptr))
+#if defined(__intptr_t_defined) || defined(HAVE_INTPTR_T)
+# define discard_const_p(type, ptr) ((type *)((intptr_t)(ptr)))
+#else
+# define discard_const_p(type, ptr) ((type *)(ptr))
#endif
+#endif
/* this null_context is only used if talloc_enable_leak_report() or
talloc_enable_leak_report_full() is called, otherwise it remains
More information about the samba-cvs
mailing list