summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2014-11-11 12:06:55 +0100
committerChris Dickinson <christopher.s.dickinson@gmail.com>2014-12-17 14:13:20 -0800
commit93533e98f76c2c9e577af3352b4eb709791f4d1e (patch)
treebb605c2d824eb5e630338148f97fcc29fe13c74d /src
parente93ff4f0ce1b6e9077dfa64598006478276325b2 (diff)
downloadnode-new-93533e98f76c2c9e577af3352b4eb709791f4d1e.tar.gz
src: fix windows build error
Fix a Windows-only build error that was introduced in commit 1183ba4 ("zlib: support concatenated gzip files"). Rename the NO_ERROR and FAILED enumerations, they conflict with macros of the same name in <winerror.h>. PR-URL: https://github.com/joyent/node/pull/8893 Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-by: Timothy J Fontaine <tjfontaine@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/node_zlib.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/node_zlib.cc b/src/node_zlib.cc
index 95907dd03f..b930d1d8c3 100644
--- a/src/node_zlib.cc
+++ b/src/node_zlib.cc
@@ -64,9 +64,9 @@ enum node_zlib_mode {
};
enum node_zlib_error {
- NO_ERROR,
- FAILED,
- WRITE_PENDING
+ kNoError,
+ kFailed,
+ kWritePending
};
void InitZlib(v8::Handle<v8::Object> target);
@@ -212,7 +212,7 @@ class ZCtx : public AsyncWrap {
if (!async) {
// sync version
Process(work_req);
- if (CheckError(ctx) == NO_ERROR)
+ if (CheckError(ctx) == kNoError)
AfterSync(ctx, args);
return;
}
@@ -310,18 +310,18 @@ class ZCtx : public AsyncWrap {
ZCtx::Error(ctx, "Missing dictionary");
else
ZCtx::Error(ctx, "Bad dictionary");
- return FAILED;
+ return kFailed;
default:
// something else.
if (ctx->strm_.total_out == 0) {
ZCtx::Error(ctx, "Zlib error");
- return FAILED;
+ return kFailed;
} else {
- return WRITE_PENDING;
+ return kWritePending;
}
}
- return NO_ERROR;
+ return kNoError;
}
@@ -336,7 +336,7 @@ class ZCtx : public AsyncWrap {
Context::Scope context_scope(env->context());
node_zlib_error error = CheckError(ctx);
- if (error == FAILED)
+ if (error == kFailed)
return;
Local<Integer> avail_out = Integer::New(env->isolate(),
@@ -350,7 +350,7 @@ class ZCtx : public AsyncWrap {
Local<Value> args[2] = { avail_in, avail_out };
ctx->MakeCallback(env->callback_string(), ARRAY_SIZE(args), args);
- if (error == WRITE_PENDING) {
+ if (error == kWritePending) {
ZCtx::Error(ctx, "Zlib error");
return;
}