diff -Nur jpeg-7.orig/jmorecfg.h jpeg-7/jmorecfg.h --- jpeg-7.orig/jmorecfg.h 2009-08-21 00:26:13.000000000 -0400 +++ jpeg-7/jmorecfg.h 2009-08-21 00:54:17.000000000 -0400 @@ -189,11 +189,30 @@ #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 + +// GLOBAL(type) /* a reference to a GLOBAL function: */ -#define EXTERN(type) extern type +// EXTERN(type) +/* a function referenced thru EXTERNs: */ + +#if defined _WIN32 || defined __CYGWIN__ + #ifdef JPEG_DLL // Must be defined if building or using jpeg as a DLL + #ifdef jpeg_EXPORTS + #define GLOBAL(type) __declspec(dllexport) type + #define EXTERN(type) extern __declspec(dllexport) type + #else + #define GLOBAL(type) __declspec(dllimport) type + #define EXTERN(type) extern __declspec(dllimport) type + #endif + #else + #define GLOBAL(type) type + #define EXTERN(type) extern type + #endif +#else + #define GLOBAL(type) type + #define EXTERN(type) extern type +#endif /* This macro is used to declare a "method", that is, a function pointer. * We want to supply prototype parameters if the compiler can cope.