passenger 4.0.27 → 4.0.28

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of passenger might be problematic. Click here for more details.

Files changed (156) hide show
  1. data.tar.gz.asc +7 -7
  2. data/.gitignore +1 -0
  3. data/NEWS +22 -0
  4. data/build/preprocessor.rb +10 -0
  5. data/build/rpm.rb +74 -65
  6. data/debian.template/rules.template +8 -0
  7. data/dev/copy_boost_headers.rb +11 -2
  8. data/doc/Users guide Apache.idmap.txt +161 -145
  9. data/doc/Users guide Apache.txt +12 -1
  10. data/doc/Users guide Nginx.idmap.txt +142 -126
  11. data/doc/Users guide Nginx.txt +14 -1
  12. data/doc/Users guide Standalone.txt +1 -0
  13. data/doc/users_guide_snippets/environment_variables.txt +1 -1
  14. data/doc/users_guide_snippets/installation.txt +2 -0
  15. data/doc/users_guide_snippets/tips.txt +118 -0
  16. data/ext/apache2/Configuration.cpp +0 -6
  17. data/ext/apache2/Configuration.hpp +0 -5
  18. data/ext/apache2/ConfigurationCommands.cpp +7 -0
  19. data/ext/apache2/ConfigurationFields.hpp +2 -0
  20. data/ext/apache2/ConfigurationSetters.cpp +24 -0
  21. data/ext/apache2/CreateDirConfig.cpp +1 -0
  22. data/ext/apache2/Hooks.cpp +0 -1
  23. data/ext/apache2/MergeDirConfig.cpp +7 -0
  24. data/ext/apache2/SetHeaders.cpp +5 -1
  25. data/ext/boost/cregex.hpp +39 -0
  26. data/ext/boost/libs/regex/src/c_regex_traits.cpp +193 -0
  27. data/ext/boost/libs/regex/src/cpp_regex_traits.cpp +117 -0
  28. data/ext/boost/libs/regex/src/cregex.cpp +660 -0
  29. data/ext/boost/libs/regex/src/instances.cpp +32 -0
  30. data/ext/boost/libs/regex/src/internals.hpp +35 -0
  31. data/ext/boost/libs/regex/src/posix_api.cpp +296 -0
  32. data/ext/boost/libs/regex/src/regex.cpp +227 -0
  33. data/ext/boost/libs/regex/src/regex_debug.cpp +59 -0
  34. data/ext/boost/libs/regex/src/regex_raw_buffer.cpp +72 -0
  35. data/ext/boost/libs/regex/src/regex_traits_defaults.cpp +692 -0
  36. data/ext/boost/libs/regex/src/static_mutex.cpp +179 -0
  37. data/ext/boost/libs/regex/src/wc_regex_traits.cpp +301 -0
  38. data/ext/boost/libs/regex/src/wide_posix_api.cpp +315 -0
  39. data/ext/boost/libs/regex/src/winstances.cpp +35 -0
  40. data/ext/boost/regex.h +100 -0
  41. data/ext/boost/regex.hpp +37 -0
  42. data/ext/boost/regex/concepts.hpp +1128 -0
  43. data/ext/boost/regex/config.hpp +435 -0
  44. data/ext/boost/regex/config/borland.hpp +72 -0
  45. data/ext/boost/regex/config/cwchar.hpp +207 -0
  46. data/ext/boost/regex/mfc.hpp +190 -0
  47. data/ext/boost/regex/pattern_except.hpp +100 -0
  48. data/ext/boost/regex/pending/object_cache.hpp +165 -0
  49. data/ext/boost/regex/pending/static_mutex.hpp +179 -0
  50. data/ext/boost/regex/pending/unicode_iterator.hpp +776 -0
  51. data/ext/boost/regex/regex_traits.hpp +35 -0
  52. data/ext/boost/regex/user.hpp +93 -0
  53. data/ext/boost/regex/v4/basic_regex.hpp +782 -0
  54. data/ext/boost/regex/v4/basic_regex_creator.hpp +1571 -0
  55. data/ext/boost/regex/v4/basic_regex_parser.hpp +2874 -0
  56. data/ext/boost/regex/v4/c_regex_traits.hpp +211 -0
  57. data/ext/boost/regex/v4/char_regex_traits.hpp +81 -0
  58. data/ext/boost/regex/v4/cpp_regex_traits.hpp +1099 -0
  59. data/ext/boost/regex/v4/cregex.hpp +330 -0
  60. data/ext/boost/regex/v4/error_type.hpp +59 -0
  61. data/ext/boost/regex/v4/fileiter.hpp +455 -0
  62. data/ext/boost/regex/v4/instances.hpp +222 -0
  63. data/ext/boost/regex/v4/iterator_category.hpp +91 -0
  64. data/ext/boost/regex/v4/iterator_traits.hpp +135 -0
  65. data/ext/boost/regex/v4/match_flags.hpp +138 -0
  66. data/ext/boost/regex/v4/match_results.hpp +702 -0
  67. data/ext/boost/regex/v4/mem_block_cache.hpp +99 -0
  68. data/ext/boost/regex/v4/perl_matcher.hpp +587 -0
  69. data/ext/boost/regex/v4/perl_matcher_common.hpp +996 -0
  70. data/ext/boost/regex/v4/perl_matcher_non_recursive.hpp +1642 -0
  71. data/ext/boost/regex/v4/perl_matcher_recursive.hpp +991 -0
  72. data/ext/boost/regex/v4/primary_transform.hpp +146 -0
  73. data/ext/boost/regex/v4/protected_call.hpp +81 -0
  74. data/ext/boost/regex/v4/regbase.hpp +180 -0
  75. data/ext/boost/regex/v4/regex.hpp +202 -0
  76. data/ext/boost/regex/v4/regex_format.hpp +1156 -0
  77. data/ext/boost/regex/v4/regex_fwd.hpp +73 -0
  78. data/ext/boost/regex/v4/regex_grep.hpp +155 -0
  79. data/ext/boost/regex/v4/regex_iterator.hpp +201 -0
  80. data/ext/boost/regex/v4/regex_match.hpp +382 -0
  81. data/ext/boost/regex/v4/regex_merge.hpp +93 -0
  82. data/ext/boost/regex/v4/regex_raw_buffer.hpp +210 -0
  83. data/ext/boost/regex/v4/regex_replace.hpp +99 -0
  84. data/ext/boost/regex/v4/regex_search.hpp +217 -0
  85. data/ext/boost/regex/v4/regex_split.hpp +172 -0
  86. data/ext/boost/regex/v4/regex_token_iterator.hpp +342 -0
  87. data/ext/boost/regex/v4/regex_traits.hpp +189 -0
  88. data/ext/boost/regex/v4/regex_traits_defaults.hpp +371 -0
  89. data/ext/boost/regex/v4/regex_workaround.hpp +232 -0
  90. data/ext/boost/regex/v4/states.hpp +301 -0
  91. data/ext/boost/regex/v4/sub_match.hpp +512 -0
  92. data/ext/boost/regex/v4/syntax_type.hpp +105 -0
  93. data/ext/boost/regex/v4/u32regex_iterator.hpp +193 -0
  94. data/ext/boost/regex/v4/u32regex_token_iterator.hpp +377 -0
  95. data/ext/boost/regex/v4/w32_regex_traits.hpp +741 -0
  96. data/ext/boost/regex_fwd.hpp +33 -0
  97. data/ext/common/AgentsStarter.h +0 -11
  98. data/ext/common/ApplicationPool2/Common.h +1 -7
  99. data/ext/common/ApplicationPool2/DirectSpawner.h +3 -3
  100. data/ext/common/ApplicationPool2/Group.h +166 -69
  101. data/ext/common/ApplicationPool2/Implementation.cpp +55 -10
  102. data/ext/common/ApplicationPool2/Options.h +45 -10
  103. data/ext/common/ApplicationPool2/PipeWatcher.h +1 -2
  104. data/ext/common/ApplicationPool2/Pool.h +29 -7
  105. data/ext/common/ApplicationPool2/Process.h +22 -3
  106. data/ext/common/ApplicationPool2/Session.h +1 -0
  107. data/ext/common/ApplicationPool2/SmartSpawner.h +5 -10
  108. data/ext/common/ApplicationPool2/Spawner.h +10 -15
  109. data/ext/common/ApplicationPool2/SuperGroup.h +10 -9
  110. data/ext/common/Constants.h +1 -3
  111. data/ext/common/Hooks.h +193 -0
  112. data/ext/common/Logging.cpp +67 -2
  113. data/ext/common/Logging.h +23 -1
  114. data/ext/common/Utils.cpp +0 -21
  115. data/ext/common/Utils.h +0 -42
  116. data/ext/common/Utils/CachedFileStat.hpp +1 -1
  117. data/ext/common/Utils/StrIntUtils.h +61 -14
  118. data/ext/common/Utils/StringMap.h +4 -0
  119. data/ext/common/agents/HelperAgent/AgentOptions.h +4 -4
  120. data/ext/common/agents/HelperAgent/Main.cpp +2 -3
  121. data/ext/common/agents/HelperAgent/RequestHandler.h +65 -2
  122. data/ext/common/agents/LoggingAgent/FilterSupport.h +3 -1
  123. data/ext/common/agents/Watchdog/Main.cpp +8 -72
  124. data/ext/nginx/CacheLocationConfig.c +29 -1
  125. data/ext/nginx/Configuration.c +0 -12
  126. data/ext/nginx/Configuration.h +0 -1
  127. data/ext/nginx/ConfigurationCommands.c +10 -0
  128. data/ext/nginx/ConfigurationFields.h +2 -0
  129. data/ext/nginx/CreateLocationConfig.c +4 -0
  130. data/ext/nginx/MergeLocationConfig.c +6 -0
  131. data/ext/oxt/system_calls.cpp +7 -1
  132. data/ext/oxt/system_calls.hpp +7 -7
  133. data/helper-scripts/node-loader.js +6 -2
  134. data/helper-scripts/rack-loader.rb +5 -2
  135. data/helper-scripts/rack-preloader.rb +5 -2
  136. data/lib/phusion_passenger.rb +1 -1
  137. data/lib/phusion_passenger/apache2/config_options.rb +8 -0
  138. data/lib/phusion_passenger/constants.rb +0 -1
  139. data/lib/phusion_passenger/nginx/config_options.rb +9 -2
  140. data/lib/phusion_passenger/platform_info/apache.rb +2 -1
  141. data/lib/phusion_passenger/platform_info/compiler.rb +15 -1
  142. data/lib/phusion_passenger/platform_info/cxx_portability.rb +2 -0
  143. data/node_lib/phusion_passenger/httplib_emulation.js +85 -17
  144. data/node_lib/phusion_passenger/request_handler.js +10 -2
  145. data/rpm/Vagrantfile +32 -0
  146. data/rpm/get_distro_id.py +4 -0
  147. data/test/cxx/ApplicationPool2/DirectSpawnerTest.cpp +2 -2
  148. data/test/cxx/ApplicationPool2/PoolTest.cpp +60 -9
  149. data/test/cxx/ApplicationPool2/SmartSpawnerTest.cpp +2 -6
  150. data/test/cxx/CachedFileStatTest.cpp +5 -5
  151. data/test/cxx/RequestHandlerTest.cpp +3 -6
  152. data/test/cxx/UtilsTest.cpp +30 -0
  153. data/test/node/httplib_emulation_spec.js +491 -0
  154. data/test/node/spec_helper.js +25 -0
  155. metadata +78 -2
  156. metadata.gz.asc +7 -7
