mirror of
https://github.com/nodejs/node-v0.x-archive.git
synced 2026-04-28 03:01:10 -04:00
Compare commits
513 Commits
fix-api-do
...
v0.11.6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
04018d4b39 | ||
|
|
a784abaff6 | ||
|
|
41f55dc59b | ||
|
|
cdf2a661f2 | ||
|
|
a1b3273a9d | ||
|
|
849cf1aa92 | ||
|
|
6b5c43ed18 | ||
|
|
ed0677f427 | ||
|
|
50cee6ecab | ||
|
|
edd2fcccf0 | ||
|
|
85d6b78343 | ||
|
|
6ed861dd7f | ||
|
|
c171c490f2 | ||
|
|
5555318bf3 | ||
|
|
fe0f12b100 | ||
|
|
f97a1267e2 | ||
|
|
b80d11d46b | ||
|
|
306f863438 | ||
|
|
b9a0eb0688 | ||
|
|
3e25ed905c | ||
|
|
3b923a7ace | ||
|
|
dfb0461c4c | ||
|
|
2dd4a745b0 | ||
|
|
ec548734ca | ||
|
|
9475ee41ad | ||
|
|
f73ee94d4f | ||
|
|
d70e6491ae | ||
|
|
e62d5964de | ||
|
|
6d842897c5 | ||
|
|
1f9f863494 | ||
|
|
df23ce138f | ||
|
|
7c9b607048 | ||
|
|
e3157972e1 | ||
|
|
da93d6adfb | ||
|
|
ce3d18412c | ||
|
|
7304a620ec | ||
|
|
e6c81bd679 | ||
|
|
1eedbdc361 | ||
|
|
65f6f06a61 | ||
|
|
a1ea8a27e6 | ||
|
|
ab5dabf876 | ||
|
|
0aa13357d6 | ||
|
|
7a3f7780dc | ||
|
|
9c59978f49 | ||
|
|
98c54246c2 | ||
|
|
dce02a1055 | ||
|
|
c50750e1fd | ||
|
|
2669966e76 | ||
|
|
d684f50acb | ||
|
|
d2b80b8a60 | ||
|
|
ffc5d83568 | ||
|
|
4ac6912a77 | ||
|
|
d4ad5d1151 | ||
|
|
4901353b98 | ||
|
|
d66d840e3b | ||
|
|
624938d052 | ||
|
|
35f789b027 | ||
|
|
5725864dfd | ||
|
|
756ae2c536 | ||
|
|
e0a8e1bf77 | ||
|
|
6cd7fd7d24 | ||
|
|
4ffa943c3f | ||
|
|
2b5b37a3ab | ||
|
|
a20d565d9c | ||
|
|
f69be329f0 | ||
|
|
39aa894035 | ||
|
|
c937f5b587 | ||
|
|
52e47b24b3 | ||
|
|
d046e9d033 | ||
|
|
c75251ced2 | ||
|
|
3f5d5847e2 | ||
|
|
2ef1782bbc | ||
|
|
f9b7714b4b | ||
|
|
f548433195 | ||
|
|
78f709d0d4 | ||
|
|
1449739de0 | ||
|
|
41ec6d0580 | ||
|
|
f674b09f40 | ||
|
|
c0e70354db | ||
|
|
967b5dbb45 | ||
|
|
cec81593d7 | ||
|
|
cd00064566 | ||
|
|
b9150344ac | ||
|
|
12cd13312b | ||
|
|
d24decb87b | ||
|
|
54a9ec4ef0 | ||
|
|
da5ad92ab2 | ||
|
|
4692b725de | ||
|
|
c079f6e210 | ||
|
|
536037369e | ||
|
|
7aa4242844 | ||
|
|
e3c5019ac7 | ||
|
|
6f92da2dd1 | ||
|
|
fa8efa98de | ||
|
|
166c405b33 | ||
|
|
b26d346b57 | ||
|
|
b8a7eedea3 | ||
|
|
45d056ee69 | ||
|
|
576496632c | ||
|
|
048e0e77e0 | ||
|
|
8e28193cc2 | ||
|
|
6942a95ae1 | ||
|
|
13ed817fec | ||
|
|
032373df7f | ||
|
|
e851fef60f | ||
|
|
f4b1e00071 | ||
|
|
72ad2c94df | ||
|
|
32fdae2ca3 | ||
|
|
222e5239fc | ||
|
|
ea7b817266 | ||
|
|
5383e75885 | ||
|
|
d4cc30f18c | ||
|
|
e5791f74f0 | ||
|
|
350fc8064e | ||
|
|
c80f8fa8f1 | ||
|
|
78d90945d6 | ||
|
|
2dafa193ee | ||
|
|
da07709c74 | ||
|
|
3158ffb6ef | ||
|
|
e772a7deaf | ||
|
|
22c68fdc1d | ||
|
|
9a29aa8c55 | ||
|
|
76ada45342 | ||
|
|
dda22a520b | ||
|
|
30701d6e74 | ||
|
|
a622bde9e6 | ||
|
|
1ef1be376c | ||
|
|
6430c3f55d | ||
|
|
168ca527be | ||
|
|
02cab97490 | ||
|
|
847c6d980c | ||
|
|
58159e308b | ||
|
|
6caf012d59 | ||
|
|
ccf8f3eebc | ||
|
|
8e29ce9f13 | ||
|
|
3c6b5d5df1 | ||
|
|
6a5a7b089e | ||
|
|
2cd7adc7f4 | ||
|
|
7ca77eaf38 | ||
|
|
63fc6a63c8 | ||
|
|
3ff2cbc892 | ||
|
|
4cc57b4aca | ||
|
|
8111ca2f9f | ||
|
|
71b3138925 | ||
|
|
511af4dd5f | ||
|
|
2fc47ab10b | ||
|
|
b8c04b921b | ||
|
|
dc9acd4fae | ||
|
|
6bd922fce8 | ||
|
|
34b0a36120 | ||
|
|
1bd711c8a0 | ||
|
|
17fbd6cd66 | ||
|
|
c13bfdc091 | ||
|
|
38176d3a1a | ||
|
|
8f571b52a7 | ||
|
|
e5233939be | ||
|
|
04f87de3da | ||
|
|
2b569deed3 | ||
|
|
d713db245b | ||
|
|
7d654be627 | ||
|
|
993bb93e0a | ||
|
|
508a6c2eee | ||
|
|
d62c2d975a | ||
|
|
509cfbc2b7 | ||
|
|
44ed42bd97 | ||
|
|
0330bdf519 | ||
|
|
457d529241 | ||
|
|
4b279f0092 | ||
|
|
d8240769c6 | ||
|
|
c76ed64348 | ||
|
|
8ce02cf0aa | ||
|
|
d74932e518 | ||
|
|
d904c231b6 | ||
|
|
35e0d60d0c | ||
|
|
0f8de5e1f9 | ||
|
|
5fcd6e4038 | ||
|
|
e3bb6e11c3 | ||
|
|
dfb1191f22 | ||
|
|
5777d7ab30 | ||
|
|
254b711155 | ||
|
|
d75f67f949 | ||
|
|
e1fe8d4ec0 | ||
|
|
ca9eb718fb | ||
|
|
0161ec87af | ||
|
|
d4c14c1fe5 | ||
|
|
0e48cb4998 | ||
|
|
221c689ebb | ||
|
|
d11e7c2075 | ||
|
|
4a34c69cbf | ||
|
|
2bedf6efb1 | ||
|
|
db13983e68 | ||
|
|
2b7d86ec73 | ||
|
|
d817843d2e | ||
|
|
46d11510ad | ||
|
|
e71d9fd834 | ||
|
|
bd5ab9c601 | ||
|
|
be940b4501 | ||
|
|
2c47030174 | ||
|
|
c898704db1 | ||
|
|
81c2a36439 | ||
|
|
31109808ea | ||
|
|
b5b84197ed | ||
|
|
48c542db52 | ||
|
|
9da67fa519 | ||
|
|
f88b8dad84 | ||
|
|
fa46483fe2 | ||
|
|
c679ac8f00 | ||
|
|
6acde2152f | ||
|
|
636ca7c684 | ||
|
|
3220bc4254 | ||
|
|
831de7cbb9 | ||
|
|
49519f1217 | ||
|
|
40e92650bb | ||
|
|
9fc9b87472 | ||
|
|
6176e49181 | ||
|
|
48e159faf2 | ||
|
|
567c72b8c5 | ||
|
|
b8ce1da74d | ||
|
|
2fc34d75d9 | ||
|
|
22668db73d | ||
|
|
ead8e26b5b | ||
|
|
aa8c4a0766 | ||
|
|
58e4edaf68 | ||
|
|
82ff891e22 | ||
|
|
fe176929c2 | ||
|
|
0181fee411 | ||
|
|
7684e0b554 | ||
|
|
d2d07421ca | ||
|
|
0693d22f86 | ||
|
|
c56a96c25c | ||
|
|
8985bb8bfd | ||
|
|
110a9cd8db | ||
|
|
9b3de60d35 | ||
|
|
588040d20d | ||
|
|
704fd8f374 | ||
|
|
eec43351c4 | ||
|
|
f0a05e4bc3 | ||
|
|
28609d1779 | ||
|
|
71ade1c212 | ||
|
|
30e7d08d93 | ||
|
|
26ca7d73ca | ||
|
|
278183a902 | ||
|
|
fa10b757f5 | ||
|
|
ec90e6e80a | ||
|
|
c1db1ecd15 | ||
|
|
07fbb43d78 | ||
|
|
6f8ddf3759 | ||
|
|
9b09c9eedd | ||
|
|
086d4ccace | ||
|
|
0004ffa5da | ||
|
|
e945903671 | ||
|
|
c9644fbd7c | ||
|
|
0449c3d0cb | ||
|
|
38c0c47bbe | ||
|
|
c16963b977 | ||
|
|
4bc024ddec | ||
|
|
4ae96c885b | ||
|
|
adf9b67e59 | ||
|
|
b255f4c10a | ||
|
|
972465a3b0 | ||
|
|
157d2bcc04 | ||
|
|
24ba9fdec8 | ||
|
|
f5e13ae9b5 | ||
|
|
bf8dc0762a | ||
|
|
7373c4ddb7 | ||
|
|
4b40358841 | ||
|
|
f489649159 | ||
|
|
56869d9ae7 | ||
|
|
fb40da822f | ||
|
|
456942a920 | ||
|
|
3a2f273bd7 | ||
|
|
252cdfa43b | ||
|
|
8f3f9f7830 | ||
|
|
d3b06f19cb | ||
|
|
98aad77f46 | ||
|
|
1bf6d78980 | ||
|
|
b9165252e3 | ||
|
|
226a20da5d | ||
|
|
c0281f1b30 | ||
|
|
5e4e8ec429 | ||
|
|
ffcd8b94c2 | ||
|
|
212e9cd8c9 | ||
|
|
0a4260c8c0 | ||
|
|
0581f5cb60 | ||
|
|
70a75cd41e | ||
|
|
dc50f27d52 | ||
|
|
af80e7bc6e | ||
|
|
03e008ddb8 | ||
|
|
4c48a39c65 | ||
|
|
6978e998ee | ||
|
|
0495b7031c | ||
|
|
5dd155a3bb | ||
|
|
4536b27ac1 | ||
|
|
56d9c48573 | ||
|
|
e92f4879eb | ||
|
|
642ea2b668 | ||
|
|
87624ab911 | ||
|
|
45a08cb216 | ||
|
|
3b0a759b6b | ||
|
|
393d33e7ea | ||
|
|
2dbc5ea1b4 | ||
|
|
6dd78074a3 | ||
|
|
9ae1d182ba | ||
|
|
4bb4f734b3 | ||
|
|
0882a75063 | ||
|
|
a7820a15e7 | ||
|
|
72b92e92d3 | ||
|
|
2900f0778a | ||
|
|
4b31a2d8da | ||
|
|
bcb85a1d31 | ||
|
|
b846842aff | ||
|
|
9a6c0853bc | ||
|
|
0761c90204 | ||
|
|
5b636feaa8 | ||
|
|
49e3fcd058 | ||
|
|
7ce5a31061 | ||
|
|
6af8788f3e | ||
|
|
6b654c0b13 | ||
|
|
c188a75103 | ||
|
|
36ebff0470 | ||
|
|
ef0926ce42 | ||
|
|
d02f228263 | ||
|
|
7890a69e4d | ||
|
|
448adaa456 | ||
|
|
4d68daea0f | ||
|
|
28659aba37 | ||
|
|
ba048e72b0 | ||
|
|
9c7078cea2 | ||
|
|
17e696c312 | ||
|
|
23509eb9e8 | ||
|
|
f8193ab3c4 | ||
|
|
f58eb8f5db | ||
|
|
2868bf94b6 | ||
|
|
e761ac2306 | ||
|
|
506fc4de1e | ||
|
|
52adc0d963 | ||
|
|
896b2aa707 | ||
|
|
0fefcc1690 | ||
|
|
d820b64412 | ||
|
|
812356049d | ||
|
|
61c9f78c63 | ||
|
|
7998843807 | ||
|
|
999ee45d36 | ||
|
|
88333f7ace | ||
|
|
f0d80d7db0 | ||
|
|
04ce80760e | ||
|
|
7124387b34 | ||
|
|
b3d1e504f4 | ||
|
|
6902f6536c | ||
|
|
3afa5e6b71 | ||
|
|
7934825621 | ||
|
|
8886c6bf62 | ||
|
|
9498fd15c7 | ||
|
|
458c8bb9f8 | ||
|
|
dff93008a6 | ||
|
|
5d3dc0e4c3 | ||
|
|
31e73a5cec | ||
|
|
e72cd415ad | ||
|
|
bdc5881169 | ||
|
|
8db693a87e | ||
|
|
69572a3965 | ||
|
|
7bfcaa8f91 | ||
|
|
7349667467 | ||
|
|
0c405cff68 | ||
|
|
7ee538ddfe | ||
|
|
fc58a5d4bd | ||
|
|
5e9c7a92f2 | ||
|
|
fede68fd68 | ||
|
|
ec576235f1 | ||
|
|
a58454226f | ||
|
|
c38ce9bc0a | ||
|
|
8a407f58b9 | ||
|
|
fbf4641462 | ||
|
|
43ec1b1c2e | ||
|
|
56492de5b9 | ||
|
|
aca275f58d | ||
|
|
b7f6e6b42f | ||
|
|
ee4f0baeac | ||
|
|
a90dc41df2 | ||
|
|
5037f9a5f4 | ||
|
|
fb9d66bceb | ||
|
|
4c02282c7e | ||
|
|
f8d81222e8 | ||
|
|
43951d7cfb | ||
|
|
ab518e8831 | ||
|
|
c081809344 | ||
|
|
b5c172138c | ||
|
|
4c1bb832af | ||
|
|
2f75785c01 | ||
|
|
5ddf7f4200 | ||
|
|
179784e31e | ||
|
|
d3ddee61c2 | ||
|
|
af1ed99ce2 | ||
|
|
9cfc92979b | ||
|
|
f2d5cea73a | ||
|
|
0c72936641 | ||
|
|
df8a4f8f07 | ||
|
|
60ed2c5434 | ||
|
|
21ed8df696 | ||
|
|
5db936d2ae | ||
|
|
fd9e01c031 | ||
|
|
74323a95a0 | ||
|
|
45ed546009 | ||
|
|
872e720c9f | ||
|
|
5a16d258ef | ||
|
|
85e4fc4306 | ||
|
|
ddf4d1a32a | ||
|
|
025f9133bb | ||
|
|
41b75ca926 | ||
|
|
c77312405e | ||
|
|
cf0fa96db8 | ||
|
|
2efb6cf0cf | ||
|
|
50624a50ee | ||
|
|
9026675061 | ||
|
|
e4406b76df | ||
|
|
92277808b6 | ||
|
|
4babd2b46e | ||
|
|
42b8682a51 | ||
|
|
0a4ebc3d2c | ||
|
|
223607c90f | ||
|
|
0bccb341c4 | ||
|
|
8e190bf6a1 | ||
|
|
39dfe94682 | ||
|
|
f044a6f3fa | ||
|
|
c7d7072e60 | ||
|
|
9f682265d6 | ||
|
|
951e0b69fa | ||
|
|
6717fdccb4 | ||
|
|
dc9f97b7b9 | ||
|
|
bb56489f21 | ||
|
|
5909a9c9bd | ||
|
|
62e4f89765 | ||
|
|
31d0d5af8e | ||
|
|
38149bb048 | ||
|
|
881ef7cc5f | ||
|
|
17a379ec39 | ||
|
|
061151c5f5 | ||
|
|
259839fe75 | ||
|
|
f83afd3c74 | ||
|
|
8428b52e25 | ||
|
|
deda899d77 | ||
|
|
33fae69779 | ||
|
|
591cfe6b7b | ||
|
|
c9850952c9 | ||
|
|
798d1772c0 | ||
|
|
62a214268a | ||
|
|
a2fd657b10 | ||
|
|
7357bcb727 | ||
|
|
587e83c6d6 | ||
|
|
1fd95b57bf | ||
|
|
2c9a38d059 | ||
|
|
b9655fc758 | ||
|
|
d8852aa9e8 | ||
|
|
b3a8e0da4a | ||
|
|
889fec3cc8 | ||
|
|
840a29fc0f | ||
|
|
9b8dd39553 | ||
|
|
aa5da48594 | ||
|
|
7634069614 | ||
|
|
fe7440ce19 | ||
|
|
2093e7d91a | ||
|
|
3f091c7293 | ||
|
|
87f9ece334 | ||
|
|
74ef949072 | ||
|
|
46da8c2da6 | ||
|
|
caacc19e44 | ||
|
|
bce38b3d74 | ||
|
|
9100dd4b0f | ||
|
|
97c70a6628 | ||
|
|
120e5a24df | ||
|
|
1f55704718 | ||
|
|
8548920969 | ||
|
|
2eb847849f | ||
|
|
ccda6bb3ac | ||
|
|
d20576165a | ||
|
|
1a65154d72 | ||
|
|
51f128d64b | ||
|
|
648a0726d0 | ||
|
|
9430ca6865 | ||
|
|
f7ebb4d8b6 | ||
|
|
2f88272ba2 | ||
|
|
f150d56915 | ||
|
|
40b1c9a66d | ||
|
|
ad819bcc4b | ||
|
|
dc29d64983 | ||
|
|
f65e14ed1d | ||
|
|
da4d79ac47 | ||
|
|
88217ec276 | ||
|
|
d9036a5d35 | ||
|
|
425163e0d6 | ||
|
|
3375bd8db7 | ||
|
|
3cb5bf1c0d | ||
|
|
831af97df2 | ||
|
|
8bffa333d2 | ||
|
|
0bba590283 | ||
|
|
06bec0e087 | ||
|
|
83261e789e | ||
|
|
a05f973f82 | ||
|
|
14a8fb8bbe | ||
|
|
94284e7d2e | ||
|
|
c0721bcd66 | ||
|
|
5eacdd4bf9 | ||
|
|
5e140b33e5 | ||
|
|
5917828622 | ||
|
|
26dae9a22a | ||
|
|
3288bc9532 | ||
|
|
68487a73f2 | ||
|
|
7845918227 | ||
|
|
83d17e509f | ||
|
|
a15cc93ae3 | ||
|
|
66280de133 | ||
|
|
da8b0eefde | ||
|
|
43c1830e0a |
14
.travis.yml
14
.travis.yml
@@ -1,14 +0,0 @@
|
||||
language: node_js
|
||||
|
||||
before_script:
|
||||
- "./configure"
|
||||
- "make"
|
||||
|
||||
script:
|
||||
- "make test"
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
irc:
|
||||
- "irc.freenode.net#libuv"
|
||||
|
||||
24
AUTHORS
24
AUTHORS
@@ -431,8 +431,13 @@ JeongHoon Byun <outsideris@gmail.com>
|
||||
Iskren Ivov Chernev <iskren.chernev@gmail.com>
|
||||
Alexey Kupershtokh <alexey.kupershtokh@gmail.com>
|
||||
Benjamin Ruston <benjy.ruston@gmail.com>
|
||||
Manav Rathi <manav.r@directi.com>
|
||||
Marcin Kostrzewa <marcinkostrzewa@yahoo.com>
|
||||
Suwon Chae <doortts@gmail.com>
|
||||
David Braun <NodeJS-box@snkmail.com>
|
||||
Mitar Milutinovic <mitar.git@tnode.com>
|
||||
Michael Hart <michael.hart.au@gmail.com>
|
||||
Jeff Barczewski <jeff.barczewski@gmail.com>
|
||||
Andrew Hart <hartandrewr@gmail.com>
|
||||
Rafael Garcia <rgarcia2009@gmail.com>
|
||||
Tobias Müllerleile <tobias@muellerleile.net>
|
||||
@@ -442,6 +447,7 @@ Kelly Gerber <kellygerber22@yahoo.com>
|
||||
Ryan Doenges <rhdoenges@gmail.com>
|
||||
Sean Silva <chisophugis@gmail.com>
|
||||
Miroslav Bajtoš <miro.bajtos@gmail.com>
|
||||
Olof Johansson <olof@ethup.se>
|
||||
Sam Roberts <vieuxtech@gmail.com>
|
||||
Kevin Locke <kevin@kevinlocke.name>
|
||||
Daniel Moore <polaris@northhorizon.net>
|
||||
@@ -449,15 +455,31 @@ Robert Kowalski <rok@kowalski.gd>
|
||||
Benoit Vallée <github@benoitvallee.net>
|
||||
Ryuichi Okumura <okuryu@okuryu.com>
|
||||
Brandon Frohs <bfrohs@gmail.com>
|
||||
Nick Sullivan <nick@sullivanflock.com>
|
||||
Nathan Zadoks <nathan@nathan7.eu>
|
||||
Rafael Henrique Moreira <rafadev7@gmail.com>
|
||||
Daniel G. Taylor <dan@programmer-art.org>
|
||||
Kiyoshi Nomo <tokyoincidents.g@gmail.com>
|
||||
Veres Lajos <vlajos@gmail.com>
|
||||
Yuan Chuan <yuanchuan23@gmail.com>
|
||||
Krzysztof Chrapka <chrapka.k@gmail.com>
|
||||
Linus Mårtensson <linus.martensson@sonymobile.com>
|
||||
Peter Rust <peter@cornerstonenw.com>
|
||||
Shuan Wang <shuanwang@gmail.com>
|
||||
Andrew Chilton <andychilton@gmail.com>
|
||||
Wyatt Preul <wpreul@gmail.com>
|
||||
David Björklund <david.bjorklund@gmail.com>
|
||||
Dav Glass <davglass@gmail.com>
|
||||
Andrew Chilton <andychilton@gmail.com>
|
||||
Antony Bailey <support@antonybailey.net>
|
||||
Forrest L Norvell <ogd@aoaioxxysz.net>
|
||||
Evan Solomon <evan@evanalyze.com>
|
||||
Eran Hammer <eran@hueniverse.com>
|
||||
Matthias Bartelmeß <mba@fourplusone.de>
|
||||
Daniel Chatfield <chatfielddaniel@gmail.com>
|
||||
Eivind Uggedal <eivind@uggedal.com>
|
||||
Edward Hutchins <eahutchins@gmail.com>
|
||||
James Halliday <mail@substack.net>
|
||||
Chris Wren <cthewren@gmail.com>
|
||||
Duan Yao <duanyao@ustc.edu>
|
||||
Matthew Aynalem <maynalem@gmail.com>
|
||||
Vsevolod Strukchinsky <floatdrop@yandex-team.ru>
|
||||
|
||||
282
ChangeLog
282
ChangeLog
@@ -1,4 +1,277 @@
|
||||
2013.08.16, Version 0.10.16 (Stable)
|
||||
2013.08.21, Version 0.11.6 (Unstable)
|
||||
|
||||
* uv: Upgrade to v0.11.8
|
||||
|
||||
* v8: upgrade v8 to 3.20.14.1
|
||||
|
||||
* build: disable SSLv2 by default (Ben Noordhuis)
|
||||
|
||||
* build: don't auto-destroy existing configuration (Ben Noordhuis)
|
||||
|
||||
* crypto: add TLS 1.1 and 1.2 to secureProtocol list (Matthias Bartelmeß)
|
||||
|
||||
* crypto: fix memory leak in randomBytes() error path (Ben Noordhuis)
|
||||
|
||||
* dgram: don't call into js when send cb is omitted (Ben Noordhuis)
|
||||
|
||||
* dgram: fix regression in string argument handling (Ben Noordhuis)
|
||||
|
||||
* domains: performance improvements (Trevor Norris)
|
||||
|
||||
* events: EventEmitter = require('events') (Jake Verbaten)
|
||||
|
||||
* http: Add write()/end() callbacks (isaacs)
|
||||
|
||||
* http: Consistent 'finish' event semantics (isaacs)
|
||||
|
||||
* http: Prefer 'binary' over 'ascii' (isaacs)
|
||||
|
||||
* http: Support legacy agent.addRequest API (isaacs)
|
||||
|
||||
* http: Write hex/base64 chunks properly (isaacs)
|
||||
|
||||
* http: add agent.maxFreeSockets option (isaacs)
|
||||
|
||||
* http: provide access to raw headers/trailers (isaacs)
|
||||
|
||||
* http: removed headers stay removed (James Halliday)
|
||||
|
||||
* http,timers: improve callback performance (Ben Noordhuis)
|
||||
|
||||
* net: family option in net.connect (Vsevolod Strukchinsky)
|
||||
|
||||
* readline: pause stdin before turning off terminal raw mode (Daniel Chatfield)
|
||||
|
||||
* smalloc: allow different external array types (Trevor Norris)
|
||||
|
||||
* smalloc: expose ExternalArraySize (Trevor Norris)
|
||||
|
||||
* stream: Short-circuit buffer pushes when flowing (isaacs)
|
||||
|
||||
* tls: handle errors on socket before releasing it (Fedor Indutny)
|
||||
|
||||
* util: fix isPrimitive check (Trevor Norris)
|
||||
|
||||
* util: isObject should always return boolean (Trevor Norris)
|
||||
|
||||
|
||||
2013.08.06, Version 0.11.5 (Unstable), 6f92da2dd106b0c63fde563284f83e08e2a521b5
|
||||
|
||||
* v8: upgrade to 3.20.11
|
||||
|
||||
* uv: upgrade to v0.11.7
|
||||
|
||||
* buffer: return offset for end of last write (Trevor Norris)
|
||||
|
||||
* build: embed the mdb_v8.so into the binary (Timothy J Fontaine)
|
||||
|
||||
* build: fix --without-ssl build (Ben Noordhuis)
|
||||
|
||||
* child_process: add 'shell' option to .exec() (Ben Noordhuis)
|
||||
|
||||
* dgram: report send errors to cb, don't pass bytes (Ben Noordhuis)
|
||||
|
||||
* fs: write strings directly to disk (Trevor Norris)
|
||||
|
||||
* https: fix default port (Koichi Kobayashi)
|
||||
|
||||
* openssl: use asm for sha, md5, rmd (Fedor Indutny)
|
||||
|
||||
* os: add mac address to networkInterfaces() output (Brian White)
|
||||
|
||||
* smalloc: introduce smalloc module (Trevor Norris)
|
||||
|
||||
* stream: Simplify flowing, passive data listening (streams3) (isaacs)
|
||||
|
||||
* tls: asynchronous SNICallback (Fedor Indutny)
|
||||
|
||||
* tls: share tls tickets key between cluster workers (Fedor Indutny)
|
||||
|
||||
* util: don't throw on circular %j input to format() (Ben Noordhuis)
|
||||
|
||||
|
||||
2013.07.12, Version 0.11.4 (Unstable), b5b84197ed037918fd1a26e5cb87cce7c812ca55
|
||||
|
||||
* npm: Upgrade to 1.3.4
|
||||
|
||||
* v8: Upgrade to v3.20.2
|
||||
|
||||
* c-ares: Upgrade to piscisaureus/cares@805d153
|
||||
|
||||
* timers: setImmediate process full queue each turn (Ben Noordhuis)
|
||||
|
||||
* http: Add agent.get/request methods (isaacs)
|
||||
|
||||
* http: Proper KeepAlive behavior (isaacs)
|
||||
|
||||
* configure: fix the --without-ssl option (Nathan Rajlich)
|
||||
|
||||
* buffer: propagate originating parent (Trevor Norris)
|
||||
|
||||
* tls_wrap: return Error not throw for missing cert (Timothy J Fontaine)
|
||||
|
||||
* src: enable native v8 typed arrays (Ben Noordhuis)
|
||||
|
||||
* stream: objectMode transform should allow falsey values (Jeff Barczewski)
|
||||
|
||||
* slab_allocator: remove SlabAllocator (Trevor Norris)
|
||||
|
||||
* crypto: fix memory leak in LoadPKCS12 (Fedor Indutny)
|
||||
|
||||
* tls: export TLSSocket (Fedor Indutny)
|
||||
|
||||
* zlib: allow changing of level and strategy (Brian White)
|
||||
|
||||
* zlib: allow custom flush type for flush() (Brian White)
|
||||
|
||||
|
||||
2013.06.26, Version 0.11.3 (Unstable), 38c0c47bbe280ddc42054418091571e532d82a1e
|
||||
|
||||
* uv: Upgrade to v0.11.5
|
||||
|
||||
* c-ares: upgrade to 1.10.0
|
||||
|
||||
* v8: upgrade to v3.19.13
|
||||
|
||||
* punycode: update to v1.2.3 (Mathias Bynens)
|
||||
|
||||
* debugger: break on uncaught exception (Miroslav Bajtos)
|
||||
|
||||
* child_process: emit 'disconnect' asynchronously (Ben Noordhuis)
|
||||
|
||||
* dtrace: enable uv's probes if enabled (Timothy J Fontaine)
|
||||
|
||||
* dtrace: unify dtrace and systemtap interfaces (Timothy J Fontaine)
|
||||
|
||||
* buffer: New API for backing data store (Trevor Norris)
|
||||
|
||||
* buffer: return `this` in fill() for chainability (Brian White)
|
||||
|
||||
* build: fix include order for building on windows (Timothy J Fontaine)
|
||||
|
||||
* build: add android support (Linus Mårtensson)
|
||||
|
||||
* readline: strip ctrl chars for prompt width calc (Krzysztof Chrapka)
|
||||
|
||||
* tls: introduce TLSSocket based on tls_wrap binding (Fedor Indutny)
|
||||
|
||||
* tls: add localAddress and localPort properties (Ben Noordhuis)
|
||||
|
||||
* crypto: free excessive memory in NodeBIO (Fedor Indutny)
|
||||
|
||||
* process: remove maxTickDepth (Trevor Norris)
|
||||
|
||||
* timers: use uv_now instead of Date.now (Timothy J Fontaine)
|
||||
|
||||
* util: Add debuglog, deprecate console lookalikes (isaacs)
|
||||
|
||||
* module: use path.sep instead of a custom solution (Robert Kowalski)
|
||||
|
||||
* http: don't escape request path, reject bad chars (Ben Noordhuis)
|
||||
|
||||
* net: emit dns 'lookup' event before connect (Ben Noordhuis)
|
||||
|
||||
* dns: add getServers and setServers (Timothy J Fontaine)
|
||||
|
||||
|
||||
2013.05.13, Version 0.11.2 (Unstable), 5d3dc0e4c3369dfb00b7b13e08936c2e652fa696
|
||||
|
||||
* uv: Upgrade to 0.11.2
|
||||
|
||||
* V8: Upgrade to 3.19.0
|
||||
|
||||
* npm: Upgrade to 1.2.21
|
||||
|
||||
* build: Makefile should respect configure --prefix (Timothy J Fontaine)
|
||||
|
||||
* cluster: use round-robin load balancing (Ben Noordhuis)
|
||||
|
||||
* debugger, cluster: each worker has new debug port (Miroslav Bajtoš)
|
||||
|
||||
* debugger: `restart` with custom debug port (Miroslav Bajtoš)
|
||||
|
||||
* debugger: breakpoints in scripts not loaded yet (Miroslav Bajtoš)
|
||||
|
||||
* event: EventEmitter#setMaxListeners() returns this (Sam Roberts)
|
||||
|
||||
* events: add EventEmitter.defaultMaxListeners (Ben Noordhuis)
|
||||
|
||||
* install: Support $(PREFIX) install target directory prefix (Olof Johansson)
|
||||
|
||||
* os: Include netmask in os.networkInterfaces() (Ben Kelly)
|
||||
|
||||
* path: add path.isAbsolute(path) (Ryan Doenges)
|
||||
|
||||
* stream: Guarantee ordering of 'finish' event (isaacs)
|
||||
|
||||
* streams: introduce .cork/.uncork/._writev (Fedor Indutny)
|
||||
|
||||
* vm: add support for timeout argument (Andrew Paprocki)
|
||||
|
||||
|
||||
2013.04.19, Version 0.11.1 (Unstable), 4babd2b46ebf9fbea2c9946af5cfae25a33b2b22
|
||||
|
||||
* V8: upgrade to 3.18.0
|
||||
|
||||
* uv: Upgrade to v0.11.1
|
||||
|
||||
* http: split into multiple separate modules (Timothy J Fontaine)
|
||||
|
||||
* http: escape unsafe characters in request path (Ben Noordhuis)
|
||||
|
||||
* url: Escape all unwise characters (isaacs)
|
||||
|
||||
* build: depend on v8 postmortem-metadata if enabled (Paddy Byers)
|
||||
|
||||
* etw: update prototypes to match dtrace provider (Timothy J Fontaine)
|
||||
|
||||
* buffer: change output of Buffer.prototype.toJSON() (David Braun)
|
||||
|
||||
* dtrace: actually use the _handle.fd value (Timothy J Fontaine)
|
||||
|
||||
* dtrace: pass more arguments to probes (Dave Pacheco)
|
||||
|
||||
* build: allow building with dtrace on osx (Dave Pacheco)
|
||||
|
||||
* zlib: allow passing options to convenience methods (Kyle Robinson Young)
|
||||
|
||||
|
||||
2013.03.28, Version 0.11.0 (Unstable), bce38b3d74e64fcb7d04a2dd551151da6168cdc5
|
||||
|
||||
* V8: update to 3.17.13
|
||||
|
||||
* os: use %SystemRoot% or %windir% in os.tmpdir() (Suwon Chae)
|
||||
|
||||
* util: fix util.inspect() line width calculation (Marcin Kostrzewa)
|
||||
|
||||
* buffer: remove _charsWritten (Trevor Norris)
|
||||
|
||||
* fs: uv_[fl]stat now reports subsecond resolution (Timothy J Fontaine)
|
||||
|
||||
* fs: Throw if error raised and missing callback (bnoordhuis)
|
||||
|
||||
* tls: expose SSL_CTX_set_timeout via tls.createServer (Manav Rathi)
|
||||
|
||||
* tls: remove harmful unnecessary bounds checking (Marcel Laverdet)
|
||||
|
||||
* buffer: write ascii strings using WriteOneByte (Trevor Norris)
|
||||
|
||||
* dtrace: fix generation of v8 constants on freebsd (Fedor Indutny)
|
||||
|
||||
* dtrace: x64 ustack helper (Fedor Indutny)
|
||||
|
||||
* readline: handle wide characters properly (Nao Iizuka)
|
||||
|
||||
* repl: Use a domain to catch async errors safely (isaacs)
|
||||
|
||||
* repl: emit 'reset' event when context is reset (Sami Samhuri)
|
||||
|
||||
* util: custom `inspect()` method may return an Object (Nathan Rajlich)
|
||||
|
||||
* console: `console.dir()` bypasses inspect() methods (Nathan Rajlich)
|
||||
|
||||
|
||||
2013.08.16, Version 0.10.16 (Stable), 50b4c905a4425430ae54db4906f88982309e128d
|
||||
|
||||
* v8: back-port fix for CVE-2013-2882
|
||||
|
||||
@@ -17,7 +290,7 @@
|
||||
* stream: Fix double pipe error emit (Eran Hammer)
|
||||
|
||||
|
||||
2013.07.25, Version 0.10.15 (Stable)
|
||||
2013.07.25, Version 0.10.15 (Stable), 2426d65af860bda7be9f0832a99601cc43c6cf63
|
||||
|
||||
* src: fix process.getuid() return value (Ben Noordhuis)
|
||||
|
||||
@@ -98,7 +371,6 @@
|
||||
* net: Fix busy loop on POLLERR|POLLHUP on older linux kernels (Ben Noordhuis, isaacs)
|
||||
|
||||
|
||||
|
||||
2013.06.04, Version 0.10.10 (Stable), 25e51c396aa23018603baae2b1d9390f5d9db496
|
||||
|
||||
* uv: Upgrade to 0.10.10
|
||||
@@ -195,6 +467,8 @@
|
||||
* stream: Fix unshift() race conditions (isaacs)
|
||||
|
||||
|
||||
|
||||
|
||||
2013.04.11, Version 0.10.4 (Stable), 9712aa9f76073c30850b20a188b1ed12ffb74d17
|
||||
|
||||
* uv: Upgrade to 0.10.4
|
||||
@@ -253,7 +527,7 @@
|
||||
* src: tie process.versions.uv to uv_version_string() (Ben Noordhuis)
|
||||
|
||||
|
||||
2013.03.28, Version 0.10.2 (Stable)
|
||||
2013.03.28, Version 0.10.2 (Stable), 1e0de9c426e07a260bbec2d2196c2d2db8eb8886
|
||||
|
||||
* npm: Upgrade to 1.2.15
|
||||
|
||||
|
||||
28
LICENSE
28
LICENSE
@@ -602,34 +602,6 @@ maintained libraries. The externally maintained libraries used by Node are:
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
"""
|
||||
|
||||
- src/ngx-queue.h. ngx-queue.h is taken from the nginx source tree. nginx's
|
||||
license follows:
|
||||
"""
|
||||
Copyright (C) 2002-2012 Igor Sysoev
|
||||
Copyright (C) 2011,2012 Nginx, Inc.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
"""
|
||||
|
||||
- wrk is located at tools/wrk. wrk's license follows:
|
||||
"""
|
||||
|
||||
|
||||
33
Makefile
33
Makefile
@@ -5,6 +5,7 @@ PYTHON ?= python
|
||||
NINJA ?= ninja
|
||||
DESTDIR ?=
|
||||
SIGN ?=
|
||||
PREFIX ?= /usr/local
|
||||
|
||||
NODE ?= ./node
|
||||
|
||||
@@ -13,6 +14,12 @@ NODE ?= ./node
|
||||
# or set the V environment variable to an empty string.
|
||||
V ?= 1
|
||||
|
||||
ifeq ($(USE_NINJA),1)
|
||||
ifneq ($(V),)
|
||||
NINJA := $(NINJA) -v
|
||||
endif
|
||||
endif
|
||||
|
||||
# BUILDTYPE=Debug builds both release and debug builds. If you want to compile
|
||||
# just the debug build, run `make -C out BUILDTYPE=Debug` instead.
|
||||
ifeq ($(BUILDTYPE),Release)
|
||||
@@ -43,7 +50,7 @@ node_g: config.gypi out/Makefile
|
||||
ln -fs out/Debug/node $@
|
||||
endif
|
||||
|
||||
out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp deps/zlib/zlib.gyp deps/v8/build/common.gypi deps/v8/tools/gyp/v8.gyp node.gyp config.gypi
|
||||
out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp deps/zlib/zlib.gyp deps/v8/build/toolchain.gypi deps/v8/build/features.gypi deps/v8/tools/gyp/v8.gyp node.gyp config.gypi
|
||||
ifeq ($(USE_NINJA),1)
|
||||
touch out/Makefile
|
||||
$(PYTHON) tools/gyp_node -f ninja
|
||||
@@ -52,13 +59,17 @@ else
|
||||
endif
|
||||
|
||||
config.gypi: configure
|
||||
$(PYTHON) ./configure
|
||||
if [ -f $@ ]; then
|
||||
$(error Stale $@, please re-run ./configure)
|
||||
else
|
||||
$(error No $@, please run ./configure first)
|
||||
fi
|
||||
|
||||
install: all
|
||||
$(PYTHON) tools/install.py $@ $(DESTDIR)
|
||||
$(PYTHON) tools/install.py $@ '$(DESTDIR)' '$(PREFIX)'
|
||||
|
||||
uninstall:
|
||||
$(PYTHON) tools/install.py $@ $(DESTDIR)
|
||||
$(PYTHON) tools/install.py $@ '$(DESTDIR)' '$(PREFIX)'
|
||||
|
||||
clean:
|
||||
-rm -rf out/Makefile node node_g out/$(BUILDTYPE)/node blog.html email.md
|
||||
@@ -75,6 +86,7 @@ distclean:
|
||||
test: all
|
||||
$(PYTHON) tools/test.py --mode=release simple message
|
||||
$(MAKE) jslint
|
||||
$(MAKE) cpplint
|
||||
|
||||
test-http1: all
|
||||
$(PYTHON) tools/test.py --mode=release --use-http1 simple message
|
||||
@@ -387,8 +399,19 @@ jslintfix:
|
||||
jslint:
|
||||
PYTHONPATH=tools/closure_linter/ $(PYTHON) tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc -r lib/ -r src/ --exclude_files lib/punycode.js
|
||||
|
||||
CPPLINT_EXCLUDE ?=
|
||||
CPPLINT_EXCLUDE += src/node_dtrace.cc
|
||||
CPPLINT_EXCLUDE += src/node_dtrace.cc
|
||||
CPPLINT_EXCLUDE += src/node_root_certs.h
|
||||
CPPLINT_EXCLUDE += src/node_win32_perfctr_provider.cc
|
||||
CPPLINT_EXCLUDE += src/queue.h
|
||||
CPPLINT_EXCLUDE += src/tree.h
|
||||
CPPLINT_EXCLUDE += src/v8abbr.h
|
||||
|
||||
CPPLINT_FILES = $(filter-out $(CPPLINT_EXCLUDE), $(wildcard src/*.cc src/*.h src/*.c))
|
||||
|
||||
cpplint:
|
||||
@$(PYTHON) tools/cpplint.py $(wildcard src/*.cc src/*.h src/*.c)
|
||||
@$(PYTHON) tools/cpplint.py $(CPPLINT_FILES)
|
||||
|
||||
lint: jslint cpplint
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Evented I/O for V8 javascript. [](http://travis-ci.org/joyent/node)
|
||||
Evented I/O for V8 javascript.
|
||||
===
|
||||
|
||||
### To build:
|
||||
|
||||
19
android-configure
Executable file
19
android-configure
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
export TOOLCHAIN=$PWD/android-toolchain
|
||||
mkdir -p $TOOLCHAIN
|
||||
$1/build/tools/make-standalone-toolchain.sh \
|
||||
--toolchain=arm-linux-androideabi-4.7 \
|
||||
--arch=arm \
|
||||
--install-dir=$TOOLCHAIN \
|
||||
--platform=android-9
|
||||
export PATH=$TOOLCHAIN/bin:$PATH
|
||||
export AR=arm-linux-androideabi-ar
|
||||
export CC=arm-linux-androideabi-gcc
|
||||
export CXX=arm-linux-androideabi-g++
|
||||
export LINK=arm-linux-androideabi-g++
|
||||
|
||||
./configure \
|
||||
--without-snapshot \
|
||||
--dest-cpu=arm \
|
||||
--dest-os=android
|
||||
@@ -1,4 +1,4 @@
|
||||
// test the througput of the fs.WriteStream class.
|
||||
// test the throughput of the fs.WriteStream class.
|
||||
|
||||
var path = require('path');
|
||||
var common = require('../common.js');
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// test the througput of the fs.WriteStream class.
|
||||
// test the throughput of the fs.WriteStream class.
|
||||
|
||||
var path = require('path');
|
||||
var common = require('../common.js');
|
||||
|
||||
42
benchmark/http/chunked.js
Normal file
42
benchmark/http/chunked.js
Normal file
@@ -0,0 +1,42 @@
|
||||
// When calling .end(buffer) right away, this triggers a "hot path"
|
||||
// optimization in http.js, to avoid an extra write call.
|
||||
//
|
||||
// However, the overhead of copying a large buffer is higher than
|
||||
// the overhead of an extra write() call, so the hot path was not
|
||||
// always as hot as it could be.
|
||||
//
|
||||
// Verify that our assumptions are valid.
|
||||
|
||||
var common = require('../common.js');
|
||||
var PORT = common.PORT;
|
||||
|
||||
var bench = common.createBenchmark(main, {
|
||||
num: [1, 4, 8, 16],
|
||||
size: [1, 64, 256],
|
||||
c: [100]
|
||||
});
|
||||
|
||||
function main(conf) {
|
||||
http = require('http');
|
||||
var chunk = new Buffer(conf.size);
|
||||
chunk.fill('8');
|
||||
|
||||
var args = ['-r', 5000, '-t', 8, '-c', conf.c];
|
||||
|
||||
var server = http.createServer(function(req, res) {
|
||||
function send(left) {
|
||||
if (left === 0) return res.end();
|
||||
res.write(chunk);
|
||||
setTimeout(function() {
|
||||
send(left - 1);
|
||||
}, 0);
|
||||
}
|
||||
send(conf.num);
|
||||
});
|
||||
|
||||
server.listen(common.PORT, function() {
|
||||
bench.http('/', args, function() {
|
||||
server.close();
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -5,13 +5,12 @@ using namespace v8;
|
||||
|
||||
static int c = 0;
|
||||
|
||||
static Handle<Value> Hello(const Arguments& args) {
|
||||
HandleScope scope;
|
||||
return scope.Close(Integer::New(c++));
|
||||
void Hello(const FunctionCallbackInfo<Value>& args) {
|
||||
args.GetReturnValue().Set(c++);
|
||||
}
|
||||
|
||||
extern "C" void init (Handle<Object> target) {
|
||||
HandleScope scope;
|
||||
HandleScope scope(Isolate::GetCurrent());
|
||||
NODE_SET_METHOD(target, "hello", Hello);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// as many bytes as we can in the specified time (default = 10s)
|
||||
|
||||
var common = require('../common.js');
|
||||
var util = require('util');
|
||||
|
||||
// if there are --dur=N and --len=N args, then
|
||||
// run the function with those settings.
|
||||
@@ -27,26 +28,23 @@ function main(conf) {
|
||||
}
|
||||
|
||||
|
||||
function fail(syscall) {
|
||||
var e = new Error(syscall + ' ' + errno);
|
||||
e.errno = e.code = errno;
|
||||
e.syscall = syscall;
|
||||
throw e;
|
||||
function fail(err, syscall) {
|
||||
throw util._errnoException(err, syscall);
|
||||
}
|
||||
|
||||
function server() {
|
||||
var serverHandle = new TCP();
|
||||
var r = serverHandle.bind('127.0.0.1', PORT);
|
||||
if (r)
|
||||
fail('bind');
|
||||
var err = serverHandle.bind('127.0.0.1', PORT);
|
||||
if (err)
|
||||
fail(err, 'bind');
|
||||
|
||||
var r = serverHandle.listen(511);
|
||||
if (r)
|
||||
fail('listen');
|
||||
err = serverHandle.listen(511);
|
||||
if (err)
|
||||
fail(err, 'listen');
|
||||
|
||||
serverHandle.onconnection = function(clientHandle) {
|
||||
if (!clientHandle)
|
||||
fail('connect');
|
||||
serverHandle.onconnection = function(err, clientHandle) {
|
||||
if (err)
|
||||
fail(err, 'connect');
|
||||
|
||||
// the meat of the benchmark is right here:
|
||||
bench.start();
|
||||
@@ -57,16 +55,15 @@ function server() {
|
||||
bench.end((bytes * 8) / (1024 * 1024 * 1024));
|
||||
}, dur * 1000);
|
||||
|
||||
clientHandle.onread = function(buffer, offset, length) {
|
||||
clientHandle.onread = function(nread, buffer) {
|
||||
// we're not expecting to ever get an EOF from the client.
|
||||
// just lots of data forever.
|
||||
if (!buffer)
|
||||
fail('read');
|
||||
if (nread < 0)
|
||||
fail(nread, 'read');
|
||||
|
||||
// don't slice the buffer. the point of this is to isolate, not
|
||||
// simulate real traffic.
|
||||
// var chunk = buffer.slice(offset, offset + length);
|
||||
bytes += length;
|
||||
bytes += buffer.length;
|
||||
};
|
||||
|
||||
clientHandle.readStart();
|
||||
@@ -94,41 +91,44 @@ function client() {
|
||||
}
|
||||
|
||||
var clientHandle = new TCP();
|
||||
var connectReq = clientHandle.connect('127.0.0.1', PORT);
|
||||
var connectReq = {};
|
||||
var err = clientHandle.connect(connectReq, '127.0.0.1', PORT);
|
||||
|
||||
if (!connectReq)
|
||||
fail('connect');
|
||||
if (err)
|
||||
fail(err, 'connect');
|
||||
|
||||
clientHandle.readStart();
|
||||
|
||||
connectReq.oncomplete = function() {
|
||||
connectReq.oncomplete = function(err) {
|
||||
if (err)
|
||||
fail(err, 'connect');
|
||||
|
||||
while (clientHandle.writeQueueSize === 0)
|
||||
write();
|
||||
};
|
||||
|
||||
function write() {
|
||||
var writeReq
|
||||
var writeReq = { oncomplete: afterWrite };
|
||||
var err;
|
||||
switch (type) {
|
||||
case 'buf':
|
||||
writeReq = clientHandle.writeBuffer(chunk);
|
||||
err = clientHandle.writeBuffer(writeReq, chunk);
|
||||
break;
|
||||
case 'utf':
|
||||
writeReq = clientHandle.writeUtf8String(chunk);
|
||||
err = clientHandle.writeUtf8String(writeReq, chunk);
|
||||
break;
|
||||
case 'asc':
|
||||
writeReq = clientHandle.writeAsciiString(chunk);
|
||||
err = clientHandle.writeAsciiString(writeReq, chunk);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!writeReq)
|
||||
fail('write');
|
||||
|
||||
writeReq.oncomplete = afterWrite;
|
||||
if (err)
|
||||
fail(err, 'write');
|
||||
}
|
||||
|
||||
function afterWrite(status, handle, req) {
|
||||
if (status)
|
||||
fail('write');
|
||||
function afterWrite(err, handle, req) {
|
||||
if (err)
|
||||
fail(err, 'write');
|
||||
|
||||
while (clientHandle.writeQueueSize === 0)
|
||||
write();
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// as many bytes as we can in the specified time (default = 10s)
|
||||
|
||||
var common = require('../common.js');
|
||||
var util = require('util');
|
||||
|
||||
// if there are --dur=N and --len=N args, then
|
||||
// run the function with those settings.
|
||||
@@ -26,43 +27,39 @@ function main(conf) {
|
||||
server();
|
||||
}
|
||||
|
||||
|
||||
function fail(syscall) {
|
||||
var e = new Error(syscall + ' ' + errno);
|
||||
e.errno = e.code = errno;
|
||||
e.syscall = syscall;
|
||||
throw e;
|
||||
function fail(err, syscall) {
|
||||
throw util._errnoException(err, syscall);
|
||||
}
|
||||
|
||||
function server() {
|
||||
var serverHandle = new TCP();
|
||||
var r = serverHandle.bind('127.0.0.1', PORT);
|
||||
if (r)
|
||||
fail('bind');
|
||||
var err = serverHandle.bind('127.0.0.1', PORT);
|
||||
if (err)
|
||||
fail(err, 'bind');
|
||||
|
||||
var r = serverHandle.listen(511);
|
||||
if (r)
|
||||
fail('listen');
|
||||
err = serverHandle.listen(511);
|
||||
if (err)
|
||||
fail(err, 'listen');
|
||||
|
||||
serverHandle.onconnection = function(clientHandle) {
|
||||
if (!clientHandle)
|
||||
fail('connect');
|
||||
serverHandle.onconnection = function(err, clientHandle) {
|
||||
if (err)
|
||||
fail(err, 'connect');
|
||||
|
||||
clientHandle.onread = function(buffer, offset, length) {
|
||||
clientHandle.onread = function(nread, buffer) {
|
||||
// we're not expecting to ever get an EOF from the client.
|
||||
// just lots of data forever.
|
||||
if (!buffer)
|
||||
fail('read');
|
||||
if (nread < 0)
|
||||
fail(nread, 'read');
|
||||
|
||||
var chunk = buffer.slice(offset, offset + length);
|
||||
var writeReq = clientHandle.writeBuffer(chunk);
|
||||
var writeReq = {};
|
||||
err = clientHandle.writeBuffer(writeReq, buffer);
|
||||
|
||||
if (!writeReq)
|
||||
fail('write');
|
||||
if (err)
|
||||
fail(err, 'write');
|
||||
|
||||
writeReq.oncomplete = function(status, handle, req) {
|
||||
if (status)
|
||||
fail('write');
|
||||
fail(err, 'write');
|
||||
};
|
||||
};
|
||||
|
||||
@@ -91,22 +88,26 @@ function client() {
|
||||
}
|
||||
|
||||
var clientHandle = new TCP();
|
||||
var connectReq = clientHandle.connect('127.0.0.1', PORT);
|
||||
var connectReq = {};
|
||||
var err = clientHandle.connect(connectReq, '127.0.0.1', PORT);
|
||||
var bytes = 0;
|
||||
|
||||
if (!connectReq)
|
||||
fail('connect');
|
||||
if (err)
|
||||
fail(err, 'connect');
|
||||
|
||||
clientHandle.readStart();
|
||||
|
||||
clientHandle.onread = function(buffer, start, length) {
|
||||
if (!buffer)
|
||||
fail('read');
|
||||
clientHandle.onread = function(nread, buffer) {
|
||||
if (nread < 0)
|
||||
fail(nread, 'read');
|
||||
|
||||
bytes += length;
|
||||
bytes += buffer.length;
|
||||
};
|
||||
|
||||
connectReq.oncomplete = function() {
|
||||
connectReq.oncomplete = function(err) {
|
||||
if (err)
|
||||
fail(err, 'connect');
|
||||
|
||||
bench.start();
|
||||
|
||||
setTimeout(function() {
|
||||
@@ -120,28 +121,27 @@ function client() {
|
||||
};
|
||||
|
||||
function write() {
|
||||
var writeReq
|
||||
var writeReq = { oncomplete: afterWrite };
|
||||
var err;
|
||||
switch (type) {
|
||||
case 'buf':
|
||||
writeReq = clientHandle.writeBuffer(chunk);
|
||||
err = clientHandle.writeBuffer(writeReq, chunk);
|
||||
break;
|
||||
case 'utf':
|
||||
writeReq = clientHandle.writeUtf8String(chunk);
|
||||
err = clientHandle.writeUtf8String(writeReq, chunk);
|
||||
break;
|
||||
case 'asc':
|
||||
writeReq = clientHandle.writeAsciiString(chunk);
|
||||
err = clientHandle.writeAsciiString(writeReq, chunk);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!writeReq)
|
||||
fail('write');
|
||||
|
||||
writeReq.oncomplete = afterWrite;
|
||||
if (err)
|
||||
fail(err, 'write');
|
||||
}
|
||||
|
||||
function afterWrite(status, handle, req) {
|
||||
if (status)
|
||||
fail('write');
|
||||
function afterWrite(err, handle, req) {
|
||||
if (err)
|
||||
fail(err, 'write');
|
||||
|
||||
while (clientHandle.writeQueueSize === 0)
|
||||
write();
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// as many bytes as we can in the specified time (default = 10s)
|
||||
|
||||
var common = require('../common.js');
|
||||
var util = require('util');
|
||||
|
||||
// if there are dur=N and len=N args, then
|
||||
// run the function with those settings.
|
||||
@@ -26,27 +27,23 @@ function main(conf) {
|
||||
server();
|
||||
}
|
||||
|
||||
|
||||
function fail(syscall) {
|
||||
var e = new Error(syscall + ' ' + errno);
|
||||
e.errno = e.code = errno;
|
||||
e.syscall = syscall;
|
||||
throw e;
|
||||
function fail(err, syscall) {
|
||||
throw util._errnoException(err, syscall);
|
||||
}
|
||||
|
||||
function server() {
|
||||
var serverHandle = new TCP();
|
||||
var r = serverHandle.bind('127.0.0.1', PORT);
|
||||
if (r)
|
||||
fail('bind');
|
||||
var err = serverHandle.bind('127.0.0.1', PORT);
|
||||
if (err)
|
||||
fail(err, 'bind');
|
||||
|
||||
var r = serverHandle.listen(511);
|
||||
if (r)
|
||||
fail('listen');
|
||||
err = serverHandle.listen(511);
|
||||
if (err)
|
||||
fail(err, 'listen');
|
||||
|
||||
serverHandle.onconnection = function(clientHandle) {
|
||||
if (!clientHandle)
|
||||
fail('connect');
|
||||
serverHandle.onconnection = function(err, clientHandle) {
|
||||
if (err)
|
||||
fail(err, 'connect');
|
||||
|
||||
var chunk;
|
||||
switch (type) {
|
||||
@@ -71,28 +68,27 @@ function server() {
|
||||
write();
|
||||
|
||||
function write() {
|
||||
var writeReq
|
||||
var writeReq = { oncomplete: afterWrite };
|
||||
var err;
|
||||
switch (type) {
|
||||
case 'buf':
|
||||
writeReq = clientHandle.writeBuffer(chunk);
|
||||
err = clientHandle.writeBuffer(writeReq, chunk);
|
||||
break;
|
||||
case 'utf':
|
||||
writeReq = clientHandle.writeUtf8String(chunk);
|
||||
err = clientHandle.writeUtf8String(writeReq, chunk);
|
||||
break;
|
||||
case 'asc':
|
||||
writeReq = clientHandle.writeAsciiString(chunk);
|
||||
err = clientHandle.writeAsciiString(writeReq, chunk);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!writeReq)
|
||||
fail('write');
|
||||
|
||||
writeReq.oncomplete = afterWrite;
|
||||
if (err)
|
||||
fail(err, 'write');
|
||||
}
|
||||
|
||||
function afterWrite(status, handle, req) {
|
||||
if (status)
|
||||
fail('write');
|
||||
function afterWrite(err, handle, req) {
|
||||
if (err)
|
||||
fail(err, 'write');
|
||||
|
||||
while (clientHandle.writeQueueSize === 0)
|
||||
write();
|
||||
@@ -104,23 +100,23 @@ function server() {
|
||||
|
||||
function client() {
|
||||
var clientHandle = new TCP();
|
||||
var connectReq = clientHandle.connect('127.0.0.1', PORT);
|
||||
var connectReq = {};
|
||||
var err = clientHandle.connect(connectReq, '127.0.0.1', PORT);
|
||||
|
||||
if (!connectReq)
|
||||
fail('connect');
|
||||
if (err)
|
||||
fail(err, 'connect');
|
||||
|
||||
connectReq.oncomplete = function() {
|
||||
var bytes = 0;
|
||||
clientHandle.onread = function(buffer, offset, length) {
|
||||
clientHandle.onread = function(nread, buffer) {
|
||||
// we're not expecting to ever get an EOF from the client.
|
||||
// just lots of data forever.
|
||||
if (!buffer)
|
||||
fail('read');
|
||||
if (nread < 0)
|
||||
fail(nread, 'read');
|
||||
|
||||
// don't slice the buffer. the point of this is to isolate, not
|
||||
// simulate real traffic.
|
||||
// var chunk = buffer.slice(offset, offset + length);
|
||||
bytes += length;
|
||||
bytes += buffer.length;
|
||||
};
|
||||
|
||||
clientHandle.readStart();
|
||||
|
||||
56
common.gypi
56
common.gypi
@@ -11,13 +11,11 @@
|
||||
'clang%': 0,
|
||||
'python%': 'python',
|
||||
|
||||
# Turn on optimizations that may trigger compiler bugs.
|
||||
# Use at your own risk. Do *NOT* report bugs if this option is enabled.
|
||||
'node_unsafe_optimizations%': 0,
|
||||
|
||||
# Enable V8's post-mortem debugging only on unix flavors.
|
||||
'conditions': [
|
||||
['OS != "win"', {
|
||||
['OS == "win"', {
|
||||
'v8_postmortem_support': 'false'
|
||||
}, {
|
||||
'v8_postmortem_support': 'true'
|
||||
}]
|
||||
],
|
||||
@@ -51,37 +49,24 @@
|
||||
},
|
||||
},
|
||||
'Release': {
|
||||
'cflags': [ '-O3', '-ffunction-sections', '-fdata-sections' ],
|
||||
'conditions': [
|
||||
['target_arch=="x64"', {
|
||||
'msvs_configuration_platform': 'x64',
|
||||
}],
|
||||
['node_unsafe_optimizations==1', {
|
||||
'cflags': [ '-O3', '-ffunction-sections', '-fdata-sections' ],
|
||||
'ldflags': [ '-Wl,--gc-sections' ],
|
||||
}, {
|
||||
'cflags': [ '-O2', '-fno-strict-aliasing' ],
|
||||
'cflags!': [ '-O3', '-fstrict-aliasing' ],
|
||||
'conditions': [
|
||||
# Required by the dtrace post-processor. Unfortunately,
|
||||
# some gcc/binutils combos generate bad code when
|
||||
# -ffunction-sections is enabled. Let's hope for the best.
|
||||
['OS=="solaris"', {
|
||||
'cflags': [ '-ffunction-sections', '-fdata-sections' ],
|
||||
}, {
|
||||
'cflags!': [ '-ffunction-sections', '-fdata-sections' ],
|
||||
}],
|
||||
['clang == 0 and gcc_version >= 40', {
|
||||
'cflags': [ '-fno-tree-vrp' ],
|
||||
}],
|
||||
['clang == 0 and gcc_version <= 44', {
|
||||
'cflags': [ '-fno-tree-sink' ],
|
||||
}],
|
||||
],
|
||||
}],
|
||||
['OS=="solaris"', {
|
||||
'cflags': [ '-fno-omit-frame-pointer' ],
|
||||
# pull in V8's postmortem metadata
|
||||
'ldflags': [ '-Wl,-z,allextract' ]
|
||||
}, {
|
||||
# Doesn't work with the Solaris linker.
|
||||
'ldflags': [ '-Wl,--gc-sections' ],
|
||||
}],
|
||||
['clang == 0 and gcc_version >= 40', {
|
||||
'cflags': [ '-fno-tree-vrp' ], # Work around compiler bug.
|
||||
}],
|
||||
['clang == 0 and gcc_version <= 44', {
|
||||
'cflags': [ '-fno-tree-sink' ], # Work around compiler bug.
|
||||
}],
|
||||
],
|
||||
'msvs_settings': {
|
||||
@@ -144,6 +129,7 @@
|
||||
],
|
||||
},
|
||||
},
|
||||
'msvs_disabled_warnings': [4351, 4355, 4800],
|
||||
'conditions': [
|
||||
['OS == "win"', {
|
||||
'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin
|
||||
@@ -159,10 +145,14 @@
|
||||
'BUILDING_UV_SHARED=1',
|
||||
],
|
||||
}],
|
||||
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
|
||||
'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', '-pthread', ],
|
||||
[ 'OS in "linux freebsd openbsd solaris"', {
|
||||
'cflags': [ '-pthread', ],
|
||||
'ldflags': [ '-pthread' ],
|
||||
}],
|
||||
[ 'OS in "linux freebsd openbsd solaris android"', {
|
||||
'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ],
|
||||
'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
|
||||
'ldflags': [ '-pthread', '-rdynamic' ],
|
||||
'ldflags': [ '-rdynamic' ],
|
||||
'target_conditions': [
|
||||
['_type=="static_library"', {
|
||||
'standalone_static_library': 1, # disable thin archive which needs binutils >= 2.19
|
||||
@@ -185,6 +175,10 @@
|
||||
}],
|
||||
],
|
||||
}],
|
||||
[ 'OS=="android"', {
|
||||
'defines': ['_GLIBCXX_USE_C99_MATH'],
|
||||
'libraries': [ '-llog' ],
|
||||
}],
|
||||
['OS=="mac"', {
|
||||
'defines': ['_DARWIN_USE_64_BIT_INODE=1'],
|
||||
'xcode_settings': {
|
||||
|
||||
511
configure
vendored
511
configure
vendored
@@ -16,260 +16,255 @@ from gyp.common import GetFlavor
|
||||
# parse our options
|
||||
parser = optparse.OptionParser()
|
||||
|
||||
parser.add_option("--debug",
|
||||
action="store_true",
|
||||
dest="debug",
|
||||
help="Also build debug build")
|
||||
# Options should be in alphabetical order but keep --prefix at the top,
|
||||
# that's arguably the one people will be looking for most.
|
||||
parser.add_option('--prefix',
|
||||
action='store',
|
||||
dest='prefix',
|
||||
help='select the install prefix (defaults to /usr/local)')
|
||||
|
||||
parser.add_option("--prefix",
|
||||
action="store",
|
||||
dest="prefix",
|
||||
help="Select the install prefix (defaults to /usr/local)")
|
||||
parser.add_option('--debug',
|
||||
action='store_true',
|
||||
dest='debug',
|
||||
help='also build debug build')
|
||||
|
||||
parser.add_option("--without-npm",
|
||||
action="store_true",
|
||||
dest="without_npm",
|
||||
help="Don\'t install the bundled npm package manager")
|
||||
parser.add_option('--dest-cpu',
|
||||
action='store',
|
||||
dest='dest_cpu',
|
||||
help='CPU architecture to build for. Valid values are: arm, ia32, x64')
|
||||
|
||||
parser.add_option("--without-ssl",
|
||||
action="store_true",
|
||||
dest="without_ssl",
|
||||
help="Build without SSL")
|
||||
parser.add_option('--dest-os',
|
||||
action='store',
|
||||
dest='dest_os',
|
||||
help='operating system to build for. Valid values are: '
|
||||
'win, mac, solaris, freebsd, openbsd, linux, android')
|
||||
|
||||
parser.add_option("--without-snapshot",
|
||||
action="store_true",
|
||||
dest="without_snapshot",
|
||||
help="Build without snapshotting V8 libraries. You might want to set"
|
||||
" this for cross-compiling. [Default: False]")
|
||||
parser.add_option('--gdb',
|
||||
action='store_true',
|
||||
dest='gdb',
|
||||
help='add gdb support')
|
||||
|
||||
parser.add_option("--shared-v8",
|
||||
action="store_true",
|
||||
dest="shared_v8",
|
||||
help="Link to a shared V8 DLL instead of static linking")
|
||||
parser.add_option('--ninja',
|
||||
action='store_true',
|
||||
dest='use_ninja',
|
||||
help='generate files for the ninja build system')
|
||||
|
||||
parser.add_option("--shared-v8-includes",
|
||||
action="store",
|
||||
dest="shared_v8_includes",
|
||||
help="Directory containing V8 header files")
|
||||
|
||||
parser.add_option("--shared-v8-libpath",
|
||||
action="store",
|
||||
dest="shared_v8_libpath",
|
||||
help="A directory to search for the shared V8 DLL")
|
||||
|
||||
parser.add_option("--shared-v8-libname",
|
||||
action="store",
|
||||
dest="shared_v8_libname",
|
||||
help="Alternative lib name to link to (default: 'v8')")
|
||||
|
||||
parser.add_option("--shared-openssl",
|
||||
action="store_true",
|
||||
dest="shared_openssl",
|
||||
help="Link to a shared OpenSSl DLL instead of static linking")
|
||||
|
||||
parser.add_option("--shared-openssl-includes",
|
||||
action="store",
|
||||
dest="shared_openssl_includes",
|
||||
help="Directory containing OpenSSL header files")
|
||||
|
||||
parser.add_option("--shared-openssl-libpath",
|
||||
action="store",
|
||||
dest="shared_openssl_libpath",
|
||||
help="A directory to search for the shared OpenSSL DLLs")
|
||||
|
||||
parser.add_option("--shared-openssl-libname",
|
||||
action="store",
|
||||
dest="shared_openssl_libname",
|
||||
help="Alternative lib name to link to (default: 'crypto,ssl')")
|
||||
parser.add_option('--no-ifaddrs',
|
||||
action='store_true',
|
||||
dest='no_ifaddrs',
|
||||
help='use on deprecated SunOS systems that do not support ifaddrs.h')
|
||||
|
||||
# deprecated
|
||||
parser.add_option("--openssl-use-sys",
|
||||
action="store_true",
|
||||
dest="shared_openssl",
|
||||
parser.add_option('--openssl-includes',
|
||||
action='store',
|
||||
dest='shared_openssl_includes',
|
||||
help=optparse.SUPPRESS_HELP)
|
||||
|
||||
# deprecated
|
||||
parser.add_option("--openssl-includes",
|
||||
action="store",
|
||||
dest="shared_openssl_includes",
|
||||
parser.add_option('--openssl-libpath',
|
||||
action='store',
|
||||
dest='shared_openssl_libpath',
|
||||
help=optparse.SUPPRESS_HELP)
|
||||
|
||||
# deprecated
|
||||
parser.add_option("--openssl-libpath",
|
||||
action="store",
|
||||
dest="shared_openssl_libpath",
|
||||
parser.add_option('--openssl-use-sys',
|
||||
action='store_true',
|
||||
dest='shared_openssl',
|
||||
help=optparse.SUPPRESS_HELP)
|
||||
|
||||
parser.add_option('--shared-cares',
|
||||
action='store_true',
|
||||
dest='shared_cares',
|
||||
help='link to a shared cares DLL instead of static linking')
|
||||
|
||||
parser.add_option('--shared-cares-includes',
|
||||
action='store',
|
||||
dest='shared_cares_includes',
|
||||
help='directory containing cares header files')
|
||||
|
||||
parser.add_option('--shared-cares-libname',
|
||||
action='store',
|
||||
dest='shared_cares_libname',
|
||||
help='alternative lib name to link to (default: \'cares\')')
|
||||
|
||||
parser.add_option('--shared-cares-libpath',
|
||||
action='store',
|
||||
dest='shared_cares_libpath',
|
||||
help='a directory to search for the shared cares DLL')
|
||||
|
||||
parser.add_option('--shared-http-parser',
|
||||
action='store_true',
|
||||
dest='shared_http_parser',
|
||||
help='link to a shared http_parser DLL instead of static linking')
|
||||
|
||||
parser.add_option('--shared-http-parser-includes',
|
||||
action='store',
|
||||
dest='shared_http_parser_includes',
|
||||
help='directory containing http_parser header files')
|
||||
|
||||
parser.add_option('--shared-http-parser-libname',
|
||||
action='store',
|
||||
dest='shared_http_parser_libname',
|
||||
help='alternative lib name to link to (default: \'http_parser\')')
|
||||
|
||||
parser.add_option('--shared-http-parser-libpath',
|
||||
action='store',
|
||||
dest='shared_http_parser_libpath',
|
||||
help='a directory to search for the shared http_parser DLL')
|
||||
|
||||
parser.add_option('--shared-libuv',
|
||||
action='store_true',
|
||||
dest='shared_libuv',
|
||||
help='link to a shared libuv DLL instead of static linking')
|
||||
|
||||
parser.add_option('--shared-libuv-includes',
|
||||
action='store',
|
||||
dest='shared_libuv_includes',
|
||||
help='directory containing libuv header files')
|
||||
|
||||
parser.add_option('--shared-libuv-libname',
|
||||
action='store',
|
||||
dest='shared_libuv_libname',
|
||||
help='alternative lib name to link to (default: \'uv\')')
|
||||
|
||||
parser.add_option('--shared-libuv-libpath',
|
||||
action='store',
|
||||
dest='shared_libuv_libpath',
|
||||
help='a directory to search for the shared libuv DLL')
|
||||
|
||||
parser.add_option('--shared-openssl',
|
||||
action='store_true',
|
||||
dest='shared_openssl',
|
||||
help='link to a shared OpenSSl DLL instead of static linking')
|
||||
|
||||
parser.add_option('--shared-openssl-includes',
|
||||
action='store',
|
||||
dest='shared_openssl_includes',
|
||||
help='directory containing OpenSSL header files')
|
||||
|
||||
parser.add_option('--shared-openssl-libname',
|
||||
action='store',
|
||||
dest='shared_openssl_libname',
|
||||
help='alternative lib name to link to (default: \'crypto,ssl\')')
|
||||
|
||||
parser.add_option('--shared-openssl-libpath',
|
||||
action='store',
|
||||
dest='shared_openssl_libpath',
|
||||
help='a directory to search for the shared OpenSSL DLLs')
|
||||
|
||||
parser.add_option('--shared-v8',
|
||||
action='store_true',
|
||||
dest='shared_v8',
|
||||
help='link to a shared V8 DLL instead of static linking')
|
||||
|
||||
parser.add_option('--shared-v8-includes',
|
||||
action='store',
|
||||
dest='shared_v8_includes',
|
||||
help='directory containing V8 header files')
|
||||
|
||||
parser.add_option('--shared-v8-libname',
|
||||
action='store',
|
||||
dest='shared_v8_libname',
|
||||
help='alternative lib name to link to (default: \'v8\')')
|
||||
|
||||
parser.add_option('--shared-v8-libpath',
|
||||
action='store',
|
||||
dest='shared_v8_libpath',
|
||||
help='a directory to search for the shared V8 DLL')
|
||||
|
||||
parser.add_option('--shared-zlib',
|
||||
action='store_true',
|
||||
dest='shared_zlib',
|
||||
help='link to a shared zlib DLL instead of static linking')
|
||||
|
||||
parser.add_option('--shared-zlib-includes',
|
||||
action='store',
|
||||
dest='shared_zlib_includes',
|
||||
help='directory containing zlib header files')
|
||||
|
||||
parser.add_option('--shared-zlib-libname',
|
||||
action='store',
|
||||
dest='shared_zlib_libname',
|
||||
help='alternative lib name to link to (default: \'z\')')
|
||||
|
||||
parser.add_option('--shared-zlib-libpath',
|
||||
action='store',
|
||||
dest='shared_zlib_libpath',
|
||||
help='a directory to search for the shared zlib DLL')
|
||||
|
||||
# TODO document when we've decided on what the tracing API and its options will
|
||||
# look like
|
||||
parser.add_option("--systemtap-includes",
|
||||
action="store",
|
||||
dest="systemtap_includes",
|
||||
parser.add_option('--systemtap-includes',
|
||||
action='store',
|
||||
dest='systemtap_includes',
|
||||
help=optparse.SUPPRESS_HELP)
|
||||
|
||||
parser.add_option("--no-ssl2",
|
||||
action="store_true",
|
||||
dest="no_ssl2",
|
||||
help="Disable OpenSSL v2")
|
||||
parser.add_option('--tag',
|
||||
action='store',
|
||||
dest='tag',
|
||||
help='custom build tag')
|
||||
|
||||
parser.add_option("--shared-zlib",
|
||||
action="store_true",
|
||||
dest="shared_zlib",
|
||||
help="Link to a shared zlib DLL instead of static linking")
|
||||
parser.add_option('--with-arm-float-abi',
|
||||
action='store',
|
||||
dest='arm_float_abi',
|
||||
help='specifies which floating-point ABI to use. Valid values are: '
|
||||
'soft, softfp, hard')
|
||||
|
||||
parser.add_option("--shared-zlib-includes",
|
||||
action="store",
|
||||
dest="shared_zlib_includes",
|
||||
help="Directory containing zlib header files")
|
||||
parser.add_option('--with-dtrace',
|
||||
action='store_true',
|
||||
dest='with_dtrace',
|
||||
help='build with DTrace (default is true on sunos)')
|
||||
|
||||
parser.add_option("--shared-zlib-libpath",
|
||||
action="store",
|
||||
dest="shared_zlib_libpath",
|
||||
help="A directory to search for the shared zlib DLL")
|
||||
parser.add_option('--with-etw',
|
||||
action='store_true',
|
||||
dest='with_etw',
|
||||
help='build with ETW (default is true on Windows)')
|
||||
|
||||
parser.add_option("--shared-zlib-libname",
|
||||
action="store",
|
||||
dest="shared_zlib_libname",
|
||||
help="Alternative lib name to link to (default: 'z')")
|
||||
parser.add_option('--with-perfctr',
|
||||
action='store_true',
|
||||
dest='with_perfctr',
|
||||
help='build with performance counters (default is true on Windows)')
|
||||
|
||||
parser.add_option("--shared-http-parser",
|
||||
action="store_true",
|
||||
dest="shared_http_parser",
|
||||
help="Link to a shared http_parser DLL instead of static linking")
|
||||
parser.add_option('--with-sslv2',
|
||||
action='store_true',
|
||||
dest='with_sslv2',
|
||||
help='enable SSL v2')
|
||||
|
||||
parser.add_option("--shared-http-parser-includes",
|
||||
action="store",
|
||||
dest="shared_http_parser_includes",
|
||||
help="Directory containing http_parser header files")
|
||||
parser.add_option('--without-dtrace',
|
||||
action='store_true',
|
||||
dest='without_dtrace',
|
||||
help='build without DTrace')
|
||||
|
||||
parser.add_option("--shared-http-parser-libpath",
|
||||
action="store",
|
||||
dest="shared_http_parser_libpath",
|
||||
help="A directory to search for the shared http_parser DLL")
|
||||
parser.add_option('--without-etw',
|
||||
action='store_true',
|
||||
dest='without_etw',
|
||||
help='build without ETW')
|
||||
|
||||
parser.add_option("--shared-http-parser-libname",
|
||||
action="store",
|
||||
dest="shared_http_parser_libname",
|
||||
help="Alternative lib name to link to (default: 'http_parser')")
|
||||
parser.add_option('--without-npm',
|
||||
action='store_true',
|
||||
dest='without_npm',
|
||||
help='don\'t install the bundled npm package manager')
|
||||
|
||||
parser.add_option("--shared-cares",
|
||||
action="store_true",
|
||||
dest="shared_cares",
|
||||
help="Link to a shared cares DLL instead of static linking")
|
||||
parser.add_option('--without-perfctr',
|
||||
action='store_true',
|
||||
dest='without_perfctr',
|
||||
help='build without performance counters')
|
||||
|
||||
parser.add_option("--shared-cares-includes",
|
||||
action="store",
|
||||
dest="shared_cares_includes",
|
||||
help="Directory containing cares header files")
|
||||
parser.add_option('--without-snapshot',
|
||||
action='store_true',
|
||||
dest='without_snapshot',
|
||||
help='build without snapshotting V8 libraries. You might want to set'
|
||||
' this for cross-compiling. [Default: False]')
|
||||
|
||||
parser.add_option("--shared-cares-libpath",
|
||||
action="store",
|
||||
dest="shared_cares_libpath",
|
||||
help="A directory to search for the shared cares DLL")
|
||||
parser.add_option('--without-ssl',
|
||||
action='store_true',
|
||||
dest='without_ssl',
|
||||
help='build without SSL')
|
||||
|
||||
parser.add_option("--shared-cares-libname",
|
||||
action="store",
|
||||
dest="shared_cares_libname",
|
||||
help="Alternative lib name to link to (default: 'cares')")
|
||||
|
||||
parser.add_option("--shared-libuv",
|
||||
action="store_true",
|
||||
dest="shared_libuv",
|
||||
help="Link to a shared libuv DLL instead of static linking")
|
||||
|
||||
parser.add_option("--shared-libuv-includes",
|
||||
action="store",
|
||||
dest="shared_libuv_includes",
|
||||
help="Directory containing libuv header files")
|
||||
|
||||
parser.add_option("--shared-libuv-libpath",
|
||||
action="store",
|
||||
dest="shared_libuv_libpath",
|
||||
help="A directory to search for the shared libuv DLL")
|
||||
|
||||
parser.add_option("--shared-libuv-libname",
|
||||
action="store",
|
||||
dest="shared_libuv_libname",
|
||||
help="Alternative lib name to link to (default: 'uv')")
|
||||
|
||||
parser.add_option("--with-dtrace",
|
||||
action="store_true",
|
||||
dest="with_dtrace",
|
||||
help="Build with DTrace (default is true on sunos)")
|
||||
|
||||
parser.add_option("--without-dtrace",
|
||||
action="store_true",
|
||||
dest="without_dtrace",
|
||||
help="Build without DTrace")
|
||||
|
||||
parser.add_option("--with-etw",
|
||||
action="store_true",
|
||||
dest="with_etw",
|
||||
help="Build with ETW (default is true on Windows)")
|
||||
|
||||
parser.add_option("--without-etw",
|
||||
action="store_true",
|
||||
dest="without_etw",
|
||||
help="Build without ETW")
|
||||
|
||||
parser.add_option("--with-perfctr",
|
||||
action="store_true",
|
||||
dest="with_perfctr",
|
||||
help="Build with performance counters (default is true on Windows)")
|
||||
|
||||
parser.add_option("--without-perfctr",
|
||||
action="store_true",
|
||||
dest="without_perfctr",
|
||||
help="Build without performance counters")
|
||||
|
||||
# CHECKME does this still work with recent releases of V8?
|
||||
parser.add_option("--gdb",
|
||||
action="store_true",
|
||||
dest="gdb",
|
||||
help="add gdb support")
|
||||
|
||||
parser.add_option("--dest-cpu",
|
||||
action="store",
|
||||
dest="dest_cpu",
|
||||
help="CPU architecture to build for. Valid values are: arm, ia32, x64")
|
||||
|
||||
parser.add_option("--dest-os",
|
||||
action="store",
|
||||
dest="dest_os",
|
||||
help="Operating system to build for. Valid values are: "
|
||||
"win, mac, solaris, freebsd, openbsd, linux")
|
||||
|
||||
parser.add_option("--no-ifaddrs",
|
||||
action="store_true",
|
||||
dest="no_ifaddrs",
|
||||
help="Use on deprecated SunOS systems that do not support ifaddrs.h")
|
||||
|
||||
parser.add_option("--with-arm-float-abi",
|
||||
action="store",
|
||||
dest="arm_float_abi",
|
||||
help="Specifies which floating-point ABI to use. Valid values are: "
|
||||
"soft, softfp, hard")
|
||||
|
||||
parser.add_option("--ninja",
|
||||
action="store_true",
|
||||
dest="use_ninja",
|
||||
help="Generate files for the ninja build system")
|
||||
|
||||
# Using --unsafe-optimizations voids your warranty.
|
||||
parser.add_option("--unsafe-optimizations",
|
||||
action="store_true",
|
||||
dest="unsafe_optimizations",
|
||||
help=optparse.SUPPRESS_HELP)
|
||||
|
||||
parser.add_option("--xcode",
|
||||
action="store_true",
|
||||
dest="use_xcode",
|
||||
help="Generate build files for use with xcode")
|
||||
|
||||
parser.add_option("--tag",
|
||||
action="store",
|
||||
dest="tag",
|
||||
help="Custom build tag")
|
||||
parser.add_option('--xcode',
|
||||
action='store_true',
|
||||
dest='use_xcode',
|
||||
help='generate build files for use with xcode')
|
||||
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
@@ -342,7 +337,7 @@ def is_arm_neon():
|
||||
return '__ARM_NEON__' in cc_macros()
|
||||
|
||||
|
||||
def arm_hard_float_abi():
|
||||
def is_arm_hard_float_abi():
|
||||
"""Check for hardfloat or softfloat eabi on ARM"""
|
||||
# GCC versions 4.6 and above define __ARM_PCS or __ARM_PCS_VFP to specify
|
||||
# the Floating Point ABI used (PCS stands for Procedure Call Standard).
|
||||
@@ -411,43 +406,39 @@ def host_arch_win():
|
||||
|
||||
def compiler_version():
|
||||
try:
|
||||
proc = subprocess.Popen(shlex.split(CC) + ['--version'], stdout=subprocess.PIPE)
|
||||
proc = subprocess.Popen(shlex.split(CC) + ['--version'],
|
||||
stdout=subprocess.PIPE)
|
||||
except WindowsError:
|
||||
return (0, False)
|
||||
|
||||
is_clang = 'clang' in proc.communicate()[0].split('\n')[0]
|
||||
|
||||
proc = subprocess.Popen(shlex.split(CC) + ['-dumpversion'], stdout=subprocess.PIPE)
|
||||
proc = subprocess.Popen(shlex.split(CC) + ['-dumpversion'],
|
||||
stdout=subprocess.PIPE)
|
||||
version = tuple(map(int, proc.communicate()[0].split('.')))
|
||||
|
||||
return (version, is_clang)
|
||||
|
||||
|
||||
def configure_arm(o):
|
||||
# V8 on ARM requires that armv7 is set. CPU Model detected by
|
||||
# the presence of __ARM_ARCH_7__ and the like defines in compiler
|
||||
if options.arm_float_abi:
|
||||
hard_float = options.arm_float_abi == 'hard'
|
||||
arm_float_abi = options.arm_float_abi
|
||||
else:
|
||||
hard_float = arm_hard_float_abi()
|
||||
|
||||
armv7 = is_arch_armv7()
|
||||
# CHECKME VFPv3 implies ARMv7+ but is the reverse true as well?
|
||||
fpu = 'vfpv3' if armv7 else 'vfpv2'
|
||||
|
||||
o['variables']['armv7'] = int(armv7)
|
||||
o['variables']['arm_fpu'] = fpu
|
||||
arm_float_abi = 'hard' if is_arm_hard_float_abi() else 'default'
|
||||
o['variables']['armv7'] = int(is_arch_armv7())
|
||||
o['variables']['arm_fpu'] = 'vfpv3' # V8 3.18 no longer supports VFP2.
|
||||
o['variables']['arm_neon'] = int(is_arm_neon())
|
||||
o['variables']['v8_use_arm_eabi_hardfloat'] = b(hard_float)
|
||||
o['variables']['arm_thumb'] = 0 # -marm
|
||||
o['variables']['arm_float_abi'] = arm_float_abi
|
||||
|
||||
|
||||
def configure_node(o):
|
||||
if options.dest_os == 'android':
|
||||
o['variables']['OS'] = 'android'
|
||||
o['variables']['v8_enable_gdbjit'] = 1 if options.gdb else 0
|
||||
o['variables']['v8_no_strict_aliasing'] = 1 # work around compiler bugs
|
||||
o['variables']['node_prefix'] = os.path.expanduser(options.prefix or '')
|
||||
o['variables']['node_install_npm'] = b(not options.without_npm)
|
||||
o['variables']['node_unsafe_optimizations'] = (
|
||||
1 if options.unsafe_optimizations else 0)
|
||||
o['default_configuration'] = 'Debug' if options.debug else 'Release'
|
||||
|
||||
host_arch = host_arch_win() if os.name == 'nt' else host_arch_cc()
|
||||
@@ -473,6 +464,8 @@ def configure_node(o):
|
||||
# SunOS, and we haven't implemented it.)
|
||||
if flavor in ('solaris', 'mac'):
|
||||
o['variables']['node_use_dtrace'] = b(not options.without_dtrace)
|
||||
o['variables']['uv_use_dtrace'] = o['variables']['node_use_dtrace']
|
||||
o['variables']['uv_parent_path'] = '/deps/uv/'
|
||||
elif flavor == 'linux':
|
||||
o['variables']['node_use_dtrace'] = 'false'
|
||||
o['variables']['node_use_systemtap'] = b(options.with_dtrace)
|
||||
@@ -485,12 +478,19 @@ def configure_node(o):
|
||||
o['variables']['node_use_dtrace'] = 'false'
|
||||
o['variables']['node_use_systemtap'] = 'false'
|
||||
|
||||
# if we're on illumos based systems wrap the helper library into the
|
||||
# executable
|
||||
if flavor == 'solaris':
|
||||
o['variables']['node_use_mdb'] = 'true'
|
||||
else:
|
||||
o['variables']['node_use_mdb'] = 'false'
|
||||
|
||||
if options.no_ifaddrs:
|
||||
o['defines'] += ['SUNOS_NO_IFADDRS']
|
||||
|
||||
# By default, enable ETW on Windows.
|
||||
if flavor == 'win':
|
||||
o['variables']['node_use_etw'] = b(not options.without_etw);
|
||||
o['variables']['node_use_etw'] = b(not options.without_etw)
|
||||
elif options.with_etw:
|
||||
raise Exception('ETW is only supported on Windows.')
|
||||
else:
|
||||
@@ -498,7 +498,7 @@ def configure_node(o):
|
||||
|
||||
# By default, enable Performance counters on Windows.
|
||||
if flavor == 'win':
|
||||
o['variables']['node_use_perfctr'] = b(not options.without_perfctr);
|
||||
o['variables']['node_use_perfctr'] = b(not options.without_perfctr)
|
||||
elif options.with_perfctr:
|
||||
raise Exception('Performance counter is only supported on Windows.')
|
||||
else:
|
||||
@@ -588,7 +588,9 @@ def configure_openssl(o):
|
||||
if options.without_ssl:
|
||||
return
|
||||
|
||||
if options.no_ssl2:
|
||||
# OpenSSL uses `#ifndef OPENSSL_NO_SSL2` checks so only define the
|
||||
# macro when we want to _disable_ SSL2.
|
||||
if not options.with_sslv2:
|
||||
o['defines'] += ['OPENSSL_NO_SSL2=1']
|
||||
|
||||
if options.shared_openssl:
|
||||
@@ -613,22 +615,24 @@ def configure_winsdk(o):
|
||||
if flavor != 'win':
|
||||
return
|
||||
|
||||
winsdk_dir = os.environ.get("WindowsSdkDir")
|
||||
winsdk_dir = os.environ.get('WindowsSdkDir')
|
||||
|
||||
if winsdk_dir and os.path.isfile(winsdk_dir + '\\bin\\ctrpp.exe'):
|
||||
print "Found ctrpp in WinSDK--will build generated files into tools/msvs/genfiles."
|
||||
print('Found ctrpp in WinSDK--will build generated files '
|
||||
'into tools/msvs/genfiles.')
|
||||
o['variables']['node_has_winsdk'] = 'true'
|
||||
return
|
||||
|
||||
print "ctrpp not found in WinSDK path--using pre-gen files from tools/msvs/genfiles."
|
||||
print('ctrpp not found in WinSDK path--using pre-gen files '
|
||||
'from tools/msvs/genfiles.')
|
||||
|
||||
|
||||
# determine the "flavor" (operating system) we're building for,
|
||||
# leveraging gyp's GetFlavor function
|
||||
flavor_params = {};
|
||||
flavor_params = {}
|
||||
if (options.dest_os):
|
||||
flavor_params['flavor'] = options.dest_os;
|
||||
flavor = GetFlavor(flavor_params);
|
||||
flavor_params['flavor'] = options.dest_os
|
||||
flavor = GetFlavor(flavor_params)
|
||||
|
||||
output = {
|
||||
'variables': { 'python': sys.executable },
|
||||
@@ -647,6 +651,7 @@ configure_v8(output)
|
||||
configure_openssl(output)
|
||||
configure_winsdk(output)
|
||||
|
||||
|
||||
# variables should be a root level element,
|
||||
# move everything else to target_defaults
|
||||
variables = output['variables']
|
||||
@@ -659,12 +664,12 @@ pprint.pprint(output, indent=2)
|
||||
|
||||
def write(filename, data):
|
||||
filename = os.path.join(root_dir, filename)
|
||||
print "creating ", filename
|
||||
print 'creating ', filename
|
||||
f = open(filename, 'w+')
|
||||
f.write(data)
|
||||
|
||||
write('config.gypi', "# Do not edit. Generated by the configure script.\n" +
|
||||
pprint.pformat(output, indent=2) + "\n")
|
||||
write('config.gypi', '# Do not edit. Generated by the configure script.\n' +
|
||||
pprint.pformat(output, indent=2) + '\n')
|
||||
|
||||
config = {
|
||||
'BUILDTYPE': 'Debug' if options.debug else 'Release',
|
||||
@@ -672,6 +677,10 @@ config = {
|
||||
'USE_XCODE': str(int(options.use_xcode or 0)),
|
||||
'PYTHON': sys.executable,
|
||||
}
|
||||
|
||||
if options.prefix:
|
||||
config['PREFIX'] = options.prefix
|
||||
|
||||
config = '\n'.join(map('='.join, config.iteritems())) + '\n'
|
||||
|
||||
write('config.mk',
|
||||
|
||||
6
deps/cares/.gitignore
vendored
6
deps/cares/.gitignore
vendored
@@ -1,10 +1,10 @@
|
||||
/Debug/
|
||||
/build/gyp
|
||||
/out/
|
||||
/Release/
|
||||
|
||||
/cares.Makefile
|
||||
/cares.target.mk
|
||||
/Makefile
|
||||
|
||||
/*.opensdf
|
||||
/*.sdf
|
||||
@@ -13,3 +13,7 @@
|
||||
/*.vcxproj
|
||||
/*.vcxproj.filters
|
||||
/*.vcxproj.user
|
||||
|
||||
*.so
|
||||
*.[oa]
|
||||
.buildstamp
|
||||
|
||||
4
deps/uv/Makefile → deps/cares/Makefile
vendored
4
deps/uv/Makefile → deps/cares/Makefile
vendored
@@ -46,8 +46,8 @@ Makefile:: ;
|
||||
# Turn everything else into a no-op rule that depends on the build directory.
|
||||
%:: $(builddir_name) ;
|
||||
|
||||
.PHONY: clean distclean
|
||||
clean distclean:
|
||||
.PHONY: clean
|
||||
clean:
|
||||
$(RM) -fr $(builddir_name)
|
||||
|
||||
endif
|
||||
21
deps/cares/android-configure
vendored
Executable file
21
deps/cares/android-configure
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
export TOOLCHAIN=$PWD/android-toolchain
|
||||
mkdir -p $TOOLCHAIN
|
||||
$1/build/tools/make-standalone-toolchain.sh \
|
||||
--toolchain=arm-linux-androideabi-4.7 \
|
||||
--arch=arm \
|
||||
--install-dir=$TOOLCHAIN \
|
||||
--platform=android-9
|
||||
export PATH=$TOOLCHAIN/bin:$PATH
|
||||
export AR=arm-linux-androideabi-ar
|
||||
export CC=arm-linux-androideabi-gcc
|
||||
export CXX=arm-linux-androideabi-g++
|
||||
export LINK=arm-linux-androideabi-g++
|
||||
export PLATFORM=android
|
||||
export OS=android
|
||||
|
||||
if [ $2 -a $2 == 'gyp' ]
|
||||
then
|
||||
./gyp_cares -DOS=android -Dtarget_arch=arm
|
||||
fi
|
||||
147
deps/cares/build.mk
vendored
Normal file
147
deps/cares/build.mk
vendored
Normal file
@@ -0,0 +1,147 @@
|
||||
# Copyright Joyent, Inc. and other Node contributors. All rights reserved.
|
||||
#
|
||||
# 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.
|
||||
|
||||
OS ?= $(shell sh -c 'uname -s | tr "[A-Z]" "[a-z]"')
|
||||
|
||||
OBJS= \
|
||||
src/ares_cancel.o \
|
||||
src/ares__close_sockets.o \
|
||||
src/ares_create_query.o \
|
||||
src/ares_data.o \
|
||||
src/ares_destroy.o \
|
||||
src/ares_expand_name.o \
|
||||
src/ares_expand_string.o \
|
||||
src/ares_fds.o \
|
||||
src/ares_free_hostent.o \
|
||||
src/ares_free_string.o \
|
||||
src/ares_gethostbyaddr.o \
|
||||
src/ares_gethostbyname.o \
|
||||
src/ares__get_hostent.o \
|
||||
src/ares_getnameinfo.o \
|
||||
src/ares_getopt.o \
|
||||
src/ares_getsock.o \
|
||||
src/ares_init.o \
|
||||
src/ares_library_init.o \
|
||||
src/ares_llist.o \
|
||||
src/ares_mkquery.o \
|
||||
src/ares_nowarn.o \
|
||||
src/ares_options.o \
|
||||
src/ares_parse_aaaa_reply.o \
|
||||
src/ares_parse_a_reply.o \
|
||||
src/ares_parse_mx_reply.o \
|
||||
src/ares_parse_naptr_reply.o \
|
||||
src/ares_parse_ns_reply.o \
|
||||
src/ares_parse_ptr_reply.o \
|
||||
src/ares_parse_soa_reply.o \
|
||||
src/ares_parse_srv_reply.o \
|
||||
src/ares_parse_txt_reply.o \
|
||||
src/ares_process.o \
|
||||
src/ares_query.o \
|
||||
src/ares__read_line.o \
|
||||
src/ares_search.o \
|
||||
src/ares_send.o \
|
||||
src/ares_strcasecmp.o \
|
||||
src/ares_strdup.o \
|
||||
src/ares_strerror.o \
|
||||
src/ares_timeout.o \
|
||||
src/ares__timeval.o \
|
||||
src/ares_version.o \
|
||||
src/ares_writev.o \
|
||||
src/bitncmp.o \
|
||||
src/inet_net_pton.o \
|
||||
src/inet_ntop.o \
|
||||
|
||||
CFLAGS += -I. -I$(SRCDIR)/include -DHAVE_CONFIG_H
|
||||
|
||||
ARES_CONFIG_OS = $(OS)
|
||||
SOEXT = so
|
||||
|
||||
# if on windows
|
||||
ifneq (,$(findstring mingw,$(OS)))
|
||||
ARES_CONFIG_OS = win32
|
||||
OBJS += src/windows_port.o
|
||||
OBJS += src/ares_getenv.o
|
||||
OBJS += src/ares_platform.o
|
||||
|
||||
LDFLAGS += -lws2_32.lib -liphlpapi.lib
|
||||
else # else a posix system
|
||||
CFLAGS += -g --std=gnu89 -pedantic
|
||||
CFLAGS += -Wall -Wextra -Wno-unused-parameter
|
||||
CFLAGS += -D_LARGEFILE_SOURCE
|
||||
CFLAGS += -D_FILE_OFFSET_BITS=64
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring cygwin,$(OS)))
|
||||
ARES_CONFIG_OS = cygwin
|
||||
CFLAGS += -D_GNU_SOURCE
|
||||
endif
|
||||
|
||||
ifeq (dragonflybsd,$(OS))
|
||||
ARES_CONFIG_OS = freebsd
|
||||
endif
|
||||
|
||||
ifeq (darwin,$(OS))
|
||||
CFLAGS += -D_DARWIN_USE_64_BIT_INODE=1
|
||||
LDFLAGS += -dynamiclib -install_name "@rpath/libcares.dylib"
|
||||
SOEXT = dylib
|
||||
endif
|
||||
|
||||
ifeq (linux,$(OS))
|
||||
CFLAGS += -D_GNU_SOURCE
|
||||
endif
|
||||
|
||||
ifeq (android,$(OS))
|
||||
CFLAGS += -D_GNU_SOURCE
|
||||
endif
|
||||
|
||||
ifeq (sunos,$(OS))
|
||||
LDFLAGS += -lsocket -lnsl
|
||||
CFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=500
|
||||
endif
|
||||
|
||||
CFLAGS += -I$(SRCDIR)/config/$(ARES_CONFIG_OS)
|
||||
|
||||
ifneq (,$(findstring libcares.$(SOEXT),$(MAKECMDGOALS)))
|
||||
CFLAGS += -DCARES_BUILDING_LIBRARY
|
||||
else
|
||||
CFLAGS += -DCARES_STATICLIB
|
||||
endif
|
||||
|
||||
all: libcares.a
|
||||
|
||||
src/.buildstamp:
|
||||
mkdir -p $(dir $@)
|
||||
touch $@
|
||||
|
||||
libcares.a: $(OBJS)
|
||||
$(AR) rcs $@ $^
|
||||
|
||||
libcares.$(SOEXT): override CFLAGS += -fPIC
|
||||
libcares.$(SOEXT): $(OBJS:%.o=%.pic.o)
|
||||
$(CC) -shared -o $@ $^ $(LDFLAGS)
|
||||
|
||||
src/%.o src/%.pic.o: src/%.c include/ares.h include/ares_version.h \
|
||||
include/nameser.h src/.buildstamp \
|
||||
$(SRCDIR)/config/$(ARES_CONFIG_OS)/ares_config.h
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
$(RM) -f libcares.a libcares.$(SOEXT) src/*.o src/.buildstamp
|
||||
14
deps/cares/cares.gyp
vendored
14
deps/cares/cares.gyp
vendored
@@ -34,6 +34,7 @@
|
||||
'include/nameser.h',
|
||||
'src/ares_cancel.c',
|
||||
'src/ares__close_sockets.c',
|
||||
'src/ares_create_query.c',
|
||||
'src/ares_data.c',
|
||||
'src/ares_data.h',
|
||||
'src/ares_destroy.c',
|
||||
@@ -92,9 +93,8 @@
|
||||
'src/bitncmp.c',
|
||||
'src/bitncmp.h',
|
||||
'src/inet_net_pton.c',
|
||||
'src/inet_net_pton.h',
|
||||
'src/inet_ntop.c',
|
||||
'src/inet_ntop.h',
|
||||
'src/ares_inet_net_pton.h',
|
||||
'src/setup_once.h',
|
||||
'src/windows_port.c'
|
||||
],
|
||||
@@ -121,13 +121,17 @@
|
||||
# Not Windows i.e. POSIX
|
||||
'cflags': [
|
||||
'-g',
|
||||
'--std=gnu89',
|
||||
'-pedantic',
|
||||
'-Wall',
|
||||
'-Wextra',
|
||||
'-Wno-unused-parameter'
|
||||
],
|
||||
}],
|
||||
[ 'OS not in "win android"', {
|
||||
'cflags': [
|
||||
'--std=gnu89'
|
||||
],
|
||||
}],
|
||||
[ 'OS=="linux"', {
|
||||
'include_dirs': [ 'config/linux' ],
|
||||
'sources': [ 'config/linux/ares_config.h' ]
|
||||
@@ -144,6 +148,10 @@
|
||||
'include_dirs': [ 'config/openbsd' ],
|
||||
'sources': [ 'config/openbsd/ares_config.h' ]
|
||||
}],
|
||||
[ 'OS=="android"', {
|
||||
'include_dirs': [ 'config/android' ],
|
||||
'sources': [ 'config/android/ares_config.h' ],
|
||||
}],
|
||||
[ 'OS=="solaris"', {
|
||||
'include_dirs': [ 'config/sunos' ],
|
||||
'sources': [ 'config/sunos/ares_config.h' ],
|
||||
|
||||
2
deps/cares/common.gypi
vendored
2
deps/cares/common.gypi
vendored
@@ -137,7 +137,7 @@
|
||||
],
|
||||
}],
|
||||
|
||||
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
|
||||
[ 'OS in "linux freebsd openbsd solaris android"', {
|
||||
'variables': {
|
||||
'gcc_version%': '<!(python build/gcc_version.py)>)'
|
||||
},
|
||||
|
||||
512
deps/cares/config/android/ares_config.h
vendored
Normal file
512
deps/cares/config/android/ares_config.h
vendored
Normal file
@@ -0,0 +1,512 @@
|
||||
/* ares_config.h. Generated from ares_config.h.in by configure. */
|
||||
/* ares_config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define if building universal (internal helper macro) */
|
||||
/* #undef AC_APPLE_UNIVERSAL_BUILD */
|
||||
|
||||
/* define this if ares is built for a big endian system */
|
||||
/* #undef ARES_BIG_ENDIAN */
|
||||
|
||||
/* when building as static part of libcurl */
|
||||
/* #undef BUILDING_LIBCURL */
|
||||
|
||||
/* when building c-ares library */
|
||||
/* #undef CARES_BUILDING_LIBRARY */
|
||||
|
||||
/* when not building a shared library */
|
||||
/* #undef CARES_STATICLIB */
|
||||
|
||||
/* Define to 1 to enable hiding of library internal symbols. */
|
||||
#define CARES_SYMBOL_HIDING 1
|
||||
|
||||
/* Definition to make a library symbol externally visible. */
|
||||
#define CARES_SYMBOL_SCOPE_EXTERN __attribute__ ((visibility ("default")))
|
||||
|
||||
/* if a /etc/inet dir is being used */
|
||||
/* #undef ETC_INET */
|
||||
|
||||
/* Define to the type qualifier of arg 1 for getnameinfo. */
|
||||
#define GETNAMEINFO_QUAL_ARG1 const
|
||||
|
||||
/* Define to the type of arg 1 for getnameinfo. */
|
||||
#define GETNAMEINFO_TYPE_ARG1 struct sockaddr *
|
||||
|
||||
/* Define to the type of arg 2 for getnameinfo. */
|
||||
#define GETNAMEINFO_TYPE_ARG2 socklen_t
|
||||
|
||||
/* Define to the type of args 4 and 6 for getnameinfo. */
|
||||
#define GETNAMEINFO_TYPE_ARG46 size_t
|
||||
|
||||
/* Define to the type of arg 7 for getnameinfo. */
|
||||
#define GETNAMEINFO_TYPE_ARG7 unsigned int
|
||||
|
||||
/* Specifies the number of arguments to getservbyport_r */
|
||||
#define GETSERVBYPORT_R_ARGS 6
|
||||
|
||||
/* Specifies the size of the buffer to pass to getservbyport_r */
|
||||
#define GETSERVBYPORT_R_BUFSIZE 4096
|
||||
|
||||
/* Define to 1 if you have AF_INET6. */
|
||||
#define HAVE_AF_INET6 1
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#define HAVE_ARPA_INET_H 1
|
||||
|
||||
/* Define to 1 if you have the <arpa/nameser_compat.h> header file. */
|
||||
//#define HAVE_ARPA_NAMESER_COMPAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <arpa/nameser.h> header file. */
|
||||
//#define HAVE_ARPA_NAMESER_H 1
|
||||
|
||||
/* Define to 1 if you have the <assert.h> header file. */
|
||||
#define HAVE_ASSERT_H 1
|
||||
|
||||
/* Define to 1 if you have the `bitncmp' function. */
|
||||
/* #undef HAVE_BITNCMP */
|
||||
|
||||
/* Define to 1 if bool is an available type. */
|
||||
#define HAVE_BOOL_T 1
|
||||
|
||||
/* Define to 1 if you have the clock_gettime function and monotonic timer. */
|
||||
#define HAVE_CLOCK_GETTIME_MONOTONIC 1
|
||||
|
||||
/* Define to 1 if you have the closesocket function. */
|
||||
/* #undef HAVE_CLOSESOCKET */
|
||||
|
||||
/* Define to 1 if you have the CloseSocket camel case function. */
|
||||
/* #undef HAVE_CLOSESOCKET_CAMEL */
|
||||
|
||||
/* Define to 1 if you have the connect function. */
|
||||
#define HAVE_CONNECT 1
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
/* Define to 1 if you have the <errno.h> header file. */
|
||||
#define HAVE_ERRNO_H 1
|
||||
|
||||
/* Define to 1 if you have the fcntl function. */
|
||||
#define HAVE_FCNTL 1
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* Define to 1 if you have a working fcntl O_NONBLOCK function. */
|
||||
#define HAVE_FCNTL_O_NONBLOCK 1
|
||||
|
||||
/* Define to 1 if you have the freeaddrinfo function. */
|
||||
#define HAVE_FREEADDRINFO 1
|
||||
|
||||
/* Define to 1 if you have a working getaddrinfo function. */
|
||||
#define HAVE_GETADDRINFO 1
|
||||
|
||||
/* Define to 1 if the getaddrinfo function is threadsafe. */
|
||||
#define HAVE_GETADDRINFO_THREADSAFE 1
|
||||
|
||||
/* Define to 1 if you have the gethostbyaddr function. */
|
||||
#define HAVE_GETHOSTBYADDR 1
|
||||
|
||||
/* Define to 1 if you have the gethostbyname function. */
|
||||
#define HAVE_GETHOSTBYNAME 1
|
||||
|
||||
/* Define to 1 if you have the gethostname function. */
|
||||
#define HAVE_GETHOSTNAME 1
|
||||
|
||||
/* Define to 1 if you have the getnameinfo function. */
|
||||
#define HAVE_GETNAMEINFO 1
|
||||
|
||||
/* Define to 1 if you have the getservbyport_r function. */
|
||||
#define HAVE_GETSERVBYPORT_R 1
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
|
||||
/* Define to 1 if you have the `if_indextoname' function. */
|
||||
#define HAVE_IF_INDEXTONAME 1
|
||||
|
||||
/* Define to 1 if you have the `inet_net_pton' function. */
|
||||
/* #undef HAVE_INET_NET_PTON */
|
||||
|
||||
/* Define to 1 if inet_net_pton supports IPv6. */
|
||||
/* #undef HAVE_INET_NET_PTON_IPV6 */
|
||||
|
||||
/* Define to 1 if you have a IPv6 capable working inet_ntop function. */
|
||||
#define HAVE_INET_NTOP 1
|
||||
|
||||
/* Define to 1 if you have a IPv6 capable working inet_pton function. */
|
||||
#define HAVE_INET_PTON 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the ioctl function. */
|
||||
#define 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. */
|
||||
#define HAVE_IOCTL_FIONBIO 1
|
||||
|
||||
/* Define to 1 if you have a working ioctl SIOCGIFADDR function. */
|
||||
#define HAVE_IOCTL_SIOCGIFADDR 1
|
||||
|
||||
/* Define to 1 if you have the `resolve' library (-lresolve). */
|
||||
/* #undef HAVE_LIBRESOLVE */
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* if your compiler supports LL */
|
||||
#define HAVE_LL 1
|
||||
|
||||
/* Define to 1 if the compiler supports the 'long long' data type. */
|
||||
#define HAVE_LONGLONG 1
|
||||
|
||||
/* Define to 1 if you have the malloc.h header file. */
|
||||
#define HAVE_MALLOC_H 1
|
||||
|
||||
/* Define to 1 if you have the memory.h header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the MSG_NOSIGNAL flag. */
|
||||
#define HAVE_MSG_NOSIGNAL 1
|
||||
|
||||
/* Define to 1 if you have the <netdb.h> header file. */
|
||||
#define HAVE_NETDB_H 1
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#define HAVE_NETINET_IN_H 1
|
||||
|
||||
/* Define to 1 if you have the <netinet/tcp.h> header file. */
|
||||
#define HAVE_NETINET_TCP_H 1
|
||||
|
||||
/* Define to 1 if you have the <net/if.h> header file. */
|
||||
#define HAVE_NET_IF_H 1
|
||||
|
||||
/* Define to 1 if you have PF_INET6. */
|
||||
#define HAVE_PF_INET6 1
|
||||
|
||||
/* Define to 1 if you have the recv function. */
|
||||
#define HAVE_RECV 1
|
||||
|
||||
/* Define to 1 if you have the recvfrom function. */
|
||||
#define HAVE_RECVFROM 1
|
||||
|
||||
/* Define to 1 if you have the send function. */
|
||||
#define HAVE_SEND 1
|
||||
|
||||
/* Define to 1 if you have the setsockopt function. */
|
||||
#define 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 <signal.h> header file. */
|
||||
#define HAVE_SIGNAL_H 1
|
||||
|
||||
/* Define to 1 if sig_atomic_t is an available typedef. */
|
||||
#define HAVE_SIG_ATOMIC_T 1
|
||||
|
||||
/* Define to 1 if sig_atomic_t is already defined as volatile. */
|
||||
/* #undef HAVE_SIG_ATOMIC_T_VOLATILE */
|
||||
|
||||
/* Define to 1 if your struct sockaddr_in6 has sin6_scope_id. */
|
||||
#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
|
||||
|
||||
/* Define to 1 if you have the socket function. */
|
||||
#define HAVE_SOCKET 1
|
||||
|
||||
/* Define to 1 if you have the <socket.h> header file. */
|
||||
/* #undef HAVE_SOCKET_H */
|
||||
|
||||
/* Define to 1 if you have the <stdbool.h> header file. */
|
||||
#define HAVE_STDBOOL_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the strcasecmp function. */
|
||||
#define HAVE_STRCASECMP 1
|
||||
|
||||
/* Define to 1 if you have the strcmpi function. */
|
||||
/* #undef HAVE_STRCMPI */
|
||||
|
||||
/* Define to 1 if you have the strdup function. */
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
/* Define to 1 if you have the stricmp function. */
|
||||
/* #undef HAVE_STRICMP */
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the strncasecmp function. */
|
||||
#define HAVE_STRNCASECMP 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. */
|
||||
#define HAVE_STROPTS_H 1
|
||||
|
||||
/* Define to 1 if you have struct addrinfo. */
|
||||
#define HAVE_STRUCT_ADDRINFO 1
|
||||
|
||||
/* Define to 1 if you have struct in6_addr. */
|
||||
#define HAVE_STRUCT_IN6_ADDR 1
|
||||
|
||||
/* Define to 1 if you have struct sockaddr_in6. */
|
||||
#define HAVE_STRUCT_SOCKADDR_IN6 1
|
||||
|
||||
/* if struct sockaddr_storage is defined */
|
||||
#define HAVE_STRUCT_SOCKADDR_STORAGE 1
|
||||
|
||||
/* Define to 1 if you have the timeval struct. */
|
||||
#define HAVE_STRUCT_TIMEVAL 1
|
||||
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
#define HAVE_SYS_IOCTL_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#define HAVE_SYS_PARAM_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||
#define HAVE_SYS_SELECT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/uio.h> header file. */
|
||||
#define HAVE_SYS_UIO_H 1
|
||||
|
||||
/* Define to 1 if you have the <time.h> header file. */
|
||||
#define HAVE_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to 1 if you have the windows.h header file. */
|
||||
/* #undef HAVE_WINDOWS_H */
|
||||
|
||||
/* Define to 1 if you have the winsock2.h header file. */
|
||||
/* #undef HAVE_WINSOCK2_H */
|
||||
|
||||
/* Define to 1 if you have the winsock.h header file. */
|
||||
/* #undef HAVE_WINSOCK_H */
|
||||
|
||||
/* Define to 1 if you have the writev function. */
|
||||
#define HAVE_WRITEV 1
|
||||
|
||||
/* Define to 1 if you have the ws2tcpip.h header file. */
|
||||
/* #undef HAVE_WS2TCPIP_H */
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#define LT_OBJDIR ".libs/"
|
||||
|
||||
/* Define to 1 if you are building a native Windows target. */
|
||||
/* #undef NATIVE_WINDOWS */
|
||||
|
||||
/* Define to 1 if you need the malloc.h header file even with stdlib.h */
|
||||
/* #undef NEED_MALLOC_H */
|
||||
|
||||
/* Define to 1 if you need the memory.h header file even with stdlib.h */
|
||||
/* #undef NEED_MEMORY_H */
|
||||
|
||||
/* Define to 1 if _REENTRANT preprocessor symbol must be defined. */
|
||||
/* #undef NEED_REENTRANT */
|
||||
|
||||
/* Define to 1 if _THREAD_SAFE preprocessor symbol must be defined. */
|
||||
/* #undef NEED_THREAD_SAFE */
|
||||
|
||||
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||
/* #undef NO_MINUS_C_MINUS_O */
|
||||
|
||||
/* cpu-machine-OS */
|
||||
#define OS "i686-pc-linux-gnu"
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "c-ares"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "c-ares mailing list => http://cool.haxx.se/mailman/listinfo/c-ares"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "c-ares"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "c-ares 1.7.1"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "c-ares"
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#define PACKAGE_URL ""
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "1.7.1"
|
||||
|
||||
/* a suitable file/device to read random data from */
|
||||
#define RANDOM_FILE "/dev/urandom"
|
||||
|
||||
/* Define to the type of arg 1 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG1 int
|
||||
|
||||
/* Define to the type pointed by arg 2 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG2 void
|
||||
|
||||
/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */
|
||||
#define RECVFROM_TYPE_ARG2_IS_VOID 1
|
||||
|
||||
/* Define to the type of arg 3 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG3 size_t
|
||||
|
||||
/* Define to the type of arg 4 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG4 int
|
||||
|
||||
/* Define to the type pointed by arg 5 for recvfrom. */
|
||||
#define RECVFROM_TYPE_ARG5 struct sockaddr
|
||||
|
||||
/* 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. */
|
||||
#define RECVFROM_TYPE_ARG6 socklen_t
|
||||
|
||||
/* 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. */
|
||||
#define RECVFROM_TYPE_RETV int
|
||||
|
||||
/* Define to the type of arg 1 for recv. */
|
||||
#define RECV_TYPE_ARG1 int
|
||||
|
||||
/* Define to the type of arg 2 for recv. */
|
||||
#define RECV_TYPE_ARG2 void *
|
||||
|
||||
/* Define to the type of arg 3 for recv. */
|
||||
#define RECV_TYPE_ARG3 size_t
|
||||
|
||||
/* Define to the type of arg 4 for recv. */
|
||||
#define RECV_TYPE_ARG4 int
|
||||
|
||||
/* Define to the function return type for recv. */
|
||||
#define RECV_TYPE_RETV int
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* Define to the type qualifier of arg 2 for send. */
|
||||
#define SEND_QUAL_ARG2 const
|
||||
|
||||
/* Define to the type of arg 1 for send. */
|
||||
#define SEND_TYPE_ARG1 int
|
||||
|
||||
/* Define to the type of arg 2 for send. */
|
||||
#define SEND_TYPE_ARG2 void *
|
||||
|
||||
/* Define to the type of arg 3 for send. */
|
||||
#define SEND_TYPE_ARG3 size_t
|
||||
|
||||
/* Define to the type of arg 4 for send. */
|
||||
#define SEND_TYPE_ARG4 int
|
||||
|
||||
/* Define to the function return type for send. */
|
||||
#define SEND_TYPE_RETV int
|
||||
|
||||
/* The size of `int', as computed by sizeof. */
|
||||
#define SIZEOF_INT 4
|
||||
|
||||
/* The size of `long', as computed by sizeof. */
|
||||
#define SIZEOF_LONG 4
|
||||
|
||||
/* The size of `size_t', as computed by sizeof. */
|
||||
#define SIZEOF_SIZE_T 4
|
||||
|
||||
/* The size of `struct in6_addr', as computed by sizeof. */
|
||||
#define SIZEOF_STRUCT_IN6_ADDR 16
|
||||
|
||||
/* The size of `struct in_addr', as computed by sizeof. */
|
||||
#define SIZEOF_STRUCT_IN_ADDR 4
|
||||
|
||||
/* The size of `time_t', as computed by sizeof. */
|
||||
#define SIZEOF_TIME_T 4
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
/* Define to disable non-blocking sockets. */
|
||||
/* #undef USE_BLOCKING_SOCKETS */
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "1.7.1"
|
||||
|
||||
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||
#if defined AC_APPLE_UNIVERSAL_BUILD
|
||||
# if defined __BIG_ENDIAN__
|
||||
# define WORDS_BIGENDIAN 1
|
||||
# endif
|
||||
#else
|
||||
# ifndef WORDS_BIGENDIAN
|
||||
/* # undef WORDS_BIGENDIAN */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* 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. */
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
/* #undef _LARGE_FILES */
|
||||
|
||||
/* 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 `unsigned int' if <sys/types.h> does not define. */
|
||||
/* #undef size_t */
|
||||
|
||||
/* the signed version of size_t */
|
||||
/* #undef ssize_t */
|
||||
|
||||
#define HAVE_GETENV 1
|
||||
98
deps/cares/gyp_cares
vendored
Executable file
98
deps/cares/gyp_cares
vendored
Executable file
@@ -0,0 +1,98 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import glob
|
||||
import platform
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
CC = os.environ.get('CC', 'cc')
|
||||
script_dir = os.path.dirname(__file__)
|
||||
cares_root = os.path.normpath(script_dir)
|
||||
output_dir = os.path.join(os.path.abspath(cares_root), 'out')
|
||||
|
||||
sys.path.insert(0, os.path.join(cares_root, 'build', 'gyp', 'pylib'))
|
||||
try:
|
||||
import gyp
|
||||
except ImportError:
|
||||
print('You need to install gyp in build/gyp first. See the README.')
|
||||
sys.exit(42)
|
||||
|
||||
|
||||
def host_arch():
|
||||
machine = platform.machine()
|
||||
if machine == 'i386': return 'ia32'
|
||||
if machine == 'x86_64': return 'x64'
|
||||
if machine.startswith('arm'): return 'arm'
|
||||
return machine # Return as-is and hope for the best.
|
||||
|
||||
|
||||
def compiler_version():
|
||||
proc = subprocess.Popen(CC.split() + ['--version'], stdout=subprocess.PIPE)
|
||||
is_clang = 'clang' in proc.communicate()[0].split('\n')[0]
|
||||
proc = subprocess.Popen(CC.split() + ['-dumpversion'], stdout=subprocess.PIPE)
|
||||
version = proc.communicate()[0].split('.')
|
||||
version = map(int, version[:2])
|
||||
version = tuple(version)
|
||||
return (version, is_clang)
|
||||
|
||||
|
||||
def run_gyp(args):
|
||||
rc = gyp.main(args)
|
||||
if rc != 0:
|
||||
print 'Error running GYP'
|
||||
sys.exit(rc)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
args = sys.argv[1:]
|
||||
|
||||
# GYP bug.
|
||||
# On msvs it will crash if it gets an absolute path.
|
||||
# On Mac/make it will crash if it doesn't get an absolute path.
|
||||
if sys.platform == 'win32':
|
||||
args.append(os.path.join(cares_root, 'cares.gyp'))
|
||||
common_fn = os.path.join(cares_root, 'common.gypi')
|
||||
options_fn = os.path.join(cares_root, 'options.gypi')
|
||||
# we force vs 2010 over 2008 which would otherwise be the default for gyp
|
||||
if not os.environ.get('GYP_MSVS_VERSION'):
|
||||
os.environ['GYP_MSVS_VERSION'] = '2010'
|
||||
else:
|
||||
args.append(os.path.join(os.path.abspath(cares_root), 'cares.gyp'))
|
||||
common_fn = os.path.join(os.path.abspath(cares_root), 'common.gypi')
|
||||
options_fn = os.path.join(os.path.abspath(cares_root), 'options.gypi')
|
||||
|
||||
if os.path.exists(common_fn):
|
||||
args.extend(['-I', common_fn])
|
||||
|
||||
if os.path.exists(options_fn):
|
||||
args.extend(['-I', options_fn])
|
||||
|
||||
args.append('--depth=' + cares_root)
|
||||
|
||||
# There's a bug with windows which doesn't allow this feature.
|
||||
if sys.platform != 'win32':
|
||||
if '-f' not in args:
|
||||
args.extend('-f make'.split())
|
||||
if 'ninja' not in args:
|
||||
args.extend(['-Goutput_dir=' + output_dir])
|
||||
args.extend(['--generator-output', output_dir])
|
||||
(major, minor), is_clang = compiler_version()
|
||||
args.append('-Dgcc_version=%d' % (10 * major + minor))
|
||||
args.append('-Dclang=%d' % int(is_clang))
|
||||
|
||||
if not any(a.startswith('-Dhost_arch=') for a in args):
|
||||
args.append('-Dhost_arch=%s' % host_arch())
|
||||
|
||||
if not any(a.startswith('-Dtarget_arch=') for a in args):
|
||||
args.append('-Dtarget_arch=%s' % host_arch())
|
||||
|
||||
if not any(a.startswith('-Dlibrary=') for a in args):
|
||||
args.append('-Dlibrary=static_library')
|
||||
|
||||
if not any(a.startswith('-Dcomponent=') for a in args):
|
||||
args.append('-Dcomponent=static_library')
|
||||
|
||||
gyp_args = list(args)
|
||||
print gyp_args
|
||||
run_gyp(gyp_args)
|
||||
40
deps/cares/include/ares.h
vendored
40
deps/cares/include/ares.h
vendored
@@ -1,6 +1,6 @@
|
||||
|
||||
/* Copyright 1998, 2009 by the Massachusetts Institute of Technology.
|
||||
* Copyright (C) 2007-2011 by Daniel Stenberg
|
||||
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
* Copyright (C) 2007-2013 by Daniel Stenberg
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
@@ -123,22 +123,18 @@ extern "C" {
|
||||
** c-ares external API function linkage decorations.
|
||||
*/
|
||||
|
||||
#if !defined(CARES_STATICLIB) && \
|
||||
(defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__))
|
||||
/* __declspec function decoration for Win32 and Symbian DLL's */
|
||||
#ifdef CARES_STATICLIB
|
||||
# define CARES_EXTERN
|
||||
#elif defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)
|
||||
# if defined(CARES_BUILDING_LIBRARY)
|
||||
# define CARES_EXTERN __declspec(dllexport)
|
||||
# else
|
||||
# define CARES_EXTERN __declspec(dllimport)
|
||||
# endif
|
||||
#elif defined(CARES_BUILDING_LIBRARY) && defined(CARES_SYMBOL_HIDING)
|
||||
# define CARES_EXTERN CARES_SYMBOL_SCOPE_EXTERN
|
||||
#else
|
||||
/* visibility function decoration for other cases */
|
||||
# if !defined(CARES_SYMBOL_HIDING) || \
|
||||
defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)
|
||||
# define CARES_EXTERN
|
||||
# else
|
||||
# define CARES_EXTERN CARES_SYMBOL_SCOPE_EXTERN
|
||||
# endif
|
||||
# define CARES_EXTERN
|
||||
#endif
|
||||
|
||||
|
||||
@@ -191,6 +187,7 @@ extern "C" {
|
||||
#define ARES_FLAG_NOSEARCH (1 << 5)
|
||||
#define ARES_FLAG_NOALIASES (1 << 6)
|
||||
#define ARES_FLAG_NOCHECKRESP (1 << 7)
|
||||
#define ARES_FLAG_EDNS (1 << 8)
|
||||
|
||||
/* Option mask values */
|
||||
#define ARES_OPT_FLAGS (1 << 0)
|
||||
@@ -208,6 +205,7 @@ extern "C" {
|
||||
#define ARES_OPT_SOCK_RCVBUF (1 << 12)
|
||||
#define ARES_OPT_TIMEOUTMS (1 << 13)
|
||||
#define ARES_OPT_ROTATE (1 << 14)
|
||||
#define ARES_OPT_EDNSPSZ (1 << 15)
|
||||
|
||||
/* Nameinfo flag values */
|
||||
#define ARES_NI_NOFQDN (1 << 0)
|
||||
@@ -313,6 +311,7 @@ struct ares_options {
|
||||
void *sock_state_cb_data;
|
||||
struct apattern *sortlist;
|
||||
int nsort;
|
||||
int ednspsz;
|
||||
};
|
||||
|
||||
struct hostent;
|
||||
@@ -451,6 +450,15 @@ CARES_EXTERN void ares_process_fd(ares_channel channel,
|
||||
ares_socket_t read_fd,
|
||||
ares_socket_t write_fd);
|
||||
|
||||
CARES_EXTERN int ares_create_query(const char *name,
|
||||
int dnsclass,
|
||||
int type,
|
||||
unsigned short id,
|
||||
int rd,
|
||||
unsigned char **buf,
|
||||
int *buflen,
|
||||
int max_udp_size);
|
||||
|
||||
CARES_EXTERN int ares_mkquery(const char *name,
|
||||
int dnsclass,
|
||||
int type,
|
||||
@@ -589,8 +597,6 @@ CARES_EXTERN void ares_free_string(void *str);
|
||||
|
||||
CARES_EXTERN void ares_free_hostent(struct hostent *host);
|
||||
|
||||
CARES_EXTERN void ares_free_soa(struct ares_soa_reply *soa);
|
||||
|
||||
CARES_EXTERN void ares_free_data(void *dataptr);
|
||||
|
||||
CARES_EXTERN const char *ares_strerror(int code);
|
||||
@@ -615,6 +621,12 @@ CARES_EXTERN int ares_set_servers_csv(ares_channel channel,
|
||||
CARES_EXTERN int ares_get_servers(ares_channel channel,
|
||||
struct ares_addr_node **servers);
|
||||
|
||||
CARES_EXTERN const char *ares_inet_ntop(int af, const void *src, char *dst,
|
||||
ares_socklen_t size);
|
||||
|
||||
CARES_EXTERN int ares_inet_pton(int af, const char *src, void *dst);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
6
deps/cares/include/ares_version.h
vendored
6
deps/cares/include/ares_version.h
vendored
@@ -3,15 +3,15 @@
|
||||
#define ARES__VERSION_H
|
||||
|
||||
/* This is the global package copyright */
|
||||
#define ARES_COPYRIGHT "2004 - 2012 Daniel Stenberg, <daniel@haxx.se>."
|
||||
#define ARES_COPYRIGHT "2004 - 2013 Daniel Stenberg, <daniel@haxx.se>."
|
||||
|
||||
#define ARES_VERSION_MAJOR 1
|
||||
#define ARES_VERSION_MINOR 9
|
||||
#define ARES_VERSION_MINOR 10
|
||||
#define ARES_VERSION_PATCH 0
|
||||
#define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\
|
||||
(ARES_VERSION_MINOR<<8)|\
|
||||
(ARES_VERSION_PATCH))
|
||||
#define ARES_VERSION_STR "1.9.0-DEV"
|
||||
#define ARES_VERSION_STR "1.10.0-DEV"
|
||||
|
||||
#if (ARES_VERSION >= 0x010700)
|
||||
# define CARES_HAVE_ARES_LIBRARY_INIT 1
|
||||
|
||||
8
deps/cares/include/nameser.h
vendored
8
deps/cares/include/nameser.h
vendored
@@ -186,11 +186,19 @@ typedef enum __ns_rcode {
|
||||
#define T_SRV ns_t_srv
|
||||
#define T_ATMA ns_t_atma
|
||||
#define T_NAPTR ns_t_naptr
|
||||
#define T_KX ns_t_kx
|
||||
#define T_CERT ns_t_cert
|
||||
#define T_A6 ns_t_a6
|
||||
#define T_DNAME ns_t_dname
|
||||
#define T_SINK ns_t_sink
|
||||
#define T_OPT ns_t_opt
|
||||
#define T_APL ns_t_apl
|
||||
#define T_DS ns_t_ds
|
||||
#define T_SSHFP ns_t_sshfp
|
||||
#define T_RRSIG ns_t_rrsig
|
||||
#define T_NSEC ns_t_nsec
|
||||
#define T_DNSKEY ns_t_dnskey
|
||||
#define T_TKEY ns_t_tkey
|
||||
#define T_TSIG ns_t_tsig
|
||||
#define T_IXFR ns_t_ixfr
|
||||
#define T_AXFR ns_t_axfr
|
||||
|
||||
21
deps/cares/src/AUTHORS
vendored
21
deps/cares/src/AUTHORS
vendored
@@ -1,15 +1,24 @@
|
||||
c-ares is based on ares, and these are the people that have worked on it since
|
||||
the fork was made:
|
||||
|
||||
Albert Chin
|
||||
Alexander Lazic
|
||||
Alexey Simak
|
||||
Andreas Rieke
|
||||
Andrew C. Morrow
|
||||
Ashish Sharma
|
||||
Ben Greear
|
||||
Ben Noordhuis
|
||||
BogDan Vatra
|
||||
Brad House
|
||||
Brad Spencer
|
||||
Bram Matthys
|
||||
Dan Fandrich
|
||||
Daniel Johnson
|
||||
Daniel Stenberg
|
||||
David Stuart
|
||||
Denis Bilenko
|
||||
Dima Tisnek
|
||||
Dirk Manske
|
||||
Dominick Meglio
|
||||
Doug Goldstein
|
||||
@@ -18,19 +27,31 @@ Eino Tuominen
|
||||
Erik Kline
|
||||
George Neill
|
||||
Gisle Vanem
|
||||
Guenter Knauf
|
||||
Guilherme Balena Versiani
|
||||
Gunter Knauf
|
||||
Henrik Stoerner
|
||||
Jakub Hrozek
|
||||
James Bursa
|
||||
Jérémy Lal
|
||||
Marko Kreen
|
||||
Michael Wallner
|
||||
Mike Crowe
|
||||
Nick Alcock
|
||||
Nick Mathewson
|
||||
Patrik Thunstrom
|
||||
Peter Pentchev
|
||||
Phil Blundell
|
||||
Poul Thomas Lomholt
|
||||
Ravi Pratap
|
||||
Robin Cornelius
|
||||
Sebastian at basti79.de
|
||||
Shmulik Regev
|
||||
Stefan Bühler
|
||||
Steinar H. Gunderson
|
||||
Tofu Linden
|
||||
Tom Hughes
|
||||
Tor Arntsen
|
||||
Vlad Dinulescu
|
||||
William Ahern
|
||||
Yang Tse
|
||||
|
||||
7
deps/cares/src/CHANGES
vendored
7
deps/cares/src/CHANGES
vendored
@@ -1,7 +0,0 @@
|
||||
This file no longer holds the changelog. Now you can generate it yourself
|
||||
like this:
|
||||
|
||||
$ git log --pretty=fuller --no-color --date=short --decorate=full -1000 |
|
||||
./git2changes.pl
|
||||
|
||||
The older, manually edited, changelog is found in git named CHANGES.0
|
||||
2
deps/cares/src/README
vendored
2
deps/cares/src/README
vendored
@@ -24,8 +24,6 @@ You'll find all c-ares details and news here:
|
||||
|
||||
NOTES FOR C-ARES HACKERS
|
||||
|
||||
The following notes apply to c-ares version 1.7.0 and later.
|
||||
|
||||
* The distributed ares_build.h file is only intended to be used on systems
|
||||
which can not run the also distributed configure script.
|
||||
|
||||
|
||||
33
deps/cares/src/RELEASE-NOTES
vendored
33
deps/cares/src/RELEASE-NOTES
vendored
@@ -1,16 +1,35 @@
|
||||
c-ares version 1.9.0
|
||||
c-ares version 1.10.0
|
||||
|
||||
Changed:
|
||||
Changes:
|
||||
|
||||
o Added ares_parse_soa_reply
|
||||
o Added ares_create_query(), to be used instead of ares_mkquery()
|
||||
o ares_inet_ntop() and ares_inet_pton() are now recognized c-ares functions
|
||||
|
||||
Fixed:
|
||||
Bug fixes:
|
||||
|
||||
o libcares.pc generation for static MingW* cross builds
|
||||
o ares_dup: UDP and TCP port byte order in saved options
|
||||
o include the ares_parse_soa_reply.* files in the tarball
|
||||
o read_udp_packets: bail out loop on bad sockets
|
||||
o get_DNS_AdaptersAddresses: fix IPv6 parsing
|
||||
o adig: perror() doesn't work for socket errors on windows
|
||||
o ares_parse_aaaa_reply: fix memory leak
|
||||
o setup_once.h: HP-UX <sys/socket.h> issue workaround
|
||||
o configure: several fixes
|
||||
o config-dos.h: define strerror() to strerror_s_() for High-C
|
||||
o config-dos.h: define HAVE_CLOSE_S for MSDOS/Watt-32
|
||||
o ares_build.h.dist: enhance non-configure GCC ABI detection logic
|
||||
o ares.h: stricter CARES_EXTERN linkage decorations logic
|
||||
o ares_cancel(): cancel requests safely
|
||||
o protocol parsing: check input data stricter
|
||||
o library init: be recursive, reference count inits/cleanups
|
||||
o ares_parse_txt_reply: return a ares_txt_reply node for each sub-string
|
||||
o ares_set_servers_csv: fixed IPv6 address parsing
|
||||
o build: fix build on msvc11
|
||||
|
||||
Thanks go to these friendly people for their efforts and contributions:
|
||||
|
||||
Yang Tse, Nick Alcock, Marko Kreen
|
||||
Eugeny Gladkih, Yang Tse, Gisle Vanem, Guenter Knauf, Horatiu Popescu,
|
||||
Alexander Klauer, Patrick Valsecchi, Paul Saab, Keith Shaw,
|
||||
Alex Loukissas
|
||||
|
||||
|
||||
Have fun!
|
||||
|
||||
5
deps/cares/src/ares__close_sockets.c
vendored
5
deps/cares/src/ares__close_sockets.c
vendored
@@ -16,11 +16,6 @@
|
||||
|
||||
#include "ares_setup.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "ares.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
|
||||
5
deps/cares/src/ares__get_hostent.c
vendored
5
deps/cares/src/ares__get_hostent.c
vendored
@@ -16,9 +16,6 @@
|
||||
|
||||
#include "ares_setup.h"
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
@@ -30,7 +27,7 @@
|
||||
#endif
|
||||
|
||||
#include "ares.h"
|
||||
#include "inet_net_pton.h"
|
||||
#include "ares_inet_net_pton.h"
|
||||
#include "ares_nowarn.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
|
||||
4
deps/cares/src/ares__read_line.c
vendored
4
deps/cares/src/ares__read_line.c
vendored
@@ -15,9 +15,7 @@
|
||||
*/
|
||||
|
||||
#include "ares_setup.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "ares.h"
|
||||
#include "ares_nowarn.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
44
deps/cares/src/ares_cancel.c
vendored
44
deps/cares/src/ares_cancel.c
vendored
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "ares_setup.h"
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "ares.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
@@ -26,33 +26,33 @@
|
||||
void ares_cancel(ares_channel channel)
|
||||
{
|
||||
struct query *query;
|
||||
struct list_node list_head_copy;
|
||||
struct list_node* list_head;
|
||||
struct list_node* list_node;
|
||||
int i;
|
||||
|
||||
list_head = &(channel->all_queries);
|
||||
for (list_node = list_head->next; list_node != list_head; )
|
||||
if (!ares__is_list_empty(&(channel->all_queries)))
|
||||
{
|
||||
query = list_node->data;
|
||||
list_node = list_node->next; /* since we're deleting the query */
|
||||
query->callback(query->arg, ARES_ECANCELLED, 0, NULL, 0);
|
||||
ares__free_query(query);
|
||||
/* Swap list heads, so that only those queries which were present on entry
|
||||
* into this function are cancelled. New queries added by callbacks of
|
||||
* queries being cancelled will not be cancelled themselves.
|
||||
*/
|
||||
list_head = &(channel->all_queries);
|
||||
list_head_copy.prev = list_head->prev;
|
||||
list_head_copy.next = list_head->next;
|
||||
list_head_copy.prev->next = &list_head_copy;
|
||||
list_head_copy.next->prev = &list_head_copy;
|
||||
list_head->prev = list_head;
|
||||
list_head->next = list_head;
|
||||
for (list_node = list_head_copy.next; list_node != &list_head_copy; )
|
||||
{
|
||||
query = list_node->data;
|
||||
list_node = list_node->next; /* since we're deleting the query */
|
||||
query->callback(query->arg, ARES_ECANCELLED, 0, NULL, 0);
|
||||
ares__free_query(query);
|
||||
}
|
||||
}
|
||||
#ifndef NDEBUG
|
||||
/* Freeing the query should remove it from all the lists in which it sits,
|
||||
* so all query lists should be empty now.
|
||||
*/
|
||||
assert(ares__is_list_empty(&(channel->all_queries)));
|
||||
for (i = 0; i < ARES_QID_TABLE_SIZE; i++)
|
||||
{
|
||||
assert(ares__is_list_empty(&(channel->queries_by_qid[i])));
|
||||
}
|
||||
for (i = 0; i < ARES_TIMEOUT_TABLE_SIZE; i++)
|
||||
{
|
||||
assert(ares__is_list_empty(&(channel->queries_by_timeout[i])));
|
||||
}
|
||||
#endif
|
||||
if (!(channel->flags & ARES_FLAG_STAYOPEN))
|
||||
if (!(channel->flags & ARES_FLAG_STAYOPEN) && ares__is_list_empty(&(channel->all_queries)))
|
||||
{
|
||||
if (channel->servers)
|
||||
{
|
||||
|
||||
208
deps/cares/src/ares_create_query.c
vendored
Normal file
208
deps/cares/src/ares_create_query.c
vendored
Normal file
@@ -0,0 +1,208 @@
|
||||
|
||||
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
* fee is hereby granted, provided that the above copyright
|
||||
* notice appear in all copies and that both that copyright
|
||||
* notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of M.I.T. not be used in
|
||||
* advertising or publicity pertaining to distribution of the
|
||||
* software without specific, written prior permission.
|
||||
* M.I.T. makes no representations about the suitability of
|
||||
* this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*/
|
||||
|
||||
#include "ares_setup.h"
|
||||
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
# include <arpa/nameser.h>
|
||||
#else
|
||||
# include "nameser.h"
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#include "ares.h"
|
||||
#include "ares_dns.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
#ifndef T_OPT
|
||||
# define T_OPT 41 /* EDNS0 option (meta-RR) */
|
||||
#endif
|
||||
|
||||
/* Header format, from RFC 1035:
|
||||
* 1 1 1 1 1 1
|
||||
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
|
||||
* +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
* | ID |
|
||||
* +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
* |QR| Opcode |AA|TC|RD|RA| Z | RCODE |
|
||||
* +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
* | QDCOUNT |
|
||||
* +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
* | ANCOUNT |
|
||||
* +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
* | NSCOUNT |
|
||||
* +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
* | ARCOUNT |
|
||||
* +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
*
|
||||
* AA, TC, RA, and RCODE are only set in responses. Brief description
|
||||
* of the remaining fields:
|
||||
* ID Identifier to match responses with queries
|
||||
* QR Query (0) or response (1)
|
||||
* Opcode For our purposes, always QUERY
|
||||
* RD Recursion desired
|
||||
* Z Reserved (zero)
|
||||
* QDCOUNT Number of queries
|
||||
* ANCOUNT Number of answers
|
||||
* NSCOUNT Number of name server records
|
||||
* ARCOUNT Number of additional records
|
||||
*
|
||||
* Question format, from RFC 1035:
|
||||
* 1 1 1 1 1 1
|
||||
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
|
||||
* +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
* | |
|
||||
* / QNAME /
|
||||
* / /
|
||||
* +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
* | QTYPE |
|
||||
* +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
* | QCLASS |
|
||||
* +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
*
|
||||
* The query name is encoded as a series of labels, each represented
|
||||
* as a one-byte length (maximum 63) followed by the text of the
|
||||
* label. The list is terminated by a label of length zero (which can
|
||||
* be thought of as the root domain).
|
||||
*/
|
||||
|
||||
int ares_create_query(const char *name, int dnsclass, int type,
|
||||
unsigned short id, int rd, unsigned char **buf,
|
||||
int *buflen, int max_udp_size)
|
||||
{
|
||||
int len;
|
||||
unsigned char *q;
|
||||
const char *p;
|
||||
|
||||
/* Set our results early, in case we bail out early with an error. */
|
||||
*buflen = 0;
|
||||
*buf = NULL;
|
||||
|
||||
/* Compute the length of the encoded name so we can check buflen.
|
||||
* Start counting at 1 for the zero-length label at the end. */
|
||||
len = 1;
|
||||
for (p = name; *p; p++)
|
||||
{
|
||||
if (*p == '\\' && *(p + 1) != 0)
|
||||
p++;
|
||||
len++;
|
||||
}
|
||||
/* If there are n periods in the name, there are n + 1 labels, and
|
||||
* thus n + 1 length fields, unless the name is empty or ends with a
|
||||
* period. So add 1 unless name is empty or ends with a period.
|
||||
*/
|
||||
if (*name && *(p - 1) != '.')
|
||||
len++;
|
||||
|
||||
/* Immediately reject names that are longer than the maximum of 255
|
||||
* bytes that's specified in RFC 1035 ("To simplify implementations,
|
||||
* the total length of a domain name (i.e., label octets and label
|
||||
* length octets) is restricted to 255 octets or less."). We aren't
|
||||
* doing this just to be a stickler about RFCs. For names that are
|
||||
* too long, 'dnscache' closes its TCP connection to us immediately
|
||||
* (when using TCP) and ignores the request when using UDP, and
|
||||
* BIND's named returns ServFail (TCP or UDP). Sending a request
|
||||
* that we know will cause 'dnscache' to close the TCP connection is
|
||||
* painful, since that makes any other outstanding requests on that
|
||||
* connection fail. And sending a UDP request that we know
|
||||
* 'dnscache' will ignore is bad because resources will be tied up
|
||||
* until we time-out the request.
|
||||
*/
|
||||
if (len > MAXCDNAME)
|
||||
return ARES_EBADNAME;
|
||||
|
||||
*buflen = len + HFIXEDSZ + QFIXEDSZ + (max_udp_size ? EDNSFIXEDSZ : 0);
|
||||
*buf = malloc(*buflen);
|
||||
if (!*buf)
|
||||
return ARES_ENOMEM;
|
||||
|
||||
/* Set up the header. */
|
||||
q = *buf;
|
||||
memset(q, 0, HFIXEDSZ);
|
||||
DNS_HEADER_SET_QID(q, id);
|
||||
DNS_HEADER_SET_OPCODE(q, QUERY);
|
||||
if (rd) {
|
||||
DNS_HEADER_SET_RD(q, 1);
|
||||
}
|
||||
else {
|
||||
DNS_HEADER_SET_RD(q, 0);
|
||||
}
|
||||
DNS_HEADER_SET_QDCOUNT(q, 1);
|
||||
|
||||
if (max_udp_size) {
|
||||
DNS_HEADER_SET_ARCOUNT(q, 1);
|
||||
}
|
||||
|
||||
/* A name of "." is a screw case for the loop below, so adjust it. */
|
||||
if (strcmp(name, ".") == 0)
|
||||
name++;
|
||||
|
||||
/* Start writing out the name after the header. */
|
||||
q += HFIXEDSZ;
|
||||
while (*name)
|
||||
{
|
||||
if (*name == '.')
|
||||
return ARES_EBADNAME;
|
||||
|
||||
/* Count the number of bytes in this label. */
|
||||
len = 0;
|
||||
for (p = name; *p && *p != '.'; p++)
|
||||
{
|
||||
if (*p == '\\' && *(p + 1) != 0)
|
||||
p++;
|
||||
len++;
|
||||
}
|
||||
if (len > MAXLABEL)
|
||||
return ARES_EBADNAME;
|
||||
|
||||
/* Encode the length and copy the data. */
|
||||
*q++ = (unsigned char)len;
|
||||
for (p = name; *p && *p != '.'; p++)
|
||||
{
|
||||
if (*p == '\\' && *(p + 1) != 0)
|
||||
p++;
|
||||
*q++ = *p;
|
||||
}
|
||||
|
||||
/* Go to the next label and repeat, unless we hit the end. */
|
||||
if (!*p)
|
||||
break;
|
||||
name = p + 1;
|
||||
}
|
||||
|
||||
/* Add the zero-length label at the end. */
|
||||
*q++ = 0;
|
||||
|
||||
/* Finish off the question with the type and class. */
|
||||
DNS_QUESTION_SET_TYPE(q, type);
|
||||
DNS_QUESTION_SET_CLASS(q, dnsclass);
|
||||
|
||||
if (max_udp_size)
|
||||
{
|
||||
q += QFIXEDSZ;
|
||||
memset(q, 0, EDNSFIXEDSZ);
|
||||
q++;
|
||||
DNS_RR_SET_TYPE(q, T_OPT);
|
||||
DNS_RR_SET_CLASS(q, max_udp_size);
|
||||
}
|
||||
|
||||
return ARES_SUCCESS;
|
||||
}
|
||||
32
deps/cares/src/ares_data.c
vendored
32
deps/cares/src/ares_data.c
vendored
@@ -1,5 +1,5 @@
|
||||
|
||||
/* Copyright (C) 2009-2012 by Daniel Stenberg
|
||||
/* Copyright (C) 2009-2013 by Daniel Stenberg
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
@@ -199,33 +199,3 @@ void *ares_malloc_data(ares_datatype type)
|
||||
|
||||
return &ptr->data;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** ares_get_datatype() - c-ares internal helper function.
|
||||
**
|
||||
** This function returns the ares_datatype of the data stored in a
|
||||
** private ares_data struct when given the public API pointer.
|
||||
*/
|
||||
|
||||
ares_datatype ares_get_datatype(void * dataptr)
|
||||
{
|
||||
struct ares_data *ptr;
|
||||
|
||||
#ifdef __INTEL_COMPILER
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable:1684)
|
||||
/* 1684: conversion from pointer to same-sized integral type */
|
||||
#endif
|
||||
|
||||
ptr = (void *)((char *)dataptr - offsetof(struct ares_data, data));
|
||||
|
||||
#ifdef __INTEL_COMPILER
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
if (ptr->mark == ARES_DATATYPE_MARK)
|
||||
return ptr->type;
|
||||
|
||||
return ARES_DATATYPE_UNKNOWN;
|
||||
}
|
||||
|
||||
3
deps/cares/src/ares_data.h
vendored
3
deps/cares/src/ares_data.h
vendored
@@ -1,5 +1,5 @@
|
||||
|
||||
/* Copyright (C) 2009-2012 by Daniel Stenberg
|
||||
/* Copyright (C) 2009-2013 by Daniel Stenberg
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
@@ -66,4 +66,3 @@ struct ares_data {
|
||||
|
||||
void *ares_malloc_data(ares_datatype type);
|
||||
|
||||
ares_datatype ares_get_datatype(void * dataptr);
|
||||
|
||||
3
deps/cares/src/ares_destroy.c
vendored
3
deps/cares/src/ares_destroy.c
vendored
@@ -16,8 +16,9 @@
|
||||
*/
|
||||
|
||||
#include "ares_setup.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "ares.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
|
||||
8
deps/cares/src/ares_dns.h
vendored
8
deps/cares/src/ares_dns.h
vendored
@@ -95,9 +95,9 @@
|
||||
#define DNS_RR_LEN(r) DNS__16BIT((r) + 8)
|
||||
|
||||
/* Macros for constructing the fixed part of a DNS resource record */
|
||||
#define DNS_RR_SET_TYPE(r) DNS__SET16BIT(r, v)
|
||||
#define DNS_RR_SET_CLASS(r) DNS__SET16BIT((r) + 2, v)
|
||||
#define DNS_RR_SET_TTL(r) DNS__SET32BIT((r) + 4, v)
|
||||
#define DNS_RR_SET_LEN(r) DNS__SET16BIT((r) + 8, v)
|
||||
#define DNS_RR_SET_TYPE(r, v) DNS__SET16BIT(r, v)
|
||||
#define DNS_RR_SET_CLASS(r, v) DNS__SET16BIT((r) + 2, v)
|
||||
#define DNS_RR_SET_TTL(r, v) DNS__SET32BIT((r) + 4, v)
|
||||
#define DNS_RR_SET_LEN(r, v) DNS__SET16BIT((r) + 8, v)
|
||||
|
||||
#endif /* HEADER_CARES_DNS_H */
|
||||
|
||||
6
deps/cares/src/ares_expand_name.c
vendored
6
deps/cares/src/ares_expand_name.c
vendored
@@ -16,9 +16,6 @@
|
||||
|
||||
#include "ares_setup.h"
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
@@ -31,7 +28,6 @@
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "ares.h"
|
||||
#include "ares_nowarn.h"
|
||||
#include "ares_private.h" /* for the memdebug */
|
||||
@@ -147,7 +143,7 @@ static int name_length(const unsigned char *encoded, const unsigned char *abuf,
|
||||
int n = 0, offset, indir = 0;
|
||||
|
||||
/* Allow the caller to pass us abuf + alen and have us check for it. */
|
||||
if (encoded == abuf + alen)
|
||||
if (encoded >= abuf + alen)
|
||||
return -1;
|
||||
|
||||
while (*encoded)
|
||||
|
||||
5
deps/cares/src/ares_expand_string.c
vendored
5
deps/cares/src/ares_expand_string.c
vendored
@@ -16,9 +16,6 @@
|
||||
|
||||
#include "ares_setup.h"
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
@@ -28,8 +25,6 @@
|
||||
# include "nameser.h"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "ares.h"
|
||||
#include "ares_private.h" /* for the memdebug */
|
||||
|
||||
|
||||
4
deps/cares/src/ares_fds.c
vendored
4
deps/cares/src/ares_fds.c
vendored
@@ -16,10 +16,6 @@
|
||||
|
||||
#include "ares_setup.h"
|
||||
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#include "ares.h"
|
||||
#include "ares_nowarn.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
1
deps/cares/src/ares_free_hostent.c
vendored
1
deps/cares/src/ares_free_hostent.c
vendored
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
|
||||
#include "ares_setup.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef HAVE_NETDB_H
|
||||
#include <netdb.h>
|
||||
|
||||
2
deps/cares/src/ares_free_string.c
vendored
2
deps/cares/src/ares_free_string.c
vendored
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
#include "ares_setup.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "ares.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
|
||||
9
deps/cares/src/ares_gethostbyaddr.c
vendored
9
deps/cares/src/ares_gethostbyaddr.c
vendored
@@ -15,9 +15,6 @@
|
||||
*/
|
||||
#include "ares_setup.h"
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
@@ -36,12 +33,8 @@
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "ares.h"
|
||||
#include "inet_net_pton.h"
|
||||
#include "ares_inet_net_pton.h"
|
||||
#include "ares_platform.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
|
||||
21
deps/cares/src/ares_gethostbyname.c
vendored
21
deps/cares/src/ares_gethostbyname.c
vendored
@@ -1,5 +1,5 @@
|
||||
|
||||
/* Copyright 1998, 2011 by the Massachusetts Institute of Technology.
|
||||
/* Copyright 1998, 2011, 2013 by the Massachusetts Institute of Technology.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
@@ -16,9 +16,6 @@
|
||||
|
||||
#include "ares_setup.h"
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
@@ -37,16 +34,12 @@
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#include "ares.h"
|
||||
#include "inet_net_pton.h"
|
||||
#include "ares_inet_net_pton.h"
|
||||
#include "bitncmp.h"
|
||||
#include "ares_platform.h"
|
||||
#include "ares_nowarn.h"
|
||||
@@ -467,8 +460,8 @@ static int get_address_index(const struct in_addr *addr,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!ares_bitncmp(&addr->s_addr, &sortlist[i].addrV4.s_addr,
|
||||
sortlist[i].mask.bits))
|
||||
if (!ares__bitncmp(&addr->s_addr, &sortlist[i].addrV4.s_addr,
|
||||
sortlist[i].mask.bits))
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -515,10 +508,8 @@ static int get6_address_index(const struct ares_in6_addr *addr,
|
||||
{
|
||||
if (sortlist[i].family != AF_INET6)
|
||||
continue;
|
||||
if (!ares_bitncmp(addr,
|
||||
&sortlist[i].addrV6,
|
||||
sortlist[i].mask.bits))
|
||||
break;
|
||||
if (!ares__bitncmp(addr, &sortlist[i].addrV6, sortlist[i].mask.bits))
|
||||
break;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
12
deps/cares/src/ares_getnameinfo.c
vendored
12
deps/cares/src/ares_getnameinfo.c
vendored
@@ -22,9 +22,6 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
@@ -47,17 +44,8 @@
|
||||
#include <net/if.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "ares.h"
|
||||
#include "ares_ipv6.h"
|
||||
#include "inet_ntop.h"
|
||||
#include "ares_nowarn.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
|
||||
4
deps/cares/src/ares_getsock.c
vendored
4
deps/cares/src/ares_getsock.c
vendored
@@ -14,10 +14,6 @@
|
||||
|
||||
#include "ares_setup.h"
|
||||
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#include "ares.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef HEADER_CARES_INET_NET_PTON_H
|
||||
#define HEADER_CARES_INET_NET_PTON_H
|
||||
|
||||
/* Copyright (C) 2005-2010 by Daniel Stenberg et al
|
||||
/* Copyright (C) 2005-2013 by Daniel Stenberg et al
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
@@ -16,12 +16,6 @@
|
||||
* without express or implied warranty.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_INET_PTON
|
||||
#define ares_inet_pton(x,y,z) inet_pton(x,y,z)
|
||||
#else
|
||||
int ares_inet_pton(int af, const char *src, void *dst);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_INET_NET_PTON
|
||||
#define ares_inet_net_pton(w,x,y,z) inet_net_pton(w,x,y,z)
|
||||
#else
|
||||
39
deps/cares/src/ares_init.c
vendored
39
deps/cares/src/ares_init.c
vendored
@@ -1,6 +1,6 @@
|
||||
|
||||
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
* Copyright (C) 2007-2012 by Daniel Stenberg
|
||||
* Copyright (C) 2007-2013 by Daniel Stenberg
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
@@ -21,14 +21,6 @@
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
@@ -50,16 +42,6 @@
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <time.h>
|
||||
|
||||
#if defined(ANDROID) || defined(__ANDROID__)
|
||||
#include <sys/system_properties.h>
|
||||
/* From the Bionic sources */
|
||||
@@ -68,8 +50,7 @@
|
||||
#endif
|
||||
|
||||
#include "ares.h"
|
||||
#include "inet_ntop.h"
|
||||
#include "inet_net_pton.h"
|
||||
#include "ares_inet_net_pton.h"
|
||||
#include "ares_library_init.h"
|
||||
#include "ares_nowarn.h"
|
||||
#include "ares_platform.h"
|
||||
@@ -163,6 +144,7 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
|
||||
channel->rotate = -1;
|
||||
channel->udp_port = -1;
|
||||
channel->tcp_port = -1;
|
||||
channel->ednspsz = -1;
|
||||
channel->socket_send_buffer_size = -1;
|
||||
channel->socket_receive_buffer_size = -1;
|
||||
channel->nservers = -1;
|
||||
@@ -453,6 +435,9 @@ static int init_by_options(ares_channel channel,
|
||||
&& channel->socket_receive_buffer_size == -1)
|
||||
channel->socket_receive_buffer_size = options->socket_receive_buffer_size;
|
||||
|
||||
if ((optmask & ARES_OPT_EDNSPSZ) && channel->ednspsz == -1)
|
||||
channel->ednspsz = options->ednspsz;
|
||||
|
||||
/* Copy the IPv4 servers, if given. */
|
||||
if ((optmask & ARES_OPT_SERVERS) && channel->nservers == -1)
|
||||
{
|
||||
@@ -1020,7 +1005,7 @@ static int get_DNS_AdaptersAddresses(char **outptr)
|
||||
if (memcmp(&namesrvr.sa6->sin6_addr, &ares_in6addr_any,
|
||||
sizeof(namesrvr.sa6->sin6_addr)) == 0)
|
||||
continue;
|
||||
if (! ares_inet_ntop(AF_INET, &namesrvr.sa6->sin6_addr,
|
||||
if (! ares_inet_ntop(AF_INET6, &namesrvr.sa6->sin6_addr,
|
||||
txtaddr, sizeof(txtaddr)))
|
||||
continue;
|
||||
}
|
||||
@@ -1363,6 +1348,9 @@ static int init_by_defaults(ares_channel channel)
|
||||
if (channel->tcp_port == -1)
|
||||
channel->tcp_port = htons(NAMESERVER_PORT);
|
||||
|
||||
if (channel->ednspsz == -1)
|
||||
channel->ednspsz = EDNSPACKETSZ;
|
||||
|
||||
if (channel->nservers == -1) {
|
||||
/* If nobody specified servers, try a local named. */
|
||||
channel->servers = malloc(sizeof(struct server_state));
|
||||
@@ -1960,13 +1948,6 @@ static int init_id_key(rc4_key* key,int key_data_len)
|
||||
return ARES_SUCCESS;
|
||||
}
|
||||
|
||||
unsigned short ares__generate_new_id(rc4_key* key)
|
||||
{
|
||||
unsigned short r=0;
|
||||
ares__rc4(key, (unsigned char *)&r, sizeof(r));
|
||||
return r;
|
||||
}
|
||||
|
||||
void ares_set_local_ip4(ares_channel channel, unsigned int local_ip)
|
||||
{
|
||||
channel->local_ip4 = local_ip;
|
||||
|
||||
7
deps/cares/src/ares_library_init.c
vendored
7
deps/cares/src/ares_library_init.c
vendored
@@ -101,7 +101,10 @@ int ares_library_init(int flags)
|
||||
int res;
|
||||
|
||||
if (ares_initialized)
|
||||
return ARES_SUCCESS;
|
||||
{
|
||||
ares_initialized++;
|
||||
return ARES_SUCCESS;
|
||||
}
|
||||
ares_initialized++;
|
||||
|
||||
if (flags & ARES_LIB_INIT_WIN32)
|
||||
@@ -122,6 +125,8 @@ void ares_library_cleanup(void)
|
||||
if (!ares_initialized)
|
||||
return;
|
||||
ares_initialized--;
|
||||
if (ares_initialized)
|
||||
return;
|
||||
|
||||
if (ares_init_flags & ARES_LIB_INIT_WIN32)
|
||||
ares_win32_cleanup();
|
||||
|
||||
23
deps/cares/src/ares_llist.c
vendored
23
deps/cares/src/ares_llist.c
vendored
@@ -61,26 +61,3 @@ void ares__remove_from_list(struct list_node* node) {
|
||||
}
|
||||
}
|
||||
|
||||
/* Swap the contents of two lists */
|
||||
void ares__swap_lists(struct list_node* head_a,
|
||||
struct list_node* head_b) {
|
||||
int is_a_empty = ares__is_list_empty(head_a);
|
||||
int is_b_empty = ares__is_list_empty(head_b);
|
||||
struct list_node old_a = *head_a;
|
||||
struct list_node old_b = *head_b;
|
||||
|
||||
if (is_a_empty) {
|
||||
ares__init_list_head(head_b);
|
||||
} else {
|
||||
*head_b = old_a;
|
||||
old_a.next->prev = head_b;
|
||||
old_a.prev->next = head_b;
|
||||
}
|
||||
if (is_b_empty) {
|
||||
ares__init_list_head(head_a);
|
||||
} else {
|
||||
*head_a = old_b;
|
||||
old_b.next->prev = head_a;
|
||||
old_b.prev->next = head_a;
|
||||
}
|
||||
}
|
||||
|
||||
3
deps/cares/src/ares_llist.h
vendored
3
deps/cares/src/ares_llist.h
vendored
@@ -36,7 +36,4 @@ void ares__insert_in_list(struct list_node* new_node,
|
||||
|
||||
void ares__remove_from_list(struct list_node* node);
|
||||
|
||||
void ares__swap_lists(struct list_node* head_a,
|
||||
struct list_node* head_b);
|
||||
|
||||
#endif /* __ARES_LLIST_H */
|
||||
|
||||
173
deps/cares/src/ares_mkquery.c
vendored
173
deps/cares/src/ares_mkquery.c
vendored
@@ -15,181 +15,10 @@
|
||||
*/
|
||||
|
||||
#include "ares_setup.h"
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_H
|
||||
# include <arpa/nameser.h>
|
||||
#else
|
||||
# include "nameser.h"
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "ares.h"
|
||||
#include "ares_dns.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
/* Header format, from RFC 1035:
|
||||
* 1 1 1 1 1 1
|
||||
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
|
||||
* +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
* | ID |
|
||||
* +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
* |QR| Opcode |AA|TC|RD|RA| Z | RCODE |
|
||||
* +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
* | QDCOUNT |
|
||||
* +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
* | ANCOUNT |
|
||||
* +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
* | NSCOUNT |
|
||||
* +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
* | ARCOUNT |
|
||||
* +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
*
|
||||
* AA, TC, RA, and RCODE are only set in responses. Brief description
|
||||
* of the remaining fields:
|
||||
* ID Identifier to match responses with queries
|
||||
* QR Query (0) or response (1)
|
||||
* Opcode For our purposes, always QUERY
|
||||
* RD Recursion desired
|
||||
* Z Reserved (zero)
|
||||
* QDCOUNT Number of queries
|
||||
* ANCOUNT Number of answers
|
||||
* NSCOUNT Number of name server records
|
||||
* ARCOUNT Number of additional records
|
||||
*
|
||||
* Question format, from RFC 1035:
|
||||
* 1 1 1 1 1 1
|
||||
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
|
||||
* +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
* | |
|
||||
* / QNAME /
|
||||
* / /
|
||||
* +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
* | QTYPE |
|
||||
* +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
* | QCLASS |
|
||||
* +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
||||
*
|
||||
* The query name is encoded as a series of labels, each represented
|
||||
* as a one-byte length (maximum 63) followed by the text of the
|
||||
* label. The list is terminated by a label of length zero (which can
|
||||
* be thought of as the root domain).
|
||||
*/
|
||||
|
||||
int ares_mkquery(const char *name, int dnsclass, int type, unsigned short id,
|
||||
int rd, unsigned char **buf, int *buflen)
|
||||
{
|
||||
int len;
|
||||
unsigned char *q;
|
||||
const char *p;
|
||||
|
||||
/* Set our results early, in case we bail out early with an error. */
|
||||
*buflen = 0;
|
||||
*buf = NULL;
|
||||
|
||||
/* Compute the length of the encoded name so we can check buflen.
|
||||
* Start counting at 1 for the zero-length label at the end. */
|
||||
len = 1;
|
||||
for (p = name; *p; p++)
|
||||
{
|
||||
if (*p == '\\' && *(p + 1) != 0)
|
||||
p++;
|
||||
len++;
|
||||
}
|
||||
/* If there are n periods in the name, there are n + 1 labels, and
|
||||
* thus n + 1 length fields, unless the name is empty or ends with a
|
||||
* period. So add 1 unless name is empty or ends with a period.
|
||||
*/
|
||||
if (*name && *(p - 1) != '.')
|
||||
len++;
|
||||
|
||||
/* Immediately reject names that are longer than the maximum of 255
|
||||
* bytes that's specified in RFC 1035 ("To simplify implementations,
|
||||
* the total length of a domain name (i.e., label octets and label
|
||||
* length octets) is restricted to 255 octets or less."). We aren't
|
||||
* doing this just to be a stickler about RFCs. For names that are
|
||||
* too long, 'dnscache' closes its TCP connection to us immediately
|
||||
* (when using TCP) and ignores the request when using UDP, and
|
||||
* BIND's named returns ServFail (TCP or UDP). Sending a request
|
||||
* that we know will cause 'dnscache' to close the TCP connection is
|
||||
* painful, since that makes any other outstanding requests on that
|
||||
* connection fail. And sending a UDP request that we know
|
||||
* 'dnscache' will ignore is bad because resources will be tied up
|
||||
* until we time-out the request.
|
||||
*/
|
||||
if (len > MAXCDNAME)
|
||||
return ARES_EBADNAME;
|
||||
|
||||
*buflen = len + HFIXEDSZ + QFIXEDSZ;
|
||||
*buf = malloc(*buflen);
|
||||
if (!*buf)
|
||||
return ARES_ENOMEM;
|
||||
|
||||
/* Set up the header. */
|
||||
q = *buf;
|
||||
memset(q, 0, HFIXEDSZ);
|
||||
DNS_HEADER_SET_QID(q, id);
|
||||
DNS_HEADER_SET_OPCODE(q, QUERY);
|
||||
if (rd) {
|
||||
DNS_HEADER_SET_RD(q, 1);
|
||||
}
|
||||
else {
|
||||
DNS_HEADER_SET_RD(q, 0);
|
||||
}
|
||||
DNS_HEADER_SET_QDCOUNT(q, 1);
|
||||
|
||||
/* A name of "." is a screw case for the loop below, so adjust it. */
|
||||
if (strcmp(name, ".") == 0)
|
||||
name++;
|
||||
|
||||
/* Start writing out the name after the header. */
|
||||
q += HFIXEDSZ;
|
||||
while (*name)
|
||||
{
|
||||
if (*name == '.')
|
||||
return ARES_EBADNAME;
|
||||
|
||||
/* Count the number of bytes in this label. */
|
||||
len = 0;
|
||||
for (p = name; *p && *p != '.'; p++)
|
||||
{
|
||||
if (*p == '\\' && *(p + 1) != 0)
|
||||
p++;
|
||||
len++;
|
||||
}
|
||||
if (len > MAXLABEL)
|
||||
return ARES_EBADNAME;
|
||||
|
||||
/* Encode the length and copy the data. */
|
||||
*q++ = (unsigned char)len;
|
||||
for (p = name; *p && *p != '.'; p++)
|
||||
{
|
||||
if (*p == '\\' && *(p + 1) != 0)
|
||||
p++;
|
||||
*q++ = *p;
|
||||
}
|
||||
|
||||
/* Go to the next label and repeat, unless we hit the end. */
|
||||
if (!*p)
|
||||
break;
|
||||
name = p + 1;
|
||||
}
|
||||
|
||||
/* Add the zero-length label at the end. */
|
||||
*q++ = 0;
|
||||
|
||||
/* Finish off the question with the type and class. */
|
||||
DNS_QUESTION_SET_TYPE(q, type);
|
||||
DNS_QUESTION_SET_CLASS(q, dnsclass);
|
||||
|
||||
return ARES_SUCCESS;
|
||||
return ares_create_query(name, dnsclass, type, id, rd, buf, buflen, 0);
|
||||
}
|
||||
|
||||
3
deps/cares/src/ares_nowarn.c
vendored
3
deps/cares/src/ares_nowarn.c
vendored
@@ -23,9 +23,6 @@
|
||||
|
||||
#if defined(__INTEL_COMPILER) && defined(__unix__)
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
64
deps/cares/src/ares_options.c
vendored
64
deps/cares/src/ares_options.c
vendored
@@ -1,6 +1,6 @@
|
||||
|
||||
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
* Copyright (C) 2008-2011 by Daniel Stenberg
|
||||
* Copyright (C) 2008-2013 by Daniel Stenberg
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "ares.h"
|
||||
#include "ares_data.h"
|
||||
#include "inet_net_pton.h"
|
||||
#include "ares_inet_net_pton.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
|
||||
@@ -132,6 +132,7 @@ int ares_set_servers(ares_channel channel,
|
||||
}
|
||||
|
||||
/* Incomming string format: host[:port][,host[:port]]... */
|
||||
/* IPv6 addresses with ports require square brackets [fe80::1%lo0]:53 */
|
||||
int ares_set_servers_csv(ares_channel channel,
|
||||
const char* _csv)
|
||||
{
|
||||
@@ -139,6 +140,7 @@ int ares_set_servers_csv(ares_channel channel,
|
||||
char* csv = NULL;
|
||||
char* ptr;
|
||||
char* start_host;
|
||||
int cc = 0;
|
||||
int rv = ARES_SUCCESS;
|
||||
struct ares_addr_node *servers = NULL;
|
||||
struct ares_addr_node *last = NULL;
|
||||
@@ -164,28 +166,53 @@ int ares_set_servers_csv(ares_channel channel,
|
||||
|
||||
start_host = csv;
|
||||
for (ptr = csv; *ptr; ptr++) {
|
||||
if (*ptr == ',') {
|
||||
if (*ptr == ':') {
|
||||
/* count colons to determine if we have an IPv6 number or IPv4 with
|
||||
port */
|
||||
cc++;
|
||||
}
|
||||
else if (*ptr == '[') {
|
||||
/* move start_host if an open square bracket is found wrapping an IPv6
|
||||
address */
|
||||
start_host = ptr + 1;
|
||||
}
|
||||
else if (*ptr == ',') {
|
||||
char* pp = ptr - 1;
|
||||
char* p = ptr;
|
||||
struct in_addr in4;
|
||||
struct ares_in6_addr in6;
|
||||
struct ares_addr_node *s = NULL;
|
||||
|
||||
*ptr = 0; /* null terminate host:port string */
|
||||
/* Got an entry..see if port was specified. */
|
||||
while (pp > start_host) {
|
||||
if (*pp == ':')
|
||||
break; /* yes */
|
||||
if (!ISDIGIT(*pp)) {
|
||||
/* Found end of digits before we found :, so wasn't a port */
|
||||
pp = ptr;
|
||||
break;
|
||||
/* Got an entry..see if the port was specified. */
|
||||
if (cc > 0) {
|
||||
while (pp > start_host) {
|
||||
/* a single close square bracket followed by a colon, ']:' indicates
|
||||
an IPv6 address with port */
|
||||
if ((*pp == ']') && (*p == ':'))
|
||||
break; /* found port */
|
||||
/* a single colon, ':' indicates an IPv4 address with port */
|
||||
if ((*pp == ':') && (cc == 1))
|
||||
break; /* found port */
|
||||
if (!(ISDIGIT(*pp) || (*pp == ':'))) {
|
||||
/* Found end of digits before we found :, so wasn't a port */
|
||||
/* must allow ':' for IPv6 case of ']:' indicates we found a port */
|
||||
pp = p = ptr;
|
||||
break;
|
||||
}
|
||||
pp--;
|
||||
p--;
|
||||
}
|
||||
if ((pp != start_host) && ((pp + 1) < ptr)) {
|
||||
/* Found it. Parse over the port number */
|
||||
/* when an IPv6 address is wrapped with square brackets the port
|
||||
starts at pp + 2 */
|
||||
if (*pp == ']')
|
||||
p++; /* move p before ':' */
|
||||
/* p will point to the start of the port */
|
||||
(void)strtol(p, NULL, 10);
|
||||
*pp = 0; /* null terminate host */
|
||||
}
|
||||
pp--;
|
||||
}
|
||||
if ((pp != start_host) && ((pp + 1) < ptr)) {
|
||||
/* Found it. Parse over the port number */
|
||||
(void)strtol(pp + 1, NULL, 10);
|
||||
*pp = 0; /* null terminate host */
|
||||
}
|
||||
/* resolve host, try ipv4 first, rslt is in network byte order */
|
||||
rv = ares_inet_pton(AF_INET, start_host, &in4);
|
||||
@@ -221,6 +248,8 @@ int ares_set_servers_csv(ares_channel channel,
|
||||
s->next = NULL;
|
||||
if (last) {
|
||||
last->next = s;
|
||||
/* need to move last to maintain the linked list */
|
||||
last = last->next;
|
||||
}
|
||||
else {
|
||||
servers = s;
|
||||
@@ -230,6 +259,7 @@ int ares_set_servers_csv(ares_channel channel,
|
||||
|
||||
/* Set up for next one */
|
||||
start_host = ptr + 1;
|
||||
cc = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
11
deps/cares/src/ares_parse_a_reply.c
vendored
11
deps/cares/src/ares_parse_a_reply.c
vendored
@@ -16,9 +16,6 @@
|
||||
|
||||
#include "ares_setup.h"
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
@@ -41,8 +38,6 @@
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifdef HAVE_LIMITS_H
|
||||
# include <limits.h>
|
||||
#endif
|
||||
@@ -141,6 +136,12 @@ int ares_parse_a_reply(const unsigned char *abuf, int alen,
|
||||
rr_len = DNS_RR_LEN(aptr);
|
||||
rr_ttl = DNS_RR_TTL(aptr);
|
||||
aptr += RRFIXEDSZ;
|
||||
if (aptr + rr_len > abuf + alen)
|
||||
{
|
||||
free(rr_name);
|
||||
status = ARES_EBADRESP;
|
||||
break;
|
||||
}
|
||||
|
||||
if (rr_class == C_IN && rr_type == T_A
|
||||
&& rr_len == sizeof(struct in_addr)
|
||||
|
||||
15
deps/cares/src/ares_parse_aaaa_reply.c
vendored
15
deps/cares/src/ares_parse_aaaa_reply.c
vendored
@@ -17,9 +17,6 @@
|
||||
|
||||
#include "ares_setup.h"
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
@@ -42,15 +39,13 @@
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#ifdef HAVE_LIMITS_H
|
||||
# include <limits.h>
|
||||
#endif
|
||||
|
||||
#include "ares.h"
|
||||
#include "ares_dns.h"
|
||||
#include "inet_net_pton.h"
|
||||
#include "ares_inet_net_pton.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
int ares_parse_aaaa_reply(const unsigned char *abuf, int alen,
|
||||
@@ -141,6 +136,12 @@ int ares_parse_aaaa_reply(const unsigned char *abuf, int alen,
|
||||
rr_len = DNS_RR_LEN(aptr);
|
||||
rr_ttl = DNS_RR_TTL(aptr);
|
||||
aptr += RRFIXEDSZ;
|
||||
if (aptr + rr_len > abuf + alen)
|
||||
{
|
||||
free(rr_name);
|
||||
status = ARES_EBADRESP;
|
||||
break;
|
||||
}
|
||||
|
||||
if (rr_class == C_IN && rr_type == T_AAAA
|
||||
&& rr_len == sizeof(struct ares_in6_addr)
|
||||
@@ -241,6 +242,8 @@ int ares_parse_aaaa_reply(const unsigned char *abuf, int alen,
|
||||
for (i = 0; i < naddrs; i++)
|
||||
hostent->h_addr_list[i] = (char *) &addrs[i];
|
||||
hostent->h_addr_list[naddrs] = NULL;
|
||||
if (!naddrs && addrs)
|
||||
free(addrs);
|
||||
*host = hostent;
|
||||
return ARES_SUCCESS;
|
||||
}
|
||||
|
||||
10
deps/cares/src/ares_parse_mx_reply.c
vendored
10
deps/cares/src/ares_parse_mx_reply.c
vendored
@@ -17,9 +17,6 @@
|
||||
|
||||
#include "ares_setup.h"
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
@@ -38,8 +35,6 @@
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "ares.h"
|
||||
#include "ares_dns.h"
|
||||
#include "ares_data.h"
|
||||
@@ -105,6 +100,11 @@ ares_parse_mx_reply (const unsigned char *abuf, int alen,
|
||||
rr_class = DNS_RR_CLASS (aptr);
|
||||
rr_len = DNS_RR_LEN (aptr);
|
||||
aptr += RRFIXEDSZ;
|
||||
if (aptr + rr_len > abuf + alen)
|
||||
{
|
||||
status = ARES_EBADRESP;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Check if we are really looking at a MX record */
|
||||
if (rr_class == C_IN && rr_type == T_MX)
|
||||
|
||||
10
deps/cares/src/ares_parse_naptr_reply.c
vendored
10
deps/cares/src/ares_parse_naptr_reply.c
vendored
@@ -17,9 +17,6 @@
|
||||
|
||||
#include "ares_setup.h"
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
@@ -38,8 +35,6 @@
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "ares.h"
|
||||
#include "ares_dns.h"
|
||||
#include "ares_data.h"
|
||||
@@ -110,6 +105,11 @@ ares_parse_naptr_reply (const unsigned char *abuf, int alen,
|
||||
rr_class = DNS_RR_CLASS (aptr);
|
||||
rr_len = DNS_RR_LEN (aptr);
|
||||
aptr += RRFIXEDSZ;
|
||||
if (aptr + rr_len > abuf + alen)
|
||||
{
|
||||
status = ARES_EBADRESP;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Check if we are really looking at a NAPTR record */
|
||||
if (rr_class == C_IN && rr_type == T_NAPTR)
|
||||
|
||||
11
deps/cares/src/ares_parse_ns_reply.c
vendored
11
deps/cares/src/ares_parse_ns_reply.c
vendored
@@ -20,9 +20,6 @@
|
||||
|
||||
#include "ares_setup.h"
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
@@ -41,8 +38,6 @@
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "ares.h"
|
||||
#include "ares_dns.h"
|
||||
#include "ares_private.h"
|
||||
@@ -110,6 +105,12 @@ int ares_parse_ns_reply( const unsigned char* abuf, int alen,
|
||||
rr_class = DNS_RR_CLASS( aptr );
|
||||
rr_len = DNS_RR_LEN( aptr );
|
||||
aptr += RRFIXEDSZ;
|
||||
if (aptr + rr_len > abuf + alen)
|
||||
{
|
||||
free(rr_name);
|
||||
status = ARES_EBADRESP;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( rr_class == C_IN && rr_type == T_NS )
|
||||
{
|
||||
|
||||
13
deps/cares/src/ares_parse_ptr_reply.c
vendored
13
deps/cares/src/ares_parse_ptr_reply.c
vendored
@@ -16,9 +16,6 @@
|
||||
|
||||
#include "ares_setup.h"
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
@@ -38,8 +35,6 @@
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "ares.h"
|
||||
#include "ares_dns.h"
|
||||
#include "ares_nowarn.h"
|
||||
@@ -108,6 +103,12 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
|
||||
rr_class = DNS_RR_CLASS(aptr);
|
||||
rr_len = DNS_RR_LEN(aptr);
|
||||
aptr += RRFIXEDSZ;
|
||||
if (aptr + rr_len > abuf + alen)
|
||||
{
|
||||
free(rr_name);
|
||||
status = ARES_EBADRESP;
|
||||
break;
|
||||
}
|
||||
|
||||
if (rr_class == C_IN && rr_type == T_PTR
|
||||
&& strcasecmp(rr_name, ptrname) == 0)
|
||||
@@ -208,7 +209,7 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
|
||||
status = ARES_ENOMEM;
|
||||
}
|
||||
for (i=0 ; i<aliascnt ; i++)
|
||||
if (aliases[i])
|
||||
if (aliases[i])
|
||||
free(aliases[i]);
|
||||
free(aliases);
|
||||
if (hostname)
|
||||
|
||||
5
deps/cares/src/ares_parse_soa_reply.c
vendored
5
deps/cares/src/ares_parse_soa_reply.c
vendored
@@ -17,9 +17,6 @@
|
||||
|
||||
#include "ares_setup.h"
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
@@ -38,8 +35,6 @@
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "ares.h"
|
||||
#include "ares_dns.h"
|
||||
#include "ares_data.h"
|
||||
|
||||
10
deps/cares/src/ares_parse_srv_reply.c
vendored
10
deps/cares/src/ares_parse_srv_reply.c
vendored
@@ -17,9 +17,6 @@
|
||||
|
||||
#include "ares_setup.h"
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
@@ -38,8 +35,6 @@
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "ares.h"
|
||||
#include "ares_dns.h"
|
||||
#include "ares_data.h"
|
||||
@@ -110,6 +105,11 @@ ares_parse_srv_reply (const unsigned char *abuf, int alen,
|
||||
rr_class = DNS_RR_CLASS (aptr);
|
||||
rr_len = DNS_RR_LEN (aptr);
|
||||
aptr += RRFIXEDSZ;
|
||||
if (aptr + rr_len > abuf + alen)
|
||||
{
|
||||
status = ARES_EBADRESP;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Check if we are really looking at a SRV record */
|
||||
if (rr_class == C_IN && rr_type == T_SRV)
|
||||
|
||||
87
deps/cares/src/ares_parse_txt_reply.c
vendored
87
deps/cares/src/ares_parse_txt_reply.c
vendored
@@ -17,9 +17,6 @@
|
||||
|
||||
#include "ares_setup.h"
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
@@ -42,9 +39,6 @@
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "ares.h"
|
||||
#include "ares_dns.h"
|
||||
#include "ares_data.h"
|
||||
@@ -54,7 +48,7 @@ int
|
||||
ares_parse_txt_reply (const unsigned char *abuf, int alen,
|
||||
struct ares_txt_reply **txt_out)
|
||||
{
|
||||
size_t substr_len, str_len;
|
||||
size_t substr_len;
|
||||
unsigned int qdcount, ancount, i;
|
||||
const unsigned char *aptr;
|
||||
const unsigned char *strptr;
|
||||
@@ -112,27 +106,15 @@ ares_parse_txt_reply (const unsigned char *abuf, int alen,
|
||||
rr_class = DNS_RR_CLASS (aptr);
|
||||
rr_len = DNS_RR_LEN (aptr);
|
||||
aptr += RRFIXEDSZ;
|
||||
if (aptr + rr_len > abuf + alen)
|
||||
{
|
||||
status = ARES_EBADRESP;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Check if we are really looking at a TXT record */
|
||||
if (rr_class == C_IN && rr_type == T_TXT)
|
||||
{
|
||||
/* Allocate storage for this TXT answer appending it to the list */
|
||||
txt_curr = ares_malloc_data(ARES_DATATYPE_TXT_REPLY);
|
||||
if (!txt_curr)
|
||||
{
|
||||
status = ARES_ENOMEM;
|
||||
break;
|
||||
}
|
||||
if (txt_last)
|
||||
{
|
||||
txt_last->next = txt_curr;
|
||||
}
|
||||
else
|
||||
{
|
||||
txt_head = txt_curr;
|
||||
}
|
||||
txt_last = txt_curr;
|
||||
|
||||
/*
|
||||
* There may be multiple substrings in a single TXT record. Each
|
||||
* substring may be up to 255 characters in length, with a
|
||||
@@ -141,36 +123,49 @@ ares_parse_txt_reply (const unsigned char *abuf, int alen,
|
||||
* substrings contained therein.
|
||||
*/
|
||||
|
||||
/* Compute total length to allow a single memory allocation */
|
||||
strptr = aptr;
|
||||
while (strptr < (aptr + rr_len))
|
||||
{
|
||||
substr_len = (unsigned char)*strptr;
|
||||
txt_curr->length += substr_len;
|
||||
strptr += substr_len + 1;
|
||||
}
|
||||
if (strptr + substr_len + 1 > aptr + rr_len)
|
||||
{
|
||||
status = ARES_EBADRESP;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Including null byte */
|
||||
txt_curr->txt = malloc (txt_curr->length + 1);
|
||||
if (txt_curr->txt == NULL)
|
||||
{
|
||||
status = ARES_ENOMEM;
|
||||
break;
|
||||
}
|
||||
++strptr;
|
||||
|
||||
/* Allocate storage for this TXT answer appending it to the list */
|
||||
txt_curr = ares_malloc_data(ARES_DATATYPE_TXT_REPLY);
|
||||
if (!txt_curr)
|
||||
{
|
||||
status = ARES_ENOMEM;
|
||||
break;
|
||||
}
|
||||
if (txt_last)
|
||||
{
|
||||
txt_last->next = txt_curr;
|
||||
}
|
||||
else
|
||||
{
|
||||
txt_head = txt_curr;
|
||||
}
|
||||
txt_last = txt_curr;
|
||||
|
||||
txt_curr->length = substr_len;
|
||||
txt_curr->txt = malloc (substr_len + 1/* Including null byte */);
|
||||
if (txt_curr->txt == NULL)
|
||||
{
|
||||
status = ARES_ENOMEM;
|
||||
break;
|
||||
}
|
||||
memcpy ((char *) txt_curr->txt, strptr, substr_len);
|
||||
|
||||
/* Make sure we NULL-terminate */
|
||||
txt_curr->txt[substr_len] = 0;
|
||||
|
||||
/* Step through the list of substrings, concatenating them */
|
||||
str_len = 0;
|
||||
strptr = aptr;
|
||||
while (strptr < (aptr + rr_len))
|
||||
{
|
||||
substr_len = (unsigned char)*strptr;
|
||||
strptr++;
|
||||
memcpy ((char *) txt_curr->txt + str_len, strptr, substr_len);
|
||||
str_len += substr_len;
|
||||
strptr += substr_len;
|
||||
}
|
||||
/* Make sure we NULL-terminate */
|
||||
*((char *) txt_curr->txt + txt_curr->length) = '\0';
|
||||
}
|
||||
|
||||
/* Don't lose memory in the next iteration */
|
||||
|
||||
17
deps/cares/src/ares_private.h
vendored
17
deps/cares/src/ares_private.h
vendored
@@ -26,9 +26,6 @@
|
||||
#define WIN32
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
@@ -40,10 +37,6 @@
|
||||
#define HAVE_WRITEV 1
|
||||
#endif
|
||||
|
||||
#ifdef NETWARE
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
#define DEFAULT_TIMEOUT 5000 /* milliseconds */
|
||||
#define DEFAULT_TRIES 4
|
||||
#ifndef INADDR_NONE
|
||||
@@ -113,6 +106,13 @@
|
||||
# define writev(s,ptr,cnt) ares_writev(s,ptr,cnt)
|
||||
#endif
|
||||
|
||||
/********* EDNS defines section ******/
|
||||
#define EDNSPACKETSZ 1280 /* Reasonable UDP payload size, as suggested
|
||||
in RFC2671 */
|
||||
#define MAXENDSSZ 4096 /* Maximum (local) limit for edns packet size */
|
||||
#define EDNSFIXEDSZ 11 /* Size of EDNS header */
|
||||
/********* EDNS defines section ******/
|
||||
|
||||
struct ares_addr {
|
||||
int family;
|
||||
union {
|
||||
@@ -260,6 +260,7 @@ struct ares_channeldata {
|
||||
struct apattern *sortlist;
|
||||
int nsort;
|
||||
char *lookups;
|
||||
int ednspsz;
|
||||
|
||||
/* For binding to local devices and/or IP addresses. Leave
|
||||
* them null/zero for no binding.
|
||||
@@ -317,7 +318,6 @@ long ares__timeoffset(struct timeval *now,
|
||||
struct timeval *check);
|
||||
/* returns ARES_SUCCESS if library has been initialized */
|
||||
int ares_library_initialized(void);
|
||||
void ares__rc4(rc4_key* key,unsigned char *buffer_ptr, int buffer_len);
|
||||
void ares__send_query(ares_channel channel, struct query *query,
|
||||
struct timeval *now);
|
||||
void ares__close_sockets(ares_channel channel, struct server_state *server);
|
||||
@@ -349,6 +349,7 @@ long ares__tvdiff(struct timeval t1, struct timeval t2);
|
||||
libcurl lowlevel code from within library is ugly and only works when
|
||||
c-ares is built and linked with a similarly curldebug-enabled libcurl,
|
||||
but we do this anyway for convenience. */
|
||||
#define HEADER_CURL_SETUP_ONCE_H
|
||||
#include "../lib/memdebug.h"
|
||||
#endif
|
||||
|
||||
|
||||
242
deps/cares/src/ares_process.c
vendored
242
deps/cares/src/ares_process.c
vendored
@@ -1,6 +1,6 @@
|
||||
|
||||
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
||||
* Copyright (C) 2004-2012 by Daniel Stenberg
|
||||
* Copyright (C) 2004-2013 by Daniel Stenberg
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
@@ -17,9 +17,6 @@
|
||||
|
||||
#include "ares_setup.h"
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_UIO_H
|
||||
# include <sys/uio.h>
|
||||
#endif
|
||||
@@ -41,16 +38,9 @@
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
# include <sys/ioctl.h>
|
||||
#endif
|
||||
@@ -59,10 +49,7 @@
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "ares.h"
|
||||
#include "ares_dns.h"
|
||||
@@ -268,7 +255,7 @@ static void write_tcp_data(ares_channel channel,
|
||||
if (wcount < 0)
|
||||
{
|
||||
if (!try_again(SOCKERRNO))
|
||||
handle_error(channel, i, now);
|
||||
handle_error(channel, i, now);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -284,7 +271,7 @@ static void write_tcp_data(ares_channel channel,
|
||||
if (scount < 0)
|
||||
{
|
||||
if (!try_again(SOCKERRNO))
|
||||
handle_error(channel, i, now);
|
||||
handle_error(channel, i, now);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -356,11 +343,11 @@ static void read_tcp_data(ares_channel channel, fd_set *read_fds,
|
||||
}
|
||||
|
||||
if(read_fds)
|
||||
/* If there's an error and we close this socket, then open
|
||||
* another with the same fd to talk to another server, then we
|
||||
* don't want to think that it was the new socket that was
|
||||
* ready. This is not disastrous, but is likely to result in
|
||||
* extra system calls and confusion. */
|
||||
/* If there's an error and we close this socket, then open another
|
||||
* with the same fd to talk to another server, then we don't want to
|
||||
* think that it was the new socket that was ready. This is not
|
||||
* disastrous, but is likely to result in extra system calls and
|
||||
* confusion. */
|
||||
FD_CLR(server->tcp_socket, read_fds);
|
||||
|
||||
if (server->tcp_lenbuf_pos != 2)
|
||||
@@ -374,7 +361,7 @@ static void read_tcp_data(ares_channel channel, fd_set *read_fds,
|
||||
if (count <= 0)
|
||||
{
|
||||
if (!(count == -1 && try_again(SOCKERRNO)))
|
||||
handle_error(channel, i, now);
|
||||
handle_error(channel, i, now);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -401,7 +388,7 @@ static void read_tcp_data(ares_channel channel, fd_set *read_fds,
|
||||
if (count <= 0)
|
||||
{
|
||||
if (!(count == -1 && try_again(SOCKERRNO)))
|
||||
handle_error(channel, i, now);
|
||||
handle_error(channel, i, now);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -430,7 +417,7 @@ static void read_udp_packets(ares_channel channel, fd_set *read_fds,
|
||||
struct server_state *server;
|
||||
int i;
|
||||
ssize_t count;
|
||||
unsigned char buf[PACKETSZ + 1];
|
||||
unsigned char buf[MAXENDSSZ + 1];
|
||||
#ifdef HAVE_RECVFROM
|
||||
ares_socklen_t fromlen;
|
||||
union {
|
||||
@@ -472,25 +459,31 @@ static void read_udp_packets(ares_channel channel, fd_set *read_fds,
|
||||
/* To reduce event loop overhead, read and process as many
|
||||
* packets as we can. */
|
||||
do {
|
||||
if (server->udp_socket == ARES_SOCKET_BAD)
|
||||
count = 0;
|
||||
|
||||
else {
|
||||
#ifdef HAVE_RECVFROM
|
||||
if (server->addr.family == AF_INET)
|
||||
fromlen = sizeof(from.sa4);
|
||||
else
|
||||
fromlen = sizeof(from.sa6);
|
||||
count = (ssize_t)recvfrom(server->udp_socket, (void *)buf, sizeof(buf),
|
||||
0, &from.sa, &fromlen);
|
||||
if (server->addr.family == AF_INET)
|
||||
fromlen = sizeof(from.sa4);
|
||||
else
|
||||
fromlen = sizeof(from.sa6);
|
||||
count = (ssize_t)recvfrom(server->udp_socket, (void *)buf,
|
||||
sizeof(buf), 0, &from.sa, &fromlen);
|
||||
#else
|
||||
count = sread(server->udp_socket, buf, sizeof(buf));
|
||||
count = sread(server->udp_socket, buf, sizeof(buf));
|
||||
#endif
|
||||
}
|
||||
|
||||
if (count == -1 && try_again(SOCKERRNO))
|
||||
continue;
|
||||
else if (count <= 0)
|
||||
handle_error(channel, i, now);
|
||||
#ifdef HAVE_RECVFROM
|
||||
else if (!same_address(&from.sa, &server->addr))
|
||||
/* The address the response comes from does not match
|
||||
* the address we sent the request to. Someone may be
|
||||
* attempting to perform a cache poisoning attack. */
|
||||
/* The address the response comes from does not match the address we
|
||||
* sent the request to. Someone may be attempting to perform a cache
|
||||
* poisoning attack. */
|
||||
break;
|
||||
#endif
|
||||
else
|
||||
@@ -507,11 +500,10 @@ static void process_timeouts(ares_channel channel, struct timeval *now)
|
||||
struct list_node* list_head;
|
||||
struct list_node* list_node;
|
||||
|
||||
/* Process all the timeouts that have fired since the last time we
|
||||
* processed timeouts. If things are going well, then we'll have
|
||||
* hundreds/thousands of queries that fall into future buckets, and
|
||||
* only a handful of requests that fall into the "now" bucket, so
|
||||
* this should be quite quick.
|
||||
/* Process all the timeouts that have fired since the last time we processed
|
||||
* timeouts. If things are going well, then we'll have hundreds/thousands of
|
||||
* queries that fall into future buckets, and only a handful of requests
|
||||
* that fall into the "now" bucket, so this should be quite quick.
|
||||
*/
|
||||
for (t = channel->last_timeout_processed; t <= now->tv_sec; t++)
|
||||
{
|
||||
@@ -536,7 +528,7 @@ static void process_answer(ares_channel channel, unsigned char *abuf,
|
||||
int alen, int whichserver, int tcp,
|
||||
struct timeval *now)
|
||||
{
|
||||
int tc, rcode;
|
||||
int tc, rcode, packetsz;
|
||||
unsigned short id;
|
||||
struct query *query;
|
||||
struct list_node* list_head;
|
||||
@@ -553,11 +545,10 @@ static void process_answer(ares_channel channel, unsigned char *abuf,
|
||||
rcode = DNS_HEADER_RCODE(abuf);
|
||||
|
||||
/* Find the query corresponding to this packet. The queries are
|
||||
* hashed/bucketed by query id, so this lookup should be quick.
|
||||
* Note that both the query id and the questions must be the same;
|
||||
* when the query id wraps around we can have multiple outstanding
|
||||
* queries with the same query id, so we need to check both the id and
|
||||
* question.
|
||||
* hashed/bucketed by query id, so this lookup should be quick. Note that
|
||||
* both the query id and the questions must be the same; when the query id
|
||||
* wraps around we can have multiple outstanding queries with the same query
|
||||
* id, so we need to check both the id and question.
|
||||
*/
|
||||
query = NULL;
|
||||
list_head = &(channel->queries_by_qid[id % ARES_QID_TABLE_SIZE]);
|
||||
@@ -574,11 +565,34 @@ static void process_answer(ares_channel channel, unsigned char *abuf,
|
||||
if (!query)
|
||||
return;
|
||||
|
||||
packetsz = PACKETSZ;
|
||||
/* If we use EDNS and server answers with one of these RCODES, the protocol
|
||||
* extension is not understood by the responder. We must retry the query
|
||||
* without EDNS enabled.
|
||||
*/
|
||||
if (channel->flags & ARES_FLAG_EDNS)
|
||||
{
|
||||
packetsz = channel->ednspsz;
|
||||
if (rcode == NOTIMP || rcode == FORMERR || rcode == SERVFAIL)
|
||||
{
|
||||
int qlen = alen - EDNSFIXEDSZ;
|
||||
channel->flags ^= ARES_FLAG_EDNS;
|
||||
query->tcplen -= EDNSFIXEDSZ;
|
||||
query->qlen -= EDNSFIXEDSZ;
|
||||
query->tcpbuf[0] = (unsigned char)((qlen >> 8) & 0xff);
|
||||
query->tcpbuf[1] = (unsigned char)(qlen & 0xff);
|
||||
DNS_HEADER_SET_ARCOUNT(query->tcpbuf + 2, 0);
|
||||
query->tcpbuf = realloc(query->tcpbuf, query->tcplen);
|
||||
ares__send_query(channel, query, now);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* If we got a truncated UDP packet and are not ignoring truncation,
|
||||
* don't accept the packet, and switch the query to TCP if we hadn't
|
||||
* done so already.
|
||||
*/
|
||||
if ((tc || alen > PACKETSZ) && !tcp && !(channel->flags & ARES_FLAG_IGNTC))
|
||||
if ((tc || alen > packetsz) && !tcp && !(channel->flags & ARES_FLAG_IGNTC))
|
||||
{
|
||||
if (!query->using_tcp)
|
||||
{
|
||||
@@ -591,8 +605,8 @@ static void process_answer(ares_channel channel, unsigned char *abuf,
|
||||
/* Limit alen to PACKETSZ if we aren't using TCP (only relevant if we
|
||||
* are ignoring truncation.
|
||||
*/
|
||||
if (alen > PACKETSZ && !tcp)
|
||||
alen = PACKETSZ;
|
||||
if (alen > packetsz && !tcp)
|
||||
alen = packetsz;
|
||||
|
||||
/* If we aren't passing through all error packets, discard packets
|
||||
* with SERVFAIL, NOTIMP, or REFUSED response codes.
|
||||
@@ -626,6 +640,31 @@ static void process_broken_connections(ares_channel channel,
|
||||
}
|
||||
}
|
||||
|
||||
/* Swap the contents of two lists */
|
||||
static void swap_lists(struct list_node* head_a,
|
||||
struct list_node* head_b)
|
||||
{
|
||||
int is_a_empty = ares__is_list_empty(head_a);
|
||||
int is_b_empty = ares__is_list_empty(head_b);
|
||||
struct list_node old_a = *head_a;
|
||||
struct list_node old_b = *head_b;
|
||||
|
||||
if (is_a_empty) {
|
||||
ares__init_list_head(head_b);
|
||||
} else {
|
||||
*head_b = old_a;
|
||||
old_a.next->prev = head_b;
|
||||
old_a.prev->next = head_b;
|
||||
}
|
||||
if (is_b_empty) {
|
||||
ares__init_list_head(head_a);
|
||||
} else {
|
||||
*head_a = old_b;
|
||||
old_b.next->prev = head_a;
|
||||
old_b.prev->next = head_a;
|
||||
}
|
||||
}
|
||||
|
||||
static void handle_error(ares_channel channel, int whichserver,
|
||||
struct timeval *now)
|
||||
{
|
||||
@@ -639,15 +678,14 @@ static void handle_error(ares_channel channel, int whichserver,
|
||||
/* Reset communications with this server. */
|
||||
ares__close_sockets(channel, server);
|
||||
|
||||
/* Tell all queries talking to this server to move on and not try
|
||||
* this server again. We steal the current list of queries that were
|
||||
* in-flight to this server, since when we call next_server this can
|
||||
* cause the queries to be re-sent to this server, which will
|
||||
* re-insert these queries in that same server->queries_to_server
|
||||
* list.
|
||||
/* Tell all queries talking to this server to move on and not try this
|
||||
* server again. We steal the current list of queries that were in-flight to
|
||||
* this server, since when we call next_server this can cause the queries to
|
||||
* be re-sent to this server, which will re-insert these queries in that
|
||||
* same server->queries_to_server list.
|
||||
*/
|
||||
ares__init_list_head(&list_head);
|
||||
ares__swap_lists(&list_head, &(server->queries_to_server));
|
||||
swap_lists(&list_head, &(server->queries_to_server));
|
||||
for (list_node = list_head.next; list_node != &list_head; )
|
||||
{
|
||||
query = list_node->data;
|
||||
@@ -663,14 +701,15 @@ static void handle_error(ares_channel channel, int whichserver,
|
||||
}
|
||||
|
||||
static void skip_server(ares_channel channel, struct query *query,
|
||||
int whichserver) {
|
||||
/* The given server gave us problems with this query, so if we have
|
||||
* the luxury of using other servers, then let's skip the
|
||||
* potentially broken server and just use the others. If we only
|
||||
* have one server and we need to retry then we should just go ahead
|
||||
* and re-use that server, since it's our only hope; perhaps we
|
||||
* just got unlucky, and retrying will work (eg, the server timed
|
||||
* out our TCP connection just as we were sending another request).
|
||||
int whichserver)
|
||||
{
|
||||
/* The given server gave us problems with this query, so if we have the
|
||||
* luxury of using other servers, then let's skip the potentially broken
|
||||
* server and just use the others. If we only have one server and we need to
|
||||
* retry then we should just go ahead and re-use that server, since it's our
|
||||
* only hope; perhaps we just got unlucky, and retrying will work (eg, the
|
||||
* server timed out our TCP connection just as we were sending another
|
||||
* request).
|
||||
*/
|
||||
if (channel->nservers > 1)
|
||||
{
|
||||
@@ -693,11 +732,10 @@ static void next_server(ares_channel channel, struct query *query,
|
||||
query->server = (query->server + 1) % channel->nservers;
|
||||
server = &channel->servers[query->server];
|
||||
|
||||
/* We don't want to use this server if (1) we decided this
|
||||
* connection is broken, and thus about to be closed, (2)
|
||||
* we've decided to skip this server because of earlier
|
||||
* errors we encountered, or (3) we already sent this query
|
||||
* over this exact connection.
|
||||
/* We don't want to use this server if (1) we decided this connection is
|
||||
* broken, and thus about to be closed, (2) we've decided to skip this
|
||||
* server because of earlier errors we encountered, or (3) we already
|
||||
* sent this query over this exact connection.
|
||||
*/
|
||||
if (!server->is_broken &&
|
||||
!query->server_info[query->server].skip_server &&
|
||||
@@ -709,11 +747,11 @@ static void next_server(ares_channel channel, struct query *query,
|
||||
return;
|
||||
}
|
||||
|
||||
/* You might think that with TCP we only need one try. However,
|
||||
* even when using TCP, servers can time-out our connection just
|
||||
* as we're sending a request, or close our connection because
|
||||
* they die, or never send us a reply because they get wedged or
|
||||
* tickle a bug that drops our request.
|
||||
/* You might think that with TCP we only need one try. However, even
|
||||
* when using TCP, servers can time-out our connection just as we're
|
||||
* sending a request, or close our connection because they die, or never
|
||||
* send us a reply because they get wedged or tickle a bug that drops
|
||||
* our request.
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -749,11 +787,11 @@ void ares__send_query(ares_channel channel, struct query *query,
|
||||
end_query(channel, query, ARES_ENOMEM, NULL, 0);
|
||||
return;
|
||||
}
|
||||
/* To make the common case fast, we avoid copies by using the
|
||||
* query's tcpbuf for as long as the query is alive. In the rare
|
||||
* case where the query ends while it's queued for transmission,
|
||||
* then we give the sendreq its own copy of the request packet
|
||||
* and put it in sendreq->data_storage.
|
||||
/* To make the common case fast, we avoid copies by using the query's
|
||||
* tcpbuf for as long as the query is alive. In the rare case where the
|
||||
* query ends while it's queued for transmission, then we give the
|
||||
* sendreq its own copy of the request packet and put it in
|
||||
* sendreq->data_storage.
|
||||
*/
|
||||
sendreq->data_storage = NULL;
|
||||
sendreq->data = query->tcpbuf;
|
||||
@@ -916,10 +954,12 @@ static int configure_socket(ares_socket_t s, int family, ares_channel channel)
|
||||
}
|
||||
}
|
||||
else if (family == AF_INET6) {
|
||||
if (memcmp(channel->local_ip6, &ares_in6addr_any, sizeof(channel->local_ip6)) != 0) {
|
||||
if (memcmp(channel->local_ip6, &ares_in6addr_any,
|
||||
sizeof(channel->local_ip6)) != 0) {
|
||||
memset(&local.sa6, 0, sizeof(local.sa6));
|
||||
local.sa6.sin6_family = AF_INET6;
|
||||
memcpy(&local.sa6.sin6_addr, channel->local_ip6, sizeof(channel->local_ip6));
|
||||
memcpy(&local.sa6.sin6_addr, channel->local_ip6,
|
||||
sizeof(channel->local_ip6));
|
||||
if (bind(s, &local.sa, sizeof(local.sa6)) < 0)
|
||||
return -1;
|
||||
}
|
||||
@@ -1222,19 +1262,17 @@ static void end_query (ares_channel channel, struct query *query, int status,
|
||||
assert(sendreq->data_storage == NULL);
|
||||
if (status == ARES_SUCCESS)
|
||||
{
|
||||
/* We got a reply for this query, but this queued
|
||||
* sendreq points into this soon-to-be-gone query's
|
||||
* tcpbuf. Probably this means we timed out and queued
|
||||
* the query for retransmission, then received a
|
||||
* response before actually retransmitting. This is
|
||||
* perfectly fine, so we want to keep the connection
|
||||
* running smoothly if we can. But in the worst case
|
||||
* we may have sent only some prefix of the query,
|
||||
* with some suffix of the query left to send. Also,
|
||||
* the buffer may be queued on multiple queues. To
|
||||
* prevent dangling pointers to the query's tcpbuf and
|
||||
* handle these cases, we just give such sendreqs
|
||||
* their own copy of the query packet.
|
||||
/* We got a reply for this query, but this queued sendreq
|
||||
* points into this soon-to-be-gone query's tcpbuf. Probably
|
||||
* this means we timed out and queued the query for
|
||||
* retransmission, then received a response before actually
|
||||
* retransmitting. This is perfectly fine, so we want to keep
|
||||
* the connection running smoothly if we can. But in the worst
|
||||
* case we may have sent only some prefix of the query, with
|
||||
* some suffix of the query left to send. Also, the buffer may
|
||||
* be queued on multiple queues. To prevent dangling pointers
|
||||
* to the query's tcpbuf and handle these cases, we just give
|
||||
* such sendreqs their own copy of the query packet.
|
||||
*/
|
||||
sendreq->data_storage = malloc(sendreq->len);
|
||||
if (sendreq->data_storage != NULL)
|
||||
@@ -1245,14 +1283,12 @@ static void end_query (ares_channel channel, struct query *query, int status,
|
||||
}
|
||||
if ((status != ARES_SUCCESS) || (sendreq->data_storage == NULL))
|
||||
{
|
||||
/* We encountered an error (probably a timeout,
|
||||
* suggesting the DNS server we're talking to is
|
||||
* probably unreachable, wedged, or severely
|
||||
* overloaded) or we couldn't copy the request, so
|
||||
* mark the connection as broken. When we get to
|
||||
* process_broken_connections() we'll close the
|
||||
* connection and try to re-send requests to another
|
||||
* server.
|
||||
/* We encountered an error (probably a timeout, suggesting the
|
||||
* DNS server we're talking to is probably unreachable,
|
||||
* wedged, or severely overloaded) or we couldn't copy the
|
||||
* request, so mark the connection as broken. When we get to
|
||||
* process_broken_connections() we'll close the connection and
|
||||
* try to re-send requests to another server.
|
||||
*/
|
||||
server->is_broken = 1;
|
||||
/* Just to be paranoid, zero out this sendreq... */
|
||||
@@ -1266,8 +1302,8 @@ static void end_query (ares_channel channel, struct query *query, int status,
|
||||
query->callback(query->arg, status, query->timeouts, abuf, alen);
|
||||
ares__free_query(query);
|
||||
|
||||
/* Simple cleanup policy: if no queries are remaining, close all
|
||||
* network sockets unless STAYOPEN is set.
|
||||
/* Simple cleanup policy: if no queries are remaining, close all network
|
||||
* sockets unless STAYOPEN is set.
|
||||
*/
|
||||
if (!(channel->flags & ARES_FLAG_STAYOPEN) &&
|
||||
ares__is_list_empty(&(channel->all_queries)))
|
||||
|
||||
17
deps/cares/src/ares_query.c
vendored
17
deps/cares/src/ares_query.c
vendored
@@ -16,9 +16,6 @@
|
||||
|
||||
#include "ares_setup.h"
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
@@ -31,7 +28,6 @@
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "ares.h"
|
||||
#include "ares_dns.h"
|
||||
#include "ares_private.h"
|
||||
@@ -43,7 +39,7 @@ struct qquery {
|
||||
|
||||
static void qcallback(void *arg, int status, int timeouts, unsigned char *abuf, int alen);
|
||||
|
||||
void ares__rc4(rc4_key* key, unsigned char *buffer_ptr, int buffer_len)
|
||||
static void rc4(rc4_key* key, unsigned char *buffer_ptr, int buffer_len)
|
||||
{
|
||||
unsigned char x;
|
||||
unsigned char y;
|
||||
@@ -105,6 +101,13 @@ static unsigned short generate_unique_id(ares_channel channel)
|
||||
return (unsigned short)id;
|
||||
}
|
||||
|
||||
unsigned short ares__generate_new_id(rc4_key* key)
|
||||
{
|
||||
unsigned short r=0;
|
||||
rc4(key, (unsigned char *)&r, sizeof(r));
|
||||
return r;
|
||||
}
|
||||
|
||||
void ares_query(ares_channel channel, const char *name, int dnsclass,
|
||||
int type, ares_callback callback, void *arg)
|
||||
{
|
||||
@@ -114,8 +117,8 @@ void ares_query(ares_channel channel, const char *name, int dnsclass,
|
||||
|
||||
/* Compose the query. */
|
||||
rd = !(channel->flags & ARES_FLAG_NORECURSE);
|
||||
status = ares_mkquery(name, dnsclass, type, channel->next_id, rd, &qbuf,
|
||||
&qlen);
|
||||
status = ares_create_query(name, dnsclass, type, channel->next_id, rd, &qbuf,
|
||||
&qlen, (channel->flags & ARES_FLAG_EDNS) ? channel->ednspsz : 0);
|
||||
if (status != ARES_SUCCESS)
|
||||
{
|
||||
if (qbuf != NULL) free(qbuf);
|
||||
|
||||
5
deps/cares/src/ares_search.c
vendored
5
deps/cares/src/ares_search.c
vendored
@@ -16,11 +16,6 @@
|
||||
|
||||
#include "ares_setup.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
13
deps/cares/src/ares_send.c
vendored
13
deps/cares/src/ares_send.c
vendored
@@ -16,9 +16,6 @@
|
||||
|
||||
#include "ares_setup.h"
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
@@ -31,9 +28,6 @@
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include "ares.h"
|
||||
#include "ares_dns.h"
|
||||
#include "ares_private.h"
|
||||
@@ -42,7 +36,7 @@ void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen,
|
||||
ares_callback callback, void *arg)
|
||||
{
|
||||
struct query *query;
|
||||
int i;
|
||||
int i, packetsz;
|
||||
struct timeval now;
|
||||
|
||||
/* Verify that the query is at least long enough to hold the header. */
|
||||
@@ -109,7 +103,10 @@ void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen,
|
||||
query->server_info[i].skip_server = 0;
|
||||
query->server_info[i].tcp_connection_generation = 0;
|
||||
}
|
||||
query->using_tcp = (channel->flags & ARES_FLAG_USEVC) || qlen > PACKETSZ;
|
||||
|
||||
packetsz = (channel->flags & ARES_FLAG_EDNS) ? channel->ednspsz : PACKETSZ;
|
||||
query->using_tcp = (channel->flags & ARES_FLAG_USEVC) || qlen > packetsz;
|
||||
|
||||
query->error_status = ARES_ECONNREFUSED;
|
||||
query->timeouts = 0;
|
||||
|
||||
|
||||
12
deps/cares/src/ares_timeout.c
vendored
12
deps/cares/src/ares_timeout.c
vendored
@@ -16,12 +16,10 @@
|
||||
|
||||
#include "ares_setup.h"
|
||||
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#ifdef HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include "ares.h"
|
||||
#include "ares_private.h"
|
||||
|
||||
@@ -67,8 +65,10 @@ struct timeval *ares_timeout(ares_channel channel, struct timeval *maxtv,
|
||||
*/
|
||||
if (min_offset != -1)
|
||||
{
|
||||
nextstop.tv_sec = min_offset/1000;
|
||||
nextstop.tv_usec = (min_offset%1000)*1000;
|
||||
int ioffset = (min_offset > (long)INT_MAX) ? INT_MAX : (int)min_offset;
|
||||
|
||||
nextstop.tv_sec = ioffset/1000;
|
||||
nextstop.tv_usec = (ioffset%1000)*1000;
|
||||
|
||||
if (!maxtv || ares__timedout(maxtv, &nextstop))
|
||||
{
|
||||
|
||||
40
deps/cares/src/bitncmp.c
vendored
40
deps/cares/src/bitncmp.c
vendored
@@ -33,27 +33,27 @@
|
||||
* author:
|
||||
* Paul Vixie (ISC), June 1996
|
||||
*/
|
||||
int
|
||||
ares_bitncmp(const void *l, const void *r, int n) {
|
||||
unsigned int lb, rb;
|
||||
int x, b;
|
||||
int ares__bitncmp(const void *l, const void *r, int n)
|
||||
{
|
||||
unsigned int lb, rb;
|
||||
int x, b;
|
||||
|
||||
b = n / 8;
|
||||
x = memcmp(l, r, b);
|
||||
if (x || (n % 8) == 0)
|
||||
return (x);
|
||||
b = n / 8;
|
||||
x = memcmp(l, r, b);
|
||||
if (x || (n % 8) == 0)
|
||||
return (x);
|
||||
|
||||
lb = ((const unsigned char *)l)[b];
|
||||
rb = ((const unsigned char *)r)[b];
|
||||
for (b = n % 8; b > 0; b--) {
|
||||
if ((lb & 0x80) != (rb & 0x80)) {
|
||||
if (lb & 0x80)
|
||||
return (1);
|
||||
return (-1);
|
||||
}
|
||||
lb <<= 1;
|
||||
rb <<= 1;
|
||||
}
|
||||
return (0);
|
||||
lb = ((const unsigned char *)l)[b];
|
||||
rb = ((const unsigned char *)r)[b];
|
||||
for (b = n % 8; b > 0; b--) {
|
||||
if ((lb & 0x80) != (rb & 0x80)) {
|
||||
if (lb & 0x80)
|
||||
return (1);
|
||||
return (-1);
|
||||
}
|
||||
lb <<= 1;
|
||||
rb <<= 1;
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
#endif
|
||||
|
||||
6
deps/cares/src/bitncmp.h
vendored
6
deps/cares/src/bitncmp.h
vendored
@@ -2,7 +2,7 @@
|
||||
#define __ARES_BITNCMP_H
|
||||
|
||||
|
||||
/* Copyright (C) 2005 by Dominick Meglio
|
||||
/* Copyright (C) 2005, 2013 by Dominick Meglio
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
@@ -18,9 +18,9 @@
|
||||
*/
|
||||
|
||||
#ifndef HAVE_BITNCMP
|
||||
int ares_bitncmp(const void *l, const void *r, int n);
|
||||
int ares__bitncmp(const void *l, const void *r, int n);
|
||||
#else
|
||||
#define ares_bitncmp(x,y,z) bitncmp(x,y,z)
|
||||
#define ares__bitncmp(x,y,z) bitncmp(x,y,z)
|
||||
#endif
|
||||
|
||||
#endif /* __ARES_BITNCMP_H */
|
||||
|
||||
35
deps/cares/src/get_ver.awk
vendored
35
deps/cares/src/get_ver.awk
vendored
@@ -1,35 +0,0 @@
|
||||
# ***************************************************************************
|
||||
# * Project: c-ares
|
||||
# *
|
||||
# ***************************************************************************
|
||||
# awk script which fetches c-ares version number and string from input
|
||||
# file and writes them to STDOUT. Here you can get an awk version for Win32:
|
||||
# http://www.gknw.net/development/prgtools/awk-20070501.zip
|
||||
#
|
||||
BEGIN {
|
||||
if (match (ARGV[1], /ares_version.h/)) {
|
||||
while ((getline < ARGV[1]) > 0) {
|
||||
if (match ($0, /^#define ARES_COPYRIGHT "[^"]+"$/)) {
|
||||
libcares_copyright_str = substr($0, 25, length($0)-25);
|
||||
}
|
||||
else if (match ($0, /^#define ARES_VERSION_STR "[^"]+"$/)) {
|
||||
libcares_ver_str = substr($3, 2, length($3)-2);
|
||||
}
|
||||
else if (match ($0, /^#define ARES_VERSION_MAJOR [0-9]+$/)) {
|
||||
libcares_ver_major = substr($3, 1, length($3));
|
||||
}
|
||||
else if (match ($0, /^#define ARES_VERSION_MINOR [0-9]+$/)) {
|
||||
libcares_ver_minor = substr($3, 1, length($3));
|
||||
}
|
||||
else if (match ($0, /^#define ARES_VERSION_PATCH [0-9]+$/)) {
|
||||
libcares_ver_patch = substr($3, 1, length($3));
|
||||
}
|
||||
}
|
||||
libcares_ver = libcares_ver_major "," libcares_ver_minor "," libcares_ver_patch;
|
||||
print "LIBCARES_VERSION = " libcares_ver "";
|
||||
print "LIBCARES_VERSION_STR = " libcares_ver_str "";
|
||||
print "LIBCARES_COPYRIGHT_STR = " libcares_copyright_str "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
17
deps/cares/src/inet_net_pton.c
vendored
17
deps/cares/src/inet_net_pton.c
vendored
@@ -18,9 +18,6 @@
|
||||
|
||||
#include "ares_setup.h"
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
@@ -36,15 +33,10 @@
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "ares.h"
|
||||
#include "ares_ipv6.h"
|
||||
#include "ares_nowarn.h"
|
||||
#include "inet_net_pton.h"
|
||||
#include "ares_inet_net_pton.h"
|
||||
|
||||
|
||||
const struct ares_in6_addr ares_in6addr_any = { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } };
|
||||
@@ -448,4 +440,11 @@ int ares_inet_pton(int af, const char *src, void *dst)
|
||||
return 0;
|
||||
return (result > -1 ? 1 : -1);
|
||||
}
|
||||
#else /* HAVE_INET_PTON */
|
||||
int ares_inet_pton(int af, const char *src, void *dst)
|
||||
{
|
||||
/* just relay this to the underlying function */
|
||||
return inet_pton(af, src, dst);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
28
deps/cares/src/inet_ntop.c
vendored
28
deps/cares/src/inet_ntop.c
vendored
@@ -17,9 +17,6 @@
|
||||
|
||||
#include "ares_setup.h"
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
@@ -35,15 +32,8 @@
|
||||
# include <arpa/nameser_compat.h>
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "ares.h"
|
||||
#include "ares_ipv6.h"
|
||||
#include "inet_ntop.h"
|
||||
|
||||
|
||||
#ifndef HAVE_INET_NTOP
|
||||
|
||||
@@ -69,13 +59,13 @@ static const char *inet_ntop6(const unsigned char *src, char *dst, size_t size);
|
||||
* Paul Vixie, 1996.
|
||||
*/
|
||||
const char *
|
||||
ares_inet_ntop(int af, const void *src, char *dst, size_t size)
|
||||
ares_inet_ntop(int af, const void *src, char *dst, ares_socklen_t size)
|
||||
{
|
||||
switch (af) {
|
||||
case AF_INET:
|
||||
return (inet_ntop4(src, dst, size));
|
||||
return (inet_ntop4(src, dst, (size_t)size));
|
||||
case AF_INET6:
|
||||
return (inet_ntop6(src, dst, size));
|
||||
return (inet_ntop6(src, dst, (size_t)size));
|
||||
default:
|
||||
SET_ERRNO(EAFNOSUPPORT);
|
||||
return (NULL);
|
||||
@@ -205,4 +195,14 @@ inet_ntop6(const unsigned char *src, char *dst, size_t size)
|
||||
strcpy(dst, tmp);
|
||||
return (dst);
|
||||
}
|
||||
#endif
|
||||
|
||||
#else /* HAVE_INET_NTOP */
|
||||
|
||||
const char *
|
||||
ares_inet_ntop(int af, const void *src, char *dst, ares_socklen_t size)
|
||||
{
|
||||
/* just relay this to the underlying function */
|
||||
return inet_ntop(af, src, dst, size);
|
||||
}
|
||||
|
||||
#endif /* HAVE_INET_NTOP */
|
||||
|
||||
26
deps/cares/src/inet_ntop.h
vendored
26
deps/cares/src/inet_ntop.h
vendored
@@ -1,26 +0,0 @@
|
||||
#ifndef __ARES_INET_NTOP_H
|
||||
#define __ARES_INET_NTOP_H
|
||||
|
||||
|
||||
/* Copyright (C) 2005 by Dominick Meglio
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
* fee is hereby granted, provided that the above copyright
|
||||
* notice appear in all copies and that both that copyright
|
||||
* notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of M.I.T. not be used in
|
||||
* advertising or publicity pertaining to distribution of the
|
||||
* software without specific, written prior permission.
|
||||
* M.I.T. makes no representations about the suitability of
|
||||
* this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_INET_NTOP
|
||||
#define ares_inet_ntop(w,x,y,z) inet_ntop(w,x,y,z)
|
||||
#else
|
||||
const char *ares_inet_ntop(int af, const void *src, char *dst, size_t size);
|
||||
#endif
|
||||
|
||||
#endif /* __ARES_INET_NTOP_H */
|
||||
44
deps/cares/src/setup_once.h
vendored
44
deps/cares/src/setup_once.h
vendored
@@ -2,7 +2,7 @@
|
||||
#define __SETUP_ONCE_H
|
||||
|
||||
|
||||
/* Copyright (C) 2004 - 2012 by Daniel Stenberg et al
|
||||
/* Copyright (C) 2004 - 2013 by Daniel Stenberg et al
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software and its
|
||||
* documentation for any purpose and without fee is hereby granted, provided
|
||||
@@ -76,6 +76,34 @@
|
||||
#include <stdbool.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef __hpux
|
||||
# if !defined(_XOPEN_SOURCE_EXTENDED) || defined(_KERNEL)
|
||||
# ifdef _APP32_64BIT_OFF_T
|
||||
# define OLD_APP32_64BIT_OFF_T _APP32_64BIT_OFF_T
|
||||
# undef _APP32_64BIT_OFF_T
|
||||
# else
|
||||
# undef OLD_APP32_64BIT_OFF_T
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#ifdef __hpux
|
||||
# if !defined(_XOPEN_SOURCE_EXTENDED) || defined(_KERNEL)
|
||||
# ifdef OLD_APP32_64BIT_OFF_T
|
||||
# define _APP32_64BIT_OFF_T OLD_APP32_64BIT_OFF_T
|
||||
# undef OLD_APP32_64BIT_OFF_T
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Definition of timeval struct for platforms that don't have it.
|
||||
@@ -232,6 +260,8 @@ struct timeval {
|
||||
# define sclose(x) closesocket((x))
|
||||
#elif defined(HAVE_CLOSESOCKET_CAMEL)
|
||||
# define sclose(x) CloseSocket((x))
|
||||
#elif defined(HAVE_CLOSE_S)
|
||||
# define sclose(x) close_s((x))
|
||||
#else
|
||||
# define sclose(x) close((x))
|
||||
#endif
|
||||
@@ -259,6 +289,18 @@ struct timeval {
|
||||
#define TOLOWER(x) (tolower((int) ((unsigned char)x)))
|
||||
|
||||
|
||||
/*
|
||||
* 'bool' stuff compatible with HP-UX headers.
|
||||
*/
|
||||
|
||||
#if defined(__hpux) && !defined(HAVE_BOOL_T)
|
||||
typedef int bool;
|
||||
# define false 0
|
||||
# define true 1
|
||||
# define HAVE_BOOL_T
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* 'bool' exists on platforms with <stdbool.h>, i.e. C99 platforms.
|
||||
* On non-C99 platforms there's no bool, so define an enum for that.
|
||||
|
||||
4117
deps/mdb_v8/mdb_v8.c
vendored
Normal file
4117
deps/mdb_v8/mdb_v8.c
vendored
Normal file
File diff suppressed because it is too large
Load Diff
22
deps/mdb_v8/mdb_v8.gyp
vendored
Normal file
22
deps/mdb_v8/mdb_v8.gyp
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'mdb_v8',
|
||||
'product_prefix': '',
|
||||
'type': 'loadable_module',
|
||||
'cflags': [ '-fPIC' ],
|
||||
'sources': [
|
||||
'mdb_v8.c',
|
||||
'mdb_v8_cfg.c',
|
||||
'v8cfg.h',
|
||||
'v8dbg.h',
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'-lproc',
|
||||
'-lavl',
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
725
deps/mdb_v8/mdb_v8_cfg.c
vendored
Normal file
725
deps/mdb_v8/mdb_v8_cfg.c
vendored
Normal file
@@ -0,0 +1,725 @@
|
||||
/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* mdb_v8_cfg.c: canned configurations for previous V8 versions.
|
||||
*
|
||||
* The functions and data defined here enable this dmod to support debugging
|
||||
* Node.js binaries that predated V8's built-in postmortem debugging support.
|
||||
*/
|
||||
|
||||
#include "v8cfg.h"
|
||||
|
||||
/*ARGSUSED*/
|
||||
static int
|
||||
v8cfg_target_iter(v8_cfg_t *cfgp, int (*func)(mdb_symbol_t *, void *),
|
||||
void *arg)
|
||||
{
|
||||
return (mdb_symbol_iter(MDB_OBJ_EVERY, MDB_DYNSYM,
|
||||
MDB_BIND_GLOBAL | MDB_TYPE_OBJECT | MDB_TYPE_FUNC,
|
||||
func, arg));
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
static int
|
||||
v8cfg_target_readsym(v8_cfg_t *cfgp, const char *name, intptr_t *valp)
|
||||
{
|
||||
int val, rval;
|
||||
|
||||
if ((rval = mdb_readsym(&val, sizeof (val), name)) != -1)
|
||||
*valp = (intptr_t)val;
|
||||
|
||||
return (rval);
|
||||
}
|
||||
|
||||
/*
|
||||
* Analog of mdb_symbol_iter() for a canned configuration.
|
||||
*/
|
||||
static int
|
||||
v8cfg_canned_iter(v8_cfg_t *cfgp, int (*func)(mdb_symbol_t *, void *),
|
||||
void *arg)
|
||||
{
|
||||
v8_cfg_symbol_t *v8sym;
|
||||
mdb_symbol_t mdbsym;
|
||||
int rv;
|
||||
|
||||
for (v8sym = cfgp->v8cfg_symbols; v8sym->v8cs_name != NULL; v8sym++) {
|
||||
mdbsym.sym_name = v8sym->v8cs_name;
|
||||
mdbsym.sym_object = NULL;
|
||||
mdbsym.sym_sym = NULL;
|
||||
mdbsym.sym_table = 0;
|
||||
mdbsym.sym_id = 0;
|
||||
|
||||
if ((rv = func(&mdbsym, arg)) != 0)
|
||||
return (rv);
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Analog of mdb_readsym() for a canned configuration.
|
||||
*/
|
||||
static int
|
||||
v8cfg_canned_readsym(v8_cfg_t *cfgp, const char *name, intptr_t *valp)
|
||||
{
|
||||
v8_cfg_symbol_t *v8sym;
|
||||
|
||||
for (v8sym = cfgp->v8cfg_symbols; v8sym->v8cs_name != NULL; v8sym++) {
|
||||
if (strcmp(name, v8sym->v8cs_name) == 0)
|
||||
break;
|
||||
}
|
||||
|
||||
if (v8sym->v8cs_name == NULL)
|
||||
return (-1);
|
||||
|
||||
*valp = v8sym->v8cs_value;
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Canned configuration for the V8 bundled with Node.js v0.4.8 and later.
|
||||
*/
|
||||
static v8_cfg_symbol_t v8_symbols_node_04[] = {
|
||||
{ "v8dbg_type_AccessCheckInfo__ACCESS_CHECK_INFO_TYPE", 0x91 },
|
||||
{ "v8dbg_type_AccessorInfo__ACCESSOR_INFO_TYPE", 0x90 },
|
||||
{ "v8dbg_type_BreakPointInfo__BREAK_POINT_INFO_TYPE", 0x9b },
|
||||
{ "v8dbg_type_ByteArray__BYTE_ARRAY_TYPE", 0x86 },
|
||||
{ "v8dbg_type_CallHandlerInfo__CALL_HANDLER_INFO_TYPE", 0x93 },
|
||||
{ "v8dbg_type_Code__CODE_TYPE", 0x81 },
|
||||
{ "v8dbg_type_CodeCache__CODE_CACHE_TYPE", 0x99 },
|
||||
{ "v8dbg_type_ConsString__CONS_ASCII_STRING_TYPE", 0x5 },
|
||||
{ "v8dbg_type_ConsString__CONS_ASCII_SYMBOL_TYPE", 0x45 },
|
||||
{ "v8dbg_type_ConsString__CONS_STRING_TYPE", 0x1 },
|
||||
{ "v8dbg_type_ConsString__CONS_SYMBOL_TYPE", 0x41 },
|
||||
{ "v8dbg_type_DebugInfo__DEBUG_INFO_TYPE", 0x9a },
|
||||
{ "v8dbg_type_ExternalAsciiString__EXTERNAL_ASCII_STRING_TYPE", 0x6 },
|
||||
{ "v8dbg_type_ExternalAsciiString__EXTERNAL_ASCII_SYMBOL_TYPE", 0x46 },
|
||||
{ "v8dbg_type_ExternalByteArray__EXTERNAL_BYTE_ARRAY_TYPE", 0x88 },
|
||||
{ "v8dbg_type_ExternalFloatArray__EXTERNAL_FLOAT_ARRAY_TYPE", 0x8e },
|
||||
{ "v8dbg_type_ExternalIntArray__EXTERNAL_INT_ARRAY_TYPE", 0x8c },
|
||||
{ "v8dbg_type_ExternalShortArray__EXTERNAL_SHORT_ARRAY_TYPE", 0x8a },
|
||||
{ "v8dbg_type_ExternalString__EXTERNAL_STRING_TYPE", 0x2 },
|
||||
{ "v8dbg_type_ExternalString__EXTERNAL_SYMBOL_TYPE", 0x42 },
|
||||
{ "v8dbg_type_ExternalUnsignedByteArray__"
|
||||
"EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE", 0x89 },
|
||||
{ "v8dbg_type_ExternalUnsignedIntArray__"
|
||||
"EXTERNAL_UNSIGNED_INT_ARRAY_TYPE", 0x8d },
|
||||
{ "v8dbg_type_ExternalUnsignedShortArray__"
|
||||
"EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE", 0x8b },
|
||||
{ "v8dbg_type_FixedArray__FIXED_ARRAY_TYPE", 0x9c },
|
||||
{ "v8dbg_type_FunctionTemplateInfo__"
|
||||
"FUNCTION_TEMPLATE_INFO_TYPE", 0x94 },
|
||||
{ "v8dbg_type_HeapNumber__HEAP_NUMBER_TYPE", 0x84 },
|
||||
{ "v8dbg_type_InterceptorInfo__INTERCEPTOR_INFO_TYPE", 0x92 },
|
||||
{ "v8dbg_type_JSArray__JS_ARRAY_TYPE", 0xa5 },
|
||||
{ "v8dbg_type_JSBuiltinsObject__JS_BUILTINS_OBJECT_TYPE", 0xa3 },
|
||||
{ "v8dbg_type_JSFunction__JS_FUNCTION_TYPE", 0xa7 },
|
||||
{ "v8dbg_type_JSGlobalObject__JS_GLOBAL_OBJECT_TYPE", 0xa2 },
|
||||
{ "v8dbg_type_JSGlobalPropertyCell__"
|
||||
"JS_GLOBAL_PROPERTY_CELL_TYPE", 0x83 },
|
||||
{ "v8dbg_type_JSGlobalProxy__JS_GLOBAL_PROXY_TYPE", 0xa4 },
|
||||
{ "v8dbg_type_JSMessageObject__JS_MESSAGE_OBJECT_TYPE", 0x9e },
|
||||
{ "v8dbg_type_JSObject__JS_OBJECT_TYPE", 0xa0 },
|
||||
{ "v8dbg_type_JSRegExp__JS_REGEXP_TYPE", 0xa6 },
|
||||
{ "v8dbg_type_JSValue__JS_VALUE_TYPE", 0x9f },
|
||||
{ "v8dbg_type_Map__MAP_TYPE", 0x80 },
|
||||
{ "v8dbg_type_ObjectTemplateInfo__OBJECT_TEMPLATE_INFO_TYPE", 0x95 },
|
||||
{ "v8dbg_type_Oddball__ODDBALL_TYPE", 0x82 },
|
||||
{ "v8dbg_type_Script__SCRIPT_TYPE", 0x98 },
|
||||
{ "v8dbg_type_SeqAsciiString__ASCII_STRING_TYPE", 0x4 },
|
||||
{ "v8dbg_type_SeqAsciiString__ASCII_SYMBOL_TYPE", 0x44 },
|
||||
{ "v8dbg_type_SharedFunctionInfo__SHARED_FUNCTION_INFO_TYPE", 0x9d },
|
||||
{ "v8dbg_type_SignatureInfo__SIGNATURE_INFO_TYPE", 0x96 },
|
||||
{ "v8dbg_type_String__STRING_TYPE", 0x0 },
|
||||
{ "v8dbg_type_String__SYMBOL_TYPE", 0x40 },
|
||||
{ "v8dbg_type_TypeSwitchInfo__TYPE_SWITCH_INFO_TYPE", 0x97 },
|
||||
|
||||
{ "v8dbg_class_AccessCheckInfo__data__Object", 0xc },
|
||||
{ "v8dbg_class_AccessCheckInfo__indexed_callback__Object", 0x8 },
|
||||
{ "v8dbg_class_AccessCheckInfo__named_callback__Object", 0x4 },
|
||||
{ "v8dbg_class_AccessorInfo__data__Object", 0xc },
|
||||
{ "v8dbg_class_AccessorInfo__flag__Smi", 0x14 },
|
||||
{ "v8dbg_class_AccessorInfo__getter__Object", 0x4 },
|
||||
{ "v8dbg_class_AccessorInfo__name__Object", 0x10 },
|
||||
{ "v8dbg_class_AccessorInfo__setter__Object", 0x8 },
|
||||
{ "v8dbg_class_BreakPointInfo__break_point_objects__Object", 0x10 },
|
||||
{ "v8dbg_class_BreakPointInfo__code_position__Smi", 0x4 },
|
||||
{ "v8dbg_class_BreakPointInfo__source_position__Smi", 0x8 },
|
||||
{ "v8dbg_class_BreakPointInfo__statement_position__Smi", 0xc },
|
||||
{ "v8dbg_class_ByteArray__length__SMI", 0x4 },
|
||||
{ "v8dbg_class_CallHandlerInfo__callback__Object", 0x4 },
|
||||
{ "v8dbg_class_CallHandlerInfo__data__Object", 0x8 },
|
||||
{ "v8dbg_class_Code__deoptimization_data__FixedArray", 0xc },
|
||||
{ "v8dbg_class_Code__instruction_size__int", 0x4 },
|
||||
{ "v8dbg_class_Code__instruction_start__int", 0x20 },
|
||||
{ "v8dbg_class_Code__relocation_info__ByteArray", 0x8 },
|
||||
{ "v8dbg_class_CodeCache__default_cache__FixedArray", 0x4 },
|
||||
{ "v8dbg_class_CodeCache__normal_type_cache__Object", 0x8 },
|
||||
{ "v8dbg_class_ConsString__first__String", 0xc },
|
||||
{ "v8dbg_class_ConsString__second__String", 0x10 },
|
||||
{ "v8dbg_class_DebugInfo__break_points__FixedArray", 0x14 },
|
||||
{ "v8dbg_class_DebugInfo__code__Code", 0xc },
|
||||
{ "v8dbg_class_DebugInfo__original_code__Code", 0x8 },
|
||||
{ "v8dbg_class_DebugInfo__shared__SharedFunctionInfo", 0x4 },
|
||||
{ "v8dbg_class_ExternalString__resource__Object", 0xc },
|
||||
{ "v8dbg_class_FixedArray__data__uintptr_t", 0x8 },
|
||||
{ "v8dbg_class_FixedArray__length__SMI", 0x4 },
|
||||
{ "v8dbg_class_FunctionTemplateInfo__access_check_info__Object", 0x38 },
|
||||
{ "v8dbg_class_FunctionTemplateInfo__call_code__Object", 0x10 },
|
||||
{ "v8dbg_class_FunctionTemplateInfo__class_name__Object", 0x2c },
|
||||
{ "v8dbg_class_FunctionTemplateInfo__flag__Smi", 0x3c },
|
||||
{ "v8dbg_class_FunctionTemplateInfo__"
|
||||
"indexed_property_handler__Object", 0x24 },
|
||||
{ "v8dbg_class_FunctionTemplateInfo__"
|
||||
"instance_call_handler__Object", 0x34 },
|
||||
{ "v8dbg_class_FunctionTemplateInfo__instance_template__Object", 0x28 },
|
||||
{ "v8dbg_class_FunctionTemplateInfo__"
|
||||
"named_property_handler__Object", 0x20 },
|
||||
{ "v8dbg_class_FunctionTemplateInfo__parent_template__Object", 0x1c },
|
||||
{ "v8dbg_class_FunctionTemplateInfo__"
|
||||
"property_accessors__Object", 0x14 },
|
||||
{ "v8dbg_class_FunctionTemplateInfo__"
|
||||
"prototype_template__Object", 0x18 },
|
||||
{ "v8dbg_class_FunctionTemplateInfo__serial_number__Object", 0xc },
|
||||
{ "v8dbg_class_FunctionTemplateInfo__signature__Object", 0x30 },
|
||||
{ "v8dbg_class_GlobalObject__builtins__JSBuiltinsObject", 0xc },
|
||||
{ "v8dbg_class_GlobalObject__global_context__Context", 0x10 },
|
||||
{ "v8dbg_class_GlobalObject__global_receiver__JSObject", 0x14 },
|
||||
{ "v8dbg_class_HeapNumber__value__SMI", 0x4 },
|
||||
{ "v8dbg_class_HeapObject__map__Map", 0x0 },
|
||||
{ "v8dbg_class_InterceptorInfo__data__Object", 0x18 },
|
||||
{ "v8dbg_class_InterceptorInfo__deleter__Object", 0x10 },
|
||||
{ "v8dbg_class_InterceptorInfo__enumerator__Object", 0x14 },
|
||||
{ "v8dbg_class_InterceptorInfo__getter__Object", 0x4 },
|
||||
{ "v8dbg_class_InterceptorInfo__query__Object", 0xc },
|
||||
{ "v8dbg_class_InterceptorInfo__setter__Object", 0x8 },
|
||||
{ "v8dbg_class_JSArray__length__Object", 0xc },
|
||||
{ "v8dbg_class_JSFunction__literals__FixedArray", 0x1c },
|
||||
{ "v8dbg_class_JSFunction__next_function_link__Object", 0x20 },
|
||||
{ "v8dbg_class_JSFunction__prototype_or_initial_map__Object", 0x10 },
|
||||
{ "v8dbg_class_JSFunction__shared__SharedFunctionInfo", 0x14 },
|
||||
{ "v8dbg_class_JSGlobalProxy__context__Object", 0xc },
|
||||
{ "v8dbg_class_JSMessageObject__arguments__JSArray", 0x10 },
|
||||
{ "v8dbg_class_JSMessageObject__end_position__SMI", 0x24 },
|
||||
{ "v8dbg_class_JSMessageObject__script__Object", 0x14 },
|
||||
{ "v8dbg_class_JSMessageObject__stack_frames__Object", 0x1c },
|
||||
{ "v8dbg_class_JSMessageObject__stack_trace__Object", 0x18 },
|
||||
{ "v8dbg_class_JSMessageObject__start_position__SMI", 0x20 },
|
||||
{ "v8dbg_class_JSMessageObject__type__String", 0xc },
|
||||
{ "v8dbg_class_JSObject__elements__Object", 0x8 },
|
||||
{ "v8dbg_class_JSObject__properties__FixedArray", 0x4 },
|
||||
{ "v8dbg_class_JSRegExp__data__Object", 0xc },
|
||||
{ "v8dbg_class_JSValue__value__Object", 0xc },
|
||||
{ "v8dbg_class_Map__code_cache__Object", 0x18 },
|
||||
{ "v8dbg_class_Map__constructor__Object", 0x10 },
|
||||
{ "v8dbg_class_Map__inobject_properties__int", 0x5 },
|
||||
{ "v8dbg_class_Map__instance_size__int", 0x4 },
|
||||
{ "v8dbg_class_Map__instance_attributes__int", 0x8 },
|
||||
{ "v8dbg_class_Map__instance_descriptors__DescriptorArray", 0x14 },
|
||||
{ "v8dbg_class_ObjectTemplateInfo__constructor__Object", 0xc },
|
||||
{ "v8dbg_class_ObjectTemplateInfo__"
|
||||
"internal_field_count__Object", 0x10 },
|
||||
{ "v8dbg_class_Oddball__to_number__Object", 0x8 },
|
||||
{ "v8dbg_class_Oddball__to_string__String", 0x4 },
|
||||
{ "v8dbg_class_Script__column_offset__Smi", 0x10 },
|
||||
{ "v8dbg_class_Script__compilation_type__Smi", 0x24 },
|
||||
{ "v8dbg_class_Script__context_data__Object", 0x18 },
|
||||
{ "v8dbg_class_Script__data__Object", 0x14 },
|
||||
{ "v8dbg_class_Script__eval_from_instructions_offset__Smi", 0x34 },
|
||||
{ "v8dbg_class_Script__eval_from_shared__Object", 0x30 },
|
||||
{ "v8dbg_class_Script__id__Object", 0x2c },
|
||||
{ "v8dbg_class_Script__line_ends__Object", 0x28 },
|
||||
{ "v8dbg_class_Script__line_offset__Smi", 0xc },
|
||||
{ "v8dbg_class_Script__name__Object", 0x8 },
|
||||
{ "v8dbg_class_Script__source__Object", 0x4 },
|
||||
{ "v8dbg_class_Script__type__Smi", 0x20 },
|
||||
{ "v8dbg_class_Script__wrapper__Proxy", 0x1c },
|
||||
{ "v8dbg_class_SeqAsciiString__chars__char", 0xc },
|
||||
{ "v8dbg_class_SharedFunctionInfo__code__Code", 0x8 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__compiler_hints__SMI", 0x50 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__construct_stub__Code", 0x10 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__debug_info__Object", 0x20 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__end_position__SMI", 0x48 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__"
|
||||
"expected_nof_properties__SMI", 0x3c },
|
||||
{ "v8dbg_class_SharedFunctionInfo__formal_parameter_count__SMI", 0x38 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__function_data__Object", 0x18 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__"
|
||||
"function_token_position__SMI", 0x4c },
|
||||
{ "v8dbg_class_SharedFunctionInfo__inferred_name__String", 0x24 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__initial_map__Object", 0x28 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__instance_class_name__Object", 0x14 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__length__SMI", 0x34 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__name__Object", 0x4 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__num_literals__SMI", 0x40 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__opt_count__SMI", 0x58 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__script__Object", 0x1c },
|
||||
{ "v8dbg_class_SharedFunctionInfo__"
|
||||
"start_position_and_type__SMI", 0x44 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__"
|
||||
"this_property_assignments__Object", 0x2c },
|
||||
{ "v8dbg_class_SharedFunctionInfo__"
|
||||
"this_property_assignments_count__SMI", 0x54 },
|
||||
{ "v8dbg_class_SignatureInfo__args__Object", 0x8 },
|
||||
{ "v8dbg_class_SignatureInfo__receiver__Object", 0x4 },
|
||||
{ "v8dbg_class_String__length__SMI", 0x4 },
|
||||
{ "v8dbg_class_TemplateInfo__property_list__Object", 0x8 },
|
||||
{ "v8dbg_class_TemplateInfo__tag__Object", 0x4 },
|
||||
{ "v8dbg_class_TypeSwitchInfo__types__Object", 0x4 },
|
||||
|
||||
{ "v8dbg_parent_AccessCheckInfo__Struct", 0x0 },
|
||||
{ "v8dbg_parent_AccessorInfo__Struct", 0x0 },
|
||||
{ "v8dbg_parent_BreakPointInfo__Struct", 0x0 },
|
||||
{ "v8dbg_parent_ByteArray__HeapObject", 0x0 },
|
||||
{ "v8dbg_parent_CallHandlerInfo__Struct", 0x0 },
|
||||
{ "v8dbg_parent_Code__HeapObject", 0x0 },
|
||||
{ "v8dbg_parent_CodeCache__Struct", 0x0 },
|
||||
{ "v8dbg_parent_ConsString__String", 0x0 },
|
||||
{ "v8dbg_parent_DebugInfo__Struct", 0x0 },
|
||||
{ "v8dbg_parent_DeoptimizationInputData__FixedArray", 0x0 },
|
||||
{ "v8dbg_parent_DeoptimizationOutputData__FixedArray", 0x0 },
|
||||
{ "v8dbg_parent_DescriptorArray__FixedArray", 0x0 },
|
||||
{ "v8dbg_parent_ExternalArray__HeapObject", 0x0 },
|
||||
{ "v8dbg_parent_ExternalAsciiString__ExternalString", 0x0 },
|
||||
{ "v8dbg_parent_ExternalByteArray__ExternalArray", 0x0 },
|
||||
{ "v8dbg_parent_ExternalFloatArray__ExternalArray", 0x0 },
|
||||
{ "v8dbg_parent_ExternalIntArray__ExternalArray", 0x0 },
|
||||
{ "v8dbg_parent_ExternalShortArray__ExternalArray", 0x0 },
|
||||
{ "v8dbg_parent_ExternalString__String", 0x0 },
|
||||
{ "v8dbg_parent_ExternalTwoByteString__ExternalString", 0x0 },
|
||||
{ "v8dbg_parent_ExternalUnsignedByteArray__ExternalArray", 0x0 },
|
||||
{ "v8dbg_parent_ExternalUnsignedIntArray__ExternalArray", 0x0 },
|
||||
{ "v8dbg_parent_ExternalUnsignedShortArray__ExternalArray", 0x0 },
|
||||
{ "v8dbg_parent_Failure__MaybeObject", 0x0 },
|
||||
{ "v8dbg_parent_FixedArray__HeapObject", 0x0 },
|
||||
{ "v8dbg_parent_FunctionTemplateInfo__TemplateInfo", 0x0 },
|
||||
{ "v8dbg_parent_GlobalObject__JSObject", 0x0 },
|
||||
{ "v8dbg_parent_HeapNumber__HeapObject", 0x0 },
|
||||
{ "v8dbg_parent_HeapObject__Object", 0x0 },
|
||||
{ "v8dbg_parent_InterceptorInfo__Struct", 0x0 },
|
||||
{ "v8dbg_parent_JSArray__JSObject", 0x0 },
|
||||
{ "v8dbg_parent_JSBuiltinsObject__GlobalObject", 0x0 },
|
||||
{ "v8dbg_parent_JSFunction__JSObject", 0x0 },
|
||||
{ "v8dbg_parent_JSFunctionResultCache__FixedArray", 0x0 },
|
||||
{ "v8dbg_parent_JSGlobalObject__GlobalObject", 0x0 },
|
||||
{ "v8dbg_parent_JSGlobalPropertyCell__HeapObject", 0x0 },
|
||||
{ "v8dbg_parent_JSGlobalProxy__JSObject", 0x0 },
|
||||
{ "v8dbg_parent_JSMessageObject__JSObject", 0x0 },
|
||||
{ "v8dbg_parent_JSObject__HeapObject", 0x0 },
|
||||
{ "v8dbg_parent_JSRegExp__JSObject", 0x0 },
|
||||
{ "v8dbg_parent_JSRegExpResult__JSArray", 0x0 },
|
||||
{ "v8dbg_parent_JSValue__JSObject", 0x0 },
|
||||
{ "v8dbg_parent_Map__HeapObject", 0x0 },
|
||||
{ "v8dbg_parent_NormalizedMapCache__FixedArray", 0x0 },
|
||||
{ "v8dbg_parent_Object__MaybeObject", 0x0 },
|
||||
{ "v8dbg_parent_ObjectTemplateInfo__TemplateInfo", 0x0 },
|
||||
{ "v8dbg_parent_Oddball__HeapObject", 0x0 },
|
||||
{ "v8dbg_parent_Script__Struct", 0x0 },
|
||||
{ "v8dbg_parent_SeqAsciiString__SeqString", 0x0 },
|
||||
{ "v8dbg_parent_SeqString__String", 0x0 },
|
||||
{ "v8dbg_parent_SeqTwoByteString__SeqString", 0x0 },
|
||||
{ "v8dbg_parent_SharedFunctionInfo__HeapObject", 0x0 },
|
||||
{ "v8dbg_parent_SignatureInfo__Struct", 0x0 },
|
||||
{ "v8dbg_parent_Smi__Object", 0x0 },
|
||||
{ "v8dbg_parent_String__HeapObject", 0x0 },
|
||||
{ "v8dbg_parent_Struct__HeapObject", 0x0 },
|
||||
{ "v8dbg_parent_TemplateInfo__Struct", 0x0 },
|
||||
{ "v8dbg_parent_TypeSwitchInfo__Struct", 0x0 },
|
||||
|
||||
{ "v8dbg_frametype_ArgumentsAdaptorFrame", 0x8 },
|
||||
{ "v8dbg_frametype_ConstructFrame", 0x7 },
|
||||
{ "v8dbg_frametype_EntryConstructFrame", 0x2 },
|
||||
{ "v8dbg_frametype_EntryFrame", 0x1 },
|
||||
{ "v8dbg_frametype_ExitFrame", 0x3 },
|
||||
{ "v8dbg_frametype_InternalFrame", 0x6 },
|
||||
{ "v8dbg_frametype_JavaScriptFrame", 0x4 },
|
||||
{ "v8dbg_frametype_OptimizedFrame", 0x5 },
|
||||
|
||||
{ "v8dbg_off_fp_context", -0x4 },
|
||||
{ "v8dbg_off_fp_function", -0x8 },
|
||||
{ "v8dbg_off_fp_marker", -0x8 },
|
||||
{ "v8dbg_off_fp_args", 0x8 },
|
||||
|
||||
{ "v8dbg_prop_idx_content", 0x0 },
|
||||
{ "v8dbg_prop_idx_first", 0x2 },
|
||||
{ "v8dbg_prop_type_field", 0x1 },
|
||||
{ "v8dbg_prop_type_first_phantom", 0x6 },
|
||||
{ "v8dbg_prop_type_mask", 0xf },
|
||||
|
||||
{ "v8dbg_AsciiStringTag", 0x4 },
|
||||
{ "v8dbg_ConsStringTag", 0x1 },
|
||||
{ "v8dbg_ExternalStringTag", 0x2 },
|
||||
{ "v8dbg_FailureTag", 0x3 },
|
||||
{ "v8dbg_FailureTagMask", 0x3 },
|
||||
{ "v8dbg_FirstNonstringType", 0x80 },
|
||||
{ "v8dbg_HeapObjectTag", 0x1 },
|
||||
{ "v8dbg_HeapObjectTagMask", 0x3 },
|
||||
{ "v8dbg_IsNotStringMask", 0x80 },
|
||||
{ "v8dbg_NotStringTag", 0x80 },
|
||||
{ "v8dbg_SeqStringTag", 0x0 },
|
||||
{ "v8dbg_SmiTag", 0x0 },
|
||||
{ "v8dbg_SmiTagMask", 0x1 },
|
||||
{ "v8dbg_SmiValueShift", 0x1 },
|
||||
{ "v8dbg_StringEncodingMask", 0x4 },
|
||||
{ "v8dbg_StringRepresentationMask", 0x3 },
|
||||
{ "v8dbg_StringTag", 0x0 },
|
||||
{ "v8dbg_TwoByteStringTag", 0x0 },
|
||||
{ "v8dbg_PointerSizeLog2", 0x2 },
|
||||
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
/*
|
||||
* Canned configuration for the V8 bundled with Node.js v0.6.5.
|
||||
*/
|
||||
static v8_cfg_symbol_t v8_symbols_node_06[] = {
|
||||
{ "v8dbg_type_AccessCheckInfo__ACCESS_CHECK_INFO_TYPE", 0x93 },
|
||||
{ "v8dbg_type_AccessorInfo__ACCESSOR_INFO_TYPE", 0x92 },
|
||||
{ "v8dbg_type_BreakPointInfo__BREAK_POINT_INFO_TYPE", 0x9e },
|
||||
{ "v8dbg_type_ByteArray__BYTE_ARRAY_TYPE", 0x86 },
|
||||
{ "v8dbg_type_CallHandlerInfo__CALL_HANDLER_INFO_TYPE", 0x95 },
|
||||
{ "v8dbg_type_Code__CODE_TYPE", 0x81 },
|
||||
{ "v8dbg_type_CodeCache__CODE_CACHE_TYPE", 0x9b },
|
||||
{ "v8dbg_type_ConsString__CONS_ASCII_STRING_TYPE", 0x5 },
|
||||
{ "v8dbg_type_ConsString__CONS_ASCII_SYMBOL_TYPE", 0x45 },
|
||||
{ "v8dbg_type_ConsString__CONS_STRING_TYPE", 0x1 },
|
||||
{ "v8dbg_type_ConsString__CONS_SYMBOL_TYPE", 0x41 },
|
||||
{ "v8dbg_type_DebugInfo__DEBUG_INFO_TYPE", 0x9d },
|
||||
{ "v8dbg_type_ExternalAsciiString__EXTERNAL_ASCII_STRING_TYPE", 0x6 },
|
||||
{ "v8dbg_type_ExternalAsciiString__EXTERNAL_ASCII_SYMBOL_TYPE", 0x46 },
|
||||
{ "v8dbg_type_ExternalByteArray__EXTERNAL_BYTE_ARRAY_TYPE", 0x87 },
|
||||
{ "v8dbg_type_ExternalDoubleArray__EXTERNAL_DOUBLE_ARRAY_TYPE", 0x8e },
|
||||
{ "v8dbg_type_ExternalFloatArray__EXTERNAL_FLOAT_ARRAY_TYPE", 0x8d },
|
||||
{ "v8dbg_type_ExternalIntArray__EXTERNAL_INT_ARRAY_TYPE", 0x8b },
|
||||
{ "v8dbg_type_ExternalPixelArray__EXTERNAL_PIXEL_ARRAY_TYPE", 0x8f },
|
||||
{ "v8dbg_type_ExternalShortArray__EXTERNAL_SHORT_ARRAY_TYPE", 0x89 },
|
||||
{ "v8dbg_type_ExternalTwoByteString__EXTERNAL_STRING_TYPE", 0x2 },
|
||||
{ "v8dbg_type_ExternalTwoByteString__EXTERNAL_SYMBOL_TYPE", 0x42 },
|
||||
{ "v8dbg_type_ExternalUnsignedByteArray__"
|
||||
"EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE", 0x88 },
|
||||
{ "v8dbg_type_ExternalUnsignedIntArray__"
|
||||
"EXTERNAL_UNSIGNED_INT_ARRAY_TYPE", 0x8c },
|
||||
{ "v8dbg_type_ExternalUnsignedShortArray__"
|
||||
"EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE", 0x8a },
|
||||
{ "v8dbg_type_FixedArray__FIXED_ARRAY_TYPE", 0x9f },
|
||||
{ "v8dbg_type_FixedDoubleArray__FIXED_DOUBLE_ARRAY_TYPE", 0x90 },
|
||||
{ "v8dbg_type_Foreign__FOREIGN_TYPE", 0x85 },
|
||||
{ "v8dbg_type_FunctionTemplateInfo__FUNCTION_TEMPLATE_INFO_TYPE",
|
||||
0x96 },
|
||||
{ "v8dbg_type_HeapNumber__HEAP_NUMBER_TYPE", 0x84 },
|
||||
{ "v8dbg_type_InterceptorInfo__INTERCEPTOR_INFO_TYPE", 0x94 },
|
||||
{ "v8dbg_type_JSArray__JS_ARRAY_TYPE", 0xa8 },
|
||||
{ "v8dbg_type_JSBuiltinsObject__JS_BUILTINS_OBJECT_TYPE", 0xa6 },
|
||||
{ "v8dbg_type_JSFunction__JS_FUNCTION_TYPE", 0xac },
|
||||
{ "v8dbg_type_JSFunctionProxy__JS_FUNCTION_PROXY_TYPE", 0xad },
|
||||
{ "v8dbg_type_JSGlobalObject__JS_GLOBAL_OBJECT_TYPE", 0xa5 },
|
||||
{ "v8dbg_type_JSGlobalPropertyCell__JS_GLOBAL_PROPERTY_CELL_TYPE",
|
||||
0x83 },
|
||||
{ "v8dbg_type_JSMessageObject__JS_MESSAGE_OBJECT_TYPE", 0xa1 },
|
||||
{ "v8dbg_type_JSObject__JS_OBJECT_TYPE", 0xa3 },
|
||||
{ "v8dbg_type_JSProxy__JS_PROXY_TYPE", 0xa9 },
|
||||
{ "v8dbg_type_JSRegExp__JS_REGEXP_TYPE", 0xab },
|
||||
{ "v8dbg_type_JSValue__JS_VALUE_TYPE", 0xa2 },
|
||||
{ "v8dbg_type_JSWeakMap__JS_WEAK_MAP_TYPE", 0xaa },
|
||||
{ "v8dbg_type_Map__MAP_TYPE", 0x80 },
|
||||
{ "v8dbg_type_ObjectTemplateInfo__OBJECT_TEMPLATE_INFO_TYPE", 0x97 },
|
||||
{ "v8dbg_type_Oddball__ODDBALL_TYPE", 0x82 },
|
||||
{ "v8dbg_type_PolymorphicCodeCache__POLYMORPHIC_CODE_CACHE_TYPE",
|
||||
0x9c },
|
||||
{ "v8dbg_type_Script__SCRIPT_TYPE", 0x9a },
|
||||
{ "v8dbg_type_SeqAsciiString__ASCII_STRING_TYPE", 0x4 },
|
||||
{ "v8dbg_type_SeqAsciiString__ASCII_SYMBOL_TYPE", 0x44 },
|
||||
{ "v8dbg_type_SeqTwoByteString__STRING_TYPE", 0x0 },
|
||||
{ "v8dbg_type_SeqTwoByteString__SYMBOL_TYPE", 0x40 },
|
||||
{ "v8dbg_type_SharedFunctionInfo__SHARED_FUNCTION_INFO_TYPE", 0xa0 },
|
||||
{ "v8dbg_type_SignatureInfo__SIGNATURE_INFO_TYPE", 0x98 },
|
||||
{ "v8dbg_type_SlicedString__SLICED_ASCII_STRING_TYPE", 0x7 },
|
||||
{ "v8dbg_type_SlicedString__SLICED_STRING_TYPE", 0x3 },
|
||||
{ "v8dbg_type_TypeSwitchInfo__TYPE_SWITCH_INFO_TYPE", 0x99 },
|
||||
|
||||
{ "v8dbg_class_AccessCheckInfo__data__Object", 0xc },
|
||||
{ "v8dbg_class_AccessCheckInfo__indexed_callback__Object", 0x8 },
|
||||
{ "v8dbg_class_AccessCheckInfo__named_callback__Object", 0x4 },
|
||||
{ "v8dbg_class_AccessorInfo__data__Object", 0xc },
|
||||
{ "v8dbg_class_AccessorInfo__flag__Smi", 0x14 },
|
||||
{ "v8dbg_class_AccessorInfo__getter__Object", 0x4 },
|
||||
{ "v8dbg_class_AccessorInfo__name__Object", 0x10 },
|
||||
{ "v8dbg_class_AccessorInfo__setter__Object", 0x8 },
|
||||
{ "v8dbg_class_BreakPointInfo__break_point_objects__Object", 0x10 },
|
||||
{ "v8dbg_class_BreakPointInfo__code_position__Smi", 0x4 },
|
||||
{ "v8dbg_class_BreakPointInfo__source_position__Smi", 0x8 },
|
||||
{ "v8dbg_class_BreakPointInfo__statement_position__Smi", 0xc },
|
||||
{ "v8dbg_class_CallHandlerInfo__callback__Object", 0x4 },
|
||||
{ "v8dbg_class_CallHandlerInfo__data__Object", 0x8 },
|
||||
{ "v8dbg_class_Code__deoptimization_data__FixedArray", 0xc },
|
||||
{ "v8dbg_class_Code__instruction_size__int", 0x4 },
|
||||
{ "v8dbg_class_Code__instruction_start__int", 0x20 },
|
||||
{ "v8dbg_class_Code__next_code_flushing_candidate__Object", 0x10 },
|
||||
{ "v8dbg_class_Code__relocation_info__ByteArray", 0x8 },
|
||||
{ "v8dbg_class_CodeCache__default_cache__FixedArray", 0x4 },
|
||||
{ "v8dbg_class_CodeCache__normal_type_cache__Object", 0x8 },
|
||||
{ "v8dbg_class_ConsString__first__String", 0xc },
|
||||
{ "v8dbg_class_ConsString__second__String", 0x10 },
|
||||
{ "v8dbg_class_DebugInfo__break_points__FixedArray", 0x14 },
|
||||
{ "v8dbg_class_DebugInfo__code__Code", 0xc },
|
||||
{ "v8dbg_class_DebugInfo__original_code__Code", 0x8 },
|
||||
{ "v8dbg_class_DebugInfo__shared__SharedFunctionInfo", 0x4 },
|
||||
{ "v8dbg_class_ExternalString__resource__Object", 0xc },
|
||||
{ "v8dbg_class_FixedArray__data__uintptr_t", 0x8 },
|
||||
{ "v8dbg_class_FixedArrayBase__length__SMI", 0x4 },
|
||||
{ "v8dbg_class_FunctionTemplateInfo__access_check_info__Object", 0x38 },
|
||||
{ "v8dbg_class_FunctionTemplateInfo__call_code__Object", 0x10 },
|
||||
{ "v8dbg_class_FunctionTemplateInfo__class_name__Object", 0x2c },
|
||||
{ "v8dbg_class_FunctionTemplateInfo__flag__Smi", 0x3c },
|
||||
{ "v8dbg_class_FunctionTemplateInfo__indexed_property_handler__Object",
|
||||
0x24 },
|
||||
{ "v8dbg_class_FunctionTemplateInfo__instance_call_handler__Object",
|
||||
0x34 },
|
||||
{ "v8dbg_class_FunctionTemplateInfo__instance_template__Object", 0x28 },
|
||||
{ "v8dbg_class_FunctionTemplateInfo__named_property_handler__Object",
|
||||
0x20 },
|
||||
{ "v8dbg_class_FunctionTemplateInfo__parent_template__Object", 0x1c },
|
||||
{ "v8dbg_class_FunctionTemplateInfo__property_accessors__Object",
|
||||
0x14 },
|
||||
{ "v8dbg_class_FunctionTemplateInfo__prototype_template__Object",
|
||||
0x18 },
|
||||
{ "v8dbg_class_FunctionTemplateInfo__serial_number__Object", 0xc },
|
||||
{ "v8dbg_class_FunctionTemplateInfo__signature__Object", 0x30 },
|
||||
{ "v8dbg_class_GlobalObject__builtins__JSBuiltinsObject", 0xc },
|
||||
{ "v8dbg_class_GlobalObject__global_context__Context", 0x10 },
|
||||
{ "v8dbg_class_GlobalObject__global_receiver__JSObject", 0x14 },
|
||||
{ "v8dbg_class_HeapNumber__value__double", 0x4 },
|
||||
{ "v8dbg_class_HeapObject__map__Map", 0x0 },
|
||||
{ "v8dbg_class_InterceptorInfo__data__Object", 0x18 },
|
||||
{ "v8dbg_class_InterceptorInfo__deleter__Object", 0x10 },
|
||||
{ "v8dbg_class_InterceptorInfo__enumerator__Object", 0x14 },
|
||||
{ "v8dbg_class_InterceptorInfo__getter__Object", 0x4 },
|
||||
{ "v8dbg_class_InterceptorInfo__query__Object", 0xc },
|
||||
{ "v8dbg_class_InterceptorInfo__setter__Object", 0x8 },
|
||||
{ "v8dbg_class_JSArray__length__Object", 0xc },
|
||||
{ "v8dbg_class_JSFunction__literals__FixedArray", 0x1c },
|
||||
{ "v8dbg_class_JSFunction__next_function_link__Object", 0x20 },
|
||||
{ "v8dbg_class_JSFunction__prototype_or_initial_map__Object", 0x10 },
|
||||
{ "v8dbg_class_JSFunction__shared__SharedFunctionInfo", 0x14 },
|
||||
{ "v8dbg_class_JSFunctionProxy__call_trap__Object", 0x8 },
|
||||
{ "v8dbg_class_JSFunctionProxy__construct_trap__Object", 0xc },
|
||||
{ "v8dbg_class_JSGlobalProxy__context__Object", 0xc },
|
||||
{ "v8dbg_class_JSMessageObject__arguments__JSArray", 0x10 },
|
||||
{ "v8dbg_class_JSMessageObject__end_position__SMI", 0x24 },
|
||||
{ "v8dbg_class_JSMessageObject__script__Object", 0x14 },
|
||||
{ "v8dbg_class_JSMessageObject__stack_frames__Object", 0x1c },
|
||||
{ "v8dbg_class_JSMessageObject__stack_trace__Object", 0x18 },
|
||||
{ "v8dbg_class_JSMessageObject__start_position__SMI", 0x20 },
|
||||
{ "v8dbg_class_JSMessageObject__type__String", 0xc },
|
||||
{ "v8dbg_class_JSObject__elements__Object", 0x8 },
|
||||
{ "v8dbg_class_JSObject__properties__FixedArray", 0x4 },
|
||||
{ "v8dbg_class_JSProxy__handler__Object", 0x4 },
|
||||
{ "v8dbg_class_JSRegExp__data__Object", 0xc },
|
||||
{ "v8dbg_class_JSValue__value__Object", 0xc },
|
||||
{ "v8dbg_class_JSWeakMap__next__Object", 0x10 },
|
||||
{ "v8dbg_class_JSWeakMap__table__ObjectHashTable", 0xc },
|
||||
{ "v8dbg_class_Map__code_cache__Object", 0x18 },
|
||||
{ "v8dbg_class_Map__constructor__Object", 0x10 },
|
||||
{ "v8dbg_class_Map__inobject_properties__int", 0x5 },
|
||||
{ "v8dbg_class_Map__instance_attributes__int", 0x8 },
|
||||
{ "v8dbg_class_Map__instance_descriptors__FixedArray", 0x14 },
|
||||
{ "v8dbg_class_Map__instance_size__int", 0x4 },
|
||||
{ "v8dbg_class_Map__prototype_transitions__FixedArray", 0x1c },
|
||||
{ "v8dbg_class_ObjectTemplateInfo__constructor__Object", 0xc },
|
||||
{ "v8dbg_class_ObjectTemplateInfo__internal_field_count__Object",
|
||||
0x10 },
|
||||
{ "v8dbg_class_Oddball__to_number__Object", 0x8 },
|
||||
{ "v8dbg_class_Oddball__to_string__String", 0x4 },
|
||||
{ "v8dbg_class_PolymorphicCodeCache__cache__Object", 0x4 },
|
||||
{ "v8dbg_class_Script__column_offset__Smi", 0x10 },
|
||||
{ "v8dbg_class_Script__compilation_type__Smi", 0x24 },
|
||||
{ "v8dbg_class_Script__context_data__Object", 0x18 },
|
||||
{ "v8dbg_class_Script__data__Object", 0x14 },
|
||||
{ "v8dbg_class_Script__eval_from_instructions_offset__Smi", 0x34 },
|
||||
{ "v8dbg_class_Script__eval_from_shared__Object", 0x30 },
|
||||
{ "v8dbg_class_Script__id__Object", 0x2c },
|
||||
{ "v8dbg_class_Script__line_ends__Object", 0x28 },
|
||||
{ "v8dbg_class_Script__line_offset__Smi", 0xc },
|
||||
{ "v8dbg_class_Script__name__Object", 0x8 },
|
||||
{ "v8dbg_class_Script__source__Object", 0x4 },
|
||||
{ "v8dbg_class_Script__type__Smi", 0x20 },
|
||||
{ "v8dbg_class_Script__wrapper__Foreign", 0x1c },
|
||||
{ "v8dbg_class_SeqAsciiString__chars__char", 0xc },
|
||||
{ "v8dbg_class_SharedFunctionInfo__code__Code", 0x8 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__compiler_hints__SMI", 0x50 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__construct_stub__Code", 0x10 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__debug_info__Object", 0x20 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__end_position__SMI", 0x48 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__expected_nof_properties__SMI",
|
||||
0x3c },
|
||||
{ "v8dbg_class_SharedFunctionInfo__formal_parameter_count__SMI", 0x38 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__function_data__Object", 0x18 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__function_token_position__SMI",
|
||||
0x4c },
|
||||
{ "v8dbg_class_SharedFunctionInfo__inferred_name__String", 0x24 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__initial_map__Object", 0x28 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__instance_class_name__Object", 0x14 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__length__SMI", 0x34 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__name__Object", 0x4 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__num_literals__SMI", 0x40 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__opt_count__SMI", 0x58 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__script__Object", 0x1c },
|
||||
{ "v8dbg_class_SharedFunctionInfo__"
|
||||
"start_position_and_type__SMI", 0x44 },
|
||||
{ "v8dbg_class_SharedFunctionInfo__"
|
||||
"this_property_assignments__Object", 0x2c },
|
||||
{ "v8dbg_class_SharedFunctionInfo__"
|
||||
"this_property_assignments_count__SMI", 0x54 },
|
||||
{ "v8dbg_class_SignatureInfo__args__Object", 0x8 },
|
||||
{ "v8dbg_class_SignatureInfo__receiver__Object", 0x4 },
|
||||
{ "v8dbg_class_SlicedString__offset__SMI", 0x10 },
|
||||
{ "v8dbg_class_String__length__SMI", 0x4 },
|
||||
{ "v8dbg_class_TemplateInfo__property_list__Object", 0x8 },
|
||||
{ "v8dbg_class_TemplateInfo__tag__Object", 0x4 },
|
||||
{ "v8dbg_class_TypeSwitchInfo__types__Object", 0x4 },
|
||||
|
||||
{ "v8dbg_parent_AccessCheckInfo__Struct", 0x0 },
|
||||
{ "v8dbg_parent_AccessorInfo__Struct", 0x0 },
|
||||
{ "v8dbg_parent_BreakPointInfo__Struct", 0x0 },
|
||||
{ "v8dbg_parent_ByteArray__FixedArrayBase", 0x0 },
|
||||
{ "v8dbg_parent_CallHandlerInfo__Struct", 0x0 },
|
||||
{ "v8dbg_parent_Code__HeapObject", 0x0 },
|
||||
{ "v8dbg_parent_CodeCache__Struct", 0x0 },
|
||||
{ "v8dbg_parent_ConsString__String", 0x0 },
|
||||
{ "v8dbg_parent_DebugInfo__Struct", 0x0 },
|
||||
{ "v8dbg_parent_DeoptimizationInputData__FixedArray", 0x0 },
|
||||
{ "v8dbg_parent_DeoptimizationOutputData__FixedArray", 0x0 },
|
||||
{ "v8dbg_parent_DescriptorArray__FixedArray", 0x0 },
|
||||
{ "v8dbg_parent_ExternalArray__FixedArrayBase", 0x0 },
|
||||
{ "v8dbg_parent_ExternalAsciiString__ExternalString", 0x0 },
|
||||
{ "v8dbg_parent_ExternalByteArray__ExternalArray", 0x0 },
|
||||
{ "v8dbg_parent_ExternalDoubleArray__ExternalArray", 0x0 },
|
||||
{ "v8dbg_parent_ExternalFloatArray__ExternalArray", 0x0 },
|
||||
{ "v8dbg_parent_ExternalIntArray__ExternalArray", 0x0 },
|
||||
{ "v8dbg_parent_ExternalPixelArray__ExternalArray", 0x0 },
|
||||
{ "v8dbg_parent_ExternalShortArray__ExternalArray", 0x0 },
|
||||
{ "v8dbg_parent_ExternalString__String", 0x0 },
|
||||
{ "v8dbg_parent_ExternalTwoByteString__ExternalString", 0x0 },
|
||||
{ "v8dbg_parent_ExternalUnsignedByteArray__ExternalArray", 0x0 },
|
||||
{ "v8dbg_parent_ExternalUnsignedIntArray__ExternalArray", 0x0 },
|
||||
{ "v8dbg_parent_ExternalUnsignedShortArray__ExternalArray", 0x0 },
|
||||
{ "v8dbg_parent_Failure__MaybeObject", 0x0 },
|
||||
{ "v8dbg_parent_FixedArray__FixedArrayBase", 0x0 },
|
||||
{ "v8dbg_parent_FixedArrayBase__HeapObject", 0x0 },
|
||||
{ "v8dbg_parent_FixedDoubleArray__FixedArrayBase", 0x0 },
|
||||
{ "v8dbg_parent_Foreign__HeapObject", 0x0 },
|
||||
{ "v8dbg_parent_FunctionTemplateInfo__TemplateInfo", 0x0 },
|
||||
{ "v8dbg_parent_GlobalObject__JSObject", 0x0 },
|
||||
{ "v8dbg_parent_HashTable__FixedArray", 0x0 },
|
||||
{ "v8dbg_parent_HeapNumber__HeapObject", 0x0 },
|
||||
{ "v8dbg_parent_HeapObject__Object", 0x0 },
|
||||
{ "v8dbg_parent_InterceptorInfo__Struct", 0x0 },
|
||||
{ "v8dbg_parent_JSArray__JSObject", 0x0 },
|
||||
{ "v8dbg_parent_JSBuiltinsObject__GlobalObject", 0x0 },
|
||||
{ "v8dbg_parent_JSFunction__JSObject", 0x0 },
|
||||
{ "v8dbg_parent_JSFunctionProxy__JSProxy", 0x0 },
|
||||
{ "v8dbg_parent_JSFunctionResultCache__FixedArray", 0x0 },
|
||||
{ "v8dbg_parent_JSGlobalObject__GlobalObject", 0x0 },
|
||||
{ "v8dbg_parent_JSGlobalPropertyCell__HeapObject", 0x0 },
|
||||
{ "v8dbg_parent_JSMessageObject__JSObject", 0x0 },
|
||||
{ "v8dbg_parent_JSObject__JSReceiver", 0x0 },
|
||||
{ "v8dbg_parent_JSProxy__JSReceiver", 0x0 },
|
||||
{ "v8dbg_parent_JSReceiver__HeapObject", 0x0 },
|
||||
{ "v8dbg_parent_JSRegExp__JSObject", 0x0 },
|
||||
{ "v8dbg_parent_JSRegExpResult__JSArray", 0x0 },
|
||||
{ "v8dbg_parent_JSValue__JSObject", 0x0 },
|
||||
{ "v8dbg_parent_JSWeakMap__JSObject", 0x0 },
|
||||
{ "v8dbg_parent_Map__HeapObject", 0x0 },
|
||||
{ "v8dbg_parent_NormalizedMapCache__FixedArray", 0x0 },
|
||||
{ "v8dbg_parent_ObjectTemplateInfo__TemplateInfo", 0x0 },
|
||||
{ "v8dbg_parent_Oddball__HeapObject", 0x0 },
|
||||
{ "v8dbg_parent_PolymorphicCodeCache__Struct", 0x0 },
|
||||
{ "v8dbg_parent_Script__Struct", 0x0 },
|
||||
{ "v8dbg_parent_SeqAsciiString__SeqString", 0x0 },
|
||||
{ "v8dbg_parent_SeqString__String", 0x0 },
|
||||
{ "v8dbg_parent_SeqTwoByteString__SeqString", 0x0 },
|
||||
{ "v8dbg_parent_SharedFunctionInfo__HeapObject", 0x0 },
|
||||
{ "v8dbg_parent_SignatureInfo__Struct", 0x0 },
|
||||
{ "v8dbg_parent_SlicedString__String", 0x0 },
|
||||
{ "v8dbg_parent_Smi__Object", 0x0 },
|
||||
{ "v8dbg_parent_String__HeapObject", 0x0 },
|
||||
{ "v8dbg_parent_Struct__HeapObject", 0x0 },
|
||||
{ "v8dbg_parent_TemplateInfo__Struct", 0x0 },
|
||||
{ "v8dbg_parent_TypeSwitchInfo__Struct", 0x0 },
|
||||
|
||||
{ "v8dbg_frametype_ArgumentsAdaptorFrame", 0x8 },
|
||||
{ "v8dbg_frametype_ConstructFrame", 0x7 },
|
||||
{ "v8dbg_frametype_EntryConstructFrame", 0x2 },
|
||||
{ "v8dbg_frametype_EntryFrame", 0x1 },
|
||||
{ "v8dbg_frametype_ExitFrame", 0x3 },
|
||||
{ "v8dbg_frametype_InternalFrame", 0x6 },
|
||||
{ "v8dbg_frametype_JavaScriptFrame", 0x4 },
|
||||
{ "v8dbg_frametype_OptimizedFrame", 0x5 },
|
||||
|
||||
{ "v8dbg_off_fp_args", 0x8 },
|
||||
{ "v8dbg_off_fp_context", -0x4 },
|
||||
{ "v8dbg_off_fp_function", -0x8 },
|
||||
{ "v8dbg_off_fp_marker", -0x8 },
|
||||
|
||||
{ "v8dbg_prop_idx_content", 0x1 },
|
||||
{ "v8dbg_prop_idx_first", 0x3 },
|
||||
{ "v8dbg_prop_type_field", 0x1 },
|
||||
{ "v8dbg_prop_type_first_phantom", 0x6 },
|
||||
{ "v8dbg_prop_type_mask", 0xf },
|
||||
|
||||
{ "v8dbg_AsciiStringTag", 0x4 },
|
||||
{ "v8dbg_PointerSizeLog2", 0x2 },
|
||||
{ "v8dbg_SeqStringTag", 0x0 },
|
||||
{ "v8dbg_SmiTag", 0x0 },
|
||||
{ "v8dbg_SmiTagMask", 0x1 },
|
||||
{ "v8dbg_SmiValueShift", 0x1 },
|
||||
{ "v8dbg_StringEncodingMask", 0x4 },
|
||||
{ "v8dbg_StringRepresentationMask", 0x3 },
|
||||
{ "v8dbg_StringTag", 0x0 },
|
||||
{ "v8dbg_TwoByteStringTag", 0x0 },
|
||||
{ "v8dbg_ConsStringTag", 0x1 },
|
||||
{ "v8dbg_ExternalStringTag", 0x2 },
|
||||
{ "v8dbg_FailureTag", 0x3 },
|
||||
{ "v8dbg_FailureTagMask", 0x3 },
|
||||
{ "v8dbg_FirstNonstringType", 0x80 },
|
||||
{ "v8dbg_HeapObjectTag", 0x1 },
|
||||
{ "v8dbg_HeapObjectTagMask", 0x3 },
|
||||
{ "v8dbg_IsNotStringMask", 0x80 },
|
||||
{ "v8dbg_NotStringTag", 0x80 },
|
||||
|
||||
{ NULL },
|
||||
};
|
||||
|
||||
v8_cfg_t v8_cfg_04 = { "node-0.4", "node v0.4", v8_symbols_node_04,
|
||||
v8cfg_canned_iter, v8cfg_canned_readsym };
|
||||
|
||||
v8_cfg_t v8_cfg_06 = { "node-0.6", "node v0.6", v8_symbols_node_06,
|
||||
v8cfg_canned_iter, v8cfg_canned_readsym };
|
||||
|
||||
v8_cfg_t *v8_cfgs[] = {
|
||||
&v8_cfg_04,
|
||||
&v8_cfg_06,
|
||||
NULL
|
||||
};
|
||||
|
||||
v8_cfg_t v8_cfg_target = { NULL, NULL, NULL, v8cfg_target_iter,
|
||||
v8cfg_target_readsym };
|
||||
52
deps/mdb_v8/v8cfg.h
vendored
Normal file
52
deps/mdb_v8/v8cfg.h
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* v8cfg.h: canned configurations for previous V8 versions
|
||||
*/
|
||||
|
||||
#ifndef V8CFG_H
|
||||
#define V8CFG_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/mdb_modapi.h>
|
||||
|
||||
typedef struct {
|
||||
const char *v8cs_name; /* symbol name */
|
||||
intptr_t v8cs_value; /* symbol value */
|
||||
} v8_cfg_symbol_t;
|
||||
|
||||
typedef struct v8_cfg {
|
||||
const char *v8cfg_name; /* canned config name */
|
||||
const char *v8cfg_label; /* description */
|
||||
v8_cfg_symbol_t *v8cfg_symbols; /* actual symbol values */
|
||||
|
||||
int (*v8cfg_iter)(struct v8_cfg *, int (*)(mdb_symbol_t *, void *),
|
||||
void *);
|
||||
int (*v8cfg_readsym)(struct v8_cfg *, const char *, intptr_t *);
|
||||
} v8_cfg_t;
|
||||
|
||||
extern v8_cfg_t v8_cfg_04;
|
||||
extern v8_cfg_t v8_cfg_06;
|
||||
extern v8_cfg_t v8_cfg_target;
|
||||
extern v8_cfg_t *v8_cfgs[];
|
||||
|
||||
#endif /* V8CFG_H */
|
||||
78
deps/mdb_v8/v8dbg.h
vendored
Normal file
78
deps/mdb_v8/v8dbg.h
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* v8dbg.h: macros for use by V8 heap inspection tools. The consumer must
|
||||
* define values for various tags and shifts. The MDB module gets these
|
||||
* constants from information encoded in the binary itself.
|
||||
*/
|
||||
|
||||
#ifndef _V8DBG_H
|
||||
#define _V8DBG_H
|
||||
|
||||
/*
|
||||
* Recall that while V8 heap objects are always 4-byte aligned, heap object
|
||||
* pointers always have the last bit set. So when looking for a field nominally
|
||||
* at offset X, one must be sure to clear the tag bit first.
|
||||
*/
|
||||
#define V8_OFF_HEAP(x) ((x) - V8_HeapObjectTag)
|
||||
|
||||
/*
|
||||
* Determine whether a given pointer refers to a SMI, Failure, or HeapObject.
|
||||
*/
|
||||
#define V8_IS_SMI(ptr) (((ptr) & V8_SmiTagMask) == V8_SmiTag)
|
||||
#define V8_IS_FAILURE(ptr) (((ptr) & V8_FailureTagMask) == V8_FailureTag)
|
||||
#define V8_IS_HEAPOBJECT(ptr) \
|
||||
(((ptr) & V8_HeapObjectTagMask) == V8_HeapObjectTag)
|
||||
|
||||
/*
|
||||
* Extract the value of a SMI "pointer". Recall that small integers are stored
|
||||
* using the upper 31 bits.
|
||||
*/
|
||||
#define V8_SMI_VALUE(smi) ((smi) >> (V8_SmiValueShift + V8_SmiShiftSize))
|
||||
|
||||
/*
|
||||
* Determine the encoding and representation of a V8 string.
|
||||
*/
|
||||
#define V8_TYPE_STRING(type) (((type) & V8_IsNotStringMask) == V8_StringTag)
|
||||
|
||||
#define V8_STRENC_ASCII(type) \
|
||||
(((type) & V8_StringEncodingMask) == V8_AsciiStringTag)
|
||||
|
||||
#define V8_STRREP_SEQ(type) \
|
||||
(((type) & V8_StringRepresentationMask) == V8_SeqStringTag)
|
||||
#define V8_STRREP_CONS(type) \
|
||||
(((type) & V8_StringRepresentationMask) == V8_ConsStringTag)
|
||||
#define V8_STRREP_EXT(type) \
|
||||
(((type) & V8_StringRepresentationMask) == V8_ExternalStringTag)
|
||||
|
||||
/*
|
||||
* Several of the following constants and transformations are hardcoded in V8 as
|
||||
* well, so there's no way to extract them programmatically from the binary.
|
||||
*/
|
||||
#define V8_DESC_KEYIDX(x) ((x) + V8_PROP_IDX_FIRST)
|
||||
#define V8_DESC_VALIDX(x) ((x) << 1)
|
||||
#define V8_DESC_DETIDX(x) (((x) << 1) + 1)
|
||||
|
||||
#define V8_DESC_ISFIELD(x) \
|
||||
((V8_SMI_VALUE(x) & V8_PROP_TYPE_MASK) == V8_PROP_TYPE_FIELD)
|
||||
|
||||
#endif /* _V8DBG_H */
|
||||
438
deps/npm/html/doc/misc/index.html
vendored
Normal file
438
deps/npm/html/doc/misc/index.html
vendored
Normal file
@@ -0,0 +1,438 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<title>index</title>
|
||||
<meta http-equiv="content-type" value="text/html;utf-8">
|
||||
<link rel="stylesheet" type="text/css" href="../../static/style.css">
|
||||
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<h1><a href="../misc/npm-index.html">npm-index</a></h1> <p>Index of all npm documentation</p>
|
||||
|
||||
<h2 id="README-1"><a href="../../doc/README.html">README</a></h2>
|
||||
|
||||
<p>node package manager</p>
|
||||
|
||||
<h1>Command Line Documentation</h1>
|
||||
|
||||
<h2 id="npm-1"><a href="../cli/npm.html">npm(1)</a></h2>
|
||||
|
||||
<p>node package manager</p>
|
||||
|
||||
<h2 id="npm-adduser-1"><a href="../cli/npm-adduser.html">npm-adduser(1)</a></h2>
|
||||
|
||||
<p>Add a registry user account</p>
|
||||
|
||||
<h2 id="npm-bin-1"><a href="../cli/npm-bin.html">npm-bin(1)</a></h2>
|
||||
|
||||
<p>Display npm bin folder</p>
|
||||
|
||||
<h2 id="npm-bugs-1"><a href="../cli/npm-bugs.html">npm-bugs(1)</a></h2>
|
||||
|
||||
<p>Bugs for a package in a web browser maybe</p>
|
||||
|
||||
<h2 id="npm-build-1"><a href="../cli/npm-build.html">npm-build(1)</a></h2>
|
||||
|
||||
<p>Build a package</p>
|
||||
|
||||
<h2 id="npm-bundle-1"><a href="../cli/npm-bundle.html">npm-bundle(1)</a></h2>
|
||||
|
||||
<p>REMOVED</p>
|
||||
|
||||
<h2 id="npm-cache-1"><a href="../cli/npm-cache.html">npm-cache(1)</a></h2>
|
||||
|
||||
<p>Manipulates packages cache</p>
|
||||
|
||||
<h2 id="npm-completion-1"><a href="../cli/npm-completion.html">npm-completion(1)</a></h2>
|
||||
|
||||
<p>Tab Completion for npm</p>
|
||||
|
||||
<h2 id="npm-config-1"><a href="../cli/npm-config.html">npm-config(1)</a></h2>
|
||||
|
||||
<p>Manage the npm configuration files</p>
|
||||
|
||||
<h2 id="npm-dedupe-1"><a href="../cli/npm-dedupe.html">npm-dedupe(1)</a></h2>
|
||||
|
||||
<p>Reduce duplication</p>
|
||||
|
||||
<h2 id="npm-deprecate-1"><a href="../cli/npm-deprecate.html">npm-deprecate(1)</a></h2>
|
||||
|
||||
<p>Deprecate a version of a package</p>
|
||||
|
||||
<h2 id="npm-docs-1"><a href="../cli/npm-docs.html">npm-docs(1)</a></h2>
|
||||
|
||||
<p>Docs for a package in a web browser maybe</p>
|
||||
|
||||
<h2 id="npm-edit-1"><a href="../cli/npm-edit.html">npm-edit(1)</a></h2>
|
||||
|
||||
<p>Edit an installed package</p>
|
||||
|
||||
<h2 id="npm-explore-1"><a href="../cli/npm-explore.html">npm-explore(1)</a></h2>
|
||||
|
||||
<p>Browse an installed package</p>
|
||||
|
||||
<h2 id="npm-help-search-1"><a href="../cli/npm-help-search.html">npm-help-search(1)</a></h2>
|
||||
|
||||
<p>Search npm help documentation</p>
|
||||
|
||||
<h2 id="npm-help-1"><a href="../cli/npm-help.html">npm-help(1)</a></h2>
|
||||
|
||||
<p>Get help on npm</p>
|
||||
|
||||
<h2 id="npm-init-1"><a href="../cli/npm-init.html">npm-init(1)</a></h2>
|
||||
|
||||
<p>Interactively create a package.json file</p>
|
||||
|
||||
<h2 id="npm-install-1"><a href="../cli/npm-install.html">npm-install(1)</a></h2>
|
||||
|
||||
<p>Install a package</p>
|
||||
|
||||
<h2 id="npm-link-1"><a href="../cli/npm-link.html">npm-link(1)</a></h2>
|
||||
|
||||
<p>Symlink a package folder</p>
|
||||
|
||||
<h2 id="npm-ls-1"><a href="../cli/npm-ls.html">npm-ls(1)</a></h2>
|
||||
|
||||
<p>List installed packages</p>
|
||||
|
||||
<h2 id="npm-outdated-1"><a href="../cli/npm-outdated.html">npm-outdated(1)</a></h2>
|
||||
|
||||
<p>Check for outdated packages</p>
|
||||
|
||||
<h2 id="npm-owner-1"><a href="../cli/npm-owner.html">npm-owner(1)</a></h2>
|
||||
|
||||
<p>Manage package owners</p>
|
||||
|
||||
<h2 id="npm-pack-1"><a href="../cli/npm-pack.html">npm-pack(1)</a></h2>
|
||||
|
||||
<p>Create a tarball from a package</p>
|
||||
|
||||
<h2 id="npm-prefix-1"><a href="../cli/npm-prefix.html">npm-prefix(1)</a></h2>
|
||||
|
||||
<p>Display prefix</p>
|
||||
|
||||
<h2 id="npm-prune-1"><a href="../cli/npm-prune.html">npm-prune(1)</a></h2>
|
||||
|
||||
<p>Remove extraneous packages</p>
|
||||
|
||||
<h2 id="npm-publish-1"><a href="../cli/npm-publish.html">npm-publish(1)</a></h2>
|
||||
|
||||
<p>Publish a package</p>
|
||||
|
||||
<h2 id="npm-rebuild-1"><a href="../cli/npm-rebuild.html">npm-rebuild(1)</a></h2>
|
||||
|
||||
<p>Rebuild a package</p>
|
||||
|
||||
<h2 id="npm-restart-1"><a href="../cli/npm-restart.html">npm-restart(1)</a></h2>
|
||||
|
||||
<p>Start a package</p>
|
||||
|
||||
<h2 id="npm-rm-1"><a href="../cli/npm-rm.html">npm-rm(1)</a></h2>
|
||||
|
||||
<p>Remove a package</p>
|
||||
|
||||
<h2 id="npm-root-1"><a href="../cli/npm-root.html">npm-root(1)</a></h2>
|
||||
|
||||
<p>Display npm root</p>
|
||||
|
||||
<h2 id="npm-run-script-1"><a href="../cli/npm-run-script.html">npm-run-script(1)</a></h2>
|
||||
|
||||
<p>Run arbitrary package scripts</p>
|
||||
|
||||
<h2 id="npm-search-1"><a href="../cli/npm-search.html">npm-search(1)</a></h2>
|
||||
|
||||
<p>Search for packages</p>
|
||||
|
||||
<h2 id="npm-shrinkwrap-1"><a href="../cli/npm-shrinkwrap.html">npm-shrinkwrap(1)</a></h2>
|
||||
|
||||
<p>Lock down dependency versions</p>
|
||||
|
||||
<h2 id="npm-star-1"><a href="../cli/npm-star.html">npm-star(1)</a></h2>
|
||||
|
||||
<p>Mark your favorite packages</p>
|
||||
|
||||
<h2 id="npm-stars-1"><a href="../cli/npm-stars.html">npm-stars(1)</a></h2>
|
||||
|
||||
<p>View packages marked as favorites</p>
|
||||
|
||||
<h2 id="npm-start-1"><a href="../cli/npm-start.html">npm-start(1)</a></h2>
|
||||
|
||||
<p>Start a package</p>
|
||||
|
||||
<h2 id="npm-stop-1"><a href="../cli/npm-stop.html">npm-stop(1)</a></h2>
|
||||
|
||||
<p>Stop a package</p>
|
||||
|
||||
<h2 id="npm-submodule-1"><a href="../cli/npm-submodule.html">npm-submodule(1)</a></h2>
|
||||
|
||||
<p>Add a package as a git submodule</p>
|
||||
|
||||
<h2 id="npm-tag-1"><a href="../cli/npm-tag.html">npm-tag(1)</a></h2>
|
||||
|
||||
<p>Tag a published version</p>
|
||||
|
||||
<h2 id="npm-test-1"><a href="../cli/npm-test.html">npm-test(1)</a></h2>
|
||||
|
||||
<p>Test a package</p>
|
||||
|
||||
<h2 id="npm-uninstall-1"><a href="../cli/npm-uninstall.html">npm-uninstall(1)</a></h2>
|
||||
|
||||
<p>Remove a package</p>
|
||||
|
||||
<h2 id="npm-unpublish-1"><a href="../cli/npm-unpublish.html">npm-unpublish(1)</a></h2>
|
||||
|
||||
<p>Remove a package from the registry</p>
|
||||
|
||||
<h2 id="npm-update-1"><a href="../cli/npm-update.html">npm-update(1)</a></h2>
|
||||
|
||||
<p>Update a package</p>
|
||||
|
||||
<h2 id="npm-version-1"><a href="../cli/npm-version.html">npm-version(1)</a></h2>
|
||||
|
||||
<p>Bump a package version</p>
|
||||
|
||||
<h2 id="npm-view-1"><a href="../cli/npm-view.html">npm-view(1)</a></h2>
|
||||
|
||||
<p>View registry info</p>
|
||||
|
||||
<h2 id="npm-whoami-1"><a href="../cli/npm-whoami.html">npm-whoami(1)</a></h2>
|
||||
|
||||
<p>Display npm username</p>
|
||||
|
||||
<h1>API Documentation</h1>
|
||||
|
||||
<h2 id="npm-3"><a href="../api/npm.html">npm(3)</a></h2>
|
||||
|
||||
<p>node package manager</p>
|
||||
|
||||
<h2 id="npm-bin-3"><a href="../api/npm-bin.html">npm-bin(3)</a></h2>
|
||||
|
||||
<p>Display npm bin folder</p>
|
||||
|
||||
<h2 id="npm-bugs-3"><a href="../api/npm-bugs.html">npm-bugs(3)</a></h2>
|
||||
|
||||
<p>Bugs for a package in a web browser maybe</p>
|
||||
|
||||
<h2 id="npm-commands-3"><a href="../api/npm-commands.html">npm-commands(3)</a></h2>
|
||||
|
||||
<p>npm commands</p>
|
||||
|
||||
<h2 id="npm-config-3"><a href="../api/npm-config.html">npm-config(3)</a></h2>
|
||||
|
||||
<p>Manage the npm configuration files</p>
|
||||
|
||||
<h2 id="npm-deprecate-3"><a href="../api/npm-deprecate.html">npm-deprecate(3)</a></h2>
|
||||
|
||||
<p>Deprecate a version of a package</p>
|
||||
|
||||
<h2 id="npm-docs-3"><a href="../api/npm-docs.html">npm-docs(3)</a></h2>
|
||||
|
||||
<p>Docs for a package in a web browser maybe</p>
|
||||
|
||||
<h2 id="npm-edit-3"><a href="../api/npm-edit.html">npm-edit(3)</a></h2>
|
||||
|
||||
<p>Edit an installed package</p>
|
||||
|
||||
<h2 id="npm-explore-3"><a href="../api/npm-explore.html">npm-explore(3)</a></h2>
|
||||
|
||||
<p>Browse an installed package</p>
|
||||
|
||||
<h2 id="npm-help-search-3"><a href="../api/npm-help-search.html">npm-help-search(3)</a></h2>
|
||||
|
||||
<p>Search the help pages</p>
|
||||
|
||||
<h2 id="npm-init-3"><a href="../api/npm-init.html">npm-init(3)</a></h2>
|
||||
|
||||
<p>Interactively create a package.json file</p>
|
||||
|
||||
<h2 id="npm-install-3"><a href="../api/npm-install.html">npm-install(3)</a></h2>
|
||||
|
||||
<p>install a package programmatically</p>
|
||||
|
||||
<h2 id="npm-link-3"><a href="../api/npm-link.html">npm-link(3)</a></h2>
|
||||
|
||||
<p>Symlink a package folder</p>
|
||||
|
||||
<h2 id="npm-load-3"><a href="../api/npm-load.html">npm-load(3)</a></h2>
|
||||
|
||||
<p>Load config settings</p>
|
||||
|
||||
<h2 id="npm-ls-3"><a href="../api/npm-ls.html">npm-ls(3)</a></h2>
|
||||
|
||||
<p>List installed packages</p>
|
||||
|
||||
<h2 id="npm-outdated-3"><a href="../api/npm-outdated.html">npm-outdated(3)</a></h2>
|
||||
|
||||
<p>Check for outdated packages</p>
|
||||
|
||||
<h2 id="npm-owner-3"><a href="../api/npm-owner.html">npm-owner(3)</a></h2>
|
||||
|
||||
<p>Manage package owners</p>
|
||||
|
||||
<h2 id="npm-pack-3"><a href="../api/npm-pack.html">npm-pack(3)</a></h2>
|
||||
|
||||
<p>Create a tarball from a package</p>
|
||||
|
||||
<h2 id="npm-prefix-3"><a href="../api/npm-prefix.html">npm-prefix(3)</a></h2>
|
||||
|
||||
<p>Display prefix</p>
|
||||
|
||||
<h2 id="npm-prune-3"><a href="../api/npm-prune.html">npm-prune(3)</a></h2>
|
||||
|
||||
<p>Remove extraneous packages</p>
|
||||
|
||||
<h2 id="npm-publish-3"><a href="../api/npm-publish.html">npm-publish(3)</a></h2>
|
||||
|
||||
<p>Publish a package</p>
|
||||
|
||||
<h2 id="npm-rebuild-3"><a href="../api/npm-rebuild.html">npm-rebuild(3)</a></h2>
|
||||
|
||||
<p>Rebuild a package</p>
|
||||
|
||||
<h2 id="npm-restart-3"><a href="../api/npm-restart.html">npm-restart(3)</a></h2>
|
||||
|
||||
<p>Start a package</p>
|
||||
|
||||
<h2 id="npm-root-3"><a href="../api/npm-root.html">npm-root(3)</a></h2>
|
||||
|
||||
<p>Display npm root</p>
|
||||
|
||||
<h2 id="npm-run-script-3"><a href="../api/npm-run-script.html">npm-run-script(3)</a></h2>
|
||||
|
||||
<p>Run arbitrary package scripts</p>
|
||||
|
||||
<h2 id="npm-search-3"><a href="../api/npm-search.html">npm-search(3)</a></h2>
|
||||
|
||||
<p>Search for packages</p>
|
||||
|
||||
<h2 id="npm-shrinkwrap-3"><a href="../api/npm-shrinkwrap.html">npm-shrinkwrap(3)</a></h2>
|
||||
|
||||
<p>programmatically generate package shrinkwrap file</p>
|
||||
|
||||
<h2 id="npm-start-3"><a href="../api/npm-start.html">npm-start(3)</a></h2>
|
||||
|
||||
<p>Start a package</p>
|
||||
|
||||
<h2 id="npm-stop-3"><a href="../api/npm-stop.html">npm-stop(3)</a></h2>
|
||||
|
||||
<p>Stop a package</p>
|
||||
|
||||
<h2 id="npm-submodule-3"><a href="../api/npm-submodule.html">npm-submodule(3)</a></h2>
|
||||
|
||||
<p>Add a package as a git submodule</p>
|
||||
|
||||
<h2 id="npm-tag-3"><a href="../api/npm-tag.html">npm-tag(3)</a></h2>
|
||||
|
||||
<p>Tag a published version</p>
|
||||
|
||||
<h2 id="npm-test-3"><a href="../api/npm-test.html">npm-test(3)</a></h2>
|
||||
|
||||
<p>Test a package</p>
|
||||
|
||||
<h2 id="npm-uninstall-3"><a href="../api/npm-uninstall.html">npm-uninstall(3)</a></h2>
|
||||
|
||||
<p>uninstall a package programmatically</p>
|
||||
|
||||
<h2 id="npm-unpublish-3"><a href="../api/npm-unpublish.html">npm-unpublish(3)</a></h2>
|
||||
|
||||
<p>Remove a package from the registry</p>
|
||||
|
||||
<h2 id="npm-update-3"><a href="../api/npm-update.html">npm-update(3)</a></h2>
|
||||
|
||||
<p>Update a package</p>
|
||||
|
||||
<h2 id="npm-version-3"><a href="../api/npm-version.html">npm-version(3)</a></h2>
|
||||
|
||||
<p>Bump a package version</p>
|
||||
|
||||
<h2 id="npm-view-3"><a href="../api/npm-view.html">npm-view(3)</a></h2>
|
||||
|
||||
<p>View registry info</p>
|
||||
|
||||
<h2 id="npm-whoami-3"><a href="../api/npm-whoami.html">npm-whoami(3)</a></h2>
|
||||
|
||||
<p>Display npm username</p>
|
||||
|
||||
<h1>Files</h1>
|
||||
|
||||
<h2 id="npm-folders-5"><a href="../files/npm-folders.html">npm-folders(5)</a></h2>
|
||||
|
||||
<p>Folder Structures Used by npm</p>
|
||||
|
||||
<h2 id="npmrc-5"><a href="../files/npmrc.html">npmrc(5)</a></h2>
|
||||
|
||||
<p>The npm config files</p>
|
||||
|
||||
<h2 id="package-json-5"><a href="../files/package.json.html">package.json(5)</a></h2>
|
||||
|
||||
<p>Specifics of npm's package.json handling</p>
|
||||
|
||||
<h1>Misc</h1>
|
||||
|
||||
<h2 id="npm-coding-style-7"><a href="../misc/npm-coding-style.html">npm-coding-style(7)</a></h2>
|
||||
|
||||
<p>npm's "funny" coding style</p>
|
||||
|
||||
<h2 id="npm-config-7"><a href="../misc/npm-config.html">npm-config(7)</a></h2>
|
||||
|
||||
<p>More than you probably want to know about npm configuration</p>
|
||||
|
||||
<h2 id="npm-developers-7"><a href="../misc/npm-developers.html">npm-developers(7)</a></h2>
|
||||
|
||||
<p>Developer Guide</p>
|
||||
|
||||
<h2 id="npm-disputes-7"><a href="../misc/npm-disputes.html">npm-disputes(7)</a></h2>
|
||||
|
||||
<p>Handling Module Name Disputes</p>
|
||||
|
||||
<h2 id="npm-faq-7"><a href="../misc/npm-faq.html">npm-faq(7)</a></h2>
|
||||
|
||||
<p>Frequently Asked Questions</p>
|
||||
|
||||
<h2 id="npm-registry-7"><a href="../misc/npm-registry.html">npm-registry(7)</a></h2>
|
||||
|
||||
<p>The JavaScript Package Registry</p>
|
||||
|
||||
<h2 id="npm-scripts-7"><a href="../misc/npm-scripts.html">npm-scripts(7)</a></h2>
|
||||
|
||||
<p>How npm handles the "scripts" field</p>
|
||||
|
||||
<h2 id="removing-npm-7"><a href="../misc/removing-npm.html">removing-npm(7)</a></h2>
|
||||
|
||||
<p>Cleaning the Slate</p>
|
||||
|
||||
<h2 id="semver-7"><a href="../misc/semver.html">semver(7)</a></h2>
|
||||
|
||||
<p>The semantic versioner for npm</p>
|
||||
</div>
|
||||
<p id="footer">index — npm@1.3.2</p>
|
||||
<script>
|
||||
;(function () {
|
||||
var wrapper = document.getElementById("wrapper")
|
||||
var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0)
|
||||
.filter(function (el) {
|
||||
return el.parentNode === wrapper
|
||||
&& el.tagName.match(/H[1-6]/)
|
||||
&& el.id
|
||||
})
|
||||
var l = 2
|
||||
, toc = document.createElement("ul")
|
||||
toc.innerHTML = els.map(function (el) {
|
||||
var i = el.tagName.charAt(1)
|
||||
, out = ""
|
||||
while (i > l) {
|
||||
out += "<ul>"
|
||||
l ++
|
||||
}
|
||||
while (i < l) {
|
||||
out += "</ul>"
|
||||
l --
|
||||
}
|
||||
out += "<li><a href='#" + el.id + "'>" +
|
||||
( el.innerText || el.text || el.innerHTML)
|
||||
+ "</a>"
|
||||
return out
|
||||
}).join("\n")
|
||||
toc.id = "toc"
|
||||
document.body.appendChild(toc)
|
||||
})()
|
||||
</script>
|
||||
298
deps/npm/man/man7/index.7
vendored
Normal file
298
deps/npm/man/man7/index.7
vendored
Normal file
@@ -0,0 +1,298 @@
|
||||
.\" Generated with Ronnjs 0.4.0
|
||||
.\" http://github.com/kapouer/ronnjs
|
||||
.
|
||||
.TH "NPM\-INDEX" "7" "July 2013" "" ""
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBnpm-index\fR \-\- Index of all npm documentation
|
||||
.
|
||||
npm help .SH "README"
|
||||
node package manager
|
||||
.
|
||||
npm help .SH "npm"
|
||||
node package manager
|
||||
.
|
||||
npm help .SH "npm\-adduser"
|
||||
Add a registry user account
|
||||
.
|
||||
npm help .SH "npm\-bin"
|
||||
Display npm bin folder
|
||||
.
|
||||
npm help .SH "npm\-bugs"
|
||||
Bugs for a package in a web browser maybe
|
||||
.
|
||||
npm help .SH "npm\-build"
|
||||
Build a package
|
||||
.
|
||||
npm help .SH "npm\-bundle"
|
||||
REMOVED
|
||||
.
|
||||
npm help .SH "npm\-cache"
|
||||
Manipulates packages cache
|
||||
.
|
||||
npm help .SH "npm\-completion"
|
||||
Tab Completion for npm
|
||||
.
|
||||
npm help .SH "npm\-config"
|
||||
Manage the npm configuration files
|
||||
.
|
||||
npm help .SH "npm\-dedupe"
|
||||
Reduce duplication
|
||||
.
|
||||
npm help .SH "npm\-deprecate"
|
||||
Deprecate a version of a package
|
||||
.
|
||||
npm help .SH "npm\-docs"
|
||||
Docs for a package in a web browser maybe
|
||||
.
|
||||
npm help .SH "npm\-edit"
|
||||
Edit an installed package
|
||||
.
|
||||
npm help .SH "npm\-explore"
|
||||
Browse an installed package
|
||||
.
|
||||
npm help .SH "npm\-help\-search"
|
||||
Search npm help documentation
|
||||
.
|
||||
npm help .SH "npm\-help"
|
||||
Get help on npm
|
||||
.
|
||||
npm help .SH "npm\-init"
|
||||
Interactively create a package\.json file
|
||||
.
|
||||
npm help .SH "npm\-install"
|
||||
Install a package
|
||||
.
|
||||
npm help .SH "npm\-link"
|
||||
Symlink a package folder
|
||||
.
|
||||
npm help .SH "npm\-ls"
|
||||
List installed packages
|
||||
.
|
||||
npm help .SH "npm\-outdated"
|
||||
Check for outdated packages
|
||||
.
|
||||
npm help .SH "npm\-owner"
|
||||
Manage package owners
|
||||
.
|
||||
npm help .SH "npm\-pack"
|
||||
Create a tarball from a package
|
||||
.
|
||||
npm help .SH "npm\-prefix"
|
||||
Display prefix
|
||||
.
|
||||
npm help .SH "npm\-prune"
|
||||
Remove extraneous packages
|
||||
.
|
||||
npm help .SH "npm\-publish"
|
||||
Publish a package
|
||||
.
|
||||
npm help .SH "npm\-rebuild"
|
||||
Rebuild a package
|
||||
.
|
||||
npm help .SH "npm\-restart"
|
||||
Start a package
|
||||
.
|
||||
npm help .SH "npm\-rm"
|
||||
Remove a package
|
||||
.
|
||||
npm help .SH "npm\-root"
|
||||
Display npm root
|
||||
.
|
||||
npm help .SH "npm\-run\-script"
|
||||
Run arbitrary package scripts
|
||||
.
|
||||
npm help .SH "npm\-search"
|
||||
Search for packages
|
||||
.
|
||||
npm help .SH "npm\-shrinkwrap"
|
||||
Lock down dependency versions
|
||||
.
|
||||
npm help .SH "npm\-star"
|
||||
Mark your favorite packages
|
||||
.
|
||||
npm help .SH "npm\-stars"
|
||||
View packages marked as favorites
|
||||
.
|
||||
npm help .SH "npm\-start"
|
||||
Start a package
|
||||
.
|
||||
npm help .SH "npm\-stop"
|
||||
Stop a package
|
||||
.
|
||||
npm help .SH "npm\-submodule"
|
||||
Add a package as a git submodule
|
||||
.
|
||||
npm help .SH "npm\-tag"
|
||||
Tag a published version
|
||||
.
|
||||
npm help .SH "npm\-test"
|
||||
Test a package
|
||||
.
|
||||
npm help .SH "npm\-uninstall"
|
||||
Remove a package
|
||||
.
|
||||
npm help .SH "npm\-unpublish"
|
||||
Remove a package from the registry
|
||||
.
|
||||
npm help .SH "npm\-update"
|
||||
Update a package
|
||||
.
|
||||
npm help .SH "npm\-version"
|
||||
Bump a package version
|
||||
.
|
||||
npm help .SH "npm\-view"
|
||||
View registry info
|
||||
.
|
||||
npm help .SH "npm\-whoami"
|
||||
Display npm username
|
||||
.
|
||||
npm apihelp .SH "npm"
|
||||
node package manager
|
||||
.
|
||||
npm apihelp .SH "npm\-bin"
|
||||
Display npm bin folder
|
||||
.
|
||||
npm apihelp .SH "npm\-bugs"
|
||||
Bugs for a package in a web browser maybe
|
||||
.
|
||||
npm apihelp .SH "npm\-commands"
|
||||
npm commands
|
||||
.
|
||||
npm apihelp .SH "npm\-config"
|
||||
Manage the npm configuration files
|
||||
.
|
||||
npm apihelp .SH "npm\-deprecate"
|
||||
Deprecate a version of a package
|
||||
.
|
||||
npm apihelp .SH "npm\-docs"
|
||||
Docs for a package in a web browser maybe
|
||||
.
|
||||
npm apihelp .SH "npm\-edit"
|
||||
Edit an installed package
|
||||
.
|
||||
npm apihelp .SH "npm\-explore"
|
||||
Browse an installed package
|
||||
.
|
||||
npm apihelp .SH "npm\-help\-search"
|
||||
Search the help pages
|
||||
.
|
||||
npm apihelp .SH "npm\-init"
|
||||
Interactively create a package\.json file
|
||||
.
|
||||
npm apihelp .SH "npm\-install"
|
||||
install a package programmatically
|
||||
.
|
||||
npm apihelp .SH "npm\-link"
|
||||
Symlink a package folder
|
||||
.
|
||||
npm apihelp .SH "npm\-load"
|
||||
Load config settings
|
||||
.
|
||||
npm apihelp .SH "npm\-ls"
|
||||
List installed packages
|
||||
.
|
||||
npm apihelp .SH "npm\-outdated"
|
||||
Check for outdated packages
|
||||
.
|
||||
npm apihelp .SH "npm\-owner"
|
||||
Manage package owners
|
||||
.
|
||||
npm apihelp .SH "npm\-pack"
|
||||
Create a tarball from a package
|
||||
.
|
||||
npm apihelp .SH "npm\-prefix"
|
||||
Display prefix
|
||||
.
|
||||
npm apihelp .SH "npm\-prune"
|
||||
Remove extraneous packages
|
||||
.
|
||||
npm apihelp .SH "npm\-publish"
|
||||
Publish a package
|
||||
.
|
||||
npm apihelp .SH "npm\-rebuild"
|
||||
Rebuild a package
|
||||
.
|
||||
npm apihelp .SH "npm\-restart"
|
||||
Start a package
|
||||
.
|
||||
npm apihelp .SH "npm\-root"
|
||||
Display npm root
|
||||
.
|
||||
npm apihelp .SH "npm\-run\-script"
|
||||
Run arbitrary package scripts
|
||||
.
|
||||
npm apihelp .SH "npm\-search"
|
||||
Search for packages
|
||||
.
|
||||
npm apihelp .SH "npm\-shrinkwrap"
|
||||
programmatically generate package shrinkwrap file
|
||||
.
|
||||
npm apihelp .SH "npm\-start"
|
||||
Start a package
|
||||
.
|
||||
npm apihelp .SH "npm\-stop"
|
||||
Stop a package
|
||||
.
|
||||
npm apihelp .SH "npm\-submodule"
|
||||
Add a package as a git submodule
|
||||
.
|
||||
npm apihelp .SH "npm\-tag"
|
||||
Tag a published version
|
||||
.
|
||||
npm apihelp .SH "npm\-test"
|
||||
Test a package
|
||||
.
|
||||
npm apihelp .SH "npm\-uninstall"
|
||||
uninstall a package programmatically
|
||||
.
|
||||
npm apihelp .SH "npm\-unpublish"
|
||||
Remove a package from the registry
|
||||
.
|
||||
npm apihelp .SH "npm\-update"
|
||||
Update a package
|
||||
.
|
||||
npm apihelp .SH "npm\-version"
|
||||
Bump a package version
|
||||
.
|
||||
npm apihelp .SH "npm\-view"
|
||||
View registry info
|
||||
.
|
||||
npm apihelp .SH "npm\-whoami"
|
||||
Display npm username
|
||||
.
|
||||
npm help .SH "npm\-folders"
|
||||
Folder Structures Used by npm
|
||||
.
|
||||
npm help .SH "npmrc"
|
||||
The npm config files
|
||||
.
|
||||
npm help .SH "package\.json"
|
||||
Specifics of npm\'s package\.json handling
|
||||
.
|
||||
npm help .SH "npm\-coding\-style"
|
||||
npm\'s "funny" coding style
|
||||
.
|
||||
npm help .SH "npm\-config"
|
||||
More than you probably want to know about npm configuration
|
||||
.
|
||||
npm help .SH "npm\-developers"
|
||||
Developer Guide
|
||||
.
|
||||
npm help .SH "npm\-disputes"
|
||||
Handling Module Name Disputes
|
||||
.
|
||||
npm help .SH "npm\-faq"
|
||||
Frequently Asked Questions
|
||||
.
|
||||
npm help .SH "npm\-registry"
|
||||
The JavaScript Package Registry
|
||||
.
|
||||
npm help .SH "npm\-scripts"
|
||||
How npm handles the "scripts" field
|
||||
.
|
||||
npm help .SH "removing\-npm"
|
||||
Cleaning the Slate
|
||||
.
|
||||
npm help .SH "semver"
|
||||
The semantic versioner for npm
|
||||
12
deps/openssl/asm/Makefile
vendored
12
deps/openssl/asm/Makefile
vendored
@@ -1,3 +1,4 @@
|
||||
SED ?= sed
|
||||
PERL ?= perl
|
||||
PERL += -I../openssl/crypto/perlasm -I../openssl/crypto/bn/asm
|
||||
|
||||
@@ -30,6 +31,7 @@ OUTPUTS = \
|
||||
x64-elf-gas/rc4/rc4-x86_64.s \
|
||||
x64-elf-gas/rc4/rc4-md5-x86_64.s \
|
||||
x64-elf-gas/sha/sha1-x86_64.s \
|
||||
x64-elf-gas/sha/sha256-x86_64.s \
|
||||
x64-elf-gas/sha/sha512-x86_64.s \
|
||||
x64-elf-gas/whrlpool/wp-x86_64.s \
|
||||
x64-elf-gas/x86_64cpuid.s \
|
||||
@@ -61,6 +63,7 @@ OUTPUTS = \
|
||||
x64-macosx-gas/rc4/rc4-x86_64.s \
|
||||
x64-macosx-gas/rc4/rc4-md5-x86_64.s \
|
||||
x64-macosx-gas/sha/sha1-x86_64.s \
|
||||
x64-macosx-gas/sha/sha256-x86_64.s \
|
||||
x64-macosx-gas/sha/sha512-x86_64.s \
|
||||
x64-macosx-gas/whrlpool/wp-x86_64.s \
|
||||
x64-macosx-gas/x86_64cpuid.s \
|
||||
@@ -92,6 +95,7 @@ OUTPUTS = \
|
||||
x64-win32-masm/rc4/rc4-x86_64.asm \
|
||||
x64-win32-masm/rc4/rc4-md5-x86_64.asm \
|
||||
x64-win32-masm/sha/sha1-x86_64.asm \
|
||||
x64-win32-masm/sha/sha256-x86_64.asm \
|
||||
x64-win32-masm/sha/sha512-x86_64.asm \
|
||||
x64-win32-masm/whrlpool/wp-x86_64.asm \
|
||||
x64-win32-masm/x86_64cpuid.asm \
|
||||
@@ -102,6 +106,9 @@ x64-elf-gas/%.s x86-elf-gas/%.s:
|
||||
x64-macosx-gas/%.s x86-macosx-gas/%.s:
|
||||
$(PERL) $< macosx > $@
|
||||
|
||||
x64-macosx-gas/%.s x86-macosx-gas/%.s:
|
||||
$(PERL) $< macosx > $@
|
||||
|
||||
x64-win32-masm/%.asm:
|
||||
$(PERL) $< masm > $@
|
||||
|
||||
@@ -111,7 +118,7 @@ x86-win32-masm/%.asm:
|
||||
.PHONY: all
|
||||
all: $(OUTPUTS)
|
||||
# strip trailing whitespace and final blank newline
|
||||
sed -sri -e 's/\s+$$/\n/' -e '$$ { /^$$/d }' $^
|
||||
$(SED) -sri -e 's/\s+$$/\n/' -e '$$ { /^$$/d }' $^
|
||||
|
||||
clean:
|
||||
find . -iname '*.asm' -exec rm "{}" \;
|
||||
@@ -128,6 +135,7 @@ x64-elf-gas/rc4/rc4-x86_64.s: ../openssl/crypto/rc4/asm/rc4-x86_64.pl
|
||||
x64-elf-gas/rc4/rc4-md5-x86_64.s: ../openssl/crypto/rc4/asm/rc4-md5-x86_64.pl
|
||||
x64-elf-gas/sha/sha1-x86_64.s: ../openssl/crypto/sha/asm/sha1-x86_64.pl
|
||||
x64-elf-gas/sha/sha512-x86_64.s: ../openssl/crypto/sha/asm/sha512-x86_64.pl
|
||||
x64-elf-gas/sha/sha256-x86_64.s: ../openssl/crypto/sha/asm/sha256-x86_64.pl
|
||||
x64-elf-gas/whrlpool/wp-x86_64.s: ../openssl/crypto/whrlpool/asm/wp-x86_64.pl
|
||||
x64-elf-gas/x86_64cpuid.s: ../openssl/crypto/x86_64cpuid.pl
|
||||
x64-macosx-gas/aes/aes-x86_64.s: ../openssl/crypto/aes/asm/aes-x86_64.pl
|
||||
@@ -140,6 +148,7 @@ x64-macosx-gas/md5/md5-x86_64.s: ../openssl/crypto/md5/asm/md5-x86_64.pl
|
||||
x64-macosx-gas/rc4/rc4-x86_64.s: ../openssl/crypto/rc4/asm/rc4-x86_64.pl
|
||||
x64-macosx-gas/rc4/rc4-md5-x86_64.s: ../openssl/crypto/rc4/asm/rc4-md5-x86_64.pl
|
||||
x64-macosx-gas/sha/sha1-x86_64.s: ../openssl/crypto/sha/asm/sha1-x86_64.pl
|
||||
x64-macosx-gas/sha/sha256-x86_64.s: ../openssl/crypto/sha/asm/sha256-x86_64.pl
|
||||
x64-macosx-gas/sha/sha512-x86_64.s: ../openssl/crypto/sha/asm/sha512-x86_64.pl
|
||||
x64-macosx-gas/whrlpool/wp-x86_64.s: ../openssl/crypto/whrlpool/asm/wp-x86_64.pl
|
||||
x64-macosx-gas/x86_64cpuid.s: ../openssl/crypto/x86_64cpuid.pl
|
||||
@@ -153,6 +162,7 @@ x64-win32-masm/md5/md5-x86_64.asm: ../openssl/crypto/md5/asm/md5-x86_64.pl
|
||||
x64-win32-masm/rc4/rc4-x86_64.asm: ../openssl/crypto/rc4/asm/rc4-x86_64.pl
|
||||
x64-win32-masm/rc4/rc4-md5-x86_64.asm: ../openssl/crypto/rc4/asm/rc4-md5-x86_64.pl
|
||||
x64-win32-masm/sha/sha1-x86_64.asm: ../openssl/crypto/sha/asm/sha1-x86_64.pl
|
||||
x64-win32-masm/sha/sha256-x86_64.asm: ../openssl/crypto/sha/asm/sha256-x86_64.pl
|
||||
x64-win32-masm/sha/sha512-x86_64.asm: ../openssl/crypto/sha/asm/sha512-x86_64.pl
|
||||
x64-win32-masm/whrlpool/wp-x86_64.asm: ../openssl/crypto/whrlpool/asm/wp-x86_64.pl
|
||||
x64-win32-masm/x86_64cpuid.asm: ../openssl/crypto/x86_64cpuid.pl
|
||||
|
||||
1779
deps/openssl/asm/x64-elf-gas/sha/sha256-x86_64.s
vendored
Normal file
1779
deps/openssl/asm/x64-elf-gas/sha/sha256-x86_64.s
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2700
deps/openssl/asm/x64-elf-gas/sha/sha512-x86_64.s
vendored
2700
deps/openssl/asm/x64-elf-gas/sha/sha512-x86_64.s
vendored
File diff suppressed because it is too large
Load Diff
1779
deps/openssl/asm/x64-macosx-gas/sha/sha256-x86_64.s
vendored
Normal file
1779
deps/openssl/asm/x64-macosx-gas/sha/sha256-x86_64.s
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2694
deps/openssl/asm/x64-macosx-gas/sha/sha512-x86_64.s
vendored
2694
deps/openssl/asm/x64-macosx-gas/sha/sha512-x86_64.s
vendored
File diff suppressed because it is too large
Load Diff
1893
deps/openssl/asm/x64-win32-masm/sha/sha256-x86_64.asm
vendored
Normal file
1893
deps/openssl/asm/x64-win32-masm/sha/sha256-x86_64.asm
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2710
deps/openssl/asm/x64-win32-masm/sha/sha512-x86_64.asm
vendored
2710
deps/openssl/asm/x64-win32-masm/sha/sha512-x86_64.asm
vendored
File diff suppressed because it is too large
Load Diff
6
deps/openssl/config/opensslconf.h
vendored
6
deps/openssl/config/opensslconf.h
vendored
@@ -179,7 +179,7 @@
|
||||
* - elder Alpha because it lacks byte load/store instructions;
|
||||
*/
|
||||
# undef RC4_INT
|
||||
# if defined(__arm__) || defined(__mips__)
|
||||
# if defined(__arm__)
|
||||
# define RC4_INT unsigned char
|
||||
# else
|
||||
# define RC4_INT unsigned int
|
||||
@@ -194,7 +194,7 @@
|
||||
# define RC4_CHUNK unsigned long long
|
||||
# elif (defined(_M_X64) || defined(__x86_64__)) && !defined(_WIN32)
|
||||
# define RC4_CHUNK unsigned long
|
||||
# elif defined(__arm__) || defined(__mips__)
|
||||
# elif defined(__arm__)
|
||||
# define RC4_CHUNK unsigned long
|
||||
# else
|
||||
/* On x86 RC4_CHUNK is not defined */
|
||||
@@ -253,7 +253,7 @@
|
||||
#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
|
||||
# define CONFIG_HEADER_BF_LOCL_H
|
||||
# undef BF_PTR
|
||||
# if defined(__arm__) || defined(__mips__)
|
||||
# if defined(__arm__)
|
||||
# define BF_PTR
|
||||
# endif
|
||||
#endif /* HEADER_BF_LOCL_H */
|
||||
|
||||
8
deps/openssl/openssl.gyp
vendored
8
deps/openssl/openssl.gyp
vendored
@@ -694,9 +694,14 @@
|
||||
'CPUID_ASM',
|
||||
'DES_ASM',
|
||||
'LIB_BN_ASM',
|
||||
'MD5_ASM',
|
||||
'OPENSSL_BN_ASM',
|
||||
'OPENSSL_CPUID_OBJ',
|
||||
'RIP_ASM',
|
||||
'RMD160_ASM',
|
||||
'SHA1_ASM',
|
||||
'SHA256_ASM',
|
||||
'SHA512_ASM',
|
||||
'WHIRLPOOL_ASM',
|
||||
'WP_ASM'
|
||||
],
|
||||
@@ -736,6 +741,7 @@
|
||||
'asm/x64-elf-gas/rc4/rc4-x86_64.s',
|
||||
'asm/x64-elf-gas/rc4/rc4-md5-x86_64.s',
|
||||
'asm/x64-elf-gas/sha/sha1-x86_64.s',
|
||||
'asm/x64-elf-gas/sha/sha256-x86_64.s',
|
||||
'asm/x64-elf-gas/sha/sha512-x86_64.s',
|
||||
'asm/x64-elf-gas/whrlpool/wp-x86_64.s',
|
||||
'asm/x64-elf-gas/x86_64cpuid.s',
|
||||
@@ -784,6 +790,7 @@
|
||||
'asm/x64-macosx-gas/rc4/rc4-x86_64.s',
|
||||
'asm/x64-macosx-gas/rc4/rc4-md5-x86_64.s',
|
||||
'asm/x64-macosx-gas/sha/sha1-x86_64.s',
|
||||
'asm/x64-macosx-gas/sha/sha256-x86_64.s',
|
||||
'asm/x64-macosx-gas/sha/sha512-x86_64.s',
|
||||
'asm/x64-macosx-gas/whrlpool/wp-x86_64.s',
|
||||
'asm/x64-macosx-gas/x86_64cpuid.s',
|
||||
@@ -851,6 +858,7 @@
|
||||
'asm/x64-win32-masm/rc4/rc4-x86_64.asm',
|
||||
'asm/x64-win32-masm/rc4/rc4-md5-x86_64.asm',
|
||||
'asm/x64-win32-masm/sha/sha1-x86_64.asm',
|
||||
'asm/x64-win32-masm/sha/sha256-x86_64.asm',
|
||||
'asm/x64-win32-masm/sha/sha512-x86_64.asm',
|
||||
'asm/x64-win32-masm/whrlpool/wp-x86_64.asm',
|
||||
'asm/x64-win32-masm/x86_64cpuid.asm',
|
||||
|
||||
438
deps/openssl/openssl/crypto/sha/asm/sha256-x86_64.pl
vendored
Executable file
438
deps/openssl/openssl/crypto/sha/asm/sha256-x86_64.pl
vendored
Executable file
@@ -0,0 +1,438 @@
|
||||
#!/usr/bin/env perl
|
||||
#
|
||||
# ====================================================================
|
||||
# Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
|
||||
# project. Rights for redistribution and usage in source and binary
|
||||
# forms are granted according to the OpenSSL license.
|
||||
# ====================================================================
|
||||
#
|
||||
# sha256/512_block procedure for x86_64.
|
||||
#
|
||||
# 40% improvement over compiler-generated code on Opteron. On EM64T
|
||||
# sha256 was observed to run >80% faster and sha512 - >40%. No magical
|
||||
# tricks, just straight implementation... I really wonder why gcc
|
||||
# [being armed with inline assembler] fails to generate as fast code.
|
||||
# The only thing which is cool about this module is that it's very
|
||||
# same instruction sequence used for both SHA-256 and SHA-512. In
|
||||
# former case the instructions operate on 32-bit operands, while in
|
||||
# latter - on 64-bit ones. All I had to do is to get one flavor right,
|
||||
# the other one passed the test right away:-)
|
||||
#
|
||||
# sha256_block runs in ~1005 cycles on Opteron, which gives you
|
||||
# asymptotic performance of 64*1000/1005=63.7MBps times CPU clock
|
||||
# frequency in GHz. sha512_block runs in ~1275 cycles, which results
|
||||
# in 128*1000/1275=100MBps per GHz. Is there room for improvement?
|
||||
# Well, if you compare it to IA-64 implementation, which maintains
|
||||
# X[16] in register bank[!], tends to 4 instructions per CPU clock
|
||||
# cycle and runs in 1003 cycles, 1275 is very good result for 3-way
|
||||
# issue Opteron pipeline and X[16] maintained in memory. So that *if*
|
||||
# there is a way to improve it, *then* the only way would be to try to
|
||||
# offload X[16] updates to SSE unit, but that would require "deeper"
|
||||
# loop unroll, which in turn would naturally cause size blow-up, not
|
||||
# to mention increased complexity! And once again, only *if* it's
|
||||
# actually possible to noticeably improve overall ILP, instruction
|
||||
# level parallelism, on a given CPU implementation in this case.
|
||||
#
|
||||
# Special note on Intel EM64T. While Opteron CPU exhibits perfect
|
||||
# perfromance ratio of 1.5 between 64- and 32-bit flavors [see above],
|
||||
# [currently available] EM64T CPUs apparently are far from it. On the
|
||||
# contrary, 64-bit version, sha512_block, is ~30% *slower* than 32-bit
|
||||
# sha256_block:-( This is presumably because 64-bit shifts/rotates
|
||||
# apparently are not atomic instructions, but implemented in microcode.
|
||||
|
||||
$flavour = shift;
|
||||
$output = shift;
|
||||
if ($flavour =~ /\./) { $output = $flavour; undef $flavour; }
|
||||
|
||||
$win64=0; $win64=1 if ($flavour =~ /[nm]asm|mingw64/ || $output =~ /\.asm$/);
|
||||
|
||||
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
|
||||
( $xlate="${dir}x86_64-xlate.pl" and -f $xlate ) or
|
||||
( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
|
||||
die "can't locate x86_64-xlate.pl";
|
||||
|
||||
open OUT,"| \"$^X\" $xlate $flavour $output";
|
||||
*STDOUT=*OUT;
|
||||
|
||||
# assume 256
|
||||
$func="sha256_block_data_order";
|
||||
$TABLE="K256";
|
||||
$SZ=4;
|
||||
@ROT=($A,$B,$C,$D,$E,$F,$G,$H)=("%eax","%ebx","%ecx","%edx",
|
||||
"%r8d","%r9d","%r10d","%r11d");
|
||||
($T1,$a0,$a1,$a2)=("%r12d","%r13d","%r14d","%r15d");
|
||||
@Sigma0=( 2,13,22);
|
||||
@Sigma1=( 6,11,25);
|
||||
@sigma0=( 7,18, 3);
|
||||
@sigma1=(17,19,10);
|
||||
$rounds=64;
|
||||
|
||||
$ctx="%rdi"; # 1st arg
|
||||
$round="%rdi"; # zaps $ctx
|
||||
$inp="%rsi"; # 2nd arg
|
||||
$Tbl="%rbp";
|
||||
|
||||
$_ctx="16*$SZ+0*8(%rsp)";
|
||||
$_inp="16*$SZ+1*8(%rsp)";
|
||||
$_end="16*$SZ+2*8(%rsp)";
|
||||
$_rsp="16*$SZ+3*8(%rsp)";
|
||||
$framesz="16*$SZ+4*8";
|
||||
|
||||
|
||||
sub ROUND_00_15()
|
||||
{ my ($i,$a,$b,$c,$d,$e,$f,$g,$h) = @_;
|
||||
|
||||
$code.=<<___;
|
||||
ror \$`$Sigma1[2]-$Sigma1[1]`,$a0
|
||||
mov $f,$a2
|
||||
mov $T1,`$SZ*($i&0xf)`(%rsp)
|
||||
|
||||
ror \$`$Sigma0[2]-$Sigma0[1]`,$a1
|
||||
xor $e,$a0
|
||||
xor $g,$a2 # f^g
|
||||
|
||||
ror \$`$Sigma1[1]-$Sigma1[0]`,$a0
|
||||
add $h,$T1 # T1+=h
|
||||
xor $a,$a1
|
||||
|
||||
add ($Tbl,$round,$SZ),$T1 # T1+=K[round]
|
||||
and $e,$a2 # (f^g)&e
|
||||
mov $b,$h
|
||||
|
||||
ror \$`$Sigma0[1]-$Sigma0[0]`,$a1
|
||||
xor $e,$a0
|
||||
xor $g,$a2 # Ch(e,f,g)=((f^g)&e)^g
|
||||
|
||||
xor $c,$h # b^c
|
||||
xor $a,$a1
|
||||
add $a2,$T1 # T1+=Ch(e,f,g)
|
||||
mov $b,$a2
|
||||
|
||||
ror \$$Sigma1[0],$a0 # Sigma1(e)
|
||||
and $a,$h # h=(b^c)&a
|
||||
and $c,$a2 # b&c
|
||||
|
||||
ror \$$Sigma0[0],$a1 # Sigma0(a)
|
||||
add $a0,$T1 # T1+=Sigma1(e)
|
||||
add $a2,$h # h+=b&c (completes +=Maj(a,b,c)
|
||||
|
||||
add $T1,$d # d+=T1
|
||||
add $T1,$h # h+=T1
|
||||
lea 1($round),$round # round++
|
||||
add $a1,$h # h+=Sigma0(a)
|
||||
|
||||
___
|
||||
}
|
||||
|
||||
sub ROUND_16_XX()
|
||||
{ my ($i,$a,$b,$c,$d,$e,$f,$g,$h) = @_;
|
||||
|
||||
$code.=<<___;
|
||||
mov `$SZ*(($i+1)&0xf)`(%rsp),$a0
|
||||
mov `$SZ*(($i+14)&0xf)`(%rsp),$a1
|
||||
mov $a0,$T1
|
||||
mov $a1,$a2
|
||||
|
||||
ror \$`$sigma0[1]-$sigma0[0]`,$T1
|
||||
xor $a0,$T1
|
||||
shr \$$sigma0[2],$a0
|
||||
|
||||
ror \$$sigma0[0],$T1
|
||||
xor $T1,$a0 # sigma0(X[(i+1)&0xf])
|
||||
mov `$SZ*(($i+9)&0xf)`(%rsp),$T1
|
||||
|
||||
ror \$`$sigma1[1]-$sigma1[0]`,$a2
|
||||
xor $a1,$a2
|
||||
shr \$$sigma1[2],$a1
|
||||
|
||||
ror \$$sigma1[0],$a2
|
||||
add $a0,$T1
|
||||
xor $a2,$a1 # sigma1(X[(i+14)&0xf])
|
||||
|
||||
add `$SZ*($i&0xf)`(%rsp),$T1
|
||||
mov $e,$a0
|
||||
add $a1,$T1
|
||||
mov $a,$a1
|
||||
___
|
||||
&ROUND_00_15(@_);
|
||||
}
|
||||
|
||||
$code=<<___;
|
||||
.text
|
||||
|
||||
.globl $func
|
||||
.type $func,\@function,4
|
||||
.align 16
|
||||
$func:
|
||||
push %rbx
|
||||
push %rbp
|
||||
push %r12
|
||||
push %r13
|
||||
push %r14
|
||||
push %r15
|
||||
mov %rsp,%r11 # copy %rsp
|
||||
shl \$4,%rdx # num*16
|
||||
sub \$$framesz,%rsp
|
||||
lea ($inp,%rdx,$SZ),%rdx # inp+num*16*$SZ
|
||||
and \$-64,%rsp # align stack frame
|
||||
mov $ctx,$_ctx # save ctx, 1st arg
|
||||
mov $inp,$_inp # save inp, 2nd arh
|
||||
mov %rdx,$_end # save end pointer, "3rd" arg
|
||||
mov %r11,$_rsp # save copy of %rsp
|
||||
.Lprologue:
|
||||
|
||||
lea $TABLE(%rip),$Tbl
|
||||
|
||||
mov $SZ*0($ctx),$A
|
||||
mov $SZ*1($ctx),$B
|
||||
mov $SZ*2($ctx),$C
|
||||
mov $SZ*3($ctx),$D
|
||||
mov $SZ*4($ctx),$E
|
||||
mov $SZ*5($ctx),$F
|
||||
mov $SZ*6($ctx),$G
|
||||
mov $SZ*7($ctx),$H
|
||||
jmp .Lloop
|
||||
|
||||
.align 16
|
||||
.Lloop:
|
||||
xor $round,$round
|
||||
___
|
||||
for($i=0;$i<16;$i++) {
|
||||
$code.=" mov $SZ*$i($inp),$T1\n";
|
||||
$code.=" mov @ROT[4],$a0\n";
|
||||
$code.=" mov @ROT[0],$a1\n";
|
||||
$code.=" bswap $T1\n";
|
||||
&ROUND_00_15($i,@ROT);
|
||||
unshift(@ROT,pop(@ROT));
|
||||
}
|
||||
$code.=<<___;
|
||||
jmp .Lrounds_16_xx
|
||||
.align 16
|
||||
.Lrounds_16_xx:
|
||||
___
|
||||
for(;$i<32;$i++) {
|
||||
&ROUND_16_XX($i,@ROT);
|
||||
unshift(@ROT,pop(@ROT));
|
||||
}
|
||||
|
||||
$code.=<<___;
|
||||
cmp \$$rounds,$round
|
||||
jb .Lrounds_16_xx
|
||||
|
||||
mov $_ctx,$ctx
|
||||
lea 16*$SZ($inp),$inp
|
||||
|
||||
add $SZ*0($ctx),$A
|
||||
add $SZ*1($ctx),$B
|
||||
add $SZ*2($ctx),$C
|
||||
add $SZ*3($ctx),$D
|
||||
add $SZ*4($ctx),$E
|
||||
add $SZ*5($ctx),$F
|
||||
add $SZ*6($ctx),$G
|
||||
add $SZ*7($ctx),$H
|
||||
|
||||
cmp $_end,$inp
|
||||
|
||||
mov $A,$SZ*0($ctx)
|
||||
mov $B,$SZ*1($ctx)
|
||||
mov $C,$SZ*2($ctx)
|
||||
mov $D,$SZ*3($ctx)
|
||||
mov $E,$SZ*4($ctx)
|
||||
mov $F,$SZ*5($ctx)
|
||||
mov $G,$SZ*6($ctx)
|
||||
mov $H,$SZ*7($ctx)
|
||||
jb .Lloop
|
||||
|
||||
mov $_rsp,%rsi
|
||||
mov (%rsi),%r15
|
||||
mov 8(%rsi),%r14
|
||||
mov 16(%rsi),%r13
|
||||
mov 24(%rsi),%r12
|
||||
mov 32(%rsi),%rbp
|
||||
mov 40(%rsi),%rbx
|
||||
lea 48(%rsi),%rsp
|
||||
.Lepilogue:
|
||||
ret
|
||||
.size $func,.-$func
|
||||
___
|
||||
|
||||
if ($SZ==4) {
|
||||
$code.=<<___;
|
||||
.align 64
|
||||
.type $TABLE,\@object
|
||||
$TABLE:
|
||||
.long 0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5
|
||||
.long 0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5
|
||||
.long 0xd807aa98,0x12835b01,0x243185be,0x550c7dc3
|
||||
.long 0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174
|
||||
.long 0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc
|
||||
.long 0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da
|
||||
.long 0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7
|
||||
.long 0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967
|
||||
.long 0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13
|
||||
.long 0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85
|
||||
.long 0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3
|
||||
.long 0xd192e819,0xd6990624,0xf40e3585,0x106aa070
|
||||
.long 0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5
|
||||
.long 0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3
|
||||
.long 0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208
|
||||
.long 0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2
|
||||
___
|
||||
} else {
|
||||
$code.=<<___;
|
||||
.align 64
|
||||
.type $TABLE,\@object
|
||||
$TABLE:
|
||||
.quad 0x428a2f98d728ae22,0x7137449123ef65cd
|
||||
.quad 0xb5c0fbcfec4d3b2f,0xe9b5dba58189dbbc
|
||||
.quad 0x3956c25bf348b538,0x59f111f1b605d019
|
||||
.quad 0x923f82a4af194f9b,0xab1c5ed5da6d8118
|
||||
.quad 0xd807aa98a3030242,0x12835b0145706fbe
|
||||
.quad 0x243185be4ee4b28c,0x550c7dc3d5ffb4e2
|
||||
.quad 0x72be5d74f27b896f,0x80deb1fe3b1696b1
|
||||
.quad 0x9bdc06a725c71235,0xc19bf174cf692694
|
||||
.quad 0xe49b69c19ef14ad2,0xefbe4786384f25e3
|
||||
.quad 0x0fc19dc68b8cd5b5,0x240ca1cc77ac9c65
|
||||
.quad 0x2de92c6f592b0275,0x4a7484aa6ea6e483
|
||||
.quad 0x5cb0a9dcbd41fbd4,0x76f988da831153b5
|
||||
.quad 0x983e5152ee66dfab,0xa831c66d2db43210
|
||||
.quad 0xb00327c898fb213f,0xbf597fc7beef0ee4
|
||||
.quad 0xc6e00bf33da88fc2,0xd5a79147930aa725
|
||||
.quad 0x06ca6351e003826f,0x142929670a0e6e70
|
||||
.quad 0x27b70a8546d22ffc,0x2e1b21385c26c926
|
||||
.quad 0x4d2c6dfc5ac42aed,0x53380d139d95b3df
|
||||
.quad 0x650a73548baf63de,0x766a0abb3c77b2a8
|
||||
.quad 0x81c2c92e47edaee6,0x92722c851482353b
|
||||
.quad 0xa2bfe8a14cf10364,0xa81a664bbc423001
|
||||
.quad 0xc24b8b70d0f89791,0xc76c51a30654be30
|
||||
.quad 0xd192e819d6ef5218,0xd69906245565a910
|
||||
.quad 0xf40e35855771202a,0x106aa07032bbd1b8
|
||||
.quad 0x19a4c116b8d2d0c8,0x1e376c085141ab53
|
||||
.quad 0x2748774cdf8eeb99,0x34b0bcb5e19b48a8
|
||||
.quad 0x391c0cb3c5c95a63,0x4ed8aa4ae3418acb
|
||||
.quad 0x5b9cca4f7763e373,0x682e6ff3d6b2b8a3
|
||||
.quad 0x748f82ee5defb2fc,0x78a5636f43172f60
|
||||
.quad 0x84c87814a1f0ab72,0x8cc702081a6439ec
|
||||
.quad 0x90befffa23631e28,0xa4506cebde82bde9
|
||||
.quad 0xbef9a3f7b2c67915,0xc67178f2e372532b
|
||||
.quad 0xca273eceea26619c,0xd186b8c721c0c207
|
||||
.quad 0xeada7dd6cde0eb1e,0xf57d4f7fee6ed178
|
||||
.quad 0x06f067aa72176fba,0x0a637dc5a2c898a6
|
||||
.quad 0x113f9804bef90dae,0x1b710b35131c471b
|
||||
.quad 0x28db77f523047d84,0x32caab7b40c72493
|
||||
.quad 0x3c9ebe0a15c9bebc,0x431d67c49c100d4c
|
||||
.quad 0x4cc5d4becb3e42b6,0x597f299cfc657e2a
|
||||
.quad 0x5fcb6fab3ad6faec,0x6c44198c4a475817
|
||||
___
|
||||
}
|
||||
|
||||
# EXCEPTION_DISPOSITION handler (EXCEPTION_RECORD *rec,ULONG64 frame,
|
||||
# CONTEXT *context,DISPATCHER_CONTEXT *disp)
|
||||
if ($win64) {
|
||||
$rec="%rcx";
|
||||
$frame="%rdx";
|
||||
$context="%r8";
|
||||
$disp="%r9";
|
||||
|
||||
$code.=<<___;
|
||||
.extern __imp_RtlVirtualUnwind
|
||||
.type se_handler,\@abi-omnipotent
|
||||
.align 16
|
||||
se_handler:
|
||||
push %rsi
|
||||
push %rdi
|
||||
push %rbx
|
||||
push %rbp
|
||||
push %r12
|
||||
push %r13
|
||||
push %r14
|
||||
push %r15
|
||||
pushfq
|
||||
sub \$64,%rsp
|
||||
|
||||
mov 120($context),%rax # pull context->Rax
|
||||
mov 248($context),%rbx # pull context->Rip
|
||||
|
||||
lea .Lprologue(%rip),%r10
|
||||
cmp %r10,%rbx # context->Rip<.Lprologue
|
||||
jb .Lin_prologue
|
||||
|
||||
mov 152($context),%rax # pull context->Rsp
|
||||
|
||||
lea .Lepilogue(%rip),%r10
|
||||
cmp %r10,%rbx # context->Rip>=.Lepilogue
|
||||
jae .Lin_prologue
|
||||
|
||||
mov 16*$SZ+3*8(%rax),%rax # pull $_rsp
|
||||
lea 48(%rax),%rax
|
||||
|
||||
mov -8(%rax),%rbx
|
||||
mov -16(%rax),%rbp
|
||||
mov -24(%rax),%r12
|
||||
mov -32(%rax),%r13
|
||||
mov -40(%rax),%r14
|
||||
mov -48(%rax),%r15
|
||||
mov %rbx,144($context) # restore context->Rbx
|
||||
mov %rbp,160($context) # restore context->Rbp
|
||||
mov %r12,216($context) # restore context->R12
|
||||
mov %r13,224($context) # restore context->R13
|
||||
mov %r14,232($context) # restore context->R14
|
||||
mov %r15,240($context) # restore context->R15
|
||||
|
||||
.Lin_prologue:
|
||||
mov 8(%rax),%rdi
|
||||
mov 16(%rax),%rsi
|
||||
mov %rax,152($context) # restore context->Rsp
|
||||
mov %rsi,168($context) # restore context->Rsi
|
||||
mov %rdi,176($context) # restore context->Rdi
|
||||
|
||||
mov 40($disp),%rdi # disp->ContextRecord
|
||||
mov $context,%rsi # context
|
||||
mov \$154,%ecx # sizeof(CONTEXT)
|
||||
.long 0xa548f3fc # cld; rep movsq
|
||||
|
||||
mov $disp,%rsi
|
||||
xor %rcx,%rcx # arg1, UNW_FLAG_NHANDLER
|
||||
mov 8(%rsi),%rdx # arg2, disp->ImageBase
|
||||
mov 0(%rsi),%r8 # arg3, disp->ControlPc
|
||||
mov 16(%rsi),%r9 # arg4, disp->FunctionEntry
|
||||
mov 40(%rsi),%r10 # disp->ContextRecord
|
||||
lea 56(%rsi),%r11 # &disp->HandlerData
|
||||
lea 24(%rsi),%r12 # &disp->EstablisherFrame
|
||||
mov %r10,32(%rsp) # arg5
|
||||
mov %r11,40(%rsp) # arg6
|
||||
mov %r12,48(%rsp) # arg7
|
||||
mov %rcx,56(%rsp) # arg8, (NULL)
|
||||
call *__imp_RtlVirtualUnwind(%rip)
|
||||
|
||||
mov \$1,%eax # ExceptionContinueSearch
|
||||
add \$64,%rsp
|
||||
popfq
|
||||
pop %r15
|
||||
pop %r14
|
||||
pop %r13
|
||||
pop %r12
|
||||
pop %rbp
|
||||
pop %rbx
|
||||
pop %rdi
|
||||
pop %rsi
|
||||
ret
|
||||
.size se_handler,.-se_handler
|
||||
|
||||
.section .pdata
|
||||
.align 4
|
||||
.rva .LSEH_begin_$func
|
||||
.rva .LSEH_end_$func
|
||||
.rva .LSEH_info_$func
|
||||
|
||||
.section .xdata
|
||||
.align 8
|
||||
.LSEH_info_$func:
|
||||
.byte 9,0,0,0
|
||||
.rva se_handler
|
||||
___
|
||||
}
|
||||
|
||||
$code =~ s/\`([^\`]*)\`/eval $1/gem;
|
||||
print $code;
|
||||
close STDOUT;
|
||||
@@ -54,31 +54,18 @@ die "can't locate x86_64-xlate.pl";
|
||||
open OUT,"| \"$^X\" $xlate $flavour $output";
|
||||
*STDOUT=*OUT;
|
||||
|
||||
if ($output =~ /512/) {
|
||||
$func="sha512_block_data_order";
|
||||
$TABLE="K512";
|
||||
$SZ=8;
|
||||
@ROT=($A,$B,$C,$D,$E,$F,$G,$H)=("%rax","%rbx","%rcx","%rdx",
|
||||
"%r8", "%r9", "%r10","%r11");
|
||||
($T1,$a0,$a1,$a2)=("%r12","%r13","%r14","%r15");
|
||||
@Sigma0=(28,34,39);
|
||||
@Sigma1=(14,18,41);
|
||||
@sigma0=(1, 8, 7);
|
||||
@sigma1=(19,61, 6);
|
||||
$rounds=80;
|
||||
} else {
|
||||
$func="sha256_block_data_order";
|
||||
$TABLE="K256";
|
||||
$SZ=4;
|
||||
@ROT=($A,$B,$C,$D,$E,$F,$G,$H)=("%eax","%ebx","%ecx","%edx",
|
||||
"%r8d","%r9d","%r10d","%r11d");
|
||||
($T1,$a0,$a1,$a2)=("%r12d","%r13d","%r14d","%r15d");
|
||||
@Sigma0=( 2,13,22);
|
||||
@Sigma1=( 6,11,25);
|
||||
@sigma0=( 7,18, 3);
|
||||
@sigma1=(17,19,10);
|
||||
$rounds=64;
|
||||
}
|
||||
# assume 512
|
||||
$func="sha512_block_data_order";
|
||||
$TABLE="K512";
|
||||
$SZ=8;
|
||||
@ROT=($A,$B,$C,$D,$E,$F,$G,$H)=("%rax","%rbx","%rcx","%rdx",
|
||||
"%r8", "%r9", "%r10","%r11");
|
||||
($T1,$a0,$a1,$a2)=("%r12","%r13","%r14","%r15");
|
||||
@Sigma0=(28,34,39);
|
||||
@Sigma1=(14,18,41);
|
||||
@sigma0=(1, 8, 7);
|
||||
@sigma1=(19,61, 6);
|
||||
$rounds=80;
|
||||
|
||||
$ctx="%rdi"; # 1st arg
|
||||
$round="%rdi"; # zaps $ctx
|
||||
|
||||
25
deps/uv/.gitignore
vendored
25
deps/uv/.gitignore
vendored
@@ -9,11 +9,32 @@ core
|
||||
vgcore.*
|
||||
.buildstamp
|
||||
|
||||
/libuv.so
|
||||
/.deps/
|
||||
/.libs/
|
||||
/aclocal.m4
|
||||
/ar-lib
|
||||
/autom4te.cache/
|
||||
/compile
|
||||
/config.guess
|
||||
/config.log
|
||||
/config.status
|
||||
/config.sub
|
||||
/configure
|
||||
/depcomp
|
||||
/install-sh
|
||||
/libtool
|
||||
/libuv.a
|
||||
/libuv.dylib
|
||||
/libuv.pc
|
||||
/libuv.so
|
||||
/ltmain.sh
|
||||
/missing
|
||||
/test-driver
|
||||
Makefile
|
||||
Makefile.in
|
||||
|
||||
# Generated by dtrace(1) when doing an in-tree build.
|
||||
/src/unix/uv-dtrace.h
|
||||
/include/uv-dtrace.h
|
||||
|
||||
/out/
|
||||
/build/gyp
|
||||
|
||||
6
deps/uv/AUTHORS
vendored
6
deps/uv/AUTHORS
vendored
@@ -79,9 +79,15 @@ Tim Bradshaw <tfb@cley.com>
|
||||
Timothy J. Fontaine <tjfontaine@gmail.com>
|
||||
Marc Schlaich <marc.schlaich@googlemail.com>
|
||||
Brian Mazza <louseman@gmail.com>
|
||||
Elliot Saba <staticfloat@gmail.com>
|
||||
Ben Kelly <ben@wanderview.com>
|
||||
Kristian Evensen <kristian.evensen@gmail.com>
|
||||
Nils Maier <maierman@web.de>
|
||||
Nicholas Vavilov <vvnicholas@gmail.com>
|
||||
Miroslav Bajtoš <miro.bajtos@gmail.com>
|
||||
Elliot Saba <staticfloat@gmail.com>
|
||||
Sean Silva <chisophugis@gmail.com>
|
||||
Wynn Wilkes <wynnw@movenetworks.com>
|
||||
Linus Mårtensson <linus.martensson@sonymobile.com>
|
||||
Andrei Sedoi <bsnote@gmail.com>
|
||||
Navaneeth Kedaram Nambiathan <navaneethkn@gmail.com>
|
||||
|
||||
336
deps/uv/ChangeLog
vendored
336
deps/uv/ChangeLog
vendored
@@ -1,10 +1,151 @@
|
||||
2013.07.26, Version 0.10.13 (Stable)
|
||||
2013.08.22, Version 0.11.8 (Unstable)
|
||||
|
||||
Changes since version 0.11.7:
|
||||
|
||||
* unix: fix missing return value warning in stream.c (Ben Noordhuis)
|
||||
|
||||
* build: serial-tests was added in automake v1.12 (Ben Noordhuis)
|
||||
|
||||
* windows: fix uninitialized local variable warning (Ben Noordhuis)
|
||||
|
||||
* windows: fix missing return value warning (Ben Noordhuis)
|
||||
|
||||
* build: fix string comparisons in autogen.sh (Ben Noordhuis)
|
||||
|
||||
* windows: move INLINE macro, remove UNUSED (Ben Noordhuis)
|
||||
|
||||
* unix: clean up __attribute__((quux)) usage (Ben Noordhuis)
|
||||
|
||||
* sunos: remove futimes() macro (Ben Noordhuis)
|
||||
|
||||
* unix: fix uv__signal_unlock() prototype (Ben Noordhuis)
|
||||
|
||||
* unix, windows: allow NULL async callback (Ben Noordhuis)
|
||||
|
||||
* build: apply dtrace -G to all object files (Timothy J. Fontaine)
|
||||
|
||||
* darwin: fix indentation in uv__hrtime() (Ben Noordhuis)
|
||||
|
||||
* darwin: create fsevents thread on demand (Ben Noordhuis)
|
||||
|
||||
* darwin: reduce fsevents thread stack size (Ben Noordhuis)
|
||||
|
||||
* darwin: call pthread_setname_np() if available (Ben Noordhuis)
|
||||
|
||||
* build: fix automake serial-tests check again (Ben Noordhuis)
|
||||
|
||||
* unix: retry waitpid() on EINTR (Ben Noordhuis)
|
||||
|
||||
* darwin: fix ios build error (Ben Noordhuis)
|
||||
|
||||
* darwin: fix ios compiler warning (Ben Noordhuis)
|
||||
|
||||
* test: simplify test-ip6-addr.c (Ben Noordhuis)
|
||||
|
||||
* unix, windows: fix ipv6 link-local address parsing (Ben Noordhuis)
|
||||
|
||||
* fsevents: FSEvents is most likely not thread-safe (Fedor Indutny)
|
||||
|
||||
* windows: omit stdint.h, fix msvc 2008 build error (Ben Noordhuis)
|
||||
|
||||
|
||||
2013.08.07, Version 0.11.7 (Unstable), 3cad361f8776f70941b39d65bd9426bcb1aa817b
|
||||
|
||||
Changes since version 0.11.6:
|
||||
|
||||
* unix, windows: fix uv_fs_chown() function prototype (Ben Noordhuis)
|
||||
|
||||
* unix, windows: remove unused variables (Brian White)
|
||||
|
||||
* test: fix signed/unsigned comparison warnings (Ben Noordhuis)
|
||||
|
||||
* build: dtrace shouldn't break out of tree builds (Timothy J. Fontaine)
|
||||
|
||||
* unix, windows: don't read/recv if buf.len==0 (Ben Noordhuis)
|
||||
|
||||
* build: add mingw makefile (Ben Noordhuis)
|
||||
|
||||
* unix, windows: add MAC to uv_interface_addresses() (Brian White)
|
||||
|
||||
* build: enable AM_INIT_AUTOMAKE([subdir-objects]) (Ben Noordhuis)
|
||||
|
||||
* unix, windows: make buf arg to uv_fs_write const (Ben Noordhuis)
|
||||
|
||||
* sunos: fix build breakage introduced in e3a657c (Ben Noordhuis)
|
||||
|
||||
* aix: fix build breakage introduced in 3ee4d3f (Ben Noordhuis)
|
||||
|
||||
* windows: fix mingw32 build, define JOB_OBJECT_XXX (Yasuhiro Matsumoto)
|
||||
|
||||
* windows: fix mingw32 build, include limits.h (Yasuhiro Matsumoto)
|
||||
|
||||
* test: replace sprintf() with snprintf() (Ben Noordhuis)
|
||||
|
||||
* test: replace strcpy() with strncpy() (Ben Noordhuis)
|
||||
|
||||
* openbsd: fix uv_ip6_addr() unused variable warnings (Ben Noordhuis)
|
||||
|
||||
* openbsd: fix dlerror() const correctness warning (Ben Noordhuis)
|
||||
|
||||
* openbsd: fix uv_fs_sendfile() unused variable warnings (Ben Noordhuis)
|
||||
|
||||
* build: disable parallel automake tests (Ben Noordhuis)
|
||||
|
||||
* test: add windows-only snprintf() function (Ben Noordhuis)
|
||||
|
||||
* build: add automake serial-tests version check (Ben Noordhuis)
|
||||
|
||||
|
||||
2013.07.26, Version 0.10.13 (Stable), 381312e1fe6fecbabc943ccd56f0e7d114b3d064
|
||||
|
||||
Changes since version 0.10.12:
|
||||
|
||||
* unix, windows: fix uv_fs_chown() function prototype (Ben Noordhuis)
|
||||
|
||||
|
||||
2013.07.21, Version 0.11.6 (Unstable), 6645b93273e0553d23823c576573b82b129bf28c
|
||||
|
||||
Changes since version 0.11.5:
|
||||
|
||||
* test: open stdout fd in write-only mode (Ben Noordhuis)
|
||||
|
||||
* windows: uv_spawn shouldn't reject reparse points (Bert Belder)
|
||||
|
||||
* windows: use WSAGetLastError(), not errno (Ben Noordhuis)
|
||||
|
||||
* build: darwin: disable -fstrict-aliasing warnings (Ben Noordhuis)
|
||||
|
||||
* test: fix signed/unsigned compiler warning (Ben Noordhuis)
|
||||
|
||||
* test: add 'start timer from check handle' test (Ben Noordhuis)
|
||||
|
||||
* build: `all` now builds static and dynamic lib (Ben Noordhuis)
|
||||
|
||||
* unix, windows: add extra fields to uv_stat_t (Saúl Ibarra Corretgé)
|
||||
|
||||
* build: add install target to the makefile (Navaneeth Kedaram Nambiathan)
|
||||
|
||||
* build: switch to autotools (Ben Noordhuis)
|
||||
|
||||
* build: use AM_PROG_AR conditionally (Ben Noordhuis)
|
||||
|
||||
* test: fix fs_fstat test on sunos (Ben Noordhuis)
|
||||
|
||||
* test: fix fs_chown when running as root (Ben Noordhuis)
|
||||
|
||||
* test: fix spawn_setgid_fails and spawn_setuid_fails (Ben Noordhuis)
|
||||
|
||||
* build: use AM_SILENT_RULES conditionally (Ben Noordhuis)
|
||||
|
||||
* build: add DTrace detection for autotools (Timothy J. Fontaine)
|
||||
|
||||
* linux,darwin,win: link-local IPv6 addresses (Miroslav Bajtoš)
|
||||
|
||||
* unix: fix build when !defined(PTHREAD_MUTEX_ERRORCHECK) (Ben Noordhuis)
|
||||
|
||||
* unix, windows: return error codes directly (Ben Noordhuis)
|
||||
|
||||
|
||||
2013.07.10, Version 0.10.12 (Stable), 58a46221bba726746887a661a9f36fe9ff204209
|
||||
|
||||
Changes since version 0.10.11:
|
||||
@@ -22,6 +163,45 @@ Changes since version 0.10.11:
|
||||
* unix: fix build when !defined(PTHREAD_MUTEX_ERRORCHECK) (Ben Noordhuis)
|
||||
|
||||
|
||||
2013.06.27, Version 0.11.5 (Unstable), e3c63ff1627a14e96f54c1c62b0d68b446d8425b
|
||||
|
||||
Changes since version 0.11.4:
|
||||
|
||||
* build: remove CSTDFLAG, use only CFLAGS (Ben Noordhuis)
|
||||
|
||||
* unix: support for android builds (Linus Mårtensson)
|
||||
|
||||
* unix: avoid extra read, short-circuit on POLLHUP (Ben Noordhuis)
|
||||
|
||||
* uv: support android libuv standalone build (Linus Mårtensson)
|
||||
|
||||
* src: make queue.h c++ compatible (Ben Noordhuis)
|
||||
|
||||
* unix: s/ngx-queue.h/queue.h/ in checksparse.sh (Ben Noordhuis)
|
||||
|
||||
* unix: unconditionally stop handle on close (Ben Noordhuis)
|
||||
|
||||
* freebsd: don't enable dtrace if it's not available (Brian White)
|
||||
|
||||
* build: make HAVE_DTRACE=0 should disable dtrace (Timothy J. Fontaine)
|
||||
|
||||
* unix: remove overzealous assert (Ben Noordhuis)
|
||||
|
||||
* unix: remove unused function uv_fatal_error() (Ben Noordhuis)
|
||||
|
||||
* unix, windows: clean up uv_thread_create() (Ben Noordhuis)
|
||||
|
||||
* queue: fix pointer truncation on LLP64 platforms (Bert Belder)
|
||||
|
||||
* build: set OS=="android" for android builds (Linus Mårtensson)
|
||||
|
||||
* windows: don't use uppercase in include filename (Ben Noordhuis)
|
||||
|
||||
* stream: add an API to make streams do blocking writes (Henry Rawas)
|
||||
|
||||
* windows: use WSAGetLastError(), not errno (Ben Noordhuis)
|
||||
|
||||
|
||||
2013.06.13, Version 0.10.11 (Stable), c3b75406a66a10222a589cb173e8f469e9665c7e
|
||||
|
||||
Changes since version 0.10.10:
|
||||
@@ -47,13 +227,77 @@ Changes since version 0.10.9:
|
||||
|
||||
* linux: fix cpu model parsing on newer arm kernels (Ben Noordhuis)
|
||||
|
||||
* linux: fix memory leak in uv_cpu_info() error path (Ben Noordhuis)
|
||||
* linux: fix a memory leak in uv_cpu_info() error path (Ben Noordhuis)
|
||||
|
||||
* linux: don't ignore OOM errors in uv_cpu_info() (Ben Noordhuis)
|
||||
* linux: don't ignore out-of-memory errors in uv_cpu_info() (Ben Noordhuis)
|
||||
|
||||
* unix, windows: move uv_now() to uv-common.c (Ben Noordhuis)
|
||||
|
||||
* darwin: make uv_fs_sendfile() respect length param (Wynn Wilkes)
|
||||
* test: fix a compilation problem in test-osx-select.c that was caused by the
|
||||
use of c-style comments (Bert Belder)
|
||||
|
||||
* darwin: use uv_fs_sendfile() use the sendfile api correctly (Wynn Wilkes)
|
||||
|
||||
|
||||
2013.05.30, Version 0.11.4 (Unstable), e43e5b3d954a0989db5588aa110e1fe4fe6e0219
|
||||
|
||||
Changes since version 0.11.3:
|
||||
|
||||
* windows: make uv_spawn not fail when the libuv embedding application is run
|
||||
under external job control (Bert Belder)
|
||||
|
||||
* darwin: assume CFRunLoopStop() isn't thread-safe, fixing a race condition
|
||||
when stopping the 'stdin select hack' thread (Fedor Indutny)
|
||||
|
||||
* win: fix UV_EALREADY not being reported correctly to the libuv user in some
|
||||
cases (Bert Belder)
|
||||
|
||||
* darwin: make the uv__cf_loop_runner and uv__cf_loop_cb functions static (Ben
|
||||
Noordhuis)
|
||||
|
||||
* darwin: task_info() cannot fail (Ben Noordhuis)
|
||||
|
||||
* unix: add error mapping for ENETDOWN (Ben Noordhuis)
|
||||
|
||||
* unix: implicitly signal write errors to the libuv user (Ben Noordhuis)
|
||||
|
||||
* unix: fix assertion error on signal pipe overflow (Bert Belder)
|
||||
|
||||
* unix: turn off POLLOUT after stream connect (Ben Noordhuis)
|
||||
|
||||
* unix: fix stream refcounting buglet (Ben Noordhuis)
|
||||
|
||||
* unix: remove assert statements that are no longer correct (Ben Noordhuis)
|
||||
|
||||
* unix: appease warning about non-standard `inline` (Sean Silva)
|
||||
|
||||
* unix: add uv__is_closing() macro (Ben Noordhuis)
|
||||
|
||||
* unix: stop stream POLLOUT watcher on write error (Ben Noordhuis)
|
||||
|
||||
* include: document uv_update_time() and uv_now() (Ben Noordhuis)
|
||||
|
||||
* linux: fix cpu model parsing on newer arm kernels (Ben Noordhuis)
|
||||
|
||||
* linux: fix a memory leak in uv_cpu_info() error path (Ben Noordhuis)
|
||||
|
||||
* linux: don't ignore out-of-memory errors in uv_cpu_info() (Ben Noordhuis)
|
||||
|
||||
* unix, windows: move uv_now() to uv-common.c (Ben Noordhuis)
|
||||
|
||||
* test: fix a compilation problem in test-osx-select.c that was caused by the
|
||||
use of c-style comments (Bert Belder)
|
||||
|
||||
* darwin: use uv_fs_sendfile() use the sendfile api correctly (Wynn Wilkes)
|
||||
|
||||
* windows: call idle handles on every loop iteration, something the unix
|
||||
implementation already did (Bert Belder)
|
||||
|
||||
* test: update the idle-starvation test to verify that idle handles are called
|
||||
in every loop iteration (Bert Belder)
|
||||
|
||||
* unix, windows: ensure that uv_run() in RUN_ONCE mode calls timers that expire
|
||||
after blocking (Ben Noordhuis)
|
||||
|
||||
|
||||
2013.05.29, Version 0.10.9 (Stable), a195f9ace23d92345baf57582678bfc3017e6632
|
||||
@@ -92,6 +336,33 @@ Changes since version 0.10.7:
|
||||
* unix: turn off POLLOUT after stream connect (Ben Noordhuis)
|
||||
|
||||
|
||||
2013.05.16, Version 0.11.3 (Unstable), 0a48c05b5988aea84c605751900926fa25443b34
|
||||
|
||||
Changes since version 0.11.2:
|
||||
|
||||
* unix: clean up uv_accept() (Ben Noordhuis)
|
||||
|
||||
* unix: remove errno preserving code (Ben Noordhuis)
|
||||
|
||||
* darwin: fix ios build, don't require ApplicationServices (Ben Noordhuis)
|
||||
|
||||
* windows: kill child processes when the parent dies (Bert Belder)
|
||||
|
||||
* build: set soname in shared library (Ben Noordhuis)
|
||||
|
||||
* build: make `make test` link against .a again (Ben Noordhuis)
|
||||
|
||||
* build: only set soname on shared object builds (Timothy J. Fontaine)
|
||||
|
||||
* build: convert predefined $PLATFORM to lower case (Elliot Saba)
|
||||
|
||||
* test: fix process_title failing on linux (Miroslav Bajtoš)
|
||||
|
||||
* test, sunos: disable process_title test (Miroslav Bajtoš)
|
||||
|
||||
* test: add error logging to tty unit test (Miroslav Bajtoš)
|
||||
|
||||
|
||||
2013.05.15, Version 0.10.7 (Stable), 028baaf0846b686a81e992cb2f2f5a9b8e841fcf
|
||||
|
||||
Changes since version 0.10.6:
|
||||
@@ -128,6 +399,25 @@ Changes since version 0.10.5:
|
||||
* build: only set soname on shared object builds (Timothy J. Fontaine)
|
||||
|
||||
|
||||
2013.05.11, Version 0.11.2 (Unstable), 3fba0bf65f091b91a9760530c05c6339c658d88b
|
||||
|
||||
Changes since version 0.11.1:
|
||||
|
||||
* darwin: look up file path with F_GETPATH (Ben Noordhuis)
|
||||
|
||||
* unix, windows: add uv_has_ref() function (Saúl Ibarra Corretgé)
|
||||
|
||||
* build: avoid double / in paths for dtrace (Timothy J. Fontaine)
|
||||
|
||||
* unix: remove src/unix/cygwin.c (Ben Noordhuis)
|
||||
|
||||
* windows: deal with the fact that GetTickCount might lag (Bert Belder)
|
||||
|
||||
* unix: silence STATIC_ASSERT compiler warnings (Ben Noordhuis)
|
||||
|
||||
* linux: don't use fopen() in uv_resident_set_memory() (Ben Noordhuis)
|
||||
|
||||
|
||||
2013.04.24, Version 0.10.5 (Stable), 6595a7732c52eb4f8e57c88655f72997a8567a67
|
||||
|
||||
Changes since version 0.10.4:
|
||||
@@ -178,6 +468,44 @@ Changes since version 0.10.3:
|
||||
* build: -Wno-dollar-in-identifier-extension is clang only (Ben Noordhuis)
|
||||
|
||||
|
||||
2013.04.11, Version 0.11.1 (Unstable), 5c10e82ae0bc99eff86d4b9baff1f1aa0bf84c0a
|
||||
|
||||
This is the first versioned release from the current unstable libuv branch.
|
||||
|
||||
Changes since Node.js v0.11.0:
|
||||
|
||||
* all platforms: nanosecond resolution support for uv_fs_[fl]stat (Timothy J.
|
||||
Fontaine)
|
||||
|
||||
* all platforms: add netmask to uv_interface_address (Ben Kelly)
|
||||
|
||||
* unix: make sure the `status` parameter passed to the `uv_getaddrinfo` is 0 or
|
||||
-1 (Ben Noordhuis)
|
||||
|
||||
* unix: limit the number of iovecs written in a single `writev` syscall to
|
||||
IOV_MAX (Fedor Indutny)
|
||||
|
||||
* unix: add dtrace probes for tick-start and tick-stop (Timothy J. Fontaine)
|
||||
|
||||
* mingw-w64: don't call _set_invalid_parameter_handler (Nils Maier)
|
||||
|
||||
* windows: fix memory leak in fs__sendfile (Shannen Saez)
|
||||
|
||||
* windows: fix edge case bugs in uv_cpu_info (Bert Belder)
|
||||
|
||||
* include: no longer ship with / include ngx-queue.h (Ben Noordhuis)
|
||||
|
||||
* include: remove UV_VERSION_* macros from uv.h (Ben Noordhuis)
|
||||
|
||||
* documentation updates (Kristian Evensen, Ben Kelly, Ben Noordhuis)
|
||||
|
||||
* build: fix dtrace-enabled builds (Ben Noordhuis, Timothy J. Fontaine)
|
||||
|
||||
* build: gyp disable thin archives (Timothy J. Fontaine)
|
||||
|
||||
* build: add support for Visual Studio 2012 (Nicholas Vavilov)
|
||||
|
||||
|
||||
2013.03.28, Version 0.10.3 (Stable), 31ebe23973dd98fd8a24c042b606f37a794e99d0
|
||||
|
||||
Changes since version 0.10.2:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user