summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-06-16 02:23:02 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:17:31 -0500
commit0eb9bd176eb1f7f22d4c4bcdca95d2ea11b2b154 (patch)
treeab5bed54f30ffe453b2b16b672286a31c8f818c8
parent193830091fc99aa500aac123ed027ecc7e6ad11c (diff)
downloadsamba-0eb9bd176eb1f7f22d4c4bcdca95d2ea11b2b154.tar.gz
samba-0eb9bd176eb1f7f22d4c4bcdca95d2ea11b2b154.tar.bz2
samba-0eb9bd176eb1f7f22d4c4bcdca95d2ea11b2b154.zip
r16287: Use intptr_t to return an integer of an unknown type cast
to void *. Jeremy. (This used to be commit e24361ecddef8a48a42a356775b93ce5c4027fae)
-rw-r--r--source3/configure.in3
-rw-r--r--source3/libsmb/libsmbclient.c4
2 files changed, 7 insertions, 0 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 720e85e71a..e5a6a99f0e 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -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
#
diff --git a/source3/libsmb/libsmbclient.c b/source3/libsmb/libsmbclient.c
index 2436cc9136..4ea0ab6eb6 100644
--- a/source3/libsmb/libsmbclient.c
+++ b/source3/libsmb/libsmbclient.c
@@ -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