4 #if defined(__PIC__) && defined(mingw32_TARGET_OS)
5 # define DLL_IMPORT_DATA_REF(x) (_imp__##x)
6 # define DLL_IMPORT_DATA_VARNAME(x) *_imp__##x
7 # if __GNUC__ && !defined(__declspec)
10 # define DLLIMPORT __declspec(dllimport)
11 # define DLLIMPORT_DATA(x) _imp__##x
14 # define DLL_IMPORT_DATA_REF(x) (&(x))
15 # define DLL_IMPORT_DATA_VARNAME(x) x
19 /* The view of the ghc/includes/ header files differ ever so
20 slightly depending on whether the RTS is being compiled
21 or not - so we're forced to distinguish between two.
22 [oh, you want details :) : Data symbols defined by the RTS
23 have to be accessed through an extra level of indirection
24 when compiling generated .hc code compared to when the RTS
25 sources are being processed. This is only the case when
29 #define DLL_IMPORT DLLIMPORT
30 #define DLL_IMPORT_RTS
31 #define DLL_IMPORT_DATA_VAR(x) x
34 #define DLL_IMPORT_RTS DLLIMPORT
35 # if defined(__PIC__) && defined(mingw32_TARGET_OS)
36 # define DLL_IMPORT_DATA_VAR(x) _imp__##x
38 # define DLL_IMPORT_DATA_VAR(x) x
42 #ifdef COMPILING_STDLIB
43 #define DLL_IMPORT_STDLIB
45 #define DLL_IMPORT_STDLIB DLLIMPORT
48 #endif /* __STGDLL_H__ */