gus-curb 0.8.7

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.
Files changed (49) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +51 -0
  3. data/README.markdown +230 -0
  4. data/Rakefile +320 -0
  5. data/doc.rb +42 -0
  6. data/ext/curb.c +997 -0
  7. data/ext/curb.h +48 -0
  8. data/ext/curb_easy.c +3466 -0
  9. data/ext/curb_easy.h +90 -0
  10. data/ext/curb_errors.c +660 -0
  11. data/ext/curb_errors.h +132 -0
  12. data/ext/curb_macros.h +159 -0
  13. data/ext/curb_multi.c +641 -0
  14. data/ext/curb_multi.h +26 -0
  15. data/ext/curb_postfield.c +523 -0
  16. data/ext/curb_postfield.h +40 -0
  17. data/ext/curb_upload.c +80 -0
  18. data/ext/curb_upload.h +30 -0
  19. data/ext/extconf.rb +392 -0
  20. data/lib/curb.rb +1 -0
  21. data/lib/curl.rb +64 -0
  22. data/lib/curl/easy.rb +480 -0
  23. data/lib/curl/multi.rb +248 -0
  24. data/tests/alltests.rb +3 -0
  25. data/tests/bug_crash_on_debug.rb +39 -0
  26. data/tests/bug_crash_on_progress.rb +73 -0
  27. data/tests/bug_curb_easy_blocks_ruby_threads.rb +52 -0
  28. data/tests/bug_curb_easy_post_with_string_no_content_length_header.rb +83 -0
  29. data/tests/bug_instance_post_differs_from_class_post.rb +53 -0
  30. data/tests/bug_issue102.rb +17 -0
  31. data/tests/bug_multi_segfault.rb +14 -0
  32. data/tests/bug_postfields_crash.rb +26 -0
  33. data/tests/bug_postfields_crash2.rb +57 -0
  34. data/tests/bug_require_last_or_segfault.rb +40 -0
  35. data/tests/bugtests.rb +9 -0
  36. data/tests/helper.rb +204 -0
  37. data/tests/mem_check.rb +65 -0
  38. data/tests/require_last_or_segfault_script.rb +36 -0
  39. data/tests/signals.rb +33 -0
  40. data/tests/tc_curl.rb +39 -0
  41. data/tests/tc_curl_download.rb +75 -0
  42. data/tests/tc_curl_easy.rb +1038 -0
  43. data/tests/tc_curl_easy_setopt.rb +31 -0
  44. data/tests/tc_curl_multi.rb +485 -0
  45. data/tests/tc_curl_postfield.rb +143 -0
  46. data/tests/timeout.rb +100 -0
  47. data/tests/timeout_server.rb +33 -0
  48. data/tests/unittests.rb +2 -0
  49. metadata +123 -0
