Author: fireball
Date: Wed Aug 17 11:11:54 2011
New Revision: 53279
URL:
http://svn.reactos.org/svn/reactos?rev=53279&view=rev
Log:
[GDI32]
- Get rid of dangerous LoadLibraryA("freetype.dll") invocation happening inside
DLL_PROCESS_ATTACH and link statically instead. This commit breaks the arwinss branch
buildability on itself (not that much of a loss considering how old stuff is in the
branch) and is a first commit towards ability to build arwinss in trunk.
Modified:
branches/arwinss/reactos/dll/win32/gdi32/freetype.c
branches/arwinss/reactos/dll/win32/gdi32/gdi32.rbuild
Modified: branches/arwinss/reactos/dll/win32/gdi32/freetype.c
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/gdi32…
==============================================================================
--- branches/arwinss/reactos/dll/win32/gdi32/freetype.c [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/gdi32/freetype.c [iso-8859-1] Wed Aug 17 11:11:54
2011
@@ -2714,6 +2714,7 @@
static BOOL init_freetype(void)
{
+#ifdef DYNAMIC_FREETYPE
ft_handle = LoadLibraryA("freetype.dll");
if(!ft_handle) {
WINE_MESSAGE(
@@ -2723,6 +2724,13 @@
"http://www.freetype.org\n");
return FALSE;
}
+#else
+ /* Request version so it is actually linked in */
+ FT_Version.major = FT_Version.minor = FT_Version.patch = -1;
+
FT_Library_Version(library,&FT_Version.major,&FT_Version.minor,&FT_Version.patch);
+
+ ft_handle = GetModuleHandleA("freetype.dll");
+#endif
#define LOAD_FUNCPTR(f) if((p##f = (PVOID)GetProcAddress(ft_handle, #f)) ==
NULL){WARN("Can't find symbol %s\n", #f); goto sym_not_found;}
@@ -2799,7 +2807,9 @@
"font library. To enable Wine to use TrueType fonts please upgrade\n"
"FreeType to at least version 2.0.5.\n"
"http://www.freetype.org\n");
+#ifdef DYNAMIC_FREETYPE
FreeLibrary(ft_handle);
+#endif
ft_handle = NULL;
return FALSE;
}
Modified: branches/arwinss/reactos/dll/win32/gdi32/gdi32.rbuild
URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/gdi32…
==============================================================================
--- branches/arwinss/reactos/dll/win32/gdi32/gdi32.rbuild [iso-8859-1] (original)
+++ branches/arwinss/reactos/dll/win32/gdi32/gdi32.rbuild [iso-8859-1] Wed Aug 17 11:11:54
2011
@@ -2,7 +2,7 @@
<importlibrary definition="gdi32.spec" />
<include base="gdi32">include</include>
<include base="ReactOS">include/reactos/wine</include>
- <include base="ReactOS">dll/3rdparty/freetype/include</include>
+ <include base="ReactOS">lib/3rdparty/freetype/include</include>
<define name="_DISABLE_TIDENTS" />
<redefine name="WINVER">0x0600</redefine>
<redefine name="_WIN32_WINNT">0x0501</redefine>
@@ -13,6 +13,7 @@
<library>ntdll</library>
<library>usp10</library>
<library>user32</library>
+ <library>freetype</library>
<library>win32ksys</library>
<library>pseh</library>
<library>dxguid</library>