1 /*         ______   ___    ___
2  *        /\  _  \ /\_ \  /\_ \
3  *        \ \ \L\ \\//\ \ \//\ \      __     __   _ __   ___
4  *         \ \  __ \ \ \ \  \ \ \   /'__`\ /'_ `\/\`'__\/ __`\
5  *          \ \ \/\ \ \_\ \_ \_\ \_/\  __//\ \L\ \ \ \//\ \L\ \
6  *           \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
7  *            \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
8  *                                           /\____/
9  *                                           \_/__/
10  *
11  *      Configuration defines for use with Mingw32.
12  *
13  *      By Michael Rickmann.
14  *
15  *      Native build version by Henrik Stokseth.
16  *
17  *      See readme.txt for copyright information.
18  */
19 
20 
21 #ifndef SCAN_DEPEND
22    #include <io.h>
23    #include <fcntl.h>
24    #include <direct.h>
25    #include <malloc.h>
26 #endif
27 
28 
29 /* a static auto config */
30 /* older mingw's don't seem to have inttypes.h */
31 /* #define ALLEGRO_HAVE_INTTYPES_H */
32 #define ALLEGRO_HAVE_STDINT_H	1
33 
34 
35 /* describe this platform */
36 #ifdef ALLEGRO_STATICLINK
37    #define ALLEGRO_PLATFORM_STR  "MinGW32.s"
38 #else
39    #define ALLEGRO_PLATFORM_STR  "MinGW32"
40 #endif
41 
42 #define ALLEGRO_WINDOWS
43 #define ALLEGRO_I386
44 #define ALLEGRO_LITTLE_ENDIAN
45 #define ALLEGRO_USE_CONSTRUCTOR
46 #define ALLEGRO_MULTITHREADED
47 
48 #ifdef ALLEGRO_USE_CONSOLE
49    #define ALLEGRO_CONSOLE_OK
50    #define ALLEGRO_NO_MAGIC_MAIN
51 #endif
52 
53 
54 /* describe how function prototypes look to MINGW32 */
55 #if (defined ALLEGRO_STATICLINK) || (defined ALLEGRO_SRC)
56    #define _AL_DLL
57 #else
58    #define _AL_DLL   __declspec(dllimport)
59 #endif
60 
61 #define AL_VAR(type, name)                   extern _AL_DLL type name
62 #define AL_ARRAY(type, name)                 extern _AL_DLL type name[]
63 #define AL_FUNC(type, name, args)            extern type name args
64 #define AL_METHOD(type, name, args)          type (*name) args
65 #define AL_FUNCPTR(type, name, args)         extern _AL_DLL type (*name) args
66 
67 
68 /* windows specific defines */
69 
70 #if (defined ALLEGRO_SRC)
71 /* pathches to handle DX7 headers on a win9x system */
72 
73 /* should WINNT be defined on win9x systems? */
74 #ifdef WINNT
75    #undef WINNT
76 #endif
77 
78 /* defined in windef.h */
79 #ifndef HMONITOR_DECLARED
80    #define HMONITOR_DECLARED 1
81 #endif
82 
83 #endif /* ALLEGRO_SRC */
84 
85 /* another instance of missing constants in the mingw32 headers */
86 #ifndef ENUM_CURRENT_SETTINGS
87    #define ENUM_CURRENT_SETTINGS       ((DWORD)-1)
88 #endif
89 
90 /* describe the asm syntax for this platform */
91 #define ALLEGRO_ASM_PREFIX    "_"
92 
93 /* arrange for other headers to be included later on */
94 #define ALLEGRO_EXTRA_HEADER     "allegro/platform/alwin.h"
95 #define ALLEGRO_INTERNAL_HEADER  "allegro/platform/aintwin.h"
96 #define ALLEGRO_ASMCAPA_HEADER   "obj/mingw32/asmcapa.h"
97