summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/libjpeg/src/jinclude.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/libjpeg/src/jinclude.h')
-rw-r--r--src/3rdparty/libjpeg/src/jinclude.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/3rdparty/libjpeg/src/jinclude.h b/src/3rdparty/libjpeg/src/jinclude.h
index 120614b25c..56e7a4b296 100644
--- a/src/3rdparty/libjpeg/src/jinclude.h
+++ b/src/3rdparty/libjpeg/src/jinclude.h
@@ -4,7 +4,7 @@
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1991-1994, Thomas G. Lane.
* libjpeg-turbo Modifications:
- * Copyright (C) 2022, D. R. Commander.
+ * Copyright (C) 2022-2023, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -45,6 +45,18 @@
*/
+#ifdef _MSC_VER
+
+#define SNPRINTF(str, n, format, ...) \
+ _snprintf_s(str, n, _TRUNCATE, format, ##__VA_ARGS__)
+
+#else
+
+#define SNPRINTF snprintf
+
+#endif
+
+
#ifndef NO_GETENV
#ifdef _MSC_VER
@@ -111,6 +123,8 @@ static INLINE int GETENV_S(char *buffer, size_t buffer_size, const char *name)
#else
+#include <errno.h>
+
/* This provides a similar interface to the Microsoft _putenv_s() function, but
* other than parameter validation, it has no advantages over setenv().
*/