curb 1.2.2 → 1.3.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.
data/ext/curb.c CHANGED
@@ -303,19 +303,19 @@ void Init_curb_core() {
303
303
  rb_define_const(mCurl, "CURL_SSLVERSION_TLSv1", LONG2NUM(CURL_SSLVERSION_TLSv1));
304
304
  rb_define_const(mCurl, "CURL_SSLVERSION_SSLv2", LONG2NUM(CURL_SSLVERSION_SSLv2));
305
305
  rb_define_const(mCurl, "CURL_SSLVERSION_SSLv3", LONG2NUM(CURL_SSLVERSION_SSLv3));
306
- #if HAVE_CURL_SSLVERSION_TLSV1_0
306
+ #ifdef HAVE_CURL_SSLVERSION_TLSV1_0
307
307
  rb_define_const(mCurl, "CURL_SSLVERSION_TLSv1_0", LONG2NUM(CURL_SSLVERSION_TLSv1_0));
308
308
  rb_define_const(mCurl, "CURL_SSLVERSION_MAX_TLSv1_0", LONG2NUM(CURL_SSLVERSION_MAX_TLSv1_0));
309
309
  #endif
310
- #if HAVE_CURL_SSLVERSION_TLSV1_1
310
+ #ifdef HAVE_CURL_SSLVERSION_TLSV1_1
311
311
  rb_define_const(mCurl, "CURL_SSLVERSION_TLSv1_1", LONG2NUM(CURL_SSLVERSION_TLSv1_1));
312
312
  rb_define_const(mCurl, "CURL_SSLVERSION_MAX_TLSv1_1", LONG2NUM(CURL_SSLVERSION_MAX_TLSv1_1));
313
313
  #endif
314
- #if HAVE_CURL_SSLVERSION_TLSV1_2
314
+ #ifdef HAVE_CURL_SSLVERSION_TLSV1_2
315
315
  rb_define_const(mCurl, "CURL_SSLVERSION_TLSv1_2", LONG2NUM(CURL_SSLVERSION_TLSv1_2));
316
316
  rb_define_const(mCurl, "CURL_SSLVERSION_MAX_TLSv1_2", LONG2NUM(CURL_SSLVERSION_MAX_TLSv1_2));
317
317
  #endif
318
- #if HAVE_CURL_SSLVERSION_TLSV1_3
318
+ #ifdef HAVE_CURL_SSLVERSION_TLSV1_3
319
319
  rb_define_const(mCurl, "CURL_SSLVERSION_TLSv1_3", LONG2NUM(CURL_SSLVERSION_TLSv1_3));
320
320
  rb_define_const(mCurl, "CURL_SSLVERSION_MAX_TLSv1_3", LONG2NUM(CURL_SSLVERSION_MAX_TLSv1_3));
321
321
  #endif
@@ -329,19 +329,19 @@ void Init_curb_core() {
329
329
  rb_define_const(mCurl, "CURL_SSLVERSION_TLSv1", LONG2NUM(-1));
330
330
  rb_define_const(mCurl, "CURL_SSLVERSION_SSLv2", LONG2NUM(-1));
331
331
  rb_define_const(mCurl, "CURL_SSLVERSION_SSLv3", LONG2NUM(-1));
332
- #if HAVE_CURL_SSLVERSION_TLSv1_0
332
+ #ifdef HAVE_CURL_SSLVERSION_TLSv1_0
333
333
  rb_define_const(mCurl, "CURL_SSLVERSION_TLSv1_0", LONG2NUM(-1));
334
334
  rb_define_const(mCurl, "CURL_SSLVERSION_MAX_TLSv1_0", LONG2NUM(-1));
335
335
  #endif
336
- #if HAVE_CURL_SSLVERSION_TLSv1_1
336
+ #ifdef HAVE_CURL_SSLVERSION_TLSv1_1
337
337
  rb_define_const(mCurl, "CURL_SSLVERSION_TLSv1_1", LONG2NUM(-1));
338
338
  rb_define_const(mCurl, "CURL_SSLVERSION_MAX_TLSv1_1", LONG2NUM(-1));
339
339
  #endif
340
- #if HAVE_CURL_SSLVERSION_TLSv1_2
340
+ #ifdef HAVE_CURL_SSLVERSION_TLSv1_2
341
341
  rb_define_const(mCurl, "CURL_SSLVERSION_TLSv1_2", LONG2NUM(-1));
342
342
  rb_define_const(mCurl, "CURL_SSLVERSION_MAX_TLSv1_2", LONG2NUM(-1));
343
343
  #endif
344
- #if HAVE_CURL_SSLVERSION_TLSv1_3
344
+ #ifdef HAVE_CURL_SSLVERSION_TLSv1_3
345
345
  rb_define_const(mCurl, "CURL_SSLVERSION_TLSv1_3", LONG2NUM(-1));
346
346
  rb_define_const(mCurl, "CURL_SSLVERSION_MAX_TLSv1_3", LONG2NUM(-1));
347
347
  #endif
@@ -426,202 +426,245 @@ void Init_curb_core() {
426
426
  CURB_DEFINE(CURLOPT_HEADER);
427
427
  CURB_DEFINE(CURLOPT_NOPROGRESS);
428
428
  CURB_DEFINE(CURLOPT_NOSIGNAL);
429
- #if HAVE_CURLOPT_PATH_AS_IS
429
+ #ifdef HAVE_CURLOPT_PATH_AS_IS
430
430
  CURB_DEFINE(CURLOPT_PATH_AS_IS);
431
431
  #endif
432
432
  CURB_DEFINE(CURLOPT_WRITEFUNCTION);
433
433
  CURB_DEFINE(CURLOPT_WRITEDATA);
434
434
  CURB_DEFINE(CURLOPT_READFUNCTION);
435
435
  CURB_DEFINE(CURLOPT_READDATA);
436
+ /* CURLOPT_IOCTLFUNCTION/DATA deprecated since 7.18.0, use SEEKFUNCTION/DATA */
437
+ #ifdef HAVE_CURLOPT_IOCTLFUNCTION
436
438
  CURB_DEFINE(CURLOPT_IOCTLFUNCTION);
439
+ #endif
440
+ #ifdef HAVE_CURLOPT_IOCTLDATA
437
441
  CURB_DEFINE(CURLOPT_IOCTLDATA);
438
- #if HAVE_CURLOPT_SEEKFUNCTION
442
+ #endif
443
+ #ifdef HAVE_CURLOPT_SEEKFUNCTION
439
444
  CURB_DEFINE(CURLOPT_SEEKFUNCTION);
440
445
  #endif
441
- #if HAVE_CURLOPT_SEEKDATA
446
+ #ifdef HAVE_CURLOPT_SEEKDATA
442
447
  CURB_DEFINE(CURLOPT_SEEKDATA);
443
448
  #endif
444
- #if HAVE_CURLOPT_SOCKOPTFUNCTION
449
+ #ifdef HAVE_CURLOPT_SOCKOPTFUNCTION
445
450
  CURB_DEFINE(CURLOPT_SOCKOPTFUNCTION);
446
451
  #endif
447
- #if HAVE_CURLOPT_SOCKOPTDATA
452
+ #ifdef HAVE_CURLOPT_SOCKOPTDATA
448
453
  CURB_DEFINE(CURLOPT_SOCKOPTDATA);
449
454
  #endif
450
- #if HAVE_CURLOPT_OPENSOCKETFUNCTION
455
+ #ifdef HAVE_CURLOPT_OPENSOCKETFUNCTION
451
456
  CURB_DEFINE(CURLOPT_OPENSOCKETFUNCTION);
452
457
  #endif
453
- #if HAVE_CURLOPT_OPENSOCKETDATA
458
+ #ifdef HAVE_CURLOPT_OPENSOCKETDATA
454
459
  CURB_DEFINE(CURLOPT_OPENSOCKETDATA);
455
460
  #endif
461
+ /* CURLOPT_PROGRESSFUNCTION deprecated since 7.32.0, use XFERINFOFUNCTION */
462
+ #ifdef HAVE_CURLOPT_PROGRESSFUNCTION
456
463
  CURB_DEFINE(CURLOPT_PROGRESSFUNCTION);
464
+ #endif
465
+ #ifdef HAVE_CURLOPT_PROGRESSDATA
457
466
  CURB_DEFINE(CURLOPT_PROGRESSDATA);
467
+ #endif
468
+ #ifdef HAVE_CURLOPT_XFERINFOFUNCTION
469
+ CURB_DEFINE(CURLOPT_XFERINFOFUNCTION);
470
+ #endif
471
+ #ifdef HAVE_CURLOPT_XFERINFODATA
472
+ CURB_DEFINE(CURLOPT_XFERINFODATA);
473
+ #endif
458
474
  CURB_DEFINE(CURLOPT_HEADERFUNCTION);
459
475
  CURB_DEFINE(CURLOPT_WRITEHEADER);
460
476
  CURB_DEFINE(CURLOPT_DEBUGFUNCTION);
461
477
  CURB_DEFINE(CURLOPT_DEBUGDATA);
462
478
  CURB_DEFINE(CURLOPT_SSL_CTX_FUNCTION);
463
479
  CURB_DEFINE(CURLOPT_SSL_CTX_DATA);
480
+ /* CURLOPT_CONV_* deprecated since 7.82.0, serve no purpose anymore */
481
+ #ifdef HAVE_CURLOPT_CONV_TO_NETWORK_FUNCTION
464
482
  CURB_DEFINE(CURLOPT_CONV_TO_NETWORK_FUNCTION);
483
+ #endif
484
+ #ifdef HAVE_CURLOPT_CONV_FROM_NETWORK_FUNCTION
465
485
  CURB_DEFINE(CURLOPT_CONV_FROM_NETWORK_FUNCTION);
486
+ #endif
487
+ #ifdef HAVE_CURLOPT_CONV_FROM_UTF8_FUNCTION
466
488
  CURB_DEFINE(CURLOPT_CONV_FROM_UTF8_FUNCTION);
489
+ #endif
467
490
 
468
- #if HAVE_CURLOPT_INTERLEAVEFUNCTION
491
+ #ifdef HAVE_CURLOPT_INTERLEAVEFUNCTION
469
492
  CURB_DEFINE(CURLOPT_INTERLEAVEFUNCTION);
470
493
  #endif
471
- #if HAVE_CURLOPT_INTERLEAVEDATA
494
+ #ifdef HAVE_CURLOPT_INTERLEAVEDATA
472
495
  CURB_DEFINE(CURLOPT_INTERLEAVEDATA);
473
496
  #endif
474
- #if HAVE_CURLOPT_CHUNK_BGN_FUNCTION
497
+ #ifdef HAVE_CURLOPT_CHUNK_BGN_FUNCTION
475
498
  CURB_DEFINE(CURLOPT_CHUNK_BGN_FUNCTION);
476
499
  #endif
477
- #if HAVE_CURLOPT_CHUNK_END_FUNCTION
500
+ #ifdef HAVE_CURLOPT_CHUNK_END_FUNCTION
478
501
  CURB_DEFINE(CURLOPT_CHUNK_END_FUNCTION);
479
502
  #endif
480
- #if HAVE_CURLOPT_CHUNK_DATA
503
+ #ifdef HAVE_CURLOPT_CHUNK_DATA
481
504
  CURB_DEFINE(CURLOPT_CHUNK_DATA);
482
505
  #endif
483
- #if HAVE_CURLOPT_FNMATCH_FUNCTION
506
+ #ifdef HAVE_CURLOPT_FNMATCH_FUNCTION
484
507
  CURB_DEFINE(CURLOPT_FNMATCH_FUNCTION);
485
508
  #endif
486
- #if HAVE_CURLOPT_FNMATCH_DATA
509
+ #ifdef HAVE_CURLOPT_FNMATCH_DATA
487
510
  CURB_DEFINE(CURLOPT_FNMATCH_DATA);
488
511
  #endif
489
- #if HAVE_CURLOPT_ERRORBUFFER
512
+ #ifdef HAVE_CURLOPT_ERRORBUFFER
490
513
  CURB_DEFINE(CURLOPT_ERRORBUFFER);
491
514
  #endif
492
- #if HAVE_CURLOPT_STDERR
515
+ #ifdef HAVE_CURLOPT_STDERR
493
516
  CURB_DEFINE(CURLOPT_STDERR);
494
517
  #endif
495
- #if HAVE_CURLOPT_FAILONERROR
518
+ #ifdef HAVE_CURLOPT_FAILONERROR
496
519
  CURB_DEFINE(CURLOPT_FAILONERROR);
497
520
  #endif
498
521
  CURB_DEFINE(CURLOPT_URL);
499
- #if HAVE_CURLOPT_PROTOCOLS
522
+ /* CURLOPT_PROTOCOLS deprecated since 7.85.0, use CURLOPT_PROTOCOLS_STR */
523
+ #ifdef HAVE_CURLOPT_PROTOCOLS
500
524
  CURB_DEFINE(CURLOPT_PROTOCOLS);
501
525
  #endif
502
- #if HAVE_CURLOPT_REDIR_PROTOCOLS
526
+ #ifdef HAVE_CURLOPT_PROTOCOLS_STR
527
+ CURB_DEFINE(CURLOPT_PROTOCOLS_STR);
528
+ #endif
529
+ /* CURLOPT_REDIR_PROTOCOLS deprecated since 7.85.0, use CURLOPT_REDIR_PROTOCOLS_STR */
530
+ #ifdef HAVE_CURLOPT_REDIR_PROTOCOLS
503
531
  CURB_DEFINE(CURLOPT_REDIR_PROTOCOLS);
532
+ #endif
533
+ #ifdef HAVE_CURLOPT_REDIR_PROTOCOLS_STR
534
+ CURB_DEFINE(CURLOPT_REDIR_PROTOCOLS_STR);
504
535
  #endif
505
536
  CURB_DEFINE(CURLOPT_PROXY);
506
537
  CURB_DEFINE(CURLOPT_PROXYPORT);
507
- #if HAVE_CURLOPT_PROXYTYPE
538
+ #ifdef HAVE_CURLOPT_PROXYTYPE
508
539
  CURB_DEFINE(CURLOPT_PROXYTYPE);
509
540
  #endif
510
- #if HAVE_CURLOPT_NOPROXY
541
+ #ifdef HAVE_CURLOPT_NOPROXY
511
542
  CURB_DEFINE(CURLOPT_NOPROXY);
512
543
  #endif
513
544
  CURB_DEFINE(CURLOPT_HTTPPROXYTUNNEL);
514
- #if HAVE_CURLOPT_SOCKS5_GSSAPI_SERVICE
545
+ /* CURLOPT_SOCKS5_GSSAPI_SERVICE deprecated since 7.49.0, use CURLOPT_PROXY_SERVICE_NAME */
546
+ #ifdef HAVE_CURLOPT_SOCKS5_GSSAPI_SERVICE
515
547
  CURB_DEFINE(CURLOPT_SOCKS5_GSSAPI_SERVICE);
516
548
  #endif
517
- #if HAVE_CURLOPT_SOCKS5_GSSAPI_NEC
549
+ #ifdef HAVE_CURLOPT_PROXY_SERVICE_NAME
550
+ CURB_DEFINE(CURLOPT_PROXY_SERVICE_NAME);
551
+ #endif
552
+ #ifdef HAVE_CURLOPT_SOCKS5_GSSAPI_NEC
518
553
  CURB_DEFINE(CURLOPT_SOCKS5_GSSAPI_NEC);
519
554
  #endif
520
555
  CURB_DEFINE(CURLOPT_INTERFACE);
521
- #if HAVE_CURLOPT_LOCALPORT
556
+ #ifdef HAVE_CURLOPT_LOCALPORT
522
557
  CURB_DEFINE(CURLOPT_LOCALPORT);
523
558
  #endif
524
559
  CURB_DEFINE(CURLOPT_DNS_CACHE_TIMEOUT);
560
+ /* CURLOPT_DNS_USE_GLOBAL_CACHE deprecated since 7.11.1, does nothing since 7.62.0 */
561
+ #ifdef HAVE_CURLOPT_DNS_USE_GLOBAL_CACHE
525
562
  CURB_DEFINE(CURLOPT_DNS_USE_GLOBAL_CACHE);
563
+ #endif
526
564
  CURB_DEFINE(CURLOPT_BUFFERSIZE);
527
565
  CURB_DEFINE(CURLOPT_PORT);
528
566
  CURB_DEFINE(CURLOPT_TCP_NODELAY);
529
- #if HAVE_CURLOPT_ADDRESS_SCOPE
567
+ #ifdef HAVE_CURLOPT_ADDRESS_SCOPE
530
568
  CURB_DEFINE(CURLOPT_ADDRESS_SCOPE);
531
569
  #endif
532
570
  CURB_DEFINE(CURLOPT_NETRC);
533
571
  CURB_DEFINE(CURL_NETRC_OPTIONAL);
534
572
  CURB_DEFINE(CURL_NETRC_IGNORED);
535
573
  CURB_DEFINE(CURL_NETRC_REQUIRED);
536
- #if HAVE_CURLOPT_NETRC_FILE
574
+ #ifdef HAVE_CURLOPT_NETRC_FILE
537
575
  CURB_DEFINE(CURLOPT_NETRC_FILE);
538
576
  #endif
539
577
  CURB_DEFINE(CURLOPT_USERPWD);
540
578
  CURB_DEFINE(CURLOPT_PROXYUSERPWD);
541
- #if HAVE_CURLOPT_USERNAME
579
+ #ifdef HAVE_CURLOPT_USERNAME
542
580
  CURB_DEFINE(CURLOPT_USERNAME);
543
581
  #endif
544
- #if HAVE_CURLOPT_PASSWORD
582
+ #ifdef HAVE_CURLOPT_PASSWORD
545
583
  CURB_DEFINE(CURLOPT_PASSWORD);
546
584
  #endif
547
- #if HAVE_CURLOPT_PROXYUSERNAME
585
+ #ifdef HAVE_CURLOPT_PROXYUSERNAME
548
586
  CURB_DEFINE(CURLOPT_PASSWORD);
549
587
  #endif
550
- #if HAVE_CURLOPT_PROXYPASSWORD
588
+ #ifdef HAVE_CURLOPT_PROXYPASSWORD
551
589
  CURB_DEFINE(CURLOPT_PASSWORD);
552
590
  #endif
553
591
 
554
- #if HAVE_CURLOPT_HTTPAUTH
592
+ #ifdef HAVE_CURLOPT_HTTPAUTH
555
593
  CURB_DEFINE(CURLOPT_HTTPAUTH);
556
594
  #endif
557
- #if HAVE_CURLAUTH_DIGEST_IE
595
+ #ifdef HAVE_CURLAUTH_DIGEST_IE
558
596
  CURB_DEFINE(CURLAUTH_DIGEST_IE);
559
597
  #endif
560
- #if HAVE_CURLAUTH_ONLY
598
+ #ifdef HAVE_CURLAUTH_ONLY
561
599
  CURB_DEFINE(CURLAUTH_ONLY);
562
600
  #endif
563
- #if HAVE_CURLOPT_TLSAUTH_TYPE
601
+ #ifdef HAVE_CURLOPT_TLSAUTH_TYPE
564
602
  CURB_DEFINE(CURLOPT_TLSAUTH_TYPE);
565
603
  #endif
566
- #if HAVE_CURLOPT_TLSAUTH_SRP
604
+ #ifdef HAVE_CURLOPT_TLSAUTH_SRP
567
605
  CURB_DEFINE(CURLOPT_TLSAUTH_SRP);
568
606
  #endif
569
- #if HAVE_CURLOPT_TLSAUTH_USERNAME
607
+ #ifdef HAVE_CURLOPT_TLSAUTH_USERNAME
570
608
  CURB_DEFINE(CURLOPT_TLSAUTH_USERNAME);
571
609
  #endif
572
- #if HAVE_CURLOPT_TLSAUTH_PASSWORD
610
+ #ifdef HAVE_CURLOPT_TLSAUTH_PASSWORD
573
611
  CURB_DEFINE(CURLOPT_TLSAUTH_PASSWORD);
574
612
  #endif
575
- #if HAVE_CURLOPT_PROXYAUTH
613
+ #ifdef HAVE_CURLOPT_PROXYAUTH
576
614
  CURB_DEFINE(CURLOPT_PROXYAUTH);
577
615
  #endif
578
- #if HAVE_CURLOPT_AUTOREFERER
616
+ #ifdef HAVE_CURLOPT_AUTOREFERER
579
617
  CURB_DEFINE(CURLOPT_AUTOREFERER);
580
618
  #endif
581
- #if HAVE_CURLOPT_ENCODING
619
+ #ifdef HAVE_CURLOPT_ENCODING
582
620
  CURB_DEFINE(CURLOPT_ENCODING);
583
621
  #endif
584
- #if HAVE_CURLOPT_FOLLOWLOCATION
622
+ #ifdef HAVE_CURLOPT_FOLLOWLOCATION
585
623
  CURB_DEFINE(CURLOPT_FOLLOWLOCATION);
586
624
  #endif
587
- #if HAVE_CURLOPT_UNRESTRICTED_AUTH
625
+ #ifdef HAVE_CURLOPT_UNRESTRICTED_AUTH
588
626
  CURB_DEFINE(CURLOPT_UNRESTRICTED_AUTH);
589
627
  #endif
590
- #if HAVE_CURLOPT_MAXREDIRS
628
+ #ifdef HAVE_CURLOPT_MAXREDIRS
591
629
  CURB_DEFINE(CURLOPT_MAXREDIRS);
592
630
  #endif
593
- #if HAVE_CURLOPT_POSTREDIR
631
+ #ifdef HAVE_CURLOPT_POSTREDIR
594
632
  CURB_DEFINE(CURLOPT_POSTREDIR);
595
633
  #endif
596
- #if HAVE_CURLOPT_PUT
634
+ /* CURLOPT_PUT deprecated since 7.12.1, use CURLOPT_UPLOAD */
635
+ #ifdef HAVE_CURLOPT_PUT
597
636
  CURB_DEFINE(CURLOPT_PUT);
598
637
  #endif
599
- #if HAVE_CURLOPT_POST
638
+ #ifdef HAVE_CURLOPT_POST
600
639
  CURB_DEFINE(CURLOPT_POST);
601
640
  #endif
602
641
  CURB_DEFINE(CURLOPT_POSTFIELDS);
603
642
  CURB_DEFINE(CURLOPT_POSTFIELDSIZE);
604
- #if HAVE_CURLOPT_POSTFIELDSIZE_LARGE
643
+ #ifdef HAVE_CURLOPT_POSTFIELDSIZE_LARGE
605
644
  CURB_DEFINE(CURLOPT_POSTFIELDSIZE_LARGE);
606
645
  #endif
607
- #if HAVE_CURLOPT_COPYPOSTFIELDS
646
+ #ifdef HAVE_CURLOPT_COPYPOSTFIELDS
608
647
  CURB_DEFINE(CURLOPT_COPYPOSTFIELDS);
609
648
  #endif
610
- #if HAVE_CURLOPT_HTTPPOST
649
+ /* CURLOPT_HTTPPOST deprecated since 7.56.0, use CURLOPT_MIMEPOST */
650
+ #ifdef HAVE_CURLOPT_HTTPPOST
611
651
  CURB_DEFINE(CURLOPT_HTTPPOST);
652
+ #endif
653
+ #ifdef HAVE_CURLOPT_MIMEPOST
654
+ CURB_DEFINE(CURLOPT_MIMEPOST);
612
655
  #endif
613
656
  CURB_DEFINE(CURLOPT_REFERER);
614
657
  CURB_DEFINE(CURLOPT_USERAGENT);
615
658
  CURB_DEFINE(CURLOPT_HTTPHEADER);
616
- #if HAVE_CURLOPT_PROXYHEADER
659
+ #ifdef HAVE_CURLOPT_PROXYHEADER
617
660
  CURB_DEFINE(CURLOPT_PROXYHEADER);
618
661
  #endif
619
- #if HAVE_CURLOPT_REQUEST_TARGET
662
+ #ifdef HAVE_CURLOPT_REQUEST_TARGET
620
663
  /* Allows overriding the Request-URI target used in the request line.
621
664
  * Useful for absolute-form requests or special targets like "*". */
622
665
  CURB_DEFINE(CURLOPT_REQUEST_TARGET);
623
666
  #endif
624
- #if HAVE_CURLOPT_HTTP200ALIASES
667
+ #ifdef HAVE_CURLOPT_HTTP200ALIASES
625
668
  CURB_DEFINE(CURLOPT_HTTP200ALIASES);
626
669
  #endif
627
670
 
@@ -629,13 +672,13 @@ void Init_curb_core() {
629
672
  CURB_DEFINE(CURLOPT_COOKIEFILE);
630
673
  CURB_DEFINE(CURLOPT_COOKIEJAR);
631
674
 
632
- #if HAVE_CURLOPT_COOKIESESSION
675
+ #ifdef HAVE_CURLOPT_COOKIESESSION
633
676
  CURB_DEFINE(CURLOPT_COOKIESESSION);
634
677
  #endif
635
- #if HAVE_CURLOPT_COOKIELIST
678
+ #ifdef HAVE_CURLOPT_COOKIELIST
636
679
  CURB_DEFINE(CURLOPT_COOKIELIST);
637
680
  #endif
638
- #if HAVE_CURLOPT_HTTPGET
681
+ #ifdef HAVE_CURLOPT_HTTPGET
639
682
  CURB_DEFINE(CURLOPT_HTTPGET);
640
683
  #endif
641
684
  CURB_DEFINE(CURLOPT_HTTP_VERSION);
@@ -648,558 +691,560 @@ void Init_curb_core() {
648
691
  #if LIBCURL_VERSION_NUM >= 0x072f00 /* 7.47.0 */
649
692
  CURB_DEFINE(CURL_HTTP_VERSION_2TLS);
650
693
  #endif
651
- #if HAVE_CURLOPT_IGNORE_CONTENT_LENGTH
694
+ #ifdef HAVE_CURLOPT_IGNORE_CONTENT_LENGTH
652
695
  CURB_DEFINE(CURLOPT_IGNORE_CONTENT_LENGTH);
653
696
  #endif
654
- #if HAVE_CURLOPT_HTTP_CONTENT_DECODING
697
+ #ifdef HAVE_CURLOPT_HTTP_CONTENT_DECODING
655
698
  CURB_DEFINE(CURLOPT_HTTP_CONTENT_DECODING);
656
699
  #endif
657
- #if HAVE_CURLOPT_HTTP_TRANSFER_DECODING
700
+ #ifdef HAVE_CURLOPT_HTTP_TRANSFER_DECODING
658
701
  CURB_DEFINE(CURLOPT_HTTP_TRANSFER_DECODING);
659
702
  #endif
660
- #if HAVE_CURLOPT_MAIL_FROM
703
+ #ifdef HAVE_CURLOPT_MAIL_FROM
661
704
  CURB_DEFINE(CURLOPT_MAIL_FROM);
662
705
  #endif
663
- #if HAVE_CURLOPT_MAIL_RCPT
706
+ #ifdef HAVE_CURLOPT_MAIL_RCPT
664
707
  CURB_DEFINE(CURLOPT_MAIL_RCPT);
665
708
  #endif
666
- #if HAVE_CURLOPT_TFTP_BLKSIZE
709
+ #ifdef HAVE_CURLOPT_TFTP_BLKSIZE
667
710
  CURB_DEFINE(CURLOPT_TFTP_BLKSIZE);
668
711
  #endif
669
- #if HAVE_CURLOPT_FTPPORT
712
+ #ifdef HAVE_CURLOPT_FTPPORT
670
713
  CURB_DEFINE(CURLOPT_FTPPORT);
671
714
  #endif
672
- #if HAVE_CURLOPT_QUOTE
715
+ #ifdef HAVE_CURLOPT_QUOTE
673
716
  CURB_DEFINE(CURLOPT_QUOTE);
674
717
  #endif
675
- #if HAVE_CURLOPT_POSTQUOTE
718
+ #ifdef HAVE_CURLOPT_POSTQUOTE
676
719
  CURB_DEFINE(CURLOPT_POSTQUOTE);
677
720
  #endif
678
- #if HAVE_CURLOPT_PREQUOTE
721
+ #ifdef HAVE_CURLOPT_PREQUOTE
679
722
  CURB_DEFINE(CURLOPT_PREQUOTE);
680
723
  #endif
681
- #if HAVE_CURLOPT_DIRLISTONLY
724
+ #ifdef HAVE_CURLOPT_DIRLISTONLY
682
725
  CURB_DEFINE(CURLOPT_DIRLISTONLY);
683
726
  #endif
684
- #if HAVE_CURLOPT_APPEND
727
+ #ifdef HAVE_CURLOPT_APPEND
685
728
  CURB_DEFINE(CURLOPT_APPEND);
686
729
  #endif
687
- #if HAVE_CURLOPT_FTP_USE_EPRT
730
+ #ifdef HAVE_CURLOPT_FTP_USE_EPRT
688
731
  CURB_DEFINE(CURLOPT_FTP_USE_EPRT);
689
732
  #endif
690
- #if HAVE_CURLOPT_FTP_USE_EPSV
733
+ #ifdef HAVE_CURLOPT_FTP_USE_EPSV
691
734
  CURB_DEFINE(CURLOPT_FTP_USE_EPSV);
692
735
  #endif
693
- #if HAVE_CURLOPT_FTP_USE_PRET
736
+ #ifdef HAVE_CURLOPT_FTP_USE_PRET
694
737
  CURB_DEFINE(CURLOPT_FTP_USE_PRET);
695
738
  #endif
696
- #if HAVE_CURLOPT_FTP_CREATE_MISSING_DIRS
739
+ #ifdef HAVE_CURLOPT_FTP_CREATE_MISSING_DIRS
697
740
  CURB_DEFINE(CURLOPT_FTP_CREATE_MISSING_DIRS);
698
741
  #endif
699
- #if HAVE_CURLOPT_FTP_RESPONSE_TIMEOUT
742
+ #ifdef HAVE_CURLOPT_FTP_RESPONSE_TIMEOUT
700
743
  CURB_DEFINE(CURLOPT_FTP_RESPONSE_TIMEOUT);
701
744
  #endif
702
- #if HAVE_CURLOPT_FTP_ALTERNATIVE_TO_USER
745
+ #ifdef HAVE_CURLOPT_FTP_ALTERNATIVE_TO_USER
703
746
  CURB_DEFINE(CURLOPT_FTP_ALTERNATIVE_TO_USER);
704
747
  #endif
705
- #if HAVE_CURLOPT_FTP_SKIP_PASV_IP
748
+ #ifdef HAVE_CURLOPT_FTP_SKIP_PASV_IP
706
749
  CURB_DEFINE(CURLOPT_FTP_SKIP_PASV_IP);
707
750
  #endif
708
- #if HAVE_CURLOPT_FTPSSLAUTH
751
+ #ifdef HAVE_CURLOPT_FTPSSLAUTH
709
752
  CURB_DEFINE(CURLOPT_FTPSSLAUTH);
710
753
  #endif
711
- #if HAVE_CURLFTPAUTH_DEFAULT
754
+ #ifdef HAVE_CURLFTPAUTH_DEFAULT
712
755
  CURB_DEFINE(CURLFTPAUTH_DEFAULT);
713
756
  #endif
714
- #if HAVE_CURLFTPAUTH_SSL
757
+ #ifdef HAVE_CURLFTPAUTH_SSL
715
758
  CURB_DEFINE(CURLFTPAUTH_SSL);
716
759
  #endif
717
- #if HAVE_CURLFTPAUTH_TLS
760
+ #ifdef HAVE_CURLFTPAUTH_TLS
718
761
  CURB_DEFINE(CURLFTPAUTH_TLS);
719
762
  #endif
720
- #if HAVE_CURLOPT_FTP_SSL_CCC
763
+ #ifdef HAVE_CURLOPT_FTP_SSL_CCC
721
764
  CURB_DEFINE(CURLOPT_FTP_SSL_CCC);
722
765
  #endif
723
- #if HAVE_CURLFTPSSL_CCC_NONE
766
+ #ifdef HAVE_CURLFTPSSL_CCC_NONE
724
767
  CURB_DEFINE(CURLFTPSSL_CCC_NONE);
725
768
  #endif
726
- #if HAVE_CURLFTPSSL_CCC_PASSIVE
769
+ #ifdef HAVE_CURLFTPSSL_CCC_PASSIVE
727
770
  CURB_DEFINE(CURLFTPSSL_CCC_PASSIVE);
728
771
  #endif
729
- #if HAVE_CURLFTPSSL_CCC_ACTIVE
772
+ #ifdef HAVE_CURLFTPSSL_CCC_ACTIVE
730
773
  CURB_DEFINE(CURLFTPSSL_CCC_ACTIVE);
731
774
  #endif
732
- #if HAVE_CURLOPT_FTP_ACCOUNT
775
+ #ifdef HAVE_CURLOPT_FTP_ACCOUNT
733
776
  CURB_DEFINE(CURLOPT_FTP_ACCOUNT);
734
777
  #endif
735
- #if HAVE_CURLOPT_FTP_FILEMETHOD
778
+ #ifdef HAVE_CURLOPT_FTP_FILEMETHOD
736
779
  CURB_DEFINE(CURLOPT_FTP_FILEMETHOD);
737
780
  #endif
738
- #if HAVE_CURLFTPMETHOD_MULTICWD
781
+ #ifdef HAVE_CURLFTPMETHOD_MULTICWD
739
782
  CURB_DEFINE(CURLFTPMETHOD_MULTICWD);
740
783
  #endif
741
- #if HAVE_CURLFTPMETHOD_NOCWD
784
+ #ifdef HAVE_CURLFTPMETHOD_NOCWD
742
785
  CURB_DEFINE(CURLFTPMETHOD_NOCWD);
743
786
  #endif
744
- #if HAVE_CURLFTPMETHOD_SINGLECWD
787
+ #ifdef HAVE_CURLFTPMETHOD_SINGLECWD
745
788
  CURB_DEFINE(CURLFTPMETHOD_SINGLECWD);
746
789
  #endif
747
- #if HAVE_CURLOPT_RTSP_REQUEST
790
+ #ifdef HAVE_CURLOPT_RTSP_REQUEST
748
791
  CURB_DEFINE(CURLOPT_RTSP_REQUEST);
749
792
  #endif
750
- #if HAVE_CURL_RTSPREQ_OPTIONS
793
+ #ifdef HAVE_CURL_RTSPREQ_OPTIONS
751
794
  CURB_DEFINE(CURL_RTSPREQ_OPTIONS);
752
795
  #endif
753
- #if HAVE_CURL_RTSPREQ_DESCRIBE
796
+ #ifdef HAVE_CURL_RTSPREQ_DESCRIBE
754
797
  CURB_DEFINE(CURL_RTSPREQ_DESCRIBE);
755
798
  #endif
756
- #if HAVE_CURL_RTSPREQ_ANNOUNCE
799
+ #ifdef HAVE_CURL_RTSPREQ_ANNOUNCE
757
800
  CURB_DEFINE(CURL_RTSPREQ_ANNOUNCE);
758
801
  #endif
759
- #if HAVE_CURL_RTSPREQ_SETUP
802
+ #ifdef HAVE_CURL_RTSPREQ_SETUP
760
803
  CURB_DEFINE(CURL_RTSPREQ_SETUP);
761
804
  #endif
762
- #if HAVE_CURL_RTSPREQ_PLAY
805
+ #ifdef HAVE_CURL_RTSPREQ_PLAY
763
806
  CURB_DEFINE(CURL_RTSPREQ_PLAY);
764
807
  #endif
765
- #if HAVE_CURL_RTSPREQ_PAUSE
808
+ #ifdef HAVE_CURL_RTSPREQ_PAUSE
766
809
  CURB_DEFINE(CURL_RTSPREQ_PAUSE);
767
810
  #endif
768
- #if HAVE_CURL_RTSPREQ_TEARDOWN
811
+ #ifdef HAVE_CURL_RTSPREQ_TEARDOWN
769
812
  CURB_DEFINE(CURL_RTSPREQ_TEARDOWN);
770
813
  #endif
771
- #if HAVE_CURL_RTSPREQ_GET_PARAMETER
814
+ #ifdef HAVE_CURL_RTSPREQ_GET_PARAMETER
772
815
  CURB_DEFINE(CURL_RTSPREQ_GET_PARAMETER);
773
816
  #endif
774
- #if HAVE_CURL_RTSPREQ_SET_PARAMETER
817
+ #ifdef HAVE_CURL_RTSPREQ_SET_PARAMETER
775
818
  CURB_DEFINE(CURL_RTSPREQ_SET_PARAMETER);
776
819
  #endif
777
- #if HAVE_CURL_RTSPREQ_RECORD
820
+ #ifdef HAVE_CURL_RTSPREQ_RECORD
778
821
  CURB_DEFINE(CURL_RTSPREQ_RECORD);
779
822
  #endif
780
- #if HAVE_CURL_RTSPREQ_RECEIVE
823
+ #ifdef HAVE_CURL_RTSPREQ_RECEIVE
781
824
  CURB_DEFINE(CURL_RTSPREQ_RECEIVE);
782
825
  #endif
783
- #if HAVE_CURLOPT_RTSP_SESSION_ID
826
+ #ifdef HAVE_CURLOPT_RTSP_SESSION_ID
784
827
  CURB_DEFINE(CURLOPT_RTSP_SESSION_ID);
785
828
  #endif
786
- #if HAVE_CURLOPT_RTSP_STREAM_URI
829
+ #ifdef HAVE_CURLOPT_RTSP_STREAM_URI
787
830
  CURB_DEFINE(CURLOPT_RTSP_STREAM_URI);
788
831
  #endif
789
- #if HAVE_CURLOPT_RTSP_TRANSPORT
832
+ #ifdef HAVE_CURLOPT_RTSP_TRANSPORT
790
833
  CURB_DEFINE(CURLOPT_RTSP_TRANSPORT);
791
834
  #endif
792
- #if HAVE_CURLOPT_RTSP_HEADER
835
+ #ifdef HAVE_CURLOPT_RTSP_HEADER
793
836
  CURB_DEFINE(CURLOPT_RTSP_HEADER);
794
837
  #endif
795
- #if HAVE_CURLOPT_RTSP_CLIENT_CSEQ
838
+ #ifdef HAVE_CURLOPT_RTSP_CLIENT_CSEQ
796
839
  CURB_DEFINE(CURLOPT_RTSP_CLIENT_CSEQ);
797
840
  #endif
798
- #if HAVE_CURLOPT_RTSP_SERVER_CSEQ
841
+ #ifdef HAVE_CURLOPT_RTSP_SERVER_CSEQ
799
842
  CURB_DEFINE(CURLOPT_RTSP_SERVER_CSEQ);
800
843
  #endif
801
844
 
802
845
  CURB_DEFINE(CURLOPT_TRANSFERTEXT);
803
- #if HAVE_CURLOPT_PROXY_TRANSFER_MODE
846
+ #ifdef HAVE_CURLOPT_PROXY_TRANSFER_MODE
804
847
  CURB_DEFINE(CURLOPT_PROXY_TRANSFER_MODE);
805
848
  #endif
806
- #if HAVE_CURLOPT_CRLF
849
+ #ifdef HAVE_CURLOPT_CRLF
807
850
  CURB_DEFINE(CURLOPT_CRLF);
808
851
  #endif
809
- #if HAVE_CURLOPT_RANGE
852
+ #ifdef HAVE_CURLOPT_RANGE
810
853
  CURB_DEFINE(CURLOPT_RANGE);
811
854
  #endif
812
- #if HAVE_CURLOPT_RESUME_FROM
855
+ #ifdef HAVE_CURLOPT_RESUME_FROM
813
856
  CURB_DEFINE(CURLOPT_RESUME_FROM);
814
857
  #endif
815
- #if HAVE_CURLOPT_RESUME_FROM_LARGE
858
+ #ifdef HAVE_CURLOPT_RESUME_FROM_LARGE
816
859
  CURB_DEFINE(CURLOPT_RESUME_FROM_LARGE);
817
860
  #endif
818
- #if HAVE_CURLOPT_CUSTOMREQUEST
861
+ #ifdef HAVE_CURLOPT_CUSTOMREQUEST
819
862
  CURB_DEFINE(CURLOPT_CUSTOMREQUEST);
820
863
  #endif
821
- #if HAVE_CURLOPT_FILETIME
864
+ #ifdef HAVE_CURLOPT_FILETIME
822
865
  CURB_DEFINE(CURLOPT_FILETIME);
823
866
  #endif
824
- #if HAVE_CURLOPT_NOBODY
867
+ #ifdef HAVE_CURLOPT_NOBODY
825
868
  CURB_DEFINE(CURLOPT_NOBODY);
826
869
  #endif
827
- #if HAVE_CURLOPT_INFILESIZE
870
+ #ifdef HAVE_CURLOPT_INFILESIZE
828
871
  CURB_DEFINE(CURLOPT_INFILESIZE);
829
872
  #endif
830
- #if HAVE_CURLOPT_INFILESIZE_LARGE
873
+ #ifdef HAVE_CURLOPT_INFILESIZE_LARGE
831
874
  CURB_DEFINE(CURLOPT_INFILESIZE_LARGE);
832
875
  #endif
833
- #if HAVE_CURLOPT_UPLOAD
876
+ #ifdef HAVE_CURLOPT_UPLOAD
834
877
  CURB_DEFINE(CURLOPT_UPLOAD);
835
878
  #endif
836
- #if HAVE_CURLOPT_MAXFILESIZE
879
+ #ifdef HAVE_CURLOPT_MAXFILESIZE
837
880
  CURB_DEFINE(CURLOPT_MAXFILESIZE);
838
881
  #endif
839
- #if HAVE_CURLOPT_MAXFILESIZE_LARGE
882
+ #ifdef HAVE_CURLOPT_MAXFILESIZE_LARGE
840
883
  CURB_DEFINE(CURLOPT_MAXFILESIZE_LARGE);
841
884
  #endif
842
- #if HAVE_CURLOPT_TIMECONDITION
885
+ #ifdef HAVE_CURLOPT_TIMECONDITION
843
886
  CURB_DEFINE(CURLOPT_TIMECONDITION);
844
887
  #endif
845
- #if HAVE_CURLOPT_TIMEVALUE
888
+ #ifdef HAVE_CURLOPT_TIMEVALUE
846
889
  CURB_DEFINE(CURLOPT_TIMEVALUE);
847
890
  #endif
848
891
 
849
- #if HAVE_CURLOPT_TIMEOUT
892
+ #ifdef HAVE_CURLOPT_TIMEOUT
850
893
  CURB_DEFINE(CURLOPT_TIMEOUT);
851
894
  #endif
852
- #if HAVE_CURLOPT_TIMEOUT_MS
895
+ #ifdef HAVE_CURLOPT_TIMEOUT_MS
853
896
  CURB_DEFINE(CURLOPT_TIMEOUT_MS);
854
897
  #endif
855
- #if HAVE_CURLOPT_LOW_SPEED_LIMIT
898
+ #ifdef HAVE_CURLOPT_LOW_SPEED_LIMIT
856
899
  CURB_DEFINE(CURLOPT_LOW_SPEED_LIMIT);
857
900
  #endif
858
- #if HAVE_CURLOPT_LOW_SPEED_TIME
901
+ #ifdef HAVE_CURLOPT_LOW_SPEED_TIME
859
902
  CURB_DEFINE(CURLOPT_LOW_SPEED_TIME);
860
903
  #endif
861
- #if HAVE_CURLOPT_MAX_SEND_SPEED_LARGE
904
+ #ifdef HAVE_CURLOPT_MAX_SEND_SPEED_LARGE
862
905
  CURB_DEFINE(CURLOPT_MAX_SEND_SPEED_LARGE);
863
906
  #endif
864
- #if HAVE_CURLOPT_MAX_RECV_SPEED_LARGE
907
+ #ifdef HAVE_CURLOPT_MAX_RECV_SPEED_LARGE
865
908
  CURB_DEFINE(CURLOPT_MAX_RECV_SPEED_LARGE);
866
909
  #endif
867
- #if HAVE_CURLOPT_MAXCONNECTS
910
+ #ifdef HAVE_CURLOPT_MAXCONNECTS
868
911
  CURB_DEFINE(CURLOPT_MAXCONNECTS);
869
912
  #endif
870
- #if HAVE_CURLOPT_CLOSEPOLICY
913
+ #ifdef HAVE_CURLOPT_CLOSEPOLICY
871
914
  CURB_DEFINE(CURLOPT_CLOSEPOLICY);
872
915
  #endif
873
- #if HAVE_CURLOPT_FRESH_CONNECT
916
+ #ifdef HAVE_CURLOPT_FRESH_CONNECT
874
917
  CURB_DEFINE(CURLOPT_FRESH_CONNECT);
875
918
  #endif
876
- #if HAVE_CURLOPT_FORBID_REUSE
919
+ #ifdef HAVE_CURLOPT_FORBID_REUSE
877
920
  CURB_DEFINE(CURLOPT_FORBID_REUSE);
878
921
  #endif
879
- #if HAVE_CURLOPT_CONNECTTIMEOUT
922
+ #ifdef HAVE_CURLOPT_CONNECTTIMEOUT
880
923
  CURB_DEFINE(CURLOPT_CONNECTTIMEOUT);
881
924
  #endif
882
- #if HAVE_CURLOPT_CONNECTTIMEOUT_MS
925
+ #ifdef HAVE_CURLOPT_CONNECTTIMEOUT_MS
883
926
  CURB_DEFINE(CURLOPT_CONNECTTIMEOUT_MS);
884
927
  #endif
885
- #if HAVE_CURLOPT_IPRESOLVE
928
+ #ifdef HAVE_CURLOPT_IPRESOLVE
886
929
  CURB_DEFINE(CURLOPT_IPRESOLVE);
887
930
  #endif
888
- #if HAVE_CURL_IPRESOLVE_WHATEVER
931
+ #ifdef HAVE_CURL_IPRESOLVE_WHATEVER
889
932
  CURB_DEFINE(CURL_IPRESOLVE_WHATEVER);
890
933
  #endif
891
- #if HAVE_CURL_IPRESOLVE_V4
934
+ #ifdef HAVE_CURL_IPRESOLVE_V4
892
935
  CURB_DEFINE(CURL_IPRESOLVE_V4);
893
936
  #endif
894
- #if HAVE_CURL_IPRESOLVE_V6
937
+ #ifdef HAVE_CURL_IPRESOLVE_V6
895
938
  CURB_DEFINE(CURL_IPRESOLVE_V6);
896
939
  #endif
897
- #if HAVE_CURLOPT_CONNECT_ONLY
940
+ #ifdef HAVE_CURLOPT_CONNECT_ONLY
898
941
  CURB_DEFINE(CURLOPT_CONNECT_ONLY);
899
942
  #endif
900
- #if HAVE_CURLOPT_USE_SSL
943
+ #ifdef HAVE_CURLOPT_USE_SSL
901
944
  CURB_DEFINE(CURLOPT_USE_SSL);
902
945
  #endif
903
- #if HAVE_CURLUSESSL_NONE
946
+ #ifdef HAVE_CURLUSESSL_NONE
904
947
  CURB_DEFINE(CURLUSESSL_NONE);
905
948
  #endif
906
- #if HAVE_CURLUSESSL_TRY
949
+ #ifdef HAVE_CURLUSESSL_TRY
907
950
  CURB_DEFINE(CURLUSESSL_TRY);
908
951
  #endif
909
- #if HAVE_CURLUSESSL_CONTROL
952
+ #ifdef HAVE_CURLUSESSL_CONTROL
910
953
  CURB_DEFINE(CURLUSESSL_CONTROL);
911
954
  #endif
912
- #if HAVE_CURLUSESSL_ALL
955
+ #ifdef HAVE_CURLUSESSL_ALL
913
956
  CURB_DEFINE(CURLUSESSL_ALL);
914
957
  #endif
915
- #if HAVE_CURLOPT_RESOLVE
958
+ #ifdef HAVE_CURLOPT_RESOLVE
916
959
  CURB_DEFINE(CURLOPT_RESOLVE);
917
960
  #endif
918
961
 
919
- #if HAVE_CURLOPT_SSLCERT
962
+ #ifdef HAVE_CURLOPT_SSLCERT
920
963
  CURB_DEFINE(CURLOPT_SSLCERT);
921
964
  #endif
922
- #if HAVE_CURLOPT_SSLCERTTYPE
965
+ #ifdef HAVE_CURLOPT_SSLCERTTYPE
923
966
  CURB_DEFINE(CURLOPT_SSLCERTTYPE);
924
967
  #endif
925
- #if HAVE_CURLOPT_SSLKEY
968
+ #ifdef HAVE_CURLOPT_SSLKEY
926
969
  CURB_DEFINE(CURLOPT_SSLKEY);
927
970
  #endif
928
- #if HAVE_CURLOPT_SSLKEYTYPE
971
+ #ifdef HAVE_CURLOPT_SSLKEYTYPE
929
972
  CURB_DEFINE(CURLOPT_SSLKEYTYPE);
930
973
  #endif
931
- #if HAVE_CURLOPT_KEYPASSWD
974
+ #ifdef HAVE_CURLOPT_KEYPASSWD
932
975
  CURB_DEFINE(CURLOPT_KEYPASSWD);
933
976
  #endif
934
- #if HAVE_CURLOPT_SSLENGINE
977
+ #ifdef HAVE_CURLOPT_SSLENGINE
935
978
  CURB_DEFINE(CURLOPT_SSLENGINE);
936
979
  #endif
937
- #if HAVE_CURLOPT_SSLENGINE_DEFAULT
980
+ #ifdef HAVE_CURLOPT_SSLENGINE_DEFAULT
938
981
  CURB_DEFINE(CURLOPT_SSLENGINE_DEFAULT);
939
982
  #endif
940
- #if HAVE_CURLOPT_SSLVERSION
983
+ #ifdef HAVE_CURLOPT_SSLVERSION
941
984
  CURB_DEFINE(CURLOPT_SSLVERSION);
942
985
  #endif
943
- #if HAVE_CURL_SSLVERSION_TLSv1
986
+ #ifdef HAVE_CURL_SSLVERSION_TLSv1
944
987
  CURB_DEFINE(CURL_SSLVERSION_TLSv1);
945
988
  #endif
946
- #if HAVE_CURL_SSLVERSION_SSLv2
989
+ #ifdef HAVE_CURL_SSLVERSION_SSLv2
947
990
  CURB_DEFINE(CURL_SSLVERSION_SSLv2);
948
991
  #endif
949
- #if HAVE_CURL_SSLVERSION_SSLv3
992
+ #ifdef HAVE_CURL_SSLVERSION_SSLv3
950
993
  CURB_DEFINE(CURL_SSLVERSION_SSLv3);
951
994
  #endif
952
- #if HAVE_CURL_SSLVERSION_TLSv1_0
995
+ #ifdef HAVE_CURL_SSLVERSION_TLSv1_0
953
996
  CURB_DEFINE(CURL_SSLVERSION_TLSv1_0);
954
997
  CURB_DEFINE(CURL_SSLVERSION_MAX_TLSv1_0);
955
998
  #endif
956
- #if HAVE_CURL_SSLVERSION_TLSv1_1
999
+ #ifdef HAVE_CURL_SSLVERSION_TLSv1_1
957
1000
  CURB_DEFINE(CURL_SSLVERSION_TLSv1_1);
958
1001
  CURB_DEFINE(CURL_SSLVERSION_MAX_TLSv1_1);
959
1002
  #endif
960
- #if HAVE_CURL_SSLVERSION_TLSv1_2
1003
+ #ifdef HAVE_CURL_SSLVERSION_TLSv1_2
961
1004
  CURB_DEFINE(CURL_SSLVERSION_TLSv1_2);
962
1005
  CURB_DEFINE(CURL_SSLVERSION_MAX_TLSv1_2);
963
1006
  #endif
964
- #if HAVE_CURL_SSLVERSION_TLSv1_3
1007
+ #ifdef HAVE_CURL_SSLVERSION_TLSv1_3
965
1008
  CURB_DEFINE(CURL_SSLVERSION_TLSv1_3);
966
1009
  CURB_DEFINE(CURL_SSLVERSION_MAX_TLSv1_3);
967
1010
  #endif
968
- #if HAVE_CURLOPT_SSL_VERIFYPEER
1011
+ #ifdef HAVE_CURLOPT_SSL_VERIFYPEER
969
1012
  CURB_DEFINE(CURLOPT_SSL_VERIFYPEER);
970
1013
  #endif
971
- #if HAVE_CURLOPT_CAINFO
1014
+ #ifdef HAVE_CURLOPT_CAINFO
972
1015
  CURB_DEFINE(CURLOPT_CAINFO);
973
1016
  #endif
974
- #if HAVE_CURLOPT_ISSUERCERT
1017
+ #ifdef HAVE_CURLOPT_ISSUERCERT
975
1018
  CURB_DEFINE(CURLOPT_ISSUERCERT);
976
1019
  #endif
977
- #if HAVE_CURLOPT_CAPATH
1020
+ #ifdef HAVE_CURLOPT_CAPATH
978
1021
  CURB_DEFINE(CURLOPT_CAPATH);
979
1022
  #endif
980
- #if HAVE_CURLOPT_CRLFILE
1023
+ #ifdef HAVE_CURLOPT_CRLFILE
981
1024
  CURB_DEFINE(CURLOPT_CRLFILE);
982
1025
  #endif
983
- #if HAVE_CURLOPT_SSL_VERIFYHOST
1026
+ #ifdef HAVE_CURLOPT_SSL_VERIFYHOST
984
1027
  CURB_DEFINE(CURLOPT_SSL_VERIFYHOST);
985
1028
  #endif
986
- #if HAVE_CURLOPT_CERTINFO
1029
+ #ifdef HAVE_CURLOPT_CERTINFO
987
1030
  CURB_DEFINE(CURLOPT_CERTINFO);
988
1031
  #endif
989
- #if HAVE_CURLOPT_RANDOM_FILE
1032
+ /* CURLOPT_RANDOM_FILE deprecated since 7.84.0, serves no purpose */
1033
+ #ifdef HAVE_CURLOPT_RANDOM_FILE
990
1034
  CURB_DEFINE(CURLOPT_RANDOM_FILE);
991
1035
  #endif
992
- #if HAVE_CURLOPT_EGDSOCKET
1036
+ /* CURLOPT_EGDSOCKET deprecated since 7.84.0, serves no purpose */
1037
+ #ifdef HAVE_CURLOPT_EGDSOCKET
993
1038
  CURB_DEFINE(CURLOPT_EGDSOCKET);
994
1039
  #endif
995
- #if HAVE_CURLOPT_SSL_CIPHER_LIST
1040
+ #ifdef HAVE_CURLOPT_SSL_CIPHER_LIST
996
1041
  CURB_DEFINE(CURLOPT_SSL_CIPHER_LIST);
997
1042
  #endif
998
- #if HAVE_CURLOPT_SSL_SESSIONID_CACHE
1043
+ #ifdef HAVE_CURLOPT_SSL_SESSIONID_CACHE
999
1044
  CURB_DEFINE(CURLOPT_SSL_SESSIONID_CACHE);
1000
1045
  #endif
1001
- #if HAVE_CURLOPT_KRBLEVEL
1046
+ #ifdef HAVE_CURLOPT_KRBLEVEL
1002
1047
  CURB_DEFINE(CURLOPT_KRBLEVEL);
1003
1048
  #endif
1004
1049
 
1005
- #if HAVE_CURLOPT_SSH_AUTH_TYPES
1050
+ #ifdef HAVE_CURLOPT_SSH_AUTH_TYPES
1006
1051
  CURB_DEFINE(CURLOPT_SSH_AUTH_TYPES);
1007
1052
  #endif
1008
- #if HAVE_CURLOPT_SSH_HOST_PUBLIC_KEY_MD5
1053
+ #ifdef HAVE_CURLOPT_SSH_HOST_PUBLIC_KEY_MD5
1009
1054
  CURB_DEFINE(CURLOPT_SSH_HOST_PUBLIC_KEY_MD5);
1010
1055
  #endif
1011
- #if HAVE_CURLOPT_SSH_PUBLIC_KEYFILE
1056
+ #ifdef HAVE_CURLOPT_SSH_PUBLIC_KEYFILE
1012
1057
  CURB_DEFINE(CURLOPT_SSH_PUBLIC_KEYFILE);
1013
1058
  #endif
1014
- #if HAVE_CURLOPT_SSH_PRIVATE_KEYFILE
1059
+ #ifdef HAVE_CURLOPT_SSH_PRIVATE_KEYFILE
1015
1060
  CURB_DEFINE(CURLOPT_SSH_PRIVATE_KEYFILE);
1016
1061
  #endif
1017
- #if HAVE_CURLOPT_SSH_KNOWNHOSTS
1062
+ #ifdef HAVE_CURLOPT_SSH_KNOWNHOSTS
1018
1063
  CURB_DEFINE(CURLOPT_SSH_KNOWNHOSTS);
1019
1064
  #endif
1020
- #if HAVE_CURLOPT_SSH_KEYFUNCTION
1065
+ #ifdef HAVE_CURLOPT_SSH_KEYFUNCTION
1021
1066
  CURB_DEFINE(CURLOPT_SSH_KEYFUNCTION);
1022
1067
  #endif
1023
- #if HAVE_CURLKHSTAT_FINE_ADD_TO_FILE
1068
+ #ifdef HAVE_CURLKHSTAT_FINE_ADD_TO_FILE
1024
1069
  CURB_DEFINE(CURLKHSTAT_FINE_ADD_TO_FILE);
1025
1070
  #endif
1026
- #if HAVE_CURLKHSTAT_FINE
1071
+ #ifdef HAVE_CURLKHSTAT_FINE
1027
1072
  CURB_DEFINE(CURLKHSTAT_FINE);
1028
1073
  #endif
1029
- #if HAVE_CURLKHSTAT_REJECT
1074
+ #ifdef HAVE_CURLKHSTAT_REJECT
1030
1075
  CURB_DEFINE(CURLKHSTAT_REJECT);
1031
1076
  #endif
1032
- #if HAVE_CURLKHSTAT_DEFER
1077
+ #ifdef HAVE_CURLKHSTAT_DEFER
1033
1078
  CURB_DEFINE(CURLKHSTAT_DEFER);
1034
1079
  #endif
1035
- #if HAVE_CURLOPT_SSH_KEYDATA
1080
+ #ifdef HAVE_CURLOPT_SSH_KEYDATA
1036
1081
  CURB_DEFINE(CURLOPT_SSH_KEYDATA);
1037
1082
  #endif
1038
1083
 
1039
- #if HAVE_CURLOPT_PRIVATE
1084
+ #ifdef HAVE_CURLOPT_PRIVATE
1040
1085
  CURB_DEFINE(CURLOPT_PRIVATE);
1041
1086
  #endif
1042
- #if HAVE_CURLOPT_SHARE
1087
+ #ifdef HAVE_CURLOPT_SHARE
1043
1088
  CURB_DEFINE(CURLOPT_SHARE);
1044
1089
  #endif
1045
- #if HAVE_CURLOPT_NEW_FILE_PERMS
1090
+ #ifdef HAVE_CURLOPT_NEW_FILE_PERMS
1046
1091
  CURB_DEFINE(CURLOPT_NEW_FILE_PERMS);
1047
1092
  #endif
1048
- #if HAVE_CURLOPT_NEW_DIRECTORY_PERMS
1093
+ #ifdef HAVE_CURLOPT_NEW_DIRECTORY_PERMS
1049
1094
  CURB_DEFINE(CURLOPT_NEW_DIRECTORY_PERMS);
1050
1095
  #endif
1051
1096
 
1052
- #if HAVE_CURLOPT_TELNETOPTIONS
1097
+ #ifdef HAVE_CURLOPT_TELNETOPTIONS
1053
1098
  CURB_DEFINE(CURLOPT_TELNETOPTIONS);
1054
1099
  #endif
1055
1100
 
1056
- #if HAVE_CURLOPT_GSSAPI_DELEGATION
1101
+ #ifdef HAVE_CURLOPT_GSSAPI_DELEGATION
1057
1102
  CURB_DEFINE(CURLOPT_GSSAPI_DELEGATION);
1058
1103
  #endif
1059
1104
 
1060
- #if HAVE_CURLGSSAPI_DELEGATION_FLAG
1105
+ #ifdef HAVE_CURLGSSAPI_DELEGATION_FLAG
1061
1106
  CURB_DEFINE(CURLGSSAPI_DELEGATION_FLAG);
1062
1107
  #endif
1063
1108
 
1064
- #if HAVE_CURLGSSAPI_DELEGATION_POLICY_FLAG
1109
+ #ifdef HAVE_CURLGSSAPI_DELEGATION_POLICY_FLAG
1065
1110
  CURB_DEFINE(CURLGSSAPI_DELEGATION_POLICY_FLAG);
1066
1111
  #endif
1067
1112
 
1068
- #if HAVE_CURLOPT_UNIX_SOCKET_PATH
1113
+ #ifdef HAVE_CURLOPT_UNIX_SOCKET_PATH
1069
1114
  CURB_DEFINE(CURLOPT_UNIX_SOCKET_PATH);
1070
1115
  #endif
1071
1116
 
1072
- #if HAVE_CURLOPT_PIPEWAIT
1117
+ #ifdef HAVE_CURLOPT_PIPEWAIT
1073
1118
  CURB_DEFINE(CURLOPT_PIPEWAIT);
1074
1119
  #endif
1075
1120
 
1076
- #if HAVE_CURLOPT_TCP_KEEPALIVE
1121
+ #ifdef HAVE_CURLOPT_TCP_KEEPALIVE
1077
1122
  CURB_DEFINE(CURLOPT_TCP_KEEPALIVE);
1078
1123
  CURB_DEFINE(CURLOPT_TCP_KEEPIDLE);
1079
1124
  CURB_DEFINE(CURLOPT_TCP_KEEPINTVL);
1080
1125
  #endif
1081
1126
 
1082
- #if HAVE_CURLOPT_HAPROXYPROTOCOL
1127
+ #ifdef HAVE_CURLOPT_HAPROXYPROTOCOL
1083
1128
  CURB_DEFINE(CURLOPT_HAPROXYPROTOCOL);
1084
1129
  #endif
1085
1130
 
1086
- #if HAVE_CURLOPT_PROXY_SSL_VERIFYHOST
1131
+ #ifdef HAVE_CURLOPT_PROXY_SSL_VERIFYHOST
1087
1132
  CURB_DEFINE(CURLOPT_PROXY_SSL_VERIFYHOST);
1088
1133
  #endif
1089
1134
 
1090
- #if HAVE_CURLPROTO_RTMPTE
1135
+ #ifdef HAVE_CURLPROTO_RTMPTE
1091
1136
  CURB_DEFINE(CURLPROTO_RTMPTE);
1092
1137
  #endif
1093
1138
 
1094
- #if HAVE_CURLPROTO_RTMPTS
1139
+ #ifdef HAVE_CURLPROTO_RTMPTS
1095
1140
  CURB_DEFINE(CURLPROTO_RTMPTS);
1096
1141
  #endif
1097
1142
 
1098
- #if HAVE_CURLPROTO_SMBS
1143
+ #ifdef HAVE_CURLPROTO_SMBS
1099
1144
  CURB_DEFINE(CURLPROTO_SMBS);
1100
1145
  #endif
1101
1146
 
1102
- #if HAVE_CURLPROTO_LDAP
1147
+ #ifdef HAVE_CURLPROTO_LDAP
1103
1148
  CURB_DEFINE(CURLPROTO_LDAP);
1104
1149
  #endif
1105
1150
 
1106
- #if HAVE_CURLPROTO_FTP
1151
+ #ifdef HAVE_CURLPROTO_FTP
1107
1152
  CURB_DEFINE(CURLPROTO_FTP);
1108
1153
  #endif
1109
1154
 
1110
- #if HAVE_CURLPROTO_SMTPS
1155
+ #ifdef HAVE_CURLPROTO_SMTPS
1111
1156
  CURB_DEFINE(CURLPROTO_SMTPS);
1112
1157
  #endif
1113
1158
 
1114
- #if HAVE_CURLPROTO_HTTP
1159
+ #ifdef HAVE_CURLPROTO_HTTP
1115
1160
  CURB_DEFINE(CURLPROTO_HTTP);
1116
1161
  #endif
1117
1162
 
1118
- #if HAVE_CURLPROTO_SMTP
1163
+ #ifdef HAVE_CURLPROTO_SMTP
1119
1164
  CURB_DEFINE(CURLPROTO_SMTP);
1120
1165
  #endif
1121
1166
 
1122
- #if HAVE_CURLPROTO_TFTP
1167
+ #ifdef HAVE_CURLPROTO_TFTP
1123
1168
  CURB_DEFINE(CURLPROTO_TFTP);
1124
1169
  #endif
1125
1170
 
1126
- #if HAVE_CURLPROTO_LDAPS
1171
+ #ifdef HAVE_CURLPROTO_LDAPS
1127
1172
  CURB_DEFINE(CURLPROTO_LDAPS);
1128
1173
  #endif
1129
1174
 
1130
- #if HAVE_CURLPROTO_IMAPS
1175
+ #ifdef HAVE_CURLPROTO_IMAPS
1131
1176
  CURB_DEFINE(CURLPROTO_IMAPS);
1132
1177
  #endif
1133
1178
 
1134
- #if HAVE_CURLPROTO_SCP
1179
+ #ifdef HAVE_CURLPROTO_SCP
1135
1180
  CURB_DEFINE(CURLPROTO_SCP);
1136
1181
  #endif
1137
1182
 
1138
- #if HAVE_CURLPROTO_SFTP
1183
+ #ifdef HAVE_CURLPROTO_SFTP
1139
1184
  CURB_DEFINE(CURLPROTO_SFTP);
1140
1185
  #endif
1141
1186
 
1142
- #if HAVE_CURLPROTO_TELNET
1187
+ #ifdef HAVE_CURLPROTO_TELNET
1143
1188
  CURB_DEFINE(CURLPROTO_TELNET);
1144
1189
  #endif
1145
1190
 
1146
- #if HAVE_CURLPROTO_FILE
1191
+ #ifdef HAVE_CURLPROTO_FILE
1147
1192
  CURB_DEFINE(CURLPROTO_FILE);
1148
1193
  #endif
1149
1194
 
1150
- #if HAVE_CURLPROTO_FTPS
1195
+ #ifdef HAVE_CURLPROTO_FTPS
1151
1196
  CURB_DEFINE(CURLPROTO_FTPS);
1152
1197
  #endif
1153
1198
 
1154
- #if HAVE_CURLPROTO_HTTPS
1199
+ #ifdef HAVE_CURLPROTO_HTTPS
1155
1200
  CURB_DEFINE(CURLPROTO_HTTPS);
1156
1201
  #endif
1157
1202
 
1158
- #if HAVE_CURLPROTO_IMAP
1203
+ #ifdef HAVE_CURLPROTO_IMAP
1159
1204
  CURB_DEFINE(CURLPROTO_IMAP);
1160
1205
  #endif
1161
1206
 
1162
- #if HAVE_CURLPROTO_POP3
1207
+ #ifdef HAVE_CURLPROTO_POP3
1163
1208
  CURB_DEFINE(CURLPROTO_POP3);
1164
1209
  #endif
1165
1210
 
1166
- #if HAVE_CURLPROTO_GOPHER
1211
+ #ifdef HAVE_CURLPROTO_GOPHER
1167
1212
  CURB_DEFINE(CURLPROTO_GOPHER);
1168
1213
  #endif
1169
1214
 
1170
- #if HAVE_CURLPROTO_DICT
1215
+ #ifdef HAVE_CURLPROTO_DICT
1171
1216
  CURB_DEFINE(CURLPROTO_DICT);
1172
1217
  #endif
1173
1218
 
1174
- #if HAVE_CURLPROTO_SMB
1219
+ #ifdef HAVE_CURLPROTO_SMB
1175
1220
  CURB_DEFINE(CURLPROTO_SMB);
1176
1221
  #endif
1177
1222
 
1178
- #if HAVE_CURLPROTO_RTMP
1223
+ #ifdef HAVE_CURLPROTO_RTMP
1179
1224
  CURB_DEFINE(CURLPROTO_RTMP);
1180
1225
  #endif
1181
1226
 
1182
- #if HAVE_CURLPROTO_ALL
1227
+ #ifdef HAVE_CURLPROTO_ALL
1183
1228
  CURB_DEFINE(CURLPROTO_ALL);
1184
1229
  #endif
1185
1230
 
1186
- #if HAVE_CURLPROTO_RTMPE
1231
+ #ifdef HAVE_CURLPROTO_RTMPE
1187
1232
  CURB_DEFINE(CURLPROTO_RTMPE);
1188
1233
  #endif
1189
1234
 
1190
- #if HAVE_CURLPROTO_RTMPS
1235
+ #ifdef HAVE_CURLPROTO_RTMPS
1191
1236
  CURB_DEFINE(CURLPROTO_RTMPS);
1192
1237
  #endif
1193
1238
 
1194
- #if HAVE_CURLPROTO_RTMPT
1239
+ #ifdef HAVE_CURLPROTO_RTMPT
1195
1240
  CURB_DEFINE(CURLPROTO_RTMPT);
1196
1241
  #endif
1197
1242
 
1198
- #if HAVE_CURLPROTO_POP3S
1243
+ #ifdef HAVE_CURLPROTO_POP3S
1199
1244
  CURB_DEFINE(CURLPROTO_POP3S);
1200
1245
  #endif
1201
1246
 
1202
- #if HAVE_CURLPROTO_RTSP
1247
+ #ifdef HAVE_CURLPROTO_RTSP
1203
1248
  CURB_DEFINE(CURLPROTO_RTSP);
1204
1249
  #endif
1205
1250
 
@@ -1215,6 +1260,12 @@ void Init_curb_core() {
1215
1260
 
1216
1261
  #if LIBCURL_VERSION_NUM >= 0x072100 /* 7.33.0 */
1217
1262
  rb_define_const(mCurl, "HTTP_2_0", LONG2NUM(CURL_HTTP_VERSION_2_0));
1263
+ #endif
1264
+ #ifdef CURL_HTTP_VERSION_2TLS
1265
+ rb_define_const(mCurl, "HTTP_2TLS", LONG2NUM(CURL_HTTP_VERSION_2TLS));
1266
+ #endif
1267
+ #ifdef CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE
1268
+ rb_define_const(mCurl, "HTTP_2_PRIOR_KNOWLEDGE", LONG2NUM(CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE));
1218
1269
  #endif
1219
1270
  rb_define_const(mCurl, "HTTP_1_1", LONG2NUM(CURL_HTTP_VERSION_1_1));
1220
1271
  rb_define_const(mCurl, "HTTP_1_0", LONG2NUM(CURL_HTTP_VERSION_1_0));