X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=jmorecfg.h;h=565f13ef3da024c359891f41da6fae924fc198ae;hb=c2de1e452e66ca7ea3d83f44187562faa330a439;hp=54a7d1c447e4ed862caf5a905b0275efcf3629ef;hpb=e7efa7d39fcacfbb0ce001d546606070a7b17e14;p=ext%2Flibjpeg.git diff --git a/jmorecfg.h b/jmorecfg.h index 54a7d1c..565f13e 100644 --- a/jmorecfg.h +++ b/jmorecfg.h @@ -180,14 +180,28 @@ typedef unsigned int JDIMENSION; * 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.