Skip to content

Commit

Permalink
src: fix dependencies in node.h
Browse files Browse the repository at this point in the history
* remove node_internals.h dependency from node.h; adjust other source
* remove some other, extra includes from node.h
* remove break in namespace node block from node.h
  • Loading branch information
Christopher J. Brody committed Nov 23, 2016
1 parent aa1333f commit f2e3d9d
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 34 deletions.
2 changes: 1 addition & 1 deletion src/backtrace_posix.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "node.h"
#include "node_internals.h"

#if defined(__linux__)
#include <features.h>
Expand Down
2 changes: 2 additions & 0 deletions src/env.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "env.h"
#include "env-inl.h"
#include "async-wrap.h"
#include "node_internals.h"

#include "v8.h"
#include "v8-profiler.h"

Expand Down
23 changes: 0 additions & 23 deletions src/node.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,34 +150,11 @@ NODE_EXTERN v8::Local<v8::Value> MakeCallback(
int argc,
v8::Local<v8::Value>* argv);

} // namespace node

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
#include "node_internals.h"
#endif

#include <assert.h>
#include <stdint.h>

#ifndef NODE_STRINGIFY
#define NODE_STRINGIFY(n) NODE_STRINGIFY_HELPER(n)
#define NODE_STRINGIFY_HELPER(n) #n
#endif

#ifdef _WIN32
// TODO(tjfontaine) consider changing the usage of ssize_t to ptrdiff_t
#if !defined(_SSIZE_T_) && !defined(_SSIZE_T_DEFINED)
typedef intptr_t ssize_t;
# define _SSIZE_T_
# define _SSIZE_T_DEFINED
#endif
#else // !_WIN32
# include <sys/types.h> // size_t, ssize_t
#endif // _WIN32


namespace node {

NODE_EXTERN extern bool no_deprecation;
#if HAVE_OPENSSL && NODE_FIPS_MODE
NODE_EXTERN extern bool enable_fips_crypto;
Expand Down
4 changes: 3 additions & 1 deletion src/node_buffer.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include "node.h"
#include "node_buffer.h"

#include "env.h"
Expand All @@ -7,6 +6,9 @@
#include "string_search.h"
#include "util.h"
#include "util-inl.h"

#include "node_internals.h"

#include "v8-profiler.h"
#include "v8.h"

Expand Down
2 changes: 1 addition & 1 deletion src/node_config.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "node.h"
#include "node_i18n.h"
#include "node_internals.h"
#include "env.h"
#include "env-inl.h"
#include "util.h"
Expand Down
1 change: 1 addition & 0 deletions src/node_constants.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "node_constants.h"
#include "env.h"
#include "env-inl.h"
#include "node_internals.h"

#include "uv.h"
#include "zlib.h"
Expand Down
2 changes: 2 additions & 0 deletions src/node_dtrace.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

#include "util.h"

#include "node_internals.h"

#include <string.h>

namespace node {
Expand Down
2 changes: 2 additions & 0 deletions src/node_i18n.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#include "env-inl.h"
#include "util.h"
#include "util-inl.h"
#include "node_internals.h"

#include "v8.h"

#include <unicode/utypes.h>
Expand Down
2 changes: 1 addition & 1 deletion src/node_i18n.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "node.h"
#include "util.h"

#if defined(NODE_HAVE_I18N_SUPPORT)

Expand Down
5 changes: 3 additions & 2 deletions src/node_os.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#include "node.h"
#include "v8.h"
#include "env.h"
#include "env-inl.h"
#include "string_bytes.h"
#include "node_internals.h"

#include "v8.h"

#include <errno.h>
#include <string.h>
Expand Down
5 changes: 3 additions & 2 deletions src/node_util.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#include "node.h"
#include "node_watchdog.h"
#include "v8.h"
#include "env.h"
#include "env-inl.h"
#include "node_internals.h"

#include "v8.h"

namespace node {
namespace util {
Expand Down
1 change: 1 addition & 0 deletions src/spawn_sync.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "env-inl.h"
#include "string_bytes.h"
#include "util.h"
#include "node_internals.h"

#include <string.h>
#include <stdlib.h>
Expand Down
3 changes: 2 additions & 1 deletion src/spawn_sync.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "node.h"
#include "node_buffer.h"

#include "uv.h"

namespace node {

using v8::Array;
Expand Down
2 changes: 2 additions & 0 deletions src/string_bytes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include "base64.h"
#include "node.h"
#include "node_buffer.h"
#include "node_internals.h"

#include "v8.h"

#include <limits.h>
Expand Down
3 changes: 1 addition & 2 deletions src/string_search.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "node.h"
#include <string.h>
#include "util.h"

namespace node {
namespace stringsearch {
Expand Down

0 comments on commit f2e3d9d

Please sign in to comment.