summaryrefslogtreecommitdiff
path: root/cmake/config.h.in
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2021-07-07 09:23:51 +0200
committerJoel Rosdahl <joel@rosdahl.net>2021-07-07 09:49:56 +0200
commit4dfd7a958a8b203d66f83c3a59cd244ad310994d (patch)
tree54ac27c385c10602943c879600dc08d82fed569a /cmake/config.h.in
parentca9ec9cfa8af99eb1e5c39c9dffdc1c611ed235c (diff)
downloadccache-4dfd7a958a8b203d66f83c3a59cd244ad310994d.tar.gz
Improve ssize_t typedefs for Windows platforms
Diffstat (limited to 'cmake/config.h.in')
-rw-r--r--cmake/config.h.in19
1 files changed, 9 insertions, 10 deletions
diff --git a/cmake/config.h.in b/cmake/config.h.in
index 957118f3..65c8e7b8 100644
--- a/cmake/config.h.in
+++ b/cmake/config.h.in
@@ -181,22 +181,21 @@
# undef HAVE_STRUCT_STAT_ST_MTIM
#endif
+// Typedefs that make it possible to use common types in ccache header files
+// without including core/wincompat.hpp.
#ifdef _WIN32
-# define NOMINMAX 1
-# define STDIN_FILENO 0
-# define STDOUT_FILENO 1
-# define STDERR_FILENO 2
-
# ifdef _MSC_VER
-# define PATH_MAX MAX_PATH
typedef unsigned __int32 mode_t;
typedef int pid_t;
-
-# ifndef __MINGW32__
+# ifdef _WIN64
typedef __int64 ssize_t;
+# else
+typedef int ssize_t;
# endif
-# endif
-#endif // _WIN32
+# elif !defined(__MINGW32__)
+typedef __int64 ssize_t;
+# endif // _MSC_VER
+#endif // _WIN32
// GCC version of a couple of standard C++ attributes.
#ifdef __GNUC__