svn commit: samba r16288 - in trunk/source: . libsmb
jra at samba.org
jra at samba.org
Fri Jun 16 02:23:25 GMT 2006
Author: jra
Date: 2006-06-16 02:23:23 +0000 (Fri, 16 Jun 2006)
New Revision: 16288
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16288
Log:
Use intptr_t to return an integer of an unknown type cast
to void *. Don't define intptr_t in terms of long long unless
we know we have long long.
Jeremy.
Modified:
trunk/source/configure.in
trunk/source/libsmb/libsmbclient.c
Changeset:
Modified: trunk/source/configure.in
===================================================================
--- trunk/source/configure.in 2006-06-16 02:23:02 UTC (rev 16287)
+++ trunk/source/configure.in 2006-06-16 02:23:23 UTC (rev 16288)
@@ -954,7 +954,6 @@
AC_CHECK_TYPE(offset_t,loff_t)
AC_CHECK_TYPE(ssize_t, int)
AC_CHECK_TYPE(wchar_t, unsigned short)
-AC_CHECK_TYPE(intptr_t, unsigned long long)
AC_CHECK_TYPE(comparison_fn_t,
[AC_DEFINE(HAVE_COMPARISON_FN_T, 1,[Whether or not we have comparison_fn_t])])
@@ -1851,6 +1850,9 @@
samba_cv_have_longlong=yes,samba_cv_have_longlong=no,samba_cv_have_longlong=cross)])
if test x"$samba_cv_have_longlong" = x"yes"; then
AC_DEFINE(HAVE_LONGLONG,1,[Whether the host supports long long's])
+ AC_CHECK_TYPE(intptr_t, unsigned long long)
+else
+ AC_CHECK_TYPE(intptr_t, unsigned long)
fi
#
Modified: trunk/source/libsmb/libsmbclient.c
===================================================================
--- trunk/source/libsmb/libsmbclient.c 2006-06-16 02:23:02 UTC (rev 16287)
+++ trunk/source/libsmb/libsmbclient.c 2006-06-16 02:23:23 UTC (rev 16288)
@@ -6034,7 +6034,11 @@
/*
* Log to standard error instead of standard output.
*/
- return (void *) context->internal->_debug_stderr;
+#if defined(__intptr_t_defined) || defined(HAVE_INTPTR_T)
+ return (void *) (intptr_t) context->internal->_debug_stderr;
+#else
+ return (void *) context->internal->_debug_stderr;
+#endif
} else if (strcmp(option_name, "auth_function") == 0) {
/*
* Use the new-style authentication function which includes
More information about the samba-cvs
mailing list