curb 0.7.15 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/README.markdown +283 -0
- data/Rakefile +38 -26
- data/ext/banned.h +32 -0
- data/ext/curb.c +903 -46
- data/ext/curb.h +20 -11
- data/ext/curb_easy.c +1039 -565
- data/ext/curb_easy.h +12 -0
- data/ext/curb_errors.c +127 -18
- data/ext/curb_errors.h +8 -5
- data/ext/curb_macros.h +10 -6
- data/ext/curb_multi.c +245 -167
- data/ext/curb_multi.h +0 -1
- data/ext/curb_upload.c +2 -2
- data/ext/extconf.rb +314 -20
- data/lib/curb.rb +2 -308
- data/lib/curl/easy.rb +489 -0
- data/lib/curl/multi.rb +287 -0
- data/lib/curl.rb +68 -1
- data/tests/bug_crash_on_debug.rb +39 -0
- data/tests/bug_crash_on_progress.rb +73 -0
- data/tests/bug_curb_easy_blocks_ruby_threads.rb +2 -2
- data/tests/bug_issue102.rb +17 -0
- data/tests/bug_require_last_or_segfault.rb +1 -1
- data/tests/helper.rb +120 -16
- data/tests/signals.rb +33 -0
- data/tests/tc_curl.rb +69 -0
- data/tests/tc_curl_download.rb +4 -4
- data/tests/tc_curl_easy.rb +327 -43
- data/tests/tc_curl_easy_resolve.rb +16 -0
- data/tests/tc_curl_easy_setopt.rb +31 -0
- data/tests/tc_curl_maxfilesize.rb +12 -0
- data/tests/tc_curl_multi.rb +141 -15
- data/tests/tc_curl_postfield.rb +29 -29
- data/tests/tc_curl_protocols.rb +37 -0
- data/tests/timeout.rb +30 -6
- metadata +61 -58
- data/README +0 -177
data/ext/extconf.rb
CHANGED
|
@@ -18,6 +18,8 @@ elsif !have_library('curl') or !have_header('curl/curl.h')
|
|
|
18
18
|
fail <<-EOM
|
|
19
19
|
Can't find libcurl or curl/curl.h
|
|
20
20
|
|
|
21
|
+
Make sure development libs (ie libcurl4-openssl-dev) are installed on the system.
|
|
22
|
+
|
|
21
23
|
Try passing --with-curl-dir or --with-curl-lib and --with-curl-include
|
|
22
24
|
options to extconf.
|
|
23
25
|
EOM
|
|
@@ -35,16 +37,17 @@ end
|
|
|
35
37
|
# puts "Selected arch: #{archs.first}"
|
|
36
38
|
#end
|
|
37
39
|
|
|
38
|
-
def define(s)
|
|
39
|
-
$defs.push( format("-D HAVE_%s", s.to_s.upcase) )
|
|
40
|
+
def define(s, v=1)
|
|
41
|
+
$defs.push( format("-D HAVE_%s=%d", s.to_s.upcase, v) )
|
|
40
42
|
end
|
|
41
43
|
|
|
42
44
|
def have_constant(name)
|
|
45
|
+
sname = name.is_a?(Symbol) ? name.to_s : name.upcase
|
|
43
46
|
checking_for name do
|
|
44
47
|
src = %{
|
|
45
48
|
#include <curl/curl.h>
|
|
46
49
|
int main() {
|
|
47
|
-
int test = (int)#{
|
|
50
|
+
int test = (int)#{sname};
|
|
48
51
|
return 0;
|
|
49
52
|
}
|
|
50
53
|
}
|
|
@@ -52,17 +55,23 @@ def have_constant(name)
|
|
|
52
55
|
define name
|
|
53
56
|
true
|
|
54
57
|
else
|
|
58
|
+
#define name, 0
|
|
55
59
|
false
|
|
56
60
|
end
|
|
57
61
|
end
|
|
58
62
|
end
|
|
59
63
|
|
|
64
|
+
have_constant "curlopt_tcp_keepalive"
|
|
65
|
+
have_constant "curlopt_tcp_keepidle"
|
|
66
|
+
have_constant "curlopt_tcp_keepintvl"
|
|
67
|
+
have_constant "curlinfo_appconnect_time"
|
|
60
68
|
have_constant "curlinfo_redirect_time"
|
|
61
69
|
have_constant "curlinfo_response_code"
|
|
62
70
|
have_constant "curlinfo_filetime"
|
|
63
71
|
have_constant "curlinfo_redirect_count"
|
|
64
72
|
have_constant "curlinfo_os_errno"
|
|
65
73
|
have_constant "curlinfo_num_connects"
|
|
74
|
+
have_constant "curlinfo_cookielist"
|
|
66
75
|
have_constant "curlinfo_ftp_entry_path"
|
|
67
76
|
have_constant "curl_version_ssl"
|
|
68
77
|
have_constant "curl_version_libz"
|
|
@@ -75,9 +84,12 @@ have_constant "curl_version_largefile"
|
|
|
75
84
|
have_constant "curl_version_idn"
|
|
76
85
|
have_constant "curl_version_sspi"
|
|
77
86
|
have_constant "curl_version_conv"
|
|
87
|
+
have_constant "curl_version_http2"
|
|
78
88
|
have_constant "curlproxy_http"
|
|
79
89
|
have_constant "curlproxy_socks4"
|
|
90
|
+
have_constant "curlproxy_socks4a"
|
|
80
91
|
have_constant "curlproxy_socks5"
|
|
92
|
+
have_constant "curlproxy_socks5_hostname"
|
|
81
93
|
have_constant "curlauth_basic"
|
|
82
94
|
have_constant "curlauth_digest"
|
|
83
95
|
have_constant "curlauth_gssnegotiate"
|
|
@@ -96,9 +108,22 @@ have_constant "curle_send_fail_rewind"
|
|
|
96
108
|
have_constant "curle_ssl_engine_initfailed"
|
|
97
109
|
have_constant "curle_login_denied"
|
|
98
110
|
|
|
111
|
+
# older than 7.10.0
|
|
112
|
+
have_constant "curlopt_nosignal"
|
|
113
|
+
|
|
114
|
+
# older than 7.16.0
|
|
115
|
+
have_constant "curlmopt_pipelining"
|
|
116
|
+
|
|
99
117
|
# older than 7.16.3
|
|
100
118
|
have_constant "curlmopt_maxconnects"
|
|
101
119
|
|
|
120
|
+
have_constant "curlopt_seekfunction"
|
|
121
|
+
have_constant "curlopt_seekdata"
|
|
122
|
+
have_constant "curlopt_sockoptfunction"
|
|
123
|
+
have_constant "curlopt_sockoptdata"
|
|
124
|
+
have_constant "curlopt_opensocketfunction"
|
|
125
|
+
have_constant "curlopt_opensocketdata"
|
|
126
|
+
|
|
102
127
|
# additional consts
|
|
103
128
|
have_constant "curle_conv_failed"
|
|
104
129
|
have_constant "curle_conv_reqd"
|
|
@@ -110,6 +135,9 @@ have_constant "curle_again"
|
|
|
110
135
|
have_constant "curle_ssl_crl_badfile"
|
|
111
136
|
have_constant "curle_ssl_issuer_error"
|
|
112
137
|
|
|
138
|
+
# added in 7.18.2
|
|
139
|
+
have_constant "curlinfo_redirect_url"
|
|
140
|
+
|
|
113
141
|
# username/password added in 7.19.1
|
|
114
142
|
have_constant "curlopt_username"
|
|
115
143
|
have_constant "curlopt_password"
|
|
@@ -130,6 +158,284 @@ have_func("curl_multi_timeout")
|
|
|
130
158
|
have_func("curl_multi_fdset")
|
|
131
159
|
have_func("curl_multi_perform")
|
|
132
160
|
|
|
161
|
+
have_constant "curlopt_haproxyprotocol"
|
|
162
|
+
|
|
163
|
+
# constants
|
|
164
|
+
have_constant "curlopt_interleavefunction"
|
|
165
|
+
have_constant "curlopt_interleavedata"
|
|
166
|
+
have_constant "curlopt_chunk_bgn_function"
|
|
167
|
+
have_constant "curlopt_chunk_end_function"
|
|
168
|
+
have_constant "curlopt_chunk_data"
|
|
169
|
+
have_constant "curlopt_fnmatch_function"
|
|
170
|
+
have_constant "curlopt_fnmatch_data"
|
|
171
|
+
have_constant "curlopt_errorbuffer"
|
|
172
|
+
have_constant "curlopt_stderr"
|
|
173
|
+
have_constant "curlopt_failonerror"
|
|
174
|
+
have_constant "curlopt_url"
|
|
175
|
+
have_constant "curlopt_protocols"
|
|
176
|
+
have_constant "curlopt_redir_protocols"
|
|
177
|
+
have_constant "curlopt_proxy"
|
|
178
|
+
have_constant "curlopt_proxyport"
|
|
179
|
+
have_constant "curlopt_proxytype"
|
|
180
|
+
have_constant "curlopt_noproxy"
|
|
181
|
+
have_constant "curlopt_httpproxytunnel"
|
|
182
|
+
have_constant "curlopt_socks5_gssapi_service"
|
|
183
|
+
have_constant "curlopt_socks5_gssapi_nec"
|
|
184
|
+
have_constant "curlopt_interface"
|
|
185
|
+
have_constant "curlopt_localport"
|
|
186
|
+
have_constant "curlopt_dns_cache_timeout"
|
|
187
|
+
have_constant "curlopt_dns_use_global_cache"
|
|
188
|
+
have_constant "curlopt_buffersize"
|
|
189
|
+
have_constant "curlopt_port"
|
|
190
|
+
have_constant "curlopt_tcp_nodelay"
|
|
191
|
+
have_constant "curlopt_address_scope"
|
|
192
|
+
have_constant "curlopt_netrc"
|
|
193
|
+
have_constant "curl_netrc_optional"
|
|
194
|
+
have_constant "curl_netrc_ignored"
|
|
195
|
+
have_constant "curl_netrc_required"
|
|
196
|
+
have_constant "curlopt_netrc_file"
|
|
197
|
+
have_constant "curlopt_userpwd"
|
|
198
|
+
have_constant "curlopt_proxyuserpwd"
|
|
199
|
+
have_constant "curlopt_username"
|
|
200
|
+
have_constant "curlopt_password"
|
|
201
|
+
have_constant "curlopt_password"
|
|
202
|
+
have_constant "curlopt_password"
|
|
203
|
+
have_constant "curlopt_httpauth"
|
|
204
|
+
have_constant "curlauth_digest_ie"
|
|
205
|
+
have_constant "curlauth_only"
|
|
206
|
+
have_constant "curlopt_tlsauth_type"
|
|
207
|
+
have_constant "curlopt_tlsauth_srp"
|
|
208
|
+
have_constant "curlopt_tlsauth_username"
|
|
209
|
+
have_constant "curlopt_tlsauth_password"
|
|
210
|
+
have_constant "curlopt_proxyauth"
|
|
211
|
+
have_constant "curlopt_autoreferer"
|
|
212
|
+
have_constant "curlopt_encoding"
|
|
213
|
+
have_constant "curlopt_followlocation"
|
|
214
|
+
have_constant "curlopt_unrestricted_auth"
|
|
215
|
+
have_constant "curlopt_maxredirs"
|
|
216
|
+
have_constant "curlopt_postredir"
|
|
217
|
+
have_constant "curlopt_put"
|
|
218
|
+
have_constant "curlopt_post"
|
|
219
|
+
have_constant "curlopt_postfields"
|
|
220
|
+
have_constant "curlopt_postfieldsize"
|
|
221
|
+
have_constant "curlopt_postfieldsize_large"
|
|
222
|
+
have_constant "curlopt_copypostfields"
|
|
223
|
+
have_constant "curlopt_httppost"
|
|
224
|
+
have_constant "curlopt_referer"
|
|
225
|
+
have_constant "curlopt_useragent"
|
|
226
|
+
have_constant "curlopt_httpheader"
|
|
227
|
+
have_constant "curlopt_proxyheader"
|
|
228
|
+
have_constant "curlopt_http200aliases"
|
|
229
|
+
have_constant "curlopt_cookie"
|
|
230
|
+
have_constant "curlopt_cookiefile"
|
|
231
|
+
have_constant "curlopt_cookiejar"
|
|
232
|
+
have_constant "curlopt_cookiesession"
|
|
233
|
+
have_constant "curlopt_cookielist"
|
|
234
|
+
have_constant "curlopt_httpget"
|
|
235
|
+
have_constant "curlopt_http_version"
|
|
236
|
+
have_constant "curl_http_version_none"
|
|
237
|
+
have_constant "curl_http_version_1_0"
|
|
238
|
+
have_constant "curl_http_version_1_1"
|
|
239
|
+
have_constant "curlopt_ignore_content_length"
|
|
240
|
+
have_constant "curlopt_http_content_decoding"
|
|
241
|
+
have_constant "curlopt_http_transfer_decoding"
|
|
242
|
+
have_constant "curlopt_mail_from"
|
|
243
|
+
have_constant "curlopt_mail_rcpt"
|
|
244
|
+
have_constant "curlopt_tftp_blksize"
|
|
245
|
+
have_constant "curlopt_ftpport"
|
|
246
|
+
have_constant "curlopt_quote"
|
|
247
|
+
have_constant "curlopt_postquote"
|
|
248
|
+
have_constant "curlopt_prequote"
|
|
249
|
+
have_constant "curlopt_dirlistonly"
|
|
250
|
+
have_constant "curlopt_append"
|
|
251
|
+
have_constant "curlopt_ftp_use_eprt"
|
|
252
|
+
have_constant "curlopt_ftp_use_epsv"
|
|
253
|
+
have_constant "curlopt_ftp_use_pret"
|
|
254
|
+
have_constant "curlopt_ftp_create_missing_dirs"
|
|
255
|
+
have_constant "curlopt_ftp_response_timeout"
|
|
256
|
+
have_constant "curlopt_ftp_alternative_to_user"
|
|
257
|
+
have_constant "curlopt_ftp_skip_pasv_ip"
|
|
258
|
+
have_constant "curlopt_ftpsslauth"
|
|
259
|
+
have_constant "curlftpauth_default"
|
|
260
|
+
have_constant "curlftpauth_ssl"
|
|
261
|
+
have_constant "curlftpauth_tls"
|
|
262
|
+
have_constant "curlopt_ftp_ssl_ccc"
|
|
263
|
+
have_constant "curlftpssl_ccc_none"
|
|
264
|
+
have_constant "curlftpssl_ccc_passive"
|
|
265
|
+
have_constant "curlftpssl_ccc_active"
|
|
266
|
+
have_constant "curlopt_ftp_account"
|
|
267
|
+
have_constant "curlopt_ftp_filemethod"
|
|
268
|
+
have_constant "curlftpmethod_multicwd"
|
|
269
|
+
have_constant "curlftpmethod_nocwd"
|
|
270
|
+
have_constant "curlftpmethod_singlecwd"
|
|
271
|
+
have_constant "curlopt_rtsp_request"
|
|
272
|
+
have_constant "curl_rtspreq_options"
|
|
273
|
+
have_constant "curl_rtspreq_describe"
|
|
274
|
+
have_constant "curl_rtspreq_announce"
|
|
275
|
+
have_constant "curl_rtspreq_setup"
|
|
276
|
+
have_constant "curl_rtspreq_play"
|
|
277
|
+
have_constant "curl_rtspreq_pause"
|
|
278
|
+
have_constant "curl_rtspreq_teardown"
|
|
279
|
+
have_constant "curl_rtspreq_get_parameter"
|
|
280
|
+
have_constant "curl_rtspreq_set_parameter"
|
|
281
|
+
have_constant "curl_rtspreq_record"
|
|
282
|
+
have_constant "curl_rtspreq_receive"
|
|
283
|
+
have_constant "curlopt_rtsp_session_id"
|
|
284
|
+
have_constant "curlopt_rtsp_stream_uri"
|
|
285
|
+
have_constant "curlopt_rtsp_transport"
|
|
286
|
+
have_constant "curlopt_rtsp_header"
|
|
287
|
+
have_constant "curlopt_rtsp_client_cseq"
|
|
288
|
+
have_constant "curlopt_rtsp_server_cseq"
|
|
289
|
+
have_constant "curlopt_transfertext"
|
|
290
|
+
have_constant "curlopt_proxy_transfer_mode"
|
|
291
|
+
have_constant "curlopt_crlf"
|
|
292
|
+
have_constant "curlopt_range"
|
|
293
|
+
have_constant "curlopt_resume_from"
|
|
294
|
+
have_constant "curlopt_resume_from_large"
|
|
295
|
+
have_constant "curlopt_customrequest"
|
|
296
|
+
have_constant "curlopt_filetime"
|
|
297
|
+
have_constant "curlopt_nobody"
|
|
298
|
+
have_constant "curlopt_infilesize"
|
|
299
|
+
have_constant "curlopt_infilesize_large"
|
|
300
|
+
have_constant "curlopt_upload"
|
|
301
|
+
have_constant "curlopt_maxfilesize"
|
|
302
|
+
have_constant "curlopt_maxfilesize_large"
|
|
303
|
+
have_constant "curlopt_timecondition"
|
|
304
|
+
have_constant "curlopt_timevalue"
|
|
305
|
+
have_constant "curlopt_timeout"
|
|
306
|
+
have_constant "curlopt_timeout_ms"
|
|
307
|
+
have_constant "curlopt_low_speed_limit"
|
|
308
|
+
have_constant "curlopt_low_speed_time"
|
|
309
|
+
have_constant "curlopt_max_send_speed_large"
|
|
310
|
+
have_constant "curlopt_max_recv_speed_large"
|
|
311
|
+
have_constant "curlopt_maxconnects"
|
|
312
|
+
have_constant "curlopt_closepolicy"
|
|
313
|
+
have_constant "curlopt_fresh_connect"
|
|
314
|
+
have_constant "curlopt_forbid_reuse"
|
|
315
|
+
have_constant "curlopt_connecttimeout"
|
|
316
|
+
have_constant "curlopt_connecttimeout_ms"
|
|
317
|
+
have_constant "curlopt_ipresolve"
|
|
318
|
+
have_constant "curl_ipresolve_whatever"
|
|
319
|
+
have_constant "curl_ipresolve_v4"
|
|
320
|
+
have_constant "curl_ipresolve_v6"
|
|
321
|
+
have_constant "curlopt_connect_only"
|
|
322
|
+
have_constant "curlopt_use_ssl"
|
|
323
|
+
have_constant "curlusessl_none"
|
|
324
|
+
have_constant "curlusessl_try"
|
|
325
|
+
have_constant "curlusessl_control"
|
|
326
|
+
have_constant "curlusessl_all"
|
|
327
|
+
have_constant "curlopt_resolve"
|
|
328
|
+
have_constant "curlopt_sslcert"
|
|
329
|
+
have_constant "curlopt_sslcerttype"
|
|
330
|
+
have_constant "curlopt_sslkey"
|
|
331
|
+
have_constant "curlopt_sslkeytype"
|
|
332
|
+
have_constant "curlopt_keypasswd"
|
|
333
|
+
have_constant "curlopt_sslengine"
|
|
334
|
+
have_constant "curlopt_sslengine_default"
|
|
335
|
+
have_constant "curlopt_sslversion"
|
|
336
|
+
have_constant "curl_sslversion_default"
|
|
337
|
+
have_constant :CURL_SSLVERSION_TLSv1
|
|
338
|
+
have_constant :CURL_SSLVERSION_SSLv2
|
|
339
|
+
have_constant :CURL_SSLVERSION_SSLv3
|
|
340
|
+
|
|
341
|
+
# Added in 7.34.0
|
|
342
|
+
have_constant :CURL_SSLVERSION_TLSv1_0
|
|
343
|
+
have_constant :CURL_SSLVERSION_TLSv1_1
|
|
344
|
+
have_constant :CURL_SSLVERSION_TLSv1_2
|
|
345
|
+
|
|
346
|
+
# Added in 7.52.0
|
|
347
|
+
have_constant :CURL_SSLVERSION_TLSv1_3
|
|
348
|
+
|
|
349
|
+
have_constant "curlopt_ssl_verifypeer"
|
|
350
|
+
have_constant "curlopt_cainfo"
|
|
351
|
+
have_constant "curlopt_issuercert"
|
|
352
|
+
have_constant "curlopt_capath"
|
|
353
|
+
have_constant "curlopt_crlfile"
|
|
354
|
+
have_constant "curlopt_ssl_verifyhost"
|
|
355
|
+
have_constant "curlopt_certinfo"
|
|
356
|
+
have_constant "curlopt_random_file"
|
|
357
|
+
have_constant "curlopt_egdsocket"
|
|
358
|
+
have_constant "curlopt_ssl_cipher_list"
|
|
359
|
+
have_constant "curlopt_ssl_sessionid_cache"
|
|
360
|
+
have_constant "curlopt_krblevel"
|
|
361
|
+
have_constant "curlopt_ssh_auth_types"
|
|
362
|
+
have_constant "curlopt_ssh_host_public_key_md5"
|
|
363
|
+
have_constant "curlopt_ssh_public_keyfile"
|
|
364
|
+
have_constant "curlopt_ssh_private_keyfile"
|
|
365
|
+
have_constant "curlopt_ssh_knownhosts"
|
|
366
|
+
have_constant "curlopt_ssh_keyfunction"
|
|
367
|
+
have_constant "curlkhstat_fine_add_to_file"
|
|
368
|
+
have_constant "curlkhstat_fine"
|
|
369
|
+
have_constant "curlkhstat_reject"
|
|
370
|
+
have_constant "curlkhstat_defer"
|
|
371
|
+
have_constant "curlopt_ssh_keydata"
|
|
372
|
+
have_constant "curlopt_private"
|
|
373
|
+
have_constant "curlopt_share"
|
|
374
|
+
have_constant "curlopt_new_file_perms"
|
|
375
|
+
have_constant "curlopt_new_directory_perms"
|
|
376
|
+
have_constant "curlopt_telnetoptions"
|
|
377
|
+
# was obsoleted in August 2007 for 7.17.0, reused in April 2011 for 7.21.5
|
|
378
|
+
have_constant "curle_not_built_in"
|
|
379
|
+
|
|
380
|
+
have_constant "curle_obsolete" # removed in 7.24 ?
|
|
381
|
+
|
|
382
|
+
have_constant "curle_ftp_pret_failed"
|
|
383
|
+
have_constant "curle_rtsp_cseq_error"
|
|
384
|
+
have_constant "curle_rtsp_session_error"
|
|
385
|
+
have_constant "curle_ftp_bad_file_list"
|
|
386
|
+
have_constant "curle_chunk_failed"
|
|
387
|
+
have_constant "curle_no_connection_available"
|
|
388
|
+
have_constant "curle_ssl_pinnedpubkeynotmatch"
|
|
389
|
+
have_constant "curle_ssl_invalidcertstatus"
|
|
390
|
+
have_constant "curle_http2_stream"
|
|
391
|
+
|
|
392
|
+
# gssapi/spnego delegation related constants
|
|
393
|
+
have_constant "curlopt_gssapi_delegation"
|
|
394
|
+
have_constant "curlgssapi_delegation_policy_flag"
|
|
395
|
+
have_constant "curlgssapi_delegation_flag"
|
|
396
|
+
|
|
397
|
+
have_constant "CURLM_ADDED_ALREADY"
|
|
398
|
+
|
|
399
|
+
# added in 7.40.0
|
|
400
|
+
have_constant "curlopt_unix_socket_path"
|
|
401
|
+
|
|
402
|
+
# added in 7.42.0
|
|
403
|
+
have_constant "curlopt_path_as_is"
|
|
404
|
+
|
|
405
|
+
# added in 7.43.0
|
|
406
|
+
have_constant "curlopt_pipewait"
|
|
407
|
+
|
|
408
|
+
# protocol constants
|
|
409
|
+
have_constant "curlproto_all"
|
|
410
|
+
have_constant "curlproto_dict"
|
|
411
|
+
have_constant "curlproto_file"
|
|
412
|
+
have_constant "curlproto_ftp"
|
|
413
|
+
have_constant "curlproto_ftps"
|
|
414
|
+
have_constant "curlproto_gopher"
|
|
415
|
+
have_constant "curlproto_http"
|
|
416
|
+
have_constant "curlproto_https"
|
|
417
|
+
have_constant "curlproto_imap"
|
|
418
|
+
have_constant "curlproto_imaps"
|
|
419
|
+
have_constant "curlproto_ldap"
|
|
420
|
+
have_constant "curlproto_ldaps"
|
|
421
|
+
have_constant "curlproto_pop3"
|
|
422
|
+
have_constant "curlproto_pop3s"
|
|
423
|
+
have_constant "curlproto_rtmp"
|
|
424
|
+
have_constant "curlproto_rtmpe"
|
|
425
|
+
have_constant "curlproto_rtmps"
|
|
426
|
+
have_constant "curlproto_rtmpt"
|
|
427
|
+
have_constant "curlproto_rtmpte"
|
|
428
|
+
have_constant "curlproto_rtmpts"
|
|
429
|
+
have_constant "curlproto_rtsp"
|
|
430
|
+
have_constant "curlproto_scp"
|
|
431
|
+
have_constant "curlproto_sftp"
|
|
432
|
+
have_constant "curlproto_smb"
|
|
433
|
+
have_constant "curlproto_smbs"
|
|
434
|
+
have_constant "curlproto_smtp"
|
|
435
|
+
have_constant "curlproto_smtps"
|
|
436
|
+
have_constant "curlproto_telnet"
|
|
437
|
+
have_constant "curlproto_tftp"
|
|
438
|
+
|
|
133
439
|
if try_compile('int main() { return 0; }','-Wall')
|
|
134
440
|
$CFLAGS << ' -Wall'
|
|
135
441
|
end
|
|
@@ -145,23 +451,6 @@ def test_for(name, const, src)
|
|
|
145
451
|
end
|
|
146
452
|
end
|
|
147
453
|
end
|
|
148
|
-
test_for("Ruby 1.9 Hash", "RUBY19_HASH", %{
|
|
149
|
-
#include <ruby.h>
|
|
150
|
-
int main() {
|
|
151
|
-
VALUE hash = rb_hash_new();
|
|
152
|
-
if( RHASH(hash)->ntbl->num_entries ) {
|
|
153
|
-
return 0;
|
|
154
|
-
}
|
|
155
|
-
return 1;
|
|
156
|
-
}
|
|
157
|
-
})
|
|
158
|
-
test_for("Ruby 1.9 st.h", "RUBY19_ST_H", %{
|
|
159
|
-
#include <ruby.h>
|
|
160
|
-
#include <ruby/st.h>
|
|
161
|
-
int main() {
|
|
162
|
-
return 0;
|
|
163
|
-
}
|
|
164
|
-
})
|
|
165
454
|
|
|
166
455
|
test_for("curl_easy_escape", "CURL_EASY_ESCAPE", %{
|
|
167
456
|
#include <curl/curl.h>
|
|
@@ -172,5 +461,10 @@ test_for("curl_easy_escape", "CURL_EASY_ESCAPE", %{
|
|
|
172
461
|
}
|
|
173
462
|
})
|
|
174
463
|
|
|
464
|
+
have_func('rb_thread_blocking_region')
|
|
465
|
+
have_header('ruby/thread.h') && have_func('rb_thread_call_without_gvl', 'ruby/thread.h')
|
|
466
|
+
have_header('ruby/io.h')
|
|
467
|
+
have_func('rb_io_stdio_file')
|
|
468
|
+
|
|
175
469
|
create_header('curb_config.h')
|
|
176
470
|
create_makefile('curb_core')
|