diff mupdf-source/thirdparty/extract/src/compat_stdint.h @ 2:b50eed0cc0ef upstream

ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4. The directory name has changed: no version number in the expanded directory now.
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 15 Sep 2025 11:43:07 +0200
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mupdf-source/thirdparty/extract/src/compat_stdint.h	Mon Sep 15 11:43:07 2025 +0200
@@ -0,0 +1,30 @@
+#ifndef ARTIFEX_EXTRACT_COMPAT_STDINT_H
+#define ARTIFEX_EXTRACT_COMPAT_STDINT_H
+
+/* Fake what we need from stdint.h on MSVS. */
+
+#if defined(_MSC_VER) && (_MSC_VER < 1700) /* MSVC older than VS2012 */
+	typedef signed char         int8_t;
+	typedef short int           int16_t;
+	typedef int                 int32_t;
+	typedef __int64             int64_t;
+	typedef unsigned char       uint8_t;
+	typedef unsigned short int  uint16_t;
+	typedef unsigned int        uint32_t;
+	typedef unsigned __int64    uint64_t;
+	#ifndef INT64_MAX
+		#define INT64_MAX 9223372036854775807i64
+	#endif
+	#ifndef SIZE_MAX
+		#define SIZE_MAX ((size_t) -1)
+	#endif
+#else
+	#include <stdint.h>
+#endif
+
+#if defined(_MSC_VER) && (_MSC_VER < 1800) /* MSVC older than VS2013 */
+	#define strtoll( text, end, base) (long long) _strtoi64(text, end, base)
+	#define strtoull( text, end, base) (unsigned long long) _strtoi64(text, end, base)
+#endif
+
+#endif