diff options
author | Colin Hogben <curl@pythontech.co.uk> | 2012-02-05 17:44:22 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2012-02-13 22:36:10 +0100 |
commit | 2b26eb98573a1402a8f39603b9fdaa9d04142c07 (patch) | |
tree | 2c1bec67d87918d5d05d25744b2408bed3b04e4a /src/tool_operate.c | |
parent | e71ac0c6fad6643ad99b5cf6f1d566dfb79990d2 (diff) |
configure: add option disable --libcurl output
Diffstat (limited to 'src/tool_operate.c')
-rw-r--r-- | src/tool_operate.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c index f3fb8ef2a..53da5f3b5 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -354,6 +354,7 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[]) } } +#ifndef CURL_DISABLE_LIBCURL_OPTION /* This is the first entry added to easysrc and it initializes the slist */ easysrc = curl_slist_append(easysrc, "CURL *hnd = curl_easy_init();"); if(!easysrc) { @@ -361,6 +362,7 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[]) res = CURLE_OUT_OF_MEMORY; goto quit_curl; } +#endif if(config->list_engines) { struct curl_slist *engines = NULL; @@ -1246,10 +1248,12 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[]) retry_sleep = retry_sleep_default; /* ms */ retrystart = tvnow(); +#ifndef CURL_DISABLE_LIBCURL_OPTION if(!curl_slist_append(easysrc, "ret = curl_easy_perform(hnd);")) { res = CURLE_OUT_OF_MEMORY; goto show_error; } +#endif for(;;) { res = curl_easy_perform(curl); @@ -1572,8 +1576,10 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[]) curl_easy_cleanup(curl); config->easy = curl = NULL; } +#ifndef CURL_DISABLE_LIBCURL_OPTION if(easysrc) curl_slist_append(easysrc, "curl_easy_cleanup(hnd);"); +#endif /* Close function-local opened file descriptors */ @@ -1585,10 +1591,12 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[]) if(config->trace_fopened && config->trace_stream) fclose(config->trace_stream); +#ifndef CURL_DISABLE_LIBCURL_OPTION /* Dump the libcurl code if previously enabled. NOTE: that this function relies on config->errors amongst other things so not everything can be closed and cleaned before this is called */ dumpeasysrc(config); +#endif if(config->errors_fopened && config->errors) fclose(config->errors); |