Skip to content

Instantly share code, notes, and snippets.

@tjfontaine
Created January 29, 2014 17:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tjfontaine/8692923 to your computer and use it in GitHub Desktop.
Save tjfontaine/8692923 to your computer and use it in GitHub Desktop.
diff --git a/src/node.h b/src/node.h
index 7a08dc9..5dbf28f 100644
--- a/src/node.h
+++ b/src/node.h
@@ -122,6 +122,17 @@ NODE_EXTERN v8::Handle<v8::Value> MakeCallback(
# endif
#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 {
@@ -184,17 +195,6 @@ void DisplayExceptionLine(v8::Handle<v8::Message> message);
NODE_EXTERN v8::Local<v8::Value> Encode(const void *buf, size_t len,
enum encoding encoding = BINARY);
-#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
-
// Returns -1 if the handle was not valid for decoding
NODE_EXTERN ssize_t DecodeBytes(v8::Handle<v8::Value>,
enum encoding encoding = BINARY);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment