summaryrefslogtreecommitdiff
path: root/magick/nt_base.h
diff options
context:
space:
mode:
Diffstat (limited to 'magick/nt_base.h')
-rw-r--r--magick/nt_base.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/magick/nt_base.h b/magick/nt_base.h
index 63840dc..9646959 100644
--- a/magick/nt_base.h
+++ b/magick/nt_base.h
@@ -193,6 +193,7 @@ extern "C" {
1900 Visual C++ 2015
1910 Visual C++ 2017
1920 Visual C++ 2019
+ 1930 Visual C++ 2022
Should look at __CLR_VER ("Defines the version of the common language
runtime used when the application was compiled.") as well.
@@ -213,6 +214,19 @@ extern "C" {
#endif
/*
+ MSVC does not have snprintf (a C'99 feature) until Visual Studio 2015.
+ */
+#if defined(_VISUALC_) && (_MSC_VER < 1900)
+#undef snprintf
+extern MagickExport int NTsnprintf(char* str, size_t size, const char* format, ...);
+#if _MSC_VER < 1400
+#define snprintf NTsnprintf
+#else
+#define snprintf(str,size,format,...) NTsnprintf(str,size,format,__VA_ARGS__)
+#endif
+#endif
+
+/*
Windows provides Unix-style access() via _access()
*/
#define HAVE_ACCESS 1
@@ -312,6 +326,10 @@ typedef UINT (CALLBACK *LPFNDLLFUNC1)(DWORD,UINT);
Note that under WIN64 read/write appear to still return 'int' and use
'unsigned int' rather than 'size_t' to specify the I/O size. This really
sucks!
+
+ The Windows <BaseTsd.h> header defines the type SSIZE_T which may be used to
+ typedef ssize_t but it is not known how it behaves.
+
*/
#if !defined(ssize_t) && !defined(__MINGW32__) && !defined(__MINGW64__)
# if defined(WIN64)