@@ -0,0 +1,435 @@
1
+ /*
2
+ *
3
+ * Copyright (c) 1998-2002
4
+ * John Maddock
5
+ *
6
+ * Use, modification and distribution are subject to the
7
+ * Boost Software License, Version 1.0. (See accompanying file
8
+ * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9
+ *
10
+ */
11
+
12
+ /*
13
+ * LOCATION: see http://www.boost.org for most recent version.
14
+ * FILE config.hpp
15
+ * VERSION see <boost/version.hpp>
16
+ * DESCRIPTION: regex extended config setup.
17
+ */
18
+
19
+ #ifndef BOOST_REGEX_CONFIG_HPP
20
+ #define BOOST_REGEX_CONFIG_HPP
21
+ /*
22
+ * Borland C++ Fix/error check
23
+ * this has to go *before* we include any std lib headers:
24
+ */
25
+ #if defined(__BORLANDC__)
26
+ # include <boost/regex/config/borland.hpp>
27
+ #endif
28
+
29
+ /*****************************************************************************
30
+ *
31
+ * Include all the headers we need here:
32
+ *
33
+ ****************************************************************************/
34
+
35
+ #ifdef __cplusplus
36
+
37
+ # ifndef BOOST_REGEX_USER_CONFIG
38
+ # define BOOST_REGEX_USER_CONFIG <boost/regex/user.hpp>
39
+ # endif
40
+
41
+ # include BOOST_REGEX_USER_CONFIG
42
+
43
+ # include <boost/config.hpp>
44
+
45
+ #else
46
+ /*
47
+ * C build,
48
+ * don't include <boost/config.hpp> because that may
49
+ * do C++ specific things in future...
50
+ */
51
+ # include <stdlib.h>
52
+ # include <stddef.h>
53
+ # ifdef _MSC_VER
54
+ # define BOOST_MSVC _MSC_VER
55
+ # endif
56
+ #endif
57
+
58
+ /*****************************************************************************
59
+ *
60
+ * Boilerplate regex config options:
61
+ *
62
+ ****************************************************************************/
63
+
64
+ /* Obsolete macro, use BOOST_VERSION instead: */
65
+ #define BOOST_RE_VERSION 320
66
+
67
+ /* fix: */
68
+ #if defined(_UNICODE) && !defined(UNICODE)
69
+ #define UNICODE
70
+ #endif
71
+
72
+ /*
73
+ * Fix for gcc prior to 3.4: std::ctype<wchar_t> doesn't allow
74
+ * masks to be combined, for example:
75
+ * std::use_facet<std::ctype<wchar_t> >.is(std::ctype_base::lower|std::ctype_base::upper, L'a');
76
+ * returns *false*.
77
+ */
78
+ #ifdef __GLIBCPP__
79
+ # define BOOST_REGEX_BUGGY_CTYPE_FACET
80
+ #endif
81
+
82
+ /*
83
+ * Intel C++ before 8.0 ends up with unresolved externals unless we turn off
84
+ * extern template support:
85
+ */
86
+ #if defined(BOOST_INTEL) && defined(__cplusplus) && (BOOST_INTEL <= 800)
87
+ # define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
88
+ #endif
89
+ /*
90
+ * Visual C++ doesn't support external templates with C++ extensions turned off:
91
+ */
92
+ #if defined(_MSC_VER) && !defined(_MSC_EXTENSIONS)
93
+ # define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
94
+ #endif
95
+ /*
96
+ * Shared regex lib will crash without this, frankly it looks a lot like a gcc bug:
97
+ */
98
+ #if defined(__MINGW32__)
99
+ # define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
100
+ #endif
101
+
102
+ /*
103
+ * If there isn't good enough wide character support then there will
104
+ * be no wide character regular expressions:
105
+ */
106
+ #if (defined(BOOST_NO_CWCHAR) || defined(BOOST_NO_CWCTYPE) || defined(BOOST_NO_STD_WSTRING))
107
+ # if !defined(BOOST_NO_WREGEX)
108
+ # define BOOST_NO_WREGEX
109
+ # endif
110
+ #else
111
+ # if defined(__sgi) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
112
+ /* STLPort on IRIX is misconfigured: <cwctype> does not compile
113
+ * as a temporary fix include <wctype.h> instead and prevent inclusion
114
+ * of STLPort version of <cwctype> */
115
+ # include <wctype.h>
116
+ # define __STLPORT_CWCTYPE
117
+ # define _STLP_CWCTYPE
118
+ # endif
119
+
120
+ #ifdef __cplusplus
121
+ # include <boost/regex/config/cwchar.hpp>
122
+ #endif
123
+
124
+ #endif
125
+
126
+ /*
127
+ * If Win32 support has been disabled for boost in general, then
128
+ * it is for regex in particular:
129
+ */
130
+ #if defined(BOOST_DISABLE_WIN32) && !defined(BOOST_REGEX_NO_W32)
131
+ # define BOOST_REGEX_NO_W32
132
+ #endif
133
+
134
+ /* disable our own file-iterators and mapfiles if we can't
135
+ * support them: */
136
+ #if !defined(BOOST_HAS_DIRENT_H) && !(defined(_WIN32) && !defined(BOOST_REGEX_NO_W32))
137
+ # define BOOST_REGEX_NO_FILEITER
138
+ #endif
139
+
140
+ /* backwards compatibitity: */
141
+ #if defined(BOOST_RE_NO_LIB)
142
+ # define BOOST_REGEX_NO_LIB
143
+ #endif
144
+
145
+ #if defined(__GNUC__) && (defined(_WIN32) || defined(__CYGWIN__))
146
+ /* gcc on win32 has problems if you include <windows.h>
147
+ (sporadically generates bad code). */
148
+ # define BOOST_REGEX_NO_W32
149
+ #endif
150
+ #if defined(__COMO__) && !defined(BOOST_REGEX_NO_W32) && !defined(_MSC_EXTENSIONS)
151
+ # define BOOST_REGEX_NO_W32
152
+ #endif
153
+
154
+ /*****************************************************************************
155
+ *
156
+ * Wide character workarounds:
157
+ *
158
+ ****************************************************************************/
159
+
160
+ /*
161
+ * define BOOST_REGEX_HAS_OTHER_WCHAR_T when wchar_t is a native type, but the users
162
+ * code may be built with wchar_t as unsigned short: basically when we're building
163
+ * with MSVC and the /Zc:wchar_t option we place some extra unsigned short versions
164
+ * of the non-inline functions in the library, so that users can still link to the lib,
165
+ * irrespective of whether their own code is built with /Zc:wchar_t.
166
+ * Note that this does NOT WORK with VC10 when the C++ locale is in effect as
167
+ * the locale's <unsigned short> facets simply do not compile in that case.
168
+ */
169
+ #if defined(__cplusplus) && (defined(BOOST_MSVC) || defined(__ICL)) && !defined(BOOST_NO_INTRINSIC_WCHAR_T) && defined(BOOST_WINDOWS) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) && !defined(BOOST_RWSTD_VER) && ((_MSC_VER < 1600) || !defined(BOOST_REGEX_USE_CPP_LOCALE))
170
+ # define BOOST_REGEX_HAS_OTHER_WCHAR_T
171
+ # ifdef BOOST_MSVC
172
+ # pragma warning(push)
173
+ # pragma warning(disable : 4251 4231)
174
+ # if BOOST_MSVC < 1600
175
+ # pragma warning(disable : 4660)
176
+ # endif
177
+ # endif
178
+ # if defined(_DLL) && defined(BOOST_MSVC) && (BOOST_MSVC < 1600)
179
+ # include <string>
180
+ extern template class __declspec(dllimport) std::basic_string<unsigned short>;
181
+ # endif
182
+ # ifdef BOOST_MSVC
183
+ # pragma warning(pop)
184
+ # endif
185
+ #endif
186
+
187
+
188
+ /*****************************************************************************
189
+ *
190
+ * Set up dll import/export options:
191
+ *
192
+ ****************************************************************************/
193
+
194
+ #ifndef BOOST_SYMBOL_EXPORT
195
+ # define BOOST_SYMBOL_EXPORT
196
+ # define BOOST_SYMBOL_IMPORT
197
+ #endif
198
+
199
+ #if (defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && !defined(BOOST_REGEX_STATIC_LINK)
200
+ # if defined(BOOST_REGEX_SOURCE)
201
+ # define BOOST_REGEX_DECL BOOST_SYMBOL_EXPORT
202
+ # define BOOST_REGEX_BUILD_DLL
203
+ # else
204
+ # define BOOST_REGEX_DECL BOOST_SYMBOL_IMPORT
205
+ # endif
206
+ #else
207
+ # define BOOST_REGEX_DECL
208
+ #endif
209
+
210
+ #if !defined(BOOST_REGEX_NO_LIB) && !defined(BOOST_REGEX_SOURCE) && !defined(BOOST_ALL_NO_LIB) && defined(__cplusplus)
211
+ # define BOOST_LIB_NAME boost_regex
212
+ # if defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)
213
+ # define BOOST_DYN_LINK
214
+ # endif
215
+ # ifdef BOOST_REGEX_DIAG
216
+ # define BOOST_LIB_DIAGNOSTIC
217
+ # endif
218
+ # include <boost/config/auto_link.hpp>
219
+ #endif
220
+
221
+ /*****************************************************************************
222
+ *
223
+ * Set up function call type:
224
+ *
225
+ ****************************************************************************/
226
+
227
+ #if defined(BOOST_MSVC) && (BOOST_MSVC >= 1200) && defined(_MSC_EXTENSIONS)
228
+ #if defined(_DEBUG) || defined(__MSVC_RUNTIME_CHECKS) || defined(_MANAGED) || defined(BOOST_REGEX_NO_FASTCALL)
229
+ # define BOOST_REGEX_CALL __cdecl
230
+ #else
231
+ # define BOOST_REGEX_CALL __fastcall
232
+ #endif
233
+ # define BOOST_REGEX_CCALL __cdecl
234
+ #endif
235
+
236
+ #if defined(__BORLANDC__) && !defined(BOOST_DISABLE_WIN32)
237
+ # define BOOST_REGEX_CALL __fastcall
238
+ # define BOOST_REGEX_CCALL __stdcall
239
+ #endif
240
+
241
+ #ifndef BOOST_REGEX_CALL
242
+ # define BOOST_REGEX_CALL
243
+ #endif
244
+ #ifndef BOOST_REGEX_CCALL
245
+ #define BOOST_REGEX_CCALL
246
+ #endif
247
+
248
+ /*****************************************************************************
249
+ *
250
+ * Set up localisation model:
251
+ *
252
+ ****************************************************************************/
253
+
254
+ /* backwards compatibility: */
255
+ #ifdef BOOST_RE_LOCALE_C
256
+ # define BOOST_REGEX_USE_C_LOCALE
257
+ #endif
258
+
259
+ #ifdef BOOST_RE_LOCALE_CPP
260
+ # define BOOST_REGEX_USE_CPP_LOCALE
261
+ #endif
262
+
263
+ #if defined(__CYGWIN__)
264
+ # define BOOST_REGEX_USE_C_LOCALE
265
+ #endif
266
+
267
+ /* Win32 defaults to native Win32 locale: */
268
+ #if defined(_WIN32) && !defined(BOOST_REGEX_USE_WIN32_LOCALE) && !defined(BOOST_REGEX_USE_C_LOCALE) && !defined(BOOST_REGEX_USE_CPP_LOCALE) && !defined(BOOST_REGEX_NO_W32)
269
+ # define BOOST_REGEX_USE_WIN32_LOCALE
270
+ #endif
271
+ /* otherwise use C++ locale if supported: */
272
+ #if !defined(BOOST_REGEX_USE_WIN32_LOCALE) && !defined(BOOST_REGEX_USE_C_LOCALE) && !defined(BOOST_REGEX_USE_CPP_LOCALE) && !defined(BOOST_NO_STD_LOCALE)
273
+ # define BOOST_REGEX_USE_CPP_LOCALE
274
+ #endif
275
+ /* otherwise use C+ locale: */
276
+ #if !defined(BOOST_REGEX_USE_WIN32_LOCALE) && !defined(BOOST_REGEX_USE_C_LOCALE) && !defined(BOOST_REGEX_USE_CPP_LOCALE)
277
+ # define BOOST_REGEX_USE_C_LOCALE
278
+ #endif
279
+
280
+ #ifndef BOOST_REGEX_MAX_STATE_COUNT
281
+ # define BOOST_REGEX_MAX_STATE_COUNT 100000000
282
+ #endif
283
+
284
+
285
+ /*****************************************************************************
286
+ *
287
+ * Error Handling for exception free compilers:
288
+ *
289
+ ****************************************************************************/
290
+
291
+ #ifdef BOOST_NO_EXCEPTIONS
292
+ /*
293
+ * If there are no exceptions then we must report critical-errors
294
+ * the only way we know how; by terminating.
295
+ */
296
+ #include <stdexcept>
297
+ #include <string>
298
+ #include <boost/throw_exception.hpp>
299
+
300
+ # define BOOST_REGEX_NOEH_ASSERT(x)\
301
+ if(0 == (x))\
302
+ {\
303
+ std::string s("Error: critical regex++ failure in: ");\
304
+ s.append(#x);\
305
+ std::runtime_error e(s);\
306
+ boost::throw_exception(e);\
307
+ }
308
+ #else
309
+ /*
310
+ * With exceptions then error handling is taken care of and
311
+ * there is no need for these checks:
312
+ */
313
+ # define BOOST_REGEX_NOEH_ASSERT(x)
314
+ #endif
315
+
316
+
317
+ /*****************************************************************************
318
+ *
319
+ * Stack protection under MS Windows:
320
+ *
321
+ ****************************************************************************/
322
+
323
+ #if !defined(BOOST_REGEX_NO_W32) && !defined(BOOST_REGEX_V3)
324
+ # if(defined(_WIN32) || defined(_WIN64) || defined(_WINCE)) \
325
+ && !defined(__GNUC__) \
326
+ && !(defined(__BORLANDC__) && (__BORLANDC__ >= 0x600)) \
327
+ && !(defined(__MWERKS__) && (__MWERKS__ <= 0x3003))
328
+ # define BOOST_REGEX_HAS_MS_STACK_GUARD
329
+ # endif
330
+ #elif defined(BOOST_REGEX_HAS_MS_STACK_GUARD)
331
+ # undef BOOST_REGEX_HAS_MS_STACK_GUARD
332
+ #endif
333
+
334
+ #if defined(__cplusplus) && defined(BOOST_REGEX_HAS_MS_STACK_GUARD)
335
+
336
+ namespace boost{
337
+ namespace re_detail{
338
+
339
+ BOOST_REGEX_DECL void BOOST_REGEX_CALL reset_stack_guard_page();
340
+
341
+ }
342
+ }
343
+
344
+ #endif
345
+
346
+
347
+ /*****************************************************************************
348
+ *
349
+ * Algorithm selection and configuration:
350
+ *
351
+ ****************************************************************************/
352
+
353
+ #if !defined(BOOST_REGEX_RECURSIVE) && !defined(BOOST_REGEX_NON_RECURSIVE)
354
+ # if defined(BOOST_REGEX_HAS_MS_STACK_GUARD) && !defined(_STLP_DEBUG) && !defined(__STL_DEBUG) && !(defined(BOOST_MSVC) && (BOOST_MSVC >= 1400))
355
+ # define BOOST_REGEX_RECURSIVE
356
+ # else
357
+ # define BOOST_REGEX_NON_RECURSIVE
358
+ # endif
359
+ #endif
360
+
361
+ #ifdef BOOST_REGEX_NON_RECURSIVE
362
+ # ifdef BOOST_REGEX_RECURSIVE
363
+ # error "Can't set both BOOST_REGEX_RECURSIVE and BOOST_REGEX_NON_RECURSIVE"
364
+ # endif
365
+ # ifndef BOOST_REGEX_BLOCKSIZE
366
+ # define BOOST_REGEX_BLOCKSIZE 4096
367
+ # endif
368
+ # if BOOST_REGEX_BLOCKSIZE < 512
369
+ # error "BOOST_REGEX_BLOCKSIZE must be at least 512"
370
+ # endif
371
+ # ifndef BOOST_REGEX_MAX_BLOCKS
372
+ # define BOOST_REGEX_MAX_BLOCKS 1024
373
+ # endif
374
+ # ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
375
+ # undef BOOST_REGEX_HAS_MS_STACK_GUARD
376
+ # endif
377
+ # ifndef BOOST_REGEX_MAX_CACHE_BLOCKS
378
+ # define BOOST_REGEX_MAX_CACHE_BLOCKS 16
379
+ # endif
380
+ #endif
381
+
382
+
383
+ /*****************************************************************************
384
+ *
385
+ * helper memory allocation functions:
386
+ *
387
+ ****************************************************************************/
388
+
389
+ #if defined(__cplusplus) && defined(BOOST_REGEX_NON_RECURSIVE)
390
+ namespace boost{ namespace re_detail{
391
+
392
+ BOOST_REGEX_DECL void* BOOST_REGEX_CALL get_mem_block();
393
+ BOOST_REGEX_DECL void BOOST_REGEX_CALL put_mem_block(void*);
394
+
395
+ }} /* namespaces */
396
+ #endif
397
+
398
+ /*****************************************************************************
399
+ *
400
+ * Diagnostics:
401
+ *
402
+ ****************************************************************************/
403
+
404
+ #ifdef BOOST_REGEX_CONFIG_INFO
405
+ BOOST_REGEX_DECL void BOOST_REGEX_CALL print_regex_library_info();
406
+ #endif
407
+
408
+ #if defined(BOOST_REGEX_DIAG)
409
+ # pragma message ("BOOST_REGEX_DECL" BOOST_STRINGIZE(=BOOST_REGEX_DECL))
410
+ # pragma message ("BOOST_REGEX_CALL" BOOST_STRINGIZE(=BOOST_REGEX_CALL))
411
+ # pragma message ("BOOST_REGEX_CCALL" BOOST_STRINGIZE(=BOOST_REGEX_CCALL))
412
+ #ifdef BOOST_REGEX_USE_C_LOCALE
413
+ # pragma message ("Using C locale in regex traits class")
414
+ #elif BOOST_REGEX_USE_CPP_LOCALE
415
+ # pragma message ("Using C++ locale in regex traits class")
416
+ #else
417
+ # pragma message ("Using Win32 locale in regex traits class")
418
+ #endif
419
+ #if defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)
420
+ # pragma message ("Dynamic linking enabled")
421
+ #endif
422
+ #if defined(BOOST_REGEX_NO_LIB) || defined(BOOST_ALL_NO_LIB)
423
+ # pragma message ("Auto-linking disabled")
424
+ #endif
425
+ #ifdef BOOST_REGEX_NO_EXTERNAL_TEMPLATES
426
+ # pragma message ("Extern templates disabled")
427
+ #endif
428
+
429
+ #endif
430
+
431
+ #endif
432
+
433
+
434
+
435
+
@@ -0,0 +1,72 @@
1
+ /*
2
+ *
3
+ * Copyright (c) 1998-2002
4
+ * John Maddock
5
+ *
6
+ * Use, modification and distribution are subject to the
7
+ * Boost Software License, Version 1.0. (See accompanying file
8
+ * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9
+ *
10
+ */
11
+
12
+ /*
13
+ * LOCATION: see http://www.boost.org for most recent version.
14
+ * FILE boost/regex/config/borland.hpp
15
+ * VERSION see <boost/version.hpp>
16
+ * DESCRIPTION: regex borland-specific config setup.
17
+ */
18
+
19
+
20
+ #if defined(__BORLANDC__)
21
+ # if (__BORLANDC__ == 0x550) || (__BORLANDC__ == 0x551)
22
+ // problems with std::basic_string and dll RTL:
23
+ # if defined(_RTLDLL) && defined(_RWSTD_COMPILE_INSTANTIATE)
24
+ # ifdef BOOST_REGEX_BUILD_DLL
25
+ # error _RWSTD_COMPILE_INSTANTIATE must not be defined when building regex++ as a DLL
26
+ # else
27
+ # pragma message("Defining _RWSTD_COMPILE_INSTANTIATE when linking to the DLL version of the RTL may produce memory corruption problems in std::basic_string, as a result of separate versions of basic_string's static data in the RTL and you're exe/dll: be warned!!")
28
+ # endif
29
+ # endif
30
+ # ifndef _RTLDLL
31
+ // this is harmless for a staic link:
32
+ # define _RWSTD_COMPILE_INSTANTIATE
33
+ # endif
34
+ // external templates cause problems for some reason:
35
+ # define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
36
+ # endif
37
+ # if (__BORLANDC__ <= 0x540) && !defined(BOOST_REGEX_NO_LIB) && !defined(_NO_VCL)
38
+ // C++ Builder 4 and earlier, we can't tell whether we should be using
39
+ // the VCL runtime or not, do a static link instead:
40
+ # define BOOST_REGEX_STATIC_LINK
41
+ # endif
42
+ //
43
+ // VCL support:
44
+ // if we're building a console app then there can't be any VCL (can there?)
45
+ # if !defined(__CONSOLE__) && !defined(_NO_VCL)
46
+ # define BOOST_REGEX_USE_VCL
47
+ # endif
48
+ //
49
+ // if this isn't Win32 then don't automatically select link
50
+ // libraries:
51
+ //
52
+ # ifndef _Windows
53
+ # ifndef BOOST_REGEX_NO_LIB
54
+ # define BOOST_REGEX_NO_LIB
55
+ # endif
56
+ # ifndef BOOST_REGEX_STATIC_LINK
57
+ # define BOOST_REGEX_STATIC_LINK
58
+ # endif
59
+ # endif
60
+
61
+ #if __BORLANDC__ < 0x600
62
+ //
63
+ // string workarounds:
64
+ //
65
+ #include <cstring>
66
+ #undef strcmp
67
+ #undef strcpy
68
+ #endif
69
+
70
+ #endif
71
+
72
+