Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'extern/libmv/third_party/glog/src/windows/port.h')
-rw-r--r--extern/libmv/third_party/glog/src/windows/port.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/extern/libmv/third_party/glog/src/windows/port.h b/extern/libmv/third_party/glog/src/windows/port.h
index e3e76ec29e0..4879cbf5f92 100644
--- a/extern/libmv/third_party/glog/src/windows/port.h
+++ b/extern/libmv/third_party/glog/src/windows/port.h
@@ -45,7 +45,10 @@
#ifdef _WIN32
+#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN /* We always want minimal includes */
+#endif
+
#include <windows.h>
#include <winsock.h> /* for gethostname */
#include <io.h> /* because we so often use open/close/etc */
@@ -59,6 +62,8 @@
* used by both C and C++ code, so we put all the C++ together.
*/
+#ifdef _MSC_VER
+
/* 4244: otherwise we get problems when substracting two size_t's to an int
* 4251: it's complaining about a private struct I've chosen not to dllexport
* 4355: we use this in a constructor, but we do it safely
@@ -111,9 +116,7 @@ extern int snprintf(char *str, size_t size,
extern int safe_vsnprintf(char *str, size_t size,
const char *format, va_list ap);
#define vsnprintf(str, size, format, ap) safe_vsnprintf(str, size, format, ap)
-#if !defined(__MINGW32__)
#define va_copy(dst, src) (dst) = (src)
-#endif
/* Windows doesn't support specifying the number of buckets as a
* hash_map constructor arg, so we leave this blank.
@@ -123,11 +126,14 @@ extern int safe_vsnprintf(char *str, size_t size,
#define DEFAULT_TEMPLATE_ROOTDIR ".."
// ----------------------------------- SYSTEM/PROCESS
-#ifndef __MINGW64__
typedef int pid_t;
-#endif
#define getpid _getpid
+#include <BaseTsd.h>
+typedef SSIZE_T ssize_t;
+
+#endif // _MSC_VER
+
// ----------------------------------- THREADS
typedef DWORD pthread_t;
typedef DWORD pthread_key_t;