diff options
author | Ray Donnelly <mingw.android@gmail.com> | 2014-08-30 23:51:20 +0100 |
---|---|---|
committer | Fedor Indutny <fedor@indutny.com> | 2014-10-10 01:20:04 +0400 |
commit | 6f94b3db91710cc00df6ae8ecf14bc9c072f926f (patch) | |
tree | 6128ed22729daf6d18a6d602bbbe2419c878fc83 /src | |
parent | 011319e248fedd9a8cdf3af3e954054f4ce4153a (diff) | |
download | node-new-6f94b3db91710cc00df6ae8ecf14bc9c072f926f.tar.gz |
src: fixes for win32
Update following macros:
* NODE_NET_SOCKET_{READ,WRITE}() - they both take 4 arguments,
not 2
* NODE_COUNT_GC_PERCENTTIME() - it takes a single argument.
Use INT_PTR instead of INT32 in pointer casts in win32_etw provider.
PR-URL: https://github.com/joyent/node/pull/8294
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/node_counters.h | 2 | ||||
-rw-r--r-- | src/node_win32_etw_provider-inl.h | 10 | ||||
-rw-r--r-- | src/node_win32_etw_provider.h | 4 |
3 files changed, 11 insertions, 5 deletions
diff --git a/src/node_counters.h b/src/node_counters.h index 8340ffcbd2..9a15bd889a 100644 --- a/src/node_counters.h +++ b/src/node_counters.h @@ -37,7 +37,7 @@ #define NODE_COUNT_NET_BYTES_SENT(bytes) #define NODE_COUNT_NET_BYTES_RECV(bytes) #define NODE_COUNT_GET_GC_RAWTIME() -#define NODE_COUNT_GC_PERCENTTIME() +#define NODE_COUNT_GC_PERCENTTIME(percent) #define NODE_COUNT_PIPE_BYTES_SENT(bytes) #define NODE_COUNT_PIPE_BYTES_RECV(bytes) #endif diff --git a/src/node_win32_etw_provider-inl.h b/src/node_win32_etw_provider-inl.h index dc860e3e68..02743bc846 100644 --- a/src/node_win32_etw_provider-inl.h +++ b/src/node_win32_etw_provider-inl.h @@ -25,6 +25,12 @@ #include "node_win32_etw_provider.h" #include "node_etw_provider.h" +#if defined(_WIN64) +# define ETW_WRITE_INTPTR_DATA ETW_WRITE_INT64_DATA +#else +# define ETW_WRITE_INTPTR_DATA ETW_WRITE_INT32_DATA +#endif + namespace node { // From node_win32_etw_provider.cc @@ -92,7 +98,7 @@ extern int events_enabled; ETW_WRITE_ADDRESS_DATA(descriptors, &context); \ ETW_WRITE_ADDRESS_DATA(descriptors + 1, &startAddr); \ ETW_WRITE_INT64_DATA(descriptors + 2, &size); \ - ETW_WRITE_INT32_DATA(descriptors + 3, &id); \ + ETW_WRITE_INTPTR_DATA(descriptors + 3, &id); \ ETW_WRITE_INT16_DATA(descriptors + 4, &flags); \ ETW_WRITE_INT16_DATA(descriptors + 5, &rangeId); \ ETW_WRITE_INT64_DATA(descriptors + 6, &sourceId); \ @@ -241,7 +247,7 @@ void NODE_V8SYMBOL_ADD(LPCSTR symbol, } void* context = NULL; INT64 size = (INT64)len; - INT32 id = (INT32)addr1; + INT_PTR id = (INT_PTR)addr1; INT16 flags = 0; INT16 rangeid = 1; INT32 col = 1; diff --git a/src/node_win32_etw_provider.h b/src/node_win32_etw_provider.h index 8d7cedd73b..69f20a2b18 100644 --- a/src/node_win32_etw_provider.h +++ b/src/node_win32_etw_provider.h @@ -92,8 +92,8 @@ INLINE bool NODE_NET_SOCKET_READ_ENABLED(); INLINE bool NODE_NET_SOCKET_WRITE_ENABLED(); INLINE bool NODE_V8SYMBOL_ENABLED(); -#define NODE_NET_SOCKET_READ(arg0, arg1) -#define NODE_NET_SOCKET_WRITE(arg0, arg1) +#define NODE_NET_SOCKET_READ(arg0, arg1, arg2, arg3) +#define NODE_NET_SOCKET_WRITE(arg0, arg1, arg2, arg3) } // namespace node #endif // SRC_NODE_WIN32_ETW_PROVIDER_H_ |