--- a/_ptw32.h
+++ b/_ptw32.h
@@ -166,8 +166,9 @@
 #  define int64_t LONGLONG
 #  define uint64_t ULONGLONG
 #elif !defined(__MINGW32__)
-#  define int64_t _int64
-#  define uint64_t unsigned _int64
+#include <stdint.h>
+//#  define int64_t _int64
+//#  define uint64_t unsigned _int64
 #  if defined(PTW32_CONFIG_MSVC6)
      typedef long intptr_t;
 #  endif
--- a/config.h
+++ b/config.h
@@ -10,9 +10,6 @@
 /* We're building the pthreads-win32 library */
 #define PTW32_BUILD
 
-/* CPU affinity */
-#define HAVE_CPU_AFFINITY
-
 /* Do we know about the C type sigset_t? */
 #undef HAVE_SIGSET_T
 
@@ -49,7 +46,7 @@
 /* Do we know about type mode_t? */
 #undef HAVE_MODE_T
 
-/*
+/* 
  * Define if GCC has atomic builtins, i.e. __sync_* intrinsics
  * __sync_lock_* is implemented in mingw32 gcc 4.5.2 at least
  * so this define does not turn those on or off. If you get an
@@ -112,27 +109,32 @@
  * to the pthreads-win32 maintainer. Thanks.
  *********************************************************************/
 #if defined(WINCE)
-#  undef  HAVE_CPU_AFFINITY
-#  define NEED_DUPLICATEHANDLE
-#  define NEED_CREATETHREAD
-#  define NEED_ERRNO
-#  define NEED_CALLOC
-#  define NEED_FTIME
-/* #  define NEED_SEM */
-#  define NEED_UNICODE_CONSTS
-#  define NEED_PROCESS_AFFINITY_MASK
+#define NEED_DUPLICATEHANDLE
+#define NEED_CREATETHREAD
+#define NEED_ERRNO
+#define NEED_CALLOC
+#define NEED_FTIME
+/* #define NEED_SEM */
+#define NEED_UNICODE_CONSTS
+#define NEED_PROCESS_AFFINITY_MASK
 /* This may not be needed */
-#  define RETAIN_WSALASTERROR
+#define RETAIN_WSALASTERROR
 #endif
 
 #if defined(_UWIN)
-#  define HAVE_MODE_T
-#  define HAVE_STRUCT_TIMESPEC
-#  define HAVE_SIGNAL_H
+#define HAVE_MODE_T
+#define HAVE_STRUCT_TIMESPEC
 #endif
 
 #if defined(__GNUC__)
-#  define HAVE_C_INLINE
+#define HAVE_C_INLINE
+#endif
+
+#if defined(__MINGW64__)
+#define HAVE_MODE_T
+#define HAVE_STRUCT_TIMESPEC
+#elif defined(__MINGW32__)
+#define HAVE_MODE_T
 #endif
 
 #if defined(__BORLANDC__)
@@ -146,8 +148,6 @@
 #define HAVE_C_INLINE
 #endif
 
-#if defined(_MSC_VER) && _MSC_VER >= 1900
-#define HAVE_STRUCT_TIMESPEC
-#endif
 
-#endif /* PTW32_CONFIG_H */
+
+#endif
-- 
2.10.2.windows.1

