From 7035af5fc36657447054617759854a726d31dbe0 Mon Sep 17 00:00:00 2001
From: Felipe Oliveira Carvalho <felipekde@gmail.com>
Date: Thu, 21 Mar 2019 16:45:04 +0100
Subject: [PATCH] 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
---
 util/env_windows.cc | 2 ++
 1 file changed, 2 insertions(+)

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>