开源 企业版 高校版 私有云 模力方舟 AI 队友
代码拉取完成,页面将自动刷新
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
已有帐号? 立即登录
文件
master
分支 (35)
标签 (692)
master
create-or-update-pull-request-action
reentrancy-huh
v17.x
v17.x-staging
v16.x-staging
v16.x
v14.18.0-proposal
v14.x-staging
configure.py-str.endswith-takes-a-tuple
v12.x-staging
v12.x
v14.x
canary-base
v16.6.1-proposal
v10.x
v10.x-staging
v15.x
shared_handle
v13.x
v16.9.1
v16.9.0
v12.22.6
v14.17.6
v16.8.0
v16.7.0
v16.6.2
v14.17.5
v12.22.5
v16.6.1
v16.6.0
v14.17.4
v12.22.4
v16.5.0
v14.17.3
v12.22.3
v16.4.2
v14.17.2
v12.22.2
v16.4.1
master
分支 (35)
标签 (692)
master
create-or-update-pull-request-action
reentrancy-huh
v17.x
v17.x-staging
v16.x-staging
v16.x
v14.18.0-proposal
v14.x-staging
configure.py-str.endswith-takes-a-tuple
v12.x-staging
v12.x
v14.x
canary-base
v16.6.1-proposal
v10.x
v10.x-staging
v15.x
shared_handle
v13.x
v16.9.1
v16.9.0
v12.22.6
v14.17.6
v16.8.0
v16.7.0
v16.6.2
v14.17.5
v12.22.5
v16.6.1
v16.6.0
v14.17.4
v12.22.4
v16.5.0
v14.17.3
v12.22.3
v16.4.2
v14.17.2
v12.22.2
v16.4.1
克隆/下载
克隆/下载
提示
下载代码请复制以下命令到终端执行
为确保你提交的代码身份被 Gitee 正确识别,请执行以下命令完成配置
初次使用 SSH 协议进行代码克隆、推送等操作时,需按下述提示完成 SSH 配置
1 生成 RSA 密钥
2 获取 RSA 公钥内容,并配置到 SSH公钥
在 Gitee 上使用 SVN,请访问 使用指南
使用 HTTPS 协议时,命令行会出现如下账号密码验证步骤。基于安全考虑,Gitee 建议 配置并使用私人令牌 替代登录密码进行克隆、推送等操作
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # 私人令牌
master
分支 (35)
标签 (692)
master
create-or-update-pull-request-action
reentrancy-huh
v17.x
v17.x-staging
v16.x-staging
v16.x
v14.18.0-proposal
v14.x-staging
configure.py-str.endswith-takes-a-tuple
v12.x-staging
v12.x
v14.x
canary-base
v16.6.1-proposal
v10.x
v10.x-staging
v15.x
shared_handle
v13.x
v16.9.1
v16.9.0
v12.22.6
v14.17.6
v16.8.0
v16.7.0
v16.6.2
v14.17.5
v12.22.5
v16.6.1
v16.6.0
v14.17.4
v12.22.4
v16.5.0
v14.17.3
v12.22.3
v16.4.2
v14.17.2
v12.22.2
v16.4.1
node
/
src
/
node_constants.cc
node
/
src
/
node_constants.cc
node_constants.cc 30.58 KB
一键复制 编辑 原始数据 按行查看 历史
Mateusz Krawczuk 提交于 2020年06月17日 23:29 +08:00 . crypto: add OP flag constants added in OpenSSL v1.1.1
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 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "env-inl.h"
#include "node_constants.h"
#include "node_internals.h"
#include "util-inl.h"
#include "zlib.h"
#if !defined(_MSC_VER)
#include <unistd.h>
#endif
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#if HAVE_OPENSSL
#include <openssl/ec.h>
#include <openssl/ssl.h>
#ifndef OPENSSL_NO_ENGINE
#include <openssl/engine.h>
#endif // !OPENSSL_NO_ENGINE
#endif // HAVE_OPENSSL
#if defined(__POSIX__)
#include <dlfcn.h>
#endif
#include <cerrno>
#include <csignal>
#include <limits>
namespace node {
using v8::Local;
using v8::Object;
namespace {
void DefineErrnoConstants(Local<Object> target) {
#ifdef E2BIG
NODE_DEFINE_CONSTANT(target, E2BIG);
#endif
#ifdef EACCES
NODE_DEFINE_CONSTANT(target, EACCES);
#endif
#ifdef EADDRINUSE
NODE_DEFINE_CONSTANT(target, EADDRINUSE);
#endif
#ifdef EADDRNOTAVAIL
NODE_DEFINE_CONSTANT(target, EADDRNOTAVAIL);
#endif
#ifdef EAFNOSUPPORT
NODE_DEFINE_CONSTANT(target, EAFNOSUPPORT);
#endif
#ifdef EAGAIN
NODE_DEFINE_CONSTANT(target, EAGAIN);
#endif
#ifdef EALREADY
NODE_DEFINE_CONSTANT(target, EALREADY);
#endif
#ifdef EBADF
NODE_DEFINE_CONSTANT(target, EBADF);
#endif
#ifdef EBADMSG
NODE_DEFINE_CONSTANT(target, EBADMSG);
#endif
#ifdef EBUSY
NODE_DEFINE_CONSTANT(target, EBUSY);
#endif
#ifdef ECANCELED
NODE_DEFINE_CONSTANT(target, ECANCELED);
#endif
#ifdef ECHILD
NODE_DEFINE_CONSTANT(target, ECHILD);
#endif
#ifdef ECONNABORTED
NODE_DEFINE_CONSTANT(target, ECONNABORTED);
#endif
#ifdef ECONNREFUSED
NODE_DEFINE_CONSTANT(target, ECONNREFUSED);
#endif
#ifdef ECONNRESET
NODE_DEFINE_CONSTANT(target, ECONNRESET);
#endif
#ifdef EDEADLK
NODE_DEFINE_CONSTANT(target, EDEADLK);
#endif
#ifdef EDESTADDRREQ
NODE_DEFINE_CONSTANT(target, EDESTADDRREQ);
#endif
#ifdef EDOM
NODE_DEFINE_CONSTANT(target, EDOM);
#endif
#ifdef EDQUOT
NODE_DEFINE_CONSTANT(target, EDQUOT);
#endif
#ifdef EEXIST
NODE_DEFINE_CONSTANT(target, EEXIST);
#endif
#ifdef EFAULT
NODE_DEFINE_CONSTANT(target, EFAULT);
#endif
#ifdef EFBIG
NODE_DEFINE_CONSTANT(target, EFBIG);
#endif
#ifdef EHOSTUNREACH
NODE_DEFINE_CONSTANT(target, EHOSTUNREACH);
#endif
#ifdef EIDRM
NODE_DEFINE_CONSTANT(target, EIDRM);
#endif
#ifdef EILSEQ
NODE_DEFINE_CONSTANT(target, EILSEQ);
#endif
#ifdef EINPROGRESS
NODE_DEFINE_CONSTANT(target, EINPROGRESS);
#endif
#ifdef EINTR
NODE_DEFINE_CONSTANT(target, EINTR);
#endif
#ifdef EINVAL
NODE_DEFINE_CONSTANT(target, EINVAL);
#endif
#ifdef EIO
NODE_DEFINE_CONSTANT(target, EIO);
#endif
#ifdef EISCONN
NODE_DEFINE_CONSTANT(target, EISCONN);
#endif
#ifdef EISDIR
NODE_DEFINE_CONSTANT(target, EISDIR);
#endif
#ifdef ELOOP
NODE_DEFINE_CONSTANT(target, ELOOP);
#endif
#ifdef EMFILE
NODE_DEFINE_CONSTANT(target, EMFILE);
#endif
#ifdef EMLINK
NODE_DEFINE_CONSTANT(target, EMLINK);
#endif
#ifdef EMSGSIZE
NODE_DEFINE_CONSTANT(target, EMSGSIZE);
#endif
#ifdef EMULTIHOP
NODE_DEFINE_CONSTANT(target, EMULTIHOP);
#endif
#ifdef ENAMETOOLONG
NODE_DEFINE_CONSTANT(target, ENAMETOOLONG);
#endif
#ifdef ENETDOWN
NODE_DEFINE_CONSTANT(target, ENETDOWN);
#endif
#ifdef ENETRESET
NODE_DEFINE_CONSTANT(target, ENETRESET);
#endif
#ifdef ENETUNREACH
NODE_DEFINE_CONSTANT(target, ENETUNREACH);
#endif
#ifdef ENFILE
NODE_DEFINE_CONSTANT(target, ENFILE);
#endif
#ifdef ENOBUFS
NODE_DEFINE_CONSTANT(target, ENOBUFS);
#endif
#ifdef ENODATA
NODE_DEFINE_CONSTANT(target, ENODATA);
#endif
#ifdef ENODEV
NODE_DEFINE_CONSTANT(target, ENODEV);
#endif
#ifdef ENOENT
NODE_DEFINE_CONSTANT(target, ENOENT);
#endif
#ifdef ENOEXEC
NODE_DEFINE_CONSTANT(target, ENOEXEC);
#endif
#ifdef ENOLCK
NODE_DEFINE_CONSTANT(target, ENOLCK);
#endif
#ifdef ENOLINK
NODE_DEFINE_CONSTANT(target, ENOLINK);
#endif
#ifdef ENOMEM
NODE_DEFINE_CONSTANT(target, ENOMEM);
#endif
#ifdef ENOMSG
NODE_DEFINE_CONSTANT(target, ENOMSG);
#endif
#ifdef ENOPROTOOPT
NODE_DEFINE_CONSTANT(target, ENOPROTOOPT);
#endif
#ifdef ENOSPC
NODE_DEFINE_CONSTANT(target, ENOSPC);
#endif
#ifdef ENOSR
NODE_DEFINE_CONSTANT(target, ENOSR);
#endif
#ifdef ENOSTR
NODE_DEFINE_CONSTANT(target, ENOSTR);
#endif
#ifdef ENOSYS
NODE_DEFINE_CONSTANT(target, ENOSYS);
#endif
#ifdef ENOTCONN
NODE_DEFINE_CONSTANT(target, ENOTCONN);
#endif
#ifdef ENOTDIR
NODE_DEFINE_CONSTANT(target, ENOTDIR);
#endif
#ifdef ENOTEMPTY
NODE_DEFINE_CONSTANT(target, ENOTEMPTY);
#endif
#ifdef ENOTSOCK
NODE_DEFINE_CONSTANT(target, ENOTSOCK);
#endif
#ifdef ENOTSUP
NODE_DEFINE_CONSTANT(target, ENOTSUP);
#endif
#ifdef ENOTTY
NODE_DEFINE_CONSTANT(target, ENOTTY);
#endif
#ifdef ENXIO
NODE_DEFINE_CONSTANT(target, ENXIO);
#endif
#ifdef EOPNOTSUPP
NODE_DEFINE_CONSTANT(target, EOPNOTSUPP);
#endif
#ifdef EOVERFLOW
NODE_DEFINE_CONSTANT(target, EOVERFLOW);
#endif
#ifdef EPERM
NODE_DEFINE_CONSTANT(target, EPERM);
#endif
#ifdef EPIPE
NODE_DEFINE_CONSTANT(target, EPIPE);
#endif
#ifdef EPROTO
NODE_DEFINE_CONSTANT(target, EPROTO);
#endif
#ifdef EPROTONOSUPPORT
NODE_DEFINE_CONSTANT(target, EPROTONOSUPPORT);
#endif
#ifdef EPROTOTYPE
NODE_DEFINE_CONSTANT(target, EPROTOTYPE);
#endif
#ifdef ERANGE
NODE_DEFINE_CONSTANT(target, ERANGE);
#endif
#ifdef EROFS
NODE_DEFINE_CONSTANT(target, EROFS);
#endif
#ifdef ESPIPE
NODE_DEFINE_CONSTANT(target, ESPIPE);
#endif
#ifdef ESRCH
NODE_DEFINE_CONSTANT(target, ESRCH);
#endif
#ifdef ESTALE
NODE_DEFINE_CONSTANT(target, ESTALE);
#endif
#ifdef ETIME
NODE_DEFINE_CONSTANT(target, ETIME);
#endif
#ifdef ETIMEDOUT
NODE_DEFINE_CONSTANT(target, ETIMEDOUT);
#endif
#ifdef ETXTBSY
NODE_DEFINE_CONSTANT(target, ETXTBSY);
#endif
#ifdef EWOULDBLOCK
NODE_DEFINE_CONSTANT(target, EWOULDBLOCK);
#endif
#ifdef EXDEV
NODE_DEFINE_CONSTANT(target, EXDEV);
#endif
}
void DefineWindowsErrorConstants(Local<Object> target) {
#ifdef WSAEINTR
NODE_DEFINE_CONSTANT(target, WSAEINTR);
#endif
#ifdef WSAEBADF
NODE_DEFINE_CONSTANT(target, WSAEBADF);
#endif
#ifdef WSAEACCES
NODE_DEFINE_CONSTANT(target, WSAEACCES);
#endif
#ifdef WSAEFAULT
NODE_DEFINE_CONSTANT(target, WSAEFAULT);
#endif
#ifdef WSAEINVAL
NODE_DEFINE_CONSTANT(target, WSAEINVAL);
#endif
#ifdef WSAEMFILE
NODE_DEFINE_CONSTANT(target, WSAEMFILE);
#endif
#ifdef WSAEWOULDBLOCK
NODE_DEFINE_CONSTANT(target, WSAEWOULDBLOCK);
#endif
#ifdef WSAEINPROGRESS
NODE_DEFINE_CONSTANT(target, WSAEINPROGRESS);
#endif
#ifdef WSAEALREADY
NODE_DEFINE_CONSTANT(target, WSAEALREADY);
#endif
#ifdef WSAENOTSOCK
NODE_DEFINE_CONSTANT(target, WSAENOTSOCK);
#endif
#ifdef WSAEDESTADDRREQ
NODE_DEFINE_CONSTANT(target, WSAEDESTADDRREQ);
#endif
#ifdef WSAEMSGSIZE
NODE_DEFINE_CONSTANT(target, WSAEMSGSIZE);
#endif
#ifdef WSAEPROTOTYPE
NODE_DEFINE_CONSTANT(target, WSAEPROTOTYPE);
#endif
#ifdef WSAENOPROTOOPT
NODE_DEFINE_CONSTANT(target, WSAENOPROTOOPT);
#endif
#ifdef WSAEPROTONOSUPPORT
NODE_DEFINE_CONSTANT(target, WSAEPROTONOSUPPORT);
#endif
#ifdef WSAESOCKTNOSUPPORT
NODE_DEFINE_CONSTANT(target, WSAESOCKTNOSUPPORT);
#endif
#ifdef WSAEOPNOTSUPP
NODE_DEFINE_CONSTANT(target, WSAEOPNOTSUPP);
#endif
#ifdef WSAEPFNOSUPPORT
NODE_DEFINE_CONSTANT(target, WSAEPFNOSUPPORT);
#endif
#ifdef WSAEAFNOSUPPORT
NODE_DEFINE_CONSTANT(target, WSAEAFNOSUPPORT);
#endif
#ifdef WSAEADDRINUSE
NODE_DEFINE_CONSTANT(target, WSAEADDRINUSE);
#endif
#ifdef WSAEADDRNOTAVAIL
NODE_DEFINE_CONSTANT(target, WSAEADDRNOTAVAIL);
#endif
#ifdef WSAENETDOWN
NODE_DEFINE_CONSTANT(target, WSAENETDOWN);
#endif
#ifdef WSAENETUNREACH
NODE_DEFINE_CONSTANT(target, WSAENETUNREACH);
#endif
#ifdef WSAENETRESET
NODE_DEFINE_CONSTANT(target, WSAENETRESET);
#endif
#ifdef WSAECONNABORTED
NODE_DEFINE_CONSTANT(target, WSAECONNABORTED);
#endif
#ifdef WSAECONNRESET
NODE_DEFINE_CONSTANT(target, WSAECONNRESET);
#endif
#ifdef WSAENOBUFS
NODE_DEFINE_CONSTANT(target, WSAENOBUFS);
#endif
#ifdef WSAEISCONN
NODE_DEFINE_CONSTANT(target, WSAEISCONN);
#endif
#ifdef WSAENOTCONN
NODE_DEFINE_CONSTANT(target, WSAENOTCONN);
#endif
#ifdef WSAESHUTDOWN
NODE_DEFINE_CONSTANT(target, WSAESHUTDOWN);
#endif
#ifdef WSAETOOMANYREFS
NODE_DEFINE_CONSTANT(target, WSAETOOMANYREFS);
#endif
#ifdef WSAETIMEDOUT
NODE_DEFINE_CONSTANT(target, WSAETIMEDOUT);
#endif
#ifdef WSAECONNREFUSED
NODE_DEFINE_CONSTANT(target, WSAECONNREFUSED);
#endif
#ifdef WSAELOOP
NODE_DEFINE_CONSTANT(target, WSAELOOP);
#endif
#ifdef WSAENAMETOOLONG
NODE_DEFINE_CONSTANT(target, WSAENAMETOOLONG);
#endif
#ifdef WSAEHOSTDOWN
NODE_DEFINE_CONSTANT(target, WSAEHOSTDOWN);
#endif
#ifdef WSAEHOSTUNREACH
NODE_DEFINE_CONSTANT(target, WSAEHOSTUNREACH);
#endif
#ifdef WSAENOTEMPTY
NODE_DEFINE_CONSTANT(target, WSAENOTEMPTY);
#endif
#ifdef WSAEPROCLIM
NODE_DEFINE_CONSTANT(target, WSAEPROCLIM);
#endif
#ifdef WSAEUSERS
NODE_DEFINE_CONSTANT(target, WSAEUSERS);
#endif
#ifdef WSAEDQUOT
NODE_DEFINE_CONSTANT(target, WSAEDQUOT);
#endif
#ifdef WSAESTALE
NODE_DEFINE_CONSTANT(target, WSAESTALE);
#endif
#ifdef WSAEREMOTE
NODE_DEFINE_CONSTANT(target, WSAEREMOTE);
#endif
#ifdef WSASYSNOTREADY
NODE_DEFINE_CONSTANT(target, WSASYSNOTREADY);
#endif
#ifdef WSAVERNOTSUPPORTED
NODE_DEFINE_CONSTANT(target, WSAVERNOTSUPPORTED);
#endif
#ifdef WSANOTINITIALISED
NODE_DEFINE_CONSTANT(target, WSANOTINITIALISED);
#endif
#ifdef WSAEDISCON
NODE_DEFINE_CONSTANT(target, WSAEDISCON);
#endif
#ifdef WSAENOMORE
NODE_DEFINE_CONSTANT(target, WSAENOMORE);
#endif
#ifdef WSAECANCELLED
NODE_DEFINE_CONSTANT(target, WSAECANCELLED);
#endif
#ifdef WSAEINVALIDPROCTABLE
NODE_DEFINE_CONSTANT(target, WSAEINVALIDPROCTABLE);
#endif
#ifdef WSAEINVALIDPROVIDER
NODE_DEFINE_CONSTANT(target, WSAEINVALIDPROVIDER);
#endif
#ifdef WSAEPROVIDERFAILEDINIT
NODE_DEFINE_CONSTANT(target, WSAEPROVIDERFAILEDINIT);
#endif
#ifdef WSASYSCALLFAILURE
NODE_DEFINE_CONSTANT(target, WSASYSCALLFAILURE);
#endif
#ifdef WSASERVICE_NOT_FOUND
NODE_DEFINE_CONSTANT(target, WSASERVICE_NOT_FOUND);
#endif
#ifdef WSATYPE_NOT_FOUND
NODE_DEFINE_CONSTANT(target, WSATYPE_NOT_FOUND);
#endif
#ifdef WSA_E_NO_MORE
NODE_DEFINE_CONSTANT(target, WSA_E_NO_MORE);
#endif
#ifdef WSA_E_CANCELLED
NODE_DEFINE_CONSTANT(target, WSA_E_CANCELLED);
#endif
#ifdef WSAEREFUSED
NODE_DEFINE_CONSTANT(target, WSAEREFUSED);
#endif
}
void DefineSignalConstants(Local<Object> target) {
#ifdef SIGHUP
NODE_DEFINE_CONSTANT(target, SIGHUP);
#endif
#ifdef SIGINT
NODE_DEFINE_CONSTANT(target, SIGINT);
#endif
#ifdef SIGQUIT
NODE_DEFINE_CONSTANT(target, SIGQUIT);
#endif
#ifdef SIGILL
NODE_DEFINE_CONSTANT(target, SIGILL);
#endif
#ifdef SIGTRAP
NODE_DEFINE_CONSTANT(target, SIGTRAP);
#endif
#ifdef SIGABRT
NODE_DEFINE_CONSTANT(target, SIGABRT);
#endif
#ifdef SIGIOT
NODE_DEFINE_CONSTANT(target, SIGIOT);
#endif
#ifdef SIGBUS
NODE_DEFINE_CONSTANT(target, SIGBUS);
#endif
#ifdef SIGFPE
NODE_DEFINE_CONSTANT(target, SIGFPE);
#endif
#ifdef SIGKILL
NODE_DEFINE_CONSTANT(target, SIGKILL);
#endif
#ifdef SIGUSR1
NODE_DEFINE_CONSTANT(target, SIGUSR1);
#endif
#ifdef SIGSEGV
NODE_DEFINE_CONSTANT(target, SIGSEGV);
#endif
#ifdef SIGUSR2
NODE_DEFINE_CONSTANT(target, SIGUSR2);
#endif
#ifdef SIGPIPE
NODE_DEFINE_CONSTANT(target, SIGPIPE);
#endif
#ifdef SIGALRM
NODE_DEFINE_CONSTANT(target, SIGALRM);
#endif
NODE_DEFINE_CONSTANT(target, SIGTERM);
#ifdef SIGCHLD
NODE_DEFINE_CONSTANT(target, SIGCHLD);
#endif
#ifdef SIGSTKFLT
NODE_DEFINE_CONSTANT(target, SIGSTKFLT);
#endif
#ifdef SIGCONT
NODE_DEFINE_CONSTANT(target, SIGCONT);
#endif
#ifdef SIGSTOP
NODE_DEFINE_CONSTANT(target, SIGSTOP);
#endif
#ifdef SIGTSTP
NODE_DEFINE_CONSTANT(target, SIGTSTP);
#endif
#ifdef SIGBREAK
NODE_DEFINE_CONSTANT(target, SIGBREAK);
#endif
#ifdef SIGTTIN
NODE_DEFINE_CONSTANT(target, SIGTTIN);
#endif
#ifdef SIGTTOU
NODE_DEFINE_CONSTANT(target, SIGTTOU);
#endif
#ifdef SIGURG
NODE_DEFINE_CONSTANT(target, SIGURG);
#endif
#ifdef SIGXCPU
NODE_DEFINE_CONSTANT(target, SIGXCPU);
#endif
#ifdef SIGXFSZ
NODE_DEFINE_CONSTANT(target, SIGXFSZ);
#endif
#ifdef SIGVTALRM
NODE_DEFINE_CONSTANT(target, SIGVTALRM);
#endif
#ifdef SIGPROF
NODE_DEFINE_CONSTANT(target, SIGPROF);
#endif
#ifdef SIGWINCH
NODE_DEFINE_CONSTANT(target, SIGWINCH);
#endif
#ifdef SIGIO
NODE_DEFINE_CONSTANT(target, SIGIO);
#endif
#ifdef SIGPOLL
NODE_DEFINE_CONSTANT(target, SIGPOLL);
#endif
#ifdef SIGLOST
NODE_DEFINE_CONSTANT(target, SIGLOST);
#endif
#ifdef SIGPWR
NODE_DEFINE_CONSTANT(target, SIGPWR);
#endif
#ifdef SIGINFO
NODE_DEFINE_CONSTANT(target, SIGINFO);
#endif
#ifdef SIGSYS
NODE_DEFINE_CONSTANT(target, SIGSYS);
#endif
#ifdef SIGUNUSED
NODE_DEFINE_CONSTANT(target, SIGUNUSED);
#endif
}
void DefinePriorityConstants(Local<Object> target) {
#ifdef UV_PRIORITY_LOW
# define PRIORITY_LOW UV_PRIORITY_LOW
NODE_DEFINE_CONSTANT(target, PRIORITY_LOW);
# undef PRIORITY_LOW
#endif
#ifdef UV_PRIORITY_BELOW_NORMAL
# define PRIORITY_BELOW_NORMAL UV_PRIORITY_BELOW_NORMAL
NODE_DEFINE_CONSTANT(target, PRIORITY_BELOW_NORMAL);
# undef PRIORITY_BELOW_NORMAL
#endif
#ifdef UV_PRIORITY_NORMAL
# define PRIORITY_NORMAL UV_PRIORITY_NORMAL
NODE_DEFINE_CONSTANT(target, PRIORITY_NORMAL);
# undef PRIORITY_NORMAL
#endif
#ifdef UV_PRIORITY_ABOVE_NORMAL
# define PRIORITY_ABOVE_NORMAL UV_PRIORITY_ABOVE_NORMAL
NODE_DEFINE_CONSTANT(target, PRIORITY_ABOVE_NORMAL);
# undef PRIORITY_ABOVE_NORMAL
#endif
#ifdef UV_PRIORITY_HIGH
# define PRIORITY_HIGH UV_PRIORITY_HIGH
NODE_DEFINE_CONSTANT(target, PRIORITY_HIGH);
# undef PRIORITY_HIGH
#endif
#ifdef UV_PRIORITY_HIGHEST
# define PRIORITY_HIGHEST UV_PRIORITY_HIGHEST
NODE_DEFINE_CONSTANT(target, PRIORITY_HIGHEST);
# undef PRIORITY_HIGHEST
#endif
}
void DefineCryptoConstants(Local<Object> target) {
#ifdef OPENSSL_VERSION_NUMBER
NODE_DEFINE_CONSTANT(target, OPENSSL_VERSION_NUMBER);
#endif
#ifdef SSL_OP_ALL
NODE_DEFINE_CONSTANT(target, SSL_OP_ALL);
#endif
#ifdef SSL_OP_ALLOW_NO_DHE_KEX
NODE_DEFINE_CONSTANT(target, SSL_OP_ALLOW_NO_DHE_KEX);
#endif
#ifdef SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION
NODE_DEFINE_CONSTANT(target, SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION);
#endif
#ifdef SSL_OP_CIPHER_SERVER_PREFERENCE
NODE_DEFINE_CONSTANT(target, SSL_OP_CIPHER_SERVER_PREFERENCE);
#endif
#ifdef SSL_OP_CISCO_ANYCONNECT
NODE_DEFINE_CONSTANT(target, SSL_OP_CISCO_ANYCONNECT);
#endif
#ifdef SSL_OP_COOKIE_EXCHANGE
NODE_DEFINE_CONSTANT(target, SSL_OP_COOKIE_EXCHANGE);
#endif
#ifdef SSL_OP_CRYPTOPRO_TLSEXT_BUG
NODE_DEFINE_CONSTANT(target, SSL_OP_CRYPTOPRO_TLSEXT_BUG);
#endif
#ifdef SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS
NODE_DEFINE_CONSTANT(target, SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS);
#endif
#ifdef SSL_OP_EPHEMERAL_RSA
NODE_DEFINE_CONSTANT(target, SSL_OP_EPHEMERAL_RSA);
#endif
#ifdef SSL_OP_LEGACY_SERVER_CONNECT
NODE_DEFINE_CONSTANT(target, SSL_OP_LEGACY_SERVER_CONNECT);
#endif
#ifdef SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER
NODE_DEFINE_CONSTANT(target, SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER);
#endif
#ifdef SSL_OP_MICROSOFT_SESS_ID_BUG
NODE_DEFINE_CONSTANT(target, SSL_OP_MICROSOFT_SESS_ID_BUG);
#endif
#ifdef SSL_OP_MSIE_SSLV2_RSA_PADDING
NODE_DEFINE_CONSTANT(target, SSL_OP_MSIE_SSLV2_RSA_PADDING);
#endif
#ifdef SSL_OP_NETSCAPE_CA_DN_BUG
NODE_DEFINE_CONSTANT(target, SSL_OP_NETSCAPE_CA_DN_BUG);
#endif
#ifdef SSL_OP_NETSCAPE_CHALLENGE_BUG
NODE_DEFINE_CONSTANT(target, SSL_OP_NETSCAPE_CHALLENGE_BUG);
#endif
#ifdef SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG
NODE_DEFINE_CONSTANT(target, SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG);
#endif
#ifdef SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG
NODE_DEFINE_CONSTANT(target, SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG);
#endif
#ifdef SSL_OP_NO_COMPRESSION
NODE_DEFINE_CONSTANT(target, SSL_OP_NO_COMPRESSION);
#endif
#ifdef SSL_OP_NO_ENCRYPT_THEN_MAC
NODE_DEFINE_CONSTANT(target, SSL_OP_NO_ENCRYPT_THEN_MAC);
#endif
#ifdef SSL_OP_NO_QUERY_MTU
NODE_DEFINE_CONSTANT(target, SSL_OP_NO_QUERY_MTU);
#endif
#ifdef SSL_OP_NO_RENEGOTIATION
NODE_DEFINE_CONSTANT(target, SSL_OP_NO_RENEGOTIATION);
#endif
#ifdef SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION
NODE_DEFINE_CONSTANT(target, SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION);
#endif
#ifdef SSL_OP_NO_SSLv2
NODE_DEFINE_CONSTANT(target, SSL_OP_NO_SSLv2);
#endif
#ifdef SSL_OP_NO_SSLv3
NODE_DEFINE_CONSTANT(target, SSL_OP_NO_SSLv3);
#endif
#ifdef SSL_OP_NO_TICKET
NODE_DEFINE_CONSTANT(target, SSL_OP_NO_TICKET);
#endif
#ifdef SSL_OP_NO_TLSv1
NODE_DEFINE_CONSTANT(target, SSL_OP_NO_TLSv1);
#endif
#ifdef SSL_OP_NO_TLSv1_1
NODE_DEFINE_CONSTANT(target, SSL_OP_NO_TLSv1_1);
#endif
#ifdef SSL_OP_NO_TLSv1_2
NODE_DEFINE_CONSTANT(target, SSL_OP_NO_TLSv1_2);
#endif
#ifdef SSL_OP_NO_TLSv1_3
NODE_DEFINE_CONSTANT(target, SSL_OP_NO_TLSv1_3);
#endif
#ifdef SSL_OP_PKCS1_CHECK_1
NODE_DEFINE_CONSTANT(target, SSL_OP_PKCS1_CHECK_1);
#endif
#ifdef SSL_OP_PKCS1_CHECK_2
NODE_DEFINE_CONSTANT(target, SSL_OP_PKCS1_CHECK_2);
#endif
#ifdef SSL_OP_PRIORITIZE_CHACHA
NODE_DEFINE_CONSTANT(target, SSL_OP_PRIORITIZE_CHACHA);
#endif
#ifdef SSL_OP_SINGLE_DH_USE
NODE_DEFINE_CONSTANT(target, SSL_OP_SINGLE_DH_USE);
#endif
#ifdef SSL_OP_SINGLE_ECDH_USE
NODE_DEFINE_CONSTANT(target, SSL_OP_SINGLE_ECDH_USE);
#endif
#ifdef SSL_OP_SSLEAY_080_CLIENT_DH_BUG
NODE_DEFINE_CONSTANT(target, SSL_OP_SSLEAY_080_CLIENT_DH_BUG);
#endif
#ifdef SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG
NODE_DEFINE_CONSTANT(target, SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG);
#endif
#ifdef SSL_OP_TLS_BLOCK_PADDING_BUG
NODE_DEFINE_CONSTANT(target, SSL_OP_TLS_BLOCK_PADDING_BUG);
#endif
#ifdef SSL_OP_TLS_D5_BUG
NODE_DEFINE_CONSTANT(target, SSL_OP_TLS_D5_BUG);
#endif
#ifdef SSL_OP_TLS_ROLLBACK_BUG
NODE_DEFINE_CONSTANT(target, SSL_OP_TLS_ROLLBACK_BUG);
#endif
# ifndef OPENSSL_NO_ENGINE
# ifdef ENGINE_METHOD_RSA
NODE_DEFINE_CONSTANT(target, ENGINE_METHOD_RSA);
# endif
# ifdef ENGINE_METHOD_DSA
NODE_DEFINE_CONSTANT(target, ENGINE_METHOD_DSA);
# endif
# ifdef ENGINE_METHOD_DH
NODE_DEFINE_CONSTANT(target, ENGINE_METHOD_DH);
# endif
# ifdef ENGINE_METHOD_RAND
NODE_DEFINE_CONSTANT(target, ENGINE_METHOD_RAND);
# endif
# ifdef ENGINE_METHOD_EC
NODE_DEFINE_CONSTANT(target, ENGINE_METHOD_EC);
# endif
# ifdef ENGINE_METHOD_CIPHERS
NODE_DEFINE_CONSTANT(target, ENGINE_METHOD_CIPHERS);
# endif
# ifdef ENGINE_METHOD_DIGESTS
NODE_DEFINE_CONSTANT(target, ENGINE_METHOD_DIGESTS);
# endif
# ifdef ENGINE_METHOD_PKEY_METHS
NODE_DEFINE_CONSTANT(target, ENGINE_METHOD_PKEY_METHS);
# endif
# ifdef ENGINE_METHOD_PKEY_ASN1_METHS
NODE_DEFINE_CONSTANT(target, ENGINE_METHOD_PKEY_ASN1_METHS);
# endif
# ifdef ENGINE_METHOD_ALL
NODE_DEFINE_CONSTANT(target, ENGINE_METHOD_ALL);
# endif
# ifdef ENGINE_METHOD_NONE
NODE_DEFINE_CONSTANT(target, ENGINE_METHOD_NONE);
# endif
# endif // !OPENSSL_NO_ENGINE
#ifdef DH_CHECK_P_NOT_SAFE_PRIME
NODE_DEFINE_CONSTANT(target, DH_CHECK_P_NOT_SAFE_PRIME);
#endif
#ifdef DH_CHECK_P_NOT_PRIME
NODE_DEFINE_CONSTANT(target, DH_CHECK_P_NOT_PRIME);
#endif
#ifdef DH_UNABLE_TO_CHECK_GENERATOR
NODE_DEFINE_CONSTANT(target, DH_UNABLE_TO_CHECK_GENERATOR);
#endif
#ifdef DH_NOT_SUITABLE_GENERATOR
NODE_DEFINE_CONSTANT(target, DH_NOT_SUITABLE_GENERATOR);
#endif
#ifdef TLSEXT_TYPE_application_layer_protocol_negotiation
#define ALPN_ENABLED 1
NODE_DEFINE_CONSTANT(target, ALPN_ENABLED);
#endif
#ifdef RSA_PKCS1_PADDING
NODE_DEFINE_CONSTANT(target, RSA_PKCS1_PADDING);
#endif
#ifdef RSA_SSLV23_PADDING
NODE_DEFINE_CONSTANT(target, RSA_SSLV23_PADDING);
#endif
#ifdef RSA_NO_PADDING
NODE_DEFINE_CONSTANT(target, RSA_NO_PADDING);
#endif
#ifdef RSA_PKCS1_OAEP_PADDING
NODE_DEFINE_CONSTANT(target, RSA_PKCS1_OAEP_PADDING);
#endif
#ifdef RSA_X931_PADDING
NODE_DEFINE_CONSTANT(target, RSA_X931_PADDING);
#endif
#ifdef RSA_PKCS1_PSS_PADDING
NODE_DEFINE_CONSTANT(target, RSA_PKCS1_PSS_PADDING);
#endif
#ifdef RSA_PSS_SALTLEN_DIGEST
NODE_DEFINE_CONSTANT(target, RSA_PSS_SALTLEN_DIGEST);
#endif
#ifdef RSA_PSS_SALTLEN_MAX_SIGN
NODE_DEFINE_CONSTANT(target, RSA_PSS_SALTLEN_MAX_SIGN);
#endif
#ifdef RSA_PSS_SALTLEN_AUTO
NODE_DEFINE_CONSTANT(target, RSA_PSS_SALTLEN_AUTO);
#endif
#ifdef DEFAULT_CIPHER_LIST_CORE
NODE_DEFINE_STRING_CONSTANT(target,
"defaultCoreCipherList",
DEFAULT_CIPHER_LIST_CORE);
#endif
#ifdef TLS1_VERSION
NODE_DEFINE_CONSTANT(target, TLS1_VERSION);
#endif
#ifdef TLS1_1_VERSION
NODE_DEFINE_CONSTANT(target, TLS1_1_VERSION);
#endif
#ifdef TLS1_2_VERSION
NODE_DEFINE_CONSTANT(target, TLS1_2_VERSION);
#endif
#ifdef TLS1_3_VERSION
NODE_DEFINE_CONSTANT(target, TLS1_3_VERSION);
#endif
#if HAVE_OPENSSL
// NOTE: These are not defines
NODE_DEFINE_CONSTANT(target, POINT_CONVERSION_COMPRESSED);
NODE_DEFINE_CONSTANT(target, POINT_CONVERSION_UNCOMPRESSED);
NODE_DEFINE_CONSTANT(target, POINT_CONVERSION_HYBRID);
#endif
}
void DefineSystemConstants(Local<Object> target) {
NODE_DEFINE_CONSTANT(target, UV_FS_SYMLINK_DIR);
NODE_DEFINE_CONSTANT(target, UV_FS_SYMLINK_JUNCTION);
// file access modes
NODE_DEFINE_CONSTANT(target, O_RDONLY);
NODE_DEFINE_CONSTANT(target, O_WRONLY);
NODE_DEFINE_CONSTANT(target, O_RDWR);
// file types from readdir
NODE_DEFINE_CONSTANT(target, UV_DIRENT_UNKNOWN);
NODE_DEFINE_CONSTANT(target, UV_DIRENT_FILE);
NODE_DEFINE_CONSTANT(target, UV_DIRENT_DIR);
NODE_DEFINE_CONSTANT(target, UV_DIRENT_LINK);
NODE_DEFINE_CONSTANT(target, UV_DIRENT_FIFO);
NODE_DEFINE_CONSTANT(target, UV_DIRENT_SOCKET);
NODE_DEFINE_CONSTANT(target, UV_DIRENT_CHAR);
NODE_DEFINE_CONSTANT(target, UV_DIRENT_BLOCK);
NODE_DEFINE_CONSTANT(target, S_IFMT);
NODE_DEFINE_CONSTANT(target, S_IFREG);
NODE_DEFINE_CONSTANT(target, S_IFDIR);
NODE_DEFINE_CONSTANT(target, S_IFCHR);
#ifdef S_IFBLK
NODE_DEFINE_CONSTANT(target, S_IFBLK);
#endif
#ifdef S_IFIFO
NODE_DEFINE_CONSTANT(target, S_IFIFO);
#endif
#ifdef S_IFLNK
NODE_DEFINE_CONSTANT(target, S_IFLNK);
#endif
#ifdef S_IFSOCK
NODE_DEFINE_CONSTANT(target, S_IFSOCK);
#endif
#ifdef O_CREAT
NODE_DEFINE_CONSTANT(target, O_CREAT);
#endif
#ifdef O_EXCL
NODE_DEFINE_CONSTANT(target, O_EXCL);
#endif
NODE_DEFINE_CONSTANT(target, UV_FS_O_FILEMAP);
#ifdef O_NOCTTY
NODE_DEFINE_CONSTANT(target, O_NOCTTY);
#endif
#ifdef O_TRUNC
NODE_DEFINE_CONSTANT(target, O_TRUNC);
#endif
#ifdef O_APPEND
NODE_DEFINE_CONSTANT(target, O_APPEND);
#endif
#ifdef O_DIRECTORY
NODE_DEFINE_CONSTANT(target, O_DIRECTORY);
#endif
#ifdef O_EXCL
NODE_DEFINE_CONSTANT(target, O_EXCL);
#endif
#ifdef O_NOATIME
NODE_DEFINE_CONSTANT(target, O_NOATIME);
#endif
#ifdef O_NOFOLLOW
NODE_DEFINE_CONSTANT(target, O_NOFOLLOW);
#endif
#ifdef O_SYNC
NODE_DEFINE_CONSTANT(target, O_SYNC);
#endif
#ifdef O_DSYNC
NODE_DEFINE_CONSTANT(target, O_DSYNC);
#endif
#ifdef O_SYMLINK
NODE_DEFINE_CONSTANT(target, O_SYMLINK);
#endif
#ifdef O_DIRECT
NODE_DEFINE_CONSTANT(target, O_DIRECT);
#endif
#ifdef O_NONBLOCK
NODE_DEFINE_CONSTANT(target, O_NONBLOCK);
#endif
#ifdef S_IRWXU
NODE_DEFINE_CONSTANT(target, S_IRWXU);
#endif
#ifdef S_IRUSR
NODE_DEFINE_CONSTANT(target, S_IRUSR);
#endif
#ifdef S_IWUSR
NODE_DEFINE_CONSTANT(target, S_IWUSR);
#endif
#ifdef S_IXUSR
NODE_DEFINE_CONSTANT(target, S_IXUSR);
#endif
#ifdef S_IRWXG
NODE_DEFINE_CONSTANT(target, S_IRWXG);
#endif
#ifdef S_IRGRP
NODE_DEFINE_CONSTANT(target, S_IRGRP);
#endif
#ifdef S_IWGRP
NODE_DEFINE_CONSTANT(target, S_IWGRP);
#endif
#ifdef S_IXGRP
NODE_DEFINE_CONSTANT(target, S_IXGRP);
#endif
#ifdef S_IRWXO
NODE_DEFINE_CONSTANT(target, S_IRWXO);
#endif
#ifdef S_IROTH
NODE_DEFINE_CONSTANT(target, S_IROTH);
#endif
#ifdef S_IWOTH
NODE_DEFINE_CONSTANT(target, S_IWOTH);
#endif
#ifdef S_IXOTH
NODE_DEFINE_CONSTANT(target, S_IXOTH);
#endif
#ifdef F_OK
NODE_DEFINE_CONSTANT(target, F_OK);
#endif
#ifdef R_OK
NODE_DEFINE_CONSTANT(target, R_OK);
#endif
#ifdef W_OK
NODE_DEFINE_CONSTANT(target, W_OK);
#endif
#ifdef X_OK
NODE_DEFINE_CONSTANT(target, X_OK);
#endif
#ifdef UV_FS_COPYFILE_EXCL
# define COPYFILE_EXCL UV_FS_COPYFILE_EXCL
NODE_DEFINE_CONSTANT(target, UV_FS_COPYFILE_EXCL);
NODE_DEFINE_CONSTANT(target, COPYFILE_EXCL);
# undef COPYFILE_EXCL
#endif
#ifdef UV_FS_COPYFILE_FICLONE
# define COPYFILE_FICLONE UV_FS_COPYFILE_FICLONE
NODE_DEFINE_CONSTANT(target, UV_FS_COPYFILE_FICLONE);
NODE_DEFINE_CONSTANT(target, COPYFILE_FICLONE);
# undef COPYFILE_FICLONE
#endif
#ifdef UV_FS_COPYFILE_FICLONE_FORCE
# define COPYFILE_FICLONE_FORCE UV_FS_COPYFILE_FICLONE_FORCE
NODE_DEFINE_CONSTANT(target, UV_FS_COPYFILE_FICLONE_FORCE);
NODE_DEFINE_CONSTANT(target, COPYFILE_FICLONE_FORCE);
# undef COPYFILE_FICLONE_FORCE
#endif
}
void DefineDLOpenConstants(Local<Object> target) {
#ifdef RTLD_LAZY
NODE_DEFINE_CONSTANT(target, RTLD_LAZY);
#endif
#ifdef RTLD_NOW
NODE_DEFINE_CONSTANT(target, RTLD_NOW);
#endif
#ifdef RTLD_GLOBAL
NODE_DEFINE_CONSTANT(target, RTLD_GLOBAL);
#endif
#ifdef RTLD_LOCAL
NODE_DEFINE_CONSTANT(target, RTLD_LOCAL);
#endif
#ifdef RTLD_DEEPBIND
NODE_DEFINE_CONSTANT(target, RTLD_DEEPBIND);
#endif
}
void DefineTraceConstants(Local<Object> target) {
NODE_DEFINE_CONSTANT(target, TRACE_EVENT_PHASE_BEGIN);
NODE_DEFINE_CONSTANT(target, TRACE_EVENT_PHASE_END);
NODE_DEFINE_CONSTANT(target, TRACE_EVENT_PHASE_COMPLETE);
NODE_DEFINE_CONSTANT(target, TRACE_EVENT_PHASE_INSTANT);
NODE_DEFINE_CONSTANT(target, TRACE_EVENT_PHASE_ASYNC_BEGIN);
NODE_DEFINE_CONSTANT(target, TRACE_EVENT_PHASE_ASYNC_STEP_INTO);
NODE_DEFINE_CONSTANT(target, TRACE_EVENT_PHASE_ASYNC_STEP_PAST);
NODE_DEFINE_CONSTANT(target, TRACE_EVENT_PHASE_ASYNC_END);
NODE_DEFINE_CONSTANT(target, TRACE_EVENT_PHASE_NESTABLE_ASYNC_BEGIN);
NODE_DEFINE_CONSTANT(target, TRACE_EVENT_PHASE_NESTABLE_ASYNC_END);
NODE_DEFINE_CONSTANT(target, TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT);
NODE_DEFINE_CONSTANT(target, TRACE_EVENT_PHASE_FLOW_BEGIN);
NODE_DEFINE_CONSTANT(target, TRACE_EVENT_PHASE_FLOW_STEP);
NODE_DEFINE_CONSTANT(target, TRACE_EVENT_PHASE_FLOW_END);
NODE_DEFINE_CONSTANT(target, TRACE_EVENT_PHASE_METADATA);
NODE_DEFINE_CONSTANT(target, TRACE_EVENT_PHASE_COUNTER);
NODE_DEFINE_CONSTANT(target, TRACE_EVENT_PHASE_SAMPLE);
NODE_DEFINE_CONSTANT(target, TRACE_EVENT_PHASE_CREATE_OBJECT);
NODE_DEFINE_CONSTANT(target, TRACE_EVENT_PHASE_SNAPSHOT_OBJECT);
NODE_DEFINE_CONSTANT(target, TRACE_EVENT_PHASE_DELETE_OBJECT);
NODE_DEFINE_CONSTANT(target, TRACE_EVENT_PHASE_MEMORY_DUMP);
NODE_DEFINE_CONSTANT(target, TRACE_EVENT_PHASE_MARK);
NODE_DEFINE_CONSTANT(target, TRACE_EVENT_PHASE_CLOCK_SYNC);
NODE_DEFINE_CONSTANT(target, TRACE_EVENT_PHASE_ENTER_CONTEXT);
NODE_DEFINE_CONSTANT(target, TRACE_EVENT_PHASE_LEAVE_CONTEXT);
NODE_DEFINE_CONSTANT(target, TRACE_EVENT_PHASE_LINK_IDS);
}
} // anonymous namespace
void DefineConstants(v8::Isolate* isolate, Local<Object> target) {
Environment* env = Environment::GetCurrent(isolate);
Local<Object> os_constants = Object::New(isolate);
CHECK(os_constants->SetPrototype(env->context(),
Null(env->isolate())).FromJust());
Local<Object> err_constants = Object::New(isolate);
CHECK(err_constants->SetPrototype(env->context(),
Null(env->isolate())).FromJust());
Local<Object> sig_constants = Object::New(isolate);
CHECK(sig_constants->SetPrototype(env->context(),
Null(env->isolate())).FromJust());
Local<Object> priority_constants = Object::New(isolate);
CHECK(priority_constants->SetPrototype(env->context(),
Null(env->isolate())).FromJust());
Local<Object> fs_constants = Object::New(isolate);
CHECK(fs_constants->SetPrototype(env->context(),
Null(env->isolate())).FromJust());
Local<Object> crypto_constants = Object::New(isolate);
CHECK(crypto_constants->SetPrototype(env->context(),
Null(env->isolate())).FromJust());
Local<Object> zlib_constants = Object::New(isolate);
CHECK(zlib_constants->SetPrototype(env->context(),
Null(env->isolate())).FromJust());
Local<Object> dlopen_constants = Object::New(isolate);
CHECK(dlopen_constants->SetPrototype(env->context(),
Null(env->isolate())).FromJust());
Local<Object> trace_constants = Object::New(isolate);
CHECK(trace_constants->SetPrototype(env->context(),
Null(env->isolate())).FromJust());
DefineErrnoConstants(err_constants);
DefineWindowsErrorConstants(err_constants);
DefineSignalConstants(sig_constants);
DefinePriorityConstants(priority_constants);
DefineSystemConstants(fs_constants);
DefineCryptoConstants(crypto_constants);
DefineZlibConstants(zlib_constants);
DefineDLOpenConstants(dlopen_constants);
DefineTraceConstants(trace_constants);
// Define libuv constants.
NODE_DEFINE_CONSTANT(os_constants, UV_UDP_REUSEADDR);
os_constants->Set(env->context(),
OneByteString(isolate, "dlopen"),
dlopen_constants).Check();
os_constants->Set(env->context(),
OneByteString(isolate, "errno"),
err_constants).Check();
os_constants->Set(env->context(),
OneByteString(isolate, "signals"),
sig_constants).Check();
os_constants->Set(env->context(),
OneByteString(isolate, "priority"),
priority_constants).Check();
target->Set(env->context(),
OneByteString(isolate, "os"),
os_constants).Check();
target->Set(env->context(),
OneByteString(isolate, "fs"),
fs_constants).Check();
target->Set(env->context(),
OneByteString(isolate, "crypto"),
crypto_constants).Check();
target->Set(env->context(),
OneByteString(isolate, "zlib"),
zlib_constants).Check();
target->Set(env->context(),
OneByteString(isolate, "trace"),
trace_constants).Check();
}
} // namespace node
Loading...
举报
举报成功
我们将于2个工作日内通过站内信反馈结果给你!
请认真填写举报原因,尽可能描述详细。
请选择举报类型
取消
发送
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

简介

Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
编辑仓库简介
简介内容
主页
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/weshell/node.git
git@gitee.com:weshell/node.git
weshell
node
node
master
点此查找更多帮助

搜索帮助

评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册

AltStyle によって変換されたページ (->オリジナル) /