Skip to content

Commit 7c0bcaa

Browse files
committed
src: remove HAVE_QUIC macro in favor of OPENSSL_NO_QUIC
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent cff7b12 commit 7c0bcaa

25 files changed

Lines changed: 8 additions & 56 deletions

‎node.gyp‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,11 +1413,7 @@
14131413
}, {
14141414
'sources!': [ '<@(node_cctest_openssl_sources)' ],
14151415
}],
1416-
[ 'node_use_quic=="true"', {
1417-
'defines': [
1418-
'HAVE_QUIC=1',
1419-
],
1420-
}, {
1416+
[ 'node_use_quic!="true"', {
14211417
'sources!': [ '<@(node_cctest_quic_sources)' ],
14221418
}],
14231419
[ 'v8_use_perfetto==1 and node_shared_perfetto=="false"', {

‎node.gypi‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,6 @@
471471
'defines': [ 'NODE_SHARED_FFI=0' ]
472472
}],
473473
[ 'node_use_quic=="true"', {
474-
'defines': [ 'HAVE_QUIC=1' ],
475474
'conditions': [
476475
[ 'node_shared_openssl=="false"', {
477476
'dependencies': [
@@ -484,8 +483,6 @@
484483
],
485484
}],
486485
],
487-
}, {
488-
'defines': [ 'HAVE_QUIC=0' ]
489486
}],
490487
],
491488
}

‎src/node_metadata.cc‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
#ifndef OPENSSL_NO_QUIC
4343
#include <ngtcp2/version.h>
4444
#include <nghttp3/version.h>
45-
#endif
45+
#endif // OPENSSL_NO_QUIC
4646

4747
#ifdef NODE_HAVE_I18N_SUPPORT
4848
#include <unicode/timezone.h>
@@ -165,7 +165,7 @@ Metadata::Versions::Versions() {
165165
#ifndef OPENSSL_NO_QUIC
166166
ngtcp2 = NGTCP2_VERSION;
167167
nghttp3 = NGHTTP3_VERSION;
168-
#endif
168+
#endif // OPENSSL_NO_QUIC
169169

170170
simdjson = SIMDJSON_VERSION;
171171
simdutf = SIMDUTF_VERSION;

‎src/quic/application.cc‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
#include "util.h"
2-
#if HAVE_OPENSSL && HAVE_QUIC
31
#include "guard.h"
42
#ifndef OPENSSL_NO_QUIC
3+
#include "util.h"
54
#include <async_wrap-inl.h>
65
#include <debug_utils-inl.h>
76
#include <nghttp3/nghttp3.h>
@@ -460,4 +459,3 @@ std::unique_ptr<Session::Application> CreateDefaultApplication(
460459
} // namespace node
461460

462461
#endif // OPENSSL_NO_QUIC
463-
#endif // HAVE_OPENSSL && HAVE_QUIC

‎src/quic/bindingdata.cc‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#if HAVE_OPENSSL && HAVE_QUIC
21
#include "guard.h"
32
#ifndef OPENSSL_NO_QUIC
43
#include <async_wrap-inl.h>
@@ -571,4 +570,3 @@ JS_METHOD_IMPL(IllegalConstructor) {
571570
} // namespace node
572571

573572
#endif // OPENSSL_NO_QUIC
574-
#endif // HAVE_OPENSSL && HAVE_QUIC

‎src/quic/cid.cc‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#if HAVE_OPENSSL && HAVE_QUIC
21
#include "guard.h"
32
#ifndef OPENSSL_NO_QUIC
43
#include <crypto/crypto_util.h>
@@ -147,4 +146,3 @@ const CID::Factory& CID::Factory::random() {
147146

148147
} // namespace node::quic
149148
#endif // OPENSSL_NO_QUIC
150-
#endif // HAVE_OPENSSL && HAVE_QUIC

‎src/quic/data.cc‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#if HAVE_OPENSSL && HAVE_QUIC
21
#include "guard.h"
32
#ifndef OPENSSL_NO_QUIC
43
#include <env-inl.h>
@@ -554,4 +553,3 @@ const QuicError QuicError::INTERNAL_ERROR = ForNgtcp2Error(NGTCP2_ERR_INTERNAL);
554553
} // namespace node
555554

556555
#endif // OPENSSL_NO_QUIC
557-
#endif // HAVE_OPENSSL && HAVE_QUIC

‎src/quic/endpoint.cc‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#if HAVE_OPENSSL && HAVE_QUIC
21
#include "guard.h"
32
#ifndef OPENSSL_NO_QUIC
43
#include <aliased_struct-inl.h>
@@ -2200,4 +2199,3 @@ JS_METHOD_IMPL(Endpoint::DoSetSNIContexts) {
22002199
} // namespace quic
22012200
} // namespace node
22022201
#endif // OPENSSL_NO_QUIC
2203-
#endif // HAVE_OPENSSL && HAVE_QUIC

‎src/quic/http3.cc‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#if HAVE_OPENSSL && HAVE_QUIC
21
#include "guard.h"
32
#ifndef OPENSSL_NO_QUIC
43
#include <async_wrap-inl.h>
@@ -1533,4 +1532,3 @@ std::unique_ptr<Session::Application> CreateHttp3Application(
15331532
} // namespace quic
15341533
} // namespace node
15351534
#endif // OPENSSL_NO_QUIC
1536-
#endif // HAVE_OPENSSL && HAVE_QUIC

‎src/quic/packet.cc‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#if HAVE_OPENSSL && HAVE_QUIC
21
#include "guard.h"
32
#ifndef OPENSSL_NO_QUIC
43
#include <crypto/crypto_util.h>
@@ -231,4 +230,3 @@ Packet::Ptr Packet::CreateVersionNegotiationPacket(
231230
} // namespace node::quic
232231

233232
#endif // OPENSSL_NO_QUIC
234-
#endif // HAVE_OPENSSL && HAVE_QUIC

0 commit comments

Comments
 (0)