summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoralkondratenko@gmail.com <alkondratenko@gmail.com@6b5cf1ce-ec42-a296-1ba9-69fdba395a50>2013-03-11 19:14:18 +0000
committeralkondratenko@gmail.com <alkondratenko@gmail.com@6b5cf1ce-ec42-a296-1ba9-69fdba395a50>2013-03-11 19:14:18 +0000
commita2275fc6b48b98d5265388bb8586faa7c8cc581f (patch)
tree3dbc5954a396f2d1ea57f55463f124015b29446e /src
parentf00977533de6fd27a2f796b2e8e9adb7fcd965e8 (diff)
downloadgperftools-a2275fc6b48b98d5265388bb8586faa7c8cc581f.tar.gz
issue-504: don't try to typedef pid_t on mingw
Because recent mingws (more then few years ago seemingly) do that already. git-svn-id: http://gperftools.googlecode.com/svn/trunk@204 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
Diffstat (limited to 'src')
-rw-r--r--src/windows/mingw.h2
-rw-r--r--src/windows/port.h3
2 files changed, 5 insertions, 0 deletions
diff --git a/src/windows/mingw.h b/src/windows/mingw.h
index 2aa5eb3..c1bbcae 100644
--- a/src/windows/mingw.h
+++ b/src/windows/mingw.h
@@ -60,6 +60,8 @@
// pretend the pthreads wrapper doesn't exist, even when it does.
#undef HAVE_PTHREAD
+#define HAVE_PID_T
+
#include "windows/port.h"
#endif /* __MINGW32__ */
diff --git a/src/windows/port.h b/src/windows/port.h
index e9a0206..0da2eee 100644
--- a/src/windows/port.h
+++ b/src/windows/port.h
@@ -390,7 +390,10 @@ EXTERN_C PERFTOOLS_DLL_DECL void WriteToStderr(const char* buf, int len);
/* ----------------------------------- SYSTEM/PROCESS */
+#ifndef HAVE_PID_T
typedef int pid_t;
+#endif
+
#if __STDC__ && !defined(__MINGW32__)
inline pid_t getpid(void) { return _getpid(); }
#endif