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,222 @@
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 instances.cpp
15
+ * VERSION see <boost/version.hpp>
16
+ * DESCRIPTION: Defines those template instances that are placed in the
17
+ * library rather than in the users object files.
18
+ */
19
+
20
+ //
21
+ // note no include guard, we may include this multiple times:
22
+ //
23
+ #ifndef BOOST_REGEX_NO_EXTERNAL_TEMPLATES
24
+
25
+ namespace boost{
26
+
27
+ //
28
+ // this header can be included multiple times, each time with
29
+ // a different character type, BOOST_REGEX_CHAR_T must be defined
30
+ // first:
31
+ //
32
+ #ifndef BOOST_REGEX_CHAR_T
33
+ # error "BOOST_REGEX_CHAR_T not defined"
34
+ #endif
35
+
36
+ #ifndef BOOST_REGEX_TRAITS_T
37
+ # define BOOST_REGEX_TRAITS_T , boost::regex_traits<BOOST_REGEX_CHAR_T >
38
+ #endif
39
+
40
+ //
41
+ // what follows is compiler specific:
42
+ //
43
+
44
+ #if defined(__BORLANDC__) && (__BORLANDC__ < 0x600)
45
+
46
+ #ifdef BOOST_HAS_ABI_HEADERS
47
+ # include BOOST_ABI_PREFIX
48
+ #endif
49
+
50
+ # ifndef BOOST_REGEX_INSTANTIATE
51
+ # pragma option push -Jgx
52
+ # endif
53
+
54
+ template class BOOST_REGEX_DECL basic_regex< BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >;
55
+ template class BOOST_REGEX_DECL match_results< const BOOST_REGEX_CHAR_T* >;
56
+ #ifndef BOOST_NO_STD_ALLOCATOR
57
+ template class BOOST_REGEX_DECL ::boost::re_detail::perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >;
58
+ #endif
59
+
60
+ # ifndef BOOST_REGEX_INSTANTIATE
61
+ # pragma option pop
62
+ # endif
63
+
64
+ #ifdef BOOST_HAS_ABI_HEADERS
65
+ # include BOOST_ABI_SUFFIX
66
+ #endif
67
+
68
+ #elif defined(BOOST_MSVC) || defined(__ICL)
69
+
70
+ # ifndef BOOST_REGEX_INSTANTIATE
71
+ # ifdef __GNUC__
72
+ # define template __extension__ extern template
73
+ # else
74
+ # if BOOST_MSVC > 1310
75
+ # define BOOST_REGEX_TEMPLATE_DECL
76
+ # endif
77
+ # define template extern template
78
+ # endif
79
+ # endif
80
+
81
+ #ifndef BOOST_REGEX_TEMPLATE_DECL
82
+ # define BOOST_REGEX_TEMPLATE_DECL BOOST_REGEX_DECL
83
+ #endif
84
+
85
+ # ifdef BOOST_MSVC
86
+ # pragma warning(push)
87
+ # pragma warning(disable : 4251 4231)
88
+ # if BOOST_MSVC < 1600
89
+ # pragma warning(disable : 4660)
90
+ # endif
91
+ # endif
92
+
93
+ template class BOOST_REGEX_TEMPLATE_DECL basic_regex< BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >;
94
+
95
+ #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
96
+ template class BOOST_REGEX_TEMPLATE_DECL match_results< const BOOST_REGEX_CHAR_T* >;
97
+ #endif
98
+ #ifndef BOOST_NO_STD_ALLOCATOR
99
+ template class BOOST_REGEX_TEMPLATE_DECL ::boost::re_detail::perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >;
100
+ #endif
101
+ #if !(defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB <= 1))\
102
+ && !(defined(BOOST_INTEL_CXX_VERSION) && (BOOST_INTEL_CXX_VERSION <= 800))\
103
+ && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))\
104
+ && !defined(BOOST_REGEX_ICU_INSTANCES)
105
+ #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
106
+ template class BOOST_REGEX_TEMPLATE_DECL match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >;
107
+ #endif
108
+ #ifndef BOOST_NO_STD_ALLOCATOR
109
+ template class BOOST_REGEX_TEMPLATE_DECL ::boost::re_detail::perl_matcher< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >;
110
+ #endif
111
+ #endif
112
+
113
+
114
+ # ifdef BOOST_MSVC
115
+ # pragma warning(pop)
116
+ # endif
117
+
118
+ # ifdef template
119
+ # undef template
120
+ # endif
121
+
122
+ #undef BOOST_REGEX_TEMPLATE_DECL
123
+
124
+ #elif (defined(__GNUC__) && (__GNUC__ >= 3)) || !defined(BOOST_NO_CXX11_EXTERN_TEMPLATE)
125
+
126
+ # ifndef BOOST_REGEX_INSTANTIATE
127
+ # ifdef __GNUC__
128
+ # define template __extension__ extern template
129
+ # else
130
+ # define template extern template
131
+ # endif
132
+ # endif
133
+
134
+ #if !defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_REGEX_ICU_INSTANCES)
135
+ namespace re_detail{
136
+ template BOOST_REGEX_DECL
137
+ std::locale cpp_regex_traits_base<BOOST_REGEX_CHAR_T>::imbue(const std::locale& l);
138
+
139
+ template BOOST_REGEX_DECL
140
+ cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::string_type
141
+ cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::transform_primary(const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2) const;
142
+ template BOOST_REGEX_DECL
143
+ cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::string_type
144
+ cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::transform(const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2) const;
145
+ template BOOST_REGEX_DECL
146
+ cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::string_type
147
+ cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::lookup_collatename(const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2) const;
148
+ template BOOST_REGEX_DECL
149
+ void cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::init();
150
+ template BOOST_REGEX_DECL
151
+ cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::char_class_type
152
+ cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::lookup_classname_imp(const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2) const;
153
+ #ifdef BOOST_REGEX_BUGGY_CTYPE_FACET
154
+ template BOOST_REGEX_DECL
155
+ bool cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::isctype(const BOOST_REGEX_CHAR_T c, char_class_type mask) const;
156
+ #endif
157
+ } // namespace
158
+ template BOOST_REGEX_DECL
159
+ int cpp_regex_traits<BOOST_REGEX_CHAR_T>::toi(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last, int radix)const;
160
+ template BOOST_REGEX_DECL
161
+ std::string cpp_regex_traits<BOOST_REGEX_CHAR_T>::catalog_name(const std::string& name);
162
+ template BOOST_REGEX_DECL
163
+ std::string& cpp_regex_traits<BOOST_REGEX_CHAR_T>::get_catalog_name_inst();
164
+ template BOOST_REGEX_DECL
165
+ std::string cpp_regex_traits<BOOST_REGEX_CHAR_T>::get_catalog_name();
166
+ #ifdef BOOST_HAS_THREADS
167
+ template BOOST_REGEX_DECL
168
+ static_mutex& cpp_regex_traits<BOOST_REGEX_CHAR_T>::get_mutex_inst();
169
+ #endif
170
+ #endif
171
+
172
+ template BOOST_REGEX_DECL basic_regex<BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >&
173
+ basic_regex<BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >::do_assign(
174
+ const BOOST_REGEX_CHAR_T* p1,
175
+ const BOOST_REGEX_CHAR_T* p2,
176
+ flag_type f);
177
+ template BOOST_REGEX_DECL basic_regex<BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >::locale_type BOOST_REGEX_CALL
178
+ basic_regex<BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >::imbue(locale_type l);
179
+
180
+ template BOOST_REGEX_DECL void BOOST_REGEX_CALL
181
+ match_results<const BOOST_REGEX_CHAR_T*>::maybe_assign(
182
+ const match_results<const BOOST_REGEX_CHAR_T*>& m);
183
+
184
+ namespace re_detail{
185
+ template BOOST_REGEX_DECL void perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >::construct_init(
186
+ const basic_regex<BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >& e, match_flag_type f);
187
+ template BOOST_REGEX_DECL bool perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >::match();
188
+ template BOOST_REGEX_DECL bool perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >::find();
189
+ } // namespace
190
+
191
+ #if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) \
192
+ && !defined(BOOST_REGEX_ICU_INSTANCES)\
193
+ && !defined(__SGI_STL_PORT)\
194
+ && !defined(_STLPORT_VERSION)
195
+ // std:basic_string<>::const_iterator instances as well:
196
+ template BOOST_REGEX_DECL void BOOST_REGEX_CALL
197
+ match_results<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>::maybe_assign(
198
+ const match_results<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>& m);
199
+
200
+ namespace re_detail{
201
+ template BOOST_REGEX_DECL void perl_matcher<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >::construct_init(
202
+ const basic_regex<BOOST_REGEX_CHAR_T>& e, match_flag_type f);
203
+ template BOOST_REGEX_DECL bool perl_matcher<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >::match();
204
+ template BOOST_REGEX_DECL bool perl_matcher<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >::find();
205
+ } // namespace
206
+ #endif
207
+
208
+ # ifdef template
209
+ # undef template
210
+ # endif
211
+
212
+
213
+ #endif
214
+
215
+ } // namespace boost
216
+
217
+ #endif // BOOST_REGEX_NO_EXTERNAL_TEMPLATES
218
+
219
+
220
+
221
+
222
+
@@ -0,0 +1,91 @@
1
+ /*
2
+ *
3
+ * Copyright (c) 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 regex_match.hpp
15
+ * VERSION see <boost/version.hpp>
16
+ * DESCRIPTION: Iterator traits for selecting an iterator type as
17
+ * an integral constant expression.
18
+ */
19
+
20
+
21
+ #ifndef BOOST_REGEX_ITERATOR_CATEGORY_HPP
22
+ #define BOOST_REGEX_ITERATOR_CATEGORY_HPP
23
+
24
+ #include <iterator>
25
+ #include <boost/type_traits/is_convertible.hpp>
26
+ #include <boost/type_traits/is_pointer.hpp>
27
+
28
+ namespace boost{
29
+ namespace detail{
30
+
31
+ template <class I>
32
+ struct is_random_imp
33
+ {
34
+ #ifndef BOOST_NO_STD_ITERATOR_TRAITS
35
+ private:
36
+ typedef typename std::iterator_traits<I>::iterator_category cat;
37
+ public:
38
+ BOOST_STATIC_CONSTANT(bool, value = (::boost::is_convertible<cat*, std::random_access_iterator_tag*>::value));
39
+ #else
40
+ BOOST_STATIC_CONSTANT(bool, value = false);
41
+ #endif
42
+ };
43
+
44
+ template <class I>
45
+ struct is_random_pointer_imp
46
+ {
47
+ BOOST_STATIC_CONSTANT(bool, value = true);
48
+ };
49
+
50
+ template <bool is_pointer_type>
51
+ struct is_random_imp_selector
52
+ {
53
+ template <class I>
54
+ struct rebind
55
+ {
56
+ typedef is_random_imp<I> type;
57
+ };
58
+ };
59
+
60
+ template <>
61
+ struct is_random_imp_selector<true>
62
+ {
63
+ template <class I>
64
+ struct rebind
65
+ {
66
+ typedef is_random_pointer_imp<I> type;
67
+ };
68
+ };
69
+
70
+ }
71
+
72
+ template <class I>
73
+ struct is_random_access_iterator
74
+ {
75
+ private:
76
+ typedef detail::is_random_imp_selector< ::boost::is_pointer<I>::value> selector;
77
+ typedef typename selector::template rebind<I> bound_type;
78
+ typedef typename bound_type::type answer;
79
+ public:
80
+ BOOST_STATIC_CONSTANT(bool, value = answer::value);
81
+ };
82
+
83
+ #ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
84
+ template <class I>
85
+ const bool is_random_access_iterator<I>::value;
86
+ #endif
87
+
88
+ }
89
+
90
+ #endif
91
+
@@ -0,0 +1,135 @@
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 iterator_traits.cpp
15
+ * VERSION see <boost/version.hpp>
16
+ * DESCRIPTION: Declares iterator traits workarounds.
17
+ */
18
+
19
+ #ifndef BOOST_REGEX_V4_ITERATOR_TRAITS_HPP
20
+ #define BOOST_REGEX_V4_ITERATOR_TRAITS_HPP
21
+
22
+ #ifdef BOOST_MSVC
23
+ #pragma warning(push)
24
+ #pragma warning(disable: 4103)
25
+ #endif
26
+ #ifdef BOOST_HAS_ABI_HEADERS
27
+ # include BOOST_ABI_PREFIX
28
+ #endif
29
+ #ifdef BOOST_MSVC
30
+ #pragma warning(pop)
31
+ #endif
32
+
33
+ namespace boost{
34
+ namespace re_detail{
35
+
36
+ #if defined(BOOST_NO_STD_ITERATOR_TRAITS) || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
37
+
38
+ template <class T>
39
+ struct regex_iterator_traits
40
+ {
41
+ typedef typename T::iterator_category iterator_category;
42
+ typedef typename T::value_type value_type;
43
+ #if !defined(BOOST_NO_STD_ITERATOR)
44
+ typedef typename T::difference_type difference_type;
45
+ typedef typename T::pointer pointer;
46
+ typedef typename T::reference reference;
47
+ #else
48
+ typedef std::ptrdiff_t difference_type;
49
+ typedef value_type* pointer;
50
+ typedef value_type& reference;
51
+ #endif
52
+ };
53
+
54
+ template <class T>
55
+ struct pointer_iterator_traits
56
+ {
57
+ typedef std::ptrdiff_t difference_type;
58
+ typedef T value_type;
59
+ typedef T* pointer;
60
+ typedef T& reference;
61
+ typedef std::random_access_iterator_tag iterator_category;
62
+ };
63
+ template <class T>
64
+ struct const_pointer_iterator_traits
65
+ {
66
+ typedef std::ptrdiff_t difference_type;
67
+ typedef T value_type;
68
+ typedef const T* pointer;
69
+ typedef const T& reference;
70
+ typedef std::random_access_iterator_tag iterator_category;
71
+ };
72
+
73
+ template<>
74
+ struct regex_iterator_traits<char*> : pointer_iterator_traits<char>{};
75
+ template<>
76
+ struct regex_iterator_traits<const char*> : const_pointer_iterator_traits<char>{};
77
+ template<>
78
+ struct regex_iterator_traits<wchar_t*> : pointer_iterator_traits<wchar_t>{};
79
+ template<>
80
+ struct regex_iterator_traits<const wchar_t*> : const_pointer_iterator_traits<wchar_t>{};
81
+ //
82
+ // the follwoing are needed for ICU support:
83
+ //
84
+ template<>
85
+ struct regex_iterator_traits<unsigned char*> : pointer_iterator_traits<char>{};
86
+ template<>
87
+ struct regex_iterator_traits<const unsigned char*> : const_pointer_iterator_traits<char>{};
88
+ template<>
89
+ struct regex_iterator_traits<int*> : pointer_iterator_traits<int>{};
90
+ template<>
91
+ struct regex_iterator_traits<const int*> : const_pointer_iterator_traits<int>{};
92
+
93
+ #ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
94
+ template<>
95
+ struct regex_iterator_traits<unsigned short*> : pointer_iterator_traits<unsigned short>{};
96
+ template<>
97
+ struct regex_iterator_traits<const unsigned short*> : const_pointer_iterator_traits<unsigned short>{};
98
+ #endif
99
+
100
+ #if defined(__SGI_STL_PORT) && defined(__STL_DEBUG)
101
+ template<>
102
+ struct regex_iterator_traits<std::string::iterator> : pointer_iterator_traits<char>{};
103
+ template<>
104
+ struct regex_iterator_traits<std::string::const_iterator> : const_pointer_iterator_traits<char>{};
105
+ #ifndef BOOST_NO_STD_WSTRING
106
+ template<>
107
+ struct regex_iterator_traits<std::wstring::iterator> : pointer_iterator_traits<wchar_t>{};
108
+ template<>
109
+ struct regex_iterator_traits<std::wstring::const_iterator> : const_pointer_iterator_traits<wchar_t>{};
110
+ #endif // BOOST_NO_WSTRING
111
+ #endif // stport
112
+
113
+ #else
114
+
115
+ template <class T>
116
+ struct regex_iterator_traits : public std::iterator_traits<T> {};
117
+
118
+ #endif
119
+
120
+ } // namespace re_detail
121
+ } // namespace boost
122
+
123
+ #ifdef BOOST_MSVC
124
+ #pragma warning(push)
125
+ #pragma warning(disable: 4103)
126
+ #endif
127
+ #ifdef BOOST_HAS_ABI_HEADERS
128
+ # include BOOST_ABI_SUFFIX
129
+ #endif
130
+ #ifdef BOOST_MSVC
131
+ #pragma warning(pop)
132
+ #endif
133
+
134
+ #endif
135
+
@@ -0,0 +1,138 @@
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 match_flags.hpp
15
+ * VERSION see <boost/version.hpp>
16
+ * DESCRIPTION: Declares match_flags type.
17
+ */
18
+
19
+ #ifndef BOOST_REGEX_V4_MATCH_FLAGS
20
+ #define BOOST_REGEX_V4_MATCH_FLAGS
21
+
22
+ #ifdef __cplusplus
23
+ # include <boost/cstdint.hpp>
24
+ #endif
25
+
26
+ #ifdef __cplusplus
27
+ namespace boost{
28
+ namespace regex_constants{
29
+ #endif
30
+
31
+ typedef enum _match_flags
32
+ {
33
+ match_default = 0,
34
+ match_not_bol = 1, /* first is not start of line */
35
+ match_not_eol = match_not_bol << 1, /* last is not end of line */
36
+ match_not_bob = match_not_eol << 1, /* first is not start of buffer */
37
+ match_not_eob = match_not_bob << 1, /* last is not end of buffer */
38
+ match_not_bow = match_not_eob << 1, /* first is not start of word */
39
+ match_not_eow = match_not_bow << 1, /* last is not end of word */
40
+ match_not_dot_newline = match_not_eow << 1, /* \n is not matched by '.' */
41
+ match_not_dot_null = match_not_dot_newline << 1, /* '\0' is not matched by '.' */
42
+ match_prev_avail = match_not_dot_null << 1, /* *--first is a valid expression */
43
+ match_init = match_prev_avail << 1, /* internal use */
44
+ match_any = match_init << 1, /* don't care what we match */
45
+ match_not_null = match_any << 1, /* string can't be null */
46
+ match_continuous = match_not_null << 1, /* each grep match must continue from */
47
+ /* uninterupted from the previous one */
48
+ match_partial = match_continuous << 1, /* find partial matches */
49
+
50
+ match_stop = match_partial << 1, /* stop after first match (grep) V3 only */
51
+ match_not_initial_null = match_stop, /* don't match initial null, V4 only */
52
+ match_all = match_stop << 1, /* must find the whole of input even if match_any is set */
53
+ match_perl = match_all << 1, /* Use perl matching rules */
54
+ match_posix = match_perl << 1, /* Use POSIX matching rules */
55
+ match_nosubs = match_posix << 1, /* don't trap marked subs */
56
+ match_extra = match_nosubs << 1, /* include full capture information for repeated captures */
57
+ match_single_line = match_extra << 1, /* treat text as single line and ignor any \n's when matching ^ and $. */
58
+ match_unused1 = match_single_line << 1, /* unused */
59
+ match_unused2 = match_unused1 << 1, /* unused */
60
+ match_unused3 = match_unused2 << 1, /* unused */
61
+ match_max = match_unused3,
62
+
63
+ format_perl = 0, /* perl style replacement */
64
+ format_default = 0, /* ditto. */
65
+ format_sed = match_max << 1, /* sed style replacement. */
66
+ format_all = format_sed << 1, /* enable all extentions to sytax. */
67
+ format_no_copy = format_all << 1, /* don't copy non-matching segments. */
68
+ format_first_only = format_no_copy << 1, /* Only replace first occurance. */
69
+ format_is_if = format_first_only << 1, /* internal use only. */
70
+ format_literal = format_is_if << 1 /* treat string as a literal */
71
+
72
+ } match_flags;
73
+
74
+ #if (defined(_MSC_VER) && (_MSC_VER < 1300)) || defined(__BORLANDC__)
75
+ typedef unsigned long match_flag_type;
76
+ #else
77
+ typedef match_flags match_flag_type;
78
+
79
+
80
+ #ifdef __cplusplus
81
+ inline match_flags operator&(match_flags m1, match_flags m2)
82
+ { return static_cast<match_flags>(static_cast<boost::int32_t>(m1) & static_cast<boost::int32_t>(m2)); }
83
+ inline match_flags operator|(match_flags m1, match_flags m2)
84
+ { return static_cast<match_flags>(static_cast<boost::int32_t>(m1) | static_cast<boost::int32_t>(m2)); }
85
+ inline match_flags operator^(match_flags m1, match_flags m2)
86
+ { return static_cast<match_flags>(static_cast<boost::int32_t>(m1) ^ static_cast<boost::int32_t>(m2)); }
87
+ inline match_flags operator~(match_flags m1)
88
+ { return static_cast<match_flags>(~static_cast<boost::int32_t>(m1)); }
89
+ inline match_flags& operator&=(match_flags& m1, match_flags m2)
90
+ { m1 = m1&m2; return m1; }
91
+ inline match_flags& operator|=(match_flags& m1, match_flags m2)
92
+ { m1 = m1|m2; return m1; }
93
+ inline match_flags& operator^=(match_flags& m1, match_flags m2)
94
+ { m1 = m1^m2; return m1; }
95
+ #endif
96
+ #endif
97
+
98
+ #ifdef __cplusplus
99
+ } /* namespace regex_constants */
100
+ /*
101
+ * import names into boost for backwards compatiblity:
102
+ */
103
+ using regex_constants::match_flag_type;
104
+ using regex_constants::match_default;
105
+ using regex_constants::match_not_bol;
106
+ using regex_constants::match_not_eol;
107
+ using regex_constants::match_not_bob;
108
+ using regex_constants::match_not_eob;
109
+ using regex_constants::match_not_bow;
110
+ using regex_constants::match_not_eow;
111
+ using regex_constants::match_not_dot_newline;
112
+ using regex_constants::match_not_dot_null;
113
+ using regex_constants::match_prev_avail;
114
+ /* using regex_constants::match_init; */
115
+ using regex_constants::match_any;
116
+ using regex_constants::match_not_null;
117
+ using regex_constants::match_continuous;
118
+ using regex_constants::match_partial;
119
+ /*using regex_constants::match_stop; */
120
+ using regex_constants::match_all;
121
+ using regex_constants::match_perl;
122
+ using regex_constants::match_posix;
123
+ using regex_constants::match_nosubs;
124
+ using regex_constants::match_extra;
125
+ using regex_constants::match_single_line;
126
+ /*using regex_constants::match_max; */
127
+ using regex_constants::format_all;
128
+ using regex_constants::format_sed;
129
+ using regex_constants::format_perl;
130
+ using regex_constants::format_default;
131
+ using regex_constants::format_no_copy;
132
+ using regex_constants::format_first_only;
133
+ /*using regex_constants::format_is_if;*/
134
+
135
+ } /* namespace boost */
136
+ #endif /* __cplusplus */
137
+ #endif /* include guard */
138
+