summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2012-05-09 06:06:42 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2012-05-09 06:06:42 +0200
commit7d2e68fdbde04b683242d82c26b8cf1d47407729 (patch)
tree9a3c1b38d5a886c983fd5c944e35af151c97b122
parentb673d0670f942d8401fc7f91347b8fdacac05759 (diff)
downloadnode-7d2e68fdbde04b683242d82c26b8cf1d47407729.tar.gz
stream_wrap: fix compilation errors
-rw-r--r--src/stream_wrap.cc7
-rw-r--r--src/stream_wrap.h8
2 files changed, 9 insertions, 6 deletions
diff --git a/src/stream_wrap.cc b/src/stream_wrap.cc
index 4eea7c923..71fd5e62f 100644
--- a/src/stream_wrap.cc
+++ b/src/stream_wrap.cc
@@ -29,6 +29,7 @@
#include "req_wrap.h"
#include <stdlib.h> // abort()
+#include <limits.h> // INT_MAX
#define SLAB_SIZE (1024 * 1024)
@@ -293,12 +294,6 @@ Handle<Value> StreamWrap::WriteBuffer(const Arguments& args) {
}
-enum WriteEncoding {
- kAscii,
- kUtf8,
- kUcs2
-};
-
template <WriteEncoding encoding>
Handle<Value> StreamWrap::WriteStringImpl(const Arguments& args) {
HandleScope scope;
diff --git a/src/stream_wrap.h b/src/stream_wrap.h
index 40947d508..43702f3c9 100644
--- a/src/stream_wrap.h
+++ b/src/stream_wrap.h
@@ -28,6 +28,14 @@
namespace node {
+
+enum WriteEncoding {
+ kAscii,
+ kUtf8,
+ kUcs2
+};
+
+
class StreamWrap : public HandleWrap {
public:
uv_stream_t* GetStream() { return stream_; }