* or code profilers that require it.
*/
+#if defined(_WIN32)
+#if defined(JPEG_BUILD)
+#define LIBJPEG_API __declspec(dllexport)
+#elif defined(LIBJPEG_IMPORT)
+#define LIBJPEG_API __declspec(dllimport)
+#else
+#define LIBJPEG_API
+#endif
+#elif defined(__GNUC__)
+#define LIBJPEG_API __attribute__((visibility("default")))
+#else
+#define LIBJPEG_API
+#endif
+
/* a function called through method pointers: */
#define METHODDEF(type) static type
/* a function used only in its module: */
#define LOCAL(type) static type
/* a function referenced thru EXTERNs: */
-#define GLOBAL(type) type
+#define GLOBAL(type) LIBJPEG_API type
/* a reference to a GLOBAL function: */
-#define EXTERN(type) extern type
+#define EXTERN(type) LIBJPEG_API extern type
/* This macro is used to declare a "method", that is, a function pointer.