mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
src: add and fix some preprocessor comments
PR-URL: https://github.com/nodejs/node/pull/40701 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
This commit is contained in:
1 parent
be53296a1d
commit
7681fdfd7d
13 files changed
+24
-16
No files matched your search
@@ -68,6 +68,6 @@ struct AllocatedBuffer {
|
||||
|
||||
} // namespace node
|
||||
|
||||
#endif // NODE_WANT_INTERNALS
|
||||
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
|
||||
|
||||
#endif // SRC_ALLOCATED_BUFFER_H_
|
||||
@@ -237,7 +237,7 @@ Local<Value> WinapiErrnoException(Isolate* isolate,
|
||||
|
||||
return e;
|
||||
}
|
||||
#endif
|
||||
#endif // _WIN32
|
||||
|
||||
// Implement the legacy name exposed in node.h. This has not been in fact
|
||||
// fatal any more, as the user can handle the exception in the
|
||||
|
||||
@@ -1474,7 +1474,7 @@ unsigned int TLSWrap::PskClientCallback(
|
||||
return psk_buf.length();
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // ifndef OPENSSL_NO_PSK
|
||||
|
||||
void TLSWrap::GetWriteQueueSize(const FunctionCallbackInfo<Value>& info) {
|
||||
TLSWrap* wrap;
|
||||
|
||||
+2
-2
@@ -960,7 +960,7 @@ int InitializeNodeWithArgs(std::vector<std::string>* argv,
|
||||
}
|
||||
# endif
|
||||
|
||||
#endif
|
||||
#endif // defined(NODE_HAVE_I18N_SUPPORT)
|
||||
|
||||
NativeModuleEnv::InitializeCodeCache();
|
||||
|
||||
@@ -1091,7 +1091,7 @@ InitializationResult InitializeOncePerProcess(
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#else // OPENSSL_VERSION_MAJOR < 3
|
||||
if (FIPS_mode()) {
|
||||
OPENSSL_init();
|
||||
}
|
||||
|
||||
@@ -283,7 +283,7 @@ class ThreadPoolWork {
|
||||
|
||||
#if defined(__POSIX__) && !defined(__ANDROID__) && !defined(__CloudABI__)
|
||||
#define NODE_IMPLEMENTS_POSIX_CREDENTIALS 1
|
||||
#endif // __POSIX__ && !defined(__ANDROID__) && !defined(__CloudABI__)
|
||||
#endif // defined(__POSIX__) && !defined(__ANDROID__) && !defined(__CloudABI__)
|
||||
|
||||
namespace credentials {
|
||||
bool SafeGetenv(const char* key, std::string* text, Environment* env = nullptr);
|
||||
|
||||
@@ -90,7 +90,7 @@ void NativeModuleLoader::InitializeModuleCategories() {
|
||||
|
||||
#if !NODE_USE_V8_PLATFORM || !defined(NODE_HAVE_I18N_SUPPORT)
|
||||
"trace_events",
|
||||
#endif // !NODE_USE_V8_PLATFORM
|
||||
#endif // !NODE_USE_V8_PLATFORM || !defined(NODE_HAVE_I18N_SUPPORT)
|
||||
|
||||
#if !HAVE_OPENSSL
|
||||
"crypto",
|
||||
|
||||
+10
-2
@@ -80,7 +80,8 @@ void PerProcessOptions::CheckOptions(std::vector<std::string>* errors) {
|
||||
if ((secure_heap_min & (secure_heap_min - 1)) != 0)
|
||||
errors->push_back("--secure-heap-min must be a power of 2");
|
||||
}
|
||||
#endif
|
||||
#endif // HAVE_OPENSSL
|
||||
|
||||
if (use_largepages != "off" &&
|
||||
use_largepages != "on" &&
|
||||
use_largepages != "silent") {
|
||||
@@ -808,7 +809,14 @@ PerProcessOptionsParser::PerProcessOptionsParser(
|
||||
"minimum allocation size from the OpenSSL secure heap",
|
||||
&PerProcessOptions::secure_heap_min,
|
||||
kAllowedInEnvironment);
|
||||
#endif
|
||||
#endif // HAVE_OPENSSL
|
||||
#if OPENSSL_VERSION_MAJOR >= 3
|
||||
AddOption("--openssl-legacy-provider",
|
||||
"enable OpenSSL 3.0 legacy provider",
|
||||
&PerProcessOptions::openssl_legacy_provider,
|
||||
kAllowedInEnvironment);
|
||||
|
||||
#endif // OPENSSL_VERSION_MAJOR
|
||||
AddOption("--use-largepages",
|
||||
"Map the Node.js static code to large pages. Options are "
|
||||
"'off' (the default value, meaning do not map), "
|
||||
|
||||
+1
-1
@@ -687,7 +687,7 @@ static void PrintResourceUsage(JSONWriter* writer) {
|
||||
writer->json_objectend();
|
||||
writer->json_objectend();
|
||||
}
|
||||
#endif
|
||||
#endif // RUSAGE_THREAD
|
||||
}
|
||||
|
||||
// Report operating system information.
|
||||
|
||||
@@ -262,5 +262,5 @@ v8::MaybeLocal<v8::Value> SocketAddressBlockList::Rule::ToV8String(
|
||||
}
|
||||
} // namespace node
|
||||
|
||||
#endif // NODE_WANT_INTERNALS
|
||||
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
|
||||
#endif // SRC_NODE_SOCKADDR_INL_H_
|
||||
+1
-1
@@ -400,6 +400,6 @@ class SocketAddressBlockListWrap : public BaseObject {
|
||||
|
||||
} // namespace node
|
||||
|
||||
#endif // NOE_WANT_INTERNALS
|
||||
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
|
||||
|
||||
#endif // SRC_NODE_SOCKADDR_H_
|
||||
+2
-2
@@ -331,7 +331,7 @@ bool ToASCII(const std::string& input, std::string* output) {
|
||||
output->assign(*buf, buf.length());
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
#else // !defined(NODE_HAVE_I18N_SUPPORT)
|
||||
// Intentional non-ops if ICU is not present.
|
||||
bool ToUnicode(const std::string& input, std::string* output) {
|
||||
*output = input;
|
||||
@@ -342,7 +342,7 @@ bool ToASCII(const std::string& input, std::string* output) {
|
||||
*output = input;
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
#endif // !defined(NODE_HAVE_I18N_SUPPORT)
|
||||
|
||||
#define NS_IN6ADDRSZ 16
|
||||
|
||||
|
||||
+1
-1
@@ -497,7 +497,7 @@ void Worker::New(const FunctionCallbackInfo<Value>& args) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif // NODE_WITHOUT_NODE_OPTIONS
|
||||
}
|
||||
|
||||
if (args[2]->IsArray()) {
|
||||
|
||||
+1
-1
@@ -72,6 +72,6 @@ class StreamPipe : public AsyncWrap {
|
||||
|
||||
} // namespace node
|
||||
|
||||
#endif
|
||||
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
|
||||
|
||||
#endif // SRC_STREAM_PIPE_H_
|
||||
Reference in new issue
Block a user