ReactOS  0.4.13-dev-982-g9853eab
dll_main.cpp
Go to the documentation of this file.
1  /*
2  *
3  * Copyright (c) 1994
4  * Hewlett-Packard Company
5  *
6  * Copyright (c) 1996,1997
7  * Silicon Graphics Computer Systems, Inc.
8  *
9  * Copyright (c) 1997
10  * Moscow Center for SPARC Technology
11  *
12  * Copyright (c) 1999
13  * Boris Fomitchev
14  *
15  * This material is provided "as is", with absolutely no warranty expressed
16  * or implied. Any use is at your own risk.
17  *
18  * Permission to use or copy this software for any purpose is hereby granted
19  * without fee, provided the above notices are retained on all copies.
20  * Permission to modify the code and to distribute modified code is granted,
21  * provided the above notices are retained, and a notice that the code was
22  * modified is included with the above copyright notice.
23  *
24  */
25 
26 #include "stlport_prefix.h"
27 
28 #if !defined (_STLP_DEBUG) && ! defined (_STLP_ASSERTIONS)
29 # if !defined (__APPLE__) || !defined (__GNUC__) || (__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3))
30 /* dums: Please if the following code was being uncommented please explain why
31  * as for the moment it only looks like a source of inconsistency in the way
32  * STLport different translation units are compiled.
33  */
34 //# define _STLP_ASSERTIONS 1
35 # endif
36 #endif
37 
38 #include <utility>
39 #include <memory>
40 #include <vector>
41 #include <set>
42 #include <list>
43 #include <slist>
44 #include <deque>
45 #include <hash_map>
46 #include <limits>
47 #include <string>
48 #include <stdexcept>
49 #include <bitset>
50 #include <locale>
51 
52 #if defined (__DMC__)
53 // for rope static members
54 # include <rope>
55 #endif
56 
57 #include <stl/_range_errors.c>
58 
60 
61 #if defined (_STLP_NO_EXCEPTION_HEADER) || defined (_STLP_BROKEN_EXCEPTION_CLASS)
63 exception::~exception() _STLP_NOTHROW {}
64 bad_exception::bad_exception() _STLP_NOTHROW {}
65 bad_exception::~bad_exception() _STLP_NOTHROW {}
66 const char* exception::what() const _STLP_NOTHROW { return "class exception"; }
67 const char* bad_exception::what() const _STLP_NOTHROW { return "class bad_exception"; }
68 #endif
69 
70 #if defined (_STLP_OWN_STDEXCEPT)
71 # include <stl/_stdexcept_base.c>
72 
73 // boris : those are needed to force typeinfo nodes to be created in here only
83 
84 #endif
85 
86 #if !defined(_STLP_WCE_EVC3)
87 # if defined (_STLP_NO_BAD_ALLOC)
88 const nothrow_t nothrow /* = {} */;
89 # endif
90 #endif
91 
92 #if !defined (_STLP_NO_FORCE_INSTANTIATE)
93 
94 # if defined (_STLP_DEBUG) || defined (_STLP_ASSERTIONS)
96 template class _STLP_CLASS_DECLSPEC __stl_debug_engine<bool>;
98 # endif
99 
102 
103 //Export of the types used to represent buckets in the hashtable implementation.
104 /*
105  * For the vector class we do not use any MSVC6 workaround even if we export it from
106  * the STLport dynamic libraries because we know what methods are called and none is
107  * a template method. Moreover the exported class is an instanciation of vector with
108  * _Slist_node_base struct that is an internal STLport class that no user should ever
109  * use.
110  */
111 # if !defined (_STLP_USE_PTR_SPECIALIZATIONS)
113 
120 # endif
121 
122 # if defined (_STLP_DEBUG)
124 template class _STLP_CLASS_DECLSPEC _STLP_NON_DBG_NAME(vector)<_Slist_node_base*,
127 # endif
128 
131 //End of hashtable bucket types export.
132 
133 //Export of _Locale_impl facets container:
134 # if !defined (_STLP_USE_PTR_SPECIALIZATIONS)
136 
141 
142 # endif
143 # if defined (_STLP_DEBUG)
145 # define _STLP_NON_DBG_VECTOR _STLP_NON_DBG_NAME(vector)
147 template class _STLP_CLASS_DECLSPEC _STLP_NON_DBG_VECTOR<locale::facet*, allocator<locale::facet*> >;
148 # undef _STLP_NON_DBG_VECTOR
150 # endif
151 
153 //End of export of _Locale_impl facets container.
154 
155 # if defined (_STLP_USE_PTR_SPECIALIZATIONS)
157 
158 typedef _STLP_PRIV _List_node<void*> _VoidPtr_Node;
160 
162 
165 template class _STLP_CLASS_DECLSPEC _STLP_PTR_IMPL_NAME(vector)<void*, allocator<void*> >;
166 
170 template class _STLP_CLASS_DECLSPEC _STLP_PTR_IMPL_NAME(list)<void*, allocator<void*> >;
171 
175 template class _STLP_CLASS_DECLSPEC _STLP_PTR_IMPL_NAME(slist)<void*, allocator<void*> >;
176 
181 template class _STLP_CLASS_DECLSPEC _STLP_PTR_IMPL_NAME(deque)<void*, allocator<void*> >;
182 
184 
185 # endif /* _STLP_USE_PTR_SPECIALIZATIONS */
186 
188 
191 
194 
196 
198 
199 #endif /* _STLP_NO_FORCE_INSTANTIATE */
200 
202 
203 #if defined (_STLP_SIGNAL_RUNTIME_COMPATIBILITY)
204 extern "C" void _STLP_DECLSPEC _STLP_CALL _STLP_SIGNAL_RUNTIME_COMPATIBILITY() {}
205 #endif
206 
207 #define FORCE_SYMBOL extern
208 
209 #if defined (_WIN32) && defined (_STLP_USE_DECLSPEC) && !defined (_STLP_USE_STATIC_LIB)
210 // stlportmt.cpp : Defines the entry point for the DLL application.
211 //
212 # undef FORCE_SYMBOL
213 # define FORCE_SYMBOL APIENTRY
214 
215 extern "C" {
216 
218  DWORD ul_reason_for_call,
219  LPVOID) {
220  switch (ul_reason_for_call) {
221  case DLL_PROCESS_ATTACH:
223  case DLL_THREAD_ATTACH:
224  case DLL_THREAD_DETACH:
225  case DLL_PROCESS_DETACH:
226  break;
227  }
228  return TRUE;
229 }
230 
231 } /* extern "C" */
232 
233 #if !defined (_STLP_MSVC) && !defined (__MINGW32__)
235 
236 static void FORCE_SYMBOL
237 force_link() {
238  set<int>::iterator iter;
239  // _M_increment; _M_decrement instantiation
240  ++iter;
241  --iter;
242 }
243 
245 #endif
246 
247 #endif /* _WIN32 */
248 
249 #if defined (__ICL) && (__ICL >= 900) && (_STLP_MSVC_LIB < 1300)
250 # undef std
251 
252 namespace std
253 {
254  void _STLP_CALL unexpected() {
255  unexpected_handler hdl;
257  hdl();
258  }
259 }
260 #endif
#define TRUE
Definition: types.h:120
#define FORCE_SYMBOL
Definition: dll_main.cpp:207
#define DLL_THREAD_ATTACH
Definition: compat.h:121
#define exception
Definition: math.h:26
Definition: _slist.h:198
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
#define DLL_PROCESS_ATTACH
Definition: compat.h:120
Definition: features.h:417
#define DLL_THREAD_DETACH
Definition: compat.h:122
#define _STLP_MOVE_TO_PRIV_NAMESPACE
Definition: features.h:524
unsigned int BOOL
Definition: ntddk_ex.h:94
void(__cdecl * unexpected_handler)(void)
Definition: eh.h:22
Definition: _limits.h:348
#define _STLP_NOTHROW_INHERENTLY
Definition: features.h:858
~invalid_argument() _STLP_NOTHROW_INHERENTLY
BOOL WINAPI DllMain(IN HINSTANCE hinstDLL, IN DWORD dwReason, IN LPVOID lpvReserved)
Definition: kbsdll.c:83
#define DLL_PROCESS_DETACH
Definition: compat.h:119
#define _STLP_MOVE_TO_STD_NAMESPACE
Definition: features.h:525
~runtime_error() _STLP_NOTHROW_INHERENTLY
_Rep_type::iterator iterator
Definition: _set.h:73
unsigned long DWORD
Definition: ntddk_ex.h:95
Definition: _deque.h:400
#define _STLP_PRIV
Definition: _dm.h:70
~overflow_error() _STLP_NOTHROW_INHERENTLY
_CRTIMP void __cdecl unexpected(void)
#define _STLP_DECLSPEC
Definition: features.h:982
Definition: _list.h:228
#define _STLP_CLASS_DECLSPEC
Definition: features.h:983
~out_of_range() _STLP_NOTHROW_INHERENTLY
#define _STLP_END_NAMESPACE
Definition: features.h:503
~logic_error() _STLP_NOTHROW_INHERENTLY
~domain_error() _STLP_NOTHROW_INHERENTLY
~length_error() _STLP_NOTHROW_INHERENTLY
#define const
Definition: zconf.h:230
#define _STLP_BEGIN_NAMESPACE
Definition: features.h:501
~range_error() _STLP_NOTHROW_INHERENTLY
#define _STLP_NOTHROW
Definition: _intel.h:35
~underflow_error() _STLP_NOTHROW_INHERENTLY
#define _STLP_CALL
Definition: _bc.h:131
#define APIENTRY
Definition: api.h:79
HMODULE hModule
Definition: animate.c:44
_CRTIMP unexpected_function __cdecl set_unexpected(unexpected_function _NewPtFunc)