fix missing definition of SSIZE_MAX in windows

Mon, 23 Dec 2024 18:32:25 +0100

author
Mike Becker <universe@uap-core.de>
date
Mon, 23 Dec 2024 18:32:25 +0100
changeset 1053
2e86cf779135
parent 1052
e997862a57d8
child 1054
fb1076ead56f

fix missing definition of SSIZE_MAX in windows

src/cx/common.h file | annotate | diff | comparison | revisions
--- a/src/cx/common.h	Mon Dec 23 00:34:05 2024 +0100
+++ b/src/cx/common.h	Mon Dec 23 18:32:25 2024 +0100
@@ -365,6 +365,13 @@
 // fix missing ssize_t definition
 #include <BaseTsd.h>
 typedef SSIZE_T ssize_t;
+#ifndef SSIZE_MAX
+#ifdef _WIN64
+#define SSIZE_MAX 0x7fffffffffffffffi64
+#else
+#define SSIZE_MAX 0x7fffffffi32
+#endif
+#endif
 
 // fix missing _Thread_local support
 #define _Thread_local __declspec(thread)

mercurial