Author: dreimer
Date: Wed Jul 14 14:53:35 2010
New Revision: 48038
URL:
http://svn.reactos.org/svn/reactos?rev=48038&view=rev
Log:
Reapply some Win32 specific magic to properly build a Windows DLL of libjpeg. (Samuel
Serapion)
Added:
trunk/reactos/include/reactos/libs/libjpeg/rosdiff.patch (with props)
Modified:
trunk/reactos/include/reactos/libs/libjpeg/jmorecfg.h
Modified: trunk/reactos/include/reactos/libs/libjpeg/jmorecfg.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/libs/libjp…
==============================================================================
--- trunk/reactos/include/reactos/libs/libjpeg/jmorecfg.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/libs/libjpeg/jmorecfg.h [iso-8859-1] Wed Jul 14 14:53:35
2010
@@ -191,14 +191,63 @@
* or code profilers that require it.
*/
+#ifdef _WIN32
+# if defined(ALL_STATIC)
+# if defined(JPEG_DLL)
+# undef JPEG_DLL
+# endif
+# if !defined(JPEG_STATIC)
+# define JPEG_STATIC
+# endif
+# endif
+# if defined(JPEG_DLL)
+# if defined(JPEG_STATIC)
+# undef JPEG_STATIC
+# endif
+# endif
+# if defined(JPEG_DLL)
+/* building a DLL */
+# define JPEG_IMPEXP __declspec(dllexport)
+# elif defined(JPEG_STATIC)
+/* building or linking to a static library */
+# define JPEG_IMPEXP
+# else
+/* linking to the DLL */
+# define JPEG_IMPEXP __declspec(dllimport)
+# endif
+# if !defined(JPEG_API)
+# define JPEG_API __cdecl
+# endif
+/* The only remaining magic that is necessary for cygwin */
+#elif defined(__CYGWIN__)
+# if !defined(JPEG_IMPEXP)
+# define JPEG_IMPEXP
+# endif
+# if !defined(JPEG_API)
+# define JPEG_API __cdecl
+# endif
+#endif
+
+/* Ensure our magic doesn't hurt other platforms */
+#if !defined(JPEG_IMPEXP)
+# define JPEG_IMPEXP
+#endif
+#if !defined(JPEG_API)
+# define JPEG_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) type JPEG_API
/* a reference to a GLOBAL function: */
-#define EXTERN(type) extern type
+#ifndef EXTERN
+# define EXTERN(type) extern JPEG_IMPEXP type JPEG_API
+/* a reference to a "GLOBAL" function exported by sourcefiles of utility progs
*/
+#endif /* EXTERN */
+#define EXTERN_1(type) extern type JPEG_API
/* This macro is used to declare a "method", that is, a function pointer.
Added: trunk/reactos/include/reactos/libs/libjpeg/rosdiff.patch
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/libs/libjp…
==============================================================================
--- trunk/reactos/include/reactos/libs/libjpeg/rosdiff.patch (added)
+++ trunk/reactos/include/reactos/libs/libjpeg/rosdiff.patch [iso-8859-1] Wed Jul 14
14:53:35 2010
@@ -1,0 +1,70 @@
+Index: libs/libjpeg/jmorecfg.h
+===================================================================
+--- libs/libjpeg/jmorecfg.h (revision 48026)
++++ libs/libjpeg/jmorecfg.h (working copy)
+@@ -191,14 +191,63 @@
+ * or code profilers that require it.
+ */
+
++#ifdef _WIN32
++# if defined(ALL_STATIC)
++# if defined(JPEG_DLL)
++# undef JPEG_DLL
++# endif
++# if !defined(JPEG_STATIC)
++# define JPEG_STATIC
++# endif
++# endif
++# if defined(JPEG_DLL)
++# if defined(JPEG_STATIC)
++# undef JPEG_STATIC
++# endif
++# endif
++# if defined(JPEG_DLL)
++/* building a DLL */
++# define JPEG_IMPEXP __declspec(dllexport)
++# elif defined(JPEG_STATIC)
++/* building or linking to a static library */
++# define JPEG_IMPEXP
++# else
++/* linking to the DLL */
++# define JPEG_IMPEXP __declspec(dllimport)
++# endif
++# if !defined(JPEG_API)
++# define JPEG_API __cdecl
++# endif
++/* The only remaining magic that is necessary for cygwin */
++#elif defined(__CYGWIN__)
++# if !defined(JPEG_IMPEXP)
++# define JPEG_IMPEXP
++# endif
++# if !defined(JPEG_API)
++# define JPEG_API __cdecl
++# endif
++#endif
++
++/* Ensure our magic doesn't hurt other platforms */
++#if !defined(JPEG_IMPEXP)
++# define JPEG_IMPEXP
++#endif
++#if !defined(JPEG_API)
++# define JPEG_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) type JPEG_API
+ /* a reference to a GLOBAL function: */
+-#define EXTERN(type) extern type
++#ifndef EXTERN
++# define EXTERN(type) extern JPEG_IMPEXP type JPEG_API
++/* a reference to a "GLOBAL" function exported by sourcefiles of utility progs
*/
++#endif /* EXTERN */
++#define EXTERN_1(type) extern type JPEG_API
+
+
+ /* This macro is used to declare a "method", that is, a function pointer.
Propchange: trunk/reactos/include/reactos/libs/libjpeg/rosdiff.patch
------------------------------------------------------------------------------
svn:eol-style = native