blob: 96003efbf524782ab458873fd523130f13969c9a [file] [log] [blame]
--- gdcm-3.0.8/Utilities/gdcmopenjpeg/src/lib/openjp2/openjpeg.h.orig 2020-10-13 08:50:33.777963800 +0300
+++ gdcm-3.0.8/Utilities/gdcmopenjpeg/src/lib/openjp2/openjpeg.h 2020-10-13 09:03:57.599778000 +0300
@@ -76,8 +76,28 @@
#define OPJ_DEPRECATED(func) func
#endif
-#if defined(OPJ_STATIC) || !defined(_WIN32)
-/* http://gcc.gnu.org/wiki/Visibility */
+#if defined(_WIN32)
+# if defined(OPJ_STATIC)
+# define OPJ_CALLCONV
+# define OPJ_API
+# else
+# define OPJ_CALLCONV __stdcall
+ /*
+ The following ifdef block is the standard way of creating macros which make exporting
+ from a DLL simpler. All files within this DLL are compiled with the OPJ_EXPORTS
+ symbol defined on the command line. this symbol should not be defined on any project
+ that uses this DLL. This way any other project whose source files include this file see
+ OPJ_API functions as being imported from a DLL, whereas this DLL sees symbols
+ defined with this macro as being exported.
+ */
+# if defined(OPJ_EXPORTS) || defined(DLL_EXPORT)
+# define OPJ_API __declspec(dllexport)
+# else
+# define OPJ_API __declspec(dllimport)
+# endif /* OPJ_EXPORTS */
+# endif
+#else
+ /* http://gcc.gnu.org/wiki/Visibility */
# if __GNUC__ >= 4
# if defined(OPJ_STATIC) /* static library uses "hidden" */
# define OPJ_API __attribute__ ((visibility ("hidden")))
@@ -90,22 +109,7 @@
# define OPJ_LOCAL
# endif
# define OPJ_CALLCONV
-#else
-# define OPJ_CALLCONV __stdcall
-/*
-The following ifdef block is the standard way of creating macros which make exporting
-from a DLL simpler. All files within this DLL are compiled with the OPJ_EXPORTS
-symbol defined on the command line. this symbol should not be defined on any project
-that uses this DLL. This way any other project whose source files include this file see
-OPJ_API functions as being imported from a DLL, whereas this DLL sees symbols
-defined with this macro as being exported.
-*/
-# if defined(OPJ_EXPORTS) || defined(DLL_EXPORT)
-# define OPJ_API __declspec(dllexport)
-# else
-# define OPJ_API __declspec(dllimport)
-# endif /* OPJ_EXPORTS */
-#endif /* !OPJ_STATIC || !_WIN32 */
+#endif
typedef int OPJ_BOOL;
#define OPJ_TRUE 1