ReactOS 0.4.15-dev-7842-g558ab78
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)
62exception::exception() _STLP_NOTHROW {}
63exception::~exception() _STLP_NOTHROW {}
64bad_exception::bad_exception() _STLP_NOTHROW {}
65bad_exception::~bad_exception() _STLP_NOTHROW {}
66const char* exception::what() const _STLP_NOTHROW { return "class exception"; }
67const 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)
88const nothrow_t nothrow /* = {} */;
89# endif
90#endif
91
92#if !defined (_STLP_NO_FORCE_INSTANTIATE)
93
94# if defined (_STLP_DEBUG) || defined (_STLP_ASSERTIONS)
96template 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)
124template 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)
147template 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
158typedef _STLP_PRIV _List_node<void*> _VoidPtr_Node;
160
162
165template class _STLP_CLASS_DECLSPEC _STLP_PTR_IMPL_NAME(vector)<void*, allocator<void*> >;
166
170template class _STLP_CLASS_DECLSPEC _STLP_PTR_IMPL_NAME(list)<void*, allocator<void*> >;
171
175template class _STLP_CLASS_DECLSPEC _STLP_PTR_IMPL_NAME(slist)<void*, allocator<void*> >;
176
181template 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)
204extern "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
215extern "C" {
216
218 DWORD ul_reason_for_call,
219 LPVOID) {
220 switch (ul_reason_for_call) {
226 break;
227 }
228 return TRUE;
229}
230
231} /* extern "C" */
232
233#if !defined (_STLP_MSVC) && !defined (__MINGW32__)
235
236static void FORCE_SYMBOL
237force_link() {
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
252namespace std
253{
254 void _STLP_CALL unexpected() {
257 hdl();
258 }
259}
260#endif
#define _STLP_CALL
Definition: _bc.h:131
#define _STLP_PRIV
Definition: _dm.h:70
#define _STLP_NOTHROW
Definition: _intel.h:35
Definition: _limits.h:348
Definition: _deque.h:404
~domain_error() _STLP_NOTHROW_INHERENTLY
~invalid_argument() _STLP_NOTHROW_INHERENTLY
~length_error() _STLP_NOTHROW_INHERENTLY
Definition: list.h:37
~logic_error() _STLP_NOTHROW_INHERENTLY
~out_of_range() _STLP_NOTHROW_INHERENTLY
~overflow_error() _STLP_NOTHROW_INHERENTLY
~range_error() _STLP_NOTHROW_INHERENTLY
~runtime_error() _STLP_NOTHROW_INHERENTLY
_Rep_type::iterator iterator
Definition: _set.h:73
Definition: _slist.h:57
~underflow_error() _STLP_NOTHROW_INHERENTLY
#define TRUE
Definition: types.h:120
#define APIENTRY
Definition: api.h:79
HMODULE hModule
Definition: animate.c:44
#define DLL_THREAD_DETACH
Definition: compat.h:133
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define DLL_PROCESS_DETACH
Definition: compat.h:130
#define DLL_THREAD_ATTACH
Definition: compat.h:132
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
#define FORCE_SYMBOL
Definition: dll_main.cpp:207
#define _STLP_NOTHROW_INHERENTLY
Definition: features.h:858
#define _STLP_MOVE_TO_STD_NAMESPACE
Definition: features.h:525
#define _STLP_CLASS_DECLSPEC
Definition: features.h:983
#define _STLP_BEGIN_NAMESPACE
Definition: features.h:501
#define _STLP_END_NAMESPACE
Definition: features.h:503
#define _STLP_DECLSPEC
Definition: features.h:982
#define _STLP_MOVE_TO_PRIV_NAMESPACE
Definition: features.h:524
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
_CRTIMP void __cdecl unexpected(void)
_CRTIMP unexpected_function __cdecl set_unexpected(unexpected_function _NewPtFunc)
void(__cdecl * unexpected_handler)(void)
Definition: eh.h:22
BOOL WINAPI DllMain(IN HINSTANCE hinstDLL, IN DWORD dwReason, IN LPVOID lpvReserved)
Definition: kbsdll.c:95
Definition: features.h:417
#define const
Definition: zconf.h:233