lib: merge ENABLE_QUIC C macro into USE_HTTP3

Before this patch `lib/curl_setup.h` defined these two macros right
next to each other, then the source code used them interchangeably.

After this patch, `USE_HTTP3` guards all HTTP/3 / QUIC features.
(Like `USE_HTTP2` does for HTTP/2.) `ENABLE_QUIC` is no longer used.

This patch doesn't change the way HTTP/3 is enabled via autotools
or CMake. Builders who enabled HTTP/3 manually by defining both of
these macros via `CPPFLAGS` can now delete `-DENABLE_QUIC`.

Closes #13352
This commit is contained in:
Viktor Szakats 2024-04-11 16:35:08 +00:00
parent e411c98f70
commit 49f83c30e4
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
15 changed files with 24 additions and 25 deletions

View file

@ -152,7 +152,7 @@ char *curl_version(void)
#ifdef USE_NGHTTP2
char h2_version[40];
#endif
#ifdef ENABLE_QUIC
#ifdef USE_HTTP3
char h3_version[40];
#endif
#ifdef USE_LIBRTMP
@ -233,7 +233,7 @@ char *curl_version(void)
Curl_http2_ver(h2_version, sizeof(h2_version));
src[i++] = h2_version;
#endif
#ifdef ENABLE_QUIC
#ifdef USE_HTTP3
Curl_quic_ver(h3_version, sizeof(h3_version));
src[i++] = h3_version;
#endif
@ -468,7 +468,7 @@ static const struct feat features_table[] = {
#if defined(USE_NGHTTP2)
FEATURE("HTTP2", NULL, CURL_VERSION_HTTP2),
#endif
#if defined(ENABLE_QUIC)
#if defined(USE_HTTP3)
FEATURE("HTTP3", NULL, CURL_VERSION_HTTP3),
#endif
#if defined(USE_SSL) && !defined(CURL_DISABLE_PROXY) && \
@ -643,7 +643,7 @@ curl_version_info_data *curl_version_info(CURLversion stamp)
}
#endif
#ifdef ENABLE_QUIC
#ifdef USE_HTTP3
{
static char quicbuffer[80];
Curl_quic_ver(quicbuffer, sizeof(quicbuffer));