lib: make the headers API depend on --enable-headers-api

This commit is contained in:
Daniel Stenberg 2022-03-19 22:40:20 +01:00
parent 7c8c723682
commit ac81a9c9ae
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
2 changed files with 8 additions and 4 deletions

View File

@ -32,7 +32,7 @@
#include "curl_memory.h"
#include "memdebug.h"
#ifndef CURL_DISABLE_HTTP
#if !defined(CURL_DISABLE_HTTP) && defined(USE_HEADERS_API)
/* Generate the curl_header struct for the user. This function MUST assign all
struct fields in the output struct. */
@ -297,23 +297,27 @@ CURLcode Curl_headers_cleanup(struct Curl_easy *data)
CURLHcode curl_easy_header(CURL *easy,
const char *name,
size_t index,
unsigned int type,
unsigned int origin,
int request,
struct curl_header **hout)
{
(void)easy;
(void)name;
(void)index;
(void)type;
(void)origin;
(void)request;
(void)hout;
return CURLHE_NOT_BUILT_IN;
}
struct curl_header *curl_easy_nextheader(CURL *easy,
unsigned int type,
int request,
struct curl_header *prev)
{
(void)easy;
(void)type;
(void)request;
(void)prev;
return NULL;
}

View File

@ -23,7 +23,7 @@
***************************************************************************/
#include "curl_setup.h"
#ifndef CURL_DISABLE_HTTP
#if !defined(CURL_DISABLE_HTTP) && defined(USE_HEADERS_API)
struct Curl_header_store {
struct Curl_llist_element node;