macro fix.

This commit is contained in:
James Chen
2017-10-10 14:26:52 +08:00
parent 039f531bbf
commit 342fcdd694
8 changed files with 25 additions and 23 deletions
@@ -2,7 +2,7 @@
#define SRC_INSPECTOR_SOCKET_SERVER_H_
#include "../config.hpp"
#if defined(SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
#if (SCRIPT_ENGINE_TYPE == SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
#include "inspector_agent.h"
#include "inspector_socket.h"
@@ -99,6 +99,6 @@ class InspectorSocketServer {
} // namespace inspector
} // namespace node
#endif // #if defined(SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
#endif // #if (SCRIPT_ENGINE_TYPE == SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
#endif // SRC_INSPECTOR_SOCKET_SERVER_H_
@@ -1,6 +1,6 @@
#include "node.h"
#if defined(SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
#if (SCRIPT_ENGINE_TYPE == SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
#include "util.h"
#include "env.h"
@@ -809,6 +809,8 @@ void SetupProcessObject(Environment* env,
READONLY_PROPERTY(versions,
"uv",
OneByteString(env->isolate(), uv_version_string()));
LOGD("libuv version: %s\n", uv_version_string());
// READONLY_PROPERTY(versions,
// "zlib",
// FIXED_ONE_BYTE_STRING(env->isolate(), ZLIB_VERSION));
@@ -1133,4 +1135,4 @@ void SetupProcessObject(Environment* env,
} // namespace node {
#endif // #if defined(SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
#endif // #if (SCRIPT_ENGINE_TYPE == SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
@@ -1,7 +1,7 @@
#pragma once
#include "../config.hpp"
#if defined(SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
#if (SCRIPT_ENGINE_TYPE == SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
#include "v8.h"
@@ -162,4 +162,4 @@ void SetupProcessObject(Environment* env,
} // namespace node {
#endif // #if defined(SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
#endif // #if (SCRIPT_ENGINE_TYPE == SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
@@ -1,6 +1,6 @@
#include "node_debug_options.h"
#if defined(SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
#if (SCRIPT_ENGINE_TYPE == SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
#include <errno.h>
#include <stdlib.h>
@@ -138,4 +138,4 @@ int DebugOptions::port() const {
} // namespace node
#endif // #if defined(SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
#endif // #if (SCRIPT_ENGINE_TYPE == SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
@@ -2,7 +2,7 @@
#define SRC_NODE_DEBUG_OPTIONS_H_
#include "../config.hpp"
#if defined(SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
#if (SCRIPT_ENGINE_TYPE == SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
#include <string>
@@ -40,6 +40,6 @@ class DebugOptions {
} // namespace node
#endif // #if defined(SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
#endif // #if (SCRIPT_ENGINE_TYPE == SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
#endif // SRC_NODE_DEBUG_OPTIONS_H_
@@ -2,7 +2,7 @@
#define SRC_NODE_MUTEX_H_
#include "../config.hpp"
#if defined(SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
#if (SCRIPT_ENGINE_TYPE == SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
#include "util.h"
#include "uv.h"
@@ -37,7 +37,7 @@ class MutexBase {
template <typename> friend class ConditionVariableBase;
friend class ScopedUnlock;
const MutexBase& mutex_;
DISALLOW_COPY_AND_ASSIGN(ScopedLock);
NODE_DISALLOW_COPY_AND_ASSIGN(ScopedLock);
};
class ScopedUnlock {
@@ -48,13 +48,13 @@ class MutexBase {
private:
friend class ScopedLock;
const MutexBase& mutex_;
DISALLOW_COPY_AND_ASSIGN(ScopedUnlock);
NODE_DISALLOW_COPY_AND_ASSIGN(ScopedUnlock);
};
private:
template <typename> friend class ConditionVariableBase;
mutable typename Traits::MutexT mutex_;
DISALLOW_COPY_AND_ASSIGN(MutexBase);
NODE_DISALLOW_COPY_AND_ASSIGN(MutexBase);
};
template <typename Traits>
@@ -70,7 +70,7 @@ class ConditionVariableBase {
private:
typename Traits::CondT cond_;
DISALLOW_COPY_AND_ASSIGN(ConditionVariableBase);
NODE_DISALLOW_COPY_AND_ASSIGN(ConditionVariableBase);
};
struct LibuvMutexTraits {
@@ -187,6 +187,6 @@ MutexBase<Traits>::ScopedUnlock::~ScopedUnlock() {
} // namespace node
#endif // #if defined(SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
#endif // #if (SCRIPT_ENGINE_TYPE == SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
#endif // SRC_NODE_MUTEX_H_
@@ -21,7 +21,7 @@
#include "util.h"
#if defined(SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
#if (SCRIPT_ENGINE_TYPE == SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
//cjh #include "string_bytes.h"
//#include "node_buffer.h"
@@ -114,4 +114,4 @@ void DumpBacktrace(FILE* fp) {
} // namespace node
#endif // #if defined(SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
#endif // #if (SCRIPT_ENGINE_TYPE == SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
@@ -23,7 +23,7 @@
#define SRC_UTIL_H_
#include "../config.hpp"
#if defined(SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
#if (SCRIPT_ENGINE_TYPE == SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
#define NODE_WANT_INTERNALS 1 //cjh added
@@ -92,7 +92,7 @@ template <typename T> using remove_reference = std::remove_reference<T>;
#define FIXED_ONE_BYTE_STRING(isolate, string) \
(node::OneByteString((isolate), (string), sizeof(string) - 1))
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
#define NODE_DISALLOW_COPY_AND_ASSIGN(TypeName) \
void operator=(const TypeName&) = delete; \
void operator=(TypeName&&) = delete; \
TypeName(const TypeName&) = delete; \
@@ -166,7 +166,7 @@ class ListNode {
template <typename U, ListNode<U> (U::*M)> friend class ListHead;
ListNode* prev_;
ListNode* next_;
DISALLOW_COPY_AND_ASSIGN(ListNode);
NODE_DISALLOW_COPY_AND_ASSIGN(ListNode);
};
template <typename T, ListNode<T> (T::*M)>
@@ -196,7 +196,7 @@ class ListHead {
private:
ListNode<T> head_;
DISALLOW_COPY_AND_ASSIGN(ListHead);
NODE_DISALLOW_COPY_AND_ASSIGN(ListHead);
};
// The helper is for doing safe downcasts from base types to derived types.
@@ -441,6 +441,6 @@ class BufferValue : public MaybeStackBuffer<char> {
#define NODE_UTIL_H_INCLUDE
#include "util-inl.h"
#endif // #if defined(SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
#endif // #if (SCRIPT_ENGINE_TYPE == SCRIPT_ENGINE_V8) && SE_ENABLE_INSPECTOR
#endif // SRC_UTIL_H_