r16287: Use intptr_t to return an integer of an unknown type cast
authorJeremy Allison <jra@samba.org>
Fri, 16 Jun 2006 02:23:02 +0000 (02:23 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:17:31 +0000 (11:17 -0500)
to void *.
Jeremy.

source/configure.in
source/libsmb/libsmbclient.c

index 720e85e71a91d02d91549f7e7d4055bb11e81864..e5a6a99f0ecdb5a3930906b8a919cca26b50ba4c 100644 (file)
@@ -1848,6 +1848,9 @@ main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }]
 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
 
 #
index 2436cc9136fd1f7e11b0044f7b035605f537e7b8..4ea0ab6eb63682c91f48401487f04636b5c157e5 100644 (file)
@@ -6036,7 +6036,11 @@ smbc_option_get(SMBCCTX *context,
                 /*
                  * Log to standard error instead of standard output.
                  */
+#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