win: use _fdopen instead of fdopen
authorFumitoshi Ukai <ukai@google.com>
Thu, 17 Dec 2015 06:40:25 +0000 (15:40 +0900)
committerFumitoshi Ukai <ukai@google.com>
Thu, 17 Dec 2015 06:40:25 +0000 (15:40 +0900)
The POSIX function fdopen is deprecated.
Use the ISO C++ conformant _fdopen instead.
https://msdn.microsoft.com/library/ms235351.aspx

fixes #73

src/logging.cc

index 982a3089ef4935c42ff6dee38b19081bd902e323..ec9eef1b83dacc36cfde82d40498de0bd42b722a 100644 (file)
@@ -88,6 +88,10 @@ using std::perror;
 using std::fdopen;
 #endif
 
+#ifdef _WIN32
+#define fdopen _fdopen
+#endif
+
 // There is no thread annotation support.
 #define EXCLUSIVE_LOCKS_REQUIRED(mu)