summaryrefslogtreecommitdiff
path: root/util/env_windows.cc
diff options
context:
space:
mode:
authorFelipe Oliveira Carvalho <felipekde@gmail.com>2019-03-21 16:45:04 +0100
committerChris Mumford <cmumford@cmumford.com>2019-03-21 08:45:04 -0700
commit7035af5fc36657447054617759854a726d31dbe0 (patch)
treef2f1a4919ecf74b6c6cf92d61a93513564bbac39 /util/env_windows.cc
parent6571279d6de21fe33caa31b2ea4170d34b15b10e (diff)
downloadleveldb-7035af5fc36657447054617759854a726d31dbe0.tar.gz
Two small fixes for the Windows implementation (#661)
* Check if NOMIMMAX is defined before defining it * Pass char* for a %s format in a snprintf call
Diffstat (limited to 'util/env_windows.cc')
-rw-r--r--util/env_windows.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/util/env_windows.cc b/util/env_windows.cc
index 93555a8..14e41e9 100644
--- a/util/env_windows.cc
+++ b/util/env_windows.cc
@@ -4,7 +4,9 @@
// Prevent Windows headers from defining min/max macros and instead
// use STL.
+#ifndef NOMINMAX
#define NOMINMAX
+#endif // ifndef NOMINMAX
#include <windows.h>
#include <algorithm>