passenger 2.2.4 → 2.2.5

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 (105) hide show
  1. data/NEWS +137 -0
  2. data/Rakefile +101 -19
  3. data/bin/passenger-install-nginx-module +10 -3
  4. data/bin/passenger-make-enterprisey +1 -1
  5. data/doc/Users guide Apache.html +227 -92
  6. data/doc/Users guide Apache.txt +169 -75
  7. data/doc/Users guide Nginx.html +1 -1
  8. data/doc/cxxapi/Bucket_8h-source.html +1 -1
  9. data/doc/cxxapi/Configuration_8h-source.html +373 -338
  10. data/doc/cxxapi/DirectoryMapper_8h-source.html +1 -1
  11. data/doc/cxxapi/Hooks_8h-source.html +1 -1
  12. data/doc/cxxapi/annotated.html +1 -1
  13. data/doc/cxxapi/classHooks-members.html +1 -1
  14. data/doc/cxxapi/classHooks.html +2 -2
  15. data/doc/cxxapi/classPassenger_1_1DirectoryMapper-members.html +1 -1
  16. data/doc/cxxapi/classPassenger_1_1DirectoryMapper.html +1 -1
  17. data/doc/cxxapi/classes.html +1 -1
  18. data/doc/cxxapi/definitions_8h-source.html +1 -1
  19. data/doc/cxxapi/files.html +1 -1
  20. data/doc/cxxapi/functions.html +1 -1
  21. data/doc/cxxapi/functions_func.html +1 -1
  22. data/doc/cxxapi/graph_legend.html +1 -1
  23. data/doc/cxxapi/group__Configuration.html +1 -1
  24. data/doc/cxxapi/group__Core.html +1 -1
  25. data/doc/cxxapi/group__Hooks.html +1 -1
  26. data/doc/cxxapi/group__Support.html +1 -1
  27. data/doc/cxxapi/main.html +1 -1
  28. data/doc/cxxapi/modules.html +1 -1
  29. data/doc/rdoc/classes/ConditionVariable.html +59 -59
  30. data/doc/rdoc/classes/Exception.html +11 -11
  31. data/doc/rdoc/classes/GC.html +4 -4
  32. data/doc/rdoc/classes/IO.html +14 -14
  33. data/doc/rdoc/classes/PhusionPassenger.html +1 -1
  34. data/doc/rdoc/classes/PhusionPassenger/AbstractInstaller.html +8 -8
  35. data/doc/rdoc/classes/PhusionPassenger/AbstractRequestHandler.html +136 -136
  36. data/doc/rdoc/classes/PhusionPassenger/AbstractServer.html +254 -254
  37. data/doc/rdoc/classes/PhusionPassenger/AbstractServerCollection.html +61 -61
  38. data/doc/rdoc/classes/PhusionPassenger/AppInitError.html +4 -4
  39. data/doc/rdoc/classes/PhusionPassenger/Application.html +14 -14
  40. data/doc/rdoc/classes/PhusionPassenger/ConsoleTextTemplate.html +12 -12
  41. data/doc/rdoc/classes/PhusionPassenger/FrameworkInitError.html +4 -4
  42. data/doc/rdoc/classes/PhusionPassenger/HTMLTemplate.html +12 -12
  43. data/doc/rdoc/classes/PhusionPassenger/InitializationError.html +5 -5
  44. data/doc/rdoc/classes/PhusionPassenger/MessageChannel.html +139 -139
  45. data/doc/rdoc/classes/PhusionPassenger/Rack/RequestHandler.html +61 -56
  46. data/doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner.html +3 -3
  47. data/doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner.html +7 -7
  48. data/doc/rdoc/classes/PhusionPassenger/Railz/RequestHandler.html +15 -15
  49. data/doc/rdoc/classes/PhusionPassenger/SpawnManager.html +119 -119
  50. data/doc/rdoc/classes/PhusionPassenger/UnknownError.html +4 -4
  51. data/doc/rdoc/classes/PhusionPassenger/Utils.html +310 -312
  52. data/doc/rdoc/classes/PhusionPassenger/Utils/PseudoIO.html +169 -0
  53. data/doc/rdoc/classes/PhusionPassenger/VersionNotFound.html +4 -4
  54. data/doc/rdoc/classes/PlatformInfo.html +165 -164
  55. data/doc/rdoc/classes/Signal.html +23 -23
  56. data/doc/rdoc/created.rid +1 -1
  57. data/doc/rdoc/files/ext/phusion_passenger/native_support_c.html +1 -1
  58. data/doc/rdoc/files/lib/phusion_passenger/abstract_request_handler_rb.html +26 -28
  59. data/doc/rdoc/files/lib/phusion_passenger/abstract_server_rb.html +26 -28
  60. data/doc/rdoc/files/lib/phusion_passenger/admin_tools/control_process_rb.html +1 -1
  61. data/doc/rdoc/files/lib/phusion_passenger/constants_rb.html +1 -1
  62. data/doc/rdoc/files/lib/phusion_passenger/message_channel_rb.html +26 -28
  63. data/doc/rdoc/files/lib/phusion_passenger/platform_info_rb.html +1 -1
  64. data/doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html +1 -1
  65. data/doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html +26 -28
  66. data/doc/rdoc/files/lib/phusion_passenger/railz/application_spawner_rb.html +1 -2
  67. data/doc/rdoc/files/lib/phusion_passenger/railz/framework_spawner_rb.html +1 -1
  68. data/doc/rdoc/files/lib/phusion_passenger/railz/request_handler_rb.html +26 -28
  69. data/doc/rdoc/files/lib/phusion_passenger/spawn_manager_rb.html +26 -28
  70. data/doc/rdoc/files/lib/phusion_passenger/utils_rb.html +34 -36
  71. data/doc/rdoc/fr_class_index.html +1 -0
  72. data/doc/rdoc/fr_method_index.html +72 -68
  73. data/ext/apache2/Configuration.cpp +69 -15
  74. data/ext/apache2/Configuration.h +37 -2
  75. data/ext/apache2/Hooks.cpp +167 -59
  76. data/ext/common/ApplicationPoolServerExecutable.cpp +1 -1
  77. data/ext/common/MessageChannel.h +4 -4
  78. data/ext/common/StandardApplicationPool.h +1 -1
  79. data/ext/common/Timer.h +2 -0
  80. data/ext/common/Version.h +1 -1
  81. data/ext/nginx/Configuration.c +3 -3
  82. data/ext/nginx/ContentHandler.c +16 -4
  83. data/ext/nginx/HelperServer.cpp +1 -1
  84. data/ext/oxt/system_calls.cpp +6 -1
  85. data/ext/oxt/thread.hpp +17 -2
  86. data/ext/phusion_passenger/native_support.c +4 -4
  87. data/lib/phusion_passenger/abstract_request_handler.rb +3 -3
  88. data/lib/phusion_passenger/abstract_server.rb +1 -0
  89. data/lib/phusion_passenger/constants.rb +1 -1
  90. data/lib/phusion_passenger/message_channel.rb +1 -0
  91. data/lib/phusion_passenger/platform_info.rb +3 -2
  92. data/lib/phusion_passenger/rack/request_handler.rb +11 -7
  93. data/lib/phusion_passenger/railz/application_spawner.rb +7 -4
  94. data/lib/phusion_passenger/railz/request_handler.rb +1 -0
  95. data/lib/phusion_passenger/spawn_manager.rb +1 -0
  96. data/lib/phusion_passenger/utils.rb +38 -20
  97. data/test/integration_tests/apache2_tests.rb +162 -100
  98. data/test/integration_tests/mycook_spec.rb +63 -62
  99. data/test/integration_tests/nginx_tests.rb +12 -5
  100. data/test/ruby/utils_spec.rb +98 -14
  101. data/test/stub/apache2/httpd.conf.erb +2 -1
  102. data/test/stub/rails_apps/mycook/app/controllers/welcome_controller.rb +8 -0
  103. data/test/support/apache2_controller.rb +5 -1
  104. data/test/support/test_helper.rb +42 -13
  105. metadata +7 -137
