diff --git a/config.h.W32.template b/config.h.W32.template
index 853881b4..2b50e4c4 100644
--- a/config.h.W32.template
+++ b/config.h.W32.template
@@ -426,8 +426,12 @@ this program. If not, see . */
/* Define to `int' if does not define. */
/* GCC 4.x reportedly defines pid_t. */
#ifndef _PID_T_
+#ifdef _WIN64
+#define pid_t __int64
+#else
#define pid_t int
#endif
+#endif
/* Define to `int' if doesn't define. */
#define uid_t int