[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft] definition of FT_EXPORT and FT_BASE for Windows
From: |
Vincent Torri |
Subject: |
[ft] definition of FT_EXPORT and FT_BASE for Windows |
Date: |
Sat, 2 May 2009 08:43:52 +0200 (CEST) |
Hey,
in the GnuWin32 package of Freetype, FT_EXPORT and FT_BASE are defined
with the following patch:
--- ../freetype-2.3.7.orig/include/freetype/config/ftoption.h 2008-02-16
06:53:25.000000000 +0100 +++ ./include/freetype/config/ftoption.h
2008-10-18 10:27:34.000000000 +0200 @@ -206,6 +206,32 @@
/* */
/* #define FT_EXPORT(x) extern x */
/* #define FT_EXPORT_DEF(x) x */
+#ifndef __GNUC__
+# define __DLL_IMPORT__ __declspec(dllimport)
+# define __DLL_EXPORT__ __declspec(dllexport)
+#else
+# define __DLL_IMPORT__ __attribute__((dllimport)) extern
+# define __DLL_EXPORT__ __attribute__((dllexport)) extern
+#endif
+
+#if (defined __WIN32__) || (defined _WIN32)
+# ifdef BUILD_FREETYPE2_DLL
+# define FREETYPE2_DLL_IMPEXP __DLL_EXPORT__
+# elif defined(FREETYPE2_STATIC)
+# define FREETYPE2_DLL_IMPEXP
+# elif defined (USE_FREETYPE2_DLL)
+# define FREETYPE2_DLL_IMPEXP __DLL_IMPORT__
+# elif defined (USE_FREETYPE2_STATIC)
+# define FREETYPE2_DLL_IMPEXP
+# else /* assume USE_FREETYPE2_DLL */
+# define FREETYPE2_DLL_IMPEXP __DLL_IMPORT__
+# endif
+#else /* __WIN32__ */
+# define FREETYPE2_DLL_IMPEXP
+#endif
+
+#define FT_EXPORT(x) FREETYPE2_DLL_IMPEXP x
+#define FT_BASE(x) FREETYPE2_DLL_IMPEXP x
I remember that you used some parts of the patch of that GnuWin32 package,
but not that one. Werner, can you explain me why ?
Thank you
Vincent Torri
- [ft] definition of FT_EXPORT and FT_BASE for Windows,
Vincent Torri <=