svn commit: samba r2951 - in branches/SAMBA_4_0/source: build/m4 include

tridge at samba.org tridge at samba.org
Wed Oct 13 13:27:52 GMT 2004


Author: tridge
Date: 2004-10-13 13:27:52 +0000 (Wed, 13 Oct 2004)
New Revision: 2951

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source&rev=2951&nolog=1

Log:
fixed the intptr_t test for discard_const()




Modified:
   branches/SAMBA_4_0/source/build/m4/rewrite.m4
   branches/SAMBA_4_0/source/include/includes.h


Changeset:
Modified: branches/SAMBA_4_0/source/build/m4/rewrite.m4
===================================================================
--- branches/SAMBA_4_0/source/build/m4/rewrite.m4	2004-10-13 13:04:55 UTC (rev 2950)
+++ branches/SAMBA_4_0/source/build/m4/rewrite.m4	2004-10-13 13:27:52 UTC (rev 2951)
@@ -275,7 +275,7 @@
 AC_CHECK_TYPE(loff_t,off_t)
 AC_CHECK_TYPE(offset_t,loff_t)
 AC_CHECK_TYPE(ssize_t, int)
-AC_CHECK_TYPE(intptr_t, void*)
+AC_CHECK_TYPES(intptr_t)
 
 
 ############################################

Modified: branches/SAMBA_4_0/source/include/includes.h
===================================================================
--- branches/SAMBA_4_0/source/include/includes.h	2004-10-13 13:04:55 UTC (rev 2950)
+++ branches/SAMBA_4_0/source/include/includes.h	2004-10-13 13:27:52 UTC (rev 2951)
@@ -1089,7 +1089,11 @@
   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 */



More information about the samba-cvs mailing list