-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathlibcurl.zig
1173 lines (846 loc) · 36.8 KB
/
libcurl.zig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
const std = @import("std");
fn root() []const u8 {
return std.fs.path.dirname(@src().file) orelse ".";
}
const root_path = root() ++ "/";
pub const include_dir = root_path ++ "curl/include";
const package_path = root_path ++ "src/main.zig";
const lib_dir = root_path ++ "curl/lib";
pub const Define = struct {
key: []const u8,
value: ?[]const u8,
};
pub const Options = struct {
import_name: ?[]const u8 = null,
};
pub const Library = struct {
exported_defines: []Define,
step: *std.build.LibExeObjStep,
pub fn link(self: Library, other: *std.build.LibExeObjStep, opts: Options) void {
for (self.exported_defines) |def|
other.defineCMacro(def.key, def.value);
other.addIncludePath(include_dir);
other.linkLibrary(self.step);
if (opts.import_name) |import_name|
other.addAnonymousModule(
import_name,
.{ .source_file = .{ .path = package_path } },
);
}
};
pub fn create(
b: *std.build.Builder,
target: std.zig.CrossTarget,
optimize: std.builtin.OptimizeMode,
) !Library {
const ret = b.addStaticLibrary(.{
.name = "curl",
.target = target,
.optimize = optimize,
});
ret.addCSourceFiles(srcs, &.{});
ret.addIncludePath(include_dir);
ret.addIncludePath(lib_dir);
ret.linkLibC();
var exported_defines = std.ArrayList(Define).init(b.allocator);
defer exported_defines.deinit();
ret.defineCMacro("BUILDING_LIBCURL", null);
// when not building a shared library
ret.defineCMacro("CURL_STATICLIB", "1");
try exported_defines.append(.{ .key = "CURL_STATICLIB", .value = "1" });
// disables LDAP
ret.defineCMacro("CURL_DISABLE_LDAP", "1");
// disables LDAPS
ret.defineCMacro("CURL_DISABLE_LDAPS", "1");
// if mbedTLS is enabled
ret.defineCMacro("USE_MBEDTLS", "1");
// disables alt-svc
// #undef CURL_DISABLE_ALTSVC
// disables cookies support
// #undef CURL_DISABLE_COOKIES
// disables cryptographic authentication
// #undef CURL_DISABLE_CRYPTO_AUTH
// disables DICT
ret.defineCMacro("CURL_DISABLE_DICT", "1");
// disables DNS-over-HTTPS
// #undef CURL_DISABLE_DOH
// disables FILE
ret.defineCMacro("CURL_DISABLE_FILE", "1");
// disables FTP
ret.defineCMacro("CURL_DISABLE_FTP", "1");
// disables GOPHER
ret.defineCMacro("CURL_DISABLE_GOPHER", "1");
// disables HSTS support
// #undef CURL_DISABLE_HSTS
// disables HTTP
// #undef CURL_DISABLE_HTTP
// disables IMAP
ret.defineCMacro("CURL_DISABLE_IMAP", "1");
// disables --libcurl option from the curl tool
// #undef CURL_DISABLE_LIBCURL_OPTION
// disables MIME support
// #undef CURL_DISABLE_MIME
// disables MQTT
ret.defineCMacro("CURL_DISABLE_MQTT", "1");
// disables netrc parser
// #undef CURL_DISABLE_NETRC
// disables NTLM support
// #undef CURL_DISABLE_NTLM
// disables date parsing
// #undef CURL_DISABLE_PARSEDATE
// disables POP3
ret.defineCMacro("CURL_DISABLE_POP3", "1");
// disables built-in progress meter
// #undef CURL_DISABLE_PROGRESS_METER
// disables proxies
// #undef CURL_DISABLE_PROXY
// disables RTSP
ret.defineCMacro("CURL_DISABLE_RTSP", "1");
// disables SMB
ret.defineCMacro("CURL_DISABLE_SMB", "1");
// disables SMTP
ret.defineCMacro("CURL_DISABLE_SMTP", "1");
// disables use of socketpair for curl_multi_poll
// #undef CURL_DISABLE_SOCKETPAIR
// disables TELNET
ret.defineCMacro("CURL_DISABLE_TELNET", "1");
// disables TFTP
ret.defineCMacro("CURL_DISABLE_TFTP", "1");
// disables verbose strings
// #undef CURL_DISABLE_VERBOSE_STRINGS
// Define to 1 if you have the `ssh2' library (-lssh2).
ret.defineCMacro("HAVE_LIBSSH2", "1");
// Define to 1 if you have the <libssh2.h> header file.
ret.defineCMacro("HAVE_LIBSSH2_H", "1");
// if zlib is available
ret.defineCMacro("HAVE_LIBZ", "1");
// if you have the zlib.h header file
ret.defineCMacro("HAVE_ZLIB_H", "1");
if (target.isWindows()) {
// Define if you want to enable WIN32 threaded DNS lookup
//ret.defineCMacro("USE_THREADS_WIN32", "1");
return Library{ .step = ret, .exported_defines = try exported_defines.toOwnedSlice() };
}
//ret.defineCMacro("libcurl_EXPORTS", null);
//ret.defineCMacro("STDC_HEADERS", null);
// when building libcurl itself
// #undef BUILDING_LIBCURL
// Location of default ca bundle
// ret.defineCMacro("CURL_CA_BUNDLE", "\"/etc/ssl/certs/ca-certificates.crt\"");
// define "1" to use built-in ca store of TLS backend
// #undef CURL_CA_FALLBACK
// Location of default ca path
// ret.defineCMacro("CURL_CA_PATH", "\"/etc/ssl/certs\"");
// to make a symbol visible
ret.defineCMacro("CURL_EXTERN_SYMBOL", "__attribute__ ((__visibility__ (\"default\"))");
// Ensure using CURL_EXTERN_SYMBOL is possible
//#ifndef CURL_EXTERN_SYMBOL
//ret.defineCMacro("CURL_EXTERN_SYMBOL
//#endif
// Allow SMB to work on Windows
// #undef USE_WIN32_CRYPTO
// Use Windows LDAP implementation
// #undef USE_WIN32_LDAP
// your Entropy Gathering Daemon socket pathname
// #undef EGD_SOCKET
// Define if you want to enable IPv6 support
if (!target.isDarwin())
ret.defineCMacro("ENABLE_IPV6", "1");
// Define to 1 if you have the alarm function.
ret.defineCMacro("HAVE_ALARM", "1");
// Define to 1 if you have the <alloca.h> header file.
ret.defineCMacro("HAVE_ALLOCA_H", "1");
// Define to 1 if you have the <arpa/inet.h> header file.
ret.defineCMacro("HAVE_ARPA_INET_H", "1");
// Define to 1 if you have the <arpa/tftp.h> header file.
ret.defineCMacro("HAVE_ARPA_TFTP_H", "1");
// Define to 1 if you have the <assert.h> header file.
ret.defineCMacro("HAVE_ASSERT_H", "1");
// Define to 1 if you have the `basename' function.
ret.defineCMacro("HAVE_BASENAME", "1");
// Define to 1 if bool is an available type.
ret.defineCMacro("HAVE_BOOL_T", "1");
// Define to 1 if you have the __builtin_available function.
ret.defineCMacro("HAVE_BUILTIN_AVAILABLE", "1");
// Define to 1 if you have the clock_gettime function and monotonic timer.
ret.defineCMacro("HAVE_CLOCK_GETTIME_MONOTONIC", "1");
// Define to 1 if you have the `closesocket' function.
// #undef HAVE_CLOSESOCKET
// Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function.
// #undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA
// Define to 1 if you have the <dlfcn.h> header file.
ret.defineCMacro("HAVE_DLFCN_H", "1");
// Define to 1 if you have the <errno.h> header file.
ret.defineCMacro("HAVE_ERRNO_H", "1");
// Define to 1 if you have the fcntl function.
ret.defineCMacro("HAVE_FCNTL", "1");
// Define to 1 if you have the <fcntl.h> header file.
ret.defineCMacro("HAVE_FCNTL_H", "1");
// Define to 1 if you have a working fcntl O_NONBLOCK function.
ret.defineCMacro("HAVE_FCNTL_O_NONBLOCK", "1");
// Define to 1 if you have the freeaddrinfo function.
ret.defineCMacro("HAVE_FREEADDRINFO", "1");
// Define to 1 if you have the ftruncate function.
ret.defineCMacro("HAVE_FTRUNCATE", "1");
// Define to 1 if you have a working getaddrinfo function.
ret.defineCMacro("HAVE_GETADDRINFO", "1");
// Define to 1 if you have the `geteuid' function.
ret.defineCMacro("HAVE_GETEUID", "1");
// Define to 1 if you have the `getppid' function.
ret.defineCMacro("HAVE_GETPPID", "1");
// Define to 1 if you have the gethostbyname function.
ret.defineCMacro("HAVE_GETHOSTBYNAME", "1");
// Define to 1 if you have the gethostbyname_r function.
if (!target.isDarwin())
ret.defineCMacro("HAVE_GETHOSTBYNAME_R", "1");
// gethostbyname_r() takes 3 args
// #undef HAVE_GETHOSTBYNAME_R_3
// gethostbyname_r() takes 5 args
// #undef HAVE_GETHOSTBYNAME_R_5
// gethostbyname_r() takes 6 args
ret.defineCMacro("HAVE_GETHOSTBYNAME_R_6", "1");
// Define to 1 if you have the gethostname function.
ret.defineCMacro("HAVE_GETHOSTNAME", "1");
// Define to 1 if you have a working getifaddrs function.
// #undef HAVE_GETIFADDRS
// Define to 1 if you have the `getpass_r' function.
// #undef HAVE_GETPASS_R
// Define to 1 if you have the `getppid' function.
ret.defineCMacro("HAVE_GETPPID", "1");
// Define to 1 if you have the `getprotobyname' function.
ret.defineCMacro("HAVE_GETPROTOBYNAME", "1");
// Define to 1 if you have the `getpeername' function.
ret.defineCMacro("HAVE_GETPEERNAME", "1");
// Define to 1 if you have the `getsockname' function.
ret.defineCMacro("HAVE_GETSOCKNAME", "1");
// Define to 1 if you have the `if_nametoindex' function.
ret.defineCMacro("HAVE_IF_NAMETOINDEX", "1");
// Define to 1 if you have the `getpwuid' function.
ret.defineCMacro("HAVE_GETPWUID", "1");
// Define to 1 if you have the `getpwuid_r' function.
ret.defineCMacro("HAVE_GETPWUID_R", "1");
// Define to 1 if you have the `getrlimit' function.
ret.defineCMacro("HAVE_GETRLIMIT", "1");
// Define to 1 if you have the `gettimeofday' function.
ret.defineCMacro("HAVE_GETTIMEOFDAY", "1");
// Define to 1 if you have a working glibc-style strerror_r function.
// #undef HAVE_GLIBC_STRERROR_R
// Define to 1 if you have a working gmtime_r function.
ret.defineCMacro("HAVE_GMTIME_R", "1");
// if you have the gssapi libraries
// #undef HAVE_GSSAPI
// Define to 1 if you have the <gssapi/gssapi_generic.h> header file.
// #undef HAVE_GSSAPI_GSSAPI_GENERIC_H
// Define to 1 if you have the <gssapi/gssapi.h> header file.
// #undef HAVE_GSSAPI_GSSAPI_H
// Define to 1 if you have the <gssapi/gssapi_krb5.h> header file.
// #undef HAVE_GSSAPI_GSSAPI_KRB5_H
// if you have the GNU gssapi libraries
// #undef HAVE_GSSGNU
// if you have the Heimdal gssapi libraries
// #undef HAVE_GSSHEIMDAL
// if you have the MIT gssapi libraries
// #undef HAVE_GSSMIT
// Define to 1 if you have the `idna_strerror' function.
// #undef HAVE_IDNA_STRERROR
// Define to 1 if you have the `idn_free' function.
// #undef HAVE_IDN_FREE
// Define to 1 if you have the <idn-free.h> header file.
// #undef HAVE_IDN_FREE_H
// Define to 1 if you have the <ifaddrs.h> header file.
ret.defineCMacro("HAVE_IFADDRS_H", "1");
// Define to 1 if you have the `inet_addr' function.
ret.defineCMacro("HAVE_INET_ADDR", "1");
// Define to 1 if you have a IPv6 capable working inet_ntop function.
// #undef HAVE_INET_NTOP
// Define to 1 if you have a IPv6 capable working inet_pton function.
ret.defineCMacro("HAVE_INET_PTON", "1");
// Define to 1 if symbol `sa_family_t' exists
ret.defineCMacro("HAVE_SA_FAMILY_T", "1");
// Define to 1 if symbol `ADDRESS_FAMILY' exists
// #undef HAVE_ADDRESS_FAMILY
// Define to 1 if you have the <inttypes.h> header file.
ret.defineCMacro("HAVE_INTTYPES_H", "1");
// Define to 1 if you have the ioctl function.
ret.defineCMacro("HAVE_IOCTL", "1");
// Define to 1 if you have the ioctlsocket function.
// #undef HAVE_IOCTLSOCKET
// Define to 1 if you have the IoctlSocket camel case function.
// #undef HAVE_IOCTLSOCKET_CAMEL
// Define to 1 if you have a working IoctlSocket camel case FIONBIO function.
// #undef HAVE_IOCTLSOCKET_CAMEL_FIONBIO
// Define to 1 if you have a working ioctlsocket FIONBIO function.
// #undef HAVE_IOCTLSOCKET_FIONBIO
// Define to 1 if you have a working ioctl FIONBIO function.
ret.defineCMacro("HAVE_IOCTL_FIONBIO", "1");
// Define to 1 if you have a working ioctl SIOCGIFADDR function.
ret.defineCMacro("HAVE_IOCTL_SIOCGIFADDR", "1");
// Define to 1 if you have the <io.h> header file.
// #undef HAVE_IO_H
// if you have the Kerberos4 libraries (including -ldes)
// #undef HAVE_KRB4
// Define to 1 if you have the `krb_get_our_ip_for_realm' function.
// #undef HAVE_KRB_GET_OUR_IP_FOR_REALM
// Define to 1 if you have the <krb.h> header file.
// #undef HAVE_KRB_H
// Define to 1 if you have the lber.h header file.
// #undef HAVE_LBER_H
// Define to 1 if you have the ldapssl.h header file.
// #undef HAVE_LDAPSSL_H
// Define to 1 if you have the ldap.h header file.
// #undef HAVE_LDAP_H
// Use LDAPS implementation
// #undef HAVE_LDAP_SSL
// Define to 1 if you have the ldap_ssl.h header file.
// #undef HAVE_LDAP_SSL_H
// Define to 1 if you have the `ldap_url_parse' function.
ret.defineCMacro("HAVE_LDAP_URL_PARSE", "1");
// Define to 1 if you have the <libgen.h> header file.
ret.defineCMacro("HAVE_LIBGEN_H", "1");
// Define to 1 if you have the `idn2' library (-lidn2).
// #undef HAVE_LIBIDN2
// Define to 1 if you have the idn2.h header file.
ret.defineCMacro("HAVE_IDN2_H", "1");
// Define to 1 if you have the `resolv' library (-lresolv).
// #undef HAVE_LIBRESOLV
// Define to 1 if you have the `resolve' library (-lresolve).
// #undef HAVE_LIBRESOLVE
// Define to 1 if you have the `socket' library (-lsocket).
// #undef HAVE_LIBSOCKET
// if brotli is available
// #undef HAVE_BROTLI
// if zstd is available
// #undef HAVE_ZSTD
// if your compiler supports LL
ret.defineCMacro("HAVE_LL", "1");
// Define to 1 if you have the <locale.h> header file.
ret.defineCMacro("HAVE_LOCALE_H", "1");
// Define to 1 if you have a working localtime_r function.
ret.defineCMacro("HAVE_LOCALTIME_R", "1");
// Define to 1 if the compiler supports the 'long long' data type.
ret.defineCMacro("HAVE_LONGLONG", "1");
// Define to 1 if you have the malloc.h header file.
ret.defineCMacro("HAVE_MALLOC_H", "1");
// Define to 1 if you have the <memory.h> header file.
ret.defineCMacro("HAVE_MEMORY_H", "1");
// Define to 1 if you have the MSG_NOSIGNAL flag.
if (!target.isDarwin())
ret.defineCMacro("HAVE_MSG_NOSIGNAL", "1");
// Define to 1 if you have the <netdb.h> header file.
ret.defineCMacro("HAVE_NETDB_H", "1");
// Define to 1 if you have the <netinet/in.h> header file.
ret.defineCMacro("HAVE_NETINET_IN_H", "1");
// Define to 1 if you have the <netinet/tcp.h> header file.
ret.defineCMacro("HAVE_NETINET_TCP_H", "1");
// Define to 1 if you have the <linux/tcp.h> header file.
if (target.isLinux())
ret.defineCMacro("HAVE_LINUX_TCP_H", "1");
// Define to 1 if you have the <net/if.h> header file.
ret.defineCMacro("HAVE_NET_IF_H", "1");
// Define to 1 if NI_WITHSCOPEID exists and works.
// #undef HAVE_NI_WITHSCOPEID
// if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE
// #undef HAVE_OLD_GSSMIT
// Define to 1 if you have the <pem.h> header file.
// #undef HAVE_PEM_H
// Define to 1 if you have the `pipe' function.
ret.defineCMacro("HAVE_PIPE", "1");
// Define to 1 if you have a working poll function.
ret.defineCMacro("HAVE_POLL", "1");
// If you have a fine poll
ret.defineCMacro("HAVE_POLL_FINE", "1");
// Define to 1 if you have the <poll.h> header file.
ret.defineCMacro("HAVE_POLL_H", "1");
// Define to 1 if you have a working POSIX-style strerror_r function.
ret.defineCMacro("HAVE_POSIX_STRERROR_R", "1");
// Define to 1 if you have the <pthread.h> header file
ret.defineCMacro("HAVE_PTHREAD_H", "1");
// Define to 1 if you have the <pwd.h> header file.
ret.defineCMacro("HAVE_PWD_H", "1");
// Define to 1 if you have the `RAND_egd' function.
// #undef HAVE_RAND_EGD
// Define to 1 if you have the `RAND_screen' function.
// #undef HAVE_RAND_SCREEN
// Define to 1 if you have the `RAND_status' function.
// #undef HAVE_RAND_STATUS
// Define to 1 if you have the recv function.
ret.defineCMacro("HAVE_RECV", "1");
// Define to 1 if you have the recvfrom function.
// #undef HAVE_RECVFROM
// Define to 1 if you have the select function.
ret.defineCMacro("HAVE_SELECT", "1");
// Define to 1 if you have the send function.
ret.defineCMacro("HAVE_SEND", "1");
// Define to 1 if you have the 'fsetxattr' function.
ret.defineCMacro("HAVE_FSETXATTR", "1");
// fsetxattr() takes 5 args
ret.defineCMacro("HAVE_FSETXATTR_5", "1");
// fsetxattr() takes 6 args
// #undef HAVE_FSETXATTR_6
// Define to 1 if you have the <setjmp.h> header file.
ret.defineCMacro("HAVE_SETJMP_H", "1");
// Define to 1 if you have the `setlocale' function.
ret.defineCMacro("HAVE_SETLOCALE", "1");
// Define to 1 if you have the `setmode' function.
// #undef HAVE_SETMODE
// Define to 1 if you have the `setrlimit' function.
ret.defineCMacro("HAVE_SETRLIMIT", "1");
// Define to 1 if you have the setsockopt function.
ret.defineCMacro("HAVE_SETSOCKOPT", "1");
// Define to 1 if you have a working setsockopt SO_NONBLOCK function.
// #undef HAVE_SETSOCKOPT_SO_NONBLOCK
// Define to 1 if you have the sigaction function.
ret.defineCMacro("HAVE_SIGACTION", "1");
// Define to 1 if you have the siginterrupt function.
ret.defineCMacro("HAVE_SIGINTERRUPT", "1");
// Define to 1 if you have the signal function.
ret.defineCMacro("HAVE_SIGNAL", "1");
// Define to 1 if you have the <signal.h> header file.
ret.defineCMacro("HAVE_SIGNAL_H", "1");
// Define to 1 if you have the sigsetjmp function or macro.
ret.defineCMacro("HAVE_SIGSETJMP", "1");
// Define to 1 if struct sockaddr_in6 has the sin6_scope_id member
ret.defineCMacro("HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID", "1");
// Define to 1 if you have the `socket' function.
ret.defineCMacro("HAVE_SOCKET", "1");
// Define to 1 if you have the <stdbool.h> header file.
ret.defineCMacro("HAVE_STDBOOL_H", "1");
// Define to 1 if you have the <stdint.h> header file.
ret.defineCMacro("HAVE_STDINT_H", "1");
// Define to 1 if you have the <stdio.h> header file.
ret.defineCMacro("HAVE_STDIO_H", "1");
// Define to 1 if you have the <stdlib.h> header file.
ret.defineCMacro("HAVE_STDLIB_H", "1");
// Define to 1 if you have the strcasecmp function.
ret.defineCMacro("HAVE_STRCASECMP", "1");
// Define to 1 if you have the strcasestr function.
// #undef HAVE_STRCASESTR
// Define to 1 if you have the strcmpi function.
// #undef HAVE_STRCMPI
// Define to 1 if you have the strdup function.
ret.defineCMacro("HAVE_STRDUP", "1");
// Define to 1 if you have the strerror_r function.
ret.defineCMacro("HAVE_STRERROR_R", "1");
// Define to 1 if you have the stricmp function.
// #undef HAVE_STRICMP
// Define to 1 if you have the <strings.h> header file.
ret.defineCMacro("HAVE_STRINGS_H", "1");
// Define to 1 if you have the <string.h> header file.
ret.defineCMacro("HAVE_STRING_H", "1");
// Define to 1 if you have the strncmpi function.
// #undef HAVE_STRNCMPI
// Define to 1 if you have the strnicmp function.
// #undef HAVE_STRNICMP
// Define to 1 if you have the <stropts.h> header file.
// #undef HAVE_STROPTS_H
// Define to 1 if you have the strstr function.
ret.defineCMacro("HAVE_STRSTR", "1");
// Define to 1 if you have the strtok_r function.
ret.defineCMacro("HAVE_STRTOK_R", "1");
// Define to 1 if you have the strtoll function.
ret.defineCMacro("HAVE_STRTOLL", "1");
// if struct sockaddr_storage is defined
ret.defineCMacro("HAVE_STRUCT_SOCKADDR_STORAGE", "1");
// Define to 1 if you have the timeval struct.
ret.defineCMacro("HAVE_STRUCT_TIMEVAL", "1");
// Define to 1 if you have the <sys/filio.h> header file.
// #undef HAVE_SYS_FILIO_H
// Define to 1 if you have the <sys/ioctl.h> header file.
ret.defineCMacro("HAVE_SYS_IOCTL_H", "1");
// Define to 1 if you have the <sys/param.h> header file.
ret.defineCMacro("HAVE_SYS_PARAM_H", "1");
// Define to 1 if you have the <sys/poll.h> header file.
ret.defineCMacro("HAVE_SYS_POLL_H", "1");
// Define to 1 if you have the <sys/resource.h> header file.
ret.defineCMacro("HAVE_SYS_RESOURCE_H", "1");
// Define to 1 if you have the <sys/select.h> header file.
ret.defineCMacro("HAVE_SYS_SELECT_H", "1");
// Define to 1 if you have the <sys/socket.h> header file.
ret.defineCMacro("HAVE_SYS_SOCKET_H", "1");
// Define to 1 if you have the <sys/sockio.h> header file.
// #undef HAVE_SYS_SOCKIO_H
// Define to 1 if you have the <sys/stat.h> header file.
ret.defineCMacro("HAVE_SYS_STAT_H", "1");
// Define to 1 if you have the <sys/time.h> header file.
ret.defineCMacro("HAVE_SYS_TIME_H", "1");
// Define to 1 if you have the <sys/types.h> header file.
ret.defineCMacro("HAVE_SYS_TYPES_H", "1");
// Define to 1 if you have the <sys/uio.h> header file.
ret.defineCMacro("HAVE_SYS_UIO_H", "1");
// Define to 1 if you have the <sys/un.h> header file.
ret.defineCMacro("HAVE_SYS_UN_H", "1");
// Define to 1 if you have the <sys/utime.h> header file.
// #undef HAVE_SYS_UTIME_H
// Define to 1 if you have the <termios.h> header file.
ret.defineCMacro("HAVE_TERMIOS_H", "1");
// Define to 1 if you have the <termio.h> header file.
ret.defineCMacro("HAVE_TERMIO_H", "1");
// Define to 1 if you have the <time.h> header file.
ret.defineCMacro("HAVE_TIME_H", "1");
// Define to 1 if you have the <tld.h> header file.
// #undef HAVE_TLD_H
// Define to 1 if you have the `tld_strerror' function.
// #undef HAVE_TLD_STRERROR
// Define to 1 if you have the `uname' function.
ret.defineCMacro("HAVE_UNAME", "1");
// Define to 1 if you have the <unistd.h> header file.
ret.defineCMacro("HAVE_UNISTD_H", "1");
// Define to 1 if you have the `utime' function.
ret.defineCMacro("HAVE_UTIME", "1");
// Define to 1 if you have the `utimes' function.
ret.defineCMacro("HAVE_UTIMES", "1");
// Define to 1 if you have the <utime.h> header file.
ret.defineCMacro("HAVE_UTIME_H", "1");
// Define to 1 if compiler supports C99 variadic macro style.
ret.defineCMacro("HAVE_VARIADIC_MACROS_C99", "1");
// Define to 1 if compiler supports old gcc variadic macro style.
ret.defineCMacro("HAVE_VARIADIC_MACROS_GCC", "1");
// Define to 1 if you have the winber.h header file.
// #undef HAVE_WINBER_H
// Define to 1 if you have the windows.h header file.
// #undef HAVE_WINDOWS_H
// Define to 1 if you have the winldap.h header file.
// #undef HAVE_WINLDAP_H
// Define to 1 if you have the winsock2.h header file.
// #undef HAVE_WINSOCK2_H
// Define this symbol if your OS supports changing the contents of argv
// #undef HAVE_WRITABLE_ARGV
// Define to 1 if you have the writev function.
// #undef HAVE_WRITEV
// Define to 1 if you have the ws2tcpip.h header file.
// #undef HAVE_WS2TCPIP_H
// Define to 1 if you have the <x509.h> header file.
// #undef HAVE_X509_H
// Define if you have the <process.h> header file.
// #undef HAVE_PROCESS_H
// Define to the sub-directory in which libtool stores uninstalled libraries.
// #undef LT_OBJDIR
// If you lack a fine basename() prototype
// #undef NEED_BASENAME_PROTO
// Define to 1 if you need the lber.h header file even with ldap.h
// #undef NEED_LBER_H
// Define to 1 if you need the malloc.h header file even with stdlib.h
// #undef NEED_MALLOC_H
// Define to 1 if _REENTRANT preprocessor symbol must be defined.
// #undef NEED_REENTRANT
// cpu-machine-OS
ret.defineCMacro("OS", "\"Linux\"");
// Name of package
// #undef PACKAGE
// Define to the address where bug reports for this package should be sent.
// #undef PACKAGE_BUGREPORT
// Define to the full name of this package.
// #undef PACKAGE_NAME
// Define to the full name and version of this package.
// #undef PACKAGE_STRING
// Define to the one symbol short name of this package.
// #undef PACKAGE_TARNAME
// Define to the version of this package.
// #undef PACKAGE_VERSION
// a suitable file to read random data from
ret.defineCMacro("RANDOM_FILE", "\"/dev/urandom\"");
// Define to the type of arg 1 for recvfrom.
// #undef RECVFROM_TYPE_ARG1
// Define to the type pointed by arg 2 for recvfrom.
// #undef RECVFROM_TYPE_ARG2
// Define to 1 if the type pointed by arg 2 for recvfrom is void.
// #undef RECVFROM_TYPE_ARG2_IS_VOID
// Define to the type of arg 3 for recvfrom.
// #undef RECVFROM_TYPE_ARG3
// Define to the type of arg 4 for recvfrom.
// #undef RECVFROM_TYPE_ARG4
// Define to the type pointed by arg 5 for recvfrom.
// #undef RECVFROM_TYPE_ARG5
// Define to 1 if the type pointed by arg 5 for recvfrom is void.
// #undef RECVFROM_TYPE_ARG5_IS_VOID
// Define to the type pointed by arg 6 for recvfrom.
// #undef RECVFROM_TYPE_ARG6
// Define to 1 if the type pointed by arg 6 for recvfrom is void.
// #undef RECVFROM_TYPE_ARG6_IS_VOID
// Define to the function return type for recvfrom.
// #undef RECVFROM_TYPE_RETV
// Define to the type of arg 1 for recv.
ret.defineCMacro("RECV_TYPE_ARG1", "int");
// Define to the type of arg 2 for recv.
ret.defineCMacro("RECV_TYPE_ARG2", "void *");
// Define to the type of arg 3 for recv.
ret.defineCMacro("RECV_TYPE_ARG3", "size_t");
// Define to the type of arg 4 for recv.
ret.defineCMacro("RECV_TYPE_ARG4", "int");
// Define to the function return type for recv.
ret.defineCMacro("RECV_TYPE_RETV", "ssize_t");
// Define to the type qualifier of arg 5 for select.
// #undef SELECT_QUAL_ARG5
// Define to the type of arg 1 for select.
// #undef SELECT_TYPE_ARG1
// Define to the type of args 2, 3 and 4 for select.
// #undef SELECT_TYPE_ARG234
// Define to the type of arg 5 for select.
// #undef SELECT_TYPE_ARG5
// Define to the function return type for select.
// #undef SELECT_TYPE_RETV
// Define to the type qualifier of arg 2 for send.
ret.defineCMacro("SEND_QUAL_ARG2", "const");
// Define to the type of arg 1 for send.
ret.defineCMacro("SEND_TYPE_ARG1", "int");
// Define to the type of arg 2 for send.
ret.defineCMacro("SEND_TYPE_ARG2", "void *");
// Define to the type of arg 3 for send.
ret.defineCMacro("SEND_TYPE_ARG3", "size_t");
// Define to the type of arg 4 for send.
ret.defineCMacro("SEND_TYPE_ARG4", "int");
// Define to the function return type for send.
ret.defineCMacro("SEND_TYPE_RETV", "ssize_t");
// Note: SIZEOF_* variables are fetched with CMake through check_type_size().
// As per CMake documentation on CheckTypeSize, C preprocessor code is
// generated by CMake into SIZEOF_*_CODE. This is what we use in the
// following statements.
//
// Reference: https://cmake.org/cmake/help/latest/module/CheckTypeSize.html
// The size of `int', as computed by sizeof.
ret.defineCMacro("SIZEOF_INT", "4");
// The size of `short', as computed by sizeof.
ret.defineCMacro("SIZEOF_SHORT", "2");
// The size of `long', as computed by sizeof.
ret.defineCMacro("SIZEOF_LONG", "8");
// The size of `off_t', as computed by sizeof.
ret.defineCMacro("SIZEOF_OFF_T", "8");
// The size of `curl_off_t', as computed by sizeof.
ret.defineCMacro("SIZEOF_CURL_OFF_T", "8");
// The size of `size_t', as computed by sizeof.
ret.defineCMacro("SIZEOF_SIZE_T", "8");
// The size of `time_t', as computed by sizeof.
ret.defineCMacro("SIZEOF_TIME_T", "8");
// Define to 1 if you have the ANSI C header files.
ret.defineCMacro("STDC_HEADERS", "1");
// Define to the type of arg 3 for strerror_r.
// #undef STRERROR_R_TYPE_ARG3
// Define to 1 if you can safely include both <sys/time.h> and <time.h>.
ret.defineCMacro("TIME_WITH_SYS_TIME", "1");
// Define if you want to enable c-ares support
// #undef USE_ARES
// Define if you want to enable POSIX threaded DNS lookup
ret.defineCMacro("USE_THREADS_POSIX", "1");
// if libSSH2 is in use
ret.defineCMacro("USE_LIBSSH2", "1");
// If you want to build curl with the built-in manual
// #undef USE_MANUAL
// if NSS is enabled
// #undef USE_NSS
// if you have the PK11_CreateManagedGenericObject function
// #undef HAVE_PK11_CREATEMANAGEDGENERICOBJECT
// if you want to use OpenLDAP code instead of legacy ldap implementation
// #undef USE_OPENLDAP
// to enable NGHTTP2
// #undef USE_NGHTTP2
// to enable NGTCP2
// #undef USE_NGTCP2
// to enable NGHTTP3
// #undef USE_NGHTTP3
// to enable quiche
// #undef USE_QUICHE
// Define to 1 if you have the quiche_conn_set_qlog_fd function.
// #undef HAVE_QUICHE_CONN_SET_QLOG_FD
// if Unix domain sockets are enabled
ret.defineCMacro("USE_UNIX_SOCKETS", null);
// Define to 1 if you are building a Windows target with large file support.
// #undef USE_WIN32_LARGE_FILES
// to enable SSPI support
// #undef USE_WINDOWS_SSPI
// to enable Windows SSL
// #undef USE_SCHANNEL
// enable multiple SSL backends
// #undef CURL_WITH_MULTI_SSL
// Define to 1 if using yaSSL in OpenSSL compatibility mode.
// #undef USE_YASSLEMUL
// Version number of package
// #undef VERSION
// Define to 1 if OS is AIX.
//#ifndef _ALL_SOURCE
//# undef _ALL_SOURCE
//#endif
// Number of bits in a file offset, on hosts where this is settable.
ret.defineCMacro("_FILE_OFFSET_BITS", "64");
// Define for large files, on AIX-style hosts.
// #undef _LARGE_FILES
// define this if you need it to compile thread-safe code
// #undef _THREAD_SAFE
// Define to empty if `const' does not conform to ANSI C.
// #undef const
// Type to use in place of in_addr_t when system does not provide it.
// #undef in_addr_t
// Define to `__inline__' or `__inline' if that's what the C compiler
// calls it, or to nothing if 'inline' is not supported under any name.
//#ifndef __cplusplus
//#undef inline
//#endif
// Define to `unsigned int' if <sys/types.h> does not define.
// #undef size_t