summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy J Fontaine <tjfontaine@gmail.com>2013-06-19 17:10:02 -0700
committerTimothy J Fontaine <tjfontaine@gmail.com>2013-06-19 17:16:35 -0700
commita2c4ca09ed80e28a9035ec442269a4e5913ac292 (patch)
tree19f73219ba26d7846bf3f79b174111dccb3a8aa9
parent5fc8efb87d7cf0badd7801625ddae054d6aa0b0b (diff)
downloadnode-new-a2c4ca09ed80e28a9035ec442269a4e5913ac292.tar.gz
string_bytes: properly detect 64bit
-rw-r--r--src/string_bytes.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/string_bytes.cc b/src/string_bytes.cc
index 7ba2caf93d..a2ee589bfa 100644
--- a/src/string_bytes.cc
+++ b/src/string_bytes.cc
@@ -387,7 +387,7 @@ static bool contains_non_ascii(const char* src, size_t len) {
}
-#if BITS_PER_LONG == 64
+#if defined(__x86_64__) || defined(_WIN64)
const uintptr_t mask = 0x8080808080808080ll;
#else
const uintptr_t mask = 0x80808080l;
@@ -440,7 +440,7 @@ static void force_ascii(const char* src, char* dst, size_t len) {
}
}
-#if BITS_PER_LONG == 64
+#if defined(__x86_64__) || defined(_WIN64)
const uintptr_t mask = ~0x8080808080808080ll;
#else
const uintptr_t mask = ~0x80808080l;