Revert "THRIFT-2045: C++ compiler warning and build cleanup"
This reverts commit 282e440c6de219b7b8f32b01cc7eb599f534f33f.
This change had unintended autoconf side effects.
diff --git a/compiler/cpp/src/windows/config.h b/compiler/cpp/src/windows/config.h
index 356f4e5..9d75e80 100644
--- a/compiler/cpp/src/windows/config.h
+++ b/compiler/cpp/src/windows/config.h
@@ -37,10 +37,6 @@
#define PRIu64 "I64d"
#define PRIi64 "I64d"
-// squelch deprecation warnings
#pragma warning(disable:4996)
-// squelch bool conversion performance warning
-#pragma warning(disable:4800)
-
#endif // _THRIFT_WINDOWS_CONFIG_H_
diff --git a/compiler/cpp/src/windows/version.h.in b/compiler/cpp/src/windows/version.h.in
index 33708ba..94b7c56 100644
--- a/compiler/cpp/src/windows/version.h.in
+++ b/compiler/cpp/src/windows/version.h.in
@@ -28,6 +28,15 @@
#error "This is a Windows header only"
#endif
+#define PATH_MAX MAX_PATH
#define THRIFT_VERSION "@PACKAGE_VERSION@"
+#ifndef S_ISDIR
+#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
+#endif
+
+#ifndef S_ISREG
+#define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
+#endif
+
#endif // _THRIFT_WINDOWS_VERSION_H_