@@ -0,0 +1,169 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+ <html>
6
+ <head>
7
+ <title>Class: PhusionPassenger::Utils::PseudoIO</title>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
10
+
11
+ <script language="JavaScript" type="text/javascript">
12
+ // <![CDATA[
13
+
14
+ function toggleSource( id )
15
+ {
16
+ var elem
17
+ var link
18
+
19
+ if( document.getElementById )
20
+ {
21
+ elem = document.getElementById( id )
22
+ link = document.getElementById( "l_" + id )
23
+ }
24
+ else if ( document.all )
25
+ {
26
+ elem = eval( "document.all." + id )
27
+ link = eval( "document.all.l_" + id )
28
+ }
29
+ else
30
+ return false;
31
+
32
+ if( elem.style.display == "block" )
33
+ {
34
+ elem.style.display = "none"
35
+ link.innerHTML = "show source"
36
+ }
37
+ else
38
+ {
39
+ elem.style.display = "block"
40
+ link.innerHTML = "hide source"
41
+ }
42
+ }
43
+
44
+ function openCode( url )
45
+ {
46
+ window.open( url, "SOURCE_CODE", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=480,width=750" ).focus();
47
+ }
48
+ // ]]>
49
+ </script>
50
+ </head>
51
+
52
+ <body>
53
+ <table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
54
+ <td class="file-title"><span class="file-title-prefix">Class</span><br />PhusionPassenger::Utils::PseudoIO</td>
55
+ <td align="right">
56
+ <table cellspacing="0" cellpadding="2">
57
+ <tr valign="top">
58
+ <td>In:</td>
59
+ <td>
60
+ <a href="../../../files/lib/phusion_passenger/utils_rb.html">lib/phusion_passenger/utils.rb</a>
61
+ </td>
62
+ </tr>
63
+ <tr>
64
+ <td>Parent:</td>
65
+ <td>
66
+ Object
67
+ </td>
68
+ </tr>
69
+ </table>
70
+ </td>
71
+ </tr>
72
+ </table>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+ <div id="content">
77
+
78
+
79
+
80
+
81
+ <div class="sectiontitle">Methods</div>
82
+ <ul>
83
+ <li><a href="#M000095">done!</a></li>
84
+ <li><a href="#M000096">method_missing</a></li>
85
+ <li><a href="#M000094">new</a></li>
86
+ <li><a href="#M000097">respond_to?</a></li>
87
+ </ul>
88
+
89
+
90
+
91
+
92
+
93
+
94
+ <div class="sectiontitle">Public Class methods</div>
95
+ <div class="method">
96
+ <div class="title">
97
+ <a name="M000094"></a><b>new</b>(sink)
98
+ </div>
99
+ <div class="sourcecode">
100
+ <p class="source-link">[ <a href="javascript:toggleSource('M000094_source')" id="l_M000094_source">show source</a> ]</p>
101
+ <div id="M000094_source" class="dyn-source">
102
+ <pre>
103
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/utils.rb, line 205</span>
104
+ 205: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">sink</span>)
105
+ 206: <span class="ruby-ivar">@sink</span> = <span class="ruby-identifier">sink</span> <span class="ruby-operator">||</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-value str">&quot;/dev/null&quot;</span>, <span class="ruby-value str">&quot;w&quot;</span>)
106
+ 207: <span class="ruby-ivar">@buffer</span> = <span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>
107
+ 208: <span class="ruby-keyword kw">end</span>
108
+ </pre>
109
+ </div>
110
+ </div>
111
+ </div>
112
+ <div class="sectiontitle">Public Instance methods</div>
113
+ <div class="method">
114
+ <div class="title">
115
+ <a name="M000095"></a><b>done!</b>()
116
+ </div>
117
+ <div class="sourcecode">
118
+ <p class="source-link">[ <a href="javascript:toggleSource('M000095_source')" id="l_M000095_source">show source</a> ]</p>
119
+ <div id="M000095_source" class="dyn-source">
120
+ <pre>
121
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/utils.rb, line 210</span>
122
+ 210: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">done!</span>
123
+ 211: <span class="ruby-identifier">result</span> = <span class="ruby-ivar">@buffer</span>.<span class="ruby-identifier">string</span>
124
+ 212: <span class="ruby-ivar">@buffer</span> = <span class="ruby-keyword kw">nil</span>
125
+ 213: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span>
126
+ 214: <span class="ruby-keyword kw">end</span>
127
+ </pre>
128
+ </div>
129
+ </div>
130
+ </div>
131
+ <div class="method">
132
+ <div class="title">
133
+ <a name="M000096"></a><b>method_missing</b>(*args, &amp;block)
134
+ </div>
135
+ <div class="sourcecode">
136
+ <p class="source-link">[ <a href="javascript:toggleSource('M000096_source')" id="l_M000096_source">show source</a> ]</p>
137
+ <div id="M000096_source" class="dyn-source">
138
+ <pre>
139
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/utils.rb, line 216</span>
140
+ 216: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
141
+ 217: <span class="ruby-ivar">@buffer</span>.<span class="ruby-identifier">send</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@buffer</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">:reopen</span>
142
+ 218: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@sink</span>.<span class="ruby-identifier">send</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
143
+ 219: <span class="ruby-keyword kw">end</span>
144
+ </pre>
145
+ </div>
146
+ </div>
147
+ </div>
148
+ <div class="method">
149
+ <div class="title">
150
+ <a name="M000097"></a><b>respond_to?</b>(symbol, include_private = false)
151
+ </div>
152
+ <div class="sourcecode">
153
+ <p class="source-link">[ <a href="javascript:toggleSource('M000097_source')" id="l_M000097_source">show source</a> ]</p>
154
+ <div id="M000097_source" class="dyn-source">
155
+ <pre>
156
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/utils.rb, line 221</span>
157
+ 221: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">symbol</span>, <span class="ruby-identifier">include_private</span> = <span class="ruby-keyword kw">false</span>)
158
+ 222: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@sink</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">symbol</span>, <span class="ruby-identifier">include_private</span>)
159
+ 223: <span class="ruby-keyword kw">end</span>
160
+ </pre>
161
+ </div>
162
+ </div>
163
+ </div>
164
+ </div>
165
+
166
+ </div>
167
+
168
+ </body>
169
+ </html>
@@ -85,7 +85,7 @@ given Ruby on Rails Gem version specification.
85
85
 
86
86
  <div class="sectiontitle">Methods</div>
87
87
  <ul>
88
- <li><a href="#M000094">new</a></li>
88
+ <li><a href="#M000098">new</a></li>
89
89
  </ul>
90
90
 
91
91
 
@@ -106,7 +106,7 @@ given Ruby on Rails Gem version specification.
106
106
  <div class="sectiontitle">Public Class methods</div>
107
107
  <div class="method">
108
108
  <div class="title">
109
- <a name="M000094"></a><b>new</b>(message, gem_version_spec)
109
+ <a name="M000098"></a><b>new</b>(message, gem_version_spec)
110
110
  </div>
111
111
  <div class="description">
112
112
  <ul>
@@ -120,8 +120,8 @@ caused this error.
120
120
  </ul>
121
121
  </div>
122
122
  <div class="sourcecode">
123
- <p class="source-link">[ <a href="javascript:toggleSource('M000094_source')" id="l_M000094_source">show source</a> ]</p>
124
- <div id="M000094_source" class="dyn-source">
123
+ <p class="source-link">[ <a href="javascript:toggleSource('M000098_source')" id="l_M000098_source">show source</a> ]</p>
124
+ <div id="M000098_source" class="dyn-source">
125
125
  <pre>
126
126
  <span class="ruby-comment cmt"># File lib/phusion_passenger/exceptions.rb, line 33</span>
127
127
  33: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">gem_version_spec</span>)
@@ -181,62 +181,62 @@ Possibly includes APR and APU compiler flags.
181
181
  <p class="source-link">[ <a href="javascript:toggleSource('M000024_source')" id="l_M000024_source">show source</a> ]</p>
182
182
  <div id="M000024_source" class="dyn-source">
183
183
  <pre>
184
- <span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 383</span>
185
- 383: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apache2_module_cflags</span>(<span class="ruby-identifier">with_apr_flags</span> = <span class="ruby-keyword kw">true</span>)
186
- 384: <span class="ruby-identifier">flags</span> = [<span class="ruby-value str">&quot;-fPIC&quot;</span>]
187
- 385: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">with_apr_flags</span>
188
- 386: <span class="ruby-identifier">flags</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">apr_flags</span>
189
- 387: <span class="ruby-identifier">flags</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">apu_flags</span>
190
- 388: <span class="ruby-keyword kw">end</span>
191
- 389: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">apxs2</span>.<span class="ruby-identifier">nil?</span>
192
- 390: <span class="ruby-identifier">apxs2_flags</span> = <span class="ruby-node">`#{apxs2} -q CFLAGS`</span>.<span class="ruby-identifier">strip</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot; -I&quot;</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">`#{apxs2} -q INCLUDEDIR`</span>.<span class="ruby-identifier">strip</span>
193
- 391: <span class="ruby-identifier">apxs2_flags</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/-O\d? /</span>, <span class="ruby-value str">''</span>)
194
- 392:
195
- 393: <span class="ruby-comment cmt"># Remove flags not supported by GCC</span>
196
- 394: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/solaris/</span> <span class="ruby-comment cmt"># TODO: Add support for people using SunStudio</span>
197
- 395: <span class="ruby-comment cmt"># The big problem is Coolstack apxs includes a bunch of solaris -x directives.</span>
198
- 396: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">apxs2_flags</span>.<span class="ruby-identifier">split</span>
199
- 397: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">reject!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^\-x/</span> }
200
- 398: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">reject!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^\-Xa/</span> }
201
- 399: <span class="ruby-identifier">apxs2_flags</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>)
202
- 400: <span class="ruby-keyword kw">end</span>
203
- 401:
204
- 402: <span class="ruby-identifier">apxs2_flags</span>.<span class="ruby-identifier">strip!</span>
205
- 403: <span class="ruby-identifier">flags</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">apxs2_flags</span>
206
- 404: <span class="ruby-keyword kw">end</span>
207
- 405: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">httpd</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/darwin/</span>
208
- 406: <span class="ruby-comment cmt"># The default Apache install on OS X is a universal binary.</span>
209
- 407: <span class="ruby-comment cmt"># Figure out which architectures it's compiled for and do the same</span>
210
- 408: <span class="ruby-comment cmt"># thing for mod_passenger. We use the 'file' utility to do this.</span>
211
- 409: <span class="ruby-comment cmt">#</span>
212
- 410: <span class="ruby-comment cmt"># Running 'file' on the Apache executable usually outputs something</span>
213
- 411: <span class="ruby-comment cmt"># like this:</span>
214
- 412: <span class="ruby-comment cmt">#</span>
215
- 413: <span class="ruby-comment cmt"># /usr/sbin/httpd: Mach-O universal binary with 4 architectures</span>
216
- 414: <span class="ruby-comment cmt"># /usr/sbin/httpd (for architecture ppc7400): Mach-O executable ppc</span>
217
- 415: <span class="ruby-comment cmt"># /usr/sbin/httpd (for architecture ppc64): Mach-O 64-bit executable ppc64</span>
218
- 416: <span class="ruby-comment cmt"># /usr/sbin/httpd (for architecture i386): Mach-O executable i386</span>
219
- 417: <span class="ruby-comment cmt"># /usr/sbin/httpd (for architecture x86_64): Mach-O 64-bit executable x86_64</span>
220
- 418: <span class="ruby-comment cmt">#</span>
221
- 419: <span class="ruby-comment cmt"># But on some machines, it may output just:</span>
222
- 420: <span class="ruby-comment cmt">#</span>
223
- 421: <span class="ruby-comment cmt"># /usr/sbin/httpd: Mach-O fat file with 4 architectures</span>
224
- 422: <span class="ruby-comment cmt">#</span>
225
- 423: <span class="ruby-comment cmt"># (http://code.google.com/p/phusion-passenger/issues/detail?id=236)</span>
226
- 424: <span class="ruby-identifier">output</span> = <span class="ruby-node">`file &quot;#{httpd}&quot;`</span>.<span class="ruby-identifier">strip</span>
227
- 425: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">output</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/Mach-O fat file/</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">output</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/for architecture/</span>
228
- 426: <span class="ruby-identifier">architectures</span> = [<span class="ruby-value str">&quot;-arch i386 -arch ppc -arch x86_64 -arch ppc64&quot;</span>]
229
- 427: <span class="ruby-keyword kw">else</span>
230
- 428: <span class="ruby-identifier">architectures</span> = []
231
- 429: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">&quot;\n&quot;</span>).<span class="ruby-identifier">grep</span>(<span class="ruby-regexp re">/for architecture/</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>
232
- 430: <span class="ruby-identifier">line</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/for architecture (.*?)\)/</span>
233
- 431: <span class="ruby-identifier">architectures</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;-arch #{$1}&quot;</span>
234
- 432: <span class="ruby-keyword kw">end</span>
235
- 433: <span class="ruby-keyword kw">end</span>
236
- 434: <span class="ruby-identifier">flags</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">architectures</span>.<span class="ruby-identifier">compact</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>)
237
- 435: <span class="ruby-keyword kw">end</span>
238
- 436: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">flags</span>.<span class="ruby-identifier">compact</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>).<span class="ruby-identifier">strip</span>
239
- 437: <span class="ruby-keyword kw">end</span>
184
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 384</span>
185
+ 384: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apache2_module_cflags</span>(<span class="ruby-identifier">with_apr_flags</span> = <span class="ruby-keyword kw">true</span>)
186
+ 385: <span class="ruby-identifier">flags</span> = [<span class="ruby-value str">&quot;-fPIC&quot;</span>]
187
+ 386: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">with_apr_flags</span>
188
+ 387: <span class="ruby-identifier">flags</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">apr_flags</span>
189
+ 388: <span class="ruby-identifier">flags</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">apu_flags</span>
190
+ 389: <span class="ruby-keyword kw">end</span>
191
+ 390: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">apxs2</span>.<span class="ruby-identifier">nil?</span>
192
+ 391: <span class="ruby-identifier">apxs2_flags</span> = <span class="ruby-node">`#{apxs2} -q CFLAGS`</span>.<span class="ruby-identifier">strip</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot; -I&quot;</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">`#{apxs2} -q INCLUDEDIR`</span>.<span class="ruby-identifier">strip</span>
193
+ 392: <span class="ruby-identifier">apxs2_flags</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/-O\d? /</span>, <span class="ruby-value str">''</span>)
194
+ 393:
195
+ 394: <span class="ruby-comment cmt"># Remove flags not supported by GCC</span>
196
+ 395: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/solaris/</span> <span class="ruby-comment cmt"># TODO: Add support for people using SunStudio</span>
197
+ 396: <span class="ruby-comment cmt"># The big problem is Coolstack apxs includes a bunch of solaris -x directives.</span>
198
+ 397: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">apxs2_flags</span>.<span class="ruby-identifier">split</span>
199
+ 398: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">reject!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^\-x/</span> }
200
+ 399: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">reject!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^\-Xa/</span> }
201
+ 400: <span class="ruby-identifier">apxs2_flags</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>)
202
+ 401: <span class="ruby-keyword kw">end</span>
203
+ 402:
204
+ 403: <span class="ruby-identifier">apxs2_flags</span>.<span class="ruby-identifier">strip!</span>
205
+ 404: <span class="ruby-identifier">flags</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">apxs2_flags</span>
206
+ 405: <span class="ruby-keyword kw">end</span>
207
+ 406: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">httpd</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/darwin/</span>
208
+ 407: <span class="ruby-comment cmt"># The default Apache install on OS X is a universal binary.</span>
209
+ 408: <span class="ruby-comment cmt"># Figure out which architectures it's compiled for and do the same</span>
210
+ 409: <span class="ruby-comment cmt"># thing for mod_passenger. We use the 'file' utility to do this.</span>
211
+ 410: <span class="ruby-comment cmt">#</span>
212
+ 411: <span class="ruby-comment cmt"># Running 'file' on the Apache executable usually outputs something</span>
213
+ 412: <span class="ruby-comment cmt"># like this:</span>
214
+ 413: <span class="ruby-comment cmt">#</span>
215
+ 414: <span class="ruby-comment cmt"># /usr/sbin/httpd: Mach-O universal binary with 4 architectures</span>
216
+ 415: <span class="ruby-comment cmt"># /usr/sbin/httpd (for architecture ppc7400): Mach-O executable ppc</span>
217
+ 416: <span class="ruby-comment cmt"># /usr/sbin/httpd (for architecture ppc64): Mach-O 64-bit executable ppc64</span>
218
+ 417: <span class="ruby-comment cmt"># /usr/sbin/httpd (for architecture i386): Mach-O executable i386</span>
219
+ 418: <span class="ruby-comment cmt"># /usr/sbin/httpd (for architecture x86_64): Mach-O 64-bit executable x86_64</span>
220
+ 419: <span class="ruby-comment cmt">#</span>
221
+ 420: <span class="ruby-comment cmt"># But on some machines, it may output just:</span>
222
+ 421: <span class="ruby-comment cmt">#</span>
223
+ 422: <span class="ruby-comment cmt"># /usr/sbin/httpd: Mach-O fat file with 4 architectures</span>
224
+ 423: <span class="ruby-comment cmt">#</span>
225
+ 424: <span class="ruby-comment cmt"># (http://code.google.com/p/phusion-passenger/issues/detail?id=236)</span>
226
+ 425: <span class="ruby-identifier">output</span> = <span class="ruby-node">`file &quot;#{httpd}&quot;`</span>.<span class="ruby-identifier">strip</span>
227
+ 426: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">output</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/Mach-O fat file/</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">output</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/for architecture/</span>
228
+ 427: <span class="ruby-identifier">architectures</span> = [<span class="ruby-value str">&quot;-arch i386 -arch ppc -arch x86_64 -arch ppc64&quot;</span>]
229
+ 428: <span class="ruby-keyword kw">else</span>
230
+ 429: <span class="ruby-identifier">architectures</span> = []
231
+ 430: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">&quot;\n&quot;</span>).<span class="ruby-identifier">grep</span>(<span class="ruby-regexp re">/for architecture/</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>
232
+ 431: <span class="ruby-identifier">line</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/for architecture (.*?)\)/</span>
233
+ 432: <span class="ruby-identifier">architectures</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;-arch #{$1}&quot;</span>
234
+ 433: <span class="ruby-keyword kw">end</span>
235
+ 434: <span class="ruby-keyword kw">end</span>
236
+ 435: <span class="ruby-identifier">flags</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">architectures</span>.<span class="ruby-identifier">compact</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>)
237
+ 436: <span class="ruby-keyword kw">end</span>
238
+ 437: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">flags</span>.<span class="ruby-identifier">compact</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>).<span class="ruby-identifier">strip</span>
239
+ 438: <span class="ruby-keyword kw">end</span>
240
240
  </pre>
