diff options
author | Yang Tse <yangsita@gmail.com> | 2012-04-19 16:31:11 +0200 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2012-04-19 16:31:11 +0200 |
commit | 94111bbbd4f2c875bc33c9c84f6e365c1a1434d7 (patch) | |
tree | 6ade2583c8a8fca8beff22b6efc1bb92b37db09a /lib/getinfo.c | |
parent | df4205c10a459dccd480bdaefd22ef6768a4a49c (diff) |
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.
Diffstat (limited to 'lib/getinfo.c')
-rw-r--r-- | lib/getinfo.c | 13 |
1 files changed, 10 insertions, 3 deletions
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, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, 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; |