summaryrefslogtreecommitdiff
path: root/port
diff options
context:
space:
mode:
Diffstat (limited to 'port')
-rw-r--r--port/port_posix.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/port/port_posix.h b/port/port_posix.h
index 1f4f6fc..2bc5223 100644
--- a/port/port_posix.h
+++ b/port/port_posix.h
@@ -39,9 +39,9 @@
#endif
#include <pthread.h>
-#ifdef SNAPPY
+#ifdef HAVE_SNAPPY
#include <snappy.h>
-#endif
+#endif // defined(HAVE_SNAPPY)
#include <stdint.h>
#include <string>
#include "port/atomic_pointer.h"
@@ -106,33 +106,33 @@ extern void InitOnce(OnceType* once, void (*initializer)());
inline bool Snappy_Compress(const char* input, size_t length,
::std::string* output) {
-#ifdef SNAPPY
+#ifdef HAVE_SNAPPY
output->resize(snappy::MaxCompressedLength(length));
size_t outlen;
snappy::RawCompress(input, length, &(*output)[0], &outlen);
output->resize(outlen);
return true;
-#endif
+#endif // defined(HAVE_SNAPPY)
return false;
}
inline bool Snappy_GetUncompressedLength(const char* input, size_t length,
size_t* result) {
-#ifdef SNAPPY
+#ifdef HAVE_SNAPPY
return snappy::GetUncompressedLength(input, length, result);
#else
return false;
-#endif
+#endif // defined(HAVE_SNAPPY)
}
inline bool Snappy_Uncompress(const char* input, size_t length,
char* output) {
-#ifdef SNAPPY
+#ifdef HAVE_SNAPPY
return snappy::RawUncompress(input, length, output);
#else
return false;
-#endif
+#endif // defined(HAVE_SNAPPY)
}
inline bool GetHeapProfile(void (*func)(void*, const char*, int), void* arg) {