diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2016-05-24 10:54:05 +0300 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2016-05-25 10:54:24 +0300 |
commit | eff96d32dc3dce00f6dc60461d43328965cb214f (patch) | |
tree | 4d1dd69ddd7eb502d1a8f2f3216b2a3a4546f936 /src | |
parent | 54785f59e16179dc66f00f97e13dce40661447bd (diff) |
src: add include guards to internal headers
For consistency with the newly added src/base64.h header, check that
NODE_WANT_INTERNALS is defined and set in internal headers.
PR-URL: https://github.com/nodejs/node/pull/6948
Refs: https://github.com/nodejs/node/pull/6910
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'src')
48 files changed, 187 insertions, 0 deletions
diff --git a/src/async-wrap-inl.h b/src/async-wrap-inl.h index cf7024e7e31..372af073102 100644 --- a/src/async-wrap-inl.h +++ b/src/async-wrap-inl.h @@ -1,6 +1,8 @@ #ifndef SRC_ASYNC_WRAP_INL_H_ #define SRC_ASYNC_WRAP_INL_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "async-wrap.h" #include "base-object.h" #include "base-object-inl.h" @@ -120,4 +122,6 @@ inline v8::Local<v8::Value> AsyncWrap::MakeCallback( } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_ASYNC_WRAP_INL_H_ diff --git a/src/async-wrap.h b/src/async-wrap.h index cb0c9e211a8..e1ea383d9f1 100644 --- a/src/async-wrap.h +++ b/src/async-wrap.h @@ -1,6 +1,8 @@ #ifndef SRC_ASYNC_WRAP_H_ #define SRC_ASYNC_WRAP_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "base-object.h" #include "v8.h" @@ -86,5 +88,6 @@ void LoadAsyncWrapperInfo(Environment* env); } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS #endif // SRC_ASYNC_WRAP_H_ diff --git a/src/base-object-inl.h b/src/base-object-inl.h index 86add5e3b37..b4c3730f1ae 100644 --- a/src/base-object-inl.h +++ b/src/base-object-inl.h @@ -1,6 +1,8 @@ #ifndef SRC_BASE_OBJECT_INL_H_ #define SRC_BASE_OBJECT_INL_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "base-object.h" #include "env.h" #include "env-inl.h" @@ -68,4 +70,6 @@ inline void BaseObject::ClearWeak() { } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_BASE_OBJECT_INL_H_ diff --git a/src/base-object.h b/src/base-object.h index 8cc51017822..afec3442ce8 100644 --- a/src/base-object.h +++ b/src/base-object.h @@ -1,6 +1,8 @@ #ifndef SRC_BASE_OBJECT_H_ #define SRC_BASE_OBJECT_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "v8.h" namespace node { @@ -48,4 +50,6 @@ class BaseObject { } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_BASE_OBJECT_H_ diff --git a/src/debug-agent.h b/src/debug-agent.h index 0c465b8e1b6..6b151c45874 100644 --- a/src/debug-agent.h +++ b/src/debug-agent.h @@ -22,6 +22,8 @@ #ifndef SRC_DEBUG_AGENT_H_ #define SRC_DEBUG_AGENT_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "util.h" #include "util-inl.h" #include "uv.h" @@ -132,4 +134,6 @@ class Agent { } // namespace debugger } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_DEBUG_AGENT_H_ diff --git a/src/env-inl.h b/src/env-inl.h index 2c6248ae608..34f9bf7d72d 100644 --- a/src/env-inl.h +++ b/src/env-inl.h @@ -1,6 +1,8 @@ #ifndef SRC_ENV_INL_H_ #define SRC_ENV_INL_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "env.h" #include "node.h" #include "util.h" @@ -576,4 +578,6 @@ inline v8::Local<v8::Object> Environment::NewInternalFieldObject() { } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_ENV_INL_H_ diff --git a/src/env.h b/src/env.h index afbade5dd81..0c95abd56cb 100644 --- a/src/env.h +++ b/src/env.h @@ -1,6 +1,8 @@ #ifndef SRC_ENV_H_ #define SRC_ENV_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "ares.h" #include "debug-agent.h" #include "handle_wrap.h" @@ -647,4 +649,6 @@ class Environment { } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_ENV_H_ diff --git a/src/handle_wrap.h b/src/handle_wrap.h index 49b36f80f95..eaf0faef200 100644 --- a/src/handle_wrap.h +++ b/src/handle_wrap.h @@ -1,6 +1,8 @@ #ifndef SRC_HANDLE_WRAP_H_ #define SRC_HANDLE_WRAP_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "async-wrap.h" #include "util.h" #include "uv.h" @@ -69,5 +71,6 @@ class HandleWrap : public AsyncWrap { } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS #endif // SRC_HANDLE_WRAP_H_ diff --git a/src/js_stream.h b/src/js_stream.h index 08d1604ac53..5a1244bc463 100644 --- a/src/js_stream.h +++ b/src/js_stream.h @@ -1,6 +1,8 @@ #ifndef SRC_JS_STREAM_H_ #define SRC_JS_STREAM_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "async-wrap.h" #include "env.h" #include "stream_base.h" @@ -48,4 +50,6 @@ class JSStream : public AsyncWrap, public StreamBase { } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_JS_STREAM_H_ diff --git a/src/node_constants.h b/src/node_constants.h index 133e68c1926..7ba6ec3bd1b 100644 --- a/src/node_constants.h +++ b/src/node_constants.h @@ -1,6 +1,8 @@ #ifndef SRC_NODE_CONSTANTS_H_ #define SRC_NODE_CONSTANTS_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "node.h" #include "v8.h" @@ -37,4 +39,6 @@ extern const char* default_cipher_list; void DefineConstants(v8::Isolate* isolate, v8::Local<v8::Object> target); } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_NODE_CONSTANTS_H_ diff --git a/src/node_counters.h b/src/node_counters.h index 8c93b34f1ff..117db1079e9 100644 --- a/src/node_counters.h +++ b/src/node_counters.h @@ -1,6 +1,8 @@ #ifndef SRC_NODE_COUNTERS_H_ #define SRC_NODE_COUNTERS_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "node.h" #ifdef HAVE_PERFCTR @@ -31,4 +33,6 @@ void TermPerfCounters(v8::Local<v8::Object> target); } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_NODE_COUNTERS_H_ diff --git a/src/node_crypto.h b/src/node_crypto.h index 28cee7a4928..360024be88a 100644 --- a/src/node_crypto.h +++ b/src/node_crypto.h @@ -1,6 +1,8 @@ #ifndef SRC_NODE_CRYPTO_H_ #define SRC_NODE_CRYPTO_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "node.h" #include "node_crypto_clienthello.h" // ClientHelloParser #include "node_crypto_clienthello-inl.h" @@ -742,4 +744,6 @@ void InitCrypto(v8::Local<v8::Object> target); } // namespace crypto } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_NODE_CRYPTO_H_ diff --git a/src/node_crypto_bio.h b/src/node_crypto_bio.h index eb247b7f51a..7fe0f9b796a 100644 --- a/src/node_crypto_bio.h +++ b/src/node_crypto_bio.h @@ -1,6 +1,8 @@ #ifndef SRC_NODE_CRYPTO_BIO_H_ #define SRC_NODE_CRYPTO_BIO_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "openssl/bio.h" #include "env.h" #include "env-inl.h" @@ -134,4 +136,6 @@ class NodeBIO { } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_NODE_CRYPTO_BIO_H_ diff --git a/src/node_crypto_clienthello-inl.h b/src/node_crypto_clienthello-inl.h index 9ae9fd41b6d..108383bf2d5 100644 --- a/src/node_crypto_clienthello-inl.h +++ b/src/node_crypto_clienthello-inl.h @@ -1,6 +1,8 @@ #ifndef SRC_NODE_CRYPTO_CLIENTHELLO_INL_H_ #define SRC_NODE_CRYPTO_CLIENTHELLO_INL_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "util.h" #include "util-inl.h" @@ -53,4 +55,6 @@ inline bool ClientHelloParser::IsPaused() const { } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_NODE_CRYPTO_CLIENTHELLO_INL_H_ diff --git a/src/node_crypto_clienthello.h b/src/node_crypto_clienthello.h index ec814d84396..b0b63fb2e38 100644 --- a/src/node_crypto_clienthello.h +++ b/src/node_crypto_clienthello.h @@ -1,6 +1,8 @@ #ifndef SRC_NODE_CRYPTO_CLIENTHELLO_H_ #define SRC_NODE_CRYPTO_CLIENTHELLO_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "node.h" #include <stddef.h> // size_t @@ -112,4 +114,6 @@ class ClientHelloParser { } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_NODE_CRYPTO_CLIENTHELLO_H_ diff --git a/src/node_crypto_groups.h b/src/node_crypto_groups.h index ffbf671307e..2817f4c9262 100644 --- a/src/node_crypto_groups.h +++ b/src/node_crypto_groups.h @@ -1,6 +1,8 @@ #ifndef SRC_NODE_CRYPTO_GROUPS_H_ #define SRC_NODE_CRYPTO_GROUPS_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + /* These modular groups were literally taken from: * RFC 2412 (groups 1 and 2) @@ -388,4 +390,6 @@ static const modp_group modp_groups[] = { #undef V }; +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_NODE_CRYPTO_GROUPS_H_ diff --git a/src/node_dtrace.h b/src/node_dtrace.h index 9243d02f5a1..5d192a60f71 100644 --- a/src/node_dtrace.h +++ b/src/node_dtrace.h @@ -1,6 +1,8 @@ #ifndef SRC_NODE_DTRACE_H_ #define SRC_NODE_DTRACE_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "node.h" #include "v8.h" #include "env.h" @@ -58,4 +60,6 @@ void InitDTrace(Environment* env, v8::Local<v8::Object> target); } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_NODE_DTRACE_H_ diff --git a/src/node_file.h b/src/node_file.h index 8192ed9c2f0..76dbe80348d 100644 --- a/src/node_file.h +++ b/src/node_file.h @@ -1,6 +1,8 @@ #ifndef SRC_NODE_FILE_H_ #define SRC_NODE_FILE_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "node.h" #include "v8.h" @@ -10,4 +12,6 @@ void InitFs(v8::Local<v8::Object> target); } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_NODE_FILE_H_ diff --git a/src/node_http_parser.h b/src/node_http_parser.h index 9b49d4d99e5..5fbe6f13059 100644 --- a/src/node_http_parser.h +++ b/src/node_http_parser.h @@ -1,6 +1,8 @@ #ifndef SRC_NODE_HTTP_PARSER_H_ #define SRC_NODE_HTTP_PARSER_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "v8.h" #include "http_parser.h" @@ -11,4 +13,6 @@ void InitHttpParser(v8::Local<v8::Object> target); } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_NODE_HTTP_PARSER_H_ diff --git a/src/node_i18n.h b/src/node_i18n.h index 4e812ad0f3e..31ad18fa47e 100644 --- a/src/node_i18n.h +++ b/src/node_i18n.h @@ -1,6 +1,8 @@ #ifndef SRC_NODE_I18N_H_ #define SRC_NODE_I18N_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "node.h" #if defined(NODE_HAVE_I18N_SUPPORT) @@ -18,4 +20,6 @@ bool InitializeICUDirectory(const char* icu_data_path); #endif // NODE_HAVE_I18N_SUPPORT +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_NODE_I18N_H_ diff --git a/src/node_internals.h b/src/node_internals.h index a46d3130bf6..2875f5ac798 100644 --- a/src/node_internals.h +++ b/src/node_internals.h @@ -1,6 +1,8 @@ #ifndef SRC_NODE_INTERNALS_H_ #define SRC_NODE_INTERNALS_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "node.h" #include "util.h" #include "util-inl.h" @@ -313,4 +315,6 @@ v8::MaybeLocal<v8::Object> New(Environment* env, char* data, size_t length); } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_NODE_INTERNALS_H_ diff --git a/src/node_javascript.h b/src/node_javascript.h index 1de6611b314..738d8195725 100644 --- a/src/node_javascript.h +++ b/src/node_javascript.h @@ -1,6 +1,8 @@ #ifndef SRC_NODE_JAVASCRIPT_H_ #define SRC_NODE_JAVASCRIPT_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "v8.h" #include "env.h" @@ -11,4 +13,6 @@ v8::Local<v8::String> MainSource(Environment* env); } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_NODE_JAVASCRIPT_H_ diff --git a/src/node_lttng.h b/src/node_lttng.h index 4e4147438f2..edd802eb6e4 100644 --- a/src/node_lttng.h +++ b/src/node_lttng.h @@ -1,6 +1,8 @@ #ifndef SRC_NODE_LTTNG_H_ #define SRC_NODE_LTTNG_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "node.h" #include "v8.h" #include "env.h" @@ -37,4 +39,6 @@ void InitLTTNG(Environment* env, v8::Local<v8::Object> target); } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_NODE_LTTNG_H_ diff --git a/src/node_lttng_provider.h b/src/node_lttng_provider.h index 2b5b9be8d39..5913f39752c 100644 --- a/src/node_lttng_provider.h +++ b/src/node_lttng_provider.h @@ -1,6 +1,8 @@ #ifndef SRC_NODE_LTTNG_PROVIDER_H_ #define SRC_NODE_LTTNG_PROVIDER_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #define TRACEPOINT_CREATE_PROBES #define TRACEPOINT_DEFINE #include "node_lttng_tp.h" @@ -99,4 +101,6 @@ bool NODE_NET_STREAM_END_ENABLED() { return true; } } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_NODE_LTTNG_PROVIDER_H_ diff --git a/src/node_lttng_tp.h b/src/node_lttng_tp.h index 53d04f47a80..baa3db2ce0c 100644 --- a/src/node_lttng_tp.h +++ b/src/node_lttng_tp.h @@ -1,3 +1,5 @@ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #undef TRACEPOINT_PROVIDER #define TRACEPOINT_PROVIDER node @@ -128,3 +130,5 @@ TRACEPOINT_EVENT( #endif /* __NODE_LTTNG_TP_H */ #include <lttng/tracepoint-event.h> + +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS diff --git a/src/node_revert.h b/src/node_revert.h index 6a0f9b452ea..b4c3633e947 100644 --- a/src/node_revert.h +++ b/src/node_revert.h @@ -1,6 +1,8 @@ #ifndef SRC_NODE_REVERT_H_ #define SRC_NODE_REVERT_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "node.h" /** @@ -41,4 +43,6 @@ bool IsReverted(const char * cve); } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_NODE_REVERT_H_ diff --git a/src/node_root_certs.h b/src/node_root_certs.h index 866f75fd36b..f00de758b8f 100644 --- a/src/node_root_certs.h +++ b/src/node_root_certs.h @@ -1,3 +1,4 @@ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS /* GlobalSign Root CA */ "-----BEGIN CERTIFICATE-----\n" @@ -3881,3 +3882,5 @@ "1T2wdKyUpOgOPQB0TKGXa/kNUTyh2Tv0Daupn75OcsqF1NnstTJFGG+rrQIwfcf3aWMvoeGY\n" "7xMQ0Xk/0f7qO3/eVvSQsRUR2LIiFdAvwyYua/GRspBl9JrmkO5K\n" "-----END CERTIFICATE-----\n", + +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS diff --git a/src/node_stat_watcher.h b/src/node_stat_watcher.h index bc7929880b2..6978f602e1b 100644 --- a/src/node_stat_watcher.h +++ b/src/node_stat_watcher.h @@ -1,6 +1,8 @@ #ifndef SRC_NODE_STAT_WATCHER_H_ #define SRC_NODE_STAT_WATCHER_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "node.h" #include "async-wrap.h" #include "env.h" @@ -35,4 +37,7 @@ class StatWatcher : public AsyncWrap { }; } // namespace node + +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_NODE_STAT_WATCHER_H_ diff --git a/src/node_watchdog.h b/src/node_watchdog.h index ead31ce66df..36125ac0e1f 100644 --- a/src/node_watchdog.h +++ b/src/node_watchdog.h @@ -1,6 +1,8 @@ #ifndef SRC_NODE_WATCHDOG_H_ #define SRC_NODE_WATCHDOG_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "v8.h" #include "uv.h" @@ -32,4 +34,6 @@ class Watchdog { } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_NODE_WATCHDOG_H_ diff --git a/src/node_win32_etw_provider-inl.h b/src/node_win32_etw_provider-inl.h index 04cd31cee3c..efc11ab0b95 100644 --- a/src/node_win32_etw_provider-inl.h +++ b/src/node_win32_etw_provider-inl.h @@ -1,6 +1,8 @@ #ifndef SRC_NODE_WIN32_ETW_PROVIDER_INL_H_ #define SRC_NODE_WIN32_ETW_PROVIDER_INL_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "node_win32_etw_provider.h" #include "node_etw_provider.h" @@ -265,4 +267,6 @@ bool NODE_V8SYMBOL_ENABLED() { return events_enabled > 0; } } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_NODE_WIN32_ETW_PROVIDER_INL_H_ diff --git a/src/node_win32_etw_provider.h b/src/node_win32_etw_provider.h index 23242349cdc..baf9e38539f 100644 --- a/src/node_win32_etw_provider.h +++ b/src/node_win32_etw_provider.h @@ -1,6 +1,8 @@ #ifndef SRC_NODE_WIN32_ETW_PROVIDER_H_ #define SRC_NODE_WIN32_ETW_PROVIDER_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "node_dtrace.h" #include <evntprov.h> @@ -71,4 +73,6 @@ INLINE bool NODE_V8SYMBOL_ENABLED(); } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_NODE_WIN32_ETW_PROVIDER_H_ diff --git a/src/node_win32_perfctr_provider.h b/src/node_win32_perfctr_provider.h index f1645f4bf8b..315e32b0297 100644 --- a/src/node_win32_perfctr_provider.h +++ b/src/node_win32_perfctr_provider.h @@ -1,6 +1,8 @@ #ifndef SRC_NODE_WIN32_PERFCTR_PROVIDER_H_ #define SRC_NODE_WIN32_PERFCTR_PROVIDER_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #if defined(_MSC_VER) # define INLINE __forceinline #else @@ -30,4 +32,6 @@ void TermPerfCountersWin32(); } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_NODE_WIN32_PERFCTR_PROVIDER_H_ diff --git a/src/node_wrap.h b/src/node_wrap.h index b2d6af8ad55..15cea7beda7 100644 --- a/src/node_wrap.h +++ b/src/node_wrap.h @@ -1,6 +1,8 @@ #ifndef SRC_NODE_WRAP_H_ #define SRC_NODE_WRAP_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "env.h" #include "env-inl.h" #include "js_stream.h" @@ -49,4 +51,6 @@ inline uv_stream_t* HandleToStream(Environment* env, } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_NODE_WRAP_H_ diff --git a/src/pipe_wrap.h b/src/pipe_wrap.h index eb3d18b80df..f4784ac13a0 100644 --- a/src/pipe_wrap.h +++ b/src/pipe_wrap.h @@ -1,6 +1,8 @@ #ifndef SRC_PIPE_WRAP_H_ #define SRC_PIPE_WRAP_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "async-wrap.h" #include "env.h" #include "stream_wrap.h" @@ -44,5 +46,6 @@ class PipeWrap : public StreamWrap { } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS #endif // SRC_PIPE_WRAP_H_ diff --git a/src/req-wrap-inl.h b/src/req-wrap-inl.h index 653babd2a70..84af22023dc 100644 --- a/src/req-wrap-inl.h +++ b/src/req-wrap-inl.h @@ -1,6 +1,8 @@ #ifndef SRC_REQ_WRAP_INL_H_ #define SRC_REQ_WRAP_INL_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "req-wrap.h" #include "async-wrap.h" #include "async-wrap-inl.h" @@ -39,4 +41,6 @@ void ReqWrap<T>::Dispatched() { } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_REQ_WRAP_INL_H_ diff --git a/src/req-wrap.h b/src/req-wrap.h index 240df76ebf4..e226dc63952 100644 --- a/src/req-wrap.h +++ b/src/req-wrap.h @@ -1,6 +1,8 @@ #ifndef SRC_REQ_WRAP_H_ #define SRC_REQ_WRAP_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "async-wrap.h" #include "env.h" #include "util.h" @@ -27,4 +29,6 @@ class ReqWrap : public AsyncWrap { } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_REQ_WRAP_H_ diff --git a/src/spawn_sync.h b/src/spawn_sync.h index fab2f09eefe..9f53f0a22bc 100644 --- a/src/spawn_sync.h +++ b/src/spawn_sync.h @@ -1,6 +1,8 @@ #ifndef SRC_SPAWN_SYNC_H_ #define SRC_SPAWN_SYNC_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "node.h" #include "node_buffer.h" @@ -222,4 +224,6 @@ class SyncProcessRunner { }; } +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_SPAWN_SYNC_H_ diff --git a/src/stream_base-inl.h b/src/stream_base-inl.h index bdc82117073..a34c01082de 100644 --- a/src/stream_base-inl.h +++ b/src/stream_base-inl.h @@ -1,6 +1,8 @@ #ifndef SRC_STREAM_BASE_INL_H_ #define SRC_STREAM_BASE_INL_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "stream_base.h" #include "node.h" @@ -162,4 +164,6 @@ char* WriteWrap::Extra(size_t offset) { } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_STREAM_BASE_INL_H_ diff --git a/src/stream_base.h b/src/stream_base.h index e722a208a8a..903b94f3462 100644 --- a/src/stream_base.h +++ b/src/stream_base.h @@ -1,6 +1,8 @@ #ifndef SRC_STREAM_BASE_H_ #define SRC_STREAM_BASE_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "env.h" #include "async-wrap.h" #include "req-wrap.h" @@ -270,4 +272,6 @@ class StreamBase : public StreamResource { } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_STREAM_BASE_H_ diff --git a/src/stream_wrap.h b/src/stream_wrap.h index b0d9986db50..e930670202d 100644 --- a/src/stream_wrap.h +++ b/src/stream_wrap.h @@ -1,6 +1,8 @@ #ifndef SRC_STREAM_WRAP_H_ #define SRC_STREAM_WRAP_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "stream_base.h" #include "env.h" @@ -103,5 +105,6 @@ class StreamWrap : public HandleWrap, public StreamBase { } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS #endif // SRC_STREAM_WRAP_H_ diff --git a/src/string_bytes.h b/src/string_bytes.h index 4b83b7c0f4a..75d70defe38 100644 --- a/src/string_bytes.h +++ b/src/string_bytes.h @@ -1,6 +1,8 @@ #ifndef SRC_STRING_BYTES_H_ #define SRC_STRING_BYTES_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + // Decodes a v8::Local<v8::String> or Buffer to a raw char* #include "v8.h" @@ -108,4 +110,6 @@ class StringBytes { } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_STRING_BYTES_H_ diff --git a/src/string_search.h b/src/string_search.h index 0426fd840c0..b60457da2a2 100644 --- a/src/string_search.h +++ b/src/string_search.h @@ -5,6 +5,8 @@ #ifndef SRC_STRING_SEARCH_H_ #define SRC_STRING_SEARCH_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "node.h" #include <string.h> @@ -674,4 +676,6 @@ size_t SearchString(const Char* haystack, } } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_STRING_SEARCH_H_ diff --git a/src/tcp_wrap.h b/src/tcp_wrap.h index 4810f1dc1b5..af2d08d1ae8 100644 --- a/src/tcp_wrap.h +++ b/src/tcp_wrap.h @@ -1,6 +1,8 @@ #ifndef SRC_TCP_WRAP_H_ #define SRC_TCP_WRAP_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "async-wrap.h" #include "env.h" #include "stream_wrap.h" @@ -52,5 +54,6 @@ class TCPWrap : public StreamWrap { } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS #endif // SRC_TCP_WRAP_H_ diff --git a/src/tls_wrap.h b/src/tls_wrap.h index 471a92056dd..3e470f9c6d7 100644 --- a/src/tls_wrap.h +++ b/src/tls_wrap.h @@ -1,6 +1,8 @@ #ifndef SRC_TLS_WRAP_H_ #define SRC_TLS_WRAP_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "node.h" #include "node_crypto.h" // SSLWrap @@ -165,4 +167,6 @@ class TLSWrap : public AsyncWrap, } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_TLS_WRAP_H_ diff --git a/src/tty_wrap.h b/src/tty_wrap.h index 581972a3b91..5e0517598b0 100644 --- a/src/tty_wrap.h +++ b/src/tty_wrap.h @@ -1,6 +1,8 @@ #ifndef SRC_TTY_WRAP_H_ #define SRC_TTY_WRAP_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "env.h" #include "handle_wrap.h" #include "stream_wrap.h" @@ -34,4 +36,6 @@ class TTYWrap : public StreamWrap { } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_TTY_WRAP_H_ diff --git a/src/udp_wrap.h b/src/udp_wrap.h index 2a92cb340dd..0d33e617c0e 100644 --- a/src/udp_wrap.h +++ b/src/udp_wrap.h @@ -1,6 +1,8 @@ #ifndef SRC_UDP_WRAP_H_ #define SRC_UDP_WRAP_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "async-wrap.h" #include "env.h" #include "handle_wrap.h" @@ -70,4 +72,6 @@ class UDPWrap: public HandleWrap { } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_UDP_WRAP_H_ diff --git a/src/util-inl.h b/src/util-inl.h index 355dfcdbee3..67fe0bd26c3 100644 --- a/src/util-inl.h +++ b/src/util-inl.h @@ -1,6 +1,8 @@ #ifndef SRC_UTIL_INL_H_ #define SRC_UTIL_INL_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "util.h" namespace node { @@ -219,4 +221,6 @@ bool StringEqualNoCase(const char* a, const char* b) { } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_UTIL_INL_H_ diff --git a/src/util.h b/src/util.h index 406f6a1f36b..077b7beb4d4 100644 --- a/src/util.h +++ b/src/util.h @@ -1,6 +1,8 @@ #ifndef SRC_UTIL_H_ #define SRC_UTIL_H_ +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #include "v8.h" #include <assert.h> @@ -304,4 +306,6 @@ class BufferValue : public MaybeStackBuffer<char> { } // namespace node +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + #endif // SRC_UTIL_H_ |