From 90037b85d1a6c46979729d0735eef094516dc31f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 9 Jun 2004 08:23:55 +0000 Subject: Alexander Krasnostavsky's fix to make libcurl build fine with configure --disable-http, which thus builds a libcurl without HTTP support. --- lib/share.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/share.c') diff --git a/lib/share.c b/lib/share.c index d1292c4ae..ad68496f6 100644 --- a/lib/share.c +++ b/lib/share.c @@ -76,7 +76,8 @@ curl_share_setopt(CURLSH *sh, CURLSHoption option, ...) return CURLSHE_NOMEM; } break; - + +#ifndef CURL_DISABLE_HTTP case CURL_LOCK_DATA_COOKIE: if (!share->cookies) { share->cookies = Curl_cookie_init(NULL, NULL, NULL, TRUE ); @@ -84,6 +85,7 @@ curl_share_setopt(CURLSH *sh, CURLSHoption option, ...) return CURLSHE_NOMEM; } break; +#endif /* CURL_DISABLE_HTTP */ case CURL_LOCK_DATA_SSL_SESSION: /* not supported (yet) */ case CURL_LOCK_DATA_CONNECT: /* not supported (yet) */ @@ -106,12 +108,14 @@ curl_share_setopt(CURLSH *sh, CURLSHoption option, ...) } break; +#ifndef CURL_DISABLE_HTTP case CURL_LOCK_DATA_COOKIE: if (share->cookies) { Curl_cookie_cleanup(share->cookies); share->cookies = NULL; } break; +#endif /* CURL_DISABLE_HTTP */ case CURL_LOCK_DATA_SSL_SESSION: break; @@ -165,8 +169,10 @@ curl_share_cleanup(CURLSH *sh) if(share->hostcache) Curl_hash_destroy(share->hostcache); +#ifndef CURL_DISABLE_HTTP if(share->cookies) Curl_cookie_cleanup(share->cookies); +#endif /* CURL_DISABLE_HTTP */ share->unlockfunc(NULL, CURL_LOCK_DATA_SHARE, share->clientdata); free (share); -- cgit v1.2.3