241
241
  </div>
242
242
  </div>
@@ -255,12 +255,12 @@ includes APR and APU linker flags.
255
255
  <p class="source-link">[ <a href="javascript:toggleSource('M000025_source')" id="l_M000025_source">show source</a> ]</p>
256
256
  <div id="M000025_source" class="dyn-source">
257
257
  <pre>
258
- <span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 442</span>
259
- 442: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apache2_module_ldflags</span>
260
- 443: <span class="ruby-identifier">flags</span> = <span class="ruby-node">&quot;-fPIC #{apr_libs} #{apu_libs}&quot;</span>
261
- 444: <span class="ruby-identifier">flags</span>.<span class="ruby-identifier">strip!</span>
262
- 445: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">flags</span>
263
- 446: <span class="ruby-keyword kw">end</span>
258
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 443</span>
259
+ 443: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apache2_module_ldflags</span>
260
+ 444: <span class="ruby-identifier">flags</span> = <span class="ruby-node">&quot;-fPIC #{apr_libs} #{apu_libs}&quot;</span>
261
+ 445: <span class="ruby-identifier">flags</span>.<span class="ruby-identifier">strip!</span>
262
+ 446: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">flags</span>
263
+ 447: <span class="ruby-keyword kw">end</span>
264
264
  </pre>
