From 94111bbbd4f2c875bc33c9c84f6e365c1a1434d7 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Thu, 19 Apr 2012 16:31:11 +0200 Subject: Take in account that CURLAUTH_* bitmasks are now 'unsigned long' - follow-up MIPSPro compiler detected curl_easy_getinfo() related missing adjustments. SunPro compiler detected curl tool --libcurl option related missing adjustments. --- lib/getinfo.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/getinfo.c b/lib/getinfo.c index 928e18d7b..cd6feee02 100644 --- a/lib/getinfo.c +++ b/lib/getinfo.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -87,6 +87,11 @@ CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...) struct curl_slist * to_slist; } ptr; + union { + unsigned long *to_ulong; + long *to_long; + } lptr; + if(!data) return CURLE_BAD_FUNCTION_ARGUMENT; @@ -191,10 +196,12 @@ CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...) *param_charp = (char *) data->set.private_data; break; case CURLINFO_HTTPAUTH_AVAIL: - *param_longp = data->info.httpauthavail; + lptr.to_long = param_longp; + *lptr.to_ulong = data->info.httpauthavail; break; case CURLINFO_PROXYAUTH_AVAIL: - *param_longp = data->info.proxyauthavail; + lptr.to_long = param_longp; + *lptr.to_ulong = data->info.proxyauthavail; break; case CURLINFO_OS_ERRNO: *param_longp = data->state.os_errno; -- cgit v1.2.3