Re: [AD] Allegro 4.4 resize window support

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


That fix that I admit I only recently talked about on IRC #allegro :-P (my excuse so far) :

Faulty code in allegro-4.4.2\allegro\src\win\wsystem.c

/* DMC requires a DllMain() function, or else the DLL hangs. */


original:
#ifndef ALLEGRO_STATICLINK
BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason, LPVOID lpReserved)
{
return TRUE;
}
#endif


fix:

#ifndef ALLEGRO_STATICLINK
#ifndef ALLEGRO_MINGW32
BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason, LPVOID lpReserved)
{
return TRUE;
}
#endif
#endif


Reference compiler error:
C:\Users\Gull\Downloads\allegro-4.4.2\allegro\src\win\wsystem.c:36:15: error: conflicting types for 'DllMain'
 BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason, LPVOID lpReserved)
               ^
In file included from C:/MinGW/include/windows.h:62:0,
                 from C:/Users/Gull/Downloads/allegro-4.4.2/allegro/include/winalleg.h:54,
                 from C:/Users/Gull/Downloads/allegro-4.4.2/allegro/include/allegro/platform/aintwin.h:31,
                 from C:\Users\Gull\Downloads\allegro-4.4.2\allegro\src\win\wsystem.c:27:
C:/MinGW/include/winbase.h:1051:13: note: previous declaration of 'DllMain' was here
 BOOL WINAPI DllMain(HINSTANCE, DWORD, LPVOID);
             ^

> Date: Mon, 18 Nov 2013 10:22:29 +1100
> From: novalazy@xxxxxxxxxx
> To: gullradriel@xxxxxxxxxx
> CC: alleg-developers@xxxxxxxxxx
> Subject: Re: [AD] Allegro 4.4 resize window support
>
> On Sun, 17 Nov 2013 14:14:24 +0100, Mickaël Castagnier <gullradriel@xxxxxxxxxx> wrote:
> > I would be interested if you also integrated the fix for the broken mingw build.
>
> What fix?
>
> Peter


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/