source: branches/gcc-kmk/include/initdll.h@ 21728

Last change on this file since 21728 was 21728, checked in by dmik, 14 years ago

Define ctordtorInit()/ctordtorTerm() on GCC.

File size: 4.3 KB
Line 
1#ifndef __INITDLL_H__
2#define __INITDLL_H__
3
4#if (defined(__IBMCPP__) || defined(__IBMC__) || defined(__INNOTEK_LIBC__))
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10#if (__IBMCPP__ == 300) || (__IBMC__ == 300)
11void _Optlink __ctordtorInit( void );
12#define ctordtorInit() __ctordtorInit()
13
14void _Optlink __ctordtorTerm( void );
15#define ctordtorTerm() __ctordtorTerm()
16
17#elif (__IBMCPP__ == 360) || (__IBMC__ == 360) || (__IBMC__ == 430)
18void _Optlink __ctordtorInit( int flag );
19#define ctordtorInit() __ctordtorInit(0)
20
21void _Optlink __ctordtorTerm( int flag );
22#define ctordtorTerm() __ctordtorTerm(0)
23
24#elif defined(__INNOTEK_LIBC__)
25
26extern void __ctordtorInit(void);
27extern void __ctordtorTerm(void);
28
29#define ctordtorInit() __ctordtorInit()
30#define ctordtorTerm() __ctordtorTerm()
31
32#else
33#error "Unknown compiler!"
34#endif
35
36#ifndef __INNOTEK_LIBC__
37
38/*-------------------------------------------------------------------*/
39/* _CRT_init is the C run-time environment initialization function. */
40/* It will return 0 to indicate success and -1 to indicate failure. */
41/*-------------------------------------------------------------------*/
42int _Optlink _CRT_init(void);
43
44/*-------------------------------------------------------------------*/
45/* _CRT_term is the C run-time environment termination function. */
46/* It only needs to be called when the C run-time functions are */
47/* statically linked. */
48/*-------------------------------------------------------------------*/
49void _Optlink _CRT_term(void);
50#endif // __INNOTEK_LIBC__
51
52
53#ifdef __cplusplus
54}
55#endif
56
57#elif defined(__WATCOMC__)
58
59#define _DLL_InitTerm LibMain
60
61#define ctordtorInit()
62#define ctordtorTerm()
63
64#ifdef __cplusplus
65extern "C" {
66//prevent Watcom from mucking with this name
67extern DWORD _Resource_PEResTab;
68#pragma aux _Resource_PEResTab "*";
69}
70#endif
71
72#endif /* IBM CPP Compiler */
73
74#ifdef __cplusplus
75extern "C" {
76#endif
77
78typedef ULONG (APIENTRY *PFN_INITDLL)(ULONG hModule, ULONG ulFlag);
79typedef void (APIENTRY *PFN_CLEANUPDLL)(ULONG ulReason);
80
81ULONG APIENTRY inittermKernel32(ULONG hModule, ULONG ulFlag);
82void APIENTRY cleanupKernel32(ULONG ulReason);
83
84ULONG APIENTRY inittermUser32(ULONG hModule, ULONG ulFlag);
85void APIENTRY cleanupUser32(ULONG ulReason);
86ULONG APIENTRY inittermOdinCtrl(ULONG hModule, ULONG ulFlag);
87
88//NOTE!!!!!!!!!!!!!!!!!
89//if this list is extended, then update our custombuild code!!!!
90//NOTE!!!!!!!!!!!!!!!!!
91ULONG APIENTRY inittermWinmm(ULONG hModule, ULONG ulFlag);
92ULONG APIENTRY inittermShell32(ULONG hModule, ULONG ulFlag);
93ULONG APIENTRY inittermOle32(ULONG hModule, ULONG ulFlag);
94ULONG APIENTRY inittermComdlg32(ULONG hModule, ULONG ulFlag);
95ULONG APIENTRY inittermComctl32(ULONG hModule, ULONG ulFlag);
96ULONG APIENTRY inittermGdi32(ULONG hModule, ULONG ulFlag);
97ULONG APIENTRY inittermNTDLL(ULONG hModule, ULONG ulFlag);
98ULONG APIENTRY inittermWsock32(ULONG hModule, ULONG ulFlag);
99ULONG APIENTRY inittermWininet(ULONG hModule, ULONG ulFlag);
100ULONG APIENTRY inittermRpcrt4(ULONG hModule, ULONG ulFlag);
101ULONG APIENTRY inittermAvifil32(ULONG hModule, ULONG ulFlag);
102ULONG APIENTRY inittermQuartz(ULONG hModule, ULONG ulFlag);
103ULONG APIENTRY inittermRiched32(ULONG hModule, ULONG ulFlag);
104ULONG APIENTRY inittermWnaspi32(ULONG hModule, ULONG ulFlag);
105ULONG APIENTRY inittermUxTheme(ULONG hModule, ULONG ulFlag);
106ULONG APIENTRY inittermDInput(ULONG hModule, ULONG ulFlag);
107ULONG APIENTRY inittermDSound(ULONG hModule, ULONG ulFlag);
108ULONG APIENTRY inittermWinSpool(ULONG hModule, ULONG ulFlag);
109ULONG APIENTRY inittermDDraw(ULONG hModule, ULONG ulFlag);
110ULONG APIENTRY inittermNTDLL(ULONG hModule, ULONG ulFlag);
111ULONG APIENTRY inittermMSVCRT(ULONG hModule, ULONG ulFlag);
112ULONG APIENTRY inittermImm32(ULONG hModule, ULONG ulFlag);
113ULONG APIENTRY inittermCrypt32(ULONG hModule, ULONG ulFlag);
114ULONG APIENTRY inittermOleacc(ULONG hModule, ULONG ulFlag);
115ULONG APIENTRY inittermmscms(ULONG hModule, ULONG ulFlag);
116ULONG APIENTRY inittermRsaenh(ULONG hModule, ULONG ulFlag);
117ULONG APIENTRY inittermSecur32(ULONG hModule, ULONG ulFlag);
118
119ULONG APIENTRY InitializeKernel32();
120
121VOID APIENTRY ReportFatalDllInitError(PCSZ pszModName);
122
123#ifdef __cplusplus
124}
125#endif
126
127#endif //__INITDLL_H__
Note: See TracBrowser for help on using the repository browser.