265
265
  </div>
266
266
  </div>
@@ -371,19 +371,19 @@ won&#8216;t be necessary in that case.
371
371
  <p class="source-link">[ <a href="javascript:toggleSource('M000030_source')" id="l_M000030_source">show source</a> ]</p>
372
372
  <div id="M000030_source" class="dyn-source">
373
373
  <pre>
374
- <span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 478</span>
375
- 478: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apr_config_needed_for_building_apache_modules?</span>
376
- 479: <span class="ruby-identifier">filename</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-node">&quot;/tmp/passenger-platform-check-#{Process.pid}.c&quot;</span>)
377
- 480: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-value str">&quot;w&quot;</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
378
- 481: <span class="ruby-identifier">f</span>.<span class="ruby-identifier">puts</span>(<span class="ruby-value str">&quot;#include &lt;apr.h&gt;&quot;</span>)
379
- 482: <span class="ruby-keyword kw">end</span>
380
- 483: <span class="ruby-keyword kw">begin</span>
381
- 484: <span class="ruby-keyword kw">return</span> <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>(<span class="ruby-node">&quot;(gcc #{apache2_module_cflags(false)} -c '#{filename}' -o '#{filename}.o') &gt;/dev/null 2&gt;/dev/null&quot;</span>)
382
- 485: <span class="ruby-keyword kw">ensure</span>
383
- 486: <span class="ruby-constant">File</span>.<span class="ruby-identifier">unlink</span>(<span class="ruby-identifier">filename</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
384
- 487: <span class="ruby-constant">File</span>.<span class="ruby-identifier">unlink</span>(<span class="ruby-node">&quot;#{filename}.o&quot;</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
385
- 488: <span class="ruby-keyword kw">end</span>
386
- 489: <span class="ruby-keyword kw">end</span>
374
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 479</span>
375
+ 479: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apr_config_needed_for_building_apache_modules?</span>
376
+ 480: <span class="ruby-identifier">filename</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-node">&quot;/tmp/passenger-platform-check-#{Process.pid}.c&quot;</span>)
377
+ 481: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-value str">&quot;w&quot;</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
378
+ 482: <span class="ruby-identifier">f</span>.<span class="ruby-identifier">puts</span>(<span class="ruby-value str">&quot;#include &lt;apr.h&gt;&quot;</span>)
379
+ 483: <span class="ruby-keyword kw">end</span>
380
+ 484: <span class="ruby-keyword kw">begin</span>
381
+ 485: <span class="ruby-keyword kw">return</span> <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>(<span class="ruby-node">&quot;(gcc #{apache2_module_cflags(false)} -c '#{filename}' -o '#{filename}.o') &gt;/dev/null 2&gt;/dev/null&quot;</span>)
382
+ 486: <span class="ruby-keyword kw">ensure</span>
383
+ 487: <span class="ruby-constant">File</span>.<span class="ruby-identifier">unlink</span>(<span class="ruby-identifier">filename</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
384
+ 488: <span class="ruby-constant">File</span>.<span class="ruby-identifier">unlink</span>(<span class="ruby-node">&quot;#{filename}.o&quot;</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
385
+ 489: <span class="ruby-keyword kw">end</span>
386
+ 490: <span class="ruby-keyword kw">end</span>
387
387
  </pre>
388
388
  </div>
389
389
  </div>
@@ -401,10 +401,10 @@ The C compiler flags that are necessary for programs that use APR.
401
401
  <p class="source-link">[ <a href="javascript:toggleSource('M000026_source')" id="l_M000026_source">show source</a> ]</p>
402
402
  <div id="M000026_source" class="dyn-source">
403
403
  <pre>
404
- <span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 450</span>
405
- 450: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apr_flags</span>
406
- 451: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">determine_apr_info</span>[<span class="ruby-value">0</span>]
407
- 452: <span class="ruby-keyword kw">end</span>
404
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 451</span>
405
+ 451: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apr_flags</span>
406
+ 452: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">determine_apr_info</span>[<span class="ruby-value">0</span>]
407
+ 453: <span class="ruby-keyword kw">end</span>
408
408
  </pre>
409
409
  </div>
410
410
  </div>
@@ -422,10 +422,10 @@ The linker flags that are necessary for linking programs that use APR.
422
422
  <p class="source-link">[ <a href="javascript:toggleSource('M000027_source')" id="l_M000027_source">show source</a> ]</p>
423
423
  <div id="M000027_source" class="dyn-source">
424
424
  <pre>
425
- <span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 455</span>
426
- 455: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apr_libs</span>
427
- 456: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">determine_apr_info</span>[<span class="ruby-value">1</span>]
428
- 457: <span class="ruby-keyword kw">end</span>
425
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 456</span>
426
+ 456: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apr_libs</span>
427
+ 457: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">determine_apr_info</span>[<span class="ruby-value">1</span>]
428
+ 458: <span class="ruby-keyword kw">end</span>
429
429
  </pre>
430
430
  </div>
431
431
  </div>
@@ -484,10 +484,10 @@ The C compiler flags that are necessary for programs that use APR-Util.
484
484
  <p class="source-link">[ <a href="javascript:toggleSource('M000028_source')" id="l_M000028_source">show source</a> ]</p>
485
485
  <div id="M000028_source" class="dyn-source">
486
486
  <pre>
487
- <span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 460</span>
488
- 460: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apu_flags</span>
489
- 461: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">determine_apu_info</span>[<span class="ruby-value">0</span>]
490
- 462: <span class="ruby-keyword kw">end</span>
487
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 461</span>
488
+ 461: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apu_flags</span>
489
+ 462: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">determine_apu_info</span>[<span class="ruby-value">0</span>]
490
+ 463: <span class="ruby-keyword kw">end</span>
491
491
  </pre>
492
492
  </div>
493
493
  </div>
@@ -505,10 +505,10 @@ The linker flags that are necessary for linking programs that use APR-Util.
505
505
  <p class="source-link">[ <a href="javascript:toggleSource('M000029_source')" id="l_M000029_source">show source</a> ]</p>
506
506
  <div id="M000029_source" class="dyn-source">
507
507
  <pre>
508
- <span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 465</span>
509
- 465: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apu_libs</span>
510
- 466: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">determine_apu_info</span>[<span class="ruby-value">1</span>]
511
- 467: <span class="ruby-keyword kw">end</span>
508
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 466</span>
509
+ 466: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apu_libs</span>
510
+ 467: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">determine_apu_info</span>[<span class="ruby-value">1</span>]
511
+ 468: <span class="ruby-keyword kw">end</span>
512
512
  </pre>
513
513
  </div>
514
514
  </div>
@@ -559,17 +559,17 @@ information.
559
559
  <p class="source-link">[ <a href="javascript:toggleSource('M000023_source')" id="l_M000023_source">show source</a> ]</p>
560
560
  <div id="M000023_source" class="dyn-source">
561
561
  <pre>
562
- <span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 370</span>
563
- 370: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">debugging_cflags</span>
564
- 371: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/openbsd/</span>
565
- 372: <span class="ruby-comment cmt"># According to OpenBSD's pthreads man page, pthreads do not work</span>
566
- 373: <span class="ruby-comment cmt"># correctly when an app is compiled with -g. It recommends using</span>
567
- 374: <span class="ruby-comment cmt"># -ggdb instead.</span>
568
- 375: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">'-ggdb'</span>
569
- 376: <span class="ruby-keyword kw">else</span>
570
- 377: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">'-g'</span>
571
- 378: <span class="ruby-keyword kw">end</span>
572
- 379: <span class="ruby-keyword kw">end</span>
562
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 371</span>
563
+ 371: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">debugging_cflags</span>
564
+ 372: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/openbsd/</span>
565
+ 373: <span class="ruby-comment cmt"># According to OpenBSD's pthreads man page, pthreads do not work</span>
566
+ 374: <span class="ruby-comment cmt"># correctly when an app is compiled with -g. It recommends using</span>
567
+ 375: <span class="ruby-comment cmt"># -ggdb instead.</span>
568
+ 376: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">'-ggdb'</span>
569
+ 377: <span class="ruby-keyword kw">else</span>
570
+ 378: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">'-g'</span>
571
+ 379: <span class="ruby-keyword kw">end</span>
572
+ 380: <span class="ruby-keyword kw">end</span>
573
573
  </pre>
574
574
  </div>
575
575
  </div>
@@ -655,14 +655,14 @@ most Unices).
655
655
  <p class="source-link">[ <a href="javascript:toggleSource('M000031_source')" id="l_M000031_source">show source</a> ]</p>
656
656
  <div id="M000031_source" class="dyn-source">
657
657
  <pre>
658
- <span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 493</span>
659
- 493: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">library_extension</span>
660
- 494: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/darwin/</span>
661
- 495: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">&quot;bundle&quot;</span>
662
- 496: <span class="ruby-keyword kw">else</span>
663
- 497: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">&quot;so&quot;</span>
664
- 498: <span class="ruby-keyword kw">end</span>
665
- 499: <span class="ruby-keyword kw">end</span>
658
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 494</span>
659
+ 494: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">library_extension</span>
660
+ 495: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/darwin/</span>
661
+ 496: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">&quot;bundle&quot;</span>
662
+ 497: <span class="ruby-keyword kw">else</span>
663
+ 498: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">&quot;so&quot;</span>
664
+ 499: <span class="ruby-keyword kw">end</span>
665
+ 500: <span class="ruby-keyword kw">end</span>
666
666
  </pre>
667
667
  </div>
668
668
  </div>
@@ -681,36 +681,36 @@ system is not Linux.
681
681
  <p class="source-link">[ <a href="javascript:toggleSource('M000032_source')" id="l_M000032_source">show source</a> ]</p>
682
682
  <div id="M000032_source" class="dyn-source">
683
683
  <pre>
684
- <span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 502</span>
685
- 502: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">linux_distro</span>
686
- 503: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/linux/</span>
687
- 504: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
688
- 505: <span class="ruby-keyword kw">end</span>
689
- 506: <span class="ruby-identifier">lsb_release</span> = <span class="ruby-identifier">read_file</span>(<span class="ruby-value str">&quot;/etc/lsb-release&quot;</span>)
690
- 507: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">lsb_release</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/Ubuntu/</span>
691
- 508: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:ubuntu</span>
692
- 509: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-value str">&quot;/etc/debian_version&quot;</span>)
693
- 510: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:debian</span>
694
- 511: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-value str">&quot;/etc/redhat-release&quot;</span>)
695
- 512: <span class="ruby-identifier">redhat_release</span> = <span class="ruby-identifier">read_file</span>(<span class="ruby-value str">&quot;/etc/redhat-release&quot;</span>)
696
- 513: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">redhat_release</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/CentOS/</span>
697
- 514: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:centos</span>
698
- 515: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">redhat_release</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/Fedora/</span> <span class="ruby-comment cmt"># is this correct?</span>
699
- 516: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:fedora</span>
700
- 517: <span class="ruby-keyword kw">else</span>
701
- 518: <span class="ruby-comment cmt"># On official RHEL distros, the content is in the form of</span>
702
- 519: <span class="ruby-comment cmt"># &quot;Red Hat Enterprise Linux Server release 5.1 (Tikanga)&quot;</span>
703
- 520: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:rhel</span>
704
- 521: <span class="ruby-keyword kw">end</span>
705
- 522: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-value str">&quot;/etc/suse-release&quot;</span>)
706
- 523: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:suse</span>
707
- 524: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-value str">&quot;/etc/gentoo-release&quot;</span>)
708
- 525: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:gentoo</span>
709
- 526: <span class="ruby-keyword kw">else</span>
710
- 527: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:unknown</span>
711
- 528: <span class="ruby-keyword kw">end</span>
712
- 529: <span class="ruby-comment cmt"># TODO: Slackware, Mandrake/Mandriva</span>
713
- 530: <span class="ruby-keyword kw">end</span>
684
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 503</span>
685
+ 503: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">linux_distro</span>
686
+ 504: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/linux/</span>
687
+ 505: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
688
+ 506: <span class="ruby-keyword kw">end</span>
689
+ 507: <span class="ruby-identifier">lsb_release</span> = <span class="ruby-identifier">read_file</span>(<span class="ruby-value str">&quot;/etc/lsb-release&quot;</span>)
690
+ 508: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">lsb_release</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/Ubuntu/</span>
691
+ 509: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:ubuntu</span>
692
+ 510: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-value str">&quot;/etc/debian_version&quot;</span>)
693
+ 511: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:debian</span>
694
+ 512: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-value str">&quot;/etc/redhat-release&quot;</span>)
695
+ 513: <span class="ruby-identifier">redhat_release</span> = <span class="ruby-identifier">read_file</span>(<span class="ruby-value str">&quot;/etc/redhat-release&quot;</span>)
696
+ 514: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">redhat_release</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/CentOS/</span>
697
+ 515: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:centos</span>
698
+ 516: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">redhat_release</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/Fedora/</span> <span class="ruby-comment cmt"># is this correct?</span>
699
+ 517: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:fedora</span>
700
+ 518: <span class="ruby-keyword kw">else</span>
701
+ 519: <span class="ruby-comment cmt"># On official RHEL distros, the content is in the form of</span>
702
+ 520: <span class="ruby-comment cmt"># &quot;Red Hat Enterprise Linux Server release 5.1 (Tikanga)&quot;</span>
703
+ 521: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:rhel</span>
704
+ 522: <span class="ruby-keyword kw">end</span>
705
+ 523: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-value str">&quot;/etc/suse-release&quot;</span>)
706
+ 524: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:suse</span>
707
+ 525: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-value str">&quot;/etc/gentoo-release&quot;</span>)
708
+ 526: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:gentoo</span>
709
+ 527: <span class="ruby-keyword kw">else</span>
710
+ 528: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:unknown</span>
711
+ 529: <span class="ruby-keyword kw">end</span>
712
+ 530: <span class="ruby-comment cmt"># TODO: Slackware, Mandrake/Mandriva</span>
713
+ 531: <span class="ruby-keyword kw">end</span>
714
714
  </pre>
715
715
  </div>
716
716
  </div>
@@ -732,22 +732,23 @@ the compiler.
732
732
  <pre>
733
733
  <span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 338</span>
734
734
  338: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">portability_cflags</span>
735
- 339: <span class="ruby-comment cmt"># _GLIBCPP__PTHREADS is for fixing Boost compilation on OpenBSD.</span>
736
- 340: <span class="ruby-identifier">flags</span> = [<span class="ruby-value str">&quot;-D_REENTRANT -I/usr/local/include&quot;</span>]
737
- 341: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/solaris/</span>
738
- 342: <span class="ruby-identifier">flags</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">'-D_XOPEN_SOURCE=500 -D_XPG4_2 -D__EXTENSIONS__ -D__SOLARIS__ -D_FILE_OFFSET_BITS=64'</span>
739
- 343: <span class="ruby-identifier">flags</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">'-DBOOST_HAS_STDINT_H'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/solaris2.9/</span>
740
- 344: <span class="ruby-identifier">flags</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">'-D__SOLARIS9__ -DBOOST__STDC_CONSTANT_MACROS_DEFINED'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/solaris2.9/</span>
741
- 345: <span class="ruby-identifier">flags</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">'-mcpu=ultrasparc'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/sparc/</span>
742
- 346: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/openbsd/</span>
743
- 347: <span class="ruby-identifier">flags</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">'-DBOOST_HAS_STDINT_H -D_GLIBCPP__PTHREADS'</span>
744
- 348: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/aix/</span>
745
- 349: <span class="ruby-identifier">flags</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">'-DOXT_DISABLE_BACKTRACES'</span>
746
- 350: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/sparc-linux/</span>
747
- 351: <span class="ruby-identifier">flags</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">'-DBOOST_SP_USE_PTHREADS'</span>
748
- 352: <span class="ruby-keyword kw">end</span>
749
- 353: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">flags</span>.<span class="ruby-identifier">compact</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot; &quot;</span>).<span class="ruby-identifier">strip</span>
750
- 354: <span class="ruby-keyword kw">end</span>
735
+ 339: <span class="ruby-identifier">flags</span> = [<span class="ruby-value str">&quot;-D_REENTRANT -I/usr/local/include&quot;</span>]
736
+ 340: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/solaris/</span>
737
+ 341: <span class="ruby-identifier">flags</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">'-D_XOPEN_SOURCE=500 -D_XPG4_2 -D__EXTENSIONS__ -D__SOLARIS__ -D_FILE_OFFSET_BITS=64'</span>
738
+ 342: <span class="ruby-identifier">flags</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">'-DBOOST_HAS_STDINT_H'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/solaris2.9/</span>
739
+ 343: <span class="ruby-identifier">flags</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">'-D__SOLARIS9__ -DBOOST__STDC_CONSTANT_MACROS_DEFINED'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/solaris2.9/</span>
740
+ 344: <span class="ruby-identifier">flags</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">'-mcpu=ultrasparc'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/sparc/</span>
741
+ 345: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/openbsd/</span>
742
+ 346: <span class="ruby-identifier">flags</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">'-DBOOST_HAS_STDINT_H -D_GLIBCPP__PTHREADS'</span>
743
+ 347: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/aix/</span>
744
+ 348: <span class="ruby-identifier">flags</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">'-DOXT_DISABLE_BACKTRACES'</span>
745
+ 349: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/(sparc-linux|arm-linux)/</span>
746
+ 350: <span class="ruby-comment cmt"># http://code.google.com/p/phusion-passenger/issues/detail?id=200</span>
747
+ 351: <span class="ruby-comment cmt"># http://groups.google.com/group/phusion-passenger/t/6b904a962ee28e5c</span>
748
+ 352: <span class="ruby-identifier">flags</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">'-DBOOST_SP_USE_PTHREADS'</span>
749
+ 353: <span class="ruby-keyword kw">end</span>
750
+ 354: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">flags</span>.<span class="ruby-identifier">compact</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot; &quot;</span>).<span class="ruby-identifier">strip</span>
751
+ 355: <span class="ruby-keyword kw">end</span>
751
752
  </pre>
752
753
  </div>
753
754
  </div>
@@ -767,14 +768,14 @@ the linker.
767
768
  <p class="source-link">[ <a href="javascript:toggleSource('M000022_source')" id="l_M000022_source">show source</a> ]</p>
768
769
  <div id="M000022_source" class="dyn-source">
769
770
  <pre>
770
- <span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 360</span>
771
- 360: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">portability_ldflags</span>
772
- 361: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/solaris/</span>
773
- 362: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">'-lxnet -lrt -lsocket -lnsl -lpthread'</span>
774
- 363: <span class="ruby-keyword kw">else</span>
775
- 364: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">'-lpthread'</span>
776
- 365: <span class="ruby-keyword kw">end</span>
777
- 366: <span class="ruby-keyword kw">end</span>
771
+ <span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 361</span>
772
+ 361: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">portability_ldflags</span>
773
+ 362: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/solaris/</span>
774
+ 363: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">'-lxnet -lrt -lsocket -lnsl -lpthread'</span>
775
+ 364: <span class="ruby-keyword kw">else</span>
776
+ 365: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">'-lpthread'</span>
777
+ 366: <span class="ruby-keyword kw">end</span>
778
+ 367: <span class="ruby-keyword kw">end</span>
778
779
  </pre>
779
780
  </div>
780
781
  </div>