data/doc.rb ADDED
@@ -0,0 +1,42 @@
1
+ require 'fileutils'
2
+ include FileUtils
3
+
4
+ begin
5
+ incflags = File.read('ext/Makefile')[/INCFLAGS\s*=\s*(.*)$/,1]
6
+ rescue Errno::ENOENT
7
+ $stderr.puts("No makefile found; run `rake ext/Makefile' first.")
8
+ end
9
+
10
+ pp_srcdir = 'ext'
11
+
12
+ rm_rf(tmpdir = '.doc-tmp')
13
+ mkdir(tmpdir)
14
+
15
+ begin
16
+ if ARGV.include?('--cpp')
17
+ begin
18
+ if `cpp --version` =~ /\(GCC\)/
19
+ # gnu cpp
20
+ $stderr.puts "Running GNU cpp over source"
21
+
22
+ Dir['ext/*.c'].each do |fn|
23
+ system("cpp -DRDOC_NEVER_DEFINED -C #{incflags} -o " +
24
+ "#{File.join(tmpdir, File.basename(fn))} #{fn}")
25
+ end
26
+
27
+ pp_srcdir = tmpdir
28
+ else
29
+ $stderr.puts "Not running cpp (non-GNU)"
30
+ end
31
+ rescue
32
+ # no cpp
33
+ $stderr.puts "No cpp found"
34
+ end
35
+ end
36
+
37
+ system("rdoc --title='Curb - libcurl bindings for ruby' --main=README #{pp_srcdir}/*.c README LICENSE lib/curb.rb")
38
+ ensure
39
+ rm_rf(tmpdir)
40
+ end
41
+
42
+
@@ -0,0 +1,997 @@
1
+ /* Curb - Libcurl(3) bindings for Ruby.
2
+ * Copyright (c)2006 Ross Bamford.
3
+ * Licensed under the Ruby License. See LICENSE for details.
4
+ *
5
+ * $Id: curb.c 35 2006-12-23 15:22:19Z roscopeco $
6
+ */
7
+
8
+ #include "curb.h"
9
+ #include "curb_upload.h"
10
+
11
+ VALUE mCurl;
12
+
13
+ /* ================== VER QUERY FUNCS ==============*/
14
+
15
+ /*
16
+ * call-seq:
17
+ * Curl.ipv6? => true or false
18
+ *
19
+ * Returns true if the installed libcurl supports IPv6.
20
+ */
21
+ static VALUE ruby_curl_ipv6_q(VALUE mod) {
22
+ curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
23
+ return((ver->features & CURL_VERSION_IPV6) ? Qtrue : Qfalse);
24
+ }
25
+
26
+ /*
27
+ * call-seq:
28
+ * Curl.kerberos4? => true or false
29
+ *
30
+ * Returns true if the installed libcurl supports Kerberos4 authentication
31
+ * with FTP connections.
32
+ */
33
+ static VALUE ruby_curl_kerberos4_q(VALUE mod) {
34
+ curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
35
+ return((ver->features & CURL_VERSION_KERBEROS4) ? Qtrue : Qfalse);
36
+ }
37
+
38
+ /*
39
+ * call-seq:
40
+ * Curl.ssl? => true or false
41
+ *
42
+ * Returns true if the installed libcurl supports SSL connections.
43
+ * For libcurl versions < 7.10, always returns false.
44
+ */
45
+ static VALUE ruby_curl_ssl_q(VALUE mod) {
46
+ #ifdef HAVE_CURL_VERSION_SSL
47
+ curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
48
+ return((ver->features & CURL_VERSION_SSL) ? Qtrue : Qfalse);
49
+ #else
50
+ return Qfalse;
51
+ #endif
52
+ }
53
+
54
+ /*
55
+ * call-seq:
56
+ * Curl.libz? => true or false
57
+ *
58
+ * Returns true if the installed libcurl supports HTTP deflate
59
+ * using libz. For libcurl versions < 7.10, always returns false.
60
+ */
61
+ static VALUE ruby_curl_libz_q(VALUE mod) {
62
+ #ifdef HAVE_CURL_VERSION_LIBZ
63
+ curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
64
+ return((ver->features & CURL_VERSION_LIBZ) ? Qtrue : Qfalse);
65
+ #else
66
+ return Qfalse;
67
+ #endif
68
+ }
69
+
70
+ /*
71
+ * call-seq:
72
+ * Curl.ntlm? => true or false
73
+ *
74
+ * Returns true if the installed libcurl supports HTTP NTLM.
75
+ * For libcurl versions < 7.10.6, always returns false.
76
+ */
77
+ static VALUE ruby_curl_ntlm_q(VALUE mod) {
78
+ #ifdef HAVE_CURL_VERSION_NTLM
79
+ curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
80
+ return((ver->features & CURL_VERSION_NTLM) ? Qtrue : Qfalse);
81
+ #else
82
+ return Qfalse;
83
+ #endif
84
+ }
85
+
86
+ /*
87
+ * call-seq:
88
+ * Curl.gssnegotiate? => true or false
89
+ *
90
+ * Returns true if the installed libcurl supports HTTP GSS-Negotiate.
91
+ * For libcurl versions < 7.10.6, always returns false.
92
+ */
93
+ static VALUE ruby_curl_gssnegotiate_q(VALUE mod) {
94
+ #ifdef HAVE_CURL_VERSION_GSSNEGOTIATE
95
+ curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
96
+ return((ver->features & CURL_VERSION_GSSNEGOTIATE) ? Qtrue : Qfalse);
97
+ #else
98
+ return Qfalse;
99
+ #endif
100
+ }
101
+
102
+ /*
103
+ * call-seq:
104
+ * Curl.debug? => true or false
105
+ *
106
+ * Returns true if the installed libcurl was built with extra debug
107
+ * capabilities built-in. For libcurl versions < 7.10.6, always returns
108
+ * false.
109
+ */
110
+ static VALUE ruby_curl_debug_q(VALUE mod) {
111
+ #ifdef HAVE_CURL_VERSION_DEBUG
112
+ curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
113
+ return((ver->features & CURL_VERSION_DEBUG) ? Qtrue : Qfalse);
114
+ #else
115
+ return Qfalse;
116
+ #endif
117
+ }
118
+
119
+ /*
120
+ * call-seq:
121
+ * Curl.asyncdns? => true or false
122
+ *
123
+ * Returns true if the installed libcurl was built with support for
124
+ * asynchronous name lookups, which allows more exact timeouts (even
125
+ * on Windows) and less blocking when using the multi interface.
126
+ * For libcurl versions < 7.10.7, always returns false.
127
+ */
128
+ static VALUE ruby_curl_asyncdns_q(VALUE mod) {
129
+ #ifdef HAVE_CURL_VERSION_ASYNCHDNS
130
+ curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
131
+ return((ver->features & CURL_VERSION_ASYNCHDNS) ? Qtrue : Qfalse);
132
+ #else
133
+ return Qfalse;
134
+ #endif
135
+ }
136
+
137
+ /*
138
+ * call-seq:
139
+ * Curl.spnego? => true or false
140
+ *
141
+ * Returns true if the installed libcurl was built with support for SPNEGO
142
+ * authentication (Simple and Protected GSS-API Negotiation Mechanism, defined
143
+ * in RFC 2478). For libcurl versions < 7.10.8, always returns false.
144
+ */
145
+ static VALUE ruby_curl_spnego_q(VALUE mod) {
146
+ #ifdef HAVE_CURL_VERSION_SPNEGO
147
+ curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
148
+ return((ver->features & CURL_VERSION_SPNEGO) ? Qtrue : Qfalse);
149
+ #else
150
+ return Qfalse;
151
+ #endif
152
+ }
153
+
154
+ /*
155
+ * call-seq:
156
+ * Curl.largefile? => true or false
157
+ *
158
+ * Returns true if the installed libcurl was built with support for large
159
+ * files. For libcurl versions < 7.11.1, always returns false.
160
+ */
161
+ static VALUE ruby_curl_largefile_q(VALUE mod) {
162
+ #ifdef HAVE_CURL_VERSION_LARGEFILE
163
+ curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
164
+ return((ver->features & CURL_VERSION_LARGEFILE) ? Qtrue : Qfalse);
165
+ #else
166
+ return Qfalse;
167
+ #endif
168
+ }
169
+
170
+ /*
171
+ * call-seq:
172
+ * Curl.idn? => true or false
173
+ *
174
+ * Returns true if the installed libcurl was built with support for IDNA,
175
+ * domain names with international letters. For libcurl versions < 7.12.0,
176
+ * always returns false.
177
+ */
178
+ static VALUE ruby_curl_idn_q(VALUE mod) {
179
+ #ifdef HAVE_CURL_VERSION_IDN
180
+ curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
181
+ return((ver->features & CURL_VERSION_IDN) ? Qtrue : Qfalse);
182
+ #else
183
+ return Qfalse;
184
+ #endif
185
+ }
186
+
187
+ /*
188
+ * call-seq:
189
+ * Curl.sspi? => true or false
190
+ *
191
+ * Returns true if the installed libcurl was built with support for SSPI.
192
+ * This is only available on Windows and makes libcurl use Windows-provided
193
+ * functions for NTLM authentication. It also allows libcurl to use the current
194
+ * user and the current user's password without the app having to pass them on.
195
+ * For libcurl versions < 7.13.2, always returns false.
196
+ */
197
+ static VALUE ruby_curl_sspi_q(VALUE mod) {
198
+ #ifdef HAVE_CURL_VERSION_SSPI
199
+ curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
200
+ return((ver->features & CURL_VERSION_SSPI) ? Qtrue : Qfalse);
201
+ #else
202
+ return Qfalse;
203
+ #endif
204
+ }
205
+
206
+ /*
207
+ * call-seq:
208
+ * Curl.conv? => true or false
209
+ *
210
+ * Returns true if the installed libcurl was built with support for character
211
+ * conversions. For libcurl versions < 7.15.4, always returns false.
212
+ */
213
+ static VALUE ruby_curl_conv_q(VALUE mod) {
214
+ #ifdef HAVE_CURL_VERSION_CONV
215
+ curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
216
+ return((ver->features & CURL_VERSION_CONV) ? Qtrue : Qfalse);
217
+ #else
218
+ return Qfalse;
219
+ #endif
220
+ }
221
+
222
+ void Init_curb_core() {
223
+ // TODO we need to call curl_global_cleanup at exit!
224
+ curl_version_info_data *ver;
225
+ VALUE curlver, curllongver, curlvernum;
226
+
227
+ curl_global_init(CURL_GLOBAL_ALL);
228
+ ver = curl_version_info(CURLVERSION_NOW);
229
+
230
+ mCurl = rb_define_module("Curl");
231
+
232
+ curlver = rb_str_new2(ver->version);
233
+ curllongver = rb_str_new2(curl_version());
234
+ curlvernum = LONG2NUM(LIBCURL_VERSION_NUM);
235
+
236
+ rb_define_const(mCurl, "CURB_VERSION", rb_str_new2(CURB_VERSION));
237
+ rb_define_const(mCurl, "VERSION", curlver);
238
+ rb_define_const(mCurl, "CURL_VERSION", curlver);
239
+ rb_define_const(mCurl, "VERNUM", curlvernum);
240
+ rb_define_const(mCurl, "CURL_VERNUM", curlvernum);
241
+ rb_define_const(mCurl, "LONG_VERSION", curllongver);
242
+ rb_define_const(mCurl, "CURL_LONG_VERSION", curllongver);
243
+
244
+ /* Passed to on_debug handler to indicate that the data is informational text. */
245
+ rb_define_const(mCurl, "CURLINFO_TEXT", INT2FIX(CURLINFO_TEXT));
246
+
247
+ /* Passed to on_debug handler to indicate that the data is header (or header-like) data received from the peer. */
248
+ rb_define_const(mCurl, "CURLINFO_HEADER_IN", INT2FIX(CURLINFO_HEADER_IN));
249
+
250
+ /* Passed to on_debug handler to indicate that the data is header (or header-like) data sent to the peer. */
251
+ rb_define_const(mCurl, "CURLINFO_HEADER_OUT", INT2FIX(CURLINFO_HEADER_OUT));
252
+
253
+ /* Passed to on_debug handler to indicate that the data is protocol data received from the peer. */
254
+ rb_define_const(mCurl, "CURLINFO_DATA_IN", INT2FIX(CURLINFO_DATA_IN));
255
+
256
+ /* Passed to on_debug handler to indicate that the data is protocol data sent to the peer. */
257
+ rb_define_const(mCurl, "CURLINFO_DATA_OUT", INT2FIX(CURLINFO_DATA_OUT));
258
+
259
+ #ifdef HAVE_CURLFTPMETHOD_MULTICWD
260
+ rb_define_const(mCurl, "CURL_MULTICWD", INT2FIX(CURLFTPMETHOD_MULTICWD));
261
+ #endif
262
+
263
+ #ifdef HAVE_CURLFTPMETHOD_NOCWD
264
+ rb_define_const(mCurl, "CURL_NOCWD", INT2FIX(CURLFTPMETHOD_NOCWD));
265
+ #endif
266
+
267
+ #ifdef HAVE_CURLFTPMETHOD_SINGLECWD
268
+ rb_define_const(mCurl, "CURL_SINGLECWD", INT2FIX(CURLFTPMETHOD_SINGLECWD));
269
+ #endif
270
+
271
+ /* When passed to Curl::Easy#proxy_type , indicates that the proxy is an HTTP proxy. (libcurl >= 7.10) */
272
+ #ifdef HAVE_CURLPROXY_HTTP
273
+ rb_define_const(mCurl, "CURLPROXY_HTTP", INT2FIX(CURLPROXY_HTTP));
274
+ #else
275
+ rb_define_const(mCurl, "CURLPROXY_HTTP", INT2FIX(-1));
276
+ #endif
277
+
278
+ #ifdef CURL_VERSION_SSL
279
+ rb_define_const(mCurl, "CURL_SSLVERSION_DEFAULT", INT2FIX(CURL_SSLVERSION_DEFAULT));
280
+ rb_define_const(mCurl, "CURL_SSLVERSION_TLSv1", INT2FIX(CURL_SSLVERSION_TLSv1));
281
+ rb_define_const(mCurl, "CURL_SSLVERSION_SSLv2", INT2FIX(CURL_SSLVERSION_SSLv2));
282
+ rb_define_const(mCurl, "CURL_SSLVERSION_SSLv3", INT2FIX(CURL_SSLVERSION_SSLv3));
283
+
284
+ rb_define_const(mCurl, "CURL_USESSL_CONTROL", INT2FIX(CURB_FTPSSL_CONTROL));
285
+ rb_define_const(mCurl, "CURL_USESSL_NONE", INT2FIX(CURB_FTPSSL_NONE));
286
+ rb_define_const(mCurl, "CURL_USESSL_TRY", INT2FIX(CURB_FTPSSL_TRY));
287
+ rb_define_const(mCurl, "CURL_USESSL_ALL", INT2FIX(CURB_FTPSSL_ALL));
288
+ #else
289
+ rb_define_const(mCurl, "CURL_SSLVERSION_DEFAULT", INT2FIX(-1));
290
+ rb_define_const(mCurl, "CURL_SSLVERSION_TLSv1", INT2FIX(-1));
291
+ rb_define_const(mCurl, "CURL_SSLVERSION_SSLv2", INT2FIX(-1));
292
+ rb_define_const(mCurl, "CURL_SSLVERSION_SSLv3", INT2FIX(-1));
293
+
294
+ rb_define_const(mCurl, "CURL_USESSL_CONTROL", INT2FIX(-1));
295
+ rb_define_const(mCurl, "CURL_USESSL_NONE", INT2FIX(-1));
296
+ rb_define_const(mCurl, "CURL_USESSL_TRY", INT2FIX(-1));
297
+ rb_define_const(mCurl, "CURL_USESSL_ALL", INT2FIX(-1));
298
+ #endif
299
+
300
+ /* When passed to Curl::Easy#proxy_type , indicates that the proxy is a SOCKS4 proxy. (libcurl >= 7.15.2) */
301
+ #ifdef HAVE_CURLPROXY_SOCKS4
302
+ rb_define_const(mCurl, "CURLPROXY_SOCKS4", INT2FIX(CURLPROXY_SOCKS4));
303
+ #else
304
+ rb_define_const(mCurl, "CURLPROXY_SOCKS4", INT2FIX(-2));
305
+ #endif
306
+
307
+ /* When passed to Curl::Easy#proxy_type , indicates that the proxy is a SOCKS4A proxy. (libcurl >= 7.18.0) */
308
+ #ifdef HAVE_CURLPROXY_SOCKS4A
309
+ rb_define_const(mCurl, "CURLPROXY_SOCKS4A", INT2FIX(CURLPROXY_SOCKS4A));
310
+ #else
311
+ rb_define_const(mCurl, "CURLPROXY_SOCKS4A", INT2FIX(-2));
312
+ #endif
313
+
314
+ /* When passed to Curl::Easy#proxy_type , indicates that the proxy is a SOCKS5 proxy. (libcurl >= 7.10) */
315
+ #ifdef HAVE_CURLPROXY_SOCKS5
316
+ rb_define_const(mCurl, "CURLPROXY_SOCKS5", INT2FIX(CURLPROXY_SOCKS5));
317
+ #else
318
+ rb_define_const(mCurl, "CURLPROXY_SOCKS5", INT2FIX(-2));
319
+ #endif
320
+
321
+ /* When passed to Curl::Easy#http_auth_types or Curl::Easy#proxy_auth_types, directs libcurl to use Basic authentication. */
322
+ #ifdef HAVE_CURLAUTH_BASIC
323
+ rb_define_const(mCurl, "CURLAUTH_BASIC", INT2FIX(CURLAUTH_BASIC));
324
+ #else
325
+ rb_define_const(mCurl, "CURLAUTH_BASIC", INT2FIX(0));
326
+ #endif
327
+
328
+ /* When passed to Curl::Easy#http_auth_types or Curl::Easy#proxy_auth_types, directs libcurl to use Digest authentication. */
329
+ #ifdef HAVE_CURLAUTH_DIGEST
330
+ rb_define_const(mCurl, "CURLAUTH_DIGEST", INT2FIX(CURLAUTH_DIGEST));
331
+ #else
332
+ rb_define_const(mCurl, "CURLAUTH_DIGEST", INT2FIX(0));
333
+ #endif
334
+
335
+ /* When passed to Curl::Easy#http_auth_types or Curl::Easy#proxy_auth_types, directs libcurl to use GSS Negotiate authentication. Requires a suitable GSS-API library. */
336
+ #ifdef HAVE_CURLAUTH_GSSNEGOTIATE
337
+ rb_define_const(mCurl, "CURLAUTH_GSSNEGOTIATE", INT2FIX(CURLAUTH_GSSNEGOTIATE));
338
+ #else
339
+ rb_define_const(mCurl, "CURLAUTH_GSSNEGOTIATE", INT2FIX(0));
340
+ #endif
341
+
342
+ /* When passed to Curl::Easy#http_auth_types or Curl::Easy#proxy_auth_types, directs libcurl to use HTTP NTLM authentication. Requires MS Windows or OpenSSL support. */
343
+ #ifdef HAVE_CURLAUTH_NTLM
344
+ rb_define_const(mCurl, "CURLAUTH_NTLM", INT2FIX(CURLAUTH_NTLM));
345
+ #else
346
+ rb_define_const(mCurl, "CURLAUTH_NTLM", INT2FIX(0));
347
+ #endif
348
+
349
+ /* When passed to Curl::Easy#http_auth_types or Curl::Easy#proxy_auth_types, allows libcurl to select any suitable authentication method except basic. */
350
+ #ifdef HAVE_CURLAUTH_ANYSAFE
351
+ rb_define_const(mCurl, "CURLAUTH_ANYSAFE", INT2FIX(CURLAUTH_ANYSAFE));
352
+ #else
353
+ rb_define_const(mCurl, "CURLAUTH_ANYSAFE", INT2FIX(0));
354
+ #endif
355
+
356
+ /* When passed to Curl::Easy#http_auth_types or Curl::Easy#proxy_auth_types, allows libcurl to select any suitable authentication method. */
357
+ #ifdef HAVE_CURLAUTH_ANY
358
+ rb_define_const(mCurl, "CURLAUTH_ANY", INT2FIX(CURLAUTH_ANY));
359
+ #else
360
+ rb_define_const(mCurl, "CURLAUTH_ANY", INT2FIX(0));
361
+ #endif
362
+
363
+ CURB_DEFINE(CURLOPT_VERBOSE);
364
+ CURB_DEFINE(CURLOPT_HEADER);
365
+ CURB_DEFINE(CURLOPT_NOPROGRESS);
366
+ CURB_DEFINE(CURLOPT_NOSIGNAL);
367
+ CURB_DEFINE(CURLOPT_WRITEFUNCTION);
368
+ CURB_DEFINE(CURLOPT_WRITEDATA);
369
+ CURB_DEFINE(CURLOPT_READFUNCTION);
370
+ CURB_DEFINE(CURLOPT_READDATA);
371
+ CURB_DEFINE(CURLOPT_IOCTLFUNCTION);
372
+ CURB_DEFINE(CURLOPT_IOCTLDATA);
373
+ #if HAVE_CURLOPT_SEEKFUNCTION
374
+ CURB_DEFINE(CURLOPT_SEEKFUNCTION);
375
+ #endif
376
+ #if HAVE_CURLOPT_SEEKDATA
377
+ CURB_DEFINE(CURLOPT_SEEKDATA);
378
+ #endif
379
+ #if HAVE_CURLOPT_SOCKOPTFUNCTION
380
+ CURB_DEFINE(CURLOPT_SOCKOPTFUNCTION);
381
+ #endif
382
+ #if HAVE_CURLOPT_SOCKOPTDATA
383
+ CURB_DEFINE(CURLOPT_SOCKOPTDATA);
384
+ #endif
385
+ #if HAVE_CURLOPT_OPENSOCKETFUNCTION
386
+ CURB_DEFINE(CURLOPT_OPENSOCKETFUNCTION);
387
+ #endif
388
+ #if HAVE_CURLOPT_OPENSOCKETDATA
389
+ CURB_DEFINE(CURLOPT_OPENSOCKETDATA);
390
+ #endif
391
+ CURB_DEFINE(CURLOPT_PROGRESSFUNCTION);
392
+ CURB_DEFINE(CURLOPT_PROGRESSDATA);
393
+ CURB_DEFINE(CURLOPT_HEADERFUNCTION);
394
+ CURB_DEFINE(CURLOPT_WRITEHEADER);
395
+ CURB_DEFINE(CURLOPT_DEBUGFUNCTION);
396
+ CURB_DEFINE(CURLOPT_DEBUGDATA);
397
+ CURB_DEFINE(CURLOPT_SSL_CTX_FUNCTION);
398
+ CURB_DEFINE(CURLOPT_SSL_CTX_DATA);
399
+ CURB_DEFINE(CURLOPT_CONV_TO_NETWORK_FUNCTION);
400
+ CURB_DEFINE(CURLOPT_CONV_FROM_NETWORK_FUNCTION);
401
+ CURB_DEFINE(CURLOPT_CONV_FROM_UTF8_FUNCTION);
402
+
403
+ #if HAVE_CURLOPT_INTERLEAVEFUNCTION
404
+ CURB_DEFINE(CURLOPT_INTERLEAVEFUNCTION);
405
+ #endif
406
+ #if HAVE_CURLOPT_INTERLEAVEDATA
407
+ CURB_DEFINE(CURLOPT_INTERLEAVEDATA);
408
+ #endif
409
+ #if HAVE_CURLOPT_CHUNK_BGN_FUNCTION
410
+ CURB_DEFINE(CURLOPT_CHUNK_BGN_FUNCTION);
411
+ #endif
412
+ #if HAVE_CURLOPT_CHUNK_END_FUNCTION
413
+ CURB_DEFINE(CURLOPT_CHUNK_END_FUNCTION);
414
+ #endif
415
+ #if HAVE_CURLOPT_CHUNK_DATA
416
+ CURB_DEFINE(CURLOPT_CHUNK_DATA);
417
+ #endif
418
+ #if HAVE_CURLOPT_FNMATCH_FUNCTION
419
+ CURB_DEFINE(CURLOPT_FNMATCH_FUNCTION);
420
+ #endif
421
+ #if HAVE_CURLOPT_FNMATCH_DATA
422
+ CURB_DEFINE(CURLOPT_FNMATCH_DATA);
423
+ #endif
424
+ #if HAVE_CURLOPT_ERRORBUFFER
425
+ CURB_DEFINE(CURLOPT_ERRORBUFFER);
426
+ #endif
427
+ #if HAVE_CURLOPT_STDERR
428
+ CURB_DEFINE(CURLOPT_STDERR);
429
+ #endif
430
+ #if HAVE_CURLOPT_FAILONERROR
431
+ CURB_DEFINE(CURLOPT_FAILONERROR);
432
+ #endif
433
+ CURB_DEFINE(CURLOPT_URL);
434
+ #if HAVE_CURLOPT_PROTOCOLS
435
+ CURB_DEFINE(CURLOPT_PROTOCOLS);
436
+ #endif
437
+ #if HAVE_CURLOPT_REDIR_PROTOCOLS
438
+ CURB_DEFINE(CURLOPT_REDIR_PROTOCOLS);
439
+ #endif
440
+ CURB_DEFINE(CURLOPT_PROXY);
441
+ CURB_DEFINE(CURLOPT_PROXYPORT);
442
+ #if HAVE_CURLOPT_PROXYTYPE
443
+ CURB_DEFINE(CURLOPT_PROXYTYPE);
444
+ #endif
445
+ #if HAVE_CURLOPT_NOPROXY
446
+ CURB_DEFINE(CURLOPT_NOPROXY);
447
+ #endif
448
+ CURB_DEFINE(CURLOPT_HTTPPROXYTUNNEL);
449
+ #if HAVE_CURLOPT_SOCKS5_GSSAPI_SERVICE
450
+ CURB_DEFINE(CURLOPT_SOCKS5_GSSAPI_SERVICE);
451
+ #endif
452
+ #if HAVE_CURLOPT_SOCKS5_GSSAPI_NEC
453
+ CURB_DEFINE(CURLOPT_SOCKS5_GSSAPI_NEC);
454
+ #endif
455
+ CURB_DEFINE(CURLOPT_INTERFACE);
456
+ #if HAVE_CURLOPT_LOCALPORT
457
+ CURB_DEFINE(CURLOPT_LOCALPORT);
458
+ #endif
459
+ CURB_DEFINE(CURLOPT_DNS_CACHE_TIMEOUT);
460
+ CURB_DEFINE(CURLOPT_DNS_USE_GLOBAL_CACHE);
461
+ CURB_DEFINE(CURLOPT_BUFFERSIZE);
462
+ CURB_DEFINE(CURLOPT_PORT);
463
+ CURB_DEFINE(CURLOPT_TCP_NODELAY);
464
+ #if HAVE_CURLOPT_ADDRESS_SCOPE
465
+ CURB_DEFINE(CURLOPT_ADDRESS_SCOPE);
466
+ #endif
467
+ CURB_DEFINE(CURLOPT_NETRC);
468
+ CURB_DEFINE(CURL_NETRC_OPTIONAL);
469
+ CURB_DEFINE(CURL_NETRC_IGNORED);
470
+ CURB_DEFINE(CURL_NETRC_REQUIRED);
471
+ #if HAVE_CURLOPT_NETRC_FILE
472
+ CURB_DEFINE(CURLOPT_NETRC_FILE);
473
+ #endif
474
+ CURB_DEFINE(CURLOPT_USERPWD);
475
+ CURB_DEFINE(CURLOPT_PROXYUSERPWD);
476
+ #if HAVE_CURLOPT_USERNAME
477
+ CURB_DEFINE(CURLOPT_USERNAME);
478
+ #endif
479
+ #if HAVE_CURLOPT_PASSWORD
480
+ CURB_DEFINE(CURLOPT_PASSWORD);
481
+ #endif
482
+ #if HAVE_CURLOPT_PROXYUSERNAME
483
+ CURB_DEFINE(CURLOPT_PASSWORD);
484
+ #endif
485
+ #if HAVE_CURLOPT_PROXYPASSWORD
486
+ CURB_DEFINE(CURLOPT_PASSWORD);
487
+ #endif
488
+
489
+ #if HAVE_CURLOPT_HTTPAUTH
490
+ CURB_DEFINE(CURLOPT_HTTPAUTH);
491
+ #endif
492
+ #if HAVE_CURLAUTH_DIGEST_IE
493
+ CURB_DEFINE(CURLAUTH_DIGEST_IE);
494
+ #endif
495
+ #if HAVE_CURLAUTH_ONLY
496
+ CURB_DEFINE(CURLAUTH_ONLY);
497
+ #endif
498
+ #if HAVE_CURLOPT_TLSAUTH_TYPE
499
+ CURB_DEFINE(CURLOPT_TLSAUTH_TYPE);
500
+ #endif
501
+ #if HAVE_CURLOPT_TLSAUTH_SRP
502
+ CURB_DEFINE(CURLOPT_TLSAUTH_SRP);
503
+ #endif
504
+ #if HAVE_CURLOPT_TLSAUTH_USERNAME
505
+ CURB_DEFINE(CURLOPT_TLSAUTH_USERNAME);
506
+ #endif
507
+ #if HAVE_CURLOPT_TLSAUTH_PASSWORD
508
+ CURB_DEFINE(CURLOPT_TLSAUTH_PASSWORD);
509
+ #endif
510
+ #if HAVE_CURLOPT_PROXYAUTH
511
+ CURB_DEFINE(CURLOPT_PROXYAUTH);
512
+ #endif
513
+ #if HAVE_CURLOPT_AUTOREFERER
514
+ CURB_DEFINE(CURLOPT_AUTOREFERER);
515
+ #endif
516
+ #if HAVE_CURLOPT_ENCODING
517
+ CURB_DEFINE(CURLOPT_ENCODING);
518
+ #endif
519
+ #if HAVE_CURLOPT_FOLLOWLOCATION
520
+ CURB_DEFINE(CURLOPT_FOLLOWLOCATION);
521
+ #endif
522
+ #if HAVE_CURLOPT_UNRESTRICTED_AUTH
523
+ CURB_DEFINE(CURLOPT_UNRESTRICTED_AUTH);
524
+ #endif
525
+ #if HAVE_CURLOPT_MAXREDIRS
526
+ CURB_DEFINE(CURLOPT_MAXREDIRS);
527
+ #endif
528
+ #if HAVE_CURLOPT_POSTREDIR
529
+ CURB_DEFINE(CURLOPT_POSTREDIR);
530
+ #endif
531
+ #if HAVE_CURLOPT_PUT
532
+ CURB_DEFINE(CURLOPT_PUT);
533
+ #endif
534
+ #if HAVE_CURLOPT_POST
535
+ CURB_DEFINE(CURLOPT_POST);
536
+ #endif
537
+ CURB_DEFINE(CURLOPT_POSTFIELDS);
538
+ CURB_DEFINE(CURLOPT_POSTFIELDSIZE);
539
+ #if HAVE_CURLOPT_POSTFIELDSIZE_LARGE
540
+ CURB_DEFINE(CURLOPT_POSTFIELDSIZE_LARGE);
541
+ #endif
542
+ #if HAVE_CURLOPT_COPYPOSTFIELDS
543
+ CURB_DEFINE(CURLOPT_COPYPOSTFIELDS);
544
+ #endif
545
+ #if HAVE_CURLOPT_HTTPPOST
546
+ CURB_DEFINE(CURLOPT_HTTPPOST);
547
+ #endif
548
+ CURB_DEFINE(CURLOPT_REFERER);
549
+ CURB_DEFINE(CURLOPT_USERAGENT);
550
+ CURB_DEFINE(CURLOPT_HTTPHEADER);
551
+ #if HAVE_CURLOPT_HTTP200ALIASES
552
+ CURB_DEFINE(CURLOPT_HTTP200ALIASES);
553
+ #endif
554
+
555
+ CURB_DEFINE(CURLOPT_COOKIE);
556
+ CURB_DEFINE(CURLOPT_COOKIEFILE);
557
+ CURB_DEFINE(CURLOPT_COOKIEJAR);
558
+
559
+ #if HAVE_CURLOPT_COOKIESESSION
560
+ CURB_DEFINE(CURLOPT_COOKIESESSION);
561
+ #endif
562
+ #if HAVE_CURLOPT_COOKIELIST
563
+ CURB_DEFINE(CURLOPT_COOKIELIST);
564
+ #endif
565
+ #if HAVE_CURLOPT_HTTPGET
566
+ CURB_DEFINE(CURLOPT_HTTPGET);
567
+ #endif
568
+ CURB_DEFINE(CURLOPT_HTTP_VERSION);
569
+ CURB_DEFINE(CURL_HTTP_VERSION_NONE);
570
+ CURB_DEFINE(CURL_HTTP_VERSION_1_0);
571
+ CURB_DEFINE(CURL_HTTP_VERSION_1_1);
572
+ #if HAVE_CURLOPT_IGNORE_CONTENT_LENGTH
573
+ CURB_DEFINE(CURLOPT_IGNORE_CONTENT_LENGTH);
574
+ #endif
575
+ #if HAVE_CURLOPT_HTTP_CONTENT_DECODING
576
+ CURB_DEFINE(CURLOPT_HTTP_CONTENT_DECODING);
577
+ #endif
578
+ #if HAVE_CURLOPT_HTTP_TRANSFER_DECODING
579
+ CURB_DEFINE(CURLOPT_HTTP_TRANSFER_DECODING);
580
+ #endif
581
+ #if HAVE_CURLOPT_MAIL_FROM
582
+ CURB_DEFINE(CURLOPT_MAIL_FROM);
583
+ #endif
584
+ #if HAVE_CURLOPT_MAIL_RCPT
585
+ CURB_DEFINE(CURLOPT_MAIL_RCPT);
586
+ #endif
587
+ #if HAVE_CURLOPT_TFTP_BLKSIZE
588
+ CURB_DEFINE(CURLOPT_TFTP_BLKSIZE);
589
+ #endif
590
+ #if HAVE_CURLOPT_FTPPORT
591
+ CURB_DEFINE(CURLOPT_FTPPORT);
592
+ #endif
593
+ #if HAVE_CURLOPT_QUOTE
594
+ CURB_DEFINE(CURLOPT_QUOTE);
595
+ #endif
596
+ #if HAVE_CURLOPT_POSTQUOTE
597
+ CURB_DEFINE(CURLOPT_POSTQUOTE);
598
+ #endif
599
+ #if HAVE_CURLOPT_PREQUOTE
600
+ CURB_DEFINE(CURLOPT_PREQUOTE);
601
+ #endif
602
+ #if HAVE_CURLOPT_DIRLISTONLY
603
+ CURB_DEFINE(CURLOPT_DIRLISTONLY);
604
+ #endif
605
+ #if HAVE_CURLOPT_APPEND
606
+ CURB_DEFINE(CURLOPT_APPEND);
607
+ #endif
608
+ #if HAVE_CURLOPT_FTP_USE_EPRT
609
+ CURB_DEFINE(CURLOPT_FTP_USE_EPRT);
610
+ #endif
611
+ #if HAVE_CURLOPT_FTP_USE_EPSV
612
+ CURB_DEFINE(CURLOPT_FTP_USE_EPSV);
613
+ #endif
614
+ #if HAVE_CURLOPT_FTP_USE_PRET
615
+ CURB_DEFINE(CURLOPT_FTP_USE_PRET);
616
+ #endif
617
+ #if HAVE_CURLOPT_FTP_CREATE_MISSING_DIRS
618
+ CURB_DEFINE(CURLOPT_FTP_CREATE_MISSING_DIRS);
619
+ #endif
620
+ #if HAVE_CURLOPT_FTP_RESPONSE_TIMEOUT
621
+ CURB_DEFINE(CURLOPT_FTP_RESPONSE_TIMEOUT);
622
+ #endif
623
+ #if HAVE_CURLOPT_FTP_ALTERNATIVE_TO_USER
624
+ CURB_DEFINE(CURLOPT_FTP_ALTERNATIVE_TO_USER);
625
+ #endif
626
+ #if HAVE_CURLOPT_FTP_SKIP_PASV_IP
627
+ CURB_DEFINE(CURLOPT_FTP_SKIP_PASV_IP);
628
+ #endif
629
+ #if HAVE_CURLOPT_FTPSSLAUTH
630
+ CURB_DEFINE(CURLOPT_FTPSSLAUTH);
631
+ #endif
632
+ #if HAVE_CURLFTPAUTH_DEFAULT
633
+ CURB_DEFINE(CURLFTPAUTH_DEFAULT);
634
+ #endif
635
+ #if HAVE_CURLFTPAUTH_SSL
636
+ CURB_DEFINE(CURLFTPAUTH_SSL);
637
+ #endif
638
+ #if HAVE_CURLFTPAUTH_TLS
639
+ CURB_DEFINE(CURLFTPAUTH_TLS);
640
+ #endif
641
+ #if HAVE_CURLOPT_FTP_SSL_CCC
642
+ CURB_DEFINE(CURLOPT_FTP_SSL_CCC);
643
+ #endif
644
+ #if HAVE_CURLFTPSSL_CCC_NONE
645
+ CURB_DEFINE(CURLFTPSSL_CCC_NONE);
646
+ #endif
647
+ #if HAVE_CURLFTPSSL_CCC_PASSIVE
648
+ CURB_DEFINE(CURLFTPSSL_CCC_PASSIVE);
649
+ #endif
650
+ #if HAVE_CURLFTPSSL_CCC_ACTIVE
651
+ CURB_DEFINE(CURLFTPSSL_CCC_ACTIVE);
652
+ #endif
653
+ #if HAVE_CURLOPT_FTP_ACCOUNT
654
+ CURB_DEFINE(CURLOPT_FTP_ACCOUNT);
655
+ #endif
656
+ #if HAVE_CURLOPT_FTP_FILEMETHOD
657
+ CURB_DEFINE(CURLOPT_FTP_FILEMETHOD);
658
+ #endif
659
+ #if HAVE_CURLFTPMETHOD_MULTICWD
660
+ CURB_DEFINE(CURLFTPMETHOD_MULTICWD);
661
+ #endif
662
+ #if HAVE_CURLFTPMETHOD_NOCWD
663
+ CURB_DEFINE(CURLFTPMETHOD_NOCWD);
664
+ #endif
665
+ #if HAVE_CURLFTPMETHOD_SINGLECWD
666
+ CURB_DEFINE(CURLFTPMETHOD_SINGLECWD);
667
+ #endif
668
+ #if HAVE_CURLOPT_RTSP_REQUEST
669
+ CURB_DEFINE(CURLOPT_RTSP_REQUEST);
670
+ #endif
671
+ #if HAVE_CURL_RTSPREQ_OPTIONS
672
+ CURB_DEFINE(CURL_RTSPREQ_OPTIONS);
673
+ #endif
674
+ #if HAVE_CURL_RTSPREQ_DESCRIBE
675
+ CURB_DEFINE(CURL_RTSPREQ_DESCRIBE);
676
+ #endif
677
+ #if HAVE_CURL_RTSPREQ_ANNOUNCE
678
+ CURB_DEFINE(CURL_RTSPREQ_ANNOUNCE);
679
+ #endif
680
+ #if HAVE_CURL_RTSPREQ_SETUP
681
+ CURB_DEFINE(CURL_RTSPREQ_SETUP);
682
+ #endif
683
+ #if HAVE_CURL_RTSPREQ_PLAY
684
+ CURB_DEFINE(CURL_RTSPREQ_PLAY);
685
+ #endif
686
+ #if HAVE_CURL_RTSPREQ_PAUSE
687
+ CURB_DEFINE(CURL_RTSPREQ_PAUSE);
688
+ #endif
689
+ #if HAVE_CURL_RTSPREQ_TEARDOWN
690
+ CURB_DEFINE(CURL_RTSPREQ_TEARDOWN);
691
+ #endif
692
+ #if HAVE_CURL_RTSPREQ_GET_PARAMETER
693
+ CURB_DEFINE(CURL_RTSPREQ_GET_PARAMETER);
694
+ #endif
695
+ #if HAVE_CURL_RTSPREQ_SET_PARAMETER
696
+ CURB_DEFINE(CURL_RTSPREQ_SET_PARAMETER);
697
+ #endif
698
+ #if HAVE_CURL_RTSPREQ_RECORD
699
+ CURB_DEFINE(CURL_RTSPREQ_RECORD);
700
+ #endif
701
+ #if HAVE_CURL_RTSPREQ_RECEIVE
702
+ CURB_DEFINE(CURL_RTSPREQ_RECEIVE);
703
+ #endif
704
+ #if HAVE_CURLOPT_RTSP_SESSION_ID
705
+ CURB_DEFINE(CURLOPT_RTSP_SESSION_ID);
706
+ #endif
707
+ #if HAVE_CURLOPT_RTSP_STREAM_URI
708
+ CURB_DEFINE(CURLOPT_RTSP_STREAM_URI);
709
+ #endif
710
+ #if HAVE_CURLOPT_RTSP_TRANSPORT
711
+ CURB_DEFINE(CURLOPT_RTSP_TRANSPORT);
712
+ #endif
713
+ #if HAVE_CURLOPT_RTSP_HEADER
714
+ CURB_DEFINE(CURLOPT_RTSP_HEADER);
715
+ #endif
716
+ #if HAVE_CURLOPT_RTSP_CLIENT_CSEQ
717
+ CURB_DEFINE(CURLOPT_RTSP_CLIENT_CSEQ);
718
+ #endif
719
+ #if HAVE_CURLOPT_RTSP_SERVER_CSEQ
720
+ CURB_DEFINE(CURLOPT_RTSP_SERVER_CSEQ);
721
+ #endif
722
+
723
+ CURB_DEFINE(CURLOPT_TRANSFERTEXT);
724
+ #if HAVE_CURLOPT_PROXY_TRANSFER_MODE
725
+ CURB_DEFINE(CURLOPT_PROXY_TRANSFER_MODE);
726
+ #endif
727
+ #if HAVE_CURLOPT_CRLF
728
+ CURB_DEFINE(CURLOPT_CRLF);
729
+ #endif
730
+ #if HAVE_CURLOPT_RANGE
731
+ CURB_DEFINE(CURLOPT_RANGE);
732
+ #endif
733
+ #if HAVE_CURLOPT_RESUME_FROM
734
+ CURB_DEFINE(CURLOPT_RESUME_FROM);
735
+ #endif
736
+ #if HAVE_CURLOPT_RESUME_FROM_LARGE
737
+ CURB_DEFINE(CURLOPT_RESUME_FROM_LARGE);
738
+ #endif
739
+ #if HAVE_CURLOPT_CUSTOMREQUEST
740
+ CURB_DEFINE(CURLOPT_CUSTOMREQUEST);
741
+ #endif
742
+ #if HAVE_CURLOPT_FILETIME
743
+ CURB_DEFINE(CURLOPT_FILETIME);
744
+ #endif
745
+ #if HAVE_CURLOPT_NOBODY
746
+ CURB_DEFINE(CURLOPT_NOBODY);
747
+ #endif
748
+ #if HAVE_CURLOPT_INFILESIZE
749
+ CURB_DEFINE(CURLOPT_INFILESIZE);
750
+ #endif
751
+ #if HAVE_CURLOPT_INFILESIZE_LARGE
752
+ CURB_DEFINE(CURLOPT_INFILESIZE_LARGE);
753
+ #endif
754
+ #if HAVE_CURLOPT_UPLOAD
755
+ CURB_DEFINE(CURLOPT_UPLOAD);
756
+ #endif
757
+ #if HAVE_CURLOPT_MAXFILESIZE
758
+ CURB_DEFINE(CURLOPT_MAXFILESIZE);
759
+ #endif
760
+ #if HAVE_CURLOPT_MAXFILESIZE_LARGE
761
+ CURB_DEFINE(CURLOPT_MAXFILESIZE_LARGE);
762
+ #endif
763
+ #if HAVE_CURLOPT_TIMECONDITION
764
+ CURB_DEFINE(CURLOPT_TIMECONDITION);
765
+ #endif
766
+ #if HAVE_CURLOPT_TIMEVALUE
767
+ CURB_DEFINE(CURLOPT_TIMEVALUE);
768
+ #endif
769
+
770
+ #if HAVE_CURLOPT_TIMEOUT
771
+ CURB_DEFINE(CURLOPT_TIMEOUT);
772
+ #endif
773
+ #if HAVE_CURLOPT_TIMEOUT_MS
774
+ CURB_DEFINE(CURLOPT_TIMEOUT_MS);
775
+ #endif
776
+ #if HAVE_CURLOPT_LOW_SPEED_LIMIT
777
+ CURB_DEFINE(CURLOPT_LOW_SPEED_LIMIT);
778
+ #endif
779
+ #if HAVE_CURLOPT_LOW_SPEED_TIME
780
+ CURB_DEFINE(CURLOPT_LOW_SPEED_TIME);
781
+ #endif
782
+ #if HAVE_CURLOPT_MAX_SEND_SPEED_LARGE
783
+ CURB_DEFINE(CURLOPT_MAX_SEND_SPEED_LARGE);
784
+ #endif
785
+ #if HAVE_CURLOPT_MAX_RECV_SPEED_LARGE
786
+ CURB_DEFINE(CURLOPT_MAX_RECV_SPEED_LARGE);
787
+ #endif
788
+ #if HAVE_CURLOPT_MAXCONNECTS
789
+ CURB_DEFINE(CURLOPT_MAXCONNECTS);
790
+ #endif
791
+ #if HAVE_CURLOPT_CLOSEPOLICY
792
+ CURB_DEFINE(CURLOPT_CLOSEPOLICY);
793
+ #endif
794
+ #if HAVE_CURLOPT_FRESH_CONNECT
795
+ CURB_DEFINE(CURLOPT_FRESH_CONNECT);
796
+ #endif
797
+ #if HAVE_CURLOPT_FORBID_REUSE
798
+ CURB_DEFINE(CURLOPT_FORBID_REUSE);
799
+ #endif
800
+ #if HAVE_CURLOPT_CONNECTTIMEOUT
801
+ CURB_DEFINE(CURLOPT_CONNECTTIMEOUT);
802
+ #endif
803
+ #if HAVE_CURLOPT_CONNECTTIMEOUT_MS
804
+ CURB_DEFINE(CURLOPT_CONNECTTIMEOUT_MS);
805
+ #endif
806
+ #if HAVE_CURLOPT_IPRESOLVE
807
+ CURB_DEFINE(CURLOPT_IPRESOLVE);
808
+ #endif
809
+ #if HAVE_CURL_IPRESOLVE_WHATEVER
810
+ CURB_DEFINE(CURL_IPRESOLVE_WHATEVER);
811
+ #endif
812
+ #if HAVE_CURL_IPRESOLVE_V4
813
+ CURB_DEFINE(CURL_IPRESOLVE_V4);
814
+ #endif
815
+ #if HAVE_CURL_IPRESOLVE_V6
816
+ CURB_DEFINE(CURL_IPRESOLVE_V6);
817
+ #endif
818
+ #if HAVE_CURLOPT_CONNECT_ONLY
819
+ CURB_DEFINE(CURLOPT_CONNECT_ONLY);
820
+ #endif
821
+ #if HAVE_CURLOPT_USE_SSL
822
+ CURB_DEFINE(CURLOPT_USE_SSL);
823
+ #endif
824
+ #if HAVE_CURLUSESSL_NONE
825
+ CURB_DEFINE(CURLUSESSL_NONE);
826
+ #endif
827
+ #if HAVE_CURLUSESSL_TRY
828
+ CURB_DEFINE(CURLUSESSL_TRY);
829
+ #endif
830
+ #if HAVE_CURLUSESSL_CONTROL
831
+ CURB_DEFINE(CURLUSESSL_CONTROL);
832
+ #endif
833
+ #if HAVE_CURLUSESSL_ALL
834
+ CURB_DEFINE(CURLUSESSL_ALL);
835
+ #endif
836
+ #if HAVE_CURLOPT_RESOLVE
837
+ CURB_DEFINE(CURLOPT_RESOLVE);
838
+ #endif
839
+
840
+ #if HAVE_CURLOPT_SSLCERT
841
+ CURB_DEFINE(CURLOPT_SSLCERT);
842
+ #endif
843
+ #if HAVE_CURLOPT_SSLCERTTYPE
844
+ CURB_DEFINE(CURLOPT_SSLCERTTYPE);
845
+ #endif
846
+ #if HAVE_CURLOPT_SSLKEY
847
+ CURB_DEFINE(CURLOPT_SSLKEY);
848
+ #endif
849
+ #if HAVE_CURLOPT_SSLKEYTYPE
850
+ CURB_DEFINE(CURLOPT_SSLKEYTYPE);
851
+ #endif
852
+ #if HAVE_CURLOPT_KEYPASSWD
853
+ CURB_DEFINE(CURLOPT_KEYPASSWD);
854
+ #endif
855
+ #if HAVE_CURLOPT_SSLENGINE
856
+ CURB_DEFINE(CURLOPT_SSLENGINE);
857
+ #endif
858
+ #if HAVE_CURLOPT_SSLENGINE_DEFAULT
859
+ CURB_DEFINE(CURLOPT_SSLENGINE_DEFAULT);
860
+ #endif
861
+ #if HAVE_CURLOPT_SSLVERSION
862
+ CURB_DEFINE(CURLOPT_SSLVERSION);
863
+ #endif
864
+ #if HAVE_CURL_SSLVERSION_TLSv1
865
+ CURB_DEFINE(CURL_SSLVERSION_TLSv1);
866
+ #endif
867
+ #if HAVE_CURL_SSLVERSION_SSLv2
868
+ CURB_DEFINE(CURL_SSLVERSION_SSLv2);
869
+ #endif
870
+ #if HAVE_CURL_SSLVERSION_SSLv3
871
+ CURB_DEFINE(CURL_SSLVERSION_SSLv3);
872
+ #endif
873
+ #if HAVE_CURLOPT_SSL_VERIFYPEER
874
+ CURB_DEFINE(CURLOPT_SSL_VERIFYPEER);
875
+ #endif
876
+ #if HAVE_CURLOPT_CAINFO
877
+ CURB_DEFINE(CURLOPT_CAINFO);
878
+ #endif
879
+ #if HAVE_CURLOPT_ISSUERCERT
880
+ CURB_DEFINE(CURLOPT_ISSUERCERT);
881
+ #endif
882
+ #if HAVE_CURLOPT_CAPATH
883
+ CURB_DEFINE(CURLOPT_CAPATH);
884
+ #endif
885
+ #if HAVE_CURLOPT_CRLFILE
886
+ CURB_DEFINE(CURLOPT_CRLFILE);
887
+ #endif
888
+ #if HAVE_CURLOPT_SSL_VERIFYHOST
889
+ CURB_DEFINE(CURLOPT_SSL_VERIFYHOST);
890
+ #endif
891
+ #if HAVE_CURLOPT_CERTINFO
892
+ CURB_DEFINE(CURLOPT_CERTINFO);
893
+ #endif
894
+ #if HAVE_CURLOPT_RANDOM_FILE
895
+ CURB_DEFINE(CURLOPT_RANDOM_FILE);
896
+ #endif
897
+ #if HAVE_CURLOPT_EGDSOCKET
898
+ CURB_DEFINE(CURLOPT_EGDSOCKET);
899
+ #endif
900
+ #if HAVE_CURLOPT_SSL_CIPHER_LIST
901
+ CURB_DEFINE(CURLOPT_SSL_CIPHER_LIST);
902
+ #endif
903
+ #if HAVE_CURLOPT_SSL_SESSIONID_CACHE
904
+ CURB_DEFINE(CURLOPT_SSL_SESSIONID_CACHE);
905
+ #endif
906
+ #if HAVE_CURLOPT_KRBLEVEL
907
+ CURB_DEFINE(CURLOPT_KRBLEVEL);
908
+ #endif
909
+
910
+ #if HAVE_CURLOPT_SSH_AUTH_TYPES
911
+ CURB_DEFINE(CURLOPT_SSH_AUTH_TYPES);
912
+ #endif
913
+ #if HAVE_CURLOPT_SSH_HOST_PUBLIC_KEY_MD5
914
+ CURB_DEFINE(CURLOPT_SSH_HOST_PUBLIC_KEY_MD5);
915
+ #endif
916
+ #if HAVE_CURLOPT_SSH_PUBLIC_KEYFILE
917
+ CURB_DEFINE(CURLOPT_SSH_PUBLIC_KEYFILE);
918
+ #endif
919
+ #if HAVE_CURLOPT_SSH_PRIVATE_KEYFILE
920
+ CURB_DEFINE(CURLOPT_SSH_PRIVATE_KEYFILE);
921
+ #endif
922
+ #if HAVE_CURLOPT_SSH_KNOWNHOSTS
923
+ CURB_DEFINE(CURLOPT_SSH_KNOWNHOSTS);
924
+ #endif
925
+ #if HAVE_CURLOPT_SSH_KEYFUNCTION
926
+ CURB_DEFINE(CURLOPT_SSH_KEYFUNCTION);
927
+ #endif
928
+ #if HAVE_CURLKHSTAT_FINE_ADD_TO_FILE
929
+ CURB_DEFINE(CURLKHSTAT_FINE_ADD_TO_FILE);
930
+ #endif
931
+ #if HAVE_CURLKHSTAT_FINE
932
+ CURB_DEFINE(CURLKHSTAT_FINE);
933
+ #endif
934
+ #if HAVE_CURLKHSTAT_REJECT
935
+ CURB_DEFINE(CURLKHSTAT_REJECT);
936
+ #endif
937
+ #if HAVE_CURLKHSTAT_DEFER
938
+ CURB_DEFINE(CURLKHSTAT_DEFER);
939
+ #endif
940
+ #if HAVE_CURLOPT_SSH_KEYDATA
941
+ CURB_DEFINE(CURLOPT_SSH_KEYDATA);
942
+ #endif
943
+
944
+ #if HAVE_CURLOPT_PRIVATE
945
+ CURB_DEFINE(CURLOPT_PRIVATE);
946
+ #endif
947
+ #if HAVE_CURLOPT_SHARE
948
+ CURB_DEFINE(CURLOPT_SHARE);
949
+ #endif
950
+ #if HAVE_CURLOPT_NEW_FILE_PERMS
951
+ CURB_DEFINE(CURLOPT_NEW_FILE_PERMS);
952
+ #endif
953
+ #if HAVE_CURLOPT_NEW_DIRECTORY_PERMS
954
+ CURB_DEFINE(CURLOPT_NEW_DIRECTORY_PERMS);
955
+ #endif
956
+
957
+ #if HAVE_CURLOPT_TELNETOPTIONS
958
+ CURB_DEFINE(CURLOPT_TELNETOPTIONS);
959
+ #endif
960
+
961
+ #if HAVE_CURLOPT_GSSAPI_DELEGATION
962
+ CURB_DEFINE(CURLOPT_GSSAPI_DELEGATION);
963
+ #endif
964
+
965
+ #if HAVE_CURLGSSAPI_DELEGATION_FLAG
966
+ CURB_DEFINE(CURLGSSAPI_DELEGATION_FLAG);
967
+ #endif
968
+
969
+ #if HAVE_CURLGSSAPI_DELEGATION_POLICY_FLAG
970
+ CURB_DEFINE(CURLGSSAPI_DELEGATION_POLICY_FLAG);
971
+ #endif
972
+
973
+
974
+ rb_define_const(mCurl, "HTTP_1_1", LONG2NUM(CURL_HTTP_VERSION_1_1));
975
+ rb_define_const(mCurl, "HTTP_1_0", LONG2NUM(CURL_HTTP_VERSION_1_0));
976
+ rb_define_const(mCurl, "HTTP_NONE", LONG2NUM(CURL_HTTP_VERSION_NONE));
977
+
978
+ rb_define_singleton_method(mCurl, "ipv6?", ruby_curl_ipv6_q, 0);
979
+ rb_define_singleton_method(mCurl, "kerberos4?", ruby_curl_kerberos4_q, 0);
980
+ rb_define_singleton_method(mCurl, "ssl?", ruby_curl_ssl_q, 0);
981
+ rb_define_singleton_method(mCurl, "libz?", ruby_curl_libz_q, 0);
982
+ rb_define_singleton_method(mCurl, "ntlm?", ruby_curl_ntlm_q, 0);
983
+ rb_define_singleton_method(mCurl, "gssnegotiate?", ruby_curl_gssnegotiate_q, 0);
984
+ rb_define_singleton_method(mCurl, "debug?", ruby_curl_debug_q, 0);
985
+ rb_define_singleton_method(mCurl, "asyncdns?", ruby_curl_asyncdns_q, 0);
986
+ rb_define_singleton_method(mCurl, "spnego?", ruby_curl_spnego_q, 0);
987
+ rb_define_singleton_method(mCurl, "largefile?", ruby_curl_largefile_q, 0);
988
+ rb_define_singleton_method(mCurl, "idn?", ruby_curl_idn_q, 0);
989
+ rb_define_singleton_method(mCurl, "sspi?", ruby_curl_sspi_q, 0);
990
+ rb_define_singleton_method(mCurl, "conv?", ruby_curl_conv_q, 0);
991
+
992
+ init_curb_errors();
993
+ init_curb_easy();
994
+ init_curb_postfield();
995
+ init_curb_multi();
996
+ init_curb_upload();
997
+ }